Expand description
Koi composition layer — the single place that constructs domain cores, installs the cross-domain integration bridges, runs the container orchestrator, assembles capability status, and tears everything down in order.
Three consumers share it: the koi daemon (daemon_mode), the Windows service
(run_service), and koi-embedded. Building the composition once makes Windows and
embedded parity true by construction — the verified koi install defect (a weaker
Windows daemon missing the orchestrator + certmesh background loops) cannot recur,
because all three call the same code.
This is a composition crate, not a domain crate: it depends on every domain it
wires. Nothing depends on it except the top-level consumers, so the koi-common
kernel and the domain crates keep clean dependency closures.
Modules§
- bridges
- The cross-domain integration-trait bridges (moved from the binary’s
integrations.rs). Bridge implementations that wrap domain cores and implement the cross-domain integration traits fromkoi_common::integration. - certmesh
- Certmesh role-driven background loops + the enrollment-approval pump (moved from the
binary’s
main.rs). Shared so Windows-service and embedded daemons reach parity. Certmesh background orchestration — the role-driven loops that keep a CA mesh converging (renewal, standby roster sync, member heartbeat, failover/announce) plus the enrollment-approval pump. - cores
- Daemon core composition:
build_cores(the one core+bridge construction graph the daemon and the Windows service share),init_certmesh_core, andordered_shutdown. Daemon core composition — the single place that constructs every domain core, wires the cross-domain integration bridges between them, spawns the domain background tasks (orchestrator + certmesh role loops), and tears it all down in order. - orchestrator
- The container-runtime orchestrator: translates runtime lifecycle events into
mDNS/DNS/health/proxy operations (moved from the binary’s
orchestrator.rs). Shared so Windows-service and embedded daemons can spawn it too. Runtime lifecycle orchestrator. - status
- Unified capability-status assembly (
assemble_capabilities) — the single capability ladder shared by/v1/status, the dashboard snapshot, and the embedded snapshot. Unified capability-status assembly — the one capability ladder that the daemon’s/v1/status, the dashboard snapshot, and the embedded snapshot all share.