agent-receipts-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: 6 Imported by: 0

Documentation

Overview

Command agent-receipts-hook is the deprecation shim for the renamed obsigna-hook binary (ADR-0036). The hook is now its own primary binary, obsigna-hook. This shim preserves the old agent-receipts-hook entrypoint — every flag is identical — by replacing its own process image with obsigna-hook via syscall.Exec, forwarding argv and the environment unchanged.

The shim is load-bearing, not cosmetic: agent runtimes (Claude Code and others) invoke the hook by path from their settings (e.g. a PostToolUse "command": "agent-receipts-hook"), so the shim is what keeps every existing configuration working through the rename until users repoint at obsigna-hook.

syscall.Exec (not exec.Command) keeps the shim transparent: the hook is a short-lived process that reads stdin and forwards one event. Replacing the image preserves the inherited stdin/stdout/stderr and the exit status of obsigna-hook, so the runtime sees exactly what it would have seen invoking obsigna-hook directly — and avoids forking a second process per tool call. The trade-off is a platform restriction to where syscall.Exec exists (darwin, linux) — the only release targets. The exec adds a transitional per-event exec on the old path; users drop it by pointing their config at obsigna-hook.

This file must remain a thin shim: it deliberately does not import the hook's emitter wiring or re-implement its surface. The entrypoint-guard test in cmd/obsigna-hook asserts that, so agent-receipts-hook can never be reintroduced as a primary entrypoint.

Jump to

Keyboard shortcuts

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