@openclaw/memory-lancedb 2026.5.24-beta.1 → 2026.5.25-beta.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/index.js CHANGED
@@ -5,7 +5,7 @@ import { Buffer } from "node:buffer";
5
5
  import { randomUUID } from "node:crypto";
6
6
  import { resolveLivePluginConfigObject } from "openclaw/plugin-sdk/plugin-config-runtime";
7
7
  import { ensureGlobalUndiciEnvProxyDispatcher } from "openclaw/plugin-sdk/runtime-env";
8
- import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
8
+ import { asOptionalRecord, normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
9
9
  import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
10
10
  import { Type } from "typebox";
11
11
  //#region extensions/memory-lancedb/index.ts
@@ -31,18 +31,15 @@ function loadMemoryHostCoreModule() {
31
31
  memoryHostCoreModulePromise ??= import("openclaw/plugin-sdk/memory-host-core");
32
32
  return memoryHostCoreModulePromise;
33
33
  }
34
- function asRecord(value) {
35
- return value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
36
- }
37
34
  function extractUserTextContent(message) {
38
- const msgObj = asRecord(message);
35
+ const msgObj = asOptionalRecord(message);
39
36
  if (!msgObj || msgObj.role !== "user") return [];
40
37
  const content = msgObj.content;
41
38
  if (typeof content === "string") return [content];
42
39
  if (!Array.isArray(content)) return [];
43
40
  const texts = [];
44
41
  for (const block of content) {
45
- const blockObj = asRecord(block);
42
+ const blockObj = asOptionalRecord(block);
46
43
  if (blockObj?.type === "text" && typeof blockObj.text === "string") texts.push(blockObj.text);
47
44
  }
48
45
  return texts;
@@ -59,7 +56,7 @@ function normalizeRecallQuery(text, maxChars = DEFAULT_RECALL_MAX_CHARS) {
59
56
  return normalized.length > limit ? truncateUtf16Safe(normalized, limit).trimEnd() : normalized;
60
57
  }
61
58
  function messageFingerprint(message) {
62
- const msgObj = asRecord(message);
59
+ const msgObj = asOptionalRecord(message);
63
60
  if (!msgObj) return `${typeof message}:${String(message)}`;
64
61
  try {
65
62
  return JSON.stringify({
@@ -397,7 +394,7 @@ var memory_lancedb_default = definePluginEntry({
397
394
  model: cfg.embedding.model,
398
395
  ...cfg.embedding.baseUrl ? { baseUrl: cfg.embedding.baseUrl } : {},
399
396
  ...typeof cfg.embedding.dimensions === "number" ? { dimensions: cfg.embedding.dimensions } : {},
400
- ...asRecord(asRecord(runtimePluginConfig)?.embedding)
397
+ ...asOptionalRecord(asOptionalRecord(runtimePluginConfig)?.embedding)
401
398
  },
402
399
  ...cfg.dreaming ? { dreaming: cfg.dreaming } : {},
403
400
  dbPath: cfg.dbPath,
@@ -406,7 +403,7 @@ var memory_lancedb_default = definePluginEntry({
406
403
  captureMaxChars: cfg.captureMaxChars,
407
404
  recallMaxChars: cfg.recallMaxChars,
408
405
  ...cfg.storageOptions ? { storageOptions: cfg.storageOptions } : {},
409
- ...asRecord(runtimePluginConfig)
406
+ ...asOptionalRecord(runtimePluginConfig)
410
407
  });
411
408
  };
412
409
  api.logger.info(`memory-lancedb: plugin registered (db: ${resolvedDbPath}, lazy init)`);
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@openclaw/memory-lancedb",
3
- "version": "2026.5.24-beta.1",
3
+ "version": "2026.5.25-beta.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@openclaw/memory-lancedb",
9
- "version": "2026.5.24-beta.1",
9
+ "version": "2026.5.25-beta.1",
10
10
  "dependencies": {
11
11
  "@lancedb/lancedb": "0.29.0",
12
12
  "apache-arrow": "18.1.0",
13
- "openai": "6.38.0",
13
+ "openai": "6.39.0",
14
14
  "typebox": "1.1.38"
15
15
  }
16
16
  },
@@ -372,9 +372,9 @@
372
372
  "license": "MIT"
373
373
  },
374
374
  "node_modules/openai": {
375
- "version": "6.38.0",
376
- "resolved": "https://registry.npmjs.org/openai/-/openai-6.38.0.tgz",
377
- "integrity": "sha512-AoMplt2UalrpgUDMh3L09QWjNRlgJPipclQvA6sYAaeF6nHNBMgmikAZGmcYLn8on4d9sQY9Q8bOLfrBS7Lc8g==",
375
+ "version": "6.39.0",
376
+ "resolved": "https://registry.npmjs.org/openai/-/openai-6.39.0.tgz",
377
+ "integrity": "sha512-O61LIsimY3acVabwvomwFhwrnN36yvHY2quIfy9keEcFytGgWeV35yLHQ6NVMLSBxRpHmcg2yuhCnlu2HT4pLQ==",
378
378
  "license": "Apache-2.0",
379
379
  "bin": {
380
380
  "openai": "bin/cli"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/memory-lancedb",
3
- "version": "2026.5.24-beta.1",
3
+ "version": "2026.5.25-beta.1",
4
4
  "description": "OpenClaw LanceDB-backed long-term memory plugin with auto-recall/capture",
5
5
  "repository": {
6
6
  "type": "git",
@@ -10,7 +10,7 @@
10
10
  "dependencies": {
11
11
  "@lancedb/lancedb": "0.29.0",
12
12
  "apache-arrow": "18.1.0",
13
- "openai": "6.38.0",
13
+ "openai": "6.39.0",
14
14
  "typebox": "1.1.38"
15
15
  },
16
16
  "devDependencies": {
@@ -26,10 +26,10 @@
26
26
  "minHostVersion": ">=2026.4.10"
27
27
  },
28
28
  "compat": {
29
- "pluginApi": ">=2026.5.24-beta.1"
29
+ "pluginApi": ">=2026.5.25-beta.1"
30
30
  },
31
31
  "build": {
32
- "openclawVersion": "2026.5.24-beta.1"
32
+ "openclawVersion": "2026.5.25-beta.1"
33
33
  },
34
34
  "release": {
35
35
  "bundleRuntimeDependencies": false,
@@ -46,7 +46,7 @@
46
46
  "npm-shrinkwrap.json"
47
47
  ],
48
48
  "peerDependencies": {
49
- "openclaw": ">=2026.5.24-beta.1"
49
+ "openclaw": ">=2026.5.25-beta.1"
50
50
  },
51
51
  "peerDependenciesMeta": {
52
52
  "openclaw": {