diff --git a/md/features.md b/md/features.md index 23b77aca..5fafa93c 100644 --- a/md/features.md +++ b/md/features.md @@ -56,7 +56,7 @@ serialization and deserialization. Within `mcp_server`, these typed APIs require `schemars`: - `McpTool` -- `McpToolRegistry`, `RegisteredMcpTool`, and `EnabledTools` +- `McpToolRegistry`, `RegisteredMcpTool`, and `UnknownToolError` - `McpToolMetadata` and `McpToolSchema` - The `tool_fn` and `tool_fn_mut` functions diff --git a/md/http-transport.md b/md/http-transport.md index 4db0af73..e1ff6162 100644 --- a/md/http-transport.md +++ b/md/http-transport.md @@ -80,8 +80,12 @@ agent-client-protocol-http = { version = "3", features = ["client"] } # agent-client-protocol-http = { version = "3", features = ["client", "server"] } ``` -The `client` feature exposes `HttpClient`. The `server` feature exposes +The `client` feature exposes `HttpClient`. Its `configure_http` and +`from_http_client` hooks take reqwest types, so add a matching `reqwest` +dependency to customize the HTTP client. The `server` feature exposes `AcpHttpServer`, `ServerOptions`, and `CorsOptions`. +`AcpHttpServer::into_router` returns an `axum::Router` to mount in your axum +application, so your axum dependency must match this crate's. ## Request Cancellation diff --git a/md/mcp-over-acp.md b/md/mcp-over-acp.md index cc7df9c8..71eb84dc 100644 --- a/md/mcp-over-acp.md +++ b/md/mcp-over-acp.md @@ -99,7 +99,7 @@ roll back arbitrary detached application work. ```sh cargo run -p agent-client-protocol-rmcp \ --example stateless_native_mcp \ - --features rmcp_3,unstable_mcp_over_acp,unstable_protocol_v2 + --features rmcp_3,unstable_mcp_over_acp ``` See the [wire reference](./protocol.md#native-mcp-over-acp), diff --git a/md/migration-config-api.md b/md/migration-config-api.md index 547b78eb..d4c3e547 100644 --- a/md/migration-config-api.md +++ b/md/migration-config-api.md @@ -42,17 +42,19 @@ value and preserve the other options. ## CORS policies -Existing variants and constructors remain available. **Breaking:** exhaustive -matches on `CorsOptions` outside the HTTP crate must add a wildcard arm: +In 3.x, `CorsOptions` was a `#[non_exhaustive]` enum, so exhaustive matches +outside the HTTP crate needed a wildcard arm. + +**Breaking:** in v5, `CorsOptions` is an opaque struct and its variants are no +longer public. Code that matched on the variants no longer compiles. +Build policies with `CorsOptions::disabled()`, `CorsOptions::allow_origins(...)`, +or `CorsOptions::allow_any_origin()`, and compare them with `==`: ```rust use agent_client_protocol_http::CorsOptions; fn is_disabled(policy: &CorsOptions) -> bool { - match policy { - CorsOptions::Disabled => true, - _ => false, - } + *policy == CorsOptions::disabled() } ``` diff --git a/md/migration-v5.md b/md/migration-v5.md index a6702e37..648f4e8a 100644 --- a/md/migration-v5.md +++ b/md/migration-v5.md @@ -718,6 +718,18 @@ fn respond(responder: Responder