feat: global sisyphus_task deny with orchestrator exceptions

- Add sisyphus_task: deny to global config.permission
- Add sisyphus_task: allow exception for orchestrator-sisyphus, Sisyphus, and Prometheus (Planner)
- Ensures only orchestrator agents can spawn sisyphus_task subagents
This commit is contained in:
justsisyphus 2026-01-16 17:13:08 +09:00
parent 83cbc56709
commit f1cdb3bce1

View File

@ -303,21 +303,22 @@ export function createConfigHandler(deps: ConfigHandlerDeps) {
} }
if (agentResult["orchestrator-sisyphus"]) { if (agentResult["orchestrator-sisyphus"]) {
const agent = agentResult["orchestrator-sisyphus"] as AgentWithPermission; const agent = agentResult["orchestrator-sisyphus"] as AgentWithPermission;
agent.permission = { ...agent.permission, task: "deny", call_omo_agent: "deny" }; agent.permission = { ...agent.permission, task: "deny", call_omo_agent: "deny", sisyphus_task: "allow" };
} }
if (agentResult.Sisyphus) { if (agentResult.Sisyphus) {
const agent = agentResult.Sisyphus as AgentWithPermission; const agent = agentResult.Sisyphus as AgentWithPermission;
agent.permission = { ...agent.permission, call_omo_agent: "deny" }; agent.permission = { ...agent.permission, call_omo_agent: "deny", sisyphus_task: "allow" };
} }
if (agentResult["Prometheus (Planner)"]) { if (agentResult["Prometheus (Planner)"]) {
const agent = agentResult["Prometheus (Planner)"] as AgentWithPermission; const agent = agentResult["Prometheus (Planner)"] as AgentWithPermission;
agent.permission = { ...agent.permission, call_omo_agent: "deny" }; agent.permission = { ...agent.permission, call_omo_agent: "deny", sisyphus_task: "allow" };
} }
config.permission = { config.permission = {
...(config.permission as Record<string, unknown>), ...(config.permission as Record<string, unknown>),
webfetch: "allow", webfetch: "allow",
external_directory: "allow", external_directory: "allow",
sisyphus_task: "deny",
}; };
const mcpResult = (pluginConfig.claude_code?.mcp ?? true) const mcpResult = (pluginConfig.claude_code?.mcp ?? true)