pub fn spawn(
fs_watch_pool: Arc<FsWatchPool>,
mstore: Arc<Store>,
id_store: Arc<Store>,
broker: Arc<Broker>,
owned: OwnedAgents,
)Expand description
Start both layers. Call once at server startup with a fully-built
AppState’s fs_watch_pool/mstore/id_store, and owned: the agents running
in this process, the only ones either layer looks at (OwnedAgents). Returns immediately —
both loops run as spawned background tasks for the lifetime of the
process (no shutdown handle; srv itself owns the process lifetime).