/** * Tree-walking validator used for a schema's first few calls and as the * targeted fallback for recursive or predicate-only JIT subtrees. * * Semantics must stay in lockstep with `compile.ts`: * - success returns the output value; the input is returned as-is unless the * schema morphs (defaults, `"+": "delete"`, embedded stepped schemas), in * which case a fresh object/array is produced and the input is untouched * - failure returns an `OmpErrors` with a single fast-fail entry */ import { OmpErrors } from "./errors.js"; import { type IR } from "./ir.js"; /** Return an independent runtime value for a prevalidated static default. */ export declare function materializeDefault(payload: unknown): unknown; /** * Validate `value` against `ir`; returns output value or `OmpErrors`. * `path` seeds the traversal location so nested step callbacks observe * absolute ctx.path values when a compiled parent delegates a subtree; * resulting error paths are then already absolute. */ export declare function walk(ir: IR, value: unknown, path?: PropertyKey[]): unknown; /** True when a union failure can be replaced with a more specific nested error. */ export declare function canRefineUnionFailure(member: IR): boolean; /** * Detailed failure for a union: descend into the member the value was clearly * aimed at — unique runtime-kind match, else an object member whose literal * discriminant property (e.g. `type: "'computer_call'"`) equals the value's — * for a precise nested error (paths, narrow messages) instead of the coarse * "A or B" expectation. */ export declare function unionFail(ir: IR & { k: "union"; }, v: unknown, path: PropertyKey[], expected?: string): OmpErrors;