feat(TASK-049): add escalation.raised/answered, session.resumed, and agent.interrupted hook events
- escalation.raised fires in the child ctx after queue submit; escalation.answered fires in the parent ctx from the taken request, so both agree on origin envs - escalation.* resolves global hooks ungated: the per-agent global_hooks whitelist never applies to these root-level events - session.resumed fires on the use_session resume leg, inverse of session.started - agent.interrupted replaces agent.completed/failed when the abort signal was ctrl-c'd: top-level bracket (now abort-aware), spawned-subagent result arm (agent__cancel / REPL ctrl-c), and graph agent nodes via the session signal; exit_agent and the shell-exit path stay non-interrupted by passing no signal - document the deliberate non-fire paths (direct prompts, escalation timeout and parent-drop, graph approval nodes)
This commit is contained in:
8 files changed
+468
-41
No files matched your search
+1
-1
@@ -533,7 +533,7 @@ Type ".help" for additional help.
|
||||
let exit_result = self.ctx.write().exit_session();
|
||||
self.ctx
|
||||
.write()
|
||||
.top_level_agent_finished(exit_result.as_ref().err());
|
||||
.top_level_agent_finished(exit_result.as_ref().err(), Some(&self.abort_signal));
|
||||
hooks::drain_pending(EXIT_HOOK_DRAIN_TIMEOUT).await;
|
||||
exit_result
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user