@xdarkicex/openclaw-memory-libravdb 1.6.0 → 1.6.2
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 +11 -3
- package/dist/ingest-queue.js +7 -1
- package/dist/libravdb-client.d.ts +1 -0
- package/dist/libravdb-client.js +3 -3
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -32491,7 +32491,15 @@ var IngestQueue = class {
|
|
|
32491
32491
|
}
|
|
32492
32492
|
async ingestWithRetry(params) {
|
|
32493
32493
|
return withRetry(
|
|
32494
|
-
() =>
|
|
32494
|
+
async () => {
|
|
32495
|
+
const resp = await this.ingestDocument(params);
|
|
32496
|
+
if (!resp.ok) {
|
|
32497
|
+
throw new Error(
|
|
32498
|
+
`ingest_markdown_document(${params.sourceDoc}) mode=${params.mode} returned ok=false`
|
|
32499
|
+
);
|
|
32500
|
+
}
|
|
32501
|
+
return resp;
|
|
32502
|
+
},
|
|
32495
32503
|
this.options.maxRetries,
|
|
32496
32504
|
this.options.retryBaseDelayMs,
|
|
32497
32505
|
this.logger,
|
|
@@ -36517,12 +36525,12 @@ function extractHost(target) {
|
|
|
36517
36525
|
return sep > 0 ? withoutDns.slice(0, sep) : withoutDns;
|
|
36518
36526
|
}
|
|
36519
36527
|
function loadSecretFromEnv() {
|
|
36520
|
-
const secret = process.env.LIBRAVDB_AUTH_SECRET;
|
|
36528
|
+
const secret = process.env.LIBRAVDB_AUTH_SECRET?.trim();
|
|
36521
36529
|
if (secret) return secret;
|
|
36522
36530
|
const secretPath = process.env.LIBRAVDB_AUTH_SECRET_FILE;
|
|
36523
36531
|
if (secretPath) {
|
|
36524
36532
|
try {
|
|
36525
|
-
return fs3.readFileSync(secretPath, "utf8").trim();
|
|
36533
|
+
return fs3.readFileSync(secretPath, "utf8").trim() || void 0;
|
|
36526
36534
|
} catch {
|
|
36527
36535
|
return void 0;
|
|
36528
36536
|
}
|
package/dist/ingest-queue.js
CHANGED
|
@@ -73,7 +73,13 @@ export class IngestQueue {
|
|
|
73
73
|
return lastFeedback;
|
|
74
74
|
}
|
|
75
75
|
async ingestWithRetry(params) {
|
|
76
|
-
return withRetry(() =>
|
|
76
|
+
return withRetry(async () => {
|
|
77
|
+
const resp = await this.ingestDocument(params);
|
|
78
|
+
if (!resp.ok) {
|
|
79
|
+
throw new Error(`ingest_markdown_document(${params.sourceDoc}) mode=${params.mode} returned ok=false`);
|
|
80
|
+
}
|
|
81
|
+
return resp;
|
|
82
|
+
}, this.options.maxRetries, this.options.retryBaseDelayMs, this.logger, `ingest_markdown_document(${params.sourceDoc})`);
|
|
77
83
|
}
|
|
78
84
|
async enqueueDelete(sourceDoc) {
|
|
79
85
|
await withRetry(() => this.deleteDocument({ sourceDoc }), this.options.maxRetries, this.options.retryBaseDelayMs, this.logger, `delete_authored_document(${sourceDoc})`);
|
package/dist/libravdb-client.js
CHANGED
|
@@ -279,14 +279,14 @@ function extractHost(target) {
|
|
|
279
279
|
const sep = withoutDns.lastIndexOf(":");
|
|
280
280
|
return sep > 0 ? withoutDns.slice(0, sep) : withoutDns;
|
|
281
281
|
}
|
|
282
|
-
function loadSecretFromEnv() {
|
|
283
|
-
const secret = process.env.LIBRAVDB_AUTH_SECRET;
|
|
282
|
+
export function loadSecretFromEnv() {
|
|
283
|
+
const secret = process.env.LIBRAVDB_AUTH_SECRET?.trim();
|
|
284
284
|
if (secret)
|
|
285
285
|
return secret;
|
|
286
286
|
const secretPath = process.env.LIBRAVDB_AUTH_SECRET_FILE;
|
|
287
287
|
if (secretPath) {
|
|
288
288
|
try {
|
|
289
|
-
return fs.readFileSync(secretPath, "utf8").trim();
|
|
289
|
+
return fs.readFileSync(secretPath, "utf8").trim() || undefined;
|
|
290
290
|
}
|
|
291
291
|
catch {
|
|
292
292
|
return undefined;
|
package/openclaw.plugin.json
CHANGED