a2aproject / a2aproject/a2a-dotnet

[Feat]: gRPC support — client and server

未关闭
#397 1 条评论 1 个 reaction 已指派 1 人 已被 @janosSarusiKis 认领 在 GitHub 查看
主要语言
C#
星标
262
派生
64
平均合并
5 天 2 小时
30 天内合并 PR
31

描述

### Summary
Add built-in A2A support for the GRPC binding: a gRPC client implementing IA2AClient and an ASP.NET Core gRPC host that serves the same operations as today’s JSON-RPC / HTTP+JSON endpoints, backed by the existing IA2ARequestHandler pipeline.

### Background
The spec allows GRPC alongside JSON-RPC and HTTP+JSON. This repo already defines ProtocolBindingNames.Grpc and allows A2AClientFactory.Register(...), but there is no first-party gRPC implementation; README documents JSON-RPC + HTTP+JSON only. v1 JSON follows ProtoJSON conventions, which should align with a protobuf/gRPC contract if the protocol provides (or will provide) canonical .proto files.

### Goals
Client: IA2AClient over gRPC with parity for unary and streaming operations (e.g. SendStreamingMessage, SubscribeToTask), including sensible error mapping to A2AException / A2AErrorCode.
Server: Extension similar in spirit to MapA2A / MapHttpA2A that maps gRPC services to IA2ARequestHandler (reuse task/message/push-config behavior; do not fork business logic).
Packaging: Prefer a dedicated package (e.g. A2A.Grpc) so core users are not forced to reference Grpc.Net.* unless they need gRPC.
Quality: Integration tests; CI builds/tests on net8.0 / net10.0; validate Native AOT compatibility where required by this repo.
Open questions / dependencies
Source of truth for .proto (official A2A artifacts vs. maintained in-repo).
Exact streaming and error semantics per spec for gRPC vs. current SSE/JSON-RPC behavior.
### References
A2AClientFactory, ProtocolBindingNames.Grpc, MapA2A / MapHttpA2A, IA2ARequestHandler, README.md (protocol compatibility).

**Contributor note:** I am willing to implement and maintain this if the project wants to move forward with it.

贡献指南

打开贡献指南

调研方向

Review the existing A2AClientFactory, ProtocolBindingNames.Grpc, MapA2A, and MapHttpA2A extensions to understand the current client and server patterns. Examine the IA2ARequestHandler pipeline and the spec for gRPC binding details. Determine the source for .proto definitions and design the gRPC service mapping and error handling. Integration tests will be needed to validate the implementation.

由索引模型根据 Issue 内容生成。

评估

技术栈
csharp, grpc
领域
api, backend
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
基本清楚
新手友好度
30/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。