/** * Plan-time validators for the distributed render pipeline. Each validator * is invoked before freezing the plan, so banned configurations fail fast * with a typed non-retryable error instead of being baked into a planDir * and only surfacing on the chunk worker. */ /** * Re-export the BROWSER_GPU_NOT_SOFTWARE code so distributed adapters and * Step Functions / Temporal retry policies can match it without a * cross-package import. */ export { BROWSER_GPU_NOT_SOFTWARE } from "@hyperframes/engine"; /** * Re-export the shared font-family parser. The plan-time validator and the * @font-face injector consume the same surface, so the parser lives next to * the data. */ export { parseFontFamilyValue } from "../deterministicFonts.js"; /** * Typed plan-validation error. Workflow adapters key retry policies off the * `code` field to mark errors as non-retryable. */ export declare class PlanValidationError extends Error { readonly code: string; constructor(code: string, message: string); } /** * Subset of the merged plan / engine / render config that the GPU validator * inspects. Both `useGpu` (RenderConfig) and `browserGpuMode` (EngineConfig) * are optional so callers can pass any of the surrounding config shapes * without an adapter layer. * * - `useGpu === true` → encoder GPU acceleration (NVENC/QSV/VAAPI). Banned * because GPU encoders produce non-byte-identical output across machines. * - `browserGpuMode !== "software"` → headless Chrome's WebGL is allowed * to use hardware GL. Banned because hardware GL is bitwise unstable * across drivers. Pairs with the runtime `assertSwiftShader` check that * catches workers whose environment ignores Chrome's `--use-gl=swiftshader`. */ export interface ValidateNoGpuEncodeInput { useGpu?: boolean; browserGpuMode?: string; } /** * Typed code for {@link validateNoSystemFonts}. Distributed chunk workers * render in a Linux container without host-OS fonts; compositions declaring * `-apple-system` / `system-ui` as a primary family would render differently * on the worker, breaking byte-identical retries. */ export declare const SYSTEM_FONT_USED = "SYSTEM_FONT_USED"; /** * Reject any config that would let GPU encode or hardware-GL slip into a * distributed render. Throws {@link PlanValidationError} with * `code === BROWSER_GPU_NOT_SOFTWARE` when either gate trips. The message * names the offending field so the caller can surface a clean error. */ export declare function validateNoGpuEncode(config: ValidateNoGpuEncodeInput): void; /** * Reject a compiled HTML document whose top-priority font-family resolves to * a host-OS / generic family. Throws {@link PlanValidationError} with * `code === SYSTEM_FONT_USED` and the offending family in the message. * * Inspects the FIRST entry of each font-family declaration: that's the * family the browser tries to use. Subsequent entries are CSS fallbacks, * and a generic fallback is fine and conventional — so * `font-family: "Inter", -apple-system, sans-serif` passes and * `font-family: -apple-system, BlinkMacSystemFont, "Segoe UI"` fails. * * Reads font-family surfaces via `iterateFontFamilyDeclarations` so the * @font-face injector and this validator scan the same regions. */ export declare function validateNoSystemFonts(compiledHtml: string): void; //# sourceMappingURL=planValidation.d.ts.map