Skip to content

feat: implement gRPC client#299

Merged
guglielmo-san merged 22 commits into
a2aproject:mainfrom
guglielmo-san:guglielmoc/implement_grpc_client_side
Jan 19, 2026
Merged

feat: implement gRPC client#299
guglielmo-san merged 22 commits into
a2aproject:mainfrom
guglielmo-san:guglielmoc/implement_grpc_client_side

Conversation

@guglielmo-san

@guglielmo-san guglielmo-san commented Jan 15, 2026

Copy link
Copy Markdown
Member

Description

This PR extends the implementation of grpc to Client.
A new index.js is created to export the grpc specific functions, preventing the need for every client to install the grpc/js package

Release-As: 0.3.9

Fixes #275 🦕

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @guglielmo-san, 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 client's communication capabilities by integrating gRPC as a supported transport protocol. It provides the necessary infrastructure for gRPC-based interactions, including new transport classes, factory integration, and error handling, ensuring a more versatile and performant client. The changes are thoroughly tested with both unit and end-to-end scenarios.

Highlights

  • gRPC Client-Side Implementation: Introduced new GrpcTransport and GrpcTransportFactory classes to enable client-side communication using the gRPC protocol.
  • Client Factory Integration: The ClientFactory now includes GrpcTransportFactory in its default list of available transport mechanisms, allowing clients to seamlessly utilize gRPC.
  • Error Handling and Data Conversion: Implemented robust error mapping within the GrpcTransport to translate gRPC service errors into specific application-level errors. Minor adjustments were made to data conversion logic for message fields like contextId and taskId.
  • Comprehensive Testing: Added a dedicated unit test file for GrpcTransport and GrpcTransportFactory, alongside updates to the E2E test suite to include gRPC server setup and client-side validation.
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.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

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 a gRPC transport for the client-side, which is a great feature. The implementation is well-structured, with a dedicated GrpcTransport class and a corresponding factory. The use of helper methods to wrap unary and streaming gRPC calls is a good pattern that keeps the public methods clean and consistent. The error mapping from gRPC statuses to application-specific errors is also a nice touch for better error handling on the client side. I've added a few comments, including a critical one about a potential runtime error in getExtendedAgentCard due to an incorrect parser, and some medium-severity suggestions to improve type safety and code consistency. The addition of unit tests for the new transport and the extension of E2E tests to cover gRPC are excellent and ensure the new functionality is well-tested.

Comment thread src/client/transports/grpc_transport.ts Outdated
Comment thread src/client/transports/grpc_transport.ts Outdated
Comment thread src/client/transports/grpc/grpc_transport.ts Outdated
Comment thread test/client/transports/grpc_transport.spec.ts
@github-actions

github-actions Bot commented Jan 16, 2026

Copy link
Copy Markdown

🧪 Code Coverage

⬇️ Download Full Report

Main PR Delta
src/server/grpc/common.ts 0% 100% 🟢 +100.00%
src/server/grpc/grpc_service.ts 68.93% 68.78% 🔴 -0.15%
src/server/grpc/index.ts 0% 100% 🟢 +100.00%
src/types/converters/from_proto.ts 63.34% 64.08% 🟢 +0.74%
src/types/converters/to_proto.ts 69.6% 69.38% 🔴 -0.22%
src/client/transports/grpc/grpc_transport.ts (new) 93.92%
src/client/transports/grpc/index.ts (new) 0%
Total 78.98% 80% 🟢 +1.02%

Generated by coverage-comment.yml

@guglielmo-san guglielmo-san marked this pull request as ready for review January 16, 2026 10:26
@guglielmo-san guglielmo-san requested a review from a team as a code owner January 16, 2026 10:26
@guglielmo-san guglielmo-san requested a review from ishymko January 16, 2026 10:26
@ishymko ishymko changed the title feat: Implementation of gRPC transport protocol on client side feat: implement gRPC client Jan 16, 2026
Comment thread test/e2e.spec.ts Outdated
Comment thread src/client/transports/grpc/grpc_transport.ts Outdated
Comment thread src/client/transports/grpc/grpc_transport.ts Outdated
Comment thread src/types/converters/to_proto.ts
Comment thread package.json
Comment thread src/types/converters/from_proto.ts
guglielmo-san and others added 4 commits January 16, 2026 12:10
Co-authored-by: Ivan Shymko <vana.shimko@gmail.com>
@guglielmo-san guglielmo-san requested a review from ishymko January 16, 2026 13:02
Comment thread src/client/transports/grpc/grpc_transport.ts Outdated
Comment thread src/client/transports/grpc/grpc_transport.ts
Comment thread src/client/transports/grpc/grpc_transport.ts
Comment thread src/client/transports/grpc/grpc_transport.ts
Comment thread test/e2e.spec.ts Outdated
@guglielmo-san guglielmo-san requested a review from ishymko January 19, 2026 13:41
Comment thread src/client/transports/grpc/grpc_transport.ts
Comment thread src/client/transports/grpc/grpc_transport.ts
@guglielmo-san guglielmo-san requested a review from ishymko January 19, 2026 14:49
@guglielmo-san guglielmo-san merged commit dbdb96e into a2aproject:main Jan 19, 2026
14 checks passed
@guglielmo-san guglielmo-san deleted the guglielmoc/implement_grpc_client_side branch January 19, 2026 15:15
@guglielmo-san guglielmo-san mentioned this pull request Jan 19, 2026
4 tasks
ishymko pushed a commit that referenced this pull request Jan 21, 2026
🤖 I have created a release *beep* *boop*
---


## [0.3.9](v0.3.8...v0.3.9)
(2026-01-21)


### Features

* implement gRPC client
([#299](#299))
([dbdb96e](dbdb96e))
* implement gRPC server
([#279](#279))
([bd4caa2](bd4caa2))


### Bug Fixes

* use proto default values in generated a2a_types.ts
([#303](#303))
([0215d42](0215d42))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
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.

[Feat]: Add support for gRPC

2 participants