后端核心变更: - API 层: 新增 AppError 枚举统一错误类型,替代散落的 (StatusCode, String) - Agent 工具域: 重组为 astro/system/ 和 astro/research/ 两级域,新增 ProcessPaperTool 流水线工具 - 安全: 新增 SSRF 双层防护 (同步字符串级 + 异步 DNS 解析级),覆盖 IPv4/IPv6 私网段 - 弱密码检测: 扩展弱密码列表并增加最小长度检查 - LLM 客户端: 新增 ChatCompleter/Embedder trait,支持依赖注入与批量向量化 embed_batch - 批量处理: AssetBatch 从串行改为 Semaphore 并发池 (BATCH_CONCURRENCY=3) - 分块器: 重写为三阶段结构化管线 (章节解析→短节合并→带标题路径子块) - RAG: embedding 计算移出事务,RetrievalResult 新增 headings/section_index 字段 - 检索: ADS/arXiv 并行检索 (tokio::join!),去重改用 HashSet,本地库回填批量 IN 查询 - 天体查询: Sesame API 升级到 v4,新增视差误差/自行/视向速度/多波段测光字段 - 迁移: 14 个增量文件合并为单一 init.sql,支持 sqlx::migrate! 内存库集成测试 - 测试: circuit_breaker/hooks/task_board/session/memory/streaming_executor 新增修正 15+ 测试 前端架构重构: - 目录重组: features/ → pages/ + components/ + hooks/ 三层分离 - App.tsx 从 1181 行压缩至 ~174 行 (逻辑抽入 9 个自定义 Hook) - Agent 面板拆分为 AgentSessionSidebar/AgentMessageList/AgentInputArea 子组件 - 新增 GlobalDialog/PaperDetailModal/UncachedPaperModal 通用对话框组件 - 工具函数抽取: celestial.ts (天体坐标格式), paper.tsx (文献信息渲染)
76 lines
2.2 KiB
TOML
76 lines
2.2 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"
|
|
subtle = "2" # 恒定时间密码比较,防时序侧信道攻击
|
|
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
|
|
|