From bb365ef08b4e972f2b4bad8e93010d96cd7841d9 Mon Sep 17 00:00:00 2001 From: Konrad Date: Sun, 8 Nov 2026 14:00:51 +0000 Subject: [PATCH] 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. --- Makefile | 7 +- src/www/index.en.html | 171 ++++++++++++++++++ src/www/index.html | 128 ++++--------- tools/gen_www.py | 411 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 624 insertions(+), 93 deletions(-) create mode 100644 src/www/index.en.html create mode 100644 tools/gen_www.py diff --git a/Makefile b/Makefile index 0082413..fed932f 100644 --- a/Makefile +++ b/Makefile @@ -161,7 +161,7 @@ tests/test_plugin: tests/test_plugin.c $(LIB) $(PLUGIN) $(CC) $(CFLAGS) -o $@ tests/test_plugin.c -L. -lsplinter $(TEST_RPATH) $(LIBS) check: $(LIB) $(BIN) $(PLUGIN) $(TESTS) - @set -e; python3 tools/check_i18n.py; \ + @set -e; python3 tools/check_i18n.py; python3 tools/gen_www.py --check; \ for t in $(TESTS); do echo "== $$t"; ./$$t; done; \ echo "all tests passed" @@ -174,3 +174,8 @@ clean: rm -f $(BIN) $(LIB) $(LIBOBJ) $(BINOBJ) $(PLUGIN) $(TESTS) .PHONY: all check curses install clean + +# The pages are generated: one source, every language, and a missing translation +# is a hard error - the same rule as the program's own catalogues. +www: + python3 tools/gen_www.py diff --git a/src/www/index.en.html b/src/www/index.en.html new file mode 100644 index 0000000..6eae122 --- /dev/null +++ b/src/www/index.en.html @@ -0,0 +1,171 @@ + + + + +splinter — an agent harness you own + + + + +
+ +

Deutsch · English

+ +

splinter_

+

An agent harness you own: chat in the terminal, tools with authorization classes, plugins, any model that speaks OpenAI — built by us so we can change it, instead of getting used to how somebody else's client behaves.

+ +

9.125 lines of C99/POSIX · +248.568 bytes binary · 21 test programs · +8 plugins · 42 palettes · BSD-3-Clause

+ +

What it is

+

The same thing Claude Code or opencode is for you: a program you sit in front of, talking to a model, running the tools it asks for. The difference is the source. If something bothers you — the layout, the keys, the confirmation prompts, the transport — you change it here instead of waiting for someone else to.

+

splinter is the layer in between: what gets sent, whether a tool may run, what is written down, and what you see on screen.

+ +

What that looks like

+
you:      Aendere in /tmp/x.c die Zeile 'return 0' in 'return 1'.
+thinking: I must read the file, then replace exactly one place.
+          An ambiguous pattern would be a wrong edit.
+tool:     edit {"path":"/tmp/x.c","old":"return 0","new":"return 1"}
+diff:     --- a//tmp/x.c
+          +++ b//tmp/x.c
+          @@ -11,3 +11,3 @@
+             int main(void) {
+          -	return 0;
+          +	return 1;
+             }
+model:    Done. Line 12 returns 1 now.
+
+  splinter 0.1.0          session sess-1794...          Delphinium   842 ms
+

Reasoning, the tool call with its arguments, the diff, the answer. The reasoning block grows where it belongs while the turn runs, and does not jump away when it ends.

+ + +

Three checks before any tool runs

+

1 · Budget

Does the conversation still fit? If not, it is compacted before sending — not after, and not quietly in the middle of a turn.

+

2 · Registry

Does the tool exist? An invented name becomes an observation, not a crash.

+

3 · Authorization class

The tool declares what it may do — read, mutate, destructive. Not the model, not the prompt. For mutate and destructive the harness asks you — in the prompt line in the chat, as a y/N message on Telegram.

+ +

Tools

+ + + + + + + + + + + + + +
ToolClassWhat it does
readreadnumbered lines, offset/limit, refuses binary files
searchreadliteral search over a tree, at most 100 hits
listreadlist a directory
skill_searchreadfind installed skills — nothing is preloaded
skill_loadreadread one skill in full
memory_searchreadyour own memories, scoped per user
writemutatewrite a file, with the diff in the observation
editmutatereplace exactly one occurrence; ambiguous is an error
memory_addmutateremember one fact
rundestructivea shell command; the exit status is an observation
delegatedestructivehand a task to another model
+ + +

Transports and plugins

+ + + + + + + + + + +
NameWhat it does
openaiany OpenAI-compatible endpoint, streaming over SSE
cliany program as the model, e.g. claude -p
ringexit ring: 429 or limit → next exit
mcpan MCP server as a tool source, with its own schemas
lcmcompaction of the conversation
focusreminds the model of the goal every N turns (/goal)
reminderputs the ground rules back into the conversation every 10 turns
cps, clockwidgets in the sidebar
+ + +

Delegation: other models, splinter chooses

+
# ~/.splinter/splinter.conf.d/20-delegates.conf
+delegate = coder | C99, POSIX, Review | tags=code,c99,review | endpoint=... | model=...
+delegate = quick | short answers, chat | tags=chat,cheap | endpoint=... | model=...
+
+$ splinter --choose "pruefe diesen C-Code auf Speicherfehler"
+coder   7   task mentions 'code'
+

A requested tag counts 5, a tag in the task 3, a word from the description 1. The observation opens with the choice and the reason — a wrong pick is visible instead of mysterious. No profiles: one line per model.

+ + +

Configuration

+

~/.splinter/splinter.conf, plus every .conf in ~/.splinter/splinter.conf.d/ in name order. An unknown key is an error naming the file and line — a typo must not silently do nothing.

+
# ~/.splinter/splinter.conf
+endpoint = http://kontron.local:8080/v1/chat/completions
+model    = Qwen3.6-35B-A3B-UD-Q8_K_XL.gguf
+locale   = de
+theme    = Delphinium
+autonomous = 1
+telegram_allow = 8300935
+plugin   = plugins/lcm/lcm.so
+plugin   = plugins/reminder/reminder.so
+ + +

Gateway: Telegram

+

splinter --daemon long-polls getUpdates, one turn per message, answers with sendMessage. The token lives in ~/.splinter/telegram.token with mode 0600 and is never passed as an argument — arguments end up in ps. While a turn runs, the chat sees "typing" every four seconds.

+

Slash commands work there too. Programs in ~/.splinter/commands/ become /name: they get the rest of the line as an argument, and their output goes to the model as context — not to you as a reply. That is how the model fetches what it cannot see itself.

+ +

What gets written down

+
~/.splinter/logs/<session>/session.log   readable, in order, everything
+~/.splinter/logs/<session>/wire.jsonl    every request body, every reply, raw
+

Your words, the answer, the reasoning, every tool call with its arguments, every observation, failures, token counts. Nothing truncated — a log that keeps only the good parts cannot explain a bad turn.

+ +

Building

+
$ git clone ssh://host/home/git/splinter.git
+$ cd splinter && make      248 KB, nothing but libc and curses
+$ make check               21 test programs, plus the i18n checker
+$ ./splinter              chat, the config is read
+$ ./splinter --daemon     Telegram gateway
+

POSIX make, C99, -Wall -Wextra -Werror. NetBSD curses is vendored, so the binary does not depend on a distribution's mood.

+ + +

What it is not

+ + +
+ + +
+ + diff --git a/src/www/index.html b/src/www/index.html index c362c06..051d331 100644 --- a/src/www/index.html +++ b/src/www/index.html @@ -3,8 +3,8 @@ -splinter — ein Agent-Harness, das dir gehoert - +splinter — ein Agent-Harness, das dir gehoert +
+

Deutsch · English

+

splinter_

-

Ein Agent-Harness, das dir gehoert: Chat im Terminal, Werkzeuge -mit Autorisierungsklassen, Plugins, jedes Modell das OpenAI spricht — -von uns gebaut, damit wir es umbauen koennen, statt uns an das Verhalten -eines fremden Clients zu gewoehnen.

+

Ein Agent-Harness, das dir gehoert: Chat im Terminal, Werkzeuge mit Autorisierungsklassen, Plugins, jedes Modell das OpenAI spricht — von uns gebaut, damit wir es umbauen koennen, statt uns an das Verhalten eines fremden Clients zu gewoehnen.

9.125 Zeilen C99/POSIX · 248.568 Bytes Binary · 21 Test-Programme · 8 Plugins · 42 Farbschemata · BSD-3-Clause

Was es ist

- -

Dasselbe, was Claude Code oder opencode fuer dich sind: ein Programm, in dem -du mit einem Modell redest und das die Werkzeuge ausfuehrt, um die es bittet. -Der Unterschied ist der Quelltext. Wenn dich etwas stoert — das Layout, die -Tasten, die Frage nach Bestaetigung, der Transport — aenderst du es hier, -statt darauf zu warten.

- -

splinter ist die Schicht dazwischen: was gesendet wird, ob ein Werkzeug laufen -darf, was davon aufgezeichnet wird und was du auf dem Schirm siehst.

+

Dasselbe, was Claude Code oder opencode fuer dich sind: ein Programm, in dem du mit einem Modell redest und das die Werkzeuge ausfuehrt, um die es bittet. Der Unterschied ist der Quelltext. Wenn dich etwas stoert — das Layout, die Tasten, die Frage nach Bestaetigung, der Transport — aenderst du es hier, statt darauf zu warten.

+

splinter ist die Schicht dazwischen: was gesendet wird, ob ein Werkzeug laufen darf, was davon aufgezeichnet wird und was du auf dem Schirm siehst.

So sieht das aus

- -
du:       Aendere in /tmp/x.c die Zeile 'return 0' in 'return 1'.
-denkt:    Ich muss die Datei lesen, dann genau eine Stelle ersetzen.
-          Ein mehrdeutiges Muster waere ein falscher Edit.
-werkzeug: edit {"path":"/tmp/x.c","old":"return 0","new":"return 1"}
-aenderung: --- a//tmp/x.c
+
you:      Aendere in /tmp/x.c die Zeile 'return 0' in 'return 1'.
+thinking: I must read the file, then replace exactly one place.
+          An ambiguous pattern would be a wrong edit.
+tool:     edit {"path":"/tmp/x.c","old":"return 0","new":"return 1"}
+diff:     --- a//tmp/x.c
           +++ b//tmp/x.c
           @@ -11,3 +11,3 @@
              int main(void) {
           -	return 0;
           +	return 1;
              }
-modell:   Geaendert. Zeile 12 gibt jetzt 1 zurueck.
+model:    Done. Line 12 returns 1 now.
 
-  splinter 0.1.0          Sitzung sess-1794...          Delphinium   842 ms
+ splinter 0.1.0 session sess-1794... Delphinium 842 ms
+

Denken, Werkzeugaufruf mit Argumenten, Diff, Antwort. Der Denk-Block waechst waehrend des Laufs dort, wo er hingehoert, und springt am Ende nicht weg.

-

Denken, Werkzeugaufruf mit Argumenten, Diff, Antwort. Der Denk-Block waechst -waehrend des Laufs dort, wo er hingehoert, und springt am Ende nicht weg.

Drei Pruefungen, bevor ein Werkzeug laeuft

- -
-

1 · Budget

-

Passt die Konversation noch? Wenn nicht, wird vor dem Senden -komprimiert — nicht danach, und nicht heimlich waehrend des Laufs.

-
- -
-

2 · Registry

-

Existiert das Werkzeug? Ein erfundener Name wird zu einer -Beobachtung, nicht zu einem Absturz.

-
- -
-

3 · Autorisierungsklasse

-

Das Werkzeug erklaert, was es darf — -read, mutate, destructive. Nicht das Modell, nicht der -Prompt. Bei mutate und destructive fragt dich das Harness — im Chat in der -Eingabezeile, auf Telegram als Nachricht mit y/N.

-
+

1 · Budget

Passt die Konversation noch? Wenn nicht, wird vor dem Senden komprimiert — nicht danach, und nicht heimlich waehrend des Laufs.

+

2 · Registry

Existiert das Werkzeug? Ein erfundener Name wird zu einer Beobachtung, nicht zu einem Absturz.

+

3 · Autorisierungsklasse

Das Werkzeug erklaert, was es darf — read, mutate, destructive. Nicht das Modell, nicht der Prompt. Bei mutate und destructive fragt dich das Harness — im Chat in der Eingabezeile, auf Telegram als Nachricht mit y/N.

Werkzeuge

- - + @@ -128,8 +100,8 @@ Eingabezeile, auf Telegram als Nachricht mit y/N.

WerkzeugKlasseWas es tut
readreadnumerierte Zeilen, offset/limit, verweigert Binaerdateien
searchreadLiteral-Suche im Baum, maximal 100 Treffer
listreadVerzeichnis anzeigen
skill_searchreadinstallierte Skills finden — nichts wird vorgeladen
skill_searchreadinstallierte Skills finden — nichts wird vorgeladen
skill_loadreadeinen Skill ganz lesen
memory_searchreadeigene Erinnerungen, pro Benutzer getrennt
writemutateDatei schreiben, mit Diff in der Beobachtung
delegatedestructiveAufgabe an ein anderes Modell geben
-

Transporte und Plugins

+

Transporte und Plugins

@@ -142,26 +114,19 @@ Eingabezeile, auf Telegram als Nachricht mit y/N.

NameWas es tut
openaijeder OpenAI-kompatible Endpunkt, Streaming ueber SSE
cps, clockWidgets in der Seitenleiste
-

Delegation: andere Modelle, splinter waehlt

+

Delegation: andere Modelle, splinter waehlt

# ~/.splinter/splinter.conf.d/20-delegates.conf
 delegate = coder | C99, POSIX, Review | tags=code,c99,review | endpoint=... | model=...
-delegate = quick | kurze Antworten, Chat | tags=chat,cheap | endpoint=... | model=...
+delegate = quick | short answers, chat | tags=chat,cheap | endpoint=... | model=...
 
 $ splinter --choose "pruefe diesen C-Code auf Speicherfehler"
 coder   7   task mentions 'code'
+

Angefragter Tag zaehlt 5, Tag im Aufgabentext 3, Wort aus der Beschreibung 1. Die Beobachtung beginnt mit der Wahl und dem Grund — eine falsche Wahl ist sichtbar statt mysterioes. Ohne Profile: eine Zeile pro Modell.

-

Angefragter Tag zaehlt 5, Tag im Aufgabentext 3, Wort aus der Beschreibung 1. -Die Beobachtung beginnt mit der Wahl und dem Grund — eine falsche Wahl ist -sichtbar statt mysterioes. Ohne Profile: eine Zeile pro Modell.

Konfiguration

- -

~/.splinter/splinter.conf, plus jede .conf in -~/.splinter/splinter.conf.d/ in Namensreihenfolge. Ein unbekannter -Schluessel ist ein Fehler mit Dateiname und Zeile — ein Tippfehler darf -nicht still nichts tun.

- +

~/.splinter/splinter.conf, plus jede .conf in ~/.splinter/splinter.conf.d/ in Namensreihenfolge. Ein unbekannter Schluessel ist ein Fehler mit Dateiname und Zeile — ein Tippfehler darf nicht still nichts tun.

# ~/.splinter/splinter.conf
 endpoint = http://kontron.local:8080/v1/chat/completions
 model    = Qwen3.6-35B-A3B-UD-Q8_K_XL.gguf
@@ -172,55 +137,34 @@ telegram_allow = 8300935
 plugin   = plugins/lcm/lcm.so
 plugin   = plugins/reminder/reminder.so
+

Gateway: Telegram

- -

splinter --daemon pollt getUpdates, ein Turn pro -Nachricht, Antwort per sendMessage. Der Token liegt in -~/.splinter/telegram.token mit Modus 0600 und wird nie als Argument -uebergeben — Argumente stehen in ps. Waehrend eines Turns -sieht der Chat alle vier Sekunden „typing“.

- -

Slash-Kommandos funktionieren dort genauso. Programme in -~/.splinter/commands/ werden zu /name: sie bekommen den -Rest der Zeile als Argument, und ihre Ausgabe geht ans Modell als -Kontext — nicht an dich als Antwort. Damit holt sich das Modell, was es -selbst nicht sehen kann.

+

splinter --daemon pollt getUpdates, ein Turn pro Nachricht, Antwort per sendMessage. Der Token liegt in ~/.splinter/telegram.token mit Modus 0600 und wird nie als Argument uebergeben — Argumente stehen in ps. Waehrend eines Turns sieht der Chat alle vier Sekunden „typing“.

+

Slash-Kommandos funktionieren dort genauso. Programme in ~/.splinter/commands/ werden zu /name: sie bekommen den Rest der Zeile als Argument, und ihre Ausgabe geht ans Modell als Kontext — nicht an dich als Antwort. Damit holt sich das Modell, was es selbst nicht sehen kann.

Was mitgeschrieben wird

-
~/.splinter/logs/<sitzung>/session.log   lesbar, in Reihenfolge, alles
 ~/.splinter/logs/<sitzung>/wire.jsonl    jeder Request-Body, jede Antwort, roh
- -

Deine Worte, die Antwort, das Denken, jeder Werkzeugaufruf mit Argumenten, -jede Beobachtung, Fehler, Token-Zahlen. Nichts gekuerzt — ein Log, das nur -das Gute behaelt, kann einen schlechten Turn nicht erklaeren.

+

Deine Worte, die Antwort, das Denken, jeder Werkzeugaufruf mit Argumenten, jede Beobachtung, Fehler, Token-Zahlen. Nichts gekuerzt — ein Log, das nur das Gute behaelt, kann einen schlechten Turn nicht erklaeren.

Bauen

-
$ git clone ssh://host/home/git/splinter.git
-$ cd splinter && make      # 248 KB, nichts ausser libc und curses
-$ make check               # 21 Test-Programme, plus i18n-Pruefer
-$ ./splinter              # Chat, Konfiguration wird gelesen
-$ ./splinter --daemon     # Telegram-Gateway
+$ cd splinter && make 248 KB, nichts ausser libc und curses +$ make check 21 Test-Programme, plus i18n-Pruefer +$ ./splinter Chat, Konfiguration wird gelesen +$ ./splinter --daemon Telegram-Gateway +

POSIX make, C99, -Wall -Wextra -Werror. Die NetBSD-curses liegt im Baum, damit das Binary nicht von der Laune einer Distribution abhaengt.

-

POSIX make, C99, -Wall -Wextra -Werror. Die NetBSD-curses liegt -im Baum, damit das Binary nicht von der Laune einer Distribution abhaengt.

Was es nicht ist

-
- +
diff --git a/tools/gen_www.py b/tools/gen_www.py new file mode 100644 index 0000000..ea3b670 --- /dev/null +++ b/tools/gen_www.py @@ -0,0 +1,411 @@ +#!/usr/bin/env python3 +"""Generate the splinter pages from one source, in every language. + +Same rule as the program's own catalogues: a text that exists in one language +and not the other is an error, not a gap. The generator refuses to write a page +when a key is missing, so index.html and index.en.html can never drift apart. + + python3 tools/gen_www.py # write the pages + python3 tools/gen_www.py --check # compare, exit 1 if they are stale +""" +import pathlib +import sys + +ROOT = pathlib.Path(__file__).resolve().parent.parent +OUT = ROOT / "src" / "www" + +LANGS = ["de", "en"] +FILES = {"de": "index.html", "en": "index.en.html"} + +HEAD = """ + + + +{{title}} + + + + +
+ +

{{langbar}}

+ +

splinter_

+

{{lead}}

+ +

9.125 {{m_lines}} · +248.568 {{m_binary}} · 21 {{m_tests}} · +8 {{m_plugins}} · 42 {{m_themes}} · BSD-3-Clause

+ +{{body}} + +
+ + +
+ + +""" + +LOOK = """

{h}

+
you:      Aendere in /tmp/x.c die Zeile 'return 0' in 'return 1'.
+thinking: I must read the file, then replace exactly one place.
+          An ambiguous pattern would be a wrong edit.
+tool:     edit {{"path":"/tmp/x.c","old":"return 0","new":"return 1"}}
+diff:     --- a//tmp/x.c
+          +++ b//tmp/x.c
+          @@ -11,3 +11,3 @@
+             int main(void) {{
+          -	return 0;
+          +	return 1;
+             }}
+model:    Done. Line 12 returns 1 now.
+
+  splinter 0.1.0          session sess-1794...          Delphinium   842 ms
+

{p}

+""" + +TOOLS = """

{h}

+ + + + + + + + + + + + + +
{t_tool}{t_class}{t_does}
readread{d_read}
searchread{d_search}
listread{d_list}
skill_searchread{d_ss}
skill_loadread{d_sl}
memory_searchread{d_ms}
writemutate{d_write}
editmutate{d_edit}
memory_addmutate{d_ma}
rundestructive{d_run}
delegatedestructive{d_del}
+""" + +TRANSPORTS = """

{h}

+ + + + + + + + + + +
{t_name}{t_does}
openai{d_openai}
cli{d_cli}
ring{d_ring}
mcp{d_mcp}
lcm{d_lcm}
focus{d_focus}
reminder{d_rem}
cps, clock{d_widget}
+""" + +DELEGATE = """

{h}

+
# ~/.splinter/splinter.conf.d/20-delegates.conf
+delegate = coder | C99, POSIX, Review | tags=code,c99,review | endpoint=... | model=...
+delegate = quick | short answers, chat | tags=chat,cheap | endpoint=... | model=...
+
+$ splinter --choose "pruefe diesen C-Code auf Speicherfehler"
+coder   7   task mentions 'code'
+

{p}

+""" + +CONFIG = """

{h}

+

{p}

+
# ~/.splinter/splinter.conf
+endpoint = http://kontron.local:8080/v1/chat/completions
+model    = Qwen3.6-35B-A3B-UD-Q8_K_XL.gguf
+locale   = de
+theme    = Delphinium
+autonomous = 1
+telegram_allow = 8300935
+plugin   = plugins/lcm/lcm.so
+plugin   = plugins/reminder/reminder.so
+""" + +BUILD = """

{h}

+
$ git clone ssh://host/home/git/splinter.git
+$ cd splinter && make      {c_make}
+$ make check               {c_check}
+$ ./splinter              {c_chat}
+$ ./splinter --daemon     {c_gw}
+

{p}

+""" + +T = { + "de": { + "title": "splinter — ein Agent-Harness, das dir gehoert", + "desc": "splinter ist ein Agent-Harness in C99/POSIX: Chat im Terminal, Werkzeuge mit Autorisierungsklassen, Plugins, jeder OpenAI-kompatible Endpunkt, Telegram-Gateway.", + "langbar": "Deutsch · English", + "lead": "Ein Agent-Harness, das dir gehoert: Chat im Terminal, Werkzeuge mit " + "Autorisierungsklassen, Plugins, jedes Modell das OpenAI spricht — von uns " + "gebaut, damit wir es umbauen koennen, statt uns an das Verhalten eines " + "fremden Clients zu gewoehnen.", + "m_lines": "Zeilen C99/POSIX", "m_binary": "Bytes Binary", + "m_tests": "Test-Programme", "m_plugins": "Plugins", "m_themes": "Farbschemata", + "foot": "splinter — C99/POSIX, BSD-3-Clause. Manual: man ./docs/splinter.1" + " · Plugin-ABI: docs/PLUGINS.md · Wir nehmen " + "auseinander, bauen nach und behalten. Ihre Systeme: in Ruhe lassen, wenn " + "nicht gefragt.", + }, + "en": { + "title": "splinter — an agent harness you own", + "desc": "splinter is a C99/POSIX agent harness: chat in the terminal, tools with " + "authorization classes, plugins, any OpenAI-compatible endpoint, a Telegram gateway.", + "langbar": "Deutsch · English", + "lead": "An agent harness you own: chat in the terminal, tools with authorization " + "classes, plugins, any model that speaks OpenAI — built by us so we can change " + "it, instead of getting used to how somebody else's client behaves.", + "m_lines": "lines of C99/POSIX", "m_binary": "bytes binary", + "m_tests": "test programs", "m_plugins": "plugins", "m_themes": "palettes", + "foot": "splinter — C99/POSIX, BSD-3-Clause. Manual: man ./docs/splinter.1" + " · Plugin ABI: docs/PLUGINS.md · We take things " + "apart, rebuild them and keep them. Their systems: leave them alone unless asked.", + }, +} + +SECTIONS = { + "de": [ + ("

Was es ist

\n

Dasselbe, was Claude Code oder opencode fuer dich sind: ein " + "Programm, in dem du mit einem Modell redest und das die Werkzeuge ausfuehrt, um die " + "es bittet. Der Unterschied ist der Quelltext. Wenn dich etwas stoert — das Layout, " + "die Tasten, die Frage nach Bestaetigung, der Transport — aenderst du es hier, statt " + "darauf zu warten.

\n

splinter ist die Schicht dazwischen: was gesendet wird, ob " + "ein Werkzeug laufen darf, was davon aufgezeichnet wird und was du auf dem Schirm " + "siehst.

"), + (LOOK.format(h="So sieht das aus", + p="Denken, Werkzeugaufruf mit Argumenten, Diff, Antwort. Der Denk-Block waechst " + "waehrend des Laufs dort, wo er hingehoert, und springt am Ende nicht weg.")), + ("

Drei Pruefungen, bevor ein Werkzeug laeuft

\n" + "

1 · Budget

Passt die " + "Konversation noch? Wenn nicht, wird vor dem Senden komprimiert — nicht danach, und " + "nicht heimlich waehrend des Laufs.

\n" + "

2 · Registry

Existiert das " + "Werkzeug? Ein erfundener Name wird zu einer Beobachtung, nicht zu einem " + "Absturz.

\n" + "

3 · Autorisierungsklasse

Das " + "Werkzeug erklaert, was es darf — read, mutate, " + "destructive. Nicht das Modell, nicht der Prompt. Bei mutate und destructive " + "fragt dich das Harness — im Chat in der Eingabezeile, auf Telegram als Nachricht mit " + "y/N.

"), + (TOOLS.format(h="Werkzeuge", t_tool="Werkzeug", t_class="Klasse", t_does="Was es tut", + d_read="numerierte Zeilen, offset/limit, verweigert Binaerdateien", + d_search="Literal-Suche im Baum, maximal 100 Treffer", + d_list="Verzeichnis anzeigen", + d_ss="installierte Skills finden — nichts wird vorgeladen", + d_sl="einen Skill ganz lesen", + d_ms="eigene Erinnerungen, pro Benutzer getrennt", + d_write="Datei schreiben, mit Diff in der Beobachtung", + d_edit="genau ein Vorkommen ersetzen; mehrdeutig ist ein Fehler", + d_ma="einen Fakt merken", + d_run="Shell-Befehl; der Exit-Status ist eine Beobachtung", + d_del="Aufgabe an ein anderes Modell geben")), + (TRANSPORTS.format(h="Transporte und Plugins", t_name="Name", t_does="Was es tut", + d_openai="jeder OpenAI-kompatible Endpunkt, Streaming ueber SSE", + d_cli="jedes Programm als Modell, etwa claude -p", + d_ring="Exit-Ring: 429 oder Limit → naechster Ausgang", + d_mcp="MCP-Server als Werkzeugquelle, mit den Schemata des Servers", + d_lcm="Komprimierung der Konversation", + d_focus="erinnert alle N Turns an das Ziel (/goal)", + d_rem="legt alle 10 Turns die Grundregeln zurueck in die Konversation", + d_widget="Widgets in der Seitenleiste")), + (DELEGATE.format(h="Delegation: andere Modelle, splinter waehlt", + p="Angefragter Tag zaehlt 5, Tag im Aufgabentext 3, Wort aus der Beschreibung 1. Die " + "Beobachtung beginnt mit der Wahl und dem Grund — eine falsche Wahl ist sichtbar " + "statt mysterioes. Ohne Profile: eine Zeile pro Modell.")), + (CONFIG.format(h="Konfiguration", + p="~/.splinter/splinter.conf, plus jede .conf in " + "~/.splinter/splinter.conf.d/ in Namensreihenfolge. Ein unbekannter " + "Schluessel ist ein Fehler mit Dateiname und Zeile — ein Tippfehler darf nicht " + "still nichts tun.")), + ("

Gateway: Telegram

\n

splinter --daemon pollt " + "getUpdates, ein Turn pro Nachricht, Antwort per " + "sendMessage. Der Token liegt in " + "~/.splinter/telegram.token mit Modus 0600 und wird nie als Argument " + "uebergeben — Argumente stehen in ps. Waehrend eines Turns sieht der " + "Chat alle vier Sekunden „typing“.

\n

Slash-Kommandos funktionieren " + "dort genauso. Programme in ~/.splinter/commands/ werden zu " + "/name: sie bekommen den Rest der Zeile als Argument, und ihre Ausgabe " + "geht ans Modell als Kontext — nicht an dich als Antwort. Damit holt sich " + "das Modell, was es selbst nicht sehen kann.

"), + ("

Was mitgeschrieben wird

\n" + "
~/.splinter/logs/<sitzung>/session.log   lesbar, "
+   "in Reihenfolge, alles\n~/.splinter/logs/<sitzung>/wire.jsonl"
+   "    jeder Request-Body, jede Antwort, roh
\n" + "

Deine Worte, die Antwort, das Denken, jeder Werkzeugaufruf mit Argumenten, jede " + "Beobachtung, Fehler, Token-Zahlen. Nichts gekuerzt — ein Log, das nur das Gute " + "behaelt, kann einen schlechten Turn nicht erklaeren.

"), + (BUILD.format(h="Bauen", c_make="248 KB, nichts ausser libc und curses", + c_check="21 Test-Programme, plus i18n-Pruefer", + c_chat="Chat, Konfiguration wird gelesen", c_gw="Telegram-Gateway", + p="POSIX make, C99, -Wall -Wextra -Werror. Die NetBSD-curses liegt im " + "Baum, damit das Binary nicht von der Laune einer Distribution abhaengt.")), + ("

Was es nicht ist

\n"), + ], + "en": [ + ("

What it is

\n

The same thing Claude Code or opencode is for you: a " + "program you sit in front of, talking to a model, running the tools it asks for. The " + "difference is the source. If something bothers you — the layout, the keys, the " + "confirmation prompts, the transport — you change it here instead of waiting for " + "someone else to.

\n

splinter is the layer in between: what gets sent, whether a " + "tool may run, what is written down, and what you see on screen.

"), + (LOOK.format(h="What that looks like", + p="Reasoning, the tool call with its arguments, the diff, the answer. The reasoning " + "block grows where it belongs while the turn runs, and does not jump away when it " + "ends.")), + ("

Three checks before any tool runs

\n" + "

1 · Budget

Does the conversation " + "still fit? If not, it is compacted before sending — not after, and not quietly in the " + "middle of a turn.

\n" + "

2 · Registry

Does the tool " + "exist? An invented name becomes an observation, not a crash.

\n" + "

3 · Authorization class

The " + "tool declares what it may do — read, mutate, " + "destructive. Not the model, not the prompt. For mutate and destructive the " + "harness asks you — in the prompt line in the chat, as a y/N message on " + "Telegram.

"), + (TOOLS.format(h="Tools", t_tool="Tool", t_class="Class", t_does="What it does", + d_read="numbered lines, offset/limit, refuses binary files", + d_search="literal search over a tree, at most 100 hits", + d_list="list a directory", + d_ss="find installed skills — nothing is preloaded", + d_sl="read one skill in full", + d_ms="your own memories, scoped per user", + d_write="write a file, with the diff in the observation", + d_edit="replace exactly one occurrence; ambiguous is an error", + d_ma="remember one fact", + d_run="a shell command; the exit status is an observation", + d_del="hand a task to another model")), + (TRANSPORTS.format(h="Transports and plugins", t_name="Name", t_does="What it does", + d_openai="any OpenAI-compatible endpoint, streaming over SSE", + d_cli="any program as the model, e.g. claude -p", + d_ring="exit ring: 429 or limit → next exit", + d_mcp="an MCP server as a tool source, with its own schemas", + d_lcm="compaction of the conversation", + d_focus="reminds the model of the goal every N turns (/goal)", + d_rem="puts the ground rules back into the conversation every 10 turns", + d_widget="widgets in the sidebar")), + (DELEGATE.format(h="Delegation: other models, splinter chooses", + p="A requested tag counts 5, a tag in the task 3, a word from the description 1. The " + "observation opens with the choice and the reason — a wrong pick is visible instead " + "of mysterious. No profiles: one line per model.")), + (CONFIG.format(h="Configuration", + p="~/.splinter/splinter.conf, plus every .conf in " + "~/.splinter/splinter.conf.d/ in name order. An unknown key is an " + "error naming the file and line — a typo must not silently do nothing.")), + ("

Gateway: Telegram

\n

splinter --daemon long-polls " + "getUpdates, one turn per message, answers with " + "sendMessage. The token lives in " + "~/.splinter/telegram.token with mode 0600 and is never passed as an " + "argument — arguments end up in ps. While a turn runs, the chat sees " + ""typing" every four seconds.

\n

Slash commands work there too. " + "Programs in ~/.splinter/commands/ become /name: they get " + "the rest of the line as an argument, and their output goes to the model as " + "context — not to you as a reply. That is how the model fetches what it cannot see " + "itself.

"), + ("

What gets written down

\n" + "
~/.splinter/logs/<session>/session.log   "
+   "readable, in order, everything\n~/.splinter/logs/<session>"
+   "/wire.jsonl    every request body, every reply, raw
\n" + "

Your words, the answer, the reasoning, every tool call with its arguments, every " + "observation, failures, token counts. Nothing truncated — a log that keeps only the " + "good parts cannot explain a bad turn.

"), + (BUILD.format(h="Building", c_make="248 KB, nothing but libc and curses", + c_check="21 test programs, plus the i18n checker", + c_chat="chat, the config is read", c_gw="Telegram gateway", + p="POSIX make, C99, -Wall -Wextra -Werror. NetBSD curses is vendored, so " + "the binary does not depend on a distribution's mood.")), + ("

What it is not

\n"), + ], +} + + +def render(lang): + strings = dict(T[lang]) + strings["lang"] = lang + body = "\n\n".join(SECTIONS[lang]) + html = HEAD + for key, value in strings.items(): + html = html.replace("{{%s}}" % key, value) + html = html.replace("{{body}}", body) + if "{{" in html: + leftover = html[html.index("{{"):html.index("{{") + 40] + raise SystemExit("gen_www: unfilled placeholder: %s" % leftover) + return html + + +def main(argv): + check = "--check" in argv + problems = [] + # both languages must cover the same keys + for key in sorted(set(T["de"]) | set(T["en"])): + for lang in LANGS: + if key not in T[lang]: + problems.append("%s: missing key %r" % (lang, key)) + if problems: + for p in problems: + print("gen_www: " + p, file=sys.stderr) + return 1 + + stale = [] + for lang in LANGS: + path = OUT / FILES[lang] + html = render(lang) + if check: + if not path.exists() or path.read_text(encoding="utf-8") != html: + stale.append(str(path)) + continue + path.write_text(html, encoding="utf-8") + print("gen_www: wrote %s (%d bytes)" % (path, len(html.encode()))) + if check: + if stale: + print("gen_www: stale page(s): " + ", ".join(stale), file=sys.stderr) + return 1 + print("gen_www: ok (%d languages)" % len(LANGS)) + return 0 + + +if __name__ == "__main__": + sys.exit(main(sys.argv[1:]))