oneshot: simplify API surface

Kill 5 wrapper functions (run_and_apply chain, run_one_agent_excluded),
drop dead llm_tag parameter, clean up scan_pid_files parsing.

Public API: run_one_agent, run_one_agent_with_keys, spawn_agent,
scan_pid_files.

Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
ProofOfConcept 2026-04-04 17:33:36 -04:00 committed by Kent Overstreet
parent 0f4ca9e2f2
commit a1fb3fe557
4 changed files with 136 additions and 224 deletions

View file

@ -59,8 +59,8 @@ pub fn cmd_run_agent(agent: &str, count: usize, target: &[String], query: Option
for (i, key) in resolved_targets.iter().enumerate() {
println!("[{}] [{}/{}] {}", agent, i + 1, resolved_targets.len(), key);
if i > 0 { store = store::Store::load()?; }
if let Err(e) = crate::agent::oneshot::run_one_agent_with_keys(
&mut store, agent, &[key.clone()], count, "test", &log,
if let Err(e) = crate::agent::oneshot::run_one_agent(
&mut store, agent, count, Some(&[key.clone()]), &log,
) {
println!("[{}] ERROR on {}: {}", agent, key, e);
}
@ -80,7 +80,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::agent::oneshot::run_one_agent(
&mut store, agent, count, "test", &log,
&mut store, agent, count, None, &log,
)?;
}
Ok(())