import type { InspectWebPageInput } from "../domain/browserObservation.js"; import type { WebPageInspection } from "../domain/browserObservationSchemas.js"; import type { CdpCaptureCompleteness } from "./CdpCaptureCompleteness.js"; import type { CapturedScript, NetworkState } from "./CdpCaptureEventTypes.js"; export interface CdpCaptureEventsState { readonly input: InspectWebPageInput; readonly allowedOrigins: ReadonlySet; readonly scripts: Map; readonly scriptMetadataBudgetOmissionsById: Map; rejectedScriptMetadataBudgetCount: number; rejectedSourceMapMetadataBudgetCount: number; readonly scriptMetadataBytesById: Map; retainedScriptMetadataBytes: number; readonly executionContextFrames: Map; readonly network: Map; readonly networkRequestTimestamps: Map; readonly malformedRedirectRequestIds: Set; readonly webSocketConnectionsById: Map< string, WebPageInspection["network"]["websocket_connections"][number] >; console: WebPageInspection["console"]["events"]; responseMetadata: WebPageInspection["metadata"]["responses"]; agentHints: WebPageInspection["metadata"]["agent_hints"]; readonly completeness: CdpCaptureCompleteness; originViolation: boolean; navigationDuringCapture: boolean; mainFrameId: string | undefined; /** * Identity of the document last observed in the main frame. `frameNavigated` * re-fires for the same document, so this is what distinguishes a real * document change from a duplicate event. */ committedDocument: string | undefined; }