Skip to content

Conversation

@kabir
Copy link
Collaborator

@kabir kabir commented Dec 16, 2025

We do not need to stay compliant with 0.x.0 versions of the spec, and it should be more stable after 1.0.

Note this does not remove the 'kind' field, which will be done in #544

…ompatibility code

Note this does not remove the 'kind' field, which will be done in a2aproject#544
Addressed the following Javadoc issues:
- Removed excessive blank lines within Javadoc comments.
- Corrected misplaced file paths in @param tags.
- Added missing Javadoc for builder() methods.
- Simplified verbose @param tags in compact constructors.
Removed excessive newlines from Javadoc comments in several classes
in the io.a2a.spec package, and corrected a misplaced @param tag in
SubscribeToTaskRequest.
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @kabir, 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 modernizing the A2A Java specification by aligning its classes with the 1.0.0 version of the A2A protocol. It systematically removes outdated compatibility code, particularly deprecated fields and methods, which simplifies the API and reduces technical debt. Additionally, a significant effort has been made to enhance the Javadoc documentation throughout the codebase, ensuring that the purpose and usage of various classes, constructors, and methods are clearly explained for developers.

Highlights

  • Protocol Alignment: Removed compatibility code related to deprecated fields (url, preferredTransport, additionalInterfaces) in AgentCard and its mapper, aligning with A2A protocol 1.0.0.
  • API Simplification: Deprecated method(String method) setters were removed from builders of various JSON-RPC request classes, as the method name is now fixed per request type.
  • Javadoc Enhancement: Extensive Javadoc comments were added or improved across numerous classes, including constructors, fields, and methods, to provide better clarity and documentation for the API.
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 primarily focuses on enhancing Javadoc documentation across numerous classes within the spec and spec-grpc modules. Key changes include adding detailed Javadoc comments for constructors, fields, and builder methods in various request, response, error, and data model classes (e.g., AgentCard, JsonUtil, JSONRPCRequest, JSONRPCResponse, Task, Message, TaskStatusUpdateEvent, and many others). Several deprecated method builder methods were removed from JSON-RPC request builders, and deprecated fields in AgentCardMapper were reordered and updated with new comments. Additionally, AgentCard's Javadoc was updated to clarify supportedInterfaces, and the deprecated additionalInterfaces() method was removed. Review comments highlighted and requested the removal of excessive blank lines within Javadoc blocks for improved readability, which was addressed in multiple files.

Comment on lines 64 to 72
/**


* Builder for constructing GetTaskPushNotificationConfigParams instances.


*/


Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The Javadoc for the Builder class contains excessive blank lines, which affects readability. Please remove the extra newlines.

    /**
     * Builder for constructing GetTaskPushNotificationConfigParams instances.
     */

@kabir
Copy link
Collaborator Author

kabir commented Dec 16, 2025

/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 does a great job of aligning the spec classes with the a2a.proto definitions by removing deprecated compatibility code and significantly improving the Javadoc across many files. The changes make the codebase cleaner and easier to understand.

I've added a few minor comments regarding unnecessary blank lines that affect code formatting. These are stylistic suggestions to improve consistency and readability. Overall, this is a solid improvement.

@kabir
Copy link
Collaborator Author

kabir commented Dec 16, 2025

/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 does a great job of aligning the spec classes with the a2a.proto specification by removing deprecated compatibility code and significantly improving documentation across the board. The addition of Javadocs to numerous classes, methods, and fields greatly enhances code clarity and maintainability.

I've found one potential inconsistency in the JSON-RPC method name for listing tasks, which I've detailed in a specific comment. Otherwise, the changes are solid and move the codebase in the right direction.

@kabir
Copy link
Collaborator Author

kabir commented Dec 16, 2025

/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 great step forward in aligning the spec classes with the a2a.proto definitions and removing outdated compatibility code. The removal of deprecated methods and fields cleans up the API significantly. The extensive addition of Javadoc across numerous files is a major improvement for code clarity and maintainability. I've found only one minor issue regarding Javadoc formatting that should be addressed.

@kabir
Copy link
Collaborator Author

kabir commented Dec 16, 2025

/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 primarily focuses on enhancing code documentation across numerous Java classes, particularly within the spec and spec-grpc modules. Key changes include adding comprehensive Javadoc comments to constructors, fields, and methods in various record classes and JSON-RPC request/response objects, such as AgentCard, JsonUtil, JSONRPCRequest, and JSONRPCResponse and their subclasses. Specific updates involve clarifying deprecated fields in AgentCardMapper.java, adding notes about MapStruct property derivation, and providing detailed explanations for parameters in compact constructors and builder methods. Additionally, several deprecated method builder methods were removed from JSON-RPC request classes, and the additionalInterfaces() method was removed from AgentCard.java.

@ehsavoie ehsavoie merged commit f71c698 into a2aproject:main Dec 17, 2025
11 checks passed
@kabir kabir deleted the spec-api branch December 17, 2025 09:02
kabir added a commit to kabir/a2a-java that referenced this pull request Dec 23, 2025
…code (a2aproject#546)

We do not need to stay compliant with 0.x.0 versions of the spec, and it
should be more stable after 1.0.

Note this does not remove the 'kind' field, which will be done in
a2aproject#544
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