diff --git a/README.md b/README.md index a8475d6..07f5aec 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ transport replays replies. src/main.c CLI tests/ the test binaries, run by `make check` docs/splinter.1 manual page - src/www/index.html HTML 4.01 static page + src/www/index*.html the site, written by hand (de, en, pt_BR) ## Plugins and themes @@ -236,14 +236,14 @@ Ships with `en` and `de`. Plugins translate their own strings with `sp_t()`. A delegate may name a host. The whole invocation then goes through ssh, so claude, opencode or another splinter run where the model or the network is: - delegate = olivia | auf olivia | tags=remote | host=172.25.206.16 | - endpoint=http://172.25.206.2:18082/v1/chat/completions | model=... + delegate = remote | on a remote host | tags=remote | host=build.example.org | + endpoint=http://10.0.0.2:8080/v1/chat/completions | model=... delegate and delegate_parallel both honour it, and the report names the host like any other model. The remote needs splinter at the same path and its own keys - nothing crosses the jump except the task. -Proven: a delegate with host=172.25.206.16 ran on olivia and answered from a +Proven: a delegate with host=build.example.org ran on the remote host and answered from a provider reachable only over the wireguard link. A failing delegate can be run without a model, which is how the child's own @@ -361,7 +361,7 @@ order when one is rate limited: exit = go | OpenCode Go | endpoint=... | model=... exit = groq | Groq free tier | endpoint=... | model=... | key_env=GROQ_KEY - exit = local | kontron, lokal | endpoint=... | model=... + exit = local | local | endpoint=... | model=... Run it with `--transport ring`. Only pressure moves the ring: 429, 5xx, "rate limit", "quota". A dead host or a bad key stops the turn where it is - a ring @@ -422,7 +422,7 @@ profiles, no directories, nothing to keep in sync: delegate = coder | C99, POSIX, kennt den Quellbaum | tags=code,c99,review | prio=5 | max_parallel=2 | - endpoint=http://kontron.local:8080/v1/chat/completions | + endpoint=http://127.0.0.1:8080/v1/chat/completions | model=Qwen3.6-35B delegate = quick | kurze Antworten, Chat | tags=chat,cheap | endpoint=... | model=... diff --git a/TODO.md b/TODO.md index dd6936f..7491b35 100644 --- a/TODO.md +++ b/TODO.md @@ -66,10 +66,9 @@ beobachten). je Spalte und gibt ausgerichteten Text aus; Text davor/danach bleibt. `tests/test_md.c` (Kopf, Trenner, ungleich lange Zeilen, UTF-8, zwei Bloecke) und ein Fall in `tests/test_ui.sh`, der die Spalten auf dem Schirm prueft. -- **Website zaehlt**: `tools/gen_www.py` liest Zeilen, Werkzeuge, Tests, Plugins - und Paletten aus dem Baum. Die meta-Zeile nennt jetzt 31 Test-Programme, - 23 Werkzeuge und 16 Plugins; die alte Binärgroesse ist durch die - Werkzeugzahl ersetzt, weil sie mit jedem Build altert. +- **Website von Hand**: `tools/gen_www.py` ist weg; die drei Seiten in `src/www/` + werden von Hand geschrieben. Zahlen darin sind Stand 2026-11-11, nicht + generiert, und muessen bei Aenderungen von Hand nachgezogen werden. - **Delegate im Task-Panel**: `tests/test_delegate.c` uebergibt einen Host mit geladenem `tasks`-Plugin, laesst einen Delegate laufen und prueft `delegate:panel exit 0` im Widget sowie `tasks_running == 0`. diff --git a/docs/CONFIG.md b/docs/CONFIG.md index 6cb6070..a03f340 100644 --- a/docs/CONFIG.md +++ b/docs/CONFIG.md @@ -65,7 +65,7 @@ Both are one line each, `|`-separated, every field but the first named: ``` exit = groq | Groq free tier | endpoint=https://api.groq.com/openai/v1/chat/completions | model=llama-3.3-70b | key_env=GROQ_KEY -delegate = coder | C99, POSIX, kennt den Quellbaum | endpoint=http://kontron:8080/v1/chat/completions | model=qwen | tags=code,review | prio=5 | max_parallel=2 +delegate = coder | C99, POSIX, kennt den Quellbaum | endpoint=http://127.0.0.1:8080/v1/chat/completions | model=qwen | tags=code,review | prio=5 | max_parallel=2 delegate = far | the same, on another machine | host=buildbox | endpoint=... | model=... delegate = claude-cli | Claude Code | kind=cli | cmd=claude -p | tags=plan delegate = claude-b | Claude Code, second account | kind=cli | cmd=claude -p | env=CLAUDE_CODE_OAUTH_TOKEN=sk-ant-oat01-... @@ -99,7 +99,7 @@ does the job wait (`waiting_quota`) for the reset. ## Example: local model ``` -endpoint = http://kontron.local:8080/v1/chat/completions +endpoint = http://127.0.0.1:8080/v1/chat/completions model = /models/unsloth/Qwen3.6-35B-A3B-MTP-GGUF/Qwen3.6-35B-A3B-UD-Q8_K_XL.gguf theme = Delphinium autonomous = 1 diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md index 0ef3255..2b30c08 100644 --- a/docs/ROADMAP.md +++ b/docs/ROADMAP.md @@ -52,8 +52,8 @@ Stream. Zitate/Tabellen in die Tags von `parse_mode=HTML`, escapt alles andere und teilt lange Antworten an Tag-Grenzen, mit offenen Tags pro Stueck (`test_tgmd`, `test_gateway.sh`) -- **Website zählt**: Zeilen, Werkzeuge, Tests, Plugins und Paletten kommen beim - Generieren aus dem Baum (`tools/gen_www.py`) +- **Website von Hand**: die drei Seiten in `src/www/` sind handgeschrieben, + ohne Generator; Zahlen darin sind Stand 2026-11-11 - **Letzter Delegate-Fehler**: die letzten 400 Bytes des Kindes stehen im Fehler, ein Limit bencht den Delegate und der nächste übernimmt (`test_delegate`) - **A2A INPUT_REQUIRED**: ein mutierendes Werkzeug pausiert (`sp_agent_run` diff --git a/src/www/index.en.html b/src/www/index.en.html index d6a48b0..cf9052c 100644 --- a/src/www/index.en.html +++ b/src/www/index.en.html @@ -1,237 +1,219 @@ - + - -splinter — an agent harness you own - - -
+
splinter(1)de  en  pt-BR
+
+ +
+

splinter

+

An agent harness in C99. It sits between you and a model, runs the tools the model asks for, and decides which of them may run. You can read all of it.

+

Chat in a curses terminal, one-shot from a pipe, or over Telegram. Any endpoint that speaks the OpenAI chat API, any program that prints an answer, or another agent over A2A. Tools declare what they may do; the harness enforces it and tells the model what it refused.

-

Deutsch · English

+
# illustrative transcript, not a log
+you     set the version in Makefile to 0.2.0
+tool    read {"path":"Makefile"}                          read
+tool    edit {"path":"Makefile","old":"0.1.0","new":"0.2.0"}   mutate
+ask     edit Makefile ? [y/N] n
+seen    error: denied by operator    ← this is what the model reads
+model   I was not allowed to edit it. Say so if I should try again.
+

About 29,500 lines of C (as of 2026-11-11), 16 plugins, 35 test programs. BSD-3-Clause.

-

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.

+

Three checks before a tool runs

+
+
Budget
Before every request the conversation is measured against the configured byte budget. If it does not fit, plugins such as lcm may compact it first. If it still does not fit, nothing is sent and the turn fails, instead of letting an endpoint truncate silently.
+
Registry
A tool name that does not exist becomes an observation for the model, not a crash and not a guess.
+
Authorization class
Each tool declares read, mutate or destructive. The tool says so, not the model and not the prompt. Mutating and destructive calls need your consent unless you started with --autonomous. A plugin can sit in front as a gate: allow, refuse with a reason, or have no opinion. The kid-mode plugin is one.
+
+

A refusal is never silent. It comes back to the model as the tool's observation, so the model can react to it.

-

29543 lines of C99/POSIX · -27 tools · 35 test programs · -16 plugins · 42 palettes · BSD-3-Clause

+

Tools

+

41 are built in or shipped as plugins. An MCP server can add more at runtime.

+
readmutatedestructive
+
+ + + + + + + + + + + + + + + + + + + + + + +
toolwhat it does
read, search, listNumbered lines with offset and limit, refuses binaries. Literal search, at most 100 hits. Directory listing.
write, editWrite a file, with the diff in the observation. Edit replaces exactly one occurrence; an ambiguous match is an error.
runA shell command. The exit status is an observation.
websearchWeb search.
webfetchFetch a URL.
folder_historyWhat last happened in this directory, so the model does not guess.
skill_search, skill_loadFind installed skills, read one in full. Nothing is preloaded.
memory_searchYour memories on a mem0 server, kept apart per user.
memory_addRemember one fact.
delegate, delegate_parallel, delegate_submit, delegate_retryHand work to another model: one task, several at once, as a background job, or retry a failure.
delegate_list, delegate_jobs, delegate_result, delegate_dueList delegates, see jobs, collect a result, see what is due.
task_start, task_killRun a shell command in the background (four at a time) or stop it.
task_list, task_resultBackground jobs and their output.
plan_task_add, plan_task_updateA persistent to-do list for the session.
plan_task_listRead that list.
tmux_startStart a command in a detached tmux session and make it the target.
tmux_send, tmux_askType into it (text or keys such as C-c), wait for new output and return only the new lines.
tmux_status, tmux_capture, tmux_readLook at the pane and read what is new.
a2a_send, a2a_cancel_taskMessage another agent (optionally with a file) or cancel its task.
a2a_get_task, a2a_subscribeRead another agent's task and its events.
echo, clockSmall utilities.
-

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
a2aanother agent over A2A (SendMessage/streaming, text)
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

+

Models

+

A transport turns the harness's plain line protocol into whatever the other side speaks. The loop never sees a vendor API, which is why make check runs against a scripted mock with no network and no key.

+
+
openai
Any OpenAI-compatible endpoint, streaming over SSE. HTTP goes through curl(1).
+
cli
Any program as the model, for example claude -p.
+
a2a
Another agent over A2A.
+
ring
An exit ring. On a 429 or a limit, the next configured exit takes over.
+
+

Delegation

+

The model can hand work to another model. splinter picks one: a requested tag scores 5, a tag found in the task text 3, a word from the delegate's description 1. The observation opens with the choice and the reason, so a wrong pick is visible.

# ~/.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=...
+delegate = coder | C99, POSIX, review | tags=code,c99 | endpoint=... | model=...
+delegate = quick | short answers      | tags=chat,cheap | endpoint=... | model=...
 
-$ splinter --choose "pruefe diesen C-Code auf Speicherfehler"
+$ splinter --choose "check this C code for memory errors"
 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.

+

delegate_parallel sends up to eight tasks at once. The report names who answered, how long it took and the exit status for each, so a slow or failing delegate shows in the header.

+
[parallel: 2 task(s), 12018 ms wall]
+## task 1 | model slow | score 5 | 12018 ms | exit 0 | 75 B
+## task 2 | model fast | score 5 |    16 ms | exit 0 | 74 B
+

A delegate may name a host=. The whole call then goes over ssh, so claude, opencode or another splinter runs where the model or the network is, with that machine's own keys.

+
delegate = remote | on another box | tags=remote | host=build.example.org | endpoint=... | model=...
+

Plugins

+

A plugin is a .so loaded with dlopen. It can register tools, slash commands, sidebar widgets, transports and gates. A widget's tick runs on its own thread; only the UI thread draws. The ABI is in docs/PLUGINS.md. Plugins run in the process with your rights.

+
    +
  • lcm, cps: compact the conversation
  • +
  • focus: reminds the model of /goal every N turns
  • +
  • reminder: puts the ground rules back every 10 turns
  • +
  • ring: next exit on 429 or limit
  • +
  • mcp, a2a, cli: reach other tools and agents
  • +
  • provider: add a provider while running
  • +
    +
  • tasks: background shell jobs
  • +
  • planner: the session's to-do list
  • +
  • tmux: drive a program that wants a terminal
  • +
  • scheduler: timed work
  • +
  • status: context, tokens per second, cost if you set prices
  • +
  • kids: kid mode
  • +
  • clock: a sidebar clock and a tool
  • +
-

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.

-

The bot registers its commands: the menu shows the loaded plugins' commands and the programs in ~/.splinter/commands/; an approval arrives with Yes/No buttons. /interview asks the questions in the chat. /new starts a fresh conversation; /model offers the configured models as buttons, switches the transport and remembers the choice in splinter.conf.d/90-model.conf; /model probe asks the endpoints for /v1/models. /connect asks for name, endpoint, model and key variable, runs one test turn and writes the provider to splinter.conf.d/20-connect.conf. Answers are rendered as Telegram HTML: bold, italic, code and links as tags, images as photos (sendPhoto, local files too), other files as documents, tables as columns in a monospace block; a piece Telegram cannot parse goes out as text instead of being lost. Programs in commands/ answer in the chat; in the TUI their output goes to the model.

-

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      small, nothing but libc and curses
-$ make check               35 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

+

Other agents, both ways

+

MCP

+

As a client, splinter takes an MCP server's tools with the server's own schemas. As a server it offers its own tools to others:

+
$ splinter --mcp-server-listen 127.0.0.1 --mcp-listen-port 8098
+

It answers initialize, tools/list and tools/call. It serves read tools. Mutating and destructive ones only run with --autonomous, so a foreign agent does not get a shell just by asking.

+

A2A

+
$ SPLINTER_A2A_SERVER_TOKEN=... splinter --a2a-server-listen 127.0.0.1 --a2a-listen-port 8099
    -
  • Not a model. splinter ships none and picks none for you.
  • -
  • Not a cloud. It talks to the endpoint you configure.
  • -
  • Not a sandbox. Plugins run in the process with your rights — the classes protect the harness from the model, not from code you chose to load.
  • +
  • POST /a2a takes SendMessage, SendStreamingMessage (SSE), GetTask, ListTasks and SubscribeToTask. The agent card is at /.well-known/agent-card.json.
  • +
  • A contextId is a conversation. Without one, the server makes one and returns it.
  • +
  • A mutating tool pauses the task as INPUT_REQUIRED. A follow-up with the taskId and yes or no resumes it. CancelTask stops it.
  • +
  • A push notification config posts the finished task to a webhook (loopback, or hosts in SPLINTER_A2A_PUSH_ALLOW).
  • +
  • Binary file parts land in inbox/ and the model is told the path. URL parts are fetched only from allowed hosts.
  • +
  • Beyond loopback a bearer token is required.
  • +
  • As a client, a2a_send can attach a file and a2a_subscribe reads a remote task's events.
-

The fleet

-

A delegate may name a host. The whole invocation then goes through ssh, so -claude, opencode or another splinter run where the model or the network is:

-
delegate = olivia | on olivia | tags=remote | host=172.25.206.16 |
-           endpoint=http://172.25.206.2:18082/v1/chat/completions | model=...
-

delegate_parallel sends up to eight tasks at once and reports back -who delivered what:

-
[parallel: 2 task(s), 12018 ms wall]
+

Telegram

+

splinter --daemon long-polls getUpdates, runs one turn per message and answers with the same slash commands as the terminal. The token is read from a 0600 file or the environment, never from an argument. Only user ids listed in telegram_allow get an answer.

+
    +
  • Consent arrives as Yes/No buttons. The text reply ok <id> still works.
  • +
  • /model switches between configured models; /model probe asks the endpoints for /v1/models. /connect asks for name, endpoint, model and key variable, runs a test turn and writes the provider into splinter.conf.d. /new starts a fresh conversation. /interview asks the setup questions in the chat.
  • +
  • Answers are sent as Telegram HTML: bold, italic, code, links, quotes and tables as monospace columns. Markdown images go out as photos, other local files as documents. A piece Telegram cannot parse is sent as plain text rather than lost.
  • +
  • Programs in ~/.splinter/commands/ become /name and show up in the bot's menu.
  • +
+

Kid mode

+

With the kids plugin, every change needs a parent's approval by Telegram, a whitelist lets harmless calls through, the model is reminded of an age-appropriate tone on each request, and a daily minute budget ends the day when it is spent.

-## task 1 | model slow | score 5 | 12018 ms | exit 0 | 75 B | requested tag 'slow' -## task 2 | model fast | score 5 | 16 ms | exit 0 | 74 B | requested tag 'fast' +

Config, logs, ways in

+
# ~/.splinter/splinter.conf   (plus splinter.conf.d/*.conf, in name order)
+endpoint   = http://127.0.0.1:8080/v1/chat/completions
+model      = my-model
+locale     = en
+theme      = Delphinium
+telegram_allow = 123456789
+plugin     = plugins/lcm/lcm.so
+

It is plain key = value. An unknown key stops startup with the file and line, because a typo that does nothing is a config that lies. Command line beats file beats default.

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

Words, reasoning, every tool call with its arguments, every observation, errors and token counts. Nothing is cut, because a log that keeps only the good parts cannot explain a bad turn.

+
$ cat /etc/passwd | splinter "explain this file"
+$ cd ~/src/project && splinter -c      # last session that happened here
+$ splinter --interview             # once: language, style, off-limits paths
+

Standard input becomes framed, size-capped context. Skills live in ~/.splinter/skills/ and are found on demand. When several splinters run in one directory, /swarm sends a line to the least busy one. The interface has 42 CDE colour palettes and is translated to German, English and Brazilian Portuguese; a missing translation fails make check.

-## summary -- slow: 1 task(s), 12018 ms total -- fast: 1 task(s), 16 ms total
-

Model, duration and status per task — a slow or failing delegate is visible -in the header before anybody reads its prose.

- -

Both directions: MCP

-

As a client splinter fetches an MCP server's tools. As a server it offers its -own:

-
$ splinter --mcp-server-listen 0.0.0.0 --mcp-listen-port 8098
-splinter: MCP server on 0.0.0.0:8098 (27 tools, read only)
-

Another agent gets initialize, tools/list and -tools/call. Read tools are served; mutating and destructive ones only -with --autonomous — a foreign agent does not run shell commands -here because it asked nicely.

- -

Pipe, folder, first talk

-
$ cat /etc/passwd | splinter "explain the file"
-$ cd ~/src/splinter && splinter -c  # the last session that happened HERE
-$ splinter --interview           # once: language, style, sacred paths
-

Standard input becomes context, framed and size-capped; -folder_history tells the model what happened in a directory instead -of letting it guess; the profile from the interview lives in -~/.splinter/profile/<user>.md.

- -

Both directions: A2A

-

As a client splinter fetches another agent over A2A; as a server it offers -itself:

-
$ SPLINTER_A2A_SERVER_TOKEN=... splinter --a2a-server-listen 127.0.0.1 --a2a-listen-port 8099
-splinter: A2A server on 127.0.0.1:8099 (token required)
-

POST /a2a takes SendMessage, SendStreamingMessage -(SSE), GetTask and ListTasks as JSON-RPC; the agent card lives at -/.well-known/agent-card.json. A contextId is a -conversation; without one the server makes one and returns it. A -taskPushNotificationConfig posts the completed task to a webhook -(loopback or SPLINTER_A2A_PUSH_ALLOW); push configs can be managed -with CRUD and text/plain URLs are fetched from allowed hosts; binary -file/raw parts land in the inbox/ and the -model is told the path. A mutating tool pauses as -INPUT_REQUIRED; a follow-up with taskId and -yes/no resumes; SubscribeToTask sends -the state once and ends the stream; on the client side a2a_subscribe -reads a remote task's events as text and a2a_send attaches a file -(base64) to a message. Beyond loopback the bearer token is -required.

- -

Kid mode

-

With the kids plugin every change needs a parent's approval -(Telegram), a whitelist lets the harmless ones through, the model is reminded of an -age-appropriate tone on every request, and a daily minute budget ends the day when -it is spent.

- -
- +

Build

+
$ make            # libsplinter.so, the binary, the plugins
+$ make check      # 35 test programs, shell tests, i18n check; no network, no model
+$ splinter
+

POSIX make and a C99 compiler, -Wall -Wextra -Werror. NetBSD curses is in the tree. At run time splinter calls curl(1) for HTTP. Manual: man ./docs/splinter.1.

+

What it is not

+
    +
  • Not a model. It ships none and chooses none for you.
  • +
  • Not a cloud. It talks to the endpoints you list.
  • +
  • Not a sandbox. The classes protect you from the model, not from code you chose to load.
  • +
+
splinter, BSD-3-Clause. Plugin ABI: docs/PLUGINS.md. Config: docs/CONFIG.md.
+
diff --git a/src/www/index.html b/src/www/index.html index 5a6641b..f9961de 100644 --- a/src/www/index.html +++ b/src/www/index.html @@ -1,238 +1,219 @@ - + - -splinter — ein Agent-Harness, das dir gehoert - - -
+
splinter(1)de  en  pt-BR
+
+ +
+

splinter

+

Ein Agent-Harness in C99. Es sitzt zwischen dir und einem Modell, führt die Werkzeuge aus, um die das Modell bittet, und entscheidet, welche davon laufen dürfen. Du kannst alles davon lesen.

+

Chat im curses-Terminal, einmalig aus der Pipe oder über Telegram. Jeder Endpunkt, der die OpenAI-Chat-API spricht, jedes Programm, das eine Antwort ausgibt, oder ein anderer Agent über A2A. Werkzeuge erklären, was sie dürfen; das Harness setzt es durch und sagt dem Modell, was es abgelehnt hat.

-

Deutsch · English · Portugues (BR)

+
# Beispielablauf, kein echtes Log
+du      setze die Version im Makefile auf 0.2.0
+tool    read {"path":"Makefile"}                          read
+tool    edit {"path":"Makefile","old":"0.1.0","new":"0.2.0"}   mutate
+frage   edit Makefile ? [y/N] n
+gesehen error: denied by operator    ← das liest das Modell
+modell  Ich durfte die Datei nicht ändern. Sag Bescheid, wenn ich es nochmal versuchen soll.
+

Rund 29.500 Zeilen C (Stand 2026-11-11), 16 Plugins, 35 Testprogramme. BSD-3-Clause.

-

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.

+

Drei Prüfungen, bevor ein Werkzeug läuft

+
+
Budget
Vor jedem Request wird die Konversation gegen das eingestellte Byte-Budget gemessen. Passt sie nicht, kann ein Plugin wie lcm sie vorher komprimieren. Passt sie dann immer noch nicht, wird nichts gesendet und der Turn schlägt fehl, statt dass ein Endpunkt still kürzt.
+
Registry
Ein Werkzeugname, den es nicht gibt, wird zur Beobachtung für das Modell — kein Absturz, kein Raten.
+
Autorisierungsklasse
Jedes Werkzeug erklärt read, mutate oder destructive. Das Werkzeug sagt es, nicht das Modell und nicht der Prompt. Mutierende und destruktive Aufrufe brauchen deine Zustimmung, außer du startest mit --autonomous. Ein Plugin kann als Gate davorstehen: erlauben, mit Grund ablehnen oder keine Meinung haben. Das Kindermodus-Plugin ist so eins.
+
+

Eine Ablehnung ist nie stumm. Sie kommt als Beobachtung des Werkzeugs zum Modell zurück, damit es darauf reagieren kann.

-

29543 Zeilen C99/POSIX · -27 Werkzeuge · 35 Test-Programme · -16 Plugins · 42 Farbschemata · BSD-3-Clause

+

Werkzeuge

+

41 sind eingebaut oder kommen mit Plugins. Ein MCP-Server kann zur Laufzeit weitere hinzufügen.

+
readmutatedestructive
+
+ + + + + + + + + + + + + + + + + + + + + + +
WerkzeugWas es tut
read, search, listNummerierte Zeilen mit offset und limit, verweigert Binärdateien. Literal-Suche, höchstens 100 Treffer. Verzeichnis anzeigen.
write, editDatei schreiben, mit Diff in der Beobachtung. Edit ersetzt genau ein Vorkommen; mehrdeutig ist ein Fehler.
runEin Shell-Befehl. Der Exit-Status ist eine Beobachtung.
websearchWebsuche.
webfetchEine URL holen.
folder_historyWas zuletzt in diesem Verzeichnis passiert ist, damit das Modell nicht raten muss.
skill_search, skill_loadInstallierte Skills finden, einen ganz lesen. Nichts wird vorgeladen.
memory_searchDeine Erinnerungen auf einem mem0-Server, pro Benutzer getrennt.
memory_addEinen Fakt merken.
delegate, delegate_parallel, delegate_submit, delegate_retryArbeit an ein anderes Modell geben: eine Aufgabe, mehrere gleichzeitig, als Hintergrundjob, oder einen Fehlschlag wiederholen.
delegate_list, delegate_jobs, delegate_result, delegate_dueDelegates auflisten, Jobs ansehen, Ergebnis abholen, Fälliges sehen.
task_start, task_killEinen Shell-Befehl im Hintergrund starten (vier gleichzeitig) oder stoppen.
task_list, task_resultHintergrundjobs und ihre Ausgabe.
plan_task_add, plan_task_updateEine dauerhafte Aufgabenliste für die Sitzung.
plan_task_listDiese Liste lesen.
tmux_startEinen Befehl in einer losgelösten tmux-Sitzung starten und zum Ziel machen.
tmux_send, tmux_askHineintippen (Text oder Tasten wie C-c), auf neue Ausgabe warten und nur die neuen Zeilen zurückgeben.
tmux_status, tmux_capture, tmux_readDas Pane ansehen und lesen, was neu ist.
a2a_send, a2a_cancel_taskEinem anderen Agenten schreiben (auch mit Datei) oder seinen Task abbrechen.
a2a_get_task, a2a_subscribeTask eines anderen Agenten und seine Ereignisse lesen.
echo, clockKleine Helfer.
-

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.

- -

So sieht das aus

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

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

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

Transporte und Plugins

- - - - - - - - - - - -
NameWas es tut
openaijeder OpenAI-kompatible Endpunkt, Streaming ueber SSE
clijedes Programm als Modell, etwa claude -p
a2aein anderer Agent ueber A2A (SendMessage/Streaming, Text)
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
- - -

Delegation: andere Modelle, splinter waehlt

+

Modelle

+

Ein Transport übersetzt das schlichte Zeilenprotokoll des Harness in das, was die Gegenseite spricht. Die Schleife sieht nie eine Hersteller-API; deshalb läuft make check gegen einen geskripteten Mock, ohne Netz und ohne Schlüssel.

+
+
openai
Jeder OpenAI-kompatible Endpunkt, Streaming über SSE. HTTP läuft über curl(1).
+
cli
Jedes Programm als Modell, etwa claude -p.
+
a2a
Ein anderer Agent über A2A.
+
ring
Ein Exit-Ring. Bei 429 oder Limit übernimmt der nächste konfigurierte Ausgang.
+
+

Delegation

+

Das Modell kann Arbeit an ein anderes Modell geben. splinter wählt: ein angefragter Tag zählt 5, ein Tag im Aufgabentext 3, ein Wort aus der Beschreibung des Delegates 1. Die Beobachtung beginnt mit der Wahl und dem Grund, eine falsche Wahl ist also sichtbar.

# ~/.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=...
+delegate = coder | C99, POSIX, Review | tags=code,c99 | endpoint=... | model=...
+delegate = quick | kurze Antworten    | tags=chat,cheap | endpoint=... | model=...
 
-$ splinter --choose "pruefe diesen C-Code auf Speicherfehler"
+$ splinter --choose "prüfe 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.

+

delegate_parallel schickt bis zu acht Aufgaben gleichzeitig los. Der Bericht nennt pro Aufgabe, wer geantwortet hat, wie lange es dauerte und den Exit-Status; ein lahmer oder kaputter Delegate steht in der Kopfzeile.

+
[parallel: 2 task(s), 12018 ms wall]
+## task 1 | model slow | score 5 | 12018 ms | exit 0 | 75 B
+## task 2 | model fast | score 5 |    16 ms | exit 0 | 74 B
+

Ein Delegate darf einen host= nennen. Dann geht der ganze Aufruf über ssh, und claude, opencode oder ein zweiter splinter läuft dort, wo das Modell oder das Netz ist — mit den Schlüsseln dieser Maschine.

+
delegate = remote | auf einer anderen Kiste | tags=remote | host=build.example.org | endpoint=... | model=...
+

Plugins

+

Ein Plugin ist eine .so, die per dlopen geladen wird. Es kann Werkzeuge, Slash-Befehle, Seitenleisten-Widgets, Transporte und Gates registrieren. Der Tick eines Widgets läuft auf einem eigenen Thread; gezeichnet wird nur im UI-Thread. Die ABI steht in docs/PLUGINS.md. Plugins laufen im Prozess mit deinen Rechten.

+
    +
  • lcm, cps: Konversation komprimieren
  • +
  • focus: erinnert alle N Turns an /goal
  • +
  • reminder: legt alle 10 Turns die Grundregeln zurück
  • +
  • ring: nächster Ausgang bei 429 oder Limit
  • +
  • mcp, a2a, cli: andere Werkzeuge und Agenten erreichen
  • +
  • provider: Provider zur Laufzeit anlegen
  • +
    +
  • tasks: Shell-Jobs im Hintergrund
  • +
  • planner: Aufgabenliste der Sitzung
  • +
  • tmux: ein Programm steuern, das ein Terminal will
  • +
  • scheduler: zeitgesteuerte Arbeit
  • +
  • status: Kontext, Tokens pro Sekunde, Kosten, wenn du Preise setzt
  • +
  • kids: Kindermodus
  • +
  • clock: Uhr in der Seitenleiste und ein Werkzeug
  • +
-

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

-

Der Bot registriert seine Befehle: das Menue zeigt die geladenen Plugin-Befehle und die Programme in ~/.splinter/commands/; eine Zustimmung kommt mit Ja/Nein-Knoepfen. /interview stellt die Fragen im Chat. /new faengt eine frische Konversation an; /model bietet die konfigurierten Modelle als Knoepfe, schaltet den Transport um und merkt die Wahl in splinter.conf.d/90-model.conf; /model probe fragt die Endpoints nach /v1/models. /connect fragt Name, Endpoint, Modell und Key-Variable ab, macht einen Test-Turn und schreibt den Provider nach splinter.conf.d/20-connect.conf. Antworten werden als Telegram-HTML gesetzt: fett, kursiv, Code und Links als Tags, Bilder als Foto (sendPhoto, auch lokale Dateien), andere Dateien als Dokument, Tabellen als Spalten im Monospace-Block; ein Stueck, das Telegram nicht parst, geht als Text raus statt verloren. Programme in commands/ antworten dort direkt im Chat; im TUI gehen sie ans Modell.

-

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      klein, nichts ausser libc und curses
-$ make check               35 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

+

Andere Agenten, in beide Richtungen

+

MCP

+

Als Client holt splinter die Werkzeuge eines MCP-Servers samt deren Schemata. Als Server bietet es die eigenen an:

+
$ splinter --mcp-server-listen 127.0.0.1 --mcp-listen-port 8098
+

Es beantwortet initialize, tools/list und tools/call. Lesende Werkzeuge werden bedient. Mutierende und destruktive laufen nur mit --autonomous; ein fremder Agent bekommt also keine Shell, nur weil er fragt.

+

A2A

+
$ SPLINTER_A2A_SERVER_TOKEN=... splinter --a2a-server-listen 127.0.0.1 --a2a-listen-port 8099
    -
  • Kein Modell. splinter bringt keins mit und waehlt keins fuer dich.
  • -
  • Keine Cloud. Es spricht mit dem Endpunkt, den du eintraegst.
  • -
  • Kein Sandkasten. Plugins laufen im Prozess mit deinen Rechten — die Klassen schuetzen vor dem Modell, nicht vor Code, den du selbst laedst.
  • +
  • POST /a2a nimmt SendMessage, SendStreamingMessage (SSE), GetTask, ListTasks und SubscribeToTask. Die Agent Card liegt unter /.well-known/agent-card.json.
  • +
  • Eine contextId ist eine Konversation. Ohne eine legt der Server eine an und gibt sie zurück.
  • +
  • Ein mutierendes Werkzeug pausiert den Task als INPUT_REQUIRED. Ein Folgeaufruf mit taskId und yes oder no setzt fort. CancelTask bricht ab.
  • +
  • Eine Push-Notification-Config schickt den fertigen Task an einen Webhook (Loopback oder Hosts aus SPLINTER_A2A_PUSH_ALLOW).
  • +
  • Binäre Datei-Teile landen in inbox/, das Modell bekommt den Pfad. URL-Teile werden nur von erlaubten Hosts geholt.
  • +
  • Jenseits von Loopback ist ein Bearer-Token Pflicht.
  • +
  • Als Client kann a2a_send eine Datei anhängen, und a2a_subscribe liest die Ereignisse eines fremden Tasks.
-

Die Flotte

-

Ein Delegate darf einen Host nennen. Dann geht der ganze Aufruf ueber ssh, und -claude, opencode oder ein zweiter splinter laufen dort, wo das Modell oder das -Netz ist:

-
delegate = olivia | auf olivia | tags=remote | host=172.25.206.16 |
-           endpoint=http://172.25.206.2:18082/v1/chat/completions | model=...
-

delegate_parallel schickt bis zu acht Aufgaben gleichzeitig los -und berichtet zurueck, wer was geliefert hat:

-
[parallel: 2 task(s), 12018 ms wall]
+

Telegram

+

splinter --daemon pollt getUpdates, führt einen Turn pro Nachricht aus und antwortet mit denselben Slash-Befehlen wie das Terminal. Der Token kommt aus einer 0600-Datei oder der Umgebung, nie aus einem Argument. Nur Benutzer-IDs aus telegram_allow bekommen Antwort.

+
    +
  • Zustimmung kommt als Ja/Nein-Knopf. Die Textantwort ok <id> geht weiterhin.
  • +
  • /model wechselt zwischen konfigurierten Modellen; /model probe fragt die Endpunkte nach /v1/models. /connect fragt Name, Endpunkt, Modell und Key-Variable ab, macht einen Test-Turn und schreibt den Provider nach splinter.conf.d. /new beginnt eine frische Konversation. /interview stellt die Einrichtungsfragen im Chat.
  • +
  • Antworten gehen als Telegram-HTML raus: fett, kursiv, Code, Links, Zitate und Tabellen als Monospace-Spalten. Markdown-Bilder werden Fotos, andere lokale Dateien Dokumente. Ein Stück, das Telegram nicht parst, geht als Text raus, statt verloren zu gehen.
  • +
  • Programme in ~/.splinter/commands/ werden zu /name und stehen im Menü des Bots.
  • +
+

Kindermodus

+

Mit dem Plugin kids braucht jede Änderung die Zustimmung eines Elternteils per Telegram, eine Whitelist lässt Harmloses durch, das Modell wird bei jeder Anfrage an einen altersgerechten Ton erinnert, und ein Tageskontingent an Minuten beendet den Tag, wenn es aufgebraucht ist.

-## task 1 | model slow | score 5 | 12018 ms | exit 0 | 75 B | requested tag 'slow' -## task 2 | model fast | score 5 | 16 ms | exit 0 | 74 B | requested tag 'fast' +

Konfiguration, Logs, Wege hinein

+
# ~/.splinter/splinter.conf   (plus splinter.conf.d/*.conf, in Namensreihenfolge)
+endpoint   = http://127.0.0.1:8080/v1/chat/completions
+model      = my-model
+locale     = de
+theme      = Delphinium
+telegram_allow = 123456789
+plugin     = plugins/lcm/lcm.so
+

Einfach key = value. Ein unbekannter Schlüssel stoppt den Start mit Datei und Zeile, denn ein Tippfehler, der nichts tut, ist eine Konfiguration, die lügt. Kommandozeile schlägt Datei schlägt Vorgabe.

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

Worte, Denken, jeder Werkzeugaufruf mit Argumenten, jede Beobachtung, Fehler und Token-Zahlen. Nichts gekürzt, denn ein Log, das nur das Gute behält, kann einen schlechten Turn nicht erklären.

+
$ cat /etc/passwd | splinter "erklär die Datei"
+$ cd ~/src/projekt && splinter -c     # die letzte Session, die HIER war
+$ splinter --interview             # einmal: Sprache, Stil, tabu-Pfade
+

Standardeingabe wird zu gerahmtem, größenbegrenztem Kontext. Skills liegen in ~/.splinter/skills/ und werden bei Bedarf gefunden. Laufen mehrere splinter in einem Verzeichnis, schickt /swarm eine Zeile an den am wenigsten beschäftigten. Die Oberfläche hat 42 CDE-Farbpaletten und ist auf Deutsch, Englisch und brasilianisches Portugiesisch übersetzt; eine fehlende Übersetzung lässt make check scheitern.

-## summary -- slow: 1 task(s), 12018 ms total -- fast: 1 task(s), 16 ms total
-

Modell, Dauer und Status pro Aufgabe — ein lahmer oder kaputter Delegate -ist in der Kopfzeile sichtbar, bevor jemand seinen Text liest.

- -

Beide Richtungen: MCP

-

Als Client holt splinter die Werkzeuge eines MCP-Servers. Als Server stellt es -seine eigenen hin:

-
$ splinter --mcp-server-listen 0.0.0.0 --mcp-listen-port 8098
-splinter: MCP server on 0.0.0.0:8098 (27 tools, read only)
-

Ein anderer Agent bekommt initialize, tools/list und -tools/call. Lesende Werkzeuge werden bedient, mutierende und -destruktive nur mit --autonomous — ein fremder Agent fuehrt hier -keine Shell aus, weil er freundlich fragt.

- -

Pipe, Ordner, Erstgespraech

-
$ cat /etc/passwd | splinter "erklaer die Datei"
-$ cd ~/src/splinter && splinter -c   # die letzte Session, die HIER war
-$ splinter --interview            # einmal: Sprache, Stil, heilige Pfade
-

Standardeingabe wird zu Kontext, markiert und groessenbegrenzt; -folder_history erzaehlt dem Modell, was in einem Verzeichnis passiert -ist, statt es raten zu lassen; das Profil aus dem Interview liegt in -~/.splinter/profile/<user>.md.

- -

Beide Richtungen: A2A

-

Als Client holt splinter einen anderen Agenten ueber A2A; als Server stellt es -sich selbst hin:

-
$ SPLINTER_A2A_SERVER_TOKEN=... splinter --a2a-server-listen 127.0.0.1 --a2a-listen-port 8099
-splinter: A2A server on 127.0.0.1:8099 (token required)
-

POST /a2a nimmt SendMessage, SendStreamingMessage -(SSE), GetTask und ListTasks als JSON-RPC; die Agent Card liegt unter -/.well-known/agent-card.json. Ein contextId ist eine -Konversation; ohne eines legt der Server eins an und gibt es zurueck. Eine -taskPushNotificationConfig schickt den fertigen Task an einen -Webhook (Loopback oder SPLINTER_A2A_PUSH_ALLOW); Push-Configs -lassen sich per CRUD verwalten, text/plain-URLs werden von erlaubten Hosts -geholt; binaere file/raw-Teile landen im -inbox/ und das Modell bekommt den Pfad. Ein mutierendes Werkzeug pausiert als -INPUT_REQUIRED; ein Folgeaufruf mit taskId und -yes/no setzt fort; SubscribeToTask -schickt den Zustand einmal und schliesst den Stream; als Client liest -a2a_subscribe die Ereignisse eines fremden Tasks als Text, und -a2a_send haengt eine Datei (base64) an eine Nachricht. Jenseits von -Loopback ist der Bearer-Token Pflicht.

- -

Kindermodus

-

Mit dem Plugin kids braucht jede Aenderung die Zustimmung eines -Erwachsenen (Telegram), eine Whitelist laesst das Harmlose durch, das Modell wird -bei jeder Anfrage an einen altersgerechten Ton erinnert, und ein Tageskontingent -an Minuten beendet den Tag, wenn es aufgebraucht ist.

- -
- +

Bauen

+
$ make            # libsplinter.so, das Binary, die Plugins
+$ make check      # 35 Testprogramme, Shell-Tests, i18n-Prüfung; kein Netz, kein Modell
+$ splinter
+

POSIX make und ein C99-Compiler, -Wall -Wextra -Werror. NetBSD-curses liegt im Baum. Zur Laufzeit ruft splinter für HTTP curl(1) auf. Manual: man ./docs/splinter.1.

+

Was es nicht ist

+
    +
  • Kein Modell. splinter bringt keins mit und wählt keins für dich.
  • +
  • Keine Cloud. Es spricht mit den Endpunkten, die du einträgst.
  • +
  • Kein Sandkasten. Die Klassen schützen dich vor dem Modell, nicht vor Code, den du selbst lädst.
  • +
+
splinter, BSD-3-Clause. Plugin-ABI: docs/PLUGINS.md. Konfiguration: docs/CONFIG.md.
+
diff --git a/src/www/index.pt.html b/src/www/index.pt.html index 4d264fa..b453195 100644 --- a/src/www/index.pt.html +++ b/src/www/index.pt.html @@ -1,180 +1,219 @@ - - + + - -splinter - um harness de agente que e seu - - -
+
splinter(1)de  en  pt-BR
+
+ +
+

splinter

+

Um harness de agente em C99. Fica entre você e um modelo, executa as ferramentas que o modelo pede e decide quais delas podem rodar. Você pode ler tudo.

+

Chat em terminal curses, uma execução única a partir de um pipe, ou pelo Telegram. Qualquer endpoint que fale a API de chat da OpenAI, qualquer programa que imprima uma resposta, ou outro agente via A2A. As ferramentas declaram o que podem fazer; o harness aplica a regra e conta ao modelo o que recusou.

-

Deutsch · English · Portugues (BR)

+
# exemplo ilustrativo, não é um log real
+você    troque a versão no Makefile para 0.2.0
+tool    read {"path":"Makefile"}                          read
+tool    edit {"path":"Makefile","old":"0.1.0","new":"0.2.0"}   mutate
+pergunta edit Makefile ? [y/N] n
+visto   error: denied by operator    ← isto é o que o modelo lê
+modelo  Não tive permissão para editar o arquivo. Avise se devo tentar de novo.
+

Cerca de 29.500 linhas de C (em 2026-11-11), 16 plugins, 35 programas de teste. BSD-3-Clause.

-

splinter_

-

Um harness de agente que e seu: chat no terminal, ferramentas com classes de autorizacao, plugins, qualquer modelo que fale OpenAI - escrito por nos para poder mudar-lo, em vez de nos acostumar com o comportamento de um cliente alheio.

+

Três verificações antes de uma ferramenta rodar

+
+
Orçamento
Antes de cada requisição, a conversa é medida contra o orçamento de bytes configurado. Se não couber, um plugin como o lcm pode comprimi-la antes. Se ainda não couber, nada é enviado e o turno falha, em vez de deixar um endpoint truncar em silêncio.
+
Registro
Um nome de ferramenta que não existe vira uma observação para o modelo — sem falha, sem adivinhação.
+
Classe de autorização
Cada ferramenta declara read, mutate ou destructive. Quem diz é a ferramenta, não o modelo e não o prompt. Chamadas que alteram ou destroem precisam do seu consentimento, a menos que você inicie com --autonomous. Um plugin pode ficar na frente como gate: permitir, recusar com motivo ou não opinar. O plugin do modo criança é um deles.
+
+

Uma recusa nunca é muda. Ela volta ao modelo como observação da ferramenta, para que ele possa reagir.

-

29543 linhas C99/POSIX · -27 ferramentas · 35 programas de teste · -16 plugins · 42 paletas · BSD-3-Clause

+

Ferramentas

+

São 41, embutidas ou vindas de plugins. Um servidor MCP pode acrescentar outras em tempo de execução.

+
readmutatedestructive
+
+ + + + + + + + + + + + + + + + + + + + + + +
ferramentao que faz
read, search, listLinhas numeradas com offset e limit, recusa binários. Busca literal, no máximo 100 resultados. Lista um diretório.
write, editGrava um arquivo, com o diff na observação. Edit troca exatamente uma ocorrência; ambíguo é erro.
runUm comando de shell. O código de saída é uma observação.
websearchPesquisa na web.
webfetchBusca uma URL.
folder_historyO que aconteceu por último neste diretório, para o modelo não ter de adivinhar.
skill_search, skill_loadEncontra skills instaladas, lê uma inteira. Nada é pré-carregado.
memory_searchSuas memórias em um servidor mem0, separadas por usuário.
memory_addGuarda um fato.
delegate, delegate_parallel, delegate_submit, delegate_retryPassa trabalho a outro modelo: uma tarefa, várias ao mesmo tempo, como job em segundo plano, ou repete uma falha.
delegate_list, delegate_jobs, delegate_result, delegate_dueLista delegados, mostra jobs, busca um resultado, mostra o que está vencido.
task_start, task_killRoda um comando de shell em segundo plano (quatro por vez) ou o interrompe.
task_list, task_resultJobs em segundo plano e sua saída.
plan_task_add, plan_task_updateUma lista de tarefas persistente da sessão.
plan_task_listLê essa lista.
tmux_startInicia um comando em uma sessão tmux separada e a torna o alvo.
tmux_send, tmux_askDigita nele (texto ou teclas como C-c), espera saída nova e devolve só as linhas novas.
tmux_status, tmux_capture, tmux_readOlha o painel e lê o que é novo.
a2a_send, a2a_cancel_taskEscreve a outro agente (com arquivo, se quiser) ou cancela a tarefa dele.
a2a_get_task, a2a_subscribeLê a tarefa de outro agente e seus eventos.
echo, clockPequenos utilitários.
-

O que e

-

splinter e um harness de agente em C99/POSIX: um programa que segura a -conversa, decide quais ferramentas existem, quem pode usa-las e o que ficou -registrado. O modelo e um detalhe trocavel; o harness e a parte que sabe o que -acontece.

+

Modelos

+

Um transporte traduz o protocolo de linhas simples do harness para o que o outro lado fala. O loop nunca vê uma API de fabricante; por isso o make check roda contra um mock com roteiro, sem rede e sem chave.

+
+
openai
Qualquer endpoint compatível com a OpenAI, streaming por SSE. O HTTP passa pelo curl(1).
+
cli
Qualquer programa como modelo, por exemplo claude -p.
+
a2a
Outro agente via A2A.
+
ring
Um anel de saídas. Em um 429 ou limite, a próxima saída configurada assume.
+
+

Delegação

+

O modelo pode passar trabalho a outro modelo. O splinter escolhe: uma tag pedida vale 5, uma tag no texto da tarefa vale 3, uma palavra da descrição do delegado vale 1. A observação começa com a escolha e o motivo, então uma escolha errada fica visível.

+
# ~/.splinter/splinter.conf.d/20-delegates.conf
+delegate = coder | C99, POSIX, revisão | tags=code,c99 | endpoint=... | model=...
+delegate = quick | respostas curtas   | tags=chat,cheap | endpoint=... | model=...
 
-

Como se parece

-
voce: por que o build falha?
-pensando: preciso ler o erro antes de opinar.
-ferramenta: search {"pattern":"error","path":"build/logs"}
-ferramenta: read {"path":"build/logs/last.log"}
-alteracao: -CFLAGS = -O2
-           +CFLAGS = -O2 -Wall -Werror
-modelo: faltava -Werror; o erro era um aviso promovido.
-

Pensamento, ferramenta com argumentos, alteracao e resposta entram no -transcript na ordem em que acontecem.

- -

Tres verificacoes antes de cada ferramenta

-

Orcamento, registro e classe de autorizacao. A ferramenta declara a classe -(read, mutate, destructive) - nunca o modelo, nunca o prompt. Um plugin pode -entrar na frente com um gate: permitir, negar com motivo, ou nao opinar.

- -

Ferramentas

-

27 ferramentas: read, write, edit, -search, list, run, folder_history, -delegate, delegate_parallel, as de leitura do sistema e as de -skills, memoria e pesquisa na web.

- -

Transportes e plugins

-

Transporte e um vtable: openai (HTTP/SSE), cli (claude, opencode), a2a -(outro agente via JSON-RPC, com streaming), mock para teste. Plugins sao .so -carregados com dlopen: lcm, focus, reminder, ring, mcp, cli, a2a, clock, cps, -kids, tasks, planner, provider, scheduler, status e tmux.

- -

Delegacao: outros modelos, splinter escolhe

+$ splinter --choose "verifique este código C quanto a erros de memória" +coder 7 task mentions 'code'
+

delegate_parallel envia até oito tarefas ao mesmo tempo. O relatório mostra, por tarefa, quem respondeu, quanto demorou e o código de saída; um delegado lento ou quebrado aparece no cabeçalho.

[parallel: 2 task(s), 12018 ms wall]
+## task 1 | model slow | score 5 | 12018 ms | exit 0 | 75 B
+## task 2 | model fast | score 5 |    16 ms | exit 0 | 74 B
+

Um delegado pode nomear um host=. A chamada inteira vai então por ssh, e claude, opencode ou outro splinter roda onde está o modelo ou a rede — com as chaves daquela máquina.

+
delegate = remote | em outra máquina | tags=remote | host=build.example.org | endpoint=... | model=...
-## task 1 | model slow | score 5 | 12018 ms | exit 0 | 75 B | requested tag 'slow' -

Modelo, duracao e status por tarefa - um delegado lento aparece no cabecalho -antes de alguem ler o texto.

+

Plugins

+

Um plugin é um .so carregado com dlopen. Ele pode registrar ferramentas, comandos com barra, widgets da barra lateral, transportes e gates. O tick de um widget roda em thread própria; só a thread da UI desenha. A ABI está em docs/PLUGINS.md. Plugins rodam no processo com os seus direitos.

+
    +
  • lcm, cps: comprimem a conversa
  • +
  • focus: lembra o /goal a cada N turnos
  • +
  • reminder: repõe as regras básicas a cada 10 turnos
  • +
  • ring: próxima saída em 429 ou limite
  • +
  • mcp, a2a, cli: alcançam outras ferramentas e agentes
  • +
  • provider: adiciona um provedor em execução
  • +
    +
  • tasks: jobs de shell em segundo plano
  • +
  • planner: a lista de tarefas da sessão
  • +
  • tmux: controla um programa que quer um terminal
  • +
  • scheduler: trabalho agendado
  • +
  • status: contexto, tokens por segundo, custo se você definir preços
  • +
  • kids: modo criança
  • +
  • clock: relógio na barra lateral e uma ferramenta
  • +
-

Configuracao

-
endpoint = http://kontron.local:8080/v1/chat/completions
-model = ...
-autonomous = 1
-

~/.splinter/splinter.conf mais splinter.conf.d/*.conf -em ordem de nome. Chave desconhecida e erro com numero de linha.

+

Outros agentes, nos dois sentidos

+

MCP

+

Como cliente, o splinter busca as ferramentas de um servidor MCP com os esquemas dele. Como servidor, oferece as suas:

+
$ splinter --mcp-server-listen 127.0.0.1 --mcp-listen-port 8098
+

Responde a initialize, tools/list e tools/call. Ferramentas de leitura são atendidas. As que alteram ou destroem só rodam com --autonomous; um agente estranho não ganha um shell só por pedir.

+

A2A

+
$ SPLINTER_A2A_SERVER_TOKEN=... splinter --a2a-server-listen 127.0.0.1 --a2a-listen-port 8099
+
    +
  • POST /a2a aceita SendMessage, SendStreamingMessage (SSE), GetTask, ListTasks e SubscribeToTask. O agent card fica em /.well-known/agent-card.json.
  • +
  • Um contextId é uma conversa. Sem ele, o servidor cria um e o devolve.
  • +
  • Uma ferramenta que altera pausa a tarefa como INPUT_REQUIRED. Uma chamada seguinte com taskId e yes ou no continua. CancelTask interrompe.
  • +
  • Uma config de push envia a tarefa concluída a um webhook (loopback ou hosts de SPLINTER_A2A_PUSH_ALLOW).
  • +
  • Partes de arquivo binário caem em inbox/ e o modelo recebe o caminho. Partes de URL só são buscadas de hosts permitidos.
  • +
  • Fora do loopback, um token Bearer é obrigatório.
  • +
  • Como cliente, a2a_send pode anexar um arquivo e a2a_subscribe lê os eventos de uma tarefa remota.
  • +
-

Gateway: Telegram

-

splinter --daemon fala Telegram com indicador de digitacao e os -mesmos slash commands do terminal. O bot registra seus comandos: o menu mostra os comandos dos plugins carregados -e os programas em ~/.splinter/commands/; uma aprovacao chega com -botoes Sim/Nao; as respostas viram HTML do Telegram (negrito, codigo, links, -tabelas em bloco monoespaceado, imagens como foto (inclusive arquivos locais), outros arquivos como documento). /new comeca uma conversa nova; /model lista os modelos -configurados em botoes, troca o transporte e guarda a escolha em -splinter.conf.d/90-model.conf; /model probe pergunta -aos endpoints por /v1/models. /connect pergunta nome, -endpoint, modelo e variavel da chave, faz um turno de teste e grava o provedor -em splinter.conf.d/20-connect.conf.

+

Telegram

+

splinter --daemon faz long-polling de getUpdates, roda um turno por mensagem e responde com os mesmos comandos de barra do terminal. O token vem de um arquivo 0600 ou do ambiente, nunca de um argumento. Só os IDs de usuário listados em telegram_allow recebem resposta.

+
    +
  • O consentimento chega como botões Sim/Não. A resposta em texto ok <id> continua valendo.
  • +
  • /model alterna entre modelos configurados; /model probe pergunta aos endpoints por /v1/models. /connect pergunta nome, endpoint, modelo e variável da chave, faz um turno de teste e grava o provedor em splinter.conf.d. /new começa uma conversa nova. /interview faz as perguntas de configuração no chat.
  • +
  • As respostas saem como HTML do Telegram: negrito, itálico, código, links, citações e tabelas em colunas monoespaçadas. Imagens markdown viram fotos, outros arquivos locais viram documentos. Um trecho que o Telegram não consegue interpretar sai como texto, em vez de se perder.
  • +
  • Programas em ~/.splinter/commands/ viram /nome e aparecem no menu do bot.
  • +
+

Modo criança

+

Com o plugin kids, toda alteração precisa da aprovação de um responsável pelo Telegram, uma lista branca deixa passar o inofensivo, o modelo é lembrado de um tom adequado à idade a cada pedido, e um limite diário de minutos encerra o dia quando acaba.

-

O que fica registrado

-

Cada sessao escreve session.log (eventos legiveis) e -wire.jsonl (o que foi de fato enviado ao modelo).

- -

Compilar

-
make
-make check   # 35 binarios de teste, i18n, site
-

Sem dependencias alem de libc e pthread; ncurses vem do vendor.

- -

O que nao e

-
  • nao e um modelo;
  • nao e um servico - e um programa;
  • -
  • nao guarda nada em sqlite: sessoes sao arquivos;
  • -
  • nao adivinha: mede.
- -

A frota

-
delegate = olivia | em olivia | tags=remote | host=172.25.206.16 |
-           endpoint=http://172.25.206.2:18082/v1/chat/completions | model=...
-

O delegate nomeia um host e a chamada inteira vai por ssh; a maquina remota -poe suas proprias chaves.

- -

As duas direcoes: MCP

-
$ splinter --mcp-server-listen 0.0.0.0 --mcp-listen-port 8098
-splinter: MCP server on 0.0.0.0:8098 (27 tools, read only)
-

Como cliente busca ferramentas; como servidor oferece as suas. Mutar so com ---autonomous.

- -

Pipe, pasta, primeira conversa

+

Configuração, logs, formas de entrar

+
# ~/.splinter/splinter.conf   (mais splinter.conf.d/*.conf, em ordem de nome)
+endpoint   = http://127.0.0.1:8080/v1/chat/completions
+model      = my-model
+locale     = pt_BR
+theme      = Delphinium
+telegram_allow = 123456789
+plugin     = plugins/lcm/lcm.so
+

Simplesmente key = value. Uma chave desconhecida interrompe a partida com arquivo e linha, porque um erro de digitação que não faz nada é uma configuração que mente. Linha de comando vence arquivo, que vence o padrão.

+
~/.splinter/logs/<sessão>/session.log   legível, em ordem
+~/.splinter/logs/<sessão>/wire.jsonl    cada requisição e resposta, cruas
+

Suas palavras, o raciocínio, cada chamada de ferramenta com argumentos, cada observação, erros e contagem de tokens. Nada cortado, porque um log que guarda só o que foi bom não explica um turno ruim.

$ cat /etc/passwd | splinter "explique o arquivo"
-$ cd ~/src/splinter && splinter -c
-$ splinter --interview
-

stdin vira contexto; -c pega a ultima sessao daquele diretorio; ---interview escreve o perfil em -~/.splinter/profile/<usuario>.md.

+$ cd ~/src/projeto && splinter -c # a última sessão que aconteceu AQUI +$ splinter --interview # uma vez: idioma, estilo, caminhos proibidos +

A entrada padrão vira contexto delimitado e com tamanho limitado. Skills ficam em ~/.splinter/skills/ e são encontradas sob demanda. Quando vários splinters rodam no mesmo diretório, /swarm manda uma linha ao menos ocupado. A interface tem 42 paletas de cores CDE e está traduzida para alemão, inglês e português do Brasil; uma tradução faltando faz o make check falhar.

-

Modo crianca

-

Com o plugin kids, toda acao que muda algo precisa da aprovacao de -um adulto (Telegram), uma lista branca libera o inofensivo, o modelo e lembrado a -cada pedido de manter a conversa adequada a idade, e um limite diario de minutos -fecha o dia quando acaba.

- -

As duas direcoes: A2A

-

Como cliente, splinter busca outro agente via A2A; como servidor, oferece a -si mesmo:

-
$ SPLINTER_A2A_SERVER_TOKEN=... splinter --a2a-server-listen 127.0.0.1 --a2a-listen-port 8099
-splinter: A2A server on 127.0.0.1:8099 (token required)
-

POST /a2a aceita SendMessage, SendStreamingMessage -(SSE), GetTask e ListTasks em JSON-RPC; o agent card fica em -/.well-known/agent-card.json. Um contextId e uma conversa; -sem ele o servidor cria um e devolve. Uma taskPushNotificationConfig -envia a tarefa concluida para um webhook (loopback ou -SPLINTER_A2A_PUSH_ALLOW); configs de push podem ser gerenciadas por -CRUD e URLs text/plain sao buscadas de hosts permitidos. Uma ferramenta mutante pausa como -INPUT_REQUIRED; um acompanhamento com taskId e -yes/no continua. Fora do loopback o token Bearer e obrigatorio.

- -
- +

Compilar

+
$ make            # libsplinter.so, o binário, os plugins
+$ make check      # 35 programas de teste, testes de shell, checagem de i18n; sem rede, sem modelo
+$ splinter
+

make POSIX e um compilador C99, -Wall -Wextra -Werror. O curses do NetBSD está na árvore. Em execução, o splinter chama o curl(1) para HTTP. Manual: man ./docs/splinter.1.

+

O que não é

+
    +
  • Não é um modelo. Não traz nenhum e não escolhe um por você.
  • +
  • Não é uma nuvem. Fala com os endpoints que você configura.
  • +
  • Não é um sandbox. As classes protegem você do modelo, não de código que você mesmo carrega.
  • +
+
splinter, BSD-3-Clause. ABI de plugins: docs/PLUGINS.md. Configuração: docs/CONFIG.md.
+
diff --git a/tools/gen_www.py b/tools/gen_www.py deleted file mode 100644 index f10d57c..0000000 --- a/tools/gen_www.py +++ /dev/null @@ -1,700 +0,0 @@ -#!/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 re -import sys - -ROOT = pathlib.Path(__file__).resolve().parent.parent -OUT = ROOT / "src" / "www" - -LANGS = ["de", "en", "pt_BR"] -FILES = {"de": "index.html", "en": "index.en.html", - "pt_BR": "index.pt.html"} - - -# The page states sizes and counts. They are counted here, from the tree, so a -# new test, plugin or tool cannot leave a number behind that was true last week. -def _c_lines(root): - return sum(len(p.read_text(encoding="utf-8").splitlines()) - for p in sorted(root.rglob("*")) - if p.is_file() and p.suffix in (".c", ".h")) - - -def counts(): - plugins = [p for p in (ROOT / "plugins").iterdir() - if p.is_dir() and any(p.glob("*.c"))] - tests = list((ROOT / "tests").glob("test_*.c")) - palettes = (ROOT / "src" / "palettes.c").read_text(encoding="utf-8") - tools = set() - for p in (list((ROOT / "src").glob("*.c")) + - list((ROOT / "plugins").glob("*/*.c"))): - tools.update(re.findall(r'\.name = "([a-z0-9_]+)"', - p.read_text(encoding="utf-8"))) - return { - "N_LINES": (_c_lines(ROOT / "src") + _c_lines(ROOT / "include") + - _c_lines(ROOT / "plugins")), - "N_TOOLS": len(tools), - "N_TESTS": len(tests), - "N_PLUGINS": len(plugins), - "N_THEMES": len(re.findall(r'^\s*\{ "', palettes, re.M)), - } - - -HEAD = """ - - - -{{title}} - - - - -
- -

{{langbar}}

- -

splinter_

-

{{lead}}

- -

@@N_LINES@@ {{m_lines}} · -@@N_TOOLS@@ {{m_tools}} · @@N_TESTS@@ {{m_tests}} · -@@N_PLUGINS@@ {{m_plugins}} · @@N_THEMES@@ {{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}
a2a{d_a2a}
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 · Portugues (BR)", - "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_tools": "Werkzeuge", - "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_tools": "tools", - "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.", - }, -} - -T["pt_BR"] = { - "title": "splinter - um harness de agente que e seu", - "desc": "splinter e um harness de agente em C99/POSIX: chat no terminal, ferramentas com classes de autorizacao, plugins, qualquer endpoint compativel com OpenAI, gateway Telegram.", - "langbar": "Deutsch · English · Portugues (BR)", - "lead": "Um harness de agente que e seu: chat no terminal, ferramentas com " - "classes de autorizacao, plugins, qualquer modelo que fale OpenAI - " - "escrito por nos para poder mudar-lo, em vez de nos acostumar com o " - "comportamento de um cliente alheio.", - "m_lines": "linhas C99/POSIX", "m_tools": "ferramentas", - "m_tests": "programas de teste", "m_plugins": "plugins", "m_themes": "paletas", - "foot": "splinter - C99/POSIX, BSD-3-Clause. Manual: man ./docs/splinter.1" - " · ABI de plugins: docs/PLUGINS.md", -} - -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_a2a="ein anderer Agent ueber A2A (SendMessage/Streaming, Text)", - 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

Der Bot registriert seine Befehle: das Menue zeigt die geladenen Plugin-Befehle und die Programme in ~/.splinter/commands/; eine Zustimmung kommt mit Ja/Nein-Knoepfen. /interview stellt die Fragen im Chat. /new faengt eine frische Konversation an; /model bietet die konfigurierten Modelle als Knoepfe, schaltet den Transport um und merkt die Wahl in splinter.conf.d/90-model.conf; /model probe fragt die Endpoints nach /v1/models. /connect fragt Name, Endpoint, Modell und Key-Variable ab, macht einen Test-Turn und schreibt den Provider nach splinter.conf.d/20-connect.conf. Antworten werden als Telegram-HTML gesetzt: fett, kursiv, Code und Links als Tags, Bilder als Foto (sendPhoto, auch lokale Dateien), andere Dateien als Dokument, Tabellen als Spalten im Monospace-Block; ein Stueck, das Telegram nicht parst, geht als Text raus statt verloren. Programme in commands/ antworten dort direkt im Chat; im TUI gehen sie ans Modell.

\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="klein, nichts ausser libc und curses", - c_check="@@N_TESTS@@ 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
    \n
  • Kein Modell. splinter bringt keins mit und " - "waehlt keins fuer dich.
  • \n
  • Keine Cloud. Es spricht mit dem Endpunkt, den du " - "eintraegst.
  • \n
  • Kein Sandkasten. Plugins laufen im Prozess mit deinen Rechten " - "— die Klassen schuetzen vor dem Modell, nicht vor Code, den du selbst " - "laedst.
  • \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_a2a="another agent over A2A (SendMessage/streaming, text)", - 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

The bot registers its commands: the menu shows the loaded plugins' commands and the programs in ~/.splinter/commands/; an approval arrives with Yes/No buttons. /interview asks the questions in the chat. /new starts a fresh conversation; /model offers the configured models as buttons, switches the transport and remembers the choice in splinter.conf.d/90-model.conf; /model probe asks the endpoints for /v1/models. /connect asks for name, endpoint, model and key variable, runs one test turn and writes the provider to splinter.conf.d/20-connect.conf. Answers are rendered as Telegram HTML: bold, italic, code and links as tags, images as photos (sendPhoto, local files too), other files as documents, tables as columns in a monospace block; a piece Telegram cannot parse goes out as text instead of being lost. Programs in commands/ answer in the chat; in the TUI their output goes to the model.

\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="small, nothing but libc and curses", - c_check="@@N_TESTS@@ 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
    \n
  • Not a model. splinter ships none and picks none " - "for you.
  • \n
  • Not a cloud. It talks to the endpoint you configure.
  • \n" - "
  • Not a sandbox. Plugins run in the process with your rights — the classes protect " - "the harness from the model, not from code you chose to load.
  • \n
"), - ], -} - - - -# Sections added after the first version: the fleet, both directions of MCP, and -# the three small ways in (pipe, folder, first talk). -SECTIONS["de"] += [ -"""

Die Flotte

-

Ein Delegate darf einen Host nennen. Dann geht der ganze Aufruf ueber ssh, und -claude, opencode oder ein zweiter splinter laufen dort, wo das Modell oder das -Netz ist:

-
delegate = olivia | auf olivia | tags=remote | host=172.25.206.16 |
-           endpoint=http://172.25.206.2:18082/v1/chat/completions | model=...
-

delegate_parallel schickt bis zu acht Aufgaben gleichzeitig los -und berichtet zurueck, wer was geliefert hat:

-
[parallel: 2 task(s), 12018 ms wall]
-
-## task 1 | model slow | score 5 | 12018 ms | exit 0 | 75 B | requested tag 'slow'
-## task 2 | model fast | score 5 |    16 ms | exit 0 | 74 B | requested tag 'fast'
-
-## summary
-- slow: 1 task(s), 12018 ms total
-- fast: 1 task(s), 16 ms total
-

Modell, Dauer und Status pro Aufgabe — ein lahmer oder kaputter Delegate -ist in der Kopfzeile sichtbar, bevor jemand seinen Text liest.

""", -"""

Beide Richtungen: MCP

-

Als Client holt splinter die Werkzeuge eines MCP-Servers. Als Server stellt es -seine eigenen hin:

-
$ splinter --mcp-server-listen 0.0.0.0 --mcp-listen-port 8098
-splinter: MCP server on 0.0.0.0:8098 (@@N_TOOLS@@ tools, read only)
-

Ein anderer Agent bekommt initialize, tools/list und -tools/call. Lesende Werkzeuge werden bedient, mutierende und -destruktive nur mit --autonomous — ein fremder Agent fuehrt hier -keine Shell aus, weil er freundlich fragt.

""", -"""

Pipe, Ordner, Erstgespraech

-
$ cat /etc/passwd | splinter "erklaer die Datei"
-$ cd ~/src/splinter && splinter -c   # die letzte Session, die HIER war
-$ splinter --interview            # einmal: Sprache, Stil, heilige Pfade
-

Standardeingabe wird zu Kontext, markiert und groessenbegrenzt; -folder_history erzaehlt dem Modell, was in einem Verzeichnis passiert -ist, statt es raten zu lassen; das Profil aus dem Interview liegt in -~/.splinter/profile/<user>.md.

""", -"""

Beide Richtungen: A2A

-

Als Client holt splinter einen anderen Agenten ueber A2A; als Server stellt es -sich selbst hin:

-
$ SPLINTER_A2A_SERVER_TOKEN=... splinter --a2a-server-listen 127.0.0.1 --a2a-listen-port 8099
-splinter: A2A server on 127.0.0.1:8099 (token required)
-

POST /a2a nimmt SendMessage, SendStreamingMessage -(SSE), GetTask und ListTasks als JSON-RPC; die Agent Card liegt unter -/.well-known/agent-card.json. Ein contextId ist eine -Konversation; ohne eines legt der Server eins an und gibt es zurueck. Eine -taskPushNotificationConfig schickt den fertigen Task an einen -Webhook (Loopback oder SPLINTER_A2A_PUSH_ALLOW); Push-Configs -lassen sich per CRUD verwalten, text/plain-URLs werden von erlaubten Hosts -geholt; binaere file/raw-Teile landen im -inbox/ und das Modell bekommt den Pfad. Ein mutierendes Werkzeug pausiert als -INPUT_REQUIRED; ein Folgeaufruf mit taskId und -yes/no setzt fort; SubscribeToTask -schickt den Zustand einmal und schliesst den Stream; als Client liest -a2a_subscribe die Ereignisse eines fremden Tasks als Text, und -a2a_send haengt eine Datei (base64) an eine Nachricht. Jenseits von -Loopback ist der Bearer-Token Pflicht.

""", -] - -SECTIONS["en"] += [ -"""

The fleet

-

A delegate may name a host. The whole invocation then goes through ssh, so -claude, opencode or another splinter run where the model or the network is:

-
delegate = olivia | on olivia | tags=remote | host=172.25.206.16 |
-           endpoint=http://172.25.206.2:18082/v1/chat/completions | model=...
-

delegate_parallel sends up to eight tasks at once and reports back -who delivered what:

-
[parallel: 2 task(s), 12018 ms wall]
-
-## task 1 | model slow | score 5 | 12018 ms | exit 0 | 75 B | requested tag 'slow'
-## task 2 | model fast | score 5 |    16 ms | exit 0 | 74 B | requested tag 'fast'
-
-## summary
-- slow: 1 task(s), 12018 ms total
-- fast: 1 task(s), 16 ms total
-

Model, duration and status per task — a slow or failing delegate is visible -in the header before anybody reads its prose.

""", -"""

Both directions: MCP

-

As a client splinter fetches an MCP server's tools. As a server it offers its -own:

-
$ splinter --mcp-server-listen 0.0.0.0 --mcp-listen-port 8098
-splinter: MCP server on 0.0.0.0:8098 (@@N_TOOLS@@ tools, read only)
-

Another agent gets initialize, tools/list and -tools/call. Read tools are served; mutating and destructive ones only -with --autonomous — a foreign agent does not run shell commands -here because it asked nicely.

""", -"""

Pipe, folder, first talk

-
$ cat /etc/passwd | splinter "explain the file"
-$ cd ~/src/splinter && splinter -c  # the last session that happened HERE
-$ splinter --interview           # once: language, style, sacred paths
-

Standard input becomes context, framed and size-capped; -folder_history tells the model what happened in a directory instead -of letting it guess; the profile from the interview lives in -~/.splinter/profile/<user>.md.

""", -"""

Both directions: A2A

-

As a client splinter fetches another agent over A2A; as a server it offers -itself:

-
$ SPLINTER_A2A_SERVER_TOKEN=... splinter --a2a-server-listen 127.0.0.1 --a2a-listen-port 8099
-splinter: A2A server on 127.0.0.1:8099 (token required)
-

POST /a2a takes SendMessage, SendStreamingMessage -(SSE), GetTask and ListTasks as JSON-RPC; the agent card lives at -/.well-known/agent-card.json. A contextId is a -conversation; without one the server makes one and returns it. A -taskPushNotificationConfig posts the completed task to a webhook -(loopback or SPLINTER_A2A_PUSH_ALLOW); push configs can be managed -with CRUD and text/plain URLs are fetched from allowed hosts; binary -file/raw parts land in the inbox/ and the -model is told the path. A mutating tool pauses as -INPUT_REQUIRED; a follow-up with taskId and -yes/no resumes; SubscribeToTask sends -the state once and ends the stream; on the client side a2a_subscribe -reads a remote task's events as text and a2a_send attaches a file -(base64) to a message. Beyond loopback the bearer token is -required.

""", -] - - -SECTIONS["pt_BR"] = [ -"""

O que e

-

splinter e um harness de agente em C99/POSIX: um programa que segura a -conversa, decide quais ferramentas existem, quem pode usa-las e o que ficou -registrado. O modelo e um detalhe trocavel; o harness e a parte que sabe o que -acontece.

""", -"""

Como se parece

-
voce: por que o build falha?
-pensando: preciso ler o erro antes de opinar.
-ferramenta: search {"pattern":"error","path":"build/logs"}
-ferramenta: read {"path":"build/logs/last.log"}
-alteracao: -CFLAGS = -O2
-           +CFLAGS = -O2 -Wall -Werror
-modelo: faltava -Werror; o erro era um aviso promovido.
-

Pensamento, ferramenta com argumentos, alteracao e resposta entram no -transcript na ordem em que acontecem.

""", -"""

Tres verificacoes antes de cada ferramenta

-

Orcamento, registro e classe de autorizacao. A ferramenta declara a classe -(read, mutate, destructive) - nunca o modelo, nunca o prompt. Um plugin pode -entrar na frente com um gate: permitir, negar com motivo, ou nao opinar.

""", -"""

Ferramentas

-

@@N_TOOLS@@ ferramentas: read, write, edit, -search, list, run, folder_history, -delegate, delegate_parallel, as de leitura do sistema e as de -skills, memoria e pesquisa na web.

""", -"""

Transportes e plugins

-

Transporte e um vtable: openai (HTTP/SSE), cli (claude, opencode), a2a -(outro agente via JSON-RPC, com streaming), mock para teste. Plugins sao .so -carregados com dlopen: lcm, focus, reminder, ring, mcp, cli, a2a, clock, cps, -kids, tasks, planner, provider, scheduler, status e tmux.

""", -"""

Delegacao: outros modelos, splinter escolhe

-
[parallel: 2 task(s), 12018 ms wall]
-
-## task 1 | model slow | score 5 | 12018 ms | exit 0 | 75 B | requested tag 'slow'
-

Modelo, duracao e status por tarefa - um delegado lento aparece no cabecalho -antes de alguem ler o texto.

""", -"""

Configuracao

-
endpoint = http://kontron.local:8080/v1/chat/completions
-model = ...
-autonomous = 1
-

~/.splinter/splinter.conf mais splinter.conf.d/*.conf -em ordem de nome. Chave desconhecida e erro com numero de linha.

""", -"""

Gateway: Telegram

-

splinter --daemon fala Telegram com indicador de digitacao e os -mesmos slash commands do terminal. O bot registra seus comandos: o menu mostra os comandos dos plugins carregados -e os programas em ~/.splinter/commands/; uma aprovacao chega com -botoes Sim/Nao; as respostas viram HTML do Telegram (negrito, codigo, links, -tabelas em bloco monoespaceado, imagens como foto (inclusive arquivos locais), outros arquivos como documento). /new comeca uma conversa nova; /model lista os modelos -configurados em botoes, troca o transporte e guarda a escolha em -splinter.conf.d/90-model.conf; /model probe pergunta -aos endpoints por /v1/models. /connect pergunta nome, -endpoint, modelo e variavel da chave, faz um turno de teste e grava o provedor -em splinter.conf.d/20-connect.conf.

""", -"""

O que fica registrado

-

Cada sessao escreve session.log (eventos legiveis) e -wire.jsonl (o que foi de fato enviado ao modelo).

""", -"""

Compilar

-
make
-make check   # @@N_TESTS@@ binarios de teste, i18n, site
-

Sem dependencias alem de libc e pthread; ncurses vem do vendor.

""", -"""

O que nao e

-
  • nao e um modelo;
  • nao e um servico - e um programa;
  • -
  • nao guarda nada em sqlite: sessoes sao arquivos;
  • -
  • nao adivinha: mede.
""", -"""

A frota

-
delegate = olivia | em olivia | tags=remote | host=172.25.206.16 |
-           endpoint=http://172.25.206.2:18082/v1/chat/completions | model=...
-

O delegate nomeia um host e a chamada inteira vai por ssh; a maquina remota -poe suas proprias chaves.

""", -"""

As duas direcoes: MCP

-
$ splinter --mcp-server-listen 0.0.0.0 --mcp-listen-port 8098
-splinter: MCP server on 0.0.0.0:8098 (@@N_TOOLS@@ tools, read only)
-

Como cliente busca ferramentas; como servidor oferece as suas. Mutar so com ---autonomous.

""", -"""

Pipe, pasta, primeira conversa

-
$ cat /etc/passwd | splinter "explique o arquivo"
-$ cd ~/src/splinter && splinter -c
-$ splinter --interview
-

stdin vira contexto; -c pega a ultima sessao daquele diretorio; ---interview escreve o perfil em -~/.splinter/profile/<usuario>.md.

""", -"""

Modo crianca

-

Com o plugin kids, toda acao que muda algo precisa da aprovacao de -um adulto (Telegram), uma lista branca libera o inofensivo, o modelo e lembrado a -cada pedido de manter a conversa adequada a idade, e um limite diario de minutos -fecha o dia quando acaba.

""", -"""

As duas direcoes: A2A

-

Como cliente, splinter busca outro agente via A2A; como servidor, oferece a -si mesmo:

-
$ SPLINTER_A2A_SERVER_TOKEN=... splinter --a2a-server-listen 127.0.0.1 --a2a-listen-port 8099
-splinter: A2A server on 127.0.0.1:8099 (token required)
-

POST /a2a aceita SendMessage, SendStreamingMessage -(SSE), GetTask e ListTasks em JSON-RPC; o agent card fica em -/.well-known/agent-card.json. Um contextId e uma conversa; -sem ele o servidor cria um e devolve. Uma taskPushNotificationConfig -envia a tarefa concluida para um webhook (loopback ou -SPLINTER_A2A_PUSH_ALLOW); configs de push podem ser gerenciadas por -CRUD e URLs text/plain sao buscadas de hosts permitidos. Uma ferramenta mutante pausa como -INPUT_REQUIRED; um acompanhamento com taskId e -yes/no continua. Fora do loopback o token Bearer e obrigatorio.

""", -] - - -SECTIONS["de"].append( -"""

Kindermodus

-

Mit dem Plugin kids braucht jede Aenderung die Zustimmung eines -Erwachsenen (Telegram), eine Whitelist laesst das Harmlose durch, das Modell wird -bei jeder Anfrage an einen altersgerechten Ton erinnert, und ein Tageskontingent -an Minuten beendet den Tag, wenn es aufgebraucht ist.

""") - -SECTIONS["en"].append( -"""

Kid mode

-

With the kids plugin every change needs a parent's approval -(Telegram), a whitelist lets the harmless ones through, the model is reminded of an -age-appropriate tone on every request, and a daily minute budget ends the day when -it is spent.

""") - -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) - for key, value in counts().items(): - html = html.replace("@@%s@@" % key, str(value)) - if "{{" in html: - leftover = html[html.index("{{"):html.index("{{") + 40] - raise SystemExit("gen_www: unfilled placeholder: %s" % leftover) - m = re.search(r"@@N_[A-Z_]+@@", html) - if m is not None: - raise SystemExit("gen_www: unfilled count: %s" % m.group(0)) - 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:]))