On this page

0167: HTTP reuses pieces, not a shared transport abstraction

Status: Accepted by maintainer 2026-11-07; partially superseded by 0247 (accepted 2026-11-15; still no cross-protocol Service)

Context

HTTP, MCP and A2A all move requests and responses. MCP server mode is serve_line(State, str) -> Reply { state, out } with a six-line stdin loop in the example main. A2A is handle(Store, str, H) -> Reply with a Transport { exchange(str) -> result<str, str> } used by fixtures and loopback. The agent plugin has CurlProcess and curl_send, an SSE parser, and jsonscan, all tied to StreamError and the agent platform package. JSON readers already exist three times (mcp.wire, agent/jsonscan, codec/rt).

Decision

Share concrete pieces only:

Do not share:

Consequences

The curl hardening has one owner. The only new abstraction is http.client.Runner, which CurlProcess mirrors. Cross-plugin imports follow the a2a → mcp.wire precedent.

Alternatives