Skip to content

Comments

chore: 1.0 dev merge proto refactor#695

Closed
ishymko wants to merge 10 commits into1.0-devfrom
1.0-dev-merge-proto-refactor
Closed

chore: 1.0 dev merge proto refactor#695
ishymko wants to merge 10 commits into1.0-devfrom
1.0-dev-merge-proto-refactor

Conversation

@ishymko
Copy link
Member

@ishymko ishymko commented Feb 17, 2026

Description

Thank you for opening a Pull Request!
Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Follow the CONTRIBUTING Guide.
  • Make your Pull Request title in the https://www.conventionalcommits.org/ specification.
    • Important Prefixes for release-please:
      • fix: which represents bug fixes, and correlates to a SemVer patch.
      • feat: represents a new feature, and correlates to a SemVer minor.
      • feat!:, or fix!:, refactor!:, etc., which represent a breaking change (indicated by the !) and will result in a SemVer major.
  • Ensure the tests and linter pass (Run bash scripts/format.sh from the repository root to format)
  • Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> 🦕

muscariello and others added 3 commits January 24, 2026 11:30
## Summary

This PR migrates the a2a-python SDK from Pydantic-based types to
protobuf-generated types, completing the upgrade to A2A v1.0. Fixes #559

## Breaking Changes

- Replace Pydantic-based type system with protobuf types from `a2a_pb2`
- Update `Part` usage from `Part(root=TextPart(text=...))` to
`Part(text=...)`
- Update `Role` enum from `Role.user`/`Role.agent` to
`Role.ROLE_USER`/`Role.ROLE_AGENT`
- Update `TaskState` enum to use `TASK_STATE_*` prefix

## Changes

- Update all source files to use proto types directly from `a2a_pb2`
- Replace `model_dump()` with `MessageToDict()` for JSON serialization
- Replace `model_copy(deep=True)` with `CopyFrom()` for proto cloning
- Add new types module with proto imports and SDK-specific extras
- Add `proto_utils` module with identity conversion utilities
- Fix REST handler resource name formats for push notification configs
- Fix gRPC handler to use `SubscribeToTask` instead of
`TaskSubscription`
- Fix database task store to handle proto objects from ORM
- Update all test files for proto patterns and assertions
- Fix spelling check failures by updating allow list
- Fix inclusive language check failures:
    - Replace `master` with `main` in documentation
    - Rename `Dummy` classes to `Mock` in tests

## Testing

- **601 tests passing**
- 23 tests skipped (expected - require DB connections or cryptography
deps)

## Related

Builds on top of PR #556

Release-As: 1.0.0

---------

Signed-off-by: Luca Muscariello <muscariello@ieee.org>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Sam Betts <1769706+Tehsmash@users.noreply.github.com>
Co-authored-by: Lukasz Kawka <luk.kawka@gmail.com>
Co-authored-by: Agent2Agent (A2A) Bot <a2a-bot@google.com>
Co-authored-by: Didier Durand <2927957+didier-durand@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Iva Sokolaj <102302011+sokoliva@users.noreply.github.com>
Co-authored-by: Will Chen <36873565+chenweiyang0204@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
## Description
Updates the SDK to support the A2A Protocol v1.0.0-rc specifications.

## Changes
- **Protocol Update**: Updated core types, definitions, `Client`, and
`Server` implementations to match Protocol v1.0.0-rc.
- **Bug Fixes**:
    - Fixed `RestTransport` URL construction.
- Resolved `pyright`, `ruff`, and `mypy` linting errors across the
codebase.
- Fixed import resolution issues for optional dependencies (`grpc`,
`sqlalchemy`, `opentelemetry`).
- **Tests**:
    - Fixed all failing unit and integration tests.
- Added support for running PostgreSQL and MySQL integration tests
(verified locally).
- **Cleanup**: Removed redundant `pyrightconfig.json`.

## Testing
- All unit and integration tests are passing.
- Database integration tests verified locally with Docker containers
(docker-compose file was used for verification but is not included in
the repo).

Re #559

---------

Signed-off-by: Luca Muscariello <muscariello@ieee.org>
@ishymko ishymko changed the base branch from main to 1.0-dev February 17, 2026 12:11
@ishymko ishymko changed the title 1.0 dev merge proto refactor chore: 1.0 dev merge proto refactor Feb 17, 2026
_sym_db = _symbol_database.Default()


from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2


from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
from google.api import client_pb2 as google_dot_api_dot_client__pb2

from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
from google.api import client_pb2 as google_dot_api_dot_client__pb2
from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2
from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
from google.api import client_pb2 as google_dot_api_dot_client__pb2
from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
from google.api import client_pb2 as google_dot_api_dot_client__pb2
from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
import logging

from datetime import datetime, timezone
from typing import Any, cast

from fastapi import FastAPI, HTTPException, Path, Request
from pydantic import BaseModel, ValidationError
from pydantic import BaseModel, ConfigDict, ValidationError
# Attempt to import the optional module
try:
from grpc.aio import Channel # pyright: ignore[reportAssignmentType]
from grpc.aio import Channel # type: ignore[reportMissingModuleSource]
Comment on lines +22 to +26
from a2a.utils.constants import (
TRANSPORT_HTTP_JSON,
TRANSPORT_GRPC,
TRANSPORT_JSONRPC,
)
@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 introduces a significant refactoring of the A2A SDK to standardize on Protocol Buffers for defining and handling core data types. This migration simplifies the codebase, improves type safety, and lays the groundwork for better cross-language compatibility. The changes span client and server components, updating data models, API signatures, and the build pipeline to align with the new Protobuf-centric architecture. Additionally, a new API for listing tasks has been added, and the AgentCard structure has been modernized.

Highlights

  • Protobuf Migration: The core A2A types have been migrated from Pydantic models to Protocol Buffers, enhancing interoperability and performance. This involved removing the old a2a.types Pydantic models and the a2a.grpc directory, replacing them with a new a2a.types package containing proto-generated Python classes.
  • Simplified Client and Server Implementations: Client and server components, including transports (JSON-RPC, REST, gRPC), request handlers, and task management, have been updated to directly utilize the new Protobuf types. This streamlines data handling and reduces conversion overhead.
  • Build Process Overhaul: The build process for generating Protobuf code has been revamped. The .pre-commit-config.yaml has been removed, and new hatch-build-scripts configurations in pyproject.toml now automate proto generation using scripts/gen_proto.sh. Legacy type generation scripts (scripts/generate_types.sh, scripts/checkout_experimental_types.sh, scripts/grpc_gen_post_processor.py) have been removed.
  • New ListTasks API: A new ListTasks API has been introduced across client, server, and transport layers, allowing for retrieval of multiple tasks with filtering and pagination capabilities.
  • AgentCard Structure Update: The AgentCard structure has been refined to replace preferred_transport and additional_interfaces with a more flexible supported_interfaces list. The supports_authenticated_extended_card field has been moved into capabilities.extended_agent_card.
  • Removal of Legacy Clients: Deprecated legacy client implementations (a2a.client.legacy.py and a2a.client.legacy_grpc.py) have been removed, promoting the use of the unified ClientFactory.
Changelog
  • .git-blame-ignore-revs
    • Updated the template URL from 'master' to 'main' branch.
  • .github/actions/spelling/allow.txt
    • Added new terms to the spelling allow list, including 'a2a', 'A2A', 'A2AFastAPI', 'AException', 'alg', 'base64url', 'buf', 'ES256', 'FastAPI', 'hazmat', 'HS256', 'HS384', 'importlib', 'JOSE', 'JSONRPC', 'middleware', 'OpenAPI', 'openapiv', 'openapiv2', 'pb2', 'proto', 'protobuf', 'Protobuf', 'pydantic', 'RS256', 'SECP256R1', 'starlette', 'Starlette', 'swagger', and 'typ'.
  • .github/actions/spelling/excludes.txt
    • Added new paths for 'src/a2a/types/' and 'a2a.json' to the spelling exclusion list.
  • .gitignore
    • Added 'src/a2a/types/a2a.json' and 'docker-compose.yaml' to the ignore list.
  • .pre-commit-config.yaml
    • Removed the pre-commit configuration file, indicating a change in pre-commit hook management.
  • CODE_OF_CONDUCT.md
    • Updated the repository URL from 'master' to 'main' branch.
  • buf.gen.yaml
    • Modified the subdir for input from 'specification/grpc' to 'specification' and changed the output directory for Python protobuf and gRPC code from 'src/a2a/grpc' to 'src/a2a/types'.
    • Added a new plugin to generate 'a2a.swagger.json' (OpenAPI v2) to 'src/a2a/types' with JSON names for fields.
  • pyproject.toml
    • Added 'json-rpc' and 'googleapis-common-protos' to runtime dependencies.
    • Added 'hatch-build-scripts' to build system requirements.
    • Configured 'hatch.build.hooks.build-scripts' to generate 'src/a2a/types/a2a.json' using 'bash scripts/gen_proto.sh'.
    • Removed 'datamodel-code-generator' from development dependencies.
    • Added 'PyJWT' to development dependencies.
    • Updated mypy exclude patterns to target specific proto-generated files in 'src/a2a/types'.
    • Updated tool.ruff exclude patterns to target specific proto-generated files in 'src/a2a/types'.
    • Updated coverage omit patterns to exclude specific proto-generated files in 'src/a2a/types'.
  • scripts/checkout_experimental_types.sh
    • Removed the script for checking out experimental types.
  • scripts/gen_proto.sh
    • Added a new script to run buf generate, rename the generated Swagger JSON to a2a.json, and fix imports in a2a_pb2_grpc.py.
  • scripts/generate_types.sh
    • Removed the script for generating types.
  • scripts/grpc_gen_post_processor.py
    • Removed the gRPC generated code post-processor script.
  • src/a2a/client/init.py
    • Removed imports and references to legacy A2AClient and A2AGrpcClient.
  • src/a2a/client/auth/interceptor.py
    • Updated imports to use Protobuf AgentCard and removed Pydantic-specific security scheme types.
    • Modified authentication logic to check Protobuf HasField for security schemes and access fields directly.
  • src/a2a/client/base_client.py
    • Updated imports to use Protobuf message types for requests and responses.
    • Changed send_message method signature to accept SendMessageConfiguration and return AsyncIterator[ClientEvent], adapting logic for streaming and non-streaming responses.
    • Refactored _process_response into _process_stream to handle StreamResponse objects.
    • Updated method signatures for get_task, cancel_task, set_task_callback, get_task_callback, and subscribe to use new Protobuf request types.
    • Renamed resubscribe to subscribe and get_card to get_extended_agent_card.
  • src/a2a/client/card_resolver.py
    • Updated imports to use Protobuf AgentCard.
    • Replaced pydantic.ValidationError with google.protobuf.json_format.ParseError for validation.
    • Modified AgentCard.model_validate to ParseDict for Protobuf deserialization.
  • src/a2a/client/client.py
    • Updated imports to use Protobuf message types for requests and responses.
    • Changed ClientConfig.supported_transports to supported_protocol_bindings.
    • Updated ClientEvent and Consumer type aliases to reflect StreamResponse and Task | None.
    • Updated abstract method signatures to use new Protobuf request types and return types.
    • Renamed resubscribe to subscribe and get_card to get_extended_agent_card.
  • src/a2a/client/client_factory.py
    • Updated imports to use Protobuf AgentCard and AgentInterface.
    • Replaced TransportProtocol enum with string constants for transport types.
    • Modified _register_defaults to use string constants for transport protocols.
    • Updated client preference logic to iterate over card.supported_interfaces instead of card.additional_interfaces and card.preferred_transport.
  • src/a2a/client/client_task_manager.py
    • Updated imports to use Protobuf Message, Task, StreamResponse, TaskState, TaskStatus.
    • Removed Event import from a2a.server.events.event_queue.
    • Refactored save_task_event to process and updated its signature to accept StreamResponse.
    • Modified task processing logic to handle StreamResponse fields (task, status_update, artifact_update).
    • Updated update_with_message to use Protobuf HasField and ClearField for message handling.
  • src/a2a/client/errors.py
    • Removed import of JSONRPCErrorResponse.
    • Updated A2AClientJSONRPCError to accept a dictionary for the error, aligning with jsonrpc.jsonrpc2.JSONRPC20Response.error structure.
  • src/a2a/client/helpers.py
    • Updated imports to use Protobuf Message, Part, Role.
    • Modified create_text_message_object to use Protobuf Role.ROLE_USER and Part(text=content) directly.
  • src/a2a/client/legacy.py
    • Removed the legacy A2AClient class.
  • src/a2a/client/legacy_grpc.py
    • Removed the legacy A2AGrpcClient class.
  • src/a2a/client/middleware.py
    • Updated AgentCard import to use Protobuf type.
  • src/a2a/client/optionals.py
    • Updated grpc.aio.Channel import type hint to ignore missing module source.
  • src/a2a/client/transports/base.py
    • Updated imports to use Protobuf message types for requests and responses.
    • Added list_tasks abstract method.
    • Updated method signatures for all API calls to use new Protobuf request/response types.
  • src/a2a/client/transports/grpc.py
    • Updated grpc import type hint to ignore missing module source.
    • Updated imports to use a2a.types.a2a_pb2 and a2a.types.a2a_pb2_grpc.
    • Removed proto_utils conversions for requests and responses, now passing Protobuf objects directly.
    • Updated _needs_extended_card check to use agent_card.capabilities.extended_agent_card.
    • Renamed resubscribe to subscribe and get_card to get_extended_agent_card.
    • Added ListTasks method implementation.
  • src/a2a/client/transports/jsonrpc.py
    • Added imports for google.protobuf.json_format and jsonrpc.jsonrpc2.
    • Updated imports to use Protobuf message types for requests and responses.
    • Modified __init__ to derive URL from agent_card.supported_interfaces.
    • Updated _needs_extended_card check to use agent_card.capabilities.extended_agent_card.
    • Refactored send_message and other methods to construct JSONRPC20Request with Protobuf MessageToDict and parse responses with JSONRPC20Response and ParseDict.
    • Updated streaming methods to parse SSE data as JSONRPC20Response and then StreamResponse.
    • Renamed resubscribe to subscribe and get_card to get_extended_agent_card.
  • src/a2a/client/transports/rest.py
    • Added imports for google.protobuf.message.Message.
    • Updated imports to use Protobuf message types for requests and responses.
    • Modified __init__ to derive URL from agent_card.supported_interfaces for HTTP+JSON or JSONRPC.
    • Updated _needs_extended_card check to use agent_card.capabilities.extended_agent_card.
    • Refactored _prepare_send_message to directly use MessageToDict on SendMessageRequest.
    • Updated send_message and send_message_streaming to use Protobuf SendMessageResponse and StreamResponse.
    • Added list_tasks method implementation.
    • Renamed resubscribe to subscribe and get_card to get_extended_agent_card.
    • Added helper functions _model_to_query_params and _json_to_query_params for REST query parameter handling.
  • src/a2a/extensions/common.py
    • Updated AgentCard import to use Protobuf type.
  • src/a2a/grpc/a2a_pb2.py
    • Removed the old proto-generated Python file.
  • src/a2a/server/agent_execution/agent_executor.py
    • Updated TaskState.canceled to TaskState.TASK_STATE_CANCELED for Protobuf enum consistency.
  • src/a2a/server/agent_execution/context.py
    • Updated imports to use Protobuf Message, SendMessageConfiguration, SendMessageRequest, Task.
    • Updated type hints for request and configuration properties.
  • src/a2a/server/agent_execution/request_context_builder.py
    • Updated imports to use Protobuf SendMessageRequest and Task.
  • src/a2a/server/agent_execution/simple_request_context_builder.py
    • Updated imports to use Protobuf SendMessageRequest and Task.
  • src/a2a/server/apps/jsonrpc/fastapi_app.py
    • Added imports for importlib.resources and json.
    • Modified openapi method to attempt loading a2a.json schema from a2a.types before auto-generating.
    • Removed Pydantic schema generation for A2ARequest.
    • Updated agent_card.supports_authenticated_extended_card to agent_card.capabilities.extended_agent_card.
  • src/a2a/server/apps/jsonrpc/jsonrpc_app.py
    • Added imports for google.protobuf.json_format and jsonrpc.jsonrpc2.
    • Updated imports for JSON-RPC error models from a2a.server.jsonrpc_models.
    • Updated imports for A2A request types from a2a.types.a2a_pb2.
    • Removed A2AError import.
    • Updated METHOD_TO_MODEL mapping to use Protobuf request types and gRPC method names.
    • Modified _generate_error_response to use new JSON-RPC error models and build_error_response helper.
    • Updated request parsing to use JSONRPC20Request.from_data and ParseDict for Protobuf messages.
    • Updated streaming and non-streaming request processing to use Protobuf request types.
    • Renamed on_resubscribe_to_task to on_subscribe_to_task and GetAuthenticatedExtendedCardRequest to GetExtendedAgentCardRequest.
  • src/a2a/server/apps/jsonrpc/starlette_app.py
    • Updated AgentCard import to use Protobuf type.
    • Updated agent_card.supports_authenticated_extended_card to agent_card.capabilities.extended_agent_card.
  • src/a2a/server/apps/rest/fastapi_app.py
    • Updated AgentCard import to use Protobuf type.
  • src/a2a/server/apps/rest/rest_adapter.py
    • Added import for google.protobuf.json_format.MessageToDict.
    • Updated AgentCard import to use Protobuf type.
    • Updated agent_card.supports_authenticated_extended_card to agent_card.capabilities.extended_agent_card.
    • Modified handle_get_agent_card and handle_authenticated_agent_card to use MessageToDict for serialization.
  • src/a2a/server/events/event_consumer.py
    • Updated imports to use Protobuf Message, Task, TaskState, TaskStatusUpdateEvent.
    • Updated is_final_event logic to use Protobuf enum values.
  • src/a2a/server/events/event_queue.py
    • Updated imports to use Protobuf Message, Task, TaskArtifactUpdateEvent, TaskStatusUpdateEvent.
  • src/a2a/server/jsonrpc_models.py
    • Added new file defining Pydantic models for JSON-RPC 2.0 error structures.
  • src/a2a/server/models.py
    • Added imports for google.protobuf.json_format and google.protobuf.message.Message as ProtoMessage.
    • Updated PydanticType and PydanticListType to handle serialization and deserialization of Protobuf messages to/from JSON.
  • src/a2a/server/request_handlers/default_request_handler.py
    • Updated imports to use Protobuf message types for requests and responses.
    • Updated TERMINAL_TASK_STATES to use Protobuf enum values.
    • Added on_list_tasks method implementation.
    • Modified _setup_message_execution to handle empty strings for task_id and context_id from Protobuf.
    • Updated on_create_task_push_notification_config method signature and return type.
    • Updated on_get_task_push_notification_config to retrieve specific config by ID.
    • Renamed on_resubscribe_to_task to on_subscribe_to_task.
  • src/a2a/server/request_handlers/grpc_handler.py
    • Updated grpc import type hints to ignore missing module source.
    • Updated imports to use a2a.types.a2a_pb2_grpc and a2a.types.a2a_pb2.
    • Removed proto_utils conversions, now directly using Protobuf objects.
    • Updated SendMessage to wrap response in a2a_pb2.SendMessageResponse.
    • Renamed TaskSubscription to SubscribeToTask and GetAgentCard to GetExtendedAgentCard.
    • Added ListTasks method implementation.
    • Updated abort_context to handle new JSON-RPC error models.
  • src/a2a/server/request_handlers/jsonrpc_handler.py
    • Added imports for google.protobuf.json_format.MessageToDict and jsonrpc.jsonrpc2.JSONRPC20Response.
    • Updated imports for JSON-RPC error models from a2a.server.jsonrpc_models.
    • Updated imports for A2A request types from a2a.types.a2a_pb2.
    • Removed A2AError import.
    • Defined EXCEPTION_MAP and ERROR_CODE_MAP for mapping A2A exceptions to JSON-RPC errors.
    • Refactored _build_success_response and _build_error_response helpers.
    • Updated on_message_send to return a dictionary and handle Protobuf SendMessageResponse.
    • Updated on_message_send_stream to return AsyncIterable[dict[str, Any]] and wrap events in StreamResponse.
    • Updated on_cancel_task, get_push_notification_config, set_push_notification_config, on_get_task, list_push_notification_config, delete_push_notification_config, get_authenticated_extended_card to return dictionaries and use MessageToDict.
    • Renamed on_resubscribe_to_task to on_subscribe_to_task and GetAuthenticatedExtendedCardRequest to GetExtendedAgentCardRequest.
  • src/a2a/server/request_handlers/request_handler.py
    • Updated imports to use Protobuf message types for requests and responses.
    • Added on_list_tasks abstract method.
    • Updated method signatures for all API calls to use new Protobuf request types and return types.
    • Renamed on_set_task_push_notification_config to on_create_task_push_notification_config and on_resubscribe_to_task to on_subscribe_to_task.
  • src/a2a/server/request_handlers/response_helpers.py
    • Added imports for google.protobuf.json_format.MessageToDict, google.protobuf.message.Message as ProtoMessage, and jsonrpc.jsonrpc2.JSONRPC20Response.
    • Updated imports for JSON-RPC error models from a2a.server.jsonrpc_models.
    • Updated imports for A2A message types from a2a.types.a2a_pb2.
    • Removed A2AError import.
    • Defined EXCEPTION_MAP and ERROR_CODE_MAP for mapping A2A exceptions to JSON-RPC errors.
    • Refactored build_error_response and prepare_response_object to use new JSON-RPC error models and Protobuf serialization.
  • src/a2a/server/request_handlers/rest_handler.py
    • Added imports for google.protobuf.json_format.ParseDict and google.protobuf.message.Message.
    • Updated imports to use a2a.types.a2a_pb2.
    • Removed proto_utils conversions, now directly using Protobuf objects.
    • Updated on_message_send to wrap response in SendMessageResponse.
    • Renamed on_resubscribe_to_task to on_subscribe_to_task.
    • Updated on_get_task_push_notification_config and on_set_task_push_notification_config to use new Protobuf request types.
    • Added list_tasks method implementation.
    • Updated list_push_notifications method to use ListTasksRequest and MessageToDict.
  • src/a2a/server/tasks/base_push_notification_sender.py
    • Added import for google.protobuf.json_format.MessageToDict.
    • Updated imports to use Protobuf PushNotificationConfig, StreamResponse, Task.
    • Modified _dispatch_notification to send StreamResponse(task=task) as JSON.
  • src/a2a/server/tasks/database_push_notification_config_store.py
    • Added imports for google.protobuf.json_format.MessageToJson and google.protobuf.json_format.Parse.
    • Updated imports to use Protobuf PushNotificationConfig.
    • Replaced pydantic.ValidationError with google.protobuf.json_format.Parse for deserialization.
    • Modified _to_orm to use MessageToJson for serialization.
    • Modified _from_orm to use Parse for deserialization and handle cryptography.fernet.InvalidToken.
    • Updated set_info to use Protobuf CopyFrom and check for empty id.
  • src/a2a/server/tasks/database_task_store.py
    • Added imports for typing.Any, typing.cast, sqlalchemy.and_, sqlalchemy.func, sqlalchemy.or_, sqlalchemy.select.
    • Added import for google.protobuf.json_format.MessageToDict.
    • Updated imports to use a2a.types.a2a_pb2 and a2a.types.a2a_pb2.Task.
    • Added imports for DEFAULT_LIST_TASKS_PAGE_SIZE, decode_page_token, encode_page_token.
    • Modified _to_orm to directly use Protobuf objects and MessageToDict for metadata.
    • Modified _from_orm to reconstruct Protobuf Task from SQLAlchemy model.
    • Added list method for paginated task retrieval with filtering and sorting.
  • src/a2a/server/tasks/inmemory_push_notification_config_store.py
    • Updated imports to use Protobuf PushNotificationConfig.
    • Modified set_info to check for empty id instead of None.
  • src/a2a/server/tasks/inmemory_task_store.py
    • Updated imports to use a2a.types.a2a_pb2 and a2a.types.a2a_pb2.Task.
    • Added imports for DEFAULT_LIST_TASKS_PAGE_SIZE, decode_page_token, encode_page_token.
    • Added list method for paginated task retrieval with filtering and sorting.
  • src/a2a/server/tasks/push_notification_config_store.py
    • Updated imports to use Protobuf PushNotificationConfig.
  • src/a2a/server/tasks/push_notification_sender.py
    • Updated imports to use Protobuf Task.
  • src/a2a/server/tasks/result_aggregator.py
    • Updated imports to use Protobuf Message, Task, TaskState, TaskStatusUpdateEvent.
    • Updated is_auth_required check to use Protobuf enum value.
  • src/a2a/server/tasks/task_manager.py
    • Updated imports to use Protobuf Message, Task, TaskArtifactUpdateEvent, TaskStatusUpdateEvent.
    • Updated TaskState.submitted to TaskState.TASK_STATE_SUBMITTED for Protobuf enum consistency.
    • Modified save_task_event to use Protobuf HasField and MergeFrom for metadata and status updates.
    • Modified update_with_message to use Protobuf HasField and ClearField for message handling.
  • src/a2a/server/tasks/task_store.py
    • Updated imports to use Protobuf ListTasksRequest, ListTasksResponse, Task.
    • Added list abstract method.
  • src/a2a/server/tasks/task_updater.py
    • Added import for google.protobuf.timestamp_pb2.Timestamp.
    • Updated imports to use Protobuf Artifact, Message, Part, TaskState, TaskStatus, TaskStatusUpdateEvent.
    • Updated _terminal_states to use Protobuf enum values.
    • Removed final parameter from update_status and related methods.
    • Modified update_status to use Protobuf Timestamp and TaskStatus objects.
    • Updated new_agent_message to use Protobuf Role.ROLE_AGENT.
  • src/a2a/types.py
    • Removed the old Pydantic-based types file.
  • src/a2a/types/init.py
    • Added new file to re-export proto-generated types from a2a_pb2 and SDK-specific error types from a2a.utils.errors.
  • src/a2a/types/a2a_pb2.py
    • Added new proto-generated Python file for A2A types.
  • src/a2a/types/a2a_pb2.pyi
    • Renamed from src/a2a/grpc/a2a_pb2.pyi.
    • Updated TaskState.TASK_STATE_CANCELLED to TaskState.TASK_STATE_CANCELED for consistency.
  • src/a2a/types/a2a_pb2_grpc.py
    • Renamed from src/a2a/grpc/a2a_pb2_grpc.py.
    • Updated docstrings to reflect the new proto structure.
    • Renamed TaskSubscription to SubscribeToTask and GetAgentCard to GetExtendedAgentCard.
    • Added ListTasks method.
  • src/a2a/utils/init.py
    • Added proto_utils and new transport constants to __all__.
    • Added to_stream_response to __all__.
  • src/a2a/utils/artifact.py
    • Added imports for google.protobuf.struct_pb2.Struct and google.protobuf.struct_pb2.Value.
    • Updated imports to use Protobuf Artifact, Part.
    • Modified new_text_artifact to use Part(text=text).
    • Modified new_data_artifact to use Part(data=Value(struct_value=struct_data)).
  • src/a2a/utils/constants.py
    • Added DEFAULT_LIST_TASKS_PAGE_SIZE.
    • Added TRANSPORT_JSONRPC, TRANSPORT_HTTP_JSON, TRANSPORT_GRPC constants and TransportProtocol class.
    • Added DEFAULT_MAX_CONTENT_LENGTH and JSONRPC_PARSE_ERROR_CODE.
  • src/a2a/utils/error_handlers.py
    • Updated imports for JSON-RPC error models from a2a.server.jsonrpc_models.
    • Updated A2AErrorToHttpStatus mapping to use new error types.
    • Modified error logging and response content to use getattr for flexible error object handling.
  • src/a2a/utils/errors.py
    • Refactored to define custom A2A exceptions directly as classes inheriting from A2AError (which inherits from Exception), removing reliance on Pydantic models for error definitions.
  • src/a2a/utils/helpers.py
    • Added import for google.protobuf.json_format.MessageToDict.
    • Updated imports to use Protobuf AgentCard, Artifact, Part, SendMessageRequest, Task, TaskArtifactUpdateEvent, TaskState, TaskStatus.
    • Modified create_task_obj to use Protobuf SendMessageRequest and directly set Task history.
    • Modified append_artifact_to_task to use Protobuf CopyFrom for updating artifacts.
    • Modified build_text_artifact to use Part(text=text).
    • Modified canonicalize_agent_card to use MessageToDict and remove signatures field.
  • src/a2a/utils/message.py
    • Updated imports to use Protobuf Message, Part, Role.
    • Modified new_agent_text_message to use Role.ROLE_AGENT and Part(text=text).
    • Modified new_agent_parts_message to use Role.ROLE_AGENT.
    • Updated get_message_text docstring.
  • src/a2a/utils/parts.py
    • Added import for collections.abc.Sequence.
    • Added import for google.protobuf.json_format.MessageToDict.
    • Updated imports to use Protobuf Part.
    • Modified get_text_parts to check part.HasField('text').
    • Modified get_data_parts to use MessageToDict(part.data).
    • Modified get_file_parts to check part.raw or part.url.
  • src/a2a/utils/proto_utils.py
    • Removed ToProto and FromProto classes.
    • Added to_stream_response function to convert internal event types to StreamResponse proto.
  • src/a2a/utils/signing.py
    • Modified agent_card_signer to use agent_card.signatures.append instead of list concatenation.
  • src/a2a/utils/task.py
    • Added imports for binascii, base64.b64decode, base64.b64encode.
    • Updated imports to use Protobuf Artifact, Message, Task, TaskState, TaskStatus.
    • Modified new_task to check part.HasField('text') and use TaskState.TASK_STATE_SUBMITTED.
    • Modified completed_task to use TaskState.TASK_STATE_COMPLETED.
    • Modified apply_history_length to use Protobuf CopyFrom for task history.
    • Added encode_page_token and decode_page_token functions for pagination.
  • src/a2a/utils/telemetry.py
    • Updated imports for opentelemetry.trace to use specific names.
  • tests/README.md
    • Corrected a typo from 'clean up' to 'clean up' in the instructions.
  • tests/client/test_auth_middleware.py
    • Added import for google.protobuf.json_format.
    • Updated imports to use Protobuf AgentCard, AgentInterface, APIKeySecurityScheme, AuthenticationInfo, HTTPAuthSecurityScheme, Message, OAuth2SecurityScheme, OpenIdConnectSecurityScheme, Role, SecurityRequirement, SecurityScheme, SendMessageResponse, StringList.
    • Modified build_success_response to use Protobuf SendMessageResponse and MessageToDict.
    • Modified build_message to use Role.ROLE_USER.
    • Updated AuthTestCase to use Protobuf APIKeySecurityScheme and HTTPAuthSecurityScheme.
    • Modified wrap_security_scheme to correctly wrap Protobuf security schemes.
    • Updated test_auth_interceptor_variants and test_auth_interceptor_skips_when_scheme_not_in_security_schemes to use new AgentCard structure and SecurityRequirement.
  • tests/client/test_base_client.py
    • Updated imports to use Protobuf AgentCard, AgentInterface, Message, Part, Role, SendMessageConfiguration, SendMessageResponse, StreamResponse, Task, TaskState, TaskStatus.
    • Modified sample_agent_card to use AgentInterface.
    • Modified sample_message to use Role.ROLE_USER and Part(text=text).
    • Updated test_send_message_streaming to use StreamResponse and check its fields.
    • Updated test_send_message_non_streaming and test_send_message_callsite_config_overrides_non_streaming to use SendMessageResponse and check its fields.
  • tests/client/test_card_resolver.py
    • Updated imports to use Protobuf AgentCard, AgentInterface.
    • Modified valid_agent_card_data to use supported_interfaces.
    • Removed patch.object(AgentCard, 'model_validate') as Protobuf parsing is direct.
    • Updated assertions to check for AgentCard instance directly.
  • tests/client/test_client_factory.py
    • Added import for typing.
    • Updated imports to use Protobuf AgentCard, AgentInterface.
    • Modified base_agent_card to use supported_interfaces.
    • Updated test_client_factory_selects_secondary_transport_url and test_client_factory_server_preference to use new AgentCard structure.
    • Modified test_client_factory_no_compatible_transport to use an unknown protocol binding.
    • Updated test_client_factory_connect_with_custom_transport to use AgentInterface and typing.cast.
  • tests/client/test_client_task_manager.py
    • Updated imports to use Protobuf Artifact, Message, Part, Role, StreamResponse, Task, TaskArtifactUpdateEvent, TaskState, TaskStatus, TaskStatusUpdateEvent.
    • Modified sample_task to use TaskState.TASK_STATE_WORKING.
    • Modified sample_message to use Role.ROLE_USER and Part(text=text).
    • Refactored test_save_task_event_with_task to test_process_with_task and updated to use StreamResponse.
    • Refactored test_save_task_event_with_task_already_set_raises_error to test_process_with_task_already_set_raises_error.
    • Refactored test_save_task_event_with_status_update to test_process_with_status_update and updated to use StreamResponse.
    • Refactored test_save_task_event_with_artifact_update to test_process_with_artifact_update and updated to use StreamResponse.
    • Refactored test_save_task_event_creates_task_if_not_exists to test_process_creates_task_if_not_exists_on_status_update.
    • Added test_process_with_message_returns_none.
    • Updated test_update_with_message_moves_status_message to use Protobuf HasField and ClearField.
  • tests/client/test_errors.py
    • Updated imports to use jsonrpc.jsonrpc2.JSONRPC20Response.
    • Modified test_repr to use JSONRPC20Response and check its error dictionary.
  • tests/client/test_legacy_client.py
    • Removed the test file for legacy clients.
  • tests/client/transports/test_grpc_client.py
    • Updated imports to use a2a.types.a2a_pb2 and a2a.types.a2a_pb2_grpc.
    • Updated imports to use Protobuf AgentCard, AgentInterface, Artifact, AuthenticationInfo, GetTaskPushNotificationConfigRequest, GetTaskRequest, Message, Part, PushNotificationConfig, Role, SendMessageRequest, CreateTaskPushNotificationConfigRequest, Task, TaskArtifactUpdateEvent, TaskPushNotificationConfig, TaskState, TaskStatus, TaskStatusUpdateEvent.
    • Modified mock_grpc_stub to use MagicMock without spec.
    • Modified sample_agent_card to use AgentInterface.
    • Modified grpc_transport to use MagicMock for channel.
    • Modified sample_message_send_params to use SendMessageRequest and Role.ROLE_USER.
    • Added sample_task_2 fixture.
    • Modified sample_message to use Role.ROLE_AGENT.
    • Modified sample_artifact to use Part(text=text).
    • Modified sample_task_status_update_event to remove final field.
    • Modified sample_authentication_info to use AuthenticationInfo.
    • Modified sample_push_notification_config to use AuthenticationInfo.
    • Modified sample_task_push_notification_config to include id field.
    • Updated test_send_message_task_response and test_send_message_message_response to check SendMessageResponse fields.
    • Updated test_send_message_streaming to use StreamResponse and check its fields.
    • Added test_list_tasks.
    • Updated test_get_task and test_get_task_with_history to use GetTaskRequest.
    • Updated test_cancel_task to use CancelTaskRequest.
    • Updated test_set_task_callback_with_valid_task and test_set_task_callback_with_invalid_task to use CreateTaskPushNotificationConfigRequest.
    • Updated test_get_task_callback_with_valid_task and test_get_task_callback_with_invalid_task to use GetTaskPushNotificationConfigRequest.
    • Updated test_get_extended_agent_card to use GetExtendedAgentCardRequest.
  • tests/client/transports/test_jsonrpc_client.py
    • Added imports for google.protobuf.json_format, unittest.mock.mock, uuid.uuid4.
    • Updated imports to use Protobuf AgentCard, AgentInterface, CancelTaskRequest, GetTaskPushNotificationConfigRequest, GetTaskRequest, Message, Part, SendMessageConfiguration, SendMessageRequest, SendMessageResponse, CreateTaskPushNotificationConfigRequest, Task, TaskState, TaskStatus.
    • Removed AGENT_CARD, AGENT_CARD_EXTENDED, AGENT_CARD_SUPPORTS_EXTENDED, AGENT_CARD_NO_URL_SUPPORTS_EXTENDED, MINIMAL_TASK, MINIMAL_CANCELLED_TASK constants.
    • Removed async_iterable_from_list helper.
    • Removed TestA2ACardResolver class.
    • Refactored TestJsonRpcTransport into TestJsonRpcTransportInit, TestSendMessage, TestGetTask, TestCancelTask, TestTaskCallback, TestClose, TestStreamingErrors, TestInterceptors, TestExtensions.
    • Updated fixtures to use Protobuf AgentCard.
    • Modified create_send_message_request to return Protobuf SendMessageRequest.
    • Updated all test methods to use Protobuf request/response types and assertions.
  • tests/client/transports/test_rest_client.py
    • Added import for google.protobuf.json_format.
    • Updated imports to use Protobuf AgentCard, AgentInterface, Message, Part, Role, SendMessageRequest.
    • Removed TestRestTransport class.
    • Modified mock_agent_card to use supported_interfaces and capabilities.extended_agent_card.
    • Updated test_send_message_with_default_extensions and test_send_message_streaming_with_new_extensions to use SendMessageRequest.
    • Updated test_send_message_streaming_server_error_propagates to use SendMessageRequest and handle empty aiter.
    • Updated test_get_card_no_card_provided_with_extensions and test_get_card_with_extended_card_support_with_extensions to use get_extended_agent_card and Protobuf AgentCard.
  • tests/e2e/init.py
    • Added new file.
  • tests/e2e/push_notifications/init.py
    • Added new file.
  • tests/e2e/push_notifications/agent_app.py
    • Updated imports to use Protobuf AgentCapabilities, AgentCard, AgentInterface, AgentSkill, Message, Task.
    • Modified test_agent_card to use supported_interfaces and capabilities.extended_agent_card.
    • Modified invoke to check msg.parts[0].HasField('text') and use msg.parts[0].text.
  • tests/e2e/push_notifications/notifications_app.py
    • Added imports for typing.Any, pydantic.ConfigDict.
    • Updated imports to use Protobuf StreamResponse, Task.
    • Added imports for google.protobuf.json_format.ParseDict, google.protobuf.json_format.MessageToDict.
    • Modified Notification model to store task as dict[str, Any].
    • Updated add_notification to parse StreamResponse and extract task.
  • tests/e2e/push_notifications/test_default_push_notification_support.py
    • Updated imports to use Protobuf Message, Part, PushNotificationConfig, Role, CreateTaskPushNotificationConfigRequest, Task, TaskState.
    • Modified test_notification_triggering_with_in_message_config_e2e to use supported_protocol_bindings and check StreamResponse fields.
    • Modified test_notification_triggering_after_config_change_e2e to use supported_protocol_bindings, check StreamResponse fields, and use CreateTaskPushNotificationConfigRequest.
  • tests/e2e/push_notifications/utils.py
    • Updated imports to use multiprocessing instead of Process.
    • Modified create_app_process to use multiprocessing.get_context('fork') on non-Windows platforms.
  • tests/extensions/test_common.py
    • Updated imports to use Protobuf AgentCapabilities, AgentInterface, AgentCard, AgentExtension.
    • Modified test_find_extension_by_uri and test_find_extension_by_uri_no_extensions to use supported_interfaces.
  • tests/integration/test_client_server_integration.py
    • Added import for google.protobuf.json_format.MessageToDict.
    • Updated imports to use Protobuf AgentCapabilities, AgentCard, AgentInterface, CancelTaskRequest, GetTaskPushNotificationConfigRequest, GetTaskRequest, Message, Part, PushNotificationConfig, Role, SendMessageRequest, CreateTaskPushNotificationConfigRequest, SubscribeToTaskRequest, Task, TaskState, TaskStatus, TaskStatusUpdateEvent.
    • Updated TASK_FROM_STREAM, TASK_FROM_BLOCKING, GET_TASK_RESPONSE, CANCEL_TASK_RESPONSE to remove kind field.
    • Modified CALLBACK_CONFIG to include id field.
    • Modified create_key_provider to accept Any.
    • Updated mock_request_handler to use CALLBACK_CONFIG directly.
    • Modified agent_card to use supported_interfaces.
    • Updated http_base_setup to use sse.AppStatus.should_exit_event type hint.
    • Updated test_http_transport_sends_message_streaming and test_grpc_transport_sends_message_streaming to use SendMessageRequest and check StreamResponse fields.
    • Updated test_http_transport_sends_message_blocking and test_grpc_transport_sends_message_blocking to use SendMessageRequest and check SendMessageResponse fields.
    • Updated test_http_transport_get_task and test_grpc_transport_get_task to use GetTaskRequest.
    • Updated test_http_transport_cancel_task and test_grpc_transport_cancel_task to use CancelTaskRequest.
    • Updated test_http_transport_set_task_callback and test_grpc_transport_set_task_callback to use CreateTaskPushNotificationConfigRequest.
    • Updated test_http_transport_get_task_callback and test_grpc_transport_get_task_callback to use GetTaskPushNotificationConfigRequest.
    • Updated test_http_transport_resubscribe and test_grpc_transport_resubscribe to use SubscribeToTaskRequest and check StreamResponse fields.
    • Updated test_http_transport_get_card to access transport.agent_card directly.
    • Updated test_http_transport_get_authenticated_card and test_grpc_transport_get_card to use agent_card.capabilities.extended_agent_card and extended_agent_card.CopyFrom.
    • Updated test_json_transport_base_client_send_message_with_extensions to use MessageToDict for mock response.
    • Updated test_json_transport_get_signed_base_card, test_json_transport_get_signed_extended_card, test_rest_transport_get_signed_card, test_grpc_transport_get_signed_card to use get_extended_agent_card and agent_card.supported_interfaces.
  • tests/server/agent_execution/test_context.py
    • Updated imports to use Protobuf Message, SendMessageRequest, Task.
    • Modified mock_params fixture to use SendMessageRequest.
    • Updated assertions for error messages to check exc_info.value.error directly.
  • tests/server/agent_execution/test_simple_request_context_builder.py
    • Updated imports to use Protobuf Message, Part, Role, SendMessageRequest, Task, TaskState, TaskStatus.
    • Modified create_sample_message to use Role.ROLE_USER and Part(text=text).
    • Modified create_sample_task to use TaskState.TASK_STATE_SUBMITTED.
    • Updated test_build_basic_context_no_populate, test_build_populate_true_reference_ids_empty_or_none, test_build_populate_true_task_store_none, test_build_populate_false_with_reference_task_ids, test_build_with_custom_id_generators, test_build_with_provided_ids_and_custom_id_generators to use SendMessageRequest.
  • tests/server/apps/jsonrpc/test_fastapi_app.py
    • Updated AgentCard import to use Protobuf type.
    • Modified mock_agent_card to remove supports_authenticated_extended_card.
  • tests/server/apps/jsonrpc/test_jsonrpc_app.py
    • Updated imports to use Protobuf AgentCard, Message, Part, Role.
    • Modified mock_agent_card to remove supports_authenticated_extended_card.
    • Updated DummyJSONRPCApp to MockJSONRPCApp and added type: ignore[abstract].
    • Modified mock_handler to return Protobuf Message directly.
    • Modified test_app to include capabilities on mock_agent_card.
    • Added _make_send_message_request helper.
    • Updated test_request_with_single_extension, test_request_with_comma_separated_extensions, test_request_with_comma_separated_extensions_no_space, test_method_added_to_call_context_state, test_request_with_multiple_extension_headers, test_response_with_activated_extensions to use _make_send_message_request.
  • tests/server/apps/jsonrpc/test_serialization.py
    • Updated imports to use Protobuf AgentCard, AgentInterface, AgentSkill, APIKeySecurityScheme, Message, Part, Role, SecurityRequirement, SecurityScheme.
    • Modified agent_card_with_api_key to use Protobuf APIKeySecurityScheme and SecurityScheme.
    • Updated test_starlette_agent_card_with_api_key_scheme_alias to test_starlette_agent_card_serialization and removed Pydantic-specific assertions.
    • Added test_starlette_agent_card_with_api_key_scheme.
    • Updated test_fastapi_agent_card_with_api_key_scheme_alias to test_fastapi_agent_card_serialization and removed Pydantic-specific assertions.
    • Updated test_handle_invalid_json and test_handle_oversized_payload to use minimal_agent_card and check error codes directly.
    • Modified test_handle_unicode_characters to use Protobuf Message and Part.
  • tests/server/apps/jsonrpc/test_starlette_app.py
    • Updated AgentCard import to use Protobuf type.
    • Modified mock_agent_card to remove supports_authenticated_extended_card.
  • tests/server/apps/rest/test_rest_fastapi_app.py
    • Updated imports to use a2a.types.a2a_pb2.
    • Updated imports to use Protobuf AgentCard, Message, Part, Role, Task, TaskState, TaskStatus.
    • Modified agent_card and streaming_agent_card fixtures to remove supports_authenticated_extended_card.
  • tests/server/events/test_event_consumer.py
    • Updated imports to use Protobuf Artifact, Message, Part, Role, Task, TaskArtifactUpdateEvent, TaskState, TaskStatus, TaskStatusUpdateEvent.
    • Removed MINIMAL_TASK and MESSAGE_PAYLOAD constants.
    • Added create_sample_message and create_sample_task helpers.
    • Updated test_consume_one_task_event, test_consume_one_message_event, test_consume_one_a2a_error_event, test_consume_all_multiple_events, test_consume_until_message, test_consume_message_events, test_consume_all_continues_on_queue_empty_if_not_really_closed, test_consume_all_continues_on_queue_empty_when_not_closed to use new Protobuf event types.
  • tests/server/events/test_event_queue.py
    • Updated imports to use Protobuf Artifact, Message, Part, Role, Task, TaskArtifactUpdateEvent, TaskState, TaskStatus, TaskStatusUpdateEvent.
    • Removed MINIMAL_TASK and MESSAGE_PAYLOAD constants.
    • Added create_sample_message and create_sample_task helpers.
    • Updated test_enqueue_and_dequeue_event, test_dequeue_event_no_wait, test_dequeue_event_wait, test_task_done, test_enqueue_different_event_types, test_enqueue_event_propagates_to_children, test_enqueue_event_when_closed, test_close_sets_flag_and_handles_internal_queue_old_python, test_close_sets_flag_and_handles_internal_queue_new_python, test_close_graceful_py313_waits_for_join_and_children, test_close_propagates_to_children, test_close_idempotent, test_close_with_immediate_true, test_close_immediate_propagates_to_children, test_clear_events_current_queue_only, test_clear_events_with_children, test_clear_events_closed_queue to use new Protobuf event types.
  • tests/server/tasks/test_database_push_notification_config_store.py
    • Updated imports to use Protobuf PushNotificationConfig.
    • Modified test_set_info_updates_existing_config to use CopyFrom and check id.
    • Modified test_get_info_decrypts_and_validates to use Parse and handle InvalidToken.
  • tests/server/tasks/test_database_task_store.py
    • Updated imports to use Protobuf Task, TaskState, TaskStatus.
    • Modified test_save_and_get_task to use Protobuf Task.
    • Modified test_list_tasks_no_filters to use Protobuf ListTasksRequest and ListTasksResponse.
    • Modified test_list_tasks_with_context_id_filter to use Protobuf ListTasksRequest.
    • Modified test_list_tasks_with_status_filter to use Protobuf ListTasksRequest and TaskState.
    • Modified test_list_tasks_with_status_timestamp_after_filter to use Protobuf ListTasksRequest.
    • Modified test_list_tasks_with_pagination to use Protobuf ListTasksRequest and ListTasksResponse.
    • Modified test_list_tasks_with_invalid_page_token to use Protobuf ListTasksRequest.
  • tests/server/tasks/test_inmemory_push_notification_config_store.py
    • Updated imports to use Protobuf PushNotificationConfig.
    • Modified test_set_info_updates_existing_config to check id.
  • tests/server/tasks/test_inmemory_task_store.py
    • Updated imports to use Protobuf Task, ListTasksRequest, ListTasksResponse, TaskState.
    • Modified test_save_and_get_task to use Protobuf Task.
    • Modified test_list_tasks_no_filters to use Protobuf ListTasksRequest and ListTasksResponse.
    • Modified test_list_tasks_with_context_id_filter to use Protobuf ListTasksRequest.
    • Modified test_list_tasks_with_status_filter to use Protobuf ListTasksRequest and TaskState.
    • Modified test_list_tasks_with_status_timestamp_after_filter to use Protobuf ListTasksRequest.
    • Modified test_list_tasks_with_pagination to use Protobuf ListTasksRequest and ListTasksResponse.
    • Modified test_list_tasks_with_invalid_page_token to use Protobuf ListTasksRequest.
  • tests/server/tasks/test_task_manager.py
    • Updated imports to use Protobuf Artifact, Message, Part, Role, Task, TaskArtifactUpdateEvent, TaskState, TaskStatus, TaskStatusUpdateEvent.
    • Modified test_init_task_id_from_message to use Role.ROLE_USER.
    • Modified test_init_task_id_from_task to use TaskState.TASK_STATE_SUBMITTED.
    • Modified test_init_task_id_from_message_and_task_id_param to use Role.ROLE_USER.
    • Modified test_init_task_id_from_task_and_task_id_param to use TaskState.TASK_STATE_SUBMITTED.
    • Modified test_save_task_event_with_task to use TaskState.TASK_STATE_SUBMITTED.
    • Modified test_save_task_event_with_status_update to use TaskState.TASK_STATE_COMPLETED.
    • Modified test_save_task_event_with_artifact_update to use Part(text=text).
    • Modified test_save_task_event_creates_task_if_not_exists to use TaskState.TASK_STATE_WORKING.
    • Modified test_update_with_message to use Role.ROLE_AGENT.
  • tests/server/tasks/test_task_store.py
    • Updated imports to use Protobuf ListTasksRequest, ListTasksResponse, Task.
    • Added list abstract method.
  • tests/server/tasks/test_task_updater.py
    • Updated imports to use Protobuf Artifact, Message, Part, Role, TaskState, TaskStatus, TaskStatusUpdateEvent.
    • Modified test_update_status to use TaskState.TASK_STATE_WORKING and remove final parameter.
    • Modified test_update_status_with_message to use TaskState.TASK_STATE_WORKING and Role.ROLE_AGENT.
    • Modified test_update_status_with_metadata to use TaskState.TASK_STATE_WORKING.
    • Modified test_update_status_with_timestamp to use TaskState.TASK_STATE_WORKING.
    • Modified test_update_status_final_state to use TaskState.TASK_STATE_COMPLETED and remove final parameter.
    • Modified test_add_artifact to use Part(text=text).
    • Modified test_add_artifact_with_metadata to use Part(text=text).
    • Modified test_add_artifact_with_extensions to use Part(text=text).
    • Modified test_add_artifact_append_to_existing to use Part(text=text).
    • Modified test_add_artifact_append_to_non_existing to use Part(text=text).
    • Modified test_add_artifact_no_append_replaces_existing to use Part(text=text).
    • Modified test_add_artifact_no_append_adds_new to use Part(text=text).
    • Modified test_complete to use TaskState.TASK_STATE_COMPLETED.
    • Modified test_failed to use TaskState.TASK_STATE_FAILED.
    • Modified test_reject to use TaskState.TASK_STATE_REJECTED.
    • Modified test_submit to use TaskState.TASK_STATE_SUBMITTED.
    • Modified test_start_work to use TaskState.TASK_STATE_WORKING.
    • Modified test_cancel to use TaskState.TASK_STATE_CANCELED.
    • Modified test_requires_input to use TaskState.TASK_STATE_INPUT_REQUIRED and remove final parameter.
    • Modified test_requires_auth to use TaskState.TASK_STATE_AUTH_REQUIRED and remove final parameter.
    • Modified test_new_agent_message to use Role.ROLE_AGENT.
  • tests/utils/test_artifact.py
    • Updated imports to use Protobuf Artifact, Part.
    • Modified test_new_text_artifact to use Part(text=text).
    • Modified test_new_data_artifact to use Part(data=Value(struct_value=struct_data)).
  • tests/utils/test_helpers.py
    • Updated imports to use Protobuf AgentCapabilities, AgentCard, AgentInterface, AgentSkill, Artifact, Message, Part, Role, SendMessageRequest, Task, TaskArtifactUpdateEvent, TaskState, TaskStatus.
    • Modified create_test_message to use Role.ROLE_USER and Part(text=text).
    • Modified create_test_task to use TaskState.TASK_STATE_SUBMITTED.
    • Modified SAMPLE_AGENT_CARD to use AgentInterface and AgentCapabilities.
    • Updated test_create_task_obj to use SendMessageRequest.
    • Updated test_create_task_obj_generates_context_id to use SendMessageRequest and Part(text=text).
    • Updated test_append_artifact_to_task to use Part(text=text).
    • Updated test_build_text_artifact to use Part(text=text).
    • Updated test_canonicalize_agent_card to use AgentInterface and AgentCapabilities.
  • tests/utils/test_message.py
    • Updated imports to use Protobuf Message, Part, Role.
    • Modified test_new_agent_text_message to use Role.ROLE_AGENT and Part(text=text).
    • Modified test_new_agent_parts_message to use Role.ROLE_AGENT.
  • tests/utils/test_parts.py
    • Updated imports to use Protobuf Part.
    • Modified get_text_parts to check part.HasField('text').
    • Modified get_data_parts to check part.HasField('data').
    • Modified get_file_parts to check part.raw or part.url.
  • tests/utils/test_proto_utils.py
    • Removed TestToProto and TestFromProto classes.
    • Added test_to_stream_response_message, test_to_stream_response_task, test_to_stream_response_status_update, test_to_stream_response_artifact_update to test the new to_stream_response function.
  • tests/utils/test_signing.py
    • Updated agent_card_signer to use agent_card.signatures.append.
  • tests/utils/test_task.py
    • Updated imports to use Protobuf Artifact, Message, Task, TaskState, TaskStatus.
    • Modified test_new_task_valid_message to check part.HasField('text') and use TaskState.TASK_STATE_SUBMITTED.
    • Modified test_completed_task to use TaskState.TASK_STATE_COMPLETED.
    • Modified test_apply_history_length to use Task.CopyFrom.
  • tests/utils/test_telemetry.py
    • Updated imports for opentelemetry.trace to use specific names.
Ignored Files
  • Ignored by pattern: .github/workflows/** (3)
    • .github/workflows/linter.yaml
    • .github/workflows/unit-tests.yml
    • .github/workflows/update-a2a-types.yml
  • Ignored by pattern: CHANGELOG.md (1)
    • CHANGELOG.md
Activity
  • The pull request description is a template and does not contain specific human activity or comments.
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 introduces a major and well-executed refactoring, migrating the project's data models from Pydantic to Protobuf. The changes are extensive, touching nearly every part of the codebase, including client/server logic, transports, and utility functions. This move establishes Protobuf as the single source of truth for types, which is a significant improvement for maintainability, consistency, and multi-language support. The overall implementation appears solid and consistent with the goals of the refactoring. My main concern, detailed in a specific comment, is the removal of the pre-commit configuration, which impacts the project's automated code quality checks.

I am having trouble creating individual review comments. Click here to see my feedback.

.pre-commit-config.yaml (1-82)

high

The complete removal of the .pre-commit-config.yaml file is a significant change, as it disables all automated pre-commit hooks for linting, formatting, and security checks. This could negatively impact code quality and consistency across the project. Was this removal intentional? If so, could you please provide some context on the new strategy for code quality enforcement? If this was an accident, the file should be restored.

@ishymko ishymko closed this Feb 17, 2026
@ishymko ishymko reopened this Feb 17, 2026
@ishymko ishymko closed this Feb 17, 2026
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