import type { Browser, CDPSession, Page, default as Puppeteer, Target } from "puppeteer-core";
export declare const DEFAULT_VIEWPORT: {
    width: number;
    height: number;
    deviceScaleFactor: number;
};
/**
 * Per-CDP-message timeout applied to every puppeteer launch/connect. Set above
 * `TOOL_TIMEOUTS.browser.max` (30s) so the agent-side wall-clock is the canonical
 * limit; this constant only catches genuinely stuck CDP sockets (renderer wedged,
 * connection dropped, etc.).
 */
export declare const BROWSER_PROTOCOL_TIMEOUT_MS = 60000;
export declare function loadPuppeteer(): Promise<typeof Puppeteer>;
export declare function loadPuppeteerInWorker(safeDir: string): Promise<typeof Puppeteer>;
export interface LaunchHeadlessOptions {
    headless: boolean;
    viewport?: {
        width: number;
        height: number;
        deviceScaleFactor?: number;
    };
}
export declare function launchHeadlessBrowser(opts: LaunchHeadlessOptions): Promise<Browser>;
export declare function applyViewport(page: Page, viewport?: {
    width: number;
    height: number;
    deviceScaleFactor?: number;
}): Promise<void>;
export interface UserAgentOverride {
    userAgent: string;
    platform: string;
    acceptLanguage: string;
    userAgentMetadata: {
        brands: Array<{
            brand: string;
            version: string;
        }>;
        fullVersion: string;
        fullVersionList: Array<{
            brand: string;
            version: string;
        }>;
        platform: string;
        platformVersion: string;
        architecture: string;
        bitness: string;
        model: string;
        mobile: boolean;
    };
}
export interface UserAgentSession {
    override: UserAgentOverride;
    browserSession: CDPSession | null;
}
/** Builds the browser-page stealth bootstrap source for regression tests. */
export declare function buildStealthInjectionScriptForTest(scripts?: readonly string[]): string;
/** Apply stealth patches + UA override to a headless page. Idempotent within a tab. */
export declare function applyStealthPatches(browser: Browser, page: Page, state: {
    browserSession: CDPSession | null;
    override: UserAgentOverride | null;
}): Promise<void>;
export declare function stealthIgnoreDefaultArgsForTest(executablePath: string | undefined): string[];
export declare function targetSupportsUserAgentOverrideForTest(target: Target): boolean;
export declare function configureUserAgentTargetsForTest(browser: Browser, state: {
    browserSession: CDPSession | null;
    override: UserAgentOverride;
}, targetTimeoutMs?: number): Promise<void>;
