Skip to main content

Module v2

Module v2 

Source
Expand description

Generated v2 broker protocol types.

Modules§

session_frame
Nested message and enum types in SessionFrame.

Structs§

BackendHttpReady
Notification frame sent from a daemon to its broker once the daemon’s HTTP server has bound a port. port is u16 in Rust; proto’s narrowest integer is uint32 so the wire type is uint32 and the broker validates the range on receipt.
CacheManifest
v2 cache manifest envelope.
CacheRoot
One cache root the daemon exposes. v2 mirrors v1’s shape so the CacheManifestBuilder API is identical at the call site.
GetBrokerHttpEndpointRequest
CLI→broker request for the broker’s own HTTP endpoint. Empty marker — no fields are necessary; the broker fronts exactly one HTTP server.
GetBrokerHttpEndpointResponse
Broker→CLI response carrying the resolved HTTP endpoint. port is the port the broker is currently bound on (after env-override / config resolution per #483 §3); pid is the broker’s process id, included so a mid-restart consumer can distinguish a stale answer from a live one without needing a separate liveness probe.
GetSessionTokenRequest
CLI→broker request for the current composite session token (zackees/soldr#2360, #2361 Phase 2, #2363) of one daemon. A cooperative liveness/revocation signal, NOT authentication – see broker/server/session_token.rs’s module docs for the full model. This is how a client learns a token to present on a later Hello.auth_token: the broker mints and registers a daemon’s half when it launches that daemon (HelloRouter::launch_backend), and this RPC is the read-only lookup a client uses afterward, deliberately kept off the FROZEN FOREVER v1 Hello/Negotiated envelope (per #228) since it evolves with v2.
GetSessionTokenResponse
Broker→CLI response. found = false means daemon_id has no registered token (never launched through this broker, or already invalidated) – session_token is empty in that case, not a zero-filled placeholder.
HttpServerCapability
Optional per-backend HTTP server capability.
ServiceDefinition
v2 service definition envelope.
SessionEnvVar
One ordered environment entry for SessionStart.env. (The broker.v2 package cannot reach daemon.proto’s KeyValue, so it defines its own.)
SessionExit
How a proxied compile session ended. code is the child’s exit code when it exited normally. signal is the terminating Unix signal number when the child was killed by a signal (0 when it exited normally, and always 0 on Windows). Consumers read signal first: a non-zero signal means signal death regardless of code.
SessionFrame
One frame on a proxied compile session’s stdio stream. Exactly one field is set per frame (proto3 oneof). Directionality is by field, not a flag: stdin / stdin_eof flow client -> daemon; stdout / stderr / exit flow daemon -> client. Frames are delivered in order within each direction.
SessionStart
The command a compile session runs, carried on the session’s opening start frame. environment_policy selects the base; env is then applied in order (repeated, not a map) so key-case collisions resolve deterministically the way std::process::Command::env does.

Enums§

BrokerIsolation
Broker isolation mode for a service.
CacheRootKind
Logical role classification for cache roots. Wire values mirror v1’s broker_v1.CacheRootKind EXACTLY (see broker_v1_manifest.proto). Keeping the integer values aligned avoids subtle bugs when consumers mix the two generations (e.g. via as i32 casts in test fixtures or in code that bridges between v1 and v2). New kinds land in the reserved range; v1’s enum is FROZEN so anything past 9 is v2-only.
EnvironmentPolicy
Selects the base environment for the session child. AUTO is deliberately not a wire value: the client resolves lifetime-dependent defaults before opening the session.