/** * Parse-health boundary surfacing (change: add-parse-health-boundary-disclosure). * * The analyzer records per-file parse health into `parse-health.json`. This module is the read side * shared by every MCP surface that discloses it: it loads the report and, given the files a * conclusion's result set touches, produces a single disclosed boundary string when any of them * parsed with errors — so a conclusion built on a degraded file says *"symbols/edges there are a * lower bound"* instead of implying the missing symbols are genuinely absent (the `NoFalseCompleteness` * failure mode). A clean repo has no artifact, so every helper here fails open to "no boundary". */ import { type ParseHealthReport } from '../../analyzer/parse-health.js'; import { type ReadabilityShortfall } from '../../analyzer/retrieval-evidence.js'; /** * One parse-health read, with the one distinction a bare `null` cannot carry (change: * fix-retrieval-coverage-over-unread-content). * * An ABSENT artifact means a clean repository: every consumer reads it as "nothing degraded", * which is correct and is why clean repos pay nothing. An artifact that is PRESENT and could * not be read — refused (symlink / FIFO / oversized), truncated, or malformed — means the * opposite: the record of what was unreadable is itself unreadable, so "nothing degraded" * is a claim no one can make. Collapsing the two is how a corrupt record silences the very * disclosure it exists to carry. */ export interface ParseHealthLoad { report: ParseHealthReport | null; /** The artifact exists and could not be read or parsed. */ artifactUnreadable: boolean; } /** Load the persisted parse-health report and say whether a present artifact was unreadable. */ export declare function loadParseHealth(absDir: string): Promise; /** Load the persisted parse-health report, or `null` when absent/unreadable (a clean repo). */ export declare function loadParseHealthReport(absDir: string): Promise; /** * Given the files a conclusion's result set touches, return a disclosed boundary string, else * `undefined`. Two disclosures ride the same string: * * 1. the per-file boundary — files IN THIS result that parsed with errors; * 2. language grammars that were unavailable for the whole analysis; * 3. a whole-analysis memory-pressure reduction (change: make-analyze-scale-to-any-repo). When the * degradation ladder shed the CFG overlay and/or deep-analysis breadth, that reduction has NO * per-file record — it affects every result over this index — so it is surfaced REGARDLESS of * which files the result touched. Without this the shed coverage would read as genuine absence, * the exact `NoFalseCompleteness` failure the disclosure exists to prevent. */ export declare function parseHealthBoundary(report: ParseHealthReport | null, touchedFiles: Iterable, options?: { repoWide?: boolean; artifactUnreadable?: boolean; }): string | undefined; /** * Roll the persisted parse-health report up into the repository-wide readability shortfall the * coverage verdict reads, or `undefined` when nothing in the repository was unreadable. * * Cheap by construction: a pure fold over records the analyzer already wrote — no file is * re-read, no tree is re-parsed, and a clean repository has no artifact at all, so the whole * path costs one absent-file read. Nothing here is recomputed per result. * * Script-container boundaries are deliberately NOT a cause: a recognized `.vue`/`.svelte` file * whose script blocks WERE extracted is recorded there too, so counting it would degrade every * single-file-component repository's verdict and make the signal worthless. It stays in the * boundary text, where it belongs. */ export declare function readabilityShortfall(report: ParseHealthReport | null | undefined, artifactUnreadable?: boolean): ReadabilityShortfall | undefined; //# sourceMappingURL=parse-health-boundary.d.ts.map