/** * The escalation client, with the `lt_escalations` compatibility view ensured * exactly once per process. Every service function awaits this so the view is * present before the first read/write in any context (app, route test, or the * service-only test that runs `migrate()` without starting workers). */ export declare function escalations(): Promise; /** * Replace the legacy `lt_escalations` table with a view over * `public.hmsh_escalations`. Idempotent and memoized per process. * * - Migrates any legacy rows into `hmsh_escalations` (no-op on a fresh DB), then * RENAMES the legacy table to `lt_escalations_legacy` (a recoverable backup — * never dropped here) so the view can take the `lt_escalations` name. * - Read-path consumers (role, agent, mcp, overview) and frozen test cleanup * (`DELETE FROM lt_escalations`) continue to work unchanged against the view. * - The one-time conversion is serialized across concurrent containers with a * dedicated Postgres advisory lock, so a multi-container deploy is safe. * * Safe to call eagerly at startup and lazily on first escalation use. */ export declare function ensureEscalationCompatView(): Promise;