Add enabled toggle to AutoAgent, simplify unconscious scheduling

- AutoAgent.enabled: universal toggle for any auto agent
- Subconscious: should_trigger checks auto.enabled
- Unconscious: simplified from consolidation-plan-driven budgets to
  simple loop with cooldown. Static agent list, max 2 concurrent.
- TUI: unconscious agents shown in F3 subconscious screen under
  separator, with enabled/running/runs display

Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
ProofOfConcept 2026-04-09 00:41:18 -04:00
parent ddfdbe6cb1
commit 1df49482fd
5 changed files with 99 additions and 94 deletions

View file

@ -291,6 +291,7 @@ const AGENTS: &[(&str, u64)] = &[
pub struct SubconsciousSnapshot {
pub name: String,
pub running: bool,
pub enabled: bool,
pub current_phase: String,
pub turn: usize,
pub last_run_secs_ago: Option<f64>,
@ -352,7 +353,7 @@ impl SubconsciousAgent {
}
fn should_trigger(&self, conversation_bytes: u64, interval: u64) -> bool {
if self.is_running() { return false; }
if !self.auto.enabled || self.is_running() { return false; }
if interval == 0 { return true; }
conversation_bytes.saturating_sub(self.last_trigger_bytes) >= interval
}
@ -361,6 +362,7 @@ impl SubconsciousAgent {
SubconsciousSnapshot {
name: self.name.clone(),
running: self.is_running(),
enabled: self.auto.enabled,
current_phase: self.auto.current_phase.clone(),
turn: self.auto.turn,
last_run_secs_ago: self.last_run.map(|t| t.elapsed().as_secs_f64()),