Variable: PluginRuntimeFrameType
constPluginRuntimeFrameType:object
Defined in: packages/contracts/src/pluginRuntime.ts:101
Frame types on the host ↔ runtime wire (§15.2). Values are wire bytes and MUST NOT be renumbered once released; only additive changes allowed.
Type Declaration
BRIDGE_MESSAGE
readonlyBRIDGE_MESSAGE:21=0x15
runtime -> host: app-level worker bridge message that no runtime component understands (module-graph-loaded/error today, live delivery in Stage F). Payload is opaque (§15.1); the host narrows by kind.
BROKER_REVOKE
readonlyBROKER_REVOKE:19=0x13
host -> runtime: revoke a plugin capability (§10.2, Stage D part 9b).
ERROR
readonlyERROR:64=0x40
runtime -> host: protocol/runtime error (wire body is a WireError).
EVENT
readonlyEVENT:18=0x12
opaque plugin event routed runtime -> host.
FATAL_DIAGNOSTIC
readonlyFATAL_DIAGNOSTIC:29=0x1d
runtime -> host: worker fatal diagnostic (§9.1.4, §26.1.3/4). Emitted by the dying worker over the bridge and forwarded immediately; the envelope is small and bounded and cannot be displaced by log flood. The host keeps the last envelope per worker for crash attribution.
HELLO
readonlyHELLO:1=0x01
runtime -> host: handshake identity (version, epoch, pid, capabilities).
HELLO_ACK
readonlyHELLO_ACK:2=0x02
host -> runtime: handshake accepted.
HOST_BRIDGE_MESSAGE
readonlyHOST_BRIDGE_MESSAGE:22=0x16
host -> runtime: app-level worker bridge message routed to one worker
(Stage F live delivery: event-push subscriptions). The runtime only
checks the worker identity and forwards the payload to the worker's
control port; the worker narrows by kind.
LOG_BATCH
readonlyLOG_BATCH:27=0x1b
runtime -> host: one batch of plugin console records (§9.1.1). The
payload is the worker-encoded PluginRuntimeLogBatchPayload JSON,
forwarded opaque by the runtime — the host is the single decode point
(§15.1). The runtime never decodes or re-encodes the batch; a bounded
payload keeps control frames small (§15.3). The host consumes the batch
(log router), emits the synthetic suppressed-record when
droppedCount > 0, and answers LOG_BATCH_ACK to replenish the worker's
log credits.
LOG_BATCH_ACK
readonlyLOG_BATCH_ACK:28=0x1c
host -> runtime: credit ack for one consumed LOG_BATCH frame (§9.1.1).
The runtime validates the worker identity and forwards { kind: 'log-batch-ack', seq } to the worker's control port; the worker
replenishes its flush credit (bounded). Without acks the worker stops
flushing — its ring stays the only log buffer (no secondary unbounded
queue, §9.1.1 rule 5).
MODULE_GRAPH
readonlyMODULE_GRAPH:20=0x14
host -> runtime: signed module graph for a spawned worker (Stage A).
Sent after WORKER_READY, addressed by worker id/epoch; the runtime
forwards it to the worker's control port as a load-module-graph
bridge message. The graph itself is plugin payload and stays opaque
to the wire (§15.1) — the worker validates its shape and digests.
MODULE_GRAPH_DATA
readonlyMODULE_GRAPH_DATA:23=0x17
host -> runtime: module graph for a spawned worker, transported on the
data pipe (fd 3, §15.9). Used when the signed graph does not fit the
control path (§15.3/§15.11 string bounds); the payload is the same
{ workerId, workerEpoch, graph } JSON body as MODULE_GRAPH, but stays
opaque to the wire and is decoded exactly once by the worker (§15.1).
PING
readonlyPING:33=0x21
host -> runtime: liveness probe.
PONG
readonlyPONG:34=0x22
runtime -> host: liveness reply carrying telemetry (§40).
RPC_REQUEST
readonlyRPC_REQUEST:16=0x10
opaque plugin RPC payload routed host ↔ runtime (§15.1).
RPC_REQUEST_DATA
readonlyRPC_REQUEST_DATA:25=0x19
worker -> host (via the runtime): broker-call request with arguments
transported on the data pipe (fd 4, §15.9). Used when the call args
(e.g. a large KV/settings value) exceed the control path; the payload
is the same PluginRuntimeRpcRequestBody JSON as RPC_REQUEST but stays
opaque to the runtime and is decoded exactly once by the host (§15.1).
RPC_RESPONSE
readonlyRPC_RESPONSE:17=0x11
opaque plugin RPC reply routed host ↔ runtime (§15.1).
RPC_RESPONSE_DATA
readonlyRPC_RESPONSE_DATA:24=0x18
host -> runtime: broker-call result for one worker, transported on the
data pipe (fd 3, §15.9). Used when the response body (e.g. a large
network fetch body) exceeds the control path; the payload is the same
PluginRuntimeRpcResponseBody JSON as RPC_RESPONSE but stays opaque to
the wire and is decoded exactly once by the worker (§15.1).
RPC_RESPONSE_STREAM
readonlyRPC_RESPONSE_STREAM:26=0x1a
host -> runtime: one chunk of a broker-call response body streamed over
the data pipe (fd 3, §17 credit-based backpressure). Used when the
encoded PluginRuntimeRpcResponseBody JSON exceeds one chunk; each
frame carries at most RPC_STREAM_CHUNK_BYTES of the SAME opaque body
JSON as RPC_RESPONSE, the last chunk has final: true. The payload is
a JSON header ({ requestId, seq, final } — JSON text can never
contain a raw NUL) followed by a NUL byte and the raw chunk bytes; the
runtime forwards it opaque and the worker is the single assembly and
decode point (§15.1).
TELEMETRY
readonlyTELEMETRY:32=0x20
runtime -> host: periodic resource telemetry (§40).
TERMINATE
readonlyTERMINATE:48=0x30
host -> runtime: graceful shutdown of the whole runtime.
TERMINATE_ACK
readonlyTERMINATE_ACK:49=0x31
runtime -> host: shutdown acknowledged.
WORKER_READY
readonlyWORKER_READY:4=0x04
runtime -> host: a worker finished its SES bootstrap (ADR-0028).
WORKER_SPAWN
readonlyWORKER_SPAWN:5=0x05
host -> runtime: activate a worker.
WORKER_TERMINATE
readonlyWORKER_TERMINATE:6=0x06
host -> runtime: terminate a worker (two-phase, §25.1).
WORKER_TERMINATED
readonlyWORKER_TERMINATED:7=0x07
runtime -> host: worker terminated.