@network-harness/daemon
v0.2.0
Published
Part of the network harness: @network-harness/daemon.
Readme
@network-harness/daemon
The composition root: it brings a node up and is the only place that decides what "up" means.
Boot is the one ordered thing in the harness:
Preflight refusals, before anything opens. Each is also enforced by the component that owns it, so editing an entry file cannot get around a check.
Process guards, before the tree. cordis's loader floats the promise from a failing entry's activation, so the daemon classifies unhandled rejections: one an entry already carries is reported and the node keeps running, and anything else is fatal.
The tree, over two entry files in the data directory:
spine.yml, the core components. Written on first boot fromsrc/spine.tswith every default filled in, and thereafter only added to: a row's configuration is the operator's, and a disabled row is a decision. A row deliberately deleted comes back; disable it instead.extensions.yml, the installed set, which the protocols host rewrites.
Two files rather than two halves of one: nothing that installs an extension can reach a spine row, and which tree an entry belongs to is what tells a component apart from an extension when a component derives its caller.
The settle audit. Waiting is a normal state, so the report names what each entry is waiting for, and a failed extension appears with its reason instead of taking the node down.
Shutdown reverses it: the tree unloads, each extension's effects disposing in reverse order, and a second signal escalates to a hard stop.
