/**
 * Copyright: (c) Myia SAS 2026.
 * This file and its contents are licensed under the AGPLv3 License.
 * Please see the LICENSE file at the root of this repository
 */
import type { BrowserContext } from 'playwright';
import type { HealTracerConsoleConfig } from '../../application/heal-config/types';
import type { Clock } from '../../domain/trace-event-recorder/port/clock';
export interface ConsoleCaptureDeps {
    clock: Clock;
    startedAt: number;
    getCurrentStatementSeq: () => number | undefined;
    getCurrentStepPath: () => string[] | undefined;
}
export declare class ConsoleCaptureSession {
    private readonly ndjsonPath;
    private readonly deps;
    private fd;
    private closed;
    private readonly contexts;
    private readonly pages;
    private readonly levels;
    private readonly maxArgBytes;
    private readonly maxArgsPerEvent;
    constructor(ndjsonPath: string, deps: ConsoleCaptureDeps, config: HealTracerConsoleConfig);
    /**
     * Wire `ctx` and every page already living on it. Idempotent. Also
     * subscribes to future pages via `ctx.on('page')` so popups created
     * later in the test body are covered.
     */
    attachToContext(ctx: BrowserContext): void;
    private attachToPage;
    private handleConsole;
    private handlePageError;
    private snapshotCorrelation;
    private resolveArgs;
    private resolveArg;
    private write;
    close(): Promise<void>;
}
