/**
 * KiroGraph PGLite Index
 *
 * Hybrid search (full-text + exact vector) backed by @electric-sql/pglite + pgvector.
 * The database is persisted to .kirograph/pglite/ (PGLite's WAL-based file storage).
 *
 * Opt-in: set config.semanticEngine = 'pglite'
 * Required optional dependency (not installed by default):
 *   npm install @electric-sql/pglite
 *
 * Key advantages over other engines:
 *   - Pure WASM, no native compilation required (unlike sqlite-vec)
 *   - Exact nearest-neighbour search (deterministic, unlike ANN approximation)
 *   - Native SQL upsert via ON CONFLICT — no remove+insert dance (unlike Orama)
 *   - HNSW index for fast approximate search when the table grows large
 *   - Full-text search via PostgreSQL tsvector + ts_rank combined in one query
 */
import type { Node } from '../types';
export declare class PGliteIndex {
    private readonly kirographDir;
    private readonly dim;
    private db;
    private _available;
    private dbPath;
    constructor(kirographDir: string, dim?: number);
    isAvailable(): boolean;
    /**
     * Load @electric-sql/pglite, open the file-persisted database, enable pgvector,
     * and apply the schema (idempotent — safe to call on every startup).
     * Silent no-op when the optional dep is missing.
     */
    initialize(): Promise<void>;
    /**
     * Insert or update a node's record using PostgreSQL's native ON CONFLICT upsert.
     */
    upsert(node: Node, embedding: Float32Array): Promise<void>;
    /**
     * Remove a node's record from the index.
     */
    delete(nodeId: string): Promise<void>;
    /**
     * Hybrid search: combines pgvector cosine distance with PostgreSQL full-text
     * ranking in a single SQL query. Returns node IDs ordered by combined score.
     *
     * Score = VECTOR_WEIGHT × (1 - cosine_distance) + FTS_WEIGHT × ts_rank
     */
    search(queryText: string, queryVec: Float32Array, topN?: number): Promise<string[]>;
    /** Return all node IDs currently stored in the index. */
    getEmbeddedNodeIds(): Promise<string[]>;
    /** Number of documents currently in the index. */
    count(): Promise<number>;
}
//# sourceMappingURL=pglite-index.d.ts.map