with one click
update-a2a-proto
// Update the A2A Protobuf file (a2a.proto) when the A2A protocol specification changes. Use when the user mentions updating the spec, syncing with upstream A2A, or when a new version of the A2A protocol is released.
// Update the A2A Protobuf file (a2a.proto) when the A2A protocol specification changes. Use when the user mentions updating the spec, syncing with upstream A2A, or when a new version of the A2A protocol is released.
| name | update-a2a-proto |
| description | Update the A2A Protobuf file (a2a.proto) when the A2A protocol specification changes. Use when the user mentions updating the spec, syncing with upstream A2A, or when a new version of the A2A protocol is released. |
| compatibility | Requires curl |
| allowed-tools | Bash(mvn:*) Bash(curl:*) Read Edit Write Glob Grep |
Update the A2A gRPC proto file from the upstream specification repository and regenerate Java sources.
Before updating, record what we have now so we can diff later.
spec-grpc/src/main/proto/a2a.proto to note the current commit hash (located at the top of the file in a comment)main branch or pass a tag or a commit cheksuma2a.proto from the upstream A2A repository at https://github.com/a2aproject/A2A/blob/main/specification/a2a.proto and save it to spec-grpc/src/main/proto/a2a.proto.java_package option in the downloaded proto file to:
option java_package = "org.a2aproject.sdk.grpc";
// From commit) to the commit hash / tag of the downloaded proto file.Compare the old and new versions of the specification to identify changes:
specification/a2a.proto with the backup to find:
Delete all the generated gRPC Java classes (in case of resources removed from the Protobuf definitions):
find spec-grpc/src/main/java/org/a2aproject/sdk/grpc -maxdepth 1 -name "*.java" -delete```
Regenerate gRPC Java classes by running:
mvn generate-sources -pl spec-grpc -Dskip.protobuf.generate=false
Based on the spec diff, update the relevant files
Summarize the changes for the user before proceeding.
Run the tests on all modules to verify the update
mvn clean install
Fix any issues before proceeding.
Before committing, audit all code changes.
Highlight any new, modified, or removed changes in the API in the client, common, server-common, and spec modules
Verify the build succeeds for the full project:
mvn clean install
Present the user with a summary of:
client, common, server-common, and spec modules)