7 Commits
Author SHA1 Message Date
HomerandClaude Opus 5.5 24464aa48e Security (M3 and should-fix): a question is never lost, an answer goes to what was shown, a record is the shell's own
llembas-term / linux (push) Failing after 38s
M3. Asked from a full-screen program with nothing of its screen asked
about, the context had nothing in it; the engine refuses such a file and a
display started with one never started. Now no file is written and the
question goes alone. A display that ends before it took a question gives
it back: the ask line opens again with the question on it and what the
display said last before it ended.

S1. What a pane says of its shell by user variable is only what it said.
A record the shell of this machine wrote itself (its process id, no via)
and whose shell still runs is the authority: a user variable never
replaces that file, and only it puts a command into the history, has the
input mark written, and numbers the blocks of a context.
S2. A suggestion is drawn and taken, and the AI asked, only while the
shell's record says it is at its prompt (or there is none); the AI only
while the program in front is a shell.
S3. The ask line opens at once from what is known; the settings and the
model are asked of the engine after, and the prefix follows. Answers and
stop no longer wait for the settings either.
S4. The settings that apply are the pane's own directory's: the layer says
them per pane (wezterm.llembas.configure_pane), so two windows in two
directories each keep theirs.
S5. With AI off nothing of the engine is started to read or keep a
setting, but the AI switch itself; a choice made then holds until the
terminal closes. The store's machine-wide values apply in a directory not
read yet.
S6. What the CLI can do is asked again after a minute, and at once when
it lacked what was needed (it may have been updated).
S7. A question card is answered on the ask line: a number, n, or words;
the notice says so, and the approve key says where the answer goes.
S8. A question that waits for a starting display keeps its context file
and sends it; an older waiting one's file goes at once; left-over files
are swept once a minute while any was written.
S10. A suggestion holds nothing invisible (format characters, bidi,
zero-width, variation selectors, tags, separators: filtered in the crate,
for history too); a key takes exactly what was drawn (a cut suggestion its
drawn part); and none is taken while a key sent to the shell is not on
its screen yet.
S12. No stat per word typed: the directories of PATH are listed at most
once a minute; nothing on a network or automounted file system is looked
at; whether an input line stands is read from the rows already fetched;
input marks and history lines are written by one thread of their own.
S13. The status directory is always this terminal's own: one inherited
from a terminal that started it, or set in the configuration, is not used.
S15. An answer is bound to what was asked: a number the engine gives what
it asks (approval#7 …) goes with the answer (/approve 7); without one, an
ask that changed a moment ago is not answered ("read it, then answer
again"). A cut value says that the rest is in the display.
S17. A context of a shell reached over SSH names its host (context file
version 2, with each block's seq and the exit status the shell said, for
an engine that reads it); the display starts in a directory of this machine.
S18. A notice whose display is gone is taken away at once.

Also: one answer for "is this pane's shell on this machine"
(wezterm.llembas.local_dir); dead complete::run and Log::clear only in
tests; the minimum-version check for a CLI that does not say what it can
do is gone (any such CLI is too old, said with the key that still works).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 07:58:43 +00:00
HomerandClaude Fable 5.2 22215b7eb0 Security (M1): the terminal trusts only what it started
A pane counted as "the display", or as a pane running LLeMbas, by user
variables alone - which any program printing to a pane can set, and which
stay set when LLeMbas was killed. The next question was then written to that
pane as a paste with Enter, and the path of a context file with it.

Now the display of a tab is the pane the layer itself split and started the
engine in, remembered by its id together with the command started there.
Everything the layer writes (a question, a context file's path, an answer, a
model, a mode) goes through one function, to that pane only, and only when
the process in front of it is seen to be the engine the layer resolved, or
the very command the layer started with that engine under it
(core.display_runs, from pane:get_foreground_process_info()). Where that
cannot be known nothing is sent, and that is said.

- user variables of another pane are not looked at; of the display they are
  shown, without control or invisible characters; of a pane whose program in
  front is the CLI itself they fill the bar and the tab mark
- the ask line is never typed into the CLI's own interface in a tab
- a display whose engine is gone is forgotten: the next question starts a new
  one and closes the old pane
- the shell that keeps a failed display's sentence on screen no longer reads
  from the pane (it would take the next question for its Enter); it empties
  the variables a killed engine left and sleeps until Ctrl+C
- wezterm.llembas.real_path: the CLI's path with its links followed

Tests: a pane forging each variable and all of them, a forged display beside
the real one, the display's program replaced by a shell, a killed display, a
display whose process cannot be seen, a second window; 49 of the new checks
fail on the layer as it was.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-12-02 21:07:11 +00:00
HomerandClaude Fable 5.2 593df939b9 LLeMbas TTY is LLeMbas TERM: the names, what is carried over, three keys, and the keys LLeMbas IDE has too
llembas-term / linux (push) Canceled after 0s
The rename. Commands llembas-term, -gui, -mux-server, -setup; package llembas-term
(Replaces, Conflicts and Provides llembas-tty, so installing it removes the old one);
directories llembas-term; application id eu.llembas.term; the variables a pane sees
LLEMBAS_TERM…; the status record llembas-term-status=1, the input mark
llembas-term-input=1, the user variable llembas_term_status; the shell integration
llembas-term.sh; the workflow llembas-term.yml; every changed upstream block is marked
"LLeMbas TERM:". The terminal needs the engine's terminal contract 4 and says so in
words with an older CLI.

Carried over from the earlier name: the variables LLEMBAS_TTY… of a terminal that
started this one are dropped; a configuration file of the old name is read where it
is while there is none of the new, with a warning; command-history and
settings-chosen are copied once into a data directory that does not exist yet
(llembas-line::migrate); the set-up program prints the new line for an rc file that
has the old one.

Keys. Ctrl+Tab on the ask line switches the mode (the next tab anywhere else);
Ctrl+Shift+M and Ctrl+Alt+M open the lists of chat and autocomplete models, also
over the ask line, which then says the choice. In a pane where LLeMbas IDE says it
is in front (user variable llembas_ide=1) the chords both have are sent on to it as
the keyboard protocol's bytes and the terminal does nothing of its own; the
terminal's palette is also on Ctrl+Shift+Alt+P. The built-in configuration honours
the kitty keyboard protocol for a program that asks for it.

CI: the .deb is installed over the released llembas-tty 1.0.0-beta.5; keys are
pressed in a real window on Xvfb (not a gate).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-12-02 20:26:37 +00:00
HomerandClaude Fable 5.2 b803aa39d9 Contract 3 as built: the input mark, the engine's own decisions, the timeouts it recommends, --json
llembas-tty / linux (push) Failing after 37s
- the terminal writes the input mark (pane-<n>.input beside the status
  record): whether anything stands on the input line of that prompt, from
  the input cells the shell integration marks. With AI on, for local panes.
- lembas complete: 8 s, and 20 s for the first request after autocomplete
  is switched on or its model changes; --debug with an engine of contract 3,
  whose decisions the autocomplete status shows.
- settings set and forget with --json.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-12-02 13:54:20 +00:00
HomerandClaude Fable 5.2 3839c7311c Settings remembered here or everywhere, a hint that stands, a placed command, the autocomplete in words
- every switch and choice (AI, AI autocomplete, suggestions, highlighting,
  mode, the two models, the display's width) is kept by the engine's store
  of the terminal's settings (lembas terminal settings, contract 3): in the
  palette twice, for this directory and for this machine; a key keeps it
  where the directory's settings already are. The settings of the active
  pane's directory apply, read lazily and kept a minute.
- a CLI without the store: as before, for this run, said once.
- what the display asks stands at the person's cursor row until it is
  answered (it was shown for four seconds); a command placed at the prompt
  (manual mode, contract 3) gets a hint that covers nothing.
- LLeMbas: settings, LLeMbas: autocomplete status, LLeMbas: display width.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-12-02 13:31:01 +00:00
HomerandClaude Fable 5.2 0fa3d1a990 The layer for LLeMbas in the terminal: AI on/off, the CLI whole in a tab, the display instead of the split, the pane's status record
llembas-tty / linux (push) Failing after 35s
- An option `ai` and a switch that works at any moment; with AI off every key of the layer
  but the switch does nothing, and says so once.
- A key opens the LLeMbas CLI whole, in a new tab, as if `lembas` were typed.
- A question goes to the terminal's display (`lembas terminal`, started to the right of the
  pane at a third of its width, the focus staying where it was) and never to the CLI's own
  interface in a split. A CLI without the display is said so in words, with how to update.
- Keys and palette entries that act on the display from the person's own pane: allow, allow
  always, deny, stop the turn, new conversation, show/hide, choose model, choose mode.
- The shell integration writes the pane's status record at every prompt and when a command
  starts (a file of the person's own, and the user variable llembas_tty_status), and the layer
  keeps the file for a shell that could not write it.
- The layer talks to the terminal's own drawing part (wezterm.llembas) when there is one:
  the ask line in place, a word at the cursor's row, what is on.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-12-02 11:56:20 +00:00
HomerandClaude Fable 5.2 6f1d304fd7 The LLeMbas layer's tests, without a terminal
llembas/tests/run.lua runs the layer against a stand-in for the terminal;
scripts/test-lua.sh runs it with lua5.4, lua, luajit or nvim -l.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-12-01 19:15:13 +00:00