/** * @module @nhtio/adk/batteries/vector/surrealdb * * SurrealDB adapter (multi-model). Each collection is a SurrealDB table; records store the * vector as a plain array field and KNN uses `vector::similarity::cosine` / * `vector::distance::euclidean` ordered appropriately. Metadata is a JSON string field filtered * with the neutral filter tree's JS reference evaluator for exact cross-adapter parity. * * Driver: `surrealdb` (pure JS). All queries are parameterized via `$bindings`. */ import { BaseVectorStore } from "../contract"; import type { SearchPlan, UpsertPlan, DeletePlan, CollectionSpec } from "../plan"; import type { VectorMatch, VectorStoreCapabilities, BaseVectorStoreOptions } from "../types"; export interface SurrealDBVectorStoreOptions extends BaseVectorStoreOptions { /** Connection and authentication parameters for the backend. */ connection: { url: string; username?: string; password?: string; namespace?: string; database?: string; }; } export declare class SurrealDBVectorStore extends BaseVectorStore { #private; readonly capabilities: VectorStoreCapabilities; /** Static availability probe: whether this adapter's runtime driver can load in the current environment. */ static isAvailable(): boolean; isAvailable(): boolean; connect(): Promise; close(): Promise; createCollection(spec: CollectionSpec, ifNotExists: boolean): Promise; dropCollection(collection: string, ifExists: boolean): Promise; hasCollection(collection: string): Promise; renameCollection(_from: string, _to: string): Promise; executeUpsert(plan: UpsertPlan): Promise; executeSearch(plan: SearchPlan): Promise; executeDelete(plan: DeletePlan): Promise; }