klieo-a2a
Durable A2A v1.0 protocol layer atop klieo-bus traits.
Part of the klieo Rust agent framework.
Status
0.9.x — public API may evolve before 1.0. See docs/SEMVER.md.
HTTP/SSE transport
klieo-a2a ships an HTTP/SSE transport behind the http
cargo feature. Single POST /a2a endpoint per A2A v1.0
§9.4.2 with JSON-or-SSE response negotiation based on
JSON-RPC method.
[]
= { = "0.9", = ["http"] }
use AllowAnonymous;
use EchoHandler;
use A2aHttpServer;
use A2aTaskStore;
use A2aDispatcher;
use Arc;
use CancellationToken;
async
Streaming methods. SendStreamingMessage and
SubscribeToTask return text/event-stream; all other
methods return application/json.
Security boundary. The HTTP layer adds no authentication
beyond what the configured Authenticator enforces on the
JSON-RPC payload. Bind 127.0.0.1 and front with an
auth-enforcing reverse proxy for any non-localhost
deployment. Plain HTTP only — terminate TLS at the proxy.
See docs/adr/adr-013-a2a-http-sse-transport.md
for the design rationale and out-of-scope items.
BREAKING CHANGES (0.10 → 0.11)
The A2aHandler trait's streaming methods changed return type
to support the new SSE transport. Custom A2aHandler impls
that override either of these methods must update their return
type.
Affected methods
send_streaming_message: wasResult<SendMessageResult, A2aError>→ nowResult<TaskEventStream, A2aError>.subscribe_to_task: wasResult<Task, A2aError>→ nowResult<TaskEventStream, A2aError>.
The trait defaults still return Err(A2aError::MethodNotFound(...)),
so impls that do NOT override these methods are unaffected.
Migration
For an impl that previously returned a single Task or
SendMessageResult, wrap the value in a one-shot stream:
use stream;
use ;
async
See docs/adr/adr-013-a2a-http-sse-transport.md
for the full design rationale.
License
MIT — see LICENSE.