Reference Beta 0.1.0-beta.1

Events & IPC

Bounded input, normalized events, exact fingerprints and host output.

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

PropertyValue
FramingFour-byte big-endian length prefix, one JSON packet
Request cap1 MiB
Reply cap16 KiB
Invocation nonce128-bit system-random, 32 lowercase hex characters
Repliesno_override or deny, matching the request ID
BudgetsHook 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.