The runtime dispatch shapes. A bare HookProgram (no role) is a Bash
command gate; the role-keyed hooks carry their own shape. The runtime uses this
to pick the right decode + output (a gate exits 2, an inject prints
additionalContext, a react runs its classified command). prompt-gate and
stop-gate are gates on non-tool events — they decode the prompt / stop signal
and emit a Decision like the tool gates.
The runtime dispatch shapes. A bare HookProgram (no
role) is a Bash command gate; the role-keyed hooks carry their own shape. The runtime uses this to pick the right decode + output (a gate exits 2, an inject printsadditionalContext, a react runs its classified command).prompt-gateandstop-gateare gates on non-tool events — they decode the prompt / stop signal and emit aDecisionlike the tool gates.