import type { StorageBackend, VectorEntry, VectorEntryType, VectorSearchResult, BetterSqlite3Database, BetterSqlite3Constructor } from '../../types/index.js';
/**
 * Attempt to dynamically import better-sqlite3.
 * Returns null if the package is not installed.
 */
export declare function tryLoadSqlite(): Promise<BetterSqlite3Constructor | null>;
/**
 * SQLite storage backend using better-sqlite3.
 * WAL mode for concurrent reads. Embeddings stored as BLOB.
 */
export declare class SqliteBackend implements StorageBackend {
    private readonly db;
    constructor(db: BetterSqlite3Database);
    private initSchema;
    insert(entry: VectorEntry): Promise<void>;
    update(id: string, partial: Partial<VectorEntry>): Promise<void>;
    delete(id: string): Promise<void>;
    getById(id: string): Promise<VectorEntry | undefined>;
    getAll(type?: VectorEntryType): Promise<VectorEntry[]>;
    searchSimilar(embedding: number[], topK: number, threshold: number, type?: VectorEntryType): Promise<VectorSearchResult[]>;
    close(): void;
}
/**
 * Create a SQLite backend for a project.
 * Returns null if better-sqlite3 is not available.
 */
export declare function createSqliteBackend(projectId: string): Promise<SqliteBackend | null>;
//# sourceMappingURL=sqlite-adapter.d.ts.map