fix(athena): remove athena primary from delegation list and switch_agent targets
Athena primary should not be routable via switch_agent or appear in the delegation table. Only athena-junior (subagent) remains delegatable via task(). - Remove athena from ALLOWED_AGENTS and DESCRIPTION in switch-agent tool - Remove ATHENA_PROMPT_METADATA from agentMetadata, agent.ts, barrel export - Update switch-agent test to assert athena rejection - Remove ATHENA_PROMPT_METADATA test block
This commit is contained in:
@@ -188,21 +188,19 @@ describe("switch_agent tool", () => {
|
||||
expect(promptedSessions[0]!.path.id).toBe("direct-id-123")
|
||||
})
|
||||
|
||||
//#given valid athena switch args
|
||||
//#given athena switch args (athena is not a valid switch target)
|
||||
//#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 () => {
|
||||
//#then it rejects the switch since athena primary is not in ALLOWED_AGENTS
|
||||
test("should reject athena as switch target", async () => {
|
||||
const tool = createToolWithMockClient()
|
||||
const result = await tool.execute(
|
||||
{ agent: "athena", context: "Run council analysis on the architecture decision" },
|
||||
toolContext
|
||||
)
|
||||
|
||||
expect(result).toContain("Invalid switch target")
|
||||
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")
|
||||
expect(createdSessions).toHaveLength(0)
|
||||
expect(promptedSessions).toHaveLength(0)
|
||||
})
|
||||
})
|
||||
|
||||
@@ -8,9 +8,9 @@ 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.\n\n" +
|
||||
"Permanent one-way handoff. Use ONLY when you're the wrong agent for the overall job, NEVER for subtasks (use task()). " +
|
||||
"Targets: atlas, prometheus, sisyphus, hephaestus, athena (multi-model council)."
|
||||
"Targets: atlas, prometheus, sisyphus, hephaestus."
|
||||
|
||||
const ALLOWED_AGENTS = new Set(["atlas", "prometheus", "sisyphus", "hephaestus", "athena"])
|
||||
const ALLOWED_AGENTS = new Set(["atlas", "prometheus", "sisyphus", "hephaestus"])
|
||||
|
||||
type SessionClient = {
|
||||
session: {
|
||||
|
||||
Reference in New Issue
Block a user