Expand description
Daemon-owned session model + attach/detach protocol (#2054, Axiom 4).
Why: “The Daemon OWNS Sessions; CLI Attaches Over the API” — sessions
are first-class objects living inside tcode serve, reachable via
session.* JSON-RPC methods over both transports.
What: Session, SessionStatus, SessionRegistry, and
session::protocol::register (wires the seven session.* methods onto
a Router).
Test: session::model::tests::*, session::registry::registry_tests::*,
session::protocol::tests::*; API-driven end-to-end coverage in
tests/session_e2e.rs.
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 HTTP
(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.
Re-exports§
pub use connector::TcodeConnector;pub use memory_sink::MemoryFailureCategory;pub use memory_sink::PalaceCreation;pub use memory_sink::TurnMemorySink;pub use model::Session;pub use model::SessionStatus;pub use registry::SessionRegistry;pub use transcript::GoalSlotRecord;pub use transcript::MemoryDurabilityStatus;pub use transcript::TranscriptRecord;
Modules§
- connector
TcodeConnector— tcode’sWorkstreamConnectorimplementation (DOC-44 twin Phase 1, issue #3007).- memory_
sink - Turn recorder (#2345): durable per-turn dual-write to trusty-memory.
- model
- Session domain model: the daemon-owned first-class object (#2054, Axiom 4).
- protocol
session.*JSON-RPC method handlers (#2054, vision spec Axiom 4 / §4.3).- registry
- Daemon-owned session registry: storage, per-session sequencing, ring buffer, and attach/detach bookkeeping (#2054, #2055).
- transcript
session.get_transcript’s response shape (#2058).