import type { BaseOptions } from './types.js'; /** * One analysis artifact that is not usable on disk. * * Artifact-level, and deliberately NOT the same thing as `AnalyzeIndexDegradation`: that one * reports a SEARCH index built at reduced fidelity, this one reports a file that is missing or * unparseable. A host watching for "my index is not whole" needs this one. */ export interface HealthIndexDegradation { /** The artifact filename, e.g. `dependency-graph.json`. */ artifact: string; reason: 'missing' | 'corrupt'; } /** * Why the result is not ready, as a value a host can switch on. The `reason` string beside it is * for a human; a caller must never have to parse it. */ export type HealthReasonCode = 'no-root' | 'no-index' | 'building' | 'analysis-changed' | 'degraded-index'; export interface HealthResult { /** Whether OpenLore can operate on this root at all. */ runtime: 'available' | 'unavailable'; /** * `absent` — nothing analyzed yet. `building` — no usable index, but an analysis owns the * repository right now. `degraded` — an index exists but at least one artifact is missing or * corrupt. `ready` — every required artifact is present and parseable. */ index: 'absent' | 'building' | 'ready' | 'degraded'; /** Present only when `index` is `degraded`; names each artifact and why. */ indexDegradations?: HealthIndexDegradation[]; /** * `unknown` whenever no healthy daemon is discoverable, or the daemon predates watcher * reporting. Never guessed: a stopped watcher and an unobservable one are different facts. */ watcher: 'healthy' | 'stopped' | 'unknown'; /** True while an analysis owns the repository — a rebuild or repair is running. */ repairInProgress: boolean; /** Present whenever `index` is not `ready`, or the runtime is unavailable. */ reasonCode?: HealthReasonCode; /** The human-readable form of `reasonCode`. Never the machine-readable one. */ reason?: string; } /** * Report whether OpenLore is functionally ready for this working tree. * * A pure read: no artifact is written, no analysis is started, no LLM provider is needed. At most * one loopback request is issued, and only when a daemon is already announced. */ export declare function openloreHealth(options?: BaseOptions): Promise; //# sourceMappingURL=health.d.ts.map