-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCargo.toml
More file actions
executable file
·351 lines (292 loc) · 12.5 KB
/
Copy pathCargo.toml
File metadata and controls
executable file
·351 lines (292 loc) · 12.5 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
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
# Cargo workspace configuration
[workspace]
members = [
".", "crates/ares-vector", "crates/ares-types",
"crates/ares-rag", "crates/ares-tools", "crates/ares-llm",
"crates/ares-store", "crates/ares-mcp", "crates/ares-agent",
"crates/ares-http", "crates/cordis",
]
exclude = ["ui"]
resolver = "2"
[workspace.package]
version = "0.10.0"
edition = "2021"
license = "MIT"
repository = "https://github.com/dirmacs/ares"
authors = ["Dirmacs <build@dirmacs.com>"]
[workspace.dependencies]
# Shared dependencies across workspace
ares-vector = { version = "0.1.4", path = "crates/ares-vector" }
tokio = { version = "1.48", features = ["rt-multi-thread", "macros", "net", "sync", "time", "io-util", "signal", "fs", "process"] }
tokio-util = "0.7"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
thiserror = "2.0"
tracing = "0.1"
uuid = { version = "1.19", features = ["v4", "serde"] }
chrono = { version = "0.4", features = ["serde"] }
chrono-tz = "0.10.4"
async-trait = "0.1"
ares-types = { version = "0.10.0", path = "crates/ares-types" }
ares-rag = { version = "0.10.0", path = "crates/ares-rag" }
ares-tools = { version = "0.10.0", path = "crates/ares-tools" }
ares-llm = { version = "0.10.0", path = "crates/ares-llm" }
ares-store = { version = "0.10.0", path = "crates/ares-store" }
ares-mcp = { version = "0.10.0", path = "crates/ares-mcp" }
ares-agent = { version = "0.10.0", path = "crates/ares-agent" }
ares-http = { version = "0.10.0", path = "crates/ares-http" }
cordis = { version = "0.10.0", path = "crates/cordis", package = "ares-cordis" }
anyhow = "1.0.100"
hex = "0.4"
rand = "0.9.2"
sha2 = "0.10.9"
parking_lot = "0.12.5"
inventory = "0.3"
rhai = { version = "1.25", features = ["serde", "sync"] }
sqlx = { version = "0.8.6", features = ["runtime-tokio", "postgres", "tls-rustls", "uuid", "chrono", "json", "migrate", "rust_decimal"] }
libsql = { version = "0.6" }
qdrant-client = { version = "1.16.0" }
# lance is not imported directly; the lancedb crate pulls its own lance stack.
# Keeping it as a direct dependency dragged in an older parquet 56 / thrift 0.17
# chain, so it is removed. (lancedb feature below no longer lists dep:lance.)
lancedb = { version = "0.37.1" }
chromadb = { version = "2.3.0" }
pinecone-sdk = { version = "0.1.2" }
rmcp = { version = "3.1.4", features = ["server", "client", "transport-io", "macros"] }
rust_decimal = { version = "1.36", features = ["serde"] }
toml = "0.9.8"
toon-format = { version = "0.4.1", default-features = false }
reqwest = { version = "0.12.26", default-features = false, features = ["json", "rustls-tls", "multipart"] }
dirs = "6.0.0"
text-splitter = "0.19"
lru = "0.16.3"
lancor = "0.2"
fastembed = { version = "5.5.0" }
daedra = { version = "0.1.4" }
scraper = { version = "0.25.0" }
[package]
name = "ares-server"
version.workspace = true
edition.workspace = true
rust-version = "1.98"
description = "ARES agent server with multi-provider LLM support, tool calling, RAG, and MCP integration"
license.workspace = true
repository.workspace = true
homepage = "https://github.com/dirmacs/ares"
documentation = "https://docs.rs/ares-server"
readme = "README.md"
keywords = ["llm", "chatbot", "agent", "rag", "ai"]
categories = ["web-programming", "asynchronous", "command-line-utilities"]
authors.workspace = true
exclude = [
"data/*",
"target/*",
".env",
".env.example",
"*.db",
"docker-compose*.yml",
"Dockerfile",
"hurl/*",
"scripts/*",
]
# Library facade — the published entry point for embedding ARES
[lib]
name = "ares_server"
path = "src/lib.rs"
# Binary configuration - allows running as standalone server
[[bin]]
name = "ares-server"
path = "src/main.rs"
[features]
# Default features for NVIDIA NIM cloud inference
default = ["postgres", "openai", "ares-vector", "mcp", "inventory", "rhai-policy"]
# Cordis static registration via inventory (compile-time)
inventory = [
"dep:inventory",
"cordis/inventory",
"ares-http/inventory",
"ares-store/inventory",
"ares-tools/inventory",
"ares-llm/inventory",
"ares-agent/inventory",
]
# ============= LLM Providers =============
# OpenAI - OpenAI API and compatible endpoints (e.g. NVIDIA NIM)
openai = ["ares-llm/openai", "ares-http/openai"]
# Azure AI Foundry - OpenAI-compatible chat completions with Foundry auth headers
azure = ["ares-llm/azure"]
# AWS Bedrock - Claude via Bedrock Runtime invoke API
bedrock = ["ares-llm/bedrock"]
# ============= Database Backends =============
# PostgreSQL database via sqlx (default)
postgres = ["dep:sqlx", "ares-store/postgres", "ares-agent/postgres", "ares-agent/scheduler", "ares-agent/pipeline", "ares-agent/trigger", "ares-agent/workflows", "ares-mcp/postgres", "ares-tools/postgres", "ares-http/postgres"]
# Turso/libSQL - Edge-native SQLite-compatible database
turso = ["dep:libsql", "ares-store/turso"]
# ============= Vector Store Backends =============
# ares-vector - Pure Rust embedded vector database with HNSW (default, local-first)
# No native dependencies, compiles anywhere Rust does
ares-vector = ["dep:ares-vector", "ares-store/ares-vector", "ares-http/ares-vector"]
# LanceDB - Serverless, embedded vector database
# Note: Requires protoc compilation, may have issues on Windows MSVC
lancedb = ["dep:lancedb", "ares-store/lancedb"]
# Qdrant vector database for semantic search
qdrant = ["dep:qdrant-client", "ares-store/qdrant"]
# pgvector - PostgreSQL extension for vector similarity search
pgvector = ["ares-store/pgvector"]
# ChromaDB - Simple, open-source embedding database
chromadb = ["dep:chromadb", "ares-store/chromadb"]
# Pinecone - Managed cloud vector database (alpha)
pinecone = ["dep:pinecone-sdk", "ares-store/pinecone"]
# ============= Additional Features =============
# MCP (Model Context Protocol) protocol glue, client, auth, extension, registry,
# and tool plumbing. Zero postgres dependency — enables MCP *consumers*.
#
# To run the ARES MCP *server* (mcp/server.rs + mcp/usage.rs, which query tenant
# DB via sqlx::PgPool), enable both `mcp` and `postgres`. The `run_mcp_server`
# entry in main.rs is already gated by `all(feature = "postgres", feature = "mcp")`.
#
# Decoupled in 0.7.5. 0.7.4 coarsely coupled `mcp` -> `postgres` (bandaid for the
# 0.7.3 compile break when mcp was enabled alone); 0.7.5 moves server/usage
# behind `cfg(all(mcp, postgres))` so library consumers can use mcp without
# dragging sqlx into their dependency graph.
mcp = ["ares-mcp/mcp", "ares-tools/mcp", "ares-http/mcp"]
# Eruka context injection - fetches per-agent context from Eruka with caching
eruka-context = ["ares-agent/eruka-context", "ares-http/eruka-context"]
# Local embeddings - fastembed-based ONNX embedding models
# WARNING: This feature does NOT work on Windows MSVC due to ort-sys linker errors.
# Use WSL, Linux, or macOS for local embeddings, or use remote embedding APIs instead.
local-embeddings = ["ares-rag/local-embeddings", "ares-http/local-embeddings"]
# HMR via libloading — off by default. Forwards to cordis/hmr (dlopen plugin .so).
hmr = ["cordis/hmr"]
# Cordis Rhai policy scripting (event listeners backed by sandboxed scripts)
rhai-policy = ["cordis/rhai"]
# Skills - SKILL.md file discovery and loading via thulp
skills = ["dep:thulp-skill-files", "ares-http/skills", "ares-agent/skills"]
# Email sending via SMTP (opt-in, requires lettre feature)
email = ["dep:lettre"]
# Web search and scraping tools (opt-in, daedra + scraper)
search-tools = ["ares-tools/search-tools"]
# ============= UI =============
# Embedded UI - serves the Leptos frontend from the backend
ui = ["dep:rust-embed", "dep:mime_guess"]
# Swagger UI - interactive API documentation (requires network during build)
swagger-ui = ["dep:utoipa-swagger-ui", "ares-http/swagger-ui"]
# ============= Feature Bundles =============
# All LLM providers
all-llm = ["openai", "azure", "bedrock"]
# All database backends
all-db = ["postgres"]
# All vector stores (excluding lancedb due to protoc issues on Windows)
all-vectorstores = ["ares-vector", "qdrant", "pgvector", "chromadb", "pinecone"]
# Local-first vector stores (no external server required)
local-vectorstores = ["ares-vector"]
# Full feature set for development/testing (Windows-compatible)
# Note: local-embeddings excluded due to ort-sys linker issues on Windows MSVC
full = ["openai", "azure", "bedrock", "postgres", "qdrant", "ares-vector", "mcp", "swagger-ui"]
# Full feature set with local embeddings (Linux/macOS only - NOT Windows MSVC)
full-local-embeddings = ["full", "local-embeddings"]
# Full feature set with UI
full-ui = ["full", "ui"]
# Full feature set with UI and local embeddings (Linux/macOS only)
full-ui-local-embeddings = ["full-ui", "local-embeddings"]
# Minimal build - no optional features
minimal = []
[dependencies]
ares-types = { workspace = true }
ares-rag = { workspace = true }
ares-tools = { workspace = true }
ares-llm = { workspace = true }
ares-store = { workspace = true }
ares-mcp = { workspace = true }
ares-agent = { workspace = true }
ares-http = { workspace = true }
cordis = { workspace = true }
inventory = { workspace = true, optional = true }
# HuggingFace model downloads (DRY — reuse lancor's hub client)
lancor = "0.2"
# CLI and TUI
clap = { version = "4.5", features = ["derive", "color", "env", "suggestions"] }
owo-colors = "4.1"
# Core dependencies
anyhow = "1.0.100"
async-stream = "0.3.6"
async-trait = "0.1.89"
chrono = { version = "0.4.42", features = ["serde"] }
futures = "0.3.31"
serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0.145"
thiserror = "2.0.17"
tokio = { version = "1.48.0", features = ["rt-multi-thread", "macros", "net", "sync", "time", "io-util", "signal", "fs", "process"] }
tracing = "0.1.44"
tracing-subscriber = { version = "0.3.22", features = ["env-filter", "json"] }
uuid = { version = "1.19.0", features = ["v4", "serde"] }
# Web framework
axum = { version = "0.8.7", features = ["macros", "multipart"] }
tower = { version = "0.5.2", features = ["util", "timeout"] }
tower-http = { version = "0.6.8", features = ["trace", "cors", "limit"] }
tower-sessions = "0.14.0"
tower_governor = "0.8"
# HTTP client
reqwest = { version = "0.12.26", default-features = false, features = ["json", "rustls-tls", "multipart"] }
# Authentication
argon2 = "0.5.3"
jsonwebtoken = { version = "10.3.0", features = ["use_pem", "rust_crypto"] }
sha2 = "0.10.9"
rand = "0.9.2"
hex = "0.4"
# Cron parsing for scheduler
cron = "0.15"
# Configuration
config = "0.15.19"
dotenvy = "0.15.7"
toml = "0.9.8"
toon-format = { version = "0.4.1", default-features = false } # cli feature drags in tiktoken-rs, syntect, arboard, ratatui
notify = "8.2.0"
parking_lot = "0.12.5"
arc-swap = "1.7.1"
rust_decimal = { workspace = true }
# Vector database (optional)
# ares-vector - Pure Rust embedded vector DB (default, recommended)
ares-vector = { workspace = true, features = ["serde"], optional = true }
# External vector DBs
qdrant-client = { version = "1.16.0", optional = true }
lancedb = { version = "0.37.1", optional = true }
sqlx = { version = "0.8.6", features = ["runtime-tokio", "postgres", "tls-rustls", "uuid", "chrono", "json", "migrate"], optional = true }
libsql = { version = "0.6", optional = true }
chromadb = { version = "2.3.0", optional = true }
pinecone-sdk = { version = "0.1.2", optional = true }
# Skills (optional)
thulp-skill-files = { version = "0.3", optional = true }
# OpenSSL vendored build (for systems without pkg-config/libssl-dev)
# openssl = { version = "0.10", features = ["vendored"] }
# Schema and documentation
schemars = { version = "1.1.0", features = ["derive"] }
utoipa = { version = "5.4.0", features = ["axum_extras", "chrono", "uuid"] }
utoipa-swagger-ui = { version = "9.0.2", features = ["axum"], optional = true }
# MCP support (optional)
rmcp = { version = "3.1.4", features = ["server", "client", "transport-io", "macros"], optional = true }
# Email sending via SMTP (optional — gated by email feature)
lettre = { version = "0.11", features = ["tokio1-native-tls", "builder", "smtp-transport"], optional = true }
# UI embedding (optional)
rust-embed = { version = "8.9", optional = true }
mime_guess = { version = "2.0", optional = true }
dirs = "6.0.0"
[dev-dependencies]
# Testing utilities
axum-test = "18.4.1"
mockall = "0.14.0"
rstest = "0.26.1"
tempfile = "3.23.0"
wiremock = "0.6.5"
# Note: cargo-llvm-cov is a CLI tool, not a library dependency
# Install with: cargo install cargo-llvm-cov
[profile.dev]
opt-level = 0
debug = true
incremental = true
split-debuginfo = "unpacked" # faster incremental link on Linux
[profile.release]
opt-level = 3
lto = "thin" # full LTO OOMs on 8GB VPS; thin LTO is ~80% of the gains at 30% of the memory
codegen-units = 4
strip = true