import type { StructuredError } from "../errors/structured-errors.js"; export interface AstPatch { nodeId: string; op: "replace" | "delete" | "insert"; field?: string; value?: unknown; index?: number; } export interface PatchApplyResult { ok: boolean; ast?: unknown; errors: StructuredError[]; } /** * Apply surgical patches to an Edict AST by nodeId. * * Deep-clones the AST before mutation to avoid side effects. * Supports `replace`, `delete`, and `insert` operations on any node * identified by its unique `id` field. * * @param ast - The original Edict AST (will not be mutated) * @param patches - Array of patch operations to apply sequentially * @returns `{ ok: true, ast }` with the patched clone, or `{ ok: false, errors }` if any patch fails */ export declare function applyPatches(ast: unknown, patches: AstPatch[]): PatchApplyResult; //# sourceMappingURL=apply.d.ts.map