Skip to content

refactor: Update A2A protocol to align with spec revision#633

Merged
kabir merged 1 commit intoa2aproject:mainfrom
ehsavoie:proto_rc
Feb 6, 2026
Merged

refactor: Update A2A protocol to align with spec revision#633
kabir merged 1 commit intoa2aproject:mainfrom
ehsavoie:proto_rc

Conversation

@ehsavoie
Copy link
Collaborator

@ehsavoie ehsavoie commented Feb 6, 2026

  • Move protocol version from AgentCard to AgentInterface level
  • Simplify resource identifiers from hierarchical names to flat IDs (e.g., "tasks/123" -> "123")
  • Restructure Part types: remove FilePart/DataPart in favor of unified Part with url/raw/data variants
  • Add OAuth flow support (ImplicitOAuthFlow, PasswordOAuthFlow)
  • Rename Security to SecurityRequirement for clarity
  • Standardize spelling: CANCELLED -> CANCELED
  • Update all client transports (gRPC, JSON-RPC, REST) and tests
  • Rename resubscribe to subscribeToTask

Breaking changes in proto API affecting:

  • Task operations (get, cancel, subscribe)
  • Push notification config management
  • Message part structure

Fixes #632 🦕

@ehsavoie ehsavoie requested review from jmesnil and kabir and removed request for kabir February 6, 2026 12:26
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @ehsavoie, 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 refactor of the A2A protocol to align with a revised specification. The core changes focus on improving the clarity and flexibility of the API by centralizing protocol version management, simplifying resource identification, and unifying data part structures. These updates are consistently applied across all client transports and associated tests, ensuring a cohesive and up-to-date implementation of the A2A protocol.

Highlights

  • Protocol Versioning: The protocol version is now managed at the AgentInterface level instead of the AgentCard level, allowing for more granular version control per interface.
  • Resource Identifier Simplification: Hierarchical resource names (e.g., 'tasks/123') have been flattened to simple IDs (e.g., '123') across various API calls like GetTask, CancelTask, and Push Notification Configuration management.
  • Unified Part Types: The Part message structure has been refactored to remove distinct FilePart and DataPart types. Instead, a unified Part message now supports url, raw (for bytes), and data (for structured JSON values) variants within a single oneof field, along with direct filename and media_type fields.
  • OAuth Flow Support: Support for ImplicitOAuthFlow and PasswordOAuthFlow has been added to the OAuthFlows message, although these are marked as deprecated.
  • Terminology Standardization: The field Security has been renamed to SecurityRequirement for clarity, and the spelling of CANCELLED has been standardized to CANCELED across the codebase.
  • API and Client Transport Updates: All client transports (gRPC, JSON-RPC, REST) and their corresponding tests have been updated to reflect the new protocol changes, including method renames and parameter adjustments.
  • Subscription Method Renaming: The resubscribe method for task event streams has been renamed to subscribeToTask for improved clarity and consistency.
Changelog
  • README.md
    • Renamed 'Resubscribe to a task' to 'Subscribe to a task' in documentation.
    • Updated code examples to use subscribeToTask instead of resubscribe.
  • client/base/src/main/java/io/a2a/client/AbstractClient.java
    • Renamed resubscribe method and its overloaded versions to subscribeToTask.
    • Updated Javadoc comments from 'Resubscribe' to 'Subscribe'.
  • client/base/src/main/java/io/a2a/client/Client.java
    • Updated Javadoc examples to use subscribeToTask instead of resubscribe.
    • Changed method name from resubscribe to subscribeToTask.
  • client/base/src/test/java/io/a2a/client/AuthenticationAuthorizationTest.java
    • Changed import AgentCard.CURRENT_PROTOCOL_VERSION to AgentInterface.CURRENT_PROTOCOL_VERSION.
    • Removed protocolVersions from AgentCard builder.
    • Added protocolVersion to AgentInterface constructor calls.
  • client/base/src/test/java/io/a2a/client/ClientBuilderTest.java
    • Changed import AgentCard.CURRENT_PROTOCOL_VERSION to AgentInterface.CURRENT_PROTOCOL_VERSION.
    • Removed protocolVersions from AgentCard builder.
    • Added protocolVersion to AgentInterface constructor call.
  • client/transport/grpc/src/main/java/io/a2a/client/transport/grpc/GrpcTransport.java
    • Changed setName to setId for GetTaskRequest and CancelTaskRequest.
    • Updated CreateTaskPushNotificationConfigRequest to use setTaskId and setConfig directly from PushNotificationConfig.
    • Modified GetTaskPushNotificationConfigRequest to use setTaskId and setId instead of setName.
    • Updated ListTaskPushNotificationConfigRequest to use setTaskId instead of setParent.
    • Updated DeleteTaskPushNotificationConfigRequest to use setTaskId and setId instead of setName.
    • Renamed resubscribe method to subscribeToTask and updated parameter names (setName to setId).
    • Updated error message for subscription failure.
  • client/transport/jsonrpc/src/main/java/io/a2a/client/transport/jsonrpc/JSONRPCTransport.java
    • Renamed resubscribe method to subscribeToTask.
  • client/transport/jsonrpc/src/test/java/io/a2a/client/transport/jsonrpc/JSONRPCTransportStreamingTest.java
    • Removed imports for TASK_RESUBSCRIPTION_REQUEST_TEST_RESPONSE and TASK_RESUBSCRIPTION_TEST_REQUEST.
    • Added imports for TASK_SUBSCRIPTION_TEST_REQUEST and TASK_SUBSCRIPTION_REQUEST_TEST_RESPONSE.
    • Renamed test method testA2AClientResubscribeToTask to testA2AClientSubscribeToTask.
    • Updated mock server request and response bodies to use 'SubscribeToTask' and 'TASK_SUBSCRIPTION_REQUEST_TEST_RESPONSE'.
    • Changed client.resubscribe to client.subscribeToTask.
  • client/transport/jsonrpc/src/test/java/io/a2a/client/transport/jsonrpc/JSONRPCTransportTest.java
    • Changed import AgentCard.CURRENT_PROTOCOL_VERSION to AgentInterface.CURRENT_PROTOCOL_VERSION.
    • Updated assertion for protocol version to check agentCard.supportedInterfaces().get(0).protocolVersion().
  • client/transport/jsonrpc/src/test/java/io/a2a/client/transport/jsonrpc/JsonMessages.java
    • Changed import AgentCard.CURRENT_PROTOCOL_VERSION to AgentInterface.CURRENT_PROTOCOL_VERSION.
    • Removed protocolVersions field from AGENT_CARD JSON string.
    • Renamed security field to securityRequirements in AGENT_CARD and GET_AUTHENTICATED_EXTENDED_AGENT_CARD_RESPONSE JSON strings.
    • Changed name to id in GetTask and CancelTask JSON requests.
    • Restructured Part types: removed file and data objects, replaced with url, raw, filename, mediaType directly.
    • Standardized TASK_STATE_CANCELLED to TASK_STATE_CANCELED.
    • Updated GetTaskPushNotificationConfig and CreateTaskPushNotificationConfig JSON requests/responses to use taskId and id instead of name or parent.
    • Changed authentication.schemes to authentication.scheme in JSON responses.
    • Removed protocolVersions from GET_AUTHENTICATED_EXTENDED_AGENT_CARD_RESPONSE and AGENT_CARD_SUPPORTS_EXTENDED JSON strings.
  • client/transport/jsonrpc/src/test/java/io/a2a/client/transport/jsonrpc/JsonStreamingMessages.java
    • Removed final field from TaskStatusUpdateEvent JSON.
    • Renamed TASK_RESUBSCRIPTION_REQUEST_TEST_RESPONSE to TASK_SUBSCRIPTION_REQUEST_TEST_RESPONSE.
    • Renamed TASK_RESUBSCRIPTION_TEST_REQUEST to TASK_SUBSCRIPTION_TEST_REQUEST.
    • Changed name to id in SubscribeToTask JSON request.
  • client/transport/jsonrpc/src/test/java/io/a2a/client/transport/jsonrpc/sse/SSEEventListenerTest.java
    • Modified testFinalTaskStatusUpdateEventCancels to derive isFinal from TaskStatus.state().isFinal() instead of a direct field.
  • client/transport/rest/src/main/java/io/a2a/client/transport/rest/RestTransport.java
    • Removed unused import A2ACardResolver.
    • Changed setName to setId for GetTaskRequest and CancelTaskRequest.
    • Updated CreateTaskPushNotificationConfigRequest to use setTaskId and setConfig directly from PushNotificationConfig.
    • Modified GetTaskPushNotificationConfigRequest to use setTaskId and setId instead of setName.
    • Updated ListTaskPushNotificationConfigRequest to use setTaskId instead of setParent.
    • Updated DeleteTaskPushNotificationConfigRequest to use setTaskId and setId instead of setName.
    • Renamed resubscribe method to subscribeToTask and updated parameter names (setName to setId).
  • client/transport/rest/src/test/java/io/a2a/client/transport/rest/JsonRestMessages.java
    • Changed name to id in CANCEL_TASK_TEST_REQUEST.
    • Standardized TASK_STATE_CANCELLED to TASK_STATE_CANCELED.
    • Restructured Part types: removed file object, replaced with url or raw directly.
    • Renamed security field to securityRequirements.
    • Updated GET_TASK_PUSH_NOTIFICATION_CONFIG_TEST_RESPONSE, LIST_TASK_PUSH_NOTIFICATION_CONFIG_TEST_RESPONSE, SET_TASK_PUSH_NOTIFICATION_CONFIG_TEST_REQUEST, SET_TASK_PUSH_NOTIFICATION_CONFIG_TEST_RESPONSE JSON strings to use taskId and id instead of name or parent.
    • Changed authentication.schemes to authentication.scheme.
  • client/transport/rest/src/test/java/io/a2a/client/transport/rest/RestTransportTest.java
    • Changed import AgentCard.CURRENT_PROTOCOL_VERSION to AgentInterface.CURRENT_PROTOCOL_VERSION.
    • Updated AgentInterface constructor to include protocolVersion.
    • Removed protocolVersions from AgentCard builder.
    • Renamed test method testResubscribe to testSubscribe.
    • Changed client.resubscribe to client.subscribeToTask.
  • client/transport/rest/src/test/java/io/a2a/client/transport/rest/sse/SSEEventListenerTest.java
    • Removed final field from TaskStatusUpdateEvent JSON.
  • client/transport/spi/src/main/java/io/a2a/client/transport/spi/ClientTransport.java
    • Updated Javadoc comments from 'resubscribe' to 'subscribe'.
    • Renamed resubscribe method to subscribeToTask.
  • client/transport/spi/src/test/java/io/a2a/client/transport/spi/sse/SSEEventListenerTest.java
    • Modified createTaskStatusUpdateEvent to derive isFinal from TaskStatus.state().isFinal() instead of a direct field.
  • examples/cloud-deployment/server/src/main/java/io/a2a/examples/cloud/CloudAgentCardProducer.java
    • Changed import AgentCard.CURRENT_PROTOCOL_VERSION to AgentInterface.CURRENT_PROTOCOL_VERSION.
    • Updated AgentInterface constructor to include protocolVersion.
    • Removed protocolVersions from AgentCard builder.
  • examples/cloud-deployment/server/src/test/java/io/a2a/examples/cloud/A2ACloudExampleClient.java
    • Changed streamingClient.resubscribe to streamingClient.subscribeToTask.
  • examples/helloworld/server/src/main/java/io/a2a/examples/helloworld/AgentCardProducer.java
    • Changed import AgentCard.CURRENT_PROTOCOL_VERSION to AgentInterface.CURRENT_PROTOCOL_VERSION.
    • Updated AgentInterface constructor to include protocolVersion.
    • Removed protocolVersions from AgentCard builder.
  • extras/queue-manager-replicated/core/src/main/java/io/a2a/extras/queuemanager/replicated/core/ReplicatedQueueManager.java
    • Removed unused import Nullable.
    • Removed isFinal field from TaskStatusUpdateEvent builder.
  • extras/queue-manager-replicated/core/src/test/java/io/a2a/extras/queuemanager/replicated/core/EventSerializationTest.java
    • Removed isFinal field from TaskStatusUpdateEvent builder.
  • extras/queue-manager-replicated/core/src/test/java/io/a2a/extras/queuemanager/replicated/core/ReplicatedQueueManagerTest.java
    • Removed isFinal field from TaskStatusUpdateEvent builder.
  • extras/queue-manager-replicated/replication-mp-reactive/src/test/java/io/a2a/extras/queuemanager/replicated/mp_reactive/ReactiveMessagingReplicationStrategyTest.java
    • Removed isFinal field from TaskStatusUpdateEvent builder.
  • extras/queue-manager-replicated/tests-multi-instance/quarkus-common/src/main/java/io/a2a/extras/queuemanager/replicated/tests/multiinstance/common/MultiInstanceReplicationAgentCards.java
    • Changed import AgentCard.CURRENT_PROTOCOL_VERSION to AgentInterface.CURRENT_PROTOCOL_VERSION.
    • Updated AgentInterface constructor to include protocolVersion.
    • Removed protocolVersions from AgentCard builder.
  • extras/queue-manager-replicated/tests-multi-instance/tests/src/test/java/io/a2a/extras/queuemanager/replicated/tests/multiinstance/MultiInstanceReplicationTest.java
    • Added import AgentInterface.CURRENT_PROTOCOL_VERSION.
    • Updated AgentInterface constructor to include protocolVersion.
    • Updated Javadoc comments from 'Resubscribe' to 'Subscribe'.
    • Changed getClient().resubscribe to getClient().subscribeToTask.
  • extras/queue-manager-replicated/tests-single-instance/src/test/java/io/a2a/extras/queuemanager/replicated/tests/KafkaReplicationIntegrationTest.java
    • Updated comments from 'resubscription' to 'subscription'.
    • Changed resubscribeLatch to subscribeLatch.
    • Updated assertion message.
    • Changed streamingClient.resubscribe to streamingClient.subscribeToTask.
    • Removed isFinal field from TaskStatusUpdateEvent builder.
  • extras/queue-manager-replicated/tests-single-instance/src/test/java/io/a2a/extras/queuemanager/replicated/tests/ReplicationTestAgentCardProducer.java
    • Changed import AgentCard.CURRENT_PROTOCOL_VERSION to AgentInterface.CURRENT_PROTOCOL_VERSION.
    • Updated AgentInterface constructor to include protocolVersion.
    • Removed protocolVersions from AgentCard builder.
  • http-client/src/test/java/io/a2a/client/http/JsonMessages.java
    • Removed protocolVersions field from AGENT_CARD JSON string.
    • Renamed security field to securityRequirements.
  • jsonrpc-common/src/main/java/io/a2a/jsonrpc/common/wrappers/StreamingJSONRPCRequest.java
    • Updated Javadoc comment from 'Resubscribe' to 'Subscribe'.
  • jsonrpc-common/src/main/java/io/a2a/jsonrpc/common/wrappers/SubscribeToTaskRequest.java
    • Updated Javadoc comment from 'Resubscribe' to 'Subscribe'.
  • jsonrpc-common/src/test/java/io/a2a/jsonrpc/common/json/StreamingEventKindSerializationTest.java
    • Removed isFinal field from TaskStatusUpdateEvent builder.
  • reference/jsonrpc/src/test/java/io/a2a/server/apps/quarkus/A2AServerRoutesTest.java
    • Changed import AgentCard.CURRENT_PROTOCOL_VERSION to AgentInterface.CURRENT_PROTOCOL_VERSION.
    • Changed name to id in GetTask, CancelTask, SubscribeToTask JSON requests.
    • Updated CreateTaskPushNotificationConfig JSON request to use taskId and id instead of parent and name, and authentication.scheme instead of schemes.
    • Updated GetTaskPushNotificationConfig, ListTaskPushNotificationConfig, DeleteTaskPushNotificationConfig JSON requests to use taskId and id instead of name or parent.
    • Removed protocolVersions from AgentCard builder.
    • Updated AgentInterface constructor to include protocolVersion.
  • reference/rest/src/test/java/io/a2a/server/rest/quarkus/A2AServerRoutesTest.java
    • Renamed test method testResubscribeTask_MethodNameSetInContext to testSubscribeTask_MethodNameSetInContext.
  • server-common/src/main/java/io/a2a/server/events/EventQueue.java
    • Updated Javadoc comments from 'resubscribe' to 'subscribe'.
  • server-common/src/main/java/io/a2a/server/requesthandlers/DefaultRequestHandler.java
    • Removed unused import CountDownLatch and MainEventBusProcessorCallback.
    • Renamed onResubscribeToTask method to onSubscribeToTask and updated log messages.
  • server-common/src/main/java/io/a2a/server/requesthandlers/RequestHandler.java
    • Renamed onResubscribeToTask method to onSubscribeToTask.
  • server-common/src/main/java/io/a2a/server/tasks/TaskUpdater.java
    • Removed isFinal field from TaskStatusUpdateEvent builder.
  • server-common/src/main/java/io/a2a/server/version/A2AVersionValidator.java
    • Changed default protocol version reference from AgentCard.CURRENT_PROTOCOL_VERSION to AgentInterface.CURRENT_PROTOCOL_VERSION.
    • Modified validateProtocolVersion to collect unique protocol versions from all supported interfaces.
  • server-common/src/test/java/io/a2a/server/events/EventConsumerTest.java
    • Removed isFinal field from TaskStatusUpdateEvent builder and adjusted status for final events.
  • server-common/src/test/java/io/a2a/server/events/EventQueueTest.java
    • Removed isFinal field from TaskStatusUpdateEvent builder.
  • server-common/src/test/java/io/a2a/server/requesthandlers/AbstractA2ARequestHandlerTest.java
    • Changed import AgentCard.CURRENT_PROTOCOL_VERSION to AgentInterface.CURRENT_PROTOCOL_VERSION.
    • Updated AgentInterface constructor to include protocolVersion.
    • Removed protocolVersions from AgentCard builder.
  • server-common/src/test/java/io/a2a/server/tasks/TaskManagerTest.java
    • Removed isFinal field from TaskStatusUpdateEvent builder.
  • server-common/src/test/java/io/a2a/server/tasks/TaskUpdaterTest.java
    • Adjusted checkTaskStatusUpdateEventOnQueue calls to pass false for isFinal as it's now derived.
  • server-common/src/test/java/io/a2a/server/version/A2AVersionValidatorTest.java
    • Updated AgentInterface constructor to include protocolVersion.
    • Removed protocolVersions from AgentCard builder.
  • spec-grpc/pom.xml
    • Updated protobuf-maven-plugin version from 4.0.3 to 4.1.2.
  • spec-grpc/src/main/java/io/a2a/grpc/A2A.java
    • Removed FilePart and DataPart descriptors.
    • Renamed Security descriptor to SecurityRequirement.
    • Added ImplicitOAuthFlow and PasswordOAuthFlow descriptors.
    • Updated Part field accessor table to reflect new content oneof fields (raw, url, data) and new direct fields (filename, media_type).
    • Updated TaskStatusUpdateEvent field accessor table (removed final).
    • Updated AuthenticationInfo field accessor table (changed schemes to scheme).
    • Updated AgentInterface field accessor table (added protocolVersion).
    • Updated AgentCard field accessor table (removed protocolVersions, changed security to securityRequirements).
    • Updated AgentSkill field accessor table (changed security to securityRequirements).
    • Updated TaskPushNotificationConfig field accessor table (changed name to tenant, id, taskId).
    • Updated OAuthFlows field accessor table (added implicit, password).
    • Updated GetTaskRequest, CancelTaskRequest, GetTaskPushNotificationConfigRequest, DeleteTaskPushNotificationConfigRequest, CreateTaskPushNotificationConfigRequest, SubscribeToTaskRequest, ListTaskPushNotificationConfigRequest field accessor tables to use id or taskId instead of name or parent.
  • spec-grpc/src/main/java/io/a2a/grpc/A2AServiceGrpc.java
    • Updated Javadoc comments from 'cancelled' to 'canceled' for SubscribeToTask.
  • spec-grpc/src/main/java/io/a2a/grpc/AgentCard.java
    • Removed protocolVersions field.
    • Renamed security field to securityRequirements.
    • Updated AgentCard builder logic to reflect these changes.
  • spec-grpc/src/main/java/io/a2a/grpc/AgentCardOrBuilder.java
    • Removed protocolVersions methods.
    • Renamed security methods to securityRequirements.
  • spec-grpc/src/main/java/io/a2a/grpc/AgentInterface.java
    • Updated Javadoc to mention protocol version.
    • Added protocolVersion field.
    • Updated builder logic to handle protocolVersion.
  • spec-grpc/src/main/java/io/a2a/grpc/AgentInterfaceOrBuilder.java
    • Added protocolVersion methods.
  • spec-grpc/src/main/java/io/a2a/grpc/AgentSkill.java
    • Renamed security field to securityRequirements.
    • Updated builder logic to reflect this change.
  • spec-grpc/src/main/java/io/a2a/grpc/AgentSkillOrBuilder.java
    • Renamed security methods to securityRequirements.
  • spec-grpc/src/main/java/io/a2a/grpc/AuthenticationInfo.java
    • Changed schemes field to scheme (single string).
    • Updated Javadoc for credentials.
    • Updated builder logic to reflect this change.
  • spec-grpc/src/main/java/io/a2a/grpc/AuthenticationInfoOrBuilder.java
    • Changed schemes methods to scheme (single string).
  • spec-grpc/src/main/java/io/a2a/grpc/CancelTaskRequest.java
    • Changed name field to id.
    • Updated builder logic.
  • spec-grpc/src/main/java/io/a2a/grpc/CancelTaskRequestOrBuilder.java
    • Changed name methods to id.
  • spec-grpc/src/main/java/io/a2a/grpc/CreateTaskPushNotificationConfigRequest.java
    • Changed parent field to taskId.
    • Changed config field type from TaskPushNotificationConfig to PushNotificationConfig.
    • Updated builder logic.
  • spec-grpc/src/main/java/io/a2a/grpc/CreateTaskPushNotificationConfigRequestOrBuilder.java
    • Changed parent methods to taskId.
    • Changed config type.
  • spec-grpc/src/main/java/io/a2a/grpc/DataPart.java
    • Removed file.
  • spec-grpc/src/main/java/io/a2a/grpc/DataPartOrBuilder.java
    • Removed file.
  • spec-grpc/src/main/java/io/a2a/grpc/DeleteTaskPushNotificationConfigRequest.java
    • Changed name field to taskId and id.
    • Updated builder logic.
  • spec-grpc/src/main/java/io/a2a/grpc/DeleteTaskPushNotificationConfigRequestOrBuilder.java
    • Changed name methods to taskId and id.
  • spec-grpc/src/main/java/io/a2a/grpc/FilePart.java
    • Removed file.
  • spec-grpc/src/main/java/io/a2a/grpc/FilePartOrBuilder.java
    • Removed file.
  • spec-grpc/src/main/java/io/a2a/grpc/GetTaskPushNotificationConfigRequest.java
    • Changed name field to taskId and id.
    • Updated builder logic.
  • spec-grpc/src/main/java/io/a2a/grpc/GetTaskPushNotificationConfigRequestOrBuilder.java
    • Changed name methods to taskId and id.
  • spec-grpc/src/main/java/io/a2a/grpc/GetTaskRequest.java
    • Changed name field to id.
    • Updated builder logic.
  • spec-grpc/src/main/java/io/a2a/grpc/GetTaskRequestOrBuilder.java
    • Changed name methods to id.
  • spec-grpc/src/main/java/io/a2a/grpc/ImplicitOAuthFlow.java
    • Added new file.
  • spec-grpc/src/main/java/io/a2a/grpc/ImplicitOAuthFlowOrBuilder.java
    • Added new file.
  • spec-grpc/src/main/java/io/a2a/grpc/ListTaskPushNotificationConfigRequest.java
    • Changed parent field to taskId.
    • Updated builder logic.
  • spec-grpc/src/main/java/io/a2a/grpc/ListTaskPushNotificationConfigRequestOrBuilder.java
    • Changed parent methods to taskId.
  • spec-grpc/src/main/java/io/a2a/grpc/OAuthFlows.java
    • Added implicit and password fields to flow oneof.
    • Marked implicit and password as deprecated.
    • Updated builder logic.
  • spec-grpc/src/main/java/io/a2a/grpc/OAuthFlowsOrBuilder.java
    • Added implicit and password methods.
  • spec-grpc/src/main/java/io/a2a/grpc/Part.java
    • Changed part oneof to content oneof.
    • Replaced FilePart and DataPart with raw (bytes), url (string), and data (google.protobuf.Value).
    • Moved metadata, filename, media_type to be direct fields of Part.
    • Updated builder logic.
  • spec-grpc/src/main/java/io/a2a/grpc/PartOrBuilder.java
    • Updated methods to reflect changes in Part message.
  • spec-grpc/src/main/java/io/a2a/grpc/PasswordOAuthFlow.java
    • Added new file.
  • spec-grpc/src/main/java/io/a2a/grpc/PasswordOAuthFlowOrBuilder.java
    • Added new file.
  • spec-grpc/src/main/java/io/a2a/grpc/PushNotificationConfig.java
    • Updated Javadoc for authentication.
  • spec-grpc/src/main/java/io/a2a/grpc/PushNotificationConfigOrBuilder.java
    • Updated Javadoc for authentication.
  • spec-grpc/src/main/java/io/a2a/grpc/Security.java
    • Renamed to SecurityRequirement.java.
  • spec-grpc/src/main/java/io/a2a/grpc/SecurityOrBuilder.java
    • Renamed to SecurityRequirementOrBuilder.java.
  • spec-grpc/src/main/java/io/a2a/grpc/SendMessageConfiguration.java
    • Updated Javadoc for blocking field.
  • spec-grpc/src/main/java/io/a2a/grpc/SendMessageConfigurationOrBuilder.java
    • Updated Javadoc for blocking field.
  • spec-grpc/src/main/java/io/a2a/grpc/SubscribeToTaskRequest.java
    • Changed name field to id.
    • Updated builder logic.
  • spec-grpc/src/main/java/io/a2a/grpc/SubscribeToTaskRequestOrBuilder.java
    • Changed name methods to id.
  • spec-grpc/src/main/java/io/a2a/grpc/TaskPushNotificationConfig.java
    • Changed name field to tenant, id, taskId.
    • Updated builder logic.
  • spec-grpc/src/main/java/io/a2a/grpc/TaskPushNotificationConfigOrBuilder.java
    • Changed name methods to tenant, id, taskId.
  • spec-grpc/src/main/java/io/a2a/grpc/TaskState.java
    • Standardized TASK_STATE_CANCELLED to TASK_STATE_CANCELED.
    • Updated Javadoc for TASK_STATE_AUTH_REQUIRED.
  • spec-grpc/src/main/java/io/a2a/grpc/TaskStatusUpdateEvent.java
    • Removed final field and reserved its tag.
    • Updated builder logic.
  • spec-grpc/src/main/java/io/a2a/grpc/TaskStatusUpdateEventOrBuilder.java
    • Removed final methods.
  • spec-grpc/src/main/java/io/a2a/grpc/mapper/AgentCardMapper.java
    • Updated mappings for security and securityRequirements.
  • spec-grpc/src/main/java/io/a2a/grpc/mapper/AgentInterfaceMapper.java
    • Added @Mapping for protocolVersion.
  • spec-grpc/src/main/java/io/a2a/grpc/mapper/AgentSkillMapper.java
    • Updated mappings for security and securityRequirements.
  • spec-grpc/src/main/java/io/a2a/grpc/mapper/AuthenticationInfoMapper.java
    • Modified mappings to handle schemes (List) to scheme (String) conversion.
  • spec-grpc/src/main/java/io/a2a/grpc/mapper/CreateTaskPushNotificationConfigMapper.java
    • Removed resource name parsing logic.
    • Updated mappings to use taskId and id directly.
    • Changed config type.
  • spec-grpc/src/main/java/io/a2a/grpc/mapper/DataPartMapper.java
    • Removed file.
  • spec-grpc/src/main/java/io/a2a/grpc/mapper/DeleteTaskPushNotificationConfigParamsMapper.java
    • Removed resource name parsing logic.
    • Updated mappings to use taskId and id directly.
  • spec-grpc/src/main/java/io/a2a/grpc/mapper/FilePartMapper.java
    • Removed file.
  • spec-grpc/src/main/java/io/a2a/grpc/mapper/GetTaskPushNotificationConfigParamsMapper.java
    • Removed resource name parsing logic.
    • Updated mappings to use taskId and id directly.
  • spec-grpc/src/main/java/io/a2a/grpc/mapper/ListTaskPushNotificationConfigParamsMapper.java
    • Removed resource name parsing logic.
    • Updated mappings to use taskId directly.
  • spec-grpc/src/main/java/io/a2a/grpc/mapper/OAuthFlowsMapper.java
    • Added ignore mappings for implicit and password fields.
  • spec-grpc/src/main/java/io/a2a/grpc/mapper/PartMapper.java
    • Updated toProto and fromProto to handle new Part structure (raw, url, data as Value, filename, media_type).
    • Removed dependencies on FilePartMapper and DataPartMapper.
  • spec-grpc/src/main/java/io/a2a/grpc/mapper/SecurityMapper.java
    • Renamed to SecurityRequirementMapper.
    • Updated logic to map to/from SecurityRequirement.
  • spec-grpc/src/main/java/io/a2a/grpc/mapper/SubscribeToTaskRequestMapper.java
    • Removed resource name parsing logic.
    • Updated mappings to use id directly.
  • spec-grpc/src/main/java/io/a2a/grpc/mapper/TaskIdParamsMapper.java
    • Removed resource name parsing logic.
    • Updated mappings to use id directly.
  • spec-grpc/src/main/java/io/a2a/grpc/mapper/TaskPushNotificationConfigMapper.java
    • Removed resource name parsing logic.
    • Updated mappings to use id, taskId, tenant directly.
  • spec-grpc/src/main/java/io/a2a/grpc/mapper/TaskStateMapper.java
    • Standardized TASK_STATE_CANCELLED to TASK_STATE_CANCELED.
  • spec-grpc/src/main/java/io/a2a/grpc/mapper/TaskStatusUpdateEventMapper.java
    • Removed isFinal mapping and updated fromProto to derive isFinal from status.state().isFinal().
  • spec-grpc/src/main/proto/a2a.proto
    • Added comment about commit.
    • Updated A2AService RPC definitions to use id and task_id instead of name and parent in HTTP rules and method signatures.
    • Updated Javadoc for SubscribeToTask from 'cancelled' to 'canceled'.
    • Updated Javadoc for SendMessageConfiguration.blocking.
    • Standardized TASK_STATE_CANCELLED to TASK_STATE_CANCELED.
    • Updated Javadoc for TASK_STATE_AUTH_REQUIRED.
    • Refactored Part message: removed FilePart and DataPart messages. Part now has content oneof with text, raw (bytes), url (string), and data (google.protobuf.Value). metadata, filename, media_type are now direct fields of Part.
    • Updated AuthenticationInfo message: schemes (repeated string) changed to scheme (single string).
    • Updated AgentInterface message: added protocol_version field.
    • Updated AgentCard message: removed protocol_versions field, reserved its tag. Renamed security to security_requirements.
    • Updated AgentSkill message: renamed security to security_requirements.
    • Updated TaskPushNotificationConfig message: changed name field to tenant, id, task_id.
    • Renamed Security message to SecurityRequirement.
    • Updated OAuthFlows message: added deprecated ImplicitOAuthFlow and PasswordOAuthFlow to flow oneof.
    • Added new messages ImplicitOAuthFlow and PasswordOAuthFlow (deprecated).
    • Updated GetTaskRequest, CancelTaskRequest, GetTaskPushNotificationConfigRequest, DeleteTaskPushNotificationConfigRequest, CreateTaskPushNotificationConfigRequest, SubscribeToTaskRequest, ListTaskPushNotificationConfigRequest messages to use id or task_id instead of name or parent.
    • Updated TaskStatusUpdateEvent message: removed final field and reserved its tag.
  • spec-grpc/src/test/java/io/a2a/grpc/utils/JSONRPCUtilsTest.java
    • Updated JSON strings for requests and responses to reflect changes in field names (parent to taskId, name to id, schemes to scheme).
  • spec-grpc/src/test/java/io/a2a/grpc/utils/ToProtoTest.java
    • Changed import AgentCard.CURRENT_PROTOCOL_VERSION to AgentInterface.CURRENT_PROTOCOL_VERSION.
    • Updated AgentInterface constructor to include protocolVersion.
    • Removed protocolVersions from AgentCard builder.
    • Updated assertions for AgentCard to check AgentInterface.protocolVersion and securityRequirements.
    • Updated assertions for Task and Message to reflect changes in Part structure (no FilePart or DataPart objects).
    • Updated assertions for TaskPushNotificationConfig to check taskId and id directly, and authentication.scheme.
    • Removed isFinal assertion for TaskStatusUpdateEvent.
    • Updated assertions for DeleteTaskPushNotificationConfigRequest and ListTaskPushNotificationConfigRequest to check taskId and id directly.
  • spec/src/main/java/io/a2a/spec/AgentCard.java
    • Removed protocolVersions from record and builder.
  • spec/src/main/java/io/a2a/spec/AgentInterface.java
    • Added protocolVersion to record and constructors.
    • Defined CURRENT_PROTOCOL_VERSION.
  • spec/src/main/java/io/a2a/spec/TaskStatusUpdateEvent.java
    • Added static imports for TaskState enums.
    • Modified compact constructor to validate isFinal against status.state().isFinal().
    • Added isFinalOrInterrupted method.
    • Removed isFinal field from builder.
  • tck/src/main/java/io/a2a/tck/server/AgentCardProducer.java
    • Changed import AgentCard.CURRENT_PROTOCOL_VERSION to AgentInterface.CURRENT_PROTOCOL_VERSION.
    • Updated AgentInterface constructor to include protocolVersion.
    • Removed protocolVersions from AgentCard builder.
  • tck/src/main/java/io/a2a/tck/server/AgentExecutorProducer.java
    • Updated comments from 'resubscribe' to 'subscribe'.
    • Modified cancel method to use new TaskStatusUpdateEvent constructor.
  • tests/server-common/src/test/java/io/a2a/server/apps/common/AbstractA2AServerTest.java
    • Changed import AgentCard.CURRENT_PROTOCOL_VERSION to AgentInterface.CURRENT_PROTOCOL_VERSION.
    • Renamed test methods from 'Resubscribe' to 'Subscribe'.
    • Updated comments from 'resubscribe' to 'subscribe'.
    • Changed getClient().resubscribe to getClient().subscribeToTask.
    • Removed isFinal field from TaskStatusUpdateEvent builder.
    • Updated AgentInterface constructor to include protocolVersion.
  • tests/server-common/src/test/java/io/a2a/server/apps/common/AgentCardProducer.java
    • Changed import AgentCard.CURRENT_PROTOCOL_VERSION to AgentInterface.CURRENT_PROTOCOL_VERSION.
    • Updated AgentInterface constructor to include protocolVersion.
    • Removed protocolVersions from AgentCard builder.
  • transport/grpc/src/main/java/io/a2a/transport/grpc/handler/GrpcHandler.java
    • Renamed onResubscribeToTask to onSubscribeToTask.
    • Modified stream response handling to derive isFinal from TaskStatus state instead of a direct field.
Activity
  • The pull request was created by ehsavoie.
  • The title indicates a refactor to update the A2A protocol to align with a spec revision.
  • The body provides a detailed list of changes, including breaking changes.
  • The patch shows extensive changes across multiple modules (client, transport, examples, extras, server-common, spec-grpc, spec, tck) to implement the protocol revision.
  • There are no comments or reviews visible in the provided context.
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 is a significant refactoring to align the A2A protocol implementation with a recent specification revision. The changes are extensive, touching upon core data models, client/server implementations, and documentation. Key updates include renaming resubscribe to subscribeToTask, simplifying resource identifiers to flat IDs, restructuring Part types, and moving protocol versioning to the AgentInterface level. The changes are well-executed and consistent across the codebase. I've identified a few minor documentation inconsistencies and one potential issue in the gRPC stream handling logic that should be addressed.

@ehsavoie
Copy link
Collaborator Author

ehsavoie commented Feb 6, 2026

/gemini review

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 is a significant and well-executed refactoring to align the A2A protocol implementation with a revised specification. The changes are extensive, touching many parts of the codebase, including client transports, tests, examples, and the gRPC specification itself. Key changes like moving the protocol version, simplifying resource identifiers, restructuring Part types, and renaming resubscribe to subscribeToTask have been applied consistently. The code quality is high, and the updates correctly reflect the new specification. I have one suggestion to improve code readability by encapsulating some logic in a helper method.

Comment on lines +313 to +322
io.a2a.grpc.TaskState state = response.getStatusUpdate().getStatus().getState();
boolean isFinal = state == io.a2a.grpc.TaskState.TASK_STATE_CANCELED
|| state == io.a2a.grpc.TaskState.TASK_STATE_COMPLETED
|| state == io.a2a.grpc.TaskState.TASK_STATE_FAILED
|| state == io.a2a.grpc.TaskState.TASK_STATE_REJECTED;
if (isFinal) {
responseObserver.onCompleted();
} else {
subscription.request(1);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

To improve readability and avoid duplicating logic, consider extracting the check for a final task state into a private helper method. The domain TaskState enum already has an isFinal() method, and creating a similar utility for the gRPC TaskState enum would be beneficial.

For example:

private boolean isFinalState(io.a2a.grpc.TaskState state) {
    return switch (state) {
        case TASK_STATE_CANCELED,
             TASK_STATE_COMPLETED,
             TASK_STATE_FAILED,
             TASK_STATE_REJECTED -> true;
        default -> false;
    };
}

This would simplify the onNext method to:

if (response.hasStatusUpdate()) {
    if (isFinalState(response.getStatusUpdate().getStatus().getState())) {
        responseObserver.onCompleted();
    } else {
        subscription.request(1);
    }
} else {
    subscription.request(1);
}

Copy link
Collaborator

@jmesnil jmesnil left a comment

Choose a reason for hiding this comment

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

/lgtm

I see there is now a tag for the spec https://github.com/a2aproject/A2A/releases/tag/v1.0.0-rc.
There is no change to the proto file that is copied in the PR so we can keep the one already there.

Copy link
Collaborator

@kabir kabir left a comment

Choose a reason for hiding this comment

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

I think we need to align the spec model more with the proto changes

@ehsavoie ehsavoie force-pushed the proto_rc branch 4 times, most recently from 0900704 to 1066250 Compare February 6, 2026 16:48
@ehsavoie ehsavoie requested a review from kabir February 6, 2026 16:50
- Move protocol version from AgentCard to AgentInterface level
- Simplify resource identifiers from hierarchical names to flat IDs
  (e.g., "tasks/123" -> "123")
- Restructure Part types: remove FilePart/DataPart in favor of
  unified Part with url/raw/data variants
- Add OAuth flow support (ImplicitOAuthFlow, PasswordOAuthFlow)
- Rename Security to SecurityRequirement for clarity
- Standardize spelling: CANCELLED -> CANCELED
- Update all client transports (gRPC, JSON-RPC, REST) and tests
- Rename resubscribe to subscribeToTask

Breaking changes in proto API affecting:
  - Task operations (get, cancel, subscribe)
  - Push notification config management
  - Message part structure

Signed-off-by: Emmanuel Hugonnet <ehugonne@redhat.com>
@kabir kabir merged commit 5d2cd75 into a2aproject:main Feb 6, 2026
8 checks passed
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.

Upgrade a2a.proto to A2A RC1

3 participants