@xdarkicex/openclaw-memory-libravdb 1.6.14 → 1.6.16

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/README.md CHANGED
@@ -33,6 +33,19 @@ brew install libravdbd
33
33
  brew services start libravdbd
34
34
  ```
35
35
 
36
+ > **After upgrades:** Always restart the daemon so the newly installed binary takes effect:
37
+ > ```bash
38
+ > # macOS (Homebrew)
39
+ > brew services restart libravdbd
40
+ >
41
+ > # Linux (systemd)
42
+ > systemctl --user restart libravdbd
43
+ >
44
+ > # Linux (no systemd — kill and restart manually)
45
+ > killall libravdbd && libravdbd &
46
+ > ```
47
+ > Failing to restart leaves the old process running — it will not auto-replace a live background service. If you see "Protocol error" or connection failures after an upgrade, this is almost always the cause.
48
+
36
49
  **Linux (APT)**
37
50
 
38
51
  ```bash
@@ -99,5 +99,6 @@ export declare function buildContextEngineFactory(runtime: PluginRuntime, cfg: P
99
99
  tokenBudget?: number;
100
100
  runtimeContext?: Record<string, unknown>;
101
101
  }): Promise<import("@xdarkicex/libravdb-contracts").AfterTurnKernelResponse>;
102
+ dispose(): Promise<void>;
102
103
  };
103
104
  export {};
@@ -521,6 +521,7 @@ export function normalizeAssembleResult(result) {
521
521
  }
522
522
  export function buildContextEngineFactory(runtime, cfg, logger = console) {
523
523
  const predictiveContextCache = new Map();
524
+ const PREDICTIVE_CACHE_MAX_SIZE = 100;
524
525
  let cachedIdentity = null;
525
526
  let cachedSessionKey;
526
527
  function resolveUserId(args) {
@@ -743,6 +744,7 @@ export function buildContextEngineFactory(runtime, cfg, logger = console) {
743
744
  ownsCompaction: true,
744
745
  async bootstrap(args) {
745
746
  const sessionId = requireSessionId(args.sessionId, "bootstrap");
747
+ predictiveContextCache.delete(sessionId);
746
748
  const userId = resolveUserId({
747
749
  userIdOverride: args.userId,
748
750
  sessionKey: args.sessionKey,
@@ -925,6 +927,11 @@ export function buildContextEngineFactory(runtime, cfg, logger = console) {
925
927
  });
926
928
  const predictions = result.predictions;
927
929
  if (Array.isArray(predictions) && predictions.length > 0) {
930
+ if (predictiveContextCache.size >= PREDICTIVE_CACHE_MAX_SIZE) {
931
+ const oldest = predictiveContextCache.keys().next().value;
932
+ if (oldest !== undefined)
933
+ predictiveContextCache.delete(oldest);
934
+ }
928
935
  predictiveContextCache.set(sessionId, predictions);
929
936
  }
930
937
  return result;
@@ -934,6 +941,9 @@ export function buildContextEngineFactory(runtime, cfg, logger = console) {
934
941
  `${error instanceof Error ? error.message : String(error)}`);
935
942
  throw error;
936
943
  }
937
- }
944
+ },
945
+ async dispose() {
946
+ predictiveContextCache.clear();
947
+ },
938
948
  };
939
949
  }
package/dist/index.js CHANGED
@@ -27036,6 +27036,7 @@ function normalizeAssembleResult(result) {
27036
27036
  }
27037
27037
  function buildContextEngineFactory(runtime, cfg, logger = console) {
27038
27038
  const predictiveContextCache = /* @__PURE__ */ new Map();
27039
+ const PREDICTIVE_CACHE_MAX_SIZE = 100;
27039
27040
  let cachedIdentity = null;
27040
27041
  let cachedSessionKey;
27041
27042
  function resolveUserId(args) {
@@ -27245,6 +27246,7 @@ function buildContextEngineFactory(runtime, cfg, logger = console) {
27245
27246
  ownsCompaction: true,
27246
27247
  async bootstrap(args) {
27247
27248
  const sessionId = requireSessionId(args.sessionId, "bootstrap");
27249
+ predictiveContextCache.delete(sessionId);
27248
27250
  const userId = resolveUserId({
27249
27251
  userIdOverride: args.userId,
27250
27252
  sessionKey: args.sessionKey
@@ -27438,6 +27440,10 @@ function buildContextEngineFactory(runtime, cfg, logger = console) {
27438
27440
  });
27439
27441
  const predictions = result.predictions;
27440
27442
  if (Array.isArray(predictions) && predictions.length > 0) {
27443
+ if (predictiveContextCache.size >= PREDICTIVE_CACHE_MAX_SIZE) {
27444
+ const oldest = predictiveContextCache.keys().next().value;
27445
+ if (oldest !== void 0) predictiveContextCache.delete(oldest);
27446
+ }
27441
27447
  predictiveContextCache.set(sessionId, predictions);
27442
27448
  }
27443
27449
  return result;
@@ -27447,6 +27453,9 @@ function buildContextEngineFactory(runtime, cfg, logger = console) {
27447
27453
  );
27448
27454
  throw error2;
27449
27455
  }
27456
+ },
27457
+ async dispose() {
27458
+ predictiveContextCache.clear();
27450
27459
  }
27451
27460
  };
27452
27461
  }
package/dist/types.d.ts CHANGED
@@ -19,13 +19,19 @@ export interface PluginConfig {
19
19
  /** Optional ONNX execution provider override passed through to libravdbd.
20
20
  * Use "cpu" to bypass CoreML/MPS on Intel Macs or fragile GPU/NPU providers. */
21
21
  onnxDevice?: "auto" | "cpu" | "cuda" | "coreml" | "directml" | "openvino";
22
- embeddingBackend?: "bundled" | "onnx-local" | "custom-local";
22
+ embeddingBackend?: "bundled" | "onnx-local" | "custom-local" | "remote";
23
23
  embeddingProfile?: string;
24
24
  fallbackProfile?: string;
25
25
  embeddingModelPath?: string;
26
26
  embeddingTokenizerPath?: string;
27
27
  embeddingDimensions?: number;
28
28
  embeddingNormalize?: boolean;
29
+ /** HTTP endpoint URL for the remote embedder backend (when embeddingBackend is 'remote') */
30
+ embeddingEndpoint?: string;
31
+ /** Model identifier for the remote embedder backend */
32
+ embeddingRemoteModel?: string;
33
+ /** API key for the remote embedder endpoint */
34
+ embeddingAPIKey?: string;
29
35
  summarizerBackend?: "bundled" | "onnx-local" | "ollama-local" | "custom-local";
30
36
  summarizerProfile?: string;
31
37
  summarizerRuntimePath?: string;
@@ -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.14",
5
+ "version": "1.6.16",
6
6
  "kind": [
7
7
  "memory",
8
8
  "context-engine"
@@ -19,6 +19,21 @@
19
19
  "configSchema": {
20
20
  "type": "object",
21
21
  "additionalProperties": false,
22
+ "if": {
23
+ "properties": {
24
+ "embeddingBackend": {
25
+ "const": "remote"
26
+ }
27
+ },
28
+ "required": [
29
+ "embeddingBackend"
30
+ ]
31
+ },
32
+ "then": {
33
+ "required": [
34
+ "embeddingEndpoint"
35
+ ]
36
+ },
22
37
  "properties": {
23
38
  "dbPath": {
24
39
  "type": "string"
@@ -142,8 +157,10 @@
142
157
  "enum": [
143
158
  "bundled",
144
159
  "onnx-local",
145
- "custom-local"
146
- ]
160
+ "custom-local",
161
+ "remote"
162
+ ],
163
+ "description": "Embedder backend: bundled (built-in ONNX), onnx-local (local ONNX model), custom-local (custom ONNX), remote (HTTP API)"
147
164
  },
148
165
  "embeddingProfile": {
149
166
  "type": "string",
@@ -165,6 +182,18 @@
165
182
  "embeddingNormalize": {
166
183
  "type": "boolean"
167
184
  },
185
+ "embeddingEndpoint": {
186
+ "type": "string",
187
+ "description": "HTTP endpoint URL for the remote embedder backend (required when embeddingBackend is 'remote')"
188
+ },
189
+ "embeddingRemoteModel": {
190
+ "type": "string",
191
+ "description": "Model identifier used when embeddingBackend is 'remote', e.g. 'nomic-embed-text-v1.5'"
192
+ },
193
+ "embeddingAPIKey": {
194
+ "type": "string",
195
+ "description": "API key for the remote embedder endpoint (when embeddingBackend is 'remote')"
196
+ },
168
197
  "summarizerBackend": {
169
198
  "type": "string",
170
199
  "enum": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xdarkicex/openclaw-memory-libravdb",
3
- "version": "1.6.14",
3
+ "version": "1.6.16",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",