The A2aErrorDetail model used a field named 'details' for the optional
error payload, but JSON-RPC 2.0 §5.1 and the project specification both
require this field to be named 'data'.
Changes:
- Rename A2aErrorDetail.details -> data in src/cleveragents/a2a/models.py
- Add TDD BDD scenarios to features/a2a_jsonrpc_wire_format.feature that
verify A2aErrorDetail serializes with 'data' field (not 'details')
- Add corresponding step definitions in a2a_jsonrpc_wire_format_steps.py
No call sites used the 'details' keyword argument when constructing
A2aErrorDetail instances (all existing usages only set code and message),
so no other files required changes.
ISSUES CLOSED: #2745
Rewrites the A2aRequest and A2aResponse Pydantic models to use the field
names mandated by the JSON-RPC 2.0 specification, fixing a fundamental
protocol compliance issue that prevented external A2A-compliant clients
from communicating with the server.
Changes:
- A2aRequest: a2a_version→jsonrpc (fixed '2.0'), request_id→id,
operation→method; auth field removed (not in JSON-RPC 2.0)
- A2aResponse: a2a_version→jsonrpc, request_id→id, status+data→result
(success path), timing_ms removed; added _result_xor_error validator
enforcing mutual exclusion of result and error fields
- A2aLocalFacade.dispatch(): updated to use request.method, request.id,
result=data, error=A2aErrorDetail(...)
- A2aHttpTransport.send(): updated to use request.method
- CLI call sites (session.py, plan.py): updated A2aRequest(method=...)
and response.result / response.error field access
- All existing A2A Behave step files updated to new field names
- New 35-scenario Behave feature (a2a_jsonrpc_wire_format.feature)
covering serialisation, deserialisation, validation, and facade dispatch
- New 7-test Robot Framework suite (a2a_jsonrpc_wire_format.robot)
for end-to-end wire format verification
ISSUES CLOSED: #1501