Every passepartout tui run now deletes stale cl-tty fasls,
ensuring the latest backend-size fixes (ioctl fd0, env vars,
stty size, tput) are always compiled in.
bash sets COLUMNS and LINES but doesn't export them to
subprocesses. Without export, SBCL's posix-getenv returns nil
and the terminal size fallback fails. Add explicit export
before the exec sbcl line.
The :force t forces recompilation of cl-tty and all its dependencies
(including ironclad) on every run, making startup take 30+ seconds.
Without :force t, quickload uses timestamp-based caching. If cl-tty
source changes, delete ~/.cache/common-lisp manually.
view-input drew prompt first (row h-3), then hint (row h-2),
leaving the cursor at end of the hint line after 'complete'.
Typed characters appeared there. Swapped order: hint first,
prompt last, so cursor ends at the > prompt.
The render order was: view-chat → view-input → draw-separator.
After the separator draw, the cursor ended up at row h-4 (the
separator line). Typed characters echoed by the terminal appeared
on the separator line, above the > prompt. Swapped so the input
line is drawn last: view-chat → draw-separator → view-input.
- Changed all 50 org file :tangle targets from ../lisp/ to
~/.local/share/passepartout/lisp/ (XDG data dir)
- Removed 49 generated .lisp files from project lisp/ directory
- Removed tests/system-integration-tests.lisp (generated)
- Removed lisp/*.fasl (compiled, stale)
- Updated core-manifest.org to tangle .asd to XDG root
- Remapped quicklisp symlink: local-projects/passepartout → XDG
TUI fixes in channel-tui-main.org:
- Removed with-raw-terminal (stty raw breaks fd 0 reads in this SBCL)
- Use cat subprocess + pipe for keyboard input (via :input :interactive)
- Blocking read-char on pipe with with-timeout 0.1s for daemon processing
- Key events queued via drain-queue alongside daemon messages
- Full dialog key routing (Escape, Up/Down, Enter, filters, Backspace)
- SIGWINCH resize handling
- Post-handshake backend-size re-query
- Daemon version in status bar (was v0.5.0 hardcoded)
- Handshake version stored in state, no add-msg
- :daemon-version and :size-queried in state plist
- view-status uses draw-rect for background
- Test section gated with #+passepartout-tests
- Keyboard input now runs in a separate bordeaux-thread that
reads from fd 0 via blocking read-char and queues :key events
- Main loop processes :key events from drain-queue alongside
:daemon and :disconnected events
- Removed blocking read-char/with-timeout from main loop (caused
freeze when with-timeout couldn't interrupt the read syscall)
- Added full dialog key routing in the key event handler
- Added debug logging for key events (tui-keys.log)
The first backend-size query may return 80x24 before the terminal
settles. Re-query immediately before the initial render to pick up
the actual terminal dimensions.
- Replaced read-event (broken on fd 0 in this SBCL) with direct
blocking read-char wrapped in sb-ext:with-timeout 0.1
- This gives reliable key input + periodic wakeup for daemon messages
- Added dialog key routing back (escape to close, up/down, enter to
select, character filtering, backspace)
- Fixed # of closing parens to match new structure
- Removed debug logging
- Switched back to read-event be :timeout 0.01 for proper key-event
dispatch with the ctrl/alt/shift flags
- Fixed Ctrl+P/B/Q/L dispatch: check key-event-ctrl flag to
construct :CTRL-<key> keyword symbol (read-event returns :P + ctrl=t,
not :CTRL-P)
- Added :size-queried state flag and post-handshake backend-size re-query
- Removed hardcoded Connected v0.5.0 message from connect-daemon
- Removed Connected v0.7.2 system message (version shown in status bar)
- view-status now uses draw-rect for background (instead of dotimes loop)
- Added startup message showing backend type and detected dimensions
read-char-no-hang on fd 0 streams never returns data because
sb-unix:unix-simple-poll on fd 0 returns NIL in this SBCL
environment. Switched to (listen tty) + (read-char tty) which
blocks until a key is pressed — correct interactive TUI behavior.
Also switched from (open "/dev/tty") to
(sb-sys:make-fd-stream 0 :input t :buffering :none) to directly
read from stdin.
Main loop now checks cl-tty.input::*terminal-resized-p* on every
iteration. When set (by SIGWINCH handler), re-queries backend-size
and marks all regions dirty for re-render.
- Replaced cl-tty read-event with direct read-char-no-hang from
/dev/tty for reliable input (avoids unix-simple-poll fd 0 issue)
- Added (let ((tty ...)) wrapper to open /dev/tty once at startup
- Fixed (code-char raw-ch) bug: raw-ch is already a CHARACTER
- Fixed one extra close paren that closed (let ((ch ...)) early
- Gated fiveam test section behind #+passepartout-tests reader
conditional to prevent crash on TUI startup when fiveam not loaded
- Added initial render (backend-clear + view-all) before main loop
so startup messages appear immediately
- Restored read-event with :timeout 0 from git HEAD
- Removed dispatch-key-event from main loop (simplified to direct on-key)
- Removed :enter from :local keymap (handled directly in on-key)
- Retained direct-to-backend rendering (no framebuffer)
- Retained msgs count in status bar for debugging
- 237/237 tests pass
draw-rect has no method on raw arrays (only on framebuffer-backend,
simple-backend, modern-backend). Three calls in view-status, view-chat,
and view-sidebar passed the framebuffer array to draw-rect, causing
'no applicable method' crash on startup.
Replaced with (draw-text ... (make-string w #\Space) nil bg) which
fills the same area with background spaces.
Complete rewrite of the TUI with warm amber/gold color palette and
clean three-zone layout (chat top, input bottom, status very bottom).
1. Layout restructure: input at y=h-3, hint at y=h-2, status at y=h-1
2. Warm palette: 20-key amber/gold theme, 8 warm presets
3. Readline keybindings: Ctrl+A/E/U/W/K/Y/L/D/F/G in :global keymap
4. Chat messages: user boxes (┌─└─), agent headers, collapsible tools
5. Command palette: Ctrl+P top-centered overlay, warm colors
6. Sidebar: Ctrl+B toggle, right panel with focus/rules/context/MCP
7. Keybindings: :ctrl+x, :?, mouse wheel support
8. Search: existing /search with match highlighting
9. Help overlay: ? shows keybinding and command reference
- KEY_ENTER (343) and KEY_BACKSPACE (263) were not handled in on-key
causing Enter/Backspace to silently fail in tests using ncurses keycodes
- Escape (27) was not matched for streaming interrupt in on-key
- theme-color test expected keyword :white but function returns hex string
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.
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.
- 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
- 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
- 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
- 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
Cut v2.0.0 (Lisp Machine Emergence), v3.0.0+ (Cannibalization), v4.0.0+
(Native Inference, Hardware, True Agency) from passepartout roadmap.
These belong to Stoa — the body/environment layer. Passepartout now
only tracks the path to Neurosymbolic Maturity (v1.0.0).
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.
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
/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
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
*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
/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
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