lua-cli 3.49.1 → 3.50.0
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 +180 -22
- package/dist/api-exports.js +375 -27
- package/dist/api-exports.js.map +1 -1
- package/dist/index.js +486 -66
- package/dist/index.js.map +1 -1
- package/dist/workflow-builder.js +220 -20
- package/dist/workflow-builder.js.map +1 -1
- package/docs/CLI_REFERENCE.md +2 -1
- package/docs/README.md +3 -3
- package/docs/api/Agents.md +51 -9
- package/docs/api/Data.md +51 -0
- package/docs/api/Decisions.md +49 -13
- package/docs/api/LuaDecision.md +2 -2
- package/docs/api/Workflows.md +1 -0
- package/docs/workflows/schedules.md +1 -1
- package/package.json +3 -3
- package/template/package.json +1 -1
package/dist/workflow-builder.js
CHANGED
|
@@ -1184,9 +1184,40 @@ function aiGenerateInputFromSimplified(prompt, content) {
|
|
|
1184
1184
|
__name(aiGenerateInputFromSimplified, "aiGenerateInputFromSimplified");
|
|
1185
1185
|
__name4(aiGenerateInputFromSimplified, "aiGenerateInputFromSimplified");
|
|
1186
1186
|
var DECISION_PROVIDERS = [
|
|
1187
|
+
"jev",
|
|
1188
|
+
"openai",
|
|
1189
|
+
"openrouter"
|
|
1190
|
+
];
|
|
1191
|
+
var DECISION_FALLBACK_PROVIDERS = [
|
|
1187
1192
|
"jev",
|
|
1188
1193
|
"openai"
|
|
1189
1194
|
];
|
|
1195
|
+
var OPENROUTER_DIRECT_VENDORS = [
|
|
1196
|
+
{
|
|
1197
|
+
pattern: /^~?typesafe\//,
|
|
1198
|
+
provider: "jev"
|
|
1199
|
+
},
|
|
1200
|
+
{
|
|
1201
|
+
pattern: /^openai\//,
|
|
1202
|
+
provider: "openai"
|
|
1203
|
+
}
|
|
1204
|
+
];
|
|
1205
|
+
function directProviderOfOpenRouterModel(model) {
|
|
1206
|
+
return OPENROUTER_DIRECT_VENDORS.find((vendor) => vendor.pattern.test(model))?.provider;
|
|
1207
|
+
}
|
|
1208
|
+
__name(directProviderOfOpenRouterModel, "directProviderOfOpenRouterModel");
|
|
1209
|
+
__name4(directProviderOfOpenRouterModel, "directProviderOfOpenRouterModel");
|
|
1210
|
+
var OPENROUTER_NEEDS_MODEL_MESSAGE = "provider openrouter needs a model id, such as liquid/d1";
|
|
1211
|
+
function openRouterModelIssue(options) {
|
|
1212
|
+
const model = typeof options.model === "string" && options.model ? options.model : void 0;
|
|
1213
|
+
if (options.provider === "openrouter" && !model) return OPENROUTER_NEEDS_MODEL_MESSAGE;
|
|
1214
|
+
if (!model || !model.includes("/")) return null;
|
|
1215
|
+
const direct = directProviderOfOpenRouterModel(model);
|
|
1216
|
+
if (!direct) return null;
|
|
1217
|
+
return `model ${model} runs on provider '${direct}': set provider '${direct}' instead of a vendor/model id`;
|
|
1218
|
+
}
|
|
1219
|
+
__name(openRouterModelIssue, "openRouterModelIssue");
|
|
1220
|
+
__name4(openRouterModelIssue, "openRouterModelIssue");
|
|
1190
1221
|
var DECISION_NAME_PATTERN = /^[a-zA-Z0-9_-]{1,64}$/;
|
|
1191
1222
|
var DECISION_SANDBOX_TOOL_SEPARATOR = "#";
|
|
1192
1223
|
function formatDecisionSandboxPrimitive(name, tool) {
|
|
@@ -1270,7 +1301,7 @@ var DecisionOptionsSchema = z.object({
|
|
|
1270
1301
|
]).optional(),
|
|
1271
1302
|
model: z.string().min(1).optional(),
|
|
1272
1303
|
fallback: z.union([
|
|
1273
|
-
z.enum(
|
|
1304
|
+
z.enum(DECISION_FALLBACK_PROVIDERS),
|
|
1274
1305
|
z.literal("none")
|
|
1275
1306
|
]).optional(),
|
|
1276
1307
|
region: z.literal("eu").optional(),
|
|
@@ -1299,6 +1330,16 @@ var DecisionDefinitionSchema = DecisionOptionsSchema.extend({
|
|
|
1299
1330
|
description: z.string().max(DECISION_LIMITS.maxInstructionChars).optional(),
|
|
1300
1331
|
questions: DecisionQuestionsSchema
|
|
1301
1332
|
}).strict();
|
|
1333
|
+
var DecisionDefinitionWriteSchema = DecisionDefinitionSchema.superRefine((definition, ctx) => {
|
|
1334
|
+
const issue = openRouterModelIssue(definition);
|
|
1335
|
+
if (issue) ctx.addIssue({
|
|
1336
|
+
code: z.ZodIssueCode.custom,
|
|
1337
|
+
path: [
|
|
1338
|
+
"model"
|
|
1339
|
+
],
|
|
1340
|
+
message: issue
|
|
1341
|
+
});
|
|
1342
|
+
});
|
|
1302
1343
|
var INTEGRATION_PASSTHROUGH_READ_METHODS = [
|
|
1303
1344
|
"GET",
|
|
1304
1345
|
"HEAD"
|
|
@@ -1666,7 +1707,14 @@ var SUPERVISION_OPS = {
|
|
|
1666
1707
|
* the target (`snapshot.jobs[]`) so the promote activates and schedules it. Mongo-only marker write; EventBridge stays
|
|
1667
1708
|
* on the post-promote reconcile. Release-class: needs `register-job` AND `release` on the grant, from a signed step.
|
|
1668
1709
|
*/
|
|
1669
|
-
"jobs.register": "register-job"
|
|
1710
|
+
"jobs.register": "register-job",
|
|
1711
|
+
// [SW]
|
|
1712
|
+
/**
|
|
1713
|
+
* SW — `Agents.secrets(id).put(collection, key, value)`: write ONE secret row into the TARGET's own Data, in a
|
|
1714
|
+
* collection the grant names in `secretWriteCollections` (deny by default), keyed by `data._pk`. The value never
|
|
1715
|
+
* comes back: the answer is `{ ok, id, fingerprint }`, and the audit row carries the fingerprint only.
|
|
1716
|
+
*/
|
|
1717
|
+
"secrets.put": "act"
|
|
1670
1718
|
};
|
|
1671
1719
|
function isSupervisionOp(op) {
|
|
1672
1720
|
return typeof op === "string" && Object.prototype.hasOwnProperty.call(SUPERVISION_OPS, op);
|
|
@@ -1865,6 +1913,12 @@ var SUPERVISION_OPS_WAVE2 = {
|
|
|
1865
1913
|
gate: "register-job",
|
|
1866
1914
|
targeted: true,
|
|
1867
1915
|
item: "JR"
|
|
1916
|
+
},
|
|
1917
|
+
/** SW — `Agents.secrets(id).put(collection, key, value)`: one secret row in a `secretWriteCollections` collection. */
|
|
1918
|
+
"secrets.put": {
|
|
1919
|
+
gate: "act",
|
|
1920
|
+
targeted: true,
|
|
1921
|
+
item: "SW"
|
|
1868
1922
|
}
|
|
1869
1923
|
};
|
|
1870
1924
|
var SUPERVISION_WATCHDOG_OPS = {
|
|
@@ -4032,6 +4086,12 @@ var SECRET_LITERAL_PATTERNS = [
|
|
|
4032
4086
|
{
|
|
4033
4087
|
re: /\b(npm_)[A-Za-z0-9]{36}\b/g
|
|
4034
4088
|
},
|
|
4089
|
+
// Linear personal API keys (`lin_api_` + 40) and OAuth access / refresh tokens (`lin_oauth_` + 64 hex,
|
|
4090
|
+
// `lin_refresh_`): the fleet's Engineering Manager hands OAuth tokens to agents in a prompt + tool call, and
|
|
4091
|
+
// both landed verbatim in `vmExecutionLogs` (2026-10-11).
|
|
4092
|
+
{
|
|
4093
|
+
re: /\b(lin_(?:api|oauth|refresh)_)[A-Za-z0-9]{16,}/g
|
|
4094
|
+
},
|
|
4035
4095
|
{
|
|
4036
4096
|
re: /\b(sk-ant-)[A-Za-z0-9_-]{16,}/g
|
|
4037
4097
|
},
|
|
@@ -4050,11 +4110,16 @@ var SECRET_LITERAL_PATTERNS = [
|
|
|
4050
4110
|
{
|
|
4051
4111
|
re: /\b(ya29\.)[A-Za-z0-9_-]{20,}/g
|
|
4052
4112
|
},
|
|
4113
|
+
// 2026-10-11: `(?<![A-Za-z0-9_-])`, not `\b` — with `\b` every `eyJ` after a `-` / `_` started an attempt that
|
|
4114
|
+
// ran the first segment to the end of the run and failed on the missing `.`, so `eyJabcdefgh-` × 1 MB took
|
|
4115
|
+
// ~115 s (quadratic). Now a run of segment characters admits at most one attempt.
|
|
4053
4116
|
{
|
|
4054
|
-
re:
|
|
4117
|
+
re: /(?<![A-Za-z0-9_-])(eyJ)[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}/g
|
|
4055
4118
|
},
|
|
4119
|
+
// 2026-10-11: the body stops at the next `-----BEGIN ` — a lazy `[\s\S]*?` let every unterminated BEGIN scan to the
|
|
4120
|
+
// end of the text (quadratic on a repeated header with no END). A key whose END follows is matched as before.
|
|
4056
4121
|
{
|
|
4057
|
-
re: /(-----BEGIN [A-Z ]*PRIVATE KEY-----)[\s\S]*?-----END [A-Z ]*PRIVATE KEY-----/g
|
|
4122
|
+
re: /(-----BEGIN [A-Z ]*PRIVATE KEY-----)(?:(?!-----BEGIN )[\s\S])*?-----END [A-Z ]*PRIVATE KEY-----/g
|
|
4058
4123
|
},
|
|
4059
4124
|
// `https://x-access-token:<token>@github.com/…` (the git credential shape the pod scrubbed already)
|
|
4060
4125
|
{
|
|
@@ -4062,7 +4127,7 @@ var SECRET_LITERAL_PATTERNS = [
|
|
|
4062
4127
|
suffix: true
|
|
4063
4128
|
}
|
|
4064
4129
|
];
|
|
4065
|
-
var SECRET_NAME = "(?:authorization|proxy-authorization|x-api-key|x-wf-[a-z-]*key|x-internal-auth|api[_-]?key|apikey|access[_-]?key|secret[_-]?key|private[_-]?key|client[_-]?secret|secret|password|passwd|pwd|passphrase|token|credentials?)";
|
|
4130
|
+
var SECRET_NAME = "(?:access[_-]?token|refresh[_-]?token|id[_-]?token|auth[_-]?token|authorization|proxy-authorization|x-api-key|x-wf-[a-z-]*key|x-internal-auth|api[_-]?key|apikey|access[_-]?key|secret[_-]?key|private[_-]?key|client[_-]?secret|secret|password|passwd|pwd|passphrase|token|credentials?)";
|
|
4066
4131
|
var SECRET_PAIR_PATTERNS = [
|
|
4067
4132
|
// `Authorization: Bearer x`, `x-api-key: x`, `AWS_SECRET_ACCESS_KEY=x`, `SVC_JOB_KEY=x`, `"apiKey": "x"`,
|
|
4068
4133
|
// `FOO_TOKEN=x`, `secretKey=x`, `password=x`. Groups: the char before the name, the name, the separator
|
|
@@ -4221,6 +4286,38 @@ function scrubStepErrorMessage(raw) {
|
|
|
4221
4286
|
}
|
|
4222
4287
|
__name(scrubStepErrorMessage, "scrubStepErrorMessage");
|
|
4223
4288
|
__name4(scrubStepErrorMessage, "scrubStepErrorMessage");
|
|
4289
|
+
var SCRUB_DEEP_MAX_DEPTH = 12;
|
|
4290
|
+
function scrubSecretsDeep(value3, options = {}) {
|
|
4291
|
+
return scrubDeep(value3, 0, /* @__PURE__ */ new WeakSet(), options.text !== false);
|
|
4292
|
+
}
|
|
4293
|
+
__name(scrubSecretsDeep, "scrubSecretsDeep");
|
|
4294
|
+
__name4(scrubSecretsDeep, "scrubSecretsDeep");
|
|
4295
|
+
function isPlainObject2(v) {
|
|
4296
|
+
if (!v || typeof v !== "object") return false;
|
|
4297
|
+
const proto = Object.getPrototypeOf(v);
|
|
4298
|
+
return proto === Object.prototype || proto === null;
|
|
4299
|
+
}
|
|
4300
|
+
__name(isPlainObject2, "isPlainObject2");
|
|
4301
|
+
__name4(isPlainObject2, "isPlainObject");
|
|
4302
|
+
function scrubDeep(value3, depth, seen, text2) {
|
|
4303
|
+
if (typeof value3 === "string") return text2 ? scrubSecretText(value3) : value3;
|
|
4304
|
+
if (!value3 || typeof value3 !== "object") return value3;
|
|
4305
|
+
if (!Array.isArray(value3) && !isPlainObject2(value3)) return value3;
|
|
4306
|
+
if (depth >= SCRUB_DEEP_MAX_DEPTH || seen.has(value3)) return REDACTED_PLACEHOLDER;
|
|
4307
|
+
seen.add(value3);
|
|
4308
|
+
try {
|
|
4309
|
+
if (Array.isArray(value3)) return value3.map((v) => scrubDeep(v, depth + 1, seen, text2));
|
|
4310
|
+
const out = {};
|
|
4311
|
+
for (const [k, v] of Object.entries(value3)) {
|
|
4312
|
+
out[k] = isWorkflowSecretKey(k) && v !== null && v !== void 0 && typeof v !== "boolean" ? REDACTED_PLACEHOLDER : scrubDeep(v, depth + 1, seen, text2);
|
|
4313
|
+
}
|
|
4314
|
+
return out;
|
|
4315
|
+
} finally {
|
|
4316
|
+
seen.delete(value3);
|
|
4317
|
+
}
|
|
4318
|
+
}
|
|
4319
|
+
__name(scrubDeep, "scrubDeep");
|
|
4320
|
+
__name4(scrubDeep, "scrubDeep");
|
|
4224
4321
|
var TEST_SESSION_ID_PATTERN = /^tsn_[0-9a-f-]{36}$/;
|
|
4225
4322
|
function isTestSessionId(value3) {
|
|
4226
4323
|
return typeof value3 === "string" && TEST_SESSION_ID_PATTERN.test(value3);
|
|
@@ -4396,6 +4493,89 @@ function supervisionAccessBindingViolation(merged) {
|
|
|
4396
4493
|
}
|
|
4397
4494
|
__name(supervisionAccessBindingViolation, "supervisionAccessBindingViolation");
|
|
4398
4495
|
__name4(supervisionAccessBindingViolation, "supervisionAccessBindingViolation");
|
|
4496
|
+
var SUPERVISED_SECRET_LIMITS = {
|
|
4497
|
+
/** Fields in `value` (the `_pk` field included). */
|
|
4498
|
+
maxFields: 32,
|
|
4499
|
+
/** One string field's length. */
|
|
4500
|
+
maxStringLength: 8192,
|
|
4501
|
+
/** The canonical JSON of the whole row. */
|
|
4502
|
+
maxBytes: 16384
|
|
4503
|
+
};
|
|
4504
|
+
var SUPERVISED_SECRET_NAME_RE = /^[A-Za-z0-9_.:-]{1,128}$/;
|
|
4505
|
+
var SUPERVISED_SECRET_FIELD_RE = /^[A-Za-z_][A-Za-z0-9_]{0,63}$/;
|
|
4506
|
+
var SUPERVISED_SECRET_KEY_FIELD = "_pk";
|
|
4507
|
+
var SUPERVISED_SECRET_ERRORS = {
|
|
4508
|
+
BAD_ARGS: "supervision_secret_bad_args",
|
|
4509
|
+
NOT_GRANTED: "supervision_secret_write_not_granted",
|
|
4510
|
+
/** A collection named for secret writes is write-only for the supervisor: `data.get` / `data.query` refuse it. */
|
|
4511
|
+
WRITE_ONLY: "supervision_secret_collection_write_only"
|
|
4512
|
+
};
|
|
4513
|
+
function canonicalSupervisedSecretJson(row) {
|
|
4514
|
+
const sorted = {};
|
|
4515
|
+
for (const k of Object.keys(row).sort()) sorted[k] = row[k];
|
|
4516
|
+
return JSON.stringify(sorted);
|
|
4517
|
+
}
|
|
4518
|
+
__name(canonicalSupervisedSecretJson, "canonicalSupervisedSecretJson");
|
|
4519
|
+
__name4(canonicalSupervisedSecretJson, "canonicalSupervisedSecretJson");
|
|
4520
|
+
function validateSupervisedSecretPut(args) {
|
|
4521
|
+
const bad = /* @__PURE__ */ __name4((message) => ({
|
|
4522
|
+
ok: false,
|
|
4523
|
+
code: SUPERVISED_SECRET_ERRORS.BAD_ARGS,
|
|
4524
|
+
message
|
|
4525
|
+
}), "bad");
|
|
4526
|
+
const collection = args?.collection;
|
|
4527
|
+
if (typeof collection !== "string" || !SUPERVISED_SECRET_NAME_RE.test(collection) || collection.startsWith("__")) {
|
|
4528
|
+
return bad("collection must be an explicit collection name (letters, digits, _ . : -; at most 128)");
|
|
4529
|
+
}
|
|
4530
|
+
const key = args?.key;
|
|
4531
|
+
if (typeof key !== "string" || !SUPERVISED_SECRET_NAME_RE.test(key)) {
|
|
4532
|
+
return bad("key must be an explicit row key (letters, digits, _ . : -; at most 128)");
|
|
4533
|
+
}
|
|
4534
|
+
const value3 = args?.value;
|
|
4535
|
+
if (!value3 || typeof value3 !== "object" || Array.isArray(value3) || Object.getPrototypeOf(value3) !== Object.prototype) {
|
|
4536
|
+
return bad("value must be a plain object of scalar fields");
|
|
4537
|
+
}
|
|
4538
|
+
const fields = Object.keys(value3);
|
|
4539
|
+
const row = {};
|
|
4540
|
+
for (const field of fields) {
|
|
4541
|
+
if (!SUPERVISED_SECRET_FIELD_RE.test(field)) {
|
|
4542
|
+
return bad("value field names must be plain identifiers (no $ prefix, no dots; at most 64 characters)");
|
|
4543
|
+
}
|
|
4544
|
+
const v = value3[field];
|
|
4545
|
+
if (typeof v === "string") {
|
|
4546
|
+
if (v.length > SUPERVISED_SECRET_LIMITS.maxStringLength) {
|
|
4547
|
+
return bad(`value.${field} is longer than ${SUPERVISED_SECRET_LIMITS.maxStringLength} characters`);
|
|
4548
|
+
}
|
|
4549
|
+
} else if (typeof v === "number") {
|
|
4550
|
+
if (!Number.isFinite(v)) return bad(`value.${field} must be a finite number`);
|
|
4551
|
+
} else if (typeof v !== "boolean" && v !== null) {
|
|
4552
|
+
return bad(`value.${field} must be a string, a finite number, a boolean or null (no nesting)`);
|
|
4553
|
+
}
|
|
4554
|
+
row[field] = v;
|
|
4555
|
+
}
|
|
4556
|
+
if (Object.prototype.hasOwnProperty.call(row, SUPERVISED_SECRET_KEY_FIELD) && row[SUPERVISED_SECRET_KEY_FIELD] !== key) {
|
|
4557
|
+
return bad(`value.${SUPERVISED_SECRET_KEY_FIELD}, when present, must equal key`);
|
|
4558
|
+
}
|
|
4559
|
+
row[SUPERVISED_SECRET_KEY_FIELD] = key;
|
|
4560
|
+
if (Object.keys(row).length > SUPERVISED_SECRET_LIMITS.maxFields) {
|
|
4561
|
+
return bad(`value has more than ${SUPERVISED_SECRET_LIMITS.maxFields} fields`);
|
|
4562
|
+
}
|
|
4563
|
+
if (Object.keys(row).length < 2) return bad("value must carry at least one field besides _pk");
|
|
4564
|
+
const bytes = new TextEncoder().encode(canonicalSupervisedSecretJson(row)).byteLength;
|
|
4565
|
+
if (bytes > SUPERVISED_SECRET_LIMITS.maxBytes) {
|
|
4566
|
+
return bad(`value is larger than ${SUPERVISED_SECRET_LIMITS.maxBytes} bytes`);
|
|
4567
|
+
}
|
|
4568
|
+
return {
|
|
4569
|
+
ok: true,
|
|
4570
|
+
input: {
|
|
4571
|
+
collection,
|
|
4572
|
+
key,
|
|
4573
|
+
row
|
|
4574
|
+
}
|
|
4575
|
+
};
|
|
4576
|
+
}
|
|
4577
|
+
__name(validateSupervisedSecretPut, "validateSupervisedSecretPut");
|
|
4578
|
+
__name4(validateSupervisedSecretPut, "validateSupervisedSecretPut");
|
|
4399
4579
|
var CONNECTION_HANDOVER_APPROVAL_PAYLOAD_KEY = "connectionAssignment";
|
|
4400
4580
|
var CONNECTION_HANDOVER_APPROVAL_CARD_MAX_CHARS = 1200;
|
|
4401
4581
|
var CONNECTION_HANDOVER_LIMITS = {
|
|
@@ -6738,7 +6918,7 @@ var BROWSER_COMMANDS = [
|
|
|
6738
6918
|
},
|
|
6739
6919
|
{
|
|
6740
6920
|
name: "find",
|
|
6741
|
-
description: "Act by semantic locator. Args: by(role|text|label|placeholder|alt|title|testid), query, action(click|fill|
|
|
6921
|
+
description: "Act by semantic locator. Args: by(role|text|label|placeholder|alt|title|testid), query, action(click|fill|hover|check|text), value?, name?, exact?."
|
|
6742
6922
|
},
|
|
6743
6923
|
// AI fallbacks
|
|
6744
6924
|
{
|
|
@@ -6752,7 +6932,7 @@ var BROWSER_COMMANDS = [
|
|
|
6752
6932
|
// wait
|
|
6753
6933
|
{
|
|
6754
6934
|
name: "wait",
|
|
6755
|
-
description: "Wait for a condition. Provide one of: selector(
|
|
6935
|
+
description: "Wait for a condition. Provide one of: selector (waits until it is visible), ms, text, url, load, fn."
|
|
6756
6936
|
},
|
|
6757
6937
|
// tabs / frames
|
|
6758
6938
|
{
|
|
@@ -6787,7 +6967,7 @@ var BROWSER_COMMANDS = [
|
|
|
6787
6967
|
},
|
|
6788
6968
|
{
|
|
6789
6969
|
name: "set",
|
|
6790
|
-
description: "Configure the browser. Args: setting(viewport|device|geo|headers|credentials|media), args[]."
|
|
6970
|
+
description: "Configure the browser. Args: setting(viewport|device|geo|headers|credentials|media|offline), args[]."
|
|
6791
6971
|
},
|
|
6792
6972
|
// files / clipboard
|
|
6793
6973
|
{
|
|
@@ -6831,7 +7011,7 @@ var BROWSER_COMMANDS = [
|
|
|
6831
7011
|
},
|
|
6832
7012
|
{
|
|
6833
7013
|
name: "keyboard",
|
|
6834
|
-
description: "Low-level keyboard at focus. Args: action(type|inserttext
|
|
7014
|
+
description: "Low-level keyboard at focus. Args: action(type|inserttext), text. Use press for single keys and chords."
|
|
6835
7015
|
},
|
|
6836
7016
|
{
|
|
6837
7017
|
name: "state",
|
|
@@ -7508,7 +7688,11 @@ var BROWSER_SESSION_CLOSE_REASONS = [
|
|
|
7508
7688
|
"max-steps",
|
|
7509
7689
|
"cost-cap",
|
|
7510
7690
|
"error",
|
|
7511
|
-
"reaped"
|
|
7691
|
+
"reaped",
|
|
7692
|
+
"cancelled",
|
|
7693
|
+
"confirmation",
|
|
7694
|
+
"blocked",
|
|
7695
|
+
"stopped"
|
|
7512
7696
|
];
|
|
7513
7697
|
var BROWSER_LOG_CONTEXT_KEYS = [
|
|
7514
7698
|
"runId",
|
|
@@ -7525,9 +7709,9 @@ var BROWSER_LOG_TEXT_MAX_CHARS = 64 * 1024;
|
|
|
7525
7709
|
var isString = /* @__PURE__ */ __name4((value3) => typeof value3 === "string", "isString");
|
|
7526
7710
|
var isBoolean = /* @__PURE__ */ __name4((value3) => typeof value3 === "boolean", "isBoolean");
|
|
7527
7711
|
var isCount = /* @__PURE__ */ __name4((value3) => typeof value3 === "number" && Number.isFinite(value3) && value3 >= 0, "isCount");
|
|
7528
|
-
var
|
|
7712
|
+
var isPlainObject3 = /* @__PURE__ */ __name4((value3) => typeof value3 === "object" && value3 !== null && !Array.isArray(value3), "isPlainObject");
|
|
7529
7713
|
var oneOf = /* @__PURE__ */ __name4((values) => (value3) => typeof value3 === "string" && values.includes(value3), "oneOf");
|
|
7530
|
-
var isLimits = /* @__PURE__ */ __name4((value3) =>
|
|
7714
|
+
var isLimits = /* @__PURE__ */ __name4((value3) => isPlainObject3(value3) && Object.values(value3).every((entry) => isCount(entry)), "isLimits");
|
|
7531
7715
|
var EVENT_SHAPES = {
|
|
7532
7716
|
"session.opened": {
|
|
7533
7717
|
required: {
|
|
@@ -7536,7 +7720,8 @@ var EVENT_SHAPES = {
|
|
|
7536
7720
|
optional: {
|
|
7537
7721
|
limits: isLimits,
|
|
7538
7722
|
region: isString,
|
|
7539
|
-
liveUrl: isString
|
|
7723
|
+
liveUrl: isString,
|
|
7724
|
+
browser: isString
|
|
7540
7725
|
}
|
|
7541
7726
|
},
|
|
7542
7727
|
command: {
|
|
@@ -7546,7 +7731,7 @@ var EVENT_SHAPES = {
|
|
|
7546
7731
|
ok: isBoolean
|
|
7547
7732
|
},
|
|
7548
7733
|
optional: {
|
|
7549
|
-
args:
|
|
7734
|
+
args: isPlainObject3,
|
|
7550
7735
|
urlBefore: isString,
|
|
7551
7736
|
urlAfter: isString,
|
|
7552
7737
|
resultBytes: isCount,
|
|
@@ -7651,7 +7836,7 @@ function describeFieldViolation(key, value3, check) {
|
|
|
7651
7836
|
__name(describeFieldViolation, "describeFieldViolation");
|
|
7652
7837
|
__name4(describeFieldViolation, "describeFieldViolation");
|
|
7653
7838
|
function describeBrowserLogEventViolation(value3) {
|
|
7654
|
-
if (!
|
|
7839
|
+
if (!isPlainObject3(value3)) return "event must be an object";
|
|
7655
7840
|
const event = value3;
|
|
7656
7841
|
const base = describeBaseViolation(event);
|
|
7657
7842
|
if (base) return base;
|
|
@@ -7675,7 +7860,7 @@ __name(isBrowserLogEvent, "isBrowserLogEvent");
|
|
|
7675
7860
|
__name4(isBrowserLogEvent, "isBrowserLogEvent");
|
|
7676
7861
|
function describeBrowserLogContextViolation(value3) {
|
|
7677
7862
|
if (value3 === void 0) return void 0;
|
|
7678
|
-
if (!
|
|
7863
|
+
if (!isPlainObject3(value3)) return "logContext must be an object";
|
|
7679
7864
|
for (const [key, entry] of Object.entries(value3)) {
|
|
7680
7865
|
if (!BROWSER_LOG_CONTEXT_KEYS.includes(key)) return `logContext.${key} is not allowed`;
|
|
7681
7866
|
if (entry === void 0) continue;
|
|
@@ -7706,6 +7891,10 @@ function browserLogContextOfWorkerContext(context) {
|
|
|
7706
7891
|
if (context?.primitiveId) out.primitiveId = context.primitiveId;
|
|
7707
7892
|
if (context?.primitiveName) out.primitiveName = context.primitiveName;
|
|
7708
7893
|
if (context?.channel) out.channel = context.channel;
|
|
7894
|
+
if (context?.environment && AGENT_LOG_ENVIRONMENTS.includes(context.environment)) {
|
|
7895
|
+
out.environment = context.environment;
|
|
7896
|
+
}
|
|
7897
|
+
if (context?.agentVersion) out.agentVersion = context.agentVersion;
|
|
7709
7898
|
return out;
|
|
7710
7899
|
}
|
|
7711
7900
|
__name(browserLogContextOfWorkerContext, "browserLogContextOfWorkerContext");
|
|
@@ -13299,6 +13488,17 @@ function maskMcpServerHeaders(server) {
|
|
|
13299
13488
|
}
|
|
13300
13489
|
__name(maskMcpServerHeaders, "maskMcpServerHeaders");
|
|
13301
13490
|
__name4(maskMcpServerHeaders, "maskMcpServerHeaders");
|
|
13491
|
+
var SHARED_DATA_OWNER_PREFIX = "shared:";
|
|
13492
|
+
function sharedDataOwnerKey(collectionId) {
|
|
13493
|
+
return `${SHARED_DATA_OWNER_PREFIX}${collectionId}`;
|
|
13494
|
+
}
|
|
13495
|
+
__name(sharedDataOwnerKey, "sharedDataOwnerKey");
|
|
13496
|
+
__name4(sharedDataOwnerKey, "sharedDataOwnerKey");
|
|
13497
|
+
function isSharedDataOwnerKey(agentId2) {
|
|
13498
|
+
return typeof agentId2 === "string" && agentId2.startsWith(SHARED_DATA_OWNER_PREFIX);
|
|
13499
|
+
}
|
|
13500
|
+
__name(isSharedDataOwnerKey, "isSharedDataOwnerKey");
|
|
13501
|
+
__name4(isSharedDataOwnerKey, "isSharedDataOwnerKey");
|
|
13302
13502
|
|
|
13303
13503
|
// ../workflow-graph/dist/index.mjs
|
|
13304
13504
|
import { createHash } from "crypto";
|
|
@@ -15948,11 +16148,11 @@ function isConditionalJoinId(stepId) {
|
|
|
15948
16148
|
}
|
|
15949
16149
|
__name(isConditionalJoinId, "isConditionalJoinId");
|
|
15950
16150
|
__name5(isConditionalJoinId, "isConditionalJoinId");
|
|
15951
|
-
function
|
|
16151
|
+
function isPlainObject4(v) {
|
|
15952
16152
|
return typeof v === "object" && v !== null && !Array.isArray(v);
|
|
15953
16153
|
}
|
|
15954
|
-
__name(
|
|
15955
|
-
__name5(
|
|
16154
|
+
__name(isPlainObject4, "isPlainObject");
|
|
16155
|
+
__name5(isPlainObject4, "isPlainObject");
|
|
15956
16156
|
function leafValue(row) {
|
|
15957
16157
|
if (row.status === "completed") return row.output === void 0 ? null : row.output;
|
|
15958
16158
|
return continuedFailureValue(row.error, row.killReason);
|
|
@@ -15975,7 +16175,7 @@ function deriveRunOutput(steps) {
|
|
|
15975
16175
|
if (leaves.length === 1) {
|
|
15976
16176
|
const leaf = leaves[0];
|
|
15977
16177
|
const value22 = leafValue(leaf);
|
|
15978
|
-
if (isConditionalJoinId(leaf.stepId) &&
|
|
16178
|
+
if (isConditionalJoinId(leaf.stepId) && isPlainObject4(value22)) {
|
|
15979
16179
|
const keys = Object.keys(value22);
|
|
15980
16180
|
if (keys.length === 1) return {
|
|
15981
16181
|
output: value22[keys[0]],
|