run_command_handler(
handler: HookHandler,
payload: bytes,
*,
cwd: Path,
default_timeout| Name | Type | Description |
|---|---|---|
handler* | HookHandler | Snapshotted command handler. |
payload* | bytes | Validated JSON sent to stdin. |
cwd* | Path | Working directory inherited from the invocation. |
default_timeout | float | Default: DEFAULT_COMMAND_TIMEOUT_SECONDS |
max_output_bytes | int | Default: MAX_HOOK_OUTPUT_BYTES |
env | dict[str, str] | None | Default: None |
Run one hook command with bounded time and captured output.
Timeout used when the handler has no override.
Maximum retained bytes for each output stream.
Optional environment override. Defaults to a sanitized copy of the process environment.