Watch
1
0
Fork
You've already forked souveraine
0

feat: subconscious agent identity architecture - first-class separation

- AgentType enum (Primary, Subconscious, Subagent) with AgentIdentity
- Directory routing: agents/{id}/, subconscious-agents/{id}-sub/, subagents/{parent}/{id}/
- Auto-create subconscious agents with own memory, persona, ledger, inbox
- Ledger lives in subconscious agent space (not primary)
- TUI: CockpitPane and BuddyPanel for consciousness visibility
- Aster tool loop: full tool access with 5 rounds, uncapped output
- Config: max_tokens Option for uncapped subconscious output

Builds clean, 0 errors.
This commit is contained in:
Fimeg 2026-05-10 11:20:20 -04:00
commit 9a9a31916c
10 changed files with 691 additions and 67 deletions

View file

@ -70,6 +70,9 @@ pub struct ChatState {
pub turn_started: Option<Instant>,
/// Receiver for `/model` listing results from async Bifrost call.
pub model_rx: Option<oneshot::Receiver<String>>,
/// Consciousness events (surfacing, reflection, archivist) since last drain.
/// Forwarded to the Scene by App after each tick.
pub pending_consciousness: Vec<BackendEvent>,
}
impl ChatState {
@ -123,6 +126,7 @@ impl ChatState {
tick: 0,
turn_started: None,
model_rx: None,
pending_consciousness: Vec::new(),
})
}
@ -395,11 +399,13 @@ Use Tab to toggle the cockpit pane.";
self.cockpit_log.drain(..self.cockpit_log.len() - 200);
}
self.messages.push(ChatMessage::Surfacing {
source,
content,
priority,
source: source.clone(),
content: content.clone(),
priority: priority.clone(),
ts: Instant::now(),
});
// Buffer for scene dispatch
self.pending_consciousness.push(BackendEvent::Surfacing { source, content, priority });
}
BackendEvent::Reflection(content) => {
self.cockpit_log.push(format!("reflection — {}", content));
@ -407,6 +413,7 @@ Use Tab to toggle the cockpit pane.";
text: format!("reflection: {}", content),
ts: Instant::now(),
});
self.pending_consciousness.push(BackendEvent::Reflection(content));
}
BackendEvent::Archivist { synthesis, pressure } => {
self.pressure = pressure;
@ -415,6 +422,7 @@ Use Tab to toggle the cockpit pane.";
text: format!("archivist: {} (pressure {:.0}%)", synthesis, pressure * 100.0),
ts: Instant::now(),
});
self.pending_consciousness.push(BackendEvent::Archivist { synthesis, pressure });
}
BackendEvent::Done => {
self.finalize_streaming();