Files
Agent-System-Backend/policy/modules/cardsvc.md
T
weichen 5c52c71f9c Add cmdbus: registry-driven command dispatch with audit and inline confirm
Why: T3 of the interaction foundation - unify button/card/slash/chat entries onto one command bus (D27) composing the Agent-Command library (D30), with danger=high commands gated behind inline confirm cards and every dispatch leaving the same audit envelope.
Evidence: go test green - cmdbus suite (four-entrance audit symmetry, high-danger confirm lifecycle incl. cancel/expiry/handler-reject, audit-unavailable yields unknown, plugin spec fail-closed, schema scalar validation) and server e2e (danger command via POST /api/commands -> confirm card -> card action confirm -> committed receipt -> audit query ordered accepted->committed); legacy /help,/new,/mock,/model,/profile contract preserved through the bus; store migration v7 command_audit (both dialects) with roundtrip test updated.
Impact: new internal/cmdbus (L1 package per D33), server routes POST /api/commands/{id} + GET /api/commands/audit + registry-driven GET /api/commands, postMessage chat-entrance dispatch when the intent gate matches a registered command, plugins host OnCommands overlay, module cards policy/modules/{cmdbus,cardsvc}.md; pending confirm state is process-local (documented limitation).
Refs: docs/proposals/2026-09-30-ui-inbox-command-workspace.md T3; task card feature/command-bus-r1
2026-09-30 07:51:31 +00:00

910 B
Raw Blame History

模块卡:internal/cardsvc(收件箱任务卡)

  • 状态:active(T2 落地,提案 D25/D33)
  • 职责:ActivityCard 生命周期(创建/更新/状态机/pin/dismiss/动作+回执/ref 幂等消解)、存储(store v6 activity_cards)、card.* 事件经会话事件管道发布(persist/seq/replay)、摄取/编排/HITL 投影卡 producer 供运行时与摄取侧调用。
  • 公开面:New(st, emit)、Create/Get/List/Update/SetStatus/SetPinned/Dismiss/Action/ResolveByRef。
  • 依赖:core(ActivityCard)、store(自有表);被 runmgr/server/ingest/squadadapter 消费;cmdbus 的确认卡经 CardPort 消费。
  • 隔离档位:L1 包(仓内);有自有存储(activity_cards 表),事件发布为注入端口。
  • 升级拆仓触发条件:跨会话项目级收件箱(v1 边界外)或第二宿主出现时,连同 cmdbus 的确认卡语义一并评估。