/** * `cleo doctor exodus` core — read-only exodus health report (T11837). * * The fleet pre-check the owner flow opens with: a single, read-only snapshot of * where each scope stands so an operator (or the rollout automation) can route * the next step — already-sealed, migrated-but-unsealed (→ `cleo exodus seal`), * fresh-needs-migration, or no-cleo-data — and so any LARGE legacy DB is flagged * for individual attention before the streamed-verify build touches it. * * Pure assembly over existing primitives (`buildExodusPlan`, `runExodusStatus`, * `hasExodusCompleteMarker`, `detectStrandedResidue`, {@link computeCountParity}). * Never writes; never runs the heavy digest. * * @task T11837 (fleet-flow surface — exodus health-check) * @epic T11833 (EP-EXODUS-FLEET-HARDENING) * @saga T11242 (SG-DB-SUBSTRATE-V2) */ import type { ExodusScope } from './types.js'; /** Per-scope migration state. */ export type ExodusScopeState = 'sealed' | 'migrated-unsealed' | 'needs-migration' | 'no-cleo-data'; /** One legacy source DB's presence + size. */ export interface ExodusSourceHealth { readonly name: string; readonly path: string; readonly present: boolean; readonly bytes: number; /** `true` when `bytes >= LARGE_DB_BYTES` (route through streamed-verify build). */ readonly large: boolean; } /** Health of one scope (project | global). */ export interface ExodusScopeHealth { readonly scope: ExodusScope; readonly state: ExodusScopeState; readonly consolidatedExists: boolean; readonly markerPresent: boolean; readonly legacySources: readonly ExodusSourceHealth[]; readonly strandedResidue: readonly string[]; } /** Full read-only exodus health report. */ export interface ExodusHealth { readonly project: ExodusScopeHealth; readonly global: ExodusScopeHealth; /** Disk pre-flight (current 3×-of-sum policy). */ readonly diskHeadroomOk: boolean; readonly availableBytes: number; readonly requiredBytes: number; /** Whether `CLEO_DISABLE_EXODUS_ON_OPEN` is set (the fleet brake). */ readonly killSwitchSet: boolean; /** COUNT(*)-only data-continuity across present sources (no digest). */ readonly dataParityOk: boolean; readonly dataDeficits: number; /** Legacy DBs ≥ 500 MB across both scopes (need individual attention). */ readonly largeLegacyDbs: ReadonlyArray<{ name: string; scope: ExodusScope; bytes: number; }>; /** Actionable next-step recommendations. */ readonly recommendations: readonly string[]; } /** * Build a read-only exodus health report for the current project + global scope. * * @param cwd - Working directory used to resolve the project `.cleo/` dir. * @returns The assembled {@link ExodusHealth}. * * @task T11837 */ export declare function buildExodusHealth(cwd: string | undefined): ExodusHealth; //# sourceMappingURL=health.d.ts.map