polyc-eventlog-model 2026.8.3

Storage-agnostic event, integrity, trust, and navigation model for Polychrome journals.
//! Storage-agnostic vocabulary and verification for Polychrome journals.
//!
//! This crate deliberately contains no storage runtime, opener, mutable host,
//! or filesystem handle. Policy and read-plane crates can therefore compile
//! against [`Event`], trust metadata, integrity verification, and navigation
//! without acquiring the capability to open durable journal authority.

pub mod event;
pub mod integrity;
pub mod nav;
pub mod taint;

pub use event::{Event, EventCfg};
pub use integrity::{
    IntegrityError, MMR_SIGNED_ROOT_KIND, extend_and_sign, rebuild_from_events, verify_replay,
    verify_replay_with_trust,
};
pub use taint::{
    GrantedCapabilities, TrifectaLegs, TrustTag, any_untrusted, any_untrusted_excluding,
    trifecta_legs,
};

/// A replay that may stop before the partition tail at a caller byte budget.
#[derive(Debug, Clone)]
pub struct BoundedReplay {
    /// Ordered `(position, event)` pairs read before the budget tripped.
    pub events: Vec<(u64, Event)>,
    /// Sum of every returned event payload's encoded body length.
    pub bytes_read: u64,
    /// Whether the caller's byte budget stopped the replay early.
    pub budget_exceeded: bool,
}