/**
 * Embedding Service
 *
 * Manages document embeddings for semantic search.
 * Handles indexing, removal, and similarity search using a configurable provider.
 */
import type { StorageBackend } from '@stoneforge/storage';
import type { EmbeddingServiceConfig, SemanticSearchResult } from './types.js';
/**
 * Service for managing document embeddings and performing semantic search.
 */
export declare class EmbeddingService {
    private provider;
    private backend;
    private batchSize;
    constructor(backend: StorageBackend, config: EmbeddingServiceConfig);
    /**
     * Check if the embedding service is available.
     */
    isAvailable(): Promise<boolean>;
    /**
     * Get provider info.
     */
    getProviderInfo(): {
        name: string;
        dimensions: number;
        isLocal: boolean;
    };
    /**
     * Generate and store an embedding for a document.
     *
     * @param docId - Document ID
     * @param content - Document content to embed (typically title + content)
     */
    indexDocument(docId: string, content: string): Promise<void>;
    /**
     * Remove the embedding for a document.
     */
    removeDocument(docId: string): void;
    /**
     * Perform semantic search using cosine similarity.
     * Uses brute-force comparison (no ANN index yet).
     *
     * @param query - Search query text
     * @param limit - Maximum results to return
     * @returns Ranked results by similarity (descending)
     */
    searchSemantic(query: string, limit?: number): Promise<SemanticSearchResult[]>;
    /**
     * Hybrid search combining FTS5 results with semantic results via RRF.
     *
     * @param query - Search query text
     * @param ftsDocIds - Document IDs from FTS5 search (in rank order)
     * @param limit - Maximum results to return
     * @param k - RRF smoothing constant (default: 60)
     * @returns Fused document IDs ranked by combined score
     */
    searchHybrid(query: string, ftsDocIds: string[], limit?: number, k?: number): Promise<{
        documentId: string;
        score: number;
    }[]>;
    /**
     * Re-embed all documents. Used for bulk reindexing.
     *
     * @param documents - Array of { id, content } to embed
     * @param onProgress - Optional callback for progress reporting
     */
    reindexAll(documents: Array<{
        id: string;
        content: string;
    }>, onProgress?: (indexed: number, total: number) => void): Promise<{
        indexed: number;
        errors: number;
    }>;
}
//# sourceMappingURL=service.d.ts.map