The page was hardcoded German while the program has catalogues - the same
inconsistency the operator keeps finding, this time in the docs.
tools/gen_www.py now holds the skeleton and both languages and writes
index.html (de) and index.en.html (en). A key that exists in one language and
not the other is a hard error, and 'make check' runs the generator with --check,
so a page that no longer matches its source fails the build instead of living on
as a stale copy - exactly the rule the program's own catalogues follow.
Verified: both pages generated (11158 / 10888 bytes), xmllint --html clean, and
both serve 200 on :8099 with a language switch in the header.
A mutate tool that says 'wrote 23 bytes' tells the operator nothing. write and
edit now put a one-hunk diff into the observation - common prefix and suffix as
context - so the model sees what it did and the transcript shows it as its own
'anderung:' entry.
One hunk, not a general diff algorithm: a tool changes one place, and the point
is to see which. Verified against kontron: asking for an edit produced
@@ -1,2 +1,2 @@
zeile eins
-zeile zwei
+zeile zwei geaendert
and the file on disk really was changed.
The last literals were the prompt ("> "), the millisecond format and the
placeholder for a missing session id. They are keys now.
More important than those three: the gate was too weak. check_i18n only proved
that keys used in the code exist in the catalogues - a literal drawn straight
into a curses window passed unseen, which is how 'du' or 'denkt' could have
been hardcoded without anyone noticing. It now scans the drawing calls
(mvwaddstr, mvwaddnstr, mvwprintw, waddstr, wprintw, winsstr) and fails on any
literal argument, and it checks that every role passed to add_entry() is one of
the known identifiers that have a role.<name> label.
Proven red before trusting it: with a literal prompt and a role 'benutzer'
injected, the gate reported both and returned 1; restored, it passes. The gate
also runs in make check now - it had been added to a target that no longer
existed.
Four things, three of them reported by the operator.
1. Rows are counted from the real line structure. The old arithmetic
(strlen/cols) assumed one long line; a model's reasoning is full of '\n', so
the true height was far larger than the estimate and the text painted over
the answer below it - 'it just goes anywhere on the screen'. text_rows() and
row_offset() split on newlines first, then wrap. entry_lines() now measures
the string that is actually drawn ('role: text'), which also fixes the last
character of an entry being cut off (a truncated code fence).
2. Tool calls are visible: the agent's tool_begin hook fires before each call,
the UI drains the list under its lock and writes 'werkzeug: run
{"command":"echo a"}' into the transcript; the one at the top of the live
area shows the call while it runs. The reasoning entry is inserted before
those lines, so the transcript reads du, denkt, werkzeug, modell.
3. The chat pane has a black background, and the status line sits between the
pane and the prompt, the way Hermes shows it.
4. i18n is complete: every remaining literal in ui.c, main.c and the plugins
goes through the catalogue, including widget texts and format strings.
sp_td() carries a compiled-in English default, so a missing catalogue can
never drop a printf placeholder. tools/check_i18n.py runs in make check and
fails when a key used in the code is missing from any catalogue, or when a
catalogue key is used nowhere.
Seventeen test binaries green.
Three things the operator asked for, and one bug he found:
1. The reasoning moved out of the sidebar into the left pane, above the answer,
dimmed - the same place every other harness puts it. While a turn runs it
scrolls with PgUp/PgDn; afterwards it is appended to the transcript as a
'thinking' entry (capped at 1500 characters) so it can be read later.
2. ????? - glibc transliterates ß but turns ü into '?', so German answers came
back as question-mark soup. Letters now come from a table generated out of
Unicode's decompositions (tools/gen_decomp.py, 266 entries, U+00A0..U+024F,
German umlauts written out as ae/oe/ue), punctuation goes through iconv
(— -> --, … -> ...). Verified: 'ein — Gedankenstrich, „Zitat“, Auslassung…'
becomes 'ein -- Gedankenstrich, ,,Zitat", Auslassung...'.
3. Slices for the viewport now start and end on UTF-8 sequence boundaries: a
column offset could cut a character in half and draw a replacement glyph.
4. The shell tool ran the JSON as a command. 'run' received
{"command":"uname -sr"} and handed that string to popen. It now parses the
arguments (echo too) and falls back to the raw string for the mock transport.
Proven against kontron: the model called run, the observation was
'Linux 7.1.3+deb14-amd64 [exit status 0]', and it read that back correctly.
Sixteen test binaries green, test_ascii added for the transliteration.
The harness now has the interface it was missing: a chat pane on three
quarters of the screen, a sidebar on one quarter, a status bar underneath.
- vendor/netbsd-curses: NetBSD's curses and terminfo, ported edition,
vendored with PROVENANCE.md. The build of that one directory needs GNU
make; splinter's own Makefile stays POSIX make.
- tools/genpalettes.py turns CDE's *.dp palette files into a C table. 42
palettes, generated, checked in with the generator, so the source of every
colour is a file in the CDE tree and not a guess.
- themes: roles are derived, not invented - background is the darkest of the
eight colour sets, foreground the lightest, border the second darkest,
accent the most saturated of the rest, status the accent darkened by a
third. Delphinium is the default. Unknown palette is an error.
- colours map to the terminal through xterm's 256-colour cube when available,
the 16 basic colours otherwise, so a palette looks the same everywhere
within what the terminal can show.
- ui.c redraws only on change; the sidebar shows session, transport, theme
and last-turn numbers. Widgets are a labelled empty area - the registry
lands next.
Six test binaries green, including test_theme (42 palettes, ordering
invariants, unknown name rejected, colour indices in range).