feat(athena): add session handoff with Question tool for Atlas/Prometheus routing

After Athena synthesizes council findings, presents user with Question tool
TUI to choose: Atlas (fix now), Prometheus (create plan), or no action.
On selection, session_handoff tool stores intent + calls updateSessionAgent(),
then agent-handoff hook fires on session.idle to switch the main session's
active agent via promptAsync with synthesis context.
This commit is contained in:
ismeth
2026-02-13 12:57:16 +01:00
committed by YeonGyu-Kim
parent 84c91cb8d7
commit 7db0f110ee
16 changed files with 281 additions and 12 deletions
+1
View File
@@ -261,6 +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("autoSlashCommand", hooks.autoSlashCommand?.event, input);
};
@@ -9,6 +9,7 @@ import {
createCompactionContextInjector,
createCompactionTodoPreserverHook,
createAtlasHook,
createAgentHandoffHook,
} from "../../hooks"
import { safeCreateHook } from "../../shared/safe-create-hook"
import { createUnstableAgentBabysitter } from "../unstable-agent-babysitter"
@@ -21,6 +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
}
type SessionRecovery = {
@@ -116,6 +118,10 @@ export function createContinuationHooks(args: {
}))
: null
const agentHandoffHook = isHookEnabled("agent-handoff")
? safeHook("agent-handoff", () => createAgentHandoffHook(ctx))
: null
return {
stopContinuationGuard,
compactionContextInjector,
@@ -124,5 +130,6 @@ export function createContinuationHooks(args: {
unstableAgentBabysitter,
backgroundNotificationHook,
atlasHook,
agentHandoffHook,
}
}
+2
View File
@@ -14,6 +14,7 @@ import {
createBackgroundTools,
createCallOmoAgent,
createAthenaCouncilTool,
createSessionHandoffTool,
createLookAt,
createSkillMcpTool,
createSkillTool,
@@ -274,6 +275,7 @@ export function createToolRegistry(args: {
...backgroundTools,
call_omo_agent: callOmoAgent,
athena_council: athenaCouncilTool,
session_handoff: createSessionHandoffTool(),
...(lookAt ? { look_at: lookAt } : {}),
task: delegateTask,
skill_mcp: skillMcpTool,