/**
 * Ollama Embedding Provider
 *
 * Uses Ollama's /api/embeddings endpoint for high-quality
 * neural embeddings. 100% local, no external API needed.
 *
 * Recommended models:
 * - nomic-embed-text (768 dim, best quality)
 * - mxbai-embed-large (1024 dim, high quality)
 * - all-minilm (384 dim, fast)
 *
 * Benefits over TF-IDF:
 * - Semantic understanding (synonyms, concepts)
 * - Better code similarity matching
 * - Cross-language understanding
 */
import { EventEmitter } from "events";
import type { CodeChunk } from "./types.js";
/**
 * Ollama embedding configuration
 */
export interface OllamaEmbeddingConfig {
    /** Ollama server URL */
    baseUrl: string;
    /** Embedding model to use */
    model: string;
    /** Request timeout in ms */
    timeout: number;
    /** Batch size for embedding multiple texts */
    batchSize: number;
    /** Retry attempts on failure */
    retryAttempts: number;
    /** Retry delay in ms */
    retryDelay: number;
    /** Keep model loaded in memory */
    keepAlive: string;
}
/**
 * Default configuration
 */
export declare const DEFAULT_OLLAMA_EMBEDDING_CONFIG: OllamaEmbeddingConfig;
/**
 * Model information
 */
export interface EmbeddingModelInfo {
    name: string;
    dimensions: number;
    description: string;
    sizeGB: number;
}
/**
 * Known embedding models with their dimensions
 */
export declare const EMBEDDING_MODELS: Record<string, EmbeddingModelInfo>;
/**
 * Ollama Embedding Provider
 *
 * Provides high-quality neural embeddings via Ollama.
 * Falls back gracefully if Ollama is unavailable.
 */
export declare class OllamaEmbeddingProvider extends EventEmitter {
    private config;
    private dimensions;
    private isAvailable;
    private modelLoaded;
    constructor(config?: Partial<OllamaEmbeddingConfig>);
    /**
     * Initialize provider and check Ollama availability
     */
    initialize(): Promise<boolean>;
    /**
     * Pull embedding model from Ollama
     */
    private pullModel;
    /**
     * Generate embedding for text
     */
    embed(text: string): Promise<number[]>;
    /**
     * Generate embeddings for multiple texts (batched)
     */
    embedBatch(texts: string[]): Promise<number[][]>;
    /**
     * Embed a code chunk with metadata enhancement
     */
    embedChunk(chunk: CodeChunk): Promise<number[]>;
    /**
     * Enhance chunk text with metadata
     */
    private enhanceChunkText;
    /**
     * Calculate similarity between two embeddings (cosine similarity)
     */
    similarity(a: number[], b: number[]): number;
    /**
     * Get embedding dimensions
     */
    getDimensions(): number;
    /**
     * Check if provider is available
     */
    isReady(): boolean;
    /**
     * Get model information
     */
    getModelInfo(): EmbeddingModelInfo | null;
    /**
     * List available embedding models
     */
    static getAvailableModels(): EmbeddingModelInfo[];
    /**
     * Fetch with timeout
     */
    private fetchWithTimeout;
    /**
     * Delay helper
     */
    private delay;
    /**
     * Update configuration
     */
    updateConfig(config: Partial<OllamaEmbeddingConfig>): void;
    /**
     * Get configuration
     */
    getConfig(): OllamaEmbeddingConfig;
    /**
     * Format status for display
     */
    formatStatus(): string;
    /**
     * Dispose provider
     */
    dispose(): void;
}
/**
 * Get or create Ollama embedding provider
 */
export declare function getOllamaEmbeddings(config?: Partial<OllamaEmbeddingConfig>): OllamaEmbeddingProvider;
/**
 * Initialize Ollama embeddings (async)
 */
export declare function initializeOllamaEmbeddings(config?: Partial<OllamaEmbeddingConfig>): Promise<OllamaEmbeddingProvider>;
/**
 * Reset Ollama embedding singleton
 */
export declare function resetOllamaEmbeddings(): void;
declare const _default: {
    OllamaEmbeddingProvider: typeof OllamaEmbeddingProvider;
    getOllamaEmbeddings: typeof getOllamaEmbeddings;
    initializeOllamaEmbeddings: typeof initializeOllamaEmbeddings;
    resetOllamaEmbeddings: typeof resetOllamaEmbeddings;
    EMBEDDING_MODELS: Record<string, EmbeddingModelInfo>;
    DEFAULT_OLLAMA_EMBEDDING_CONFIG: OllamaEmbeddingConfig;
};
export default _default;
