/** * Compare two PNG screenshots pixel-by-pixel and write a diff image + JSON report. * * Examples: * - Basic diff: baselinePath: "/tmp/before.png", currentPath: "/tmp/after.png" * - Custom output dir: baselinePath: "...", currentPath: "...", outputDir: "/tmp/diffs" * - Strict threshold: baselinePath: "...", currentPath: "...", threshold: 0.001 * * **Full documentation:** See io/visual-diff.md for detailed parameters and examples */ export declare function visualDiffTool(args: any): Promise<{ content: { type: "text"; text: string; }[]; structuredContent: { differentPixels: number; differencePercentage: number; passed: boolean; }; isError: boolean; }>; export declare const VISUAL_DIFF_DOCS = "\n# visual-diff\n\nCompare two PNG screenshots pixel-by-pixel using pixelmatch to detect visual regressions.\nWrites a highlighted diff image and a JSON report to the output directory.\n\n## What it does\n\nReads two PNG files, compares them pixel-by-pixel, and:\n- Reports the number and percentage of differing pixels\n- Determines pass/fail against a configurable threshold\n- Writes `diff.png` with highlighted differences (red pixels where images differ)\n- Writes `diff-report.json` with full metrics\n\n## Parameters\n\n- **baselinePath** (string, required): Path to the baseline (reference) PNG\n- **currentPath** (string, required): Path to the current (test) PNG\n- **outputDir** (string, optional): Directory for diff.png and diff-report.json. Defaults to the directory containing currentPath\n- **threshold** (number, optional): Maximum acceptable ratio of different pixels (0.01 = 1%). Default: 0.01\n\n## Returns\n\nText summary and structuredContent:\n- `differentPixels`: Count of pixels that differ\n- `differencePercentage`: Ratio of different pixels to total pixels (0\u20131)\n- `passed`: true if differencePercentage <= threshold\n\n## Artifacts Written\n\n- `diff.png`: Diff image highlighting changed pixels (pixelmatch output)\n- `diff-report.json`: JSON with baseline, current, dimensions, totalPixels, differentPixels, differencePercentage, thresholdPercentage, passed\n\n## Errors\n\nThrows McpError(InvalidRequest) for:\n- Missing baseline or current file\n- Dimension mismatch between images\n- PNG read failures\n\n## Examples\n\n### Basic diff\n```typescript\nawait visualDiffTool({\n baselinePath: '/tmp/before.png',\n currentPath: '/tmp/after.png'\n})\n```\n\n### Custom output directory and strict threshold\n```typescript\nawait visualDiffTool({\n baselinePath: '/tmp/before.png',\n currentPath: '/tmp/after.png',\n outputDir: '/tmp/diffs',\n threshold: 0.001\n})\n```\n\n### Zero-tolerance regression check\n```typescript\nawait visualDiffTool({\n baselinePath: '/snapshots/login-baseline.png',\n currentPath: '/snapshots/login-current.png',\n threshold: 0\n})\n```\n"; export declare const VISUAL_DIFF_DOCS_MINI = "Compare two PNG screenshots pixel-by-pixel for visual regressions. Use rtfm({ toolName: \"visual-diff\" }) for docs."; //# sourceMappingURL=visual-diff.d.ts.map