import type { MigrationEntry } from "../db/migrations.js"; export declare const AUTOMATION_SCHEDULER_LEASE_MS: number; export declare const AUTOMATION_SCHEDULER_LEASE_RENEWAL_MS = 60000; export declare class AutomationSchedulerLeaseLostError extends Error { readonly errorCode = "automation_scheduler_lease_lost"; constructor(cause?: unknown); } export declare const AUTOMATION_SCHEDULER_HEALTH_MIGRATIONS: MigrationEntry[]; /** Kept for callers of the public export; the store owns these migrations. */ export declare function runAutomationSchedulerHealthMigrations(_nitroApp?: unknown): Promise; export interface AutomationSchedulerHealth { appId: string; orgId: string | null; lastCheckedAt: number | null; lastDispatchedAt: number | null; lastError: string | null; runtime: string | null; updatedAt: number | null; } export declare const schedulerHealthStore: import("../db/store-registry.js").Store; export declare function ensureHealthTable(): Promise; export declare function acquireAutomationSchedulerLease(input?: { appId?: string; now?: number; leaseMs?: number; }): Promise; export declare function renewAutomationSchedulerLease(input: { appId?: string; owner: string; now?: number; leaseMs?: number; }): Promise; export declare function releaseAutomationSchedulerLease(input: { appId?: string; owner: string; }): Promise; export declare function recordAutomationSchedulerHealth(input: { appId?: string; orgId?: string | null; checkedAt?: number; dispatchedAt?: number; error?: string | null; runtime?: string | null; }): Promise; export declare function getAutomationSchedulerHealth(input?: { appId?: string; orgId?: string | null; }): Promise;