/**
 * Model Hub Integration
 *
 * Auto-download and manage LLM models from HuggingFace Hub.
 * Supports GGUF format for local inference with node-llama-cpp.
 *
 * Features:
 * - Automatic model discovery and download
 * - VRAM-based recommendations
 * - Quantization selection
 * - Progress tracking
 * - Model versioning
 */
import { EventEmitter } from "events";
/**
 * Quantization types with their properties
 */
export interface QuantizationType {
    name: string;
    bitsPerWeight: number;
    qualityScore: number;
    description: string;
}
/**
 * Available quantization types
 */
export declare const QUANTIZATION_TYPES: Record<string, QuantizationType>;
/**
 * Model size categories
 */
export type ModelSize = "1b" | "3b" | "7b" | "8b" | "13b" | "14b" | "30b" | "34b" | "70b";
/**
 * Model information
 */
export interface ModelInfo {
    id: string;
    name: string;
    size: ModelSize;
    parameterCount: number;
    description: string;
    huggingFaceRepo: string;
    defaultQuantization: string;
    supportedQuantizations: string[];
    contextLength: number;
    license: string;
    tags: string[];
}
/**
 * Recommended models for different use cases
 */
export declare const RECOMMENDED_MODELS: Record<string, ModelInfo>;
/**
 * Download progress information
 */
export interface DownloadProgress {
    modelId: string;
    fileName: string;
    downloadedBytes: number;
    totalBytes: number;
    percentage: number;
    speed: number;
    eta: number;
}
/**
 * Downloaded model information
 */
export interface DownloadedModel {
    id: string;
    path: string;
    quantization: string;
    sizeBytes: number;
    downloadedAt: Date;
}
/**
 * Model Hub configuration
 */
export interface ModelHubConfig {
    /** Models storage directory */
    modelsDir: string;
    /** HuggingFace API token (optional, for gated models) */
    hfToken?: string;
    /** Download timeout in ms */
    downloadTimeout: number;
    /** Chunk size for streaming download */
    chunkSize: number;
    /** Auto-select quantization based on VRAM */
    autoSelectQuantization: boolean;
}
/**
 * Default configuration
 */
export declare const DEFAULT_MODEL_HUB_CONFIG: ModelHubConfig;
/**
 * Model Hub Manager
 *
 * Manages model discovery, download, and storage for local inference.
 */
export declare class ModelHub extends EventEmitter {
    private config;
    private downloadedModels;
    constructor(config?: Partial<ModelHubConfig>);
    /**
     * Scan for locally downloaded models
     */
    private scanLocalModels;
    /**
     * Extract model ID from filename
     */
    private extractModelIdFromFilename;
    /**
     * Extract quantization from filename
     */
    private extractQuantizationFromFilename;
    /**
     * Get recommended model based on available VRAM
     */
    getRecommendedModel(useCase?: "code" | "general" | "fast"): Promise<ModelInfo | null>;
    /**
     * Estimate VRAM usage for a model
     */
    estimateVRAM(model: ModelInfo, quantization: string): number;
    /**
     * Select best quantization for available VRAM
     */
    selectQuantization(model: ModelInfo, targetVRAM?: number): Promise<string>;
    /**
     * Download a model from HuggingFace
     */
    download(modelId: string, quantization?: string): Promise<DownloadedModel>;
    /**
     * Resolve the actual download URL from HuggingFace
     */
    private resolveDownloadUrl;
    /**
     * Download file with progress tracking
     */
    private downloadFile;
    /**
     * Delete a downloaded model
     */
    delete(fileName: string): boolean;
    /**
     * List available models from registry
     */
    listModels(): ModelInfo[];
    /**
     * List downloaded models
     */
    listDownloaded(): DownloadedModel[];
    /**
     * Get model info by ID
     */
    getModelInfo(modelId: string): ModelInfo | null;
    /**
     * Get downloaded model by filename or ID
     */
    getDownloaded(fileNameOrId: string): DownloadedModel | null;
    /**
     * Format model list for display
     */
    formatModelList(): string;
    /**
     * Format VRAM recommendations
     */
    formatRecommendations(): Promise<string>;
    /**
     * Get configuration
     */
    getConfig(): ModelHubConfig;
    /**
     * Update configuration
     */
    updateConfig(config: Partial<ModelHubConfig>): void;
    /**
     * Dispose hub
     */
    dispose(): void;
}
/**
 * Get or create model hub instance
 */
export declare function getModelHub(config?: Partial<ModelHubConfig>): ModelHub;
/**
 * Reset model hub singleton
 */
export declare function resetModelHub(): void;
declare const _default: {
    ModelHub: typeof ModelHub;
    getModelHub: typeof getModelHub;
    resetModelHub: typeof resetModelHub;
    RECOMMENDED_MODELS: Record<string, ModelInfo>;
    QUANTIZATION_TYPES: Record<string, QuantizationType>;
    DEFAULT_MODEL_HUB_CONFIG: ModelHubConfig;
};
export default _default;
