@openclaw/lobster 2026.5.25-beta.1 → 2026.5.26-beta.2
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 +14 -6
- package/npm-shrinkwrap.json +2 -3
- package/package.json +4 -6
package/dist/index.js
CHANGED
|
@@ -7,12 +7,10 @@ import path from "node:path";
|
|
|
7
7
|
import { Readable, Writable } from "node:stream";
|
|
8
8
|
import { pathToFileURL } from "node:url";
|
|
9
9
|
import { createHash } from "node:crypto";
|
|
10
|
-
import AjvPkg from "ajv";
|
|
11
10
|
//#region extensions/lobster/src/lobster-ajv-cache.ts
|
|
12
11
|
const installedSymbol = Symbol.for("openclaw.lobster.ajv-compile-cache.installed");
|
|
13
12
|
const cacheSymbol = Symbol.for("openclaw.lobster.ajv-compile-cache.entries");
|
|
14
13
|
const maxEntries = 512;
|
|
15
|
-
const AjvCtor = AjvPkg;
|
|
16
14
|
function stableJsonStringify(value, seen = /* @__PURE__ */ new WeakSet()) {
|
|
17
15
|
if (value === null || typeof value !== "object") return JSON.stringify(value);
|
|
18
16
|
if (seen.has(value)) throw new TypeError("Cannot cache cyclic JSON schema");
|
|
@@ -60,7 +58,17 @@ function rememberCompiledValidator(params) {
|
|
|
60
58
|
validate
|
|
61
59
|
});
|
|
62
60
|
}
|
|
63
|
-
function
|
|
61
|
+
async function resolveLobsterAjvConstructor(packageEntryPath) {
|
|
62
|
+
const ajvModule = await import(pathToFileURL(createRequire(packageEntryPath).resolve("ajv")).href);
|
|
63
|
+
return ajvModule.default ?? ajvModule;
|
|
64
|
+
}
|
|
65
|
+
async function installLobsterAjvCompileCache(packageEntryPath) {
|
|
66
|
+
let AjvCtor;
|
|
67
|
+
try {
|
|
68
|
+
AjvCtor = await resolveLobsterAjvConstructor(packageEntryPath);
|
|
69
|
+
} catch {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
64
72
|
const proto = AjvCtor.prototype;
|
|
65
73
|
if (proto[installedSymbol]) return;
|
|
66
74
|
const originalCompile = proto.compile;
|
|
@@ -230,9 +238,9 @@ async function withTimeout(timeoutMs, fn) {
|
|
|
230
238
|
});
|
|
231
239
|
}
|
|
232
240
|
async function loadEmbeddedToolRuntimeFromPackage(options = {}) {
|
|
233
|
-
installLobsterAjvCompileCache();
|
|
234
241
|
const importModule = options.importModule ?? (async (specifier) => await import(specifier));
|
|
235
|
-
const
|
|
242
|
+
const packageEntryPath = (options.resolvePackageEntry ?? ((specifier) => lobsterRequire.resolve(specifier)))("@clawdbot/lobster");
|
|
243
|
+
await installLobsterAjvCompileCache(packageEntryPath);
|
|
236
244
|
let coreLoadError;
|
|
237
245
|
try {
|
|
238
246
|
return toEmbeddedToolRuntime(await importModule([
|
|
@@ -245,7 +253,7 @@ async function loadEmbeddedToolRuntimeFromPackage(options = {}) {
|
|
|
245
253
|
}
|
|
246
254
|
let fallbackLoadError;
|
|
247
255
|
try {
|
|
248
|
-
const packageRoot = findLobsterPackageRoot(
|
|
256
|
+
const packageRoot = findLobsterPackageRoot(packageEntryPath);
|
|
249
257
|
const coreRuntimeUrl = pathToFileURL(path.join(packageRoot, "dist/src/core/index.js")).href;
|
|
250
258
|
return toEmbeddedToolRuntime(await importModule(coreRuntimeUrl), coreRuntimeUrl);
|
|
251
259
|
} catch (error) {
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/lobster",
|
|
3
|
-
"version": "2026.5.
|
|
3
|
+
"version": "2026.5.26-beta.2",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@openclaw/lobster",
|
|
9
|
-
"version": "2026.5.
|
|
9
|
+
"version": "2026.5.26-beta.2",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@clawdbot/lobster": "2026.5.22",
|
|
12
|
-
"ajv": "8.20.0",
|
|
13
12
|
"typebox": "1.1.38"
|
|
14
13
|
}
|
|
15
14
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/lobster",
|
|
3
|
-
"version": "2026.5.
|
|
3
|
+
"version": "2026.5.26-beta.2",
|
|
4
4
|
"description": "Lobster workflow tool plugin (typed pipelines + resumable approvals)",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
"type": "module",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@clawdbot/lobster": "2026.5.22",
|
|
12
|
-
"ajv": "8.20.0",
|
|
13
12
|
"typebox": "1.1.38"
|
|
14
13
|
},
|
|
15
14
|
"openclaw": {
|
|
@@ -22,10 +21,10 @@
|
|
|
22
21
|
"minHostVersion": ">=2026.4.25"
|
|
23
22
|
},
|
|
24
23
|
"compat": {
|
|
25
|
-
"pluginApi": ">=2026.5.
|
|
24
|
+
"pluginApi": ">=2026.5.26-beta.2"
|
|
26
25
|
},
|
|
27
26
|
"build": {
|
|
28
|
-
"openclawVersion": "2026.5.
|
|
27
|
+
"openclawVersion": "2026.5.26-beta.2"
|
|
29
28
|
},
|
|
30
29
|
"release": {
|
|
31
30
|
"publishToClawHub": true,
|
|
@@ -43,7 +42,7 @@
|
|
|
43
42
|
"SKILL.md"
|
|
44
43
|
],
|
|
45
44
|
"peerDependencies": {
|
|
46
|
-
"openclaw": ">=2026.5.
|
|
45
|
+
"openclaw": ">=2026.5.26-beta.2"
|
|
47
46
|
},
|
|
48
47
|
"peerDependenciesMeta": {
|
|
49
48
|
"openclaw": {
|
|
@@ -52,7 +51,6 @@
|
|
|
52
51
|
},
|
|
53
52
|
"bundledDependencies": [
|
|
54
53
|
"@clawdbot/lobster",
|
|
55
|
-
"ajv",
|
|
56
54
|
"typebox"
|
|
57
55
|
]
|
|
58
56
|
}
|