Commit Graph
37 Commits
Author SHA1 Message Date
lotherkandClaude Sonnet 5.5 cc2fcb5d34 www: hand-written site, drop the generator, no private values in docs
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-11 17:13:20 +00:00
lotherk 9c205dcd21 a2a: the client can send a file, and already saves what it receives
a2a_send posts SendMessage with a text part and, when a path is given, a file
part: base64 bytes, a name (the path's last component) and a media type
guessed from the name, at most 8 MiB -- the same cap the server enforces on
the way in. The answer is text; a file the other side sends back is saved by
collect_parts and named by path, which the tool returns.

sp_b64_encode is the missing direction of the base64 helper, with vectors of
its own in test_b64: empty input, one and two trailing bytes, a NUL.

test_a2a: a real PNG is attached, the request carries name, mimeType and the
base64 bytes, and the other side names it in the answer; a missing path is an
error, not a silent empty message.
2026-11-11 10:25:49 +00:00
lotherk a6d54d120b a2a: a2a_subscribe reads a remote task's events
The client half had GetTask and CancelTask; a subscription is the one that
shows what a task is doing. The tool posts SubscribeToTask and reads the SSE
stream into one observation: each statusUpdate's state and message, each
artifactUpdate's text, and a whole task if the server sends it that way, in
the order the events arrived. A plain JSON-RPC answer -- usually the
TaskNotFound error -- is read too, so a refused subscription says -32001
instead of 'no events'.

The fake agent answers SubscribeToTask with a status update plus an artifact;
test_a2a drives the tool through the script transport and checks the happy
path and the unknown id.
2026-11-11 09:18:26 +00:00
lotherk a72df5bb7f gateway: a local file that is not an image goes as a document
sendPhoto and sendDocument are one upload path now: send_upload() takes the
method and the form field, so ![alt](/path/report.md) leaves the chat as a
document with the alt text as caption, in the order of the answer. The photo
branch still checks the bytes (PNG/JPEG/GIF/WebP, 10 MiB), so a text file
cannot ride in as a photo; documents are capped at 50 MiB and have to be a
readable regular file. A missing or unreadable path stays a reference in the
chat.

test_gateway: a local PNG is a photo, a text file is a document, and neither
leaves the markdown in the chat.
2026-11-11 07:17:28 +00:00
lotherk 07e8b62be9 gateway: local images are uploaded, not just linked
![alt](/path/to.png) and ![alt](file:///...) are sent with sendPhoto as a
multipart upload (-F photo=@path), in the order of the answer, the alt text as
caption -- the same path a URL takes, except that the bytes come from this
machine.

Only a regular file that really is a PNG, JPEG, GIF or WebP up to 10 MiB is
uploaded, so the chat cannot be turned into a way to post arbitrary files.
Anything else (missing, unreadable, not an image, too big) falls back to
sending the reference as text.

tg_curl is split into tg_run(args) + tg_curl(json), so the upload passes -F
without duplicating the pipe, timeout and waitpid handling.

test_gateway: a local PNG goes out as a photo with its caption; a text file
named in the alt text is not uploaded and stays a reference.
2026-11-11 07:07:27 +00:00
lotherk 6074e7da1e gateway: markdown images go out as photos
![alt](https://...) is sent with sendPhoto (Telegram fetches the URL), the
alt text as caption, in the order the answer was written: text, photo, text.
An image inside a fenced block, an inline code span or a table row is left
alone -- lifting it out of a table would break the table.

When Telegram refuses the photo (unreachable URL, wrong type), the link goes
out as text instead: a broken image must not swallow the answer.

test_gateway: the photo call with its caption, the text before and after it,
no markdown image in the chat, and an image inside code staying text.
2026-11-10 20:47:39 +00:00
lotherk 5de70f5dbb gateway, ui: /new starts a fresh conversation; /connect in the TUI
/new (and /reset) opens a new session file in the same directory, drops the
conversation back to the system prompt and, in the gateway, resets the
interview/connect state so a half-finished flow does not survive the reset.
The old session file stays: it is the record of what was said. In the TUI the
history pane is cleared, because it shows the old conversation. The directory
is read before the static session struct is cleared, or the second /new would
start from an empty path.

/connect exists in the TUI now: the same four questions, one answer per line,
the same validation and presets, and connect.nodir when the run has no config
file to write to (--no-config).

conv.c grows sp_conv_reset(), which frees every message and puts the system
prompt back.

test_gateway checks /new (message and a new session file); test_ui checks
/new in the pane and the /connect guard with --no-config.
2026-11-10 20:36:08 +00:00
lotherk 900b8e1efa a2a: SubscribeToTask replays the stored state
The last refused method. This server answers one request at a time, so while
a subscription is open the task cannot make progress: a live feed would be a
promise it could not keep. It sends one statusUpdate with the state and its
message (the answer, or the INPUT_REQUIRED question) and ends the stream; an
unknown id is TaskNotFound. The header no longer claims streaming is not
served, either.

test_a2a_server checks the replay for a stored task and the -32001 for an
unknown id.
2026-11-10 20:02:58 +00:00
lotherk cc9747b1a7 model choice sticks, endpoints are probed, connect is tested, A2A takes files
/model writes its choice to <config>.d/90-model.conf, so the next start uses
it; picking main deletes the file and the configuration speaks again. With a
plugin transport nothing is written, because that program picks the model.
/model probe asks every endpoint /v1/models and offers what it really serves
as buttons; the callback carries an index, because a GGUF path does not fit
in Telegram's 64 bytes. The TUI gets the same command: the list, or
/model <id|name>, with the same persistence.

/connect runs one tiny turn against the provider it just saved (30 s) and
says whether endpoint, model and key answer. The message with the buttons
goes out before the wait starts, so the save is visible immediately.

A2A no longer refuses binary parts: file{bytes} and raw with a non-text media
type are written to the session's inbox (0600, 8 MiB cap) and the prompt says
[file <name> at <path> (mime, n bytes)], so a text model can hand the file to
a tool. The client saves what a remote agent sends the same way
(SPLINTER_A2A_INBOX). SubscribeToTask stays refused: the task store has no
live events, and a one-shot replay would pretend to be a subscription.

Markdown gains <https://...> autolinks and images (as links, since Telegram
has no inline image without sendPhoto).
2026-11-10 19:33:38 +00:00
lotherk 7ce8e6b96c gateway: /model switches models, /connect adds a provider
/model offers the models the configuration names -- the main endpoint,
every delegate with a model, every exit -- as inline buttons and points the
agent's transport at the one that is pressed. /model <name> keeps the
endpoint and takes another model from it. A provider whose key variable is
not exported is marked in the menu. The choice is not written: it lasts for
the session, a restart goes back to the config.

/connect asks for name, endpoint, model and key variable, validates each
answer, and writes the delegate line to <config>.d/20-connect.conf before
anything is used, so the same run has the provider and the next start loads
it.  and [?2031h]10;?]11;?[>0q[?25lP+q4d73\[?1016$p[?2027$p[?2031$p[?1004$p[?2004$p[?2026$p[?u]99;i=opentui-notifications:p=?;\]1337;Capabilities\]7501;?\]66;w=1; \]66;s=2; \[?1049h[?25l[>4;1m[?2004h[?1000h[?1002h[?1003h[?1006h]7501;state=idle:app=opencode\[?2026h[?25l                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ]22;default\[?2026l]0;OpenCode[?2026h[?25l                                ▄     █▀▀█ █▀▀█ █▀▀█ █▀▀▄█▀▀▀ █▀▀█ █▀▀█ █▀▀██  █ █  █ █▀▀▀ █  ██    █  █ █  █ █▀▀▀▀▀▀▀ █▀▀▀ ▀▀▀▀ ▀▀▀▀▀▀▀▀ ▀▀▀▀ ▀▀▀▀ ▀▀▀▀┃                                                                          ┃  Ask anything… "What is the tech stack of this project?"                 ┃                                                                          ┃                                                                          ╹▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀~/src/splinter:mainshift+tab agentsctrl+p commands2.2.6]12;#c1c497[1 q[?25h[?2026l[?2026h[?25l┃┃┃┃Build·DeepSeek V4.1 Flash 1017Ollama Cloud╹[?25h[?2026l[?2026h[?25l┃┃┃┃Build·DeepSeek V4.1 Flash 1017Ollama Cloud╹[?25h[?2026l[?2026h[?25l┃┃┃┃Build·DeepSeek V4.1 Flash 1017Ollama Cloud╹[?25h[?2026l[?2026h[?25l┃┃┃┃Build·DeepSeek V4.1 Flash 1017Ollama Cloud╹[?25h[?2026l[?2026h[?25l┃┃┃┃Build·DeepSeek V4.1 Flash 1017Ollama Cloud╹[?25h[?2026l[?2026h[?25l┃┃┃┃Build·DeepSeek V4.1 Flash 1017Ollama Cloud╹[?25h[?2026l[?2026h[?25l┃┃┃┃Build·DeepSeek V4.1 Flash 1017Ollama Cloud╹[?25h[?2026l[?2026h[?25l┃┃┃┃Build·DeepSeek V4.1 Flash 1017Ollama Cloud╹[?25h[?2026l[?2026h[?25l┃┃┃┃Build·DeepSeek V4.1 Flash 1017Ollama Cloud╹[?25h[?2026l[?2026h[?25l┃┃┃┃BuildDeepSeek V4.1 Flash 1017╹[?25h[?2026l]7501;state=clear\[?25h]22;\[>4;0m[?1003l[?1002l[?1000l[?1006l[?2004l[?1049l[?2031l]0;]12;default]112[0 q[?25h[?25h stand for their usual endpoints. The drop-in
goes next to the file that was actually read (sp_config_loaded_path), not
next to a path guessed from the environment, so --config works.

providers.c holds the list, the validation, the transport switch and the
provider identity main.c used to compute inline. test_providers covers the
list, the refusals, replacement of a line and a reload of what was written;
test_gateway presses the model button, proves the next turn goes to the new
endpoint (the test one is dead) and runs /connect to the written file.
2026-11-10 10:25:20 +00:00
lotherk e7a5afed3c gateway: render the model's markdown as Telegram HTML
A chat that shows **fett**, |---| and <b> lost the answer's shape. tgmd.c
turns bold, italic, strike, inline code, fenced blocks, links, headings,
bullets and quotes into the tags parse_mode=HTML accepts and escapes
everything else, so a '<' stays text and snake_case_name stays a name.
Tables keep the shape the terminal chat gives them: aligned columns in
<pre>.

Telegram's 4096 cap is met by splitting the rendered HTML at tag and
entity boundaries, closing open tags at the end of a piece and reopening
them at the start of the next. A piece the API refuses to parse is resent
stripped, because losing the shape is better than losing the answer.
SPLINTER_TG_MARKDOWN=0 keeps the old plain-text path.

test_tgmd pins the renderer and the chunker; test_gateway asserts the bot
sends parse_mode=HTML with <b>/<code> and a table in <pre>.
2026-11-10 09:37:27 +00:00
lotherk a00ffef699 a2a: INPUT_REQUIRED -- a turn that pauses and resumes
sp_agent_run can stop before a mutating tool when an approval callback
returns 2; the assistant call is in the conversation, no observation is.
sp_agent_resume(decision) runs the pending calls, adds the observations
and continues the model loop. Normal callers are unchanged: the ack, UI
and gateway paths still return 0/1.

The A2A server pauses as TASK_STATE_INPUT_REQUIRED, keeps the task and
its context, and resumes on SendMessage with the same taskId and
yes/no. CancelTask cancels a paused task. SendStreamingMessage has no
resume point and denies mutating tools instead.

test_pause covers allow/deny in the agent; test_a2a_input covers the
whole HTTP flow (yes, no, cancel). Full make check green (33 C tests).
2026-11-10 08:56:23 +00:00
lotherk 624fcf3d48 a2a: URL text parts and push-config CRUD; .local/lib untangled
A text/plain url part is fetched from loopback or a host in
SPLINTER_A2A_URL_ALLOW (1 MiB, no redirects); binary and other media
types stay refused. The four push-config methods create/get/list/delete
in-memory configs per task.

~/.local/lib is a real directory now: libsplinter.so plus a node_modules
symlink to ../npm/node_modules. The npm tree is not leftover -- it is
the mcp-local-memory MCP server and the Python user dirs -- so npm
root -g, the module and the installed splinter are verified working;
nothing was deleted.

Full make check green.
2026-11-10 08:49:27 +00:00
lotherk 544399a3bf a2a: GetTask/CancelTask as client tools, and a spec-shaped GetTask
The plugin registers a2a_get_task (read) and a2a_cancel_task
(destructive) for a local model that uses A2A as a tool source; both
share the endpoint or card and return the raw task/error JSON.

The server's GetTask result was wrapped as {"task": ...}; the spec's
result is the Task itself. Fixed, and the test checks the shape.

The website's tool-count regex missed digits, so a2a_get_task and
a2a_cancel_task were not counted; [a-z0-9_]+ now reports 25.

test_a2a drives both tools through the mock transport and checks the
session observations. Full make check green.
2026-11-10 08:28:12 +00:00
lotherk f4077687fa a2a: push the completed task to a webhook
A taskPushNotificationConfig in SendMessage/SendStreamingMessage posts
the completed Task (one StreamResponse) to its URL after the response.
Loopback is allowed; other hosts need SPLINTER_A2A_PUSH_ALLOW (comma
separated, '*' for all), so a client cannot turn the server into an SSRF
probe. The config token goes as X-A2A-Notification-Token, the
authentication as Authorization. The card says pushNotifications:true;
the standalone CRUD methods answer UnsupportedOperation (-32004).

test_a2a_server starts a fake webhook on loopback and checks the task,
the bearer credential and the token; a non-allowlisted host is refused
with -32003 before the turn. Full make check green.
2026-11-10 08:21:23 +00:00
lotherk 04cffac3b1 telegram: /interview in the chat
The same questions as splinter --interview, one message per answer;
/skip skips one and /cancel stops. The answers go through the shared
profile writer (sp_interview_save), so the file is the same as the
terminal path. The menu registers /interview next to start and help.

interview.c grows count/prompt/hint/save; the CLI uses the same API, so
the questions live in one place. The README said seven questions, the
array has six; fixed.

test_gateway.sh answers all six questions through the fake Bot API and
checks the written profile.
2026-11-10 07:19:07 +00:00
lotherk 07ac1906ed telegram: command programs answer in the chat, typos are errors
A program in ~/.splinter/commands now replies in the Telegram chat with
its output; the TUI keeps feeding the same output to the model as
context. A slash command that is neither a plugin command nor a program
answers with 'unknown command' plus the live command list instead of
being sent to the model.

test_gateway.sh runs /hello and /nosuch and checks that neither starts a
model turn. README, PLUGINS.md, TODO and the site follow.
2026-11-10 07:03:14 +00:00
lotherk ac18b29a4d telegram: the command menu follows what the harness has
setMyCommands is built at startup from /start, /help, every command a
loaded plugin registers and every program in ~/.splinter/commands whose
name is a valid Telegram command. /start and /help list the same live
set in the chat; a name Telegram cannot take (a dot, upper case, over 32
characters) stays usable in the chat but cannot appear in the menu.

The live bot now shows start, help, goal, recap and the local uptime
script; loading another plugin adds its command without editing the
gateway. test_gateway.sh loads focus and a command script and checks
that both reach the menu.
2026-11-10 06:58:12 +00:00
lotherk 50e5eb9111 telegram: a command menu and Yes/No buttons for approvals
The gateway registers /start, /help, /goal, /recap and /tasks with
setMyCommands, so Telegram's menu button lists them; /start and /help
answer with the short help text. Descriptions come from the catalogue.

An approval is sent with an inline keyboard now. A callback_query from
an allowed user resolves the ack, answers the button, removes the
keyboard and confirms in the chat; the text form ok <id> / no <id> still
works. tests/fake_telegram.py logs the menu and the markup and drives a
stranger callback (ignored) plus the real one; test_gateway.sh checks
both.

The real round trip is proven: request 548769685 was answered in
Telegram and the write ran. The installed ~/.splinter/bin/tg-ask was a
stale copy without the token path and was replaced by tools/tg-ask.sh.

fake_telegram.py also keeps the markdown-table branch that test_ui.sh
needs.
2026-11-10 06:45:40 +00:00
lotherk 968b5eada4 a2a: a contextId keeps the conversation on the server
The server keeps up to 16 conversations, keyed by contextId and evicted
LRU-style. A message with a known id continues it; without one the server
generates an id and returns it in the task, so callers that send no
context at all do not share a history. The session log still records
every turn.

test_a2a_context.sh uses a fake OpenAI endpoint that answers with the
number of user messages it received: fresh=1, same context=2, another
context=1, and continuing with the generated id reaches 2. README,
PLUGINS.md, TODO, ROADMAP and the site follow.
2026-11-10 06:04:58 +00:00
lotherk 9389793402 a2a: ListTasks on the server
The server can list the stored tasks now, optionally filtered by
contextId, with the pagination fields the spec requires. The test checks
the stored task and an empty list for another context. Docs and the site
name the method.
2026-11-09 23:48:54 +00:00
lotherk 76883bfa3a a2a: stream from the server, and test both sides together
SendStreamingMessage on the A2A server answers with SSE now: an initial
task event in WORKING, one artifactUpdate per streamed chunk (a
non-streaming transport sends its whole answer as one chunk), then a
completed statusUpdate. An error becomes an error event; the task is
still stored for GetTask.

test_a2a_server.sh runs the client half against the server half through
the agent card, blocking and streaming, besides the direct curl checks.
README, PLUGINS.md, TODO, ROADMAP and the site follow.
2026-11-09 23:47:18 +00:00
lotherk e5c533340f a2a: serve the other direction (SendMessage, GetTask, agent card)
src/a2aserver.c is a minimal HTTP/1.1 + JSON-RPC endpoint:
--a2a-server-listen and --a2a-listen-port. SendMessage runs one turn in
its own conversation (system prompt plus the caller's text) and returns a
completed Task; GetTask returns it from the in-memory store;
GET /.well-known/agent-card.json serves a card with the JSONRPC interface.
Beyond loopback SPLINTER_A2A_SERVER_TOKEN is required and checked as an
Authorization: Bearer header. One request at a time, one connection at a
time, no TLS.

Streaming, CancelTask/SubscribeToTask, file/structured parts, push
notifications and continuation of an interrupted task are refused with a
JSON-RPC error instead of half-answered.

test_a2a_server.sh covers the card, SendMessage, GetTask, the streaming
refusal and the token. README, PLUGINS.md, the man page and the site
follow.
2026-11-09 23:39:24 +00:00
lotherk 93e955a4c7 a2a: stream the answer, and a --no-stream path
The A2A transport implements send_stream now: SSE events are read as
StreamResponse (task, message, statusUpdate, artifactUpdate), artifact and
message text goes to the screen as it arrives, intermediate status notes
are ignored, and a completed status message is the answer only when no
artifact or direct message text came. Failed/canceled/rejected and
input/auth-required states fail the turn instead of becoming an answer.

One-shot mode already streamed whenever a transport offered it, so the
plain send path was unreachable from the CLI. --no-stream asks for it.
test_a2a.sh covers both SendMessage and SendStreamingMessage; the new
test_a2a_ui.sh drives the UI streaming path through tmux.

README, PLUGINS.md, the man page and the site follow.
2026-11-09 23:32:49 +00:00
lotherk 999787f3bf a2a: a client transport for another agent
plugins/a2a sends one SendMessage over JSON-RPC 2.0 with a text part and
reads either a direct Message or a Task in TASK_STATE_COMPLETED (status
message plus artifact text). Task and context ids are kept for the session;
a terminal task loses its id but keeps the context. Bearer token, timeout
and SPLINTER_A2A_FULL are supported.

Text only. Streaming, file/structured parts, push notifications,
GetTask/CancelTask and agent-card discovery are named as not built, so
nobody assumes otherwise.

tests/fake_a2a.py and tests/test_a2a.sh pin the wire shape, both result
forms, the bearer token and a JSON-RPC error. The site now counts the new
plugin (16) and names the transport; README, PLUGINS.md and ROADMAP follow.

TODO also records the live claude check: both configured accounts are at
their limit, exit 1 with the child's text, claude0 benched and claude1
queued; exit 2 remains unreproduced.
2026-11-09 23:21:18 +00:00
lotherk 0576d21924 open points: tables, counted site, and the tests the list asked for
Markdown tables are drawn as columns now (src/md.c, test_md, and a case in
test_ui.sh that checks the screen). The site counts lines, tools, tests,
plugins and palettes from the tree instead of naming them; the binary-size
figure is gone because it aged with every build.

The delegate panel cycle has a test (host + tasks plugin, widget says
delegate:panel exit 0), and the turn loop is driven with lcm at 8 KiB and
32 KiB budgets, so compaction is measured rather than claimed.

swarm, provstate and planner get smoke tests. TODO.md is rewritten against
the tree: the step limit was the old default (8 -> 150), skills and memory
were already built, and the open points are claude exit 2, a real Telegram
approval, A2A, the npm leftovers and the scheduler/job tests.
2026-11-09 22:46:25 +00:00
lotherkandClaude Opus 5.5 6fe30f4787 security: the authorization model holds where the model writes the input
A review found the tool classes - the core of the harness - bypassable in
several places where model output was pasted into a shell or trusted as an id.
Each fix below has a test that reproduces the original failure.

No shell for model data
- webfetch put the URL between '...' and ran it through popen: a quote in the
  URL ran any command, from a tool that needed no consent. curl is now exec'd
  with an argv, http(s) only, HTML stripped in C, stderr off the curses screen.
- webfetch is mutate: with read free, "read a key, fetch evil/?k=..." left the
  machine without anybody being asked. websearch stays read (fixed host).
- kids: the parent-approval command got the model's arguments inside '...'
  via system(); they are now "$1". The domain check reads the URL with the
  same parser as the tool (duplicate keys) and refuses user@host URLs.
- delegate: the two copies of the child argv are one (exec_delegate). The ssh
  path exec'd splinter with "ssh" as argv[0]; it now runs ssh and quotes every
  word for the remote shell. A single delegate to a host now really runs there.

Approvals (ack)
- The id was the pid: a late yes stayed on disk and approved the next request
  unseen. Ids are random, requests 0600 with O_EXCL, deleted when answered or
  expired; an answer is refused after expiry; the first answer wins (link(2)).
- An ack dir owned by someone else or writable by others is refused.
- --ack accepted every word but "no" as yes ("nein" approved). Now strict.
- The terminal thread blocked in fgets after a phone answer; it is stoppable.

Secrets
- API key and Telegram token were in curl's argv, readable via ps. src/curl.c
  passes URL and auth headers as a -K config on stdin (transport, telegram,
  tg-ask.sh; its dead eval fallback is gone).
- 'run' and task_start no longer inherit splinter's keys ("run env"). 'run' got
  its own process group, stdin /dev/null and SPLINTER_RUN_TIMEOUT (300 s).

MCP server
- Beyond 127.x it refuses to start without SPLINTER_MCP_TOKEN; connections
  must begin with "AUTH <token>". SIGPIPE ignored, idle connections closed.

Crashes
- task_kill sent kill(-0) - SIGTERM to splinter's own process group - because
  popen gave no pid. Tasks now have a pid and a process group; integer ids work.
- ui: a 3- or 4-byte UTF-8 character overflowed char[2] on every redraw
  (now sp_ui_ascii_char, tested); the scroll offset was taken from one buffer
  and applied to another, reading past its end.

Repo
- The test binaries are no longer tracked (.gitignore already said so).

make check: 23 test binaries, green, also under ASan/UBSan.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 20:19:01 +00:00
Konrad b02d51326c splinter: background tasks, four at a time, and the telegram channel
Some work should not hold the conversation: a build, a test run, a delegate on
another host. plugins/tasks adds four tools -

  task_start  command, label?  -> id, starts at once
  task_list                    -> id, state, seconds, bytes, label
  task_result id               -> output and exit status once finished
  task_kill   id               -> stop it

SPLINTER_TASKS_MAX defaults to 4, and a start beyond it is refused with the
reason instead of queued into an invisible backlog: a machine running twenty
shell commands at once is not faster, only harder to read. Output is capped at
1 MiB and says so. The sidebar gets a tasks widget that ticks once a second while
something runs, and the status meter carries tasks_running/tasks_max for the
status plugin.

Measured, through the model:
  task_start    -> 'started #1 (sleep_task) - 1/4 running'
  task_list     -> '#1 running 0s 0 B  sleep_task'
  limit 1:      -> 'started #1 ... 1/1' then 'error: 1 tasks already running'

tools/tg-ask.sh sends an approval request to a Telegram chat and returns; the
gateway answers it, because one reader per chat is the whole point. Verified
against a stub curl (chat_id, text and token land in the right place) and it fails
cleanly when the token is missing.

The status line shows its segments now - the earlier empty bar was the Makefile
recipe that built kids.c into status.so, not a drawing bug.
2026-11-08 18:35:47 +00:00
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