cli: add --state-dir flag to agent run

Override the agent output/input directory for manual testing.
Sets POC_AGENT_OUTPUT_DIR so output() writes there and
{{input:key}} reads from there.

Co-Authored-By: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
ProofOfConcept 2026-03-26 14:22:05 -04:00
parent 4b32716d3e
commit e176639437
2 changed files with 18 additions and 4 deletions

View file

@ -614,6 +614,9 @@ enum AgentCmd {
/// Run locally instead of queuing to daemon
#[arg(long)]
local: bool,
/// Directory for agent output/input state (persists across runs)
#[arg(long)]
state_dir: Option<String>,
},
/// Show spaced repetition replay queue
#[command(name = "replay-queue")]
@ -862,8 +865,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, local }
=> cli::agent::cmd_run_agent(&agent, count, &target, query.as_deref(), dry_run, local),
AgentCmd::Run { agent, count, target, query, dry_run, local, state_dir }
=> cli::agent::cmd_run_agent(&agent, count, &target, query.as_deref(), dry_run, local, state_dir.as_deref()),
AgentCmd::ReplayQueue { count } => cli::agent::cmd_replay_queue(count),
AgentCmd::Evaluate { matchups, model, dry_run }
=> cli::agent::cmd_evaluate_agents(matchups, &model, dry_run),