Go to file
caoqianming 1197d73432 refactor(core): 工具注册声明式化 core/tool_registry.py——四种 env-gate 风格收敛为一张表
架构审查 P0#3:build_agent 内 ~220 行注册代码,同一个「有 key/开关才注册」
意图混用四种写法(inline getenv / *_configured() / Config.load() 返 None /
caps 开关),范式靠注释口头传承。

- 新增 core/tool_registry.py:注册表 = (组名, gate, factory) 列表。gate 统一
  零参 bool(§7.5 #7 "secret-bearing 工具仅 env 存在才注册"由此获得代码强制);
  factory 内做 variant 选择(seedance/vision 取 yaml 段),选不出返 [] 自然不挂;
  新增工具 = 表里加一行
- ToolContext 承载 build_agent 已解析的上下文(路径/身份/媒体配置),注册层
  不重复读 env/yaml
- agent_builder.py 892→649 行:注册块换成一次 build_tools 调用,26 个工具类
  import 随之迁走

验证:292 测试全过;真实配置冒烟 32 个工具逐名符合预期,scheduled_run
门控(少 4 个 schedule_*)生效。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-23 10:36:38 +08:00
config feat(tools): 扫描件 PDF 直读 read_document——方舟文档理解 base64 内联(bump 0.58.55) 2026-07-21 16:57:23 +08:00
core refactor(core): 工具注册声明式化 core/tool_registry.py——四种 env-gate 风格收敛为一张表 2026-07-23 10:36:38 +08:00
db/migrations feat(kb): 个人知识库——.kb/ 纯文件机制+/v1/kb* API+前端 modal+注入契约(bump 0.59.0) 2026-07-22 15:20:43 +08:00
deploy feat(sandbox): 镜像补 file 命令(bump 0.58.12) 2026-07-13 08:50:55 +08:00
docs docs: 操作说明书精简版表格微调 + 新增「科研AI双智能体·汇报PPT大纲」+ bump 0.24.4 2026-06-24 14:57:57 +08:00
prompts/system fix(prompt): 系统提示加护栏——大段中文正文别内联进 .py 源码(bump 0.58.51) 2026-07-21 09:05:46 +08:00
rendering fix(rendering+chip): 修 task d9c74a5a 三处独立缺陷——chip 粗体路径 404 / docx emoji 缺字 / 单文件被迫建 sections(bump 0.58.37) 2026-07-17 22:15:34 +08:00
scripts feat(tools): 扫描件 PDF 直读 read_document——方舟文档理解 base64 内联(bump 0.58.55) 2026-07-21 16:57:23 +08:00
skills feat(kb): 个人知识库——.kb/ 纯文件机制+/v1/kb* API+前端 modal+注入契约(bump 0.59.0) 2026-07-22 15:20:43 +08:00
tests refactor(storage): 计费读侧收口 core/storage/usage_report.py + 首批 DB 级测试 2026-07-23 10:33:13 +08:00
tools feat(tools): 扫描件 PDF 直读 read_document——方舟文档理解 base64 内联(bump 0.58.55) 2026-07-21 16:57:23 +08:00
web refactor(storage): 计费读侧收口 core/storage/usage_report.py + 首批 DB 级测试 2026-07-23 10:33:13 +08:00
.gitattributes Add .gitattributes: force LF for shell + Dockerfile 2026-05-26 10:45:17 +08:00
.gitignore feat: 忽略vscodecounter 2026-07-07 15:38:55 +08:00
APP.md feat(web,docs): App 套壳 embed app 变体(relogin_url + fragment 注入)+ APP.md 对接文档(bump 0.58.53) 2026-07-21 14:59:16 +08:00
CHANGELOG.md feat(kb): 个人知识库——.kb/ 纯文件机制+/v1/kb* API+前端 modal+注入契约(bump 0.59.0) 2026-07-22 15:20:43 +08:00
CLAUDE.md fix(ui,loop): salvage 成功提示降噪——黄色警告降为灰色 info 行(bump 0.58.50) 2026-07-21 08:47:44 +08:00
DESIGN.md fix(kb): 注入契约改主动查阅——相关即先读无需点名,去掉 document_search 路由 2026-07-22 15:43:01 +08:00
DOCUMENT_SEARCH_API.md feat(skill): documents skill 接内部材料学科知识库(document_search API) 2026-05-21 15:31:21 +08:00
EMBED.md feat(web,docs): App 套壳 embed app 变体(relogin_url + fragment 注入)+ APP.md 对接文档(bump 0.58.53) 2026-07-21 14:59:16 +08:00
PROGRESS.md feat(kb): 个人知识库——.kb/ 纯文件机制+/v1/kb* API+前端 modal+注入契约(bump 0.59.0) 2026-07-22 15:20:43 +08:00
RUN.md feat(auth): JWT 滑动续签——活跃用户临期无感换 token,不再因 7d TTL 掉线(bump 0.58.39) 2026-07-18 10:21:35 +08:00
SCIENTIFIC_SKILLS.md skills: 加 pymatgen / stats_ml / plot_pub(建材院无机材料场景) 2026-05-28 11:33:59 +08:00
SKILL_LIST.md feat(prompt): 结构图 mermaid vs 生图改 ask_user 让用户点选(bump 0.58.15) 2026-07-13 10:18:48 +08:00
WW_verify_THssshZfneJwIG5Y.txt chore(wecom): 加企业微信可信域名校验文件 WW_verify_THssshZfneJwIG5Y.txt(放 repo 根)+ bump 0.26.7 2026-06-25 10:25:06 +08:00
alembic.ini core(§7 B Step 1): Storage 基建 — SQLAlchemy ORM + alembic + db CLI 2026-05-14 10:41:44 +08:00
main.py feat(web): main.py web 支持 --ssl-certfile/--ssl-keyfile(uvicorn 原生 TLS,免 nginx)+ bump 0.26.8 2026-06-25 10:43:18 +08:00
requirements.txt feat(sandbox): 补 olefile/xlrd/extract-msg 老格式解析依赖(bump 0.58.23) 2026-07-15 08:16:18 +08:00