Expand description
Hook registry - stores callbacks, mints opaque callback_ids, and
renders the hooks field of the initialize control_request payload.
Re-exportsΒ§
use std::marker::PhantomData;πuse std::sync::Arc;πuse super::callback::ErasedCallback;πuse super::callback::ErasedHookCallback;πuse super::callback::HookCallback;πuse forge_primitives::hooks::HookKind;πuse forge_primitives::hooks::inputs::NotificationInput;πuse forge_primitives::hooks::inputs::PermissionRequestInput;πuse forge_primitives::hooks::inputs::PostToolUseFailureInput;πuse forge_primitives::hooks::inputs::PostToolUseInput;πuse forge_primitives::hooks::inputs::PreCompactInput;πuse forge_primitives::hooks::inputs::PreToolUseInput;πuse forge_primitives::hooks::inputs::StopInput;πuse forge_primitives::hooks::inputs::SubagentStartInput;πuse forge_primitives::hooks::inputs::SubagentStopInput;πuse forge_primitives::hooks::inputs::UserPromptSubmitInput;π
StructsΒ§
- Hook
Registry π - Internal bundle mapping opaque ids to erased callbacks, with parallel metadata for the initialize payload.
- Hook
Registry πEntry - One entry describing a minted hook id.
- Hooks
- Registry of hook callbacks. Construct with
HooksBuilder, attach toOptionsBuildervia.hooks(...). - Hooks
Builder - Builder for
Hooks.
ConstantsΒ§
- DEFAULT_
HOOK_ πTIMEOUT_ SECS - Timeout (seconds) emitted per hook matcher when
HooksBuilder::default_timeout_secsis unset. Raised from the CLIβs per-matcher default of 30 so a hook response already written by forge survives a CLI stdin pump wedged on an inlineget_context_usagecomputation.