Small helpers for building Codex hook guards against upstream hook schemas.
Project description
codex-hookkit
Small helpers for building Codex hook guards against upstream Codex hook schemas.
This package intentionally starts small:
- vendored snapshots of
openai/codexgenerated hook schemas - stdin parsing for Codex hook payloads
- JSON-schema validation helpers
- allow / deny output builders
- a minimal command guard CLI
Install
uv add codex-hookkit
CLI
Use codex-hookkit guard as a Codex hook command. It reads one hook payload from
stdin, validates it against the vendored upstream schema, and exits:
0for allowed payloads2with a stderr reason for denied payloads
codex-hookkit guard --schema pre-tool-use
Python API
from codex_hookkit import HookPayload, SecretPolicy, deny
payload = HookPayload.from_stdin(schema="pre-tool-use")
decision = SecretPolicy.default().evaluate(payload)
if decision.denied:
raise SystemExit(deny.stderr_exit(decision.reason))
JSON output helpers are also available for Codex hook contracts that consume structured output.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file codex_hookkit-0.0.2.tar.gz.
File metadata
- Download URL: codex_hookkit-0.0.2.tar.gz
- Upload date:
- Size: 9.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e6b7dcb7a49e5f7f8981c226f23755df48ce312865016e86ecfd4ce5601c5b80
|
|
| MD5 |
0725799bd6cdcffbd7f203311e0920c5
|
|
| BLAKE2b-256 |
9090d9eb1a402b86745b6e1a08671f42f5155cee0d7000f35c08dadd5efb62a3
|
File details
Details for the file codex_hookkit-0.0.2-py3-none-any.whl.
File metadata
- Download URL: codex_hookkit-0.0.2-py3-none-any.whl
- Upload date:
- Size: 23.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
200aeae7a83a181b1c26626d84634f21fcf9d0b4994f0d61ea4fc2b2f00f64cb
|
|
| MD5 |
3e5ca2301703af32cf842e1b3e74ea1c
|
|
| BLAKE2b-256 |
c2a4b52992399710fc3573f151c60ad30171018d7c7259efbb9757ab190ed38b
|