Watch
1
0
Fork
You've already forked souveraine
0
Commit graph souveraine/src/server/conversation.rs
Author SHA1 Message Date
Fimeg
d7965a57fd two swipes, one progress; home is zone 0; pocket is a belief 2026-08-05 19:16:41 -04:00
Fimeg
ce7009e466 fix: char-boundary panic in tool cards + green up CI clippy gate
ToolCard styled the status glyph with a hardcoded byte offset 0..3, but
✓/✗/⟳ are 3-byte chars sitting at bytes 2..5 of "  {glyph}". The split
landed mid-char and panicked at render in tuie's style slicing. Compute
the glyph region as 2 + glyph.len_utf8() instead.

Then took cargo clippy -- -D warnings from 312 failures to clean:
- scoped #![allow(dead_code)] on WIP scaffolding (federation, sensorium,
  gitea_memory, model_router, session, subagent…); gate stays live on
  active code so new orphans still fail
- scoped #![allow(deprecated)] on the legacy ratatui render path, marked
  pending removal at tuie parity — no migration on code we're deleting
- declare the gui feature (forwards to tuie/gui) — the cfg was real intent
- real fixes: duplicate SaveAndGoBack arm + dead Err arm, base64::encode,
  4 unused imports, dead assignment, private-type leak, dedup'd if/else
  branches, manual clamp/strip, &PathBuf→&Path, collapsible matches
2026-06-26 10:12:27 -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
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
c51b53718d fix: Bifrost tool-call schema, welcome dedup, tool cards, PNG diagnostics
Broad-stroke pen-adjustment landing four pieces in one commit.

1. Bifrost tool-call schema (unblocks turns + Aster + reflection)
   BifrostMessage now carries optional tool_calls / tool_call_id / name
   with skip_serializing_if=None so unrelated turns keep the {role,content}
   wire shape. All three tool loops rewritten to push real OpenAI tool-use
   shape instead of a stringified JSON blob in content: backend/local.rs
   (Ani's loop + LocalSubagentRunner), server/consciousness_engine.rs
   (Aster's N+1 pass), core/reflection/mod.rs (N+25). This is the root of
   the "first memory tool works, then everything fails on turn 2" symptom
   and the silent Aster pipeline failure — same wire bug, three loops.

2. Welcome avatar dedup + scale-up
   Presence overlay was rendering on both Welcome and Dashboard, doubling
   up with the centered inline portrait on Welcome. Gated to Dashboard
   only. Welcome portrait now uses render_scaled at WELCOME_SCALE=2 —
   visibly larger, the focal point of the landing screen.

3. PNG portrait diagnostics
   Silent .ok()? failures replaced with tracing::warn! showing the actual
   decode error. load_portrait_from_memfs probes the sibling
   memory.git/assets/ layout in addition to memory/assets/ since
   server-managed agents live under memory.git/.

4. Tool-call rendering polish
   New BackendEvent::ToolCall { id, name, arguments, round } and
   BackendEvent::ToolResult { id, name, output, is_error } replace the
   literal "🔧 Round 1 — executing: Bash, Memory" Token text spew.
   ChatMessage::Tool variant + ToolResultBlock carry card state.
   render_tool_card draws bordered cards: status glyph (⟳/✓/⚠), header
   with name and round, compact JSON arg summary, output preview through
   markdown.rs (12 lines + "… (N more)" tail). Errors paint red.

Build clean. 109/109 tests pass.

Docs: archive prior handoffs to docs/archive/handoffs/, refresh
HANDOFF_NEXT.md, add four new task files (tui-message-interactions,
agent-profile-and-repo-manager, per-agent-seed-and-instances,
code-mode-tool-rendering) tracking the next-instance work.
2026-05-12 13:09:17 -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