agent-client-protocol-v2.0.0
Version 2.0 keeps the stable ACP v1 wire schema unchanged while making coordinated breaking
changes to the Rust SDK APIs and low-level transport boundary.
Breaking changes
Channelnow carries batch-awareTransportFramevalues, and customChannelorConnectTo
relays must preserve frames rather than forwarding individual messages.Linesand
ByteStreamsfields are private; construct those adapters withnew.
(#275,
#280)- JSON-RPC APIs now reflect protocol roles: notifications are never answered,
ResponseRouterusesroute*methods, typed request IDs are borrowed, and
TypeNotificationis role-independent. (#272,
#277) - Handler and routing APIs now use explicit ownership and terminology:
DynamicHandlerGuardreplaces cloneable registrations, background tasks usewith_runner,
combined matchers useif_dispatch*, and obsolete low-level helpers have been removed.
(#277,
#280,
#283) - MCP-over-ACP now uses the feature-gated schema-native
McpServer::Acp,mcp/connect,
mcp/message, and request/responsemcp/disconnecttypes. The SDK-local wire types,
acp:HTTP declarations, and legacy accessors are removed; MCP and session accessors now
borrow typed identifiers and connection state. (#281) AcpAgentnow usesAcpAgentConfig, represents JSON environment variables as an object, and
no longer provides the deprecated Zed constructors or the Gemini convenience constructor.
(#276,
#280)- Response callbacks that select ordered consumption before a response is routed during its
original dispatch now finish before later inbound messages are dispatched. Already-routed
responses and locally delivered failures do not add this barrier. Framework session setup is
ordered, while user session work remains concurrent. An ordered callback must not await later
inbound traffic on the same connection.
(#282)
See the 2.0 migration guide for exact API replacements and migration examples.
Added
- Accept incoming JSON-RPC batches on stable v1 and draft v2 connections, process entries
independently, and group replies into one response array. Typed requests and notifications
are still sent individually. (#271,
#275) - Add
SentRequest::mapfor transforming a response with one-shot closures without requiring the
mapped output to implementJsonRpcResponse. Values consumed withblock_taskmay carry
non-'staticlifetimes; callback-style consumption remains'static.
(#278)
Changed
- Update
agent-client-protocol-schemato 1.5.0. The stable v1 wire schema is unchanged; the
opt-in draft v2 API gains semantic newtypes, revised diff and terminal types, and generic
fallible conversions. (#273)
Fixed
- Install framework-owned session and proxy routes before later messages, route response-handler
failures to the pending local request, and prevent handlers from emitting a second response
after already responding. (#280,
#282) - Preserve batch boundaries across adapters, routers, and tracing; retain invalid call entries
without aborting relays; do not reply to malformed response-shaped input; and complete dropped
batched responders so sibling replies can flush.
(#275,
#280) - During protocol negotiation, ignore response-only traffic before initialization, preserve
response siblings in mixed initialization batches, flush initialization rejections before
closing, and drop unused protocol probes before falling back to v1.
(#280,
#285) - Preserve
MatchDispatchFromretry state across chained matchers.
(#274)