export declare class ScaffoldError extends Error { readonly code: string; constructor(code: string, message: string); } export interface ScaffoldWrite { readonly path: string; readonly content: string; /** A registration edit must still match the source used by the compiler. */ readonly expected?: string; readonly overwrite?: boolean; } interface FileSnapshot { readonly content: string; readonly mode: number; readonly dev: number; readonly ino: number; } export interface ScaffoldPlan { readonly root: string; readonly writes: readonly (ScaffoldWrite & { readonly before: FileSnapshot | null; })[]; } export declare function scaffoldPath(root: string, path: string): string; /** Preflight the complete set before creating any directory or file. */ export declare function planScaffoldWrites(root: string, writes: readonly ScaffoldWrite[]): Promise; /** * Serializes generator writers and rolls back handled write failures. This is * not a crash-atomic filesystem transaction or a sandbox against hostile local * writers. Concurrent edits detected during validation are never overwritten. */ export declare function applyScaffoldWrites(plan: ScaffoldPlan): Promise; export {};