lua-cli 3.46.0 → 3.47.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/index.js CHANGED
@@ -1829,9 +1829,9 @@ function validSecretOutcome(o) {
1829
1829
  function formatClientOutcomeTurns(outcomes) {
1830
1830
  return outcomes.map((outcome) => JSON.stringify(outcome)).join("\n");
1831
1831
  }
1832
- function parseClientOutcomeTurns(text) {
1833
- if (typeof text !== "string") return null;
1834
- const lines = text.split("\n").map((line) => line.trim()).filter(Boolean);
1832
+ function parseClientOutcomeTurns(text2) {
1833
+ if (typeof text2 !== "string") return null;
1834
+ const lines = text2.split("\n").map((line) => line.trim()).filter(Boolean);
1835
1835
  if (lines.length === 0 || lines.length > CLIENT_OUTCOME_TURNS_MAX) return null;
1836
1836
  const out = [];
1837
1837
  for (const line of lines) {
@@ -2148,9 +2148,9 @@ function idOrName(value3) {
2148
2148
  ].filter((v) => Boolean(v));
2149
2149
  return [];
2150
2150
  }
2151
- function addresses(text) {
2152
- if (typeof text !== "string") return [];
2153
- return (text.match(EMAIL_IN_TEXT) ?? []).map((address) => address.toLowerCase());
2151
+ function addresses(text2) {
2152
+ if (typeof text2 !== "string") return [];
2153
+ return (text2.match(EMAIL_IN_TEXT) ?? []).map((address) => address.toLowerCase());
2154
2154
  }
2155
2155
  function recordFacts(value3) {
2156
2156
  const senders = [];
@@ -2295,8 +2295,8 @@ function contentRecordExcluded(record, exclusions) {
2295
2295
  }
2296
2296
  function jsonLookingString(value3) {
2297
2297
  if (typeof value3 !== "string") return false;
2298
- const text = value3.trim();
2299
- return text.startsWith("{") && text.endsWith("}") || text.startsWith("[") && text.endsWith("]");
2298
+ const text2 = value3.trim();
2299
+ return text2.startsWith("{") && text2.endsWith("}") || text2.startsWith("[") && text2.endsWith("]");
2300
2300
  }
2301
2301
  function parseEmbeddedJson(value3) {
2302
2302
  try {
@@ -2316,11 +2316,11 @@ function applyContentExclusions(value3, exclusions) {
2316
2316
  };
2317
2317
  let removed = 0;
2318
2318
  let blocked = false;
2319
- const walkString = /* @__PURE__ */ __name2((text, depth) => {
2320
- const parsed = parseEmbeddedJson(text);
2321
- if (!parsed) return text;
2319
+ const walkString = /* @__PURE__ */ __name2((text2, depth) => {
2320
+ const parsed = parseEmbeddedJson(text2);
2321
+ if (!parsed) return text2;
2322
2322
  const next2 = walk22(parsed.value, depth);
2323
- return next2 === parsed.value ? text : JSON.stringify(next2);
2323
+ return next2 === parsed.value ? text2 : JSON.stringify(next2);
2324
2324
  }, "walkString");
2325
2325
  const walk22 = /* @__PURE__ */ __name2((node, depth) => {
2326
2326
  if (blocked) return node;
@@ -2414,8 +2414,8 @@ function contentProjectionParameters(params) {
2414
2414
  if (PROJECTION_PARAMETER_KEYS.has(name)) {
2415
2415
  found.push(key);
2416
2416
  } else if (name === "expand") {
2417
- const text = typeof value3 === "string" ? value3 : JSON.stringify(value3 ?? "");
2418
- if (/select/i.test(normaliseRequestParameterKey(text))) found.push(key);
2417
+ const text2 = typeof value3 === "string" ? value3 : JSON.stringify(value3 ?? "");
2418
+ if (/select/i.test(normaliseRequestParameterKey(text2))) found.push(key);
2419
2419
  }
2420
2420
  }
2421
2421
  return found;
@@ -2445,9 +2445,9 @@ function currencyMinorUnitExponent(currency) {
2445
2445
  return 2;
2446
2446
  }
2447
2447
  function majorToMinorUnits(amount, currency) {
2448
- const text = typeof amount === "number" ? Number.isFinite(amount) ? String(amount) : "" : typeof amount === "string" ? amount.trim() : "";
2449
- if (/e/i.test(text)) return void 0;
2450
- const match = DECIMAL_AMOUNT.exec(text);
2448
+ const text2 = typeof amount === "number" ? Number.isFinite(amount) ? String(amount) : "" : typeof amount === "string" ? amount.trim() : "";
2449
+ if (/e/i.test(text2)) return void 0;
2450
+ const match = DECIMAL_AMOUNT.exec(text2);
2451
2451
  if (!match) return void 0;
2452
2452
  const exponent = currencyMinorUnitExponent(currency);
2453
2453
  const whole = match[1];
@@ -2459,9 +2459,9 @@ function majorToMinorUnits(amount, currency) {
2459
2459
  return Number.isSafeInteger(minor) ? minor : void 0;
2460
2460
  }
2461
2461
  function readMinorUnits(amount) {
2462
- const text = typeof amount === "number" ? String(amount) : typeof amount === "string" ? amount.trim() : "";
2463
- if (!/^\d+$/.test(text)) return void 0;
2464
- const minor = Number(text);
2462
+ const text2 = typeof amount === "number" ? String(amount) : typeof amount === "string" ? amount.trim() : "";
2463
+ if (!/^\d+$/.test(text2)) return void 0;
2464
+ const minor = Number(text2);
2465
2465
  return Number.isSafeInteger(minor) ? minor : void 0;
2466
2466
  }
2467
2467
  function operationCapUtcDay(now = /* @__PURE__ */ new Date()) {
@@ -2478,8 +2478,8 @@ function groupCount(re) {
2478
2478
  function isWorkflowSecretKey(key) {
2479
2479
  return WORKFLOW_SECRET_KEY_RE.test(key);
2480
2480
  }
2481
- function applyPatterns(text, patterns, counter) {
2482
- let out = text;
2481
+ function applyPatterns(text2, patterns, counter) {
2482
+ let out = text2;
2483
2483
  for (const { re, suffix } of patterns) {
2484
2484
  re.lastIndex = 0;
2485
2485
  if (!re.test(out)) continue;
@@ -2499,30 +2499,30 @@ function applyPatterns(text, patterns, counter) {
2499
2499
  }
2500
2500
  return out;
2501
2501
  }
2502
- function scrubSecretText(text) {
2503
- if (typeof text !== "string" || text.length < 4) return text;
2504
- return applyPatterns(applyPatterns(text, SECRET_LITERAL_PATTERNS), SECRET_PAIR_PATTERNS);
2502
+ function scrubSecretText(text2) {
2503
+ if (typeof text2 !== "string" || text2.length < 4) return text2;
2504
+ return applyPatterns(applyPatterns(text2, SECRET_LITERAL_PATTERNS), SECRET_PAIR_PATTERNS);
2505
2505
  }
2506
- function scrubSecretTextCounted(text) {
2507
- if (typeof text !== "string" || text.length < 4) return {
2508
- text,
2506
+ function scrubSecretTextCounted(text2) {
2507
+ if (typeof text2 !== "string" || text2.length < 4) return {
2508
+ text: text2,
2509
2509
  redactions: 0
2510
2510
  };
2511
2511
  const counter = {
2512
2512
  redactions: 0
2513
2513
  };
2514
- const out = applyPatterns(applyPatterns(text, SECRET_LITERAL_PATTERNS, counter), SECRET_PAIR_PATTERNS, counter);
2514
+ const out = applyPatterns(applyPatterns(text2, SECRET_LITERAL_PATTERNS, counter), SECRET_PAIR_PATTERNS, counter);
2515
2515
  return {
2516
2516
  text: out,
2517
2517
  redactions: counter.redactions
2518
2518
  };
2519
2519
  }
2520
- function boundScrubInput(text, max = SCRUB_INPUT_MAX_CHARS) {
2521
- if (typeof text !== "string" || text.length <= max) return text;
2522
- const window = text.slice(Math.max(0, max - SCRUB_CUT_BACKOFF_CHARS), max);
2520
+ function boundScrubInput(text2, max = SCRUB_INPUT_MAX_CHARS) {
2521
+ if (typeof text2 !== "string" || text2.length <= max) return text2;
2522
+ const window = text2.slice(Math.max(0, max - SCRUB_CUT_BACKOFF_CHARS), max);
2523
2523
  const ws = window.search(/\s\S*$/);
2524
2524
  const cut2 = ws >= 0 ? max - window.length + ws : max;
2525
- return `${text.slice(0, cut2)}\u2026`;
2525
+ return `${text2.slice(0, cut2)}\u2026`;
2526
2526
  }
2527
2527
  function scrubSecretLines(lines) {
2528
2528
  return lines.map((l) => typeof l === "string" ? scrubSecretText(boundScrubInput(l)) : l);
@@ -2542,9 +2542,9 @@ function messageText(value3) {
2542
2542
  return value3 === void 0 || value3 === null ? "" : String(value3);
2543
2543
  }
2544
2544
  function scrubProviderMessage(raw, max = PROVIDER_MESSAGE_MAX_CHARS) {
2545
- const text = boundScrubInput(messageText(raw)).replace(/\s+/g, " ").trim();
2546
- if (!text) return void 0;
2547
- const out = scrubSecretText(text);
2545
+ const text2 = boundScrubInput(messageText(raw)).replace(/\s+/g, " ").trim();
2546
+ if (!text2) return void 0;
2547
+ const out = scrubSecretText(text2);
2548
2548
  return out.length > max ? `${out.slice(0, max - 1)}\u2026` : out;
2549
2549
  }
2550
2550
  function scrubStepErrorMessage(raw) {
@@ -2674,8 +2674,8 @@ function supervisionAccessBindingViolation(merged) {
2674
2674
  }
2675
2675
  return null;
2676
2676
  }
2677
- function hasFormatCharacters(text) {
2678
- return FORMAT_CHARS.test(text);
2677
+ function hasFormatCharacters(text2) {
2678
+ return FORMAT_CHARS.test(text2);
2679
2679
  }
2680
2680
  function normalizedHandoverName(name) {
2681
2681
  return oneLine(name.normalize("NFKC")).toLowerCase();
@@ -2738,8 +2738,8 @@ function normalizeConnectionHandoverArgs(raw) {
2738
2738
  function approvalPayloadCoversConnectionHandover(payload, stored) {
2739
2739
  const p = parseConnectionHandoverApprovalPayload(payload);
2740
2740
  if (!p) return false;
2741
- const text = describeConnectionHandoverApproval(payload) ?? "";
2742
- if (text.length > CONNECTION_HANDOVER_APPROVAL_CARD_MAX_CHARS || scrubSecretText(text) !== text) return false;
2741
+ const text2 = describeConnectionHandoverApproval(payload) ?? "";
2742
+ if (text2.length > CONNECTION_HANDOVER_APPROVAL_CARD_MAX_CHARS || scrubSecretText(text2) !== text2) return false;
2743
2743
  const storedAccount = stored.account?.trim() || void 0;
2744
2744
  return p.connectionId === stored.connectionId && p.agentId === stored.agentId && p.agentName === stored.agentName.trim() && p.supervisorName === stored.supervisorName.trim() && p.integration === stored.integration && p.account === storedAccount;
2745
2745
  }
@@ -2961,13 +2961,13 @@ function parseThreadFollowUpInput(input) {
2961
2961
  if (hasPrompt === hasMessage) return null;
2962
2962
  const raw = hasPrompt ? o.prompt : o.message;
2963
2963
  if (typeof raw !== "string") return null;
2964
- const text = raw.trim();
2964
+ const text2 = raw.trim();
2965
2965
  const max = hasPrompt ? THREAD_FOLLOW_UP_LIMITS.promptMax : THREAD_FOLLOW_UP_LIMITS.messageMax;
2966
- if (text.length === 0 || text.length > max) return null;
2966
+ if (text2.length === 0 || text2.length > max) return null;
2967
2967
  if (o.idempotencyKey !== void 0 && !isValidCallerDedupeKey(o.idempotencyKey)) return null;
2968
2968
  return {
2969
2969
  mode: hasPrompt ? "turn" : "message",
2970
- text,
2970
+ text: text2,
2971
2971
  ...o.idempotencyKey !== void 0 ? {
2972
2972
  idempotencyKey: o.idempotencyKey
2973
2973
  } : {}
@@ -3457,8 +3457,8 @@ function withOverride(def, override) {
3457
3457
  "effect",
3458
3458
  "confirm"
3459
3459
  ]) {
3460
- const text = stored[field];
3461
- if (typeof text === "string" && text.trim()) next[field] = text;
3460
+ const text2 = stored[field];
3461
+ if (typeof text2 === "string" && text2.trim()) next[field] = text2;
3462
3462
  }
3463
3463
  if (def.tunableDefault && stored.default !== void 0) {
3464
3464
  const check = validateChannelSettingValue(def, stored.default);
@@ -3567,26 +3567,26 @@ function validateChannelSettingValue(def, value3, channel) {
3567
3567
  ok: false,
3568
3568
  error: "Must not be empty"
3569
3569
  };
3570
- const text = value3.trim();
3571
- if (rules.maxLength !== void 0 && text.length > rules.maxLength) {
3570
+ const text2 = value3.trim();
3571
+ if (rules.maxLength !== void 0 && text2.length > rules.maxLength) {
3572
3572
  return {
3573
3573
  ok: false,
3574
3574
  error: `Must be at most ${rules.maxLength} characters`
3575
3575
  };
3576
3576
  }
3577
- if (UNSAFE_TEXT.test(text)) return {
3577
+ if (UNSAFE_TEXT.test(text2)) return {
3578
3578
  ok: false,
3579
3579
  error: 'Must not contain <, > or " characters'
3580
3580
  };
3581
- if (rules.format === "slackReaction" && resolveSlackReactionName(text) === void 0) {
3581
+ if (rules.format === "slackReaction" && resolveSlackReactionName(text2) === void 0) {
3582
3582
  return {
3583
3583
  ok: false,
3584
- error: `${text} is not an emoji Slack can react with; use a common emoji or a :shortcode:`
3584
+ error: `${text2} is not an emoji Slack can react with; use a common emoji or a :shortcode:`
3585
3585
  };
3586
3586
  }
3587
3587
  return {
3588
3588
  ok: true,
3589
- value: text
3589
+ value: text2
3590
3590
  };
3591
3591
  }
3592
3592
  case "enum": {
@@ -3947,11 +3947,11 @@ function transformChatHistoryContentParts(parts) {
3947
3947
  mediaType: videoMatch[1]
3948
3948
  });
3949
3949
  } else {
3950
- let text = rawText.replace(/\\\\\\n/g, "\n");
3951
- text = removeNavigateBlock(text);
3950
+ let text2 = rawText.replace(/\\\\\\n/g, "\n");
3951
+ text2 = removeNavigateBlock(text2);
3952
3952
  content.push({
3953
3953
  type: "text",
3954
- text
3954
+ text: text2
3955
3955
  });
3956
3956
  }
3957
3957
  } else if (part.type === "file") {
@@ -4070,6 +4070,83 @@ function foldRichPartsIntoMessages(messages, records, makeMessage, sameTurnGroup
4070
4070
  while (next < synthetic.length) combined.push(synthetic[next++].message);
4071
4071
  return mergeRichPartMirrorMessages(combined, sameTurnGroup);
4072
4072
  }
4073
+ function text(item, field, index, required) {
4074
+ const value3 = item[field];
4075
+ if (value3 === void 0 && !required) return void 0;
4076
+ if (typeof value3 !== "string" || required && value3.trim().length === 0) {
4077
+ throw new Error(`Work item ${index}: \`${field}\` must be a ${required ? "non-empty " : ""}string`);
4078
+ }
4079
+ if ([
4080
+ ...value3
4081
+ ].length > LIMITS[field]) {
4082
+ throw new Error(`Work item ${index}: \`${field}\` is longer than ${LIMITS[field]} characters`);
4083
+ }
4084
+ return value3;
4085
+ }
4086
+ function normalizeWorkItems(items) {
4087
+ if (!Array.isArray(items)) throw new Error("Work items must be an array");
4088
+ if (items.length > MAX_WORK_ITEMS) {
4089
+ throw new Error(`At most ${MAX_WORK_ITEMS} work items can be published (got ${items.length})`);
4090
+ }
4091
+ const seen = /* @__PURE__ */ new Set();
4092
+ return items.map((raw, index) => {
4093
+ if (!raw || typeof raw !== "object" || Array.isArray(raw)) {
4094
+ throw new Error(`Work item ${index} must be an object`);
4095
+ }
4096
+ const item = raw;
4097
+ const id2 = text(item, "id", index, true);
4098
+ if (seen.has(id2)) throw new Error(`Work item ${index}: \`id\` "${id2}" is used more than once`);
4099
+ seen.add(id2);
4100
+ const title = text(item, "title", index, true);
4101
+ const group = text(item, "group", index, true);
4102
+ const action = text(item, "action", index, true);
4103
+ const status = text(item, "status", index, false);
4104
+ if (item.needsAction !== void 0 && typeof item.needsAction !== "boolean") {
4105
+ throw new Error(`Work item ${index}: \`needsAction\` must be a boolean`);
4106
+ }
4107
+ const when3 = item.updatedAt;
4108
+ const date = when3 instanceof Date ? when3 : typeof when3 === "string" ? new Date(when3) : null;
4109
+ if (!date || Number.isNaN(date.getTime())) {
4110
+ throw new Error(`Work item ${index}: \`updatedAt\` must be a valid date`);
4111
+ }
4112
+ return {
4113
+ id: id2,
4114
+ title,
4115
+ group,
4116
+ ...item.needsAction !== void 0 ? {
4117
+ needsAction: item.needsAction
4118
+ } : {},
4119
+ ...status !== void 0 ? {
4120
+ status
4121
+ } : {},
4122
+ updatedAt: date.toISOString(),
4123
+ action
4124
+ };
4125
+ });
4126
+ }
4127
+ function workItemsRecord(items, now = /* @__PURE__ */ new Date()) {
4128
+ return {
4129
+ v: 1,
4130
+ items: normalizeWorkItems(items),
4131
+ updatedAt: now.toISOString()
4132
+ };
4133
+ }
4134
+ function withoutWorkItems(data) {
4135
+ if (!data || typeof data !== "object" || !(WORK_ITEMS_KEY in data)) return data;
4136
+ const { [WORK_ITEMS_KEY]: _list, ...rest } = data;
4137
+ return rest;
4138
+ }
4139
+ function mutationWithoutWorkItems(mutation) {
4140
+ return {
4141
+ ...mutation,
4142
+ ...mutation.set ? {
4143
+ set: withoutWorkItems(mutation.set)
4144
+ } : {},
4145
+ ...mutation.unset ? {
4146
+ unset: mutation.unset.filter((field) => field !== WORK_ITEMS_KEY)
4147
+ } : {}
4148
+ };
4149
+ }
4073
4150
  function utf8WidthAt(value3, index) {
4074
4151
  const code = value3.charCodeAt(index);
4075
4152
  if (code < 128) return {
@@ -5576,15 +5653,15 @@ function normalizeWorkflowGoalJudge(judge) {
5576
5653
  } : {}
5577
5654
  };
5578
5655
  }
5579
- function cut(text, max) {
5580
- if (text.length <= max) return text;
5656
+ function cut(text2, max) {
5657
+ if (text2.length <= max) return text2;
5581
5658
  let end = Math.max(0, max - 1);
5582
- const last = text.charCodeAt(end - 1);
5659
+ const last = text2.charCodeAt(end - 1);
5583
5660
  if (last >= 55296 && last <= 56319) end -= 1;
5584
- return `${text.slice(0, end)}${ELLIPSIS}`;
5661
+ return `${text2.slice(0, end)}${ELLIPSIS}`;
5585
5662
  }
5586
- function scrubString(text, state3) {
5587
- const scrubbed = scrubSecretText(boundScrubInput(text, STRING_SCRUB_INPUT_MAX_CHARS));
5663
+ function scrubString(text2, state3) {
5664
+ const scrubbed = scrubSecretText(boundScrubInput(text2, STRING_SCRUB_INPUT_MAX_CHARS));
5588
5665
  if (scrubbed.length > APPROVAL_ARG_STRING_MAX_CHARS) state3.truncated = true;
5589
5666
  return cut(scrubbed, APPROVAL_ARG_STRING_MAX_CHARS);
5590
5667
  }
@@ -5669,10 +5746,10 @@ function walkObject(obj, depth, state3) {
5669
5746
  }
5670
5747
  return out;
5671
5748
  }
5672
- function fitString(text, room) {
5673
- let n2 = Math.min(text.length, room - 3);
5749
+ function fitString(text2, room) {
5750
+ let n2 = Math.min(text2.length, room - 3);
5674
5751
  while (n2 >= 16) {
5675
- const candidate = cut(text, n2);
5752
+ const candidate = cut(text2, n2);
5676
5753
  if (JSON.stringify(candidate).length <= room) return candidate;
5677
5754
  n2 = Math.floor(n2 * 0.8);
5678
5755
  }
@@ -5756,9 +5833,9 @@ function createPersistScrubber(maxChars = PERSIST_SCRUB_MAX_CHARS) {
5756
5833
  const bounded = boundScrubInput(value3, remaining);
5757
5834
  if (bounded !== value3) state3.truncated = true;
5758
5835
  remaining -= bounded.length;
5759
- const { text, redactions } = scrubSecretTextCounted(bounded);
5836
+ const { text: text2, redactions } = scrubSecretTextCounted(bounded);
5760
5837
  state3.redactions += redactions;
5761
- return text;
5838
+ return text2;
5762
5839
  }, "scrub");
5763
5840
  return {
5764
5841
  scrub,
@@ -5768,9 +5845,9 @@ function createPersistScrubber(maxChars = PERSIST_SCRUB_MAX_CHARS) {
5768
5845
  function scrubMessageContentForPersist(content, maxChars = PERSIST_SCRUB_MAX_CHARS) {
5769
5846
  const { scrub, state: state3 } = createPersistScrubber(maxChars);
5770
5847
  if (typeof content === "string") {
5771
- const text = scrub(content);
5848
+ const text2 = scrub(content);
5772
5849
  return {
5773
- content: text !== content ? text : content,
5850
+ content: text2 !== content ? text2 : content,
5774
5851
  ...state3
5775
5852
  };
5776
5853
  }
@@ -5782,19 +5859,19 @@ function scrubMessageContentForPersist(content, maxChars = PERSIST_SCRUB_MAX_CHA
5782
5859
  let changed = false;
5783
5860
  const parts = content.map((part) => {
5784
5861
  if (typeof part === "string") {
5785
- const text = scrub(part);
5786
- if (text === part) return part;
5862
+ const text2 = scrub(part);
5863
+ if (text2 === part) return part;
5787
5864
  changed = true;
5788
- return text;
5865
+ return text2;
5789
5866
  }
5790
5867
  if (part && typeof part === "object" && part.type === "text" && typeof part.text === "string") {
5791
5868
  const original = part.text;
5792
- const text = scrub(original);
5793
- if (text === original) return part;
5869
+ const text2 = scrub(original);
5870
+ if (text2 === original) return part;
5794
5871
  changed = true;
5795
5872
  return {
5796
5873
  ...part,
5797
- text
5874
+ text: text2
5798
5875
  };
5799
5876
  }
5800
5877
  return part;
@@ -5905,11 +5982,11 @@ function workflowApprovalDecisionOf(resumeData) {
5905
5982
  function workflowApprovalOutput(resumeData) {
5906
5983
  const decision = typeof resumeData.decision === "string" ? resumeData.decision : workflowApprovalDecisionOf(resumeData);
5907
5984
  const note = typeof resumeData.note === "string" && resumeData.note.trim() !== "" ? resumeData.note : void 0;
5908
- const text = typeof resumeData.text === "string" ? resumeData.text : note ?? decision;
5985
+ const text2 = typeof resumeData.text === "string" ? resumeData.text : note ?? decision;
5909
5986
  return {
5910
5987
  ...resumeData,
5911
5988
  decision,
5912
- text
5989
+ text: text2
5913
5990
  };
5914
5991
  }
5915
5992
  function isWorkflowApprovalOutput(value3) {
@@ -5917,8 +5994,8 @@ function isWorkflowApprovalOutput(value3) {
5917
5994
  const v = value3;
5918
5995
  return typeof v.approved === "boolean" && WORKFLOW_APPROVAL_OUTPUT_DECISIONS.includes(v.decision) && typeof v.text === "string";
5919
5996
  }
5920
- function extractSingleJsonValue(text) {
5921
- const trimmed2 = (text ?? "").trim();
5997
+ function extractSingleJsonValue(text2) {
5998
+ const trimmed2 = (text2 ?? "").trim();
5922
5999
  if (!trimmed2) return {
5923
6000
  reason: "reply is empty"
5924
6001
  };
@@ -6076,8 +6153,8 @@ function isWebRouteInput(value3) {
6076
6153
  if (!app || typeof app.id !== "string" || typeof app.name !== "string" || typeof app.origin !== "string") return false;
6077
6154
  return true;
6078
6155
  }
6079
- function evidenceDisplayText(text) {
6080
- const raw = typeof text === "string" ? text : "";
6156
+ function evidenceDisplayText(text2) {
6157
+ const raw = typeof text2 === "string" ? text2 : "";
6081
6158
  if (!raw.trim()) return "";
6082
6159
  const lines = removeHiddenBlocks(raw).split(/\r?\n/).map((line) => {
6083
6160
  const t = line.trim();
@@ -6090,22 +6167,22 @@ function evidenceDisplayText(text) {
6090
6167
  const out = lines.join(" ").replace(/\s+/g, " ").trim();
6091
6168
  return out || "[Attachment]";
6092
6169
  }
6093
- function evidenceSnippet(text) {
6094
- const flat = evidenceDisplayText(text);
6170
+ function evidenceSnippet(text2) {
6171
+ const flat = evidenceDisplayText(text2);
6095
6172
  return flat.length <= EVIDENCE_SNIPPET_MAX_CHARS ? flat : `${flat.slice(0, EVIDENCE_SNIPPET_MAX_CHARS - 1)}\u2026`;
6096
6173
  }
6097
- function evidenceWordCount(text) {
6098
- if (typeof text !== "string") return 0;
6099
- const t = text.trim();
6174
+ function evidenceWordCount(text2) {
6175
+ if (typeof text2 !== "string") return 0;
6176
+ const t = text2.trim();
6100
6177
  return t ? t.split(/\s+/).length : 0;
6101
6178
  }
6102
6179
  function evidenceKey(label2) {
6103
6180
  return label2.toLowerCase().replace(/[_\-\s]+/g, " ").trim();
6104
6181
  }
6105
- function evidenceOpaqueKey(text) {
6182
+ function evidenceOpaqueKey(text2) {
6106
6183
  let h = 0xcbf29ce484222325n;
6107
6184
  const prime = 0x100000001b3n;
6108
- for (const ch of evidenceKey(text)) {
6185
+ for (const ch of evidenceKey(text2)) {
6109
6186
  h ^= BigInt(ch.codePointAt(0) ?? 0);
6110
6187
  h = h * prime & 0xffffffffffffffffn;
6111
6188
  }
@@ -6763,16 +6840,16 @@ function slashDecodedPath(path31) {
6763
6840
  }
6764
6841
  return out.join("/");
6765
6842
  }
6766
- function jsonHasDuplicateKey(text) {
6843
+ function jsonHasDuplicateKey(text2) {
6767
6844
  const stack = [];
6768
- for (let i = 0; i < text.length; i++) {
6769
- const c = text[i];
6845
+ for (let i = 0; i < text2.length; i++) {
6846
+ const c = text2[i];
6770
6847
  if (c === '"') {
6771
6848
  let j = i + 1;
6772
- while (j < text.length && text[j] !== '"') j += text[j] === "\\" ? 2 : 1;
6849
+ while (j < text2.length && text2[j] !== '"') j += text2[j] === "\\" ? 2 : 1;
6773
6850
  const top = stack[stack.length - 1];
6774
6851
  if (top && top.expectKey) {
6775
- const key = JSON.parse(text.slice(i, j + 1));
6852
+ const key = JSON.parse(text2.slice(i, j + 1));
6776
6853
  if (top.keys.has(key)) return true;
6777
6854
  top.keys.add(key);
6778
6855
  top.expectKey = false;
@@ -7036,7 +7113,7 @@ function maskMcpServerHeaders(server) {
7036
7113
  headersSet: headerNames.length > 0
7037
7114
  };
7038
7115
  }
7039
- var __defProp2, __name2, PLUMBING_THREAD_CHANNELS, CHANNEL_CONVERSATION_CHANNELS, HIDDEN_THREAD_CHANNELS, CHOICE_PERSON_TURN_CHANNELS, CHOICE_REPLAY_CLIENT_CAPABILITIES, CHOICE_REPLAY_CLIENT_SURFACES, INTEGRATION_PASSTHROUGH_READ_METHODS, URL_REINTERPRETED_PATH_CHARACTERS, PERCENT_ENCODED_DOT, PERCENT_ESCAPE, DECODED_PATH_SEPARATORS, DECODED_LEADING_SEPARATOR, MAX_PERCENT_DECODE_ROUNDS, URL_RESOLUTION_PROBE_BASE, PLATFORM_INVOCATION_CALLERS, SUPERVISION_OPS, SUPERVISION_OPS_WAVE2, SUPERVISION_WATCHDOG_OPS, SUPERVISION_WATCHDOG_ERRORS, SUPERVISION_ROLLBACK_REFUSAL_CODES, SUPERVISION_ROLLBACK_LINEAGE_MAX, SUPERVISION_UNTARGETED_OPS, SUPERVISED_WORKFLOW_VERSIONS_MAX, SUPERVISION_EVENT_KINDS, AGENT_PROVISIONING_LIMITS, AGENT_PROVISIONING_APPROVAL_PAYLOAD_KEY, AGENT_PROVISIONING_ERRORS, PROVISIONED_SUPERVISION_ACTIONS, isNonEmptyString, uniqueStrings, sameSet, AGENT_PROVISIONING_APPROVAL_CARD_MAX_CHARS, APPROVAL_PAYLOAD_MEMBERS, AGENT_CONNECTION_POLICIES, AGENT_CONNECTION_POLICY_DEFAULT, AGENT_CONNECTION_MOUNT_MODES, AGENT_CONNECTION_GOVERNANCE_ERRORS, AGENT_CONNECTION_OPERATION_RULES_MAX, AGENT_CONNECTION_OPERATION_PATTERN_MAX_LENGTH, OPERATION_RULE_METHODS, PATH_SEPARATOR, PATH_SINGLE_SEGMENT_WILDCARD, PATH_REST_WILDCARD, METHOD_OVERRIDE_HEADER_NAMES, METHOD_OVERRIDE_QUERY_NAMES, ODATA_BATCH_SEGMENT, GOOGLE_BATCH_FIRST_SEGMENT, CONNECTION_CHECK_RESULTS, CONNECTION_CHECK_CATALOGUE_V1, CONNECTION_CHECK_NAME_PATTERN, CONNECTION_CHECK_NAME_MAX, CONNECT_OUTCOME_STATUSES, SECRET_TEST_RESULTS, SECRET_DATADOG_REGIONS, SECRET_PROVIDER_CATALOGUE_V1, SECRET_TEST_MAX_RESPONSE_BYTES, SECRET_ENV_KEY_PATTERN, SECRET_REQUEST_ERRORS, SECRET_OUTCOME_STATUSES, CLIENT_OUTCOME_TURNS_MAX, SHORT_TEXT_MAX, SLUG_MAX, shortText, optionalShortText, CONNECTION_REQUEST_TERMINAL_STATES, CONNECTION_USE_ORIGINS, AGENT_CONNECTION_OPERATION_LIMITS_BOUNDS, CURRENCY_CODE, LIMITS_KEYS, CAPS_KEYS, EXCLUSIONS_KEYS, EMAIL_IN_TEXT, MAX_EXCLUSION_DEPTH, PROJECTION_PARAMETER_KEYS, CHANNEL_PARAMETER_KEYS, GMAIL_SYSTEM_LABEL_IDS, ZERO_DECIMAL_CURRENCIES, THREE_DECIMAL_CURRENCIES, DECIMAL_AMOUNT, REDACTED_PLACEHOLDER, PROVIDER_MESSAGE_MAX_CHARS, ERROR_MESSAGE_MAX_CHARS, SECRET_LITERAL_PATTERNS, SECRET_NAME, SECRET_PAIR_PATTERNS, GROUP_COUNT, WORKFLOW_SECRET_KEY_RE, WORKFLOW_RESERVED_SECRET_KEYS, SCRUB_INPUT_MAX_CHARS, SCRUB_CUT_BACKOFF_CHARS, TEST_SESSION_ID_PATTERN, TEST_SESSION_COLLECTION_PREFIX, TEST_EFFECT_BODY_MAX_BYTES, TEST_EFFECT_DROPPED_HEADERS, EVAL_CREDITS_PER_1K_TOKENS, EVAL_RESERVED_TOOL_ID_PREFIXES, CONNECTION_HANDOVER_APPROVAL_PAYLOAD_KEY, CONNECTION_HANDOVER_APPROVAL_CARD_MAX_CHARS, CONNECTION_HANDOVER_LIMITS, MEMBERS, FORMAT_CHARS, oneLine, boundedString, AGENT_METRIC_NAME_PATTERN, AGENT_METRIC_LIMITS, AGENT_OBJECTIVE_ERRORS, CHANGE_LEASE_TTL_MINUTES_MIN, CHANGE_LEASE_TTL_MINUTES_MAX, CHANGE_LEASE_REASON_MAX, CHANGE_LEASE_ERRORS, AGENT_CONFIG_SET_LIMITS, SECRET_ENV_KEY_SUFFIXES, DEFAULT_OWNER_DEPARTURE_POLICY, AGENT_LIFECYCLE_ERRORS, USER_COST_COUNTER_TTL_SECONDS, USER_COST_ATTRIBUTION_CHANNELS, CALLER_DEDUPE_KEY_MAX, FOLLOW_UP_IDEMPOTENCY_TTL_SECONDS, THREAD_FOLLOW_UP_LIMITS, THREAD_FOLLOW_UP_ERRORS, PROGRESS_UPDATE_LIMITS, PAUSABLE_CAPABILITY_KINDS, UNIFIED_CATCH_UP_MAX_WINDOW_HOURS, UNIFIED_CATCH_UP_EVENTS, UNIFIED_CATCH_UP_FILTERABLE_OBJECT_TYPES, AGENT_NEVER_RULES_MAX, AGENT_NEVER_RULE_FIELD_MAX, AGENT_NEVER_RULE_INPUT_MATCH_MAX, NEVER_RULE_ID_PATTERN, NEVER_RULE_HTTP_METHODS, TEMPLATE_DISTRIBUTION_MODES, TAKEOVER_MAX_IDLE_MINUTES, MINUTES_PER_DAY, DEFAULT_IDLE_RELEASE_MINUTES, FALLBACK_IDLE_RELEASE_MINUTES, VARIATION_SELECTORS, SLACK_EMOJI_NAMES, SLACK_SHORTCODE, PLAIN_EMAIL_ADDRESS, DOMAIN, UNSAFE_TEXT, SLACK_CONVERSATION_ID, CHANNEL_SETTING_GROUPS, THREAD_SCOPING_NOUN, TAKEOVER_CHANNEL_TYPES, EMAIL_SETTINGS, SLACK_SETTING_DEFAULTS, SLACK_REACTION_MAX, SLACK_INTRO_MAX, SLACK_EXAMPLE_PROMPTS_MAX, SLACK_EXAMPLE_PROMPT_MAX, SLACK_SUPPORT_CONTACT_MAX, SLACK_SETTINGS, CHANNEL_SETTINGS, REVIEWABLE_ACTION_EXECUTE_TOOL_ALLOWLIST, REVIEWABLE_STANDING_START_TOOLS, REVIEWABLE_MCP_SEND_TOOL_SUFFIX, MCP_TOOL_READ_VERB_RE, MCP_DRAFT_CREATE_VERBS, NON_INTERACTIVE_CHANNELS, RICH_PARTS_MESSAGE_ID_PREFIX, SCREENSHOT_MESSAGE_ID_PREFIX, BROWSER_COMMANDS, BROWSER_COMMAND_NAMES, LOG_FIELDS_MAX_KEYS, LOG_FIELD_MAX_VALUE_BYTES, LOG_FIELDS_MAX_BYTES, LOG_FIELD_KEY_PATTERN, LOG_FIELD_SECRET_SHAPED_KEY_PATTERNS, LOG_FIELDS_CLAMPED_KEY, LOG_FIELD_ARRAY_COUNT_SUFFIX, LuaLogFieldsError, DESKTOP_FILE_COMMANDS, DESKTOP_FILE_COMMAND_SET, WORKFLOW_RETRY_BACKOFFS, WORKFLOW_RETRY_MIN_ATTEMPTS, WORKFLOW_RETRY_POLICY_KEYS, WORKFLOW_RETRY_MAX_ATTEMPTS, WORKFLOW_RETRY_ENGINE_KEYS, WORKFLOW_JOB_RESOURCES, WORKFLOW_SIDE_EFFECTS, WORKFLOW_AGENT_EFFORTS, WORKFLOW_MODEL_CLASSES, WORKFLOW_TASK_CLASSES, WORKFLOW_MODEL_TRAITS, WORKFLOW_MODEL_REASON_MAX_LENGTH, WORKFLOW_MODELS_COMPOSE_MODES, WORKFLOW_MODELS_PIN_MODES, WORKFLOW_MODELS_FALLBACK_MODES, WORKFLOW_MODELS_CONSENT_ACTIONS_MIN, WORKFLOW_DEFAULT_TASK_CLASS_MAP, WORKFLOW_MODELS_MAX_CLASS_DEFAULT, WORKFLOW_AUTONOMY_FORMS, WORKFLOW_AUTONOMY_NUMERIC_KEYS, WORKFLOW_AUTONOMY_ENVELOPE_KEYS, WORKFLOW_AUTONOMY_ENABLED_DEFAULT, WORKFLOW_AUTONOMY_DEFAULTS, WORKFLOW_AUTONOMY_CEILINGS, WORKFLOW_AUTONOMY_MAX_RUNS_PER_HOUR_ENV, WORKFLOW_AUTONOMY_MAX_RUNS_PER_HOUR_CEILING, WORKFLOW_AUTONOMY_FORMS_DEFAULT, WORKFLOW_AUTONOMY_MIN_VALUE, WORKFLOW_JOB_RANGES, WORKFLOW_JOB_RANGE_MEMBERS, WORKFLOW_SINGLE_STEP_TYPES, WORKFLOW_HITL_ENTRY_TYPES, WORKFLOW_ARM_ENTRY_TYPES, WORKFLOW_HITL_ARM_CONTAINERS, WORKFLOW_GRAPH_ENTRY_STEP_KINDS, WORKFLOW_ARM_ENTRY_STEP_KINDS, WORKFLOW_BUDGET_MAX_DURATION_SECONDS, MODEL_ID_BYOK_PROVIDERS, MODEL_CLASS_REF_PREFIX, MODEL_SNAPSHOT_SUFFIX, REASONING_EFFORT_VALUES, IMPLICIT_MODEL_SELECTION_SOURCES, PLATFORM_FALLBACK_MODEL_SOURCE, AGENT_NAME_TOKEN, DEFAULT_PERSONA_GUIDE, PERSONAL_SPACE_STARTING_PERSONA, AGENT_LOG_SOURCES, AGENT_LOG_ENVIRONMENTS, AGENT_LOG_FIELDS_MAX_WIRE_KEYS, LOG_DRAIN_TYPES_PHASE1, LOG_DRAIN_TYPES_PHASE2, LOG_DRAIN_TYPES_IMPLEMENTED, LOG_DRAIN_FORMATS, LOG_DRAIN_SEVERITIES, LOG_DRAIN_SOURCES, LOG_DRAIN_CONTENT_SOURCES, LOG_DRAIN_DEFAULT_SOURCES, LOG_DRAIN_MAX_PER_ORG, LOG_DRAIN_MAX_PER_ORG_ENTERPRISE, LOG_DRAIN_DATADOG_SITES, LOG_DRAIN_NEWRELIC_SITES, LOG_DRAIN_ENDPOINT_TEMPLATES, LOG_DRAIN_PRESET_SITES, LOG_DRAIN_BUCKET_NAME_PATTERN, LOG_DRAIN_BUCKET_HOST_PATTERNS, LOG_DRAIN_PRESET_HOST_SUFFIXES, DRAIN_CONTENT_ACK_ERROR_CODE, DRAIN_CONTENT_ACK_FIELD, DrainContentAckRequiredError, LOG_DRAIN_PRESET_PATHS, PRESET_SEGMENT_RE, LOG_DRAIN_QUOTAS, LOG_DRAIN_QUOTA_WARN_RATIO, LOG_DRAIN_QUOTA_DROP_DEBUG_RATIO, LOG_DRAIN_QUOTA_DROP_INFO_RATIO, LOG_DRAIN_QUOTA_PAUSE_RATIO, LOG_EXPORT_SOURCES, LOG_EXPORT_MAX_WINDOW_DAYS, LOG_EXPORT_MAX_WINDOW_MS, LOG_EXPORT_URL_TTL_SECONDS, LOG_EXPORT_FILE_RETENTION_DAYS, LOG_EXPORT_FILE_RETENTION_MS, LOG_EXPORT_PART_MAX_BYTES, LOG_DRAIN_NOTICE_RATE_LIMIT_MS, LOG_DRAIN_VERIFICATION_STALE_MS, LOG_DRAIN_DIGEST_INTERVAL_MS, LOG_DRAIN_DIGEST_MAX_ENTRIES, LOG_DRAIN_NOTICE_ERROR_MAX_CHARS, LOG_DRAIN_USAGE_LINE_ITEM, LOG_DRAIN_BYTES_PER_GIB, DEFAULT_LOG_DRAIN_PLAN_CONFIG, TIERS, LOG_CURSOR_MAX_LENGTH, LOG_CURSOR_MAX_ID_LENGTH, LOG_RELATIVE_TIME_PATTERN, LOG_ISO_TIME_PATTERN, RELATIVE_UNIT_MS, CORE_DRAINING_CODE, CORE_DRAINING_DEFAULT_RETRY_MS, CORE_DRAINING_MAX_RETRY_MS, VoiceNameSchema, PluginProviderSchema, RealtimeProviderSchema, PluginClassSchema, ModelDescriptorSchema, InferenceModelSchema, PluginModelSchema, RealtimeModelSchema, LuaVoiceModelSchema, TurnDetectionSchema, InterruptionSchema, BuiltinAudioClipSchema, AudioConfigSchema, BackgroundAudioEntrySchema, BackgroundAudioSchema, LuaVoiceConfigInnerSchema, LuaVoiceConfigSchema, LuaVoiceRefSchema, EventType, LUA_JOB_DEFAULT_TIMEOUT_SECONDS, LUA_JOB_MIN_TIMEOUT_SECONDS, LUA_JOB_MAX_TIMEOUT_SECONDS, KEYS, MAX_BODY_BYTES, MAX_ID_LENGTH, UTC_ISO, TEMPLATE_TRIGGER_URL_ENV_PREFIX, TEMPLATE_INSTALL_POLICY_PER_WORKSPACE_VALUES, SUBJECT_TYPES, SubjectTypeSchema, CREDENTIAL_TYPES, CredentialTypeSchema, DEVICE_OPERATIONS, DeviceOperationSchema, DEVICE_SCOPE_BY_OPERATION, DeviceBindingSchema, TYPED_API_KEY, IdSchema, SESSION_AUTH_TIME_MAX_S, PrincipalDescriptorSchema, ActorDescriptorSchema, PrincipalOwnerSchema, CredentialLifecycleSchema, GeneralCredentialDescriptorSchema, DeviceCredentialDescriptorSchema, GeneralPrincipalContextSchema, DeviceCredentialPrincipalContextSchema, RawPrincipalContextSchema, PrincipalContextSchema, DeviceCredentialClaimSchema, LUA_CLIENT_HEADER, LUA_CLIENT_APPS, SEMVER_PATTERN, WEB_RELEASE_PATTERN, CLIENT_HEADER_PATTERN, LUA_SESSION_ID_CLAIM, SESSION_REVOKED_CODE, AUTHZ_PROJECTION_VERSION, ProjectedScopeSchema, DisplayRoleSchema, AuthorizationPrincipalSchema, CredentialContextSchema, ProjectionAnomalySchema, ProjectedOrgSchema, ProjectedResourceSchema, CapabilityProfilesSchema, RoleCatalogSchema, EffectiveAuthorizationSchema, ResourcePageSchema, SYSTEM_USER_PREFIX, WORKFLOW_RUN_IN_FLIGHT, WORKFLOW_RUN_IDLE, WORKFLOW_RUN_TERMINAL, WORKFLOW_RUN_STATUSES, WORKFLOW_RUN_GATE_KINDS, WORKFLOW_STEP_STATUSES, WORKFLOW_STEP_IN_FLIGHT, WORKFLOW_SIGNAL_EVENT_SITES, ARCHIVE_WINDOW_MARGIN_DAYS, WORKFLOW_ORG_PURGING_TTL_S, WORKFLOW_ORG_PURGE_FORCE_AFTER_MS, IDEMPOTENCY_HOLDING_STATUSES, WORKFLOW_SCHEDULED_RUN_ID_PREFIX, CLOUD_TASK_RUN_ID_PREFIX, WORKFLOW_SCHEDULE_KEY_MAX, WORKFLOW_SCHEDULE_IDEMPOTENCY_KEY_PREFIX, WORKFLOW_OPERATION_ID_PREFIX, WORKFLOW_JOURNAL_PROTOCOL_VERSION, WORKFLOW_CONNECTION_KEY_RE, WORKFLOW_AGENT_APP_CONNECTION_PREFIX, WORKFLOW_JOB_MODEL_SOURCE_LABELS, WORKFLOW_SUSPEND_KINDS, WORKFLOW_RUN_NOTIFICATION_SUSPENDED_KINDS, WORKFLOW_SIGNAL_PAYLOAD_MAX_BYTES, WORKFLOW_SIGNAL_NAME_RE, WORKFLOW_SUSPEND_DEFAULT_TIMEOUT_HOURS, WORKFLOW_RESOLVE_OUTPUT_MAX_BYTES, SCHEDULE_HEALTH_NOTIFY_CHANNELS, SCHEDULE_HEALTH_DEFAULT_NOTIFY, SCHEDULE_HEALTH_LIMITS, KNOWN_KEYS, WORKFLOW_GOAL_JUDGE_SELF, APPROVAL_ARGS_MAX_CHARS, APPROVAL_ARG_STRING_MAX_CHARS, APPROVAL_ARGS_SUMMARY_MAX_CHARS, MAX_DEPTH, MAX_KEYS, MAX_ITEMS, MAX_NODES, MAX_KEY_CHARS, KEY_SCRUB_INPUT_MAX_CHARS, STRING_SCRUB_INPUT_MAX_CHARS, ELLIPSIS, SKIP, SCRUB_SECRETS_BEFORE_PERSIST_ENV, PERSIST_SCRUB_MAX_CHARS, PERSIST_SCRUB_REF_MAX_CHARS, WORKFLOW_AUDIT_EVENTS, WORKFLOW_AUDIT_METADATA_MAX_BYTES, INDENT, WRAP_WIDTH, NOUNS, GET_TOOL_NAMES, PREAMBLE, WORKFLOW_APPROVAL_OUTPUT_DECISIONS, WORKFLOW_APPROVAL_OUTPUT_SCHEMA, JSON_FENCE_RE, DEFAULT_ON_AGENT_FEATURES, SUBAGENT_PER_KEY_FLAG_ENV, PER_KEY_FLAG_VALUES, ONBOARDING_FLOW_KEY, ONBOARDING_SCHEMA_VERSION, id, copy, onboardingHeadingSchema, onboardingRichTextInlineSchema, onboardingRichTextSchema, onboardingDestinationSchema, onboardingArtworkSchema, onboardingAnswerSchema, onboardingQuestionSchema, onboardingTemplateSectionSchema, onboardingInstallScreenSchema, onboardingResultScreenSchema, onboardingConnectScreenSchema, onboardingTemplateContentSchema, onboardingUnavailableOutcomeSchema, onboardingFlowSchema, onboardingActorSchema, onboardingEditorSchema, onboardingPublicationSummarySchema, onboardingValidationIssueSchema, onboardingValidationResponseSchema, onboardingAssetSchema, onboardingPublicAssetSchema, getOnboardingConfigResponseSchema, saveOnboardingDraftRequestSchema, validateOnboardingRequestSchema, publishOnboardingRequestSchema, rollbackOnboardingRequestSchema, onboardingTemplateCatalogItemSchema, getPublishedOnboardingResponseSchema, WEB_ROUTE_PROTOCOL_VERSION, WEB_ROUTE_METHODS, WEB_ROUTE_REQUEST_HEADER_ALLOWLIST, WEB_ROUTE_RESPONSE_HEADER_ALLOWLIST, WEB_ROUTE_MAX_WALL_MS, WEB_ROUTE_MAX_REQUEST_BODY_BYTES, WEB_ROUTE_MAX_RESPONSE_BYTES, WEB_APP_NAME_PATTERN, WEB_APP_ENTRY_HTML_MAX_CHARS, WEB_APP_MAX_ASSETS, WEB_APP_ASSET_PATH_PATTERN, WEB_APP_ASSET_PATH_MAX_CHARS, WEB_APP_MAX_ROUTES, WEB_APP_MAX_ASSET_BYTES, WEB_APP_CSP_NONCE_PLACEHOLDER, EVIDENCE_SESSION_IDLE_MS, EVIDENCE_MIN_CONVERSATIONS, EVIDENCE_LOW_CONFIDENCE_N, EVIDENCE_SNIPPET_MAX_CHARS, EVIDENCE_EXAMPLES_PER_ITEM, EVIDENCE_SHOWN_ITEMS, EVIDENCE_LATENCY_BOUNDS_MS, EVIDENCE_WORD_BOUNDS, BAD_CONVERSATION_REASONS, ATTACHMENT_LINES, REVIEW_VERDICT_REASON_ORDER, ENV_TEMPLATE_SECRET_KEY_RE, CONNECTION_SEND_NOT_ALLOWED, CONNECTION_RECIPIENT_NOT_ALLOWED, NOT_SEND, PLAIN_ADDRESS, RecipientSet, MCP_MESSAGING_CREATE, MCP_CALENDAR_EVENT_WRITE, REPLY_KEYS, DEDICATED_MAIL_SLUGS, FULL_SUITE_SLUGS, WELL_KNOWN_MAIL_FOLDERS, MEMBER_KEYS, CANONICAL_ORIGIN, CANONICAL_PREFIX, STRICT_BASE64, GMAIL_PREFIX, GMAIL_MESSAGES_SEND, GMAIL_DRAFTS_SEND, GOOGLE_BATCH, GRAPH_VERSION, GRAPH_PRINCIPAL, GRAPH_SEND_MAIL, GRAPH_MESSAGE_ACTION, GRAPH_OWNER, GRAPH_EVENTS, GRAPH_EVENT_COLLECTION, GRAPH_EVENT_ID, GRAPH_EVENT_ITEM, GRAPH_EVENT_ACTION, GRAPH_BATCH, GRAPH_TEAMS_MESSAGE, GRAPH_ACTIVITY_NOTIFICATION, GRAPH_GROUP_CONVERSATION, GCAL_EVENTS, GRAPH_READ_KEYS, MALFORMED_POLICY, BILLING_REJECTION_TEXT_CREDITS, BILLING_REJECTION_TEXT_SEAT, BILLING_REJECTION_TEXT_USER_QUOTA, CUSTOM_MCP_CONNECTION_ID_PREFIX, CUSTOM_MCP_SOURCE, CUSTOM_MCP_TRANSPORT, CUSTOM_MCP_CONNECTION_ID_PATTERN, customMcpConnectionIdSchema, CONNECTION_BACKED_MCP_SOURCES, CUSTOM_MCP_REFERENCE_ID_PATTERN, customMcpReferenceIdSchema, CUSTOM_MCP_AUTH_KINDS, customMcpAuthKindSchema, CUSTOM_MCP_OAUTH_REGISTRATIONS, customMcpOAuthRegistrationSchema, CUSTOM_MCP_HEALTH_STATES, customMcpHealthStateSchema, CUSTOM_MCP_FAILURE_STEPS, customMcpFailureStepSchema, CUSTOM_MCP_CONNECT_STEPS, customMcpConnectStepSchema, customMcpFailureCodeSchema, WORKFLOW_KEY_MAX_LENGTH, CUSTOM_MCP_URL_MAX_LENGTH, CUSTOM_MCP_DISPLAY_NAME_MAX_LENGTH, CUSTOM_MCP_MAX_HEADERS, CUSTOM_MCP_HEADER_NAME_MAX_LENGTH, CUSTOM_MCP_HEADER_VALUE_MAX_LENGTH, CUSTOM_MCP_MAX_TOOLS, CUSTOM_MCP_TOOL_NAME_MAX_LENGTH, CUSTOM_MCP_TOOL_TEXT_MAX_LENGTH, CUSTOM_MCP_MIN_TIMEOUT_MS, CUSTOM_MCP_MAX_TIMEOUT_MS, CUSTOM_MCP_OAUTH_PENDING_TTL_MS, isoDateTime, agentId, nonNegativeInt, customMcpUrlInputSchema, customMcpDisplayNameSchema, customMcpTimeoutSchema, CUSTOM_MCP_RESERVED_HEADER_NAMES, HEADER_NAME, HEADER_VALUE_FORBIDDEN, customMcpHeaderNameSchema, headerValue, customMcpHeadersSchema, customMcpHeadersPatchSchema, customMcpToolNameSchema, customMcpToolSchema, customMcpServerInfoSchema, customMcpToolSelectionSchema, customMcpToolsResponseSchema, customMcpFailureSchema, customMcpHealthSchema, customMcpErrorBodySchema, customMcpConnectionBlockSchema, customMcpConnectionViewSchema, customMcpConnectionResponseSchema, customMcpProbeBodySchema, customMcpOAuthDiscoverySchema, customMcpProbeResponseSchema, createFields, mountAgentField, customMcpCreateAgentBodySchema, customMcpCreateUserBodySchema, customMcpOAuthClientSchema, startFields, customMcpOAuthStartAgentBodySchema, customMcpOAuthStartUserBodySchema, customMcpOAuthStartResponseSchema, nonce, customMcpOAuthSuccessRedirectQuerySchema, CUSTOM_MCP_OAUTH_CALLBACK_ERRORS, customMcpOAuthFailureRedirectQuerySchema, customMcpOAuthFinalizeBodySchema, customMcpCimdDocumentSchema, customMcpPatchBodySchema, customMcpCredentialRequestSchema, customMcpCredentialAuthSchema, customMcpCredentialResponseSchema, CUSTOM_MCP_CREDENTIAL_ERRORS, customMcpCredentialErrorBodySchema, customMcpHealthReportSchema, customMcpProbeRequestSchema, customMcpProbeResultSchema, customMcpOriginUrlSchema, customMcpServerProjectionSchema, customMcpMountUpsertBodySchema;
7116
+ var __defProp2, __name2, PLUMBING_THREAD_CHANNELS, CHANNEL_CONVERSATION_CHANNELS, HIDDEN_THREAD_CHANNELS, CHOICE_PERSON_TURN_CHANNELS, CHOICE_REPLAY_CLIENT_CAPABILITIES, CHOICE_REPLAY_CLIENT_SURFACES, INTEGRATION_PASSTHROUGH_READ_METHODS, URL_REINTERPRETED_PATH_CHARACTERS, PERCENT_ENCODED_DOT, PERCENT_ESCAPE, DECODED_PATH_SEPARATORS, DECODED_LEADING_SEPARATOR, MAX_PERCENT_DECODE_ROUNDS, URL_RESOLUTION_PROBE_BASE, PLATFORM_INVOCATION_CALLERS, SUPERVISION_OPS, SUPERVISION_OPS_WAVE2, SUPERVISION_WATCHDOG_OPS, SUPERVISION_WATCHDOG_ERRORS, SUPERVISION_ROLLBACK_REFUSAL_CODES, SUPERVISION_ROLLBACK_LINEAGE_MAX, SUPERVISION_UNTARGETED_OPS, SUPERVISED_WORKFLOW_VERSIONS_MAX, SUPERVISION_EVENT_KINDS, AGENT_PROVISIONING_LIMITS, AGENT_PROVISIONING_APPROVAL_PAYLOAD_KEY, AGENT_PROVISIONING_ERRORS, PROVISIONED_SUPERVISION_ACTIONS, isNonEmptyString, uniqueStrings, sameSet, AGENT_PROVISIONING_APPROVAL_CARD_MAX_CHARS, APPROVAL_PAYLOAD_MEMBERS, AGENT_CONNECTION_POLICIES, AGENT_CONNECTION_POLICY_DEFAULT, AGENT_CONNECTION_MOUNT_MODES, AGENT_CONNECTION_GOVERNANCE_ERRORS, AGENT_CONNECTION_OPERATION_RULES_MAX, AGENT_CONNECTION_OPERATION_PATTERN_MAX_LENGTH, OPERATION_RULE_METHODS, PATH_SEPARATOR, PATH_SINGLE_SEGMENT_WILDCARD, PATH_REST_WILDCARD, METHOD_OVERRIDE_HEADER_NAMES, METHOD_OVERRIDE_QUERY_NAMES, ODATA_BATCH_SEGMENT, GOOGLE_BATCH_FIRST_SEGMENT, CONNECTION_CHECK_RESULTS, CONNECTION_CHECK_CATALOGUE_V1, CONNECTION_CHECK_NAME_PATTERN, CONNECTION_CHECK_NAME_MAX, CONNECT_OUTCOME_STATUSES, SECRET_TEST_RESULTS, SECRET_DATADOG_REGIONS, SECRET_PROVIDER_CATALOGUE_V1, SECRET_TEST_MAX_RESPONSE_BYTES, SECRET_ENV_KEY_PATTERN, SECRET_REQUEST_ERRORS, SECRET_OUTCOME_STATUSES, CLIENT_OUTCOME_TURNS_MAX, SHORT_TEXT_MAX, SLUG_MAX, shortText, optionalShortText, CONNECTION_REQUEST_TERMINAL_STATES, CONNECTION_USE_ORIGINS, AGENT_CONNECTION_OPERATION_LIMITS_BOUNDS, CURRENCY_CODE, LIMITS_KEYS, CAPS_KEYS, EXCLUSIONS_KEYS, EMAIL_IN_TEXT, MAX_EXCLUSION_DEPTH, PROJECTION_PARAMETER_KEYS, CHANNEL_PARAMETER_KEYS, GMAIL_SYSTEM_LABEL_IDS, ZERO_DECIMAL_CURRENCIES, THREE_DECIMAL_CURRENCIES, DECIMAL_AMOUNT, REDACTED_PLACEHOLDER, PROVIDER_MESSAGE_MAX_CHARS, ERROR_MESSAGE_MAX_CHARS, SECRET_LITERAL_PATTERNS, SECRET_NAME, SECRET_PAIR_PATTERNS, GROUP_COUNT, WORKFLOW_SECRET_KEY_RE, WORKFLOW_RESERVED_SECRET_KEYS, SCRUB_INPUT_MAX_CHARS, SCRUB_CUT_BACKOFF_CHARS, TEST_SESSION_ID_PATTERN, TEST_SESSION_COLLECTION_PREFIX, TEST_EFFECT_BODY_MAX_BYTES, TEST_EFFECT_DROPPED_HEADERS, EVAL_CREDITS_PER_1K_TOKENS, EVAL_RESERVED_TOOL_ID_PREFIXES, CONNECTION_HANDOVER_APPROVAL_PAYLOAD_KEY, CONNECTION_HANDOVER_APPROVAL_CARD_MAX_CHARS, CONNECTION_HANDOVER_LIMITS, MEMBERS, FORMAT_CHARS, oneLine, boundedString, AGENT_METRIC_NAME_PATTERN, AGENT_METRIC_LIMITS, AGENT_OBJECTIVE_ERRORS, CHANGE_LEASE_TTL_MINUTES_MIN, CHANGE_LEASE_TTL_MINUTES_MAX, CHANGE_LEASE_REASON_MAX, CHANGE_LEASE_ERRORS, AGENT_CONFIG_SET_LIMITS, SECRET_ENV_KEY_SUFFIXES, DEFAULT_OWNER_DEPARTURE_POLICY, AGENT_LIFECYCLE_ERRORS, USER_COST_COUNTER_TTL_SECONDS, USER_COST_ATTRIBUTION_CHANNELS, CALLER_DEDUPE_KEY_MAX, FOLLOW_UP_IDEMPOTENCY_TTL_SECONDS, THREAD_FOLLOW_UP_LIMITS, THREAD_FOLLOW_UP_ERRORS, PROGRESS_UPDATE_LIMITS, PAUSABLE_CAPABILITY_KINDS, UNIFIED_CATCH_UP_MAX_WINDOW_HOURS, UNIFIED_CATCH_UP_EVENTS, UNIFIED_CATCH_UP_FILTERABLE_OBJECT_TYPES, AGENT_NEVER_RULES_MAX, AGENT_NEVER_RULE_FIELD_MAX, AGENT_NEVER_RULE_INPUT_MATCH_MAX, NEVER_RULE_ID_PATTERN, NEVER_RULE_HTTP_METHODS, TEMPLATE_DISTRIBUTION_MODES, TAKEOVER_MAX_IDLE_MINUTES, MINUTES_PER_DAY, DEFAULT_IDLE_RELEASE_MINUTES, FALLBACK_IDLE_RELEASE_MINUTES, VARIATION_SELECTORS, SLACK_EMOJI_NAMES, SLACK_SHORTCODE, PLAIN_EMAIL_ADDRESS, DOMAIN, UNSAFE_TEXT, SLACK_CONVERSATION_ID, CHANNEL_SETTING_GROUPS, THREAD_SCOPING_NOUN, TAKEOVER_CHANNEL_TYPES, EMAIL_SETTINGS, SLACK_SETTING_DEFAULTS, SLACK_REACTION_MAX, SLACK_INTRO_MAX, SLACK_EXAMPLE_PROMPTS_MAX, SLACK_EXAMPLE_PROMPT_MAX, SLACK_SUPPORT_CONTACT_MAX, SLACK_SETTINGS, CHANNEL_SETTINGS, REVIEWABLE_ACTION_EXECUTE_TOOL_ALLOWLIST, REVIEWABLE_STANDING_START_TOOLS, REVIEWABLE_MCP_SEND_TOOL_SUFFIX, MCP_TOOL_READ_VERB_RE, MCP_DRAFT_CREATE_VERBS, NON_INTERACTIVE_CHANNELS, RICH_PARTS_MESSAGE_ID_PREFIX, SCREENSHOT_MESSAGE_ID_PREFIX, WORK_ITEMS_KEY, MAX_WORK_ITEMS, LIMITS, BROWSER_COMMANDS, BROWSER_COMMAND_NAMES, LOG_FIELDS_MAX_KEYS, LOG_FIELD_MAX_VALUE_BYTES, LOG_FIELDS_MAX_BYTES, LOG_FIELD_KEY_PATTERN, LOG_FIELD_SECRET_SHAPED_KEY_PATTERNS, LOG_FIELDS_CLAMPED_KEY, LOG_FIELD_ARRAY_COUNT_SUFFIX, LuaLogFieldsError, DESKTOP_FILE_COMMANDS, DESKTOP_FILE_COMMAND_SET, WORKFLOW_RETRY_BACKOFFS, WORKFLOW_RETRY_MIN_ATTEMPTS, WORKFLOW_RETRY_POLICY_KEYS, WORKFLOW_RETRY_MAX_ATTEMPTS, WORKFLOW_RETRY_ENGINE_KEYS, WORKFLOW_JOB_RESOURCES, WORKFLOW_SIDE_EFFECTS, WORKFLOW_AGENT_EFFORTS, WORKFLOW_MODEL_CLASSES, WORKFLOW_TASK_CLASSES, WORKFLOW_MODEL_TRAITS, WORKFLOW_MODEL_REASON_MAX_LENGTH, WORKFLOW_MODELS_COMPOSE_MODES, WORKFLOW_MODELS_PIN_MODES, WORKFLOW_MODELS_FALLBACK_MODES, WORKFLOW_MODELS_CONSENT_ACTIONS_MIN, WORKFLOW_DEFAULT_TASK_CLASS_MAP, WORKFLOW_MODELS_MAX_CLASS_DEFAULT, WORKFLOW_AUTONOMY_FORMS, WORKFLOW_AUTONOMY_NUMERIC_KEYS, WORKFLOW_AUTONOMY_ENVELOPE_KEYS, WORKFLOW_AUTONOMY_ENABLED_DEFAULT, WORKFLOW_AUTONOMY_DEFAULTS, WORKFLOW_AUTONOMY_CEILINGS, WORKFLOW_AUTONOMY_MAX_RUNS_PER_HOUR_ENV, WORKFLOW_AUTONOMY_MAX_RUNS_PER_HOUR_CEILING, WORKFLOW_AUTONOMY_FORMS_DEFAULT, WORKFLOW_AUTONOMY_MIN_VALUE, WORKFLOW_JOB_RANGES, WORKFLOW_JOB_RANGE_MEMBERS, WORKFLOW_SINGLE_STEP_TYPES, WORKFLOW_HITL_ENTRY_TYPES, WORKFLOW_ARM_ENTRY_TYPES, WORKFLOW_HITL_ARM_CONTAINERS, WORKFLOW_GRAPH_ENTRY_STEP_KINDS, WORKFLOW_ARM_ENTRY_STEP_KINDS, WORKFLOW_BUDGET_MAX_DURATION_SECONDS, MODEL_ID_BYOK_PROVIDERS, MODEL_CLASS_REF_PREFIX, MODEL_SNAPSHOT_SUFFIX, REASONING_EFFORT_VALUES, IMPLICIT_MODEL_SELECTION_SOURCES, PLATFORM_FALLBACK_MODEL_SOURCE, AGENT_NAME_TOKEN, DEFAULT_PERSONA_GUIDE, PERSONAL_SPACE_STARTING_PERSONA, AGENT_LOG_SOURCES, AGENT_LOG_ENVIRONMENTS, AGENT_LOG_FIELDS_MAX_WIRE_KEYS, LOG_DRAIN_TYPES_PHASE1, LOG_DRAIN_TYPES_PHASE2, LOG_DRAIN_TYPES_IMPLEMENTED, LOG_DRAIN_FORMATS, LOG_DRAIN_SEVERITIES, LOG_DRAIN_SOURCES, LOG_DRAIN_CONTENT_SOURCES, LOG_DRAIN_DEFAULT_SOURCES, LOG_DRAIN_MAX_PER_ORG, LOG_DRAIN_MAX_PER_ORG_ENTERPRISE, LOG_DRAIN_DATADOG_SITES, LOG_DRAIN_NEWRELIC_SITES, LOG_DRAIN_ENDPOINT_TEMPLATES, LOG_DRAIN_PRESET_SITES, LOG_DRAIN_BUCKET_NAME_PATTERN, LOG_DRAIN_BUCKET_HOST_PATTERNS, LOG_DRAIN_PRESET_HOST_SUFFIXES, DRAIN_CONTENT_ACK_ERROR_CODE, DRAIN_CONTENT_ACK_FIELD, DrainContentAckRequiredError, LOG_DRAIN_PRESET_PATHS, PRESET_SEGMENT_RE, LOG_DRAIN_QUOTAS, LOG_DRAIN_QUOTA_WARN_RATIO, LOG_DRAIN_QUOTA_DROP_DEBUG_RATIO, LOG_DRAIN_QUOTA_DROP_INFO_RATIO, LOG_DRAIN_QUOTA_PAUSE_RATIO, LOG_EXPORT_SOURCES, LOG_EXPORT_MAX_WINDOW_DAYS, LOG_EXPORT_MAX_WINDOW_MS, LOG_EXPORT_URL_TTL_SECONDS, LOG_EXPORT_FILE_RETENTION_DAYS, LOG_EXPORT_FILE_RETENTION_MS, LOG_EXPORT_PART_MAX_BYTES, LOG_DRAIN_NOTICE_RATE_LIMIT_MS, LOG_DRAIN_VERIFICATION_STALE_MS, LOG_DRAIN_DIGEST_INTERVAL_MS, LOG_DRAIN_DIGEST_MAX_ENTRIES, LOG_DRAIN_NOTICE_ERROR_MAX_CHARS, LOG_DRAIN_USAGE_LINE_ITEM, LOG_DRAIN_BYTES_PER_GIB, DEFAULT_LOG_DRAIN_PLAN_CONFIG, TIERS, LOG_CURSOR_MAX_LENGTH, LOG_CURSOR_MAX_ID_LENGTH, LOG_RELATIVE_TIME_PATTERN, LOG_ISO_TIME_PATTERN, RELATIVE_UNIT_MS, CORE_DRAINING_CODE, CORE_DRAINING_DEFAULT_RETRY_MS, CORE_DRAINING_MAX_RETRY_MS, VoiceNameSchema, PluginProviderSchema, RealtimeProviderSchema, PluginClassSchema, ModelDescriptorSchema, InferenceModelSchema, PluginModelSchema, RealtimeModelSchema, LuaVoiceModelSchema, TurnDetectionSchema, InterruptionSchema, BuiltinAudioClipSchema, AudioConfigSchema, BackgroundAudioEntrySchema, BackgroundAudioSchema, LuaVoiceConfigInnerSchema, LuaVoiceConfigSchema, LuaVoiceRefSchema, EventType, LUA_JOB_DEFAULT_TIMEOUT_SECONDS, LUA_JOB_MIN_TIMEOUT_SECONDS, LUA_JOB_MAX_TIMEOUT_SECONDS, KEYS, MAX_BODY_BYTES, MAX_ID_LENGTH, UTC_ISO, TEMPLATE_TRIGGER_URL_ENV_PREFIX, TEMPLATE_INSTALL_POLICY_PER_WORKSPACE_VALUES, SUBJECT_TYPES, SubjectTypeSchema, CREDENTIAL_TYPES, CredentialTypeSchema, DEVICE_OPERATIONS, DeviceOperationSchema, DEVICE_SCOPE_BY_OPERATION, DeviceBindingSchema, TYPED_API_KEY, IdSchema, SESSION_AUTH_TIME_MAX_S, PrincipalDescriptorSchema, ActorDescriptorSchema, PrincipalOwnerSchema, CredentialLifecycleSchema, GeneralCredentialDescriptorSchema, DeviceCredentialDescriptorSchema, GeneralPrincipalContextSchema, DeviceCredentialPrincipalContextSchema, RawPrincipalContextSchema, PrincipalContextSchema, DeviceCredentialClaimSchema, LUA_CLIENT_HEADER, LUA_CLIENT_APPS, SEMVER_PATTERN, WEB_RELEASE_PATTERN, CLIENT_HEADER_PATTERN, LUA_SESSION_ID_CLAIM, SESSION_REVOKED_CODE, AUTHZ_PROJECTION_VERSION, ProjectedScopeSchema, DisplayRoleSchema, AuthorizationPrincipalSchema, CredentialContextSchema, ProjectionAnomalySchema, ProjectedOrgSchema, ProjectedResourceSchema, CapabilityProfilesSchema, RoleCatalogSchema, EffectiveAuthorizationSchema, ResourcePageSchema, SYSTEM_USER_PREFIX, WORKFLOW_RUN_IN_FLIGHT, WORKFLOW_RUN_IDLE, WORKFLOW_RUN_TERMINAL, WORKFLOW_RUN_STATUSES, WORKFLOW_RUN_GATE_KINDS, WORKFLOW_STEP_STATUSES, WORKFLOW_STEP_IN_FLIGHT, WORKFLOW_SIGNAL_EVENT_SITES, ARCHIVE_WINDOW_MARGIN_DAYS, WORKFLOW_ORG_PURGING_TTL_S, WORKFLOW_ORG_PURGE_FORCE_AFTER_MS, IDEMPOTENCY_HOLDING_STATUSES, WORKFLOW_SCHEDULED_RUN_ID_PREFIX, CLOUD_TASK_RUN_ID_PREFIX, WORKFLOW_SCHEDULE_KEY_MAX, WORKFLOW_SCHEDULE_IDEMPOTENCY_KEY_PREFIX, WORKFLOW_OPERATION_ID_PREFIX, WORKFLOW_JOURNAL_PROTOCOL_VERSION, WORKFLOW_CONNECTION_KEY_RE, WORKFLOW_AGENT_APP_CONNECTION_PREFIX, WORKFLOW_JOB_MODEL_SOURCE_LABELS, WORKFLOW_SUSPEND_KINDS, WORKFLOW_RUN_NOTIFICATION_SUSPENDED_KINDS, WORKFLOW_SIGNAL_PAYLOAD_MAX_BYTES, WORKFLOW_SIGNAL_NAME_RE, WORKFLOW_SUSPEND_DEFAULT_TIMEOUT_HOURS, WORKFLOW_RESOLVE_OUTPUT_MAX_BYTES, SCHEDULE_HEALTH_NOTIFY_CHANNELS, SCHEDULE_HEALTH_DEFAULT_NOTIFY, SCHEDULE_HEALTH_LIMITS, KNOWN_KEYS, WORKFLOW_GOAL_JUDGE_SELF, APPROVAL_ARGS_MAX_CHARS, APPROVAL_ARG_STRING_MAX_CHARS, APPROVAL_ARGS_SUMMARY_MAX_CHARS, MAX_DEPTH, MAX_KEYS, MAX_ITEMS, MAX_NODES, MAX_KEY_CHARS, KEY_SCRUB_INPUT_MAX_CHARS, STRING_SCRUB_INPUT_MAX_CHARS, ELLIPSIS, SKIP, SCRUB_SECRETS_BEFORE_PERSIST_ENV, PERSIST_SCRUB_MAX_CHARS, PERSIST_SCRUB_REF_MAX_CHARS, WORKFLOW_AUDIT_EVENTS, WORKFLOW_AUDIT_METADATA_MAX_BYTES, INDENT, WRAP_WIDTH, NOUNS, GET_TOOL_NAMES, PREAMBLE, WORKFLOW_APPROVAL_OUTPUT_DECISIONS, WORKFLOW_APPROVAL_OUTPUT_SCHEMA, JSON_FENCE_RE, DEFAULT_ON_AGENT_FEATURES, SUBAGENT_PER_KEY_FLAG_ENV, PER_KEY_FLAG_VALUES, ONBOARDING_FLOW_KEY, ONBOARDING_SCHEMA_VERSION, id, copy, onboardingHeadingSchema, onboardingRichTextInlineSchema, onboardingRichTextSchema, onboardingDestinationSchema, onboardingArtworkSchema, onboardingAnswerSchema, onboardingQuestionSchema, onboardingTemplateSectionSchema, onboardingInstallScreenSchema, onboardingResultScreenSchema, onboardingConnectScreenSchema, onboardingTemplateContentSchema, onboardingUnavailableOutcomeSchema, onboardingFlowSchema, onboardingActorSchema, onboardingEditorSchema, onboardingPublicationSummarySchema, onboardingValidationIssueSchema, onboardingValidationResponseSchema, onboardingAssetSchema, onboardingPublicAssetSchema, getOnboardingConfigResponseSchema, saveOnboardingDraftRequestSchema, validateOnboardingRequestSchema, publishOnboardingRequestSchema, rollbackOnboardingRequestSchema, onboardingTemplateCatalogItemSchema, getPublishedOnboardingResponseSchema, WEB_ROUTE_PROTOCOL_VERSION, WEB_ROUTE_METHODS, WEB_ROUTE_REQUEST_HEADER_ALLOWLIST, WEB_ROUTE_RESPONSE_HEADER_ALLOWLIST, WEB_ROUTE_MAX_WALL_MS, WEB_ROUTE_MAX_REQUEST_BODY_BYTES, WEB_ROUTE_MAX_RESPONSE_BYTES, WEB_APP_NAME_PATTERN, WEB_APP_ENTRY_HTML_MAX_CHARS, WEB_APP_MAX_ASSETS, WEB_APP_ASSET_PATH_PATTERN, WEB_APP_ASSET_PATH_MAX_CHARS, WEB_APP_MAX_ROUTES, WEB_APP_MAX_ASSET_BYTES, WEB_APP_CSP_NONCE_PLACEHOLDER, EVIDENCE_SESSION_IDLE_MS, EVIDENCE_MIN_CONVERSATIONS, EVIDENCE_LOW_CONFIDENCE_N, EVIDENCE_SNIPPET_MAX_CHARS, EVIDENCE_EXAMPLES_PER_ITEM, EVIDENCE_SHOWN_ITEMS, EVIDENCE_LATENCY_BOUNDS_MS, EVIDENCE_WORD_BOUNDS, BAD_CONVERSATION_REASONS, ATTACHMENT_LINES, REVIEW_VERDICT_REASON_ORDER, ENV_TEMPLATE_SECRET_KEY_RE, CONNECTION_SEND_NOT_ALLOWED, CONNECTION_RECIPIENT_NOT_ALLOWED, NOT_SEND, PLAIN_ADDRESS, RecipientSet, MCP_MESSAGING_CREATE, MCP_CALENDAR_EVENT_WRITE, REPLY_KEYS, DEDICATED_MAIL_SLUGS, FULL_SUITE_SLUGS, WELL_KNOWN_MAIL_FOLDERS, MEMBER_KEYS, CANONICAL_ORIGIN, CANONICAL_PREFIX, STRICT_BASE64, GMAIL_PREFIX, GMAIL_MESSAGES_SEND, GMAIL_DRAFTS_SEND, GOOGLE_BATCH, GRAPH_VERSION, GRAPH_PRINCIPAL, GRAPH_SEND_MAIL, GRAPH_MESSAGE_ACTION, GRAPH_OWNER, GRAPH_EVENTS, GRAPH_EVENT_COLLECTION, GRAPH_EVENT_ID, GRAPH_EVENT_ITEM, GRAPH_EVENT_ACTION, GRAPH_BATCH, GRAPH_TEAMS_MESSAGE, GRAPH_ACTIVITY_NOTIFICATION, GRAPH_GROUP_CONVERSATION, GCAL_EVENTS, GRAPH_READ_KEYS, MALFORMED_POLICY, BILLING_REJECTION_TEXT_CREDITS, BILLING_REJECTION_TEXT_SEAT, BILLING_REJECTION_TEXT_USER_QUOTA, CUSTOM_MCP_CONNECTION_ID_PREFIX, CUSTOM_MCP_SOURCE, CUSTOM_MCP_TRANSPORT, CUSTOM_MCP_CONNECTION_ID_PATTERN, customMcpConnectionIdSchema, CONNECTION_BACKED_MCP_SOURCES, CUSTOM_MCP_REFERENCE_ID_PATTERN, customMcpReferenceIdSchema, CUSTOM_MCP_AUTH_KINDS, customMcpAuthKindSchema, CUSTOM_MCP_OAUTH_REGISTRATIONS, customMcpOAuthRegistrationSchema, CUSTOM_MCP_HEALTH_STATES, customMcpHealthStateSchema, CUSTOM_MCP_FAILURE_STEPS, customMcpFailureStepSchema, CUSTOM_MCP_CONNECT_STEPS, customMcpConnectStepSchema, customMcpFailureCodeSchema, WORKFLOW_KEY_MAX_LENGTH, CUSTOM_MCP_URL_MAX_LENGTH, CUSTOM_MCP_DISPLAY_NAME_MAX_LENGTH, CUSTOM_MCP_MAX_HEADERS, CUSTOM_MCP_HEADER_NAME_MAX_LENGTH, CUSTOM_MCP_HEADER_VALUE_MAX_LENGTH, CUSTOM_MCP_MAX_TOOLS, CUSTOM_MCP_TOOL_NAME_MAX_LENGTH, CUSTOM_MCP_TOOL_TEXT_MAX_LENGTH, CUSTOM_MCP_MIN_TIMEOUT_MS, CUSTOM_MCP_MAX_TIMEOUT_MS, CUSTOM_MCP_OAUTH_PENDING_TTL_MS, isoDateTime, agentId, nonNegativeInt, customMcpUrlInputSchema, customMcpDisplayNameSchema, customMcpTimeoutSchema, CUSTOM_MCP_RESERVED_HEADER_NAMES, HEADER_NAME, HEADER_VALUE_FORBIDDEN, customMcpHeaderNameSchema, headerValue, customMcpHeadersSchema, customMcpHeadersPatchSchema, customMcpToolNameSchema, customMcpToolSchema, customMcpServerInfoSchema, customMcpToolSelectionSchema, customMcpToolsResponseSchema, customMcpFailureSchema, customMcpHealthSchema, customMcpErrorBodySchema, customMcpConnectionBlockSchema, customMcpConnectionViewSchema, customMcpConnectionResponseSchema, customMcpProbeBodySchema, customMcpOAuthDiscoverySchema, customMcpProbeResponseSchema, createFields, mountAgentField, customMcpCreateAgentBodySchema, customMcpCreateUserBodySchema, customMcpOAuthClientSchema, startFields, customMcpOAuthStartAgentBodySchema, customMcpOAuthStartUserBodySchema, customMcpOAuthStartResponseSchema, nonce, customMcpOAuthSuccessRedirectQuerySchema, CUSTOM_MCP_OAUTH_CALLBACK_ERRORS, customMcpOAuthFailureRedirectQuerySchema, customMcpOAuthFinalizeBodySchema, customMcpCimdDocumentSchema, customMcpPatchBodySchema, customMcpCredentialRequestSchema, customMcpCredentialAuthSchema, customMcpCredentialResponseSchema, CUSTOM_MCP_CREDENTIAL_ERRORS, customMcpCredentialErrorBodySchema, customMcpHealthReportSchema, customMcpProbeRequestSchema, customMcpProbeResultSchema, customMcpOriginUrlSchema, customMcpServerProjectionSchema, customMcpMountUpsertBodySchema;
7040
7117
  var init_dist = __esm({
7041
7118
  "../shared-types/dist/index.mjs"() {
7042
7119
  "use strict";
@@ -8331,7 +8408,7 @@ var init_dist = __esm({
8331
8408
  FORMAT_CHARS = /[\p{Cf}\u200b-\u200d\u202a-\u202e\u2066-\u2069\ufeff]/u;
8332
8409
  __name(hasFormatCharacters, "hasFormatCharacters");
8333
8410
  __name2(hasFormatCharacters, "hasFormatCharacters");
8334
- oneLine = /* @__PURE__ */ __name2((text) => text.replace(/[\u0000-\u001f\u007f-\u009f\u2028\u2029"\u201c\u201d]/g, " ").replace(/\s+/g, " ").trim(), "oneLine");
8411
+ oneLine = /* @__PURE__ */ __name2((text2) => text2.replace(/[\u0000-\u001f\u007f-\u009f\u2028\u2029"\u201c\u201d]/g, " ").replace(/\s+/g, " ").trim(), "oneLine");
8335
8412
  __name(normalizedHandoverName, "normalizedHandoverName");
8336
8413
  __name2(normalizedHandoverName, "normalizedHandoverName");
8337
8414
  __name(handoverAgentIdSuffix, "handoverAgentIdSuffix");
@@ -9060,6 +9137,25 @@ var init_dist = __esm({
9060
9137
  __name2(citationDedupeKeys, "citationDedupeKeys");
9061
9138
  __name(foldRichPartsIntoMessages, "foldRichPartsIntoMessages");
9062
9139
  __name2(foldRichPartsIntoMessages, "foldRichPartsIntoMessages");
9140
+ WORK_ITEMS_KEY = "_luaWorkItems";
9141
+ MAX_WORK_ITEMS = 100;
9142
+ LIMITS = {
9143
+ id: 200,
9144
+ title: 120,
9145
+ group: 40,
9146
+ status: 40,
9147
+ action: 200
9148
+ };
9149
+ __name(text, "text");
9150
+ __name2(text, "text");
9151
+ __name(normalizeWorkItems, "normalizeWorkItems");
9152
+ __name2(normalizeWorkItems, "normalizeWorkItems");
9153
+ __name(workItemsRecord, "workItemsRecord");
9154
+ __name2(workItemsRecord, "workItemsRecord");
9155
+ __name(withoutWorkItems, "withoutWorkItems");
9156
+ __name2(withoutWorkItems, "withoutWorkItems");
9157
+ __name(mutationWithoutWorkItems, "mutationWithoutWorkItems");
9158
+ __name2(mutationWithoutWorkItems, "mutationWithoutWorkItems");
9063
9159
  BROWSER_COMMANDS = [
9064
9160
  // health + lifecycle / navigation
9065
9161
  {
@@ -13586,17 +13682,17 @@ function firstAskDeadline(node) {
13586
13682
  return void 0;
13587
13683
  }
13588
13684
  function liftRenderedApprover(row2, rendered) {
13589
- const text = (rendered ?? "").trim();
13590
- if (!text) return null;
13685
+ const text2 = (rendered ?? "").trim();
13686
+ if (!text2) return null;
13591
13687
  if (row2 === "users") {
13592
13688
  let members = null;
13593
- if (text.startsWith("[")) {
13689
+ if (text2.startsWith("[")) {
13594
13690
  try {
13595
- members = JSON.parse(text);
13691
+ members = JSON.parse(text2);
13596
13692
  } catch {
13597
13693
  return null;
13598
13694
  }
13599
- } else members = text.split(",").map((s) => s.trim());
13695
+ } else members = text2.split(",").map((s) => s.trim());
13600
13696
  if (!Array.isArray(members) || members.length === 0 || members.length > APPROVER_SPEC_MAX_USERS) return null;
13601
13697
  if (!members.every((m) => typeof m === "string" && m.length > 0 && m.length <= 128)) return null;
13602
13698
  return {
@@ -13605,11 +13701,11 @@ function liftRenderedApprover(row2, rendered) {
13605
13701
  ].sort()
13606
13702
  };
13607
13703
  }
13608
- if (text.length > 128 || text.startsWith("[") || text.startsWith("{")) return null;
13704
+ if (text2.length > 128 || text2.startsWith("[") || text2.startsWith("{")) return null;
13609
13705
  return row2 === "role" ? {
13610
- role: text
13706
+ role: text2
13611
13707
  } : {
13612
- group: text
13708
+ group: text2
13613
13709
  };
13614
13710
  }
13615
13711
  function approverUsersOf(users) {
@@ -13766,9 +13862,9 @@ function schemaAtPath(schema, path31) {
13766
13862
  }
13767
13863
  return cur;
13768
13864
  }
13769
- function templateStepRefs(text) {
13865
+ function templateStepRefs(text2) {
13770
13866
  const ids = [];
13771
- for (const m of text.matchAll(TEMPLATE_STEP_REF)) ids.push(m[1]);
13867
+ for (const m of text2.matchAll(TEMPLATE_STEP_REF)) ids.push(m[1]);
13772
13868
  return ids;
13773
13869
  }
13774
13870
  function readMapConfig(raw) {
@@ -19913,17 +20009,17 @@ var init_dist3 = __esm({
19913
20009
  body: body !== void 0 ? JSON.stringify(body) : void 0
19914
20010
  });
19915
20011
  if (!res.ok) {
19916
- let text2;
20012
+ let text22;
19917
20013
  try {
19918
- text2 = await res.text();
20014
+ text22 = await res.text();
19919
20015
  } catch {
19920
- text2 = void 0;
20016
+ text22 = void 0;
19921
20017
  }
19922
- throw new BackupHttpError(`Backup request failed: ${method} ${path31} \u2192 ${res.status} ${res.statusText}`, res.status, endpoint, text2);
20018
+ throw new BackupHttpError(`Backup request failed: ${method} ${path31} \u2192 ${res.status} ${res.statusText}`, res.status, endpoint, text22);
19923
20019
  }
19924
- const text = await res.text();
19925
- if (!text) return void 0;
19926
- return JSON.parse(text);
20020
+ const text2 = await res.text();
20021
+ if (!text2) return void 0;
20022
+ return JSON.parse(text2);
19927
20023
  }
19928
20024
  /**
19929
20025
  * `POST /backup/check-blobs` — returns existing vs missing partition.
@@ -23098,7 +23194,7 @@ function isToolShapedLiteral(literal, typeAnnotation, initializerText) {
23098
23194
  })();
23099
23195
  if (!executeIsCallable) return false;
23100
23196
  if (literal.getProperty("description") || literal.getProperty("inputSchema")) return true;
23101
- const annotated = /* @__PURE__ */ __name((text) => !!text && /\bLua(Voice)?Tool\b/.test(text), "annotated");
23197
+ const annotated = /* @__PURE__ */ __name((text2) => !!text2 && /\bLua(Voice)?Tool\b/.test(text2), "annotated");
23102
23198
  return annotated(typeAnnotation) || annotated(initializerText);
23103
23199
  }
23104
23200
  var ToolPlugin;
@@ -25828,6 +25924,7 @@ var init_agent_plugin = __esm({
25828
25924
  const result = {};
25829
25925
  if (typeof batching.firstMessageDelayMs === "number") result.firstMessageDelayMs = batching.firstMessageDelayMs;
25830
25926
  if (typeof batching.debounceWindowMs === "number") result.debounceWindowMs = batching.debounceWindowMs;
25927
+ if (typeof batching.maxWaitMs === "number") result.maxWaitMs = batching.maxWaitMs;
25831
25928
  if (typeof batching.maxBatchMessages === "number") result.maxBatchMessages = batching.maxBatchMessages;
25832
25929
  if (typeof batching.serializeProcessing === "boolean") result.serializeProcessing = batching.serializeProcessing;
25833
25930
  return Object.keys(result).length > 0 ? result : void 0;
@@ -25943,6 +26040,7 @@ var init_agent_plugin = __esm({
25943
26040
  const result = {};
25944
26041
  if (typeof batching.firstMessageDelayMs === "number") result.firstMessageDelayMs = batching.firstMessageDelayMs;
25945
26042
  if (typeof batching.debounceWindowMs === "number") result.debounceWindowMs = batching.debounceWindowMs;
26043
+ if (typeof batching.maxWaitMs === "number") result.maxWaitMs = batching.maxWaitMs;
25946
26044
  if (typeof batching.maxBatchMessages === "number") result.maxBatchMessages = batching.maxBatchMessages;
25947
26045
  if (typeof batching.serializeProcessing === "boolean") result.serializeProcessing = batching.serializeProcessing;
25948
26046
  return Object.keys(result).length > 0 ? result : void 0;
@@ -26491,8 +26589,8 @@ function warnUnsupportedNamespaceImports(sf) {
26491
26589
  }
26492
26590
  }
26493
26591
  function stripSdkExtendsClauses(sf, sdkBaseClassNames, aliasMap, specs) {
26494
- const matchSdkClass = /* @__PURE__ */ __name((text) => {
26495
- const canonical2 = aliasMap.get(text) ?? text;
26592
+ const matchSdkClass = /* @__PURE__ */ __name((text2) => {
26593
+ const canonical2 = aliasMap.get(text2) ?? text2;
26496
26594
  return sdkBaseClassNames.has(canonical2) ? canonical2 : void 0;
26497
26595
  }, "matchSdkClass");
26498
26596
  const dropNamesFor = /* @__PURE__ */ __name((canonical2) => {
@@ -27047,8 +27145,8 @@ function extractModelField(config, field) {
27047
27145
  if (!initializer) return {};
27048
27146
  const value3 = unwrapType(initializer);
27049
27147
  if (Node16.isStringLiteral(value3) || Node16.isNoSubstitutionTemplateLiteral(value3)) {
27050
- const text = value3.getLiteralText();
27051
- if (!text) {
27148
+ const text2 = value3.getLiteralText();
27149
+ if (!text2) {
27052
27150
  return {
27053
27151
  error: {
27054
27152
  field,
@@ -27056,7 +27154,7 @@ function extractModelField(config, field) {
27056
27154
  }
27057
27155
  };
27058
27156
  }
27059
- return parseDescriptor(text, field);
27157
+ return parseDescriptor(text2, field);
27060
27158
  }
27061
27159
  if (Node16.isObjectLiteralExpression(value3)) {
27062
27160
  if (field !== "tts") {
@@ -31051,8 +31149,8 @@ function detectWorkflowScriptFiles(rootDir) {
31051
31149
  for (const file of fs6.readdirSync(dir).sort()) {
31052
31150
  if (!file.endsWith(WORKFLOW_SCRIPT_FILE_SUFFIX)) continue;
31053
31151
  const sourcePath = path8.join(dir, file);
31054
- const text = fs6.readFileSync(sourcePath, "utf8");
31055
- const parsed = parseWorkflowScript(text, file);
31152
+ const text2 = fs6.readFileSync(sourcePath, "utf8");
31153
+ const parsed = parseWorkflowScript(text2, file);
31056
31154
  const name = file.slice(0, -WORKFLOW_SCRIPT_FILE_SUFFIX.length);
31057
31155
  const meta = parsed.meta;
31058
31156
  found.push({
@@ -31071,9 +31169,9 @@ function detectWorkflowScriptFiles(rootDir) {
31071
31169
  toolRefIdentifiers: [],
31072
31170
  hasSchedule: typeof meta?.schedule === "object" && meta?.schedule !== null,
31073
31171
  script: {
31074
- text,
31172
+ text: text2,
31075
31173
  meta,
31076
- scriptHash: meta ? computeWorkflowScriptHash(text, meta) : void 0,
31174
+ scriptHash: meta ? computeWorkflowScriptHash(text2, meta) : void 0,
31077
31175
  scriptSurface: parsed.scriptSurface,
31078
31176
  roleBindings: parsed.roleBindings,
31079
31177
  issues: parsed.issues
@@ -34124,6 +34222,7 @@ var UserDataInstance;
34124
34222
  var init_user_instance = __esm({
34125
34223
  "src/instances/user.instance.ts"() {
34126
34224
  "use strict";
34225
+ init_dist();
34127
34226
  __name(omit, "omit");
34128
34227
  UserDataInstance = class {
34129
34228
  static {
@@ -34184,6 +34283,8 @@ var init_user_instance = __esm({
34184
34283
  "patch",
34185
34284
  "unset",
34186
34285
  "clear",
34286
+ "setWorkItems",
34287
+ "clearWorkItems",
34187
34288
  "toJSON",
34188
34289
  "_luaProfile"
34189
34290
  ];
@@ -34284,7 +34385,40 @@ var init_user_instance = __esm({
34284
34385
  });
34285
34386
  }
34286
34387
  /**
34287
- * Clears all user data for the current user
34388
+ * Publishes this user's My work list (LUA-1028): the open work they see in Frontline's "My work",
34389
+ * replacing the previous list. Publish whenever the work changes, for everyone it affects.
34390
+ * @param items - At most 100 items; each `action` is the message sent when the user taps it
34391
+ * @throws Error naming the first invalid item (nothing is sent), or if the write fails
34392
+ *
34393
+ * @example
34394
+ * const technician = await User.get({ phone: '+254700000000' });
34395
+ * await technician?.setWorkItems([
34396
+ * { id: 'MNT-00123', title: 'MNT-00123 · Fryer not heating', group: 'Assigned to you',
34397
+ * status: 'In progress', updatedAt: new Date(), action: 'Show MNT-00123' },
34398
+ * ]);
34399
+ */
34400
+ async setWorkItems(items) {
34401
+ normalizeWorkItems(items);
34402
+ try {
34403
+ this.data = await this.userAPI.setWorkItems(items);
34404
+ } catch (error) {
34405
+ throw new Error("Failed to set work items", {
34406
+ cause: error
34407
+ });
34408
+ }
34409
+ }
34410
+ /** Removes this user's My work list. */
34411
+ async clearWorkItems() {
34412
+ try {
34413
+ this.data = await this.userAPI.clearWorkItems();
34414
+ } catch (error) {
34415
+ throw new Error("Failed to clear work items", {
34416
+ cause: error
34417
+ });
34418
+ }
34419
+ }
34420
+ /**
34421
+ * Clears all user data for the current user (the My work list included)
34288
34422
  * @returns Promise resolving to `{ success: true }` if clearing was successful
34289
34423
  * @throws Error if the clear operation fails
34290
34424
  */
@@ -38497,6 +38631,7 @@ var init_user_data_api_service = __esm({
38497
38631
  init_http_client();
38498
38632
  init_user_instance();
38499
38633
  init_lazy_instances();
38634
+ init_dist();
38500
38635
  UserDataApi = class _UserDataApi extends HttpClient {
38501
38636
  static {
38502
38637
  __name(this, "UserDataApi");
@@ -38544,7 +38679,7 @@ var init_user_data_api_service = __esm({
38544
38679
  throw new Error(response.error?.message || "Failed to get user data");
38545
38680
  }
38546
38681
  const profile = response.data?._luaProfile;
38547
- const { _luaProfile, ...data } = response.data || {};
38682
+ const { _luaProfile, ...data } = withoutWorkItems(response.data || {});
38548
38683
  const scopedApi = userId ? new _UserDataApi(this.baseUrl, this.credential, this.agentId, userId) : this;
38549
38684
  return new UserDataInstance(scopedApi, data, profile);
38550
38685
  }
@@ -38583,19 +38718,41 @@ var init_user_data_api_service = __esm({
38583
38718
  * @throws Error if the update fails or the request is unsuccessful
38584
38719
  */
38585
38720
  async update(data) {
38586
- const response = await this.httpPut(this.dataPath, data, {});
38721
+ const response = await this.httpPut(this.dataPath, withoutWorkItems(data), {});
38587
38722
  if (!response.success) {
38588
38723
  throw new Error(response.error?.message || "Failed to update user data");
38589
38724
  }
38590
- const { _luaProfile, ...cleanData } = response.data || {};
38725
+ const { _luaProfile, ...cleanData } = withoutWorkItems(response.data || {});
38591
38726
  return cleanData;
38592
38727
  }
38593
38728
  async patch(mutation) {
38729
+ return this.sendPatch(mutationWithoutWorkItems(mutation));
38730
+ }
38731
+ /**
38732
+ * Publishes the user's My work list (LUA-1028), replacing the previous one. Validated first;
38733
+ * a wrong shape throws before anything is sent.
38734
+ */
38735
+ async setWorkItems(items) {
38736
+ return this.sendPatch({
38737
+ set: {
38738
+ [WORK_ITEMS_KEY]: workItemsRecord(items)
38739
+ }
38740
+ });
38741
+ }
38742
+ /** Removes the user's My work list. */
38743
+ async clearWorkItems() {
38744
+ return this.sendPatch({
38745
+ unset: [
38746
+ WORK_ITEMS_KEY
38747
+ ]
38748
+ });
38749
+ }
38750
+ async sendPatch(mutation) {
38594
38751
  const response = await this.httpPatch(this.dataPath, mutation, {});
38595
38752
  if (!response.success) {
38596
38753
  throw new Error(response.error?.message || "Failed to patch user data");
38597
38754
  }
38598
- const { _luaProfile, ...cleanData } = response.data || {};
38755
+ const { _luaProfile, ...cleanData } = withoutWorkItems(response.data || {});
38599
38756
  return cleanData;
38600
38757
  }
38601
38758
  /**
@@ -43150,9 +43307,9 @@ function noColorEnabled(env = process.env) {
43150
43307
  return !!env.NO_COLOR;
43151
43308
  }
43152
43309
  __name(noColorEnabled, "noColorEnabled");
43153
- function colorize(ansiCode, text) {
43154
- if (noColorEnabled()) return text;
43155
- return `${ansiCode}${text}\x1B[0m`;
43310
+ function colorize(ansiCode, text2) {
43311
+ if (noColorEnabled()) return text2;
43312
+ return `${ansiCode}${text2}\x1B[0m`;
43156
43313
  }
43157
43314
  __name(colorize, "colorize");
43158
43315
  function configureChalkColor(chalkLike) {
@@ -46727,8 +46884,8 @@ function isAgentReplyEnvelope(reply) {
46727
46884
  if (typeof reply !== "object" || reply === null || Array.isArray(reply)) return false;
46728
46885
  const keys = Object.keys(reply);
46729
46886
  if (keys.length === 0 || !keys.every((k) => AGENT_REPLY_ENVELOPE_KEYS.has(k))) return false;
46730
- const text = reply.text;
46731
- return text === void 0 || typeof text === "string";
46887
+ const text2 = reply.text;
46888
+ return text2 === void 0 || typeof text2 === "string";
46732
46889
  }
46733
46890
  __name(isAgentReplyEnvelope, "isAgentReplyEnvelope");
46734
46891
  function coerceAgentStepOutput(schema, reply) {
@@ -46739,7 +46896,7 @@ function coerceAgentStepOutput(schema, reply) {
46739
46896
  ok: true,
46740
46897
  output: reply
46741
46898
  };
46742
- const { text, object } = envelope;
46899
+ const { text: text2, object } = envelope;
46743
46900
  if (object !== void 0) return {
46744
46901
  ok: true,
46745
46902
  output: object
@@ -46747,10 +46904,10 @@ function coerceAgentStepOutput(schema, reply) {
46747
46904
  if (!schema) return {
46748
46905
  ok: true,
46749
46906
  output: {
46750
- text
46907
+ text: text2
46751
46908
  }
46752
46909
  };
46753
- const extracted = extractSingleJsonValue(text ?? "");
46910
+ const extracted = extractSingleJsonValue(text2 ?? "");
46754
46911
  if ("reason" in extracted) return {
46755
46912
  ok: false,
46756
46913
  reason: extracted.reason
@@ -47114,11 +47271,11 @@ async function runWorkflowLocallyInner(rawOpts) {
47114
47271
  const meta = fs16.existsSync(metaFile) ? JSON.parse(fs16.readFileSync(metaFile, "utf8")) : {
47115
47272
  artefactId
47116
47273
  };
47117
- const text = fs16.readFileSync(file, "utf8");
47274
+ const text2 = fs16.readFileSync(file, "utf8");
47118
47275
  return {
47119
47276
  ...meta,
47120
- data: text,
47121
- text: /* @__PURE__ */ __name(async () => text, "text")
47277
+ data: text2,
47278
+ text: /* @__PURE__ */ __name(async () => text2, "text")
47122
47279
  };
47123
47280
  }, "get"),
47124
47281
  list: /* @__PURE__ */ __name(async () => fs16.readdirSync(dir).filter((f) => f.endsWith(".meta.json")).map((f) => JSON.parse(fs16.readFileSync(path21.join(dir, f), "utf8"))), "list")
@@ -48127,14 +48284,14 @@ function parseKeyedJsonFlag(raw, flag) {
48127
48284
  }
48128
48285
  __name(parseKeyedJsonFlag, "parseKeyedJsonFlag");
48129
48286
  function parseJsonOrFile(raw, what) {
48130
- let text = raw;
48287
+ let text2 = raw;
48131
48288
  if (raw.startsWith("@")) {
48132
48289
  const file = raw.slice(1);
48133
48290
  if (!fs16.existsSync(file)) throw new WorkflowLocalUsageError("usage", `${what}: file not found "${file}"`);
48134
- text = fs16.readFileSync(file, "utf8");
48291
+ text2 = fs16.readFileSync(file, "utf8");
48135
48292
  }
48136
48293
  try {
48137
- return JSON.parse(text);
48294
+ return JSON.parse(text2);
48138
48295
  } catch (e) {
48139
48296
  throw new WorkflowLocalUsageError("usage", `${what}: invalid JSON (${e instanceof Error ? e.message : String(e)})`);
48140
48297
  }
@@ -48146,10 +48303,10 @@ init_dist();
48146
48303
  function createSandboxLog(consoleObj) {
48147
48304
  const emit3 = /* @__PURE__ */ __name((level, message, fields) => {
48148
48305
  const normalized = normalizeLogFields(fields);
48149
- const text = typeof message === "object" && message !== null ? JSON.stringify(message) : String(message);
48306
+ const text2 = typeof message === "object" && message !== null ? JSON.stringify(message) : String(message);
48150
48307
  const write = level === "error" ? consoleObj.error : level === "warn" ? consoleObj.warn : level === "info" ? consoleObj.info : consoleObj.log;
48151
- if (normalized) write.call(consoleObj, text, JSON.stringify(normalized));
48152
- else write.call(consoleObj, text);
48308
+ if (normalized) write.call(consoleObj, text2, JSON.stringify(normalized));
48309
+ else write.call(consoleObj, text2);
48153
48310
  }, "emit");
48154
48311
  return Object.freeze({
48155
48312
  debug: /* @__PURE__ */ __name((message, fields) => emit3("debug", message, fields), "debug"),
@@ -51937,7 +52094,7 @@ function localScriptRuntimeHandle() {
51937
52094
  now: /* @__PURE__ */ __name(() => RealDate.now(), "now"),
51938
52095
  random: /* @__PURE__ */ __name(() => realRandom(), "random"),
51939
52096
  uuid: /* @__PURE__ */ __name(() => randomUUID5(), "uuid"),
51940
- sha256Hex: /* @__PURE__ */ __name((text) => createHash7("sha256").update(text).digest("hex"), "sha256Hex")
52097
+ sha256Hex: /* @__PURE__ */ __name((text2) => createHash7("sha256").update(text2).digest("hex"), "sha256Hex")
51941
52098
  };
51942
52099
  }
51943
52100
  __name(localScriptRuntimeHandle, "localScriptRuntimeHandle");
@@ -56257,8 +56414,8 @@ init_lua_fetch();
56257
56414
  init_request_credential();
56258
56415
  init_cli_error();
56259
56416
  function streamErrorChunkRefusal(chunk) {
56260
- const text = /* @__PURE__ */ __name((value3) => typeof value3 === "string" && value3.trim().length > 0 ? value3.trim() : void 0, "text");
56261
- const line = text(chunk.error) ?? text(chunk.textDelta) ?? "The agent turn failed";
56417
+ const text2 = /* @__PURE__ */ __name((value3) => typeof value3 === "string" && value3.trim().length > 0 ? value3.trim() : void 0, "text");
56418
+ const line = text2(chunk.error) ?? text2(chunk.textDelta) ?? "The agent turn failed";
56262
56419
  if (chunk.code === PROVIDER_REJECTED_SERVER_CODE) {
56263
56420
  return CliError.providerRejected(line, {
56264
56421
  ...providerRejectionFromTypedLine(line),
@@ -57053,17 +57210,17 @@ async function parseMessageWithAttachments(input) {
57053
57210
  const sortedMatches = [
57054
57211
  ...fileMatches
57055
57212
  ].sort((a, b) => b.index - a.index);
57056
- let text = input;
57213
+ let text2 = input;
57057
57214
  for (const match of sortedMatches) {
57058
57215
  const start = match.index;
57059
- text = text.slice(0, start) + text.slice(start + match[0].length);
57216
+ text2 = text2.slice(0, start) + text2.slice(start + match[0].length);
57060
57217
  }
57061
- text = text.replace(/\s{2,}/g, " ").trim();
57218
+ text2 = text2.replace(/\s{2,}/g, " ").trim();
57062
57219
  const parts = [];
57063
- if (text) {
57220
+ if (text2) {
57064
57221
  parts.push({
57065
57222
  type: "text",
57066
- text
57223
+ text: text2
57067
57224
  });
57068
57225
  }
57069
57226
  for (const match of fileMatches) {
@@ -62870,8 +63027,8 @@ function shortIso(value3) {
62870
63027
  __name(shortIso, "shortIso");
62871
63028
  function trimmed(value3) {
62872
63029
  if (typeof value3 !== "string") return void 0;
62873
- const text = value3.trim();
62874
- return text.length > 0 ? text : void 0;
63030
+ const text2 = value3.trim();
63031
+ return text2.length > 0 ? text2 : void 0;
62875
63032
  }
62876
63033
  __name(trimmed, "trimmed");
62877
63034
  function parseType(raw) {
@@ -65951,8 +66108,8 @@ __name(printJson3, "printJson");
65951
66108
  var TICK = chalk3.green("\u2713");
65952
66109
  var WARN = chalk3.yellow("!");
65953
66110
  var CROSS = chalk3.red("\u2717");
65954
- var row = /* @__PURE__ */ __name((text, dim = false) => ({
65955
- text,
66111
+ var row = /* @__PURE__ */ __name((text2, dim = false) => ({
66112
+ text: text2,
65956
66113
  dim
65957
66114
  }), "row");
65958
66115
  function section(title, rows3) {
@@ -67250,9 +67407,9 @@ function executionStatusDisplay(execution) {
67250
67407
  }
67251
67408
  __name(executionStatusDisplay, "executionStatusDisplay");
67252
67409
  function snippet(value3, maxLength = 100) {
67253
- const text = typeof value3 === "string" ? value3 : JSON.stringify(value3);
67254
- if (text === void 0) return "";
67255
- return text.length > maxLength ? `${text.substring(0, maxLength)}...` : text;
67410
+ const text2 = typeof value3 === "string" ? value3 : JSON.stringify(value3);
67411
+ if (text2 === void 0) return "";
67412
+ return text2.length > maxLength ? `${text2.substring(0, maxLength)}...` : text2;
67256
67413
  }
67257
67414
  __name(snippet, "snippet");
67258
67415
  async function fetchAndDisplayLogsCore(context, trigger, limit, json2) {
@@ -70041,8 +70198,8 @@ function printRun2(run, withSteps) {
70041
70198
  const steps = run.steps;
70042
70199
  if (run.restricted) console.log(" Outputs: restricted (outputVisibility) \u2014 output not returned");
70043
70200
  else if (run.output !== void 0 && run.output !== null) {
70044
- const text = typeof run.outputPreview === "string" ? `${run.outputPreview} (offloaded \u2014 preview)` : JSON.stringify(run.output).slice(0, 2e3);
70045
- console.log(` Output: ${text}`);
70201
+ const text2 = typeof run.outputPreview === "string" ? `${run.outputPreview} (offloaded \u2014 preview)` : JSON.stringify(run.output).slice(0, 2e3);
70202
+ console.log(` Output: ${text2}`);
70046
70203
  const fetchable = outputRefLine(run.outputRef);
70047
70204
  if (fetchable) console.log(` Download: ${fetchable}`);
70048
70205
  } else if (run.hasOutput) {
@@ -70977,7 +71134,7 @@ async function approveCore(ctx, runId, o) {
70977
71134
  return WORKFLOW_EXIT.OK;
70978
71135
  }
70979
71136
  __name(approveCore, "approveCore");
70980
- var indentBlock = /* @__PURE__ */ __name((text, pad2 = " ") => text.split("\n").map((l) => `${pad2}${l}`).join("\n"), "indentBlock");
71137
+ var indentBlock = /* @__PURE__ */ __name((text2, pad2 = " ") => text2.split("\n").map((l) => `${pad2}${l}`).join("\n"), "indentBlock");
70981
71138
  var APPROVAL_PAYLOAD_PAGE_MAX = 100;
70982
71139
  async function approvalPayloadCore(ctx, runId, o) {
70983
71140
  if (!o.approval) {
@@ -72094,9 +72251,9 @@ var GOAL_PAGE_LIMIT = 100;
72094
72251
  var GOAL_PAGE_MAX = 50;
72095
72252
  function parseIntegerFlag(v, flag, range2 = {}) {
72096
72253
  if (v === void 0) return void 0;
72097
- const text = String(v).trim();
72098
- if (!/^-?\d+$/.test(text)) throw new WorkflowLocalUsageError("usage", `${flag}: expected an integer (got "${v}")`);
72099
- const n2 = Number(text);
72254
+ const text2 = String(v).trim();
72255
+ if (!/^-?\d+$/.test(text2)) throw new WorkflowLocalUsageError("usage", `${flag}: expected an integer (got "${v}")`);
72256
+ const n2 = Number(text2);
72100
72257
  const { min, max } = range2;
72101
72258
  if (min !== void 0 && n2 < min || max !== void 0 && n2 > max) {
72102
72259
  const bounds = max !== void 0 ? `${min ?? ""}..${max}` : `\u2265 ${min}`;
@@ -72616,10 +72773,10 @@ function parseJudgePredicateFlag(raw) {
72616
72773
  path: path31,
72617
72774
  op
72618
72775
  };
72619
- const text = rest.join(" ");
72620
- let value3 = text;
72776
+ const text2 = rest.join(" ");
72777
+ let value3 = text2;
72621
72778
  try {
72622
- value3 = JSON.parse(text);
72779
+ value3 = JSON.parse(text2);
72623
72780
  } catch {
72624
72781
  }
72625
72782
  return {
@@ -72633,10 +72790,10 @@ function parseCadenceFlag(entries, timezone) {
72633
72790
  const out = [];
72634
72791
  let bareCron = 0;
72635
72792
  for (const raw of entries ?? []) {
72636
- const text = raw.trim();
72637
- if (!text) continue;
72638
- if (text.startsWith("{") || text.startsWith("[") || text.startsWith("@")) {
72639
- const parsed = parseJsonOrFile(text, "--cadence");
72793
+ const text2 = raw.trim();
72794
+ if (!text2) continue;
72795
+ if (text2.startsWith("{") || text2.startsWith("[") || text2.startsWith("@")) {
72796
+ const parsed = parseJsonOrFile(text2, "--cadence");
72640
72797
  for (const c of Array.isArray(parsed) ? parsed : [
72641
72798
  parsed
72642
72799
  ]) {
@@ -72650,11 +72807,11 @@ function parseCadenceFlag(entries, timezone) {
72650
72807
  }
72651
72808
  continue;
72652
72809
  }
72653
- if (!/^\S+(\s+\S+){4,5}$/.test(text)) throw new WorkflowLocalUsageError("usage", `--cadence: "${text}" is not a cron expression (5\u20136 fields); pass JSON for once/interval entries`);
72810
+ if (!/^\S+(\s+\S+){4,5}$/.test(text2)) throw new WorkflowLocalUsageError("usage", `--cadence: "${text2}" is not a cron expression (5\u20136 fields); pass JSON for once/interval entries`);
72654
72811
  bareCron += 1;
72655
72812
  out.push({
72656
72813
  type: "cron",
72657
- expression: text,
72814
+ expression: text2,
72658
72815
  ...timezone ? {
72659
72816
  timezone
72660
72817
  } : {}
@@ -83916,8 +84073,8 @@ async function requestJson(method, url, apiKey, body) {
83916
84073
  }
83917
84074
  const response = await luaFetch(url, init3);
83918
84075
  if (!response.ok) {
83919
- const text = await response.text().catch(() => "");
83920
- throw new Error(`HTTP ${response.status} ${method} ${url}${text ? `: ${text}` : ""}`);
84076
+ const text2 = await response.text().catch(() => "");
84077
+ throw new Error(`HTTP ${response.status} ${method} ${url}${text2 ? `: ${text2}` : ""}`);
83921
84078
  }
83922
84079
  return await response.json();
83923
84080
  }
@@ -84059,11 +84216,11 @@ __name(parseVersion2, "parseVersion");
84059
84216
  // src/commands/version.ts
84060
84217
  function parsePersonaVersionOption(raw) {
84061
84218
  if (raw === void 0) return void 0;
84062
- const text = String(raw).trim().replace(/^v/i, "");
84063
- if (!/^\d+$/.test(text)) {
84219
+ const text2 = String(raw).trim().replace(/^v/i, "");
84220
+ if (!/^\d+$/.test(text2)) {
84064
84221
  throw new Error(`--persona-version must be a persona version number (got "${raw}").`);
84065
84222
  }
84066
- return Number(text);
84223
+ return Number(text2);
84067
84224
  }
84068
84225
  __name(parsePersonaVersionOption, "parsePersonaVersionOption");
84069
84226
  async function versionCreateCommand(options = {}) {