Skip to main content

Module protocol

Module protocol 

Source
Expand description

Wire protocol for daemon–CLI communication.

All messages are serialized as single-line JSON (newline-delimited). The client sends a Request and reads back one or more Responses (streaming commands like Logs --follow produce multiple responses).

Both types use #[serde(tag = "type")] so the JSON includes a "type" discriminant field for easy interop with non-Rust clients.

Structs§

ProcessInfo

Enums§

ErrorCode
Typed error codes for Response::Error.
ProcessState
Request
A client-to-daemon request, serialized as tagged JSON.
Response
A daemon-to-client response, serialized as tagged JSON.
Stream

Constants§

MAX_MESSAGE_SIZE
Maximum allowed size (in bytes) for a single JSON message line. Provides defense-in-depth against runaway reads on the Unix socket.
PROTOCOL_VERSION
Current protocol version. Bumped when breaking changes are introduced.

Functions§

process_url
Build the canonical URL for a managed process.