diff --git a/docs/plans/2026-04-07-openclaw-config-draft.md b/docs/plans/2026-04-07-openclaw-config-draft.md index 384710d..4a1353e 100644 --- a/docs/plans/2026-04-07-openclaw-config-draft.md +++ b/docs/plans/2026-04-07-openclaw-config-draft.md @@ -423,6 +423,7 @@ Schema 核對後,每個 `agents.list[]` entry: 雖然已接近可套用,但仍需先審查: - `skills` 是否過窄 - `tools.deny` 是否卡住實際流程 -- `subagents.allowAgents` 空陣列在 runtime 是否符合預期 +- `subagents.allowAgents: []` 只代表不能跨 agent 派工,不等於完全禁用 `sessions_spawn` +- 若要真正禁止下游 agent 再往下派,需搭配 per-agent `tools.deny: ["sessions_spawn"]` - 是否還要細化 per-agent tool policy diff --git a/docs/plans/2026-04-08-openclaw-config-near-apply-candidate-patch-notes.md b/docs/plans/2026-04-08-openclaw-config-near-apply-candidate-patch-notes.md index a630b92..4c1549b 100644 --- a/docs/plans/2026-04-08-openclaw-config-near-apply-candidate-patch-notes.md +++ b/docs/plans/2026-04-08-openclaw-config-near-apply-candidate-patch-notes.md @@ -17,7 +17,7 @@ - 讓每個 agent 在 UI / prompt 注入層面有更清楚的身份 - 讓每個 agent 只看到與自己任務相稱的 skill 範圍 - 用 per-agent `tools.deny` 先保守收掉不應直接使用的高影響工具 -- 用 `subagents.allowAgents` 表達 Eve 可以派下游、下游原則上不再往下派 +- 用 `subagents.allowAgents` 表達 Eve 可以跨 agent 派工,並搭配 deny `sessions_spawn` 限制下游不再往下派 ## 2. 為什麼先用 `tools.deny` 這一版先採保守 deny: @@ -25,6 +25,7 @@ - `gateway` - `cron` - `nodes` +- `sessions_spawn`(僅下游 agent) 原因: - 這些工具最容易越過 Eve 的單一對上窗口 @@ -33,7 +34,12 @@ ## 3. `subagents.allowAgents` 的角色 - `coder`:允許派給 5 個下游 agent -- 其餘 5 個 agent:先設為空陣列,表達原則上不再往下派 +- 其餘 5 個 agent:設為空陣列,代表**不允許跨 agent 派工** + +重要語義: +- 依官方文件,`subagents.allowAgents` 的預設是「僅同一 agent」 +- 因此空陣列 **不是完全禁止 `sessions_spawn`**,而是不能指定其他 agent id +- 若要真正禁止下游 agent 再往下派,還必須搭配 per-agent `tools.deny: ["sessions_spawn"]` 注意: 這有助於把制度往 config 靠攏,但仍不等於完整的程序正義。真正的「只能回 Eve、不可越權完成」仍需 prompt / workflow 一起約束。 @@ -49,7 +55,7 @@ ## 5. 套用前最後仍需確認的點 1. `tools.deny` 是否會與實際流程衝突 2. `skills` allowlist 是否過窄,導致 agent 看不到必要 skill -3. `subagents.allowAgents: []` 是否在實際 schema / runtime 下等價於完全禁止往下派 +3. deny `sessions_spawn` 是否會影響任何預期中的下游自動化流程 4. 是否還要補 per-agent `tools.exec` / `tools.elevated` / `tools.fs` 細節 ## 6. 建議定位 diff --git a/docs/plans/2026-04-08-openclaw-config-near-apply-candidate-patch.json b/docs/plans/2026-04-08-openclaw-config-near-apply-candidate-patch.json index a61f962..ed9752b 100644 --- a/docs/plans/2026-04-08-openclaw-config-near-apply-candidate-patch.json +++ b/docs/plans/2026-04-08-openclaw-config-near-apply-candidate-patch.json @@ -65,7 +65,8 @@ "message", "gateway", "cron", - "nodes" + "nodes", + "sessions_spawn" ] }, "subagents": { @@ -99,7 +100,8 @@ "message", "gateway", "cron", - "nodes" + "nodes", + "sessions_spawn" ] }, "subagents": { @@ -134,7 +136,8 @@ "message", "gateway", "cron", - "nodes" + "nodes", + "sessions_spawn" ] }, "subagents": { @@ -169,7 +172,8 @@ "message", "gateway", "cron", - "nodes" + "nodes", + "sessions_spawn" ] }, "subagents": { @@ -203,7 +207,8 @@ "message", "gateway", "cron", - "nodes" + "nodes", + "sessions_spawn" ] }, "subagents": {