Unconscious agents: persistent AutoAgent, shared Agent Arc for UI

- AutoAgent stored on UnconsciousAgent, swapped out for runs, restored
  on completion (same pattern as subconscious agents)
- Agent Arc created before spawn and stored on UnconsciousAgent so
  the TUI can lock it to read conversation context live
- run_shared() method on AutoAgent for running with a pre-created Agent
- Default tools: memory_tools (not memory_and_journal_tools)
- trigger/spawn_agent made async for Agent::new()

Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
ProofOfConcept 2026-04-09 01:00:48 -04:00
parent 5b75ad3553
commit dc07c92b28
4 changed files with 112 additions and 30 deletions

View file

@ -552,7 +552,7 @@ impl Mind {
if unc_handle.as_ref().map_or(true, |h| h.is_finished()) {
let unc = self.unconscious.clone();
unc_handle = Some(tokio::spawn(async move {
unc.lock().await.trigger();
unc.lock().await.trigger().await;
}));
}
}