import type { Check } from './types.js'; import { type ProcessInfo, type OllamaPsModel, type PersistedEnvValue } from './probes/gpu-vram-probe.js'; export interface GpuCheckOpts { /** Base URL of the Ollama API. Default http://127.0.0.1:11434. */ ollamaBaseUrl?: string; /** Injectable process lister — tests substitute a stub instead of a real * OS enumeration. Defaults to the real cross-platform implementation. * `null` means enumeration failed (timeout, missing binary, unparsable * output) — MUST be treated as inconclusive, never as "zero processes". */ listProcesses?: () => Promise; /** Injectable nvidia-smi VRAM-by-PID lookup — tests substitute a stub; * `null` means "unavailable" (no NVIDIA GPU / nvidia-smi not on PATH). */ queryGpuMemory?: (pids: number[]) => Promise | null>; /** Injectable Ollama /api/ps fetch — tests substitute a stub; `null` * means Ollama is unreachable. */ fetchOllamaPs?: (baseUrl: string) => Promise; /** Injectable environment map for the tuning-vars row's "doctor process * couldn't determine the real value" fallback text. Defaults to * `process.env`. Never used as the primary source of truth — see * `readPersistedEnvVars`. */ env?: NodeJS.ProcessEnv; /** Injectable persisted-env reader for the tuning-vars row — this is the * actual source of truth, not `env`/`process.env` (which is only the * doctor process's own inherited environment, not Ollama's). Tests * substitute a stub; `null` means "cannot determine" (non-Windows, or the * lookup failed) and must be reported honestly, never as "(unset)". * Defaults to the real Windows registry-backed implementation. */ readPersistedEnvVars?: (names: readonly string[]) => Promise | null>; } /** Below this fraction of a loaded model's bytes resident in VRAM, doctor * WARNs — this is the exact 2026-07-13 signature (0.59/4.99 ≈ 0.12). * Exported so `src/doctor/checks/model-fit.ts` (issue #279) can apply the * SAME live-offload floor to a specific config-pinned model instead of * duplicating the constant. */ export declare const CPU_OFFLOAD_RATIO_FLOOR = 0.9; export declare function getGpuChecks(rawOpts?: GpuCheckOpts): Check[];