/**
* Standard Schema V1 integration (unified-theory §13).
*
* Accept Zod 4, Valibot, ArkType, and TypeBox (via {@link fromTypeBox}).
* Validation failures are typed flow-boundary errors — never thrown exceptions.
*/
import { fail, type FlowFailure } from "../kernel/errors.ts";
// ---------------------------------------------------------------------------
// Standard Schema V1 (https://standardschema.dev/)
// ---------------------------------------------------------------------------
/** The Standard Typed interface — base for Standard Schema. */
export interface StandardTypedV1 {
readonly "~standard": StandardTypedV1.Props;
}
export declare namespace StandardTypedV1 {
/** Standard Typed properties. */
export interface Props {
readonly version: 1;
readonly vendor: string;
readonly types?: Types | undefined;
}
/** Inferred input/output types carrier. */
export interface Types {
readonly input: Input;
readonly output: Output;
}
/** Infer input type from a Standard Typed schema. */
export type InferInput = NonNullable<
Schema["~standard"]["types"]
>["input"];
/** Infer output type from a Standard Typed schema. */
export type InferOutput = NonNullable<
Schema["~standard"]["types"]
>["output"];
}
/** The Standard Schema interface. */
export interface StandardSchemaV1 {
readonly "~standard": StandardSchemaV1.Props;
}
export declare namespace StandardSchemaV1 {
/** Standard Schema properties. */
export interface Props extends StandardTypedV1.Props<
Input,
Output
> {
readonly validate: (
value: unknown,
options?: Options | undefined,
) => Result