import { type SqlBool, type ExpressionBuilder, type ExpressionWrapper } from "kysely";
import type { LixDatabaseSchema } from "../database/schema.js";
import type { LixCommit } from "../commit/schema-definition.js";
/**
 * Filters commits that are ancestors of the given commit.
 *
 * By default, this is **exclusive**, meaning it returns only commits strictly
 * *before* the provided commit in the graph.
 *
 * Traverses the `commit_edge` graph recursively, starting from the provided commit
 * (or its parents if exclusive), and returns all commits reachable via parent edges.
 *
 * This filter is typically used to scope the graph before applying filters like `changeIsLeaf()`.
 *
 * ⚠️ This filter only defines the traversal scope — it does not filter changes directly.
 *
 * --- Options ---
 * - `includeSelf`: If `true`, includes the starting `commit` in the results. Defaults to `false`.
 * - `depth`: Limits the traversal depth. `depth: 1` selects only immediate parents (if exclusive)
 *   or the starting node and its immediate parents (if inclusive).
 *
 * --- Examples ---
 *
 * @example Selecting strict ancestors (default)
 * ```ts
 * db.selectFrom("commit")
 *   .where(commitIsAncestorOf({ id: "c3" }))
 *   .selectAll()
 * ```
 *
 * @example Selecting inclusive ancestors
 * ```ts
 * db.selectFrom("commit")
 *   .where(commitIsAncestorOf({ id: "c3" }, { includeSelf: true }))
 *   .selectAll()
 * ```
 *
 * @example Combining with commitIsDescendantOf to select commits between two points in time
 * ```ts
 * // Select all commits between startPoint and endPoint (inclusive)
 * db.selectFrom("commit")
 *   .where(commitIsDescendantOf({ id: "startPoint" }))
 *   .where(commitIsAncestorOf({ id: "endPoint" }))
 *   .selectAll()
 * ```
 */
export declare function commitIsAncestorOf(commit: Pick<LixCommit, "id">, options?: {
    depth?: number;
    includeSelf?: boolean;
}): (eb: ExpressionBuilder<LixDatabaseSchema, "commit">) => ExpressionWrapper<LixDatabaseSchema, "commit", SqlBool>;
//# sourceMappingURL=commit-is-ancestor-of.d.ts.map