diff --git a/poc-memory/src/agents/daemon.rs b/poc-memory/src/agents/daemon.rs index 81498a7..ed50f68 100644 --- a/poc-memory/src/agents/daemon.rs +++ b/poc-memory/src/agents/daemon.rs @@ -132,7 +132,7 @@ fn job_targeted_agent( log_event(&job_name, "progress", msg); }; super::knowledge::run_one_agent_with_keys( - &mut store, &agent, std::slice::from_ref(&key), 5, "daemon", &log, false, + &mut store, &agent, std::slice::from_ref(&key), 5, "daemon", &log, )?; ctx.log_line("done"); Ok(()) @@ -217,7 +217,7 @@ fn job_consolidation_agent( // Use run_one_agent_with_keys — we already selected seeds above, // no need to re-run the query. let result = super::knowledge::run_one_agent_with_keys( - &mut store, &agent, &claimed_keys, batch, "consolidate", &log, false, + &mut store, &agent, &claimed_keys, batch, "consolidate", &log, ).map(|_| ()); // Release all claimed keys (seeds + neighbors) @@ -247,7 +247,7 @@ fn job_rename_agent( ctx.log_line(format!("running rename agent (batch={})", batch)); let log = |msg: &str| ctx.log_line(msg); - let result = super::knowledge::run_one_agent(&mut store, "rename", batch, "consolidate", &log, false)?; + let result = super::knowledge::run_one_agent(&mut store, "rename", batch, "consolidate", &log)?; // Parse RENAME actions from response (rename uses its own format, not WRITE_NODE/LINK/REFINE) let mut applied = 0; diff --git a/poc-memory/src/agents/knowledge.rs b/poc-memory/src/agents/knowledge.rs index f4fd42d..db3ce23 100644 --- a/poc-memory/src/agents/knowledge.rs +++ b/poc-memory/src/agents/knowledge.rs @@ -54,7 +54,7 @@ pub fn run_and_apply_excluded( log: &(dyn Fn(&str) + Sync), exclude: &std::collections::HashSet, ) -> Result<(), String> { - let result = run_one_agent_excluded(store, agent_name, batch_size, llm_tag, log, false, exclude)?; + let result = run_one_agent_excluded(store, agent_name, batch_size, llm_tag, log, exclude)?; // Mark conversation segments as mined after successful processing if agent_name == "observation" { @@ -72,7 +72,6 @@ pub fn run_one_agent_with_keys( count: usize, llm_tag: &str, log: &(dyn Fn(&str) + Sync), - debug: bool, ) -> Result { let def = super::defs::get_def(agent_name) .ok_or_else(|| format!("no .agent file for {}", agent_name))?; @@ -91,7 +90,7 @@ pub fn run_one_agent_with_keys( store.record_agent_visits(&agent_batch.node_keys, agent_name).ok(); } - run_one_agent_inner(store, agent_name, &def, agent_batch, llm_tag, log, debug) + run_one_agent_inner(store, agent_name, &def, agent_batch, llm_tag, log) } pub fn run_one_agent( @@ -100,9 +99,8 @@ pub fn run_one_agent( batch_size: usize, llm_tag: &str, log: &(dyn Fn(&str) + Sync), - debug: bool, ) -> Result { - run_one_agent_excluded(store, agent_name, batch_size, llm_tag, log, debug, &Default::default()) + run_one_agent_excluded(store, agent_name, batch_size, llm_tag, log, &Default::default()) } /// Like run_one_agent but excludes nodes currently being worked on by other agents. @@ -112,7 +110,6 @@ pub fn run_one_agent_excluded( batch_size: usize, llm_tag: &str, log: &(dyn Fn(&str) + Sync), - debug: bool, exclude: &std::collections::HashSet, ) -> Result { let def = super::defs::get_def(agent_name) @@ -122,7 +119,7 @@ pub fn run_one_agent_excluded( let effective_count = def.count.unwrap_or(batch_size); let agent_batch = super::defs::run_agent(store, &def, effective_count, exclude)?; - run_one_agent_inner(store, agent_name, &def, agent_batch, llm_tag, log, debug) + run_one_agent_inner(store, agent_name, &def, agent_batch, llm_tag, log) } fn run_one_agent_inner( @@ -132,7 +129,6 @@ fn run_one_agent_inner( agent_batch: super::prompts::AgentBatch, _llm_tag: &str, log: &(dyn Fn(&str) + Sync), - debug: bool, ) -> Result { let prompt_kb = agent_batch.prompt.len() / 1024; let tools_desc = if def.tools.is_empty() { "no tools".into() } diff --git a/poc-memory/src/cli/agent.rs b/poc-memory/src/cli/agent.rs index 5c0f8d2..48318e7 100644 --- a/poc-memory/src/cli/agent.rs +++ b/poc-memory/src/cli/agent.rs @@ -3,13 +3,13 @@ use crate::store; use crate::agents::llm; -pub fn cmd_run_agent(agent: &str, count: usize, target: &[String], query: Option<&str>, dry_run: bool, debug: bool, local: bool) -> Result<(), String> { +pub fn cmd_run_agent(agent: &str, count: usize, target: &[String], query: Option<&str>, dry_run: bool, local: bool) -> Result<(), String> { if dry_run { // SAFETY: single-threaded at this point (CLI startup, before any agent work) unsafe { std::env::set_var("POC_MEMORY_DRY_RUN", "1"); } } - let needs_local = local || debug || dry_run; + let needs_local = local || dry_run; let has_targets = !target.is_empty() || query.is_some(); // Fast path: no explicit targets, daemon available — just queue via RPC @@ -51,7 +51,7 @@ pub fn cmd_run_agent(agent: &str, count: usize, target: &[String], query: Option println!("[{}] [{}/{}] {}", agent, i + 1, resolved_targets.len(), key); if i > 0 { store = store::Store::load()?; } if let Err(e) = crate::agents::knowledge::run_one_agent_with_keys( - &mut store, agent, &[key.clone()], count, "test", &log, debug, + &mut store, agent, &[key.clone()], count, "test", &log, ) { println!("[{}] ERROR on {}: {}", agent, key, e); } @@ -71,7 +71,7 @@ pub fn cmd_run_agent(agent: &str, count: usize, target: &[String], query: Option } else { // Local execution (--local, --debug, dry-run, or daemon unavailable) crate::agents::knowledge::run_one_agent( - &mut store, agent, count, "test", &log, debug, + &mut store, agent, count, "test", &log, )?; } Ok(()) diff --git a/poc-memory/src/main.rs b/poc-memory/src/main.rs index 4348204..31951d5 100644 --- a/poc-memory/src/main.rs +++ b/poc-memory/src/main.rs @@ -611,9 +611,6 @@ enum AgentCmd { /// Dry run — set POC_MEMORY_DRY_RUN=1 so mutations are no-ops #[arg(long)] dry_run: bool, - /// Debug — print full prompt and response - #[arg(long)] - debug: bool, /// Run locally instead of queuing to daemon #[arg(long)] local: bool, @@ -865,8 +862,8 @@ fn main() { AgentCmd::FactMine { path, batch, dry_run, output, min_messages } => cli::agent::cmd_fact_mine(&path, batch, dry_run, output.as_deref(), min_messages), AgentCmd::FactMineStore { path } => cli::agent::cmd_fact_mine_store(&path), - AgentCmd::Run { agent, count, target, query, dry_run, debug, local } - => cli::agent::cmd_run_agent(&agent, count, &target, query.as_deref(), dry_run, debug, local), + AgentCmd::Run { agent, count, target, query, dry_run, local } + => cli::agent::cmd_run_agent(&agent, count, &target, query.as_deref(), dry_run, local), AgentCmd::ReplayQueue { count } => cli::agent::cmd_replay_queue(count), AgentCmd::Evaluate { matchups, model, dry_run } => cli::agent::cmd_evaluate_agents(matchups, &model, dry_run),