fix: unconscious agent cycling
- Read max_concurrent from config (llm_concurrency) instead of hardcoding 2 - Add not-visited: and visited: filters to query parser (were in engine but missing from parser after unification) The organize agent was stuck in a spawn/fail loop because its query used not-visited: which the parser didn't recognize. Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
parent
d5aad5c1a4
commit
c79b415ada
2 changed files with 5 additions and 1 deletions
|
|
@ -99,6 +99,8 @@ peg::parser! {
|
|||
/ "age:" c:cmp_duration() { Stage::Filter(Filter::Age(c)) }
|
||||
/ "key:" g:ident() { Stage::Filter(Filter::KeyGlob(g)) }
|
||||
/ "provenance:" p:ident() { Stage::Filter(Filter::Provenance(p)) }
|
||||
/ "not-visited:" a:ident() "," d:integer() { Stage::Filter(Filter::NotVisited { agent: a, duration: d as i64 }) }
|
||||
/ "visited:" a:ident() { Stage::Filter(Filter::Visited { agent: a }) }
|
||||
/ "all" { Stage::Generator(Generator::All) }
|
||||
// Graph algorithms
|
||||
/ "spread" { Stage::Algorithm(AlgoStage { algo: Algorithm::Spread, params: std::collections::HashMap::new() }) }
|
||||
|
|
|
|||
|
|
@ -111,8 +111,10 @@ impl Unconscious {
|
|||
}
|
||||
agents.sort_by(|a, b| a.name.cmp(&b.name));
|
||||
|
||||
let max_concurrent = crate::config::get().llm_concurrency;
|
||||
|
||||
Self {
|
||||
agents, max_concurrent: 2,
|
||||
agents, max_concurrent,
|
||||
graph_health: None,
|
||||
last_health_check: None,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue