Skip to content

Comments

fix: migrate a2aclient after core type changes#214

Merged
yarolegovich merged 11 commits intoyarolegovich/fix-internalfrom
yarolegovich/a2aclient-migrate
Feb 18, 2026
Merged

fix: migrate a2aclient after core type changes#214
yarolegovich merged 11 commits intoyarolegovich/fix-internalfrom
yarolegovich/a2aclient-migrate

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 focuses on migrating the a2aclient package to align with recent changes in core a2a types and protocol method naming conventions. The primary goal is to improve the consistency, clarity, and maintainability of the client-side API by standardizing request/response structures, refining data models, and updating transport layer implementations to reflect these foundational changes. This ensures the client library remains compatible and robust with the evolving core protocol.

Highlights

  • AgentCard Structure Refinement: The a2a.AgentCard structure has been updated by removing the PreferredTransport and SupportsAuthenticatedExtendedCard fields, and renaming Security to SecurityRequirements for clarity and consistency.
  • Standardized Request/Response Types: Client methods in a2aclient now utilize new, dedicated request types (e.g., *a2a.GetTaskRequest instead of *a2a.TaskQueryParams) and a2a.StreamResponse for streaming events, enhancing type safety and API consistency.
  • Method Renaming and API Alignment: Several client methods have been renamed to align with updated protocol conventions, including ResubscribeToTask to SubscribeToTask, SetTaskPushConfig to CreateTaskPushConfig, and GetAgentCard to GetExtendedAgentCard.
  • Transport Layer Updates: Both JSON-RPC and REST transport implementations have been thoroughly updated to reflect the core type changes, new method names, and standardized request/response handling. New helper functions for REST API path generation were also introduced.
  • Temporary gRPC Transport Disablement: The gRPC transport and its associated tests have been temporarily commented out, pending further updates related to pbconv (protobuf conversion) changes.
Changelog
  • a2a/agent.go
    • Updated comments for Interfaces field to reflect 'MUST' requirements.
    • Removed PreferredTransport field from AgentCard.
    • Renamed Security field to SecurityRequirements in AgentCard.
    • Removed SupportsAuthenticatedExtendedCard field from AgentCard.
    • Changed type of ProtocolBinding and ProtocolVersion in AgentInterface to dedicated types.
  • a2aclient/auth.go
    • Updated references from req.Card.Security to req.Card.SecurityRequirements.
    • Adjusted access pattern for schemeName within security requirements.
  • a2aclient/auth_test.go
    • Commented out the entire test file due to pending pbconv implementation.
  • a2aclient/client.go
    • Updated method signatures for GetTask, ListTasks, CancelTask, SendMessage, SendStreamingMessage to use new request types.
    • Renamed ResubscribeToTask to SubscribeToTask and updated its request type.
    • Updated method signatures for GetTaskPushConfig, ListTaskPushConfig, SetTaskPushConfig (now CreateTaskPushConfig), DeleteTaskPushConfig to use new request types.
    • Renamed GetAgentCard to GetExtendedAgentCard and updated its capability check.
    • Modified withDefaultSendConfig to accept *a2a.SendMessageRequest and use *a2a.SendMessageConfig.
  • a2aclient/client_test.go
    • Updated testTransport and client calls to reflect new request types and method names.
    • Removed TestClient_InterceptorModifiesRequest.
    • Adjusted TestClient_GetExtendedAgentCard to use Capabilities.ExtendedAgentCard.
  • a2aclient/factory.go
    • Commented out WithGRPCTransport() from defaultOptions.
    • Modified CreateFromCard to use card.SupportedInterfaces and added a check for empty interfaces.
    • Updated selectTransport to use opt.ProtocolBinding for transport selection.
  • a2aclient/factory_test.go
    • Updated makeEndpoints to use ProtocolBinding.
    • Adjusted TestFactory_TransportSelection to use SupportedInterfaces in AgentCard creation.
  • a2aclient/grpc.go
    • Commented out the entire gRPC transport implementation.
  • a2aclient/jsonrpc.go
    • Updated SendMessage and streaming event parsing to handle a2a.StreamResponse.
    • Updated method signatures for various client methods to use new request types and method names.
  • a2aclient/jsonrpc_test.go
    • Updated JSON-RPC method names in mustDecodeJSONRPC calls.
    • Adjusted expected JSON structures for SendMessage, GetTask, ListTasks, ResubscribeToTask, GetAgentCard, CancelTask, and push notification configs.
    • Updated client method calls to match new names and request types.
  • a2aclient/rest.go
    • Updated streaming event parsing to handle a2a.StreamResponse.
    • Updated method signatures for various client methods to use new request types and method names.
    • Integrated new rest.Make...Path helper functions for path generation.
  • a2aclient/rest_test.go
    • Updated expected REST paths and JSON structures in tests.
    • Adjusted client method calls to match new names and request types.
  • a2aclient/transport.go
    • Updated Transport interface method signatures and comments to reflect new request types and method names.
  • internal/jsonrpc/jsonrpc.go
    • Updated JSON-RPC method names to align with new protocol naming conventions.
  • internal/rest/rest.go
    • Added new helper functions for generating REST API paths.
    • Updated errToDetails map to use struct literal syntax and removed kind field from error details.
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 migrates the a2aclient to align with recent core type changes in the a2a package. The changes are extensive and touch upon many parts of the client, including request/response types, method signatures, and data structures like AgentCard. While most of the migration seems correct and consistent, there are critical issues with disabled functionality. Specifically, the entire gRPC transport and all authentication tests have been commented out, which represents a significant regression in features and test coverage. These issues must be addressed before this PR can be considered for merging.

@yarolegovich yarolegovich merged commit ca8f7f4 into yarolegovich/fix-internal Feb 18, 2026
2 checks passed
@yarolegovich yarolegovich deleted the yarolegovich/a2aclient-migrate branch February 18, 2026 08:16
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