a2a: discover the endpoint from an agent card

SPLINTER_A2A_CARD names the card; the first send picks the JSONRPC entry
from supportedInterfaces, falls back to the older single url field, and
keeps the discovered URL for the session. SPLINTER_A2A_URL still wins
when both are set. The card fetch uses the same secret handling as a
send: the bearer token goes through curl's stdin.

The fake agent serves both card shapes, and test_a2a.sh covers discovery
with and without supportedInterfaces.
This commit is contained in:
lotherk committed 2026-11-09 23:34:59 +00:00
1 parent 93e955a4c7
commit d95ac721be
10 files changed
+211 -20

No files matched your search

+9 -4
View File
@@ -292,8 +292,13 @@ completed status message is the answer only when no artifact or direct message
text came. One-shot mode streams too unless `--no-stream` asks for the blocking
`SendMessage` path.
The endpoint can be configured directly (`SPLINTER_A2A_URL`) or discovered:
`SPLINTER_A2A_CARD` names the agent card, and the first call picks the
`JSONRPC` entry from `supportedInterfaces` (or the older single `url` field).
The discovered URL is kept for the session.
Not implemented yet, and named so nobody assumes otherwise: file/structured-data
parts, push notifications, `GetTask`/`CancelTask`, and agent-card discovery. The
endpoint is configured directly. `tests/fake_a2a.py` and `tests/test_a2a.sh` pin
the blocking wire shape, both result forms, the bearer token and a JSON-RPC
error; `tests/test_a2a_ui.sh` drives the streaming path through tmux.
parts, push notifications, `GetTask`/`CancelTask`, and the server direction.
`tests/fake_a2a.py` and `tests/test_a2a.sh` pin the blocking wire shape, both
result forms, the bearer token, a JSON-RPC error, streaming and discovery;
`tests/test_a2a_ui.sh` drives the streaming path through tmux.
+3 -3
View File
@@ -3,9 +3,9 @@
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: Discovery und Server** — der Client (`plugins/a2a/a2a.c`) kann
`SendMessage` und, in der UI, `SendStreamingMessage` mit Text. Offen sind
Datei- und strukturierte Teile, Push-Notifications, Discovery,
1. **A2A: Server** — der Client (`plugins/a2a/a2a.c`) kann `SendMessage`,
`SendStreamingMessage` (in der UI) und Agent-Card-Discovery, alles mit Text.
Offen sind Datei- und strukturierte Teile, Push-Notifications,
`GetTask`/`CancelTask` und die Server-Seite, damit die Flotte splinter rufen
kann. `swarm` ist nur lokale IPC im selben Verzeichnis, kein A2A.