-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCargo.toml
More file actions
193 lines (155 loc) · 5.56 KB
/
Copy pathCargo.toml
File metadata and controls
193 lines (155 loc) · 5.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
[package]
name = "harness-canopy"
version = "2.3.1"
edition = "2021"
rust-version = "1.91"
description = "A self-contained MCP server for AI agent task scheduling and file watching"
license = "MIT"
repository = "https://github.com/UniverLab/harness-canopy"
homepage = "https://github.com/UniverLab/harness-canopy"
keywords = ["mcp", "scheduler", "cron", "file-watcher", "ai-agent"]
categories = ["command-line-utilities", "development-tools"]
readme = "README.md"
# The demo recording is ~40 MB of gif and cast files. Nothing that `cargo
# install`s this crate needs them, and they alone push the package past the
# 10 MiB crates.io accepts — which the registry reports as an HTTP/2 stream
# reset, not as a size error, so it reads like a network fault.
exclude = ["demo/"]
[[bin]]
name = "canopy"
path = "src/main.rs"
[dependencies]
# MCP SDK
rmcp = { version = "1.3", features = ["server", "transport-io", "transport-streamable-http-server"] }
# Axum for Streamable HTTP transport
axum = "0.8"
# Async runtime
tokio = { version = "1.50", features = ["full"] }
# Serialization
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
# Field-path tracking for MCP tool parameter deserialization errors, so a
# wrongly-shaped call gets a message naming the failing field instead of a
# bare Rust type name.
serde_path_to_error = "0.1"
# Error handling
anyhow = "1.0"
thiserror = "2.0"
# Logging
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
# Schema generation for MCP tools
schemars = { version = "1.2.1", features = ["derive"] }
# SQLite persistence
rusqlite = { version = "0.39", features = ["bundled"] }
# File watching
notify = "8.2"
# Cron expression parsing (internal scheduler)
cron = "0.16"
# Date/time
chrono = { version = "0.4", features = ["serde"] }
chrono-tz = "0.10"
# CLI binary discovery
which = "8.0"
# CLI argument parsing
clap = { version = "4.6", features = ["derive"] }
# Home directory resolution
dirs = "6.0"
# UUID generation for execution runs
uuid = { version = "1", features = ["v4"] }
# SHA-256 for workdir_hash
sha2 = "0.11.0"
# Directory traversal for RAG ingestion
walkdir = "2"
# Regex matching for ragignore patterns
regex = "1"
# Graceful shutdown coordination
tokio-util = { version = "0.7", features = ["rt"] }
# TUI
ratatui = "0.30"
# PTY for interactive agents
portable-pty = "0.9"
# Virtual terminal emulator for embedding agent output
vt100 = "0.16"
# HTTP client for registry fetch
reqwest = { version = "0.13", features = ["blocking", "json"] }
# Interactive prompts for setup wizard
inquire = "0.9"
# Shell argument parsing
shell-words = "1.1"
# Random number generation for automata noise injection
rand = "0.10"
# Clipboard for text copy from TUI
arboard = "3.6"
# Decode OSC 52 clipboard payloads emitted by PTY programs
base64 = "0.22"
toml = "1.1.2"
# Path manipulation for relative paths
pathdiff = "0.2"
# Auto-update dependencies
flate2 = "1.0"
tar = "0.4"
tempfile = "3.8"
sysinfo = "0.38"
lancedb = "0.27.2"
arrow-array = "57.3.1"
arrow-schema = "57.3.1"
futures = "0.3"
# PDF text extraction
pdf-extract = "0.10.0"
# Local embedding models via ONNX Runtime (no API key required)
fastembed = { version = "5", optional = true }
# Already a transitive dependency of fastembed (its cache-path resolution
# and blocking download client both live here) — depended on directly so we
# can (a) check whether a model is already cached without loading it, and
# (b) fetch a model's files ourselves ahead of handing it to fastembed, so
# the daemon can report "downloading" vs "preparing" as two distinct phases
# instead of one opaque blocking call. `ureq` + `native-tls` matches exactly
# what fastembed's own default features already pull in for hf-hub, so this
# adds no new crate to the build graph — it just lets us name and call the
# same already-compiled client directly instead of only through fastembed.
hf-hub = { version = "0.5", optional = true, default-features = false, features = [
"ureq",
"native-tls",
] }
# Unix process management (kill, setsid)
[target.'cfg(unix)'.dependencies]
libc = "0.2"
[dev-dependencies]
tokio-test = "0.4"
tempfile = "3.8"
[features]
default = []
# Kept optional and off by default in both CI and release builds — not
# enabled here. fastembed's `ort` backend only ships prebuilt ONNX Runtime
# binaries for glibc targets; this crate's Linux release target is
# x86_64-unknown-linux-musl (for a fully static, portable binary), so there
# is no prebuilt to download there, and the released tarballs ship a single
# binary with no mechanism to carry a matching dylib alongside it. Making
# this a default/release feature would mean either abandoning the musl
# target or shipping a fragile dylib+rpath bundle — for a dependency this
# heavy (ndarray, tokenizers, image, hf-hub) on top of already ~40 MB
# tarballs. Instead, doctor/setup/rag-status all check capability
# (`embedding_client::provider_available`) and refuse/warn explicitly when
# this feature is off, so the absence is visible rather than silently green.
local-embeddings = ["dep:fastembed", "dep:hf-hub"]
[lints.clippy]
# Production quality lints
needless_pass_by_value = "warn"
redundant_closure = "warn"
redundant_clone = "warn"
large_enum_variant = "warn"
manual_let_else = "warn"
semicolon_if_nothing_returned = "warn"
inconsistent_struct_constructor = "warn"
doc_markdown = "warn"
[profile.dev]
# Reduce debug info from level 2 to 1 (keeps line tables, drops full type info)
debug = 1
# More codegen units for faster parallel compilation
codegen-units = 16
[profile.release]
opt-level = 3
lto = true
codegen-units = 1
strip = true