edda_bridge_codex/lib.rs
1//! Codex CLI bridge for edda.
2//!
3//! Handles the subset of Codex hook events that carry equivalent semantics to
4//! Claude Code's events:
5//!
6//! | Codex event | edda action |
7//! |---------------------|---------------------------------------------------------|
8//! | SessionStart | inject doctrine + hot pack + workspace context |
9//! | UserPromptSubmit | inject lightweight workspace context (peer diff) |
10//! | PreToolUse | evaluate L3 rules against the pending command |
11//! | PostToolUse | detect decision signals, emit nudges |
12//! | SessionEnd / Stop | auto-digest, cleanup |
13//! | SubagentStart/Stop | write / clear sub-agent heartbeat |
14//! | PermissionRequest | Codex-only: L3 can decline permission at the gate |
15//!
16//! Design rule: this crate reuses `edda-bridge-claude`'s shared machinery
17//! (peers, pack, digest, render, state, postmortem hooks) — none of that is
18//! Claude-specific. Only the parse/dispatch/admin layer is bridge-specific.
19
20mod admin;
21mod dispatch;
22mod parse;
23
24pub use admin::{doctor, install, uninstall};
25pub use dispatch::{hook_entrypoint_from_stdin, HookResult};