import type { MemoryClass, MemoryRecord, MemoryReviewState, MemoryScope } from './memory-store.js';
import { MemoryEmbeddingProviderRegistry } from './memory-embeddings.js';
/**
 * Resolves the path to the sqlite-vec native extension.
 *
 * When running inside a Bun bundled executable (import.meta.url path contains
 * "$bunfs"), the npm package's import.meta.resolve() cannot find the extension
 * because the virtual filesystem does not contain node_modules. In that case,
 * the extension must be co-located with the binary under
 * `<execDir>/lib/sqlite-vec-<os>-<arch>/vec0.<suffix>`.
 *
 * In development (bun run / node), the package's own getLoadablePath() is used
 * via the re-exported `load()` function.
 */
export declare function resolveSqliteVecPath(): string;
export declare const MEMORY_VECTOR_DIMS = 384;
export { embedMemoryText } from './memory-embeddings.js';
export interface MemoryVectorSearchFilter {
    scope?: MemoryScope | undefined;
    cls?: MemoryClass | undefined;
    since?: number | undefined;
    reviewState?: MemoryReviewState | MemoryReviewState[] | undefined;
    minConfidence?: number | undefined;
    staleOnly?: boolean | undefined;
    limit?: number | undefined;
}
export interface MemoryVectorCandidate {
    id: string;
    distance: number;
    similarity: number;
}
export interface MemoryVectorStats {
    backend: 'sqlite-vec';
    enabled: boolean;
    available: boolean;
    path: string;
    dimensions: number;
    indexedRecords: number;
    embeddingProviderId: string;
    embeddingProviderLabel: string;
    error?: string | undefined;
}
export declare function resolveMemoryVectorDbPath(dbPath?: string): string;
export declare function memoryVectorSourceHash(record: MemoryRecord): string;
export declare function buildMemoryEmbeddingText(record: MemoryRecord): string;
export declare class SqliteVecMemoryIndex {
    private readonly dbPath;
    private readonly dimensions;
    private readonly embeddingRegistry;
    private db;
    private enabled;
    private available;
    private error;
    private static readonly rebuildBatchSize;
    constructor(dbPath: string, dimensions: number | undefined, embeddingRegistry: MemoryEmbeddingProviderRegistry);
    init(): void;
    stats(): MemoryVectorStats;
    upsert(record: MemoryRecord): void;
    upsertAsync(record: MemoryRecord): Promise<void>;
    delete(recordId: string): void;
    sync(records: readonly MemoryRecord[]): void;
    syncAsync(records: readonly MemoryRecord[], options?: {
        force?: boolean;
    }): Promise<void>;
    search(query: string, filter?: MemoryVectorSearchFilter): MemoryVectorCandidate[];
    close(): void;
    private createSchema;
    private ensureRowId;
    private countIndexedRecords;
    private embedText;
    private markEmbeddingUnavailable;
    private writePendingRebuildBatch;
    private writeRecord;
}
//# sourceMappingURL=memory-vector-store.d.ts.map