From 76883bfa3ac09efc24282c7bff0292fb39d2b4c0 Mon Sep 17 00:00:00 2001
From: lotherk
Date: Mon, 9 Nov 2026 23:47:18 +0000
Subject: [PATCH] a2a: stream from the server, and test both sides together
SendStreamingMessage on the A2A server answers with SSE now: an initial
task event in WORKING, one artifactUpdate per streamed chunk (a
non-streaming transport sends its whole answer as one chunk), then a
completed statusUpdate. An error becomes an error event; the task is
still stored for GetTask.
test_a2a_server.sh runs the client half against the server half through
the agent card, blocking and streaming, besides the direct curl checks.
README, PLUGINS.md, TODO, ROADMAP and the site follow.
---
README.md | 11 +-
TODO.md | 20 ++--
docs/PLUGINS.md | 14 ++-
docs/ROADMAP.md | 4 +-
src/a2aserver.c | 211 +++++++++++++++++++++++++++++++++++++--
src/www/index.en.html | 6 +-
src/www/index.html | 6 +-
src/www/index.pt.html | 6 +-
tests/test_a2a_server.sh | 32 +++++-
tools/gen_www.py | 12 +--
10 files changed, 273 insertions(+), 49 deletions(-)
diff --git a/README.md b/README.md
index f54d1e1..a70f750 100644
--- a/README.md
+++ b/README.md
@@ -132,11 +132,12 @@ SPLINTER_A2A_SERVER_TOKEN=... \
```
Another agent can send `SendMessage` to `POST /a2a` and poll `GetTask`; the
-agent card is served at `/.well-known/agent-card.json`. Each request runs one
-turn in its own conversation. Streaming, files, push notifications, `CancelTask`
-and continuation of an interrupted task are refused with a JSON-RPC error rather
-than half-answered. Beyond loopback the bearer token is required; there is no
-TLS, so put it behind ssh or a tunnel.
+agent card is served at `/.well-known/agent-card.json`. `SendStreamingMessage`
+streams the answer as SSE artifact updates, then a completed status. Each
+request runs one turn in its own conversation. File parts, push notifications,
+`CancelTask` and continuation of an interrupted task are refused with a JSON-RPC
+error rather than half-answered. Beyond loopback the bearer token is required;
+there is no TLS, so put it behind ssh or a tunnel.
## Configuration
diff --git a/TODO.md b/TODO.md
index 7936b56..9d112fb 100644
--- a/TODO.md
+++ b/TODO.md
@@ -46,17 +46,16 @@ erscheint waehrend des Laufs, Zwischenstatus wird nicht angehaengt. Task- und
Context-Id bleiben fuer die Sitzung; ein terminaler Task verliert seine Id, der
Context bleibt. `SPLINTER_A2A_CARD` findet den Endpunkt ueber die Agent Card.
-Der Server ist als MVP gebaut: `src/a2aserver.c`, `POST /a2a` mit
-`SendMessage` (ein Turn in eigener Konversation, completed Task) und `GetTask`,
+Der Server ist gebaut: `src/a2aserver.c`, `POST /a2a` mit `SendMessage` (ein
+Turn in eigener Konversation, completed Task), `SendStreamingMessage` (SSE,
+`artifactUpdate`-Chunks, dann completed `statusUpdate`) und `GetTask`,
`GET /.well-known/agent-card.json`, Bearer-Token ueber
`SPLINTER_A2A_SERVER_TOKEN` jenseits von Loopback.
-Offen: Streaming auf der Server-Seite, Datei- und strukturierte Teile,
-Push-Notifications, `CancelTask`/`SubscribeToTask` und die Fortsetzung eines
-unterbrochenen Tasks.
+Offen: Datei- und strukturierte Teile, Push-Notifications,
+`CancelTask`/`SubscribeToTask` und die Fortsetzung eines unterbrochenen Tasks.
-Naechster Schritt: Server-Streaming oder Multiturn, je nachdem was die Flotte
-zuerst braucht.
+Naechster Schritt: Multiturn (Task-Fortsetzung), danach Datei-Teile.
### 4. `~/.local/lib` enthaelt Fremdlast
@@ -96,10 +95,11 @@ Naechster Schritt: entscheiden, ob die npm-Reste weg duerfen. Kein Code.
- **A2A-Client und -Server**: `plugins/a2a/a2a.c` sendet `SendMessage`
(JSON-RPC 2.0, Text, blockierend), in der UI `SendStreamingMessage` (SSE,
Artefakt-Text live) und findet den Endpunkt ueber `SPLINTER_A2A_CARD`;
- `src/a2aserver.c` serviert `SendMessage`, `GetTask` und die Agent Card mit
- Bearer-Token. `tests/test_a2a.sh` prueft Task, Message, Token, Fehler,
+ `src/a2aserver.c` serviert `SendMessage`, `SendStreamingMessage` (SSE),
+ `GetTask` und die Agent Card mit Bearer-Token. `tests/test_a2a.sh` prueft Task, Message, Token, Fehler,
Streaming und Discovery, `tests/test_a2a_ui.sh` den Streaming-Pfad,
- `tests/test_a2a_server.sh` den Server.
+ `tests/test_a2a_server.sh` den Server und den Client gegen den Server
+ (Discovery, blockierend und streamend).
- **Fehler dabei gefunden und behoben**: `delegate_retry` las `id` und `force`
in denselben Puffer; `json_str` haengt an, also wurde aus `job-1` mit
`force=1` die Id `job-11` (`src/delegate.c`, `tool_delegate_retry`).
diff --git a/docs/PLUGINS.md b/docs/PLUGINS.md
index c92d349..9f6d295 100644
--- a/docs/PLUGINS.md
+++ b/docs/PLUGINS.md
@@ -313,10 +313,14 @@ needs the agent and its authorization model, not only a transport.
`POST /a2a` speaks JSON-RPC: `SendMessage` runs one turn in a fresh conversation
(system prompt plus the caller's text), stores the completed Task and returns it;
-`GetTask` returns a stored task; `GET /.well-known/agent-card.json` serves a card
-with the `JSONRPC` interface. One request at a time, one connection at a time.
+`SendStreamingMessage` runs the same turn and writes SSE `artifactUpdate` events
+as the transport produces text (a non-streaming transport sends its whole answer
+as one artifact), followed by a completed `statusUpdate`; `GetTask` returns a
+stored task; `GET /.well-known/agent-card.json` serves a card with the `JSONRPC`
+interface. One request at a time, one connection at a time.
-Refused with a JSON-RPC error, not half-answered: `SendStreamingMessage`,
-`CancelTask`, `SubscribeToTask`, file/structured parts and push notifications.
-Beyond loopback `SPLINTER_A2A_SERVER_TOKEN` is required and checked as
+Refused with a JSON-RPC error, not half-answered: `CancelTask`,
+`SubscribeToTask`, file/structured parts and push notifications, plus
+continuation of an interrupted task. Beyond loopback
+`SPLINTER_A2A_SERVER_TOKEN` is required and checked as
`Authorization: Bearer ...`; there is no TLS.
diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md
index 2ca052c..cc572d5 100644
--- a/docs/ROADMAP.md
+++ b/docs/ROADMAP.md
@@ -4,8 +4,8 @@ Stand: 2026-11-09. Die geprüfte, ausführliche Liste mit Belegen steht in
`TODO.md`; hier bleibt die Reihenfolge, was als Nächstes gebaut wird.
1. **A2A: was noch fehlt** — Client (`SendMessage`, `SendStreamingMessage` in
- der UI, Agent-Card-Discovery) und Server-MVP (`SendMessage`, `GetTask`,
- Agent Card) stehen, alles mit Text. Offen sind Server-Streaming, Datei- und
+ der UI, Agent-Card-Discovery) und Server (`SendMessage`, SSE-Streaming,
+ `GetTask`, Agent Card) stehen, alles mit Text. Offen sind Datei- und
strukturierte Teile, Push-Notifications, `CancelTask`/`SubscribeToTask` und
die Fortsetzung eines unterbrochenen Tasks. `swarm` ist nur lokale IPC im
selben Verzeichnis, kein A2A.
diff --git a/src/a2aserver.c b/src/a2aserver.c
index 69e7e84..d035479 100644
--- a/src/a2aserver.c
+++ b/src/a2aserver.c
@@ -12,10 +12,11 @@
* POST /a2a GetTask -> the stored task
* GET /.well-known/agent-card.json
*
- * Deliberately not here yet: streaming (SendStreamingMessage), file and
- * structured-data parts, push notifications, CancelTask, and multi-turn
- * continuation of an interrupted task. Each of those is refused with a
- * JSON-RPC error rather than answered with half a protocol.
+ * Deliberately not here yet: file and structured-data parts, push
+ * notifications, CancelTask, and multi-turn continuation of an interrupted
+ * task. Each of those is refused with a JSON-RPC error rather than answered
+ * with half a protocol. Streaming is served: SendStreamingMessage writes
+ * artifactUpdate and statusUpdate events over SSE.
*
* One turn per request, one connection at a time. The conversation is local to
* the request (the system prompt plus the caller's text), so two remote agents
@@ -266,8 +267,14 @@ task_find(const char *id)
return NULL;
}
+static void
+gen_task_id(char *out, size_t cap)
+{
+ snprintf(out, cap, "task-%d-%u", (int)getpid(), g_seq + 1);
+}
+
static struct a2a_task *
-task_store(const char *context, const struct sp_buf *answer)
+task_store_id(const char *id, const char *context, const struct sp_buf *answer)
{
struct a2a_task *t = &g_tasks[g_seq % A2A_TASKS];
@@ -277,7 +284,11 @@ task_store(const char *context, const struct sp_buf *answer)
memset(t, 0, sizeof(*t));
if (sp_buf_init(&t->answer) != 0)
return NULL;
- snprintf(t->id, sizeof(t->id), "task-%d-%u", (int)getpid(), g_seq);
+ if (id != NULL && *id != '\0')
+ snprintf(t->id, sizeof(t->id), "%s", id);
+ else
+ snprintf(t->id, sizeof(t->id), "task-%d-%u", (int)getpid(),
+ g_seq);
snprintf(t->context, sizeof(t->context), "%s", context);
if (sp_buf_add(&t->answer, answer->p, answer->len) != 0) {
sp_buf_free(&t->answer);
@@ -287,6 +298,12 @@ task_store(const char *context, const struct sp_buf *answer)
return t;
}
+static struct a2a_task *
+task_store(const char *context, const struct sp_buf *answer)
+{
+ return task_store_id(NULL, context, answer);
+}
+
static void
task_json(struct sp_buf *b, const struct a2a_task *t)
{
@@ -360,6 +377,185 @@ run_turn(struct sp_agent *ag, const char *text, struct sp_buf *answer,
return rc;
}
+/*
+ * Server-side streaming: the turn runs with a callback that writes one A2A
+ * artifactUpdate per chunk. A transport that cannot stream (cli, script) runs
+ * to completion and its whole answer goes out as one artifact, so the shape is
+ * the same for the client either way.
+ */
+struct sse_out {
+ int fd;
+ char id[128];
+ char task_id[64];
+ char context[128];
+ size_t emitted;
+};
+
+static void
+sse_write(struct sse_out *o, const char *result)
+{
+ struct sp_buf b;
+
+ if (sp_buf_init(&b) != 0)
+ return;
+ sp_buf_printf(&b, "data: {\"jsonrpc\":\"2.0\",\"id\":%s,"
+ "\"result\":%s}\n\n", o->id[0] != '\0' ? o->id : "null", result);
+ write_all(o->fd, b.p, b.len);
+ sp_buf_free(&b);
+}
+
+static void
+sse_error(struct sse_out *o, int code, const char *message)
+{
+ struct sp_buf b;
+
+ if (sp_buf_init(&b) != 0)
+ return;
+ sp_buf_printf(&b, "data: {\"jsonrpc\":\"2.0\",\"id\":%s,"
+ "\"error\":{\"code\":%d,\"message\":\"",
+ o->id[0] != '\0' ? o->id : "null", code);
+ sp_json_escape(&b, message);
+ sp_buf_puts(&b, "\"}}\n\n");
+ write_all(o->fd, b.p, b.len);
+ sp_buf_free(&b);
+}
+
+static void
+sse_task(struct sse_out *o, const char *state)
+{
+ struct sp_buf b;
+
+ if (sp_buf_init(&b) != 0)
+ return;
+ sp_buf_printf(&b, "{\"task\":{\"id\":\"%s\",\"contextId\":\"%s\","
+ "\"status\":{\"state\":\"%s\"}}}", o->task_id, o->context, state);
+ sse_write(o, b.p);
+ sp_buf_free(&b);
+}
+
+static void
+sse_artifact(struct sse_out *o, const char *text)
+{
+ struct sp_buf b;
+
+ if (sp_buf_init(&b) != 0)
+ return;
+ sp_buf_printf(&b, "{\"artifactUpdate\":{\"taskId\":\"%s\","
+ "\"contextId\":\"%s\",\"artifact\":{\"artifactId\":\"answer\","
+ "\"parts\":[{\"text\":\"", o->task_id, o->context);
+ sp_json_escape(&b, text);
+ sp_buf_puts(&b, "\"}]},\"append\":true}}");
+ sse_write(o, b.p);
+ sp_buf_free(&b);
+ o->emitted += strlen(text);
+}
+
+static void
+sse_status(struct sse_out *o, const char *state)
+{
+ struct sp_buf b;
+
+ if (sp_buf_init(&b) != 0)
+ return;
+ sp_buf_printf(&b, "{\"statusUpdate\":{\"taskId\":\"%s\","
+ "\"contextId\":\"%s\",\"status\":{\"state\":\"%s\"}}}",
+ o->task_id, o->context, state);
+ sse_write(o, b.p);
+ sp_buf_free(&b);
+}
+
+static void
+sse_text(void *ctx, int kind, const char *text)
+{
+ struct sse_out *o = ctx;
+
+ if (kind != SP_STREAM_TEXT || text == NULL || *text == '\0')
+ return;
+ sse_artifact(o, text);
+}
+
+static void
+sse_start(int fd)
+{
+ const char *h = "HTTP/1.1 200 OK\r\nContent-Type: text/event-stream\r\n"
+ "Connection: close\r\n\r\n";
+
+ write_all(fd, h, strlen(h));
+}
+
+static void
+handle_stream(int fd, struct sp_agent *ag, const char *id,
+ const mcp_json *params)
+{
+ const mcp_json *message, *parts;
+ const char *ctx;
+ struct sse_out o;
+ struct sp_buf text, answer, err;
+ struct sp_agent_config cfg;
+ const struct sp_agent_config *saved;
+ int rc;
+
+ memset(&o, 0, sizeof(o));
+ memset(&text, 0, sizeof(text));
+ memset(&answer, 0, sizeof(answer));
+ memset(&err, 0, sizeof(err));
+ o.fd = fd;
+ snprintf(o.id, sizeof(o.id), "%s", id != NULL ? id : "");
+ gen_task_id(o.task_id, sizeof(o.task_id));
+ if (sp_buf_init(&text) != 0 || sp_buf_init(&answer) != 0 ||
+ sp_buf_init(&err) != 0) {
+ const char *h = "HTTP/1.1 500 Internal Server Error\r\n"
+ "Content-Length: 2\r\nConnection: close\r\n\r\n{}";
+
+ write_all(fd, h, strlen(h));
+ sp_buf_free(&text);
+ sp_buf_free(&answer);
+ sp_buf_free(&err);
+ return;
+ }
+ sse_start(fd);
+ message = mcp_arg(params, "message");
+ parts = message != NULL ? mcp_arg(message, "parts") : NULL;
+ if (!collect_text(parts, &text)) {
+ sse_error(&o, -32602, "message has no text parts");
+ goto out;
+ }
+ ctx = mcp_arg_string(message, "contextId");
+ snprintf(o.context, sizeof(o.context), "%s",
+ ctx != NULL && *ctx != '\0' ? ctx : "ctx-local");
+ if (ag->cfg == NULL) {
+ sse_error(&o, -32603, "no agent configuration");
+ goto out;
+ }
+ sse_task(&o, "TASK_STATE_WORKING");
+ saved = ag->cfg;
+ cfg = *ag->cfg;
+ cfg.stream = sse_text;
+ cfg.stream_ctx = &o;
+ ag->cfg = &cfg;
+ rc = run_turn(ag, text.p != NULL ? text.p : "", &answer, &err);
+ ag->cfg = saved;
+ if (rc != 0) {
+ sse_error(&o, -32603, err.p != NULL && err.len > 0 ?
+ err.p : "the turn failed");
+ goto out;
+ }
+ if (o.emitted == 0) {
+ if (answer.p == NULL || answer.len == 0) {
+ sse_error(&o, -32603, "empty answer");
+ goto out;
+ }
+ sse_artifact(&o, answer.p);
+ }
+ sse_status(&o, "TASK_STATE_COMPLETED");
+ (void)task_store_id(o.task_id, o.context, &answer);
+
+out:
+ sp_buf_free(&text);
+ sp_buf_free(&answer);
+ sp_buf_free(&err);
+}
+
static void
handle_rpc(int fd, struct sp_agent *ag, const char *payload)
{
@@ -450,8 +646,7 @@ send_out:
rpc_result(fd, id, out.p != NULL ? out.p : "{}");
sp_buf_free(&out);
} else if (strcmp(method, "SendStreamingMessage") == 0) {
- rpc_error(fd, id, -32601, "streaming is not served here; "
- "use SendMessage");
+ handle_stream(fd, ag, id, params);
} else if (strcmp(method, "CancelTask") == 0 ||
strcmp(method, "SubscribeToTask") == 0) {
rpc_error(fd, id, -32601, "not served here");
diff --git a/src/www/index.en.html b/src/www/index.en.html
index bed480f..438c36d 100644
--- a/src/www/index.en.html
+++ b/src/www/index.en.html
@@ -53,7 +53,7 @@ hr { border: 0; border-top: 1px solid #1d2126; margin: 3em 0 1.5em 0; }
splinter_
An agent harness you own: chat in the terminal, tools with authorization classes, plugins, any model that speaks OpenAI — built by us so we can change it, instead of getting used to how somebody else's client behaves.
-23460 lines of C99/POSIX ·
+
23655 lines of C99/POSIX ·
23 tools · 31 test programs ·
16 plugins · 42 palettes · BSD-3-Clause
@@ -206,8 +206,8 @@ of letting it guess; the profile from the interview lives in
itself:
$ SPLINTER_A2A_SERVER_TOKEN=... splinter --a2a-server-listen 127.0.0.1 --a2a-listen-port 8099
splinter: A2A server on 127.0.0.1:8099 (token required)
-POST /a2a takes SendMessage and GetTask
-as JSON-RPC; the agent card lives at
+
POST /a2a takes SendMessage, SendStreamingMessage
+(SSE) and GetTask as JSON-RPC; the agent card lives at
/.well-known/agent-card.json. One turn per request, its own
conversation. Beyond loopback the bearer token is required.
diff --git a/src/www/index.html b/src/www/index.html
index ecf1c4a..8a7e49b 100644
--- a/src/www/index.html
+++ b/src/www/index.html
@@ -53,7 +53,7 @@ hr { border: 0; border-top: 1px solid #1d2126; margin: 3em 0 1.5em 0; }
splinter_
Ein Agent-Harness, das dir gehoert: Chat im Terminal, Werkzeuge mit Autorisierungsklassen, Plugins, jedes Modell das OpenAI spricht — von uns gebaut, damit wir es umbauen koennen, statt uns an das Verhalten eines fremden Clients zu gewoehnen.
-23460 Zeilen C99/POSIX ·
+
23655 Zeilen C99/POSIX ·
23 Werkzeuge · 31 Test-Programme ·
16 Plugins · 42 Farbschemata · BSD-3-Clause
@@ -207,8 +207,8 @@ ist, statt es raten zu lassen; das Profil aus dem Interview liegt in
sich selbst hin:
$ SPLINTER_A2A_SERVER_TOKEN=... splinter --a2a-server-listen 127.0.0.1 --a2a-listen-port 8099
splinter: A2A server on 127.0.0.1:8099 (token required)
-POST /a2a nimmt SendMessage und GetTask
-als JSON-RPC; die Agent Card liegt unter
+
POST /a2a nimmt SendMessage, SendStreamingMessage
+(SSE) und GetTask als JSON-RPC; die Agent Card liegt unter
/.well-known/agent-card.json. Ein Turn pro Anfrage, eigene
Konversation. Jenseits von Loopback ist der Bearer-Token Pflicht.
diff --git a/src/www/index.pt.html b/src/www/index.pt.html
index da50140..88b0dd3 100644
--- a/src/www/index.pt.html
+++ b/src/www/index.pt.html
@@ -53,7 +53,7 @@ hr { border: 0; border-top: 1px solid #1d2126; margin: 3em 0 1.5em 0; }
splinter_
Um harness de agente que e seu: chat no terminal, ferramentas com classes de autorizacao, plugins, qualquer modelo que fale OpenAI - escrito por nos para poder mudar-lo, em vez de nos acostumar com o comportamento de um cliente alheio.
-23460 linhas C99/POSIX ·
+
23655 linhas C99/POSIX ·
23 ferramentas · 31 programas de teste ·
16 plugins · 42 paletas · BSD-3-Clause
@@ -154,8 +154,8 @@ fecha o dia quando acaba.
si mesmo:
$ SPLINTER_A2A_SERVER_TOKEN=... splinter --a2a-server-listen 127.0.0.1 --a2a-listen-port 8099
splinter: A2A server on 127.0.0.1:8099 (token required)
-POST /a2a aceita SendMessage e GetTask
-em JSON-RPC; o agent card fica em
+
POST /a2a aceita SendMessage, SendStreamingMessage
+(SSE) e GetTask em JSON-RPC; o agent card fica em
/.well-known/agent-card.json. Um turno por requisicao, conversa
propria. Fora do loopback o token Bearer e obrigatorio.
diff --git a/tests/test_a2a_server.sh b/tests/test_a2a_server.sh
index 98202b4..a012cf8 100755
--- a/tests/test_a2a_server.sh
+++ b/tests/test_a2a_server.sh
@@ -18,7 +18,7 @@ cleanup() {
}
trap cleanup EXIT
mkdir -p "$D/home"
-printf 'answer hallo von splinter\n' > "$D/model.txt"
+printf 'answer hallo von splinter\nanswer hallo von splinter\nanswer hallo von splinter\nanswer hallo von splinter\n' > "$D/model.txt"
fails=0
check() { if "$@"; then :; else echo "FAIL $*"; fails=$((fails + 1)); fi; }
@@ -65,9 +65,18 @@ resp2=$(post "$P" "{\"jsonrpc\":\"2.0\",\"id\":\"2\",\"method\":\"GetTask\",\"pa
echo "$resp2" | grep -q 'hallo von splinter'
check test $? -eq 0
-# streaming is refused, not half-answered
-resp3=$(post "$P" "{\"jsonrpc\":\"2.0\",\"id\":\"3\",\"method\":\"SendStreamingMessage\",\"params\":{\"message\":{\"messageId\":\"m\",\"role\":\"ROLE_USER\",\"parts\":[{\"text\":\"x\"}]}}}")
-echo "$resp3" | grep -q '"code":-32601'
+# streaming: SSE with an artifact and a completed status
+resp3=$(post "$P" "{\"jsonrpc\":\"2.0\",\"id\":\"3\",\"method\":\"SendStreamingMessage\",\"params\":{\"message\":{\"messageId\":\"m\",\"role\":\"ROLE_USER\",\"parts\":[{\"text\":\"hallo\"}]}}}")
+echo "$resp3" | grep -q 'artifactUpdate'
+check test $? -eq 0
+echo "$resp3" | grep -q 'hallo von splinter'
+check test $? -eq 0
+echo "$resp3" | grep -q 'TASK_STATE_COMPLETED'
+check test $? -eq 0
+
+# CancelTask is still refused, not half-answered
+resp6=$(post "$P" '{"jsonrpc":"2.0","id":"6","method":"CancelTask","params":{}}')
+echo "$resp6" | grep -q '"code":-32601'
check test $? -eq 0
# a task that does not exist is a JSON-RPC error, not an empty answer
@@ -75,6 +84,21 @@ resp4=$(post "$P" "{\"jsonrpc\":\"2.0\",\"id\":\"4\",\"method\":\"GetTask\",\"pa
echo "$resp4" | grep -q '"code":-32001'
check test $? -eq 0
+# ---- the client half against the server half ----
+# discovery (the agent card names /a2a) plus a blocking turn, then the
+# streaming path: both sides of the protocol in one process pair
+cardurl="http://127.0.0.1:$P/.well-known/agent-card.json"
+out=$(HOME="$D/home" SPLINTER_A2A_CARD="$cardurl" SPLINTER_A2A_TIMEOUT=20 \
+ ./splinter --no-config --plugin plugins/a2a/a2a.so --transport a2a \
+ --no-stream -p "hallo" 2>&1)
+echo "$out" | grep -q 'hallo von splinter'
+check test $? -eq 0
+out=$(HOME="$D/home" SPLINTER_A2A_CARD="$cardurl" SPLINTER_A2A_TIMEOUT=20 \
+ ./splinter --no-config --plugin plugins/a2a/a2a.so --transport a2a \
+ -p "hallo" 2>&1)
+echo "$out" | grep -q 'hallo von splinter'
+check test $? -eq 0
+
# ---- token: without it a request is 401, with it the turn runs ----
HOME="$D/home" SPLINTER_A2A_SERVER_TOKEN=tok ./splinter --no-config \
--script "$D/model.txt" --a2a-server-listen 127.0.0.1 \
diff --git a/tools/gen_www.py b/tools/gen_www.py
index ac02009..bf0c456 100644
--- a/tools/gen_www.py
+++ b/tools/gen_www.py
@@ -454,8 +454,8 @@ ist, statt es raten zu lassen; das Profil aus dem Interview liegt in
sich selbst hin:
$ SPLINTER_A2A_SERVER_TOKEN=... splinter --a2a-server-listen 127.0.0.1 --a2a-listen-port 8099
splinter: A2A server on 127.0.0.1:8099 (token required)
-POST /a2a nimmt SendMessage und GetTask
-als JSON-RPC; die Agent Card liegt unter
+
POST /a2a nimmt SendMessage, SendStreamingMessage
+(SSE) und GetTask als JSON-RPC; die Agent Card liegt unter
/.well-known/agent-card.json. Ein Turn pro Anfrage, eigene
Konversation. Jenseits von Loopback ist der Bearer-Token Pflicht.
""",
]
@@ -500,8 +500,8 @@ of letting it guess; the profile from the interview lives in
itself:
$ SPLINTER_A2A_SERVER_TOKEN=... splinter --a2a-server-listen 127.0.0.1 --a2a-listen-port 8099
splinter: A2A server on 127.0.0.1:8099 (token required)
-POST /a2a takes SendMessage and GetTask
-as JSON-RPC; the agent card lives at
+
POST /a2a takes SendMessage, SendStreamingMessage
+(SSE) and GetTask as JSON-RPC; the agent card lives at
/.well-known/agent-card.json. One turn per request, its own
conversation. Beyond loopback the bearer token is required.
""",
]
@@ -590,8 +590,8 @@ fecha o dia quando acaba.""",
si mesmo:
$ SPLINTER_A2A_SERVER_TOKEN=... splinter --a2a-server-listen 127.0.0.1 --a2a-listen-port 8099
splinter: A2A server on 127.0.0.1:8099 (token required)
-POST /a2a aceita SendMessage e GetTask
-em JSON-RPC; o agent card fica em
+
POST /a2a aceita SendMessage, SendStreamingMessage
+(SSE) e GetTask em JSON-RPC; o agent card fica em
/.well-known/agent-card.json. Um turno por requisicao, conversa
propria. Fora do loopback o token Bearer e obrigatorio.
""",
]