Skip to main content

Module transport

Module transport 

Source
Expand description

Generic JSON-RPC-over-stdio transport for subprocess agents.

StdioTransport handles the low-level framing of newline-delimited JSON over a child process’s stdin/stdout pair. It is intentionally protocol-agnostic: it knows nothing about Copilot, ACP sessions, or any other higher-level concept.

§Message routing

The internal reader task inspects each incoming line and dispatches it as follows:

Stderr lines are forwarded to tracing::debug! under the vtcode.stdio_transport.stderr target.

§Backpressure

The write channel is bounded (capacity 64) to prevent unbounded memory growth if the subprocess is slow to consume stdin. send_raw uses try_send and returns an error if the channel is full, rather than blocking or growing without bound.

Structs§

StdioTransport
Generic JSON-RPC-over-stdio transport for local subprocess agents.
StdioTransportOptions