feat(governance): expose AI agent autonomy maturity
All checks were successful
Code Review / ai-code-review (push) Successful in 14s
CD Pipeline / tests (push) Successful in 1m39s
CD Pipeline / build-and-deploy (push) Successful in 6m33s
CD Pipeline / post-deploy-checks (push) Successful in 1m46s

This commit is contained in:
Your Name
2026-06-26 08:59:46 +08:00
parent 948004736a
commit b73ce07ebf
3 changed files with 321 additions and 0 deletions

View File

@@ -3722,6 +3722,59 @@
}
}
},
"autonomyMaturity": {
"title": "AI Agent 自動化成熟度與接管缺口",
"badge": "Sensor → Candidate → Gate → Verifier → Learning",
"summary": "目前追蹤 {rows} 條成熟度鏈;證據 {evidence} 件,可自動準備 {prepared} 件,待 Gate / owner review {gates} 件,正式寫入 {live}。",
"stages": {
"sensor": "L1-L2 Sensor / Evidence",
"candidate": "L3-L4 Candidate / Dry-run",
"report": "L4 Report / Telegram preview",
"replay": "L4 Shadow replay / Market radar",
"execution": "L5 Execution gate",
"learning": "L6-L7 Verifier / Learning"
},
"gates": {
"readOnly": "Gate只讀感測不讀 secret、不寫 runtime。",
"noWrite": "Gateno-write dry-run候選未批准不 apply。",
"noTelegram": "GateTelegram live / Bot API 實送 {sends}。",
"noProviderSwitch": "Gateprovider switch / production write {writes}。",
"runtimeClosed": "Gateruntime write gate 仍關閉,高風險需 owner release。",
"learningNoWrite": "Gatelearning / trust 正式寫入 {writes}。"
},
"items": {
"sensorEvidence": {
"label": "只讀感測與證據",
"detail": "資產 {assets}、runtime proof {proofs}、readonly probe {probes};先建立可查證事實。",
"next": "下一步:{blocked} 個 proof gate 未通過前不升級自動執行。"
},
"candidateDryRun": {
"label": "候選與乾跑",
"detail": "dry-run 證據 {evidence}、低中風險候選 {auto}、verifier plan {verifier}。",
"next": "下一步:{review} 個候選仍需 OpenClaw / SRE review。"
},
"reportTelegram": {
"label": "報告與 Telegram 預覽",
"detail": "queue draft {drafts}、圖表來源 {charts}、receipt gate {receipts};先 no-send preview。",
"next": "下一步:{approvals} 個報告/發送 gate 未通過前不實送。"
},
"marketReplay": {
"label": "市場雷達與回放",
"detail": "市場候選 {market}、版本漂移 {drift}、scorecard {scorecards}NemoTron 只做比較與回放。",
"next": "下一步:{checkpoints} 個 checkpoint 未批准前不切 provider。"
},
"executionGate": {
"label": "正式執行 Gate",
"detail": "approval gate {gates}、blocked write {blocked}、Telegram 實送 {telegram};低中風險也先可追溯。",
"next": "下一步:{reviews} 個 Security / OpenClaw review 補齊前維持 runtime gate 關閉。"
},
"verifierLearning": {
"label": "驗證與學習回寫",
"detail": "verifier {verifier}、KM draft {km}、PlayBook 候選 {playbooks};先寫候選,不改 trust。",
"next": "下一步:{gates} 個 learning gate 未通過前不寫 PlayBook trust。"
}
}
},
"executionQueue": {
"title": "全面授權後推進佇列",
"badge": "低中風險自動準備 · 高風險等審核",

View File

@@ -3722,6 +3722,59 @@
}
}
},
"autonomyMaturity": {
"title": "AI Agent 自動化成熟度與接管缺口",
"badge": "Sensor → Candidate → Gate → Verifier → Learning",
"summary": "目前追蹤 {rows} 條成熟度鏈;證據 {evidence} 件,可自動準備 {prepared} 件,待 Gate / owner review {gates} 件,正式寫入 {live}。",
"stages": {
"sensor": "L1-L2 Sensor / Evidence",
"candidate": "L3-L4 Candidate / Dry-run",
"report": "L4 Report / Telegram preview",
"replay": "L4 Shadow replay / Market radar",
"execution": "L5 Execution gate",
"learning": "L6-L7 Verifier / Learning"
},
"gates": {
"readOnly": "Gate只讀感測不讀 secret、不寫 runtime。",
"noWrite": "Gateno-write dry-run候選未批准不 apply。",
"noTelegram": "GateTelegram live / Bot API 實送 {sends}。",
"noProviderSwitch": "Gateprovider switch / production write {writes}。",
"runtimeClosed": "Gateruntime write gate 仍關閉,高風險需 owner release。",
"learningNoWrite": "Gatelearning / trust 正式寫入 {writes}。"
},
"items": {
"sensorEvidence": {
"label": "只讀感測與證據",
"detail": "資產 {assets}、runtime proof {proofs}、readonly probe {probes};先建立可查證事實。",
"next": "下一步:{blocked} 個 proof gate 未通過前不升級自動執行。"
},
"candidateDryRun": {
"label": "候選與乾跑",
"detail": "dry-run 證據 {evidence}、低中風險候選 {auto}、verifier plan {verifier}。",
"next": "下一步:{review} 個候選仍需 OpenClaw / SRE review。"
},
"reportTelegram": {
"label": "報告與 Telegram 預覽",
"detail": "queue draft {drafts}、圖表來源 {charts}、receipt gate {receipts};先 no-send preview。",
"next": "下一步:{approvals} 個報告/發送 gate 未通過前不實送。"
},
"marketReplay": {
"label": "市場雷達與回放",
"detail": "市場候選 {market}、版本漂移 {drift}、scorecard {scorecards}NemoTron 只做比較與回放。",
"next": "下一步:{checkpoints} 個 checkpoint 未批准前不切 provider。"
},
"executionGate": {
"label": "正式執行 Gate",
"detail": "approval gate {gates}、blocked write {blocked}、Telegram 實送 {telegram};低中風險也先可追溯。",
"next": "下一步:{reviews} 個 Security / OpenClaw review 補齊前維持 runtime gate 關閉。"
},
"verifierLearning": {
"label": "驗證與學習回寫",
"detail": "verifier {verifier}、KM draft {km}、PlayBook 候選 {playbooks};先寫候選,不改 trust。",
"next": "下一步:{gates} 個 learning gate 未通過前不寫 PlayBook trust。"
}
}
},
"executionQueue": {
"title": "全面授權後推進佇列",
"badge": "低中風險自動準備 · 高風險等審核",

View File

@@ -5967,6 +5967,155 @@ export function AutomationInventoryTab() {
icon: <ShieldAlert size={15} />,
},
]
const globalControlAutonomyEvidenceTotal = (
professionalJudgmentEvidenceTotal
+ agentCollaborationProofTotal
+ candidateDryRunEvidenceCount
+ proofSignalCount
)
const globalControlAutonomyPreparedTotal = (
candidateDryRunPassed
+ runtimeShadowPassed
+ reportRuntimeReady
+ lowMediumWhitelistCandidates
+ matchedPlaybookCandidates
)
const globalControlAutonomyGateTotal = (
globalControlApprovalGateTotal
+ runtimeWriteBlockedActions
+ operationPermissionBlocked
+ highRiskOwnerQueueBlocked
+ reportRuntimeApprovals
+ runtimeShadowApprovals
+ learningWritebackApprovals
)
const globalControlAutonomyMaturityRows: Array<{
key: string
label: string
stage: string
owner: string
value: string
detail: string
next: string
gate: string
tone: 'ok' | 'warn' | 'danger' | 'neutral'
icon: ReactNode
}> = [
{
key: 'sensorEvidence',
label: t('globalControl.autonomyMaturity.items.sensorEvidence.label'),
stage: t('globalControl.autonomyMaturity.stages.sensor'),
owner: 'Hermes / OpenClaw',
value: `${globalControlDomainRows.length}/8`,
detail: t('globalControl.autonomyMaturity.items.sensorEvidence.detail', {
assets: snapshot.assets.length,
proofs: proofSignalCount,
probes: hostStatefulInventory.rollups.readonly_probe_step_count,
}),
next: t('globalControl.autonomyMaturity.items.sensorEvidence.next', {
blocked: proofBlockedGates,
}),
gate: t('globalControl.autonomyMaturity.gates.readOnly'),
tone: proofBlockedGates > 0 ? 'warn' : 'ok',
icon: <Fingerprint size={15} />,
},
{
key: 'candidateDryRun',
label: t('globalControl.autonomyMaturity.items.candidateDryRun.label'),
stage: t('globalControl.autonomyMaturity.stages.candidate'),
owner: 'OpenClaw / SRE',
value: `${candidateDryRunPassed}/${candidateDryRunCount}`,
detail: t('globalControl.autonomyMaturity.items.candidateDryRun.detail', {
evidence: candidateDryRunEvidenceCount,
auto: lowMediumWhitelistCandidates,
verifier: candidateDryRunVerifierPlans,
}),
next: t('globalControl.autonomyMaturity.items.candidateDryRun.next', {
review: candidateDryRunNeedsReview,
}),
gate: t('globalControl.autonomyMaturity.gates.noWrite'),
tone: candidateDryRunNeedsReview > 0 ? 'warn' : 'ok',
icon: <ClipboardCheck size={15} />,
},
{
key: 'reportTelegram',
label: t('globalControl.autonomyMaturity.items.reportTelegram.label'),
stage: t('globalControl.autonomyMaturity.stages.report'),
owner: 'Hermes / Reporter',
value: `${reportRuntimeReady}/${reportRuntimeLanes}`,
detail: t('globalControl.autonomyMaturity.items.reportTelegram.detail', {
drafts: reportDryRunQueueDrafts,
charts: visibleReportStatusCharts.length + visibleReportCharts.length,
receipts: telegramReceiptGates,
}),
next: t('globalControl.autonomyMaturity.items.reportTelegram.next', {
approvals: reportRuntimeApprovals + reportDryRunApprovals + reportFixtureApprovals,
}),
gate: t('globalControl.autonomyMaturity.gates.noTelegram', {
sends: globalControlTelegramSendTotal,
}),
tone: reportRuntimeApprovals + reportDryRunApprovals + reportFixtureApprovals > 0 ? 'warn' : 'ok',
icon: <BellRing size={15} />,
},
{
key: 'marketReplay',
label: t('globalControl.autonomyMaturity.items.marketReplay.label'),
stage: t('globalControl.autonomyMaturity.stages.replay'),
owner: 'NemoTron / Critic',
value: `${runtimeShadowPassed}/${runtimeShadowCandidates}`,
detail: t('globalControl.autonomyMaturity.items.marketReplay.detail', {
market: warRoomMarketCandidates,
drift: dependencySupplyChainDriftMonitor.rollups.drift_candidate_count,
scorecards: criticReviewerScorecards,
}),
next: t('globalControl.autonomyMaturity.items.marketReplay.next', {
checkpoints: runtimeShadowApprovals + criticReviewerPromotionGates,
}),
gate: t('globalControl.autonomyMaturity.gates.noProviderSwitch', {
writes: runtimeShadowProductionWrites + providerRouteDeniedCount,
}),
tone: runtimeShadowApprovals + criticReviewerPromotionGates + providerRouteDeniedCount > 0 ? 'warn' : 'ok',
icon: <RefreshCw size={15} />,
},
{
key: 'executionGate',
label: t('globalControl.autonomyMaturity.items.executionGate.label'),
stage: t('globalControl.autonomyMaturity.stages.execution'),
owner: 'Security / SRE',
value: String(globalControlLiveWriteAllowedTotal),
detail: t('globalControl.autonomyMaturity.items.executionGate.detail', {
gates: globalControlApprovalGateTotal,
blocked: runtimeWriteBlockedActions + operationPermissionBlocked + highRiskOwnerQueueBlocked,
telegram: globalControlTelegramSendTotal,
}),
next: t('globalControl.autonomyMaturity.items.executionGate.next', {
reviews: securitySreOwnerReview + openClawOwnerReview,
}),
gate: t('globalControl.autonomyMaturity.gates.runtimeClosed'),
tone: globalControlLiveWriteAllowedTotal === 0 && globalControlTelegramSendTotal === 0 ? 'warn' : 'danger',
icon: <Lock size={15} />,
},
{
key: 'verifierLearning',
label: t('globalControl.autonomyMaturity.items.verifierLearning.label'),
stage: t('globalControl.autonomyMaturity.stages.learning'),
owner: 'All Agents',
value: `${resultCaptureReleaseReadbacks}/${learningWritebackLiveWrites}`,
detail: t('globalControl.autonomyMaturity.items.verifierLearning.detail', {
verifier: runtimeVerifierActions,
km: taskResultKmDrafts,
playbooks: matchedPlaybookCandidates,
}),
next: t('globalControl.autonomyMaturity.items.verifierLearning.next', {
gates: matchedPlaybookGates + learningWritebackApprovals,
}),
gate: t('globalControl.autonomyMaturity.gates.learningNoWrite', {
writes: matchedPlaybookLearningWrites + matchedPlaybookTrustWrites + taskResultKmWrites,
}),
tone: matchedPlaybookGates + learningWritebackApprovals > 0 ? 'warn' : 'ok',
icon: <ShieldCheck size={15} />,
},
]
return (
<div className="automation-inventory-tab-root" style={{ padding: 20, display: 'flex', flexDirection: 'column', gap: 16, minWidth: 0 }}>
@@ -6351,6 +6500,71 @@ export function AutomationInventoryTab() {
</div>
</div>
<div style={{ padding: 12, border: '0.5px solid #cbd7ea', borderRadius: 7, background: '#f9fbff', 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.autonomyMaturity.title')}</SmallLabel>
<span style={{ fontFamily: "'DM Mono', monospace", fontSize: 10, color: '#536078', lineHeight: 1.5, overflowWrap: 'anywhere' }}>
{t('globalControl.autonomyMaturity.summary', {
rows: globalControlAutonomyMaturityRows.length,
evidence: globalControlAutonomyEvidenceTotal,
prepared: globalControlAutonomyPreparedTotal,
gates: globalControlAutonomyGateTotal,
live: globalControlLiveWriteAllowedTotal,
})}
</span>
</div>
<Chip value={t('globalControl.autonomyMaturity.badge')} muted />
</div>
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(3, minmax(0, 1fr))', gap: 10 }} className="automation-inventory-global-control-autonomy-maturity-grid">
{globalControlAutonomyMaturityRows.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: 'grid', gridTemplateColumns: '30px minmax(0, 1fr)', gap: 9, alignItems: 'start', minWidth: 0 }}>
<div style={{
width: 30,
height: 30,
borderRadius: 7,
border: `0.5px solid ${color}55`,
background: `${color}12`,
color,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
}}>
{row.icon}
</div>
<div style={{ display: 'flex', flexDirection: 'column', gap: 7, minWidth: 0 }}>
<div style={{ display: 'flex', justifyContent: 'space-between', gap: 8, alignItems: 'flex-start', flexWrap: 'wrap', minWidth: 0 }}>
<div style={{ display: 'flex', flexDirection: 'column', gap: 3, minWidth: 0 }}>
<span style={{ fontFamily: 'Syne, sans-serif', fontSize: 13, fontWeight: 760, color: '#141413', lineHeight: 1.2, overflowWrap: 'anywhere' }}>
{row.label}
</span>
<span style={{ fontFamily: "'DM Mono', monospace", fontSize: 10, color: '#64718b', lineHeight: 1.35, overflowWrap: 'anywhere' }}>
{row.stage}
</span>
</div>
<Chip value={row.value} muted={row.tone === 'ok'} />
</div>
<div style={{ display: 'flex', flexWrap: 'wrap', gap: 6, minWidth: 0 }}>
<Chip value={row.owner} />
</div>
<span style={{ fontFamily: "'DM Mono', monospace", fontSize: 10, color: '#536078', 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>
<span style={{ fontFamily: "'DM Mono', monospace", fontSize: 10, color: '#64718b', lineHeight: 1.45, overflowWrap: 'anywhere' }}>
{row.gate}
</span>
</div>
</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 }}>
@@ -19128,6 +19342,7 @@ export function AutomationInventoryTab() {
.automation-inventory-global-control-agent-workload-grid,
.automation-inventory-global-control-collaboration-proof-grid,
.automation-inventory-global-control-professional-judgment-grid,
.automation-inventory-global-control-autonomy-maturity-grid,
.automation-inventory-global-control-execution-queue-grid,
.automation-inventory-global-control-execution-queue-meta-grid,
.automation-inventory-global-control-domain-grid,