Files
reporting-governance-plugin/docs/plans/2026-04-08-openclaw-config-near-apply-candidate-patch-notes.md

64 lines
2.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 2026-04-08 OpenClaw Near-Apply Candidate Patch Notes
這份 near-apply candidate patch 是在前一版 candidate patch 基礎上,再補進第一輪值得落進 config 的進階欄位:
- `identity`
- `skills`
- per-agent `tools.deny`
- `subagents.allowAgents`
## 1. 設計策略
本版仍維持:
- 每個 agent 獨立 workspace
- `tools.sessions.visibility = "all"`
- `tools.agentToAgent.enabled = true`
- `tools.agentToAgent.allow = 6-agent allowlist`
但額外補強:
- 讓每個 agent 在 UI / prompt 注入層面有更清楚的身份
- 讓每個 agent 只看到與自己任務相稱的 skill 範圍
- 用 per-agent `tools.deny` 先保守收掉不應直接使用的高影響工具
-`subagents.allowAgents` 表達 Eve 可以跨 agent 派工,並搭配 deny `sessions_spawn` 限制下游不再往下派
## 2. 為什麼先用 `tools.deny`
這一版先採保守 deny
- `message`
- `gateway`
- `cron`
- `nodes`
- `sessions_spawn`(僅下游 agent
原因:
- 這些工具最容易越過 Eve 的單一對上窗口
- 也容易導致對外發送、改 config、排程、裝置互動等高影響動作
- 先收緊,再視實際需要局部放開,比一開始放太寬安全
## 3. `subagents.allowAgents` 的角色
- `coder`:允許派給 5 個下游 agent
- 其餘 5 個 agent設為空陣列代表**不允許跨 agent 派工**
重要語義:
- 依官方文件,`subagents.allowAgents` 的預設是「僅同一 agent」
- 因此空陣列 **不是完全禁止 `sessions_spawn`**,而是不能指定其他 agent id
- 若要真正禁止下游 agent 再往下派,還必須搭配 per-agent `tools.deny: ["sessions_spawn"]`
注意:
這有助於把制度往 config 靠攏,但仍不等於完整的程序正義。真正的「只能回 Eve、不可越權完成」仍需 prompt / workflow 一起約束。
## 4. `skills` 的策略
這一版只放最小、角色對應的 allowlist
- `prompt-optimizer`:偏任務整理
- `reviewer`:偏驗證與 code review
- `research`:偏搜尋與資料整理
- `engineering`:偏測試、驗證、技術交付
- `ops`:偏健康檢查與維運研究
## 5. 套用前最後仍需確認的點
1. `tools.deny` 是否會與實際流程衝突
2. `skills` allowlist 是否過窄,導致 agent 看不到必要 skill
3. deny `sessions_spawn` 是否會影響任何預期中的下游自動化流程
4. 是否還要補 per-agent `tools.exec` / `tools.elevated` / `tools.fs` 細節
## 6. 建議定位
- 這份檔案已比前一版更接近可套用
- 但仍應先做人工審查,不建議直接拿去 patch live gateway