export interface DetectedModel { provider: "lmstudio" | "ollama" | "claude_code" | "codex" | "github_copilot"; name: string; } /** Per-probe deadlines (ms). Local servers answer in milliseconds when up. */ export declare const PROBE_TIMEOUTS_MS: { readonly lmstudio: 2500; readonly ollama: 2500; readonly claude_code: 9000; readonly codex: 3000; readonly github_copilot: 13000; }; /** Test seam. */ export declare function _clearDetectCaches(): void; export type ProviderId = DetectedModel["provider"]; export interface ProviderScan { /** Models in a stable provider order: lmstudio, ollama, claude_code, codex, github_copilot. */ models: DetectedModel[]; /** Local servers answering right now (a server with zero models still counts). */ running: { lmstudio: boolean; ollama: boolean; }; /** Per-provider probe duration, and which probes hit their deadline. */ probeMs: Record; timedOut: ProviderId[]; /** Wall time of the whole scan. */ ms: number; at: number; } export interface ScanOptions { /** Bypass the per-credential network cache (a user-triggered refresh). */ force?: boolean; /** Override per-probe deadlines (tests). */ timeouts?: Partial>; } /** Scan every provider in parallel. Concurrent callers share one scan. */ export declare function scanProviders(opts?: ScanOptions): Promise; /** The last completed scan, when it is younger than maxAgeMs. */ export declare function cachedScan(maxAgeMs: number): ProviderScan | null; /** Models only (kept for existing callers). Same parallel scan as scanProviders(). */ export declare function detectModels(opts?: ScanOptions): Promise; /** Fingerprint of the local provider state (files + ports). No network, no subprocess. */ export declare function providerFingerprint(): Promise;