Watch
1
0
Fork
You've already forked souveraine
0
Commit graph souveraine/src/core/memory/mod.rs
Author SHA1 Message Date
Fimeg
e7beafa22e public: clean up source comments for public distribution 2026-05-20 15:12:58 -04:00
Fimeg
4194f00635 feat: itinerary system, subconscious checkpoint, and user nickname
- Itinerary tool (set/advance/describe/clear) with YAML persistence
  and todo-linked enrichment, rendered as TUI header strip
- Mid-turn subconscious checkpoint: every N tool rounds, Aster assesses
  progress; HALT verdict breaks the loop with full correction pass
- Nickname tool: agent learns human's name via set/get/clear, stored
  in system/human.md frontmatter, TUI uses it in chat bubble labels
- Removed hardcoded human.md write from memory::init (wizard owns it)
- Prompt nudge for itinerary when live todos exist without a route
2026-05-20 09:21:11 -04:00
Fimeg
93d4baa98d WIP: context doctor session + audit-fixes accum 2026-05-18 15:58:46 -04:00
Fimeg
84318b1352 fix(tui+compaction): settings audit fixes, gap-line fix, subconscious compaction
- settings: open on Categories panel; "saved" message; fix ScMaxTokens
  commit path; char-boundary-safe field editor (UTF-8 panic on paste)
- tui: drop empty interstitial gap lines (trim whitespace narration)
- compaction: teach the subconscious to compact (SUBCONSCIOUS_BODY_ORIENTATION);
  memory compact resolves per-agent-type default; subconscious leans sliding_reflect
- sliding_reflect preservation pass runs as a fresh fork of the agent being
  compacted — her persona, first person, '[Threads I carried forward]'
2026-05-16 19:23:55 -04:00
Fimeg
4b9c5e2031 feat(federation): Phase 1 transport — signed event streams between instances
SensorEvent gets reply_to for directed routing. FederationConfig gains
peers (url + pubkey + subscriptions). New src/server/federation/ module
with SignedEvent (Ed25519 sign/verify) and FederationBridge (per-peer
outbound WS tasks with echo-safe seed_id filter and backoff reconnect).
Inbound /v1/federation/events handler verifies signatures before bus
injection. Bridge spawned in server::run() when federation.enabled.
2026-05-15 13:45:09 -04:00
Fimeg
fec3aa625d tui: atmosphere palette wiring, cockpit pane, schedules config, settings editor, markdown palette, event log bootstrap, voice stubs, RGP 3D, portrait system, reflection bridge, skills wire, schedule feedback, compaction rebuild 2026-05-14 17:58:48 -04:00
Fimeg
35534f1c73 feat: nervous system, seed identity, credentials, subconscious ledger
Lays the substrate for Aster's clockmaker role and federation.

Nervous system (src/core/nervous/):
- EventBus broadcast channel with SensorEvent (universal event type
  carrying seed_id for future federation)
- CronSensor loop with tokio::select!, mtime caching, active-session
  pause, at-most-once firing semantics
- HeartbeatHandler scaffold (turn injection still stubbed)
- Persistent JSONL EventLog firehose

Schedule tool (src/core/tools/schedule.rs):
- CRUD over schedule files with body-knowledge prose descriptions
- Added to ASTER_SAFE_TOOLS so Aster can schedule her own rhythm
- CLI subcommand for direct schedule management

Seed identity (src/core/identity/):
- Ed25519 keypair, load-or-generate at init
- sign/verify primitives, CLI subcommand (show/sign/verify)
- Wired into LocalBackend, threaded through SensorEvent for federation

Credentials (src/core/credentials.rs):
- OS keyring (Linux/macOS/Windows) + env var fallback
- `souveraine auth` subcommand
- Removes hardcoded Bifrost api_key from souveraine.toml

Subconscious ledger (src/core/memory/mod.rs init_subconscious_ledger):
- 6 ledger files (commitments/assumptions/patterns/drift_log/
  relationships/infrastructure) with proper YAML frontmatter
- Paths fixed: ledger/ not subconscious/ledger/
- Body usage instructions, idempotent init

Prompt orientation (src/core/prompt.rs build_ledger_orientation):
- Scans ledger/ directory, injects last 3 entries from each file
  into Aster's system prompt (live context, not just awareness)
- Routing table + workflow (read before write, timestamped append)

Consciousness engine (src/server/consciousness_engine.rs):
- Adaptive rate delay shared with primary loop
- Four-fold mandate (Complete/Verify/Persist/Surface) in hardcoded
  default prompt; observation format extracted for sharing
- Schedule added to ASTER_SAFE_TOOLS

Backend + CLI wiring expanded to mount the nervous system, identity,
and credentials at startup. New TOML sections: [schedules], [events],
[federation].

102 tests passing.
2026-05-12 08:14:25 -04:00
Fimeg
c489aa4bb3 feat: conversation persistence, input expansion, overlay UX
- ConversationStore (JSONL + JSON metadata) wired through Backend trait,
  SessionManager, and TUI (/new, /resume, /convos commands)
- Dynamic input box: grows with content, caps at 40% terminal height,
  scrolls internally. Shift+Enter / Ctrl+J for newlines.
- Slash command autocomplete popup (filters live as you type /)
- Conversation picker overlay for /resume (modal, arrow select, Enter switch)
- Splash bloom animation, color_support module, system prompt builder
- Fixed 8 pre-existing test failures (95/95 pass)
- Archived superseded task docs, consolidated planning references
2026-05-11 16:05:43 -04:00
Fimeg
4d0eb048d5 feat: implement compaction system with pragmatic balance architecture 2026-05-10 13:15:24 -04:00
Fimeg
9a9a31916c 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.
2026-05-10 11:20:20 -04:00
Fimeg
7da881ad8a feat: sensorium architecture — 8 sensors, subagent runner, TUI component system
Sensorium (src/core/tools/):
- defs.rs: Tool trait, ToolContext (resolve_path, is_memory_path), ToolError with 7 constructors
- read/write/edit: memory boundary with force override, line ranges, replace_all
- bash: stateful (Arc<Mutex<BashState>>), background tasks, timeout
- glob/grep/list_dir: gitignore respect, context lines, memory boundary
- mod.rs: Sensorium registry + backward compat wrappers
- subagent.rs: fork-of-self tool, dual-state framing, no hard depth guard
- agent.rs: Agent(Sam) summoning stub

Dual-state N+1:
- ConsciousnessEngine::on_response_for_agent() — runs heuristic detector on subagent response
- Observations flow back to parent agent's inbox
- Signaled limits: SubagentConfig (max_depth, max_tool_rounds=50, warning thresholds 0.8/0.95)

Architecture docs:
- SENSORIUM_ARCHITECTURE.md — full sensorium vision with nervous system scaffold
- DECISIONS.md — settled architectural decisions
- ASTER_ARCHITECTURE.md / CONSCIOUSNESS_CYCLE.md — reframe appendices
- ALIGNMENT_REPORT.md — doc-to-code alignment audit
- Scope tasks 1-4, 4 issues

TUI:
- component.rs — component system trait + event + scene
- 10 tui-component tasks (completed)
- 4 tui-xxx tasks for next iteration (presence panel, cockpit, dashboard, ambient)
- app.rs splash — vertical breathing room (30% from top)

Config:
- SubagentConfig in config.rs
- ToolContext enrichment (agent_id, subagent_runner, subagent_depth)
- Memory module context-aware overloads
2026-05-09 20:58:37 -04:00
Fimeg
ae0968bf44 feat: wire tools into LocalBackend turn loop
- Added max_tool_rounds (configurable per-agent) to LlmConfig
- Rewrote run_turn() with multi-round tool-calling loop
  (max 10 rounds by default, 0 disables tools)
- Converts core ToolDefinitions → bifrost ToolDefinitions
- Streams tool execution status to TUI via BackendEvent::Token
- Continues consciousness processing (surfacing, reflection, archivist)
  after tool loop completes
- Fixed git2::Config Send issue in memory/mod.rs (scoped block)

Closes: docs/tasks/tool-wiring.md
2026-05-08 09:15:51 -04:00
Fimeg
d64a6e9794 feat: WIP - Implement companion buddy system for Souveraine TUI
- Added src/ui/buddy.rs with CompanionSprite, BuddyState, and draw functions
- Integrated buddy into app.rs for welcome screen and dashboard
- Added agent selection via 'a' key on welcome screen
- Buddy shows agent name, mood, energy, health, and subconscious status
- WIP: Needs full agent alias creation/removal flow
2026-05-07 02:31:44 -04:00