@openclaw/lobster 2026.7.2-beta.7 → 2026.8.1-beta.3
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 +59 -150
- package/node_modules/@clawdbot/lobster/node_modules/fast-uri/.github/workflows/ci.yml +9 -9
- package/node_modules/@clawdbot/lobster/node_modules/fast-uri/.github/workflows/lock-threads.yml +1 -1
- package/node_modules/@clawdbot/lobster/node_modules/fast-uri/.github/workflows/ossf-scorecard.yml +45 -0
- package/node_modules/@clawdbot/lobster/node_modules/fast-uri/README.md +1 -0
- package/node_modules/@clawdbot/lobster/node_modules/fast-uri/SECURITY.md +168 -0
- package/node_modules/@clawdbot/lobster/node_modules/fast-uri/index.js +37 -1
- package/node_modules/@clawdbot/lobster/node_modules/fast-uri/package.json +1 -1
- package/node_modules/@clawdbot/lobster/node_modules/fast-uri/test/security.test.js +136 -0
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -6,6 +6,8 @@ import { Type } from "typebox";
|
|
|
6
6
|
import { stat } from "node:fs/promises";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import { Readable, Writable } from "node:stream";
|
|
9
|
+
import { toErrorObject } from "openclaw/plugin-sdk/error-runtime";
|
|
10
|
+
import { isPathInside } from "openclaw/plugin-sdk/file-access-runtime";
|
|
9
11
|
//#region extensions/lobster/src/lobster-runner.ts
|
|
10
12
|
const workflowExts = /* @__PURE__ */ new Set([
|
|
11
13
|
".lobster",
|
|
@@ -13,19 +15,13 @@ const workflowExts = /* @__PURE__ */ new Set([
|
|
|
13
15
|
".yml",
|
|
14
16
|
".json"
|
|
15
17
|
]);
|
|
16
|
-
function normalizeForCwdSandbox(p) {
|
|
17
|
-
const normalized = path.normalize(p);
|
|
18
|
-
return process.platform === "win32" ? normalized.toLowerCase() : normalized;
|
|
19
|
-
}
|
|
20
18
|
function resolveLobsterCwd(cwdRaw) {
|
|
21
19
|
if (typeof cwdRaw !== "string" || !cwdRaw.trim()) return process.cwd();
|
|
22
20
|
const cwd = cwdRaw.trim();
|
|
23
21
|
if (path.isAbsolute(cwd)) throw new Error("cwd must be a relative path");
|
|
24
22
|
const base = process.cwd();
|
|
25
23
|
const resolved = path.resolve(base, cwd);
|
|
26
|
-
|
|
27
|
-
if (rel === "" || rel === ".") return resolved;
|
|
28
|
-
if (rel.startsWith("..") || path.isAbsolute(rel)) throw new Error("cwd must stay within the gateway working directory");
|
|
24
|
+
if (!isPathInside(base, resolved)) throw new Error("cwd must stay within the gateway working directory");
|
|
29
25
|
return resolved;
|
|
30
26
|
}
|
|
31
27
|
function createLimitedSink(maxBytes, label) {
|
|
@@ -40,66 +36,36 @@ function createLimitedSink(maxBytes, label) {
|
|
|
40
36
|
} });
|
|
41
37
|
}
|
|
42
38
|
function normalizeEnvelope(envelope) {
|
|
43
|
-
if (envelope.ok)
|
|
44
|
-
|
|
45
|
-
ok: false,
|
|
46
|
-
error: {
|
|
47
|
-
type: "unsupported_status",
|
|
48
|
-
message: "Lobster input requests are not supported by the OpenClaw Lobster tool yet"
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
return {
|
|
52
|
-
ok: true,
|
|
53
|
-
status: envelope.status ?? "ok",
|
|
54
|
-
output: Array.isArray(envelope.output) ? envelope.output : [],
|
|
55
|
-
requiresApproval: envelope.requiresApproval ? {
|
|
56
|
-
type: "approval_request",
|
|
57
|
-
prompt: envelope.requiresApproval.prompt,
|
|
58
|
-
items: envelope.requiresApproval.items,
|
|
59
|
-
...envelope.requiresApproval.resumeToken ? { resumeToken: envelope.requiresApproval.resumeToken } : {},
|
|
60
|
-
...envelope.requiresApproval.approvalId ? { approvalId: envelope.requiresApproval.approvalId } : {}
|
|
61
|
-
} : null
|
|
62
|
-
};
|
|
63
|
-
}
|
|
39
|
+
if (!envelope.ok) throw new Error(envelope.error?.message ?? "lobster runtime failed");
|
|
40
|
+
if (envelope.status === "needs_input") throw new Error("Lobster input requests are not supported by the OpenClaw Lobster tool yet");
|
|
64
41
|
return {
|
|
65
|
-
ok:
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
42
|
+
ok: true,
|
|
43
|
+
status: envelope.status ?? "ok",
|
|
44
|
+
output: Array.isArray(envelope.output) ? envelope.output : [],
|
|
45
|
+
requiresApproval: envelope.requiresApproval ? {
|
|
46
|
+
type: "approval_request",
|
|
47
|
+
prompt: envelope.requiresApproval.prompt,
|
|
48
|
+
items: envelope.requiresApproval.items,
|
|
49
|
+
...envelope.requiresApproval.resumeToken ? { resumeToken: envelope.requiresApproval.resumeToken } : {},
|
|
50
|
+
...envelope.requiresApproval.approvalId ? { approvalId: envelope.requiresApproval.approvalId } : {}
|
|
51
|
+
} : null
|
|
70
52
|
};
|
|
71
53
|
}
|
|
72
|
-
function throwOnErrorEnvelope(envelope) {
|
|
73
|
-
if (envelope.ok) return envelope;
|
|
74
|
-
throw new Error(envelope.error.message);
|
|
75
|
-
}
|
|
76
|
-
async function resolveWorkflowFile(candidate, cwd) {
|
|
77
|
-
const resolved = path.isAbsolute(candidate) ? candidate : path.resolve(cwd, candidate);
|
|
78
|
-
if (!(await stat(resolved)).isFile()) throw new Error("Workflow path is not a file");
|
|
79
|
-
const ext = path.extname(resolved).toLowerCase();
|
|
80
|
-
if (!workflowExts.has(ext)) throw new Error("Workflow file must end in .lobster, .yaml, .yml, or .json");
|
|
81
|
-
return resolved;
|
|
82
|
-
}
|
|
83
54
|
function isMissingPathError(error) {
|
|
84
55
|
return typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT";
|
|
85
56
|
}
|
|
86
|
-
function hasWorkflowFileExtension(candidate) {
|
|
87
|
-
return workflowExts.has(path.extname(candidate).toLowerCase());
|
|
88
|
-
}
|
|
89
57
|
async function detectWorkflowFile(candidate, cwd) {
|
|
90
58
|
const trimmed = candidate.trim();
|
|
91
|
-
if (!trimmed || trimmed.includes("|") || !
|
|
92
|
-
|
|
59
|
+
if (!trimmed || trimmed.includes("|") || !workflowExts.has(path.extname(trimmed).toLowerCase())) return null;
|
|
60
|
+
const resolved = path.isAbsolute(trimmed) ? trimmed : path.resolve(cwd, trimmed);
|
|
93
61
|
try {
|
|
94
|
-
|
|
62
|
+
if (!(await stat(resolved)).isFile()) throw new Error("Workflow path is not a file");
|
|
63
|
+
return resolved;
|
|
95
64
|
} catch (error) {
|
|
96
|
-
if (isMissingPathError(error)) return null;
|
|
65
|
+
if (/\s/.test(trimmed) && isMissingPathError(error)) return null;
|
|
97
66
|
throw error;
|
|
98
67
|
}
|
|
99
68
|
}
|
|
100
|
-
function parseWorkflowArgs(argsJson) {
|
|
101
|
-
return JSON.parse(argsJson);
|
|
102
|
-
}
|
|
103
69
|
function createEmbeddedToolContext(params, signal) {
|
|
104
70
|
const env = { ...process.env };
|
|
105
71
|
return {
|
|
@@ -127,7 +93,7 @@ async function withTimeout(timeoutMs, fn) {
|
|
|
127
93
|
resolve(value);
|
|
128
94
|
}, (error) => {
|
|
129
95
|
clearTimeout(timer);
|
|
130
|
-
reject(
|
|
96
|
+
reject(toErrorObject(error, "Non-Error rejection"));
|
|
131
97
|
});
|
|
132
98
|
});
|
|
133
99
|
}
|
|
@@ -154,41 +120,34 @@ function createEmbeddedLobsterRunner(options) {
|
|
|
154
120
|
const parsedArgsJson = params.argsJson?.trim() ?? "";
|
|
155
121
|
let args;
|
|
156
122
|
if (parsedArgsJson) try {
|
|
157
|
-
args =
|
|
123
|
+
args = JSON.parse(parsedArgsJson);
|
|
158
124
|
} catch {
|
|
159
125
|
throw new Error("run --args-json must be valid JSON");
|
|
160
126
|
}
|
|
161
|
-
return
|
|
127
|
+
return normalizeEnvelope(await runtime.runToolRequest({
|
|
162
128
|
filePath,
|
|
163
129
|
args,
|
|
164
130
|
ctx
|
|
165
|
-
}))
|
|
131
|
+
}));
|
|
166
132
|
}
|
|
167
|
-
return
|
|
133
|
+
return normalizeEnvelope(await runtime.runToolRequest({
|
|
168
134
|
pipeline,
|
|
169
135
|
ctx
|
|
170
|
-
}))
|
|
136
|
+
}));
|
|
171
137
|
}
|
|
172
138
|
const token = params.token?.trim() ?? "";
|
|
173
139
|
const approvalId = params.approvalId?.trim() ?? "";
|
|
174
140
|
if (!token && !approvalId) throw new Error("token or approvalId required");
|
|
175
141
|
if (typeof params.approve !== "boolean") throw new Error("approve required");
|
|
176
|
-
return
|
|
142
|
+
return normalizeEnvelope(await runtime.resumeToolRequest({
|
|
177
143
|
...token ? { token } : {},
|
|
178
144
|
...approvalId ? { approvalId } : {},
|
|
179
145
|
approved: params.approve,
|
|
180
146
|
ctx
|
|
181
|
-
}))
|
|
147
|
+
}));
|
|
182
148
|
});
|
|
183
149
|
} };
|
|
184
150
|
}
|
|
185
|
-
function toLintErrorObject(value, fallbackMessage) {
|
|
186
|
-
if (value instanceof Error) return value;
|
|
187
|
-
if (typeof value === "string") return new Error(value);
|
|
188
|
-
const error = new Error(fallbackMessage, { cause: value });
|
|
189
|
-
if (typeof value === "object" && value !== null || typeof value === "function") Object.assign(error, value);
|
|
190
|
-
return error;
|
|
191
|
-
}
|
|
192
151
|
//#endregion
|
|
193
152
|
//#region extensions/lobster/src/lobster-taskflow.ts
|
|
194
153
|
function toJsonLike(value, seen = /* @__PURE__ */ new WeakSet()) {
|
|
@@ -218,51 +177,30 @@ function toJsonLike(value, seen = /* @__PURE__ */ new WeakSet()) {
|
|
|
218
177
|
return null;
|
|
219
178
|
}
|
|
220
179
|
function buildApprovalWaitState(envelope) {
|
|
221
|
-
|
|
222
|
-
kind: "lobster_approval",
|
|
223
|
-
prompt: "",
|
|
224
|
-
items: []
|
|
225
|
-
};
|
|
180
|
+
const approval = envelope.requiresApproval;
|
|
226
181
|
return {
|
|
227
182
|
kind: "lobster_approval",
|
|
228
|
-
prompt:
|
|
229
|
-
items:
|
|
230
|
-
...
|
|
231
|
-
...
|
|
183
|
+
prompt: approval ? approval.prompt : "",
|
|
184
|
+
items: approval ? approval.items.map((item) => toJsonLike(item)) : [],
|
|
185
|
+
...approval?.resumeToken ? { resumeToken: approval.resumeToken } : {},
|
|
186
|
+
...approval?.approvalId ? { approvalId: approval.approvalId } : {}
|
|
232
187
|
};
|
|
233
188
|
}
|
|
234
189
|
function applyEnvelopeToFlow(params) {
|
|
235
190
|
const { taskFlow, flow, envelope, waitingStep } = params;
|
|
236
|
-
|
|
191
|
+
const flowMutation = {
|
|
237
192
|
flowId: flow.flowId,
|
|
238
193
|
expectedRevision: flow.revision
|
|
239
|
-
}
|
|
194
|
+
};
|
|
195
|
+
if (!envelope.ok) return taskFlow.fail(flowMutation);
|
|
240
196
|
if (envelope.status === "needs_approval") return taskFlow.setWaiting({
|
|
241
|
-
|
|
242
|
-
expectedRevision: flow.revision,
|
|
197
|
+
...flowMutation,
|
|
243
198
|
currentStep: waitingStep,
|
|
244
199
|
waitJson: buildApprovalWaitState(envelope)
|
|
245
200
|
});
|
|
246
|
-
return taskFlow.finish(
|
|
247
|
-
flowId: flow.flowId,
|
|
248
|
-
expectedRevision: flow.revision
|
|
249
|
-
});
|
|
201
|
+
return taskFlow.finish(flowMutation);
|
|
250
202
|
}
|
|
251
|
-
function
|
|
252
|
-
return new Error(envelope.error.message);
|
|
253
|
-
}
|
|
254
|
-
async function runManagedLobsterFlow(params) {
|
|
255
|
-
const createFlowParams = {
|
|
256
|
-
controllerId: params.controllerId,
|
|
257
|
-
goal: params.goal,
|
|
258
|
-
currentStep: params.currentStep ?? "run_lobster",
|
|
259
|
-
...params.stateJson !== void 0 ? { stateJson: params.stateJson } : {}
|
|
260
|
-
};
|
|
261
|
-
const flow = params.taskFlow.tryCreateManaged ? params.taskFlow.tryCreateManaged(createFlowParams) : params.taskFlow.createManaged(createFlowParams);
|
|
262
|
-
if (!flow) return {
|
|
263
|
-
ok: false,
|
|
264
|
-
error: /* @__PURE__ */ new Error("TaskFlow persistence failed.")
|
|
265
|
-
};
|
|
203
|
+
async function executeManagedLobsterFlow(params, flow, failureFlowId = flow.flowId) {
|
|
266
204
|
try {
|
|
267
205
|
const envelope = await params.runner.run(params.runnerParams);
|
|
268
206
|
const mutation = applyEnvelopeToFlow({
|
|
@@ -275,7 +213,7 @@ async function runManagedLobsterFlow(params) {
|
|
|
275
213
|
ok: false,
|
|
276
214
|
flow,
|
|
277
215
|
mutation,
|
|
278
|
-
error:
|
|
216
|
+
error: new Error(envelope.error.message)
|
|
279
217
|
};
|
|
280
218
|
return {
|
|
281
219
|
ok: true,
|
|
@@ -290,7 +228,7 @@ async function runManagedLobsterFlow(params) {
|
|
|
290
228
|
ok: false,
|
|
291
229
|
flow,
|
|
292
230
|
mutation: params.taskFlow.fail({
|
|
293
|
-
flowId:
|
|
231
|
+
flowId: failureFlowId,
|
|
294
232
|
expectedRevision: flow.revision
|
|
295
233
|
}),
|
|
296
234
|
error: err
|
|
@@ -304,6 +242,20 @@ async function runManagedLobsterFlow(params) {
|
|
|
304
242
|
}
|
|
305
243
|
}
|
|
306
244
|
}
|
|
245
|
+
async function runManagedLobsterFlow(params) {
|
|
246
|
+
const createFlowParams = {
|
|
247
|
+
controllerId: params.controllerId,
|
|
248
|
+
goal: params.goal,
|
|
249
|
+
currentStep: params.currentStep ?? "run_lobster",
|
|
250
|
+
...params.stateJson !== void 0 ? { stateJson: params.stateJson } : {}
|
|
251
|
+
};
|
|
252
|
+
const flow = params.taskFlow.tryCreateManaged ? params.taskFlow.tryCreateManaged(createFlowParams) : params.taskFlow.createManaged(createFlowParams);
|
|
253
|
+
if (!flow) return {
|
|
254
|
+
ok: false,
|
|
255
|
+
error: /* @__PURE__ */ new Error("TaskFlow persistence failed.")
|
|
256
|
+
};
|
|
257
|
+
return await executeManagedLobsterFlow(params, flow);
|
|
258
|
+
}
|
|
307
259
|
async function resumeManagedLobsterFlow(params) {
|
|
308
260
|
const resumed = params.taskFlow.resume({
|
|
309
261
|
flowId: params.flowId,
|
|
@@ -316,47 +268,7 @@ async function resumeManagedLobsterFlow(params) {
|
|
|
316
268
|
mutation: resumed,
|
|
317
269
|
error: /* @__PURE__ */ new Error(`TaskFlow resume failed: ${resumed.code}`)
|
|
318
270
|
};
|
|
319
|
-
|
|
320
|
-
const envelope = await params.runner.run(params.runnerParams);
|
|
321
|
-
const mutation = applyEnvelopeToFlow({
|
|
322
|
-
taskFlow: params.taskFlow,
|
|
323
|
-
flow: resumed.flow,
|
|
324
|
-
envelope,
|
|
325
|
-
waitingStep: params.waitingStep ?? "await_lobster_approval"
|
|
326
|
-
});
|
|
327
|
-
if (!envelope.ok) return {
|
|
328
|
-
ok: false,
|
|
329
|
-
flow: resumed.flow,
|
|
330
|
-
mutation,
|
|
331
|
-
error: buildEnvelopeError(envelope)
|
|
332
|
-
};
|
|
333
|
-
return {
|
|
334
|
-
ok: true,
|
|
335
|
-
envelope,
|
|
336
|
-
flow: resumed.flow,
|
|
337
|
-
mutation
|
|
338
|
-
};
|
|
339
|
-
} catch (error) {
|
|
340
|
-
const err = error instanceof Error ? error : new Error(String(error));
|
|
341
|
-
try {
|
|
342
|
-
const mutation = params.taskFlow.fail({
|
|
343
|
-
flowId: params.flowId,
|
|
344
|
-
expectedRevision: resumed.flow.revision
|
|
345
|
-
});
|
|
346
|
-
return {
|
|
347
|
-
ok: false,
|
|
348
|
-
flow: resumed.flow,
|
|
349
|
-
mutation,
|
|
350
|
-
error: err
|
|
351
|
-
};
|
|
352
|
-
} catch {
|
|
353
|
-
return {
|
|
354
|
-
ok: false,
|
|
355
|
-
flow: resumed.flow,
|
|
356
|
-
error: err
|
|
357
|
-
};
|
|
358
|
-
}
|
|
359
|
-
}
|
|
271
|
+
return await executeManagedLobsterFlow(params, resumed.flow, params.flowId);
|
|
360
272
|
}
|
|
361
273
|
//#endregion
|
|
362
274
|
//#region extensions/lobster/src/lobster-tool.ts
|
|
@@ -434,9 +346,10 @@ function parseResumeFlowParams(params) {
|
|
|
434
346
|
...waitingStep ? { waitingStep } : {}
|
|
435
347
|
};
|
|
436
348
|
}
|
|
437
|
-
function
|
|
349
|
+
function resolveManagedFlowToolResult(result) {
|
|
350
|
+
if (!result.ok) throw result.error;
|
|
438
351
|
return jsonResult({
|
|
439
|
-
...result.envelope
|
|
352
|
+
...result.envelope,
|
|
440
353
|
flow: result.flow,
|
|
441
354
|
mutation: result.mutation
|
|
442
355
|
});
|
|
@@ -445,10 +358,6 @@ function requireTaskFlowRuntime(taskFlow, action) {
|
|
|
445
358
|
if (!taskFlow) throw new Error(`Managed TaskFlow ${action} mode requires a bound taskFlow runtime`);
|
|
446
359
|
return taskFlow;
|
|
447
360
|
}
|
|
448
|
-
function resolveManagedFlowToolResult(result) {
|
|
449
|
-
if (!result.ok) throw result.error;
|
|
450
|
-
return formatManagedFlowResult(result);
|
|
451
|
-
}
|
|
452
361
|
function createLobsterTool(api, options) {
|
|
453
362
|
const runner = options?.runner ?? createEmbeddedLobsterRunner();
|
|
454
363
|
return {
|
|
@@ -30,11 +30,11 @@ jobs:
|
|
|
30
30
|
matrix:
|
|
31
31
|
node-version: ['20', '22', '24', '26']
|
|
32
32
|
steps:
|
|
33
|
-
- uses: actions/checkout@v7
|
|
33
|
+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
34
34
|
with:
|
|
35
35
|
persist-credentials: false
|
|
36
36
|
|
|
37
|
-
- uses: actions/setup-node@
|
|
37
|
+
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
|
38
38
|
with:
|
|
39
39
|
node-version: ${{ matrix.node-version }}
|
|
40
40
|
cache: 'npm'
|
|
@@ -54,11 +54,11 @@ jobs:
|
|
|
54
54
|
matrix:
|
|
55
55
|
node-version: ['16', '18', '20', '22', '24', '26']
|
|
56
56
|
steps:
|
|
57
|
-
- uses: actions/checkout@v7
|
|
57
|
+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
58
58
|
with:
|
|
59
59
|
persist-credentials: false
|
|
60
60
|
|
|
61
|
-
- uses: actions/setup-node@
|
|
61
|
+
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
|
62
62
|
with:
|
|
63
63
|
node-version: ${{ matrix.node-version }}
|
|
64
64
|
cache: 'npm'
|
|
@@ -77,11 +77,11 @@ jobs:
|
|
|
77
77
|
permissions:
|
|
78
78
|
contents: read
|
|
79
79
|
steps:
|
|
80
|
-
- uses: actions/checkout@v7
|
|
80
|
+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
81
81
|
with:
|
|
82
82
|
persist-credentials: false
|
|
83
83
|
|
|
84
|
-
- uses: actions/setup-node@
|
|
84
|
+
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
|
85
85
|
with:
|
|
86
86
|
node-version: '10'
|
|
87
87
|
cache: 'npm'
|
|
@@ -119,11 +119,11 @@ jobs:
|
|
|
119
119
|
permissions:
|
|
120
120
|
contents: read
|
|
121
121
|
steps:
|
|
122
|
-
- uses: actions/checkout@v7
|
|
122
|
+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
123
123
|
with:
|
|
124
124
|
persist-credentials: false
|
|
125
125
|
|
|
126
|
-
- uses: actions/setup-node@
|
|
126
|
+
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
|
127
127
|
with:
|
|
128
128
|
node-version: '24'
|
|
129
129
|
cache: 'npm'
|
|
@@ -147,7 +147,7 @@ jobs:
|
|
|
147
147
|
permissions:
|
|
148
148
|
contents: write
|
|
149
149
|
pull-requests: write
|
|
150
|
-
uses: fastify/workflows/.github/workflows/plugins-ci.yml@v6
|
|
150
|
+
uses: fastify/workflows/.github/workflows/plugins-ci.yml@2073dc8e1f9e172bf42daa3843c9dbd31af1e8cb # v6.0.0
|
|
151
151
|
with:
|
|
152
152
|
license-check: true
|
|
153
153
|
lint: true
|
package/node_modules/@clawdbot/lobster/node_modules/fast-uri/.github/workflows/ossf-scorecard.yml
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
name: OSSF Scorecard Analysis
|
|
2
|
+
|
|
3
|
+
# **What it does**: Runs OSSF Scorecard analysis on the repository and uploads the results.
|
|
4
|
+
# **Why we have it**: Security scanning.
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
branch_protection_rule:
|
|
8
|
+
push:
|
|
9
|
+
branches:
|
|
10
|
+
- main
|
|
11
|
+
paths-ignore:
|
|
12
|
+
- "docs/**"
|
|
13
|
+
- "*.md"
|
|
14
|
+
schedule:
|
|
15
|
+
# ┌───────────── minute (0 - 59)
|
|
16
|
+
# │ ┌───────────── hour (0 - 23)
|
|
17
|
+
# │ │ ┌───────────── day of the month (1 - 31)
|
|
18
|
+
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
|
|
19
|
+
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
|
|
20
|
+
# │ │ │ │ │
|
|
21
|
+
# │ │ │ │ │
|
|
22
|
+
# │ │ │ │ │
|
|
23
|
+
# * * * * *
|
|
24
|
+
- cron: "21 17 * * 0"
|
|
25
|
+
# Allows this workflow to be run manually from the Actions tab
|
|
26
|
+
workflow_dispatch:
|
|
27
|
+
|
|
28
|
+
# This allows a subsequently queued workflow run to interrupt previous runs
|
|
29
|
+
concurrency:
|
|
30
|
+
group: "${{ github.workflow }}-${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
|
|
31
|
+
cancel-in-progress: true
|
|
32
|
+
|
|
33
|
+
permissions:
|
|
34
|
+
contents: read
|
|
35
|
+
|
|
36
|
+
jobs:
|
|
37
|
+
analysis:
|
|
38
|
+
name: OSSF Scorecard Analysis
|
|
39
|
+
permissions:
|
|
40
|
+
contents: read
|
|
41
|
+
id-token: write
|
|
42
|
+
security-events: write
|
|
43
|
+
uses: fastify/workflows/.github/workflows/reusable-ossf-scorecard.yml@ef591e2186785d5ab36b9fe6a79c7ce2f1d94e57 #v7.0.0
|
|
44
|
+
with:
|
|
45
|
+
publish_results: true
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
[](https://www.npmjs.com/package/fast-uri)
|
|
4
4
|
[](https://github.com/fastify/fast-uri/actions/workflows/ci.yml)
|
|
5
5
|
[](https://github.com/neostandard/neostandard)
|
|
6
|
+
[](https://scorecard.dev/viewer/?uri=github.com/fastify/fast-uri)
|
|
6
7
|
|
|
7
8
|
Dependency-free RFC 3986 URI toolbox.
|
|
8
9
|
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
This document describes the management of vulnerabilities for `fast-uri`, an
|
|
4
|
+
official Fastify project package. It supplements the Fastify project's
|
|
5
|
+
[organization-wide security policy](https://github.com/fastify/.github/blob/main/SECURITY.md).
|
|
6
|
+
|
|
7
|
+
## Standards and scope
|
|
8
|
+
|
|
9
|
+
`fast-uri` implements URI parsing and normalization according to
|
|
10
|
+
[RFC 3986](https://www.rfc-editor.org/rfc/rfc3986). It does not implement the
|
|
11
|
+
[WHATWG URL Standard](https://url.spec.whatwg.org/).
|
|
12
|
+
|
|
13
|
+
Differences between `fast-uri` and WHATWG URL implementations are expected.
|
|
14
|
+
Reports based on comparing or mixing parsers that follow these different
|
|
15
|
+
standards are out of scope. Applications must use the same parsing and
|
|
16
|
+
normalization rules for both security decisions and subsequent URI use.
|
|
17
|
+
|
|
18
|
+
## Threat model
|
|
19
|
+
|
|
20
|
+
`fast-uri`'s threat model extends the
|
|
21
|
+
[Node.js threat model](https://github.com/nodejs/node/blob/main/SECURITY.md#the-nodejs-threat-model).
|
|
22
|
+
|
|
23
|
+
**Trusted:** Application code, parser options, configuration, and the runtime
|
|
24
|
+
environment.
|
|
25
|
+
|
|
26
|
+
**Untrusted:** URI and IRI strings passed to the package's public APIs.
|
|
27
|
+
|
|
28
|
+
### Examples of vulnerabilities
|
|
29
|
+
|
|
30
|
+
- RFC 3986 parsing or normalization flaws that bypass security controls
|
|
31
|
+
- Denial of service through malformed input
|
|
32
|
+
- Inconsistent parsing or normalization between `fast-uri` APIs
|
|
33
|
+
|
|
34
|
+
### Examples of non-vulnerabilities
|
|
35
|
+
|
|
36
|
+
The following are **not** considered vulnerabilities in `fast-uri`:
|
|
37
|
+
|
|
38
|
+
- **Different URL standards:** Differences between RFC 3986 behavior and
|
|
39
|
+
WHATWG URL behavior, including differences exposed by mixing parsers that
|
|
40
|
+
implement those standards
|
|
41
|
+
- **Unsupported scheme semantics:** Scheme-specific behavior for schemes that
|
|
42
|
+
`fast-uri` does not document as supported
|
|
43
|
+
- **Application code vulnerabilities:** Security flaws in code that consumes
|
|
44
|
+
`fast-uri` output
|
|
45
|
+
- **Configuration mistakes:** Security issues caused by incorrect parser
|
|
46
|
+
options or application configuration
|
|
47
|
+
- **Missing security features:** Application-level protections that are not
|
|
48
|
+
part of URI parsing or normalization
|
|
49
|
+
- **Third-party dependencies:** Vulnerabilities in packages used by an
|
|
50
|
+
application alongside `fast-uri`
|
|
51
|
+
|
|
52
|
+
## Reporting vulnerabilities
|
|
53
|
+
|
|
54
|
+
Individuals who find potential vulnerabilities in `fast-uri` are invited to
|
|
55
|
+
complete a vulnerability report via the
|
|
56
|
+
[GitHub Security page][advisory].
|
|
57
|
+
|
|
58
|
+
Do not assign or request a CVE directly.
|
|
59
|
+
CVE assignment is handled by the Fastify Security Team.
|
|
60
|
+
Fastify falls under the [OpenJS CNA](https://cna.openjsf.org/).
|
|
61
|
+
A CVE will be assigned as part of our responsible disclosure process.
|
|
62
|
+
|
|
63
|
+
> [!NOTE]
|
|
64
|
+
> Fastify's [HackerOne](https://hackerone.com/fastify) program is now closed.
|
|
65
|
+
|
|
66
|
+
[advisory]: ../../security/advisories/new
|
|
67
|
+
|
|
68
|
+
### Strict measures when reporting vulnerabilities
|
|
69
|
+
|
|
70
|
+
It is of the utmost importance that you read carefully and follow these
|
|
71
|
+
guidelines to ensure the ecosystem as a whole is not disrupted due to
|
|
72
|
+
improperly reported vulnerabilities:
|
|
73
|
+
|
|
74
|
+
- Avoid creating new "informative" reports. Only create a new report if you are
|
|
75
|
+
confident the issue is an actual vulnerability. Third-party vendors and
|
|
76
|
+
individuals track new GitHub security reports and may flag them for their
|
|
77
|
+
customers.
|
|
78
|
+
- Security reports should never be created and triaged by the same person. A
|
|
79
|
+
second Security Team member must triage a report submitted by a team member
|
|
80
|
+
or on their behalf. If in doubt, invite more Fastify collaborators to help
|
|
81
|
+
review the report.
|
|
82
|
+
- **Do not** attempt to demonstrate CI/CD vulnerabilities by creating pull
|
|
83
|
+
requests in Fastify organization repositories. Doing so will result in a
|
|
84
|
+
[content report][content-report] to GitHub as an unsolicited exploit. Create
|
|
85
|
+
a separate repository configured like the affected repository and provide
|
|
86
|
+
the proof of concept there instead.
|
|
87
|
+
|
|
88
|
+
[content-report]: https://docs.github.com/en/communities/maintaining-your-safety-on-github/reporting-abuse-or-spam#reporting-an-issue-or-pull-request
|
|
89
|
+
|
|
90
|
+
### Vulnerabilities found outside this process
|
|
91
|
+
|
|
92
|
+
The Fastify project does not support vulnerability reporting outside the
|
|
93
|
+
process described in this document.
|
|
94
|
+
|
|
95
|
+
## Handling vulnerability reports
|
|
96
|
+
|
|
97
|
+
When a potential vulnerability is reported, the following actions are taken.
|
|
98
|
+
|
|
99
|
+
### Triage
|
|
100
|
+
|
|
101
|
+
**Delay:** 4 business days
|
|
102
|
+
|
|
103
|
+
Within 4 business days, a member of the Security Team provides a first response
|
|
104
|
+
to the reporter. The possible responses are:
|
|
105
|
+
|
|
106
|
+
- **Acceptance:** The report is considered a new vulnerability.
|
|
107
|
+
- **Rejection:** The report is not considered a new vulnerability.
|
|
108
|
+
- **Need more information:** The Security Team needs more information to
|
|
109
|
+
evaluate the report.
|
|
110
|
+
|
|
111
|
+
Triaging should include updating these issue fields:
|
|
112
|
+
|
|
113
|
+
- Asset: set or create the module affected by the report
|
|
114
|
+
- Severity: TBD, initially left empty
|
|
115
|
+
|
|
116
|
+
### Correction follow-up
|
|
117
|
+
|
|
118
|
+
**Delay:** 90 days
|
|
119
|
+
|
|
120
|
+
When a vulnerability is confirmed, a member of the Security Team volunteers to
|
|
121
|
+
follow up on the report.
|
|
122
|
+
|
|
123
|
+
With the reporter's help, they contact the maintainers of the vulnerable
|
|
124
|
+
package and may invite them as participants in the report. Together, they
|
|
125
|
+
define a publication date. Ideally, publication should not happen before the
|
|
126
|
+
package has been patched.
|
|
127
|
+
|
|
128
|
+
The report's vulnerable-version upper limit should be set to:
|
|
129
|
+
|
|
130
|
+
- `*` if no fixed version is available when the report is published
|
|
131
|
+
- the last vulnerable version, such as `<=1.2.3`, if the fix is released in
|
|
132
|
+
`1.2.4`
|
|
133
|
+
|
|
134
|
+
### Publication
|
|
135
|
+
|
|
136
|
+
**Delay:** 90 days
|
|
137
|
+
|
|
138
|
+
Within 90 days after triage, the vulnerability must be made public.
|
|
139
|
+
|
|
140
|
+
Vulnerability severity is assessed using
|
|
141
|
+
[CVSS v3](https://www.first.org/cvss/user-guide).
|
|
142
|
+
|
|
143
|
+
If package maintainers are actively developing a patch, the Security Team and
|
|
144
|
+
the reporter may approve an additional delay.
|
|
145
|
+
|
|
146
|
+
### Secondary contact
|
|
147
|
+
|
|
148
|
+
If you do not receive an acknowledgment within 6 business days, or cannot find
|
|
149
|
+
a private security contact, contact the OpenJS Foundation CNA at
|
|
150
|
+
<https://cna.openjsf.org/> or `security@lists.openjsf.org` for assistance.
|
|
151
|
+
|
|
152
|
+
The CNA can help ensure that reports are acknowledged, coordinate disclosure
|
|
153
|
+
timelines, and assign CVEs when necessary.
|
|
154
|
+
|
|
155
|
+
## The Fastify Security Team
|
|
156
|
+
|
|
157
|
+
The core team manages the security program, policy, and process.
|
|
158
|
+
|
|
159
|
+
Team members must keep all privileged information private. This includes the
|
|
160
|
+
existence of undisclosed issues, expected release dates, and upcoming patches.
|
|
161
|
+
|
|
162
|
+
### Members
|
|
163
|
+
|
|
164
|
+
- [Matteo Collina](https://github.com/mcollina)
|
|
165
|
+
- [Tomas Della Vedova](https://github.com/delvedor)
|
|
166
|
+
- [Vincent Le Goff](https://github.com/zekth)
|
|
167
|
+
- [KaKa Ng](https://github.com/climba03003)
|
|
168
|
+
- [James Sumners](https://github.com/jsumners)
|
|
@@ -26,7 +26,12 @@ function normalize (uri, options) {
|
|
|
26
26
|
*/
|
|
27
27
|
function resolve (baseURI, relativeURI, options) {
|
|
28
28
|
const schemelessOptions = options ? Object.assign({ scheme: 'null' }, options) : { scheme: 'null' }
|
|
29
|
-
const
|
|
29
|
+
const { parsed: baseParsed, malformedAuthorityOrPort: baseMalformed } = parseWithStatus(baseURI, schemelessOptions)
|
|
30
|
+
const { parsed: relativeParsed, malformedAuthorityOrPort: relativeMalformed } = parseWithStatus(relativeURI, schemelessOptions)
|
|
31
|
+
if (baseMalformed || relativeMalformed) {
|
|
32
|
+
throw new Error(baseParsed.error || relativeParsed.error || 'URI is malformed.')
|
|
33
|
+
}
|
|
34
|
+
const resolved = resolveComponent(baseParsed, relativeParsed, schemelessOptions, true)
|
|
30
35
|
schemelessOptions.skipEscape = true
|
|
31
36
|
return serialize(resolved, schemelessOptions)
|
|
32
37
|
}
|
|
@@ -206,6 +211,15 @@ const URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:
|
|
|
206
211
|
// with or without a scheme prefix, for the literal-backslash rejection below.
|
|
207
212
|
const AUTHORITY_PREFIX = /^(?:[^#/:?]+:)?\/\/([^/?#]*)/
|
|
208
213
|
|
|
214
|
+
// Captures the leading authority-introducer region after an optional scheme: a
|
|
215
|
+
// run of forward slashes, backslashes, and the characters the WHATWG URL parser
|
|
216
|
+
// removes before parsing (TAB U+0009, LF U+000A, CR U+000D). A valid introducer
|
|
217
|
+
// is exactly "//". Node treats "\" as "/" on special schemes and strips those
|
|
218
|
+
// characters first, so forms like "\\", "/\", "\/", "/<TAB>/", or a leading
|
|
219
|
+
// "<TAB>//" reach an authority in Node while fast-uri's URI_PARSE folds them into
|
|
220
|
+
// the path group (host confusion / SSRF / redirect bypass).
|
|
221
|
+
const AUTHORITY_INTRODUCER_REGION = /^(?:[^#/:?]+:)?([/\\\t\n\r]*)/
|
|
222
|
+
|
|
209
223
|
/**
|
|
210
224
|
* @param {import('./types/index').URIComponent} parsed
|
|
211
225
|
* @param {RegExpMatchArray} matches
|
|
@@ -265,6 +279,28 @@ function parseWithStatus (uri, opts) {
|
|
|
265
279
|
malformedAuthorityOrPort = true
|
|
266
280
|
}
|
|
267
281
|
|
|
282
|
+
// Reject a malformed or whitespace-smuggled authority introducer. fast-uri
|
|
283
|
+
// only recognizes a literal "//"; anything else in the leading separator run
|
|
284
|
+
// (a backslash, or a "//" that appears only after removing the TAB/LF/CR that
|
|
285
|
+
// Node strips) means the authority fast-uri parses differs from the one Node's
|
|
286
|
+
// URL resolves. Reject rather than rewrite, mirroring the literal-backslash
|
|
287
|
+
// guard above. Percent-encoded forms (%5C, %09) are untouched, valid data.
|
|
288
|
+
const introducerMatch = uri.match(AUTHORITY_INTRODUCER_REGION)
|
|
289
|
+
if (introducerMatch !== null) {
|
|
290
|
+
const region = introducerMatch[1]
|
|
291
|
+
const normalizedRegion = region.replace(/[\t\n\r]/g, '')
|
|
292
|
+
// Two or more leading separators introduce an authority.
|
|
293
|
+
if (normalizedRegion.length >= 2) {
|
|
294
|
+
if (normalizedRegion.slice(0, 2) !== '//') {
|
|
295
|
+
parsed.error = parsed.error || 'URI authority must not contain a literal backslash.'
|
|
296
|
+
malformedAuthorityOrPort = true
|
|
297
|
+
} else if (region.length !== normalizedRegion.length) {
|
|
298
|
+
parsed.error = parsed.error || 'URI authority introducer must not contain whitespace.'
|
|
299
|
+
malformedAuthorityOrPort = true
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
|
|
268
304
|
const matches = uri.match(URI_PARSE)
|
|
269
305
|
|
|
270
306
|
if (matches) {
|
|
@@ -221,3 +221,139 @@ test('parse does not reject a literal backslash in the query or fragment', (t) =
|
|
|
221
221
|
t.notOk(parsed.error, 'backslash in query/fragment does not mark the URI malformed')
|
|
222
222
|
t.equal(parsed.host, 'host.example.com', 'host parsed normally')
|
|
223
223
|
})
|
|
224
|
+
|
|
225
|
+
test('parse rejects a malformed authority introducer (\\\\, /\\, \\/) in place of //', (t) => {
|
|
226
|
+
// Regression: "\\", "/\\", "\\/" after the scheme colon are not valid authority
|
|
227
|
+
// introducers. Node's URL treats "\\" as interchangeable with "/" on special
|
|
228
|
+
// schemes, so "http:\\\\evil.com/path" would be parsed as host "evil.com" by
|
|
229
|
+
// Node, but fast-uri must reject it as malformed to prevent SSRF/redirect bypass.
|
|
230
|
+
const cases = [
|
|
231
|
+
'http:\\\\evil.com/path',
|
|
232
|
+
'http:/\\evil.com/path',
|
|
233
|
+
'http:\\/evil.com/path',
|
|
234
|
+
'ws:\\\\evil.com/chat',
|
|
235
|
+
'wss:\\\\evil.com/chat',
|
|
236
|
+
'ftp:\\\\evil.com/',
|
|
237
|
+
'\\\\evil.com/path'
|
|
238
|
+
]
|
|
239
|
+
|
|
240
|
+
t.plan(cases.length)
|
|
241
|
+
|
|
242
|
+
cases.forEach((input) => {
|
|
243
|
+
t.equal(
|
|
244
|
+
fastURI.parse(input).error,
|
|
245
|
+
'URI authority must not contain a literal backslash.',
|
|
246
|
+
input
|
|
247
|
+
)
|
|
248
|
+
})
|
|
249
|
+
})
|
|
250
|
+
|
|
251
|
+
test('normalize does not canonicalize a malformed-authority-introducer URI', (t) => {
|
|
252
|
+
const cases = [
|
|
253
|
+
'http:\\\\evil.com/path',
|
|
254
|
+
'http:/\\evil.com/path'
|
|
255
|
+
]
|
|
256
|
+
|
|
257
|
+
t.plan(cases.length)
|
|
258
|
+
|
|
259
|
+
cases.forEach((input) => {
|
|
260
|
+
t.equal(fastURI.normalize(input), input, input)
|
|
261
|
+
})
|
|
262
|
+
})
|
|
263
|
+
|
|
264
|
+
test('equal returns false for malformed-authority-introducer URIs', (t) => {
|
|
265
|
+
const pairs = [
|
|
266
|
+
['http:\\\\evil.com/path', 'http://evil.com/path'],
|
|
267
|
+
['http:/\\evil.com/path', 'http://evil.com/path']
|
|
268
|
+
]
|
|
269
|
+
|
|
270
|
+
t.plan(pairs.length)
|
|
271
|
+
|
|
272
|
+
pairs.forEach(([left, right]) => {
|
|
273
|
+
t.equal(fastURI.equal(left, right), false, `${left} != ${right}`)
|
|
274
|
+
})
|
|
275
|
+
})
|
|
276
|
+
|
|
277
|
+
test('resolve throws on malformed authority introducer', (t) => {
|
|
278
|
+
// resolve() returns a plain string with no error field, so the only safe
|
|
279
|
+
// behavior is to throw when either component has a malformed authority.
|
|
280
|
+
const pairs = [
|
|
281
|
+
['https://allowed.com/', '\\\\evil.com/path'],
|
|
282
|
+
['\\\\evil.com/path', 'https://allowed.com/'],
|
|
283
|
+
['https://allowed.com/', 'http:/\\evil.com/path'],
|
|
284
|
+
['https://allowed.com/', 'http:\\/evil.com/path']
|
|
285
|
+
]
|
|
286
|
+
|
|
287
|
+
t.plan(pairs.length)
|
|
288
|
+
|
|
289
|
+
pairs.forEach(([base, rel]) => {
|
|
290
|
+
t.throws(
|
|
291
|
+
() => fastURI.resolve(base, rel),
|
|
292
|
+
/URI authority must not contain a literal backslash/,
|
|
293
|
+
`${base} + ${rel}`
|
|
294
|
+
)
|
|
295
|
+
})
|
|
296
|
+
})
|
|
297
|
+
|
|
298
|
+
test('parse rejects a whitespace-split authority introducer (TAB, LF, CR)', (t) => {
|
|
299
|
+
// The WHATWG URL parser removes TAB (U+0009), LF (U+000A) and CR (U+000D) from
|
|
300
|
+
// the input before parsing, so a stripped character wedged into the introducer
|
|
301
|
+
// ("/<TAB>\\", "/<TAB>/", or a leading "<TAB>//") reaches an authority in Node
|
|
302
|
+
// while fast-uri would otherwise fold it into the path. These must be rejected
|
|
303
|
+
// like the adjacent "\\", "/\\", "\\/" forms.
|
|
304
|
+
const cases = [
|
|
305
|
+
{ input: '/\t\\evil.com/path', expectedError: 'URI authority must not contain a literal backslash.' },
|
|
306
|
+
{ input: '/\t/evil.com/path', expectedError: 'URI authority introducer must not contain whitespace.' },
|
|
307
|
+
{ input: '/\n\\evil.com/path', expectedError: 'URI authority must not contain a literal backslash.' },
|
|
308
|
+
{ input: '/\r\\evil.com/path', expectedError: 'URI authority must not contain a literal backslash.' },
|
|
309
|
+
{ input: '\t//evil.com/path', expectedError: 'URI authority introducer must not contain whitespace.' },
|
|
310
|
+
{ input: '\t/\\evil.com/path', expectedError: 'URI authority must not contain a literal backslash.' },
|
|
311
|
+
{ input: 'https:/\t/evil.com/path', expectedError: 'URI authority introducer must not contain whitespace.' }
|
|
312
|
+
]
|
|
313
|
+
|
|
314
|
+
t.plan(cases.length)
|
|
315
|
+
|
|
316
|
+
cases.forEach(({ input, expectedError }) => {
|
|
317
|
+
t.equal(fastURI.parse(input).error, expectedError, JSON.stringify(input))
|
|
318
|
+
})
|
|
319
|
+
})
|
|
320
|
+
|
|
321
|
+
test('resolve throws on a whitespace-split authority introducer', (t) => {
|
|
322
|
+
const pairs = [
|
|
323
|
+
['https://allowed.com/', '/\t\\evil.com/path'],
|
|
324
|
+
['https://allowed.com/', '/\t/evil.com/path'],
|
|
325
|
+
['https://allowed.com/', '/\n\\evil.com/path'],
|
|
326
|
+
['/\t/evil.com/path', 'https://allowed.com/']
|
|
327
|
+
]
|
|
328
|
+
|
|
329
|
+
t.plan(pairs.length)
|
|
330
|
+
|
|
331
|
+
pairs.forEach(([base, rel]) => {
|
|
332
|
+
t.throws(
|
|
333
|
+
() => fastURI.resolve(base, rel),
|
|
334
|
+
/URI authority (must not contain a literal backslash|introducer must not contain whitespace)/,
|
|
335
|
+
`${JSON.stringify(base)} + ${JSON.stringify(rel)}`
|
|
336
|
+
)
|
|
337
|
+
})
|
|
338
|
+
})
|
|
339
|
+
|
|
340
|
+
test('parse does not reject valid authority introducer patterns', (t) => {
|
|
341
|
+
// No false positives: "//" introducer and scheme-less "//" must be valid.
|
|
342
|
+
const cases = [
|
|
343
|
+
'http://good.com/',
|
|
344
|
+
'https://good.com/',
|
|
345
|
+
'ws://good.com/chat',
|
|
346
|
+
'wss://good.com/chat',
|
|
347
|
+
'ftp://good.com/',
|
|
348
|
+
'//good.com/path',
|
|
349
|
+
'/absolute/path',
|
|
350
|
+
'relative/path'
|
|
351
|
+
]
|
|
352
|
+
|
|
353
|
+
t.plan(cases.length)
|
|
354
|
+
|
|
355
|
+
cases.forEach((input) => {
|
|
356
|
+
const parsed = fastURI.parse(input)
|
|
357
|
+
t.notOk(parsed.error, input)
|
|
358
|
+
})
|
|
359
|
+
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/lobster",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.8.1-beta.3",
|
|
4
4
|
"description": "Lobster workflow tool plugin for typed pipelines and resumable approvals.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
"minHostVersion": ">=2026.4.25"
|
|
22
22
|
},
|
|
23
23
|
"compat": {
|
|
24
|
-
"pluginApi": ">=2026.
|
|
24
|
+
"pluginApi": ">=2026.8.1-beta.3"
|
|
25
25
|
},
|
|
26
26
|
"build": {
|
|
27
|
-
"openclawVersion": "2026.
|
|
27
|
+
"openclawVersion": "2026.8.1-beta.3"
|
|
28
28
|
},
|
|
29
29
|
"release": {
|
|
30
30
|
"publishToClawHub": true,
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"SKILL.md"
|
|
42
42
|
],
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"openclaw": ">=2026.
|
|
44
|
+
"openclaw": ">=2026.8.1-beta.3"
|
|
45
45
|
},
|
|
46
46
|
"peerDependenciesMeta": {
|
|
47
47
|
"openclaw": {
|