lua-cli 3.39.3 → 3.39.4
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/api-exports.d.ts +198 -0
- package/dist/api-exports.js +174 -8
- package/dist/api-exports.js.map +1 -1
- package/dist/index.js +132 -20
- package/dist/index.js.map +1 -1
- package/dist/workflow-builder.js +76 -0
- package/dist/workflow-builder.js.map +1 -1
- package/package.json +6 -4
- package/template/package.json +1 -1
package/dist/workflow-builder.js
CHANGED
|
@@ -221,6 +221,11 @@ function removeNavigateBlock(input) {
|
|
|
221
221
|
}
|
|
222
222
|
__name(removeNavigateBlock, "removeNavigateBlock");
|
|
223
223
|
__name2(removeNavigateBlock, "removeNavigateBlock");
|
|
224
|
+
function removeHiddenBlocks(input) {
|
|
225
|
+
return input.replace(/::: hide\b[\s\S]*?:::/gi, "").replace(/::: hide\b[\s\S]*$/gi, "").trim();
|
|
226
|
+
}
|
|
227
|
+
__name(removeHiddenBlocks, "removeHiddenBlocks");
|
|
228
|
+
__name2(removeHiddenBlocks, "removeHiddenBlocks");
|
|
224
229
|
function transformChatHistoryContentParts(parts) {
|
|
225
230
|
const content = [];
|
|
226
231
|
for (const rawPart of parts ?? []) {
|
|
@@ -1405,6 +1410,7 @@ var AGENT_LOG_SOURCES = [
|
|
|
1405
1410
|
"skill",
|
|
1406
1411
|
"job",
|
|
1407
1412
|
"webhook",
|
|
1413
|
+
"web-route",
|
|
1408
1414
|
"trigger",
|
|
1409
1415
|
"preprocessor",
|
|
1410
1416
|
"postprocessor",
|
|
@@ -4347,6 +4353,76 @@ function parsePublishedOnboardingResponse(value3) {
|
|
|
4347
4353
|
}
|
|
4348
4354
|
__name(parsePublishedOnboardingResponse, "parsePublishedOnboardingResponse");
|
|
4349
4355
|
__name2(parsePublishedOnboardingResponse, "parsePublishedOnboardingResponse");
|
|
4356
|
+
var WEB_ROUTE_PROTOCOL_VERSION = 1;
|
|
4357
|
+
var WEB_ROUTE_METHODS = [
|
|
4358
|
+
"GET",
|
|
4359
|
+
"POST",
|
|
4360
|
+
"PUT",
|
|
4361
|
+
"PATCH",
|
|
4362
|
+
"DELETE"
|
|
4363
|
+
];
|
|
4364
|
+
var WEB_ROUTE_REQUEST_HEADER_ALLOWLIST = [
|
|
4365
|
+
"accept",
|
|
4366
|
+
"accept-language",
|
|
4367
|
+
"content-type",
|
|
4368
|
+
"if-none-match",
|
|
4369
|
+
"idempotency-key"
|
|
4370
|
+
];
|
|
4371
|
+
var WEB_ROUTE_RESPONSE_HEADER_ALLOWLIST = [
|
|
4372
|
+
"content-type",
|
|
4373
|
+
"cache-control",
|
|
4374
|
+
"etag",
|
|
4375
|
+
"location",
|
|
4376
|
+
"content-disposition",
|
|
4377
|
+
"content-language"
|
|
4378
|
+
];
|
|
4379
|
+
function isForwardableWebRouteRequestHeader(name) {
|
|
4380
|
+
const n2 = name.toLowerCase();
|
|
4381
|
+
return WEB_ROUTE_REQUEST_HEADER_ALLOWLIST.includes(n2) || n2.startsWith("x-lua-");
|
|
4382
|
+
}
|
|
4383
|
+
__name(isForwardableWebRouteRequestHeader, "isForwardableWebRouteRequestHeader");
|
|
4384
|
+
__name2(isForwardableWebRouteRequestHeader, "isForwardableWebRouteRequestHeader");
|
|
4385
|
+
function isForwardableWebRouteResponseHeader(name) {
|
|
4386
|
+
const n2 = name.toLowerCase();
|
|
4387
|
+
if (n2 === "set-cookie") return false;
|
|
4388
|
+
return WEB_ROUTE_RESPONSE_HEADER_ALLOWLIST.includes(n2) || n2.startsWith("x-lua-");
|
|
4389
|
+
}
|
|
4390
|
+
__name(isForwardableWebRouteResponseHeader, "isForwardableWebRouteResponseHeader");
|
|
4391
|
+
__name2(isForwardableWebRouteResponseHeader, "isForwardableWebRouteResponseHeader");
|
|
4392
|
+
var WEB_ROUTE_MAX_REQUEST_BODY_BYTES = 1 * 1024 * 1024;
|
|
4393
|
+
var WEB_ROUTE_MAX_RESPONSE_BYTES = 4 * 1024 * 1024;
|
|
4394
|
+
function isWebRouteBody(value3) {
|
|
4395
|
+
if (!value3 || typeof value3 !== "object") return false;
|
|
4396
|
+
const b = value3;
|
|
4397
|
+
if (b.kind === "json") return "value" in b;
|
|
4398
|
+
if (b.kind === "text" || b.kind === "base64") return typeof b.value === "string";
|
|
4399
|
+
return false;
|
|
4400
|
+
}
|
|
4401
|
+
__name(isWebRouteBody, "isWebRouteBody");
|
|
4402
|
+
__name2(isWebRouteBody, "isWebRouteBody");
|
|
4403
|
+
function isWebRouteInput(value3) {
|
|
4404
|
+
if (!value3 || typeof value3 !== "object") return false;
|
|
4405
|
+
const v = value3;
|
|
4406
|
+
if (v.v !== WEB_ROUTE_PROTOCOL_VERSION) return false;
|
|
4407
|
+
const r = v.request;
|
|
4408
|
+
if (!r || typeof r !== "object") return false;
|
|
4409
|
+
if (!WEB_ROUTE_METHODS.includes(String(r.method))) return false;
|
|
4410
|
+
if (typeof r.path !== "string" || !r.path.startsWith("/")) return false;
|
|
4411
|
+
if (!r.params || typeof r.params !== "object") return false;
|
|
4412
|
+
if (!r.query || typeof r.query !== "object") return false;
|
|
4413
|
+
if (!r.headers || typeof r.headers !== "object") return false;
|
|
4414
|
+
if (r.body !== void 0) {
|
|
4415
|
+
if (r.method === "GET") return false;
|
|
4416
|
+
if (!isWebRouteBody(r.body)) return false;
|
|
4417
|
+
}
|
|
4418
|
+
const a = v.auth;
|
|
4419
|
+
if (!a || typeof a.userId !== "string" || typeof a.orgId !== "string" || typeof a.agentId !== "string") return false;
|
|
4420
|
+
const app = v.app;
|
|
4421
|
+
if (!app || typeof app.id !== "string" || typeof app.name !== "string" || typeof app.origin !== "string") return false;
|
|
4422
|
+
return true;
|
|
4423
|
+
}
|
|
4424
|
+
__name(isWebRouteInput, "isWebRouteInput");
|
|
4425
|
+
__name2(isWebRouteInput, "isWebRouteInput");
|
|
4350
4426
|
|
|
4351
4427
|
// ../workflow-graph/dist/index.mjs
|
|
4352
4428
|
import { createHash } from "crypto";
|