Skip to main content

Module registry

Module registry 

Source
Expand description

Single authoritative registry of v1 broker wire-protocol constants (#375).

Every payload-protocol ID multiplexed over the frozen v1 Frame envelope, plus the negotiated protocol version, is defined HERE and only here. Subsystem modules pub use these constants (the old public paths remain valid re-export shims) so the public API surface is unchanged while the values have exactly one definition site.

These values are part of the FROZEN-FOREVER v1 wire contract — see proto/broker_v1_envelope.proto and #228. Never change an existing value; only append new IDs (and keep them pairwise distinct — the unit test below enforces this).

§Payload-protocol ID registry

IDConstantPurposePayload proto message
0x0000CONTROL_PAYLOAD_PROTOCOLControl plane: client Hello / broker HelloReplyHello / HelloReply
0xAD01ADMIN_PAYLOAD_PROTOCOLAdmin verbs over the broker control socketAdminRequest / AdminReply
0xB232BACKEND_HANDLE_PROBE_PAYLOAD_PROTOCOLBackendHandle endpoint identity probesraw nonce / nonce + DaemonProcess
0xD0FFHANDOFF_PAYLOAD_PROTOCOLConnection handoff offer/ACK and client relayHandoffOffer / HandoffAck

§Consumer payload-protocol IDs (#412)

Consumer daemons that multiplex their own request/response payloads over the v1 Frame envelope (the “opaque Frame lane” pattern — see docs/INTEGRATE.md) pick an ID from the registered-consumer range and record it in the table below via a running-process PR. IDs are first-come-first-served and frozen once registered.

RangeUse
0x00000x6FFFReserved for first-party running-process subsystems
0x70000x7EFFRegistered consumer IDs (table below)
0x7F000xEFFFReserved for future expansion — do not use
0xF0000xFFFFPrivate use — never registered, never collision-checked

(0xAD01, 0xB232, and 0xD0FF predate the range split and are grandfathered first-party IDs; is_first_party knows about them.)

IDConstantConsumer
0x7A63ZCCACHE_PAYLOAD_PROTOCOLzccache ("zc" in ASCII; zccache FrameV1 request/response lane)
0x7C4CCLUD_PAYLOAD_PROTOCOLclud (0x7C4C = `“
0x7EB1FBUILD_PAYLOAD_PROTOCOLfbuild (FastLED/fbuild daemon Frame v1 request/response lane)

Use crate::register_payload_protocol! in consumer crates to pin the chosen ID with compile-time range and collision checks.

Re-exports§

pub use crate::broker::FRAMING_VERSION_V1;

Constants§

ADMIN_PAYLOAD_PROTOCOL
Payload protocol value for v1 admin request/reply frames.
BACKEND_HANDLE_PROBE_PAYLOAD_PROTOCOL
Payload protocol reserved for BackendHandle endpoint identity probes.
CLUD_PAYLOAD_PROTOCOL
Registered consumer ID: clud’s opaque Frame v1 request/response lane (zackees/clud daemon control plane; zackees/running-process#385). clud pins this value on its side with crate::register_payload_protocol!-style compile-time asserts; the authoritative registration lives here.
CONSUMER_PAYLOAD_PROTOCOL_MAX
Inclusive upper bound of the registered-consumer payload-protocol range.
CONSUMER_PAYLOAD_PROTOCOL_MIN
Inclusive lower bound of the registered-consumer payload-protocol range.
CONTROL_PAYLOAD_PROTOCOL
Payload protocol for v1 control-plane frames (Hello / HelloReply).
FBUILD_PAYLOAD_PROTOCOL
Registered consumer ID: fbuild’s opaque Frame v1 request/response lane (FastLED/fbuild daemon control plane; zackees/running-process#437). fbuild pins this value on its side with crate::register_payload_protocol!; the authoritative registration lives here.
FIRST_PARTY_PAYLOAD_PROTOCOLS
All first-party payload-protocol IDs, in registry-table order.
HANDOFF_PAYLOAD_PROTOCOL
Payload protocol reserved for broker↔backend handoff offer/ACK frames and the broker→client handoff-ready relay.
PRIVATE_USE_PAYLOAD_PROTOCOL_MAX
Inclusive upper bound of the private-use payload-protocol range.
PRIVATE_USE_PAYLOAD_PROTOCOL_MIN
Inclusive lower bound of the private-use payload-protocol range.
PROTOCOL_VERSION
Negotiated v1 broker protocol version.
ZCCACHE_PAYLOAD_PROTOCOL
Registered consumer ID: zccache’s opaque FrameV1 request/response lane (0x7A63 = ASCII "zc"). zccache pins this value on its side with crate::register_payload_protocol!-style compile-time asserts; the authoritative registration lives here.

Functions§

is_first_party
True when id is a first-party running-process payload-protocol ID.
is_private_use_id
True when id falls inside the private-use range (0xF000..=0xFFFF).
is_registered_consumer_id
True when id falls inside the registered-consumer range (0x7000..=0x7EFF).