Expand description
The Claude Code PreToolUse hook protocol: turn a stdin envelope into a
steering decision.
Functions§
- decision
- Build the
PreToolUsedecision JSON for aSteerundermode. - process
- Process a raw
PreToolUsestdin envelope. Returns the decision JSON to print, orNoneto allow silently. TheBashcommand is classified byanalyze; the harness’s ownGrep/Glob/Readcalls are steered from their structured fields. Fail-open: any parse error, an unhandled tool, or a missing field all yieldNone.