session_search walks the logs of earlier sessions in this folder newest first
(query, limit, days, session) and answers with date, session id, title and a
snippet around the match; session_list shows the sessions themselves. The
running session is left out -- that is context, and lcm's recall covers what
compaction dropped -- unless a call names it with session=.
The system prompt now carries two things. When the working directory has
earlier sessions, a paragraph says how many, the newest, and that
session_search/session_list read them, so the model looks before asking the
user something that was already answered. And the default prompt tells it to
use the mcp_* tools for tasks, memory, skills and knowledge bases actively, not
only when asked.
test_sessiontools drives both tools (hit, no hit, limit, days, explicit id,
list with the current session marked); test_engine checks the prompt paragraph
and the default text. make check: all tests passed.
make check-asan: all 41 test binaries clean.
The user's ~/.splinter/splinter.conf gained "plugin session { }" (backup:
splinter.conf.bak-session).
A session owns the model chosen inside it, so reopening that conversation
comes back on the same model. The config is never touched: a new session
starts on core default (or -m), and the old global 90-model drop-in stays
removed. Telegram's /model remains process-only and writes no config.
- <session>.model is written by /model (provider/model, e.g.
junction/qwen3.6-35b) and read when the session is opened again.
- /new copies the model the session is on into the new session.
- test_engine checks the sidecar and that reopening restores test-model-2;
a new session still starts on config test-model.
- docs say exactly that: session choice persists, config does not.
Verified with the real config: /model junction/qwen3.6-35b writes the sidecar,
-c comes back on qwen3.6-35b, a new session starts on qwen3.6-35b-judged.
The user's rule: what the config says is the default, -m overrides it for one
run, /model overrides it for the running process - and nothing is written to
the config or to the session. The session sidecar from the previous change made
/model persistent, which is exactly the harness behaviour this rejects.
- removed <session>.model writing and restoring; a reopened session starts on
the config default or -m, not on the last /model choice.
- /new no longer copies the current model into the new session.
- Telegram's /model and probe buttons no longer write 90-model.conf; the
switch lasts for the gateway process.
- existing .model sidecars were moved out of ~/.splinter; the stale 90-model
drop-in was moved aside earlier.
- test_engine asserts that /model leaves no sidecar and that reopening uses
test-model, not test-model-2; test_gateway asserts that no 90-model.conf is
written.
- docs: "choice lasts for this run and is not saved".
Verified with the real config: default is junction/qwen3.6-35b-judged, -m
junction/qwen3.6-35b uses qwen3.6-35b for that run, /model switches to
claude-haiku for that run and the next start is judged again.
make check: all tests passed.
The picker and the text list now say what goes on the command line:
junction/qwen3.6-35b-judged, local/qwen3.6-35b. Labels and selectors are the
same string, so there is no second format to explain.
- the core endpoint (the endpoint/model without a provider block) is called
"local" in every choice; its old name "main" is still accepted as a selector
so existing drop-ins and session files keep working.
- sp_provider_choose("local/model") resolves to the core endpoint; a configured
provider with that name wins if one exists.
- /model, /model probe and the served-model list all emit provider/model.
- the session sidecar stores provider/model (junction/qwen3.6-35b).
- the sidebar and /usage print "local" for the core endpoint.
- -m provider/model no longer produces an extra main row, and 90-model.conf
(the old global /model file) was moved aside; the config's provider wins.
- tests and docs use local/test-model and local/m.
make check: all tests passed.
`make check` created a session for every splinter invocation that did not set
HOME - the A2A and gateway scripts pass --no-config, which does not change the
session directory. The user's ~/.splinter collected hundreds of "hallo",
"fehler" and "auth ohne token" sessions; the last three in /sessions were test
noise that looked like aborted chats.
- SPLINTER_SESSION_DIR overrides the session directory (o->session_dir still
wins when a caller names one, so test_engine keeps its temp dir).
- make check exports a mktemp session dir and removes it on exit; the scripts
that inspect $D/home/.splinter point the variable there.
- docs/CONFIG documents the variable.
- the existing test sessions were moved to
~/.splinter/test-sessions-2026-11-18 (not deleted) so /sessions shows the
real conversations again.
make check: all tests passed; ~/.splinter kept 211 sessions before and after.
- lcm: the sidebar widget and /status segment show the context, the number of
compactions, messages and bytes of the last cut, and how many old tool
outputs were trimmed. The counters are the compactor's own, not an estimate.
- cost: a provider-reported USD cost (usage.cost/cost_usd) is carried through
sse/openai, the agent and the engine. /cost reports it with the cache share
and splits judged from plain turns; the notes say that an upstream judge is
not visible in the provider's usage. The status plugin and junction prefer
the reported number over list-price arithmetic.
- curses: the running turn's seconds moved from the input line to the status
bar. Notes and errors are transcript rows below the cause, never text in the
input line or the status bar; a failed backend request is a status row and is
retried by the agent. The steer prompt is only "steer> " and what was typed.
- model: /model probe works in the chat. The picker lists the configuration at
once, then asks the endpoint the session is on what it serves and adds those
models, so a router's whole menu is selectable. provider/model selectors now
apply the right provider instead of becoming a model name. The choice is
written to <session>.model and restored when that session is reopened; /new
carries the current model into the new session.
- sidebar: plugin titles are bold and underlined (this curses has no italic
attribute), with a rule between the plugin blocks.
- run/cli: a command timeout is an idle window. Every chunk on stdout or
stderr resets it, and the process is asked with waitpid(WNOHANG) whether it
is still there before the window is extended. A long build that keeps
reporting progress is no longer killed for being long; a silent hang is.
- config: ';' separates settings on one line, so
plugin lcm { keep = 6; tool_trim = 8192 } parses as two keys.
- tests: lcm widget/status counters, one-line config blocks, session model
restore and /model probe, cli idle timeout with a talkative and a silent
command, run output reset, and the UI status/retry rows.
make check: all tests passed.
Tool observations are the bulk of a long conversation. Before lcm drops any
message it now cuts every old tool output to a head and a tail with a marker
quoting its first line; the middle stays in the session log, where the recall
tool finds it. Only when that is still over budget are messages dropped, so a
conversation often keeps all its turns and only loses the middle of old
outputs.
- plugin lcm { keep = 6; tool_trim = 8192 } sets the verbatim tail and the cap
per old observation (0 turns the trim off).
- the compacted summary says when tool output was cut too.
- test_compactor: a 20 KB old observation is trimmed, nothing is dropped, and
the marker points at recall.
- docs/CONFIG and docs/PLUGINS updated; the user config uses 6/8192.
make check: all tests passed.
- a stream that carried only reasoning and then ended without an answer used to
abort with no retry: guarded_stream counted every chunk as "already
produced". Only answer text and tool calls block a retry now; the thinking
may repeat, a lost turn may not. test_agent has a stream that thinks, fails
once and answers on the second attempt.
- /compact [tokens]: runs the compactors now (default: compact_target, else
8000 tokens) and reports messages and bytes before/after.
- compact_threshold / compact_target in core (tokens): once the last request
was larger than the threshold, the next request is compacted to the target
before it is sent. 0 disables either.
- lcm gains a read tool `recall`: case-blind search in the session log for
what compaction dropped from the prompt.
- user config: compact_threshold = 32000, compact_target = 12000.
- README/CONFIG document the command, the two keys and the cache trade-off.
make check: all tests passed.
- plugins/tmux, plugins/planner and plugins/sysinfo are gone (plugin list,
Makefile rules, tests, docs). The config no longer loads them; the stale
.so files were removed from the install tree.
- plugins/tasks is plugins/processes: plugin name "processes", widget
"processes", tools process_start/process_list/process_result/process_kill.
The sidebar now lists only running work: a finished task keeps its output
in process_result but stops taking a row forever.
- the dead planner link in the delegate (link_plan_quota -> command "tasks")
is removed with the planner.
- tool call rows are no longer capitalised: "run ls -l", "read src/x.c" as
the model sent them, not "Run "/"Read ".
- tests updated (delegate panel expects no finished row, engine/UI expect the
lowercase call row, secrets/delegate use the processes plugin and tools).
- the user's config gets a Delegate/Scheduler section: the three providers
carry review/plan/docs tags and keep max_parallel=2; plugin scheduler stays
loaded so waiting jobs are retried.
make check: all tests passed.
The memory tools talked to a mem0 server (memory_url/memory_key_env), one
bucket per unix user. It is gone: no memory_add, no memory_search, no mem0
client, no config keys, no test_memory.
- delete src/backend/memory.c and memory.h; the engine no longer registers the
tools; config loses memory_url/memory_key_env; SPLINTER_MEM_KEY leaves the
secret list; docs/CONFIG, ROADMAP and GATEWAY stop mentioning it.
- the unix identity helper stays, under its real name: sp_user_name() in
src/backend/user.c (profiles, interview and the Telegram gateway used it).
- tool list is now read/search/list/write/edit/run/skill_*/... plus the MCP
session tools; nothing about memory remains.
- test_mcpsession.sh: the client socket gets a 120 s read timeout, not the
5 s connect timeout (a turn under load answered too late and looked hung).
make check: all tests passed.
- /model in the curses chat opens a picker: Up/Down, typing filters by
provider/model, Enter takes the selector, Esc cancels. The list comes from
the backend (sp_engine_models -> sp_provider_choices), not from a text
scrape; the socket has a `models` command, so --attach gets the same picker,
and the switch is still the ordinary "/model <selector>" input.
- steering: Enter during a turn now says so twice - a "steering queued: ..."
row in the transcript and "Ns steering queued (n) steer>" in the input line
until the step boundary picks it up; a rejected steer is an error entry.
- input lag: typing during a turn is echoed immediately (the input line is
redrawn per key, not at the next 100 ms frame), and the history is only
repainted when its generation changed, so a streaming turn no longer
repaints the whole transcript on every clock tick.
- sidebar: the first line of every widget is bold, like its heading, so a
plugin block has a title instead of a wall of small print.
- junction plugin: keeps every response header from /mcp, the status route and
/v1/models; the widget shows the X-Junction-* routing stats, /junction lists
all headers per source. It reads the status aliases (/status, /v1/status,
/queue, /v1/queue) and remembers the one that answered, parses queue,
endpoint p95/exhausted counts, and counts the models (/v1/models, probed on
its own slower interval because it goes upstream).
- SSE: blank lines no longer abort a pretty-printed object, a truncated tail
is dropped instead of failing the turn ("incomplete data line" is gone), and
a [DONE] with a fragment clears it.
- retries: a request that fails before anything streamed (connection, missing
status, 5xx) is tried three more times, 5 s apart; 4xx is not retried, and
after the first chunk the error is reported instead of printing the answer
twice. Ctrl-C ends a wait at once; SPLINTER_RETRY_WAIT_MS overrides the wait.
- tests: test_sse (split object across events, truncated tail), test_agent
(four 500s = four requests; two 500s then an answer), test_engine and
test_protocol (models list), test_junction (headers, aliases, models),
test_ui (/model picker), test_focus (status keys).
make check: all tests passed.
- plugins/junction: evaluates the X-Junction-Mcp header and /status; the
sidebar widget, the "junction" status segment, junction_status and
/junction show uptime, MCP-server health, queue and request counts.
The url/header come from the plugin block, the mcp junction server or
SPLINTER_JUNCTION_URL/TOKEN; the key is never printed.
- theme: two flat themes. light is a white page with black text, dark the
same inverted; chat, sidebar and input share the page, the status line is
the one separate surface. Each CDE palette keeps its own rules.
- curses: the sidebar uses the theme's own text on its own background
(white/black) instead of white on a darkened surface; the one column
between chat and sidebar is painted, so a white theme has no black seam.
- focus: the goal goes into the first prompt (config, resume, planner), and
every goal-carrying text asks the model to end with GOAL_COMPLETE. The
marker is read from the conversation and the session log and recorded as
goal_state=succeeded in the session meta; /goal and the sidebar say
[done], reminders stop, a new goal opens a new one.
- tests: test_junction (fake server, header identity, no colon in widget
continuation lines, no key in the output), test_focus (announcement,
completion in the compactor and from the tick, persisted state),
test_theme (flat themes, list order).
make check: all tests passed.
The goal lived only in the focus plugin's memory: a resume lost it and
there was no way to start the next turn from it. It is now stored in the
session's .meta (one line, 1000 bytes) and read back when the plugin sees a
new session id, so /open and a resumed process find their own goal again.
/continue reads the same sidecar and starts a turn with "Continue working
toward this goal: ...". /goal still sets it and starts the recap turn.
The sidebar was a patchwork of pairs and widgets could inherit the wrong
background. It now uses one PAIR_SIDE (white on a darkened theme
background) for every heading, label, usage row and widget; the window
gets that pair as its background, so no line paints its own surface.
New plugins/sysinfo: a widget thread samples /proc/meminfo, /proc/stat and
statvfs("/"), and publishes RAM, CPU, swap and disk with five-cell
[|||| ] gauges every two seconds. It is added to the shipped plugin list
and to the user's config.
agent.c keeps the last prompt/cache counters when a tool-call step reports
no usage. A zero there used to reset the ctx gauge in the status bar after
every tool call.
Tests: session goal survives reopen, /continue returns the prompt,
make check: all tests passed.
Three things the screen and the goal were getting wrong.
Colours. The theme had one accent for the user and grey for everything
else. theme.h now carries agent, think, tool and notice colours. A CDE
palette maps them to sets 7 (answer), 3 (reasoning), 6 (tool) and 8
(status); Xresources uses colour10/11/14/13 on dark and 2/3/6/5 on
light. Role colours keep their hue and are pushed from the surface only
when they would disappear; each role has a slightly different minimum,
so even a monochrome palette yields distinguishable steps. The 256-colour
mapping now takes the nearest cube/ramp entry instead of rounding each
channel down, which turned a dark orange into grey 240.
Usage. sp_usage_get() only counted requests inside a declared window. A
provider without limit= therefore always read "0 calls" in the sidebar,
although every call was in its log. Calls are now counted when no window
is declared; test_usage covers it.
Goal. /goal <text> set a variable and answered "goal set" without starting
a turn. The engine now starts the recap prompt: the model writes a short
recap, the focus plugin remembers that answer and injects it every seventh
turn (SPLINTER_FOCUS_EVERY still overrides). /recap is gone as a command;
its old behaviour is what /goal does now. A palette and a wiki page are
not enough to make that visible: the prompt, the confirmation entry and
the sidebar goal all show up in the chat.
Tests: palette role separation and indexed roles in test_theme, four
unlimited calls in test_usage, recap capture/injection and the missing
/recap in test_focus, and a settle delay so the UI tests type after
ui_read_line() owns the keyboard. make check: all tests passed.
The screen had no room for the numbers that say how a turn is doing, and
two older behaviours still hurt: scrolling to the top made PgDn jump back
to the top, and a catalogue's steer mark without its trailing space glued
the typed text to ">".
- draw_statusbar() in curses.c: one row above the prompt with
ctx used/max + [|||| ] gauge, cache share and tok/s. The history and
sidebar lose one row; the prompt stays the bottom row. The bar is drawn
on every idle tick, during a turn and in --attach.
- ctx: optional field on a provider (and in core) in tokens; the engine
reports it in struct sp_engine_state. SPLINTER_CTX_MAX still overrides it.
- cache: sp_reply gained tokens_cached. OpenAI reads
prompt_tokens_details.cached_tokens / prompt_cache_hit_tokens, Anthropic
reads cache_read_input_tokens and counts cache reads+writes in the prompt
total. sp_agent_stats keeps the last request's prompt and cache share;
the engine keeps the turn's output tokens for a real tok/s.
- scroll: grow scroll by the growth of maxscroll, not by the distance from
the first visible line. At the top that distance was 0, so every frame
re-added the whole scrollback and PgDn could not leave the top.
- steer mark: append the missing space if a catalogue omits it.
- protocol state carries ctx_used/ctx_max/cached/turn_tokens_out, so the
attached UI shows the same bar.
- tests: cache parsing in test_sse/test_openai/test_anthropic, ctx parsing
in test_confblock, and test_ui checks the bar, the cache share and the
PgUp-to-top/PgDn-down path.
make check: all tests passed.
load_config() copied the config's main endpoint into the command-line
options, so apply_selection() saw o->endpoint != NULL and skipped
core { default = ... }. Every config with a main endpoint (and every
/model drop-in, which wrote exactly that) silently ran the main endpoint
instead of the default; a drop-in with model = provider/model even put a
slash-name into the model field.
- The main endpoint is applied only when no -m and no default exist.
-m and a command-line --endpoint still win.
- /model saves a delegate choice as "default = ID[/MODEL]" instead of a
second main endpoint; the provider block supplies kind, endpoint and
key. A model of the main endpoint has no provider block, so that one
keeps the full endpoint/model/api_key_env form.
- docs/CONFIG.md, README and test_providers describe the order and the
new drop-in line.
Verified with a fake endpoint: core default -> mb, -m a -> ma, main-only
config -> mmain, a stale endpoint/model drop-in no longer shadows the
default, a "default = a" drop-in does.
make check: all tests passed.
Removing it went too far: the conversation area should be plain appended
text, but the sidebar carries what no line of the transcript should repeat -
agent, provider and model, what is left of the allowance, the plugin widget
lines, the session and now the directory the tools act in ("~" for $HOME,
wrapped at the slashes). A narrow terminal drops it and gives the width to
the conversation.
No status bar: the running time and the tool lead the prompt, and /usage,
/status and /widgets print the same numbers on demand.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The chat is now the whole screen and the input line the row below it: no
sidebar, no status bar. Entries are append only -- a growing answer stays in
its entry while it is the last one and continues in a new entry once a tool
line follows, so nothing that was on screen ever moves. The prompt carries
the agent name ("build> "), /widgets shows what plugins published, and
/status still prints the status segments.
The default theme is Xresources: *foreground, *background and *color0..15
from xrdb -query (or ~/.Xresources), falling back to the terminal's own
colour indices. Every CDE palette is a theme by its own name, painted the
way the desktop paints it (set 5 windows, set 4 text areas, set 6 dialogs,
set 1 active frame, set 2 inactive frame) with CDE's black-or-white rule.
"Default" is therefore the CDE Default palette again, which is what the
config asked for.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
plugin NAME { path = ... enabled = false key = value } loads the plugin
(shipped one for NAME unless path says otherwise) and hands everything else
to that plugin as its configuration, read with sp_host_plugin_config() or
walked with sp_host_plugin_config_at(). Nested blocks give dotted keys,
lists arrive comma-separated.
The mcp plugin's servers are now server ID { url | cmd | header } blocks
inside plugin mcp { }; the old top-level mcp NAME { } and the flat
plugin = path / plugins = [ ... ] forms keep loading.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A kind = cli provider now has a default model and a prefix
(provider = opencode), so -m occli/deepseek-v4.1-flash-free runs
"opencode run --model opencode/deepseek-v4.1-flash-free". {model} in cmd
marks where the model goes, otherwise --model is appended; a model that
already has a '/' is used as it is. sp_cli_command() builds the command for
-m, delegates and the cli plugin's pool fallback. Model names are limited to
letters, digits and ._:/@+- since the command goes through /bin/sh.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- kind = anthropic: the Messages API over curl, OAuth tokens (sk-ant-oat)
as Bearer with the oauth beta, tool_use/tool_result blocks.
- --doctor spends no tokens: it asks /models and the provider's own usage
route (ollama /api/balance, opencode go /v1/usage) instead of a tiny turn;
cli providers are only checked for the program. /usage shows the same
provider figures, cached for a minute.
- endpoint names the API base (https://host/v1); sp_endpoint_url() builds
chat/completions (default), messages, models and usage from it. A full
route is still accepted and cut back to the base.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The MCP client could only start one program and talk to it on a pipe; a server
behind an endpoint (junction at http://host:8090/mcp) had no way in. Now the
config names the servers and the plugin speaks whichever transport each one
offers:
- new `mcp NAME { url | cmd | header | enabled }` block (and the flat
`mcp = NAME | url=...` form), parsed into struct sp_mcpserver; an entry
without a url and without a cmd is refused with its line number
- streamable HTTP in plugins/mcp/mcp.c: one POST per JSON-RPC message, answered
with one JSON object or an SSE stream of `data:` lines - both are read,
Mcp-Session-Id is kept and echoed back, and the Authorization header travels
through curl's stdin config so the token never appears in ps
- several servers register side by side; tools are mcp_<tool> for one server
and mcp_<server>_<tool> for more, so two servers that both offer `search` do
not overwrite each other. A server that fails its handshake is reported and
skipped, the rest still load. SPLINTER_MCP_CMD stays as the one stdio server
- tests: the config and block parsers, and a socket server in test_mcpclient
that refuses the tool list without the configured header and answers the call
as an event stream
- README and docs/CONFIG.md describe both transports and where the token lives
build (all tools) and plan (read-only plus delegate/plan_task) are built in; a
markdown file with opencode-style front matter (description, model, tools,
allow, deny, autonomous) adds or replaces one. Tool policy is enforced in the
agent loop, the prompt is added to the system message, /agent and --agent.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Substring matching made 'cli' match 'client' and never matched 'gross' to 'big'.
Words now, with German/English synonyms; a private task only goes to a private
delegate; when no tag fits the config's default takes the task.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Config: { } blocks (core, telegram, provider, pool, exit) translated to the flat
reader with source line numbers; flat form still loads; delegate/plugin limits
raised. Pools: failover/balance, used by delegation (tag-safe), by -m and for
the conversation when its provider hits a limit. -m SEL picks a pool, provider,
provider/model or model name; --model-list lists them with served models.
Usage limits: the agent finds the reset and waits (UI: Ctrl-C stops, /resume
goes on; on_limit=fail turns it off).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
limit=N/window and tokens=N/window on delegates and the main provider; calls are
counted in ~/.splinter/usage/<id>.log; /usage and the status line show how full
each allowance is; choose() skips used-up providers and prefers the one with the
most left among equal matches; refused calls bench the active provider.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
/new (and /reset) opens a new session file in the same directory, drops the
conversation back to the system prompt and, in the gateway, resets the
interview/connect state so a half-finished flow does not survive the reset.
The old session file stays: it is the record of what was said. In the TUI the
history pane is cleared, because it shows the old conversation. The directory
is read before the static session struct is cleared, or the second /new would
start from an empty path.
/connect exists in the TUI now: the same four questions, one answer per line,
the same validation and presets, and connect.nodir when the run has no config
file to write to (--no-config).
conv.c grows sp_conv_reset(), which frees every message and puts the system
prompt back.
test_gateway checks /new (message and a new session file); test_ui checks
/new in the pane and the /connect guard with --no-config.
/model writes its choice to <config>.d/90-model.conf, so the next start uses
it; picking main deletes the file and the configuration speaks again. With a
plugin transport nothing is written, because that program picks the model.
/model probe asks every endpoint /v1/models and offers what it really serves
as buttons; the callback carries an index, because a GGUF path does not fit
in Telegram's 64 bytes. The TUI gets the same command: the list, or
/model <id|name>, with the same persistence.
/connect runs one tiny turn against the provider it just saved (30 s) and
says whether endpoint, model and key answer. The message with the buttons
goes out before the wait starts, so the save is visible immediately.
A2A no longer refuses binary parts: file{bytes} and raw with a non-text media
type are written to the session's inbox (0600, 8 MiB cap) and the prompt says
[file <name> at <path> (mime, n bytes)], so a text model can hand the file to
a tool. The client saves what a remote agent sends the same way
(SPLINTER_A2A_INBOX). SubscribeToTask stays refused: the task store has no
live events, and a one-shot replay would pretend to be a subscription.
Markdown gains <https://...> autolinks and images (as links, since Telegram
has no inline image without sendPhoto).
/model offers the models the configuration names -- the main endpoint,
every delegate with a model, every exit -- as inline buttons and points the
agent's transport at the one that is pressed. /model <name> keeps the
endpoint and takes another model from it. A provider whose key variable is
not exported is marked in the menu. The choice is not written: it lasts for
the session, a restart goes back to the config.
/connect asks for name, endpoint, model and key variable, validates each
answer, and writes the delegate line to <config>.d/20-connect.conf before
anything is used, so the same run has the provider and the next start loads
it. and [?2031h]10;?]11;?[>0q[?25l[s[6nP+q4d73\[?1016$p[?2027$p[?2031$p[?1004$p[?2004$p[?2026$p[?u]99;i=opentui-notifications:p=?;\]1337;Capabilities\]7501;?\[H]66;w=1; \[6n[H]66;s=2; \[6n[u[s[?1049h[?25l[>4;1m[?2004h[?1000h[?1002h[?1003h[?1006h[14t]7501;state=idle:app=opencode\[?2026h[?25l[1;1H[38;2;255;255;255m[48;2;17;28;24m [2;1H[38;2;255;255;255m[48;2;17;28;24m [3;1H[38;2;255;255;255m[48;2;17;28;24m [4;1H[38;2;255;255;255m[48;2;17;28;24m [5;1H[38;2;255;255;255m[48;2;17;28;24m [6;1H[38;2;255;255;255m[48;2;17;28;24m [7;1H[38;2;255;255;255m[48;2;17;28;24m [8;1H[38;2;255;255;255m[48;2;17;28;24m [9;1H[38;2;255;255;255m[48;2;17;28;24m [10;1H[38;2;255;255;255m[48;2;17;28;24m [11;1H[38;2;255;255;255m[48;2;17;28;24m [12;1H[38;2;255;255;255m[48;2;17;28;24m [13;1H[38;2;255;255;255m[48;2;17;28;24m [14;1H[38;2;255;255;255m[48;2;17;28;24m [15;1H[38;2;255;255;255m[48;2;17;28;24m [16;1H[38;2;255;255;255m[48;2;17;28;24m [17;1H[38;2;255;255;255m[48;2;17;28;24m [18;1H[38;2;255;255;255m[48;2;17;28;24m [19;1H[38;2;255;255;255m[48;2;17;28;24m [20;1H[38;2;255;255;255m[48;2;17;28;24m [21;1H[38;2;255;255;255m[48;2;17;28;24m [22;1H[38;2;255;255;255m[48;2;17;28;24m [23;1H[38;2;255;255;255m[48;2;17;28;24m [24;1H[38;2;255;255;255m[48;2;17;28;24m [0m]22;default\[?2026l]0;OpenCode[?2026h[?25l[7;22H[38;2;83;104;91m[48;2;17;28;24m [0m[7;42H[38;2;193;196;151m[48;2;17;28;24m[1m ▄[7;56H [0m[8;22H[38;2;83;104;91m[48;2;17;28;24m█[8;23H▀[8;24H▀[8;25H█[8;26H █[8;28H▀[8;29H▀[8;30H█[8;31H █[8;33H▀[8;34H▀[8;35H█[8;36H █[8;38H▀[8;39H▀[8;40H▄[8;41H[0m[8;42H[38;2;193;196;151m[48;2;17;28;24m[1m█[8;43H▀[8;44H▀[8;45H▀[8;46H █[8;48H▀[8;49H▀[8;50H█[8;51H █[8;53H▀[8;54H▀[8;55H█[8;56H █[8;58H▀[8;59H▀[8;60H█[8;61H[0m[9;22H[38;2;83;104;91m[48;2;17;28;24m█[9;23H[0m[9;23H[38;2;83;104;91m[48;2;34;47;41m [0m[9;25H[38;2;83;104;91m[48;2;17;28;24m█[9;26H █[9;28H[0m[9;28H[38;2;83;104;91m[48;2;34;47;41m [0m[9;30H[38;2;83;104;91m[48;2;17;28;24m█[9;31H █[9;33H[0m[9;33H[38;2;83;104;91m[48;2;34;47;41m▀[9;34H▀[9;35H▀[9;36H[0m[9;36H[38;2;83;104;91m[48;2;17;28;24m █[9;38H[0m[9;38H[38;2;83;104;91m[48;2;34;47;41m [0m[9;40H[38;2;83;104;91m[48;2;17;28;24m█[9;41H[0m[9;42H[38;2;193;196;151m[48;2;17;28;24m[1m█[9;43H[0m[9;43H[38;2;193;196;151m[48;2;61;70;56m[1m [0m[9;46H[38;2;193;196;151m[48;2;17;28;24m[1m █[9;48H[0m[9;48H[38;2;193;196;151m[48;2;61;70;56m[1m [0m[9;50H[38;2;193;196;151m[48;2;17;28;24m[1m█[9;51H █[9;53H[0m[9;53H[38;2;193;196;151m[48;2;61;70;56m[1m [0m[9;55H[38;2;193;196;151m[48;2;17;28;24m[1m█[9;56H █[9;58H[0m[9;58H[38;2;193;196;151m[48;2;61;70;56m[1m▀[9;59H▀[9;60H▀[9;61H[0m[10;22H[38;2;83;104;91m[48;2;17;28;24m▀[10;23H▀[10;24H▀[10;25H▀[10;26H █[10;28H▀[10;29H▀[10;30H▀[10;31H ▀[10;33H▀[10;34H▀[10;35H▀[10;36H ▀[10;38H[0m[10;38H[38;2;34;47;41m[48;2;17;28;24m▀[10;39H▀[10;40H[0m[10;40H[38;2;83;104;91m[48;2;17;28;24m▀[10;41H[0m[10;42H[38;2;193;196;151m[48;2;17;28;24m[1m▀[10;43H▀[10;44H▀[10;45H▀[10;46H ▀[10;48H▀[10;49H▀[10;50H▀[10;51H ▀[10;53H▀[10;54H▀[10;55H▀[10;56H ▀[10;58H▀[10;59H▀[10;60H▀[10;61H[0m[13;4H[38;2;61;74;68m[48;2;17;28;24m┃[0m[13;5H[38;2;255;255;255m[48;2;35;55;43m [0m[14;4H[38;2;61;74;68m[48;2;17;28;24m┃[0m[14;5H[38;2;255;255;255m[48;2;35;55;43m [0m[14;7H[38;2;83;104;91m[48;2;35;55;43mAsk anything…[14;20H "What is the tech stack of this project?"[0m[14;62H[38;2;255;255;255m[48;2;35;55;43m [0m[15;4H[38;2;61;74;68m[48;2;17;28;24m┃[0m[15;5H[38;2;255;255;255m[48;2;35;55;43m [0m[16;4H[38;2;61;74;68m[48;2;17;28;24m┃[0m[16;5H[38;2;255;255;255m[48;2;35;55;43m [0m[17;4H[38;2;61;74;68m[48;2;17;28;24m╹[0m[17;5H[38;2;35;55;43m[48;2;17;28;24m▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀[0m[18;4H[38;2;83;104;91m[48;2;17;28;24m~/src/splinter:main[0m[18;46H[38;2;193;196;151m[48;2;17;28;24mshift+tab [0m[18;56H[38;2;83;104;91m[48;2;17;28;24magents[0m[18;64H[38;2;193;196;151m[48;2;17;28;24mctrl+p [0m[18;71H[38;2;83;104;91m[48;2;17;28;24mcommands[0m[23;74H[38;2;83;104;91m[48;2;17;28;24m2.2.6[0m[0m]12;#c1c497[1 q[14;7H[?25h[?2026l[?2026h[?25l[13;4H[38;2;67;74;68m[48;2;17;28;24m┃[0m[14;4H[38;2;67;74;68m[48;2;17;28;24m┃[0m[15;4H[38;2;67;74;68m[48;2;17;28;24m┃[0m[16;4H[38;2;67;74;68m[48;2;17;28;24m┃[0m[16;7H[38;2;41;56;44m[48;2;35;55;43mBuild[0m[16;13H[38;2;36;56;44m[48;2;35;55;43m·[16;14H[0m[16;15H[38;2;39;59;46m[48;2;35;55;43mDeepSeek V4.1 Flash 1017[0m[16;40H[38;2;36;56;44m[48;2;35;55;43mOllama Cloud[0m[17;4H[38;2;67;74;68m[48;2;17;28;24m╹[0m[0m[14;7H[?25h[?2026l[?2026h[?25l[13;4H[38;2;82;75;68m[48;2;17;28;24m┃[0m[14;4H[38;2;82;75;68m[48;2;17;28;24m┃[0m[15;4H[38;2;82;75;68m[48;2;17;28;24m┃[0m[16;4H[38;2;82;75;68m[48;2;17;28;24m┃[0m[16;7H[38;2;58;58;46m[48;2;35;55;43mBuild[0m[16;13H[38;2;40;60;48m[48;2;35;55;43m·[16;14H[0m[16;15H[38;2;52;70;54m[48;2;35;55;43mDeepSeek V4.1 Flash 1017[0m[16;40H[38;2;40;60;48m[48;2;35;55;43mOllama Cloud[0m[17;4H[38;2;82;75;68m[48;2;17;28;24m╹[0m[0m[14;7H[?25h[?2026l[?2026h[?25l[13;4H[38;2;104;76;68m[48;2;17;28;24m┃[0m[14;4H[38;2;104;76;68m[48;2;17;28;24m┃[0m[15;4H[38;2;104;76;68m[48;2;17;28;24m┃[0m[16;4H[38;2;104;76;68m[48;2;17;28;24m┃[0m[16;7H[38;2;83;61;49m[48;2;35;55;43mBuild[0m[16;13H[38;2;46;66;54m[48;2;35;55;43m·[16;14H[0m[16;15H[38;2;70;86;67m[48;2;35;55;43mDeepSeek V4.1 Flash 1017[0m[16;40H[38;2;46;66;54m[48;2;35;55;43mOllama Cloud[0m[17;4H[38;2;104;76;68m[48;2;17;28;24m╹[0m[0m[14;7H[?25h[?2026l[?2026h[?25l[13;4H[38;2;130;77;68m[48;2;17;28;24m┃[0m[14;4H[38;2;130;77;68m[48;2;17;28;24m┃[0m[15;4H[38;2;130;77;68m[48;2;17;28;24m┃[0m[16;4H[38;2;130;77;68m[48;2;17;28;24m┃[0m[16;7H[38;2;114;65;52m[48;2;35;55;43mBuild[0m[16;13H[38;2;52;72;60m[48;2;35;55;43m·[16;14H[0m[16;15H[38;2;91;105;82m[48;2;35;55;43mDeepSeek V4.1 Flash 1017[0m[16;40H[38;2;52;72;60m[48;2;35;55;43mOllama Cloud[0m[17;4H[38;2;130;77;68m[48;2;17;28;24m╹[0m[0m[14;7H[?25h[?2026l[?2026h[?25l[13;4H[38;2;159;79;69m[48;2;17;28;24m┃[0m[14;4H[38;2;159;79;69m[48;2;17;28;24m┃[0m[15;4H[38;2;159;79;69m[48;2;17;28;24m┃[0m[16;4H[38;2;159;79;69m[48;2;17;28;24m┃[0m[16;7H[38;2;146;69;56m[48;2;35;55;43mBuild[0m[16;13H[38;2;59;80;67m[48;2;35;55;43m·[16;14H[0m[16;15H[38;2;115;126;98m[48;2;35;55;43mDeepSeek V4.1 Flash 1017[0m[16;40H[38;2;59;80;67m[48;2;35;55;43mOllama Cloud[0m[17;4H[38;2;159;79;69m[48;2;17;28;24m╹[0m[0m[14;7H[?25h[?2026l[?2026h[?25l[13;4H[38;2;199;80;69m[48;2;17;28;24m┃[0m[14;4H[38;2;199;80;69m[48;2;17;28;24m┃[0m[15;4H[38;2;199;80;69m[48;2;17;28;24m┃[0m[16;4H[38;2;199;80;69m[48;2;17;28;24m┃[0m[16;7H[38;2;191;75;61m[48;2;35;55;43mBuild[0m[16;13H[38;2;69;90;77m[48;2;35;55;43m·[16;14H[0m[16;15H[38;2;147;155;120m[48;2;35;55;43mDeepSeek V4.1 Flash 1017[0m[16;40H[38;2;69;90;77m[48;2;35;55;43mOllama Cloud[0m[17;4H[38;2;199;80;69m[48;2;17;28;24m╹[0m[0m[14;7H[?25h[?2026l[?2026h[?25l[13;4H[38;2;224;82;69m[48;2;17;28;24m┃[0m[14;4H[38;2;224;82;69m[48;2;17;28;24m┃[0m[15;4H[38;2;224;82;69m[48;2;17;28;24m┃[0m[16;4H[38;2;224;82;69m[48;2;17;28;24m┃[0m[16;7H[38;2;220;78;65m[48;2;35;55;43mBuild[0m[16;13H[38;2;75;96;83m[48;2;35;55;43m·[16;14H[0m[16;15H[38;2;168;173;134m[48;2;35;55;43mDeepSeek V4.1 Flash 1017[0m[16;40H[38;2;75;96;83m[48;2;35;55;43mOllama Cloud[0m[17;4H[38;2;224;82;69m[48;2;17;28;24m╹[0m[0m[14;7H[?25h[?2026l[?2026h[?25l[13;4H[38;2;243;82;69m[48;2;17;28;24m┃[0m[14;4H[38;2;243;82;69m[48;2;17;28;24m┃[0m[15;4H[38;2;243;82;69m[48;2;17;28;24m┃[0m[16;4H[38;2;243;82;69m[48;2;17;28;24m┃[0m[16;7H[38;2;241;81;67m[48;2;35;55;43mBuild[0m[16;13H[38;2;80;101;88m[48;2;35;55;43m·[16;14H[0m[16;15H[38;2;183;187;144m[48;2;35;55;43mDeepSeek V4.1 Flash 1017[0m[16;40H[38;2;80;101;88m[48;2;35;55;43mOllama Cloud[0m[17;4H[38;2;243;82;69m[48;2;17;28;24m╹[0m[0m[14;7H[?25h[?2026l[?2026h[?25l[13;4H[38;2;254;83;69m[48;2;17;28;24m┃[0m[14;4H[38;2;254;83;69m[48;2;17;28;24m┃[0m[15;4H[38;2;254;83;69m[48;2;17;28;24m┃[0m[16;4H[38;2;254;83;69m[48;2;17;28;24m┃[0m[16;7H[38;2;254;83;69m[48;2;35;55;43mBuild[0m[16;13H[38;2;83;104;91m[48;2;35;55;43m·[16;14H[0m[16;15H[38;2;192;195;151m[48;2;35;55;43mDeepSeek V4.1 Flash 1017[0m[16;40H[38;2;83;104;91m[48;2;35;55;43mOllama Cloud[0m[17;4H[38;2;254;83;69m[48;2;17;28;24m╹[0m[0m[14;7H[?25h[?2026l[?2026h[?25l[13;4H[38;2;255;83;69m[48;2;17;28;24m┃[0m[14;4H[38;2;255;83;69m[48;2;17;28;24m┃[0m[15;4H[38;2;255;83;69m[48;2;17;28;24m┃[0m[16;4H[38;2;255;83;69m[48;2;17;28;24m┃[0m[16;7H[38;2;255;83;69m[48;2;35;55;43mBuild[0m[16;15H[38;2;193;196;151m[48;2;35;55;43mDeepSeek V4.1 Flash 1017[0m[17;4H[38;2;255;83;69m[48;2;17;28;24m╹[0m[0m[14;7H[?25h[?2026l]7501;state=clear\[?25h[0m]22;\[>4;0m[?1003l[?1002l[?1000l[?1006l[?2004l[?1049l[?2031l]0;]12;default]112[0 q[?25h[?25h stand for their usual endpoints. The drop-in
goes next to the file that was actually read (sp_config_loaded_path), not
next to a path guessed from the environment, so --config works.
providers.c holds the list, the validation, the transport switch and the
provider identity main.c used to compute inline. test_providers covers the
list, the refusals, replacement of a line and a reload of what was written;
test_gateway presses the model button, proves the next turn goes to the new
endpoint (the test one is dead) and runs /connect to the written file.
cli_fallback = claude1, claude0 names cli delegates whose cmd and env=
take over when cli_cmd answers with its limit. The main command is
benched as "cli", a fallback under its own id, on the same bench the
delegation uses (sp_limit_parse, sp_cooldown_until, sp_cooldown_set are
now exported from libsplinter). The session key stays, so claude
resumes the same conversation under the next account. With everyone
benched the turn fails with the first reset, as WAIT_QUOTA ready_at=.
A fallback's env= goes through a 0600 file the shell sources, not a
command line. A delegate's child is benched under the delegate's id
(SPLINTER_CLI_ID), never as "cli".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A parallel child that answers with its limit benches its delegate, like
the single call, and its task is spawned again in the same slot on the
next delegate that fits - the request's tags plus the benched one's -
while the other tasks keep running. A fallback already at its
max_parallel among the running jobs is not taken. The task header says
what happened.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The cli transport keys the program's own session on SPLINTER_CLI_SESSION
(the splinter session id, plus ':<delegate>' for a delegate child):
claude gets a derived UUID, --session-id first and --resume after, with
one retry when claude disagrees; opencode gets --session ses_<derived>;
other programs can use {session} and {uuid}. Consecutive calls continue
one conversation and hit the provider cache (measured: 17.6k read, 80
written on the second call).
A delegate whose answer is a limit (429, rate/usage/weekly limit, quota)
is benched until the reset it names - claude's "resets 3am
(Europe/Lisbon)" is read through date(1) - in ~/.splinter/cooldown/<id>,
and the task goes to the next delegate that fits. choose() skips benched
delegates, also when one is asked for by name.
run_child now carries the tail of the child's output in its error and
treats a signal as failure; "exited 1" alone hid every limit.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
env=NAME=VALUE on a delegate line (repeatable) is set in the child right
before exec and beats what the parent exported, so two delegates can run
the same cli with two accounts. Remotely it goes in front as
`env 'NAME=VALUE'`, quoted like the rest. cli_env = NAME=VALUE does the
same for the main cli transport. A bad name is an error with the line.
Also in this commit, the work in progress from the tree: swarm and
provider state, the provider/scheduler/planner/tmux plugins, the ui test,
whose tmux session name is now per run so parallel runs do not collide.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Telegram gateway
- A tool call of the gateway's own turn that needed consent was either denied
(a daemon has no approval stream) or, with ack channels set, waited for an
"ok <id>" that only the blocked gateway could have read. It now asks in the
chat the turn came from, keeps reading while it waits, resolves answers
(also other processes' and 'splinter --ack'), ignores strangers and tells
everything else to wait. The update offset is shared, so nothing is handled
twice. New cfg flag approve_is_channel: such an approve is asked directly.
- send_message wrote its error through err, and half the callers pass NULL: the
first refused message (too long, bad UTF-8) crashed the gateway. It also
missed '"ok": true' by substring; the reply is parsed now.
- tests/test_gateway.sh drives the real daemon against a fake Bot API and a
fake model (tests/fake_telegram.py), with "ok" and with "no". In make check;
.gitignore no longer hides tests/test_*.sh.
Approvals
- A channel was told "Zustimmung <id>" and nothing else: a phone said yes to a
number. The message now names the tool and its arguments (cut at 300 bytes)
and how to answer, and goes to the channel as "$1", never parsed by sh.
Smaller
- ring: an exit that already streamed text is not retried on the next one
(the operator saw a second answer after half of the first); the header now
says what moves the ring - limits and providers that are down.
- cli: the program's stderr went over the curses screen and the error quoted
stdout. stderr goes to a file and into the error; temp paths are quoted;
the BODY_CAP no-op is gone. (That is the "kaputt" make check used to print.)
- memory: memory_key_env became an env var curl never reads, so no request had
a key. It is "Authorization: Token <key>" now, on curl's stdin. Tested.
- docs/CONFIG.md: the real default path, and the seven keys it did not know
(telegram_allow, memory_url, memory_key_env, skills_dir, env_delegates,
exit, delegate) with the line formats, checked against the parser.
- The no-token message named a config key that does not exist.
Left as it is, on purpose: 'read' stays unrestricted (decision); the fsync per
session line stays (durability over latency).
make check: 26 test binaries and the gateway script, green, also under
ASan/UBSan.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
~/.local/bin/splinter was a shell script that sourced ~/.hermes/.env - another
program's secrets file, which has no business being read here. It is now what
'make install PREFIX=$HOME/.local' puts there: an ELF binary with an rpath of
$ORIGIN/../lib, so it finds libsplinter.so next to itself.
No wrapper, no LD_LIBRARY_PATH, no environment file. Keys come from the
environment the user exports; a delegate names the variable, never the value.
Verified from /tmp with the wrapper and ~/.splinter/env gone:
~/.local/bin/splinter -p 'sage nur: install-ok' -> install-ok
ldd | grep 'not found' -> 0
Also in this round: environment delegates are opt-in (env_delegates), the claude
entry is named after itself instead of its array position, and the docs say how
to install without root.
The config moved to ~/.splinter/splinter.conf - next to the sessions, where the
state of this thing already lives - and every *.conf in the directory named after
it is read after it, in name order. A later file overrides an earlier one, an
unknown key is still fatal, and the error now names the file it came from.
plugins/ring is the exit ring: several ways to reach a model, walked in 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=...
Only pressure moves the ring - 429, 5xx, 'rate limit', 'quota'. A dead host or a
bad key stops the turn, because a ring that treats every failure as 'try the
next one' hides real breakage behind a random provider.
Two things had to be fixed underneath: sp_openai_transport kept its context in a
static variable, so building several transports pointed them all at the last one
(now one heap context per transport), and plugins had no way to read the config
or the registry (sp_host_config, sp_host_registry).
Measured against two fake providers: the first answers 429, the ring moves on and
the second answers 'Antwort vom zweiten Ausgang.'; a dead port does not move it
and the error stands.
Not gettext: this harness is meant to start in ten years, and gettext needs
msgfmt at build time and .mo files at runtime. So catalogues are 'key = text'
files in share/locale, read once at startup.
- language from the config key LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=, else SPLINTER_LOCALE, LC_ALL,
LC_MESSAGES, LANG; regional variants are stripped (de_DE.UTF-8 -> de);
- catalogue search: $SPLINTER_LOCALE_DIR, the executable's own directory (so
works from any cwd), the source tree, /usr/local/share;
- a missing key falls back to English, and a key that exists nowhere is shown as
itself - an empty label hides a bug, a visible key does not;
- UI labels, roles, sidebar headings, status line, command errors and the shell
escape all go through sp_t(); plugins can translate theirs the same way.
test_i18n loads both catalogues from share/locale, checks lookups, the
fallback chain, printf placeholders, and that de.msg covers every key en.msg
has - a translation that silently misses half the UI is worse than none.
Seventeen test binaries green.
The goal is not configuration: it belongs to the conversation in front of you.
So it moved out of the config file and became a command.
- commands are an ABI now: sp_host_add_command / sp_host_command, so the UI
never needs to know a plugin by name. A leading '/' is never sent to the
model; an unknown command lists what exists.
- works in both modes: '/goal <text>' in the TUI and
'splinter -p "/goal ..."' (exit 0 on success, 2 on an unknown command).
- focus registers /goal (set, show when empty of arguments) and /recap (force
a reminder into the next turn, regardless of the five-turn cadence).
Fixed while testing it: the UI only repainted on a keypress, so a plugin widget
that ticks was frozen on screen - the clock showed the time from when the window
opened. The input read now times out after 500 ms and that timeout repaints the
sidebar and status line: clock, focus and cps are alive while you do nothing.
Fifteen test binaries green; test_focus covers the command path too: set, show,
force a recap outside the cadence, refuse an unknown command.
Long conversations drift, and a model ten turns in is deep in a detail while the
reason the session exists has scrolled away. focus puts it back: on every fifth
turn it inserts one system message with the goal and asks whether the last step
was closer to it.
Details that matter and are tested:
- one reminder per turn at most, even if compaction runs twice;
- inserted BEFORE the newest user message, so the model reads goal then request
and answers the request instead of treating the goal as a reply;
- nothing at all without a goal: no goal, no noise;
- the goal comes from the operator (config key goal -> SPLINTER_FOCUS_GOAL),
never from the model, and is truncated with a marker rather than eating the
budget it is meant to protect.
The host now counts turns (sp_host_turn) so a plugin can schedule against them;
that is what makes 'every five' mean five user turns and not five requests.
Sidebar shows the goal and the reminder count. Fourteen test binaries green,
test_focus drives the counter directly: turn 1 silent, turn 2 one reminder
in the right position, a second compaction in the same turn adds none, turn 3
silent, turn 4 the second reminder.
One file, key = value, comments with '#'. /splinter/config (or
~/.config/splinter/config), overridable with SPLINTER_CONFIG or --config,
ignorable with --no-config, generatable with --init-config.
Precedence is command line, then file, then built-in default, and an unknown
key is an error with its line number - a typo that is silently ignored is a
config that lies about what it does. The example file is written and read back
by the test suite, so it cannot rot into something the parser rejects.
What it covers: endpoint, model, api_key_env, transport, cli_cmd, plugin
(repeatable), theme, autonomous, steps, max_bytes, session_dir, system_prompt.
Verified from /tmp with nothing but the word 'splinter': the chat started, the
sidebar showed the configured endpoint, theme, cps and clock widgets, and a
turn against kontron answered 'Ich bin ein grosses Sprachmodell...' with the
session written to /home/lotherk/.splinter.
Thirteen test binaries green (test_config: full file, trimming, unknown key
with line number, missing '=', missing file, example round-trip, env path).