Event-aware reduction for Hooks v2 command output.
Return the capability entry for event.
Return value when it is composed only of allowlisted sequences.
Allowed tokens are OSC 0/1/2/9/99/777 (BEL or ST terminated)
and bare BEL. Any other escape or control content rejects the entire value.
Reduce ordered handler results into an event-specific decision.
How exit code 2 is interpreted for an event.
How non-JSON stdout is treated on a successful exit.
Structured diagnostic produced while processing a hook.
Supported hook lifecycle events.
A domain hook event with its invocation context.
Decision returned for Notification.
Normalized permission result from hook processing.
Decision returned for PermissionRequest.
Decision returned for PostToolUse.
Decision returned for PreCompact.
Decision returned for PreToolUse.
Decision returned for SessionEnd.
Decision returned for SessionStart.
Decision returned for Stop.
Domain payload for Stop.
background_tasks and session_crons are optional wire-compat fields;
omit or leave empty until they can be sourced.
Decision returned for SubagentStart.
Decision returned for SubagentStop.
Domain payload for SubagentStop.
background_tasks and session_crons are optional wire-compat fields.
Blocking or resumable SubagentStop effects are not applied yet.
Decision returned for UserPromptSubmit.
Permission-request output that allows a tool call.
Event-specific output for PermissionRequest.
Event-specific output for PostToolUse.
Event-specific output for PreToolUse.
Event-specific output for SessionStart.
Event-specific output for Stop.
Event-specific output for SubagentStart.
Event-specific output for SubagentStop.
Event-specific output for UserPromptSubmit.
Compatible hook output with retained extension fields.
Validated output and diagnostics from one command handler.