import { z } from "zod"; import type { FileEditRequest } from "./types.ts"; /** Per-file edit input, as accepted by createHashlineEditTool. */ export interface HashlineEditInputFile extends FileEditRequest { hashWidth?: number; } /** * Internal test-only hooks for createHashlineEditTool. * * `beforeWrite` is invoked while all path locks are held, after every file's * edit has been computed and before the pre-write version recheck. It defaults * to no behavior and is intentionally NOT part of the public tool schema or the * user-facing tool documentation — it exists to let tests inject deterministic * external modifications into the read → recheck window. */ export interface HashlineEditToolHooks { beforeWrite?: (ctx: { files: HashlineEditInputFile[]; writes: Array<{ filePath: string; content: string; }>; }) => void | Promise; } /** Per-file result of the read → validate → compute pipeline. */ export interface ProcessedFileResult { filePath: string; version: string; /** True when the file existed at read phase (false for to-be-created files). */ existed: boolean; diff: string; additions: number; deletions: number; reanchored: string; error?: string; content?: string; correctionsApplied?: Array<{ old: string; new: string; }>; noopEdits?: number; deduplicatedEdits?: number; } export declare function createHashlineEditTool(hooks?: HashlineEditToolHooks): import("../platform/types.ts").CanonicalToolDef<{ files: z.ZodArray; edits: z.ZodArray>; pos: z.ZodOptional; end: z.ZodOptional; lines: z.ZodOptional]>>; }, z.core.$strip>>; }, z.core.$strip>>; }>; //# sourceMappingURL=hashline-edit.d.ts.map