memory-lancedb-pro 1.0.29 → 1.0.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/index.ts +11 -3
  2. package/package.json +1 -1
  3. package/src/tools.ts +11 -3
package/index.ts CHANGED
@@ -625,9 +625,17 @@ const memoryLanceDBProPlugin = {
625
625
  const vector = await embedder.embedPassage(text);
626
626
 
627
627
  // Check for duplicates using raw vector similarity (bypasses importance/recency weighting)
628
- const existing = await store.vectorSearch(vector, 1, 0.1, [
629
- defaultScope,
630
- ]);
628
+ // Fail-open by design: dedup should not block auto-capture writes.
629
+ let existing: Awaited<ReturnType<typeof store.vectorSearch>> = [];
630
+ try {
631
+ existing = await store.vectorSearch(vector, 1, 0.1, [
632
+ defaultScope,
633
+ ]);
634
+ } catch (err) {
635
+ api.logger.warn(
636
+ `memory-lancedb-pro: auto-capture duplicate pre-check failed, continue store: ${String(err)}`,
637
+ );
638
+ }
631
639
 
632
640
  if (existing.length > 0 && existing[0].score > 0.95) {
633
641
  continue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "memory-lancedb-pro",
3
- "version": "1.0.29",
3
+ "version": "1.0.30",
4
4
  "description": "OpenClaw enhanced LanceDB memory plugin with hybrid retrieval (Vector + BM25), cross-encoder rerank, multi-scope isolation, long-context chunking, and management CLI",
5
5
  "type": "module",
6
6
  "main": "index.ts",
package/src/tools.ts CHANGED
@@ -263,9 +263,17 @@ export function registerMemoryStoreTool(
263
263
  const vector = await context.embedder.embedPassage(text);
264
264
 
265
265
  // Check for duplicates using raw vector similarity (bypasses importance/recency weighting)
266
- const existing = await context.store.vectorSearch(vector, 1, 0.1, [
267
- targetScope,
268
- ]);
266
+ // Fail-open by design: dedup must never block a legitimate memory write.
267
+ let existing: Awaited<ReturnType<typeof context.store.vectorSearch>> = [];
268
+ try {
269
+ existing = await context.store.vectorSearch(vector, 1, 0.1, [
270
+ targetScope,
271
+ ]);
272
+ } catch (err) {
273
+ console.warn(
274
+ `memory-lancedb-pro: duplicate pre-check failed, continue store: ${String(err)}`,
275
+ );
276
+ }
269
277
 
270
278
  if (existing.length > 0 && existing[0].score > 0.98) {
271
279
  return {