splinter: kid mode enforces the day, and the site speaks Portuguese
The daily budget was advisory: the gate refused tools and a system message asked the model to close the day, but a chatty model answered anyway. So the core grew a turn gate - a plugin can now refuse the whole turn before the model is called: Fuer heute ist Schluss: 60 von 30 Minuten sind verbraucht. Morgen geht es weiter. That sentence comes from the plugin, not from a model that was asked to obey. No model call, no tokens, no way around it by talking. Also fixed: one-shot mode printed only a newline when the transport streamed nothing (a turn blocked before the stream), so the answer vanished. It is printed when no bytes were streamed. Website: third language, index.pt.html, generated from the same source; the language bar on all three pages links all three. check_i18n now sees 51 keys in three catalogues.
This commit is contained in:
1 parent
f3174c0296
commit
c0ec7bacd4
8 files changed
+313
-7
No files matched your search
@@ -77,6 +77,12 @@ struct sp_gate {
|
||||
int (*check)(struct sp_host *, const char *tool,
|
||||
int auth, const char *args, char *reason,
|
||||
size_t reason_len);
|
||||
/*
|
||||
* Optional: refuse the whole turn before the model is called. Used by kid
|
||||
* mode when the day's minutes are gone - a message the child reads, not a
|
||||
* hang, and not a model that has to be trusted to obey.
|
||||
*/
|
||||
int (*block_turn)(struct sp_host *, char *msg, size_t len);
|
||||
};
|
||||
|
||||
struct sp_plugin {
|
||||
@@ -105,6 +111,7 @@ int sp_host_add_gate(struct sp_host *, const struct sp_gate *);
|
||||
/* Ask every gate. Returns 1 allowed, 0 denied (reason filled), -1 no opinion. */
|
||||
int sp_host_gate(struct sp_host *, const char *tool, int auth,
|
||||
const char *args, char *reason, size_t reason_len);
|
||||
int sp_host_turn_blocked(struct sp_host *, char *msg, size_t len);
|
||||
int sp_host_add_command(struct sp_host *, const char *name, sp_cmd_fn,
|
||||
void *ctx);
|
||||
int sp_host_command(struct sp_host *, const char *name, const char *args,
|
||||
|
||||
+17
-1
@@ -248,7 +248,23 @@ kids_gate(struct sp_host *h, const char *tool, int auth, const char *args,
|
||||
return ask_parent(tool, args, reason, reason_len) ? 1 : 0;
|
||||
}
|
||||
|
||||
static const struct sp_gate gate = { "kids", kids_gate };
|
||||
/*
|
||||
* The day ends here. Not "the model is asked to stop" - the model is not called
|
||||
* at all, so a chatty model cannot talk past the budget.
|
||||
*/
|
||||
static int
|
||||
kids_block_turn(struct sp_host *h, char *msg, size_t len)
|
||||
{
|
||||
(void)h;
|
||||
if (quota_left() != 0)
|
||||
return 0;
|
||||
snprintf(msg, len, "Fuer heute ist Schluss: %ld von %u Minuten sind "
|
||||
"verbraucht. Morgen geht es weiter.", used_seconds / 60,
|
||||
daily_minutes);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static const struct sp_gate gate = { "kids", kids_gate, kids_block_turn };
|
||||
|
||||
/*
|
||||
* Kid-safe conversation: a system message in front of every request, because a
|
||||
|
||||
+15
-1
@@ -118,7 +118,21 @@ sp_agent_run(struct sp_agent *a, const char *user_text, struct sp_buf *answer,
|
||||
sp_buf_clear(answer);
|
||||
/* the turn counter is what a plugin like 'focus' schedules against */
|
||||
if (a->host != NULL)
|
||||
sp_host_turn(a->host);
|
||||
/*
|
||||
* A turn gate runs before the model does. Kid mode ends the day here: the
|
||||
* child gets a sentence, the model gets nothing to answer.
|
||||
*/
|
||||
if (a->host != NULL) {
|
||||
char msg[256];
|
||||
|
||||
msg[0] = '\0';
|
||||
if (sp_host_turn_blocked(a->host, msg, sizeof(msg))) {
|
||||
sp_buf_puts(answer, msg[0] != '\0' ? msg :
|
||||
"today is over");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
sp_host_turn(a->host);
|
||||
if (sp_buf_init(&obs) != 0) {
|
||||
sp_buf_puts(err, "agent: out of memory");
|
||||
if (conv == &local)
|
||||
|
||||
+5
-1
@@ -112,12 +112,16 @@ load_script(struct sp_mock *m, const char *path, struct sp_buf *err)
|
||||
}
|
||||
|
||||
/* one-shot mode: print the answer as it arrives, no buffering */
|
||||
/* bytes the transport streamed: if none, the answer still has to be printed */
|
||||
static size_t streamed_bytes;
|
||||
|
||||
static void
|
||||
stdout_stream(void *ctx, int kind, const char *text)
|
||||
{
|
||||
(void)ctx;
|
||||
if (kind != SP_STREAM_TEXT || text == NULL)
|
||||
return;
|
||||
streamed_bytes += strlen(text);
|
||||
fputs(text, stdout);
|
||||
fflush(stdout);
|
||||
}
|
||||
@@ -797,7 +801,7 @@ main(int argc, char **argv)
|
||||
cfg.stream_ctx = NULL;
|
||||
rc = sp_agent_run(&ag, prompt, &answer, &err);
|
||||
if (rc == 0) {
|
||||
if (cfg.stream == NULL)
|
||||
if (cfg.stream == NULL || streamed_bytes == 0)
|
||||
printf("%s\n", answer.p != NULL ? answer.p : "");
|
||||
else
|
||||
printf("\n"); /* the stream already printed it */
|
||||
|
||||
@@ -189,6 +189,20 @@ sp_host_add_gate(struct sp_host *h, const struct sp_gate *g)
|
||||
* The first gate with an opinion wins. A denial carries its reason; allowing
|
||||
* skips the operator prompt, which is what a whitelist is for.
|
||||
*/
|
||||
int
|
||||
sp_host_turn_blocked(struct sp_host *h, char *msg, size_t len)
|
||||
{
|
||||
size_t i;
|
||||
|
||||
if (h == NULL)
|
||||
return 0;
|
||||
for (i = 0; i < h->ngate; i++)
|
||||
if (h->gate[i]->block_turn != NULL &&
|
||||
h->gate[i]->block_turn(h, msg, len))
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
sp_host_gate(struct sp_host *h, const char *tool, int auth, const char *args,
|
||||
char *reason, size_t reason_len)
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@ hr { border: 0; border-top: 1px solid #1d2126; margin: 3em 0 1.5em 0; }
|
||||
<body>
|
||||
<div id="wrap">
|
||||
|
||||
<p id="lang">Deutsch · <a href="index.en.html">English</a></p>
|
||||
<p id="lang">Deutsch · <a href="index.en.html">English</a> · <a href="index.pt.html">Portugues (BR)</a></p>
|
||||
|
||||
<h1>splinter<span>_</span></h1>
|
||||
<p class="lead">Ein Agent-Harness, das dir gehoert: Chat im Terminal, Werkzeuge mit Autorisierungsklassen, Plugins, jedes Modell das OpenAI spricht — von uns gebaut, damit wir es umbauen koennen, statt uns an das Verhalten eines fremden Clients zu gewoehnen.</p>
|
||||
|
||||
@@ -0,0 +1,156 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
||||
"http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html lang="pt_BR">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>splinter - um harness de agente que e seu</title>
|
||||
<meta name="description" content="splinter e um harness de agente em C99/POSIX: chat no terminal, ferramentas com classes de autorizacao, plugins, qualquer endpoint compativel com OpenAI, gateway Telegram.">
|
||||
<style type="text/css">
|
||||
body { background: #0d0f12; color: #c8ccd2; margin: 0; padding: 0;
|
||||
font-family: "DejaVu Sans Mono", "Courier New", monospace;
|
||||
font-size: 14px; line-height: 1.55; }
|
||||
#wrap { width: 46em; margin: 0 auto; padding: 3em 1.5em 6em 1.5em; }
|
||||
h1 { font-size: 2.4em; color: #e8ecf1; margin: 0 0 0.2em 0; letter-spacing: -0.02em; }
|
||||
h1 span { color: #5f9ea0; }
|
||||
h2 { font-size: 1em; color: #5f9ea0; margin: 2.6em 0 0.7em 0; font-weight: normal;
|
||||
border-bottom: 1px solid #22262c; padding-bottom: 0.3em;
|
||||
text-transform: uppercase; letter-spacing: 0.08em; }
|
||||
p { margin: 0.8em 0; }
|
||||
a { color: #7fb3b5; text-decoration: none; border-bottom: 1px dotted #3d5a5c; }
|
||||
a:hover { color: #a8d8da; }
|
||||
.lead { font-size: 1.15em; color: #e2e6ea; }
|
||||
.meta { color: #6b727c; font-size: 0.92em; margin-bottom: 2.5em; }
|
||||
.meta b { color: #9aa2ad; font-weight: normal; }
|
||||
pre { background: #07090b; border: 1px solid #1d2126; border-left: 2px solid #2f4a4c;
|
||||
padding: 1em 1.1em; overflow-x: auto; font-size: 0.88em; line-height: 1.45;
|
||||
color: #b9c0c8; margin: 1.2em 0; }
|
||||
pre .u { color: #e8ecf1; }
|
||||
pre .k { color: #5f9ea0; }
|
||||
pre .d { color: #6b727c; }
|
||||
table { border-collapse: collapse; width: 100%; margin: 1.2em 0; font-size: 0.9em; }
|
||||
th { text-align: left; color: #7d848e; font-weight: normal; padding: 0.35em 0.6em;
|
||||
border-bottom: 1px solid #22262c; text-transform: uppercase; font-size: 0.85em;
|
||||
letter-spacing: 0.06em; }
|
||||
td { padding: 0.35em 0.6em; border-bottom: 1px solid #14181c; vertical-align: top; }
|
||||
td.c { color: #5f9ea0; white-space: nowrap; }
|
||||
td.m { color: #c98b6b; white-space: nowrap; }
|
||||
td.x { color: #b06f6f; white-space: nowrap; }
|
||||
.box { border: 1px solid #1d2126; padding: 0.9em 1em; margin: 1em 0; background: #0a0c0f; }
|
||||
.box h3 { margin: 0 0 0.3em 0; font-size: 0.95em; color: #e2e6ea; font-weight: normal; }
|
||||
ul { margin: 0.6em 0 0.6em 1.2em; padding: 0; }
|
||||
li { margin: 0.25em 0; }
|
||||
.small { font-size: 0.88em; color: #7d848e; }
|
||||
hr { border: 0; border-top: 1px solid #1d2126; margin: 3em 0 1.5em 0; }
|
||||
#foot { color: #5a616b; font-size: 0.88em; }
|
||||
#lang { color: #5a616b; font-size: 0.88em; margin: 0 0 2em 0; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="wrap">
|
||||
|
||||
<p id="lang"><a href="index.html">Deutsch</a> · <a href="index.en.html">English</a> · Portugues (BR)</p>
|
||||
|
||||
<h1>splinter<span>_</span></h1>
|
||||
<p class="lead">Um harness de agente que e seu: chat no terminal, ferramentas com classes de autorizacao, plugins, qualquer modelo que fale OpenAI - escrito por nos para poder mudar-lo, em vez de nos acostumar com o comportamento de um cliente alheio.</p>
|
||||
|
||||
<p class="meta"><b>9.125</b> linhas C99/POSIX ·
|
||||
<b>248.568</b> bytes do binario · <b>21</b> programas de teste ·
|
||||
<b>8</b> plugins · <b>42</b> paletas · BSD-3-Clause</p>
|
||||
|
||||
<h2>O que e</h2>
|
||||
<p>splinter e um harness de agente em C99/POSIX: um programa que segura a
|
||||
conversa, decide quais ferramentas existem, quem pode usa-las e o que ficou
|
||||
registrado. O modelo e um detalhe trocavel; o harness e a parte que sabe o que
|
||||
acontece.</p>
|
||||
|
||||
<h2>Como se parece</h2>
|
||||
<pre><span class="u">voce:</span> por que o build falha?
|
||||
<span class="d">pensando:</span> preciso ler o erro antes de opinar.
|
||||
<span class="u">ferramenta:</span> search {"pattern":"error","path":"build/logs"}
|
||||
<span class="u">ferramenta:</span> read {"path":"build/logs/last.log"}
|
||||
<span class="d">alteracao:</span> -CFLAGS = -O2
|
||||
<span class="d"> </span> +CFLAGS = -O2 -Wall -Werror
|
||||
<span class="u">modelo:</span> faltava -Werror; o erro era um aviso promovido.</pre>
|
||||
<p>Pensamento, ferramenta com argumentos, alteracao e resposta entram no
|
||||
transcript na ordem em que acontecem.</p>
|
||||
|
||||
<h2>Tres verificacoes antes de cada ferramenta</h2>
|
||||
<p>Orcamento, registro e classe de autorizacao. A ferramenta declara a classe
|
||||
(read, mutate, destructive) - nunca o modelo, nunca o prompt. Um plugin pode
|
||||
entrar na frente com um gate: permitir, negar com motivo, ou nao opinar.</p>
|
||||
|
||||
<h2>Ferramentas</h2>
|
||||
<p>14 ferramentas: <code>read</code>, <code>write</code>, <code>edit</code>,
|
||||
<code>search</code>, <code>list</code>, <code>run</code>,
|
||||
<code>folder_history</code>, <code>delegate</code>,
|
||||
<code>delegate_parallel</code> e as de leitura do sistema.</p>
|
||||
|
||||
<h2>Transportes e plugins</h2>
|
||||
<p>Transporte e um vtable: openai (HTTP/SSE), cli (claude, opencode), mock para
|
||||
teste. Plugins sao <code>.so</code> carregados com dlopen: lcm, focus, reminder,
|
||||
ring, mcp, cli, clock, cps e agora kids.</p>
|
||||
|
||||
<h2>Delegacao: outros modelos, splinter escolhe</h2>
|
||||
<pre>[parallel: 2 task(s), 12018 ms wall]
|
||||
|
||||
## task 1 | model slow | score 5 | 12018 ms | exit 0 | 75 B | requested tag 'slow'</pre>
|
||||
<p>Modelo, duracao e status por tarefa - um delegado lento aparece no cabecalho
|
||||
antes de alguem ler o texto.</p>
|
||||
|
||||
<h2>Configuracao</h2>
|
||||
<pre>endpoint = http://kontron.local:8080/v1/chat/completions
|
||||
model = ...
|
||||
autonomous = 1</pre>
|
||||
<p><code>~/.splinter/splinter.conf</code> mais <code>splinter.conf.d/*.conf</code>
|
||||
em ordem de nome. Chave desconhecida e erro com numero de linha.</p>
|
||||
|
||||
<h2>Gateway: Telegram</h2>
|
||||
<p><code>splinter --daemon</code> fala Telegram com indicador de digitacao e os
|
||||
mesmos slash commands do terminal.</p>
|
||||
|
||||
<h2>O que fica registrado</h2>
|
||||
<p>Cada sessao escreve <code>session.log</code> (eventos legiveis) e
|
||||
<code>wire.jsonl</code> (o que foi de fato enviado ao modelo).</p>
|
||||
|
||||
<h2>Compilar</h2>
|
||||
<pre>make
|
||||
make check <span class="d"># 21 binarios de teste, i18n, site</span></pre>
|
||||
<p>Sem dependencias alem de libc e pthread; ncurses vem do vendor.</p>
|
||||
|
||||
<h2>O que nao e</h2>
|
||||
<ul><li>nao e um modelo;</li><li>nao e um servico - e um programa;</li>
|
||||
<li>nao guarda nada em sqlite: sessoes sao arquivos;</li>
|
||||
<li>nao adivinha: mede.</li></ul>
|
||||
|
||||
<h2>A frota</h2>
|
||||
<pre>delegate = olivia | em olivia | tags=remote | host=172.25.206.16 |
|
||||
endpoint=http://172.25.206.2:18082/v1/chat/completions | model=...</pre>
|
||||
<p>O delegate nomeia um host e a chamada inteira vai por ssh; a maquina remota
|
||||
poe suas proprias chaves.</p>
|
||||
|
||||
<h2>As duas direcoes: MCP</h2>
|
||||
<pre><span class="u">$</span> splinter --mcp-server-listen 0.0.0.0 --mcp-listen-port 8098
|
||||
splinter: MCP server on 0.0.0.0:8098 (14 tools, read only)</pre>
|
||||
<p>Como cliente busca ferramentas; como servidor oferece as suas. Mutar so com
|
||||
<code>--autonomous</code>.</p>
|
||||
|
||||
<h2>Pipe, pasta, primeira conversa</h2>
|
||||
<pre><span class="u">$</span> cat /etc/passwd | splinter "explique o arquivo"
|
||||
<span class="u">$</span> cd ~/src/splinter && splinter -c
|
||||
<span class="u">$</span> splinter --interview</pre>
|
||||
<p>stdin vira contexto; <code>-c</code> pega a ultima sessao daquele diretorio;
|
||||
<code>--interview</code> escreve o perfil em
|
||||
<code>~/.splinter/profile/<usuario>.md</code>.</p>
|
||||
|
||||
<h2>Modo crianca</h2>
|
||||
<p>Com o plugin <code>kids</code>, toda acao que muda algo precisa da aprovacao de
|
||||
um adulto (Telegram), uma lista branca libera o inofensivo, o modelo e lembrado a
|
||||
cada pedido de manter a conversa adequada a idade, e um limite diario de minutos
|
||||
fecha o dia quando acaba.</p>
|
||||
|
||||
<hr>
|
||||
<p id="foot">splinter - C99/POSIX, BSD-3-Clause. Manual: <code>man ./docs/splinter.1</code> · ABI de plugins: <code>docs/PLUGINS.md</code></p>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
+98
-3
@@ -14,8 +14,9 @@ import sys
|
||||
ROOT = pathlib.Path(__file__).resolve().parent.parent
|
||||
OUT = ROOT / "src" / "www"
|
||||
|
||||
LANGS = ["de", "en"]
|
||||
FILES = {"de": "index.html", "en": "index.en.html"}
|
||||
LANGS = ["de", "en", "pt_BR"]
|
||||
FILES = {"de": "index.html", "en": "index.en.html",
|
||||
"pt_BR": "index.pt.html"}
|
||||
|
||||
HEAD = """<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
||||
"http://www.w3.org/TR/html4/strict.dtd">
|
||||
@@ -171,7 +172,7 @@ T = {
|
||||
"de": {
|
||||
"title": "splinter — ein Agent-Harness, das dir gehoert",
|
||||
"desc": "splinter ist ein Agent-Harness in C99/POSIX: Chat im Terminal, Werkzeuge mit Autorisierungsklassen, Plugins, jeder OpenAI-kompatible Endpunkt, Telegram-Gateway.",
|
||||
"langbar": "Deutsch · <a href=\"index.en.html\">English</a>",
|
||||
"langbar": "Deutsch · <a href=\"index.en.html\">English</a> · <a href=\"index.pt.html\">Portugues (BR)</a>",
|
||||
"lead": "Ein Agent-Harness, das dir gehoert: Chat im Terminal, Werkzeuge mit "
|
||||
"Autorisierungsklassen, Plugins, jedes Modell das OpenAI spricht — von uns "
|
||||
"gebaut, damit wir es umbauen koennen, statt uns an das Verhalten eines "
|
||||
@@ -199,6 +200,20 @@ T = {
|
||||
},
|
||||
}
|
||||
|
||||
T["pt_BR"] = {
|
||||
"title": "splinter - um harness de agente que e seu",
|
||||
"desc": "splinter e um harness de agente em C99/POSIX: chat no terminal, ferramentas com classes de autorizacao, plugins, qualquer endpoint compativel com OpenAI, gateway Telegram.",
|
||||
"langbar": "<a href=\"index.html\">Deutsch</a> · <a href=\"index.en.html\">English</a> · Portugues (BR)",
|
||||
"lead": "Um harness de agente que e seu: chat no terminal, ferramentas com "
|
||||
"classes de autorizacao, plugins, qualquer modelo que fale OpenAI - "
|
||||
"escrito por nos para poder mudar-lo, em vez de nos acostumar com o "
|
||||
"comportamento de um cliente alheio.",
|
||||
"m_lines": "linhas C99/POSIX", "m_binary": "bytes do binario",
|
||||
"m_tests": "programas de teste", "m_plugins": "plugins", "m_themes": "paletas",
|
||||
"foot": "splinter - C99/POSIX, BSD-3-Clause. Manual: <code>man ./docs/splinter.1</code>"
|
||||
" · ABI de plugins: <code>docs/PLUGINS.md</code>",
|
||||
}
|
||||
|
||||
SECTIONS = {
|
||||
"de": [
|
||||
("<h2>Was es ist</h2>\n<p>Dasselbe, was Claude Code oder opencode fuer dich sind: ein "
|
||||
@@ -440,6 +455,86 @@ of letting it guess; the profile from the interview lives in
|
||||
<code>~/.splinter/profile/<user>.md</code>.</p>""",
|
||||
]
|
||||
|
||||
|
||||
SECTIONS["pt_BR"] = [
|
||||
"""<h2>O que e</h2>
|
||||
<p>splinter e um harness de agente em C99/POSIX: um programa que segura a
|
||||
conversa, decide quais ferramentas existem, quem pode usa-las e o que ficou
|
||||
registrado. O modelo e um detalhe trocavel; o harness e a parte que sabe o que
|
||||
acontece.</p>""",
|
||||
"""<h2>Como se parece</h2>
|
||||
<pre><span class="u">voce:</span> por que o build falha?
|
||||
<span class="d">pensando:</span> preciso ler o erro antes de opinar.
|
||||
<span class="u">ferramenta:</span> search {"pattern":"error","path":"build/logs"}
|
||||
<span class="u">ferramenta:</span> read {"path":"build/logs/last.log"}
|
||||
<span class="d">alteracao:</span> -CFLAGS = -O2
|
||||
<span class="d"> </span> +CFLAGS = -O2 -Wall -Werror
|
||||
<span class="u">modelo:</span> faltava -Werror; o erro era um aviso promovido.</pre>
|
||||
<p>Pensamento, ferramenta com argumentos, alteracao e resposta entram no
|
||||
transcript na ordem em que acontecem.</p>""",
|
||||
"""<h2>Tres verificacoes antes de cada ferramenta</h2>
|
||||
<p>Orcamento, registro e classe de autorizacao. A ferramenta declara a classe
|
||||
(read, mutate, destructive) - nunca o modelo, nunca o prompt. Um plugin pode
|
||||
entrar na frente com um gate: permitir, negar com motivo, ou nao opinar.</p>""",
|
||||
"""<h2>Ferramentas</h2>
|
||||
<p>14 ferramentas: <code>read</code>, <code>write</code>, <code>edit</code>,
|
||||
<code>search</code>, <code>list</code>, <code>run</code>,
|
||||
<code>folder_history</code>, <code>delegate</code>,
|
||||
<code>delegate_parallel</code> e as de leitura do sistema.</p>""",
|
||||
"""<h2>Transportes e plugins</h2>
|
||||
<p>Transporte e um vtable: openai (HTTP/SSE), cli (claude, opencode), mock para
|
||||
teste. Plugins sao <code>.so</code> carregados com dlopen: lcm, focus, reminder,
|
||||
ring, mcp, cli, clock, cps e agora kids.</p>""",
|
||||
"""<h2>Delegacao: outros modelos, splinter escolhe</h2>
|
||||
<pre>[parallel: 2 task(s), 12018 ms wall]
|
||||
|
||||
## task 1 | model slow | score 5 | 12018 ms | exit 0 | 75 B | requested tag 'slow'</pre>
|
||||
<p>Modelo, duracao e status por tarefa - um delegado lento aparece no cabecalho
|
||||
antes de alguem ler o texto.</p>""",
|
||||
"""<h2>Configuracao</h2>
|
||||
<pre>endpoint = http://kontron.local:8080/v1/chat/completions
|
||||
model = ...
|
||||
autonomous = 1</pre>
|
||||
<p><code>~/.splinter/splinter.conf</code> mais <code>splinter.conf.d/*.conf</code>
|
||||
em ordem de nome. Chave desconhecida e erro com numero de linha.</p>""",
|
||||
"""<h2>Gateway: Telegram</h2>
|
||||
<p><code>splinter --daemon</code> fala Telegram com indicador de digitacao e os
|
||||
mesmos slash commands do terminal.</p>""",
|
||||
"""<h2>O que fica registrado</h2>
|
||||
<p>Cada sessao escreve <code>session.log</code> (eventos legiveis) e
|
||||
<code>wire.jsonl</code> (o que foi de fato enviado ao modelo).</p>""",
|
||||
"""<h2>Compilar</h2>
|
||||
<pre>make
|
||||
make check <span class="d"># 21 binarios de teste, i18n, site</span></pre>
|
||||
<p>Sem dependencias alem de libc e pthread; ncurses vem do vendor.</p>""",
|
||||
"""<h2>O que nao e</h2>
|
||||
<ul><li>nao e um modelo;</li><li>nao e um servico - e um programa;</li>
|
||||
<li>nao guarda nada em sqlite: sessoes sao arquivos;</li>
|
||||
<li>nao adivinha: mede.</li></ul>""",
|
||||
"""<h2>A frota</h2>
|
||||
<pre>delegate = olivia | em olivia | tags=remote | host=172.25.206.16 |
|
||||
endpoint=http://172.25.206.2:18082/v1/chat/completions | model=...</pre>
|
||||
<p>O delegate nomeia um host e a chamada inteira vai por ssh; a maquina remota
|
||||
poe suas proprias chaves.</p>""",
|
||||
"""<h2>As duas direcoes: MCP</h2>
|
||||
<pre><span class="u">$</span> splinter --mcp-server-listen 0.0.0.0 --mcp-listen-port 8098
|
||||
splinter: MCP server on 0.0.0.0:8098 (14 tools, read only)</pre>
|
||||
<p>Como cliente busca ferramentas; como servidor oferece as suas. Mutar so com
|
||||
<code>--autonomous</code>.</p>""",
|
||||
"""<h2>Pipe, pasta, primeira conversa</h2>
|
||||
<pre><span class="u">$</span> cat /etc/passwd | splinter "explique o arquivo"
|
||||
<span class="u">$</span> cd ~/src/splinter && splinter -c
|
||||
<span class="u">$</span> splinter --interview</pre>
|
||||
<p>stdin vira contexto; <code>-c</code> pega a ultima sessao daquele diretorio;
|
||||
<code>--interview</code> escreve o perfil em
|
||||
<code>~/.splinter/profile/<usuario>.md</code>.</p>""",
|
||||
"""<h2>Modo crianca</h2>
|
||||
<p>Com o plugin <code>kids</code>, toda acao que muda algo precisa da aprovacao de
|
||||
um adulto (Telegram), uma lista branca libera o inofensivo, o modelo e lembrado a
|
||||
cada pedido de manter a conversa adequada a idade, e um limite diario de minutos
|
||||
fecha o dia quando acaba.</p>""",
|
||||
]
|
||||
|
||||
def render(lang):
|
||||
strings = dict(T[lang])
|
||||
strings["lang"] = lang
|
||||
|
||||
Reference in new issue
Block a user