/** * openlore doctor command * * Self-diagnostic tool that checks all prerequisites and surfaces actionable * fixes when something is misconfigured or missing. */ import { Command } from 'commander'; type CheckStatus = 'ok' | 'warn' | 'fail'; /** * A machine-readable remediation for a check `--fix` can execute (change: * make-index-self-healing). Present ONLY on checks whose printed `fix:` hint maps * to a safe, in-process action, so `--fix` runs exactly what a check surfaced and * nothing more. Internal — stripped from `--json` so the read-only output contract * is byte-compatible. */ type Remediation = { kind: 'analyze'; label: string; } | { kind: 'rewire-mcp'; label: string; }; export interface CheckResult { name: string; status: CheckStatus; detail: string; fix?: string; remediation?: Remediation; } /** * Parse-health check (change: add-parse-health-boundary-disclosure): surface files that parsed with * errors (grammar drift, syntax errors, lossy encoding) so a degraded index isn't mistaken for a * genuinely small one. Absent artifact → clean (ok). A spike after a `tree-sitter-*` bump is the * signal this check exists to catch. * * Exclusions are read from the SAME record `analyze` reports from (change: * fix-analyze-native-abort-and-file-cost-budget), and via the same `describeExclusions` helper, so * this check cannot bless a repository whose analysis excluded files — the contradiction the * `EveryExcludedFileIsRecordedWithAReason` requirement exists to prevent. */ /** Exported for test: the exclusion-vs-degradation verdict must be pinned behaviorally. */ export declare function checkParseHealth(rootPath: string): Promise; export declare const doctorCommand: Command; /** * The deduped set of remediations `--fix` will run: only non-ok checks that * surfaced a machine-readable remediation, each action at most once (two checks * may both print "re-analyze"). Pure and exported so the "fixes exactly what it * printed, nothing else" contract is unit-testable without executing anything. */ export declare function planRemediations(checks: CheckResult[]): Array<{ check: CheckResult; remediation: Remediation; }>; export {}; //# sourceMappingURL=doctor.d.ts.map