feat(maf): Phase 5 - action coordinator, approval flow, frontend MAF roundtable pages

- Backend: action_coordinator, capability_snapshot, event_normalizer, tool_executor updates
- Backend: approved_tool_executor with write guard, action leases, migration script
- Frontend: maf-roundtable module (API client, event timeline, approval cards, fact flow panel)
- Frontend: MafRoutes, MafSessionsPage, MafRunDetailPage
- Tests: action_leases, migration_phase5, phase5_entry_e2e, real_write_e2e/http_e2e
- Docs: update implementation plan

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
董宏凯andCursor committed 2026-08-02 13:07:21 +08:00
1 parent 21c4c898e7
commit f82363d81f
55 files changed
+6304 -167

No files matched your search

+15 -2
View File
@@ -558,13 +558,23 @@ task_deeplink:
# - 前端入口隐藏
# 详见 frontend-web/docs/microsoft-agent-framework-多智能体会商-实施计划.md
maf_roundtable:
enabled: false # 部署级特性开关;首期仅管理员/白名单可见
enabled: true # 启用独立 MAF 会商页面;不影响旧 roundtable 功能
default_mode: structured # structured(固定流程)| group_chat(动态群聊)
default_write_policy: confirm_high_risk # auto | confirm_high_risk | confirm_all_writes
default_max_rounds: 8 # 群聊模式轮次硬上限
admin_diagnostic_access: true # 管理员是否可跨用户读取所有 MAF 会商用于诊断(仅读,不含写)
seat_timeout_seconds: 600 # 结构化流程单席位超时(秒)
approval_scan_interval_seconds: 10 # 审批主动过期扫描间隔(秒)
schema_repair_enabled: true # 席位 JSON 校验失败时允许一次定向修复
# 必须使用 MCP 实际发现到的运行时 tool name;不要改成 server 名或前缀猜测。
# 当前部署仅启用检索 MCP,因此这里只登记两个只读工具。
tool_metadata:
weknora-retrieval_weknora_list_knowledge_bases:
side_effect: read
risk_level: R0
weknora-retrieval_weknora_search:
side_effect: read
risk_level: R0
# ── WriteGuard 中间件配置 ────────────────────────────────────────────────────
# 与 maf_roundtable 联动:MAF 会商运行时,WriteGuard 中间件拦截外部写工具调用,
@@ -573,7 +583,10 @@ maf_roundtable:
# policy_use / interceptor_use 指向 app.maf_roundtable 的具体实现(通过
# resolve_variable 解析),保证 harness 层不导入 app.*。
write_guard:
enabled: false
# MAF-only WriteGuard is mounted in production. Legacy runs without
# maf_run_id pass through unchanged; a missing MAF_ACTION_SECRET_KEY makes
# external writes fail closed while read-only tools and skills remain usable.
enabled: true
provider:
policy_use: app.maf_roundtable.write_guard_bridge:make_policy
interceptor_use: app.maf_roundtable.write_guard_bridge:make_interceptor