import type { BrowserContext, Page } from 'playwright-core';
export interface TracingOptions {
    /** Enable session recording. Default: false. */
    enabled: boolean;
    /** Directory to save trace files. */
    outputDir: string;
    /** Include screenshots in trace. Default: true. */
    screenshots?: boolean;
    /** Include DOM snapshots in trace. Default: false (large files). */
    snapshots?: boolean;
}
/**
 * Start Playwright tracing on a browser context for session recording.
 * Captures network, actions, and optionally screenshots/snapshots.
 */
export declare function startTracing(context: BrowserContext, options?: Partial<TracingOptions>): Promise<void>;
/**
 * Stop tracing and save the trace file.
 *
 * @returns Path to the saved trace file, or undefined if tracing was not active.
 */
export declare function stopTracing(context: BrowserContext, options?: Partial<TracingOptions>): Promise<string | undefined>;
export interface BotDetectionResult {
    detected: boolean;
    indicators: string[];
}
/**
 * Check a page for signs of bot detection / CAPTCHA challenge.
 * Returns indicators found. Non-blocking — for advisory logging only.
 */
export declare function checkBotDetection(page: Page): Promise<BotDetectionResult>;
/**
 * Kill orphan Chromium processes that may have been left behind by crashed sessions.
 *
 * This is a best-effort cleanup. On macOS/Linux, searches for chromium/chrome
 * processes with the `--no-sandbox` flag (which xopc adds to all launches).
 *
 * @returns Number of processes killed.
 */
export declare function cleanupOrphanProcesses(): Promise<number>;
