From b73ce07ebf29b519bbc77b18baa4ca2d9bdecfe2 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 26 Jun 2026 08:59:46 +0800 Subject: [PATCH] feat(governance): expose AI agent autonomy maturity --- apps/web/messages/en.json | 53 +++++ apps/web/messages/zh-TW.json | 53 +++++ .../tabs/automation-inventory-tab.tsx | 215 ++++++++++++++++++ 3 files changed, 321 insertions(+) diff --git a/apps/web/messages/en.json b/apps/web/messages/en.json index 9af88acf..7fb74c24 100644 --- a/apps/web/messages/en.json +++ b/apps/web/messages/en.json @@ -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": "Gate:no-write dry-run,候選未批准不 apply。", + "noTelegram": "Gate:Telegram live / Bot API 實送 {sends}。", + "noProviderSwitch": "Gate:provider switch / production write {writes}。", + "runtimeClosed": "Gate:runtime write gate 仍關閉,高風險需 owner release。", + "learningNoWrite": "Gate:learning / 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": "低中風險自動準備 · 高風險等審核", diff --git a/apps/web/messages/zh-TW.json b/apps/web/messages/zh-TW.json index 9af88acf..7fb74c24 100644 --- a/apps/web/messages/zh-TW.json +++ b/apps/web/messages/zh-TW.json @@ -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": "Gate:no-write dry-run,候選未批准不 apply。", + "noTelegram": "Gate:Telegram live / Bot API 實送 {sends}。", + "noProviderSwitch": "Gate:provider switch / production write {writes}。", + "runtimeClosed": "Gate:runtime write gate 仍關閉,高風險需 owner release。", + "learningNoWrite": "Gate:learning / 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": "低中風險自動準備 · 高風險等審核", diff --git a/apps/web/src/app/[locale]/governance/tabs/automation-inventory-tab.tsx b/apps/web/src/app/[locale]/governance/tabs/automation-inventory-tab.tsx index 911d6123..200a3adc 100644 --- a/apps/web/src/app/[locale]/governance/tabs/automation-inventory-tab.tsx +++ b/apps/web/src/app/[locale]/governance/tabs/automation-inventory-tab.tsx @@ -5967,6 +5967,155 @@ export function AutomationInventoryTab() { icon: , }, ] + 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: , + }, + { + 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: , + }, + { + 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: , + }, + { + 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: , + }, + { + 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: , + }, + { + 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: , + }, + ] return (
@@ -6351,6 +6500,71 @@ export function AutomationInventoryTab() {
+
+
+
+ {t('globalControl.autonomyMaturity.title')} + + {t('globalControl.autonomyMaturity.summary', { + rows: globalControlAutonomyMaturityRows.length, + evidence: globalControlAutonomyEvidenceTotal, + prepared: globalControlAutonomyPreparedTotal, + gates: globalControlAutonomyGateTotal, + live: globalControlLiveWriteAllowedTotal, + })} + +
+ +
+
+ {globalControlAutonomyMaturityRows.map(row => { + const color = toneColor(row.tone) + return ( +
+
+ {row.icon} +
+
+
+
+ + {row.label} + + + {row.stage} + +
+ +
+
+ +
+ + {row.detail} + + + {row.next} + + + {row.gate} + +
+
+ ) + })} +
+
+
@@ -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,