protocol
protocol
¶
JSON-RPC 2.0 wire protocol models for Marianne daemon IPC.
Defines Pydantic v2 models for the JSON-RPC 2.0 message types used over the Unix domain socket. These models enforce the wire format at the serialization boundary — business logic never touches raw dicts.
Wire format: newline-delimited JSON (NDJSON). Each message is a single
JSON object terminated by \n.
Versioning (#265): PROTOCOL_VERSION is the single source of truth for
the Marianne IPC protocol version. The conductor advertises it in
daemon.health and daemon.status results; clients compare it against
their own constant to detect a CLI/conductor version skew at runtime
instead of failing opaquely on a wire-format change. Bump it on ANY
breaking change to method signatures, params, or result shapes (per E-001,
such changes also require escalation).
Classes¶
JsonRpcRequest
¶
Bases: BaseModel
Inbound JSON-RPC 2.0 request.
When id is None the message is a notification — the server
MUST NOT send a response.
ErrorDetail
¶
Bases: BaseModel
Error payload within a JSON-RPC error response.
JsonRpcResponse
¶
Bases: BaseModel
Outbound JSON-RPC 2.0 success response.
JsonRpcError
¶
Bases: BaseModel
Outbound JSON-RPC 2.0 error response.