feat(a2a): Implement A2A HTTP transport for server mode #10921

Open
opened 2026-04-28 20:40:33 +00:00 by HAL9000 · 1 comment
Owner

Implementation

Implement the A2A HTTP transport for server mode, replacing the current stub in transport.py with a working implementation that:

  1. Sends A2aRequest objects as HTTP POST requests over HTTPS
  2. Receives A2aResponse objects from the server
  3. Supports TLS certificate verification
  4. Handles JSON-RPC 2.0 error responses
  5. Properly maps domain errors via map_domain_error
  6. Supports connection lifecycle (connect, send, disconnect)
  7. Returns connection status via is_connected

The existing A2aHttpTransport stub raises A2aNotAvailableError on every invocation. This task replaces that stub with a real implementation using a standard HTTP client (e.g. httpx or requests).

Acceptance Criteria

  • connect(base_url) opens an HTTP connection with optional TLS
  • send(request) POSTs the serialized A2aRequest and returns A2aResponse
  • disconnect() properly closes the connection
  • is_connected() reflects actual connection state
  • All error paths return proper A2aResponse with A2aErrorDetail
  • Domain errors are mapped via map_domain_error
  • Fully typed, tested, and passes all quality gates
## Implementation Implement the A2A HTTP transport for server mode, replacing the current stub in ``transport.py`` with a working implementation that: 1. Sends ``A2aRequest`` objects as HTTP POST requests over HTTPS 2. Receives ``A2aResponse`` objects from the server 3. Supports TLS certificate verification 4. Handles JSON-RPC 2.0 error responses 5. Properly maps domain errors via ``map_domain_error`` 6. Supports connection lifecycle (connect, send, disconnect) 7. Returns connection status via ``is_connected`` The existing ``A2aHttpTransport`` stub raises ``A2aNotAvailableError`` on every invocation. This task replaces that stub with a real implementation using a standard HTTP client (e.g. httpx or requests). ## Acceptance Criteria - [ ] ``connect(base_url)`` opens an HTTP connection with optional TLS - [ ] ``send(request)`` POSTs the serialized A2aRequest and returns A2aResponse - [ ] ``disconnect()`` properly closes the connection - [ ] ``is_connected()`` reflects actual connection state - [ ] All error paths return proper ``A2aResponse`` with ``A2aErrorDetail`` - [ ] Domain errors are mapped via ``map_domain_error`` - [ ] Fully typed, tested, and passes all quality gates
Author
Owner

Implemented in MR !11113

The A2A HTTP transport stub has been replaced with a full implementation supporting:

  • HTTPS connections with configurable TLS certificate verification
  • JSON-RPC 2.0 request/response serialization over HTTP POST
  • Error handling for HTTP status codes (4xx/5xx) with structured error mapping
  • JWT Bearer token authentication
  • Proper connection lifecycle management
## Implemented in MR !11113 The A2A HTTP transport stub has been replaced with a full implementation supporting: - HTTPS connections with configurable TLS certificate verification - JSON-RPC 2.0 request/response serialization over HTTP POST - Error handling for HTTP status codes (4xx/5xx) with structured error mapping - JWT Bearer token authentication - Proper connection lifecycle management
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core#10921
No description provided.