Bounded input
The hook bridge reads at most 1 MiB of stdin, limits nesting to 32 levels, caps strings, objects and arrays, rejects duplicate keys at every depth and invalid UTF-8, and keeps numbers as precise decimals so two different actions can never share a fingerprint.
IPC v2 framing
| Property | Value |
|---|---|
| Framing | Four-byte big-endian length prefix, one JSON packet |
| Request cap | 1 MiB |
| Reply cap | 16 KiB |
| Invocation nonce | 128-bit system-random, 32 lowercase hex characters |
| Replies | no_override or deny, matching the request ID |
| Budgets | Hook 80 s, model 8 s, review 45 s, output reserve 1 s |
Action fingerprints
A review binds to a SHA-256 digest of the canonical, unmodified tool input together with provider, session, turn, tool-call ID, tool name and working directory. The original input lives only in memory for the duration of the decision.
Host output
No override is an empty stdout with exit code 0. A denial is {"hookSpecificOutput": {"hookEventName": "PreToolUse", "permissionDecision": "deny", "permissionDecisionReason": "…"}}. Diagnostics go to sanitized stderr and never contaminate stdout.
Cloud API
The service calls https://api.tracerook.dev/v1: alpha/enroll, capabilities, usage, analysis, device/rotate, device/revoke and privacy/delete. Requests are strict JSON up to 32 KiB with a client deadline; responses carry a server trace ID and Cache-Control: no-store. The full contract is in cloud/CONTRACT.md.