8000 feat!: Update a2a.proto d14f410 by jmesnil · Pull Request #614 · a2aproject/a2a-java · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@jmesnil
Copy link
Collaborator
@jmesnil jmesnil commented Jan 26, 2026

@jmesnil jmesnil requested a review from kabir January 26, 2026 17:30
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @jmesnil, 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 focuses on refining the API by renaming a key method for push notification configuration to improve clarity and consistency with common API patterns. Additionally, it streamlines the agent capabilities by removing a deprecated feature, leading to a cleaner and more focused design.

Highlights

  • Method Renaming: The setTaskPushNotificationConfiguration method across various client, transport, and server components has been renamed to createTaskPushNotificationConfiguration to better reflect its behavior as a creation or update operation, aligning with standard API design principles.
  • Removal of stateTransitionHistory Capability: The stateTransitionHistory capability has been removed from AgentCapabilities across the codebase, including its definition in a2a.proto, Java models, and related tests and examples. This simplifies the agent's declared capabilities.
  • JSON-RPC Wrapper and gRPC Definition Updates: Corresponding JSON-RPC request/response wrappers (SetTaskPushNotificationConfigRequest/Response) and gRPC definitions have been renamed to CreateTaskPushNotificationConfigRequest/Response to match the new method naming, ensuring consistency across the protocol layers.
  • Code Example and Test Updates: All relevant code examples in README.md and numerous unit/integration tests have been updated to use the new method names and reflect the removal of the stateTransitionHistory capability, ensuring correctness and maintainability.
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

The pull request successfully updates the method name from setTaskPushNotificationConfig to createTaskPushNotificationConfig across the codebase, reflecting a more accurate semantic meaning for the operation. The removal of the stateTransitionHistory capability is also consistently applied throughout the relevant files, including the protobuf definition where the field number is correctly reserved. The changes are well-propagated across client, server, and test modules, ensuring consistency. The cleanup of unused imports in JSONRPCTransportTest.java is also a good improvement for maintainability.

based on a2aproject/A2A@d14f410

Signed-off-by: Jeff Mesnil <jmesnil@ibm.com>
@jmesnil
Copy link
Collaborator Author
jmesnil commented Jan 27, 2026

/gemini summary

@gemini-code-assist
Copy link
Contributor

Summary of Changes

This pull request refactors the API for managing push notification configurations by renaming the primary method to createTaskPushNotificationConfiguration. This change enhances the API's semantic clarity and aligns it with common design patterns. Concurrently, the stateTransitionHistory capability has been removed from AgentCapabilities, streamlining the agent's feature set and simplifying the overall design.

Highlights

  • Method Renaming for Clarity: The method setTaskPushNotificationConfiguration has been consistently renamed to createTaskPushNotificationConfiguration across client, transport, and server components. This change improves semantic clarity, better reflecting that the operation can both create and update a push notification configuration.
  • Removal of stateTransitionHistory Capability: The stateTransitionHistory capability has been removed from AgentCapabilities. This includes its definition in a2a.proto, Java models, and all related tests and examples, simplifying the agent's declared features.
  • Protocol Definition Updates: JSON-RPC request/response wrappers and gRPC definitions have been updated to align with the new method naming, ensuring consistency across all protocol layers.
  • Code Examples and Test Refactoring: All relevant code examples in README.md and numerous unit/integration tests have been updated to reflect the new method names and the removal of the stateTransitionHistory capability, ensuring the codebase remains correct and maintainable.
Changelog
  • README.md
    • Removed stateTransitionHistory from capabilities example.
    • Renamed setTaskPushNotificationConfiguration to createTaskPushNotificationConfiguration in code examples.
  • client/base/src/main/java/io/a2a/client/AbstractClient.java
    • Renamed setTaskPushNotificationConfiguration method and its Javadoc to createTaskPushNotificationConfiguration.
  • client/base/src/main/java/io/a2a/client/Client.java
    • Renamed method calls from setTaskPushNotificationConfiguration to createTaskPushNotificationConfiguration.
  • client/base/src/test/java/io/a2a/client/ClientBuilderTest.java
    • Removed stateTransitionHistory from AgentCapabilities builder.
  • client/transport/grpc/src/main/java/io/a2a/client/transport/grpc/GrpcTransport.java
    • Renamed method setTaskPushNotificationConfiguration to createTaskPushNotificationConfiguration.
    • Updated gRPC request builder from SetTaskPushNotificationConfigRequest to CreateTaskPushNotificationConfigRequest.
  • client/transport/jsonrpc/src/main/java/io/a2a/client/transport/jsonrpc/JSONRPCTransport.java
    • Renamed import from SetTaskPushNotificationConfigResponse to CreateTaskPushNotificationConfigResponse.
    • Renamed method setTaskPushNotificationConfiguration to createTaskPushNotificationConfiguration.
    • Updated request and response types to CreateTaskPushNotificationConfigRequest and CreateTaskPushNotificationConfigResponse respectively.
  • client/transport/jsonrpc/src/test/java/io/a2a/client/transport/jsonrpc/JSONRPCTransportTest.java
    • Removed unused imports (AGENT_CARD, AGENT_CARD_SUPPORTS_EXTENDED, AgentInterface, TransportProtocol).
    • Removed stateTransitionHistory from AgentCapabilities in test data.
    • Renamed test method testA2AClientSetTaskPushNotificationConfig to testA2AClientCreateTaskPushNotificationConfig.
    • Updated method calls from setTaskPushNotificationConfiguration to createTaskPushNotificationConfiguration.
  • client/transport/jsonrpc/src/test/java/io/a2a/client/transport/jsonrpc/JsonMessages.java
    • Updated JSON method name from SetTaskPushNotificationConfig to CreateTaskPushNotificationConfig.
    • Removed stateTransitionHistory from capabilities JSON structures.
  • client/transport/rest/src/main/java/io/a2a/client/transport/rest/RestTransport.java
    • Renamed method setTaskPushNotificationConfiguration to createTaskPushNotificationConfiguration.
    • Updated gRPC request builder from SetTaskPushNotificationConfigRequest to CreateTaskPushNotificationConfigRequest.
  • client/transport/rest/src/test/java/io/a2a/client/transport/rest/JsonRestMessages.java
    • Removed stateTransitionHistory from capabilities JSON structures.
  • client/transport/rest/src/test/java/io/a2a/client/transport/rest/RestTransportTest.java
    • Removed stateTransitionHistory from capabilities builder in test setup.
    • Renamed test method testSetTaskPushNotificationConfiguration to testCreateTaskPushNotificationConfiguration.
    • Updated method calls from setTaskPushNotificationConfiguration to createTaskPushNotificationConfiguration.
  • client/transport/spi/src/main/java/io/a2a/client/transport/spi/ClientTransport.java
    • Renamed method setTaskPushNotificationConfiguration and its Javadoc to createTaskPushNotificationConfiguration.
  • examples/cloud-deployment/server/src/main/java/io/a2a/examples/cloud/CloudAgentCardProducer.java
    • Removed stateTransitionHistory from capabilities builder.
  • examples/helloworld/server/src/main/java/io/a2a/examples/helloworld/AgentCardProducer.java
    • Removed stateTransitionHistory from capabilities builder.
  • extras/push-notification-config-store-database-jpa/src/test/java/io/a2a/extras/pushnotificationconfigstore/database/jpa/JpaDatabasePushNotificationConfigStoreIntegrationTest.java
    • Renamed method call from setTaskPushNotificationConfiguration to createTaskPushNotificationConfiguration.
  • extras/queue-manager-replicated/tests-multi-instance/quarkus-common/src/main/java/io/a2a/extras/queuemanager/replicated/tests/multiinstance/common/MultiInstanceReplicationAgentCards.java
    • Removed stateTransitionHistory from capabilities builder.
  • extras/queue-manager-replicated/tests-single-instance/src/test/java/io/a2a/extras/queuemanager/replicated/tests/ReplicationTestAgentCardProducer.java
    • Removed stateTransitionHistory from capabilities builder.
  • http-client/src/test/java/io/a2a/client/http/JsonMessages.java
    • Removed stateTransitionHistory from capabilities JSON structure.
  • jsonrpc-common/src/main/java/io/a2a/jsonrpc/common/wrappers/A2AResponse.java
    • Updated sealed class permits list to use CreateTaskPushNotificationConfigResponse instead of SetTaskPushNotificationConfigResponse.
  • jsonrpc-common/src/main/java/io/a2a/jsonrpc/common/wrappers/NonStreamingJSONRPCRequest.java
    • Updated sealed class permits list to use CreateTaskPushNotificationConfigRequest instead of SetTaskPushNotificationConfigRequest.
  • jsonrpc-common/src/main/java/io/a2a/jsonrpc/common/wrappers/SetTaskPushNotificationConfigRequest.java
    • File renamed to CreateTaskPushNotificationConfigRequest.java.
    • Renamed class, Javadoc, and constructors to reflect CreateTaskPushNotificationConfigRequest.
  • jsonrpc-common/src/main/java/io/a2a/jsonrpc/common/wrappers/SetTaskPushNotificationConfigResponse.java
    • File renamed to CreateTaskPushNotificationConfigResponse.java.
    • Renamed class, Javadoc, and constructors to reflect CreateTaskPushNotificationConfigResponse.
  • reference/jsonrpc/src/main/java/io/a2a/server/apps/quarkus/A2AServerRoutes.java
    • Renamed imports for SetTaskPushNotificationConfigRequest and SetTaskPushNotificationConfigResponse to their Create counterparts.
    • Updated processNonStreamingRequest to handle CreateTaskPushNotificationConfigRequest.
    • Updated convertToProto to use CreateTaskPushNotificationConfigResponse.
  • reference/jsonrpc/src/test/java/io/a2a/server/apps/quarkus/A2AServerRoutesTest.java
    • Renamed imports for SetTaskPushNotificationConfigRequest and SetTaskPushNotificationConfigResponse to their Create counterparts.
    • Renamed test method testSetTaskPushNotificationConfig_MethodNameSetInContext to testCreateTaskPushNotificationConfig_MethodNameSetInContext.
    • Updated JSON method name in test request from SetTaskPushNotificationConfig to CreateTaskPushNotificationConfig.
    • Updated mock handler verification to use CreateTaskPushNotificationConfigRequest and CreateTaskPushNotificationConfigResponse.
  • reference/rest/src/main/java/io/a2a/server/rest/quarkus/A2AServerRoutes.java
    • Renamed method setTaskPushNotificationConfiguration to CreateTaskPushNotificationConfiguration and updated its internal call.
  • reference/rest/src/test/java/io/a2a/server/rest/quarkus/A2AServerRoutesTest.java
    • Renamed test method testSetTaskPushNotificationConfiguration_MethodNameSetInContext to testCreateTaskPushNotificationConfiguration_MethodNameSetInContext.
    • Updated mock handler verification to use CreateTaskPushNotificationConfiguration.
  • server-common/src/main/java/io/a2a/server/requesthandlers/DefaultRequestHandler.java
    • Renamed method onSetTaskPushNotificationConfig to onCreateTaskPushNotificationConfig.
  • server-common/src/main/java/io/a2a/server/requesthandlers/RequestHandler.java
    • Renamed method onSetTaskPushNotificationConfig to onCreateTaskPushNotificationConfig.
  • server-common/src/test/java/io/a2a/server/requesthandlers/AbstractA2ARequestHandlerTest.java
    • Updated createAgentCard method signature and calls to remove the stateTransitionHistory parameter.
  • spec-grpc/src/main/java/io/a2a/grpc/A2A.java
    • Renamed gRPC descriptor and field accessor table for SetTaskPushNotificationConfigRequest to CreateTaskPushNotificationConfigRequest.
    • Removed state_transition_history from AgentCapabilities field accessor table.
  • spec-grpc/src/main/java/io/a2a/grpc/A2AServiceGrpc.java
    • Renamed gRPC method descriptor and related calls from setTaskPushNotificationConfig to createTaskPushNotificationConfig.
  • spec-grpc/src/main/java/io/a2a/grpc/AgentCapabilities.java
    • Removed stateTransitionHistory field, related getter/setter methods, and updated bitfield logic.
  • spec-grpc/src/main/java/io/a2a/grpc/AgentCapabilitiesOrBuilder.java
    • Removed stateTransitionHistory methods.
  • spec-grpc/src/main/java/io/a2a/grpc/CancelTaskRequest.java
    • Updated Javadoc to reflect CancelTask method name.
  • spec-grpc/src/main/java/io/a2a/grpc/DeleteTaskPushNotificationConfigRequest.java
    • Updated Javadoc to reflect DeleteTaskPushNotificationConfig method name.
  • spec-grpc/src/main/java/io/a2a/grpc/GetTaskRequest.java
    • Updated Javadoc to reflect GetTask method name.
  • spec-grpc/src/main/java/io/a2a/grpc/ListTaskPushNotificationConfigResponse.java
    • Updated Javadoc to reflect ListTaskPushNotificationConfig method name.
  • spec-grpc/src/main/java/io/a2a/grpc/SendMessageRequest.java
    • Updated Javadoc to reflect SendMessage method name.
  • spec-grpc/src/main/java/io/a2a/grpc/SetTaskPushNotificationConfigRequest.java
    • File renamed to CreateTaskPushNotificationConfigRequest.java.
    • Renamed class, Javadoc, and all internal references to CreateTaskPushNotificationConfigRequest.
  • spec-grpc/src/main/java/io/a2a/grpc/SetTaskPushNotificationConfigRequestOrBuilder.java
    • File renamed to CreateTaskPushNotificationConfigRequestOrBuilder.java.
    • Renamed interface and internal references to CreateTaskPushNotificationConfigRequestOrBuilder.
  • spec-grpc/src/main/java/io/a2a/grpc/mapper/AgentCapabilitiesMapper.java
    • Removed @Mapping annotation related to stateTransitionHistory.
  • spec-grpc/src/main/java/io/a2a/grpc/mapper/SetTaskPushNotificationConfigMapper.java
    • File renamed to CreateTaskPushNotificationConfigMapper.java.
    • Renamed interface, INSTANCE, and updated method signatures and Javadoc to use CreateTaskPushNotificationConfigRequest.
  • spec-grpc/src/main/java/io/a2a/grpc/utils/JSONRPCUtils.java
    • Updated imports for JSON-RPC wrappers.
    • Modified parseMethodRequest to use CreateTaskPushNotificationConfigRequest.
    • Modified parseResponseBody and parseError to use CreateTaskPushNotificationConfigResponse.
  • spec-grpc/src/main/java/io/a2a/grpc/utils/ProtoUtils.java
    • Updated imports for mappers.
    • Renamed setTaskPushNotificationConfigRequest to CreateTaskPushNotificationConfigRequest in ToProto.
    • Renamed setTaskPushNotificationConfigResponse to CreateTaskPushNotificationConfigResponse in ToProto.
    • Renamed setTaskPushNotificationConfig to CreateTaskPushNotificationConfig in FromProto.
  • spec-grpc/src/main/proto/a2a.proto
    • Renamed RPC method from SetTaskPushNotificationConfig to CreateTaskPushNotificationConfig.
    • Removed state_transition_history field from AgentCapabilities and added reserved 4;.
    • Updated comments for SendMessageRequest, GetTaskRequest, CancelTaskRequest, DeleteTaskPushNotificationConfigRequest, CreateTaskPushNotificationConfigRequest, and ListTaskPushNotificationConfigResponse messages.
  • spec/src/main/java/io/a2a/spec/A2AMethods.java
    • Renamed SET_TASK_PUSH_NOTIFICATION_CONFIG_METHOD to CreateTaskPushNotificationConfig.
  • spec/src/main/java/io/a2a/spec/AgentCapabilities.java
    • Removed stateTransitionHistory from record components, Javadoc, and the Builder class.
  • tck/src/main/java/io/a2a/tck/server/AgentCardProducer.java
    • Removed stateTransitionHistory from capabilities builder.
  • tests/server-common/src/test/java/io/a2a/server/apps/common/AbstractA2AServerTest.java
    • Removed unused import io.a2a.util.Utils.
    • Renamed method calls from setTaskPushNotificationConfiguration to createTaskPushNotificationConfiguration.
    • Updated createAgentCard calls to remove the stateTransitionHistory parameter.
  • tests/server-common/src/test/java/io/a2a/server/apps/common/AgentCardProducer.java
    • Removed stateTransitionHistory from capabilities builder.
  • transport/grpc/src/main/java/io/a2a/transport/grpc/handler/GrpcHandler.java
    • Renamed method setTaskPushNotificationConfig to createTaskPushNotificationConfig.
    • Updated internal calls to FromProto.CreateTaskPushNotificationConfig and requestHandler.onCreateTaskPushNotificationConfig.
  • transport/grpc/src/test/java/io/a2a/transport/grpc/handler/GrpcHandlerTest.java
    • Cleaned up imports.
    • Updated createAgentCard calls to remove the stateTransitionHistory parameter.
    • Renamed createTaskPushNotificationConfigRequest to use CreateTaskPushNotificationConfigRequest and handler.createTaskPushNotificationConfig.
  • transport/jsonrpc/src/main/java/io/a2a/transport/jsonrpc/handler/JSONRPCHandler.java
    • Renamed imports for JSON-RPC wrappers.
    • Renamed method setPushNotificationConfig and its return type to use CreateTaskPushNotificationConfigRequest and CreateTaskPushNotificationConfigResponse.
    • Updated internal calls to requestHandler.onCreateTaskPushNotificationConfig.
  • transport/jsonrpc/src/test/java/io/a2a/transport/jsonrpc/handler/JSONRPCHandlerTest.java
    • Renamed imports for JSON-RPC wrappers.
    • Renamed test methods and updated createAgentCard calls.
    • Updated request and response types to CreateTaskPushNotificationConfigRequest and CreateTaskPushNotificationConfigResponse.
  • transport/rest/src/main/java/io/a2a/transport/rest/handler/RestHandler.java
    • Renamed method setTaskPushNotificationConfiguration to CreateTaskPushNotificationConfiguration.
    • Updated internal calls to io.a2a.grpc.CreateTaskPushNotificationConfigRequest.newBuilder() and requestH 855C andler.onCreateTaskPushNotificationConfig.
  • transport/rest/src/test/java/io/a2a/transport/rest/handler/RestHandlerTest.java
    • Updated createAgentCard calls to remove the stateTransitionHistory parameter.
    • Renamed method calls from setTaskPushNotificationConfiguration to CreateTaskPushNotificationConfiguration.
Activity
  • gemini-code-assist[bot] provided an initial summary of the pull request.
  • jmesnil requested a new summary.
  • gemini-code-assist[bot] provided a review comment suggesting to update the Javadoc for createTaskPushNotificationConfiguration to reflect 'Create or update' for consistency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0