import { type Spec } from './contract.js'; export declare class SpecValidationError extends Error { readonly problems: string[]; constructor(problems: string[]); } /** * Pull the single fenced ```json block out of spec.md and `JSON.parse` it. * Throws `SpecValidationError` when the block is absent, unparseable, OR when * there is more than one — the spec contract says spec.md carries EXACTLY one * canonical-Spec json block, so a stale-block + new-block mix must be rejected * rather than silently finalizing the wrong (first) one (codex review). */ export declare function extractSpecJsonBlock(specMd: string): unknown; /** * Validate an untrusted parsed value into a `Spec`. Pure — throws * `SpecValidationError` with the full problem list on any issue, otherwise * returns the normalized Spec. */ export declare function validateSpec(raw: unknown): Spec; /** Parse + validate the canonical Spec out of spec.md content (no IO). */ export declare function parseSpecFromMarkdown(specMd: string): Spec; /** * Read `specMdPath`, parse + validate its fenced json block, and write the * canonical `spec.json` to `specJsonPath`. Returns the Spec. Throws * `SpecValidationError` (which the host surfaces and uses to BLOCK handoff). * * When `runId` is given it is the host-authoritative run id: it overrides * whatever grill put in the block (grill's value is advisory) before * validation, so spec.json's runId always matches the run dir. */ export declare function finalizeSpec(specMdPath: string, specJsonPath: string, runId?: string): Spec; //# sourceMappingURL=spec.d.ts.map