import type { FixManifest } from "../orchestrator/finish-tool.js"; type PageChange = FixManifest["pages"][number]["changes"][number]; type DomainPatch = FixManifest["domainLevel"][number]; /** * Structured patch diff. Each manifest change maps to one of these, * which downstream consumers (web UI, CLI, GitHub-PR generator) render * differently: * - text_replace → before/after blocks side-by-side, copy-paste UI * - html_insert → HTML snippet to paste into the named region * - html_remove → CSS selector to delete * - file_replace → full-file diff (robots.txt / sitemap.xml) * - guidance → freeform prose (canonical_strategy) * * Kept deliberately narrow — not a unified-diff library. The manifest * patches are paste-into-CMS-friendly outputs, not source-level diffs. */ export type PatchDiff = { kind: "text_replace"; field: "h1" | "title" | "meta_description" | "intro"; before: string; after: string; reason: string; } | { kind: "html_insert"; target: "head" | "body" | "after_h1"; description: string; html: string; reason: string; } | { kind: "html_remove"; selector: string; reason: string; } | { kind: "file_replace"; path: string; before: string | null; after: string; reason: string; } | { kind: "guidance"; topic: "canonical_strategy"; text: string; reason: string; }; /** * Convert a single page-change into a `PatchDiff`. Pure transformation — * does not validate (use `validatePageChange` for that). The two should * be called in sequence at manifest finalization: validate first, drop * failures, then diff the survivors. */ export declare function diffPageChange(c: PageChange): PatchDiff; /** Convert a single domain patch into a `PatchDiff`. */ export declare function diffDomainPatch(p: DomainPatch): PatchDiff; export interface ManifestDiff { pages: Array<{ url: string; diffs: PatchDiff[]; }>; templates: Array<{ templateId: string; affectedUrlCount: number; recommendation: string; examples: Array<{ url: string; diffs: PatchDiff[]; }>; }>; domainLevel: PatchDiff[]; } /** * Walk every patch in a manifest and produce a structured-diff projection. * Mirrors the manifest's tree structure so the UI can render side-by-side * (page list / template clusters / domain-level), each populated with * already-typed patch diffs. */ export declare function diffManifest(manifest: FixManifest): ManifestDiff; export {}; //# sourceMappingURL=diff.d.ts.map