import { NodeDefinition } from '../schema/types'; export interface VectorResult { cypher: string; params: Record; } /** * Compiles vector-index search input into Cypher CALL clauses using * `db.index.vector.queryNodes` and (optionally) `genai.vector.encode`. * * Emits only the CALL prelude — the caller (Model) composes any * subsequent WHERE / RETURN / ORDER BY around it. * * Two entry points: * - `compileByVector` — user supplies a pre-computed embedding. * - `compileByPhrase` — user supplies a text phrase; the server-side GenAI * plugin encodes it using the `provider` configured on the index. */ export declare class VectorCompiler { constructor(); /** * Build the CALL clause for a vector similarity search against a pre-computed * embedding. Returns a Cypher fragment that yields `n` and `score`. */ compileByVector(input: { indexName: string; vector: number[]; k: number; nodeDef: NodeDefinition; paramCounter?: { count: number; }; }): VectorResult; /** * Build the two-step CALL for a vector similarity search keyed on a text * phrase. Requires the matching index to declare a `provider`. */ compileByPhrase(input: { indexName: string; phrase: string; k: number; providerConfig?: Record; nodeDef: NodeDefinition; paramCounter?: { count: number; }; }): VectorResult; /** * Resolve and validate that `indexName` is declared on `nodeDef`. Throws a * descriptive `OGMError` listing the available indexes on miss. The index * name is also run through `assertSafeIdentifier` as defense in depth — * even though it travels through a parameter, validating it here guards * against accidental injection if the shape ever changes. */ private assertIndexExists; } //# sourceMappingURL=vector.compiler.d.ts.map