Skip to content

Conversation

@muscariello
Copy link
Member

Description

Adds version support to generate_types.sh to decouple the A2A specification repository from the SDK repository.

Changes

  • Add A2A_SPEC_VERSION environment variable (default: v0.3.0)
  • Support --version flag for specifying versions (tags/branches/commits)
  • Add URL validation before generating types
  • Improve error messages and usage documentation

Usage

./scripts/generate_types.sh --version v0.3.0 src/a2a/types.py
A2A_SPEC_VERSION=main ./scripts/generate_types.sh src/a2a/types.py

Testing

  • 701 unit tests pass
  • Ruff and MyPy checks pass

- Add A2A_SPEC_VERSION environment variable (default: v0.3.0)
- Support version specification via --version flag
- Auto-detect version type (tag/branch/commit SHA)
- Add URL validation before generating types
- Improve error messages and usage documentation
- Add input file existence validation

Signed-off-by: Luca Muscariello <[email protected]>
@muscariello muscariello requested a review from a team as a code owner November 11, 2025 22:06
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @muscariello, 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 significantly enhances the generate_types.sh script by introducing robust versioning capabilities for the A2A specification. This change decouples the SDK repository from the A2A specification repository, allowing developers to generate types against specific versions of the A2A spec, whether it's a stable release, a development branch, or a particular commit. It also improves script reliability with URL validation and clearer user guidance.

Highlights

  • Versioning Support: The generate_types.sh script now supports specifying the A2A specification version via an A2A_SPEC_VERSION environment variable or a new --version command-line flag.
  • Flexible Version Specification: Users can now specify versions using Git tags (e.g., v1.0.0), branch names (e.g., main), or commit SHAs, allowing for greater flexibility in type generation.
  • URL Validation: The script includes a check to validate the accessibility of the remote A2A specification URL before attempting to generate types, providing clearer error messages if the version is invalid or inaccessible.
  • Improved User Experience: Enhanced error messages and updated usage documentation have been added to guide users on how to effectively use the new versioning features and troubleshoot issues.
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 version support to the generate_types.sh script, a valuable enhancement for decoupling the SDK from the A2A specification repository. The implementation is solid, adding an environment variable and a command-line flag for version control, along with URL validation and much-improved usage documentation. My review includes a few minor suggestions to enhance the script's maintainability and readability.

muscariello and others added 3 commits November 11, 2025 23:17
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: Luca Muscariello <[email protected]>
@holtskinner holtskinner changed the title feat(scripts): add version support to generate_types.sh ci(scripts): add version support to generate_types.sh Nov 12, 2025
@holtskinner holtskinner merged commit 96d70e2 into a2aproject:main Nov 12, 2025
7 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.

2 participants