Commit Graph
9 Commits
Author SHA1 Message Date
Konrad 2e776611f3 splinter: the kid mode section exists in all three languages
It was only on the Portuguese page, which is exactly the drift the generator is
supposed to prevent and does not: check compares languages, not section counts.
2026-11-08 16:03:29 +00:00
Konrad c0ec7bacd4 splinter: kid mode enforces the day, and the site speaks Portuguese
The daily budget was advisory: the gate refused tools and a system message asked
the model to close the day, but a chatty model answered anyway. So the core grew a
turn gate - a plugin can now refuse the whole turn before the model is called:

  Fuer heute ist Schluss: 60 von 30 Minuten sind verbraucht. Morgen geht es weiter.

That sentence comes from the plugin, not from a model that was asked to obey. No
model call, no tokens, no way around it by talking.

Also fixed: one-shot mode printed only a newline when the transport streamed
nothing (a turn blocked before the stream), so the answer vanished. It is printed
when no bytes were streamed.

Website: third language, index.pt.html, generated from the same source; the
language bar on all three pages links all three. check_i18n now sees 51 keys in
three catalogues.
2026-11-08 16:02:21 +00:00
Konrad b2a18d831d splinter: the page knows about the fleet now
Added in both languages: hosts and delegate_parallel with the real report block,
MCP in both directions (client and server, read vs --autonomous), and the three
small ways in - piped stdin, splinter -c for the last session in this directory,
and --interview writing the profile.

Generated, not hand-edited: gen_www.py writes both pages and make check fails if
one drifts from the source.
2026-11-08 14:57:50 +00:00
Konrad bb365ef08b splinter: the site speaks both languages, from one source
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.
2026-11-08 14:00:51 +00:00
Konrad e128d679e4 splinter: write and edit show a diff
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.
2026-11-08 12:32:24 +00:00
Konrad c458f02385 splinter: no text reaches the screen without a catalogue
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.
2026-11-08 08:21:20 +00:00
Konrad 554b4c97b8 splinter: tool calls with arguments, newline-aware rows, complete i18n
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.
2026-11-08 08:11:09 +00:00
Konrad c87f7290f5 splinter: thinking in the chat pane, no more ?????
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.
2026-11-08 07:20:42 +00:00
Konrad d2e06b316d splinter: curses TUI on NetBSD curses, CDE palettes as themes
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).
2026-11-07 11:27:09 +00:00