@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 CHANGED
@@ -32491,7 +32491,15 @@ var IngestQueue = class {
32491
32491
  }
32492
32492
  async ingestWithRetry(params) {
32493
32493
  return withRetry(
32494
- () => this.ingestDocument(params),
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
  }
@@ -73,7 +73,13 @@ export class IngestQueue {
73
73
  return lastFeedback;
74
74
  }
75
75
  async ingestWithRetry(params) {
76
- return withRetry(() => this.ingestDocument(params), this.options.maxRetries, this.options.retryBaseDelayMs, this.logger, `ingest_markdown_document(${params.sourceDoc})`);
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})`);
@@ -56,4 +56,5 @@ export declare class LibravDBClient {
56
56
  rankCandidates(req: PartialMessage<RankCandidatesRequest>): Promise<RankCandidatesResponse>;
57
57
  close(): void;
58
58
  }
59
+ export declare function loadSecretFromEnv(): string | undefined;
59
60
  export {};
@@ -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;
@@ -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.6.0",
5
+ "version": "1.6.2",
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.6.0",
3
+ "version": "1.6.2",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",