@xdarkicex/openclaw-memory-libravdb 1.4.36 → 1.4.38

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
@@ -282,11 +282,12 @@ async function runSearch(runtime, cfg, queryArg, opts, logger) {
282
282
  agentId: opts?.agent,
283
283
  });
284
284
  const maxResults = normalizeLimit(opts?.maxResults ?? opts?.limit);
285
- const minScore = normalizeNumber(opts?.minScore);
285
+ const explicitMinScore = normalizeNumber(opts?.minScore);
286
+ const minScore = explicitMinScore ?? resolveDefaultSearchMinScore(manager.status(), cfg);
286
287
  const results = (await manager.search({
287
288
  query,
288
289
  ...(maxResults ? { maxResults } : {}),
289
- ...(minScore !== undefined ? { minScore } : {}),
290
+ minScore,
290
291
  }));
291
292
  if (opts?.json) {
292
293
  console.log(JSON.stringify({ results }, null, 2));
@@ -307,6 +308,9 @@ async function runSearch(runtime, cfg, queryArg, opts, logger) {
307
308
  process.exitCode = 1;
308
309
  }
309
310
  }
311
+ function resolveDefaultSearchMinScore(status, cfg) {
312
+ return normalizeNumber(status?.gatingThreshold) ?? normalizeNumber(cfg.ingestionGateThreshold) ?? 0.35;
313
+ }
310
314
  async function runFlush(runtime, opts, logger) {
311
315
  const namespace = resolveCliNamespace(opts);
312
316
  if (!namespace) {
package/dist/index.js CHANGED
@@ -33360,12 +33360,13 @@ async function runSearch(runtime, cfg, queryArg, opts, logger) {
33360
33360
  agentId: opts?.agent
33361
33361
  });
33362
33362
  const maxResults = normalizeLimit(opts?.maxResults ?? opts?.limit);
33363
- const minScore = normalizeNumber2(opts?.minScore);
33363
+ const explicitMinScore = normalizeNumber2(opts?.minScore);
33364
+ const minScore = explicitMinScore ?? resolveDefaultSearchMinScore(manager.status(), cfg);
33364
33365
  const results = await manager.search(
33365
33366
  {
33366
33367
  query,
33367
33368
  ...maxResults ? { maxResults } : {},
33368
- ...minScore !== void 0 ? { minScore } : {}
33369
+ minScore
33369
33370
  }
33370
33371
  );
33371
33372
  if (opts?.json) {
@@ -33386,6 +33387,9 @@ async function runSearch(runtime, cfg, queryArg, opts, logger) {
33386
33387
  process.exitCode = 1;
33387
33388
  }
33388
33389
  }
33390
+ function resolveDefaultSearchMinScore(status, cfg) {
33391
+ return normalizeNumber2(status?.gatingThreshold) ?? normalizeNumber2(cfg.ingestionGateThreshold) ?? 0.35;
33392
+ }
33389
33393
  async function runFlush(runtime, opts, logger) {
33390
33394
  const namespace = resolveCliNamespace(opts);
33391
33395
  if (!namespace) {
@@ -39653,12 +39657,31 @@ function register(api) {
39653
39657
  await dreamPromotion.stop();
39654
39658
  }
39655
39659
  });
39660
+ api.registerRuntimeLifecycle?.({
39661
+ id: "libravdb-shutdown",
39662
+ description: "Shut down the vector service runtime on plugin disable",
39663
+ async cleanup(ctx) {
39664
+ if (ctx.reason === "disable") {
39665
+ logger.info?.("LibraVDB disable \u2014 shutting down runtime");
39666
+ await runtime.shutdown();
39667
+ }
39668
+ }
39669
+ });
39656
39670
  api.on("before_reset", createBeforeResetHook(runtime, api.logger ?? console));
39657
39671
  api.on("session_end", createSessionEndHook(runtime, api.logger ?? console));
39672
+ api.on("agent_end", async (event) => {
39673
+ const e = asRecord(event) ?? {};
39674
+ logger.info?.(
39675
+ `LibraVDB agent_end success=${e.success ?? "unknown"} durationMs=${e.durationMs ?? "?"} error=${typeof e.error === "string" ? e.error : "none"}`
39676
+ );
39677
+ });
39658
39678
  api.on("gateway_stop", async () => {
39659
39679
  await runtime.shutdown();
39660
39680
  });
39661
39681
  }
39682
+ function asRecord(value) {
39683
+ return typeof value === "object" && value !== null ? value : null;
39684
+ }
39662
39685
  var index_default = definePluginEntry({
39663
39686
  id: MEMORY_ID,
39664
39687
  name: "LibraVDB Memory",
@@ -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.36",
5
+ "version": "1.4.38",
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.36",
3
+ "version": "1.4.38",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -31,7 +31,8 @@
31
31
  },
32
32
  "openclaw": {
33
33
  "extensions": [
34
- "./dist/index.js"
34
+ "./dist/index.js",
35
+ "./dist/cli-metadata.js"
35
36
  ],
36
37
  "compat": {
37
38
  "pluginApi": ">=2026.3.22",