import { z } from "zod"; /** * Frontmatter schema for canonical instruction files. * * Required fields: * - lex_version: The Lex version that generated this file * - generated_by: The command that generated this file * - schema_version: The schema version for this format */ export declare const CanonicalInstructionFrontmatterSchema: z.ZodObject<{ lex_version: z.ZodString; generated_by: z.ZodString; schema_version: z.ZodString; repo_name: z.ZodOptional; }, z.core.$strict>; /** * TypeScript type inferred from the frontmatter schema. */ export type CanonicalInstructionFrontmatter = z.infer; /** * Validates frontmatter data against the canonical instruction schema. * * @param data - The frontmatter object to validate * @returns The validated frontmatter if valid * @throws ZodError if validation fails * * @example * ```typescript * const frontmatter = validateFrontmatter({ * lex_version: "2.0.0", * generated_by: "lex instructions generate", * schema_version: "1" * }); * ``` */ export declare function validateFrontmatter(data: unknown): CanonicalInstructionFrontmatter; /** * Safely validates frontmatter data, returning a result object instead of throwing. * * @param data - The frontmatter object to validate * @returns Object with success/data or error details * * @example * ```typescript * const result = safeParseFrontmatter(data); * if (result.success) { * console.log(result.data.lex_version); * } else { * console.error(result.error); * } * ``` */ export declare function safeParseFrontmatter(data: unknown): { success: true; data: CanonicalInstructionFrontmatter; } | { success: false; error: z.ZodError; };