/** * Boot-time campaign crash-resume (crew#471). * * A daemon killed while a campaign was running left that campaign `running` forever: its node runs * froze (their worker was in the dead process) and nothing re-attached them, so the Tests page * showed a phantom running fan after every restart. The engine owns the recovery — its * `ResumeCampaign` is the crash-resume path (DES-CAMPAIGN-001 §6: reload the persisted statuses, * reconcile a node whose run already finished, re-attach or re-dispatch the rest, never re-run a * terminal node, never duplicate) — but only when asked. So at boot the daemon asks, once, for * every campaign the store still calls `running`. A `paused` campaign is left alone: resume would * un-pause it, and the operator paused it on purpose. */ import type { Campaign } from 'wicked-crew-api-types'; /** The two engine calls the sweep needs (the real `CoreAdapter` has both). */ export interface CampaignResumeSurface { campaignsSupported(): boolean; campaignList(): Promise; resumeCampaign(id: string): Promise; } export interface BootResumeResult { /** Campaign ids the engine was asked to resume, with the status token it answered. */ resumed: Array<{ id: string; status: string; }>; /** Campaign ids whose resume the engine refused, with the reason. */ failed: Array<{ id: string; error: string; }>; } /** Ask the engine to crash-resume every `running` campaign. Never throws. */ export declare function resumeRunningCampaigns(adapter: CampaignResumeSurface, log: (message: string) => void): Promise; //# sourceMappingURL=boot-resume.d.ts.map