From 2258c009e9051261b771312a811d257024152457 Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Tue, 28 Apr 2026 10:47:31 +0900 Subject: [PATCH] feat(plugin-handlers): wire team-mode into agent, command and tool config handlers --- src/plugin-handlers/agent-config-handler.ts | 1 + src/plugin-handlers/command-config-handler.ts | 1 + src/plugin-handlers/tool-config-handler.test.ts | 14 ++++++++++++++ src/plugin-handlers/tool-config-handler.ts | 1 + 4 files changed, 17 insertions(+) diff --git a/src/plugin-handlers/agent-config-handler.ts b/src/plugin-handlers/agent-config-handler.ts index cbcbdd647..f4fcc8533 100644 --- a/src/plugin-handlers/agent-config-handler.ts +++ b/src/plugin-handlers/agent-config-handler.ts @@ -172,6 +172,7 @@ export async function applyAgentConfig(params: { disabledSkills, useTaskSystem, disableOmoEnv, + params.pluginConfig.team_mode?.enabled ?? false, ); const disabledAgentNames = new Set( diff --git a/src/plugin-handlers/command-config-handler.ts b/src/plugin-handlers/command-config-handler.ts index 471e4df52..b6dda6178 100644 --- a/src/plugin-handlers/command-config-handler.ts +++ b/src/plugin-handlers/command-config-handler.ts @@ -35,6 +35,7 @@ export async function applyCommandConfig(params: { }): Promise { const builtinCommands = loadBuiltinCommands(params.pluginConfig.disabled_commands, { useRegisteredAgents: true, + teamModeEnabled: params.pluginConfig.team_mode?.enabled ?? false, }); const systemCommands = (params.config.command as Record) ?? {}; diff --git a/src/plugin-handlers/tool-config-handler.test.ts b/src/plugin-handlers/tool-config-handler.test.ts index e6cb1e222..7344b48e2 100644 --- a/src/plugin-handlers/tool-config-handler.test.ts +++ b/src/plugin-handlers/tool-config-handler.test.ts @@ -265,6 +265,20 @@ describe("applyToolConfig", () => { expect(agent.permission["task_*"]).toBe("allow") expect(agent.permission.teammate).toBe("allow") }) + + it("#then should allow teammate for hephaestus", () => { + // given + const params = createParams({ agents: ["hephaestus"] }) + + // when + applyToolConfig(params) + + // then + const agent = params.agentResult.hephaestus as { + permission: Record + } + expect(agent.permission.teammate).toBe("allow") + }) }) describe("#given disabled_tools includes 'question'", () => { diff --git a/src/plugin-handlers/tool-config-handler.ts b/src/plugin-handlers/tool-config-handler.ts index dae34fda6..f1139f75f 100644 --- a/src/plugin-handlers/tool-config-handler.ts +++ b/src/plugin-handlers/tool-config-handler.ts @@ -97,6 +97,7 @@ export function applyToolConfig(params: { call_omo_agent: "deny", task: "allow", question: questionPermission, + teammate: "allow", ...denyTodoTools, }; }