pub type Hooks = BTreeMap<HookEvent, Vec<HookMatcher>>;Expand description
hooks: for each HookEvent, its matcher groups.
Claude Code runs every group whose matcher matches the event, and the
hooks of all matching groups in parallel. Across settings layers the
groups of an event add up (see merge_values);
an identical handler defined in two files runs once. An event name
Claude Code doesn’t know is skipped with a warning; this crate keeps it as
HookEvent::Other.
- Default: unset, so no hooks run.
- Scope: any settings file. With
allowManagedHooksOnlyset in managed settings, only managed hooks run;disableAllHooksturns all of them off.
Docs: hooks,
hooks reference.
Aliased Type§
pub struct Hooks { /* private fields */ }