Skip to content

feat: A2A Version Header#422

Merged
bartek-gralewicz merged 15 commits into
epic/1.0_breaking_changesfrom
bgralewicz/version_header
Apr 24, 2026
Merged

feat: A2A Version Header#422
bartek-gralewicz merged 15 commits into
epic/1.0_breaking_changesfrom
bgralewicz/version_header

Conversation

@bartek-gralewicz
Copy link
Copy Markdown
Contributor

Description

Added an A2A Version Header. The followings are now true:

  • Clients send A2A-version header with each request,
  • Server validates version and return VersionNotSupportedError if unsupported,
  • Empty/absent versions are interpreted as 0.3.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 23, 2026

🧪 Code Coverage

⬇️ Download Full Report

Base PR Delta
src/client/multitransport-client.ts 97.11% 97.25% 🟢 +0.14%
src/client/transports/grpc/grpc_transport.ts 91.16% 91.28% 🟢 +0.12%
src/client/transports/json_rpc_transport.ts 58.65% 58.95% 🟢 +0.30%
src/client/transports/rest_transport.ts 85.55% 85.33% 🔴 -0.22%
src/errors.ts 92.68% 96.34% 🟢 +3.66%
src/server/express/json_rpc_handler.ts 94.25% 94.56% 🟢 +0.31%
src/server/express/rest_handler.ts 84.79% 85.13% 🟢 +0.34%
src/server/grpc/grpc_service.ts 73.41% 75.26% 🟢 +1.85%
src/server/request_handler/default_request_handler.ts 80.06% 80.22% 🟢 +0.16%
src/server/transports/jsonrpc/jsonrpc_transport_handler.ts 75.42% 76.76% 🟢 +1.34%
src/server/version.ts (new) 100%
Total 84.8% 85.25% 🟢 +0.45%

Generated by coverage-comment.yml

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces A2A protocol versioning support, ensuring that the A2A-Version header is sent with client requests and validated by the server. It adds version constants, a VersionNotSupportedError, and a validation utility, while updating transport handlers and the ServerCallContext to handle versioning logic. Review feedback suggests improving the robustness of the ServerCallContext constructor's type checking, scoping version validation to specific protocol bindings (e.g., JSONRPC, GRPC), and using a getter for the client's protocol version to avoid stale data if the agent card is updated.

Comment thread src/server/context.ts Outdated
Comment thread src/server/version.ts Outdated
Comment thread src/server/version.ts Outdated
Comment thread src/client/multitransport-client.ts Outdated
Comment thread src/client/multitransport-client.ts Outdated
Comment thread src/server/express/json_rpc_handler.ts Outdated
Comment thread src/server/express/rest_handler.ts Outdated
Comment thread src/server/grpc/grpc_service.ts Outdated
@bartek-gralewicz bartek-gralewicz marked this pull request as ready for review April 23, 2026 12:32
@bartek-gralewicz bartek-gralewicz requested a review from a team as a code owner April 23, 2026 12:32
Comment thread src/client/multitransport-client.ts Outdated
Comment thread src/client/multitransport-client.ts
Comment thread src/server/version.ts Outdated
Comment thread src/constants.ts Outdated
Comment thread src/server/context.ts Outdated
Comment thread src/client/transports/grpc/grpc_transport.ts
Comment thread itk/itk_agent.ts
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, why do we need it? I think in fact it's not the case that this ITK agent supports 0.3 protocol version?

@bartek-gralewicz bartek-gralewicz merged commit b5f3db7 into epic/1.0_breaking_changes Apr 24, 2026
10 checks passed
@bartek-gralewicz bartek-gralewicz deleted the bgralewicz/version_header branch April 24, 2026 11:05
ishymko added a commit that referenced this pull request May 11, 2026
🤖 I have created a release *beep* *boop*
---

## 1.0.0-alpha.0 (2026-05-11)

See the [v0.3 -> v1.0-alpha.0 migration
guide](https://github.com/a2aproject/a2a-js/blob/v1.0.0-alpha.0/docs/migration-guide.md).

**Note**: Enabling backward compatibility with v0.3 is tracked in
[#452](#452).


### ⚠ BREAKING CHANGES

* Drop support for node 18
([#368](#368))
* Make ServerCallContext parameter mandatory across all places
([#405](#405))
* Remove JSON-RPC client
([#353](#353))
* Remove transport-specific exports
([#404](#404))
* Update codebase to use A2A 1.0.0 data model
([#375](#375))
* Remove A2AExpressApp
([#363](#363))

### Features

* Add A2A Version Header
([#422](#422))
([b5f3db7](b5f3db7))
* Add cache-headers logic to the agent card handler
([#435](#435))
([955b52b](955b52b))
* Add resource scoping
([#450](#450))
([c527086](c527086))
* Add support for custom authentication scheme and credentials in
auth-headers ([#430](#430))
([5a4389b](5a4389b))
* AgentCardSignature support
([#448](#448))
([4a41a8c](4a41a8c))
* Enforce events ordering
([#437](#437))
([157cf48](157cf48))
* Enriched Error Model
([#427](#427))
([c130778](c130778))
* Implement listTasks method
([#383](#383))
([7d4c472](7d4c472))
* Send current task as the first event after subscribing to it
([#418](#418))
([4bfcf5f](4bfcf5f))
* Support multi-tenancy
([#419](#419))
([1877877](1877877))

### Code Refactoring

* remove A2AExpressApp
([#363](#363))
([0b84728](0b84728))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: bartek-gralewicz <bgralewicz@google.com>
Co-authored-by: Ivan Shymko <ishymko@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants