d2e06b316d19b7e5f7a136a0087518e2a3f503ea
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).
splinter
A small C99/POSIX agent harness: one turn, a tool registry, explicit authorization classes, an append-only session log.
make
make check
What it does
splinter -p "list the C files" --endpoint http://127.0.0.1:8080/turn sends a
prompt, runs the tools the transport asks for, and prints the answer. Every turn
is appended to ~/.splinter/<id>.jsonl as one JSON object per line.
What it refuses to do
- Send a request that exceeds the configured byte budget (nothing is sent; the turn fails instead of letting an endpoint truncate silently).
- Run a tool that is not in the registry (the model is told, not guessed at).
- Run a mutating or destructive tool without operator consent, unless
--autonomouswas given. - Skip a denial silently: the denial becomes the observation the model sees.
Protocol
The harness speaks a line protocol with its transport, not a vendor API:
request user <text>
request observe <tool> <output>
reply answer <text>
reply tool <name> <arguments>
A provider adapter translates an OpenAI-compatible endpoint into this shape and
back. That is why make check needs no network, no key and no model: the mock
transport replays replies.
Layout
include/splinter.h the whole interface
src/buf.c growable buffer, JSON escaping
src/tool.c registry
src/session.c append-only JSONL session
src/transport.c deterministic mock transport
src/transport_curl.c HTTP via curl(1), request body through a temp file
src/builtin.c echo (read) and run (destructive)
src/agent.c the loop
src/main.c CLI
tests/ five test binaries, run by `make check`
docs/splinter.1 manual page
src/www/index.html HTML 4.01 static page
Limits, stated
- Tool arguments reach the tool as one string; each tool validates its own.
- The loop has no JSON tool-call parser yet. Wire formats live in adapters, so the loop stays testable; an OpenAI adapter is the next piece.
- No compaction, no retrieval tiers. When a turn does not fit the budget it fails loudly, which is the honest behaviour until compaction exists.
License
BSD-3-Clause.
Languages
C
87.6%
Shell
6.1%
Python
2.7%
HTML
2.4%
Makefile
1.2%