From e01742c8b234ec4c6d7adf639f96f26f2ddf16c5 Mon Sep 17 00:00:00 2001 From: ismeth Date: Mon, 2 Mar 2026 22:10:25 +0100 Subject: [PATCH] feat(athena): add athena to switch-agent and call-omo-agent allowed lists --- src/tools/call-omo-agent/constants.ts | 1 + src/tools/call-omo-agent/tools.test.ts | 20 ++++++++++++++++++++ src/tools/switch-agent/tools.test.ts | 18 ++++++++++++++++++ src/tools/switch-agent/tools.ts | 2 +- 4 files changed, 40 insertions(+), 1 deletion(-) diff --git a/src/tools/call-omo-agent/constants.ts b/src/tools/call-omo-agent/constants.ts index 823313f2f..831c112e6 100644 --- a/src/tools/call-omo-agent/constants.ts +++ b/src/tools/call-omo-agent/constants.ts @@ -6,6 +6,7 @@ export const ALLOWED_AGENTS = [ "metis", "momus", "multimodal-looker", + "athena", ] as const export const CALL_OMO_AGENT_DESCRIPTION = `Spawn explore/librarian agent or custom agents. run_in_background REQUIRED (true=async with task_id, false=sync). diff --git a/src/tools/call-omo-agent/tools.test.ts b/src/tools/call-omo-agent/tools.test.ts index 17491cb82..657170fce 100644 --- a/src/tools/call-omo-agent/tools.test.ts +++ b/src/tools/call-omo-agent/tools.test.ts @@ -511,6 +511,26 @@ describe("createCallOmoAgent", () => { //#then expect(result).toContain("background_task.maxDepth=3") }) + + test("should accept athena as a valid agent type", async () => { + //#given + const toolDef = createCallOmoAgent(mockCtx, mockBackgroundManager, []) + const executeFunc = toolDef.execute as Function + + //#when + const result = await executeFunc( + { + description: "Test", + prompt: "Test prompt", + subagent_type: "athena", + run_in_background: true, + }, + { sessionID: "test", messageID: "msg", agent: "test", abort: new AbortController().signal } + ) + + //#then + expect(result).not.toContain("Invalid agent type") + }) }) export {} diff --git a/src/tools/switch-agent/tools.test.ts b/src/tools/switch-agent/tools.test.ts index 4dee970ee..534551d18 100644 --- a/src/tools/switch-agent/tools.test.ts +++ b/src/tools/switch-agent/tools.test.ts @@ -187,4 +187,22 @@ describe("switch_agent tool", () => { expect(result).toContain("direct-id-123") expect(promptedSessions[0]!.path.id).toBe("direct-id-123") }) + + //#given valid athena switch args + //#when execute is called + //#then it creates a new session and prompts with the athena agent + test("should create session and prompt for athena switch", async () => { + const tool = createToolWithMockClient() + const result = await tool.execute( + { agent: "athena", context: "Run council analysis on the architecture decision" }, + toolContext + ) + + expect(result).toContain("athena") + expect(result).toContain("new-session-abc") + expect(createdSessions).toHaveLength(1) + expect(promptedSessions).toHaveLength(1) + expect(promptedSessions[0]!.path.id).toBe("new-session-abc") + expect(promptedSessions[0]!.body.parts[0]!.text).toBe("Run council analysis on the architecture decision") + }) }) diff --git a/src/tools/switch-agent/tools.ts b/src/tools/switch-agent/tools.ts index 9eebabe89..608b808d9 100644 --- a/src/tools/switch-agent/tools.ts +++ b/src/tools/switch-agent/tools.ts @@ -8,7 +8,7 @@ const DESCRIPTION = "with the provided context as its starting prompt. Use this to route work to another agent " + "(e.g., Atlas for fixes, Prometheus for planning). The switch executes when the current agent's turn completes." -const ALLOWED_AGENTS = new Set(["atlas", "prometheus", "sisyphus", "hephaestus"]) +const ALLOWED_AGENTS = new Set(["atlas", "prometheus", "sisyphus", "hephaestus", "athena"]) type SessionClient = { session: {