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

Aperta
#675 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@asivanadi0 ci sta già lavorando.

Dal 26/10/2026.

  • #814 di @asivanadi0 — aperta

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
go

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.
Lingua principale
Go
Stelle
1.2k
Fork
207
Merge medio
1g 10h
PR unite (30g)
85

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di google/agentmesh

Tutte le issue di google/agentmesh

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.