more reorg
This commit is contained in:
parent
fcd77fb79e
commit
390b6c6c0a
8 changed files with 117 additions and 133 deletions
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
pub mod dmn;
|
||||
pub mod identity;
|
||||
pub mod observe;
|
||||
pub mod log;
|
||||
|
||||
// consciousness.rs — Session state machine and event loop
|
||||
//
|
||||
|
|
@ -30,7 +30,7 @@ use crate::agent::api::types as api_types;
|
|||
use crate::config::{self, AppConfig, SessionConfig};
|
||||
use crate::user::{self as tui, HotkeyAction};
|
||||
use crate::user::ui_channel::{self, ContextInfo, StatusInfo, StreamTarget, UiMessage};
|
||||
use crate::user::log;
|
||||
use crate::subconscious::learn;
|
||||
|
||||
/// Compaction threshold — context is rebuilt when prompt tokens exceed this.
|
||||
fn compaction_threshold(app: &AppConfig) -> u32 {
|
||||
|
|
@ -76,7 +76,7 @@ pub struct Session {
|
|||
// Subconscious orchestration
|
||||
agent_cycles: crate::subconscious::subconscious::AgentCycleState,
|
||||
/// Latest memory importance scores from full matrix scoring (manual /score).
|
||||
memory_scores: Option<crate::agent::training::MemoryScore>,
|
||||
memory_scores: Option<learn::MemoryScore>,
|
||||
/// Whether a full matrix /score task is currently running.
|
||||
scoring_in_flight: bool,
|
||||
}
|
||||
|
|
@ -233,7 +233,7 @@ impl Session {
|
|||
(agent.context.clone(), agent.client_clone())
|
||||
};
|
||||
|
||||
let result = crate::agent::training::score_memories_incremental(
|
||||
let result = learn::score_memories_incremental(
|
||||
&context, max_age as i64, response_window, &client, &ui_tx,
|
||||
).await;
|
||||
|
||||
|
|
@ -407,7 +407,7 @@ impl Session {
|
|||
let agent = self.agent.clone();
|
||||
let ui_tx = self.ui_tx.clone();
|
||||
tokio::spawn(async move {
|
||||
let result = crate::agent::training::score_memories(
|
||||
let result = learn::score_memories(
|
||||
&context, &client, &ui_tx,
|
||||
).await;
|
||||
let agent = agent.lock().await;
|
||||
|
|
@ -805,9 +805,9 @@ pub async fn run(cli: crate::user::CliArgs) -> Result<()> {
|
|||
|
||||
// Start observation socket
|
||||
let socket_path = session.config.session_dir.join("agent.sock");
|
||||
let (observe_input_tx, mut observe_input_rx) = observe::input_channel();
|
||||
let (observe_input_tx, mut observe_input_rx) = log::input_channel();
|
||||
if !no_agents {
|
||||
observe::start(socket_path, ui_tx.subscribe(), observe_input_tx);
|
||||
log::start(socket_path, ui_tx.subscribe(), observe_input_tx);
|
||||
}
|
||||
|
||||
let mut reader = EventStream::new();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue