Watch
1
0
Fork
You've already forked souveraine
0
Commit graph

541 commits

Author SHA1 Message Date
Fimeg
19b8566e4d docs: add task files for deferred safety/enhancement work
- remote-conversation-loading.md — implement list/load for RemoteBackend
- settings-error-display.md — wire validation errors to footer
- dead-code-cleanup.md — remove allow(dead_code), Letta aliases, unused imports
- numeric-cast-safety.md — add saturating cast helpers
2026-06-15 15:42:31 -04:00
Fimeg
f9122c3230 fix: safety hardening pass — eliminate unsafe, panics, and stubs
- Replace unsafe raw-pointer render callback in message_list with Arc<Mutex<>>
- Replace unsafe Cell::as_ptr() in splash with safe Copy derive + .get()
- Add .max(0.0) guards on all f32→u16 casts in bloom animation
- Replace unreachable!() with bail/return/match in 4 locations
- Replace expect() with Result propagation in 4 constructors (RemoteBackend, VoiceClient, BifrostClient, OpenAiOAuth)
- Wire manager kill/restart keys to signals (backend TODO remains)
- Pass agent name through TUI message render chain (was hardcoded "Ani")
- Implement scroll_page in message_list using List::scroll_by
2026-06-15 15:41:35 -04:00
Fimeg
71d3418f0b ci: add Gitea Actions pipeline (rust test/clippy + codeberg sync) 2026-06-13 16:15:35 -04:00
Fimeg
54816de005 config: kill hardcoded model defaults and precision fallback
default_primary_model() now returns empty string.
default_models() returns empty HashMap.
bridge/mod.rs no longer auto-injects {model}-precision fallbacks.
User-configured models only, no silent injection.
2026-06-04 18:29:07 -04:00
Fimeg
85aa1f77de tuie: replace hand-rolled widgets with verbatim tuie-demo copies
14 widgets now match the demo source exactly (import paths rewritten):
accordion, button, checkbox, counter, flat_button, focus_pane,
global_chords, horizontal_rule, link, page_layout, point_picker,
progress_bar, radio_group, segmented_control.

Theme simplified: accent color is now Color::YELLOW, which
apply_atmosphere resolves through harmonious to the agent's
current primary — no thread-local, no RGB arithmetic.

Added chord_macro + axis2d deps matching tuie-demo's Cargo.toml.

All 27 broken call sites (field_grid, settings, cockpit,
dropdown, model_picker, text_editor) migrated to demo APIs:
FlatButton::new().child(x), Button::new().children([x]),
Checkbox::new(label).set_checked(b), Counter::new(),
PointPicker::new().point(...), etc.
2026-06-04 18:24:12 -04:00
Fimeg
a3a61b2634 model picker: collapsible Source/Org/Model tree
Replace the flat org-grouped list with a real tree. Sources and orgs
collapse (arrows expand/collapse, Enter toggles headers / selects models),
fuzzy search auto-expands matches, and the cursor opens pinned to the
currently-selected model's branch.
2026-06-04 14:24:55 -04:00
Fimeg
6a4f5faea0 tuie: port settings, screens, and widget set to the tuie engine
New tuie widgets (buttons, dropdown, slider, accordion, checkbox, etc.),
settings screen port with model picker + text editor, and screen ports
for chat, cron, presence, welcome, and the agents manager.
2026-06-04 14:17:21 -04:00
Fimeg
a7d86cd0a4 feat(cache): persist model catalog to ~/.souveraine/models.json
Settings loads cached models on open, saves after fetch.
Provider-aware — switching bifrost/oauth invalidates cache.
7-day freshness window.
2026-06-04 14:14:24 -04:00
Fimeg
1b69648ba5 feat(keymap): central keyboard routing system
Replace 53 inline KeyCode match arms with a KEYMAP table.
Exact (context, code, mods) lookup; Action enum per screen.
Fixes Ctrl+Left/Right word-jump (was dead code — shadowed).
5 audit tests including no_duplicate_bindings.
2026-06-04 14:14:17 -04:00
Fimeg
61bf34177e feat(tui): tuie widget-toolkit engine behind --engine tuie
Introduce a parallel TUI built on the tuie widget toolkit, selectable at
runtime with `--engine tuie`. ratatui remains the default and its
crossterm/ratatui deps are retained, so default users see no behavior
change; this lands the full screen/widget tree for the new engine
side-by-side with the existing one.

Engine wiring:
- Cargo: add `tuie` (harmonious, images features)
- main.rs: `--engine` flag + run_tuie_tui() entry path
- src/ui: new `screens`, `widgets`, `theme`, `tuie_app` modules
- app::recent_commits made pub(crate) for dashboard reuse

Screens: splash (procedural bloom), welcome dashboard, chat (live
streaming), agents picker, settings, plus cron/presence stubs.

Widgets: brand_title, portrait, menu_list, message_list, chat_bubble,
chat_input, cockpit, phase_bar, tool_card, and a reusable `responsive`
container.

Responsive welcome: the welcome screen now offers two viewable modes the
way the old ratatui dashboard did — a side-by-side portrait/stats layout
at >=100 cols and a stacked single column below it — switched by the new
`Responsive` widget. It holds both subtrees and lays out / paints only the
one that fits, while exposing both to id lookups so the menu selection
survives a resize across the breakpoint. Flourishes: a breathing title
colour pulse and a portrait border that surfaces subconscious state.
Covered by a layout test driving a TestTerminal across the breakpoint.
2026-05-30 13:50:52 -04:00
Fimeg
a7e909d39d fix: review fixes for PRs #1 and #2
PR #1 (LlmProvider + OAuth) fixes:
- Move provider selection from [bifrost].provider to [inference].provider
  (Bifrost is a provider, not the parent category — they are peers)
- Add Inference category to settings TUI with provider picker
- Wire build_provider() into CLI/chat/model-refresh paths so OAuth
  works outside server mode
- Update ServerConversation to use Arc<dyn LlmProvider> for consistency

PR #2 (web UI) assessment:
- Remove entire web/ directory — not aligned with substrate ethos
  (client-side compaction model contradicts Constitution Article IV;
   autoCommit toggle misunderstands git-backed memory physics;
   vocabulary doesn't match project architecture)
- Keep the 3 new REST endpoints (config, compaction-logs, token metrics)
- Revert run_reflect path change (keep canonical ~/.souveraine/agents/)
- Delete souveraine_fixes.patch (dev artifact)
- Restore demo example (was commented out as workaround for missing file)
- Copy examples/demo.rs from primary branch (was never pushed to public)

Tests: 184 passed, 0 failed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-29 19:47:54 -04:00
E
bc6ee12d47 feat(bridge): LlmProvider trait + OAuth-riding ChatGPT provider
Introduce an `LlmProvider` trait (the engine<->LLM seam, sibling to the
`Backend` harness<->engine trait) so inference can route to providers
beyond the Bifrost gateway. Two impls behind it:

- `BifrostClient` - existing OpenAI-compatible gateway (default).
- `OpenAiOAuthProvider` - rides the Codex CLI's ChatGPT login
  (`~/.codex/auth.json`) and drives `chatgpt.com/backend-api/codex/responses`
  (Responses API) with no API key. Self-refreshes the token (single-flight,
  write-back, CLI re-read fallback) and translates the engine's OpenAI-chat
  request to/from the Responses API + SSE accumulation.

Selected via `[bifrost] provider` ("bifrost" | "openai-oauth"). The engine
keeps speaking the existing ChatCompletionRequest/CompletionResult/
InferenceStrain currency, so all six inference call-sites are unchanged -
only the field type flips to `Arc<dyn LlmProvider>`.

Model ids are translated at the provider boundary (oauth/catalog.rs::resolve):
Bifrost-namespaced ids (`openai/...`, `-precision`) map onto served ChatGPT
models; `-fast` -> priority service tier.

Verified live to the wire level: builds+links, server boots in oauth mode
(reads the Codex token), and chatgpt.com accepts the request (auth, endpoint,
headers, payload all valid). The SSE->CompletionResult accumulation is NOT yet
verified against a successful completion (blocked by a subscription usage limit
at test time) - needs one live turn to confirm end-to-end.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-29 14:27:53 -04:00
Fimeg
d8707611da feat: chunked-replay token streaming for subconscious
Mirrors the primary's pattern at `src/server/turn.rs:445-471` — bifrost
returns the full response in one shot, we chop it into 10-char chunks
and emit each as a `SubconsciousToken` with a 20ms sleep between, so
the subconscious appears to be typing in real time.

The TUI side needed a small refit so the chunks don't each become their
own line in the stream Vec (a 10-char-wide vertical waterfall):

- `ChatState.subconscious_current: String` — the live-building line.
  Token chunks `push_str` here. The render path shows it as the
  brightest bottom line, ahead of finalized history lines above.
- `SubconsciousToolCall`/`SubconsciousToolResult` flush the buffer to
  `subconscious_stream` (as a finalized line), clear it, then push
  their own line. New `SubconsciousPass(active=true)` clears both.
- Render packs the visible window from newest backward, including the
  live line as the bottom entry; old history lines above fade upward
  toward `agent_dim` and gain the `DIM` modifier in the upper third.

If the stream receiver is dropped mid-chunk, the inner loop bails out
but the round itself completes — bifrost is already done, only the UX
narration is interrupted.
2026-05-22 15:11:09 -04:00
Fimeg
2e1f913acc feat: subconscious streaming line render, memory-tool routing for journal/ledger, 1.0.0 + dep bumps
TUI — subconscious live stream:
- Add `subconscious_stream: Vec<String>` to `ChatState`; events.rs already
  pushes here via `SubconsciousToken`/`SubconsciousToolCall`/`SubconsciousToolResult`.
- Render below the phase bar during `TurnPhase::Subconscious`. Newest at
  bottom in `palette.surfacing`; older lines fade upward toward
  `palette.agent_dim` via `lerp_color`; the oldest visible line gets the
  `DIM` modifier on top. Render path now builds `Vec<Line>` instead of
  collapsing into `Line::from(spans)` (the latter forced everything onto
  one horizontal row, which was the visible "1 2 3 across" bug). Lines
  are width-clipped with an ellipsis fallback.

Seeds — journal/ledger routing:
- Aster mandate Phase 3 now records journal entries via the `memory`
  tool at `journal/YYYY/MM/DD.md` (relative to memory root), never via
  `write`/`edit`. Previous phrasing read as a filesystem path and the
  model resolved it against cwd — when souveraine runs from the project
  tree that landed `journal/` and `memory/ledger/` directly in the
  source tree instead of the agent's memfs.
- "How I record" section likewise anchors ledger reads/writes to the
  `memory` tool's `append`/`read`/`write` commands.

Cargo:
- 0.1.0 → 1.0.0.
- tower-http 0.5 → 0.6, notify 6 → 7, crossterm 0.27 → 0.28.

Bug docs (`docs/bugs.md`):
- B-012: TUI doesn't auto-refresh after tool calls complete (event
  pipeline missing a redraw kick after `BackendEvent::ToolResult`).
- B-013: Tool calls stop working mid-conversation — model returns
  `tool_calls=0` for the rest of the session, no error or log.
  Suspected: recent `defs.rs` env-var refactor changing `retain`
  behavior on env vars, possibly nuking tool defs during schema gen.
- B-014: Subagent `run_in_background: true` blocks primary — the flag
  is parsed but never read; `Subagent::execute` unconditionally awaits;
  `SubagentPool` is a stub.

Task queue:
- Split old `live-subconscious-stream.md` into two scoped task files:
  `subconscious-live-reasoning-stream.md` (broader design — ticker,
  cockpit event log, agency-driven surfacing) and
  `subconscious-streaming-line-render.md` (this PR's narrow render
  wiring).
- New tasks: `prompt-override-system.md` (move hardcoded seeds into a
  project `prompts/` truth source the agent can override via
  `souveraine_operations/`), `pasted-content-formatting.md` (visual
  marker for pasted vs composed text).
- `CLAUDE.md` high-impact bullet: replace stale `rename-aster-to-subconscious`
  with `mid-turn-subconscious-checkpoint.md` (matches the c1f851f redesign
  that ripped out the watchdog in favour of `halt`/`intrusive` tools).

Public-branch prep:
- `docs/audit/external-security-audit-prompt.md` — scoped prompt for an
  external creds/PII/license sweep of the `public` branch.
- `commit-history-public.txt` — full public-branch log dump used as
  reference for that audit pass.
2026-05-22 15:10:44 -04:00
Fimeg
7f042534a9 feat: subconscious halt/intrusive tools, mid-turn peek redesign
Same as bdee71b on primary — wholesale src/ sync.
2026-05-22 09:48:32 -04:00
Fimeg
da974be3ab sync src/ from primary 2026-05-21 09:49:06 -04:00
Fimeg
e12a540389 add tool_renderers.rs (missing from cherry-pick) 2026-05-21 09:37:33 -04:00
Fimeg
39b39193b3 fix: tool-cards consumed by fold pass, untrack souveraine.toml 2026-05-21 08:20:03 -04:00
Fimeg
e7beafa22e public: clean up source comments for public distribution 2026-05-20 15:12:58 -04:00
Fimeg
aebdef7c16 public: strip PII from source — Casey refs, home path, email, creds in gitignore
Replace real name, email, and gendered pronouns in doc comments with
neutral phrasing ("the user", "Souveraine Contributors", "TestUser").
Remove absolute home directory path from tool defs doc comment.
Add souveraine.toml to .gitignore so it won't be re-tracked.
2026-05-20 14:48:56 -04:00
Fimeg
7637504351 update README with alpha status and origin note 2026-05-20 13:49:01 -04:00
Fimeg
95dada67a8 feat: add skills directory (context-doctor, feature-dev, souveraine-architecture)
All three skills are methodology-only — no LAN IPs, credentials, or
internal infrastructure details. Safe for public consumption.
2026-05-20 13:44:46 -04:00
Fimeg
845a3f58a9 public: strip docs, memory, saf, ledger, config — source-only branch for alpha testers 2026-05-20 13:35:58 -04:00
Fimeg
74887d32a3 alpha-readiness: Agent Health screen, $MEMORY_DIR fix, tool posture badge
- Settings Agent category now shows agent ID, subconscious pairing,
  memory/subconscious paths, and disk-existence checks (read-only)
- $MEMORY_DIR env var now always set correctly — strips stale host-shell
  leftovers before injecting agent-specific computed values
- Header bar shows [tools shown] / [tools folded] posture badge
- Fix "applies live" footer — only shown for categories with live fields
- Bifrost "primary model" relabeled to "new-agent default" for clarity
- Update alpha-tester-readiness.md task doc and INDEX.md task tracker
2026-05-20 11:42:22 -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
637e854901 alpha-readiness: strip LAN IPs, provider-agnostic wizard labels, fix config path and clipboard
- Default API/STT/TTS URLs changed from Casey's LAN to 127.0.0.1
- Wizard labels renamed: "Bifrost URL" → "API Endpoint URL", provider-agnostic
- Config discovery and wizard persistence now use ~/.souveraine/ over CWD
- Clipboard copy: added OSC 52 fallback, visible error feedback on failure
- Cleaned souveraine.example.toml: removed leaked key and personal paths
2026-05-20 09:16:11 -04:00
Fimeg
0792ece0ce Add T-035 itinerary-persistent-ui task file, update INDEX.md stats to 35 active tasks, add B-010/B-011 cross-references 2026-05-19 19:03:44 -04:00
Fimeg
61c2007226 feat: context pressure denominator, ambient sense formatting, resume timestamp, user nickname system, subagent background fork, settings LLM config, turn lifecycle, ledger lifecycle, subconscious evolution
- Context pressure footer now shows 'ctx 19% of 262k' (B-008)
- Ambient sense formatting as separate timestamp marker (B-010, T-034)
- Resume timestamp indicator with duration (T-032)
- User nickname system sourced from identity frontmatter (T-033)
- Subagent background fork task (B-009, T-031)
- Settings LLM config task (T-030)
- Turn lifecycle and sensorium completion task
- Ledger entry lifecycle task
- Subconscious evolution documentation
- Multimodal input metadata task
- Image support module (src/core/image.rs)
- Various refactors: config, seeds, session, consciousness engine, server modules, bridge, API handlers, TUI cockpit/commands/render, health panel, presence, setup wizard
- website/docs submodule update
2026-05-19 17:02:09 -04:00
Fimeg
f93f9ef45b feat: input cursor navigation, paste handling, word-boundary movement
- Left/Right arrows move cursor by char boundary, Backspace deletes at
  cursor, Char inserts at cursor (not end-of-string)
- Home/End jump to start/end, Ctrl+Left/Right skip by word
- Cursor renders at the correct visual position (wrapping-aware)
- Bracketed paste detection (crossterm 0.27 feature) — pastes >3 lines
  tagged with a system message so the agent sees pasted material
- Paste inserts at cursor position with no size cap
- docs/bugs.md updated: B-006 fixed
- CLAUDE.md, docs/tasks/INDEX.md updated for refactor status
2026-05-19 12:52:11 -04:00
Fimeg
61048b61e5 refactor: split settings.rs into focused modules
settings.rs (1657 lines) → 5 files in src/ui/settings/:
  mod.rs — re-exports, module declarations
  types.rs — PanelFocus, Category, FieldLoc, EditableValue, SettingsMode
  view.rs — ActiveAgentSettings, SettingsView struct + data methods
  key_handling.rs — key event dispatch + SettingsAction enum
  draw.rs — draw functions (draw, draw_header, draw_category_list,
             draw_field_panel, draw_footer, draw_saved, draw_error)
2026-05-19 11:24:24 -04:00
Fimeg
ca2762a302 refactor: split chat.rs into focused modules
chat.rs (3265 lines) → 8 files in src/ui/chat/:
  mod.rs — re-exports, helpers, TopButtonBar
  events.rs — event/subcommand dispatch, input handling
  commands.rs — /slash command processor
  render.rs — main draw function, chat/layout rendering
  cockpit.rs — subconscious pane (the "cockpit" panel)
  overlays.rs — overlay/modal draw functions
  footer.rs — status bar rendering
  wrap.rs — word-wrap utility
2026-05-19 10:26:34 -04:00
Fimeg
d3d485f9e8 refactor: split app.rs and local.rs into focused modules
app.rs (3540 lines) → 10 modules: mod.rs (event loop core), welcome,
dashboard, presence_screen, manager_screen, voice, settings_handler,
splash, images, agents.

local.rs (1827 lines) → 5 modules: mod.rs (Backend impl), turn
(run_turn + tool loop), consciousness (TurnInjector + surfacings),
subagent (LocalSubagentRunner), energy (balance writer + event).

No behavioral changes — same code, different files. 169 tests pass.
2026-05-19 10:26:34 -04:00
Fimeg
ab1167e99d tui: cockpit pane scroll, word-aware input wrap, footer cleanup
Cockpit thinking/subconscious panes now scroll independently under mouse
wheel. Word-aware input wrapping preserves cursor position. Footer
stripped of posture label, scroll hint, S-Ret indicator — only
conv ID and pressure remain.
2026-05-18 21:31:02 -04:00
Fimeg
5586a7937c sensorium adapter reckoning — ChannelAdapter trait, Matrix inbound path, corrupt-box healing 2026-05-18 20:59:57 -04:00
Fimeg
12ccc4e6de fix: neutral description for public consumption 2026-05-18 16:10:09 -04:00
Fimeg
39fc49fbb8 fix: set MSRV 1.94 so users get a clear error instead of cryptic dep failure 2026-05-18 16:09:24 -04:00
Fimeg
93d4baa98d WIP: context doctor session + audit-fixes accum 2026-05-18 15:58:46 -04:00
Fimeg
aed114f998 chore: archive completed tasks, stale handoffs, and stray files
- heartbeat-n1-after-autonomous, n100-archivist-compression moved to
  tasks/archive/ — the first landed this session, the second was
  already built before it.
- Dated session handoffs (May 14c/15/16) moved to archive/handoffs/.
- Rescued a stray bug log to archive/bugs.md and removed the stray
  nested souveraine/ directory.
- Filed stray working files (an old chat.rs copy, a one-off script,
  terminal-paste garbage, a prev log) under docs/archive/strays/,
  which is gitignored — kept on disk, out of the repo.
- INDEX.md task list refreshed to drop archived references.
2026-05-18 11:13:37 -04:00
Fimeg
1a95139261 feat: sensorium ambient-context injection, wheel-scroll, click-to-copy fix
Sensorium: a new sensorium::ambient_line() builds a one-line ambient
sense — current date/time and the connecting user — prepended to the
user message every turn, for both the primary (send_with_signals) and
the subconscious (subconscious_tool_loop). The subconscious no longer
guesses the date; ledger entries get stamped with the real time.

TUI scroll-wheel: the chat viewport now responds to mouse ScrollUp/
ScrollDown, routed through the same scroll field the arrow keys move
(3 lines per notch).

TUI click-to-copy fix: copy_message_at was hit-testing against stale
line indices — span_spans recorded message positions against the
pre-wrap buffer, but wrap_lines reflows it and shifts every index past
a wrap point. draw_messages now builds a prefix-sum remap from pre- to
post-wrap indices and translates the spans before storing them.
arboard itself was fine; the bug was the bookkeeping.
2026-05-18 11:03:03 -04:00
Fimeg
ebb0bf4e65 feat: subconscious parser fix, heartbeat surfacing pickup, first-run cleanup
Subconscious N+1: parse_observations now reads the natural
`- **label**: content` markdown the model actually produces. The rigid
source/content/urgency triple matched nothing the model emitted, so
every observation was dropped and the pass surfaced "no anomalies
detected" every time. Legacy triple kept as a fallback. Tests cover
the live output captured from a real pass.

Heartbeat N+1: autonomous-cycle surfacings stash to
pending-surfacings.jsonl (src/core/nervous/pending.rs) and replay in
the TUI/CLI on next connect, instead of draining silently into a
stream nobody reads.

First-run: souveraine init demoted to a config-template writer; the
TUI setup wizard is the onboarding path. The wizard now persists the
Bifrost URL/key/model it collects (to disk and the OS keyring) before
agent creation, so the next launch starts configured. Default agent
name changed from Ani to Souveraine.

Docs: alpha-tester-readiness, strip-emojis, and truncation-signal-polish
task notes.

Also sweeps in pre-existing uncommitted work on this branch
(bifrost.rs, compact/plan.rs, and parts of local.rs / main.rs).
2026-05-18 10:54:11 -04:00
Fimeg
332dd4bf65 fix(tui): interjection delivery, turn cancel on agent switch, resume-or-new
Three turn-lifecycle bugs Casey hit in daily use.

④ Interjections: the backend drains the queue between tool rounds and
   after the final LLM call, but one arriving during the chunked
   stream-out — or after the turn ended — just sat in the queue, never
   delivered ("she isn't getting that message"). On turn completion
   (Done / channel close) any still-queued interjections now open a
   fresh turn. submit() is split into spawn_turn() so this delivery
   reuses the Interjection bubbles instead of duplicating a User bubble.

⑤ Agent switch mid-stream: select_agent() dropped the chat surface
   without cancelling the running turn, so run_turn kept executing
   orphaned and resurfaced as "doing the same message again" on a later
   /resume. select_agent() now fires the turn's cancel token first
   (cancel_active_turn) — the backend commits partial output and stops.

⑥ Resume-or-new: entering chat silently auto-created a conversation.
   ChatState::connect now offers it — offer_resume_or_new() lists the
   agent's prior conversations (excluding the just-created empty one)
   and raises the ConversationPicker with an [n] new option; silent
   when the agent has no prior conversation.
2026-05-17 19:07:08 -04:00
Fimeg
a2d89036c2 feat(settings): per-agent model field — Settings follows the active agent
Casey reported model changes in Settings not taking effect on the agent
he meant. Root cause: Settings only ever edited the global
[bifrost] primary_model, and a save silently pushed that global change
onto whatever agent the open chat happened to be — never the agent the
user thought he was configuring, and nothing at all with no chat open.

- New AgModel field in the Agent settings category, backed by
  ActiveAgentSettings (id, name, model) loaded from the active agent's
  agent.json on Settings entry — so the field shows and edits THIS
  agent's llm model, and follows agent switches.
- On save, an AgModel change is pushed to that agent via the backend's
  update_agent_model (also refreshes cache + SQLite mirror).
- bifrost.primary_model is now purely the new-agent default; the
  confusing primary_model -> active-agent cross-push is removed.
2026-05-17 18:31:23 -04:00
Fimeg
f0290f7eed feat: default-profile sufficiency — substrate prompt, seeding, n1 gate
Audit found the default profile's subconscious running on a hollow stub
and the n1_enabled toggle wired to nothing. Fixes:

- New src/core/seeds.rs: SUBSTRATE_PROMPT (how the substrate works),
  DEFAULT_PERSONA (grown-from template), DEFAULT_COVENANT, DEFAULT_STATE,
  SUBCONSCIOUS_MANDATE, subconscious_persona().
- prompt.rs: build_system_prompt_full injects SUBSTRATE_PROMPT whenever
  [agent] system_prompt is unset — every agent wakes knowing its world.
- agent_inventory.rs: new agents seeded with the grown-from persona +
  covenant + state; subconscious seeded with real persona + four-fold
  mandate + the six ledger files, no more placeholder stub.
- local.rs: n1_enabled now actually gates the N+1 pass (global AND
  per-agent must be on). It was read nowhere before.
- Drop the unused kimi-k2.5-turbo model everywhere; default is now
  openai/kimi-k2.6 (config.rs, main.rs template, both toml files, setup).
- chat.rs: complete the truncated wrap_text for the btw word-wrap fix.
2026-05-17 18:16:20 -04:00
Fimeg
3096b9d7b5 feat: non-blocking N+1 + iMessage-style chat surface
Decouple the subconscious pass from the user-facing turn so she is
never held hostage to N+1:

- PrimaryComplete event releases the input the moment her response
  commits; the N+1 pass runs behind it on the still-open stream
- on_response takes an owned session snapshot — no live DashMap ref
  held across the (long) pass, so a concurrent next turn can't
  deadlock on the shard lock
- TurnPhase::Subconscious — the status line reads "Subconscious",
  not "Streaming" (bug B-002)
- the subconscious now persists her own Session across N+1 passes,
  with her own compaction engine wired in

Rework the chat surface toward bubbles back and forth:

- tool calls fold into a footer on her bubble (Ctrl+T expands the
  full cards); leading/trailing runs attach to the right bubble
- streaming tail fades toward the background with a live caret
- in-flight tools breathe cyan↔purple; settle to ✓/✗ outcome glyphs
- click any bubble to copy it — ⧉ title cue, arboard clipboard
- breathing room around tool runs; entry shimmer on new messages
2026-05-17 14:08:51 -04:00
Fimeg
d55bb99ba9 chore: track Cargo.lock, gitignore voice recordings
souveraine is a binary — committing Cargo.lock gives reproducible
builds when installing on another machine and a stable dependency set
for the audit. Voice-input test recordings (voice-recording-*.mp3) are
transient and now ignored.
2026-05-16 20:07:35 -04:00
Fimeg
749a72b8a0 feat(tui): semantic stream buffer for smooth token flow
Streamed tokens no longer append straight to the visible message.
They land in a stream_buffer; advance_tick releases a proportional
slice each frame (~1/3 of what is waiting, min 8 bytes), so a burst
of tokens reveals as steady flow rather than a sudden block. The cut
prefers a nearby whitespace break so no partial word flashes.

finalize_streaming flushes the buffer so a turn never ends with
unrevealed text. The 30 FPS redraw decoupling was already in place.
2026-05-16 20:00:25 -04:00
Fimeg
b98daa7f25 feat(tui): cenno / her-voice interstitial register model
Mid-turn text the model emits alongside tool calls is no longer a flat
italic line. A new Register splits it in two: a *cenno* — a short
ambient aside attached to tool work, kept quiet and italic — and
*her-voice* — a substantive passage rendered with a left gutter bar and
no italic, so it reads as her actual voice rather than a whisper.

The backend classifies by word count at emit time against the new
tui.cenno_word_threshold (default 30), exposed as an editable field in
the Settings TUI category.
2026-05-16 19:56:05 -04:00
Fimeg
73ab402b19 feat(tui): HealthPane — live substrate vitals panel
A second sidebar component beneath the cockpit. Shows context pressure
(tiered bar), backend connectivity, N+1/N+25/N+100 cadence, last
compaction warning, inference strain (504/429/error tallies — the 504s
Casey kept seeing), energy and mood, plus session uptime in the title.

Pure accumulation from existing TuiEvents — no new backend wiring.
2026-05-16 19:50:50 -04:00
Fimeg
27d86fe4ca refactor: rename Aster -> subconscious across src/
Aster is Ani's personal subconscious-agent name, not a framework
concept. The codebase now refers to the N+1 pass and its components as
subconscious everywhere — const names, fn names, variables, comments,
the schedule source tag, the todo source enum, and UI strings.

Mechanical rename, no behaviour change. grep -i aster src/ now returns
only Faster-Whisper. reference/ and docs/ historical context untouched.
2026-05-16 19:44:51 -04:00
Fimeg
5c2632762a feat(archivist): land N+100 memory synthesis pass
ArchivistEngine scans journal entries written since the last synthesis,
sends them to a compression model, and writes a dense fragment to
system/synthesized/{end-date}.md with a covers-marker for idempotent
resume. ConsciousnessEngine::on_response calls maybe_synthesize — fires
on interval (maintenance) or pressure threshold (emergency), no-ops when
no journal entries are new. Replaces the placeholder pressure check.

This was uncommitted work-in-tree; preserved here as its own commit so
it is not lost or conflated with unrelated changes.
2026-05-16 19:40:30 -04:00