hook

module
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

README

obsigna-hook

Short-lived hook binary for Agent Receipts. Invoked by agent runtimes on PostToolUse events — reads a JSON frame from stdin, maps it to an audit event, and forwards it to agent-receipts-daemon over a Unix-domain socket. It exits 0 silently when the frame is unreadable or the runtime isn't recognised; once the runtime is identified, a failure to record the receipt exits 1 with a stderr message (surfacing a broken audit pipeline rather than dropping receipts). It never pauses or modifies the tool call.

Renamed from agent-receipts-hook (ADR-0036). The old agent-receipts-hook binary still ships as a thin deprecation shim that forwards to obsigna-hook, so existing runtime hook configs keep working — point new configs at obsigna-hook. The Homebrew formula name is unchanged for now and installs both binaries.

Install

brew install agent-receipts/tap/agent-receipts-hook
# or
go install github.com/agent-receipts/ar/hook/cmd/obsigna-hook@latest

Requires agent-receipts-daemon to be running to capture events.

Claude Code setup

In your Claude Code settings (~/.claude/settings.json):

{
  "hooks": {
    "PostToolUse": [
      {
        "matcher": "",
        "hooks": [
          {
            "type": "command",
            "command": "obsigna-hook"
          }
        ]
      }
    ]
  }
}

Supported runtimes

Runtime Detection Format flag
Claude Code CLAUDE_SESSION_ID env var --format claude-code

Auto-detection runs when --format is unset. Use --format to force a specific format.

License

Apache-2.0 — see LICENSE.

Directories

Path Synopsis
cmd
agent-receipts-hook command
Command agent-receipts-hook is the deprecation shim for the renamed obsigna-hook binary (ADR-0036).
Command agent-receipts-hook is the deprecation shim for the renamed obsigna-hook binary (ADR-0036).
obsigna-hook command
Command obsigna-hook is a short-lived hook binary invoked by agent runtimes (Claude Code, Codex, …) on PostToolUse and PreToolUse events.
Command obsigna-hook is a short-lived hook binary invoked by agent runtimes (Claude Code, Codex, …) on PostToolUse and PreToolUse events.

Jump to

Keyboard shortcuts

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