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//! - [`membrane`]: Membrane's hook wire types (module status, dispatch result, host response).
8//!
9//! The crate holds no policy: a module decides, this crate only parses, bounds and prints.
10
11pub mod dispatch;
12pub mod event;
13pub mod membrane;
14pub mod output;
15pub mod receipt;
16
17pub use dispatch::{
18 compose_reply, dispatch, run, run_with, Decision, DispatchOptions, DispatchResult, FnModule,
19 HookModule, ModuleContext, ModuleOutput, ModuleResult, Status,
20};
21pub use event::{EventKind, HookEvent, ParseError, Wire, STDIN_CAP};
22pub use output::{OutputError, Reply};
23pub use receipt::{
24 marker, new_receipt_id, scan_transcript_tail, tag_context, DeliveryLevel, ObserveModule,
25 Receipt, ReceiptStore,
26};