/** * Cloud-agnostic validation of a serializable `DistributedRenderConfig`. * * The distributed-render adapters (`@hyperframes/aws-lambda`, * `@hyperframes/gcp-cloud-run`, …) all need to fail fast on shape errors * *before* they start a cloud execution — a caller staring at a runtime * failure minutes into a Step Functions / Cloud Workflows run shouldn't have * to dig through execution history to learn they passed an unsupported * format. The shape validation is identical across adapters, so it lives * here; each adapter layers only its own wire-format size cap (Step * Functions' 256 KiB vs Cloud Workflows' 512 KiB) on top. * * The check is deliberately narrow — it covers the *shape* errors any caller * could have surfaced with `tsc` if they passed a literal, plus the * `force-hdr` rejection (HDR mp4 isn't supported in distributed mode). * Anything deeper (font availability, plan size cap, GPU mode at runtime) * needs the actual planner. */ import { type DistributedRenderConfig } from "./plan.js"; /** * `DistributedRenderConfig` minus the runtime-only fields (`logger`, * `abortSignal`, `producerConfig`) that can't cross a JSON wire boundary. * The shape adapters serialize into their execution input. */ export type SerializableDistributedRenderConfig = Omit; /** Thrown for any client-side `SerializableDistributedRenderConfig` violation. */ export declare class InvalidConfigError extends Error { readonly name = "InvalidConfigError"; /** Dotted JSON-pointer-ish path to the offending field, e.g. `config.fps`. */ readonly field: string; constructor(field: string, message: string); } /** * Throw an `InvalidConfigError` if `config` is not a valid * `SerializableDistributedRenderConfig`. Returns the same reference on * success so the call site reads: * * const validated = validateDistributedRenderConfig(input); */ export declare function validateDistributedRenderConfig(config: SerializableDistributedRenderConfig): SerializableDistributedRenderConfig; /** * Validate that `variables` is a plain JSON-safe object — no functions, * Symbols, `undefined` leaves, BigInts, non-finite numbers, or non-plain * objects (Dates, Maps, Sets, class instances). Rejected values would either * round-trip incorrectly through the execution input (`undefined` is silently * dropped by `JSON.stringify`) or throw at the wire boundary (`bigint`), so * we surface the offending path synchronously. * * The check is purely structural — semantic constraints (e.g. "is this * variable declared in `data-composition-variables`?") belong to the CLI * layer where the project's HTML is on disk. */ export declare function validateVariablesPayload(value: unknown): void; //# sourceMappingURL=renderConfigValidation.d.ts.map