/** * Page Event Listeners * * Sets up always-on capture of console, network, and dialog events * from the daemon's persistent Playwright page into ring buffers. */ type Page = import('playwright').Page; import { RingBuffer } from './ringBuffer.js'; export interface ConsoleEntry { timestamp: number; level: string; message: string; location?: string; } export interface NetworkEntry { timestamp: number; method: string; url: string; status: number; duration: number; contentType?: string; size?: number; /** Request body (truncated to 4KB) — only present when withBody capture is enabled. */ requestBody?: string; /** Response body (truncated to 4KB) — only present when withBody capture is enabled. */ responseBody?: string; } export declare function setCaptureBodies(enabled: boolean): void; export declare function isCapturingBodies(): boolean; export interface DialogEntry { timestamp: number; type: string; message: string; defaultValue?: string; } export declare const consoleBuffer: RingBuffer; export declare const networkBuffer: RingBuffer; export declare const dialogBuffer: RingBuffer; /** * Install event listeners on a page. Safe to call multiple times for the * same page (no-op on re-install) and supports multiple distinct pages. */ export declare function installListeners(page: Page): void; /** * Get error count from console buffer. */ export declare function getErrorCount(): number; /** * Get warning count from console buffer. */ export declare function getWarningCount(): number; /** * Format console entries as human-readable text. */ export declare function formatConsoleEntries(entries: ConsoleEntry[]): string; /** * Format network entries as human-readable text. */ export declare function formatNetworkEntries(entries: NetworkEntry[]): string; export {}; //# sourceMappingURL=listeners.d.ts.map