a2aproject / a2aproject/a2a-rs

task: add WebSocket transport binding

Aperta
#14 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
enhancement
Lingua principale
Rust
Stelle
75
Fork
19
Merge medio
11h 27m
PR unite (30g)
21

Descrizione

Type: Task

## Summary
Add a WebSocket transport binding so the workspace supports a bidirectional A2A transport alongside the current JSON-RPC over HTTP, REST / HTTP+JSON, gRPC, and SSE streaming support.

## Why
The current bindings cover request/response transports plus server-driven streaming. WebSocket support would add a long-lived bidirectional option while still reusing the existing client transport registry, RequestHandler-based server boundary, and shared error and metadata conventions.

## Scope / plan
- [ ] Add a WebSocket protocol identifier and agent-card negotiation path
- [ ] Implement a client transport and register it in the client transport/factory layer
- [ ] Implement server wrapper(s) that translate framed WebSocket messages into RequestHandler operations
- [ ] Define framing rules, request correlation, and streaming event shapes over a bidirectional connection
- [ ] Define ServiceParams propagation during connection setup and per-message metadata handling
- [ ] Define A2AError mapping for protocol violations, close conditions, and operation failures
- [ ] Extend the helloworld transport end-to-end coverage and supporting docs as needed

## Acceptance criteria
- Agent cards can advertise WebSocket and the client factory can negotiate it without regressing existing binding selection
- Unary and streaming operations work over a single documented bidirectional connection
- Framing, request correlation, metadata propagation, and A2AError mapping are covered by tests
- End-to-end coverage includes happy-path flows and at least one close or protocol-error path

Parent feature: #12

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.