Commit Graph

2 Commits

Author SHA1 Message Date
Chiguyong bcfa4fb5f6 fix(iq): 补齐 PR #27 的 5 个实现缺口 + 2 个 P2 residuals
F1: 前端 autonomy_paused 事件处理
  - 新增 AutonomyPausedCard.vue 组件(reason + progress + resume 按钮)
  - chatStore/chatStream 接收 autonomy_paused 事件并渲染暂停卡片
  - ChatView 集成暂停卡片显示

F2: cleanup_expired 定时调用
  - episodic.py 的 prompt_reflection 记录 30 天过期清理接入

F3: SharedWorkspace.lock() TOCTOU 防护
  - _phase_executor.py 并行子任务写入用 lock() 防护
  - shared_workspace.py 补充锁实现

F4: retrieve_prompt_reflection KTD5 门控
  - react.py/reflexion.py 按 verify 二次失败/循环检测条件门控

F5: configs/agentkit.yaml.example 配置示例
  - 包含 dangerous_tools 配置示例

F6: resume Future 注册顺序消除竞态

F7: 用户拒绝危险工具不计入 _consecutive_failures

测试:112 个单元测试全部通过
2026-07-06 20:31:50 +08:00
Chiguyong 4729e20bbf feat(react): U2 PLAN_EXEC autonomy mode + dangerous-tools gate (R6-R9)
ReActEngine now accepts dangerous_tools_config + autonomy_mode. In PLAN_EXEC
autonomy mode, dangerous tools (per DangerousToolsConfig whitelist) trigger
confirmation_request BEFORE first execution; non-dangerous tools execute
directly without confirmation. _build_phase_engine injects the config and
sets autonomy_mode=True when PLAN_EXEC is engaged.

- _check_autonomy_gate: pre-execution gate (serial/parallel/text-parsed paths)
- Approved dangerous tool re-executes with _skip_dangerous_check=True
- Rejected/handler-failure → permission_denied result (exit_code=126)
- Default autonomy_mode=False → transparent no-op (backward compat)
- 19 new tests (14 autonomy gate + 5 PLAN_EXEC wiring)
2026-07-06 13:23:06 +08:00