diff --git a/src/mind/mod.rs b/src/mind/mod.rs index 6a980cb..d3c219b 100644 --- a/src/mind/mod.rs +++ b/src/mind/mod.rs @@ -1,6 +1,6 @@ // mind/ — Cognitive layer // -// Session state machine, DMN, identity, observation socket. +// Mind state machine, DMN, identity, observation socket. // Everything about how the mind operates, separate from the // user interface (TUI, CLI) and the agent execution (tools, API). @@ -8,11 +8,11 @@ pub mod dmn; pub mod identity; pub mod log; -// consciousness.rs — Session state machine and event loop +// consciousness.rs — Mind state machine and event loop // -// The core runtime for the consciousness binary. Session manages turns, +// The core runtime for the consciousness binary. Mind manages turns, // DMN state, compaction, scoring, and slash commands. The event loop -// bridges Session (cognitive state) with App (TUI rendering). +// bridges Mind (cognitive state) with App (TUI rendering). // // The event loop uses biased select! so priorities are deterministic: // keyboard events > turn results > render ticks > DMN timer > UI messages. @@ -44,13 +44,13 @@ enum Command { None, } -// --- Session: all mutable state for a running agent session --- +// --- Mind: all mutable state for a running agent session --- /// Collects the ~15 loose variables that previously lived in run() /// into a coherent struct with methods. The event loop dispatches -/// to Session methods; Session manages turns, compaction, DMN state, +/// to Mind methods; Mind manages turns, compaction, DMN state, /// and slash commands. -pub struct Session { +pub struct Mind { agent: Arc>, config: SessionConfig, ui_tx: ui_channel::UiSender, @@ -81,7 +81,7 @@ pub struct Session { scoring_in_flight: bool, } -impl Session { +impl Mind { fn new( agent: Arc>, config: SessionConfig, @@ -796,7 +796,7 @@ pub async fn run(cli: crate::user::CliArgs) -> Result<()> { let (turn_tx, mut turn_rx) = mpsc::channel::<(Result, StreamTarget)>(1); let no_agents = config.no_agents; - let mut session = Session::new(agent, config, ui_tx.clone(), turn_tx); + let mut session = Mind::new(agent, config, ui_tx.clone(), turn_tx); session.update_status(); if !no_agents { session.start_memory_scoring(); // also sends initial agent snapshots