feat(governance): 新增 Agent Telegram digest policy
This commit is contained in:
@@ -1,3 +1,26 @@
|
||||
## 2026-06-11|P2-402D AI Agent Telegram action-required digest policy
|
||||
|
||||
**背景**:P2-402C 已把 Renovate / OSV-Scanner / Trivy / Syft / Grype 的採用批准包建立完成,但所有工具安裝、CI 變更、外部查詢與 Telegram 實發都仍未開 gate。本階段接續建立 Telegram action-required digest policy,先定義哪些 AI Agent / 版本 / 工具 / 掃描 / 升級訊號可成為 critical / action-required / failure-only digest 草案,並明確壓制成功洗版。
|
||||
|
||||
**完成內容:**
|
||||
- 新增 `ai_agent_telegram_action_required_digest_policy_v1` schema。
|
||||
- 新增 committed snapshot:`docs/evaluations/ai_agent_telegram_action_required_digest_policy_2026-06-11.json`。
|
||||
- 新增只讀 loader:`apps/api/src/services/ai_agent_telegram_action_required_digest_policy.py`。
|
||||
- 新增治理 API:`GET /api/v1/agents/agent-telegram-action-required-digest-policy`。
|
||||
- 新增 loader / API / direct-send boundary / success-noise suppression / rollup mismatch / transcript redaction 測試。
|
||||
- 新增分析報告:`docs/ai/AI_AGENT_TELEGRAM_ACTION_REQUIRED_DIGEST_POLICY_2026-06-11.md`。
|
||||
- 同步 `AI_AGENT_AUTOMATION_WORKLIST_2026-06-04.md`、`AI_AGENT_PROACTIVE_OPERATIONS_2026-06-11.md` 與 MASTER §3.2.1c。
|
||||
|
||||
**完成度與下一步:**
|
||||
- P2-402D:`100%`。
|
||||
- AI Agent 主動營運與版本生命週期整體:`68%`。
|
||||
- Current task:`P2-402D`。
|
||||
- Next task:`P2-402E` Gitea PR 草案 lane。
|
||||
|
||||
**安全邊界:**
|
||||
- 本波只做 digest policy 與只讀 API。
|
||||
- 未送 Telegram、未寫 Telegram Gateway queue、未改 Alertmanager route / receiver、未寫 AwoooP event、未觸發 workflow、未查外部掃描、未執行 runtime、未讀取或輸出 secret、未顯示工作視窗對話內容。
|
||||
|
||||
## 2026-06-11|P0 Telegram 批准後執行真相鏈止血
|
||||
|
||||
**背景**:使用者指出每個 Telegram 告警批准後都只得到「已記錄觀察,未執行修復」,代表前一輪只補到告警送達與 recurrence 可見,尚未把 approval -> execution -> verifier -> KM / PlayBook 的執行真相鏈閉合。Production status-chain 抽查 `INC-20260611-BB1D9D` 確認舊流程為 `latest_action=OBSERVE`、`completion_status=completed_no_repair`、`repair_status=not_executed`;另一個具備 `kubectl rollout restart` 的事件雖有 execution record,但缺少 `auto_repair_executions` 與 verifier / KM 收斂證據。
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
| 工具 / 服務 / 套件 AI 自動化 | 92% | P0 已完成;P1 服務 / runtime / 監控 / provider / service health / 備份 / DR / 套件與供應鏈只讀基線已完成;P1-007 失敗限定通知合約與前端 redaction 合約已完成;下一主線是 P2-004 依賴 / 供應鏈漂移監控 | 狀態分類、盤點 schema、權限矩陣、靜態盤點種子、只讀 API、UI 骨架、驗證、自動化待辦 schema / 快照 / API / 分組 UI、Backup / DR 目標盤點、準備度矩陣、備份通知政策、Backup / DR 證據 UI、復原演練批准包模板、異地 / escrow 準備度狀態、任務批准邊界、確定性進度彙總、Python 套件 / 供應鏈只讀基線、JS pnpm/npm 只讀基線、Docker build surface 只讀基線、CVE / license / drift 嚴重度政策、定期依賴漂移與外部資料來源檢查設計、依賴升級批准包模板、runtime_surface_inventory_v1 schema / snapshot / API / UI、gitea_workflow_runner_health_v1 schema / snapshot / API / UI、observability_contract_matrix_v1 schema / snapshot / API / UI、ai_provider_route_matrix_v1 schema / snapshot / API / UI、service_health_gap_matrix_v1 schema / snapshot / API / UI、service health evidence cards UI、service_health_failure_notification_policy_v1 schema / snapshot / API / UI 已完成 |
|
||||
| OpenClaw / Hermes / NemoTron 佈建布局 | 45% | P1-401 / P1-402 已完成;仍是只讀 layout 與治理頁顯示,不是 runtime deploy | `ai_agent_deployment_layout_v1` schema、`ai_agent_deployment_layout_2026-06-11.json`、`GET /api/v1/agents/agent-deployment-layout`、治理頁自動化盤點 UI、`AI_AGENT_DEPLOYMENT_LAYOUT_2026-06-11.md` |
|
||||
| OpenClaw / Hermes / NemoTron 主動溝通與學習契約 | 35% | P2-401A 已完成只讀 contract;runtime worker、DB migration、Telegram 實發、SDK / 付費服務仍未開 gate | `ai_agent_communication_learning_contract_v1` schema、`ai_agent_communication_learning_contract_2026-06-11.json`、`GET /api/v1/agents/agent-communication-learning-contract`、MASTER §3.2.1b / §3.4.3 |
|
||||
| AI Agent 主動營運委派與版本生命週期 | 55% | P2-402A / P2-402B / P2-402C 已完成;已建立 repo-only 版本新鮮度快照、工具採用批准包與 API。定期排程、外部版本查詢、工具安裝、CI 變更、套件升級、主機更新、container pull、auto merge、Telegram 實發仍未開 gate | `ai_agent_proactive_operations_contract_v1`、`ai_agent_version_freshness_snapshot_v1`、`ai_agent_tool_adoption_approval_package_v1`、`GET /api/v1/agents/agent-proactive-operations-contract`、`GET /api/v1/agents/agent-version-freshness-snapshot`、`GET /api/v1/agents/agent-tool-adoption-approval-package`、MASTER §3.2.1c |
|
||||
| AI Agent 主動營運委派與版本生命週期 | 68% | P2-402A / P2-402B / P2-402C / P2-402D 已完成;已建立 repo-only 版本新鮮度快照、工具採用批准包、Telegram action-required digest policy 與 API。定期排程、外部版本查詢、工具安裝、CI 變更、套件升級、主機更新、container pull、auto merge、Telegram 實發仍未開 gate | `ai_agent_proactive_operations_contract_v1`、`ai_agent_version_freshness_snapshot_v1`、`ai_agent_tool_adoption_approval_package_v1`、`ai_agent_telegram_action_required_digest_policy_v1`、`GET /api/v1/agents/agent-proactive-operations-contract`、`GET /api/v1/agents/agent-version-freshness-snapshot`、`GET /api/v1/agents/agent-tool-adoption-approval-package`、`GET /api/v1/agents/agent-telegram-action-required-digest-policy`、MASTER §3.2.1c |
|
||||
| 本工作清單與分析報告 | 100% | 已完成 | 本 MD 文件 |
|
||||
|
||||
AI Agent 自動化工作包目前完成度:**92%**。本工作清單文件本身完成度:**100%**。
|
||||
@@ -22,7 +22,7 @@ AI Agent 自動化工作包目前完成度:**92%**。本工作清單文件本
|
||||
|
||||
三 Agent 主動溝通與學習契約目前完成度:**35%**。已完成只讀 schema / snapshot / API / 測試與 MASTER 同步;下一步依優先順序推 `P2-401B` AgentSession / Redis Streams migration 與 worker gate,但在批准前仍不得啟動 runtime loop。
|
||||
|
||||
AI Agent 主動營運委派與版本生命週期目前完成度:**55%**。已完成 12 類版本 domain、24 類可委派能力、5 種 cadence、8 類 MCP、4 類 RAG memory、只讀 API、`P2-402B` repo-only daily version freshness snapshot,以及 `P2-402C` Renovate / OSV-Scanner / Trivy / Syft / Grype 工具採用批准包;下一步是 `P2-402D` Telegram action-required digest policy,外部 registry / package source / host probe / 工具安裝 / CI 變更 / Telegram 實發仍需 gate。
|
||||
AI Agent 主動營運委派與版本生命週期目前完成度:**68%**。已完成 12 類版本 domain、24 類可委派能力、5 種 cadence、8 類 MCP、4 類 RAG memory、只讀 API、`P2-402B` repo-only daily version freshness snapshot、`P2-402C` Renovate / OSV-Scanner / Trivy / Syft / Grype 工具採用批准包,以及 `P2-402D` Telegram action-required digest policy;下一步是 `P2-402E` Gitea PR 草案 lane,外部 registry / package source / host probe / 工具安裝 / CI 變更 / Telegram 實發仍需 gate。
|
||||
|
||||
完成度計算模型:
|
||||
|
||||
@@ -954,7 +954,7 @@ UI:
|
||||
| P2-402A | 完成 | 100 | Hermes + OpenClaw + Nemotron | 定義 AI Agent 主動營運委派與版本生命週期:12 類版本 domain、24 類可委派能力、MCP/RAG/Telegram policy | `ai_agent_proactive_operations_contract_v1` / snapshot / 只讀 API / MASTER 同步 | 只讀;不啟用排程、不升級、不 host update、不 pull image、不 auto merge、不發 Telegram |
|
||||
| P2-402B | 完成 | 100 | Hermes | 建立 repo-only daily version freshness snapshot | `ai_agent_version_freshness_snapshot_v1` / snapshot / 只讀 API / 測試;12 類 repo-only source、5 個 daily step、3 Agent role | 只讀;workflow schedule 未啟用、外部 lookup 未開、不得升級或發 Telegram |
|
||||
| P2-402C | 完成 | 100 | OpenClaw | 建立 Renovate / OSV-Scanner / Trivy / Syft / Grype 工具採用批准包 | `ai_agent_tool_adoption_approval_package_v1` / snapshot / 只讀 API / 測試;5 工具、5 官方來源、4 採用 lane、6 批准欄位 | 只讀;tool install、CI change、external lookup、vulnerability DB、PR、Telegram 全部未啟用 |
|
||||
| P2-402D | 待辦 | 0 | OpenClaw | 建立 Telegram action-required digest policy | critical / action-required / failure-only digest | Telegram Gateway E2E |
|
||||
| P2-402D | 完成 | 100 | OpenClaw | 建立 Telegram action-required digest policy | `ai_agent_telegram_action_required_digest_policy_v1` / snapshot / 只讀 API / 測試;8 條 digest rule、3 個 channel 草案、5 類 trigger category、成功降噪與 redaction policy | 只讀;Telegram send、Gateway queue write、route / receiver change、workflow、runtime 全部未啟用 |
|
||||
| P2-402E | 待辦 | 0 | Hermes | 設計 Gitea PR 草案 lane | grouping、automerge=false、tests、rollback、owner response | bot / branch policy approval |
|
||||
| P2-402F | 待辦 | 0 | OpenClaw | 建立 host OS / K3s / stateful services 版本只讀盤點 | host / K3s / DB / Redis / MinIO / Gitea 版本矩陣 | host readonly probe + maintenance window approval |
|
||||
| P2-402G | 待辦 | 0 | Hermes | 接入 governance UI 顯示可委派能力 | 自主等級、gate、owner、Telegram policy | frontend UI change approval |
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# AI Agent 主動營運委派與版本生命週期分析報告
|
||||
|
||||
> 日期:2026-06-11(台北時間)
|
||||
> 文件定位:P2-402A / P2-402B / P2-402C 只讀契約摘要。權威細節以 MASTER §3.2.1c、`ai_agent_proactive_operations_contract_v1`、`ai_agent_version_freshness_snapshot_v1` 與 `ai_agent_tool_adoption_approval_package_v1` 為準。
|
||||
> 文件定位:P2-402A / P2-402B / P2-402C / P2-402D 只讀契約摘要。權威細節以 MASTER §3.2.1c、`ai_agent_proactive_operations_contract_v1`、`ai_agent_version_freshness_snapshot_v1`、`ai_agent_tool_adoption_approval_package_v1` 與 `ai_agent_telegram_action_required_digest_policy_v1` 為準。
|
||||
|
||||
## 1. 本波完成度
|
||||
|
||||
@@ -10,7 +10,8 @@
|
||||
| 主動營運委派契約 | 100% | 已完成 schema / snapshot / API / 測試 |
|
||||
| Repo-only 版本新鮮度快照 | 100% | P2-402B 已完成 schema / committed snapshot / API / 測試 |
|
||||
| 工具採用批准包 | 100% | P2-402C 已完成 Renovate / OSV-Scanner / Trivy / Syft / Grype schema / committed snapshot / API / 測試 |
|
||||
| 整體主動營運與版本生命週期 | 55% | 已完成架構、repo-only freshness 與工具採用批准包;runtime 排程、工具安裝、CI 變更與更新仍未開 gate |
|
||||
| Telegram action-required digest policy | 100% | P2-402D 已完成 critical / action-required / failure-only digest schema / committed snapshot / API / 測試 |
|
||||
| 整體主動營運與版本生命週期 | 68% | 已完成架構、repo-only freshness、工具採用批准包與 Telegram digest policy;runtime 排程、工具安裝、CI 變更與更新仍未開 gate |
|
||||
|
||||
## 2. 可交給 AI Agent 的工作分類
|
||||
|
||||
@@ -38,6 +39,9 @@
|
||||
| `docs/schemas/ai_agent_tool_adoption_approval_package_v1.schema.json` | 工具採用批准包 schema;工具安裝、CI 變更、外部查詢、漏洞 DB、PR、Telegram 全部預設 false |
|
||||
| `docs/evaluations/ai_agent_tool_adoption_approval_package_2026-06-11.json` | Renovate / OSV-Scanner / Trivy / Syft / Grype 官方來源、採用 lane、批准欄位、rollback plan |
|
||||
| `GET /api/v1/agents/agent-tool-adoption-approval-package` | 只讀 API;不安裝工具、不改 CI、不查外部、不建 PR、不發 Telegram |
|
||||
| `docs/schemas/ai_agent_telegram_action_required_digest_policy_v1.schema.json` | Telegram action-required digest policy schema;direct send、queue write、route / receiver change、workflow、transcript 全部預設 false |
|
||||
| `docs/evaluations/ai_agent_telegram_action_required_digest_policy_2026-06-11.json` | 8 條 digest rule、3 個 channel 草案、5 類 trigger category、成功降噪、redaction、fallback policy |
|
||||
| `GET /api/v1/agents/agent-telegram-action-required-digest-policy` | 只讀 API;不送 Telegram、不寫 queue、不改 route / receiver、不觸發 workflow |
|
||||
|
||||
## 4. P2-402B Repo-only 版本新鮮度快照
|
||||
|
||||
@@ -64,17 +68,26 @@
|
||||
|
||||
P2-402C 的重點是把「哪些工具可被採用、採用前要填哪些批准欄位、風險與 rollback 如何定義」固定成資料契約。它不是工具導入本身;工具安裝、CI workflow、外部 registry / vulnerability DB、Gitea PR、Telegram 實發都維持 blocked。
|
||||
|
||||
## 6. 下一步優先順序
|
||||
## 6. P2-402D Telegram Action-Required Digest Policy
|
||||
|
||||
| 類別 | 決策 | Telegram 邊界 |
|
||||
|---|---|---|
|
||||
| 成功 / 已驗證 / 快照完成 | `suppress_success_noise` | 不即時送 Telegram,只進每日 KM / LOGBOOK 摘要草案 |
|
||||
| 版本來源失敗 / Telegram silence / critical CVE 或 EOL | `draft_failure_escalation_digest` | 只產 failure escalation digest 草案;需 OpenClaw review,不能直發 |
|
||||
| 工具安裝 / CI 變更 / scanner disagreement / no executable repair candidate | `draft_action_required_digest` | 只產 action-required digest 草案;未批准不得寫 Gateway queue |
|
||||
|
||||
本波把「哪些事情值得通知」和「哪些成功訊息必須壓掉」固定成資料契約。Telegram Gateway queue write、direct send、route / receiver change、AwoooP event write、workflow trigger、runtime execution 仍全部為 false。
|
||||
|
||||
## 7. 下一步優先順序
|
||||
|
||||
| ID | 優先 | 任務 | 關卡 |
|
||||
|---|---|---|---|
|
||||
| P2-402C | 0 | Renovate / OSV-Scanner / Trivy / Syft / Grype 採用批准包 | 已完成,只讀;tool install / CI change 未啟用 |
|
||||
| P2-402D | 1 | Telegram action-required digest policy | Telegram Gateway E2E |
|
||||
| P2-402E | 2 | Gitea PR 草案 lane | bot / branch policy approval |
|
||||
| P2-402F | 3 | host OS / K3s / stateful services 版本只讀盤點 | host probe / maintenance approval |
|
||||
| P2-402G | 4 | governance UI 顯示可委派能力 | frontend UI approval |
|
||||
| P2-402D | 0 | Telegram action-required digest policy | 已完成,只讀;Telegram send / queue write 未啟用 |
|
||||
| P2-402E | 1 | Gitea PR 草案 lane | bot / branch policy approval |
|
||||
| P2-402F | 2 | host OS / K3s / stateful services 版本只讀盤點 | host probe / maintenance approval |
|
||||
| P2-402G | 3 | governance UI 顯示可委派能力 | frontend UI approval |
|
||||
|
||||
## 7. 仍維持 false 的安全邊界
|
||||
## 8. 仍維持 false 的安全邊界
|
||||
|
||||
- `runtime_version_update_allowed=false`
|
||||
- `package_upgrade_allowed=false`
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
# AI Agent Telegram Action-Required Digest Policy 工作報告
|
||||
|
||||
> 日期:2026-06-11(台北時間)
|
||||
> 狀態:P2-402D 已完成;整體 AI Agent 主動營運與版本生命週期完成度 68%。
|
||||
> 邊界:本文件與對應 API 只提供 Telegram digest policy,不送 Telegram、不寫 Telegram Gateway queue、不改 Alertmanager route / receiver、不寫 AwoooP event、不觸發 workflow、不執行 runtime、不讀取 secret、不顯示工作視窗對話內容。
|
||||
|
||||
## 1. 本波完成項目
|
||||
|
||||
| 項目 | 狀態 | 產出 |
|
||||
|---|---|---|
|
||||
| Telegram digest policy schema | 完成 | `docs/schemas/ai_agent_telegram_action_required_digest_policy_v1.schema.json` |
|
||||
| Telegram digest policy snapshot | 完成 | `docs/evaluations/ai_agent_telegram_action_required_digest_policy_2026-06-11.json` |
|
||||
| API loader | 完成 | `apps/api/src/services/ai_agent_telegram_action_required_digest_policy.py` |
|
||||
| 只讀 API | 完成 | `GET /api/v1/agents/agent-telegram-action-required-digest-policy` |
|
||||
| 測試 | 完成 | loader / API / direct-send boundary / success-noise suppression / rollup mismatch / transcript redaction |
|
||||
| 主契約同步 | 完成 | `ai_agent_proactive_operations_contract_v1` 完成度 68%,current `P2-402D`,next `P2-402E` |
|
||||
|
||||
## 2. Digest 規則摘要
|
||||
|
||||
| 決策 | 規則數 | 用途 | 邊界 |
|
||||
|---|---:|---|---|
|
||||
| `suppress_success_noise` | 2 | repo-only freshness 成功、工具批准包完成等成功訊號只進每日摘要 | 不即時 Telegram、不寫 queue |
|
||||
| `draft_failure_escalation_digest` | 3 | version watch source failed、critical CVE / EOL、Telegram delivery silence | 需 OpenClaw review;只產草案 |
|
||||
| `draft_action_required_digest` | 3 | 工具安裝 / CI 變更需批准、scanner disagreement、approval 後沒有可執行修復候選 | 需 evidence ref、owner、approval gate |
|
||||
|
||||
## 3. Agent 分工
|
||||
|
||||
| Agent | 本波可做 | 本波不可做 |
|
||||
|---|---|---|
|
||||
| Hermes | 彙整 repo-only freshness、source failure、工具採用 evidence refs 與每日摘要草案 | 直接發 Telegram、寫 Gateway queue、觸發 workflow |
|
||||
| OpenClaw | 仲裁 critical / action-required / failure-only digest 草案,確認 blast radius、rollback 與 approval gate | 自行批准發送、改 route / receiver、把成功訊息升級為告警 |
|
||||
| NemoTron | 針對 scanner disagreement、AI Agent / model / prompt / tool-call risk 產生離線 replay note | 呼叫付費模型、新增 SDK、開 shadow / canary |
|
||||
|
||||
## 4. 仍維持 false 的邊界
|
||||
|
||||
- `telegram_direct_send_allowed=false`
|
||||
- `telegram_test_message_allowed=false`
|
||||
- `telegram_gateway_queue_write_allowed=false`
|
||||
- `alertmanager_route_change_allowed=false`
|
||||
- `telegram_receiver_change_allowed=false`
|
||||
- `awooop_event_write_allowed=false`
|
||||
- `workflow_trigger_allowed=false`
|
||||
- `external_scan_allowed=false`
|
||||
- `runtime_execution_allowed=false`
|
||||
- `secret_plaintext_allowed=false`
|
||||
- `conversation_transcript_allowed=false`
|
||||
|
||||
## 5. 下一步代辦
|
||||
|
||||
| 優先 | ID | 工作 | 完成標準 |
|
||||
|---:|---|---|---|
|
||||
| 1 | P2-402E | Gitea PR 草案 lane | Renovate grouping、automerge=false、測試要求、rollback、owner response、bot / branch policy approval |
|
||||
| 2 | P2-402F | host OS / K3s / stateful services 版本只讀盤點 | 主機、K3s、PostgreSQL、Redis、MinIO、Harbor、Gitea 只讀版本矩陣 |
|
||||
| 3 | P2-402G | Governance UI 顯示可委派能力 | 前端顯示 autonomy level、gate、owner、Telegram policy,無執行按鈕 |
|
||||
| 4 | 候選池 | Telegram Gateway E2E 批准包 | queue write / send / callback / fallback path 的測試與 rollout gate |
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
| 優先 | ID | 工作 | 完成標準 | 目前狀態 |
|
||||
|---:|---|---|---|---|
|
||||
| 1 | P2-402D | Telegram action-required digest policy | 定義 critical / action-required / failure-only,禁止成功洗版,接 Telegram Gateway E2E gate | 待辦 |
|
||||
| 1 | P2-402D | Telegram action-required digest policy | 定義 critical / action-required / failure-only,禁止成功洗版,接 Telegram Gateway E2E gate | 完成 |
|
||||
| 2 | P2-402E | Gitea PR 草案 lane | Renovate grouping、automerge=false、測試要求、rollback、owner response | 待辦 |
|
||||
| 3 | P2-402F | host OS / K3s / stateful services 版本只讀盤點 | 主機、K3s、PostgreSQL、Redis、MinIO、Harbor、Gitea 只讀版本矩陣 | 待辦 |
|
||||
| 4 | P2-402G | Governance UI 顯示可委派能力 | 前端顯示 autonomy level、gate、owner、Telegram policy,無執行按鈕 | 待辦 |
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
"schema_version": "ai_agent_proactive_operations_contract_v1",
|
||||
"generated_at": "2026-06-11T21:30:00+08:00",
|
||||
"program_status": {
|
||||
"overall_completion_percent": 55,
|
||||
"overall_completion_percent": 68,
|
||||
"current_priority": "P2",
|
||||
"current_task_id": "P2-402C",
|
||||
"next_task_id": "P2-402D",
|
||||
"current_task_id": "P2-402D",
|
||||
"next_task_id": "P2-402E",
|
||||
"read_only_mode": true,
|
||||
"runtime_authority": "contract_only_no_version_or_runtime_update",
|
||||
"status_note": "P2-402C 已建立 Renovate / OSV-Scanner / Trivy / Syft / Grype 工具採用批准包、schema、snapshot、只讀 API 與測試;本波仍不安裝工具、不改 CI、不查外部 registry、不下載漏洞 DB、不建立 PR、不發 Telegram。"
|
||||
"status_note": "P2-402D 已建立 Telegram action-required digest policy、schema、snapshot、只讀 API 與測試;本波仍不送 Telegram、不寫 Gateway queue、不改 Alertmanager route / receiver、不觸發 workflow、不執行 runtime。"
|
||||
},
|
||||
"external_source_evidence": [
|
||||
{
|
||||
@@ -628,16 +628,16 @@
|
||||
"completion_percent": 100,
|
||||
"owner_agent": "OpenClaw",
|
||||
"summary": "建立 Renovate / OSV-Scanner / Trivy / Syft / Grype 工具採用批准包、官方來源 evidence、採用 lane、批准欄位、schema、snapshot、只讀 API 與測試。",
|
||||
"next_gate": "P2-402D_telegram_action_required_digest_policy"
|
||||
"next_gate": "P2-402D_completed"
|
||||
},
|
||||
{
|
||||
"task_id": "P2-402D",
|
||||
"priority": "P2",
|
||||
"status": "planned",
|
||||
"completion_percent": 0,
|
||||
"status": "done",
|
||||
"completion_percent": 100,
|
||||
"owner_agent": "OpenClaw",
|
||||
"summary": "建立 Telegram action-required digest policy,只通知 critical / action-required,不發成功洗版。",
|
||||
"next_gate": "telegram_gateway_e2e_required"
|
||||
"summary": "建立 Telegram action-required digest policy、schema、snapshot、只讀 API 與測試;定義 critical / action-required / failure-only digest 草案、成功降噪、redaction 與 fallback gap 邊界。",
|
||||
"next_gate": "P2-402E_gitea_pr_draft_lane"
|
||||
},
|
||||
{
|
||||
"task_id": "P2-402E",
|
||||
|
||||
@@ -0,0 +1,405 @@
|
||||
{
|
||||
"schema_version": "ai_agent_telegram_action_required_digest_policy_v1",
|
||||
"generated_at": "2026-06-11T23:58:00+08:00",
|
||||
"program_status": {
|
||||
"overall_completion_percent": 68,
|
||||
"current_priority": "P2",
|
||||
"current_task_id": "P2-402D",
|
||||
"next_task_id": "P2-402E",
|
||||
"read_only_mode": true,
|
||||
"runtime_authority": "policy_only_no_telegram_send_or_route_change",
|
||||
"status_note": "P2-402D 建立 Telegram action-required digest policy;本波只定義 critical / action-required / failure-only digest 規則,不送 Telegram、不寫 Gateway queue、不改 Alertmanager route、不改 receiver、不觸發 workflow。"
|
||||
},
|
||||
"source_refs": [
|
||||
"docs/evaluations/ai_agent_proactive_operations_contract_2026-06-11.json",
|
||||
"docs/evaluations/ai_agent_version_freshness_snapshot_2026-06-11.json",
|
||||
"docs/evaluations/ai_agent_tool_adoption_approval_package_2026-06-11.json",
|
||||
"docs/evaluations/service_health_failure_notification_policy_2026-06-05.json",
|
||||
"docs/evaluations/backup_notification_policy_2026-06-04.json",
|
||||
"docs/LOGBOOK.md"
|
||||
],
|
||||
"trigger_categories": [
|
||||
{
|
||||
"category_id": "success_noise",
|
||||
"owner_agent": "Hermes",
|
||||
"policy_intent": "成功、完成、已驗證、只讀快照更新不得即時送 Telegram;只能留在 committed evidence 或日摘要。",
|
||||
"blocked_now": [
|
||||
"成功巡檢即時 Telegram",
|
||||
"成功掃描即時 Telegram",
|
||||
"只讀 snapshot 完成即時 Telegram"
|
||||
]
|
||||
},
|
||||
{
|
||||
"category_id": "version_watch_failure",
|
||||
"owner_agent": "Hermes",
|
||||
"policy_intent": "版本來源連續失敗、資料過期、watch source 失聯時產生 action-required digest 草案。",
|
||||
"blocked_now": [
|
||||
"直接寫 Telegram Gateway queue",
|
||||
"直接送 Bot",
|
||||
"觸發外部 registry lookup"
|
||||
]
|
||||
},
|
||||
{
|
||||
"category_id": "critical_security_or_eol",
|
||||
"owner_agent": "OpenClaw",
|
||||
"policy_intent": "critical CVE、EOL approaching、production incompatibility risk 才可進 failure escalation digest 草案。",
|
||||
"blocked_now": [
|
||||
"下載 vulnerability DB",
|
||||
"掃描 live image",
|
||||
"升級套件或 image"
|
||||
]
|
||||
},
|
||||
{
|
||||
"category_id": "tool_adoption_approval_required",
|
||||
"owner_agent": "OpenClaw",
|
||||
"policy_intent": "Renovate / OSV-Scanner / Trivy / Syft / Grype 採用需要人類批准時,僅產 action-required digest 草案。",
|
||||
"blocked_now": [
|
||||
"安裝工具",
|
||||
"改 CI workflow",
|
||||
"建立 Gitea PR"
|
||||
]
|
||||
},
|
||||
{
|
||||
"category_id": "telegram_delivery_silence",
|
||||
"owner_agent": "OpenClaw",
|
||||
"policy_intent": "Telegram delivery silence、fallback gap、callback failure 屬於告警必到風險,進 failure escalation digest 草案。",
|
||||
"blocked_now": [
|
||||
"直接發測試訊息",
|
||||
"改 receiver",
|
||||
"改 Alertmanager route"
|
||||
]
|
||||
}
|
||||
],
|
||||
"digest_channels": [
|
||||
{
|
||||
"channel_id": "telegram_ops_digest_draft",
|
||||
"purpose": "Telegram action-required / failure-only digest 草案;P2-402D 只定義政策,不送出。",
|
||||
"success_immediate_allowed": false,
|
||||
"direct_send_allowed": false,
|
||||
"queue_write_allowed": false,
|
||||
"requires_telegram_gateway_e2e": true
|
||||
},
|
||||
{
|
||||
"channel_id": "awooop_action_queue_draft",
|
||||
"purpose": "AwoooP action-required queue 草案;本波不寫 event、不建立 operator task。",
|
||||
"success_immediate_allowed": false,
|
||||
"direct_send_allowed": false,
|
||||
"queue_write_allowed": false,
|
||||
"requires_telegram_gateway_e2e": false
|
||||
},
|
||||
{
|
||||
"channel_id": "daily_km_digest_only",
|
||||
"purpose": "成功與資訊性訊號只能進每日 KM / LOGBOOK 摘要草案。",
|
||||
"success_immediate_allowed": false,
|
||||
"direct_send_allowed": false,
|
||||
"queue_write_allowed": false,
|
||||
"requires_telegram_gateway_e2e": false
|
||||
}
|
||||
],
|
||||
"digest_rules": [
|
||||
{
|
||||
"rule_id": "repo_only_freshness_snapshot_success",
|
||||
"category_id": "success_noise",
|
||||
"signal_state": "success",
|
||||
"severity": "info",
|
||||
"decision": "suppress_success_noise",
|
||||
"owner_agent": "Hermes",
|
||||
"required_evidence": [
|
||||
"committed snapshot ref",
|
||||
"rollup counters"
|
||||
],
|
||||
"channels": [
|
||||
"daily_km_digest_only"
|
||||
],
|
||||
"requires_openclaw_review": false,
|
||||
"telegram_direct_send_allowed": false,
|
||||
"next_action": "只寫 LOGBOOK / KM 摘要草案,不送 Telegram。"
|
||||
},
|
||||
{
|
||||
"rule_id": "tool_adoption_package_completed_success",
|
||||
"category_id": "success_noise",
|
||||
"signal_state": "verified",
|
||||
"severity": "info",
|
||||
"decision": "suppress_success_noise",
|
||||
"owner_agent": "Hermes",
|
||||
"required_evidence": [
|
||||
"schema ref",
|
||||
"API verification ref"
|
||||
],
|
||||
"channels": [
|
||||
"daily_km_digest_only"
|
||||
],
|
||||
"requires_openclaw_review": false,
|
||||
"telegram_direct_send_allowed": false,
|
||||
"next_action": "保留 committed evidence,不發成功洗版。"
|
||||
},
|
||||
{
|
||||
"rule_id": "version_watch_source_failed",
|
||||
"category_id": "version_watch_failure",
|
||||
"signal_state": "failed",
|
||||
"severity": "warning",
|
||||
"decision": "draft_failure_escalation_digest",
|
||||
"owner_agent": "Hermes",
|
||||
"required_evidence": [
|
||||
"source_id",
|
||||
"last_success_at",
|
||||
"failure_count",
|
||||
"fallback_source"
|
||||
],
|
||||
"channels": [
|
||||
"telegram_ops_digest_draft",
|
||||
"awooop_action_queue_draft"
|
||||
],
|
||||
"requires_openclaw_review": true,
|
||||
"telegram_direct_send_allowed": false,
|
||||
"next_action": "OpenClaw 確認是否升級為 action-required Telegram digest。"
|
||||
},
|
||||
{
|
||||
"rule_id": "critical_cve_or_eol_requires_owner",
|
||||
"category_id": "critical_security_or_eol",
|
||||
"signal_state": "critical",
|
||||
"severity": "critical",
|
||||
"decision": "draft_failure_escalation_digest",
|
||||
"owner_agent": "OpenClaw",
|
||||
"required_evidence": [
|
||||
"official advisory ref",
|
||||
"affected component",
|
||||
"blast radius",
|
||||
"rollback plan"
|
||||
],
|
||||
"channels": [
|
||||
"telegram_ops_digest_draft",
|
||||
"awooop_action_queue_draft"
|
||||
],
|
||||
"requires_openclaw_review": true,
|
||||
"telegram_direct_send_allowed": false,
|
||||
"next_action": "產生 owner packet 與批准包;未批准不得升級。"
|
||||
},
|
||||
{
|
||||
"rule_id": "telegram_delivery_silence_detected",
|
||||
"category_id": "telegram_delivery_silence",
|
||||
"signal_state": "failed",
|
||||
"severity": "critical",
|
||||
"decision": "draft_failure_escalation_digest",
|
||||
"owner_agent": "OpenClaw",
|
||||
"required_evidence": [
|
||||
"delivery route",
|
||||
"last_successful_send",
|
||||
"fallback path",
|
||||
"failed callback evidence"
|
||||
],
|
||||
"channels": [
|
||||
"telegram_ops_digest_draft",
|
||||
"awooop_action_queue_draft"
|
||||
],
|
||||
"requires_openclaw_review": true,
|
||||
"telegram_direct_send_allowed": false,
|
||||
"next_action": "保留告警必到 fallback 檢查;本波不直接送測試訊息。"
|
||||
},
|
||||
{
|
||||
"rule_id": "tool_install_or_ci_change_needs_approval",
|
||||
"category_id": "tool_adoption_approval_required",
|
||||
"signal_state": "action_required",
|
||||
"severity": "warning",
|
||||
"decision": "draft_action_required_digest",
|
||||
"owner_agent": "OpenClaw",
|
||||
"required_evidence": [
|
||||
"tool_id",
|
||||
"approval_requirements",
|
||||
"secret_storage_plan",
|
||||
"rollback_plan"
|
||||
],
|
||||
"channels": [
|
||||
"telegram_ops_digest_draft",
|
||||
"awooop_action_queue_draft"
|
||||
],
|
||||
"requires_openclaw_review": true,
|
||||
"telegram_direct_send_allowed": false,
|
||||
"next_action": "要求 operator approval id;未批准不得安裝工具或改 CI。"
|
||||
},
|
||||
{
|
||||
"rule_id": "scanner_disagreement_needs_review",
|
||||
"category_id": "tool_adoption_approval_required",
|
||||
"signal_state": "action_required",
|
||||
"severity": "warning",
|
||||
"decision": "draft_action_required_digest",
|
||||
"owner_agent": "NemoTron",
|
||||
"required_evidence": [
|
||||
"scanner_a_ref",
|
||||
"scanner_b_ref",
|
||||
"disagreement_summary",
|
||||
"affected package or image"
|
||||
],
|
||||
"channels": [
|
||||
"telegram_ops_digest_draft"
|
||||
],
|
||||
"requires_openclaw_review": true,
|
||||
"telegram_direct_send_allowed": false,
|
||||
"next_action": "NemoTron 產生離線 replay / assumption note,OpenClaw 仲裁是否 action-required。"
|
||||
},
|
||||
{
|
||||
"rule_id": "no_executable_repair_candidate_after_approval",
|
||||
"category_id": "telegram_delivery_silence",
|
||||
"signal_state": "blocked",
|
||||
"severity": "warning",
|
||||
"decision": "draft_action_required_digest",
|
||||
"owner_agent": "OpenClaw",
|
||||
"required_evidence": [
|
||||
"incident_id",
|
||||
"approval_id",
|
||||
"latest_action",
|
||||
"repair_candidate_gap"
|
||||
],
|
||||
"channels": [
|
||||
"telegram_ops_digest_draft",
|
||||
"awooop_action_queue_draft"
|
||||
],
|
||||
"requires_openclaw_review": true,
|
||||
"telegram_direct_send_allowed": false,
|
||||
"next_action": "標記 no-action / non-executable,避免誤導 operator 以為已執行修復。"
|
||||
}
|
||||
],
|
||||
"message_template_contract": {
|
||||
"required_fields": [
|
||||
"stage",
|
||||
"severity",
|
||||
"target_id",
|
||||
"evidence_ref",
|
||||
"blocked_reason",
|
||||
"next_action",
|
||||
"owner_agent",
|
||||
"approval_gate"
|
||||
],
|
||||
"forbidden_fields": [
|
||||
"secret_value",
|
||||
"token",
|
||||
"authorization_header",
|
||||
"work_window_transcript",
|
||||
"codex_user_message",
|
||||
"prompt_text",
|
||||
"chain_of_thought",
|
||||
"session_id",
|
||||
"browser_context"
|
||||
],
|
||||
"success_message_policy": "成功、完成、已驗證、只讀快照更新不得即時送 Telegram / AwoooP;只能進每日摘要或 LOGBOOK。",
|
||||
"action_required_message_policy": "只允許輸出 evidence ref、blocked reason、next action、owner agent、approval gate;本波不送出。",
|
||||
"failure_message_policy": "只有 failed / blocked / critical 且具備 evidence ref 與 OpenClaw review gate 時,才可成為 failure escalation digest 草案。"
|
||||
},
|
||||
"rate_limit_policy": {
|
||||
"success_policy": "成功巡檢、成功掃描、成功快照不得即時 Telegram 洗版。",
|
||||
"digest_window_minutes": 30,
|
||||
"dedupe_key_fields": [
|
||||
"category_id",
|
||||
"target_id",
|
||||
"evidence_ref",
|
||||
"owner_agent"
|
||||
],
|
||||
"max_digest_items": 10,
|
||||
"fallback_policy": "若 Telegram Gateway 或 callback 失敗,保留 AwoooP / LOGBOOK evidence refs 與 fallback gap,不直接重送 Bot。"
|
||||
},
|
||||
"display_redaction_contract": {
|
||||
"conversation_transcript_display_allowed": false,
|
||||
"redaction_required": true,
|
||||
"allowed_frontend_fields": [
|
||||
"政策規則摘要",
|
||||
"已提交證據參照",
|
||||
"blocked reason",
|
||||
"next action",
|
||||
"owner agent",
|
||||
"approval gate"
|
||||
],
|
||||
"forbidden_frontend_content": [
|
||||
"內部對話內容",
|
||||
"Codex / 使用者訊息逐字稿",
|
||||
"提示詞 / 思考鏈",
|
||||
"工作階段識別碼 / 瀏覽器脈絡",
|
||||
"機密 / 權杖 / 授權標頭"
|
||||
]
|
||||
},
|
||||
"agent_roles": [
|
||||
{
|
||||
"agent_id": "hermes",
|
||||
"digest_responsibility": "彙整 repo-only freshness、source failure、工具採用 evidence refs 與每日摘要草案。",
|
||||
"blocked_now": [
|
||||
"直接發 Telegram",
|
||||
"寫 Telegram Gateway queue",
|
||||
"觸發 workflow"
|
||||
]
|
||||
},
|
||||
{
|
||||
"agent_id": "openclaw",
|
||||
"digest_responsibility": "仲裁 critical / action-required / failure-only digest 草案,確認 blast radius、rollback 與 approval gate。",
|
||||
"blocked_now": [
|
||||
"自行批准 Telegram 發送",
|
||||
"改 route / receiver",
|
||||
"把成功訊息升級為告警"
|
||||
]
|
||||
},
|
||||
{
|
||||
"agent_id": "nemotron",
|
||||
"digest_responsibility": "針對 scanner disagreement、AI Agent / model / prompt / tool-call risk 產生離線 replay note。",
|
||||
"blocked_now": [
|
||||
"呼叫付費模型",
|
||||
"新增 SDK",
|
||||
"開 shadow / canary"
|
||||
]
|
||||
}
|
||||
],
|
||||
"operation_boundaries": {
|
||||
"read_only_policy_allowed": true,
|
||||
"telegram_direct_send_allowed": false,
|
||||
"telegram_test_message_allowed": false,
|
||||
"telegram_gateway_queue_write_allowed": false,
|
||||
"alertmanager_route_change_allowed": false,
|
||||
"telegram_receiver_change_allowed": false,
|
||||
"awooop_event_write_allowed": false,
|
||||
"workflow_trigger_allowed": false,
|
||||
"external_scan_allowed": false,
|
||||
"runtime_execution_allowed": false,
|
||||
"secret_plaintext_allowed": false,
|
||||
"conversation_transcript_allowed": false
|
||||
},
|
||||
"approval_boundaries": {
|
||||
"telegram_digest_send_approved": false,
|
||||
"telegram_gateway_queue_write_approved": false,
|
||||
"telegram_route_change_approved": false,
|
||||
"alertmanager_receiver_change_approved": false,
|
||||
"awooop_event_write_approved": false,
|
||||
"workflow_trigger_approved": false,
|
||||
"runtime_execution_approved": false,
|
||||
"secret_plaintext_approved": false
|
||||
},
|
||||
"rollups": {
|
||||
"rule_count": 8,
|
||||
"channel_count": 3,
|
||||
"trigger_category_count": 5,
|
||||
"by_decision": {
|
||||
"suppress_success_noise": 2,
|
||||
"draft_failure_escalation_digest": 3,
|
||||
"draft_action_required_digest": 3
|
||||
},
|
||||
"action_required_rule_ids": [
|
||||
"tool_install_or_ci_change_needs_approval",
|
||||
"scanner_disagreement_needs_review",
|
||||
"no_executable_repair_candidate_after_approval"
|
||||
],
|
||||
"failure_escalation_rule_ids": [
|
||||
"version_watch_source_failed",
|
||||
"critical_cve_or_eol_requires_owner",
|
||||
"telegram_delivery_silence_detected"
|
||||
],
|
||||
"suppressed_success_rule_ids": [
|
||||
"repo_only_freshness_snapshot_success",
|
||||
"tool_adoption_package_completed_success"
|
||||
],
|
||||
"telegram_direct_send_allowed_count": 0,
|
||||
"telegram_gateway_queue_write_allowed_count": 0,
|
||||
"route_change_allowed_count": 0,
|
||||
"conversation_transcript_allowed_count": 0,
|
||||
"next_approval_task_ids": [
|
||||
"P2-402E",
|
||||
"P2-402F",
|
||||
"P2-402G"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,503 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://awoooi.wooo.work/schemas/ai_agent_telegram_action_required_digest_policy_v1.schema.json",
|
||||
"title": "AI Agent Telegram Action Required Digest Policy v1",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"schema_version",
|
||||
"generated_at",
|
||||
"program_status",
|
||||
"source_refs",
|
||||
"trigger_categories",
|
||||
"digest_channels",
|
||||
"digest_rules",
|
||||
"message_template_contract",
|
||||
"rate_limit_policy",
|
||||
"display_redaction_contract",
|
||||
"agent_roles",
|
||||
"operation_boundaries",
|
||||
"approval_boundaries",
|
||||
"rollups"
|
||||
],
|
||||
"properties": {
|
||||
"schema_version": {
|
||||
"const": "ai_agent_telegram_action_required_digest_policy_v1"
|
||||
},
|
||||
"generated_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"program_status": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"overall_completion_percent",
|
||||
"current_priority",
|
||||
"current_task_id",
|
||||
"next_task_id",
|
||||
"read_only_mode",
|
||||
"runtime_authority",
|
||||
"status_note"
|
||||
],
|
||||
"properties": {
|
||||
"overall_completion_percent": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 100
|
||||
},
|
||||
"current_priority": {
|
||||
"type": "string"
|
||||
},
|
||||
"current_task_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"next_task_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"read_only_mode": {
|
||||
"const": true
|
||||
},
|
||||
"runtime_authority": {
|
||||
"const": "policy_only_no_telegram_send_or_route_change"
|
||||
},
|
||||
"status_note": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"source_refs": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"trigger_categories": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"category_id",
|
||||
"owner_agent",
|
||||
"policy_intent",
|
||||
"blocked_now"
|
||||
],
|
||||
"properties": {
|
||||
"category_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"owner_agent": {
|
||||
"type": "string"
|
||||
},
|
||||
"policy_intent": {
|
||||
"type": "string"
|
||||
},
|
||||
"blocked_now": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"digest_channels": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"channel_id",
|
||||
"purpose",
|
||||
"success_immediate_allowed",
|
||||
"direct_send_allowed",
|
||||
"queue_write_allowed",
|
||||
"requires_telegram_gateway_e2e"
|
||||
],
|
||||
"properties": {
|
||||
"channel_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"purpose": {
|
||||
"type": "string"
|
||||
},
|
||||
"success_immediate_allowed": {
|
||||
"const": false
|
||||
},
|
||||
"direct_send_allowed": {
|
||||
"const": false
|
||||
},
|
||||
"queue_write_allowed": {
|
||||
"const": false
|
||||
},
|
||||
"requires_telegram_gateway_e2e": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"digest_rules": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"rule_id",
|
||||
"category_id",
|
||||
"signal_state",
|
||||
"severity",
|
||||
"decision",
|
||||
"owner_agent",
|
||||
"required_evidence",
|
||||
"channels",
|
||||
"requires_openclaw_review",
|
||||
"telegram_direct_send_allowed",
|
||||
"next_action"
|
||||
],
|
||||
"properties": {
|
||||
"rule_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"category_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"signal_state": {
|
||||
"type": "string"
|
||||
},
|
||||
"severity": {
|
||||
"type": "string"
|
||||
},
|
||||
"decision": {
|
||||
"enum": [
|
||||
"suppress_success_noise",
|
||||
"draft_action_required_digest",
|
||||
"draft_failure_escalation_digest",
|
||||
"hold_for_owner_packet"
|
||||
]
|
||||
},
|
||||
"owner_agent": {
|
||||
"type": "string"
|
||||
},
|
||||
"required_evidence": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"channels": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"requires_openclaw_review": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"telegram_direct_send_allowed": {
|
||||
"const": false
|
||||
},
|
||||
"next_action": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"message_template_contract": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"required_fields",
|
||||
"forbidden_fields",
|
||||
"success_message_policy",
|
||||
"action_required_message_policy",
|
||||
"failure_message_policy"
|
||||
],
|
||||
"properties": {
|
||||
"required_fields": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"forbidden_fields": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"success_message_policy": {
|
||||
"type": "string"
|
||||
},
|
||||
"action_required_message_policy": {
|
||||
"type": "string"
|
||||
},
|
||||
"failure_message_policy": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"rate_limit_policy": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"success_policy",
|
||||
"digest_window_minutes",
|
||||
"dedupe_key_fields",
|
||||
"max_digest_items",
|
||||
"fallback_policy"
|
||||
],
|
||||
"properties": {
|
||||
"success_policy": {
|
||||
"type": "string"
|
||||
},
|
||||
"digest_window_minutes": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"dedupe_key_fields": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"max_digest_items": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"fallback_policy": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"display_redaction_contract": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"conversation_transcript_display_allowed",
|
||||
"redaction_required",
|
||||
"allowed_frontend_fields",
|
||||
"forbidden_frontend_content"
|
||||
],
|
||||
"properties": {
|
||||
"conversation_transcript_display_allowed": {
|
||||
"const": false
|
||||
},
|
||||
"redaction_required": {
|
||||
"const": true
|
||||
},
|
||||
"allowed_frontend_fields": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"forbidden_frontend_content": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"agent_roles": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"agent_id",
|
||||
"digest_responsibility",
|
||||
"blocked_now"
|
||||
],
|
||||
"properties": {
|
||||
"agent_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"digest_responsibility": {
|
||||
"type": "string"
|
||||
},
|
||||
"blocked_now": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"operation_boundaries": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"read_only_policy_allowed",
|
||||
"telegram_direct_send_allowed",
|
||||
"telegram_test_message_allowed",
|
||||
"telegram_gateway_queue_write_allowed",
|
||||
"alertmanager_route_change_allowed",
|
||||
"telegram_receiver_change_allowed",
|
||||
"awooop_event_write_allowed",
|
||||
"workflow_trigger_allowed",
|
||||
"external_scan_allowed",
|
||||
"runtime_execution_allowed",
|
||||
"secret_plaintext_allowed",
|
||||
"conversation_transcript_allowed"
|
||||
],
|
||||
"properties": {
|
||||
"read_only_policy_allowed": {
|
||||
"const": true
|
||||
},
|
||||
"telegram_direct_send_allowed": {
|
||||
"const": false
|
||||
},
|
||||
"telegram_test_message_allowed": {
|
||||
"const": false
|
||||
},
|
||||
"telegram_gateway_queue_write_allowed": {
|
||||
"const": false
|
||||
},
|
||||
"alertmanager_route_change_allowed": {
|
||||
"const": false
|
||||
},
|
||||
"telegram_receiver_change_allowed": {
|
||||
"const": false
|
||||
},
|
||||
"awooop_event_write_allowed": {
|
||||
"const": false
|
||||
},
|
||||
"workflow_trigger_allowed": {
|
||||
"const": false
|
||||
},
|
||||
"external_scan_allowed": {
|
||||
"const": false
|
||||
},
|
||||
"runtime_execution_allowed": {
|
||||
"const": false
|
||||
},
|
||||
"secret_plaintext_allowed": {
|
||||
"const": false
|
||||
},
|
||||
"conversation_transcript_allowed": {
|
||||
"const": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"approval_boundaries": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"telegram_digest_send_approved",
|
||||
"telegram_gateway_queue_write_approved",
|
||||
"telegram_route_change_approved",
|
||||
"alertmanager_receiver_change_approved",
|
||||
"awooop_event_write_approved",
|
||||
"workflow_trigger_approved",
|
||||
"runtime_execution_approved",
|
||||
"secret_plaintext_approved"
|
||||
],
|
||||
"properties": {
|
||||
"telegram_digest_send_approved": {
|
||||
"const": false
|
||||
},
|
||||
"telegram_gateway_queue_write_approved": {
|
||||
"const": false
|
||||
},
|
||||
"telegram_route_change_approved": {
|
||||
"const": false
|
||||
},
|
||||
"alertmanager_receiver_change_approved": {
|
||||
"const": false
|
||||
},
|
||||
"awooop_event_write_approved": {
|
||||
"const": false
|
||||
},
|
||||
"workflow_trigger_approved": {
|
||||
"const": false
|
||||
},
|
||||
"runtime_execution_approved": {
|
||||
"const": false
|
||||
},
|
||||
"secret_plaintext_approved": {
|
||||
"const": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"rollups": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"rule_count",
|
||||
"channel_count",
|
||||
"trigger_category_count",
|
||||
"by_decision",
|
||||
"action_required_rule_ids",
|
||||
"failure_escalation_rule_ids",
|
||||
"suppressed_success_rule_ids",
|
||||
"telegram_direct_send_allowed_count",
|
||||
"telegram_gateway_queue_write_allowed_count",
|
||||
"route_change_allowed_count",
|
||||
"conversation_transcript_allowed_count",
|
||||
"next_approval_task_ids"
|
||||
],
|
||||
"properties": {
|
||||
"rule_count": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
},
|
||||
"channel_count": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
},
|
||||
"trigger_category_count": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
},
|
||||
"by_decision": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
"action_required_rule_ids": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"failure_escalation_rule_ids": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"suppressed_success_rule_ids": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"telegram_direct_send_allowed_count": {
|
||||
"const": 0
|
||||
},
|
||||
"telegram_gateway_queue_write_allowed_count": {
|
||||
"const": 0
|
||||
},
|
||||
"route_change_allowed_count": {
|
||||
"const": 0
|
||||
},
|
||||
"conversation_transcript_allowed_count": {
|
||||
"const": 0
|
||||
},
|
||||
"next_approval_task_ids": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -670,7 +670,7 @@ Repo / registry / release notes / K8s / host / observability / backup evidence
|
||||
| 檔案 / API | 用途 |
|
||||
|---|---|
|
||||
| `docs/schemas/ai_agent_proactive_operations_contract_v1.schema.json` | 主動營運委派、版本生命週期、MCP、RAG、Telegram policy、approval boundary 契約 |
|
||||
| `docs/evaluations/ai_agent_proactive_operations_contract_2026-06-11.json` | 12 類版本 domain、24 類可委派能力、5 種 cadence、8 類 MCP、4 類 RAG memory;完成度 `55%` |
|
||||
| `docs/evaluations/ai_agent_proactive_operations_contract_2026-06-11.json` | 12 類版本 domain、24 類可委派能力、5 種 cadence、8 類 MCP、4 類 RAG memory;完成度 `68%` |
|
||||
| `apps/api/src/services/ai_agent_proactive_operations_contract.py` | 只讀 loader;強制 runtime update / package upgrade / host upgrade / workflow schedule / auto merge / Telegram direct send 全部 false |
|
||||
| `GET /api/v1/agents/agent-proactive-operations-contract` | 治理 API;只回傳 committed snapshot,不啟用排程、不升級、不呼叫付費服務 |
|
||||
| `docs/schemas/ai_agent_version_freshness_snapshot_v1.schema.json` | P2-402B repo-only 版本新鮮度 schema;鎖定 schedule / external lookup / upgrade / Telegram / PR / host probe 全部 false |
|
||||
@@ -679,13 +679,16 @@ Repo / registry / release notes / K8s / host / observability / backup evidence
|
||||
| `docs/schemas/ai_agent_tool_adoption_approval_package_v1.schema.json` | P2-402C 工具採用批准包 schema;鎖定 tool install / CI change / external lookup / vulnerability DB / PR / Telegram 全部 false |
|
||||
| `docs/evaluations/ai_agent_tool_adoption_approval_package_2026-06-11.json` | P2-402C committed snapshot:Renovate / OSV-Scanner / Trivy / Syft / Grype 官方來源、採用 lane、批准欄位與 rollback gate |
|
||||
| `GET /api/v1/agents/agent-tool-adoption-approval-package` | 只讀 API;只回傳工具採用批准包,不安裝工具、不改 CI、不查外部、不建 PR、不發 Telegram |
|
||||
| `docs/schemas/ai_agent_telegram_action_required_digest_policy_v1.schema.json` | P2-402D Telegram action-required digest policy schema;鎖定 direct send / Gateway queue write / route change / receiver change / workflow / transcript 全部 false |
|
||||
| `docs/evaluations/ai_agent_telegram_action_required_digest_policy_2026-06-11.json` | P2-402D committed snapshot:8 條 digest rule、3 個 channel 草案、5 類 trigger category、成功降噪、failure-only 與 redaction policy |
|
||||
| `GET /api/v1/agents/agent-telegram-action-required-digest-policy` | 只讀 API;只回傳 digest policy,不送 Telegram、不寫 queue、不改 route / receiver、不觸發 workflow |
|
||||
|
||||
**採用順序:**
|
||||
|
||||
1. 先做 repo-only daily freshness:manifest / lockfile / Dockerfile / K8s YAML / runbook / snapshot。✅ P2-402B 已建立 committed snapshot/API;每日排程仍未授權。
|
||||
2. 再評估 external primary source weekly watch:Renovate、OSV-Scanner、Trivy、Syft、Grype、Kubernetes skew policy、Docker Scout。✅ P2-402C 已建立工具採用批准包;工具安裝、CI 變更、外部查詢仍未授權。
|
||||
3. 建立 Telegram action-required digest policy,先定義 critical / action-required / failure-only 通知門檻,禁止成功洗版。下一步 P2-402D。
|
||||
4. 再進 Gitea PR 草案 lane:grouping、automerge=false、tests、rollback、owner response。
|
||||
3. 建立 Telegram action-required digest policy,先定義 critical / action-required / failure-only 通知門檻,禁止成功洗版。✅ P2-402D 已建立 policy snapshot/API;Telegram 實發與 queue write 仍未授權。
|
||||
4. 再進 Gitea PR 草案 lane:grouping、automerge=false、tests、rollback、owner response。下一步 P2-402E。
|
||||
5. 最後才進人工批准後的 dry-run / smoke / canary / production rollout。
|
||||
|
||||
#### 3.2.2 核心缺口與災難場景
|
||||
@@ -1323,6 +1326,7 @@ Repo / registry / release notes / K8s / host / observability / backup evidence
|
||||
| 主動營運委派與版本生命週期契約 | `docs/evaluations/ai_agent_proactive_operations_contract_2026-06-11.json` + `GET /api/v1/agents/agent-proactive-operations-contract` | 先固定 12 類版本 domain、24 類可委派能力、MCP/RAG/Telegram 邊界;不啟用排程、不自動升版 | L4×D2 / L7×D4 / L6×D6 |
|
||||
| Repo-only 版本新鮮度快照 | `docs/evaluations/ai_agent_version_freshness_snapshot_2026-06-11.json` + `GET /api/v1/agents/agent-version-freshness-snapshot` | P2-402B:讓 Hermes 可每日產生 repo-only freshness evidence packet;目前只讀 API,不啟用 schedule、不查外部、不升級 | L4×D2 / L7×D4 / L6×D6 |
|
||||
| 工具採用批准包 | `docs/evaluations/ai_agent_tool_adoption_approval_package_2026-06-11.json` + `GET /api/v1/agents/agent-tool-adoption-approval-package` | P2-402C:讓 OpenClaw / Hermes / NemoTron 用官方來源評估 Renovate / OSV-Scanner / Trivy / Syft / Grype;目前只讀 API,不安裝工具、不改 CI、不查外部、不建 PR、不發 Telegram | L4×D2 / L7×D4 / L6×D6 |
|
||||
| Telegram action-required digest policy | `docs/evaluations/ai_agent_telegram_action_required_digest_policy_2026-06-11.json` + `GET /api/v1/agents/agent-telegram-action-required-digest-policy` | P2-402D:讓 OpenClaw / Hermes / NemoTron 先定義 critical / action-required / failure-only digest 與成功降噪;目前只讀 API,不送 Telegram、不寫 queue、不改 route / receiver | L4×D2 / L7×D4 / L6×D6 |
|
||||
|
||||
**退出條件(量化)**
|
||||
|
||||
@@ -1706,6 +1710,12 @@ Phase 6 完成後
|
||||
- 更新 `ai_agent_proactive_operations_contract_2026-06-11.json`:整體完成度 `55%`,current task `P2-402C`,next task `P2-402D`。
|
||||
- 本波仍不安裝工具、不改 CI、不查外部 registry、不下載 vulnerability DB、不升級套件、不寫 lockfile、不 build/pull image、不建立 Gitea PR、不 auto merge、不發 Telegram;P2-402D 才建立 Telegram action-required digest policy。
|
||||
|
||||
### 2026-06-11 23:58 (台北) — §3.2 / §5 — 完成 P2-402D Telegram action-required digest policy — 回應統帥要求告警搭配 Telegram Bot 但先禁止直發與成功洗版
|
||||
|
||||
- 新增 `ai_agent_telegram_action_required_digest_policy_v1` schema / committed snapshot / loader / API / 測試,定義 8 條 digest rule、3 個 channel 草案、5 類 trigger category、message redaction、dedupe / rate-limit 與 fallback policy。
|
||||
- 更新 `ai_agent_proactive_operations_contract_2026-06-11.json`:整體完成度 `68%`,current task `P2-402D`,next task `P2-402E`。
|
||||
- 本波仍不送 Telegram、不寫 Telegram Gateway queue、不改 Alertmanager route / receiver、不寫 AwoooP event、不觸發 workflow、不查外部掃描、不執行 runtime、不讀取或輸出 secret、不回傳工作視窗對話內容;P2-402E 才設計 Gitea PR 草案 lane。
|
||||
|
||||
### 2026-04-15 (台北) — 全檔 — 建立 v2 骨架,§0/§1 完成 — 統帥批准「單 MASTER + 4 道閘門」結構
|
||||
|
||||
- 從 v1(plans/2026-04-15-MASTER-ai-autonomous-flywheel.md)繼承核心發現
|
||||
|
||||
Reference in New Issue
Block a user