trusty-mpm 1.8.2

trusty-mpm: unified multi-agent orchestration platform (core, daemon, CLI, TUI, Telegram)
//! Shared daemon state.
//!
//! Why: the HTTP API, the MCP server, the hook relay, and the dashboard feed
//! all read and mutate the same picture of the world — managed sessions, their
//! delegation trees, per-agent circuit breakers, recent hook events, and
//! per-session memory usage. A single `Arc`-shared, lock-guarded state keeps
//! them consistent and is the daemon's composition root for dependency
//! injection into request handlers.
//! What: [`DaemonState`] holds `DashMap`s keyed by `SessionId`/agent name plus
//! a bounded ring buffer of recent [`HookEventRecord`](crate::core::hook::HookEventRecord)s; methods provide the
//! typed mutations the rest of the daemon needs.
//! Test: `cargo test -p trusty-mpm-daemon` exercises registration, the hook
//! ring-buffer bound, and memory-pressure classification.

mod core;
mod overseer;
pub(crate) mod pending_stops;
mod resources;
pub(crate) mod sessions;
// #9010: whether a session's bound `claude` still runs.
pub(crate) mod session_claude_liveness;
// #8983: rebinding an id to the `claude` the daemon resumed.
pub(crate) mod session_claude_resume;
// #8531: the kernel-bound `claude` of each session id.
pub(crate) mod session_claudes;
mod sm;
// #8535, #8161: which records write in a given tree.
mod tree_membership;

#[cfg(test)]
mod tests;

pub use core::{
    DaemonState, EVENT_CHANNEL_CAPACITY, HOOK_HISTORY_LIMIT, PAIR_CODE_TTL, ReapResult,
};
pub use sessions::DelegationSweep;