Day 11 / 共 20 天 · 第 3 周 · 工具与扩展
工具系统总览
spec_plan / router / handlers:shell、patch、MCP、web_search…
📍 你在整门课的位置 · 第 3 周 · 工具与扩展
D11 工具系统总览→D12 Shell、apply_patch 与沙箱执行→D13 MCP、Plugins 与扩展工具→D14 Skills 与 AGENTS.md→D15 Plan 模式与协作模式
L01
工具管线三件套
| 模块 | 职责 |
|---|---|
| tools/spec_plan.rs | 本回合开放哪些工具定义 |
| tools/router.rs | 把 call_id 路由到 handler |
| tools/handlers/* | 真正执行 |
L02
handlers 里有什么
| 区域 | 例子 |
|---|---|
| Shell / unified exec | shell*、unified_exec* |
| 补丁 | apply_patch.rs + crate apply-patch/ |
| MCP | mcp.rs、mcp_resource/ |
| 协作 / 多 agent | plan.rs、multi_agents* |
| 其它 | view_image、request_permissions、tool_search… |
Hosted web_search 常由 config / --search 打开(见 tools hosted_spec)。
L03
今日小结
ls codex-rs/core/src/tools/handlers | head -40
✅ 能说出 spec_plan → router → handler。