import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; /** Represents a single operation parsed from a V4A patch. */ interface PatchOperation { type: "add" | "update" | "delete"; path: string; moveTo?: string; /** For "add": lines to write (without leading '+'). */ addLines?: string[]; /** For "update": parsed sections with context anchors and change lines. */ sections?: PatchSection[]; } /** A section within an update hunk, anchored by an @@ line. */ interface PatchSection { anchor: string | null; changes: PatchChange[]; isEof: boolean; } interface PatchChange { type: "insert" | "delete" | "context"; text: string; } /** * Parse V4A patch format into structured operations. * * Format: * *** Begin Patch * *** Update File: path/to/file.ts * @@ context anchor line * -removed line * +added line * context line (space prefix = keep) * *** Add File: path/to/new.ts * +line 1 * +line 2 * *** Delete File: path/to/old.ts * *** End Patch */ export declare function parseV4APatch(patch: string): PatchOperation[]; export declare function registerWorkspaceApplyPatch(server: McpServer): void; export {}; //# sourceMappingURL=workspaceApplyPatch.d.ts.map