Add activity card, card events, HITL anchoring and UI vocabulary extension
Why: Contract foundation for the inbox/command-bus/workspaces phase (proposal D28/D30): ActivityCard as the first-class state object behind the right-rail inbox, card.* stream events, inline-confirm anchoring (anchorMessageId + blocked/blockReason) on HITL, seven new UI schema vocabularies, plugin provides.commands/workspaces, workflow card step and workspace declarations. Evidence: go vet clean; conformance goldens regenerated and verified — new activity_card / hitl_card_blocked / event_card_created / event_card_resolved / ui_vocabularies samples plus extended plugin_manifest; CardStatus.Terminal helper unit-covered via build; ts/types.ts mirrors all additions. Impact: Additive only (omitempty fields, new types, new event types) — existing consumers ignore unknown values per forward-compat rule; vocabulary spec types carry a Spec suffix to avoid const-name collisions. Refs: modules/documents docs/proposals/2026-09-30-ui-inbox-command-workspace.md
This commit is contained in:
Vendored
+63
@@ -0,0 +1,63 @@
|
||||
{
|
||||
"id": "card_abc123def456",
|
||||
"projectId": "prj_abc123def456",
|
||||
"conversationId": "cnv_abc123def456",
|
||||
"sourceRunId": "run_abc123def456",
|
||||
"anchorMessageId": "msg_abc123def456",
|
||||
"kind": "compare",
|
||||
"title": "项目执行周期不一致 · 目标已基线",
|
||||
"status": "action_required",
|
||||
"tone": "danger",
|
||||
"body": [
|
||||
{
|
||||
"type": "compare",
|
||||
"compare": {
|
||||
"left": {
|
||||
"title": "基线 V1.2 · 已评审",
|
||||
"tone": "danger",
|
||||
"nodes": [
|
||||
{
|
||||
"type": "markdown",
|
||||
"markdown": "12 个月(立项到注册)"
|
||||
}
|
||||
]
|
||||
},
|
||||
"right": {
|
||||
"title": "新资料 · 待确认",
|
||||
"tone": "ok",
|
||||
"nodes": [
|
||||
{
|
||||
"type": "markdown",
|
||||
"markdown": "18 个月(含临床试验)"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "progress",
|
||||
"title": "切片进度",
|
||||
"progress": {
|
||||
"label": "切片 24/24",
|
||||
"value": 1,
|
||||
"tone": "ok"
|
||||
}
|
||||
}
|
||||
],
|
||||
"actions": [
|
||||
{
|
||||
"id": "escalate",
|
||||
"label": "发起变更流程",
|
||||
"style": "primary",
|
||||
"command": "change.escalate"
|
||||
},
|
||||
{
|
||||
"id": "keep",
|
||||
"label": "维持原样",
|
||||
"style": "danger"
|
||||
}
|
||||
],
|
||||
"pinned": true,
|
||||
"createdAt": "0001-01-01T00:00:00Z",
|
||||
"updatedAt": "0001-01-01T00:00:00Z"
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"seq": 45,
|
||||
"runId": "run_1",
|
||||
"conversationId": "cnv_1",
|
||||
"ts": "2026-09-30T10:00:00Z",
|
||||
"v": 1,
|
||||
"type": "card.created",
|
||||
"payload": {
|
||||
"card": {
|
||||
"id": "card_abc123def456",
|
||||
"projectId": "prj_1",
|
||||
"kind": "progress",
|
||||
"title": "竞品分析 PPTX 入库",
|
||||
"status": "active",
|
||||
"createdAt": "2026-09-30T10:00:00Z",
|
||||
"updatedAt": "2026-09-30T10:00:00Z"
|
||||
}
|
||||
}
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"seq": 46,
|
||||
"runId": "run_1",
|
||||
"conversationId": "cnv_1",
|
||||
"ts": "2026-09-30T10:05:00Z",
|
||||
"v": 1,
|
||||
"type": "card.resolved",
|
||||
"payload": {
|
||||
"cardId": "card_abc123def456",
|
||||
"actionId": "escalate"
|
||||
}
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"id": "hitl_def456abc789",
|
||||
"runId": "run_1",
|
||||
"conversationId": "cnv_1",
|
||||
"question": "批准变更 CO-2026-007?",
|
||||
"kind": "confirm",
|
||||
"choices": [
|
||||
{
|
||||
"id": "approve",
|
||||
"label": "确认批准",
|
||||
"description": "变更单进入执行态",
|
||||
"impact": "立即生效并留痕,不可裸文本撤回"
|
||||
},
|
||||
{
|
||||
"id": "reject",
|
||||
"label": "驳回",
|
||||
"description": "关闭变更单并记录理由",
|
||||
"impact": "留痕可审计"
|
||||
}
|
||||
],
|
||||
"allowFreeInput": false,
|
||||
"createdAt": "",
|
||||
"resolved": false,
|
||||
"anchorMessageId": "msg_abc123def456",
|
||||
"blocked": true,
|
||||
"blockReason": "存在未闭环高风险变更单,可先处理后重新检查"
|
||||
}
|
||||
Vendored
+6
@@ -23,6 +23,12 @@
|
||||
],
|
||||
"settings": [
|
||||
"greeting"
|
||||
],
|
||||
"commands": [
|
||||
"demo.refresh"
|
||||
],
|
||||
"workspaces": [
|
||||
"demo-main"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+152
@@ -0,0 +1,152 @@
|
||||
[
|
||||
{
|
||||
"type": "progress",
|
||||
"progress": {
|
||||
"label": "市场可行性 78%",
|
||||
"value": 0.78,
|
||||
"tone": "ok"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "compare",
|
||||
"compare": {
|
||||
"left": {
|
||||
"title": "基线",
|
||||
"tone": "danger"
|
||||
},
|
||||
"right": {
|
||||
"title": "新内容",
|
||||
"tone": "ok",
|
||||
"nodes": [
|
||||
{
|
||||
"type": "markdown",
|
||||
"markdown": "18 个月"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "tree",
|
||||
"tree": {
|
||||
"nodes": [
|
||||
{
|
||||
"id": "stage-1",
|
||||
"label": "商务与策划",
|
||||
"count": 24,
|
||||
"children": [
|
||||
{
|
||||
"id": "topic-1",
|
||||
"label": "市场调研",
|
||||
"tone": "ok",
|
||||
"badge": "多挂载",
|
||||
"count": 12,
|
||||
"selected": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "table",
|
||||
"table": {
|
||||
"columns": [
|
||||
{
|
||||
"key": "id",
|
||||
"label": "编号"
|
||||
},
|
||||
{
|
||||
"key": "title",
|
||||
"label": "标题"
|
||||
}
|
||||
],
|
||||
"rows": [
|
||||
{
|
||||
"id": "ur-005",
|
||||
"cells": [
|
||||
[
|
||||
"id",
|
||||
"UR-005"
|
||||
],
|
||||
[
|
||||
"title",
|
||||
"项目执行周期"
|
||||
]
|
||||
],
|
||||
"actions": [
|
||||
{
|
||||
"id": "trace",
|
||||
"label": "追溯"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "steps",
|
||||
"steps": {
|
||||
"current": 2,
|
||||
"steps": [
|
||||
{
|
||||
"label": "申请",
|
||||
"status": "done"
|
||||
},
|
||||
{
|
||||
"label": "影响分析",
|
||||
"status": "done"
|
||||
},
|
||||
{
|
||||
"label": "评审",
|
||||
"status": "active"
|
||||
},
|
||||
{
|
||||
"label": "批准",
|
||||
"status": "pending"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "tabs",
|
||||
"tabs": {
|
||||
"active": "view",
|
||||
"tabs": [
|
||||
{
|
||||
"id": "view",
|
||||
"label": "查看",
|
||||
"nodes": [
|
||||
{
|
||||
"type": "markdown",
|
||||
"markdown": "正文"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "history",
|
||||
"label": "历史版本"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "timeline",
|
||||
"timeline": {
|
||||
"items": [
|
||||
{
|
||||
"time": "10:42",
|
||||
"title": "v0.6 填入注册分类界定",
|
||||
"tone": "ok",
|
||||
"markdown": "来源 S-121",
|
||||
"ref": "S-121"
|
||||
},
|
||||
{
|
||||
"time": "09-28",
|
||||
"title": "v0.5 更新竞品定价段落",
|
||||
"ref": "陈磊确认"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user