Docker 容器化部署
- 提供 Mode A (Alpine musl, ~23MB) 和 Mode B (Distroless glibc, ~87MB)
两种镜像,Docker Compose 一键启动
- build.rs 支持 SKIP_DASHBOARD_BUILD 跳过前端构建
- 国内镜像加速 (npm/apt/apk) 通过 USE_MIRRORS build-arg 控制
安全:Cookie-Based 鉴权系统
- HttpOnly/SameSite=Strict Cookie 会话管理(24h 过期自动清理)
- 登录/登出/验证接口 + 中间件注入
- 前端登录页面 + 退出按钮
- 三层 CORS:localhost 鉴权 / 全放通 bookmarklet / 受保护路由
- 书签脚本 fetch 添加 credentials:'include'
Coordinator 模式 (P2)
- 4 个 meta-tool (delegate_task/check_task/task_stop/synthesize)
- WorkerPool + Semaphore 并发控制 + 超时保护
- 前端协调者模式开关
Hook 系统:UserPromptSubmit 事件 (P2)
- 第 13 个生命周期事件,fire-and-forget 审计
FTS5 全文搜索 (P3)
- agent_sessions_fts + agent_messages_fts 虚拟表
- search_history Agent 工具 + /api/search/history HTTP 接口
- 前端防抖搜索框 + 仅当前会话筛选
工具加载优化 (P3)
- defer_loading 延迟加载 (7 个重型工具)
- is_readonly 只读标记 (9 个查询工具)
- classifier_summary 工具目录供 LLM 按需判断
模型回退策略 (P3)
- LLM_FALLBACK_MODEL 优先回退 + LLM_FALLBACK_CHAIN 链式轮换
- LlmClient model 改为 Arc<RwLock> 支持运行时切换
- 连续 3 次过载后自动切换
压缩记忆桥接 (P3)
- 压缩丢弃消息 → 子代理提取持久记忆 (extract_memories_from_compaction)
git2 依赖修复
- 切换到 vendored-libgit2,消除 OpenSSL 系统依赖
75 lines
2.1 KiB
TOML
75 lines
2.1 KiB
TOML
[package]
|
|
name = "astroresearch"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
default-run = "astroresearch"
|
|
|
|
[lib]
|
|
path = "src/lib.rs"
|
|
|
|
[[bin]]
|
|
name = "astroresearch"
|
|
path = "src/main.rs"
|
|
|
|
[[bin]]
|
|
name = "health_check"
|
|
path = "src/bin/health_check.rs"
|
|
|
|
[[bin]]
|
|
name = "astroresearch_cli"
|
|
path = "src/bin/cli.rs"
|
|
[dependencies]
|
|
tokio = { version = "1", features = ["full"] }
|
|
axum = { version = "0.7", features = ["macros", "multipart"] }
|
|
tower-http = { version = "0.5", features = ["cors", "fs", "trace"] }
|
|
sqlx = { version = "0.7", features = ["runtime-tokio-rustls", "sqlite", "chrono", "json"] }
|
|
serde = { version = "1.0", features = ["derive"] }
|
|
serde_json = "1.0"
|
|
reqwest = { version = "0.12", default-features = false, features = ["json", "stream", "multipart", "cookies", "rustls-tls"] }
|
|
dotenvy = "0.15"
|
|
quick-xml = { version = "0.31", features = ["serialize"] }
|
|
anyhow = "1.0"
|
|
thiserror = "1.0"
|
|
tracing = "0.1"
|
|
tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] }
|
|
futures-util = { version = "0.3", features = ["io"] }
|
|
rand = "0.8"
|
|
regex = "1.10"
|
|
chrono = { version = "0.4", features = ["serde"] }
|
|
sha1 = "0.10"
|
|
hmac = "0.12"
|
|
base64 = "0.22"
|
|
urlencoding = "2.1"
|
|
url = "2.5"
|
|
html2md = "0.2"
|
|
flate2 = "1.1.9"
|
|
zip = "8.6.0"
|
|
uuid = { version = "1.23.2", features = ["v4"] }
|
|
tracing-appender = "0.2.5"
|
|
obscura-browser = { path = "libs/obscura/crates/obscura-browser", optional = true }
|
|
obscura-net = { path = "libs/obscura/crates/obscura-net", optional = true }
|
|
libsqlite3-sys = { version = "0.27.0", features = ["bundled"] }
|
|
sqlite-vec = "0.1.9"
|
|
clap = { version = "4", features = ["derive"] }
|
|
async-trait = "0.1"
|
|
async-stream = "0.3"
|
|
serde_yaml = "0.9"
|
|
notify = { version = "6", default-features = false, features = ["macos_kqueue"] }
|
|
tempfile = "3"
|
|
glob = "0.3"
|
|
walkdir = "2"
|
|
lru = "0.12"
|
|
git2 = { version = "0.18", default-features = false, features = ["vendored-libgit2"] }
|
|
|
|
[features]
|
|
default = []
|
|
obscura-inprocess = ["dep:obscura-browser", "dep:obscura-net", "obscura-browser/stealth", "obscura-net/stealth"]
|
|
|
|
[profile.release-min]
|
|
inherits = "release"
|
|
opt-level = "s"
|
|
lto = true
|
|
codegen-units = 1
|
|
strip = true
|
|
|