import type { EmbedProvider } from '../providers/embed-provider.js';
export interface SimilarResult {
    url: string;
    score: number;
}
/**
 * Index shim exposed by `getIndex()` for callers that still need
 * lightweight size/membership checks. Kept narrow so future stores can
 * implement it without dragging in extra surface area.
 */
export interface IndexView {
    size(): number;
    has(url: string): boolean;
}
/**
 * Embedding service backed by the native fastembed (ONNX) provider and
 * the sqlite-vec VectorStore.
 *
 * Phase 5 replaced the in-memory VectorIndex with the sqlite-vec backed
 * store accessed via getVectorStore(). The public surface (init /
 * embedAndStore / embedAsync / findSimilar / getIndex / isAvailable /
 * shutdown) is unchanged so callers in server.ts, tools/fetch.ts,
 * research/pipeline.ts, search/find-similar.ts, and the legacy SearXNG
 * orchestrator continue to work without modification.
 */
export declare class EmbeddingService {
    private provider;
    private store;
    private knownUrls;
    private available;
    private providerVerified;
    constructor(provider?: EmbedProvider);
    init(): Promise<void>;
    isAvailable(): boolean;
    setAvailable(value: boolean): void;
    /** Backwards-compat alias preserved for callers that gated on subprocess readiness. */
    isSubprocessReady(): boolean;
    /**
     * Lightweight index view. Returns `size` from the backing VectorStore and
     * `has` from a local URL-cache populated by embedAndStore. Callers that
     * need richer access should consume the VectorStore directly via
     * `getVectorStore()`.
     */
    getIndex(): IndexView;
    /**
     * Cached size from the store, refreshed after upserts. Reads from a
     * VectorStore would be async; getIndex().size() callers expect a
     * synchronous return so we maintain this counter.
     */
    private cachedSize;
    embedAndStore(url: string, markdown: string): Promise<void>;
    embedAsync(url: string, markdown: string): void;
    findSimilar(queryText: string, topK: number, excludeUrls?: Set<string>): Promise<SimilarResult[]>;
    shutdown(): void;
    private migrateLegacyEmbeddings;
}
export declare function getEmbeddingService(): EmbeddingService;
export declare function resetEmbeddingService(): void;
//# sourceMappingURL=embed.d.ts.map