Implemented changes to align the A2A version negotiation with JSON-RPC 2.0 as per the specification and updated the test suite accordingly.
What was implemented
- Updated A2aVersionNegotiator.CURRENT_VERSION from "1.0" to "2.0" in src/cleveragents/a2a/versioning.py
- Updated A2aVersionNegotiator.SUPPORTED_VERSIONS from ("1.0",) to ("2.0",) in src/cleveragents/a2a/versioning.py
- Updated 7 Behave scenarios in features/consolidated_misc.feature to reflect "2.0" as the supported version:
- Negotiate supported version succeeds: now negotiates "2.0" instead of "1.0"
- Negotiate unsupported version raises error: now uses "99.0" as the unsupported version (since "2.0" is now supported)
- is_supported returns True for valid version: now checks "2.0" instead of "1.0"
- get_current returns current version: now expects "2.0" instead of "1.0"
- M6 smoke A2A version negotiation accepts 2.0: updated from "1.0" to "2.0"
- M6 smoke A2A version negotiation rejects unsupported: now uses "99.0" instead of "2.0"
- M6 smoke A2A version is_supported returns correct result: now checks "2.0" instead of "1.0"
Key design decisions
- The A2A protocol is built on JSON-RPC 2.0 per the specification. The version negotiator must be consistent with JSONRPC_VERSION = "2.0" in models.py.
- "1.0" is removed from SUPPORTED_VERSIONS as there is no backward compatibility requirement for the old version in the spec.
- All tests updated to reflect the corrected behavior.
Impacted modules/components
- src/cleveragents/a2a/versioning.py
- features/consolidated_misc.feature
- Behavioral tests referencing A2A version negotiation
ISSUES CLOSED: #2747