/** * Tiny line-oriented diff helper used to populate `--dry-run` previews. * * This is not a full Myers diff — it's the cheapest output that still lets a user see what * `openlore install --dry-run` would do without us shelling out to `diff(1)`. The result is * meant for human eyeballing, not machine consumption. * * PRIVACY IS THE DESIGN CONSTRAINT HERE, not brevity (change: fix-install-never-blocks-by-default). * These previews render the user's `~/.claude.json` and `~/.claude/settings.json`, which routinely * hold an `signedInAccount` block and per-MCP-server `env` blocks with provider API keys. The previous * implementation trimmed only the common PREFIX and SUFFIX, so one changed line near the top and * one near the bottom made the whole untouched middle of the file "the changed region" — a * re-ordered `mcpServers.openlore` key was enough to print ~11 KB of unrelated private * configuration, twice (once as `-`, once as `+`), on a command that looks read-only. * * Two rules follow, and `diff.test.ts` pins both: * * 1. Only the ACTUAL changed hunks are printed, each inside a bounded context window. An * untouched key far from any change is never rendered, whatever its position in the file. * 2. Every line that is rendered goes through the repository's own secret redaction first, so a * credential that genuinely sits inside a changed hunk is still never echoed. */ export declare function previewCreate(filePath: string, content: string): string; export declare function previewDiff(filePath: string, before: string, after: string): string; //# sourceMappingURL=diff.d.ts.map