Skip to content

feat!: Update codebase to use A2A 1.0.0 data model#375

Merged
bartek-gralewicz merged 16 commits into
epic/1.0_breaking_changesfrom
bgralewicz/swith_codebase_to_v1_data_model
Apr 2, 2026
Merged

feat!: Update codebase to use A2A 1.0.0 data model#375
bartek-gralewicz merged 16 commits into
epic/1.0_breaking_changesfrom
bgralewicz/swith_codebase_to_v1_data_model

Conversation

@bartek-gralewicz
Copy link
Copy Markdown
Contributor

@bartek-gralewicz bartek-gralewicz commented Mar 25, 2026

Description

Update the codebase to use proto types generated for 1.0.0 spec version.

List of changes

  • Removed old type files: a2a_services.ts and a2a_types.ts.
  • Update the codebase to use new types:
    • Message.content -> Message.parts,
    • TaskStatus.update -> TaskStatus.message
    • SendMessageConfiguration.blocking -> SendMessageConfiguration.returnImmediately (reversed behavior),
    • The AgentCard Structure updates: supportedInterfaces instead of url, preferredTransport, and additionalInterfaces, securityRequirements instead of security.
  • setTaskPushNotificationConfig -> createTaskPushNotificationConfig (+ arguments update).
  • listTasks method is not implemented yet. If used, it will throw NotImplemented error. There is a TODO next to it to mark the place in code.

Fixes (partially) #179 #322 🦕

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 25, 2026

🧪 Code Coverage

⬇️ Download Full Report

Base PR Delta
src/client/factory.ts 95.55% 95.45% 🔴 -0.10%
src/client/transports/rest_transport.ts 81.44% 81.26% 🔴 -0.18%
src/server/events/execution_event_queue.ts 94% 94.33% 🟢 +0.33%
src/server/express/rest_handler.ts 89.3% 89.12% 🔴 -0.18%
src/server/grpc/grpc_service.ts 68.15% 64.62% 🔴 -3.53%
src/server/request_handler/default_request_handler.ts 79.31% 77.99% 🔴 -1.32%
src/server/transports/jsonrpc/jsonrpc_transport_handler.ts 74.78% 77.13% 🟢 +2.35%
src/server/transports/rest/rest_transport_handler.ts 98.75% 98.67% 🔴 -0.08%
src/server/utils.ts 0% 57.89% 🟢 +57.89%
src/types/converters/to_proto.ts 92.68% 98.38% 🟢 +5.70%
Total 84.13% 83.94% 🔴 -0.19%

Generated by coverage-comment.yml

@gemini-code-assist

This comment was marked as outdated.

@bartek-gralewicz

This comment was marked as off-topic.

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 a significant refactoring of the A2A protocol types, migrating from an older a2a_types.js definition to a new a2a.js definition. Key changes include renaming fields such as Message.content to Message.parts, TaskStatus.update to TaskStatus.message, and SendMessageConfiguration.blocking to SendMessageConfiguration.returnImmediately. The AgentCard structure has been updated to use supportedInterfaces instead of url, preferredTransport, and additionalInterfaces, and securityRequirements instead of security. Resource path handling for tasks and push notification configurations has been simplified, moving from name and parent fields to direct id and taskId parameters, which led to the removal of the id_decoding.ts file. Additionally, the setTaskPushNotificationConfig method has been removed from client and transport interfaces. A review comment points out that the listTasks method in the gRPC service is currently unimplemented and suggests either implementing it or providing more robust error handling.

Comment thread src/server/grpc/grpc_service.ts
@bartek-gralewicz bartek-gralewicz marked this pull request as ready for review March 27, 2026 13:21
@bartek-gralewicz bartek-gralewicz requested a review from a team as a code owner March 27, 2026 13:21
@bartek-gralewicz

This comment was marked as outdated.

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 significant refactoring to the A2A protocol implementation, primarily by migrating from the legacy a2a_types.proto to a new a2a.proto definition. This change involves updating message structures (e.g., renaming request to message, content to parts, and update to message), updating transport handlers, and adjusting test cases to reflect these structural changes. Additionally, the pull request updates the AgentCard structure to use supportedInterfaces instead of url and additionalInterfaces, and updates various task status and push notification configurations. My feedback is to use UnsupportedOperationError instead of a generic Error in the listTasks implementation to correctly signal an unimplemented method.

Comment thread src/server/grpc/grpc_service.ts Outdated
@ishymko ishymko changed the title feat: Update codebase to use A2A 1.0.0 data model feat!: Update codebase to use A2A 1.0.0 data model Apr 2, 2026
Comment thread tck/agent/index.ts
Comment thread src/server/transports/jsonrpc/jsonrpc_transport_handler.ts Outdated
Comment thread src/server/grpc/grpc_service.ts Outdated
Comment thread src/server/events/execution_event_queue.ts Outdated
@bartek-gralewicz bartek-gralewicz merged commit fc94448 into epic/1.0_breaking_changes Apr 2, 2026
9 checks passed
@bartek-gralewicz bartek-gralewicz deleted the bgralewicz/swith_codebase_to_v1_data_model branch April 2, 2026 12:35
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