Expand description
Hook system.
Hooks allow user-defined actions to run at specific points in the agent lifecycle:
PreToolUse— before a tool executes (can block/modify)PostToolUse— after a tool completesSessionStart— when a session beginsSessionStop— when a session endsUserPromptSubmit— when the user submits input
Hooks can be shell commands, HTTP endpoints, or prompt templates, configured in the settings file.
Re-exports§
pub use crate::config::HookAction;pub use crate::config::HookDefinition;pub use crate::config::HookEvent;
Structs§
- Hook
Registry - Hook registry that stores and dispatches hooks.
- Hook
Result - Result of executing a hook.