forked from librefang/librefang
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
322 lines (268 loc) · 10.4 KB
/
Copy pathCargo.toml
File metadata and controls
322 lines (268 loc) · 10.4 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
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
[workspace]
resolver = "2"
members = [
"crates/librefang-types",
"crates/librefang-memory",
"crates/librefang-memory-wiki",
"crates/librefang-runtime",
"crates/librefang-runtime-audit",
"crates/librefang-runtime-media",
"crates/librefang-runtime-sandbox-docker",
"crates/librefang-runtime-mcp",
"crates/librefang-llm-drivers",
"crates/librefang-llm-driver",
"crates/librefang-kernel-handle",
"crates/librefang-acp",
"crates/librefang-http",
"crates/librefang-wire",
"crates/librefang-api",
"crates/librefang-kernel",
"crates/librefang-kernel-router",
"crates/librefang-kernel-metering",
"crates/librefang-cli",
"crates/librefang-channels",
"crates/librefang-migrate",
"crates/librefang-skills",
"crates/librefang-desktop",
"crates/librefang-hands",
"crates/librefang-extensions",
"crates/librefang-telemetry",
"crates/librefang-rl-export",
"xtask",
"crates/librefang-testing",
]
[workspace.package]
version = "2026.5.17-beta.12"
edition = "2021"
license = "MIT"
repository = "https://github.com/librefang/librefang"
homepage = "https://librefang.ai"
rust-version = "1.94.1"
[workspace.dependencies]
# Async runtime
tokio = { version = "1", features = ["full"] }
tokio-stream = "0.1"
# Serialization
serde = { version = "1", features = ["derive"] }
serde_json = "1"
toml = "1.0"
rmp-serde = "1"
# Error handling
thiserror = "2.0"
anyhow = "1"
# Concurrency
dashmap = "6"
crossbeam = "0.8"
arc-swap = "1"
# Logging / Tracing
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "registry"] }
# OpenTelemetry
# DO NOT upgrade to 0.32 until `tracing-opentelemetry` releases a version
# that depends on opentelemetry 0.32 (current latest 0.32.1 still pins
# opentelemetry = "0.31"). Mixing 0.32 here with tracing-opentelemetry
# 0.32.1 leaves two copies of `opentelemetry::trace::Tracer` in the
# tree and breaks `SdkTracer: Tracer` trait bounds in telemetry.rs.
# dependabot bump #4947 violated this constraint and was reverted.
opentelemetry = "0.31"
opentelemetry_sdk = { version = "0.31", features = ["rt-tokio"] }
# `default-features = false` is critical: opentelemetry-otlp's default feature
# set enables `http-proto` + `reqwest-blocking-client`, which forces
# `opentelemetry-http` to pull `reqwest = "0.12"` alongside the workspace
# `reqwest = "0.13"` direct dep — duplicating the entire HTTP stack
# (rustls-platform-verifier 0.6 + 0.7, hyper-util, h2, …). We only ship
# OTLP traces over gRPC (tonic), so the reqwest-based exporters are dead
# weight. See #3679.
opentelemetry-otlp = { version = "0.31", default-features = false, features = ["grpc-tonic", "trace", "metrics", "logs"] }
tracing-opentelemetry = "0.32"
# W3C trace-context HeaderInjector for outbound LLM HTTP requests. Pulled in
# explicitly (not transitively via opentelemetry-otlp, which is built with
# `default-features = false` to avoid its reqwest-based exporters — see the
# note above). 0.31 aligns with `opentelemetry = "0.31"` and uses `http = 1`,
# matching the workspace `reqwest = "0.13"` http stack — no second http/reqwest
# tree is introduced.
opentelemetry-http = "0.31"
# Prometheus metrics
metrics = "0.24"
metrics-exporter-prometheus = "0.18"
# Time
chrono = { version = "0.4", features = ["serde"] }
chrono-tz = "0.10"
# IDs
uuid = { version = "1", features = ["v4", "v5", "serde"] }
# Database
rusqlite = { version = "0.39.0", features = ["bundled", "serde_json"] }
r2d2 = "0.8"
r2d2_sqlite = "0.34"
# CLI
clap = { version = "4", features = ["derive"] }
clap_complete = "4"
# HTTP client (for LLM drivers)
reqwest = { version = "0.13", default-features = false, features = ["json", "stream", "multipart", "rustls", "gzip", "deflate", "brotli", "form", "query", "socks"] }
# TLS fallback — bundled Mozilla CA roots for systems without system certs (musl, Termux, minimal containers)
rustls = "0.23"
webpki-roots = "1"
rustls-native-certs = "0.8"
# PEM parsing for user-supplied IMAP root CA certs (#4877). Tiny dep, no I/O.
rustls-pemfile = "2"
# Async trait
async-trait = "0.1"
# Base64
base64 = "0.22"
# Bitflags
bitflags = "2"
# Bytes
bytes = "1"
# Futures
futures = "0.3"
# MCP SDK
rmcp = { version = "1.6", default-features = false, features = ["client", "transport-child-process", "transport-streamable-http-client-reqwest", "reqwest"] }
# ACP (Agent Client Protocol) SDK — official Zed-maintained crates for IDE integration (#3313)
# `unstable` enables session/{resume,close,fork,list-additional-directories}, message-id, session-usage,
# and auth-method extensions so our agent surface matches what Zed publishes downstream.
#
# Pinned exactly (`=`-prefix). The `unstable` feature is explicitly
# marked breaking by upstream, so a caret bump (0.11.x) could change
# wire-format expectations between minor releases without warning.
# Bumping this pin is an explicit, reviewed change.
agent-client-protocol = { version = "=0.11.1", features = ["unstable"] }
agent-client-protocol-tokio = "=0.11.1"
tokio-util = { version = "0.7", features = ["compat"] }
# WebSocket client (for Discord/Slack gateway)
tokio-tungstenite = { version = "0.29.0", default-features = false, features = ["connect", "rustls-tls-native-roots"] }
url = "2"
urlencoding = "2"
# Markdown → HTML for Matrix's `formatted_body` (m.room.message). Matrix
# expects CommonMark in `body` and rendered HTML in `formatted_body`; the
# canonical Rust pull-parser. ~7 kLOC, MIT, no transitive deps that aren't
# already in our tree.
pulldown-cmark = { version = "0.13", default-features = false, features = ["html"] }
# Public Suffix List — used by mcp_auth to decide whether a metadata-declared
# token_endpoint shares a registrable domain with the operator-typed issuer
# host (refs #4665). Picked over `publicsuffix` because `psl` ships the PSL
# data baked-in at compile time (no runtime fetch), keeping the security check
# self-contained and reproducible.
psl = "2"
# Tera template engine — Jinja2-flavoured templates used by the workflow
# `Transform` operator (#4980 step 3). Sandboxed by default (no I/O,
# bounded recursion), well-maintained, MIT, and the standard pick when
# the alternative is `mlua` / `rhai` / a hand-rolled DSL — all heavier
# trees that we would have to babysit for security. Pin a single major
# so a future bump is a deliberate review, not a transient dependabot
# ping.
tera = { version = "1", default-features = false }
# WASM sandbox
wasmtime = "44"
# HTTP server (for API daemon)
axum = { version = "0.8", features = ["ws"] }
tower = "0.5"
tower-http = { version = "0.6", features = ["cors", "trace", "compression-gzip", "compression-br", "limit"] }
# Home directory resolution
dirs = "6"
# OS keyring access — libsecret on Linux, Keychain on macOS, Credential Manager
# on Windows. Falls back to the file-based AES-256-GCM keyring in vault.rs if
# the OS keyring is genuinely unavailable.
keyring = { version = "3", features = ["apple-native", "windows-native", "sync-secret-service"] }
# YAML parsing
serde_yaml = "0.9"
# JSON5 parsing
json5 = "1.3.1"
# Directory walking
walkdir = "2"
# Security
sha2 = { version = "0.10", features = ["oid"] }
# sha1 0.10 is paired with hmac 0.12 via digest 0.10. sha1 0.11+ moved to
# digest 0.11 and is incompatible with our hmac version.
sha1 = "0.10"
aes = "0.9"
cbc = "0.2"
hmac = "0.12"
hex = "0.4"
k256 = { version = "0.13", features = ["schnorr"] }
subtle = "2"
ed25519-dalek = { version = "2", features = ["rand_core"] }
x25519-dalek = { version = "2", features = ["static_secrets"] }
hkdf = "0.12"
rsa = "0.9.6"
rand = "0.10"
zeroize = { version = "1", features = ["derive"] }
# TOTP
totp-rs = { version = "5", features = ["gen_secret", "otpauth", "qr"] }
# JWT validation
#
# `jsonwebtoken` 10.x defers RSA / EC signature operations to a
# process-level `CryptoProvider` and panics at `decode::<_>` time if no
# provider feature is enabled. The default features only enable PEM
# parsing, so we explicitly turn on `aws_lc_rs` to match the rustls
# provider that `librefang-cli` installs at startup
# (`aws_lc_rs::default_provider().install_default()`). Without this,
# any real OIDC token validation (`/api/auth/introspect`, the OAuth
# callback's ID-token path, and the `oidc_auth_middleware`) panics in
# production. Discovered while landing the #5128 `sub`-required tests.
jsonwebtoken = { version = "10", features = ["aws_lc_rs"] }
# Rate limiting
governor = "0.10.4"
# PTY
portable-pty = "0.9"
# Interactive CLI
ratatui = "0.30"
colored = "3"
# Encryption
aes-gcm = "0.10"
argon2 = { version = "0.5", features = ["rand"] }
# HTML entity decoding
html-escape = "0.2"
# Lightweight regex
regex = "1"
regex-lite = "0.1"
# Socket options (SO_REUSEADDR)
socket2 = "0.6.3"
# Zip archive extraction
zip = { version = "8", default-features = false, features = ["deflate"] }
# Email (SMTP + IMAP)
lettre = { version = "0.11", default-features = false, features = ["builder", "hostname", "smtp-transport", "tokio1", "tokio1-rustls-tls"] }
imap = { version = "2", default-features = false }
# `native-certs` is no longer a default feature in 0.23, but the
# channels crate relies on the system trust store for IMAP/SMTP.
rustls-connector = { version = "0.23", features = ["native-certs"] }
mailparse = "0.16"
# Internationalization (i18n)
fluent = "0.17"
unic-langid = "0.9"
# MQTT client
rumqttc = "0.25"
# Sync HTTP client (for registry sync without async runtime)
ureq = "3"
# Tar archive extraction
flate2 = "1"
tar = "0.4"
# Testing
tokio-test = "0.4"
tempfile = "3"
criterion = { version = "0.8", features = ["html_reports"] }
# Performance
smallvec = "1"
[profile.dev]
split-debuginfo = "unpacked" # Speeds up incremental linking on macOS
# Shrinks debug test binaries by ~60% to relieve Ubuntu CI memory pressure
# (#1805, #1807, #2117). Panics and backtraces still carry file:line; only
# interactive debugger (lldb/gdb) variable inspection is lost.
debug = "line-tables-only"
[profile.release]
lto = "fat"
codegen-units = 1
strip = "symbols"
# Size-optimized: daemon bottleneck is network I/O (LLM calls), not CPU.
# "s" trims ~5-15% binary vs opt-level=3 with negligible runtime impact.
opt-level = "s"
[profile.release-local]
inherits = "release"
lto = "thin"
codegen-units = 4
# Workspace-wide build lint policy. Applies ONLY to first-party crates
# that opt in via `[lints] workspace = true` in their own Cargo.toml.
# Replaces the previous workflow-wide `RUSTFLAGS=-D warnings` (#3554)
# which leaked into dependency compilation and broke CI on transitive
# lint regressions.
[workspace.lints.rust]
warnings = "deny"