Commit Graph
3 Commits
Author SHA1 Message Date
董宏凯andCursor 99642fca6c feat(maf): conversation-driven MAF roundtable (R1/R2) + server-owned stage-3 dispatch
Backend:
- Conversation API at /api/maf-roundtable/conversations: create/list/detail,
  paginated messages, atomic send+run start, owner-only isolation,
  admin read-only diagnostic access
- SSE real-time event stream (GET /conversations/{id}/stream) backed by
  ConversationEventHub + conversation_events store; multi-worker deployment doc
- Deterministic server-owned stage-3 dispatch contracts (dispatch_contracts.py):
  routing resolved from trusted MAF deployment config instead of manager-chosen
  agent ids; config.yaml keeps stage-3 routing deployment-owned
  (default_manager_agent_id / seat ids / business_routes / max_seats_per_run)
- Conversation persistence (conversations/messages stores) + v2 migration script
- Tests: conversations, conversation stream, migration, phase3 conversation dispatch

Frontend:
- Vitest test infra for MAF (vitest.maf.config.ts + test:maf script) with
  component tests for ApprovalCard/RunHeader/SessionsPage and use-maf-events
- Session form lib, flow-graph dialog / run-detail / sessions page updates,
  routes and nav tweaks
- Docs: R0 legacy interaction baseline mapping, updated implementation plan

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-03 12:09:47 +08:00
董宏凯 df408831e5 feat(maf): unified safe display + decision lock for approvals
Stage-6 MAF frontend foundation plus P1 approval safety hardening:

- Add lib/safe-display.ts: single-source safeDisplayJson that deletes
  sensitive keys (never renders as ***), recurses with depth/array/field/
  string caps, returns hiddenCount + truncated.
- MafApprovalCard & MafActionAuditPanel both use safeDisplayJson; remove
  private sanitize duplicates. Panels hide entirely when nothing is left.
- Lock the card on both approve AND reject (resuming state) since the
  backend advances the workflow on either decision; add a decisionLockRef
  sync guard so a double-click before React re-render cannot fire a second
  mutate. Status text becomes '正在同步工作流…'.
- Stage-6 base shipped here as prerequisite: self-contained maf-flow-graph
  (no roundtable-planning dep), MafFlowGraphDialog/MafFactLedgerPanel/
  MafActionAuditPanel, shared risk-theme/action-audit/approval-state/
  run-resume libs, mergeBySeq export, canResume wiring, TButton icon fixes.
- Tests import real functions only; 48 pass (adds 8 safeDisplayJson cases).
2026-08-02 22:55:27 +08:00
董宏凯andCursor f82363d81f 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>
2026-08-02 13:07:21 +08:00