import { type Kysely } from 'kysely';
/**
 * Add `dispatch_queue.recovery_deadline TIMESTAMPTZ` and
 * `dispatch_queue.recovery_agent_id TEXT` columns persisting per-job
 * recovery state for HA-safe agent-disconnect handling.
 *
 * `Dispatcher.recoveringJobs` previously held the timer handle, agent
 * ID, and deadline entirely in process memory. A coord crash between
 * starting the timer and it firing dropped the timer; the replacement
 * coord saw the row as `status='recovering'` but had no record of when
 * the deadline expired or which agent owned the job. Jobs lingered
 * forever.
 *
 * The new columns make the deadline durable. A leader-gated sweep
 * (`Dispatcher.sweepExpiredRecoveries`) scans
 * `WHERE status='recovering' AND recovery_deadline < now()` and marks
 * each row failed; on coord boot, `Dispatcher.recoverState()`
 * hydrates the in-memory Map by re-creating timers from the persisted
 * deadlines.
 *
 * Idempotent: re-running on a DB that already has either column is a
 * no-op.
 */
export declare function up(db: Kysely<unknown>): Promise<void>;
export declare function down(db: Kysely<unknown>): Promise<void>;
//# sourceMappingURL=023_dispatch_queue_recovery_deadline.d.ts.map