@xdarkicex/openclaw-memory-libravdb 1.4.49 → 1.4.51

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.
package/dist/index.js CHANGED
@@ -38242,6 +38242,10 @@ var IngestQueue = class {
38242
38242
  this.rpcCall = rpcCall;
38243
38243
  this.logger = logger;
38244
38244
  this.options = { ...DEFAULT_OPTIONS, ...options };
38245
+ if (!(this.options.chunkTokens > 0)) {
38246
+ this.logger.warn?.(`[libravdb] chunkTokens ${this.options.chunkTokens} is invalid; using default ${DEFAULT_OPTIONS.chunkTokens}`);
38247
+ this.options.chunkTokens = DEFAULT_OPTIONS.chunkTokens;
38248
+ }
38245
38249
  }
38246
38250
  async enqueueIngest(sourceDoc, text, baseParams) {
38247
38251
  if (this.options.chunkTokens === Infinity) {
@@ -38900,6 +38904,12 @@ function normalizeSearchTextResponse(bytes) {
38900
38904
  if (!item.metadata || typeof item.metadata !== "object" || Array.isArray(item.metadata)) {
38901
38905
  item.metadata = {};
38902
38906
  }
38907
+ if (typeof item.text !== "string") {
38908
+ item.text = "";
38909
+ }
38910
+ if (typeof item.score !== "number" || !Number.isFinite(item.score)) {
38911
+ item.score = 0;
38912
+ }
38903
38913
  }
38904
38914
  return response;
38905
38915
  }
@@ -14,6 +14,10 @@ export class IngestQueue {
14
14
  this.rpcCall = rpcCall;
15
15
  this.logger = logger;
16
16
  this.options = { ...DEFAULT_OPTIONS, ...options };
17
+ if (!(this.options.chunkTokens > 0)) {
18
+ this.logger.warn?.(`[libravdb] chunkTokens ${this.options.chunkTokens} is invalid; using default ${DEFAULT_OPTIONS.chunkTokens}`);
19
+ this.options.chunkTokens = DEFAULT_OPTIONS.chunkTokens;
20
+ }
17
21
  }
18
22
  async enqueueIngest(sourceDoc, text, baseParams) {
19
23
  if (this.options.chunkTokens === Infinity) {
@@ -20,6 +20,12 @@ function normalizeSearchTextResponse(bytes) {
20
20
  if (!item.metadata || typeof item.metadata !== "object" || Array.isArray(item.metadata)) {
21
21
  item.metadata = {};
22
22
  }
23
+ if (typeof item.text !== "string") {
24
+ item.text = "";
25
+ }
26
+ if (typeof item.score !== "number" || !Number.isFinite(item.score)) {
27
+ item.score = 0;
28
+ }
23
29
  }
24
30
  return response;
25
31
  }
@@ -2,7 +2,7 @@
2
2
  "id": "libravdb-memory",
3
3
  "name": "LibraVDB Memory",
4
4
  "description": "Persistent vector memory with three-tier hybrid scoring",
5
- "version": "1.4.49",
5
+ "version": "1.4.51",
6
6
  "kind": [
7
7
  "memory",
8
8
  "context-engine"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xdarkicex/openclaw-memory-libravdb",
3
- "version": "1.4.49",
3
+ "version": "1.4.51",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",