Skip to content

agent-client-protocol-v2.0.0

Choose a tag to compare

@acp-release-bot acp-release-bot released this 23 Jul 14:52
· 47 commits to main since this release
ce02327

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

  • Channel now carries batch-aware TransportFrame values, and custom Channel or ConnectTo
    relays must preserve frames rather than forwarding individual messages. Lines and
    ByteStreams fields are private; construct those adapters with new.
    (#275,
    #280)
  • JSON-RPC APIs now reflect protocol roles: notifications are never answered,
    ResponseRouter uses route* methods, typed request IDs are borrowed, and
    TypeNotification is role-independent. (#272,
    #277)
  • Handler and routing APIs now use explicit ownership and terminology:
    DynamicHandlerGuard replaces cloneable registrations, background tasks use with_runner,
    combined matchers use if_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/response mcp/disconnect types. 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)
  • AcpAgent now uses AcpAgentConfig, 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::map for transforming a response with one-shot closures without requiring the
    mapped output to implement JsonRpcResponse. Values consumed with block_task may carry
    non-'static lifetimes; callback-style consumption remains 'static.
    (#278)

Changed

  • Update agent-client-protocol-schema to 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 MatchDispatchFrom retry state across chained matchers.
    (#274)