Skip to main content

The hook-bridge runner: translates a Harness's native hook protocol to and from the generic Contract, running each Hook as a subprocess.

Project description

hook-bridge

The runner: the CLI a Harness actually invokes. It sits between a Harness and a Hook — see CONTEXT.md and ADR-0003 for how bytes cross the process edge.

hook-bridge --harness <harness> <hook>
  • Reads the harness's native event JSON from stdin.
  • Peeks its native event name and selects the Codec registered for (harness, native event).
  • decodes it into the generic wire Context JSON and spawns the Hook (uv run <hook>), writing that JSON to its stdin — exactly what the SDK's hook.run() already reads.
  • Reads the generic wire Verdict JSON the Hook printed to stdout, encodes it into the harness's native response body + exit code, and writes both back.

v1 ships only the stub harness Adapter, which exists to prove this plumbing end-to-end. The real claude-code and codex Adapters are sibling work (#12).

Dependency-free by design (#7: no runner→SDK dependency) — the runner works in plain JSON-shaped dicts, never the SDK's typed Context/Verdict.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hook_bridge_runner-0.1.1.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hook_bridge_runner-0.1.1-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file hook_bridge_runner-0.1.1.tar.gz.

File metadata

  • Download URL: hook_bridge_runner-0.1.1.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for hook_bridge_runner-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a6e1cd7c50adc6e26c988b8c4b2de936d3ca32d77160bf4401e4a32e0f144b5c
MD5 62345ef892441c1d8c07ff779af416ec
BLAKE2b-256 c739208eace69b4fe4b458615a1c090f8686257407a189b627f7ce7d64948da4

See more details on using hashes here.

Provenance

The following attestation bundles were made for hook_bridge_runner-0.1.1.tar.gz:

Publisher: publish-runner.yml on jamessawle/hook-bridge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hook_bridge_runner-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for hook_bridge_runner-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 480f63a7eda5f7f06ae4fbe5d57573b0e6a0ee9a5ea372ed16d9891294c091d8
MD5 b9aa8a062e430ac20a3a65c15df644ce
BLAKE2b-256 a112272ef115d9d08623d7602e375cb04dc9397da68cbe355fd30e5f56d87cb4

See more details on using hashes here.

Provenance

The following attestation bundles were made for hook_bridge_runner-0.1.1-py3-none-any.whl:

Publisher: publish-runner.yml on jamessawle/hook-bridge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page