a2a: GetExtendedAgentCard through the mesh returns the agent's own URLs

オープン
#675 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@asivanadi0 がすでに取り組んでいます。

2026年10月26日 から。

  • #814 @asivanadi0 による — オープン

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
go

調査の方向性

Start by reading the A2A egress proxy path that forwards JSON-RPC and HTTP+JSON requests, then compare it with the public Agent Card regeneration path and TestA2ACUJ. The issue describes two possible approaches but asks maintainers to choose between them, so the first step is to get that design decision. Done means the extended card served through the mesh has interfaces and capabilities consistent with the public card, with tests covering both request protocols.

索引モデルが issue の本文から書いたものです。

説明

What is broken

The caller's node regenerates the public agent card, but not the extended
card. GetExtendedAgentCard (JSON-RPC) and GET /extendedAgentCard
(HTTP+JSON) are proxied as they are, so the extended card a client gets
through the mesh still names the provider's private addresses: the
127.0.0.1 JSON-RPC URL, the gRPC interface the mesh dropped from the public
card, and capabilities that differ from the public card the mesh served.

How to reproduce

Two nodes, an a2a-go agent whose public card declares
capabilities.extendedAgentCard: true and an extended card with a JSON-RPC
interface at http://127.0.0.1:7777 and a gRPC interface at
10.0.0.5:50051 (a2asrv.WithExtendedAgentCard). A stock a2aclient
built from the regenerated card calls GetExtendedAgentCard through node B
(same setup as TestA2ACUJ; I can post the test if it helps). Output on main
(273e6fb), Linux:

public card via mesh: streaming=false interfaces=[JSONRPC http://127.0.0.1:10092/mesh/12D3KooW.../a2a/ext]
extended card via mesh: description="extended" streaming=true interfaces=[JSONRPC http://127.0.0.1:7777 GRPC 10.0.0.5:50051]
extended card interface JSONRPC "http://127.0.0.1:7777" is not a mesh URL
extended card interface GRPC "10.0.0.5:50051" is not a mesh URL
SendMessage with a client built from the extended card: err=failed to send HTTP request: Post "http://127.0.0.1:7777": dial tcp 127.0.0.1:7777: connect: connection refused

Expected

A2A 1.0, section 3.1.11 (specification.md, line 425):

Card Replacement: Clients retrieving this extended card SHOULD replace
their cached public Agent Card with the content received from this endpoint

and section 8.3.1 (line 2000): "Each interface MUST accurately declare its
transport protocol and URL". A client that follows 3.1.11 drops the mesh URL
and dials the provider's private address. Where that address happens to be
reachable from the caller, the call skips the caller's node, so the labels
gate and the provider's policy check never see it.

Possible fix

The extended card needs the same regeneration as the public one. For
HTTP+JSON the request is recognisable from the path (GET .../extendedAgentCard). For JSON-RPC the method is in the request body, so
the egress proxy would have to read the body of POSTs on a2a routes to find
GetExtendedAgentCard, then rewrite result in the response. That is a
change to the proxy hot path, so I have not sent a patch; I would like to
know which way you prefer first:

  1. Read and bound the JSON-RPC request body on a2a egress routes, regenerate
    the result of GetExtendedAgentCard.
  2. Refuse GetExtendedAgentCard on the mesh (answer
    UnsupportedOperationError) and set capabilities.extendedAgentCard to
    false in the regenerated public card, the way streaming is handled today.
主要言語
Go
スター
1.2k
フォーク
207
平均マージ
1日 10時間
マージ済み PR(30日)
85

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

google/agentmesh のほかの issue

google/agentmesh の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。