@xdarkicex/openclaw-memory-libravdb 1.5.2 → 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.
- package/dist/context-engine.js +17 -1
- package/dist/index.js +13 -0
- package/dist/sidecar.js +1 -0
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
package/dist/context-engine.js
CHANGED
|
@@ -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
|
-
|
|
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,
|
|
@@ -40058,6 +40070,7 @@ var SidecarSupervisor = class {
|
|
|
40058
40070
|
this.reconnectScheduled = false;
|
|
40059
40071
|
const message = error instanceof Error ? error.message : String(error);
|
|
40060
40072
|
this.logger.error(`[libravdb] sidecar reconnect failed: ${message}`);
|
|
40073
|
+
void this.handleExit(1);
|
|
40061
40074
|
});
|
|
40062
40075
|
});
|
|
40063
40076
|
}
|
package/dist/sidecar.js
CHANGED
|
@@ -317,6 +317,7 @@ class SidecarSupervisor {
|
|
|
317
317
|
this.reconnectScheduled = false;
|
|
318
318
|
const message = error instanceof Error ? error.message : String(error);
|
|
319
319
|
this.logger.error(`[libravdb] sidecar reconnect failed: ${message}`);
|
|
320
|
+
void this.handleExit(1);
|
|
320
321
|
});
|
|
321
322
|
});
|
|
322
323
|
}
|
package/openclaw.plugin.json
CHANGED