open-standards/jcp/jcp-rs/crates/jcp-a2a/examples
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Transaction Science 7357dbbe8f
Some checks failed
repository checks / lockfiles, advisories, tests in CI, workflow hygiene, spec and section references, public text (push) Failing after 9m41s
jcp-a2a: read A2A 1.0 -- SendMessage, and an agent's URL from its first interface
A2A 1.0 renamed its JSON-RPC methods (`SendMessage`, `GetTask`, `CancelTask`)
and moved an agent's service URL out of the top of its card and into
`supportedInterfaces`, one entry per transport and protocol version, first
preferred. This crate read only what 0.3 said:

- `parse_message_send` accepted `message/send` alone, so a request from a 1.0
  client was refused as malformed before any grant was consulted. It reads both
  names now: a 1.0 server takes a request with no `A2A-Version` as 0.3, and an
  agent may expose both versions, so both are on the wire.
- `ingest_agent_card` read only the top-level `url`. A 1.0 card has none, so
  every 1.0 agent was identified by its display name -- and a capability's
  audience is bound to the URL precisely because a name is whatever a card says
  it is. The URL is taken from the first interface where the top level has none.

A message part is `{"text": ..}` in both versions, so the payload was already
read correctly. The example speaks 1.0.

Checked against the published 1.0.0 specification's JSON-RPC binding and Agent
Card sections. 16 tests pass, clippy clean with `-D warnings`.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-11 09:45:02 -05:00
..
profile.rs jcp-a2a: read A2A 1.0 -- SendMessage, and an agent's URL from its first interface 2026-11-11 09:45:02 -05:00