/**
 * @license
 * Copyright 2026 Amodal Labs, Inc.
 * SPDX-License-Identifier: MIT
 */
import type { Db } from '@amodalai/db';
/**
 * Inject a custom db source. When set, `getStudioDb()` calls this on every
 * invocation and skips the legacy pg.Pool / `ensureSchema` path. The caller
 * owns schema bootstrap (typically drizzle-kit push or migrate at deploy).
 *
 * Used by serverless deployments (e.g. cloud-studio on Vercel) to supply a
 * neon-http-backed Drizzle instance instead of the default pg.Pool.
 */
export declare function setStudioDbProvider(provider: () => Db | Promise<Db>): void;
/**
 * Get the Drizzle database instance.
 *
 * If a custom provider is registered (via `setStudioDbProvider`), returns
 * the provider's db. Otherwise lazily creates a pg.Pool-backed instance via
 * `@amodalai/db` and runs `ensureSchema` once on first access.
 */
export declare function getStudioDb(): Promise<Db>;
/**
 * Reset the initialization flag and clear any injected provider.
 * Used for testing only.
 */
export declare function resetStudioDb(): void;
