import { type GroveConfig, type Resource } from "./schema.js"; export type ValidationSeverity = "error" | "warning"; export interface ValidationIssue { code: string; message: string; severity: ValidationSeverity; } export interface ValidationResult { ok: boolean; errors: ValidationIssue[]; warnings: ValidationIssue[]; /** Flattened list of all issues (errors first, then warnings). */ issues: ValidationIssue[]; } /** * Validate a Grove project: read every record YAML under * `config.paths.recordsDir`, run full Zod parsing, and surface any * schema, slug, link, health, or decision reference issues. * * Each record is run through the same Zod schema the build pipeline * uses (see `recordsFileSchema`). Validation catches both schema * problems (missing fields, wrong types) and reference problems * (duplicate slugs, missing health entries, dangling decision ids). */ export declare function validateProject(config: GroveConfig, opts?: { strict?: boolean; }): Promise; /** * Load and normalize every record YAML under `config.paths.recordsDir`. * * @param config Grove config (provides `paths.recordsDir` and `blueprint`) * @param opts.onError 'skip' (default) silently drops schema failures; * 'throw' raises on the first failure with the file slug and the * Zod issue path in the error message. * @param opts.cwd Working directory to resolve `paths.recordsDir` * against. Defaults to `process.cwd()`. * * For callers that want the strict-by-default behaviour, see * `loadRecordsOrThrow`. `validateProject` is the recommended * surface for surfacing failures with full error reporting. */ export declare function loadRecords(config: GroveConfig, opts?: { onError?: "skip" | "throw"; cwd?: string; }): Promise; /** * Strict variant of `loadRecords` — throws on the first schema failure * with the file slug and the Zod issue path in the error message. * Recommended for build pipelines; `loadRecords` is the lenient * helper for previews and dev-time inspection. */ export declare function loadRecordsOrThrow(config: GroveConfig, opts?: { cwd?: string; }): Promise; //# sourceMappingURL=validate.d.ts.map