Skip to main content

kintsugi_core/
lib.rs

1//! Kintsugi core library.
2//!
3//! Houses the pieces that must never have surprising I/O side effects: the shared
4//! event types exchanged between interception and the daemon, the deterministic
5//! rule engine, policy and decision memory, and the append-only hash-chained
6//! event log.
7//!
8//! Security spine (see `CLAUDE.md`): rules block, the model only explains. Nothing
9//! in this crate ever lets a model downgrade a rule-based block.
10
11#![forbid(unsafe_code)]
12
13pub mod admin;
14pub mod log;
15pub mod memory;
16pub mod parse;
17pub mod policy;
18pub mod redact;
19pub mod rules;
20pub mod shell;
21pub mod snapshot;
22pub mod types;
23
24pub use log::{ChainStatus, EventLog, Filter, LogError, LoggedEvent, PendingItem, GENESIS_HASH};
25pub use memory::command_hash;
26pub use policy::{adjust_for_policy, Policy, PolicyAction};
27pub use rules::{classify, classify_and_decide, classify_line, decide, RuleMatch};
28pub use snapshot::{capture as capture_snapshot, restore as restore_snapshot, Manifest};
29pub use types::{Class, Decision, Mode, ProposedCommand, Verdict};
30
31pub const VERSION: &str = env!("CARGO_PKG_VERSION");