import { type CodegraphExcludeIntegrityReport } from '../../services/codegraph/codegraph-exclude-integrity.js'; import { type CodegraphIndexIntegrityReport, type CodegraphIndexIntegrityVerdict } from '../../services/codegraph/codegraph-index-integrity.js'; import { type ProgramIO } from '../cli-helpers.js'; /** Everything both the human and the machine branches of `status` report. */ export type CodegraphStatusAxes = { readonly integrity: CodegraphExcludeIntegrityReport | null; readonly integrityWarning: string | null; readonly indexIntegrity: CodegraphIndexIntegrityReport | null; readonly indexIntegrityWarning: string | null; readonly indexVerdict: CodegraphIndexIntegrityVerdict; readonly strict: boolean; }; /** * Read both axes for a project root. * * R12-1: the two axes have DIFFERENT applicability predicates, and folding * them into the config's alone is how a db-present / config-absent project * came to exit 0 in SILENCE — under `PEAKS_CODEGRAPH_INDEX_STRICT=1` too. * "Could not evaluate" is a verdict; it may not be spelled the same way as * "verified clean" merely because the read happened to be gated out. * * - exclude axis: applicable iff `.codegraph/config.json` exists. The * config IS the subject of that axis, so with no config there is no * exclusion list in play — `not-applicable`, silent, as before. * - index axis: applicable iff `.codegraph/codegraph.db` exists — the * SAME predicate the doctor's `defaultProbe` uses * (`isCodegraphInitialized` in * `doctor-service/checks/codegraph-index-integrity.ts`), so the two * consumers now agree about when the axis is evaluable at all. The * index is the subject here and the config is only an INPUT it reads, * so a missing config is "could not evaluate" (exit 76, `[FAIL]`), * not "nothing to evaluate". * * The user's constraint holds either way: an absent config is LEGITIMATE * for a project that never ran `peaks codegraph init` — with no db BOTH * predicates are false and the command stays silent exactly as before. * * The two axes are evaluated INDEPENDENTLY: an unreadable index must not * blind the exclude verdict, and a malformed exclude list must not hide a * stale index. Each failure degrades to its own warning. */ export declare function readStatusAxes(projectRoot: string): CodegraphStatusAxes; /** The human-readable axis report, printed only by the non-JSON branch. */ export declare function emitIntegrityText(io: ProgramIO, axes: CodegraphStatusAxes): void;