Upgrading from 0.7 to 0.8

A deliberate breaking release: three deprecations announced in 0.7 come out, on the schedule their notes named, and two card fields change shape on the wire. Also the release that brought the four crates back into lockstep — a2a-protocol-server alone had been at 0.8.0 while the others sat at 0.7.0. If you pinned them separately, move all four to 0.8.

If you serve gRPC to 0.6 clients, upgrade order matters — get it wrong and it is an outage, not a degradation. Move gRPC clients onto the canonical lf.a2a.v1.A2AService first, then upgrade servers. Unaffected: JSON-RPC, REST and WebSocket deployments, and any gRPC deployment already on the canonical binding, which has been the default since 0.7 and is what the official Go, Python and Java SDKs speak.

The grpc-legacy-json feature and the JSON-tunnel gRPC service are removed

Releases before 0.7 tunneled JSON inside a protobuf bytes envelope on a non-standard service, a2a.v1.A2aService, served alongside the canonical binding behind an off-by-default feature so that 0.6 clients survived a rolling upgrade. The service is no longer registered on the listener, so a 0.6 client's calls fail at the gRPC layer and fall back to nothing.

Gone with it: the feature on a2a-protocol-server and a2a-protocol-sdk, dispatch/grpc/service.rs, GrpcDispatcher::into_legacy_service, the LegacyA2aServiceServer / LegacyGrpcServiceImpl re-exports, the JSON codec helpers (encode_json / decode_json / reader_to_grpc_stream), the a2a.v1 proto and its build step.

# 0.7
a2a-protocol-server = { version = "0.7", features = ["grpc", "grpc-legacy-json"] }
# 0.8
a2a-protocol-server = { version = "0.8", features = ["grpc"] }

There is no in-process migration for a client on the old service: it moves to lf.a2a.v1.A2AService. GrpcDispatcher::serve and into_service are unchanged for everyone already on it.

with_event_queue_write_timeout and with_write_timeout are removed

RequestHandlerBuilder::with_event_queue_write_timeout and EventQueueManager::with_write_timeout, deprecated no-ops since 0.7. Event-queue writes to the broadcast side never block — a slow streaming consumer receives an explicit lag error on its reader rather than exerting backpressure on the executor — so neither setter ever did anything.

Delete the call. To bound a slow consumer, size the queue and handle the lag error on the reader:

// 0.7
let handler = RequestHandlerBuilder::new(agent)
    .with_event_queue_write_timeout(Duration::from_secs(5))
    .build()?;
#![allow(unused)]
fn main() {
use a2a_protocol_server::RequestHandlerBuilder;

fn sized(builder: RequestHandlerBuilder) -> RequestHandlerBuilder {
    builder.with_event_queue_capacity(1024)
}
}

The two public setters are gone. DEFAULT_WRITE_TIMEOUT (5 s) is still exported — 0.8 kept it, and a then-dead field on InMemoryQueueWriter, rather than change that constructor's arity — and since 0.10 it is enforced: a write that cannot reach the persistence channel within it fails with an error naming the stalled processor.

The bare a2a-notification-token header leaves the default CORS allow-list

x-a2a-notification-token is canonical and stays; the unprefixed spelling was this SDK's own pre-0.7 name. A browser-hosted webhook receiver behind the same CORS policy that still reads the bare header can restore it — CorsConfig::allow_headers is a plain String and always was, so this changes a default, not a capability:

#![allow(unused)]
fn main() {
use a2a_protocol_server::CorsConfig;

let mut cors = CorsConfig::new("https://console.example.com");
cors.allow_headers.push_str(", a2a-notification-token");
let _ = cors;
}

Hand it to JsonRpcDispatcher::with_cors or RestDispatcher::with_cors as before.

AgentCard.url is no longer emitted

It is the v0.3 top-level URL. The v1.0 AgentCard has no url; supportedInterfaces replaced it, and emitting it made the card fail the specification's own JSON schema. The field is still parsed, so a card from a v0.3 peer still loads. To publish an agent's address, populate supported_interfaces (a Vec<AgentInterface>; 0.10 → 0.11 shows one).

{ "name": "…", "url": "https://agent.example.com/rpc", "supportedInterfaces": [ … ] }

becomes

{ "name": "…", "supportedInterfaces": [ { "url": "https://agent.example.com/rpc", "protocolBinding": "JSONRPC", "protocolVersion": "1.0" } ] }

A consumer that read url from the raw JSON needs the interface list instead.

AgentCard.securitySchemes is emitted in the v1.0 wire shape

SecurityScheme is a protobuf oneof, so its ProtoJSON encoding is a single-key object naming the arm. The SDK emitted the v0.3 OpenAPI-style form. The bytes on /.well-known/agent-card.json change:

{ "type": "apiKey", "in": "header", "name": "X-API-Key" }

becomes

{ "apiKeySecurityScheme": { "location": "header", "name": "X-API-Key" } }

Both encodings are accepted on input (the v1.0 form under either the json_name or the proto field-name spelling of the arm, and the v0.3 form), and a v0.3 scheme normalises to the v1.0 form on re-emission. ApiKeySecurityScheme emits location, with in kept as an alias. Deserialization is strictly more permissive than before; only a consumer reading the card's raw JSON keys rather than parsing it with an A2A implementation notices.

Back to Upgrading Between Minor Versions.