diff --git a/apps/web/messages/en.json b/apps/web/messages/en.json index dd7af352..dcd45300 100644 --- a/apps/web/messages/en.json +++ b/apps/web/messages/en.json @@ -3024,11 +3024,27 @@ "error": "無法載入待辦佇列", "retry": "重試" }, + "agentActivity": { + "automationTitle": "AI Agent 協作脈衝", + "automationSubtitle": "OpenClaw 仲裁,Hermes 記憶,NemoTron 執行;目前只讀讀回,正式寫入維持 0。", + "marketTitle": "Agent 市場觀測脈衝", + "marketSubtitle": "外部候選先進入觀測與評分,Agent 只產生證據與批准包,不自動替換。", + "status": "狀態", + "footnote": "原創動態參考官方 Agent 視覺語言,不使用官方商標或素材。" + }, "agentMarket": { "title": "Agent 市場治理", "generatedAt": "產生時間", "error": "無法載入 Agent 市場治理快照", "retry": "重試", + "agentActivity": { + "metrics": { + "candidates": "候選數", + "prescreenReady": "可預篩", + "blocked": "已阻擋", + "approvals": "Runtime 批准" + } + }, "metrics": { "candidates": "候選數", "sources": "來源數", @@ -3141,6 +3157,14 @@ "readOnly": "只讀模式", "error": "無法載入自動化盤點快照", "retry": "重試", + "agentActivity": { + "metrics": { + "backlog": "待辦進度", + "readback": "讀回關卡", + "gates": "人工 gate", + "liveWrites": "正式寫入" + } + }, "metrics": { "progress": "整體進度", "assets": "資產數", diff --git a/apps/web/messages/zh-TW.json b/apps/web/messages/zh-TW.json index dd7af352..dcd45300 100644 --- a/apps/web/messages/zh-TW.json +++ b/apps/web/messages/zh-TW.json @@ -3024,11 +3024,27 @@ "error": "無法載入待辦佇列", "retry": "重試" }, + "agentActivity": { + "automationTitle": "AI Agent 協作脈衝", + "automationSubtitle": "OpenClaw 仲裁,Hermes 記憶,NemoTron 執行;目前只讀讀回,正式寫入維持 0。", + "marketTitle": "Agent 市場觀測脈衝", + "marketSubtitle": "外部候選先進入觀測與評分,Agent 只產生證據與批准包,不自動替換。", + "status": "狀態", + "footnote": "原創動態參考官方 Agent 視覺語言,不使用官方商標或素材。" + }, "agentMarket": { "title": "Agent 市場治理", "generatedAt": "產生時間", "error": "無法載入 Agent 市場治理快照", "retry": "重試", + "agentActivity": { + "metrics": { + "candidates": "候選數", + "prescreenReady": "可預篩", + "blocked": "已阻擋", + "approvals": "Runtime 批准" + } + }, "metrics": { "candidates": "候選數", "sources": "來源數", @@ -3141,6 +3157,14 @@ "readOnly": "只讀模式", "error": "無法載入自動化盤點快照", "retry": "重試", + "agentActivity": { + "metrics": { + "backlog": "待辦進度", + "readback": "讀回關卡", + "gates": "人工 gate", + "liveWrites": "正式寫入" + } + }, "metrics": { "progress": "整體進度", "assets": "資產數", diff --git a/apps/web/src/app/[locale]/governance/tabs/agent-market-tab.tsx b/apps/web/src/app/[locale]/governance/tabs/agent-market-tab.tsx index 1bb2c4c6..9605c16e 100644 --- a/apps/web/src/app/[locale]/governance/tabs/agent-market-tab.tsx +++ b/apps/web/src/app/[locale]/governance/tabs/agent-market-tab.tsx @@ -13,6 +13,7 @@ import { AlertTriangle, Ban, CalendarClock, CheckCircle2, ListChecks, Lock, Refr import { useTranslations } from 'next-intl' import { GlassCard } from '@/components/ui/glass-card' import { StatusOrb } from '@/components/ui/status-orb' +import { AgentActivityConstellation } from '@/components/governance/agent-activity-constellation' import { apiClient, type AgentMarketGovernanceSnapshot } from '@/lib/api-client' // ============================================================================= @@ -306,6 +307,17 @@ export function AgentMarketTab() { + 0 ? 'warn' : 'ok' }, + { label: t('agentActivity.metrics.approvals'), value: allApprovals, tone: allApprovals === 0 ? 'ok' : 'warn' }, + ]} + /> +
+ 0 ? 'warn' : 'ok' }, + { label: t('agentActivity.metrics.liveWrites'), value: resultCaptureReleaseReadbackLiveWrites, tone: resultCaptureReleaseReadbackLiveWrites === 0 ? 'ok' : 'danger' }, + ]} + /> +
diff --git a/apps/web/src/components/governance/agent-activity-constellation.tsx b/apps/web/src/components/governance/agent-activity-constellation.tsx new file mode 100644 index 00000000..64f9dabf --- /dev/null +++ b/apps/web/src/components/governance/agent-activity-constellation.tsx @@ -0,0 +1,472 @@ +'use client' + +import { BrainCircuit, Cpu, RadioTower, Route, ShieldCheck } from 'lucide-react' +import type { CSSProperties } from 'react' +import { useTranslations } from 'next-intl' +import { GlassCard } from '@/components/ui/glass-card' + +type AgentActivityMode = 'automation' | 'market' +type AgentActivityTone = 'ok' | 'warn' | 'danger' | 'neutral' + +export type AgentActivityMetric = { + label: string + value: string | number + tone?: AgentActivityTone +} + +export type AgentActivityConstellationProps = { + mode: AgentActivityMode + statusValue: string + metrics: AgentActivityMetric[] +} + +function toneColor(tone: AgentActivityTone = 'neutral') { + if (tone === 'ok') return '#22C55E' + if (tone === 'warn') return '#F59E0B' + if (tone === 'danger') return '#EF4444' + return '#4A90D9' +} + +export function AgentActivityConstellation({ + mode, + statusValue, + metrics, +}: AgentActivityConstellationProps) { + const t = useTranslations('governance.agentActivity') + const isMarket = mode === 'market' + const title = isMarket ? t('marketTitle') : t('automationTitle') + const subtitle = isMarket ? t('marketSubtitle') : t('automationSubtitle') + + return ( + +
+
+
+
+
+ +
+
+ + OpenClaw +
+
+ + Hermes +
+
+ + NemoTron +
+
+
+
+
+ +
+
+ + {title} +
+

{subtitle}

+
+ {t('status')} + {statusValue} +
+
+ {metrics.map((metric) => ( +
+ {metric.label} + {metric.value} +
+ ))} +
+
{t('footnote')}
+
+
+ + + + ) +} diff --git a/docs/LOGBOOK.md b/docs/LOGBOOK.md index 25bc97c5..fe8db303 100644 --- a/docs/LOGBOOK.md +++ b/docs/LOGBOOK.md @@ -1,3 +1,29 @@ +## 2026-06-14|AI Agent 活動動畫本地完成 + +**背景**:統帥要求在相關治理頁加入 AI Agent 動畫,讓使用者能直覺看見 OpenClaw、Hermes、NemoTron 正在分工、溝通與產生治理證據;同時不得把工作視窗對話內容顯示到前端頁面。 + +**完成內容**: +- 新增 `AgentActivityConstellation` client component,使用原創抽象視覺呈現 `OpenClaw = 仲裁`、`Hermes = 記憶 / 學習`、`NemoTron = 執行 / 推理` 與中樞訊號匯流。 +- Governance `automation-inventory` 頁新增「AI Agent 協作脈衝」,顯示待辦進度、讀回關卡、人工 gate、正式寫入等既有 snapshot 指標。 +- Governance `agent-market` 頁新增「Agent 市場觀測脈衝」,顯示候選數、可預篩、已阻擋與 Runtime 批准等既有 market snapshot 指標。 +- 視覺參考 NVIDIA Nemotron 官方公開定位的 agentic / throughput / multi-agent execution,以及 Nous Hermes Agent 官方公開定位的 persistent memory / learning loop / skill growth;未使用官方 Logo、商標、圖片或素材。 +- 動畫支援 `prefers-reduced-motion: reduce`,小螢幕改為單欄與兩欄指標,避免文字溢出。 +- 前端只讀取既有 API snapshot 與翻譯 key;不新增後端寫入、不新增 Telegram send、不新增 Bot API、不新增 secret、不新增依賴、不新增 runtime 權限。 + +**本地驗證**: +- JSON parse:`apps/web/messages/zh-TW.json`、`apps/web/messages/en.json` 通過。 +- Web typecheck:`pnpm --filter @awoooi/web typecheck` 通過。 +- Web production build:`NEXT_PUBLIC_API_URL=https://awoooi.wooo.work pnpm --filter @awoooi/web build` 通過,92 個 static pages 生成完成。 +- Guard:`git diff --check`、`doc-secrets-sanity-check.py docs .gitea`、`source-control-owner-response-guard.py --root .`、`security-mirror-progress-guard.py --root .` 全部通過。 +- 本機 browser 預覽 `http://127.0.0.1:3011/zh-TW/governance?tab=automation-inventory` 因本機來源無法載入正式自動化 snapshot,只顯示既有「無法載入自動化盤點快照」狀態;不將此視為 production UI 真相。 +- 本機頁面讀回未出現 `批准!繼續`、`My request for Codex`、`In app browser`、`work_window_transcript`、`raw prompt`、`private reasoning`、`chain-of-thought` 等工作視窗內容。 + +**安全邊界**: +- 本輪只是可視化層與翻譯層整合,不改 OpenClaw / Hermes / NemoTron runtime 分工、不改批准政策、不開啟正式寫入、不送 Telegram、不呼叫 Bot API、不讀 secret、不做 destructive action。 + +**下一步**: +- 推送 Gitea main 後等待 CD;取得 deploy marker 後再做 production browser smoke,確認 `automation-inventory` 與 `agent-market` 皆可見 Agent 活動動畫、水平溢位 `0`、正式寫入仍為 `0`、禁用內部協作片語命中 `0`。 + ## 2026-06-14|P2-136 釋出驗證器預檢關卡本地完成 **背景**:P2-135 已把 release authorization readback gate 正式驗證完成;但授權讀回仍不得被誤讀成 post-release verifier ready、release authorization granted / passed、rollback release passed 或 live apply release passed。P2-136 因此只建立 release verifier preflight gate,把 release authorization readback、rollback release readback、maintenance window readback hold、live-apply release readback hold 與 blocked release readback transition 轉成釋出驗證器預檢視圖,供 operator / owner 後續審核。