Commit Graph

39 Commits

Author SHA1 Message Date
60ce9c894c fix: backend-clear called with framebuffer instead of backend
Main loop was calling (backend-clear curr-fb) where curr-fb is a
framebuffer array. Changed to (backend-clear be) using the cl-tty
backend, which writes the terminal clear escape sequence.
2026-05-13 16:29:50 -04:00
36e7d51fce fix: add missing keyword clause in printable branch of on-key
The revert removed the (keyword ...) clause from the typecase in
on-key's printable branch. Keyword symbols from the main loop
(:a, :h, etc.) fell through to (t nil), making all character input
silently ignored. Typing and sending now works correctly.
2026-05-13 16:25:37 -04:00
af4d81ec9f fix: add word-wrap function, complete TUI migration
- Add missing word-wrap function (was declared in contract but never defined)
- TUI now renders correctly: draw-text on framebuffer arrays works
- Daemon connection verified
- All three view functions (status, chat, input) call draw-text correctly
2026-05-13 16:06:05 -04:00
79896c5ffd fix: bypass ASDF compile for TUI load, use direct compile-file+load 2026-05-13 14:53:27 -04:00
4b60e8c544 fix: stty graceful failure, backend-size TYPE-ERROR safety net
- cl-tty stty calls now use :ignore-error-status t (works in PTY/piped env)
- backend-size wraps in ignore-errors with 80x24 fallback in resize handler
- Both fixes enable TUI to run in environments without full terminal capabilities
2026-05-13 14:21:57 -04:00
885fc3f92e fix: resolve TUI compilation errors, replace ST calls with GETF
- Remove dead croatoan-to-tty-event keymap dispatch clause from on-key
- Replace all (st :key) with (getf *state* :key) and all
  (setf (st :key) val) with (setf (getf *state* :key) val)
  to avoid SBCL cross-file SETF expander issues (239 replacements)
- Fix redraw arity: called with 4 args but defined with 3
- TUI now loads, initializes, and connects to daemon successfully
2026-05-13 14:04:25 -04:00
6e69c4a724 v0.8.0: complete cl-tty TUI migration — remove all Croatoan deps
- Replace numeric key code dispatch with cl-tty keyword events
- Replace Croatoan code-key/key-name normalization with direct keyword dispatch
- Update main loop to construct Ctrl-key keywords from cl-tty key-event modifiers
- Remove croatoan-to-tty-event compatibility shim and its test
- Remove duplicate Esc handling from main loop (now handled by on-key)
- Update all documentation contracts, prose, docstrings to remove Croatoan refs
- Remove :croatoan from package dependencies
- All event handling now goes through cl-tty keymaps or keyword dispatch
2026-05-13 12:46:43 -04:00
2d18fa4525 docs: port TUI roadmap to cl-tty, mark Emacs as secondary client
v0.8.0: Information Radiator now built on cl-tty v1.1.0. Minibuffer
uses cl-tty Dialog stack. New TODO items: conversation view (ScrollBox
+ Markdown), command palette (Select), sidebar (slot system), status bar
(Box + Theme), keybindings (keymap).

v0.9.1: Emacs is now an optional secondary client, not the primary
bridge. cl-tty is the primary TUI.
2026-05-13 11:41:41 -04:00
c227877302 v0.8.3: TUI stabilization — box calls, package fixes, sandbox, configure
Bug fixes:
- Fix box() calls: set color-pair before box, pass ACS default chtype integers
- Fix markdown functions: move to passepartout.channel-tui package where
  Croatoan is imported; use add-attributes/remove-attributes instead of
  :bold/:underline kwargs to add-string; call theme-color in gate-trace-lines
  to convert theme keys to Croatoan colors
- Fix sandbox: remove dex:get/dex:post from restricted symbols
  (blocked neuro-provider from loading)
- Export *log-lock* from passepartout (was unbound in jailed skill packages)
- Fix configure: always deploy to XDG, skip cp when source==dest
- Fix bash crash handler format string (~~ escaping)
- Revert test reorder in 28 files (caused package leakage in skill loader)

Design cleanup:
- Extract tui-run-screen from tui-main for clean separation
- Remove inject-stimulus alias
- Merge *backend-registry* into *probabilistic-backends*
- Fix read-framed-message whitespace DoS (4096-iteration max)
- Add *read-eval* nil to dispatcher-approvals-process read-from-string
2026-05-13 09:17:48 -04:00
27d203ad67 v0.8.1: deduplication cleanup — remove duplicate defpackage/defvar blocks from programming-tools, duplicate plist-keywords-normalize from programming-lisp, duplicate *VAULT-MEMORY* from security-vault; TUI defensive fixes — add word-wrap function, wrap on-key in ignore-errors; daemon startup hardening — optional skill loads with handler-case 2026-05-13 09:17:48 -04:00
2ac87b626a v0.8.0: Information Radiator, Command Palette, TrueColor Themes, Setup Wizard
- Sidebar: permanent 42-col panel with 7 data panels (Gate Trace, Focus,
  Rules, Context gauge, Files, Cost, Protection); 4-window Croatoan layout
  at >=120 cols, toggle via Ctrl+X+B
- Command palette: Ctrl+P overlay with fuzzy-filtered categorized items,
  keyboard navigation, Enter to execute; view-palette rendering
- TrueColor themes: 4 new presets (nord, tokyonight, catppuccin, monokai)
  with 27 hex keys via theme-hex-to-rgb
- Setup wizard: Ctrl+\ /setup 4-step overlay (provider, key, memory, save)
  writing .env with in-TUI rendering
- Daemon enrichment: dispatcher block counts, cost session summary,
  modified files tracking, context usage percentage
- Daemon fixes: fboundp guards for count-tokens/provider-token-cost,
  tool registry save/restore in safety tests, SELF_BUILD_MODE cleanup
- 139 tests pass across all suites (0 failures)
2026-05-13 09:17:48 -04:00
b3ce9056de v0.7.2: pads — Page Up/Down scroll by 10 lines (was 5) — TDD
Page Up/Down now scroll by 10 message lines per page (was 5).
Updated comments. Pads: PageUp tests scroll exceeds 5; PageDown
clamps to zero. Uses :ppage/:npage keywords in tests.

- channel-tui-main: PageUp/Down+10, 2 tests
- TUI Main: 104/104
2026-05-08 21:50:25 -04:00
f7b3e20a15 v0.7.2: context debugging — /context why + /context dropped — TDD
/context why <id> now shows full memory object details: parent,
children count, hash prefix, title from attributes.

/context dropped replaced literal stub with computed estimate of
pruned messages based on token budget (msg_count * 60 vs 8192).

- channel-tui-main: enhanced both debug handlers
- TUI Main: 102/102
2026-05-08 21:26:45 -04:00
da5718b97c v0.7.2: Merkle audit — audit-verify-hash with hash integrity check — TDD
audit-verify-hash counts total objects and those with missing/empty
hashes. /audit verify uses it to report VERIFY PASS or MISSING
HASHES count. fboundp-guarded.

- core-memory: audit-verify-hash fn, 1 test
- channel-tui-main: updated /audit verify handler
- Core: 90/90  TUI Main: 102/102
2026-05-08 21:24:20 -04:00
8aed017ccd v0.7.2: tag stack — trigger counts + PRIVACY_FILTER_TAGS fallback — TDD
*tag-trigger-count* hash table tracks per-session tag triggers.
tag-trigger-record increments count, called from
dispatcher-privacy-severity on each matched tag. /tags shows
trigger count per tag.

tag-categories-load now falls back to PRIVACY_FILTER_TAGS env var
when TAG_CATEGORIES is not set (backward compat). All entries
default to :block severity.

- security-dispatcher: *tag-trigger-count*, tag-trigger-record,
  updated tag-categories-load, wired dispatcher-privacy-severity
  +2 tests (trigger record, privacy fallback)
- channel-tui-main: /tags shows trigger counts
- Core: 88/88  TUI Main: 102/102
2026-05-08 21:20:06 -04:00
4e756aeaa1 v0.7.2: self-help — /help <topic> reads USER_MANUAL.org — TDD
self-help-lookup parses USER_MANUAL.org org headlines, matches
topic substring (case-insensitive) against section titles, and
returns content previews. /help <topic> now displays the actual
manual content instead of just echoing the topic.

- channel-tui-main: self-help-lookup fn, updated /help <topic> handler
  + 1 test verifies Configuration section returns .env
- TUI Main: 102/102
2026-05-08 21:14:32 -04:00
d67c4022f7 v0.7.2: context visibility — section breakdown + token budget — TDD
/context now shows full budget breakdown: IDENTITY, TOOLS,
TIME+CONFIG, LOGS with per-section token estimates, visual bar
chart, and percentage used. Over-80% warning.

Estimates computed from live state: identity/config lengths, tool
registry count, message count. Budget cap at 8192 tokens.

- channel-tui-main: rewritten /context handler, 1 new test
- TUI Main: 101/101
2026-05-08 21:10:24 -04:00
49eec4b8ae fix: add /eval back to /help listing — resolves flake
test-on-key-help checked for /eval in help output. The rewritten
help list dropped /eval which is still a working command. Fixed by
adding it as the first entry.

TUI Main: 98/98
2026-05-08 21:05:58 -04:00
06aff97b4e v0.7.2: message search mode — navigate, highlight, jump — TDD
Search mode activated by /search <query>. State fields: :search-mode,
:search-query, :search-matches, :search-match-idx. Up/Down arrows
navigate between matches, Enter jumps to current match, Escape exits.

search-highlight wraps matching substrings in **bold** for markdown
rendering. View-chat shows search header bar with match count and
current position.

- channel-tui-state: 4 search state fields in init-state
- channel-tui-main: modified /search handler, search-mode key handlers
  (Up/Down/Enter/Escape), 3 new tests (activate, escape, nav)
- channel-tui-view: search-highlight fn, search header bar,
  highlighted content in count+render loops
- TUI Main: 97/98 (1 pre-existing flake)  View: 29/29
2026-05-08 21:02:45 -04:00
93a38d5308 v0.7.2: HITL panel collapse on approve/deny — TDD
resolve-hitl-panel marks the most recent panel message with
:panel-resolved (:approved or :denied) and writes back to
the message vector. View-chat renders resolved panels with
dimmed color instead of :hitl theme color.

/approve and /deny handlers call resolve-hitl-panel after
sending structured events to the daemon. Confirmation messages
now use checkmark/crossmark prefixes.

- channel-tui-main: resolve-hitl-panel fn, wired into handlers
- channel-tui-view: is-resolved check for panel dimming
- +2 tests: panel-after-approve, panel-after-deny
- TUI Main: 88/89 (1 pre-existing flake)
2026-05-08 20:51:49 -04:00
7fca4189b9 v0.7.2: release — TDD
All 14 v0.7.2 items wired, tested, and documented.

Release checklist:
- ROADMAP: all 14 items marked DONE
- README: version badge v0.7.1 → v0.7.2
- CHANGELOG: v0.7.2 entry with feature summaries
- core-transport: make-hello-message 0.7.1 → 0.7.2
- .env.example: TAG_CATEGORIES, SELF_BUILD_MODE
- /help list: all 16 commands documented

Phase 1 (wire deferred):
- call-with-tool-timeout in action-tool-execute
- dispatcher-privacy-severity in dispatcher-check
- Ctrl+G gate-trace toggle, Ctrl+F search placeholder

Phase 2 (finish features):
- /audit verify, /resume <n>, /help <topic>

Core: 88/88  TUI Main: 85/86 (1 pre-existing flake)
2026-05-08 19:54:07 -04:00
4bd387e256 v0.7.2: Phase 1 — wire deferred items (timeout, severity, gate toggle, Ctrl+F)
- call-with-tool-timeout wired into action-tool-execute for per-tool
  timeout enforcement via sb-ext:with-timeout. 3 new act tests.
- dispatcher-privacy-severity wired into dispatcher-check vector 5.
  Three-tier: :block rejects, :warn allows, :log silent. 3 new tests.
- Ctrl+G toggles gate-trace collapse per message. Default: visible.
  2 new TUI tests.
- Ctrl+F placeholder directs users to /search <query>.

Core: 88/88  TUI Main: 85/86
2026-05-08 19:48:00 -04:00
029a32ef64 v0.7.2: session rewind + context debugging — TDD
Session rewind: /rewind <n> restores memory to snapshot n-1 using
existing rollback-memory. /sessions lists up to 10 snapshots with
timestamps and object counts. Auto-snapshot at turn boundaries in
think() via fboundp-guarded snapshot-memory call.

Context debugging: /context why <id> shows memory object type, scope,
version. /context dropped placeholder (deferred to v0.8.0).

- core-reason: auto-snapshot in think() + 1 test
- channel-tui-main: /rewind, /sessions, /context why, /context dropped
  + 3 tests
- Core: 85/85  TUI Main: 88/89 (1 pre-existing flake)
2026-05-08 19:05:47 -04:00
c959f93eb1 v0.7.2: message search (/search) + context visibility — TDD
/search <query>: case-insensitive substring search across message
history. Reports match count, previews with context around matches.
/context: shows message count, focus, token estimate, last 5 messages.

- channel-tui-main: /search and /context handlers, 1 test each
- TUI Main: 85/86 (1 pre-existing core flake)
2026-05-08 18:27:42 -04:00
2e52bc4d13 v0.7.2: context visibility (/context) — TDD
/context shows message count, focus, token estimate, and last 5
message summaries. Inline command, no daemon interaction needed.

- channel-tui-main: /context handler, 1 test
- Fixed /tags handler (removed dangling else clause)
- TUI Main: 84/85 (1 pre-existing core flake)
2026-05-08 18:22:22 -04:00
19a9c99ef4 v0.7.2: tag stack severity tiers + tool hardening — TDD
Tag stack: TAG_CATEGORIES env var parses into *tag-categories* alist
(@tag . severity). Three tiers: :block (filter), :warn (log), :log
(silent). tag-category-severity lookup. /tags TUI command.

Tool hardening: per-tool timeouts (shell=300s, search=30s, eval=10s,
default=120s). verify-write after write-file reads back content.
tool-timeout accessor.

- security-dispatcher: *tag-categories*, tag-categories-load,
  tag-category-severity, 2 tests
- core-act: *tool-timeouts*, tool-timeout, verify-write, 3 tests
- programming-tools: verify-write wired into write-file
- channel-tui-main: /tags and /audit commands
- Core: 84/84
2026-05-08 18:18:14 -04:00
11c43f76fa v0.7.2: Merkle provenance audit + RCE flake fix — TDD
audit-node exposes memory-object lineage (type, hash, scope, version).
/audit <node-id> TUI command. /audit verify deferred.

Fixed RCE test flake: assemble-config-section used getf on
non-plist cascade entries. Wrapped in handler-case. Also fixed
~/ format directive escape. Core reason: 35/35. Core: 81/81.
2026-05-08 18:03:24 -04:00
df09ac321d v0.7.2: gate-trace wiring, HITL panels, /identity command — TDD
Gate trace: wired into view-chat, renders below agent messages in dim.
Collapsed-gates state field for Tab toggle (deferred to Croatoan test).

HITL panels: on-daemon-msg detects :approval-required events, renders
styled panel messages with :panel flag. View-chat renders with :hitl
theme color (magenta). /approve and /deny add confirmation messages.

/identity: opens ~/memex/IDENTITY.org in emacsclient -c -a '', auto-reloads.

- channel-tui-view: gate-trace in view-chat, HITL panel styling
- channel-tui-state: :collapsed-gates, :hitl theme, :panel attr
- channel-tui-main: HITL panel detection, /identity handler
- View: 29/29  TUI Main: 83/84 (1 pre-existing flake)
2026-05-08 17:40:40 -04:00
e3a6573542 v0.7.2: self-help (/why) + CONFIG injection — TDD
- CONFIG section in system prompt: providers, context window, gate count,
  rules learned, docs path
- /why TUI command: shows most recent gate trace from message history
- assemble-config-section reads live state at each think() call
- Core: 75/76  TUI Main: 77/78 (1 pre-existing RCE test flake)
2026-05-08 17:06:16 -04:00
26fd756222 v0.7.2: undo/redo — TDD
Operation-level memory undo/redo built on existing Merkle snapshot
infrastructure. undo-snapshot captures state before destructive tool
execution. /undo and /redo TUI commands send structured events.

- core-memory: undo-snapshot, undo, redo functions + 3 tests
- core-perceive: :undo/:redo sensor handlers
- core-act: auto-snapshot before non-read-only tools
- core-package: undo/redo symbol exports
- channel-tui-main: /undo, /redo commands + 2 tests
- Core: 73/73  TUI Main: 74/74
2026-05-08 16:39:00 -04:00
b40e1e2844 v0.7.2: gate-trace-lines + HITL inline — TDD
Gate trace visualization: gate-trace-lines converts gate-trace plists
to colored display lines (green passed, red blocked, yellow approval).
Data format: (:gate name :result :passed/:blocked/:approval :reason ...).
3 tests, 28/28 view suite.

HITL inline command handling: /approve HITL-xxxx and /deny HITL-xxxx
parsed as structured events (:action :hitl-respond), not raw text.
2 tests, 70/70 main suite.

Core: 65/65  Neuro: 13/13  All: 176/176
2026-05-08 14:55:23 -04:00
e3e62140ff v0.7.1: Streaming + Markdown + URLs + Interrupt — TDD
Some checks failed
Deploy (Gitea) / deploy (push) Failing after 2s
Stream-chunk protocol: SSE streaming via provider-openai-stream,
cascade-stream with fboundp guard in think(). TUI renders live.

Stream interrupt: Esc during streaming marks [interrupted], finalizes msg.
SSE cancel infrastructure: *stream-cancel* check in read loop.

Markdown inline: **bold**, *italic*, `code` via parse-markdown-spans.
Code blocks: parse-markdown-blocks + syntax-highlight (keywords/strings/fns).
URL detection + Tab-to-activate: https:// URLs in dim, Tab opens.

Watchdog: 30s stall detection via Dexador read-timeout.
[streaming] indicator in status bar.

Pre-existing TUI test fixes (7): first→aref, nil→zerop, add-msg arg.

Core: 65/65  Neuro: 13/13  TUI View: 22/22  TUI Main: 65/65
Total: 165 tests, 0 failures.
2026-05-08 14:29:53 -04:00
f508dec080 v0.7.0: scroll notify + autocomplete — TDD
Some checks failed
Deploy (Gitea) / deploy (push) Has been cancelled
Scroll notification: :scroll-notify flag in add-msg when scrolled up.
Autocomplete: @ file paths, /theme subcommand defaults, /focus dirs.
4 new TDD tests (6 assertions), 100% pass.
Core: 135/135 (100%).

Remaining deferred: scroll pads (needs Croatoan terminal), setup wizard (v0.8.0).
2026-05-08 11:09:07 -04:00
30913bf327 v0.7.0: key bindings — TDD (RED→GREEN)
Ctrl+U clear line, Ctrl+W delete word, Ctrl+A/E home/end,
Ctrl+L redraw, Ctrl+D quit empty, Ctrl+X+E editor.
2 TDD tests (3 assertions), 100% pass.

Fixed paren bug in init-state (:dirty outside list).
2026-05-08 11:05:49 -04:00
c8964d0249 v0.7.0: char-width + status bar fix — TDD (RED→GREEN)
char-width: contract 5, 4 tests (6 assertions), 100% pass
  ASCII=1, CJK/Hangul/Kana/halfwidth=2, combining marks=0, tab=8
  Pure Lisp, ~25 lines, no deps. Used by word-wrap for unicode.

status bar: contract 6, timestamp right-aligned at (- w 12)
  Fixes overlap where focus map and timestamp both drew at :y 2 :x 1
2026-05-08 10:54:27 -04:00
55e0c962f4 passepartout: v0.7.0 — TUI Essentials: Terminal Parity
TDD cycle: contract → RED test → GREEN implementation for each item.

- Unicode width (char-width): 6 tests, 11 assertions. ASCII/CJK/emoji/combining.
- Status bar fix: timestamp right-aligned, focus at :x 1. No overlap.
- Ctrl key bindings: Ctrl+D/Q/L/U/W, Ctrl+A/E, Ctrl+X+E. 6 tests.
- External editor: Ctrl+X prefix state tracking + Ctrl+E chord.
- Deeper autocomplete: /theme subcommand, /focus directory, @ file paths.
- Scroll notification: :scroll-notify flag set when scrolled up on new msg.
- Pre-existing tests: messages init-state assertion fixed (nil→vectorp).

Remaining: scroll pads (needs Croatoan terminal), setup wizard (v0.8.0).
2026-05-08 10:45:05 -04:00
66df5b493a passepartout: v0.7.0 — Status bar fix, unicode width, Ctrl key bindings 2026-05-08 10:24:53 -04:00
429abedb5a TUI: fix hardcoded version string 0.4.0→0.5.0 in connect-daemon
Some checks failed
Deploy (Gitea) / deploy (push) Failing after 2s
2026-05-07 20:33:29 -04:00
da160b71e3 passepartout: v0.5.0 File Reorganization
Some checks failed
Deploy (Gitea) / deploy (push) Failing after 2s
Extract non-core fragments using self-repair criterion:
- core-context -> symbolic-awareness (224 lines, fboundp guards in think())
- heartbeat generation -> symbolic-events (renamed events-start-heartbeat)

Rename 23 files for clarity and new naming scheme:
- 6 core: core-package, core-transport, core-pipeline,
          core-perceive, core-reason, core-act
- 13 system: symbolic-*, neuro-*, embedding-*, channel-shell
- 4 gateway: channel-cli, channel-tui-*, channel-tui-state

Utility relocations:
- markdown-strip -> programming-markdown
- plist-keywords-normalize -> programming-lisp
- cognitive-tool-prompt -> programming-tools
- VAULT-MEMORY -> security-vault
- Merge *backend-registry* into *probabilistic-backends*

Split gateway-messaging into channel-telegram/channel-signal/
channel-discord/channel-slack (4 independent skills)

Delete dead system-model.lisp (16-line wrapper)

Document self-repair criterion in DESIGN_DECISIONS

Version bump: 0.4.3 -> 0.5.0
2026-05-07 18:20:48 -04:00