feat(athena): add athena to switch-agent and call-omo-agent allowed lists

This commit is contained in:
ismeth
2026-03-02 22:10:25 +01:00
committed by YeonGyu-Kim
parent cee2baf421
commit e01742c8b2
4 changed files with 40 additions and 1 deletions
+1
View File
@@ -6,6 +6,7 @@ export const ALLOWED_AGENTS = [
"metis", "metis",
"momus", "momus",
"multimodal-looker", "multimodal-looker",
"athena",
] as const ] 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). export const CALL_OMO_AGENT_DESCRIPTION = `Spawn explore/librarian agent or custom agents. run_in_background REQUIRED (true=async with task_id, false=sync).
+20
View File
@@ -511,6 +511,26 @@ describe("createCallOmoAgent", () => {
//#then //#then
expect(result).toContain("background_task.maxDepth=3") 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 {} export {}
+18
View File
@@ -187,4 +187,22 @@ describe("switch_agent tool", () => {
expect(result).toContain("direct-id-123") expect(result).toContain("direct-id-123")
expect(promptedSessions[0]!.path.id).toBe("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")
})
}) })
+1 -1
View File
@@ -8,7 +8,7 @@ const DESCRIPTION =
"with the provided context as its starting prompt. Use this to route work to another agent " + "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." "(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 = { type SessionClient = {
session: { session: {