重构: Coordinator 接入 agentic loop + audit 拆分(approval/record)

- audit/approval.rs: 审批门控(风险分类+自动执行+挂起审批)

- audit/record.rs: 审计记录写入+历史查询

- coordinator.rs: 移除 deprecated,正式作为 P0 骨架可用

- run_agentic_loop: plan_execution_enabled 时 Coordinator 分解意图→记录 Plan

- audit/mod.rs 从 ~500 行精简至 ~200 行(编排层)
This commit is contained in:
2026-07-01 14:29:34 +08:00
parent a9ee9b1f74
commit fa410e6843
11 changed files with 1234 additions and 523 deletions

View File

@@ -422,12 +422,26 @@
- build_prompt 注入上下文和目标钉扎
- **验证**: 10 个单元测试通过
## Batch 36 — Coordinator 接入 + audit 拆分
- **提交**: `当前待提交`
- **内容**:
- audit/mod.rs 拆分出 approval/record 子模块(process_tool_calls 从 ~500→~200 行)
- coordinator.rs 移除 deprecated 标记,正式可用
- Coordinator 接入 run_agentic_loop 入口(plan_execution_enabled 时分解意图→输出 Plan)
- **验证**: cargo check 通过
## 后续规划批次(待推进)
### Batch 36Coordinator 填实 + 多 Agent 骨架(P0·第二步)
1. 任务拆解 → 分配人设 → 并行 Agent → 汇总合并
2. coordinator.rs 从空壳重写为 Agent 调度器
3. Planner 走完 agentic loop 全链路(feature flag 门控)
### Batch 37多 Agent 并行执行
1. PlanExecutor JoinSet 真并行:process_tool_calls 内并行执行同层工具
2. 子 Agent 调用链路:SubTask → 独立 agentic loop → 产出 + 错误传播
3. DAG 进度实时更新:PlanProgress.vue 接入真实状态
### Batch 38 — 仲裁合并 + 技术债
1. Reviewer 仲裁合并:并行 Agent 产出冲突检测 + 合并建议
2. 交互式审批:冲突 diff 展示供用户裁决
3. 扫尾技术债:SMELL-P1-6 / 编译警告 / 注释清理
---