Skip to content

fix: migrate e2e, examples and a2aext after core types change#217

Merged
yarolegovich merged 3 commits intoyarolegovich/a2asrv-migratefrom
yarolegovich/migrate-the-rest
Feb 18, 2026
Merged

fix: migrate e2e, examples and a2aext after core types change#217
yarolegovich merged 3 commits intoyarolegovich/a2asrv-migratefrom
yarolegovich/migrate-the-rest

Conversation

@yarolegovich
Copy link
Member

No description provided.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @yarolegovich, 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 updates various components, including end-to-end tests, examples, and the a2aext module, to reflect recent modifications in the core A2A types. The changes ensure that message sending, agent card definitions, and event handling mechanisms are consistent with the latest API, improving overall compatibility and maintainability across the project. It primarily involves refactoring existing code to use new type definitions and constructors.

Highlights

  • Core Type Migration: Updated MessageSendParams to SendMessageRequest and TextPart{Text: "..."} to NewTextPart("...") across various files, aligning with recent core type changes.
  • AgentCard Structure Update: Refactored AgentCard definitions to use SupportedInterfaces instead of URL and PreferredTransport for specifying agent endpoints and protocols.
  • Event Handling Simplification: Removed explicit event.Final = true assignments for task status update events, indicating a change in how task finality is determined or handled.
  • gRPC Integration Adjustments: Temporarily commented out gRPC-related imports and handler registrations in several examples and e2e tests, with a TODO for future pbconv implementation.
  • Client Method Parameter Updates: Migrated client method parameters for CancelTask and SubscribeToTask to new request types (CancelTaskRequest and SubscribeToTaskRequest).
Changelog
  • a2aext/activator_test.go
    • Updated SendMessage calls to use a2a.SendMessageRequest and a2a.NewTextPart.
    • Modified startServerWithExtensions to use SupportedInterfaces in a2a.AgentCard.
  • a2aext/propagator_test.go
    • Updated SendMessage calls to use a2a.SendMessageRequest and a2a.NewTextPart.
    • Changed a2a.AgentInterface field Transport to ProtocolBinding.
    • Modified newAgentCard to use SupportedInterfaces in a2a.AgentCard.
  • e2e/extensions_durations_test.go
    • Removed PreferredTransport from a2a.AgentCard initialization.
    • Updated serverCard to use SupportedInterfaces for defining the server URL and protocol binding.
    • Updated SendMessage calls to use a2a.SendMessageRequest and a2a.NewTextPart.
  • e2e/jsonrpc_test.go
    • Updated NewArtifactEvent and NewArtifactUpdateEvent to use a2a.NewTextPart.
    • Updated SendMessage calls to use a2a.SendMessageRequest.
    • Modified newAgentCard to use SupportedInterfaces in a2a.AgentCard.
  • e2e/tck/sut.go
    • Commented out import of github.com/a2aproject/a2a-go/a2agrpc.
    • Updated OnSendMessage interceptor to cast payload to a2a.SendMessageRequest and a2a.SendMessageConfig.
    • Modified agentCard initialization to use SupportedInterfaces.
    • Commented out gRPC handler registration, noting a TODO for pbconv implementation.
  • e2e/tck/sut_agent_executor.go
    • Removed event.Final = true assignment for TaskStateCompleted and TaskStateCanceled events.
  • examples/clustermode/client/main.go
    • Modified AgentCard initialization to use SupportedInterfaces.
    • Updated send function to use a2a.SendMessageRequest and a2a.NewTextPart.
    • Added final = ev.Status.State.Terminal() when a *a2a.Task event is received.
    • Updated cancel function to use a2a.CancelTaskRequest.
    • Updated subscribe function to use a2a.SubscribeToTaskRequest and added final = ev.Status.State.Terminal() for *a2a.Task events.
    • Modified printEvent to use Text() method on a2a.TextPart and handle potential nil Message in TaskStatusUpdateEvent.
  • examples/clustermode/server/agent.go
    • Updated message part access to use Text() method instead of type assertion.
    • Updated NewMessage, NewArtifactEvent, and NewArtifactUpdateEvent to use a2a.NewTextPart.
    • Removed taskCompleted.Final = true.
  • examples/clustermode/server/eventqueue.go
    • Added encoding/json import.
    • Modified event unmarshalling to use a2a.StreamResponse and json.Unmarshal.
  • examples/clustermode/server/main.go
    • Updated port flag description.
    • Modified AgentCard initialization to use SupportedInterfaces.
  • examples/helloworld/client/main.go
    • Commented out gRPC imports and related client options.
    • Updated SendMessage calls to use a2a.SendMessageRequest and a2a.NewTextPart.
  • examples/helloworld/server/grpc/main.go
    • Commented out a2agrpc import.
    • Updated Execute method to use a2a.NewTextPart.
    • Commented out gRPC handler creation and registration, noting a TODO for pbconv implementation.
    • Modified AgentCard initialization to use SupportedInterfaces.
  • examples/helloworld/server/jsonrpc/main.go
    • Updated Execute method to use a2a.NewTextPart.
    • Updated port flag description.
    • Modified AgentCard initialization to use SupportedInterfaces.
  • examples/helloworld/server/rest/main.go
    • Updated Execute method to use a2a.NewTextPart.
    • Modified AgentCard initialization to use SupportedInterfaces.
    • Added ID to a2a.AgentSkill.
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 primarily focuses on migrating existing code to align with recent core type changes, specifically updating MessageSendParams to SendMessageRequest and TextPart to NewTextPart across various test and example files. It also updates AgentCard and AgentInterface structures to use SupportedInterfaces instead of URL and PreferredTransport for defining agent endpoints. Additionally, there are changes to how Task and TaskStatusUpdateEvent handle Final status, which is now implicitly handled by Terminal() method, and some gRPC related code has been commented out for future implementation. The changes are consistent and address the migration effectively.

@gemini-code-assist
Copy link
Contributor

Warning

Gemini encountered an error creating the review. You can try again by commenting /gemini review.

@yarolegovich yarolegovich merged commit fae2f12 into yarolegovich/a2asrv-migrate Feb 18, 2026
2 checks passed
@yarolegovich yarolegovich deleted the yarolegovich/migrate-the-rest branch February 18, 2026 08:15
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

Comments