trusty-code 0.8.2

Per-project Claude-Code-compatible MPM orchestration harness (bin: tcode) — an original coding harness, tracked under epic #2052.
//! Daemon-owned session model + attach/detach protocol (#2054, vision spec
//! Axiom 4 / §4.3-4.4 / §12).
//!
//! Why: "The Daemon OWNS Sessions; CLI Attaches Over the API" — a running
//! session is a first-class object living inside `tcode serve`, not a tmux
//! pane the CLI scrapes. This module is the whole vertical slice: the
//! domain type, its in-memory registry + ring buffer + attach bookkeeping,
//! and the `session.*` JSON-RPC methods built on top of the existing
//! `crate::jsonrpc::Router` — reachable identically over STDIO and the socket
//! (`crate::serve`), reusing the SAME method surface both transports
//! dispatch through.
//! What: [`model::Session`]/[`model::SessionStatus`] (the domain type),
//! [`registry::SessionRegistry`] (storage + ring buffer + attach/detach +,
//! since #2056, execution tracking, #2350 operator-facing goal slots),
//! [`transcript::TranscriptRecord`] (#2058's `session.get_transcript`
//! response DTO, #2350 additive `goals` field) plus its
//! [`transcript::GoalSlotRecord`] snapshot type, [`memory_sink::TurnMemorySink`]
//! (#2345's durable per-turn dual-write to trusty-memory, owned per-session
//! by `registry::SessionRegistry`), and [`protocol::register`] (wires
//! `session.create`/`list`/`status`/`send`/`attach`/`detach`/`cancel`/
//! `get_transcript`/(#2350)`set_goal`/`clear_goal`/`get_goals` onto a
//! `Router`).
//! Test: `model::tests::*`, `registry::registry_tests::*`,
//! `protocol::tests::*`; end-to-end over the real daemon in
//! `tests/session_e2e.rs` and (#2058) `tests/task_e2e.rs`.
//!
//! [`model::Session`]: crate::session::model::Session
//! [`model::SessionStatus`]: crate::session::model::SessionStatus
//! [`registry::SessionRegistry`]: crate::session::registry::SessionRegistry
//! [`transcript::TranscriptRecord`]: crate::session::transcript::TranscriptRecord
//! [`transcript::GoalSlotRecord`]: crate::session::transcript::GoalSlotRecord
//! [`memory_sink::TurnMemorySink`]: crate::session::memory_sink::TurnMemorySink
//! [`protocol::register`]: crate::session::protocol::register

/// (#6637) `session.events`: the socket transport's live tail of one session,
/// standing in for the notification channel `session.attach` cannot have over
/// a one-frame-in, one-frame-out connection.
pub mod events_stream;
/// (#2425) Bounded logical-order fold for durable-memory turn outcomes.
/// Private: `registry::SessionEntry` owns one per session and is the only
/// thing that drives it.
mod memory_outcome_reconciler;
pub mod memory_sink;
pub mod model;
pub mod protocol;
pub mod registry;
/// (#4351) The actionable `TaskResult` carried beside a `Session` snapshot.
pub mod task_result;
pub mod transcript;

/// (issue #3948) The per-session working-context floor `registry` folds into
/// each `SessionEntry` — a private sibling module, not part of the crate's
/// public surface.
#[path = "registry_context_floor.rs"]
mod registry_context_floor;

pub use memory_sink::{MemoryFailureCategory, PalaceCreation, TurnMemorySink};
pub use model::{Session, SessionStatus};
pub use registry::SessionRegistry;
pub use task_result::{TaskResult, TaskResultStatus};
pub use transcript::{GoalSlotRecord, MemoryDurabilityStatus, TranscriptRecord};