import type { Page } from 'playwright-core';
import type { BrowserBackend } from './providers/types.js';
import type { ExtensionBrowserProvider } from './providers/extension.js';
export interface BrowserManagerOptions {
    getHeadless: () => boolean;
    /** Backend connection mode. Default: local Playwright. */
    getBackend?: () => BrowserBackend;
}
/**
 * Multi-backend browser manager — supports local Playwright, direct CDP, and cloud providers.
 *
 * One browser context shared by all sessions; one {@link Page} per task/session key (max {@link MAX_PAGES}).
 * Backend is selected at first connection based on {@link BrowserManagerOptions.getBackend}.
 */
export declare class BrowserManager {
    private browser;
    private context;
    private cloudProvider;
    private extensionProvider;
    private extensionRelease;
    private cloakChildProcess;
    private cloakTempProfileDir;
    private pages;
    private readonly options;
    private activeBackendMode;
    constructor(options: BrowserManagerOptions);
    /** Current backend mode (null if not yet connected). */
    get backendMode(): string | null;
    private evictIdlePages;
    private _isPlaywrightConnectionAlive;
    private _wireBrowserLifecycle;
    /** Drop Playwright handles without tearing down extension bridge. */
    private _clearPlaywrightSessionRefs;
    private _resetStalePlaywrightSession;
    /**
     * Ensure Playwright context or Chrome Extension provider is ready.
     * Extension mode does not create a Playwright {@link BrowserContext}.
     */
    ensureConnected(): Promise<void>;
    private _launchLocal;
    private _connectViaCdp;
    private _connectViaCloud;
    private _connectViaExtension;
    private _connectViaCloakBrowser;
    getPage(taskId: string): Promise<Page>;
    closePage(taskId: string): Promise<void>;
    /** Get the extension provider (only available in extension mode). */
    getExtensionProvider(): ExtensionBrowserProvider | null;
    shutdown(): Promise<void>;
}
