import type { ShellPathService } from '../runtime/shell-paths.js';
export type ServerType = 'ollama' | 'lm-studio' | 'vllm' | 'llamacpp' | 'localai' | 'tgi' | 'jan' | 'gpt4all' | 'koboldcpp' | 'aphrodite' | 'unknown';
export interface DiscoveredServer {
    name: string;
    host: string;
    port: number;
    baseURL: string;
    models: string[];
    serverType: ServerType;
    modelContextWindows?: Record<string, number>;
    modelOutputLimits?: Record<string, number>;
}
export interface ScanResult {
    servers: DiscoveredServer[];
    scannedHosts: number;
    scannedPorts: number;
    durationMs: number;
}
type DiscoveryRoots = Pick<ShellPathService, 'homeDirectory'> & {
    readonly surfaceRoot: string;
};
/** Load previously discovered providers from disk. Returns empty array if file doesn't exist. */
export declare function loadPersistedProviders(roots: DiscoveryRoots): DiscoveredServer[];
/** Save discovered providers to disk. Merges with existing entries keyed by host:port. */
export declare function persistProviders(roots: DiscoveryRoots, servers: DiscoveredServer[]): void;
/** Remove specific servers from the persisted file (by host:port). */
export declare function removePersistedProviders(roots: DiscoveryRoots, toRemove: Array<{
    host: string;
    port: number;
}>): void;
/**
 * Queries a discovered server for actual context window sizes of its models.
 * Returns a map of modelId -> contextWindow. Missing entries mean the server
 * didn't report a context length for that model.
 */
export declare function fetchModelContextWindows(host: string, port: number, serverType: ServerType, models: string[]): Promise<Record<string, number>>;
/**
 * Scans a list of hosts across all known ports.
 */
export declare function scanHosts(hosts: string[], onProgress?: (completed: number, total: number) => void): Promise<DiscoveredServer[]>;
/**
 * Scans only localhost (fast, ~100ms).
 */
export declare function scanLocalhost(): Promise<ScanResult>;
/**
 * Full scan: localhost first, then all /24 subnet IPs.
 * Returns merged, deduplicated results.
 */
export declare function scan(onProgress?: (completed: number, total: number) => void): Promise<ScanResult>;
export {};
//# sourceMappingURL=scanner.d.ts.map