import type { ModelGraph } from "../loader/model-graph.js"; /** * `--diff` incremental support (Proposal 006 B2 / 001 §5 §6): resolve what a PR * changed so a check re-runs only over the diff closure instead of the whole * repo, and map the changed files back to the model nodes they touch. */ /** * Repo-relative paths changed between `merge-base(baseRef, HEAD)` and the * working tree (committed + uncommitted), via git. Uses the merge-base (not a * raw `baseRef..HEAD`) so a stale base branch doesn't inflate the diff with * commits already on HEAD. Returns undefined when the ref/repo is unusable — * the caller falls back to a full scan rather than silently checking nothing. */ export declare function changedFiles(gitRoot: string, baseRef: string): Promise; /** The git top-level of `dir`, or undefined if `dir` isn't inside a git checkout. */ export declare function gitRootOf(dir: string): Promise; export interface AffectedNode { nodeId: string; kind: string; /** the anchor whose file is in the changed set */ anchor: string; file: string; } /** * Model nodes whose anchor points at one of `changedFiles` — the diff's impact * surface on the model. Pure. A loop/junction/scenario is "affected" when a * file it anchors to (Loop.anchors, Junction.evidence[].anchor, * Scenario.verified_by[]) changed, so a reviewer sees which modeled behaviors a * diff might have moved out from under. */ export declare function affectedNodes(graph: ModelGraph, changed: Iterable): AffectedNode[]; /** * Debt ids present in the model at `baseRef`, for the baseline-only-decreases * check's "before" snapshot. `modelRelDir` is the model directory relative to * `gitRoot`. Uses a SINGLE `git grep` over the base tree (not one `git show` * per model file) so it stays fast on a large model. * * Returns undefined only when the base snapshot is genuinely unreadable (bad * ref / not a git repo); an empty set (no debt at base) is a real result, not a * skip. Note: the id scrape is a text match — only DebtEntry nodes can carry a * `DEBT-` id (the schema's id regexes forbid it elsewhere), and a stray match * in a comment/string could at worst add a spurious "before" id, which only * *suppresses* a growth violation, never invents one (checkBaselineOnlyDecreases * flags after-not-before). */ export declare function debtIdsAtRef(gitRoot: string, modelRelDir: string, baseRef: string): Promise | undefined>; //# sourceMappingURL=diff.d.ts.map