/**
 * Embedding Provider
 *
 * Provides text embeddings for semantic search.
 * Uses a simple TF-IDF based approach for local operation,
 * with optional support for external embedding APIs.
 */
import { EmbeddingProvider } from "./types.js";
/**
 * Simple local embedding provider using TF-IDF
 * This is a fallback when no external embedding service is available.
 */
export declare class LocalEmbeddingProvider implements EmbeddingProvider {
    private vocabulary;
    private idfScores;
    private documentCount;
    private dimension;
    private isInitialized;
    constructor(dimension?: number);
    /**
     * Initialize with a corpus of documents
     */
    initialize(documents: string[]): Promise<void>;
    /**
     * Embed a single text
     */
    embed(text: string): Promise<number[]>;
    /**
     * Embed multiple texts
     */
    embedBatch(texts: string[]): Promise<number[][]>;
    /**
     * Get embedding dimension
     */
    getDimension(): number;
    /**
     * Get model name
     */
    getModelName(): string;
    /**
     * Tokenize text
     */
    private tokenize;
    /**
     * Hash a token to a number
     */
    private hashToken;
    /**
     * L2 normalize a vector
     */
    private normalize;
}
/**
 * Semantic hashing based embedding provider
 * Uses random projections for fast, consistent embeddings
 */
export declare class SemanticHashEmbeddingProvider implements EmbeddingProvider {
    private dimension;
    private projectionMatrix;
    private vocabSize;
    constructor(dimension?: number);
    /**
     * Initialize random projection matrix (deterministic based on seed)
     */
    private initProjectionMatrix;
    /**
     * Embed a single text
     */
    embed(text: string): Promise<number[]>;
    /**
     * Embed multiple texts
     */
    embedBatch(texts: string[]): Promise<number[][]>;
    /**
     * Get embedding dimension
     */
    getDimension(): number;
    /**
     * Get model name
     */
    getModelName(): string;
    /**
     * Tokenize text with n-grams
     */
    private tokenize;
    /**
     * Hash a token to a number
     */
    private hashToken;
    /**
     * L2 normalize a vector
     */
    private normalize;
}
/**
 * Code-aware embedding provider
 * Combines semantic hashing with code-specific features
 */
export declare class CodeEmbeddingProvider implements EmbeddingProvider {
    private baseProvider;
    private dimension;
    constructor(dimension?: number);
    /**
     * Embed code with code-aware features
     */
    embed(text: string): Promise<number[]>;
    /**
     * Embed multiple texts
     */
    embedBatch(texts: string[]): Promise<number[][]>;
    /**
     * Get embedding dimension
     */
    getDimension(): number;
    /**
     * Get model name
     */
    getModelName(): string;
    /**
     * Extract code-specific features
     */
    private extractCodeFeatures;
    /**
     * Pad or truncate vector to target dimension
     */
    private padOrTruncate;
    /**
     * L2 normalize a vector
     */
    private normalize;
}
/**
 * Calculate cosine similarity between two vectors
 */
export declare function cosineSimilarity(a: number[], b: number[]): number;
/**
 * Create the default embedding provider
 */
export declare function createEmbeddingProvider(type?: "local" | "semantic" | "code", dimension?: number): EmbeddingProvider;
/**
 * Cached Embedding Provider Wrapper
 *
 * Wraps any embedding provider with caching support to avoid
 * recomputing embeddings for previously seen content.
 */
export declare class CachedEmbeddingProvider implements EmbeddingProvider {
    private baseProvider;
    private cache;
    constructor(baseProvider: EmbeddingProvider);
    /**
     * Initialize the cache (lazy initialization)
     */
    private getCache;
    /**
     * Embed with caching
     */
    embed(text: string): Promise<number[]>;
    /**
     * Batch embed with caching
     */
    embedBatch(texts: string[]): Promise<number[][]>;
    getDimension(): number;
    getModelName(): string;
}
/**
 * Create a cached embedding provider
 */
export declare function createCachedEmbeddingProvider(type?: "local" | "semantic" | "code", dimension?: number): EmbeddingProvider;
