Skip to main content

protocol_droid/adapters/secondary/
mod.rs

1//! Driven adapters: the client transports and the injected side-effect ports.
2//!
3//! Populated by T13 (stdio, including child-process spawning), T14 and T15
4//! (client-side HTTP transports) and T10 (the `Clock` and `IdSource` ports the
5//! domain depends on but must never call globally).
6
7pub mod codec;
8pub mod idempotency;
9// T29. The ACP stdio peer — the driven adapter that
10// talks newline-delimited JSON-RPC 2.0 to a child
11// process. The peer is the seam a future application
12// layer dispatches `initialize` (and the session
13// lifecycle methods) through. Gated on
14// `acp-experimental` because the spec is pre-1.0 and
15// the task lists the module as experimental; the
16// gate is what keeps the `tokio` runtime out of a
17// lean build that never speaks ACP.
18#[cfg(feature = "acp-experimental")]
19pub mod acp;
20// T16. A session id source that does not enumerate. `IdSource` has been a port
21// with no production implementation since T10 — every test writes its own
22// `fetch_add`, which is the obvious thing to copy into production by accident.
23// Gated on its own feature because the only reason to link an entropy source is
24// to ask it for unpredictable session ids.
25#[cfg(feature = "random-ids")]
26pub mod id_source;
27pub mod mcp;
28// T16. The OAuth token sources: RFC 7662 introspection and JWT/JWKS. Gated on
29// `oauth` rather than on `http` even though both open a socket, because the
30// JWS signature check is a second reason on top of that one — and a consumer
31// that wants an authorization gate over a socket it already has still should
32// not be made to link a JOSE implementation to get it.
33#[cfg(feature = "oauth")]
34pub mod oauth;
35
36#[cfg(feature = "http")]
37pub mod transport;
38
39// T13. The client half of the stdio transport: spawning a child server, killing
40// it on drop, and keeping its stderr off the protocol stream. Gated with the
41// server half because it is the same dependency — a tokio runtime and pipes —
42// and a build that speaks stdio on one side and not the other has no use.
43#[cfg(feature = "stdio")]
44pub mod stdio;
45// T27. The A2A (Agent2Agent) JSON-RPC method table. Sits beside the MCP table
46// rather than inside it — the protocol-neutral core in `application/jsonrpc`
47// is what routes on the table, and a future ACP table slots in the same way.
48// Gated on its own feature because the dependency footprint is independent
49// of MCP and a consumer that never speaks A2A should not pay it.
50#[cfg(feature = "a2a")]
51pub mod a2a;