@xdarkicex/openclaw-memory-libravdb 1.4.74 → 1.4.75

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/cli.js CHANGED
@@ -35,7 +35,8 @@ export function registerMemoryCli(api, runtime, cfg, logger = console) {
35
35
  .option("--agent <id>", "Agent id")
36
36
  .option("--json", "Print JSON")
37
37
  .option("--deep", "Probe authored collection search health")
38
- .option("--index", "Refresh delegated index state before printing status")
38
+ .option("--index", "Rebuild the index before printing status")
39
+ .option("--force", "Required with --index: confirm index rebuild")
39
40
  .option("--fix", "Accepted for OpenClaw memory CLI compatibility")
40
41
  .option("--verbose", "Verbose logging")
41
42
  .action(async (opts) => {
@@ -143,6 +144,17 @@ async function runCliCommand(runtime, logger, action) {
143
144
  }
144
145
  }
145
146
  async function runStatus(runtime, cfg, logger, opts = {}) {
147
+ if (opts.index) {
148
+ if (!opts.force) {
149
+ logger.error("LibraVDB status --index performs an index rebuild. Re-run with --force to continue.");
150
+ process.exitCode = 1;
151
+ return;
152
+ }
153
+ const ok = await runIndex(runtime, cfg, { ...opts, verbose: false }, logger, { quiet: true });
154
+ if (!ok) {
155
+ return;
156
+ }
157
+ }
146
158
  try {
147
159
  const rpc = await runtime.getRpc();
148
160
  const status = await rpc.call("status", {});
@@ -260,7 +272,7 @@ async function runIndex(runtime, cfg, opts, logger, params = {}) {
260
272
  if (!opts?.force) {
261
273
  logger.error("LibraVDB index rebuild requires --force. This re-embeds all stored documents with the current model and may be slow.");
262
274
  process.exitCode = 1;
263
- return;
275
+ return false;
264
276
  }
265
277
  const namespace = resolveCliNamespace(opts);
266
278
  const collections = opts?.collections
@@ -288,11 +300,14 @@ async function runIndex(runtime, cfg, opts, logger, params = {}) {
288
300
  if ((result.errors?.length ?? 0) > 0 && (result.recordsReindexed ?? 0) === 0) {
289
301
  logger.error("LibraVDB index rebuild completed with errors and no records reindexed.");
290
302
  process.exitCode = 1;
303
+ return false;
291
304
  }
305
+ return true;
292
306
  }
293
307
  catch (error) {
294
308
  logger.error(`LibraVDB index rebuild failed: ${formatError(error)}`);
295
309
  process.exitCode = 1;
310
+ return false;
296
311
  }
297
312
  }
298
313
  function resolveIndexRebuildTimeoutMs(cfg) {
package/dist/index.js CHANGED
@@ -33225,7 +33225,7 @@ function registerMemoryCli(api, runtime, cfg, logger = console) {
33225
33225
  ensureCommand(root, "dream-promote").description("Promote vetted dream diary entries into the dedicated dream collection");
33226
33226
  return;
33227
33227
  }
33228
- ensureCommand(root, "status").description("Show sidecar health, record counts, and active thresholds").option("--agent <id>", "Agent id").option("--json", "Print JSON").option("--deep", "Probe authored collection search health").option("--index", "Refresh delegated index state before printing status").option("--fix", "Accepted for OpenClaw memory CLI compatibility").option("--verbose", "Verbose logging").action(async (opts) => {
33228
+ ensureCommand(root, "status").description("Show sidecar health, record counts, and active thresholds").option("--agent <id>", "Agent id").option("--json", "Print JSON").option("--deep", "Probe authored collection search health").option("--index", "Rebuild the index before printing status").option("--force", "Required with --index: confirm index rebuild").option("--fix", "Accepted for OpenClaw memory CLI compatibility").option("--verbose", "Verbose logging").action(async (opts) => {
33229
33229
  await runCliCommand(runtime, logger, async () => {
33230
33230
  await runStatus(runtime, cfg, logger, normalizeOptionBag(opts));
33231
33231
  });
@@ -33315,6 +33315,17 @@ async function runCliCommand(runtime, logger, action) {
33315
33315
  }
33316
33316
  }
33317
33317
  async function runStatus(runtime, cfg, logger, opts = {}) {
33318
+ if (opts.index) {
33319
+ if (!opts.force) {
33320
+ logger.error("LibraVDB status --index performs an index rebuild. Re-run with --force to continue.");
33321
+ process.exitCode = 1;
33322
+ return;
33323
+ }
33324
+ const ok = await runIndex(runtime, cfg, { ...opts, verbose: false }, logger, { quiet: true });
33325
+ if (!ok) {
33326
+ return;
33327
+ }
33328
+ }
33318
33329
  try {
33319
33330
  const rpc = await runtime.getRpc();
33320
33331
  const status = await rpc.call("status", {});
@@ -33430,7 +33441,7 @@ async function runIndex(runtime, cfg, opts, logger, params = {}) {
33430
33441
  if (!opts?.force) {
33431
33442
  logger.error("LibraVDB index rebuild requires --force. This re-embeds all stored documents with the current model and may be slow.");
33432
33443
  process.exitCode = 1;
33433
- return;
33444
+ return false;
33434
33445
  }
33435
33446
  const namespace = resolveCliNamespace(opts);
33436
33447
  const collections = opts?.collections?.split(",").map((c) => c.trim()).filter((c) => c.length > 0);
@@ -33455,10 +33466,13 @@ async function runIndex(runtime, cfg, opts, logger, params = {}) {
33455
33466
  if ((result.errors?.length ?? 0) > 0 && (result.recordsReindexed ?? 0) === 0) {
33456
33467
  logger.error("LibraVDB index rebuild completed with errors and no records reindexed.");
33457
33468
  process.exitCode = 1;
33469
+ return false;
33458
33470
  }
33471
+ return true;
33459
33472
  } catch (error) {
33460
33473
  logger.error(`LibraVDB index rebuild failed: ${formatError(error)}`);
33461
33474
  process.exitCode = 1;
33475
+ return false;
33462
33476
  }
33463
33477
  }
33464
33478
  function resolveIndexRebuildTimeoutMs(cfg) {
@@ -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.74",
5
+ "version": "1.4.75",
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.74",
3
+ "version": "1.4.75",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",