feat(athena): add athena to switch-agent and call-omo-agent allowed lists
This commit is contained in:
@@ -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).
|
||||
|
||||
@@ -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 {}
|
||||
|
||||
@@ -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")
|
||||
})
|
||||
})
|
||||
|
||||
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user