export type BackendName = 'off' | 'local' | 'openai';
export interface EmbeddingBackend {
    readonly name: BackendName;
    readonly ready: boolean;
    readonly dims: number;
    readonly modelId: string;
    /** Generate embeddings for a batch of texts. Returns same-length array. */
    embed(texts: string[]): Promise<Float32Array[]>;
    /** Describe current state for the status endpoint. */
    describe(): BackendStatus;
}
export interface BackendStatus {
    backend: BackendName;
    ready: boolean;
    dims: number;
    modelId: string;
    lastError: string | null;
    /** Local-only: model files present on disk. ready may still be false if
     *  the in-process pipeline hasn't loaded them yet (post-restart warmup). */
    downloaded?: boolean;
    /** Backend-specific extra info (model file size, baseUrl, etc.) */
    detail: Record<string, unknown>;
}
export declare function getActiveBackend(): EmbeddingBackend;
/** Reset all backend singletons. Used by tests + when env changes via /api/env. */
export declare function _resetVectorBackendsForTests(): void;
export declare function getHybridWeight(): number;
export declare function getBatchSize(): number;
/** Triggers local-backend download. No-op for off / openai. */
export declare function triggerLocalDownload(): Promise<{
    ok: boolean;
    error?: string;
}>;
/** Calls test() for openai; ensureReady() for local. */
export declare function testActiveBackend(): Promise<{
    ok: boolean;
    dims?: number;
    latencyMs?: number;
    error?: string;
}>;
/** Float32Array <-> Buffer round-trip helpers for SQLite BLOB columns. */
export declare function float32ToBuffer(arr: Float32Array): Buffer;
export declare function bufferToFloat32(buf: Buffer): Float32Array;
/** Cosine similarity for two normalized (unit-length) Float32Arrays.
 *  All our backends normalize by default; this is just a dot product. */
export declare function cosineSim(a: Float32Array, b: Float32Array): number;
//# sourceMappingURL=memory-vector.d.ts.map