import type { GraphBundle } from "audit-tools/shared"; import type { ArtifactBundle } from "../io/artifacts.js"; import type { CoverageMatrix } from "../types.js"; import type { AuditScopeBudget, AuditScopeManifest } from "../types/auditScope.js"; /** Default cap on in-scope files (seeds + expanded) before expansion stops. */ export declare const DEFAULT_SCOPE_MAX_FILES = 200; /** Graph edges below this confidence are never traversed during expansion. */ export declare const SCOPE_EDGE_CONFIDENCE_FLOOR = 0.5; /** * Expansion stops along a path once the accumulated path-confidence (the product * of the traversed edge confidences) drops below this floor. With no fixed hop * count, this — together with hub-skipping and the file budget — bounds the * frontier deterministically. */ export declare const SCOPE_MIN_FRONTIER_CONFIDENCE = 0.5; export interface ComputeAuditScopeInput { /** The git ref the delta is measured against. */ since: string; /** Raw changed paths (git output, posix-relative). */ changed: string[]; /** Canonical auditable file paths (repo-manifest paths, non-excluded). */ includedFiles: string[]; /** Dependency graph used to expand from seeds to neighbours. */ graphBundle?: GraphBundle; budget?: AuditScopeBudget; } /** * Deterministic priority-frontier expansion (Phase 3). Starting from the changed * files (seeds), walk the dependency graph outward, always visiting the neighbour * with the highest accumulated path-confidence first (tie-broken by path). High * fan-in/out hubs are skipped so a single change near a hub does not drag the * whole repo into scope, low-confidence edges are dropped, and expansion halts at * the file budget or when the best remaining frontier confidence falls below the * floor. Same inputs → identical scope. */ export declare function computeAuditScope(input: ComputeAuditScopeInput): AuditScopeManifest; /** A full-audit scope (the default, and every fallback). */ export declare function fullAuditScope(budget?: AuditScopeBudget, droppedNote?: string): AuditScopeManifest; export interface ResolveAuditScopeInput { root?: string; /** The `--since` ref, if any. Absent/empty → full audit. */ since?: string; bundle: ArtifactBundle; budget?: AuditScopeBudget; } /** * Resolve the scope for a planning run. Returns a full-audit scope unless a * `--since` ref was supplied against a real git repository; an unusable ref or * missing root degrades to a full audit with an honest note. Reads the auditable * file set from the repo manifest + disposition (the same lookup the graph * extractor uses) and the dependency graph from the bundle. */ export declare function resolveAuditScope(input: ResolveAuditScopeInput): AuditScopeManifest; /** * Apply a delta scope to a freshly-built coverage matrix. In-scope files (seeds * + expanded neighbours) keep their fresh `pending` status to be re-audited. * Out-of-scope files inherit a prior `complete` record verbatim when present (so * previously-finished work is preserved, not re-run), and are otherwise excluded * from this run with `classification_status: "out_of_scope_delta"`. Deterministic * exclusions (non-auditable/trivial) are left untouched. A full scope is a no-op. */ export declare function applyScopeToCoverage(coverage: CoverageMatrix, scope: AuditScopeManifest, priorCoverage?: CoverageMatrix): CoverageMatrix; /** * Apply the intent checkpoint's `excluded_scope` to a coverage matrix: any file * whose path matches an exclusion (exact or directory-prefix) is marked excluded * so it never becomes an audit task. The user's exclusions layer on top of the * deterministic disposition — they catch scope pollution the automatic pass * missed. Returns the newly-excluded paths (for the run summary / report); a * checkpoint with no exclusions is a no-op. */ export declare function applyIntentExclusionsToCoverage(coverage: CoverageMatrix, excludedScope: Array<{ path: string; reason: string; }> | undefined): string[]; //# sourceMappingURL=scope.d.ts.map