1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//! Streamable-HTTP transport for ATD — sibling of `atd-server`.
//!
//! This crate implements the SP-streamable-http design
//! (`docs/superpowers/specs/2026-05-11-sp-streamable-http-design.md`):
//! a one-endpoint MCP JSON-RPC 2.0 listener that delegates every
//! `tools/call` to the **same** `atd-runtime::dispatch::run_tool` the
//! Unix-socket transport uses. Browser PWAs, Cursor, Claude.ai, OpenAI
//! Functions over HTTP — anything that speaks MCP Streamable HTTP — can
//! reach an ATD-registered tool through this transport without any
//! bespoke ATD wire knowledge.
//!
//! Composition (SP-streamable-http §4.5):
//!
//! ```rust,ignore
//! let registry: atd_runtime::Registry = my_tools();
//! let cfg = atd_server_http::HttpServerConfig::default();
//! let (router, server) = atd_server_http::Server::builder(registry)
//! .config(cfg)
//! .build();
//! // Adopters may extend the router with their own routes here.
//! server.serve(router).await?;
//! ```
//!
//! What is **not** in this crate (deferred to future SPs — SP §9):
//! - SSE for `tools/call` (single response per request — adopter routes
//! layer SSE on top of the returned `Router`).
//! - `Mcp-Session-Id` sessions / resumability / `Last-Event-ID`.
//! - TLS termination (operators front with nginx / Caddy / Tauri).
//! - OAuth 2.1 token issuance (bearer validated, not minted).
pub use HttpServerConfig;
pub use HttpServerError;
pub use ;
pub use ;