Part VI · CLI · Plate 04

cns hook

On this page

Listing 6.4.1   Synopsis

cns hook <organ> <event> -- <cmd...>

Description

Run <cmd> as a harness/git hook, append one vitals.v1 row to .cns/vitals.jsonl, pass stdout/stderr/stdin through, and exit 0 regardless (fail-open for the harness). stdout is buffered until <cmd> exits (same bytes, no live streaming). CNS_HOOK_NONCE, if set, is recorded in the row so a caller can find its own row. The child gets CNS_UPSTREAM_LOG: one line per inference request (thalamus, refused, or direct <addr>); the row then carries thalamus_calls, thalamus_refused and direct_calls.