@openclaw/memory-lancedb 2026.8.1-beta.3 → 2026.8.1
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/doctor-contract-api.js +1 -1
- package/dist/embeddings.js +6 -3
- package/dist/index.js +3 -1
- package/dist/memory-cli.js +1 -2
- package/dist/memory-policy.js +1 -0
- package/package.json +7 -7
|
@@ -57,7 +57,7 @@ function resolveConfiguredDbPath(config, env, pluginRoot) {
|
|
|
57
57
|
const configured = typeof pluginConfig?.dbPath === "string" ? pluginConfig.dbPath.trim() : "";
|
|
58
58
|
if (!configured) return path.join(resolveHome(env), ".openclaw", "memory", "lancedb");
|
|
59
59
|
if (configured.includes("://")) return configured;
|
|
60
|
-
if (configured.startsWith("~")) return path.resolve(configured.replace(/^~(?=$|[\\/])/, resolveHome(env)));
|
|
60
|
+
if (configured.startsWith("~")) return path.resolve(configured.replace(/^~(?=$|[\\/])/, () => resolveHome(env)));
|
|
61
61
|
return path.resolve(pluginRoot, configured);
|
|
62
62
|
}
|
|
63
63
|
function resolveStorageOptions(config, env) {
|
package/dist/embeddings.js
CHANGED
|
@@ -200,7 +200,7 @@ var ProviderAdapterEmbeddings = class {
|
|
|
200
200
|
fallback: "none",
|
|
201
201
|
model: embedding.model,
|
|
202
202
|
...remote ? { remote } : {},
|
|
203
|
-
...typeof embedding.dimensions === "number" ? {
|
|
203
|
+
...typeof embedding.dimensions === "number" ? { dimensions: embedding.dimensions } : {}
|
|
204
204
|
});
|
|
205
205
|
if (!result.provider) throw new Error(`Memory embedding provider ${providerId} is unavailable.`);
|
|
206
206
|
return result.provider;
|
|
@@ -214,13 +214,16 @@ var ProviderAdapterEmbeddings = class {
|
|
|
214
214
|
entry.activeUses += 1;
|
|
215
215
|
try {
|
|
216
216
|
const provider = await entry.promise;
|
|
217
|
-
if (!timeoutMs) return await provider.
|
|
217
|
+
if (!timeoutMs) return await provider.embed(text, { inputType: "query" });
|
|
218
218
|
const controller = new AbortController();
|
|
219
219
|
let timer;
|
|
220
220
|
try {
|
|
221
221
|
timer = setTimeout(() => controller.abort(/* @__PURE__ */ new Error("memory-lancedb embedding timed out")), resolveTimerTimeoutMs(timeoutMs, 1));
|
|
222
222
|
timer.unref?.();
|
|
223
|
-
return await provider.
|
|
223
|
+
return await provider.embed(text, {
|
|
224
|
+
signal: controller.signal,
|
|
225
|
+
inputType: "query"
|
|
226
|
+
});
|
|
224
227
|
} finally {
|
|
225
228
|
if (timer) clearTimeout(timer);
|
|
226
229
|
}
|
package/dist/index.js
CHANGED
|
@@ -414,6 +414,8 @@ var memory_lancedb_default = definePluginEntry({
|
|
|
414
414
|
let capturableSeen = 0;
|
|
415
415
|
for (let index = startIndex; index < event.messages.length; index++) {
|
|
416
416
|
const message = event.messages[index];
|
|
417
|
+
const fingerprint = messageFingerprint(message);
|
|
418
|
+
if (fingerprint === void 0) continue;
|
|
417
419
|
let messageProcessed = false;
|
|
418
420
|
try {
|
|
419
421
|
for (const text of extractUserTextContent(message)) {
|
|
@@ -439,7 +441,7 @@ var memory_lancedb_default = definePluginEntry({
|
|
|
439
441
|
} finally {
|
|
440
442
|
if (messageProcessed && cursorKey) autoCaptureCursors.set(cursorKey, {
|
|
441
443
|
nextIndex: index + 1,
|
|
442
|
-
lastMessageFingerprint:
|
|
444
|
+
lastMessageFingerprint: fingerprint
|
|
443
445
|
});
|
|
444
446
|
}
|
|
445
447
|
}
|
package/dist/memory-cli.js
CHANGED
|
@@ -112,9 +112,8 @@ function registerMemoryCli(api, db, embeddings, resolveCliAgentId, resolveConfig
|
|
|
112
112
|
return 0;
|
|
113
113
|
});
|
|
114
114
|
rows = rows.slice(0, limit);
|
|
115
|
-
if (!outputColumns.includes(order.column)) for (const row of rows) delete row[order.column];
|
|
116
115
|
}
|
|
117
|
-
defaultRuntime.writeJson(rows);
|
|
116
|
+
defaultRuntime.writeJson(rows.map((row) => Object.fromEntries(outputColumns.map((column) => [column, row[column]]))));
|
|
118
117
|
});
|
|
119
118
|
memory.command("stats").description("Show memory statistics").option("--agent <id>", "Agent id (default: configured default agent)").action(async (opts) => {
|
|
120
119
|
const agentId = resolveCliAgentId(opts.agent);
|
package/dist/memory-policy.js
CHANGED
|
@@ -32,6 +32,7 @@ function normalizeMaxChars(value, fallback) {
|
|
|
32
32
|
}
|
|
33
33
|
function messageFingerprint(message) {
|
|
34
34
|
const msgObj = asOptionalRecord(message);
|
|
35
|
+
if (msgObj?.excludeFromContext === true) return;
|
|
35
36
|
if (!msgObj) return `${typeof message}:${String(message)}`;
|
|
36
37
|
try {
|
|
37
38
|
return JSON.stringify({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/memory-lancedb",
|
|
3
|
-
"version": "2026.8.1
|
|
3
|
+
"version": "2026.8.1",
|
|
4
4
|
"description": "OpenClaw LanceDB-backed long-term memory plugin with auto-recall, auto-capture, and vector search.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
},
|
|
9
9
|
"type": "module",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@lancedb/lancedb": "0.
|
|
11
|
+
"@lancedb/lancedb": "0.37.1",
|
|
12
12
|
"apache-arrow": "18.1.0",
|
|
13
|
-
"openai": "
|
|
14
|
-
"typebox": "1.3.
|
|
13
|
+
"openai": "7.5.0",
|
|
14
|
+
"typebox": "1.3.16"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"@openclaw/plugin-sdk": "workspace:*"
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"minHostVersion": ">=2026.5.31"
|
|
27
27
|
},
|
|
28
28
|
"compat": {
|
|
29
|
-
"pluginApi": ">=2026.8.1
|
|
29
|
+
"pluginApi": ">=2026.8.1"
|
|
30
30
|
},
|
|
31
31
|
"build": {
|
|
32
|
-
"openclawVersion": "2026.8.1
|
|
32
|
+
"openclawVersion": "2026.8.1"
|
|
33
33
|
},
|
|
34
34
|
"release": {
|
|
35
35
|
"bundleRuntimeDependencies": false,
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"README.md"
|
|
47
47
|
],
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"openclaw": ">=2026.8.1
|
|
49
|
+
"openclaw": ">=2026.8.1"
|
|
50
50
|
},
|
|
51
51
|
"peerDependenciesMeta": {
|
|
52
52
|
"openclaw": {
|