Expand description
The REQUIRED fields of a2a.proto that neither wire format’s parser
enforces, checked the same way at both ends.
Spec §5.7: a field marked REQUIRED “MUST be present and set in valid
messages”; implementations “SHOULD validate these requirements and reject
messages with missing required fields”, and a required array “MUST
contain at least one element”. The JSON bindings refuse a missing key
when they parse, and the gRPC conversion (module proto, feature
proto) refuses the absent field proto3 reads as "" or 0. What both
still read as a value is checked here: an empty string sent explicitly,
an empty required array (ProtoJSON omits an empty repeated field, so
neither format can refuse its absence at parse time), and over JSON an
explicit TASK_STATE_UNSPECIFIED or ROLE_UNSPECIFIED.
- The server runs
check_eventon every event an executor writes, before it is stored or sent (until 2026-10-23 this lived in the server crate’s event queue). - The client runs
check_task,check_received_event,check_response,check_push_configandcheck_cardon what it receives, whichever binding carried it.
Every check answers InvalidParams naming the field, as the server’s
refusal of the same object does; a client reports it as the agent’s
invalid response.
Functions§
- check_
artifact - Refuses an artifact with no
artifact_idor no parts. - check_
card - Refuses an agent card
AgentCard::validateorAgentCard::validate_security_schemesrefuses: the rules a server applies before it publishes one. - check_
event - Refuses
eventwhen a REQUIRED field of its content is unset. - check_
message - Refuses a message with no
message_id, aroleofROLE_UNSPECIFIED, or no parts;whichnames it in the error (“history message”). - check_
push_ config - Refuses a push-notification config with no webhook
url, or whoseauthenticationhas noscheme. - check_
received_ event check_event, and the REQUIRED ids an event carries: a task’sid, and a status or artifact update’stask_idandcontext_id. What a client runs on each streamed event.- check_
response check_taskorcheck_message, for what a blockingSendMessagereturned.- check_
status - Refuses a status in
TASK_STATE_UNSPECIFIED, or whose message lacks a REQUIRED field. - check_
task - Refuses a task with no
id, or whose status, artifacts or history lack a REQUIRED field (seecheck_event).