@xdarkicex/openclaw-memory-libravdb 1.4.51 → 1.4.52

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.
@@ -353,18 +353,21 @@ export function normalizeAssembleResult(result) {
353
353
  }
354
354
  export function buildContextEngineFactory(runtime, cfg, logger = console) {
355
355
  let cachedIdentity = null;
356
+ let cachedSessionKey;
356
357
  function resolveUserId(args) {
357
358
  // Framework-provided userId takes priority (channels, future SDK compat).
358
359
  const fwUserId = args?.userIdOverride?.trim();
359
360
  if (fwUserId)
360
361
  return fwUserId;
361
- if (!cachedIdentity) {
362
+ const sessionKey = args?.sessionKey?.trim() || undefined;
363
+ if (!cachedIdentity || cachedSessionKey !== sessionKey) {
362
364
  cachedIdentity = resolveIdentity({
363
365
  configUserId: cfg.userId,
364
366
  identityPath: cfg.identityPath,
365
- sessionKey: args?.sessionKey,
367
+ sessionKey,
366
368
  logger,
367
369
  });
370
+ cachedSessionKey = sessionKey;
368
371
  }
369
372
  return cachedIdentity.userId;
370
373
  }
package/dist/index.js CHANGED
@@ -33931,16 +33931,19 @@ function normalizeAssembleResult(result) {
33931
33931
  }
33932
33932
  function buildContextEngineFactory(runtime, cfg, logger = console) {
33933
33933
  let cachedIdentity = null;
33934
+ let cachedSessionKey;
33934
33935
  function resolveUserId(args) {
33935
33936
  const fwUserId = args?.userIdOverride?.trim();
33936
33937
  if (fwUserId) return fwUserId;
33937
- if (!cachedIdentity) {
33938
+ const sessionKey = args?.sessionKey?.trim() || void 0;
33939
+ if (!cachedIdentity || cachedSessionKey !== sessionKey) {
33938
33940
  cachedIdentity = resolveIdentity({
33939
33941
  configUserId: cfg.userId,
33940
33942
  identityPath: cfg.identityPath,
33941
- sessionKey: args?.sessionKey,
33943
+ sessionKey,
33942
33944
  logger
33943
33945
  });
33946
+ cachedSessionKey = sessionKey;
33944
33947
  }
33945
33948
  return cachedIdentity.userId;
33946
33949
  }
@@ -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.4.51",
5
+ "version": "1.4.52",
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.4.51",
3
+ "version": "1.4.52",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",