/** * The semantic validator: checks raw parsed segments (or ops) against the verb table and the * deployment's configured engines, producing the validated {@link MediaPlan} or a * model-actionable error. * * @remarks * Internal sibling of the `@nhtio/adk/batteries/media` entry. This is the layer no parser * toolkit could supply — every error names what was wrong, suggests the nearest valid form, * and shows a corrective exemplar (frozen design 0.14). Engine narrowing happens HERE, never * at parse time (frozen 0.3): the same string parses identically in every deployment; only * validation differs. */ import type { RawSegment } from "./pipe"; import type { MediaPlan, MediaOp } from "./plan"; /** * The minimal synchronous capability probe the validator narrows against. The pipeline's * engine registry implements it; tests stub it. */ export interface CapabilityProbe { /** `true` when some engine declares a matching convert edge (omit either side for "any"). */ hasConvert(from?: string, to?: string): boolean; /** `true` when some engine declares a mutate capability. */ hasMutate(): boolean; /** * `true` when some engine declares a matching edit capability (omit both for "any"). * Optional so existing probe stubs stay valid; absent means "no edit engines". */ hasEdit?(mime?: string, op?: string): boolean; } /** Options for {@link validateSegments} / {@link validateOps}. */ export interface ValidateOptions { /** The deployment's capabilities. Narrows advertised verbs + error suggestions. */ capabilities: CapabilityProbe; } /** The folded verb forms available under a given capability configuration. */ export declare const availableVerbs: (capabilities: CapabilityProbe) => string[]; /** * Validate raw pipe segments into a {@link MediaPlan}. * * @param segments - Output of `parsePipeRaw`. * @param options - The deployment's capability probe. * @returns The validated plan, spans preserved. */ export declare const validateSegments: (segments: readonly RawSegment[], options: ValidateOptions) => MediaPlan; /** * Validate a JSON ops array into a {@link MediaPlan}. The same checks as the pipe path — * verbs fold the same way, args validate against the same specs — so the two front-ends * produce identical plans for equivalent statements. * * @param ops - The ops array. * @param options - The deployment's capability probe. * @returns The validated plan (no spans). */ export declare const validateOps: (ops: readonly MediaOp[], options: ValidateOptions) => MediaPlan;