import { type Kysely } from 'kysely';
/**
 * Add three tables persisting `ScalerManager` per-coord state:
 *
 *  - `scaler_spawning_agents`: agents spawned via Docker/Podman/Firecracker
 *    that have not yet registered via WS. Carries the `bound_job_id` so a
 *    replacement coord still issues the eager-dispatch hop on register.
 *
 *  - `scaler_agent_jobs`: agentId → (runId, jobId) correlation for
 *    scaler-lifecycle event routing. Inserted on `correlateAgentToJob`,
 *    deleted on disconnect / job completion.
 *
 *  - `scaler_reservations`: outstanding resource reservations keyed by
 *    agentId. Per-scaler / global usage counters are derived state —
 *    recomputed on coord boot as `SUM(...) GROUP BY scaler_name` so the
 *    cap-check critical section stays correct.
 *
 * Without these tables, a coord crash mid-spawn orphans the agent (eager
 * dispatch lost), strands the reservation (resource leak until backend
 * GC eventually disconnects the WS, minutes later), and loses every
 * scaler-lifecycle event emitted before correlation (execution-tracker
 * sees a hole in the run timeline).
 *
 * Idempotent: a re-run on a DB that already has any of these tables
 * leaves the existing one alone.
 */
export declare function up(db: Kysely<unknown>): Promise<void>;
export declare function down(db: Kysely<unknown>): Promise<void>;
//# sourceMappingURL=022_scaler_manager_state.d.ts.map