/** The browsers StyleProof captures can launch. Chromium is always required * (the capture runner and crawl CLIs launch it); webkit only when the * consumer's capture Playwright config asks for it. */ export type PreflightBrowserName = 'chromium' | 'webkit'; export type BrowserExecutableResolution = { kind: 'resolved'; executablePath: string; } | { kind: 'unresolvable'; reason: string; }; export type BrowserPreflightVerdict = { status: 'verified'; browserName: PreflightBrowserName; executablePath: string; revisionDirectory: string; } | { status: 'missing'; browserName: PreflightBrowserName; executablePath: string; revisionDirectory: string; remedyCommand: string; message: string; }; /** Text of the capture Playwright config governing `cwd`, or undefined when * no config file exists there. */ export declare function readCapturePlaywrightConfigText(cwd: string): string | undefined; /** * The browsers the preflight must verify, from the capture config's text. * Chromium always; webkit is added when the config mentions it (a deliberate * token-level detection — executing the consumer's config here would launch * arbitrary code before capture). A webkit project referenced only through a * device descriptor (e.g. `devices['Desktop Safari']` in a file that never * says "webkit") is not detected; such consumers keep installing webkit in * their own workflow, and the preflight says which browsers it checked. */ export declare function browsersRequiredByCaptureConfig(configText: string | undefined): PreflightBrowserName[]; export declare function resolveBrowserExecutablePath(cwd: string, browserName: PreflightBrowserName): BrowserExecutableResolution; /** The browser-build directory name a Playwright executable path pins (e.g. * `chromium_headless_shell-1234`, `webkit-2092`) — the revision a remedy * must name. Falls back to the executable's basename when no path segment * looks like a revision directory. */ export declare function revisionDirectoryFromExecutablePath(executablePath: string): string; /** The exact command a human runs on the affected host to install the * missing browser build(s). */ export declare function playwrightInstallRemedyCommand(browserNames: PreflightBrowserName[]): string; /** * The preflight verdict for one browser: `verified` when the executable the * pinned Playwright release expects actually exists, otherwise `missing` with * the exact remedy command and the missing revision name. `executableExists` * defaults to a real filesystem check and is injectable for tests. */ export declare function evaluateBrowserPreflight(browserName: PreflightBrowserName, executablePath: string, executableExists?: boolean): BrowserPreflightVerdict;