@xdarkicex/openclaw-memory-libravdb 1.4.51 → 1.4.53
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 +5 -2
- package/dist/dream-promotion.js +2 -4
- package/dist/index.js +9 -8
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
package/dist/context-engine.js
CHANGED
|
@@ -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
|
-
|
|
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
|
|
367
|
+
sessionKey,
|
|
366
368
|
logger,
|
|
367
369
|
});
|
|
370
|
+
cachedSessionKey = sessionKey;
|
|
368
371
|
}
|
|
369
372
|
return cachedIdentity.userId;
|
|
370
373
|
}
|
package/dist/dream-promotion.js
CHANGED
|
@@ -114,10 +114,9 @@ export function createDreamPromotionHandle(cfg, getRpc, logger = console, fsApi
|
|
|
114
114
|
sourceMtimeMs: stat.mtimeMs,
|
|
115
115
|
ingestVersion: DREAM_PROMOTION_VERSION,
|
|
116
116
|
hashBackend: getHashBackendName(),
|
|
117
|
-
entries: candidates.map((candidate
|
|
117
|
+
entries: candidates.map((candidate) => ({
|
|
118
118
|
...candidate,
|
|
119
119
|
sourceLine: candidate.line,
|
|
120
|
-
line: index + 1,
|
|
121
120
|
})),
|
|
122
121
|
};
|
|
123
122
|
await rpc.call("promote_dream_entries", params);
|
|
@@ -203,10 +202,9 @@ export async function promoteDreamDiaryFile(rpc, opts) {
|
|
|
203
202
|
sourceMtimeMs: sourceMtimeMs ?? 0,
|
|
204
203
|
ingestVersion: DREAM_PROMOTION_VERSION,
|
|
205
204
|
hashBackend: getHashBackendName(),
|
|
206
|
-
entries: candidates.map((candidate
|
|
205
|
+
entries: candidates.map((candidate) => ({
|
|
207
206
|
...candidate,
|
|
208
207
|
sourceLine: candidate.line,
|
|
209
|
-
line: index + 1,
|
|
210
208
|
})),
|
|
211
209
|
});
|
|
212
210
|
}
|
package/dist/index.js
CHANGED
|
@@ -32612,10 +32612,9 @@ function createDreamPromotionHandle(cfg, getRpc, logger = console, fsApi = creat
|
|
|
32612
32612
|
sourceMtimeMs: stat.mtimeMs,
|
|
32613
32613
|
ingestVersion: DREAM_PROMOTION_VERSION,
|
|
32614
32614
|
hashBackend: getHashBackendName(),
|
|
32615
|
-
entries: candidates.map((candidate
|
|
32615
|
+
entries: candidates.map((candidate) => ({
|
|
32616
32616
|
...candidate,
|
|
32617
|
-
sourceLine: candidate.line
|
|
32618
|
-
line: index + 1
|
|
32617
|
+
sourceLine: candidate.line
|
|
32619
32618
|
}))
|
|
32620
32619
|
};
|
|
32621
32620
|
await rpc.call("promote_dream_entries", params);
|
|
@@ -32698,10 +32697,9 @@ async function promoteDreamDiaryFile(rpc, opts) {
|
|
|
32698
32697
|
sourceMtimeMs: sourceMtimeMs ?? 0,
|
|
32699
32698
|
ingestVersion: DREAM_PROMOTION_VERSION,
|
|
32700
32699
|
hashBackend: getHashBackendName(),
|
|
32701
|
-
entries: candidates.map((candidate
|
|
32700
|
+
entries: candidates.map((candidate) => ({
|
|
32702
32701
|
...candidate,
|
|
32703
|
-
sourceLine: candidate.line
|
|
32704
|
-
line: index + 1
|
|
32702
|
+
sourceLine: candidate.line
|
|
32705
32703
|
}))
|
|
32706
32704
|
});
|
|
32707
32705
|
}
|
|
@@ -33931,16 +33929,19 @@ function normalizeAssembleResult(result) {
|
|
|
33931
33929
|
}
|
|
33932
33930
|
function buildContextEngineFactory(runtime, cfg, logger = console) {
|
|
33933
33931
|
let cachedIdentity = null;
|
|
33932
|
+
let cachedSessionKey;
|
|
33934
33933
|
function resolveUserId(args) {
|
|
33935
33934
|
const fwUserId = args?.userIdOverride?.trim();
|
|
33936
33935
|
if (fwUserId) return fwUserId;
|
|
33937
|
-
|
|
33936
|
+
const sessionKey = args?.sessionKey?.trim() || void 0;
|
|
33937
|
+
if (!cachedIdentity || cachedSessionKey !== sessionKey) {
|
|
33938
33938
|
cachedIdentity = resolveIdentity({
|
|
33939
33939
|
configUserId: cfg.userId,
|
|
33940
33940
|
identityPath: cfg.identityPath,
|
|
33941
|
-
sessionKey
|
|
33941
|
+
sessionKey,
|
|
33942
33942
|
logger
|
|
33943
33943
|
});
|
|
33944
|
+
cachedSessionKey = sessionKey;
|
|
33944
33945
|
}
|
|
33945
33946
|
return cachedIdentity.userId;
|
|
33946
33947
|
}
|
package/openclaw.plugin.json
CHANGED