import { type EmbeddingModel } from "./embeddings.js"; /** Severity buckets surfaced in the diagnostic UI. */ export type CheckStatus = "ok" | "warn" | "missing" | "error"; export interface DoctorCheck { /** Stable id for programmatic consumers (e.g. JSON output). */ id: string; /** Human-readable label (rendered next to the status icon). */ label: string; status: CheckStatus; /** Optional detail line printed below the label. */ detail?: string; /** Optional hint — usually the command that fixes it. */ hint?: string; } export interface DoctorResult { vault: string; /** True iff every `missing`/`error` check is absent (`warn` is OK). */ ready: boolean; checks: DoctorCheck[]; /** Tally for quick consumer reporting. */ summary: { ok: number; warn: number; missing: number; error: number; }; } /** Render one DoctorCheck to a multi-line string. */ export declare function formatCheck(check: DoctorCheck): string; /** Render a full DoctorResult to a banner string. */ export declare function formatDoctorResult(result: DoctorResult): string; /** * Candidate locations where transformers.js may have cached embedding model * weights. We probe all of them and report `ok` if any contains data. * * Why multiple paths: * - transformers.js v3+ default: `/.cache/Xenova/...` (lives * inside `node_modules/@huggingface/transformers/.cache`, the * library's own cache dir relative to its install location). * - Older HuggingFace Hub convention: `~/.cache/huggingface/...`. * - macOS XDG override: `~/Library/Caches/huggingface/...`. * - Custom env var: HF_HOME or TRANSFORMERS_CACHE if the user set them. * * We don't try to load transformers.js to read `env.cacheDir` — that * would defeat the doctor's "fast read-only health check" promise on * users who haven't installed the optional dep at all. */ export declare function candidateModelCacheRoots(): string[]; export interface RunDoctorOptions { vault: string; /** Override default cache root (mostly for tests). */ modelCacheRoot?: string; /** Override default embed-db location. */ embedFile?: string; /** Override default FTS5 index location. */ indexFile?: string; /** Default model alias to check for (matches DEFAULT_MODEL_ALIAS). */ modelAlias?: string; /** * Embedding-model catalog entry — passed in to avoid pulling * `@huggingface/transformers` into this module. Caller resolves it via * `resolveModel(alias)` from src/embeddings.ts. */ modelEntry?: EmbeddingModel; /** * v3.9.0-rc.16 (P2-12) — privacy denylist, same semantics as `serve`'s * `--exclude-glob`. When set, the doctor walks the vault WITH the filter so * its counts + "privacy filter" claim reflect reality (pre-rc.16 it always * walked unfiltered yet labeled the count "privacy filter applied"). */ excludeGlobs?: string[]; /** * v3.9.0-rc.16 (P2-12) — privacy allowlist, same semantics as `serve`'s * `--read-paths`. */ readPaths?: string[]; } /** * Run all the diagnostic checks. Pure data — caller decides how to * render (CLI banner, JSON, MCP tool response). */ export declare function runDoctor(opts: RunDoctorOptions): Promise; //# sourceMappingURL=doctor.d.ts.map