import type { Embedder } from '../embedders/types.js';
import type { RagBackend } from '../types.js';
export interface LibsqlStoreOpts {
    dbUrl: string;
    embedder: Embedder;
    /**
     * Optional per-file source-of-truth dir (T-STORE-PERFILE-SOURCE). When set, `storeLesson`
     * writes `<sourceDir>/<id>.md` (the git-versionable truth) before upserting the DB index, and
     * `rebuildLibsqlIndex` can reconstruct the index from it. When unset, the backend is DB-only
     * (unchanged behavior — e.g. `:memory:` + the `libsql-qwen3` path).
     */
    sourceDir?: string;
}
export declare function libsqlStoreBackend(opts: LibsqlStoreOpts): RagBackend;
/**
 * Rebuild the libSQL index from the per-file source-of-truth (the files are authoritative; the
 * DB is disposable). Drops + recreates the index tables first so records deleted from the source
 * don't linger, then re-indexes every record. Idempotent — a crash mid-rebuild is recovered by
 * re-running it (the source is never touched). Cold-path maintenance op (e.g. after a git
 * pull/merge of the source); for file-backed `dbUrl`s, not `:memory:`.
 */
export declare function rebuildLibsqlIndex(opts: {
    dbUrl: string;
    embedder: Embedder;
    sourceDir: string;
}): Promise<number>;
export declare function ftsEscape(query: string): string;
//# sourceMappingURL=libsql_store.d.ts.map