AstroResearch/Cargo.toml
Asfmq 49784739fa feat: Agent 全栈升级——模块化重构、Hooks/Skills/Memory/SubAgent/Team 子系统、审计与任务持久化
架构重构:
  - Agent Runtime 由单文件拆为 runtime/ 目录 12 模块(熔断/流式执行/Token预算/文件缓存/权限等)
  - Agent Tools 由单文件拆为 tools/ 目录 20+ 模块(filesystem/astro/memory/skill/subagent/team 等)
  - 解析器体系重构(common.rs 836行变更),各解析器同步升级
  - Download 服务重构(562行),反爬策略强化
  - LLM 客户端重构(266行),流式调用优化

  新子系统:
  - Hooks 生命周期系统(9种事件类型,PreToolUse/PostToolUse 支持输入输出拦截)
  - Skills 双层加载系统(system-reminder 轻量注入 + LoadSkillTool 按需加载,notify 文件监听热更新)
  - Memory 项目记忆管理(类型/提取/去重/衰减/保活/选择策略/护栏 7 模块)
  - SubAgent 上下文隔离子代理运行器(独立 ReAct 循环 + Hook 管道)
  - Team 多智能体团队协作(文件 inbox 通信、lead/teammate 协调)
  - TaskBoard DAG 任务依赖管理
  - Trajectory 会话轨迹、Terminal 终止信号、Autonomous 自主模式、Background 异步通知

  数据库:
  - agent_tasks 表(DAG 依赖模式,blocked_by JSON 数组)
  - agent_audit_log 表(工具调用审计:名称/状态/耗时/输出预览)
  - agent_identity 迁移(消息/审计/任务的 agent_name 归属,agent_team_members 团队注册表)

  API:
  - GET /chat/metrics 聚合指标端点
  - GET /chat/sessions/:id/audit 会话审计查询
  - GET /chat/questions + POST /chat/answer 人机交互问答

  工程:
  - 新增依赖:serde_yaml、notify、glob、walkdir、lru
  - Skills 目录含 methodology/plotting/presentation 三个初始 SKILL.md
  - CLAUDE.md 完整项目架构文档
2026-06-17 00:14:02 +08:00

73 lines
2.0 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 = "/home/fmq/program/AstroResearch/libs/obscura/crates/obscura-browser", optional = true }
obscura-net = { path = "/home/fmq/program/AstroResearch/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"] }
glob = "0.3"
walkdir = "2"
lru = "0.12"
[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