Skip to main content

Module session

Module session 

Source
Expand description

Session actor surface (Phase 2 daemon mode).

One SessionActor (A1) owns THE Runtime + ConversationState for a conversation and runs its turn machine; clients talk to it through a ClientTransport — LocalTransport in-process (same StreamEvent values, never serialised = byte-identical), SocketTransport (B2) over the daemon UDS. agent-tui must never be a dependency of anything here.

Re-exports§

pub use actor::SessionActor;
pub use actor::SessionTask;
pub use display::DisplayItem;
pub use display::DisplayTail;
pub use handle::SessionHandle;
pub use socket_transport::SocketTransport;
pub use transport::ClientTransport;
pub use transport::LocalTransport;
pub use transport::TransportError;
pub use view::RuntimeRead;
pub use view::RuntimeView;
pub use types::*;

Modules§

actor
SessionActor — owns THE Runtime + ConversationState for one conversation and runs its turn machine (PLAN-phase2 §2.5).
actor_cmds
SessionActor — command bodies that belong to the TUI port (A3): engine_command (structured reply), submit_prepared, plugin_command, resume, session_name, emit_subagent_rows. Kept apart from actor.rs so the turn machine (B) and the command surface (A) never touch the same file.
budgets
Teardown budgets shared by every session host (values copied from agent-tui/src/tui/signals.rs; signals.rs re-exports these on day 2).
cache_keepwarm
Prompt-cache keep-warm policy (task #444), owned by the session actor.
client_args
Client-side resolution of path-like SessionConfig arguments (T4, F26).
display
Daemon-side display projection of api_messages (PLAN-phase4 §2.3).
driver
Actor-side session driver state machine (E §2).
handle
SessionHandle — the in-process address of a session (PLAN-phase2 §2.6).
socket_transport
SocketTransport — the client side of the daemon UDS (PLAN-phase2 §2.10).
transport
ClientTransport + LocalTransport (PLAN-phase2 §2.7).
types
Identity, configuration, commands, events and the envelope — the entire client↔session contract (PLAN-phase2 §2.1–§2.4). Everything a client can send is serde-able from day one; SessionEventWire::Stream deliberately is not (it carries the un-serialised StreamEvent in-process).
view
RuntimeView + RuntimeRead (PLAN-phase2 §2.8).
wire
Wire frames for the daemon UDS (PLAN-phase2 §2.9, S289 D-2 amended).