Skip to main content

Module protocol

Module protocol 

Source
Expand description

Versioned socket framing and wire data, independent of execution. Versioned local engine protocol. Independent of the execution library.

Structs§

Event
A durable event with monotonically increasing sequence.
Request
One request on a framed connection.
Response
Acknowledgement or structured error. Read-only requests do not mutate the run.
RunId
Stable run identity: UTC nanosecond timestamp, with optional collision suffix.
Status
Canonical engine snapshot, also persisted for offline inspection.

Enums§

Command
Read, wait, replay and control operations.
Outcome
A terminal outcome; liveness is a separate property.

Constants§

MAX_FRAME_BYTES
Maximum encoded JSON frame size (8 MiB).
VERSION
Current wire generation. Mismatches are rejected before commands execute.

Functions§

read_frame
Reads one frame, rejecting oversize and truncated messages.
write_frame
Writes one length-prefixed JSON frame without allowing unbounded allocation.