-
Notifications
You must be signed in to change notification settings - Fork 83
Expand file tree
/
Copy pathCargo.toml
More file actions
256 lines (214 loc) · 8.88 KB
/
Copy pathCargo.toml
File metadata and controls
256 lines (214 loc) · 8.88 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
[package]
name = "opencrabs"
version = "0.3.64"
edition = "2024"
rust-version = "1.91"
authors = ["Adolfo Usier <adolfo@meetneura.ai>"]
license = "MIT"
description = "The autonomous, self-improving AI agent. Single Rust binary. Every channel. Install with: cargo install opencrabs"
repository = "https://github.com/adolfousier/opencrabs"
homepage = "https://opencrabs.com"
documentation = "https://docs.opencrabs.com"
keywords = ["ai", "terminal", "assistant", "llm", "cli"]
categories = ["command-line-utilities", "development-tools"]
readme = "README.md"
# exclude = ["src/assets/"]
[dependencies]
# Async Runtime
tokio = { version = "1.43", features = ["full"] }
tokio-util = { version = "0.7", features = ["codec"] }
futures = "0.3"
async-trait = "0.1"
# CLI Framework
clap = { version = "4.5", features = ["derive", "env", "cargo"] }
clap_complete = "4.6"
# TUI
ratatui = { version = "0.30", features = ["all-widgets"] }
crossterm = { version = "0.29", features = ["event-stream"] }
# Database (deadpool-sqlite uses rusqlite 0.38, same as qmd — zero libsqlite3-sys conflicts)
deadpool-sqlite = { version = "0.13", features = ["rt_tokio_1"] }
rusqlite = { version = "0.38", features = ["bundled"] }
rusqlite_migration = "2.4"
# Cron scheduling
cron = "0.15"
# Serialization
serde = { version = "1.0", features = ["derive", "rc"] }
serde_json = "1.0"
toml = "0.8"
toml_edit = "0.25"
# Configuration
config = "0.15"
dirs = "6.0"
# HTTP & LLM Clients
reqwest = { version = "0.12", features = ["json", "multipart", "native-tls", "stream"], default-features = false }
# A2A Gateway (HTTP Server)
axum = "0.8"
tower-http = { version = "0.6", features = ["cors"] }
# Provider Registry (Crabrace - replaces Catwalk)
crabrace = "0.1.0"
# Error Handling
anyhow = "1.0"
thiserror = "2.0"
# Logging & Tracing
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] }
tracing-appender = "0.2"
# Encoding
base64 = "0.22.1"
sha2 = "0.10"
# Utilities
libc = "0.2.182"
tempfile = "3.25"
uuid = { version = "1.11", features = ["v4", "serde"] }
notify = "6"
chrono = { version = "0.4", features = ["serde"] }
chrono-tz = "0.10"
regex = "1.11"
glob = "0.3"
ignore = "0.4"
which = "8.0"
rand = "0.9"
urlencoding = "2.1"
# Syntax & Parsing
syntect = { version = "5.2", default-features = false, features = ["default-fancy"] }
pulldown-cmark = "0.13"
strip-ansi = "0.1"
# Concurrent Data Structures
once_cell = "1.20"
# Security
zeroize = { version = "1.8", features = ["derive"] }
# Telegram
teloxide = { version = "0.17", features = ["macros"], optional = true }
# WhatsApp — pinned to upstream HEAD (past published 0.6.0) for the rewritten
# LID/PN device registry: alias-aware LID<->PN resolution collapses a self-DM to
# one device set, fixing the duplicate PN+LID device addressing that made the
# server reject every reply with error 400 (0.6.0 double-addressed each device).
whatsapp-rust = { version = "0.6.0", git = "https://github.com/jlucaso1/whatsapp-rust.git", rev = "645e2ba5b3fc470632da1f727b93a13e9de3b828", optional = true, default-features = false, features = ["tokio-transport", "ureq-client", "tokio-native", "tokio-runtime"] }
whatsapp-rust-tokio-transport = { version = "0.6.0", git = "https://github.com/jlucaso1/whatsapp-rust.git", rev = "645e2ba5b3fc470632da1f727b93a13e9de3b828", optional = true }
whatsapp-rust-ureq-http-client = { version = "0.6.0", git = "https://github.com/jlucaso1/whatsapp-rust.git", rev = "645e2ba5b3fc470632da1f727b93a13e9de3b828", optional = true }
wacore = { version = "0.6.0", git = "https://github.com/jlucaso1/whatsapp-rust.git", rev = "645e2ba5b3fc470632da1f727b93a13e9de3b828", optional = true, default-features = false }
wacore-binary = { version = "0.6.0", git = "https://github.com/jlucaso1/whatsapp-rust.git", rev = "645e2ba5b3fc470632da1f727b93a13e9de3b828", optional = true, default-features = false, features = ["serde"] }
waproto = { version = "0.6.0", git = "https://github.com/jlucaso1/whatsapp-rust.git", rev = "645e2ba5b3fc470632da1f727b93a13e9de3b828", optional = true }
qrcode = { version = "0.14", optional = true }
# Used to render the WhatsApp pairing QR to a scannable PNG for channels
# (qrcode already pulls image in transitively; this just lets us name its types).
image = { version = "0.25", default-features = false, features = ["png", "jpeg"] }
rmp-serde = { version = "1", optional = true }
# Discord
serenity = { version = "0.12", default-features = false, features = ["client", "gateway", "model", "native_tls_backend"], optional = true }
# Slack
slack-morphism = { version = "2", features = ["hyper"], optional = true }
# slack-morphism's "rustls-native-certs" maps to the wrong tokio-tungstenite
# feature (loads certs but doesn't enable TLS). We force the correct one here.
tokio-tungstenite = { version = "0.28", features = ["rustls-tls-native-roots"], optional = true }
rustls = { version = "0.23", features = ["ring"], optional = true }
# Local STT (rwhisper — candle-based, pure Rust, no ggml conflict)
# Metal/Accelerate features are enabled per-platform below
rwhisper = { version = "0.4", optional = true }
rodio = { version = "0.20", optional = true, default-features = false }
hound = { version = "3.5", optional = true }
rubato = { version = "0.14", optional = true }
symphonia = { version = "0.5", features = ["ogg", "vorbis", "wav", "pcm"], optional = true }
symphonia-adapter-libopus = { version = "0.2", optional = true }
opusic-sys = { version = "0.5", optional = true, default-features = false }
# Browser Automation (CDP via chromey — fork of chromiumoxide)
chromey = { version = "2.42", optional = true, default-features = false }
# Misc
unicode-width = "0.2"
unicode-segmentation = "1.12"
# Document Parsing
pdf-extract = "0.12"
# Pinned to 0.9.1: 0.9.2 hardcodes `as *const i8` in font/provider.rs, which
# fails to compile on aarch64-linux (where c_char is u8, not i8) and broke the
# linux-arm64 release build. Bump past 0.9.2 only once that is fixed upstream.
pdfium-render = { version = "=0.9.1", optional = true }
zip = "6.0"
quick-xml = "0.37"
calamine = "0.26"
tiktoken-rs = "0.9.1"
# Archive extraction (for /evolve self-update)
flate2 = "1"
tar = "0.4"
# Memory Search (FTS5 + vector search)
qmd = "0.3"
llama-cpp-2 = "0.1.137"
emojis = "0.8.0"
url = "2.5.8"
unicode-normalization = "0.1.25"
scraper = "0.27.0"
htmd = "0.5.4"
rust_xlsxwriter = "0.96.0"
docx-rs = "0.4.20"
printpdf = { version = "0.9.1", features = ["png", "jpeg", "gif", "webp", "bmp", "tiff"] }
[dev-dependencies]
rstest = "0.25"
proptest = "1.6"
mockall = "0.13"
criterion = { version = "0.5", features = ["html_reports"] }
insta = { version = "1.42", features = ["json", "yaml"] }
tempfile = "3.25"
tokio-test = "0.4"
tower = { version = "0.5", features = ["util"] }
mockito = "1.7"
# Platform-specific dependencies
[target.'cfg(unix)'.dependencies]
# Profiling (Unix-only - not supported on Windows)
pprof = { version = "0.15", features = ["flamegraph", "frame-pointer"], optional = true }
# macOS: Metal GPU acceleration for local STT (rwhisper/candle)
[target.'cfg(target_os = "macos")'.dependencies]
rwhisper = { version = "0.4", optional = true, features = ["metal", "accelerate"] }
[target.'cfg(target_os = "windows")'.build-dependencies]
winresource = "0.1"
[features]
default = ["telegram", "whatsapp", "discord", "slack", "trello", "local-stt", "local-tts", "browser", "rtk"]
# Profiling feature enables pprof on Unix only (no-op on Windows)
profiling = []
# RTK (Rust Token Killer) integration - filters bash command outputs to save 60-90% tokens
rtk = []
telegram = ["teloxide"]
trello = []
whatsapp = ["whatsapp-rust", "whatsapp-rust-tokio-transport", "whatsapp-rust-ureq-http-client", "wacore", "wacore-binary", "waproto", "dep:qrcode", "dep:rmp-serde"]
discord = ["serenity"]
slack = ["slack-morphism", "tokio-tungstenite", "rustls"]
local-stt = ["rwhisper", "rodio", "hound", "rubato", "symphonia", "symphonia-adapter-libopus"]
local-tts = ["opusic-sys", "rubato"]
browser = ["chromey"]
pdfium = ["dep:pdfium-render"]
[profile.dev]
opt-level = 0
debug = true
[profile.release]
opt-level = 3
lto = "fat"
codegen-units = 1
strip = true
panic = "unwind"
[profile.release-small]
inherits = "release"
opt-level = "z"
strip = true
# Tuned for CI: release-mode correctness checks (catches release-only
# bugs that dev builds miss) but optimised for wall-clock speed on
# CI runners rather than runtime perf. Thin LTO compiles ~3-4x faster
# than fat LTO with most of the optimisation; 16 codegen units use
# the runner's full parallelism. Used by `cargo build --profile ci`
# and `cargo nextest run --cargo-profile ci` in .github/workflows/ci.yml.
[profile.ci]
inherits = "release"
lto = "thin"
codegen-units = 16
[[bin]]
name = "opencrabs"
path = "src/main.rs"
# Benchmarks
[[bench]]
name = "database"
harness = false
path = "src/benches/database.rs"
[[bench]]
name = "memory"
harness = false
path = "src/benches/memory.rs"
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(crates_publish)'] }
[lints.clippy]