Watch
1
0
Fork
You've already forked souveraine
0
Commit graph souveraine/Cargo.toml
Author SHA1 Message Date
Fimeg
3ff6ffaa7f license: relicense AGPL-3.0; bring SAF docs online; keep CLAUDE.md + docs/ local
SAF (souveraine architecture files) is now the in-repo doc set. working notes
(CLAUDE.md, docs/) stay on disk, gitignored.
2026-06-19 10:17:56 -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
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
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
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
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
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
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
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
6b5a3c5959 ratatui 0.30 upgrade + ratatui-image for real photo rendering
ratatui-image v11 provides kitty/sixel/halfblock rendering. Loads the
agent's portrait photo as a terminal image protocol alongside the existing
half-block PortraitSource. On supportng terminals (Kitty, WezTerm, iTerm2,
Ghostty) the Welcome screen shows the actual photograph instead of the
18x18 pixel-art downsample.

Also includes the Agent Manager screen (press `i` on Welcome) with
per-agent card data: seed glyph, uptime %, instance count, memory files,
pubkey prefix, description.
2026-05-12 15:49:39 -04:00
Fimeg
543ae50103 feat(tui): per-agent portrait loading from agent memfs assets/
Tier 2 of the Presence visual stack lands as PNG/JPEG → palette grid:
the same half-block renderer keeps working, but the source pixels now
come from a per-agent portrait file when one is present. Blink, yawn,
strain, processing, and affection overlays still paint from the
hand-crafted Annie palette (rows 6, 7, 10, 11) so the seven animation
states keep working regardless of which portrait is loaded underneath.

How it loads:
- `<memfs_root>/assets/portrait.png` (preferred)
- `<memfs_root>/assets/portrait.jpg`
- `<memfs_root>/assets/portrait.jpeg`

`assets/` is deliberately outside `system/`, which is the auto-pinned
context territory built by `src/core/prompt.rs`. Portrait bytes never
land in the agent's context window.

If no portrait exists, Presence falls back to the hand-crafted Annie
palette grid silently — no error, no warning. Same renderer, same
behavior; the visual identity just stays at Tier 1.

What's new:
- `image = "0.25"` (default-features off; only `png` and `jpeg` features).
- `portrait::PortraitSource` — pixel grid loaded from `from_path`. Uses
  `image::open` + `resize_exact(Lanczos3)` to downsample to the existing
  PORTRAIT_W × PORTRAIT_H grid.
- `portrait::pixel_color` — single resolution path: source-when-loaded
  for non-overlay pixels, hand-crafted palette for overlay rows.
- `Presence::load_portrait_from_memfs(root)` — looks for the three
  candidate filenames; silently no-ops when absent.
- App refreshes the portrait when the dashboard refresh walks the
  agent's memory repo (`local_repo.root()`).

Note on architecture: this is "Tier 2" via downsampled palette rather
than via terminal image protocols (kitty/sixel). It works in EVERY
terminal, costs no dependency on capability detection, and stays
consistent with the half-block aesthetic the rest of the TUI uses.
True image-protocol rendering can land later as a separate enhancement;
the data flow (per-agent PNG in agent memfs assets/) is already correct
for that future path.

Build clean.
2026-05-12 12:24:23 -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
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
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