/**
 * 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
 */
export type ConsoleLevel = 'log' | 'info' | 'warn' | 'error' | 'debug' | 'trace' | 'pageerror';
export interface ConsoleLocation {
    url?: string;
    line?: number;
    col?: number;
}
export interface ConsoleRecord {
    kind: 'console';
    /** Milliseconds since the recorder's `startedAt` for this test. */
    t: number;
    /** Top-of-enter-stack `seq` at emit time, or absent if the event fired outside any instrumented statement. */
    statementSeq?: number;
    /** Full chain of enclosing `test.step(...)` titles, snapshot at emit time. */
    stepPath?: string[];
    level: ConsoleLevel;
    /** `ConsoleMessage.text()` for `console.*`, `Error.message` for `pageerror`. */
    text: string;
    /**
     * Best-effort `ConsoleMessage.args().jsonValue()` for `console.*`
     * (each handle resolved with a small per-arg timeout, then capped
     * by the configured `maxArgBytes` / `maxArgsPerEvent`). Absent for
     * `pageerror` and when arg resolution timed out.
     */
    args?: unknown[];
    /** Stack from `Error` objects passed to `pageerror`. Absent for `console.*`. */
    stack?: string;
    /** Source location reported by `ConsoleMessage.location()`. */
    location?: ConsoleLocation;
    pageUrl?: string;
    frameUrl?: string;
}
