feat: implement gRPC server#279
Conversation
|
/gemini review |
Summary of ChangesHello @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 server's communication capabilities by integrating the gRPC transport protocol. This foundational change allows for more efficient and structured communication, laying the groundwork for improved performance and interoperability. The implementation includes new dependencies, generated protobuf types, and a robust gRPC server handler with comprehensive type conversion and error handling. Highlights
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
Code Review
This pull request introduces gRPC transport support on the server side, which is a significant feature addition. The changes include adding new dependencies, generating TypeScript types from protobuf definitions, and implementing the gRPC service handlers. The overall structure is well-designed, with a clear separation of concerns between transport-specific handling and the core request handler. I've identified a few areas for improvement: one is a potential bug in how resource names are parsed, another is a suggestion to improve the robustness of header parsing, and a final one is a recommendation to vendor the .proto file for better build stability. The new tests provide good initial coverage for the gRPC functionality.
There was a problem hiding this comment.
Code Review
This pull request introduces gRPC transport support on the server side, a significant feature enhancement. The changes include adding new dependencies, generating TypeScript code from protobuf definitions, and implementing the gRPC handlers and transport logic. My review focuses on the new implementation files, highlighting areas for improvement in error handling, dependency management, and code clarity. The key suggestions involve correcting a dependency downgrade, using specific error types for better gRPC status mapping, fixing a bug in metadata handling, and refactoring duplicated code.
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>
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces gRPC support on the server side, which is a great feature. The implementation is well-structured, with clear separation of concerns between the gRPC handler, the transport handler, and the type converters. The use of a wrapUnary helper in grpc_handler.ts is a good pattern to reduce boilerplate code.
I've left a couple of comments on potential improvements. The most significant one is regarding the lack of pagination support in the listTaskPushNotificationConfig endpoint. Additionally, there are some unused error codes in the error mapping that could be cleaned up, and a suggestion to improve script maintainability in package.json.
One general point to consider is the inclusion of auto-generated files (from .proto definitions) in the source control. While this can simplify the build process for consumers of the repository, it's often recommended to generate these files as part of the build step to keep the source repository cleaner and avoid large diffs when the proto files change. This is a project-level decision, but something to keep in mind.
Co-authored-by: Ivan Shymko <vana.shimko@gmail.com>
🤖 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).
Description
This Pull Request implements server-side support for the gRPC transport protocol.
Schema and Generation
The implementation is based on A2A Proto Specification v3.0.0.
Tooling
ts-proto was adopted for generating TypeScript service definitions (with buf), which will reuse the message types previously generated (this requires a manual modification of the generated file).
Limitations
Due to the current dependency on Proto v3.0.0, the gRPC implementation is missing some APIs already available for other transports, for example the
getExtendedAuthenticatedAgentCardmethod.These missing endpoints will be implemented with future official releases of proto specification.
Entry Points
A new dedicated entry point has been introduced to export the gRPC server logic and @grpc/grpc-js and its related transport libraries have been added as peer dependencies.
Fixes #275 🦕
BEGIN_COMMIT_OVERRIDE
feat: implement gRPC server (#279)
Release-As: 0.3.9
END_COMMIT_OVERRIDE