obsigna-hook

command
v0.18.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 13, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Command obsigna-hook is a short-lived hook binary invoked by agent runtimes (Claude Code, Codex, …) on PostToolUse and PreToolUse events. It reads a JSON frame from stdin, maps it to an emitter.Event, and forwards it to the agent-receipts daemon over a Unix-domain socket.

It is the primary hook entrypoint (ADR-0036). The legacy agent-receipts-hook binary is a thin deprecation shim that forwards here (see ../agent-receipts-hook), so existing runtime configs that invoke the hook by the old name keep working through the rename. Unlike the daemon/mcp/collector binaries, the hook gets no `obsigna hook run` launcher: it is a per-tool-call callback, and wrapping it would tax every event for no benefit (ADR-0034 decision 5).

Exit behaviour:

  • stdin unreadable or runtime not recognised → silent exit 0 (not our concern)
  • runtime identified, any subsequent failure → exit 1 + message to stderr

The strict-error exit-1 behaviour is intentional: once we know which runtime is calling us, a failure to record the receipt is a signal worth surfacing.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL