Skip to main content

Module broker

Module broker 

Source
Expand description

v1 broker module — schemas are FROZEN FOREVER once v1.0 ships.

Phase 0 of #228: this module exposes the prost-generated wire types (envelope, manifest, service definition) for every later phase to depend on. No consumers ship yet — Phases 1+ wire them in.

See proto/broker_v1_*.proto and the parent issue for the rationale behind every field number and reserved range.

Modules§

adopt
One-call broker adoption: negotiate → dial → ready-to-talk client (#433 R1).
backend_handle
Public handle for a verified backend daemon.
backend_lib
Backend-facing helpers for v1 broker consumers.
backend_lifecycle
Shared backend lifecycle primitives used by broker and direct clients.
backend_sdk
Backend integration SDK (#412).
builders
Ergonomic builders for the two registration messages a consumer must produce to join the broker: ServiceDefinition and CacheManifest (#433 R2).
capabilities
Shared capability bitmap constants for the v1 Hello/Negotiated exchange.
client
Client-side helpers for the v1 broker Hello path.
doctor
Read-only broker doctor environment diagnostics (#354, v1.x-5 from #228).
fs_health
Filesystem-health probes for status/doctor visibility (#390).
host_identity
Host identity values stored in v1 CacheManifest files.
lifecycle
Per-user, per-machine derivations for broker pipe naming and SID hashing.
manifest
CacheManifest persistence and central-registry helpers.
protocol
v1 broker protocol module.
server
Broker server foundation for running-process-broker-v1.

Constants§

FRAMING_VERSION_V1
Framing byte for every v1 broker connection. Wire layout: [u8 framing_version=1][u32 LE body_length][prost body].
LIFECYCLE_EVENT_PIPE_BUF_FLOOR
Upper bound on a LifecycleEvent’s prost-encoded size, set to the minimum POSIX PIPE_BUF so atomic-append into the event log is guaranteed on every platform. Linux raises this to 4096 in practice, but the cross-platform floor is 512.
MAX_FRAME_SIZE_BYTES
Hard ceiling on any single broker frame. Broker disconnects on overflow. See #228 “Wire-level commitments”.
MAX_HELLO_SIZE_BYTES
Hard ceiling on the Hello envelope specifically. Broker returns Refused on overflow. See #228 “Wire-level commitments”.