import type { SqliteDatabase } from "../repositories/sqlite/sqlite_driver.js";
/**
 * Load sqlite-vec extension lazily. Caches success/failure.
 * Returns true if loaded, false if failed (e.g. wrong platform).
 */
export declare function ensureSqliteVecLoaded(db: SqliteDatabase): boolean;
/**
 * Store or update entity embedding in local vec0 table.
 * Call when entity_snapshots upsert succeeds and row has embedding.
 */
export declare function storeLocalEntityEmbedding(row: {
    entity_id: string;
    embedding?: number[] | null;
    user_id: string;
    entity_type: string;
    merged?: boolean;
}): void;
/**
 * Semantic search over local entity embeddings.
 * Returns entity IDs ordered by similarity.
 */
export declare function searchLocalEntityEmbeddings(options: {
    queryEmbedding: number[];
    userId: string;
    entityType?: string | null;
    includeMerged: boolean;
    /**
     * L2 distance threshold. Results with distance >= threshold are dropped.
     * Practical range ~0.9–1.5. Typical values: 1.0 (strict), 1.02 (moderate), 1.05 (loose).
     * Omit to return all k results regardless of distance.
     */
    distanceThreshold?: number;
    limit: number;
    offset: number;
}): {
    entityIds: string[];
    total: number;
};
//# sourceMappingURL=local_entity_embedding.d.ts.map