/**
 * PGlite Bridge Middleware
 * Intercepts /__db__/* requests and routes them to PGlite
 */
import type { RequestMiddleware } from '../server-bridge';
export interface PGliteMiddlewareOptions {
    /**
     * Maps the virtual-server port that received the request to the database
     * namespace of the sandbox owning that port. Without it every sandbox's
     * /__db__/ requests resolve against the page-global "current" namespace —
     * i.e. whichever sandbox is in the foreground — so background apps would
     * read and write the wrong database. Return null/undefined to fall back
     * to legacy (namespace-less) resolution.
     */
    resolveNamespaceForPort?: (port: number) => string | null | undefined;
}
export declare function createPGliteMiddleware(options?: PGliteMiddlewareOptions): RequestMiddleware;
//# sourceMappingURL=bridge-middleware.d.ts.map