Repository navigation
Conversation
…rate - HttpClientError is #[non_exhaustive] with rustdoc on every variant. Its url and reqwest causes are #[source] instead of #[from], and Display no longer repeats the source. - CorsOptions is an opaque struct built through its constructors, so the Vec<HeaderValue> payload is no longer public. - Re-export axum, reqwest, and url, which appear in public signatures. - Add crate docs and AcpHttpServer rustdoc, including a v1+v2 AgentProtocolRouter example and a # Panics section on into_router, covered by tests. BREAKING CHANGE: HttpClientError is non-exhaustive and no longer implements From<url::ParseError> or From<reqwest::Error>. CorsOptions variants are no longer public; use CorsOptions::disabled(), allow_origins(..), and allow_any_origin(). Co-Authored-By: Claude <noreply@anthropic.com>
- Builder-built MCP servers report the builder name and a new McpServerBuilder::version (default 0.0.0) as serverInfo instead of rmcp. - Tool errors, including arguments that do not match the input schema, become tools/call results with isError: true. Unknown or disabled tools still get -32602. RegisteredMcpTool::call_tool reports bad arguments as -32602 instead of -32603. - The native MCP-over-ACP path follows the core crate's unstable_mcp_over_acp feature through a hidden __if_mcp_over_acp! macro, so enabling it only on agent-client-protocol no longer makes each request bridge a fresh rmcp service. - EnabledTools is crate-private. enable_tool/disable_tool return UnknownToolError, a local error, instead of a -32600 Error. - McpServerExt is sealed and McpConnectionContext::Acp is non_exhaustive. - Drop rmcp's no-op unstable_protocol_v2 passthrough feature. - Make the tool_fn/tool_fn_mut builder examples compile with their macro argument. BREAKING CHANGE: EnabledTools is no longer exported. enable_tool and disable_tool return UnknownToolError. McpServerExt is sealed. McpConnectionContext::Acp is non_exhaustive. agent-client-protocol-rmcp no longer has an unstable_protocol_v2 feature. Builder tool errors are now isError results rather than JSON-RPC errors. Co-Authored-By: Claude <noreply@anthropic.com>
- AcpAgent::spawn_process is pub(crate). It exposed async_process types from a private optional dependency and skipped the process-group guard. - Remove AcpAgent::claude_agent() and AcpAgent::codex(), which ran unpinned npx @latest adapters. Use AcpAgent::from_str with a version. - Shutdown test scripts install their TERM trap before writing the PID file that starts shutdown, and the SIGKILL test gives the trap a 1s terminate window, so a loaded machine still records SIGTERM. BREAKING CHANGE: AcpAgent::spawn_process, AcpAgent::claude_agent, and AcpAgent::codex are no longer public. Co-Authored-By: Claude <noreply@anthropic.com>
MatchDispatch::otherwise_ignore dropped an unmatched request, which now answers -32603. It answers -32601 instead, and still ignores unmatched notifications and responses. The MatchDispatch and MatchDispatchFrom examples use Error::method_not_found(), and the if_request / if_notification docs describe what happens when params fail to parse instead of saying the call has no effect or naming handle_if. Co-Authored-By: Claude <noreply@anthropic.com>
…Send bounds - The v1 permission recipe sends session/cancel before answering cancelled, like the v2 recipe, and now compiles as a doctest. - The custom handler recipe says that it parses a raw Dispatch as v1 types and only belongs on a v1 connection. - The WebAssembly docs say that handlers, transports, and connection futures must be Send on every target and how to keep !Send host values outside the connection. Co-Authored-By: Claude <noreply@anthropic.com>
Add a migration-v5 entry for MatchDispatch::otherwise_ignore answering unmatched requests with -32601 and its effect on v1::ActiveSession::read_to_string. Rewrite the CORS section of the config migration guide so it no longer says the variants are still available. Document __if_mcp_over_acp! as a stable cross-crate contract for 5.x, and test that RegisteredMcpTool::call_tool reports bad arguments as -32602. Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of the 5.0.0 public-API cleanup. This PR covers the HTTP crate,
mcp_server, the rmcp crate,AcpAgent, and some cookbook/docs nits. Breaking changes are listed inmd/migration-v5.md.Addressed
HttpClientError: now#[non_exhaustive]with rustdoc. Its causes use#[source]instead of#[from], andDisplayno longer repeats the source.CorsOptions: now an opaque struct built through its constructors. TheVec<HeaderValue>payload is no longer public.md/migration-config-api.mddescribes the 3.x enum and the v5 struct separately.axum(server) andreqwest/url(client).AcpHttpServerrustdoc with a v1+v2AgentProtocolRouterexample and a# Panicssection oninto_router(covered by tests).EnabledToolsis crate-private.enable_tool/disable_toolreturn a localUnknownToolErrorinstead of a -32600Error.?still converts it.McpServerExtis sealed.McpConnectionContext::Acpis#[non_exhaustive].McpServerBuilder::version(default0.0.0) asserverInfo. The trace snapshot is updated.isError: trueresults. Unknown or disabled tools still get -32602.RegisteredMcpTool::call_toolreports bad arguments as -32602 instead of -32603, covered by a unit test.__if_mcp_over_acp!macro. Its rustdoc says it is a stable cross-crate contract for 5.x, so renaming it is breaking. Fully un-gating the constructor isn't possible becauseMcpServiceuses schema types that are only available behindunstable_mcp_over_acp.unstable_protocol_v2feature. The v2 example gets the core feature through a dev-dependency.tool_fn/tool_fn_mutbuilder examples compile, including the macro argument.AcpAgent::spawn_processispub(crate).AcpAgent::claude_agent()/codex()presets, which ran unpinned@latestnpx packages. The migration guide showsfrom_strwith a pinned version.MatchDispatch::otherwise_ignorenow answers unmatched requests with -32601. The examples usemethod_not_found(). Fixed the stale "no effect" andhandle_ifdocs. The migration guide covers the change and its effect onv1::ActiveSession::read_to_string, where requests routed to the session that it does not handle now get -32601.session/cancelbefore answeringcancelled. It now compiles as a doctest.Dispatchas v1 types.Sendrequirement and how to keep!Sendhost values outside the connection.graceful_shutdown_sigkills_child_ignoring_sigterm: the scripts install the TERM trap before writing the PID file that starts shutdown, and the terminate window is now 1s (the test takes about 1.1s). 16 parallel runs under extra CPU load all passed.Skipped
new/builderfor a base URL,with_endpoint/builder_with_endpointfor an exact URL,from_http_clientfor a prebuilt client). Renaming them would churn the docs and callers for little gain.