observation agent rewrite, edit command, daemon fixes
- observation.agent: rewritten to navigate graph and prefer refining existing nodes over creating new ones. Identity-framed prompt, goals over rules. - poc-memory edit: opens node in $EDITOR, writes back on save, no-op if unchanged - daemon: remove extra_workers (jobkit tokio migration dropped it), remove sequential chaining of same-type agents (in-flight exclusion is sufficient) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
3b30a6abae
commit
869a2fbc38
6 changed files with 97 additions and 70 deletions
|
|
@ -698,7 +698,6 @@ pub fn run_daemon() -> Result<(), String> {
|
|||
data_dir: config.data_dir.clone(),
|
||||
resource_slots: config.llm_concurrency,
|
||||
resource_name: "llm".to_string(),
|
||||
extra_workers: 3,
|
||||
});
|
||||
|
||||
let choir = Arc::clone(&daemon.choir);
|
||||
|
|
@ -1043,30 +1042,26 @@ pub fn run_daemon() -> Result<(), String> {
|
|||
log_event("scheduler", "consolidation-plan",
|
||||
&format!("{} agents ({})", runs.len(), summary.join(" ")));
|
||||
|
||||
// Phase 1: Agent runs — sequential within type, parallel across types.
|
||||
// Same-type agents chain (they may touch overlapping graph regions),
|
||||
// but different types run concurrently (different seed nodes).
|
||||
let mut prev_by_type: std::collections::HashMap<String, jobkit::RunningTask> =
|
||||
std::collections::HashMap::new();
|
||||
// Phase 1: Agent runs — all concurrent, in-flight exclusion
|
||||
// prevents overlapping graph regions.
|
||||
let mut all_tasks: Vec<jobkit::RunningTask> = Vec::new();
|
||||
for (i, (agent_type, batch)) in runs.iter().enumerate() {
|
||||
let agent = agent_type.to_string();
|
||||
let b = *batch;
|
||||
let in_flight_clone = Arc::clone(&in_flight_sched);
|
||||
let task_name = format!("c-{}-{}:{}", agent, i, today);
|
||||
let mut builder = choir_sched.spawn(task_name)
|
||||
let task = choir_sched.spawn(task_name)
|
||||
.resource(&llm_sched)
|
||||
.log_dir(&log_dir_sched)
|
||||
.retries(1)
|
||||
.init(move |ctx| {
|
||||
job_consolidation_agent(ctx, &agent, b, &in_flight_clone)
|
||||
});
|
||||
if let Some(dep) = prev_by_type.get(agent_type.as_str()) {
|
||||
builder.depend_on(dep);
|
||||
}
|
||||
prev_by_type.insert(agent_type.clone(), builder.run());
|
||||
})
|
||||
.run();
|
||||
all_tasks.push(task);
|
||||
}
|
||||
// Orphans phase depends on all agent type chains completing
|
||||
let prev_agent = prev_by_type.into_values().last();
|
||||
// Orphans phase depends on all agent tasks completing
|
||||
let prev_agent = all_tasks.last().cloned();
|
||||
|
||||
// Phase 2: Link orphans (CPU-only, no LLM)
|
||||
let mut orphans = choir_sched.spawn(format!("c-orphans:{}", today))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue