Compare commits

...

1 Commits

Author SHA1 Message Date
Josh Lehman
52c9e71d53 fix: align memory vector DB typing with node sqlite
Regeneration-Prompt: |
  Mainline check/prep was failing in memory-core because replaceMemoryVectorRow
  accepted a handwritten database shape whose prepare().run signature used
  unknown[] and was not assignable from node:sqlite DatabaseSync. Keep the
  helper behavior the same, preserve the existing call sites and test, and fix
  the type seam by aligning the helper with the real node:sqlite prepare type
  instead of widening individual callers.
2026-04-06 13:32:16 -07:00

View File

@@ -1,8 +1,6 @@
type VectorWriteDb = {
prepare: (sql: string) => {
run: (...params: unknown[]) => void;
};
};
import type { DatabaseSync } from "node:sqlite";
type VectorWriteDb = Pick<DatabaseSync, "prepare">;
const vectorToBlob = (embedding: number[]): Buffer =>
Buffer.from(new Float32Array(embedding).buffer);