From 6872aad60ae12ba2c2930f0c4bb1ebb7b3f9b90d Mon Sep 17 00:00:00 2001 From: Konrad Date: Sun, 8 Nov 2026 13:57:24 +0000 Subject: [PATCH] splinter: a project page that says what this is The old page described the loop and the plugin ABI and never answered the question it exists to answer: this is an agent harness with a chat UI, like Claude Code or opencode, ours to change. That comes first now. HTML 4.01 Strict, one file, no JavaScript, no fonts to fetch. Every number on it is taken from the build: 9125 lines, 248568 bytes, 21 test programs, 8 plugins, 42 palettes. The termnial block is a real transcript including the diff. Served from src/www on :8099 - 200 on loopback, WireGuard and LAN. --- src/www/index.html | 306 ++++++++++++++++++++++++++++++--------------- 1 file changed, 207 insertions(+), 99 deletions(-) diff --git a/src/www/index.html b/src/www/index.html index fb76b26..c362c06 100644 --- a/src/www/index.html +++ b/src/www/index.html @@ -1,119 +1,227 @@ - + - - splinter — an agent harness with a curses UI - - + +splinter — ein Agent-Harness, das dir gehoert + + +
-

splinter

+

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.

-

agent harness · C99/POSIX · curses UI · plugins · no runtime, no SDK, no database

+

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

-

-splinter is the program you sit in front of. It talks to a model, runs the -tools the model asks for, and shows you what happened — in a terminal, on three -quarters of the screen, with a sidebar on the rest. -

+

Was es ist

-
+---------------------------------+------------+
-| history                         | sidebar    |
-| you: which files changed?       | session    |
-| agent: three, all in src/       | transport  |
-|                                 | theme      |
-|                                 | last turn  |
-|                                 | widgets    |
-+---------------------------------+------------+
-| splinter 0.1.0              Delphinium  38ms |
-+-----------------------------------------------+
+

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.

-

Run it

-
$ make
-$ make check
-$ ./splinter --chat --plugin plugins/clock/clock.so --script replies.txt
-

-Seven test binaries drive the real loop through a mock transport: no network, -no key, no model. The plugin test loads the real clock.so with -dlopen and checks that its worker thread published. -

+

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

-

Rules the loop enforces

- -

-The model never decides whether a tool may run. The registry and the class do. -A plugin can add tools, but not change that rule. -

+

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
+          +++ b//tmp/x.c
+          @@ -11,3 +11,3 @@
+             int main(void) {
+          -	return 0;
+          +	return 1;
+             }
+modell:   Geaendert. Zeile 12 gibt jetzt 1 zurueck.
+
+  splinter 0.1.0          Sitzung 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.

+ +

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.

+
+ +

Werkzeuge

-

Plugins

-

-A plugin is a shared object against libsplinter.so, exporting one -symbol: -

-
const struct sp_plugin *sp_plugin_describe(void);
-

-It can register tools (with the authorization classes above) and -widgets that appear in the sidebar. A widget's tick() runs on -its own thread and may block; it publishes text with -sp_host_widget_text() and never touches curses. Only the UI thread -draws. -

- - - - - + + + + + + + + + + + +
hookthreadmay block
init()mainno
run()mainyes
tick()its ownyes
draw()UIno
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_loadreadeinen Skill ganz lesen
memory_searchreadeigene Erinnerungen, pro Benutzer getrennt
writemutateDatei schreiben, mit Diff in der Beobachtung
editmutategenau ein Vorkommen ersetzen; mehrdeutig ist ein Fehler
memory_addmutateeinen Fakt merken
rundestructiveShell-Befehl; der Exit-Status ist eine Beobachtung
delegatedestructiveAufgabe an ein anderes Modell geben
-

-A wrong ABI number is refused with both numbers in the message. A failed -init() is reported and skipped. Nothing is -dlclose()d while a thread might still be inside it. -

-

Themes

-

-Colours come from CDE's own palette files — 42 of them, converted by a -generator, not invented. The eight colour sets of a palette become roles by -measurement: darkest is the background, lightest the foreground, the second -darkest the border, the most saturated the accent. Default: Delphinium. -

-
$ ./splinter --list-themes | head -3
-Alpine
-Arizona
-BeigeRose
+

Transporte und Plugins

-

What it is not

-

-Not a model, not a plugin marketplace, not a sandbox. A plugin runs with your -rights; the authorization classes protect the harness from the model, not from -code you chose to load. -

+ + + + + + + + + + +
NameWas es tut
openaijeder OpenAI-kompatible Endpunkt, Streaming ueber SSE
clijedes Programm als Modell, etwa claude -p
ringExit-Ring: 429 oder Limit → naechster Ausgang
mcpMCP-Server als Werkzeugquelle, mit den Schemata des Servers
lcmKomprimierung der Konversation
focuserinnert alle N Turns an das Ziel (/goal)
reminderlegt alle 10 Turns die Grundregeln zurueck in die Konversation
cps, clockWidgets in der Seitenleiste
-

Manual: man ./docs/splinter.1 · -Plugin ABI: docs/PLUGINS.md · License: BSD-3-Clause

+

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=...
+
+$ 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.

+ +

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
+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 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.

+ +

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
+ +

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

+ + + +
+ + +