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.
This commit is contained in:
Konrad committed 2026-11-08 13:57:24 +00:00
1 parent 878c8588e0
commit 6872aad60a
1 file changed
+207 -99
+207 -99
View File
@@ -1,119 +1,227 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<html lang="de">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>splinter — an agent harness with a curses UI</title>
<meta name="description" content="splinter is a C99/POSIX agent harness: chat on three quarters of the terminal, a sidebar on one quarter, plugins that add tools and widgets.">
<style type="text/css">
body { background: #0d0d0d; color: #d8d8d8; font-family: "DejaVu Sans Mono", monospace;
max-width: 52em; margin: 4em auto; padding: 0 1em; line-height: 1.55; }
h1 { color: #f0f0f0; font-size: 1.6em; border-bottom: 1px solid #333; padding-bottom: .4em; }
h2 { color: #b9b9b9; font-size: 1.1em; margin-top: 2.2em; }
a { color: #7fb2ff; }
pre { background: #151515; border-left: 3px solid #333; padding: .8em; overflow-x: auto;
color: #cfd6dd; }
code { color: #e6c07b; }
.dim { color: #777; }
table { border-collapse: collapse; margin: .5em 0; }
th, td { text-align: left; padding: .2em .8em .2em 0; border-bottom: 1px solid #222; }
th { color: #b9b9b9; }
ul { padding-left: 1.2em; }
</style>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>splinter &mdash; ein Agent-Harness, das dir gehoert</title>
<meta name="description" content="splinter ist ein Agent-Harness in C99/POSIX: Chat-Oberflaeche im Terminal, Werkzeuge mit Autorisierungsklassen, Plugins, jeder OpenAI-kompatible Endpunkt, Telegram-Gateway.">
<style type="text/css">
body { background: #0d0f12; color: #c8ccd2; margin: 0; padding: 0;
font-family: "DejaVu Sans Mono", "Courier New", monospace;
font-size: 14px; line-height: 1.55; }
#wrap { width: 46em; margin: 0 auto; padding: 3em 1.5em 6em 1.5em; }
h1 { font-size: 2.4em; color: #e8ecf1; margin: 0 0 0.2em 0; letter-spacing: -0.02em; }
h1 span { color: #5f9ea0; }
h2 { font-size: 1em; color: #5f9ea0; margin: 2.6em 0 0.7em 0; font-weight: normal;
border-bottom: 1px solid #22262c; padding-bottom: 0.3em;
text-transform: uppercase; letter-spacing: 0.08em; }
p { margin: 0.8em 0; }
a { color: #7fb3b5; text-decoration: none; border-bottom: 1px dotted #3d5a5c; }
a:hover { color: #a8d8da; }
.lead { font-size: 1.15em; color: #e2e6ea; }
.meta { color: #6b727c; font-size: 0.92em; margin-bottom: 2.5em; }
.meta b { color: #9aa2ad; font-weight: normal; }
pre { background: #07090b; border: 1px solid #1d2126; border-left: 2px solid #2f4a4c;
padding: 1em 1.1em; overflow-x: auto; font-size: 0.88em; line-height: 1.45;
color: #b9c0c8; margin: 1.2em 0; }
pre .u { color: #e8ecf1; }
pre .k { color: #5f9ea0; }
pre .d { color: #6b727c; }
pre .g { color: #7fa86b; }
table { border-collapse: collapse; width: 100%; margin: 1.2em 0; font-size: 0.9em; }
th { text-align: left; color: #7d848e; font-weight: normal; padding: 0.35em 0.6em;
border-bottom: 1px solid #22262c; text-transform: uppercase; font-size: 0.85em;
letter-spacing: 0.06em; }
td { padding: 0.35em 0.6em; border-bottom: 1px solid #14181c; vertical-align: top; }
td.c { color: #5f9ea0; white-space: nowrap; }
td.m { color: #c98b6b; white-space: nowrap; }
td.x { color: #b06f6f; white-space: nowrap; }
.box { border: 1px solid #1d2126; padding: 0.9em 1em; margin: 1em 0; background: #0a0c0f; }
.box h3 { margin: 0 0 0.3em 0; font-size: 0.95em; color: #e2e6ea; font-weight: normal; }
ul { margin: 0.6em 0 0.6em 1.2em; padding: 0; }
li { margin: 0.25em 0; }
.small { font-size: 0.88em; color: #7d848e; }
hr { border: 0; border-top: 1px solid #1d2126; margin: 3em 0 1.5em 0; }
#foot { color: #5a616b; font-size: 0.88em; }
</style>
</head>
<body>
<div id="wrap">
<h1>splinter</h1>
<h1>splinter<span>_</span></h1>
<p class="lead">Ein Agent-Harness, das dir gehoert: Chat im Terminal, Werkzeuge
mit Autorisierungsklassen, Plugins, jedes Modell das OpenAI spricht &mdash;
von uns gebaut, damit wir es umbauen koennen, statt uns an das Verhalten
eines fremden Clients zu gewoehnen.</p>
<p class="dim">agent harness · C99/POSIX · curses UI · plugins · no runtime, no SDK, no database</p>
<p class="meta"><b>9.125</b> Zeilen C99/POSIX &middot;
<b>248.568</b> Bytes Binary &middot; <b>21</b> Test-Programme &middot;
<b>8</b> Plugins &middot; <b>42</b> Farbschemata &middot; BSD-3-Clause</p>
<p>
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.
</p>
<h2>Was es ist</h2>
<pre><code>+---------------------------------+------------+
| history | sidebar |
| you: which files changed? | session |
| agent: three, all in src/ | transport |
| | theme |
| | last turn |
| | widgets |
+---------------------------------+------------+
| splinter 0.1.0 Delphinium 38ms |
+-----------------------------------------------+</code></pre>
<p>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 &mdash; das Layout, die
Tasten, die Frage nach Bestaetigung, der Transport &mdash; aenderst du es hier,
statt darauf zu warten.</p>
<h2>Run it</h2>
<pre><code>$ make
$ make check
$ ./splinter --chat --plugin plugins/clock/clock.so --script replies.txt</code></pre>
<p>
Seven test binaries drive the real loop through a mock transport: no network,
no key, no model. The plugin test loads the real <code>clock.so</code> with
<code>dlopen</code> and checks that its worker thread published.
</p>
<p>splinter ist die Schicht dazwischen: was gesendet wird, ob ein Werkzeug laufen
darf, was davon aufgezeichnet wird und was du auf dem Schirm siehst.</p>
<h2>Rules the loop enforces</h2>
<ul>
<li>the request fits the byte budget, otherwise nothing is sent at all;</li>
<li>the tool exists in the registry, otherwise the model is told it does not;</li>
<li>the tool's authorization class allows the call — mutating and destructive
tools ask the operator unless autonomy was granted;</li>
<li>a denial is the observation the model receives, never a silent skip.</li>
</ul>
<p>
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.
</p>
<h2>So sieht das aus</h2>
<pre><span class="u">du:</span> Aendere in /tmp/x.c die Zeile 'return 0' in 'return 1'.
<span class="k">denkt:</span> Ich muss die Datei lesen, dann genau eine Stelle ersetzen.
Ein mehrdeutiges Muster waere ein falscher Edit.
<span class="k">werkzeug:</span> edit {"path":"/tmp/x.c","old":"return 0","new":"return 1"}
<span class="k">aenderung:</span> --- a//tmp/x.c
+++ b//tmp/x.c
@@ -11,3 +11,3 @@
int main(void) {
- return 0;
+ return 1;
}
<span class="k">modell:</span> Geaendert. Zeile 12 gibt jetzt 1 zurueck.
<span class="d"> splinter 0.1.0 Sitzung sess-1794... Delphinium 842 ms</span></pre>
<p>Denken, Werkzeugaufruf mit Argumenten, Diff, Antwort. Der Denk-Block waechst
waehrend des Laufs dort, wo er hingehoert, und springt am Ende nicht weg.</p>
<h2>Drei Pruefungen, bevor ein Werkzeug laeuft</h2>
<div class="box">
<h3>1 &middot; Budget</h3>
<p class="small">Passt die Konversation noch? Wenn nicht, wird vor dem Senden
komprimiert &mdash; nicht danach, und nicht heimlich waehrend des Laufs.</p>
</div>
<div class="box">
<h3>2 &middot; Registry</h3>
<p class="small">Existiert das Werkzeug? Ein erfundener Name wird zu einer
Beobachtung, nicht zu einem Absturz.</p>
</div>
<div class="box">
<h3>3 &middot; Autorisierungsklasse</h3>
<p class="small">Das <em>Werkzeug</em> erklaert, was es darf &mdash;
<b>read</b>, <b>mutate</b>, <b>destructive</b>. Nicht das Modell, nicht der
Prompt. Bei mutate und destructive fragt dich das Harness &mdash; im Chat in der
Eingabezeile, auf Telegram als Nachricht mit y/N.</p>
</div>
<h2>Werkzeuge</h2>
<h2>Plugins</h2>
<p>
A plugin is a shared object against <code>libsplinter.so</code>, exporting one
symbol:
</p>
<pre><code>const struct sp_plugin *sp_plugin_describe(void);</code></pre>
<p>
It can register <b>tools</b> (with the authorization classes above) and
<b>widgets</b> that appear in the sidebar. A widget's <code>tick()</code> runs on
its own thread and may block; it publishes text with
<code>sp_host_widget_text()</code> and never touches curses. Only the UI thread
draws.
</p>
<table>
<tr><th>hook</th><th>thread</th><th>may block</th></tr>
<tr><td>init()</td><td>main</td><td>no</td></tr>
<tr><td>run()</td><td>main</td><td>yes</td></tr>
<tr><td>tick()</td><td>its own</td><td>yes</td></tr>
<tr><td>draw()</td><td>UI</td><td>no</td></tr>
<tr><th>Werkzeug</th><th>Klasse</th><th>Was es tut</th></tr>
<tr><td class="c">read</td><td>read</td><td>numerierte Zeilen, offset/limit, verweigert Binaerdateien</td></tr>
<tr><td class="c">search</td><td>read</td><td>Literal-Suche im Baum, maximal 100 Treffer</td></tr>
<tr><td class="c">list</td><td>read</td><td>Verzeichnis anzeigen</td></tr>
<tr><td class="c">skill_search</td><td>read</td><td>installierte Skills finden &mdash; nichts wird vorgeladen</td></tr>
<tr><td class="c">skill_load</td><td>read</td><td>einen Skill ganz lesen</td></tr>
<tr><td class="c">memory_search</td><td>read</td><td>eigene Erinnerungen, pro Benutzer getrennt</td></tr>
<tr><td class="c">write</td><td class="m">mutate</td><td>Datei schreiben, mit Diff in der Beobachtung</td></tr>
<tr><td class="c">edit</td><td class="m">mutate</td><td>genau ein Vorkommen ersetzen; mehrdeutig ist ein Fehler</td></tr>
<tr><td class="c">memory_add</td><td class="m">mutate</td><td>einen Fakt merken</td></tr>
<tr><td class="c">run</td><td class="x">destructive</td><td>Shell-Befehl; der Exit-Status ist eine Beobachtung</td></tr>
<tr><td class="c">delegate</td><td class="x">destructive</td><td>Aufgabe an ein anderes Modell geben</td></tr>
</table>
<p>
A wrong ABI number is refused with both numbers in the message. A failed
<code>init()</code> is reported and skipped. Nothing is
<code>dlclose()</code>d while a thread might still be inside it.
</p>
<h2>Themes</h2>
<p>
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: <b>Delphinium</b>.
</p>
<pre><code>$ ./splinter --list-themes | head -3
Alpine
Arizona
BeigeRose</code></pre>
<h2>Transporte und Plugins</h2>
<h2>What it is not</h2>
<p>
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.
</p>
<table>
<tr><th>Name</th><th>Was es tut</th></tr>
<tr><td class="c">openai</td><td>jeder OpenAI-kompatible Endpunkt, Streaming ueber SSE</td></tr>
<tr><td class="c">cli</td><td>jedes Programm als Modell, etwa <code>claude -p</code></td></tr>
<tr><td class="c">ring</td><td>Exit-Ring: 429 oder Limit &rarr; naechster Ausgang</td></tr>
<tr><td class="c">mcp</td><td>MCP-Server als Werkzeugquelle, mit den Schemata des Servers</td></tr>
<tr><td class="c">lcm</td><td>Komprimierung der Konversation</td></tr>
<tr><td class="c">focus</td><td>erinnert alle N Turns an das Ziel (<code>/goal</code>)</td></tr>
<tr><td class="c">reminder</td><td>legt alle 10 Turns die Grundregeln zurueck in die Konversation</td></tr>
<tr><td class="c">cps, clock</td><td>Widgets in der Seitenleiste</td></tr>
</table>
<p class="dim">Manual: <code>man ./docs/splinter.1</code> ·
Plugin ABI: <code>docs/PLUGINS.md</code> · License: BSD-3-Clause</p>
<h2>Delegation: andere Modelle, splinter waehlt</h2>
<pre><span class="d"># ~/.splinter/splinter.conf.d/20-delegates.conf</span>
delegate = coder | C99, POSIX, Review | tags=code,c99,review | endpoint=... | model=...
delegate = quick | kurze Antworten, Chat | tags=chat,cheap | endpoint=... | model=...
<span class="u">$</span> splinter --choose "pruefe diesen C-Code auf Speicherfehler"
coder 7 task mentions 'code'</pre>
<p>Angefragter Tag zaehlt 5, Tag im Aufgabentext 3, Wort aus der Beschreibung 1.
Die Beobachtung beginnt mit der Wahl und dem Grund &mdash; eine falsche Wahl ist
sichtbar statt mysterioes. Ohne Profile: eine Zeile pro Modell.</p>
<h2>Konfiguration</h2>
<p><code>~/.splinter/splinter.conf</code>, plus jede <code>.conf</code> in
<code>~/.splinter/splinter.conf.d/</code> in Namensreihenfolge. Ein unbekannter
Schluessel ist ein Fehler mit Dateiname und Zeile &mdash; ein Tippfehler darf
nicht still nichts tun.</p>
<pre><span class="d"># ~/.splinter/splinter.conf</span>
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</pre>
<h2>Gateway: Telegram</h2>
<p><code>splinter --daemon</code> pollt <code>getUpdates</code>, ein Turn pro
Nachricht, Antwort per <code>sendMessage</code>. Der Token liegt in
<code>~/.splinter/telegram.token</code> mit Modus 0600 und wird nie als Argument
uebergeben &mdash; Argumente stehen in <code>ps</code>. Waehrend eines Turns
sieht der Chat alle vier Sekunden &bdquo;typing&ldquo;.</p>
<p>Slash-Kommandos funktionieren dort genauso. Programme in
<code>~/.splinter/commands/</code> werden zu <code>/name</code>: sie bekommen den
Rest der Zeile als Argument, und ihre Ausgabe geht <em>ans Modell</em> als
Kontext &mdash; nicht an dich als Antwort. Damit holt sich das Modell, was es
selbst nicht sehen kann.</p>
<h2>Was mitgeschrieben wird</h2>
<pre><span class="d">~/.splinter/logs/&lt;sitzung&gt;/session.log</span> lesbar, in Reihenfolge, alles
<span class="d">~/.splinter/logs/&lt;sitzung&gt;/wire.jsonl</span> jeder Request-Body, jede Antwort, roh</pre>
<p>Deine Worte, die Antwort, das Denken, jeder Werkzeugaufruf mit Argumenten,
jede Beobachtung, Fehler, Token-Zahlen. Nichts gekuerzt &mdash; ein Log, das nur
das Gute behaelt, kann einen schlechten Turn nicht erklaeren.</p>
<h2>Bauen</h2>
<pre><span class="u">$</span> git clone ssh://host/home/git/splinter.git
<span class="u">$</span> cd splinter &amp;&amp; make <span class="d"># 248 KB, nichts ausser libc und curses</span>
<span class="u">$</span> make check <span class="d"># 21 Test-Programme, plus i18n-Pruefer</span>
<span class="u">$</span> ./splinter <span class="d"># Chat, Konfiguration wird gelesen</span>
<span class="u">$</span> ./splinter --daemon <span class="d"># Telegram-Gateway</span></pre>
<p>POSIX make, C99, <code>-Wall -Wextra -Werror</code>. Die NetBSD-curses liegt
im Baum, damit das Binary nicht von der Laune einer Distribution abhaengt.</p>
<h2>Was es nicht ist</h2>
<ul>
<li>Kein Modell. splinter bringt keins mit und waehlt keins fuer dich.</li>
<li>Keine Cloud. Es spricht mit dem Endpunkt, den du eintraegst.</li>
<li>Kein Sandkasten. Plugins laufen im Prozess mit deinen Rechten &mdash; die
Klassen schuetzen vor dem Modell, nicht vor Code, den du selbst laedst.</li>
</ul>
<hr>
<p id="foot">splinter &mdash; C99/POSIX, BSD-3-Clause.
Manual: <code>man ./docs/splinter.1</code> &middot;
Plugin-ABI: <code>docs/PLUGINS.md</code> &middot;
Wir nehmen auseinander, bauen nach und behalten. Ihre Systeme: in Ruhe lassen,
wenn nicht gefragt.</p>
</div>
</body>
</html>