rightkit_hooks/lib.rs
1//! Shared hook runtime for Claude Code and Codex: the native pair of `@rightkit/hooks`.
2//!
3//! - [`event`]: typed payload parsing ([`HookEvent`], [`Wire`], [`EventKind`]);
4//! - [`output`]: exact per-event output shapes ([`Reply`]);
5//! - [`dispatch`]: modules under per-module and total deadlines, exit 0 on any failure;
6//! - [`receipt`]: `emitted` and `observed` delivery receipts and the transcript-scan module.
7//!
8//! The crate holds no policy: a module decides, this crate only parses, bounds and prints.
9
10pub mod dispatch;
11pub mod event;
12pub mod output;
13pub mod receipt;
14
15pub use dispatch::{
16 compose_reply, dispatch, run, run_with, Decision, DispatchOptions, DispatchResult, FnModule,
17 HookModule, ModuleContext, ModuleOutput, ModuleResult, Status,
18};
19pub use event::{EventKind, HookEvent, ParseError, Wire, STDIN_CAP};
20pub use output::{OutputError, Reply};
21pub use receipt::{
22 marker, new_receipt_id, scan_transcript_tail, tag_context, DeliveryLevel, ObserveModule,
23 Receipt, ReceiptStore,
24};