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
| ID | Constant | Purpose | Payload proto message |
|---|---|---|---|
0x0000 | CONTROL_PAYLOAD_PROTOCOL | Control plane: client Hello / broker HelloReply | Hello / HelloReply |
0xAD01 | ADMIN_PAYLOAD_PROTOCOL | Admin verbs over the broker control socket | AdminRequest / AdminReply |
0xB232 | BACKEND_HANDLE_PROBE_PAYLOAD_PROTOCOL | BackendHandle endpoint identity probes | raw nonce / nonce + DaemonProcess |
0xD0FF | HANDOFF_PAYLOAD_PROTOCOL | Connection handoff offer/ACK and client relay | HandoffOffer / 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.
| Range | Use |
|---|---|
0x0000–0x6FFF | Reserved for first-party running-process subsystems |
0x7000–0x7EFF | Registered consumer IDs (table below) |
0x7F00–0xEFFF | Reserved for future expansion — do not use |
0xF000–0xFFFF | Private 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.)
| ID | Constant | Consumer |
|---|---|---|
0x7A63 | ZCCACHE_PAYLOAD_PROTOCOL | zccache ("zc" in ASCII; zccache FrameV1 request/response lane) |
0x7C4C | CLUD_PAYLOAD_PROTOCOL | clud (0x7C4C = `“ |
0x7EB1 | FBUILD_PAYLOAD_PROTOCOL | fbuild (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
BackendHandleendpoint 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 withcrate::register_payload_protocol!-style compile-time asserts; the authoritative registration lives here.
Functions§
- is_
first_ party - True when
idis a first-party running-process payload-protocol ID. - is_
private_ use_ id - True when
idfalls inside the private-use range (0xF000..=0xFFFF). - is_
registered_ consumer_ id - True when
idfalls inside the registered-consumer range (0x7000..=0x7EFF).