cc2fcb5d346ec727780aaf0aa22fbbd615c6ca53
15
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
cc2fcb5d34 |
www: hand-written site, drop the generator, no private values in docs
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> |
||
|
|
5de70f5dbb |
gateway, ui: /new starts a fresh conversation; /connect in the TUI
/new (and /reset) opens a new session file in the same directory, drops the conversation back to the system prompt and, in the gateway, resets the interview/connect state so a half-finished flow does not survive the reset. The old session file stays: it is the record of what was said. In the TUI the history pane is cleared, because it shows the old conversation. The directory is read before the static session struct is cleared, or the second /new would start from an empty path. /connect exists in the TUI now: the same four questions, one answer per line, the same validation and presets, and connect.nodir when the run has no config file to write to (--no-config). conv.c grows sp_conv_reset(), which frees every message and puts the system prompt back. test_gateway checks /new (message and a new session file); test_ui checks /new in the pane and the /connect guard with --no-config. |
||
|
|
cc9747b1a7 |
model choice sticks, endpoints are probed, connect is tested, A2A takes files
/model writes its choice to <config>.d/90-model.conf, so the next start uses
it; picking main deletes the file and the configuration speaks again. With a
plugin transport nothing is written, because that program picks the model.
/model probe asks every endpoint /v1/models and offers what it really serves
as buttons; the callback carries an index, because a GGUF path does not fit
in Telegram's 64 bytes. The TUI gets the same command: the list, or
/model <id|name>, with the same persistence.
/connect runs one tiny turn against the provider it just saved (30 s) and
says whether endpoint, model and key answer. The message with the buttons
goes out before the wait starts, so the save is visible immediately.
A2A no longer refuses binary parts: file{bytes} and raw with a non-text media
type are written to the session's inbox (0600, 8 MiB cap) and the prompt says
[file <name> at <path> (mime, n bytes)], so a text model can hand the file to
a tool. The client saves what a remote agent sends the same way
(SPLINTER_A2A_INBOX). SubscribeToTask stays refused: the task store has no
live events, and a one-shot replay would pretend to be a subscription.
Markdown gains <https://...> autolinks and images (as links, since Telegram
has no inline image without sendPhoto).
|
||
|
|
7ce8e6b96c |
gateway: /model switches models, /connect adds a provider
/model offers the models the configuration names -- the main endpoint, every delegate with a model, every exit -- as inline buttons and points the agent's transport at the one that is pressed. /model <name> keeps the endpoint and takes another model from it. A provider whose key variable is not exported is marked in the menu. The choice is not written: it lasts for the session, a restart goes back to the config. /connect asks for name, endpoint, model and key variable, validates each answer, and writes the delegate line to <config>.d/20-connect.conf before anything is used, so the same run has the provider and the next start loads it. and [?2031h]10;?]11;?[>0q[?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. |
||
|
|
808039cd58 |
cli: the main transport falls back at the limit, too
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> |
||
|
|
ca8cdb6d13 |
delegate_parallel: a task at the limit moves to the next delegate
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> |
||
|
|
60475016ae |
cli: one session per splinter session; delegates: bench at the limit, fall back
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>
|
||
|
|
75d8beeaa4 |
delegates and cli_env: hardcoded environment per cli program; swarm, provider, planner, scheduler, tmux
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> |
||
|
|
25a616a87f |
review fixes, third round: the gateway asks in its chat, approvals say what
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> |
||
|
|
b25719f31a |
install: a program, not a wrapper
~/.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. |
||
|
|
04420d9f8d |
splinter: exit ring, config next to the sessions, drop-ins
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. |
||
|
|
9ce0395876 |
splinter: i18n with plain catalogues, German and English
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. |
||
|
|
8fa3e9d7bb |
splinter: /goal as a command, and widgets that are actually alive
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. |
||
|
|
5453b0a85a |
splinter: focus plugin - the goal every five turns
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. |
||
|
|
68861460df |
splinter: a config file, so 'splinter' alone starts the chat
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). |