Konrad, 24.11.: "v1 geht durch ohne irgendwas. ich will auch keine approvals
generell. ich will nur das der user mit ask nach sachen gefragt werden kann."
Removed the whole approval apparatus, not just the prompt:
- agent.c: the decision point (sp_host_gate/approve callbacks), the
pause/resume path (has_pending, pending_from, sp_agent_resume), ack_approval,
ask_operator and the ack stdin thread are gone. A tool runs; its exit status
is the observation. sp_tool_policy (allow/deny per profile) stays - that is
the operator's own configuration, not a question to the operator.
- engine.c: SP_EV_APPROVAL, sp_engine_approve, the approve_pending condition
variable and the `approval`/`approve` protocol commands are gone.
- openai_server.c: the v1 endpoint runs gw_* tools without a gate; the
autonomous flag is no longer part of sp_gateway_opts.
- a2aserver.c: INPUT_REQUIRED and the resume-by-taskId path are gone; CancelTask
stays. An A2A caller has no operator sitting in front of a prompt.
- mcpserver.c: --autonomous no longer gates mutating tools; the flag and the
config key are accepted for compatibility and documented as changing
nothing.
- telegram.c: tg_approve and the approval callback are gone; ask is the only
dialog, and /cancel inside it still ends the turn.
- front ends: protocol.c, curses.c, ui_local.c, ui_remote.c, client.c lose the
approval event and the waiting flag.
- ack.c stays: it is a plugin API (plugins/kids asks its parent through it),
not splinter's own gate. --ack is documented as such.
Tests: test_pause.c guarded the pause and now guards the opposite (a mutate and
a destructive tool run, nothing is asked). test_a2a_input.sh, test_protocol.sh,
test_ui.sh, test_agents_ui.sh, test_gateway.sh, test_gateway_openai.sh,
test_agent.c and test_mcpsession.sh were rewritten the same way;
splinter_approve must now be absent from the MCP tool list. Every rewritten
test was run red against the old behaviour where that was possible.
make check: all tests passed (428 s)
make check-asan: all 47 test binaries clean
make check-tsan: all 47 test binaries free of data races
The 900 s wait was not the defect -- a person reads and thinks. Being hard
coded was: a run with no operator attached (an older protocol client that
does not know SP_EV_ASK, a script) lost the turn for fifteen minutes and
nobody could shorten it. Measured before the change: a client that ignores
the event saw the question and then no turn for 10 s.
sp_ask_wait_s() reads $SPLINTER_ASK_TIMEOUT, then ask_timeout from the
config, then SP_ASK_WAIT_S = 900. No upper bound: how long a turn may wait
is the operator's call. Consumers: engine_ask, tg_ask.
protocol.c also dropped sp_engine_answer's return value, so an answer that
arrived after the question was gone (wait expired, turn cancelled) looked
accepted. It now reports "no question is pending", as steer already did.
Test evidence:
- tests/test_ask_timeout.sh (new, wired into make check): with
SPLINTER_ASK_TIMEOUT=3 the turn returns in 3 s with the "no answer"
observation instead of parking. Proven red against the old code (env
ignored: 5 FAILs, the client got no turn at all) and green on the fix.
- ask_timeout in the config file takes effect too: measured 3.1 s against a
running --serve, so the docs line is not a claim.
- sp_ask_wait_s() edge cases: unset/0/-5/abc -> 900, 1 -> 1, 42 -> 42,
999999999999 -> clamped.
- make check green (336 s), make check-asan and check-tsan clean (46
binaries each).
The `ask` tool asks and the answer -- or "nobody answered" -- becomes the
observation. Read class: it changes nothing on the machine, and the authority
is the operator, not a gate.
Front ends: the chat draws a dialog (options to pick, typed words still count),
the protocol carries it as an `ask` event and an `answer` command, MCP returns
it from splinter_say and resumes with splinter_answer, the Telegram gateway
sends it as a message and takes the next message from an allowed user.
What the review of the WIP found, and what this fixes:
- -p hung for the full 900 s ask wait: sp_engine_prompt installed engine_ask,
but nobody polls events on the synchronous path. cfg.ask now stays NULL
there, so the tool answers at once with "nobody can be asked here".
Measured: 3 s instead of 900 s (was rc=124 after 20 s).
- splinter_say over MCP hung the same way, because tool_say only looked at
st.waiting. It now looks at st.asking and returns the question; the client
timed out at 15 s before, and the turn was lost.
- protocol.c read the question buffer uninitialized when sp_engine_ask
returned 0.
- turn_ask answered nothing when the window could not be opened, which parked
the turn for the full wait.
- pick_run computed the list height without the question's rows, so the
highlighted row scrolled out of the window (reproduced: after nine Downs no
">" row was on the screen). pick_draw and pick_run now share pick_listtop().
- the Telegram gateway was dead for this tool: it runs its turns on a copy of
e->base, where ask was never set, so the model was told "nobody can be
asked" while the operator sat in the chat. New tg_ask, verified against a
running daemon and covered in test_gateway.sh.
- tests/test_ask_ui.sh was untracked and not in make check, so it never ran.
A2A keeps no ask channel on purpose: there an approval pauses the task into
INPUT_REQUIRED, and the ask signature cannot express a pause -- saying
"nobody can be asked" is the honest answer there.
Tests: make check green (327 s), including the new test_ask_mcp.sh and
test_ask_ui.sh, both wired into make check. test_ask_mcp.sh was verified to
fail against the unfixed code (client times out, no result written).
make check-asan: 46 binaries clean. make check-tsan: 46 binaries, no races.
`/sessions` printed a list of ids; the operator then typed the id into
/open. The list was the wrong shape for a thing you pick from, and the
foreign stores (claude, hermes, opencode) were not in it at all - their
sessions were only reachable through the model's import tool.
Now it is a picker in two steps: the sources first (`splinter` and every
foreign store that has something), then the rows of the chosen one. A
foreign row's id is "claude:<id>", which sp_engine_switch() already reads
as an import - so picking it loads and continues that session, exactly
like `/open claude:<id>` typed by hand.
The picker got one shared implementation while it was open: pick_run()
with a value/label list, a configurable title and two hint lines. /model
and /sessions draw the same way now instead of two copies that could
diverge on Esc, resize and the filter. One window is held across both
steps, so a quick double Esc leaves; with a window per step the second Esc
landed in a window that was already gone and the picker stayed open.
Over the socket the same two steps exist: `{"cmd":"sources"}` and
`{"cmd":"sessions","source":"NAME"}`.
Tested: make check, all suites green (test_engine, test_protocol,
test_ui against a real tmux pane, 229 i18n keys in three catalogues).
/learn is an engine command like /self-check, so it works in the TUI, in
-p and over the socket. Without an argument it hands the model this
folder's session list (newest first, with the recap line of each) and the
path of the conversation files, so it can read a session page by page with
read instead of firing dozens of session_search snippets. With an argument
it learns about that topic and the session list is context, not the task.
The prompt names the write tools the engine really has ('one ending in
skill_create, memory_add, page_write, task_create...'), taken from the
registry, because a live run showed the model hunting 'which memoryd' for
tools it was never given. When no write tool is registered it says so and
asks for a suggestion in the answer instead of inventing a call.
Proof: tests/test_engine covers both branches (no argument names a
session of the folder and a registered write tool; a missing write tool
is named as missing). 'make check' passes. Live against junction/beam-free
the model went from '54 session_search snippets, no write' to reading the
session file with read; the run stopped at my 900s timeout, no writes yet
- the prompt hint is in, the end-to-end write is still unproven.
The engine's note callback pushes onto the screen event queue. A gateway has
no screen, so the queue was never read: five corrected tries five seconds
apart were twenty-five seconds of silence in Telegram, and the operator saw
nothing until the turn finally answered.
The gateway now installs its own note callback and sends the line into the
chat the turn came from. It is safe on the polling thread because the turn
runs there itself, not on a worker.
The two lines a broken call leaves behind were hardcoded English while the
transport retry was already translated; both keys are now in en/de/pt_BR.
Tests: test_gateway sends "kaputt", the fake answers with a tool call whose
arguments are not JSON, and the chat must carry
"kaputter Tool-Call, neuer Versuch in 0 s (1/5)" and still end with "fertig".
Counter-check: with the engine's own note restored the same run says
"FAIL a broken call is announced in the chat". make check green (273 s),
check_asan green over 45 binaries.
`--serve` holds one engine, so one client talks to it at a time - that part is
deliberate. What was not: the second client connected into the listen backlog
and then waited for a greeting that could not come until the first one left.
splinterctl printed nothing and hung; --attach gave up 10 s later with "no
greeting from the backend", which names the wrong cause.
The accept is non-blocking now and a client that arrives while the engine is
taken is answered at once: an error event with the reason, then a shutdown of
the write side. That reads on the other end as "another client is attached:
one conversation runs one turn at a time". Descriptors are drained before the
close, or the RST would eat the message the client has not read yet.
Two smaller ones on the same path:
- --attach reconnects on a broken connection; it now carries the server's error
text through instead of replacing it with "no greeting".
- a client that reads nothing is not waited for forever: a greeting timeout
turns a silent server into a message instead of a hang.
The hint under interview.q.never read "e.g. no commits without a request".
Every new profile was nudged to carry the old rule that 2026-11-22 replaced:
finished, tested work is committed and pushed without being asked. The
example now names something that stays true ("never write to /home/carol,
no secrets in logs") instead of a rule that was retired.
sp_engine_input answered ui.command_busy for every command while a turn
ran, and /compact was one of them. That is the worst moment to refuse it:
a turn is what makes you look at the context size. Measured on a session
whose operator had typed /compact three times against a 253 KB request
and never saw it run - the refusal reads as "already done" and nobody
repeats the line once the turn is over.
The conversation belongs to the turn worker, so compacting inline would
race its appends. Keep the token target instead and apply it in
turn_thread after the pending model switch, before the engine goes idle;
a foreign turn (the Telegram daemon's) gets the same at
sp_engine_turn_end. The new keys ui.compact_nohost and
ui.compact_pending are in the .msg sources, which is what catalogs.c is
generated from.
tests/test_engine.c runs a real turn and types /compact while it runs;
without the turn-end call it fails at `applied`.
Compaction drops most of a session out of the window, and the only way back
to it was a substring search. That answers "where does this word stand",
not "what did we say about this".
history_search is the second question: every message the session ever wrote
gets a vector, and the model asks by meaning. Three rules shaped it.
It works with no model. The default is a local encoder - the hashing trick
over words, word bigrams and character 4-grams, 256 dimensions, pure CPU -
so remembering does not stop when an API key expires. `embed = openai`
points it at a real embedding model instead. The index records which one
built it: a vector from one space compared against another is noise that
looks like a result.
It never costs the turn. Embedding runs on its own thread; the turn only
says "this session grew" (sp_embed_note_compaction, called from the
compaction event) and goes on. An index that lags is reported as lagging.
It indexes the session file, not the conversation. The conversation is what
is left after the last compaction; the file is everything that was said.
"Before compaction" is not a snapshot to take, it is the file - and the
index stores the byte offset it reached, so the update is incremental for
free. It is derived data, append-only at <session dir>/emb/<id>.emb, and
losing it costs a rebuild, never history.
/status gains a row for it (index: N messages, lags by M).
--interview opened the chat and then waited: the system prompt told the model
to interview the operator, but nobody sent a turn. The UI now sends the same
kickoff the Telegram daemon sends, and with piped input --interview runs that
one turn instead of waiting for a profile.
The default theme is the flat light one, and the language is English unless a
config or SPLINTER_LOCALE says otherwise - the desktop's LANG no longer
decides what the tool speaks.
The command menu now carries /status and /menu; /model was already there. The
inline keyboard under /menu, /status, /help and /start has Status, Model, New
and Help. Status shows the TUI's facts (session, model, endpoint, agent,
tokens, steps, limits, compaction, meter); Model opens the provider picker,
which now has a Status button back. The bot menu button is forced to the
command list, so the commands show even if an older bot had another button.
The live config lists the local models (main/checked, plain, bench35, bench4b,
bench9b) so /model has more than one button; the last two need their
containers running.
tests/test_gateway.sh: /status, the /menu callback, the buttons and the
command list. tests/fake_telegram.py: the status callback and
setChatMenuButton. make check: all tests passed. check-asan: 41/41 clean.
One session line is one JSON object, and an observation can be tens of KiB.
recall read with an 8 KiB fgets, so a match in the middle came back without its
context and a long hit was printed in full. getline now reads the line whole; a
hit shows 1200 bytes of head and 400 of tail with the cut size, and the whole
answer stops at 12 KB. test_compactor drives it: with the cap raised it fails on
both the marker and the bound, with the cap it passes.
The i18n checker listed 18 keys nothing uses (the interview/plan/model
leftovers). They are gone from all three catalogues; catalogs.c is regenerated
from them by the build.
check_i18n: ok. make check: all tests passed. make check-asan: all 39 clean.
Everything that was uncommitted in the shared tree, in one commit because the
changes are interleaved across the same files (lcm, engine, frontend, locales).
lcm: a continuation prompt is not the task. After /resume the newest user
message is "Continue with the task ...", and pinning it kept the keystroke
while the question it continues was cut away -- measured: a resumed session
woke up with the prompt, one tool call and its error, and no task at all. The
pin now skips the harness's own continuation prompts, so the real question is
pinned again. test_compactor drives it: with the skip disabled the task is
lost (red), with it the task comes back after the summary (green).
engine: /self-check and the exact tool-argument parse are in a1794fb; this
commit carries the tests for them (a failed tool observation must appear in
the self-check prompt; mcp_parse_exact rejects two objects in one string) and
the i18n keys the new code uses: cmd.script.*, main.no_profile, tg.busy,
tg.interview.running, ui.agent_busy in all three catalogues.
The rest is the in-flight work from the shared session: engine/frontend,
plugins, telegram/a2a, and their tests.
make check: all tests passed; check_i18n ok, 204 keys in 3 catalogues.
/self-check (and /selfcheck) takes the last three turns of the conversation,
every failed tool result in them and the last turn's error, and starts a turn
with them: something went wrong, check yourself instead of asking the
operator, name the cause and continue. Messages are capped per message and in
total, oldest dropped first; it is refused mid-turn like /compact and is in
the completion list.
mcp_parse() stops at the closing brace, so a tool-call argument string holding
two objects parsed as the first one and the second command disappeared without
a word -- measured in sess-1795032073, where "cat a" ran and "cat b" was
silently dropped. mcp_parse_exact() requires the whole text to be the one
value; the agent's tool-argument validation uses it, so such a reply is
retried and then fails with "model sent malformed tool arguments" instead of
running half the command.
test_engine drives both spellings and the included turn; test_agent drives the
joined-argument reply (three requests, zero tool calls). test_engine and
test_agent pass; the build is -Wall -Wextra -Werror clean.
/model and the other slash commands are not messages to the model. In steer
mode a line starting with '/' or '!' now goes to the engine instead of
steer():
- /model opens the picker at once. A selector chosen while a turn runs is
remembered and applied between requests (tool_end) or at the end of the
turn, because replacing the transport under a live curl frees the context
the request is reading. The note says the switch follows the request.
- /status, /cost, /usage, /sessions and ! answer immediately.
- /new, /reset, /compact, /agent, /connect say "not while a turn runs" and
are not sent to the model; /open says the same.
- only a command that produces a prompt (e.g. /continue) is handed to steer().
The protocol input command allows slash commands while busy (plain text still
gets "a turn is running"), so --attach behaves the same.
The picker showed a phantom "main" provider with -m provider/model: the
selected endpoint was copied into the config as main. It is only main when no
configured provider owns it, so the row is now "junction qwen3.6-35b-judged".
The stale ~/.splinter/splinter.conf.d/90-model.conf from the old global /model
was moved aside; it was the other source of that "main" row.
The mcp widget names every server and its state - "junction connected",
"files disconnected" - instead of counting tools.
make check: all tests passed.
- 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.
The six-question form is gone. `splinter --interview` now opens the chat with an
interview system prompt: get to know the person, one question at a time, then
write a compact summary and end with INTERVIEW_COMPLETE.
- the marker is captured in the engine's turn thread and in the synchronous -p
path: the summary before it is written to ~/.splinter/USER.txt (0600), the
marker is stripped from the answer and the conversation, and a "interview
saved to USER.txt" note goes into the transcript. An installation from before
USER.txt keeps working: profile/<user>.md is the fallback until the first new
interview.
- the USER.txt text is appended to the system prompt of every later session
(plain "What you know about the user" block), including after /new and an
agent switch (it rides in base_prompt).
- --interview is a chat mode with the interview prompt and no agent profiles;
it needs a provider like any chat.
- Telegram: /interview swaps the system prompt, starts the conversation and
restores the normal prompt once the summary is captured. The initial turn and
every later reply are checked, so a model that summarizes immediately also
works.
- test_interview.sh now proves capture, marker-free USER.txt and the summary in
the next request; test_gateway drives /interview and the fake model answers
with the marker when the interview prompt is in the request.
- docs (README, PLUGINS) describe the new flow.
make check: all tests passed.
- plugins/self: what the session costs the machine - RSS, CPU, threads, fds
and io of the process itself from /proc/self/*, and the same (count, RSS,
CPU) for every process whose parent chain reaches it: run calls, MCP
children, delegates. Widget, /self and the session_usage tool; interval in
the plugin block (default 2 s).
- MCP server: the session tools. splinter_sessions, splinter_state,
splinter_models, splinter_agents, splinter_history, splinter_say,
splinter_open, splinter_model, splinter_agent, splinter_steer,
splinter_cancel, splinter_approve. Say starts a real turn and returns the
answer; a turn parked on an approval returns the question instead of
failing. Mutating tools obey --autonomous. `--daemon --mcp-server-listen`
runs the MCP server on a thread beside the Telegram daemon.
- the MCP server asks the engine for its registry on every call (a session
switch replaces it) and copies the tool name out of the parsed JSON before
freeing it (the first version compared a dangling pointer and answered
every session call with empty text).
- junction: "serving <endpoint>" - streaming answers carry no
X-Junction-Endpoint, so the plugin compares the route targets' ok counters
from /status between samples and names the one that grew, with its
last_ms. The header is still used when present (non-streaming). The
X-Junction-Endpoint of the plugin's own /v1/models probe remains a probe
fact in /junction only.
- transport: X-Junction-Endpoint is parsed from the response headers in both
the streaming and the non-streaming path and published through
sp_host_served_by(); sp_reply carries served_by.
- the curl rate guard (--speed-limit/--speed-time) is gone: it cut slow
router streams with "Less than 1 bytes/sec" even while keepalives arrived.
The overall -m timeout stays.
- focus: the sidebar shows "recap N, every M turns", and an applied recap
writes "recap applied (turn N, every M turns)" into the transcript (host
status messages are now drained during a turn; protocol clients get them
as entry events too). The initial goal announcement says so as well.
- tests: test_self, test_mcpsession.sh (real socket), test_focus status
messages, test_junction serving placeholder.
make check: all tests passed.
The session showed the last error as "retry 1/3 in 5000ms: openai: stream
ended with no answer" with nothing on screen: the turn looked hung for the
five seconds, then either answered or failed. The retry itself was fine; the
operator could not see it.
- sp_agent_config gains note()/note_ctx: a status line for the operator, ""
clears it. The engine turns it into SP_EV_NOTE, so curses shows it in the
steer line and protocol clients get the note event.
- agent_request() emits "retrying in N s: <reason>" before sleeping and clears
it when the attempt answers or the retries are exhausted.
- i18n ui.retry_note in en/de/pt_BR; README says the wait is visible.
- test_agent: the note callback must have seen "retrying in" on the recovery
case.
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.
A command that talks to the network (/connect, /model probe, a plugin
command, a commands/ program) ran on the UI thread: the prompt froze until
it returned. ui_command_run() now runs be->input on its own thread while
the screen keeps reading keys. One next line can be queued and is processed
when the command ends; Ctrl-C clears the edit, Ctrl-D quits. The worker
never touches curses, and the backend is not polled while it runs.
Widget text may now have continuation lines without "name:": they are
rendered under the widget above. sysinfo uses that for one metric per row
instead of wrapping "RAM ... CPU ..." into the same paragraph. A blank row
stays between widgets, not between their rows.
The Ctrl-C UI test looks for the active steer prompt; "working" is replaced
by it on the first 100 ms tick.
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.
- .meta carries a title: the first user line is stored once, /rename
[ID] TITLE replaces it. Reopening preserves the title and the original
creation time.
- /sessions shows the title, locally and over the link; the protocol's
sessions event carries it. Old sessions without a stored title fall back
to their first user line when listed.
- /rm ID removes a session that is not open: JSONL, meta, saved agent
profile and logs/<id>; the open session is refused, /rm last resolves
the newest.
- tests: test_session (auto title, explicit title survives reopen, old-log
fallback, recursive removal), test_protocol (title, rename, rm, errors),
test_ui (title, rename, rm). make check green.
- sp_engine_switch(): close the old engine and open the chosen session from
the same options; if the new one fails, reopen the session the engine was
on. The protocol's open and the in-process /open both use it. The curses
screen clears the pane and replays the new history, so /open no longer says
it needs --attach.
- gateway: temperature, top_p and max_tokens (max_completion_tokens) are
forwarded to the provider instead of dropped; request bodies may be
Transfer-Encoding: chunked; a mixed reply runs the gw_ calls, returns the
caller's calls in tool_calls and puts the local observations in content
(also in the SSE delta), so the caller can echo them back.
- reconnect: when the remembered session is gone, the screen says which one
and stays on the session the server has instead of silently swapping the
transcript.
- ring: the exits' transports are disposed on plugin shutdown.
- /status goes through the catalogues like the rest of the UI (the English
labels and their alignment are unchanged, so existing parsers still work).
- the man page passes mandoc -Tlint and covers the gateway and /open.
Tests: test_ui.sh covers local /sessions and /open (new, back, history),
test_protocol.sh the shared switch, test_reconnect.sh a vanished session,
test_gateway_openai.sh forwarded parameters, a chunked body and the mixed
reply in JSON and SSE. make check green.
- --openai-listen: an OpenAI-compatible /v1/chat/completions and /v1/models.
The model gets splinter's local tools as gw_* (executed here) and the
caller's tools under their own names (returned as tool_calls to run there).
Local calls loop inside one request; a mixed reply runs the local calls and
asks again. --autonomous gates mutation; beyond loopback a bearer token is
required; stream:true answers with SSE.
- --serve keeps several sessions: sessions/open over the protocol and
/sessions, /open in the attach screen. The server owns the engines, closes
the old one before opening the next (plugins keep globals) and sends
state/history after every switch. Session ids are unique per process, so two
engines in the same second no longer share a file.
- --attach reconnects: when the server goes away the screen keeps running,
retries every second, asks for its session by id and restores the
transcript; a missing session falls back to the server's current one.
- transports own their context now: provider switches and close dispose it
(a switch used to leak one per change). The idle screen repaints entries it
drains, so a reconnect note is not invisible.
- docs/GATEWAY.md; PROTOCOL, FRONTENDS, README and the manual page describe
the three; tests cover the gateway tools, sessions/open and a server
restart under --attach.
The harness was two halves that could not see each other: main.c built the
agent, ui.c ran it -- with the curses thread model, the approval condition
variable, the slash commands and the provider switching inside the drawing
code. A second front end had to copy all of it.
Now:
src/backend/ engine.c owns the session, the turn thread, the event queue
and every command; agent, transports, tools, session, config,
providers, plugins and the protocol servers move here.
src/frontend/ curses.c draws and reads keys through ui_backend.h;
ui_local.c is the engine in this process, ui_remote.c is a
served engine behind a socket. protocol.c serves the engine
as JSON lines (protocol 2: history, approvals, steering);
client.c is splinterctl, the reference client.
splinter --serve / --attach: the same screen runs as a client of a served
engine, so the socket carries everything the front end needs. docs/PROTOCOL.md
and docs/FRONTENDS.md describe the contract; docs/proto-example.py is a
60-line client. tests/test_engine, test_protocol and test_attach cover the
event order, the socket and the attach mode.
Review fixes in the same tree: dynamic line buffers (9 KB prompts and 8 KB
events were truncated), a turn event no longer ends the busy window (steer
leftovers), the screen finalises every turn, /new keeps the profile, reopens
the log and gets unique ids, the profile is remembered in <session>.agent so
--resume comes back in it, agent statistics are a locked snapshot (no data
race), !shell keeps 64 KiB with a marker, the socket probes for a live server,
compares its inode and sets CLOEXEC/SNDTIMEO, exit 2 means configuration,
BSD peer checks use getpeereid, and the i18n checker scans the new
subdirectories again.
Includes the parallel session's SSE fix: the parser reports what a line
produced, so a tool name no longer lands in the answer ("readread").
Three places named the tool call and none of them said what it was.
The prompt line while a turn ran read "12s run {"command": "sleep 4; echo x"}":
the model's own encoding, cut at forty bytes in the middle of an escape, pushed
into the steer prompt. It is now "12s Run sleep 4; echo x", and the call gives
way when the row is narrow - never the steer prompt, which is the one hint the
row exists for.
The approval question read "run run (destructive) {"command": ...}? y/N" - the
verb twice (the catalogue's "run" and the tool's name) and the raw arguments in
it. It is now "Run touch /tmp/x (destructive)? y/N", the same words as the
transcript row, then how far the call reaches.
In the transcript every row was dim and said "Run" again, so a run of shell
calls was a grey column of the same word. The call row is now painted in the
accent colour, its output stays dim, and the row shows the verb and the one
argument that matters - command, path, pattern, query, url - read out of the
argument object with mcp_parse instead of off the front of the pretty text: the
model orders its arguments as it likes, and a write carries the whole file
content next to the path. A call that answered with nothing but
"[exit status 0]" keeps that on its own row instead of a second block.
An observation keeps sixteen rows and 4 KiB, whichever comes first, with the
number of lines left out: a row limit alone let one enormous line through, a
byte limit alone let fifty short lines cover the screen. The log keeps all of
it. In the sidebar the last-turn line clipped to "3 " in a narrow column; it
gets two rows now.
tests/test_ui.sh holds the question to it: shows "Write ", not_shows
'{"path"', and after the run ">> Write ".
Three things were missing or doubled.
The reasoning is no longer cut to ten lines: it is shown as it comes.
A tool's observation was only ever shown when it carried a diff, and then as a
separate "diff" entry - so the output of a `run` was invisible in the chat
while the session log had it. Now every observation is an entry of its own
(role "observation"), capped at 4 KiB with the number of lines left out: a
300 KB JSON dump must not bury the conversation, and the log keeps all of it.
The separate diff queue is gone, which is also what printed a diff twice.
The session log had holes: the user's words were not logged at all, and the
reasoning only for the last step of a turn. Both are written now, and a step
that only called tools no longer leaves an empty "reply" record. The chat and
session.log carry the same records; the log has the full observation where
the screen keeps its head.
The call line keeps one readable line of arguments (200 chars, "..." after
that); the log has the whole argument.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
draw_history rebuilt every entry from scratch on every keystroke and every
100 ms tick: table formatting, markdown stripping, two mallocs and the wrap,
for up to 512 entries. Each entry now keeps its wrapped lines and its width,
and only the entry whose text changed is laid out again. A frame costs the
visible lines, not the log.
Tool calls are queued as events on the turn thread (reasoning, text of the
step, the call, notes) and drained in order into real entries with the role
"tool". Before, they were pasted into the reasoning text as "> name args",
which made them uncountable and kept two copies of the same text; the answer
text of all steps of a turn also ran together in one buffer, so the text
before and after a call was one line. The transcript is now
~ denkt: ... reasoning
<m> teil eins text before the call
<werkzeug> run the call
<m> nach dem ... text after it
Also: the "N more lines" marker goes through the catalogues, the dead
reserve parameter is gone, and the day-change marker lives in the UI state
instead of a static inside add_entry.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
Two daemons poll getUpdates and race: one reads the update, the other never
sees it, so a message is answered by nobody or twice. The gateway now holds
flock on <session_dir>/gateway.pid and a second start says who has it.
Removing the sidebar left 12 catalogue keys nobody reads (sidebar.*,
widget.*, status.title, ui.running); they are gone from all three
catalogues and test_i18n checks keys that still exist.
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>
- 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>
- openai transport sends x-opencode-session (opencode-go refused every request
without it) and a splinter user agent
- the message catalogues are compiled in: an installed binary no longer shows
raw keys (ui.ready ...); LANG=de_DE now selects German (lang was emptied by an
overlapping snprintf), pt_BR is matched
- sidebar rewritten (agent, provider/model, usage, goal/plan, last turn);
idle widgets say nothing; status line shows only what matters
- tool calls shown readable instead of JSON with \u escapes
- providers without their key variable are skipped by pools and refused by -m
with a clear message; --doctor checks every 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.
No German question texts in interview.c: the question table holds
catalogue keys, the prompt/hint/save API uses sp_t, and the intro,
profile header, skipped marker, written line and errors are translated
too. The profile section keys stay stable English schema names. The
CLI and the Telegram /interview read the same entries, so the default
English process asks English questions.
reply.empty replaces the hardcoded '(leer)' in the gateway. de/en/pt
entries added; check_i18n passes with 97 keys.
The same questions as splinter --interview, one message per answer;
/skip skips one and /cancel stops. The answers go through the shared
profile writer (sp_interview_save), so the file is the same as the
terminal path. The menu registers /interview next to start and help.
interview.c grows count/prompt/hint/save; the CLI uses the same API, so
the questions live in one place. The README said seven questions, the
array has six; fixed.
test_gateway.sh answers all six questions through the fake Bot API and
checks the written profile.
setMyCommands is built at startup from /start, /help, every command a
loaded plugin registers and every program in ~/.splinter/commands whose
name is a valid Telegram command. /start and /help list the same live
set in the chat; a name Telegram cannot take (a dot, upper case, over 32
characters) stays usable in the chat but cannot appear in the menu.
The live bot now shows start, help, goal, recap and the local uptime
script; loading another plugin adds its command without editing the
gateway. test_gateway.sh loads focus and a command script and checks
that both reach the menu.
The gateway registers /start, /help, /goal, /recap and /tasks with
setMyCommands, so Telegram's menu button lists them; /start and /help
answer with the short help text. Descriptions come from the catalogue.
An approval is sent with an inline keyboard now. A callback_query from
an allowed user resolves the ack, answers the button, removes the
keyboard and confirms in the chat; the text form ok <id> / no <id> still
works. tests/fake_telegram.py logs the menu and the markup and drives a
stranger callback (ignored) plus the real one; test_gateway.sh checks
both.
The real round trip is proven: request 548769685 was answered in
Telegram and the write ran. The installed ~/.splinter/bin/tg-ask was a
stale copy without the token path and was replaced by tools/tg-ask.sh.
fake_telegram.py also keeps the markdown-table branch that test_ui.sh
needs.
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>
A mutate tool that says 'wrote 23 bytes' tells the operator nothing. write and
edit now put a one-hunk diff into the observation - common prefix and suffix as
context - so the model sees what it did and the transcript shows it as its own
'anderung:' entry.
One hunk, not a general diff algorithm: a tool changes one place, and the point
is to see which. Verified against kontron: asking for an edit produced
@@ -1,2 +1,2 @@
zeile eins
-zeile zwei
+zeile zwei geaendert
and the file on disk really was changed.
The harness had echo, run and clock - a chat with a shell. A coding agent needs
to look at a file, change one, find something, list a directory:
read (read) numbered lines, offset/limit, refuses binary, says where it
stopped
search (read) literal search over a tree, capped at 100 hits
list (read) a directory
write (mutate) up to 4 MiB
edit (mutate) exactly one occurrence; a non-unique 'old' is an error
run (destructive, already there)
Approval was dead code in the chat: ask_operator() read stdin, which a curses
program cannot do without eating its own keystrokes, so with --autonomous off
every mutate tool was silently denied ('fail closed'). The agent now asks through
a callback; the UI puts the question in the prompt line and parks the turn
thread on a condition variable until y or n arrives.
Measured against kontron: prompt appeared 6 s into the turn, 'y' ran the tool and
the answer carried its output; 'n' left the target file absent and the model saw
'error: denied by operator'.
test_builtin covers the refusals, not just the happy path: ambiguous edit writes
nothing, binary read reports instead of spraying, missing arguments say what is
required. README no longer claims there is no tool-call parser and no compaction.
The last literals were the prompt ("> "), the millisecond format and the
placeholder for a missing session id. They are keys now.
More important than those three: the gate was too weak. check_i18n only proved
that keys used in the code exist in the catalogues - a literal drawn straight
into a curses window passed unseen, which is how 'du' or 'denkt' could have
been hardcoded without anyone noticing. It now scans the drawing calls
(mvwaddstr, mvwaddnstr, mvwprintw, waddstr, wprintw, winsstr) and fails on any
literal argument, and it checks that every role passed to add_entry() is one of
the known identifiers that have a role.<name> label.
Proven red before trusting it: with a literal prompt and a role 'benutzer'
injected, the gate reported both and returned 1; restored, it passes. The gate
also runs in make check now - it had been added to a target that no longer
existed.
Four things, three of them reported by the operator.
1. Rows are counted from the real line structure. The old arithmetic
(strlen/cols) assumed one long line; a model's reasoning is full of '\n', so
the true height was far larger than the estimate and the text painted over
the answer below it - 'it just goes anywhere on the screen'. text_rows() and
row_offset() split on newlines first, then wrap. entry_lines() now measures
the string that is actually drawn ('role: text'), which also fixes the last
character of an entry being cut off (a truncated code fence).
2. Tool calls are visible: the agent's tool_begin hook fires before each call,
the UI drains the list under its lock and writes 'werkzeug: run
{"command":"echo a"}' into the transcript; the one at the top of the live
area shows the call while it runs. The reasoning entry is inserted before
those lines, so the transcript reads du, denkt, werkzeug, modell.
3. The chat pane has a black background, and the status line sits between the
pane and the prompt, the way Hermes shows it.
4. i18n is complete: every remaining literal in ui.c, main.c and the plugins
goes through the catalogue, including widget texts and format strings.
sp_td() carries a compiled-in English default, so a missing catalogue can
never drop a printf placeholder. tools/check_i18n.py runs in make check and
fails when a key used in the code is missing from any catalogue, or when a
catalogue key is used nowhere.
Seventeen test binaries green.