/**
 * Embedding Provider
 *
 * Provides vector embeddings using either:
 * - Local model (@xenova/transformers - all-MiniLM-L6-v2)
 * - API-based (OpenAI, Grok, etc.)
 *
 * Local embeddings are preferred for privacy and cost savings.
 */
import { EventEmitter } from 'events';
export type EmbeddingProviderType = 'local' | 'openai' | 'grok' | 'mock';
export interface EmbeddingConfig {
    provider: EmbeddingProviderType;
    modelName?: string;
    apiKey?: string;
    apiEndpoint?: string;
    cacheDir?: string;
    batchSize?: number;
}
export interface EmbeddingResult {
    embedding: Float32Array;
    dimensions: number;
    provider: EmbeddingProviderType;
    cached?: boolean;
}
export interface BatchEmbeddingResult {
    embeddings: Float32Array[];
    dimensions: number;
    provider: EmbeddingProviderType;
    totalTokens?: number;
}
export declare class EmbeddingProvider extends EventEmitter {
    private config;
    private pipeline;
    private initialized;
    private initPromise;
    constructor(config?: Partial<EmbeddingConfig>);
    /**
     * Initialize the embedding provider
     */
    initialize(): Promise<void>;
    private doInitialize;
    private initializeLocalModel;
    /**
     * Generate embedding for a single text
     */
    embed(text: string): Promise<EmbeddingResult>;
    /**
     * Generate embeddings for multiple texts
     */
    embedBatch(texts: string[]): Promise<BatchEmbeddingResult>;
    /**
     * Get embedding dimensions for current model
     */
    getDimensions(): number;
    /**
     * Check if provider is ready
     */
    isReady(): boolean;
    /**
     * Get current provider type
     */
    getProviderType(): EmbeddingProviderType;
    /**
     * Calculate cosine similarity between two embeddings
     */
    cosineSimilarity(a: Float32Array, b: Float32Array): number;
    private embedLocal;
    private embedBatchLocal;
    private embedOpenAI;
    private embedBatchOpenAI;
    private embedGrok;
    private embedBatchGrok;
    private embedMock;
    private embedBatchMock;
}
export declare function getEmbeddingProvider(config?: Partial<EmbeddingConfig>): EmbeddingProvider;
export declare function initializeEmbeddingProvider(config?: Partial<EmbeddingConfig>): Promise<EmbeddingProvider>;
export declare function resetEmbeddingProvider(): void;
