Kernel modules
Per-module specs for @tetherto/mdk-kernel: responsibility, interfaces, state machines, recovery, and scaling.
Overview
Kernel's coordination splits across single-purpose modules. Each owns its own state, persistence boundary, and scaling characteristics. It communicates with the others only through its declared interface.
The Kernel's Architecture overview provides the canonical spec for each module's interfaces, state machine, and recovery behavior.
Modules
WorkerRegistry: mapsdeviceIdtoworkerIdto RPC channel, and drives each Worker through its registration lifecycleCommandDispatcher: validates an incoming command, resolves the target device or devices, and hands off to the Command State MachineCommandStateMachine: tracks every command's execution lifecycle in a write-ahead logTelemetryCollector: a stateless proxy that routes telemetry queries to the Worker that owns the dataScheduler: the system metronome that fires the recurring telemetry, health, and state jobsHealthMonitor: pings every registered Worker on a cadence and marks dead ones unroutableActionManager: handles the write action approval lifecycle at the Kernel layerActionCaller: resolves an approved action into the per-Worker write calls that carry it out
Next steps
- Review the Protocol messages: the actions these modules route and execute
- See the Kernel architecture: the architectural narrative behind this module split
- Understand approval-gated writes: the cross-layer flow
ActionManagerandActionCallerimplement