feat(governance): expose AI agent collaboration proof
Some checks failed
Code Review / ai-code-review (push) Successful in 13s
CD Pipeline / tests (push) Successful in 1m42s
CD Pipeline / build-and-deploy (push) Successful in 5m35s
CD Pipeline / post-deploy-checks (push) Has been cancelled

This commit is contained in:
Your Name
2026-06-26 07:42:26 +08:00
parent 5746b38116
commit ab89f526c5
3 changed files with 227 additions and 0 deletions

View File

@@ -3650,6 +3650,38 @@
}
}
},
"collaborationProof": {
"title": "AI Agent 協作與學習證據流",
"badge": "互通 / 回放 / RAG / Telegram receipt",
"summary": "目前可見協作證據 {proofs} 件;需審核或阻擋 {review} 件,正式寫入 / Telegram 實送邊界總數 {live}。",
"items": {
"handoffBus": {
"label": "交接事件匯流排",
"detail": "責任 lane {lanes} 條,必填 owner 欄位 {fields} 個,已接受回覆 {accepted}。",
"next": "下一步:{blocked} 個 runtime action 仍由 owner gate 阻擋。"
},
"ragLearning": {
"label": "RAG / KM 學習候選",
"detail": "RAG memory proposal {rag}、KM draft {km}、PlayBook 候選 {playbooks}。",
"next": "下一步learning / trust 正式寫入 {writes},未開 gate 不寫。"
},
"criticReplay": {
"label": "Critic 回放評分",
"detail": "回放 {replays} 次、scorecard {scorecards} 張shadow 通過 {passed}/{total}。",
"next": "下一步:{approvals} 個升級 checkpoint 等 owner review。"
},
"telegramReceipt": {
"label": "Telegram 回執閉環",
"detail": "需批准 {approvals}、阻擋 {blocked}、正式回執 {live}。",
"next": "下一步Telegram 實送 / Bot API 仍為 {sends},只顯示候選摘要。"
},
"visibleRuntimeProof": {
"label": "可見 runtime 證據",
"detail": "前台 surface {surfaces} 個contract ready {levels} 層live session readback {sessions}。",
"next": "下一步:{gates} 個 proof gate 未通過前不宣稱全自動閉環。"
}
}
},
"executionQueue": {
"title": "全面授權後推進佇列",
"badge": "低中風險自動準備 · 高風險等審核",

View File

@@ -3650,6 +3650,38 @@
}
}
},
"collaborationProof": {
"title": "AI Agent 協作與學習證據流",
"badge": "互通 / 回放 / RAG / Telegram receipt",
"summary": "目前可見協作證據 {proofs} 件;需審核或阻擋 {review} 件,正式寫入 / Telegram 實送邊界總數 {live}。",
"items": {
"handoffBus": {
"label": "交接事件匯流排",
"detail": "責任 lane {lanes} 條,必填 owner 欄位 {fields} 個,已接受回覆 {accepted}。",
"next": "下一步:{blocked} 個 runtime action 仍由 owner gate 阻擋。"
},
"ragLearning": {
"label": "RAG / KM 學習候選",
"detail": "RAG memory proposal {rag}、KM draft {km}、PlayBook 候選 {playbooks}。",
"next": "下一步learning / trust 正式寫入 {writes},未開 gate 不寫。"
},
"criticReplay": {
"label": "Critic 回放評分",
"detail": "回放 {replays} 次、scorecard {scorecards} 張shadow 通過 {passed}/{total}。",
"next": "下一步:{approvals} 個升級 checkpoint 等 owner review。"
},
"telegramReceipt": {
"label": "Telegram 回執閉環",
"detail": "需批准 {approvals}、阻擋 {blocked}、正式回執 {live}。",
"next": "下一步Telegram 實送 / Bot API 仍為 {sends},只顯示候選摘要。"
},
"visibleRuntimeProof": {
"label": "可見 runtime 證據",
"detail": "前台 surface {surfaces} 個contract ready {levels} 層live session readback {sessions}。",
"next": "下一步:{gates} 個 proof gate 未通過前不宣稱全自動閉環。"
}
}
},
"executionQueue": {
"title": "全面授權後推進佇列",
"badge": "低中風險自動準備 · 高風險等審核",

View File

@@ -5585,6 +5585,112 @@ export function AutomationInventoryTab() {
icon: <ShieldAlert size={15} />,
},
]
const agentCollaborationProofTotal = (
actionOwnerEventBusEvents
+ actionOwnerEventBusRag
+ actionOwnerEventBusGates
+ proofSignalCount
+ telegramReceiptGates
+ runtimeShadowReplays
+ criticReviewerScorecards
)
const agentCollaborationReviewTotal = (
actionOwnerEventBusBlocked
+ proofBlockedGates
+ telegramReceiptApprovals
+ runtimeShadowApprovals
+ criticReviewerPromotionGates
)
const agentCollaborationLiveBoundaryTotal = (
actionOwnerEventBusLiveTotal
+ telegramReceiptLiveTotal
+ globalControlLiveWriteAllowedTotal
+ globalControlTelegramSendTotal
)
const globalControlCollaborationRows: Array<{
key: string
label: string
owner: string
value: string
detail: string
next: string
tone: 'ok' | 'warn' | 'danger' | 'neutral'
icon: ReactNode
}> = [
{
key: 'handoffBus',
label: t('globalControl.collaborationProof.items.handoffBus.label'),
owner: 'OpenClaw / Hermes / Security',
value: String(actionOwnerEventBusEvents),
detail: t('globalControl.collaborationProof.items.handoffBus.detail', {
lanes: actionOwnerEventBusLanes,
fields: actionOwnerEventBusFields,
accepted: actionOwnerEventBusAccepted,
}),
next: t('globalControl.collaborationProof.items.handoffBus.next', { blocked: actionOwnerEventBusBlocked }),
tone: actionOwnerEventBusBlocked > 0 ? 'warn' : 'ok',
icon: <GitBranch size={15} />,
},
{
key: 'ragLearning',
label: t('globalControl.collaborationProof.items.ragLearning.label'),
owner: 'Hermes / OpenClaw',
value: String(actionOwnerEventBusRag + matchedPlaybookCandidates + taskResultKmDrafts),
detail: t('globalControl.collaborationProof.items.ragLearning.detail', {
rag: actionOwnerEventBusRag,
km: taskResultKmDrafts,
playbooks: matchedPlaybookCandidates,
}),
next: t('globalControl.collaborationProof.items.ragLearning.next', {
writes: matchedPlaybookLearningWrites + matchedPlaybookTrustWrites + taskResultKmWrites,
}),
tone: matchedPlaybookGates + learningWritebackApprovals > 0 ? 'warn' : 'ok',
icon: <BookOpenCheck size={15} />,
},
{
key: 'criticReplay',
label: t('globalControl.collaborationProof.items.criticReplay.label'),
owner: 'Nemotron / Critic',
value: String(runtimeShadowReplays + criticReviewerScorecards),
detail: t('globalControl.collaborationProof.items.criticReplay.detail', {
replays: runtimeShadowReplays,
scorecards: criticReviewerScorecards,
passed: runtimeShadowPassed,
total: runtimeShadowCandidates,
}),
next: t('globalControl.collaborationProof.items.criticReplay.next', { approvals: runtimeShadowApprovals + criticReviewerPromotionGates }),
tone: runtimeShadowApprovals + criticReviewerPromotionGates > 0 ? 'warn' : 'ok',
icon: <RefreshCw size={15} />,
},
{
key: 'telegramReceipt',
label: t('globalControl.collaborationProof.items.telegramReceipt.label'),
owner: 'Hermes / Telegram Bot',
value: `${telegramReceiptLanes}/${telegramReceiptGates}`,
detail: t('globalControl.collaborationProof.items.telegramReceipt.detail', {
approvals: telegramReceiptApprovals,
blocked: telegramReceiptBlockedActions,
live: telegramReceiptLiveTotal,
}),
next: t('globalControl.collaborationProof.items.telegramReceipt.next', { sends: globalControlTelegramSendTotal }),
tone: telegramReceiptApprovals + telegramReceiptBlockedActions > 0 ? 'warn' : 'ok',
icon: <BellOff size={15} />,
},
{
key: 'visibleRuntimeProof',
label: t('globalControl.collaborationProof.items.visibleRuntimeProof.label'),
owner: 'All Agents',
value: String(proofSignalCount),
detail: t('globalControl.collaborationProof.items.visibleRuntimeProof.detail', {
surfaces: proofVisibleSurfaces,
levels: proofContractReadyLevels,
sessions: proofLiveSessions,
}),
next: t('globalControl.collaborationProof.items.visibleRuntimeProof.next', { gates: proofBlockedGates }),
tone: proofBlockedGates > 0 ? 'warn' : 'ok',
icon: <Layers3 size={15} />,
},
]
const globalControlExecutionQueueRows: Array<{
key: string
label: string
@@ -5987,6 +6093,62 @@ export function AutomationInventoryTab() {
</div>
</div>
<div style={{ padding: 12, border: '0.5px solid #c9dfdc', borderRadius: 7, background: '#f8fffe', display: 'flex', flexDirection: 'column', gap: 11, minWidth: 0 }}>
<div style={{ display: 'flex', alignItems: 'flex-start', justifyContent: 'space-between', gap: 10, flexWrap: 'wrap' }}>
<div style={{ display: 'flex', flexDirection: 'column', gap: 4, minWidth: 0 }}>
<SmallLabel>{t('globalControl.collaborationProof.title')}</SmallLabel>
<span style={{ fontFamily: "'DM Mono', monospace", fontSize: 10, color: '#536b67', lineHeight: 1.5, overflowWrap: 'anywhere' }}>
{t('globalControl.collaborationProof.summary', {
proofs: agentCollaborationProofTotal,
review: agentCollaborationReviewTotal,
live: agentCollaborationLiveBoundaryTotal,
})}
</span>
</div>
<Chip value={t('globalControl.collaborationProof.badge')} muted />
</div>
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(5, minmax(0, 1fr))', gap: 10 }} className="automation-inventory-global-control-collaboration-proof-grid">
{globalControlCollaborationRows.map(row => {
const color = toneColor(row.tone)
return (
<div key={row.key} style={{ padding: 11, border: `0.5px solid ${color}44`, borderRadius: 7, background: '#fff', display: 'flex', flexDirection: 'column', gap: 8, minWidth: 0 }}>
<div style={{ display: 'flex', justifyContent: 'space-between', gap: 8, alignItems: 'flex-start', minWidth: 0 }}>
<div style={{ display: 'flex', gap: 7, alignItems: 'center', minWidth: 0 }}>
<div style={{
width: 28,
height: 28,
borderRadius: 7,
border: `0.5px solid ${color}55`,
background: `${color}12`,
color,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexShrink: 0,
}}>
{row.icon}
</div>
<span style={{ fontFamily: 'Syne, sans-serif', fontSize: 12, fontWeight: 760, color: '#141413', lineHeight: 1.2, overflowWrap: 'anywhere' }}>
{row.label}
</span>
</div>
<Chip value={row.value} muted={row.tone === 'ok'} />
</div>
<div style={{ display: 'flex', flexWrap: 'wrap', gap: 6 }}>
<Chip value={row.owner} />
</div>
<span style={{ fontFamily: "'DM Mono', monospace", fontSize: 10, color: '#536b67', lineHeight: 1.45, overflowWrap: 'anywhere' }}>
{row.detail}
</span>
<span style={{ fontFamily: "'DM Mono', monospace", fontSize: 10, color, fontWeight: 700, lineHeight: 1.45, overflowWrap: 'anywhere' }}>
{row.next}
</span>
</div>
)
})}
</div>
</div>
<div style={{ padding: 12, border: '0.5px solid #eee1c8', borderRadius: 7, background: '#fffdf7', display: 'flex', flexDirection: 'column', gap: 11, minWidth: 0 }}>
<div style={{ display: 'flex', alignItems: 'flex-start', justifyContent: 'space-between', gap: 10, flexWrap: 'wrap' }}>
<div style={{ display: 'flex', flexDirection: 'column', gap: 4, minWidth: 0 }}>
@@ -18762,6 +18924,7 @@ export function AutomationInventoryTab() {
.automation-inventory-global-control-pipeline-grid,
.automation-inventory-global-control-runway-grid,
.automation-inventory-global-control-agent-workload-grid,
.automation-inventory-global-control-collaboration-proof-grid,
.automation-inventory-global-control-execution-queue-grid,
.automation-inventory-global-control-execution-queue-meta-grid,
.automation-inventory-global-control-domain-grid,