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.0.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.0-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hook_bridge_runner-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 3f822d5ee3c1dcb2ef2e6374b05cec12bb9475a110d0b37f6d0b0386c97f86fd
MD5 8f0902b06e25bff0f3e8f3ef4a979e0a
BLAKE2b-256 ceff5a697efd644f315bbcd5fffb81fcf67082e2c0bdc152184c78f530747abb

See more details on using hashes here.

Provenance

The following attestation bundles were made for hook_bridge_runner-0.1.0.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.0-py3-none-any.whl.

File metadata

File hashes

Hashes for hook_bridge_runner-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2d2036473c1de013deffaaf074c9998f0f75b81688b51beefe90e2cc38d44b4b
MD5 3a2c05646c09c19b05aecc21250145e7
BLAKE2b-256 64158239c06b9b0105fc92b2b17fe62d0fb2ee9444c0b7d7e1c14152cb2202ab

See more details on using hashes here.

Provenance

The following attestation bundles were made for hook_bridge_runner-0.1.0-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