import type { Lix } from "../lix/open-lix.js"; import { type SelectQueryBuilder } from "kysely"; import type { DiffRow } from "../version/select-version-diff.js"; /** * Compare two commits and return differences between their leaf entity states. * * Reconstructs entity states at each commit by walking commit ancestry, then compares them. * Unlike version-based diffs, this dynamically computes states without requiring version materialization. * * Diff status meanings: * * - `added`: Entity exists only in `after` commit * - `removed`: Entity exists only in `before` commit * - `modified`: Entity exists in both with different change_ids * - `unchanged`: Entity exists in both with same change_id * * Uses fast-path optimization when `includeUnchanged: false` (default) by first identifying * changed entity triples, then only reconstructing leaf states for those. * * The `hints` parameter filters results at the database level for better performance: * * - `includeUnchanged`: Include unchanged entities (default: true). Set false for fast-path optimization. * - `fileId`: Limit to specific file * - `pluginKey`: Filter by plugin that created changes * - `schemaKeys`: Include only specific entity types * - `entityIds`: Include only specific entities * * @example * // Get changes between commits * const changes = await selectCommitDiff({ * lix, * before: 'abc123', * after: 'xyz789', * hints: { includeUnchanged: false } * }).execute(); * * @example * // Filter by file and status * const fileDiff = await selectCommitDiff({ lix, before, after }) * .where('diff.file_id', '=', 'messages.json') * .where('diff.status', '!=', 'unchanged') * .execute(); */ export declare function selectCommitDiff(args: { lix: Lix; before: string; after: string; hints?: { includeUnchanged?: boolean; fileId?: string; pluginKey?: string; schemaKeys?: string[]; entityIds?: string[]; }; }): SelectQueryBuilder; //# sourceMappingURL=select-commit-diff.d.ts.map