import type { BrowserContext } from 'playwright'; import { type BrowserKey } from './browser/launch'; /** Mimics the real published layout: /instant-worlds/// */ export declare const DEFAULT_MOUNT_PREFIX = "instant-worlds/verify-world/verify-build"; /** What the page told us about the request a finding is about. Every field comes off Playwright's * own `request`/`response` objects — none of it is scraped out of a message string. */ export type SubPathRequestEvidence = { url: string; method: string; /** Playwright's resourceType: 'script', 'fetch', 'image', 'document', … */ resourceType: string; /** The frame that made the request — which document to go looking in. */ initiator?: string; status?: number; statusText?: string; /** `requestfailed`'s own reason, e.g. net::ERR_FAILED for a request a CORS policy blocked. */ failure?: string; }; /** Where a finding came from when there is no request behind it — a throw's own source location. */ export type SubPathSourceLocation = { url: string; lineNumber?: number; columnNumber?: number; }; export type SubPathFinding = { kind: 'page-error' | 'not-found' | 'blank-render' | 'console-error'; detail: string; /** The request this finding is about, when the page attributed it to one. */ request?: SubPathRequestEvidence; /** The console location the finding arrived with. Set even when `request` resolves, so `--json` * keeps both; the report prefers `request` and falls back to this. */ source?: SubPathSourceLocation; }; export type VerifySubPathResult = { mountUrl: string; findings: SubPathFinding[]; /** Fraction of sampled pixels differing from the modal background colour (0..1). */ nonBlankFraction: number; requests: { url: string; status: number; }[]; /** Nothing is wrong: how the run was made — which ready handle the pixel probe waited on, or that none came. */ notes: string[]; }; /** The ready wait's OWN budget, well under the navigation timeout: a world that publishes no handle at all is * the common case, and it must reach the wall wait without spending the whole run waiting for nothing. */ export declare const DEFAULT_READY_WAIT_MS = 20000; /** Why the render was sampled on the wall clock — the note a world publishing no ready handle gets. */ export declare function readyHandleMissingNote(readyWaitMs: number, settleMs: number): string; export type VerifySubPathOptions = { directory: string; mountPrefix?: string; /** How long to let the world boot before sampling (ms). */ settleMs?: number; /** How long to wait for the world's own ready handle before falling through to the wall wait (ms). */ readyWaitMs?: number; timeoutMs?: number; width?: number; height?: number; /** Minimum fraction of non-background pixels for the render to count as non-blank. */ minNonBlankFraction?: number; browser?: BrowserKey; /** Borrow an already verified context; only the page created for this check is closed. */ context?: BrowserContext; onProgress?: (message: string) => void; }; export declare function verifySubPath(options: VerifySubPathOptions): Promise; export declare function formatSubPathResult(result: VerifySubPathResult): string;