From ebd96f2971325cfd8a2244a1903c36f8a72a837c Mon Sep 17 00:00:00 2001 From: sheeek Date: Wed, 7 Jan 2026 11:58:04 +0100 Subject: [PATCH] feat(agent-scope): extend resolveAgentConfig to return sandbox and tools Return newly added fields from routing.agents config: - sandbox: agent-specific sandbox configuration - tools: agent-specific tool restrictions This makes per-agent sandbox and tool settings accessible to other parts of the codebase. --- src/agents/agent-scope.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/agents/agent-scope.ts b/src/agents/agent-scope.ts index 34feee5d6..adc5e3789 100644 --- a/src/agents/agent-scope.ts +++ b/src/agents/agent-scope.ts @@ -27,6 +27,16 @@ export function resolveAgentConfig( workspace?: string; agentDir?: string; model?: string; + sandbox?: { + mode?: "off" | "non-main" | "all"; + scope?: "session" | "agent" | "shared"; + perSession?: boolean; + workspaceRoot?: string; + }; + tools?: { + allow?: string[]; + deny?: string[]; + }; } | undefined { const id = normalizeAgentId(agentId); @@ -40,6 +50,8 @@ export function resolveAgentConfig( typeof entry.workspace === "string" ? entry.workspace : undefined, agentDir: typeof entry.agentDir === "string" ? entry.agentDir : undefined, model: typeof entry.model === "string" ? entry.model : undefined, + sandbox: entry.sandbox, + tools: entry.tools, }; }