import type { SandboxSession } from "eve/sandbox"; type PatchHunk = { readonly type: "add"; readonly path: string; readonly contents: string; } | { readonly type: "delete"; readonly path: string; } | { readonly type: "update"; readonly path: string; readonly movePath?: string; readonly chunks: readonly UpdateChunk[]; }; interface UpdateChunk { readonly oldLines: readonly string[]; readonly newLines: readonly string[]; readonly changeContext?: string; /** Function context from a unified-diff range header; git may have truncated it. */ readonly contextHint?: string; readonly endOfFile?: boolean; } export interface AppliedPatchFile { readonly operation: "add" | "delete" | "move" | "update"; readonly path: string; readonly previousPath?: string; } /** A verified change about to be written, with the content it replaces. */ export interface PlannedPatchFile extends AppliedPatchFile { readonly previousContent: string | null; } export declare function applyPatchToSandbox(input: { readonly beforeCommit?: (files: readonly PlannedPatchFile[]) => Promise; readonly patchText: string; readonly patchRoot: string; readonly sandbox: SandboxSession; /** Serializes patches per eve session; every `ctx.getSandbox()` call returns a new handle. */ readonly sessionId: string; }): Promise; export declare function parsePatch(patchText: string): readonly PatchHunk[]; export declare function deriveUpdatedContent(path: string, chunks: readonly UpdateChunk[], original: string): string; export {};