a2aproject / a2aproject/a2a-rs

task: add stdio transport binding

Offen
#15 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
enhancement
Vorherrschende Sprache
Rust
Sterne
75
Forks
19
Ø Merge
11 Std. 27 Min.
Gemergte PRs (30 T.)
21

Beschreibung

Type: Task

## Summary
Add a stdio transport binding for subprocess-hosted agents using stdin/stdout, alongside the current JSON-RPC over HTTP, REST / HTTP+JSON, gRPC, and SSE streaming support.

## Why
The existing bindings are network-oriented. A stdio transport would make local subprocess execution a first-class option for tool-style integrations, local development, and process-scoped agent hosting while still reusing the core transport abstraction and shared protocol types.

## Scope / plan
- [ ] Add a stdio protocol identifier and interface contract for subprocess-backed agents
- [ ] Implement a client transport that spawns and manages a subprocess over stdin/stdout
- [ ] Define request framing, startup handshake, streaming behavior, shutdown, and cancellation semantics
- [ ] Define how ServiceParams are carried without HTTP or gRPC metadata
- [ ] Define A2AError mapping for process exits, broken pipes, invalid frames, and timeouts
- [ ] Add integration tests and supporting docs for the stdio contract and lifecycle behavior

## Acceptance criteria
- A client can launch a subprocess-backed agent and complete unary and streaming operations over stdio
- Lifecycle handling is deterministic for startup failure, clean exit, cancellation, and broken-pipe cases
- ServiceParams propagation and A2AError mapping are specified and covered by tests
- Docs describe the stdio contract clearly enough for another implementation to interoperate

Parent feature: #12

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

The issue describes adding a new stdio transport binding. Start by examining the existing transport abstractions and protocol types in the codebase, likely in a `transport` module. Look for how other bindings (JSON-RPC over HTTP, gRPC) are implemented. The work involves defining a new protocol identifier, implementing a client transport that manages subprocesses, and handling framing, handshake, and error mapping. Integration tests will need to be written. 'Done' means a client can successfully launch a subprocess agent and perform unary and streaming operations over stdin/stdout, with all lifecycle cases and error mappings tested and documented.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
rust
Bereich
backend, cli, tooling
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.