Expand description
subc daemon core.
This crate owns the loopback TCP transport and the thin splice-router core: routing decisions are made from the 21-byte envelope header, while message bodies are carried as opaque bytes and are never deserialized by the router.
Re-exports§
pub use control::ControlHandler;pub use control::MIN_SUPPORTED_VERSION;pub use forwarding::ForwardingError;pub use forwarding::ForwardingTable;pub use forwarding::ModuleEndpointId;pub use control::DEFAULT_ROUTE_BIND_BREAKER_COOLDOWN;pub use control::DEFAULT_ROUTE_BIND_BREAKER_THRESHOLD;pub use control::DEFAULT_ROUTE_BIND_RELAY_TIMEOUT;pub use identity::RequestIdentity;pub use identity::SessionId;pub use observability::ConnectedClients;pub use observability::DaemonCounters;pub use registry::ChannelState;pub use registry::ConnectionId;pub use registry::ModuleRegistration;pub use registry::Registry;pub use registry::RegistryError;pub use router::Backend;pub use router::EchoBackend;pub use router::ForwardBackend;pub use router::FrameSink;pub use router::RouteCtx;pub use router::Router;pub use router::RouterConnection;pub use router::RouterError;pub use server::handle_connection;pub use server::serve_listener;pub use server::serve_listeners;pub use server::serve_local_listener;pub use server::ConnectionError;pub use server::ServerAuth;pub use server::ServerError;pub use server::DEFAULT_AUTH_DEADLINE;pub use server::DEFAULT_MAX_UNAUTHENTICATED_CONNECTIONS;pub use supervise::ExitKind;pub use supervise::ExitReport;pub use supervise::HealthAction;pub use supervise::HealthConfig;pub use supervise::ModuleHealthStatus;pub use supervise::ModuleOverlap;pub use supervise::ModuleProcessLiveness;pub use supervise::ModuleSpec;pub use supervise::ModuleState;pub use supervise::ModuleStatus;pub use supervise::RestartPolicy;pub use supervise::ScriptEntry;pub use supervise::ScriptRuntime;pub use supervise::SuperviseError;pub use supervise::SupervisedModule;pub use supervise::Supervisor;pub use supervise::SupervisorHandle;pub use supervise::SupervisorProcessLiveness;pub use supervise::SwapFailureArm;pub use supervise::SwapRefusal;pub use supervise::DEFAULT_DRAIN_TIMEOUT;pub use supervise::DEFAULT_SWAP_READY_TIMEOUT;pub use supervise::SPAWN_ROLE_SWAP_CANDIDATE;pub use supervise::SUBC_ARG;pub use supervise::SUBC_SPAWN_ROLE_ENV;pub use watchdog::DaemonSelfWatchdog;pub use watchdog::DaemonSelfWatchdogConfig;pub use watchdog::WatchdogStage;pub use watchdog::WatchdogTickError;pub use watchdog::DEFAULT_SELF_WATCHDOG_DEADLINE;pub use watchdog::DEFAULT_SELF_WATCHDOG_INTERVAL;
Modules§
- app_
open app.openstarts a known operator app from its installed location. See the module for the ordered decision, the launch table, and the platform launchers.app.open: start a known operator app from its installed location.- bootstrap
- caller_
identity - Caller descriptions from daemon-owned connection endpoints, never client claims. A missing OS lookup is an ordinary unidentified caller, not a refusal.
- config_
gate - Immutable config planning and approval, independent of transport dispatch.
- config_
store - Durable configuration authority. Callers serialize access under the daemon’s
gate lock and run disk/keychain work on a blocking worker. A successful commit
is the only permission to report approval or start delivery;
anchor_pendingmeans the bytes committed but their sealed anchor has not caught up yet. While unstamped, retained bytes are history, not authority. In digest-only mode the committed in-memory stamp rules during the run: editing the file’s stamped bit cannot re-enable the gate. A restart reads the file as found: a present file that does not parse as a store opens in recovery on every platform, never as “never stamped”. Deleting the file, or rewriting it into another well-formed store, while the daemon is stopped, and replaying an older store file, remain the documented digest-only limitation. - control
- daemon_
config - fleet_
lint - Offline capability-manifest evaluation for
ck daemon lint. - forwarding
- Forwarding snapshots and route publication. Spawn/claim publication takes the spawn transition, claim state/index, then forwarding, in that order. Bind commits read only the launch watch, never the spawn transition lock. No forwarding guard is held while awaiting a module. HELLO publication holds Registry before ForwardingTable::inner so an ACK cannot be observed before registry publication. Code holding inner must not take the registry lock, including through a callback.
- identity
- local_
listener - The daemon’s second, same-user listener: a Unix-domain socket on macOS and Linux, a named pipe on Windows.
- machine_
id - The machine id file: where the daemon’s
MachineIdlives on disk, how the daemon mints it once, and how an operator replaces it. - observability
- operator_
apps - Compiled operator-app policy. Configuration and caller-provided peer facts cannot enable shortcuts or establish an app’s identity.
- operator_
confirm - Operator confirmation policy and its blocking provider boundary.
- privileged_
prompt - Operator prompt summaries naming the daemon operation, its target, and the OS-resolved process that requested it, within the prompt’s text budget.
- registry
- router
- server
- stderr_
tail - Bounded per-module stderr capture.
- supervise
- Identity policy updates read the running-protocol snapshot before taking the
nonce locks. Nested identity locks are taken in this order: spawn nonces,
reserved nonces, then
SupervisorHandle::implicit_protocol_none. - terminal_
ring - watchdog
Structs§
- Frame
- A complete wire frame: the decoded envelope header plus its opaque body.
- Project
Root Id - Stable canonical identity for a project root.
Enums§
- Frame
Build Error - Why a frame could not be constructed or emitted coherently.
- Frame
IoError - Errors from async envelope frame I/O.
- Identity
Error - Typed identity-resolution failures.
- Read
Stage - Which part of a frame was being read when EOF arrived.
Functions§
- read_
frame - Read one complete frame from an async stream.
- write_
frame - Write one complete frame to an async stream.