async fn apply_detector_install(
scheduler: &Scheduler,
prepared: &PreparedDetector,
) -> Result<InstallOutcome, String>Expand description
Persist a validated detector’s module to disk and register it (granted
capabilities + detect config travel in the record). Split out so it’s
unit-testable without a WebviewWindow/dialog. The module bytes are
written first; only on success is the registry updated and persisted, so a
failed write leaves no dangling record.