import type { Logger } from "@onenomad/przm-cortex-core"; import type { LLMRouter } from "@onenomad/przm-cortex-llm-core"; import type { EngramClient } from "./engram.js"; export interface PgVectorClientOptions { /** * Connection mode. 'external' uses node-postgres against the supplied * connectionString. 'embedded' spins up PGlite in-process at dataDir * — no Docker, no system PG, no port. */ mode: "external" | "embedded"; /** Required when mode='external'. */ connectionString?: string; /** Required when mode='embedded'. Absolute filesystem path. */ dataDir?: string; table: string; embeddingDim: number; embedTask: string; /** * Optional LLM router for embeddings. When supplied, the configured * `embedTask` resolves to a provider's embed() (e.g. Ollama, OpenAI). * When omitted, Cortex's local Xenova embedder takes over — * MiniLM-L6-v2 (384-dim, ~23MB on first run, zero credentials). * Local is the default for the standalone-Cortex story; LLM * routing is opt-in for higher-quality embeddings on cloud deploys * with credentials. */ llmRouter?: LLMRouter; /** * Optional: restore the PGlite data dir from a tarball at init. * Caller already wiped the dataDir; pass-through to PGlite's * loadDataDir. Only honored in `embedded` mode. */ loadFromBlob?: Blob; logger: Logger; } /** * Adapts `@onenomad/przm-cortex-memory-pgvector`'s MemoryBackend to the EngramClient shape * the rest of the server already consumes. The point: callers don't have to * know which backend served the call; switching primary + fallback is a * config + factory change, not a tool-level refactor. * * Embeddings: prefer the LLM router when wired (provider-specific * model, often higher quality). Fall back to Cortex's local Xenova * embedder otherwise — keeps the standalone deploy story intact * (Cortex is fully self-sufficient; no external runtime memory dep). */ export declare function createPgVectorClient(opts: PgVectorClientOptions): Promise; //# sourceMappingURL=pgvector.d.ts.map