@xdarkicex/openclaw-memory-libravdb 1.4.48 → 1.4.50

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) {
@@ -38292,6 +38296,9 @@ var IngestQueue = class {
38292
38296
  }
38293
38297
  };
38294
38298
  function splitIntoChunks(text, maxTokens) {
38299
+ if (!(maxTokens > 0)) {
38300
+ return [{ text, ordinal: 0 }];
38301
+ }
38295
38302
  const maxChars = maxTokens * 4;
38296
38303
  if (text.length <= maxChars) {
38297
38304
  return [{ text, ordinal: 0 }];
@@ -39427,6 +39434,7 @@ var SidecarSupervisor = class {
39427
39434
  async start() {
39428
39435
  const endpoint = await this.runtime.resolveEndpoint(this.cfg);
39429
39436
  const socket = await this.connectEndpointWithRetry(endpoint);
39437
+ this.retries = 0;
39430
39438
  this.reconnectScheduled = false;
39431
39439
  if (this.socket instanceof SupervisorSocket) {
39432
39440
  this.socket.bind(socket);
@@ -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) {
@@ -56,6 +60,11 @@ export class IngestQueue {
56
60
  }
57
61
  function splitIntoChunks(text, maxTokens) {
58
62
  // Approximate: 4 chars per token for typical English text
63
+ // Guard: zero/negative budget would make maxChars <= 0, causing an infinite
64
+ // loop because the offset never advances past an empty slice.
65
+ if (!(maxTokens > 0)) {
66
+ return [{ text, ordinal: 0 }];
67
+ }
59
68
  const maxChars = maxTokens * 4;
60
69
  if (text.length <= maxChars) {
61
70
  return [{ text, ordinal: 0 }];
package/dist/sidecar.js CHANGED
@@ -207,6 +207,7 @@ class SidecarSupervisor {
207
207
  async start() {
208
208
  const endpoint = await this.runtime.resolveEndpoint(this.cfg);
209
209
  const socket = await this.connectEndpointWithRetry(endpoint);
210
+ this.retries = 0;
210
211
  this.reconnectScheduled = false;
211
212
  if (this.socket instanceof SupervisorSocket) {
212
213
  this.socket.bind(socket);
@@ -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.48",
5
+ "version": "1.4.50",
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.48",
3
+ "version": "1.4.50",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",