protocol_droid/adapters/primary/a2a/mod.rs
1//! Primary adapters for the A2A protocol.
2//!
3//! The A2A spec's surface on the server side is a
4//! well-known path (the agent card) and a JSON-RPC
5//! endpoint (the methods), plus a streaming
6//! variant of two of the methods. This module
7//! is the driving adapter for all three:
8//!
9//! - [`well_known_serve`] serves the agent card
10//! on the well-known path.
11//! - [`jsonrpc_serve`] serves the regular
12//! (request/response) JSON-RPC endpoint.
13//! - [`streaming_serve`] serves the streaming
14//! (SSE) JSON-RPC endpoint.
15//!
16//! Feature-gated on `a2a` (the value objects) AND
17//! `http` (the axum dep). A consumer who turns on
18//! `a2a` but not `http` gets the value objects and
19//! the JSON-RPC method table but not the HTTP
20//! serving — they can implement their own transport
21//! without paying the axum cost.
22#[cfg(all(feature = "a2a", feature = "http"))]
23pub mod jsonrpc_serve;
24#[cfg(all(feature = "a2a", feature = "http"))]
25pub mod serve_agent;
26#[cfg(all(feature = "a2a", feature = "http"))]
27pub mod streaming_serve;
28#[cfg(all(feature = "a2a", feature = "http"))]
29pub mod streaming_typed_dispatch;
30#[cfg(all(feature = "a2a", feature = "http"))]
31pub mod well_known_serve;