/** * Write a paused.json marker for the given runId. * * Security: validates runId is a safe path segment BEFORE building any path. * Throws with a clear message if runId is unsafe (caller should surface to user). * * Write is atomic via temp-file + rename (mirrors run-state.ts:41-52). */ export declare function setPaused(projectRoot: string, runId: string): Promise; /** * Remove the paused.json marker for the given runId. * * Best-effort: never throws (idempotent — no-op if already gone). * Mirrors approval-state.ts:deletePending. */ export declare function clearPaused(projectRoot: string, runId: string): Promise; /** * Return true if paused.json exists for the given runId. * * Returns false for missing file or unsafe runId — never throws. * Mirrors guidance.ts:hasRunDir shape. */ export declare function isPaused(projectRoot: string, runId: string): Promise; export interface WaitWhilePausedOptions { /** Poll interval in ms. Defaults to 2000. Inject a low value in tests. */ pollMs?: number; /** Maximum wait before resolving (continuing). Capped at MAX_TIMEOUT_MS (7d). */ timeoutMs?: number; /** Clock injection for deterministic tests. Defaults to () => Date.now(). */ now?: () => number; } /** * Block at a checkpoint boundary while paused.json is present for the runId. * * - First check is INLINE before any setTimeout so the no-marker path * resolves immediately with zero scheduled ticks (sc-5-7 additive no-op). * - While the marker is present, polls every pollMs ms (clock-injected so * tests never wait real time — models disk.ts:104-176). * - Resolves (continues) on timeout rather than rejecting — a forgotten * paused.json must not hang the pipeline forever. * * bober: bounded poll; if paused.json is never removed the gate resolves * after timeoutMs (capped at 7d) — upgrade path: expose a resume * event channel instead of polling if sub-second responsiveness needed. */ export declare function waitWhilePaused(projectRoot: string, runId: string, opts?: WaitWhilePausedOptions): Promise; //# sourceMappingURL=pause.d.ts.map