refactor(athena): rename session_handoff to switch_agent to avoid confusion with /handoff command

Rename across all layers to eliminate naming ambiguity:
- Tool: session_handoff → switch_agent
- Hook: agent-handoff → agent-switch
- Feature: agent-handoff/ → agent-switch/
- Types: SessionHandoffArgs → SwitchAgentArgs, PendingHandoff → PendingSwitch
- Functions: setPendingHandoff → setPendingSwitch, consumePendingHandoff → consumePendingSwitch

/handoff = inter-session context summary (existing command)
switch_agent = intra-session active agent change (our new tool)
This commit is contained in:
ismeth
2026-02-13 13:18:07 +01:00
committed by YeonGyu-Kim
parent 7db0f110ee
commit 84185490f9
22 changed files with 139 additions and 139 deletions
+1 -1
View File
@@ -261,7 +261,7 @@ export function createEventHandler(args: {
await runEventHookSafely("compactionTodoPreserver", hooks.compactionTodoPreserver?.event, input);
await runEventHookSafely("writeExistingFileGuard", hooks.writeExistingFileGuard?.event, input);
await runEventHookSafely("atlasHook", hooks.atlasHook?.handler, input);
await runEventHookSafely("agentHandoffHook", hooks.agentHandoffHook?.event, input);
await runEventHookSafely("agentSwitchHook", hooks.agentSwitchHook?.event, input);
await runEventHookSafely("autoSlashCommand", hooks.autoSlashCommand?.event, input);
};
@@ -9,7 +9,7 @@ import {
createCompactionContextInjector,
createCompactionTodoPreserverHook,
createAtlasHook,
createAgentHandoffHook,
createAgentSwitchHook,
} from "../../hooks"
import { safeCreateHook } from "../../shared/safe-create-hook"
import { createUnstableAgentBabysitter } from "../unstable-agent-babysitter"
@@ -22,7 +22,7 @@ export type ContinuationHooks = {
unstableAgentBabysitter: ReturnType<typeof createUnstableAgentBabysitter> | null
backgroundNotificationHook: ReturnType<typeof createBackgroundNotificationHook> | null
atlasHook: ReturnType<typeof createAtlasHook> | null
agentHandoffHook: ReturnType<typeof createAgentHandoffHook> | null
agentSwitchHook: ReturnType<typeof createAgentSwitchHook> | null
}
type SessionRecovery = {
@@ -118,8 +118,8 @@ export function createContinuationHooks(args: {
}))
: null
const agentHandoffHook = isHookEnabled("agent-handoff")
? safeHook("agent-handoff", () => createAgentHandoffHook(ctx))
const agentSwitchHook = isHookEnabled("agent-switch")
? safeHook("agent-switch", () => createAgentSwitchHook(ctx))
: null
return {
@@ -130,6 +130,6 @@ export function createContinuationHooks(args: {
unstableAgentBabysitter,
backgroundNotificationHook,
atlasHook,
agentHandoffHook,
agentSwitchHook,
}
}
+2 -2
View File
@@ -14,7 +14,7 @@ import {
createBackgroundTools,
createCallOmoAgent,
createAthenaCouncilTool,
createSessionHandoffTool,
createSwitchAgentTool,
createLookAt,
createSkillMcpTool,
createSkillTool,
@@ -275,7 +275,7 @@ export function createToolRegistry(args: {
...backgroundTools,
call_omo_agent: callOmoAgent,
athena_council: athenaCouncilTool,
session_handoff: createSessionHandoffTool(),
switch_agent: createSwitchAgentTool(),
...(lookAt ? { look_at: lookAt } : {}),
task: delegateTask,
skill_mcp: skillMcpTool,