@xdarkicex/openclaw-memory-libravdb 1.5.3 → 1.5.4

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.
@@ -559,6 +559,19 @@ export function buildContextEngineFactory(runtime, cfg, logger = console) {
559
559
  : {}),
560
560
  };
561
561
  }
562
+ function isGrpcAuthConfigured() {
563
+ return (typeof process.env.LIBRAVDB_AUTH_SECRET === "string" &&
564
+ process.env.LIBRAVDB_AUTH_SECRET.trim().length > 0) || (typeof process.env.LIBRAVDB_AUTH_SECRET_FILE === "string" &&
565
+ process.env.LIBRAVDB_AUTH_SECRET_FILE.trim().length > 0);
566
+ }
567
+ function buildGrpcAuthInitializationError(error) {
568
+ const code = typeof error?.code === "number" ||
569
+ typeof error?.code === "string"
570
+ ? ` code=${String(error.code)}`
571
+ : "";
572
+ return new Error(`LibraVDB gRPC auth initialization failed${code}; ` +
573
+ `check LIBRAVDB_AUTH_SECRET and daemon auth configuration`);
574
+ }
562
575
  async function runCompaction(args) {
563
576
  const request = buildCompactSessionRequest(args);
564
577
  const kernel = await getKernelOrNull("compact");
@@ -644,7 +657,10 @@ export function buildContextEngineFactory(runtime, cfg, logger = console) {
644
657
  });
645
658
  }
646
659
  catch (error) {
647
- // Proceed even if initialize session fails or doesn't return nonce if secret optional
660
+ if (isGrpcAuthConfigured()) {
661
+ throw buildGrpcAuthInitializationError(error);
662
+ }
663
+ // Proceed when the kernel does not require auth and the init call is unavailable.
648
664
  }
649
665
  return await kernel.bootstrapSession({
650
666
  sessionId,
package/dist/index.js CHANGED
@@ -34240,6 +34240,15 @@ function buildContextEngineFactory(runtime, cfg, logger = console) {
34240
34240
  ...typeof cfg.continuityPriorContextTokens === "number" ? { continuityPriorContextTokens: cfg.continuityPriorContextTokens } : {}
34241
34241
  };
34242
34242
  }
34243
+ function isGrpcAuthConfigured() {
34244
+ return typeof process.env.LIBRAVDB_AUTH_SECRET === "string" && process.env.LIBRAVDB_AUTH_SECRET.trim().length > 0 || typeof process.env.LIBRAVDB_AUTH_SECRET_FILE === "string" && process.env.LIBRAVDB_AUTH_SECRET_FILE.trim().length > 0;
34245
+ }
34246
+ function buildGrpcAuthInitializationError(error) {
34247
+ const code = typeof error?.code === "number" || typeof error?.code === "string" ? ` code=${String(error.code)}` : "";
34248
+ return new Error(
34249
+ `LibraVDB gRPC auth initialization failed${code}; check LIBRAVDB_AUTH_SECRET and daemon auth configuration`
34250
+ );
34251
+ }
34243
34252
  async function runCompaction(args) {
34244
34253
  const request = buildCompactSessionRequest(args);
34245
34254
  const kernel = await getKernelOrNull("compact");
@@ -34322,6 +34331,9 @@ function buildContextEngineFactory(runtime, cfg, logger = console) {
34322
34331
  clientCapabilities: [{ name: "grpc", version: "1.0" }]
34323
34332
  });
34324
34333
  } catch (error) {
34334
+ if (isGrpcAuthConfigured()) {
34335
+ throw buildGrpcAuthInitializationError(error);
34336
+ }
34325
34337
  }
34326
34338
  return await kernel.bootstrapSession({
34327
34339
  sessionId,
@@ -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.5.3",
5
+ "version": "1.5.4",
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.5.3",
3
+ "version": "1.5.4",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",