Skip to content

chore: regenerate latest types from A2A main#712

Merged
ishymko merged 1 commit into1.0-devfrom
ishymko/regen-types
Feb 19, 2026
Merged

chore: regenerate latest types from A2A main#712
ishymko merged 1 commit into1.0-devfrom
ishymko/regen-types

Conversation

@ishymko
Copy link
Member

@ishymko ishymko commented Feb 19, 2026

Active updates are happening to A2A repo currently. Switch buf.gen.yaml back to main (#699 switched it to the 1.0 RC tag to progress with merge without regenerating files) and update code to work with the latest changes.

Re #559.

Active updates are happening to [A2A repo](https://github.com/a2aproject/A2A/commits/main/) currently. Switch `buf.gen.yaml` back to `main` (#699 switch it to the 1.0 RC tag to progress with merge without regenerating files) and update code to work with the latest changes.
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @ishymko, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request synchronizes the project's protobuf-generated types with the latest main branch of the upstream A2A repository. This update involved modifying the buf.gen.yaml to point to the active development branch, which triggered several changes in the generated code. Key adjustments include renaming the ListTaskPushNotificationConfig API to ListTaskPushNotificationConfigs for improved clarity, refactoring the TaskPushNotificationConfig to remove a redundant id field and its corresponding config_id in creation requests, and updating the protobuf package namespace. Additionally, the CancelTaskRequest now supports an optional metadata field. These changes ensure compatibility with the evolving A2A protocol and enhance the API's consistency and functionality.

Highlights

  • Protobuf Type Regeneration: Updated the buf.gen.yaml configuration to pull the latest protobuf definitions from the main branch of the a2aproject/A2A repository, moving away from a v1.0.0-rc tag.
  • API Endpoint Renaming: Renamed the ListTaskPushNotificationConfig API endpoint and its associated request/response types to ListTaskPushNotificationConfigs to better reflect its plural nature across Python code, protobuf definitions, and gRPC stubs.
  • Task Push Notification Config Structure Update: Modified the TaskPushNotificationConfig protobuf message by removing its direct id field and the config_id field from CreateTaskPushNotificationConfigRequest, streamlining how push notification configurations are managed.
  • Package Namespace Change: Updated the protobuf package namespace from a2a.v1 to lf.a2a.v1, affecting generated code and gRPC service paths.
  • Cancel Task Request Enhancement: Added a metadata field to the CancelTaskRequest protobuf message, allowing for additional contextual information during task cancellation.
Changelog
  • buf.gen.yaml
    • Updated the ref for the a2aproject/A2A git repository from v1.0.0-rc to main.
  • src/a2a/server/apps/jsonrpc/jsonrpc_app.py
    • Updated imports to use ListTaskPushNotificationConfigsRequest.
    • Renamed ListTaskPushNotificationConfig to ListTaskPushNotificationConfigs in the _method_map.
    • Renamed ListTaskPushNotificationConfigRequest to ListTaskPushNotificationConfigsRequest in the _process_non_streaming_request method.
    • Renamed list_push_notification_config to list_push_notification_configs in the _process_non_streaming_request method call.
  • src/a2a/server/request_handlers/default_request_handler.py
    • Updated imports to use ListTaskPushNotificationConfigsRequest and ListTaskPushNotificationConfigsResponse.
    • Removed the id field from TaskPushNotificationConfig initialization in on_create_task_push_notification_config.
    • Removed the id field from TaskPushNotificationConfig initialization in on_get_task_push_notification_config.
    • Renamed on_list_task_push_notification_config method to on_list_task_push_notification_configs.
    • Updated parameter type from ListTaskPushNotificationConfigRequest to ListTaskPushNotificationConfigsRequest in on_list_task_push_notification_configs.
    • Updated return type from ListTaskPushNotificationConfigResponse to ListTaskPushNotificationConfigsResponse in on_list_task_push_notification_configs.
    • Updated docstring for on_list_task_push_notification_configs.
    • Renamed ListTaskPushNotificationConfigResponse to ListTaskPushNotificationConfigsResponse in the return statement of on_list_task_push_notification_configs.
    • Removed the id field from TaskPushNotificationConfig initialization within the configs list of on_list_task_push_notification_configs.
  • src/a2a/server/request_handlers/jsonrpc_handler.py
    • Updated imports to use ListTaskPushNotificationConfigsRequest.
    • Renamed list_push_notification_config method to list_push_notification_configs.
    • Updated parameter type from ListTaskPushNotificationConfigRequest to ListTaskPushNotificationConfigsRequest in list_push_notification_configs.
    • Updated docstring for list_push_notification_configs.
    • Renamed on_list_task_push_notification_config to on_list_task_push_notification_configs in the method call.
    • Updated comment to reflect ListTaskPushNotificationConfigsResponse.
  • src/a2a/server/request_handlers/request_handler.py
    • Updated imports to use ListTaskPushNotificationConfigsRequest and ListTaskPushNotificationConfigsResponse.
    • Corrected a typo in a docstring from ServerError(UnsupportedOperationError) to ServerError(UnsupportedOperationError).
    • Renamed abstract method on_list_task_push_notification_config to on_list_task_push_notification_configs.
    • Updated parameter type from ListTaskPushNotificationConfigRequest to ListTaskPushNotificationConfigsRequest in on_list_task_push_notification_configs.
    • Updated return type from ListTaskPushNotificationConfigResponse to ListTaskPushNotificationConfigsResponse in on_list_task_push_notification_configs.
    • Updated docstring for on_list_task_push_notification_configs.
  • src/a2a/types/init.py
    • Updated imports to use ListTaskPushNotificationConfigsRequest and ListTaskPushNotificationConfigsResponse.
    • Added ListTaskPushNotificationConfigsRequest to the Request type union.
    • Updated __all__ export list to use ListTaskPushNotificationConfigsRequest and ListTaskPushNotificationConfigsResponse.
  • src/a2a/types/a2a_pb2.py
    • Updated the serialized file descriptor to reflect new protobuf definitions.
    • Changed the protobuf package name from a2a.v1 to lf.a2a.v1.
    • Removed the id field from TaskPushNotificationConfig.
    • Removed the config_id field from CreateTaskPushNotificationConfigRequest.
    • Added a metadata field to CancelTaskRequest.
    • Renamed ListTaskPushNotificationConfig to ListTaskPushNotificationConfigs in service method definitions and options.
  • src/a2a/types/a2a_pb2.pyi
    • Removed id from TaskPushNotificationConfig slots and __init__ method signature.
    • Added metadata to CancelTaskRequest slots and __init__ method signature.
    • Removed config_id from CreateTaskPushNotificationConfigRequest slots and __init__ method signature.
    • Renamed ListTaskPushNotificationConfigRequest to ListTaskPushNotificationConfigsRequest.
    • Renamed ListTaskPushNotificationConfigResponse to ListTaskPushNotificationConfigsResponse.
  • src/a2a/types/a2a_pb2_grpc.py
    • Updated docstring for A2AServiceStub and A2AServiceServicer.
    • Updated gRPC service method paths from /a2a.v1.A2AService/ to /lf.a2a.v1.A2AService/ for all methods.
    • Renamed ListTaskPushNotificationConfig to ListTaskPushNotificationConfigs in A2AServiceStub.
    • Updated request and response deserializers for ListTaskPushNotificationConfigs to use ListTaskPushNotificationConfigsRequest and ListTaskPushNotificationConfigsResponse.
    • Updated docstrings for various service methods to be more descriptive.
    • Renamed ListTaskPushNotificationConfig to ListTaskPushNotificationConfigs in A2AServiceServicer.
    • Renamed ListTaskPushNotificationConfig to ListTaskPushNotificationConfigs in add_A2AServiceServicer_to_server.
    • Updated request and response deserializers for ListTaskPushNotificationConfigs in add_A2AServiceServicer_to_server.
    • Updated the target service name in grpc.method_handlers_generic_handler and server.add_registered_method_handlers.
  • tests/client/transports/test_grpc_client.py
    • Removed id field assignment from sample_task_push_notification_config.
    • Removed config_id field assignment from CreateTaskPushNotificationConfigRequest in test_set_task_callback_with_valid_task.
    • Adjusted assertion in test_set_task_callback_with_valid_task to check push_notification_config.id instead of id.
    • Removed id field assignment from TaskPushNotificationConfig mock return value in test_set_task_callback_with_invalid_task.
    • Removed config_id field assignment from CreateTaskPushNotificationConfigRequest in test_set_task_callback_with_invalid_task.
    • Removed id field assignment from TaskPushNotificationConfig mock return value in test_get_task_callback_with_invalid_task.
    • Adjusted GetTaskPushNotificationConfigRequest in test_http_transport_get_task_callback and test_grpc_transport_get_task_callback to use push_notification_config.id.
  • tests/client/transports/test_jsonrpc_client.py
    • Removed id field from the expected JSON result in test_get_task_callback_success.
  • tests/e2e/push_notifications/test_default_push_notification_support.py
    • Removed config_id field assignment from CreateTaskPushNotificationConfigRequest.
  • tests/integration/test_client_server_integration.py
    • Removed id field assignment from CALLBACK_CONFIG initialization.
    • Removed config_id field assignment from CreateTaskPushNotificationConfigRequest in test_http_transport_set_task_callback and test_grpc_transport_set_task_callback.
    • Adjusted assertions in test_http_transport_set_task_callback and test_grpc_transport_set_task_callback to check push_notification_config.id instead of id.
    • Adjusted GetTaskPushNotificationConfigRequest in test_http_transport_get_task_callback and test_grpc_transport_get_task_callback to use push_notification_config.id.
  • tests/server/request_handlers/test_default_request_handler.py
    • Updated imports to use ListTaskPushNotificationConfigsRequest.
    • Removed config_id field assignment from CreateTaskPushNotificationConfigRequest in test_set_task_push_notification_config_no_notifier and test_set_task_push_notification_config_task_not_found.
    • Renamed on_list_task_push_notification_config to on_list_task_push_notification_configs in test calls.
    • Updated ListTaskPushNotificationConfigRequest to ListTaskPushNotificationConfigsRequest in test parameters.
    • Removed config_id field assignment from CreateTaskPushNotificationConfigRequest in test_get_task_push_notification_config_info_with_config and test_get_task_push_notification_config_info_with_config_no_id.
    • Removed config_id field assignment from CreateTaskPushNotificationConfigRequest in test_list_task_push_notification_config_info_with_config_and_no_id.
  • tests/server/request_handlers/test_jsonrpc_handler.py
    • Updated imports to use ListTaskPushNotificationConfigsRequest and ListTaskPushNotificationConfigsResponse.
    • Removed config_id field assignment from CreateTaskPushNotificationConfigRequest in test_set_push_notification_success, test_get_push_notification_success, test_push_notifications_not_supported_error, and test_on_set_push_notification_no_push_config_store.
    • Removed id field assignment from TaskPushNotificationConfig in test_on_get_push_notification.
    • Adjusted assertion in test_on_get_push_notification to check response['result']['pushNotificationConfig']['id'].
    • Removed id field assignment from TaskPushNotificationConfig in test_on_list_push_notification.
    • Updated ListTaskPushNotificationConfigResponse to ListTaskPushNotificationConfigsResponse in test_on_list_push_notification.
    • Renamed on_list_task_push_notification_config to on_list_task_push_notification_configs in test_on_list_push_notification and test_on_list_push_notification_error.
    • Updated ListTaskPushNotificationConfigRequest to ListTaskPushNotificationConfigsRequest in test_on_list_push_notification and test_on_list_push_notification_error.
  • tests/server/test_integration.py
    • Removed id field assignment from TaskPushNotificationConfig in test_set_push_notification_config and test_get_push_notification_config.
    • Removed config_id field from CreateTaskPushNotificationConfigRequest in test_set_push_notification_config.
  • tests/test_types.py
    • Removed config_id field assignment from CreateTaskPushNotificationConfigRequest in test_set_task_push_notification_config_request.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
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 successfully regenerates the A2A types from the upstream main branch and updates the codebase to align with the new definitions. The changes, including renaming ListTaskPushNotificationConfig* to ListTaskPushNotificationConfigs* and handling the removal of id fields from TaskPushNotificationConfig, are consistently applied across the application logic, tests, and generated files. The updates are clean and correct. Great work on keeping the types up to date!

@ishymko ishymko marked this pull request as ready for review February 19, 2026 14:57
@ishymko ishymko requested a review from a team as a code owner February 19, 2026 14:57
@ishymko ishymko merged commit 427a75b into 1.0-dev Feb 19, 2026
10 of 12 checks passed
@ishymko ishymko deleted the ishymko/regen-types branch February 19, 2026 14:57
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.

1 participant