2026-10-09 22:45:18 +08:00
|
|
|
import type { WebPageInspection } from "../domain/browserObservationSchemas.js";
|
2026-07-18 03:42:35 +00:00
|
|
|
|
|
|
|
|
export interface CapturedScript {
|
|
|
|
|
readonly scriptId: string;
|
|
|
|
|
readonly rawUrl: string;
|
|
|
|
|
readonly url: string;
|
|
|
|
|
readonly origin: string | null;
|
2026-10-09 20:02:52 +08:00
|
|
|
readonly hash: string | null;
|
|
|
|
|
readonly length: number | null;
|
|
|
|
|
readonly isModule: boolean | null;
|
2026-07-18 03:42:35 +00:00
|
|
|
readonly language: string | null;
|
|
|
|
|
readonly sourceMapUrl: string | null;
|
|
|
|
|
readonly sourceMapRawUrl: string | null;
|
|
|
|
|
readonly executionContextKey: string | null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export type NetworkState = WebPageInspection["network"]["requests"][number];
|
2026-10-09 06:17:20 +08:00
|
|
|
|
|
|
|
|
/** Bounds retained CDP script identities independently from source text capture. */
|
|
|
|
|
export const CDP_CAPTURE_SCRIPT_METADATA_LIMITS = {
|
|
|
|
|
retainedBytes: 8 * 1024 * 1024,
|
|
|
|
|
scripts: 50_000,
|
|
|
|
|
} as const;
|