Skip to content

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.

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.