@opencxh/domain 1.176.0 → 1.182.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
@@ -423,6 +423,19 @@ const m = {
423
423
  icon: "user",
424
424
  snippet: () => "Taak toegewezen",
425
425
  timeline: (e, t) => `Assigned by ${t}`
426
+ },
427
+ /**
428
+ * `triggerable`, unlike the two above: this is the event a playbook hangs off — "record the
429
+ * outcome once it is done". Filter on `payload.toCategory`, not on the status key.
430
+ */
431
+ WORK_ITEM_STATUS_CHANGED: {
432
+ shape: "event",
433
+ triggerable: !0,
434
+ icon: "circle-dot",
435
+ // Static strings, unlike the interaction variant above: work rows have no arm in the
436
+ // `Activity` union (they carry no `interactionId`), so `a.payload` is `never` here.
437
+ snippet: () => "Status gewijzigd",
438
+ timeline: (e, t) => `Status changed by ${t}`
426
439
  }
427
440
  };
428
441
  function R(e) {
@@ -450,16 +463,16 @@ function $n(e) {
450
463
  function Rn(e) {
451
464
  return d(e)?.carriesText === !0;
452
465
  }
453
- function Ln(e) {
466
+ function Dn(e) {
454
467
  return d(e)?.countsAs;
455
468
  }
456
- function Dn(e) {
469
+ function Ln(e) {
457
470
  return d(e)?.playbookAuthored === !0;
458
471
  }
459
- function Pn(e) {
472
+ function Kn(e) {
460
473
  return d(e)?.connected === !0;
461
474
  }
462
- function Kn(e) {
475
+ function Pn(e) {
463
476
  const t = d(e);
464
477
  return t?.shape === "artifact" && t?.carriesText === !0;
465
478
  }
@@ -501,10 +514,10 @@ function ke(e, t) {
501
514
  n[r] = C(t, i);
502
515
  return { key: e.key, params: n };
503
516
  }
504
- const L = 140;
517
+ const D = 140;
505
518
  function Ce(e) {
506
519
  const t = e.trim();
507
- return t.length <= L ? t : `${t.slice(0, L - 1).trimEnd()}…`;
520
+ return t.length <= D ? t : `${t.slice(0, D - 1).trimEnd()}…`;
508
521
  }
509
522
  function Gn(e, t) {
510
523
  const n = ke(t?.text, e), r = t ? N(t.text, e, (i) => i) : null;
@@ -519,7 +532,7 @@ function Gn(e, t) {
519
532
  };
520
533
  }
521
534
  const Ne = (e) => e;
522
- function D(e) {
535
+ function L(e) {
523
536
  const t = m[e];
524
537
  return {
525
538
  type: e,
@@ -535,7 +548,7 @@ function D(e) {
535
548
  displayNameKey: t.displayNameKey
536
549
  };
537
550
  }
538
- function P(e) {
551
+ function K(e) {
539
552
  return {
540
553
  type: e.type,
541
554
  shape: e.shape,
@@ -558,13 +571,13 @@ class ve {
558
571
  }
559
572
  declared = /* @__PURE__ */ new Map();
560
573
  get(t) {
561
- if (t in m) return D(t);
574
+ if (t in m) return L(t);
562
575
  const n = this.declared.get(t);
563
- return n ? P(n) : void 0;
576
+ return n ? K(n) : void 0;
564
577
  }
565
578
  /** Everything that may be offered as a trigger, built-in and declared. */
566
579
  triggerable() {
567
- const t = Object.keys(m).filter((r) => m[r].triggerable).map(D), n = [...this.declared.values()].map(P).filter((r) => r.triggerable);
580
+ const t = Object.keys(m).filter((r) => m[r].triggerable).map(L), n = [...this.declared.values()].map(K).filter((r) => r.triggerable);
568
581
  return [...t, ...n];
569
582
  }
570
583
  /**
@@ -646,10 +659,10 @@ function Fn(e, t, n = []) {
646
659
  function Hn(e) {
647
660
  return e.createdAt ?? 0;
648
661
  }
649
- function Vn(e) {
662
+ function Wn(e) {
650
663
  return e.type === "EMAIL_RECEIVED" || e.type === "EMAIL_SENT";
651
664
  }
652
- function Wn(e) {
665
+ function Vn(e) {
653
666
  return e.type === "CHAT_MESSAGE_SENT" || e.type === "CHAT_MESSAGE_RECEIVED";
654
667
  }
655
668
  const oe = [
@@ -763,10 +776,10 @@ function Jn(e, t) {
763
776
  }
764
777
  function Zn(e, t) {
765
778
  if (!e.enabled) return "ok";
766
- const n = K(e.hardLimitNanos), r = K(e.softLimitNanos);
779
+ const n = P(e.hardLimitNanos), r = P(e.softLimitNanos);
767
780
  return n !== void 0 && t >= n ? "hard" : r !== void 0 && t >= r ? "soft" : "ok";
768
781
  }
769
- function K(e) {
782
+ function P(e) {
770
783
  return typeof e == "number" ? e : void 0;
771
784
  }
772
785
  function Oe(e, t = "month") {
@@ -808,30 +821,30 @@ function $e(e, t) {
808
821
  const n = new Date(e);
809
822
  return n.setUTCMinutes(0, 0, 0), t === "day" && n.setUTCHours(0), n.getTime();
810
823
  }
811
- const Re = 36e5, Le = 864e5;
824
+ const Re = 36e5, De = 864e5;
812
825
  function rr(e, t, n) {
813
- const r = n === "hour" ? Re : Le, i = [];
826
+ const r = n === "hour" ? Re : De, i = [];
814
827
  for (let a = $e(e, n); a <= t; a += r)
815
828
  i.push(xe(a, n));
816
829
  return i;
817
830
  }
818
- const De = [
831
+ const Le = [
819
832
  { id: "resource", label: "Resource", labelSource: "raw" },
820
833
  { id: "origin", label: "Herkomst", labelSource: "raw" }
821
- ], Pe = De.map((e) => e.id);
822
- function Ke(e, t) {
834
+ ], Ke = Le.map((e) => e.id);
835
+ function Pe(e, t) {
823
836
  return `${e}.usage.${t}`;
824
837
  }
825
838
  function ir(e, t) {
826
839
  return t.map((n) => ({
827
- id: Ke(e, n.unit),
840
+ id: Pe(e, n.unit),
828
841
  label: n.label,
829
842
  category: "Verbruik",
830
843
  valueType: n.valueType ?? "count",
831
844
  aggregation: "sum",
832
845
  supportedDimensions: [
833
846
  "provider",
834
- ...Pe,
847
+ ...Ke,
835
848
  ...n.extraDimensions ?? [],
836
849
  "time"
837
850
  ]
@@ -900,10 +913,10 @@ function He(e) {
900
913
  function u(e, t = ce) {
901
914
  return typeof e == "string" ? He(e).slice(0, t) : "";
902
915
  }
903
- function Ve(e, t = ce) {
916
+ function We(e, t = ce) {
904
917
  return typeof e == "string" ? e.slice(0, t) : "";
905
918
  }
906
- function We(e, t = "info") {
919
+ function Ve(e, t = "info") {
907
920
  return typeof e == "string" && se.has(e) ? e : t;
908
921
  }
909
922
  function or(e, t = () => {
@@ -952,7 +965,7 @@ function or(e, t = () => {
952
965
  break;
953
966
  }
954
967
  case "code": {
955
- const o = Ve(i.text);
968
+ const o = We(i.text);
956
969
  if (!o) {
957
970
  t("a code block without text");
958
971
  continue;
@@ -1048,7 +1061,7 @@ function or(e, t = () => {
1048
1061
  n.push({
1049
1062
  ...a,
1050
1063
  type: "callout",
1051
- tone: We(i.tone),
1064
+ tone: Ve(i.tone),
1052
1065
  ...s ? { title: s } : {},
1053
1066
  text: o
1054
1067
  });
@@ -1068,15 +1081,15 @@ function cr(e) {
1068
1081
  headings: e.flatMap((t) => t.type === "heading" ? [t.text] : [])
1069
1082
  };
1070
1083
  }
1071
- function V(e) {
1084
+ function W(e) {
1072
1085
  return e.replace(/\|/g, "\\|").replace(/\r?\n/g, " ").trim();
1073
1086
  }
1074
- function W(e, t, n) {
1087
+ function V(e, t, n) {
1075
1088
  const r = e.map((i, a) => n?.[a] === "right" ? "---:" : "---");
1076
1089
  return [
1077
- `| ${e.map(V).join(" | ")} |`,
1090
+ `| ${e.map(W).join(" | ")} |`,
1078
1091
  `| ${r.join(" | ")} |`,
1079
- ...t.map((i) => `| ${i.map(V).join(" | ")} |`)
1092
+ ...t.map((i) => `| ${i.map(W).join(" | ")} |`)
1080
1093
  ];
1081
1094
  }
1082
1095
  function ze(e) {
@@ -1097,7 +1110,7 @@ function ze(e) {
1097
1110
  return t.lead ? `${r} **${t.lead}** ${t.text}` : `${r} ${t.text}`;
1098
1111
  });
1099
1112
  case "table": {
1100
- const t = W(
1113
+ const t = V(
1101
1114
  e.columns.map((n) => n.label),
1102
1115
  e.rows,
1103
1116
  e.columns.map((n) => n.align ?? "left")
@@ -1105,7 +1118,7 @@ function ze(e) {
1105
1118
  return e.caption ? [...t, "", `*${e.caption}*`] : t;
1106
1119
  }
1107
1120
  case "kpi":
1108
- return W(
1121
+ return V(
1109
1122
  e.items.map((t) => t.value),
1110
1123
  [e.items.map((t) => t.label)]
1111
1124
  );
@@ -1313,10 +1326,10 @@ function $r(e, t) {
1313
1326
  function Rr(e) {
1314
1327
  return e.credentialScope ? e.credentialScope : (e.authMode ?? "header") === "header" || e.oauth?.scope === "org" ? "shared" : "per-user";
1315
1328
  }
1316
- function Lr(e) {
1329
+ function Dr(e) {
1317
1330
  return `mcp__${e}__`;
1318
1331
  }
1319
- const Dr = 1e3, Pr = 2e3, Kr = 500, Ur = 12e3, jr = 4e3, rt = ["contact", "company"];
1332
+ const Lr = 1e3, Kr = 2e3, Pr = 500, Ur = 12e3, jr = 4e3, rt = ["contact", "company", "work_item"];
1320
1333
  function Gr(e) {
1321
1334
  if (!e) return !1;
1322
1335
  const t = e.slice(0, e.indexOf(":"));
@@ -1364,7 +1377,7 @@ function Fr(e) {
1364
1377
  function Hr(e) {
1365
1378
  return at(e);
1366
1379
  }
1367
- function Vr(e, t) {
1380
+ function Wr(e, t) {
1368
1381
  if (!t) return;
1369
1382
  let n = e;
1370
1383
  for (const r of t.split(".")) {
@@ -1373,7 +1386,7 @@ function Vr(e, t) {
1373
1386
  }
1374
1387
  return n;
1375
1388
  }
1376
- function Wr(e, t) {
1389
+ function Vr(e, t) {
1377
1390
  return e.targets.find((n) => n.activityTypes.includes(t));
1378
1391
  }
1379
1392
  function zr(e, t) {
@@ -1409,6 +1422,10 @@ const qr = [
1409
1422
  // the trigger for "remember this when closing".
1410
1423
  { name: "fromStatus", type: "string" },
1411
1424
  { name: "toStatus", type: "string" },
1425
+ // Only on WORK_ITEM_STATUS_CHANGED: the *category* of the new status (`todo`/`in_progress`/
1426
+ // `done`). A filter must key on this and not on `toStatus`, because status keys are the
1427
+ // organisation's own — a template shipping `"done"` as a key fits exactly one ladder.
1428
+ { name: "toCategory", type: "string" },
1412
1429
  // Who this conversation is with. The identity layer records the resolution as
1413
1430
  // `contact:<id>`/`company:<id>` in `Interaction.partyKeys`, so this is a recorded fact and not a
1414
1431
  // guess via `remoteParty`. Empty while the identity is unresolved (an unknown number, a first
@@ -1559,18 +1576,18 @@ function gi(e, t) {
1559
1576
  function hi(e) {
1560
1577
  return e.type === "agent";
1561
1578
  }
1562
- const yi = "WORK_COMMENT_ADDED", Ai = "WORK_ITEM_ASSIGNED", Tt = "work_item", It = "work_project";
1579
+ const yi = "WORK_COMMENT_ADDED", Ai = "WORK_ITEM_ASSIGNED", bi = "WORK_ITEM_STATUS_CHANGED", Tt = "work_item", It = "work_project";
1563
1580
  function wt(e) {
1564
1581
  return `${Tt}:${e}`;
1565
1582
  }
1566
1583
  function he(e) {
1567
1584
  return `${It}:${e}`;
1568
1585
  }
1569
- function bi(e, t, n) {
1586
+ function Ei(e, t, n) {
1570
1587
  const r = `${e}-${t}`;
1571
1588
  return n ? `${r}-${n}` : r;
1572
1589
  }
1573
- function Ei(e) {
1590
+ function Si(e) {
1574
1591
  const t = /^([A-Za-z0-9]{2,8})-(\d+)(?:-(\d+))?$/.exec((e || "").trim());
1575
1592
  return t ? {
1576
1593
  projectKey: t[1].toUpperCase(),
@@ -1578,17 +1595,17 @@ function Ei(e) {
1578
1595
  ...t[3] ? { subSequence: Number(t[3]) } : {}
1579
1596
  } : null;
1580
1597
  }
1581
- function Si(e) {
1598
+ function _i(e) {
1582
1599
  return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toUpperCase().replace(/[^A-Z0-9]/g, "").slice(0, 3) || "PRJ";
1583
1600
  }
1584
- function _i(e, t = 25) {
1601
+ function Ti(e, t = 25) {
1585
1602
  const n = /* @__PURE__ */ new Set([wt(e.id)]);
1586
1603
  e.projectId && n.add(he(e.projectId));
1587
1604
  for (const r of e.ancestorKeys ?? []) n.add(r);
1588
1605
  for (const r of e.partyKeys ?? []) n.add(r);
1589
1606
  return Array.from(n).slice(0, t);
1590
1607
  }
1591
- function Ti(e) {
1608
+ function Ii(e) {
1592
1609
  return [he(e.id)];
1593
1610
  }
1594
1611
  const v = [
@@ -1602,10 +1619,10 @@ function Mt(e) {
1602
1619
  function kt(e, t) {
1603
1620
  return t.find((n) => n.key === e)?.category ?? "todo";
1604
1621
  }
1605
- function Ii(e, t) {
1622
+ function wi(e, t) {
1606
1623
  return t.find((n) => n.key === e);
1607
1624
  }
1608
- function wi(e) {
1625
+ function Mi(e) {
1609
1626
  const t = Mt(e), n = e?.defaultStatusKey;
1610
1627
  return n && t.some((r) => r.key === n) ? n : Ct(t)[0]?.key ?? v[0].key;
1611
1628
  }
@@ -1615,13 +1632,13 @@ function Ct(e) {
1615
1632
  return r !== 0 ? r : (t.label || "").localeCompare(n.label || "");
1616
1633
  });
1617
1634
  }
1618
- function Mi(e, t) {
1635
+ function ki(e, t) {
1619
1636
  return kt(e, t) === "done";
1620
1637
  }
1621
1638
  function Nt(e) {
1622
1639
  return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").slice(0, 48).replace(/^-+|-+$/g, "");
1623
1640
  }
1624
- function ki(e, t) {
1641
+ function Ci(e, t) {
1625
1642
  const n = Nt(e) || "status", r = /* @__PURE__ */ new Set([...t, ...ye]);
1626
1643
  if (!r.has(n)) return n;
1627
1644
  for (let i = 2; i < 500; i++) {
@@ -1630,7 +1647,7 @@ function ki(e, t) {
1630
1647
  }
1631
1648
  return `${n}-${r.size + 1}`;
1632
1649
  }
1633
- function Ci(e) {
1650
+ function Ni(e) {
1634
1651
  const t = [];
1635
1652
  if (!e.length) return [{ index: -1, reason: "empty" }];
1636
1653
  const n = /* @__PURE__ */ new Set();
@@ -1660,15 +1677,15 @@ const h = 1024 * 1024, $t = {
1660
1677
  pdf: 20 * h,
1661
1678
  text: 1 * h,
1662
1679
  audio: 20 * h
1663
- }, Ni = 25 * h, vi = 5;
1664
- function Oi(e, t) {
1680
+ }, vi = 25 * h, Oi = 5;
1681
+ function xi(e, t) {
1665
1682
  const n = xt(e);
1666
1683
  return n === "unsupported" ? "unsupported" : t > $t[n] ? "too-large" : null;
1667
1684
  }
1668
1685
  function Rt(e) {
1669
1686
  return `${e.kind}:${e.id || e.url || e.title}`;
1670
1687
  }
1671
- function xi(e, t = []) {
1688
+ function $i(e, t = []) {
1672
1689
  const n = new Set(t), r = [], i = [];
1673
1690
  for (const a of e) {
1674
1691
  const o = Rt(a);
@@ -1676,12 +1693,12 @@ function xi(e, t = []) {
1676
1693
  }
1677
1694
  return { sources: r, keys: i };
1678
1695
  }
1679
- function $i(e) {
1696
+ function Ri(e) {
1680
1697
  return e.sessions.filter(
1681
1698
  (t) => t.id !== e.exceptSessionId && t.state === "connected" && e.canHold(t.providerId)
1682
1699
  );
1683
1700
  }
1684
- function Ri(e) {
1701
+ function Di(e) {
1685
1702
  return e.sessions.filter(
1686
1703
  (t) => t.id !== e.exceptSessionId && t.state === "connected" && !e.canHold(t.providerId)
1687
1704
  );
@@ -1691,15 +1708,15 @@ function Li(e) {
1691
1708
  (n) => n.id !== e.exceptSessionId && (n.state === "connected" || n.state === "on_hold")
1692
1709
  ) ? { admit: !1, reason: "busy" } : { admit: !0 };
1693
1710
  }
1694
- function Lt(e, t) {
1695
- const n = new Set(e.disabledIntents ?? []), r = e.intentOverrides ?? {}, i = t.intents.filter((o) => !n.has(o.intent)).map((o) => Pt(o, r[o.intent]));
1711
+ function Dt(e, t) {
1712
+ const n = new Set(e.disabledIntents ?? []), r = e.intentOverrides ?? {}, i = t.intents.filter((o) => !n.has(o.intent)).map((o) => Kt(o, r[o.intent]));
1696
1713
  if (!e.extraIntents || e.extraIntents.length === 0) return i;
1697
1714
  const a = new Set(i.map((o) => o.intent));
1698
1715
  for (const o of e.extraIntents)
1699
1716
  a.has(o.intent) || (i.push(o), a.add(o.intent));
1700
1717
  return i;
1701
1718
  }
1702
- function Dt(e, t) {
1719
+ function Lt(e, t) {
1703
1720
  const n = {};
1704
1721
  for (const r of e.intents) {
1705
1722
  if (!r.togglable) continue;
@@ -1708,11 +1725,11 @@ function Dt(e, t) {
1708
1725
  }
1709
1726
  return n;
1710
1727
  }
1711
- function Di(e, t) {
1712
- const n = Dt(e, t);
1728
+ function Ki(e, t) {
1729
+ const n = Lt(e, t);
1713
1730
  return Object.entries(n).filter(([, r]) => !r).map(([r]) => r);
1714
1731
  }
1715
- function Pt(e, t) {
1732
+ function Kt(e, t) {
1716
1733
  return t ? {
1717
1734
  intent: t.intent ?? e.intent,
1718
1735
  targetSchemes: t.targetSchemes ?? e.targetSchemes,
@@ -1725,21 +1742,21 @@ function Pi(e, t) {
1725
1742
  if (!r.enabled) continue;
1726
1743
  const i = t[r.providerId];
1727
1744
  if (i)
1728
- for (const a of Lt(r, i))
1745
+ for (const a of Dt(r, i))
1729
1746
  n.push({ channel: r, description: i, capability: a });
1730
1747
  }
1731
1748
  return n;
1732
1749
  }
1733
- function Ki(e, t) {
1750
+ function Ui(e, t) {
1734
1751
  return t.filter((n) => n.capability.intent === e);
1735
1752
  }
1736
- function Kt(e, t) {
1753
+ function Pt(e, t) {
1737
1754
  return t.filter((n) => n.capability.targetSchemes.includes(e));
1738
1755
  }
1739
- function Ui(e, t) {
1740
- return Kt(e.scheme, t);
1756
+ function ji(e, t) {
1757
+ return Pt(e.scheme, t);
1741
1758
  }
1742
- function ji(e, t, n) {
1759
+ function Gi(e, t, n) {
1743
1760
  const r = [];
1744
1761
  for (const i of e)
1745
1762
  for (const a of n)
@@ -1768,10 +1785,10 @@ const jt = {
1768
1785
  id: "note",
1769
1786
  custom: "note"
1770
1787
  };
1771
- function Gi(e) {
1788
+ function Bi(e) {
1772
1789
  return e ? jt[e] ?? "note" : "note";
1773
1790
  }
1774
- const Bi = "message_window", Fi = "message_templates", Hi = {
1791
+ const Fi = "message_window", Hi = "message_templates", Wi = {
1775
1792
  // E-mail
1776
1793
  FROM: "from",
1777
1794
  TO: "to",
@@ -1788,11 +1805,11 @@ const Bi = "message_window", Fi = "message_templates", Hi = {
1788
1805
  // Voice/conference
1789
1806
  HOST: "host",
1790
1807
  PARTICIPANT: "participant"
1791
- }, Vi = (e, t) => ({ intent: e, ...t }), Wi = "folder_management", zi = "remote_search", Xi = {
1808
+ }, Vi = (e, t) => ({ intent: e, ...t }), zi = "folder_management", Xi = "remote_search", Yi = {
1792
1809
  ok: !1,
1793
1810
  code: "UNSUPPORTED",
1794
1811
  message: "Provider does not support this op"
1795
- }, Yi = "installation-id", qi = {
1812
+ }, qi = "installation-id", Ji = {
1796
1813
  ai: [
1797
1814
  "account.read",
1798
1815
  "account.write",
@@ -1926,24 +1943,24 @@ const Bi = "message_window", Fi = "message_templates", Hi = {
1926
1943
  user: ["user.read", "user.write"],
1927
1944
  work: ["item.read", "item.write", "project.read", "project.write"]
1928
1945
  }, Ae = 9e4, Gt = ["out_of_office"], be = (e) => Gt.includes(e);
1929
- function Ji(e, t, n) {
1946
+ function Zi(e, t, n) {
1930
1947
  const r = n - e < Ae, i = t?.status && (!t.expiresAt || t.expiresAt > n) ? t : void 0;
1931
1948
  if (!i?.status) return { online: r, status: r ? "available" : "offline" };
1932
1949
  const a = i.status;
1933
1950
  return !r && !be(a) ? { online: !1, status: "offline" } : { online: r, status: a, message: i.message };
1934
1951
  }
1935
- function Zi(e, t) {
1952
+ function Qi(e, t) {
1936
1953
  const n = t - e.lastSeenAt < Ae, r = n || be(e.status) ? e.status : "offline";
1937
1954
  return n === e.online && r === e.status ? e : { ...e, online: n, status: r };
1938
1955
  }
1939
- function Qi(e, t) {
1956
+ function ea(e, t) {
1940
1957
  return e?.teamId && t.includes(e.teamId) ? { teamId: e.teamId, mustChoose: !1 } : t.length === 1 ? { teamId: t[0], mustChoose: !1 } : { teamId: void 0, mustChoose: t.length > 1 };
1941
1958
  }
1942
- function ea(e) {
1959
+ function ta(e) {
1943
1960
  return e.providerAvailable && e.allowed;
1944
1961
  }
1945
- const ta = "resources.describe", na = "resources.search", ra = "resources.resolve";
1946
- function ia(e) {
1962
+ const na = "resources.describe", ra = "resources.search", ia = "resources.resolve";
1963
+ function aa(e) {
1947
1964
  const t = e.indexOf(":");
1948
1965
  return t === -1 ? e : e.slice(0, t);
1949
1966
  }
@@ -1952,11 +1969,11 @@ function Se(e) {
1952
1969
  const t = typeof e == "string" ? e.match(/apps\/([^/?#]+)/) : null;
1953
1970
  return t ? t[1] : null;
1954
1971
  }
1955
- function aa(e) {
1972
+ function oa(e) {
1956
1973
  const t = Se(e);
1957
1974
  return t ? t !== Ee : typeof e == "string" && e.startsWith("/wake");
1958
1975
  }
1959
- function oa(e) {
1976
+ function sa(e) {
1960
1977
  return typeof e != "string" || e === "" || e === "/" ? !0 : Se(e) === Ee;
1961
1978
  }
1962
1979
  function Bt(e) {
@@ -1975,14 +1992,14 @@ function Ht(e, t) {
1975
1992
  }
1976
1993
  }), i;
1977
1994
  }
1978
- function Vt(e) {
1995
+ function Wt(e) {
1979
1996
  return e.publicBasePath ?? `/apps/${e.name}`;
1980
1997
  }
1981
- function sa(e) {
1998
+ function ca(e) {
1982
1999
  const t = [];
1983
2000
  for (const n of e) {
1984
2001
  if (!n?.name) continue;
1985
- const r = Vt(n);
2002
+ const r = Wt(n);
1986
2003
  for (const i of n.routes ?? []) {
1987
2004
  if (!i.public) continue;
1988
2005
  const a = i.path === "/" ? "" : i.path;
@@ -1996,7 +2013,7 @@ function sa(e) {
1996
2013
  }
1997
2014
  return t;
1998
2015
  }
1999
- function Wt(e, t) {
2016
+ function Vt(e, t) {
2000
2017
  const n = e.split("/").filter(Boolean), r = t.split("/").filter(Boolean);
2001
2018
  for (let i = 0; i < Math.min(n.length, r.length); i++) {
2002
2019
  const a = n[i].startsWith(":"), o = r[i].startsWith(":");
@@ -2008,13 +2025,13 @@ function zt(e, t) {
2008
2025
  if (typeof e != "string") return null;
2009
2026
  let n = null;
2010
2027
  for (const r of t)
2011
- Ft(r.pattern).test(e) && (!n || Wt(r.pattern, n.pattern)) && (n = r);
2028
+ Ft(r.pattern).test(e) && (!n || Vt(r.pattern, n.pattern)) && (n = r);
2012
2029
  return n ? { ...n, params: { ...n.props, ...Ht(n.pattern, e) } } : null;
2013
2030
  }
2014
- function ca(e, t) {
2031
+ function la(e, t) {
2015
2032
  return zt(e, t) !== null;
2016
2033
  }
2017
- const la = "sync-source", ua = "sync-target", da = 20, Xt = {
2034
+ const ua = "sync-source", da = "sync-target", pa = 20, Xt = {
2018
2035
  afrikaans: [
2019
2036
  "[Muziek]",
2020
2037
  "(C) TV GELDERLAND 2021",
@@ -2305,13 +2322,13 @@ function an(e, t = qt) {
2305
2322
  return { text: n.filter((o) => (o.endedAt ?? 0) >= i).map((o) => Yt(o.text).trim()).filter(Boolean).join(" ").replace(/\s+/g, " ").trim(), segmentCount: n.length };
2306
2323
  }
2307
2324
  const on = 60;
2308
- function pa(e, t, n = on) {
2325
+ function fa(e, t, n = on) {
2309
2326
  const r = new Set(e), i = [...e];
2310
2327
  for (const a of t)
2311
2328
  !a || r.has(a) || (r.add(a), i.push(a));
2312
2329
  return i.slice(-n);
2313
2330
  }
2314
- function fa(e) {
2331
+ function ma(e) {
2315
2332
  const { segments: t, now: n, state: r } = e;
2316
2333
  if (r.lastTriggerAt && n - r.lastTriggerAt < Jt)
2317
2334
  return { trigger: !1, reason: "too_soon" };
@@ -2377,7 +2394,7 @@ function dn(e) {
2377
2394
  const r = t.indexOf("@");
2378
2395
  return r >= 0 && (t = t.slice(0, r)), t.trim();
2379
2396
  }
2380
- function ma(e) {
2397
+ function ga(e) {
2381
2398
  if (!e) return !1;
2382
2399
  const t = e.indexOf("@");
2383
2400
  if (t <= 0) return !1;
@@ -2405,7 +2422,7 @@ function Q(e, t) {
2405
2422
  }
2406
2423
  return !o && E(i, a) ? `+${a.callingCode}${i}` : null;
2407
2424
  }
2408
- function ga(e, t = 9) {
2425
+ function ha(e, t = 9) {
2409
2426
  const n = (e ?? "").replace(/\D/g, "");
2410
2427
  return n.length < t ? null : n.slice(-t);
2411
2428
  }
@@ -2416,7 +2433,7 @@ function _e(e) {
2416
2433
  const r = t.slice(0, n).split("+")[0], i = t.slice(n + 1);
2417
2434
  return !r || !i.includes(".") ? null : `${r}@${i}`;
2418
2435
  }
2419
- function ha(e) {
2436
+ function ya(e) {
2420
2437
  const t = _e(e);
2421
2438
  return t ? t.slice(t.lastIndexOf("@") + 1) : null;
2422
2439
  }
@@ -2482,16 +2499,16 @@ const mn = /* @__PURE__ */ new Set([
2482
2499
  "proximus.be",
2483
2500
  "scarlet.be"
2484
2501
  ]);
2485
- function ya(e) {
2502
+ function Aa(e) {
2486
2503
  const t = fn(e);
2487
2504
  return t ? mn.has(t) : !1;
2488
2505
  }
2489
- function Aa(e) {
2506
+ function ba(e) {
2490
2507
  if (!e) return !1;
2491
2508
  const t = e.trim().toLowerCase();
2492
2509
  return t === "tel" || t === "sms" || t === "whatsapp" || t === "fax";
2493
2510
  }
2494
- function ba(e, t, n) {
2511
+ function Ea(e, t, n) {
2495
2512
  if (!e || !t) return null;
2496
2513
  const r = e.trim().toLowerCase();
2497
2514
  if (r === "tel" || r === "sms" || r === "whatsapp") {
@@ -2510,7 +2527,7 @@ function ba(e, t, n) {
2510
2527
  return i ? `${r}:${i}` : null;
2511
2528
  }
2512
2529
  const gn = /(\*\*|__)(?=\S)([\s\S]*?\S)\1/g, hn = /(\*|_)(?=\S)([^*_\n]*?\S)\1/g;
2513
- function Ea(e) {
2530
+ function Sa(e) {
2514
2531
  if (typeof e != "string" || !e) return "";
2515
2532
  let t = e;
2516
2533
  return t = t.replace(/```[a-z]*\n?/gi, "").replace(/~~~[a-z]*\n?/gi, ""), t = t.replace(/!\[([^\]]*)\]\([^)]*\)/g, "$1"), t = t.replace(/\[([^\]]*)\]\([^)]*\)/g, "$1"), t = t.replace(/\[([^\]]*)\]\[[^\]]*\]/g, "$1"), t = t.replace(/<((?:https?|mailto):[^>\s]+)>/gi, "$1"), t = t.split(`
@@ -2563,10 +2580,10 @@ function ie(e) {
2563
2580
  `).trim();
2564
2581
  }
2565
2582
  const En = /<\s*(html|body|div|p|table|br|span)\b/i;
2566
- function Sa(e) {
2583
+ function _a(e) {
2567
2584
  return En.test(e);
2568
2585
  }
2569
- function _a(e) {
2586
+ function Ta(e) {
2570
2587
  if (typeof e != "string" || !e) return "";
2571
2588
  let t = e.length;
2572
2589
  for (const a of yn) {
@@ -2578,21 +2595,21 @@ function _a(e) {
2578
2595
  return r || (r = ie(re(te(e)))), bn(r) || r;
2579
2596
  }
2580
2597
  const Sn = /(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|newsletter|nieuwsbrief|mailer|mailing|notifications?|bounce|postmaster|marketing)@/i, _n = /\b(unsubscribe|afmelden|uitschrijven|opt[\s-]?out|manage (your )?preferences|geen (e-?mails?|nieuwsbrief|berichten) meer)\b/i;
2581
- function Ta(e, t) {
2598
+ function Ia(e, t) {
2582
2599
  return !!(e && Sn.test(e) || t && _n.test(t));
2583
2600
  }
2584
2601
  const Tn = 3, In = 600;
2585
- function Ia(e, t) {
2602
+ function wa(e, t) {
2586
2603
  return e >= Tn || t >= In;
2587
2604
  }
2588
2605
  export {
2589
2606
  m as ACTIVITY_CATALOG,
2590
2607
  $t as AI_ATTACHMENT_LIMITS,
2591
- vi as AI_ATTACHMENT_MAX_PER_TURN,
2592
- Ni as AI_ATTACHMENT_TURN_BUDGET,
2608
+ Oi as AI_ATTACHMENT_MAX_PER_TURN,
2609
+ vi as AI_ATTACHMENT_TURN_BUDGET,
2593
2610
  oe as AI_VENDORS,
2594
2611
  je as ALLOWED_LINK_SCHEMES,
2595
- qi as APP_PERMISSIONS,
2612
+ Ji as APP_PERMISSIONS,
2596
2613
  U as ARTIFACT_MAX_BLOCKS,
2597
2614
  ar as ARTIFACT_MAX_BODY_BYTES,
2598
2615
  M as ARTIFACT_MAX_CELL_LEN,
@@ -2615,12 +2632,12 @@ export {
2615
2632
  jr as DEFAULT_MEMORY_BUDGET,
2616
2633
  sn as DEFAULT_PHONE_REGION,
2617
2634
  Qr as EMPTY_WORKFLOW,
2618
- Wi as FEATURE_FOLDER_MANAGEMENT,
2619
- zi as FEATURE_REMOTE_SEARCH,
2635
+ zi as FEATURE_FOLDER_MANAGEMENT,
2636
+ Xi as FEATURE_REMOTE_SEARCH,
2620
2637
  En as HTML_BODY_RE,
2621
- Yi as INSTALLATION_HEADER,
2638
+ qi as INSTALLATION_HEADER,
2622
2639
  ut as INTERACTION_KIND,
2623
- Hi as InteractionParticipantRole,
2640
+ Wi as InteractionParticipantRole,
2624
2641
  et as KB_FALLBACK_LOCALE,
2625
2642
  z as KB_LOCALES,
2626
2643
  v as LOOSE_STATUSES,
@@ -2630,43 +2647,44 @@ export {
2630
2647
  fe as MAX_COLLECTION_DEPTH,
2631
2648
  Mn as MAX_FIELDS,
2632
2649
  kn as MAX_LIST_ITEMS,
2633
- Dr as MAX_MEMORY_BROWSE,
2650
+ Lr as MAX_MEMORY_BROWSE,
2634
2651
  Ur as MAX_MEMORY_BUDGET,
2635
- Pr as MAX_MEMORY_CHARS,
2652
+ Kr as MAX_MEMORY_CHARS,
2636
2653
  on as MAX_SHOWN_KEYS,
2637
2654
  bt as MAX_TOPIC_CANDIDATES,
2638
2655
  At as MAX_TOPIC_EXAMPLES,
2639
2656
  k as MAX_TOPIC_EXAMPLE_CHARS,
2640
- Kr as MIN_MEMORY_BUDGET,
2657
+ Pr as MIN_MEMORY_BUDGET,
2641
2658
  O as PHONE_REGIONS,
2642
2659
  Ae as PRESENCE_ONLINE_WINDOW_MS,
2643
2660
  Gt as PRESENCE_SURVIVES_OFFLINE,
2644
- Fi as PROVIDER_FEATURE_MESSAGE_TEMPLATES,
2645
- Bi as PROVIDER_FEATURE_MESSAGE_WINDOW,
2661
+ Hi as PROVIDER_FEATURE_MESSAGE_TEMPLATES,
2662
+ Fi as PROVIDER_FEATURE_MESSAGE_WINDOW,
2646
2663
  mn as PUBLIC_EMAIL_DOMAINS,
2647
2664
  X as READ_STEP_TYPES,
2648
2665
  rt as RELATED_SUBJECT_KINDS,
2649
2666
  ye as RESERVED_STATUS_KEYS,
2650
- ta as RESOURCE_DESCRIBE_SERVICE,
2651
- ra as RESOURCE_RESOLVE_SERVICE,
2652
- na as RESOURCE_SEARCH_SERVICE,
2667
+ na as RESOURCE_DESCRIBE_SERVICE,
2668
+ ia as RESOURCE_RESOLVE_SERVICE,
2669
+ ra as RESOURCE_SEARCH_SERVICE,
2653
2670
  Ar as SIGNATURE_INTENTS,
2654
2671
  ft as STEP_MAX_TOKENS_MAX,
2655
2672
  pt as STEP_MAX_TOKENS_MIN,
2656
2673
  In as SUMMARY_MIN_LAST_CHARS,
2657
2674
  Tn as SUMMARY_MIN_MESSAGES,
2658
- da as SYNC_RUN_MAX_ERRORS,
2659
- la as SYNC_SOURCE_PROVIDER_GROUP,
2660
- ua as SYNC_TARGET_PROVIDER_GROUP,
2675
+ pa as SYNC_RUN_MAX_ERRORS,
2676
+ ua as SYNC_SOURCE_PROVIDER_GROUP,
2677
+ da as SYNC_TARGET_PROVIDER_GROUP,
2661
2678
  Xe as TERMINAL_ASSIGNMENT_STATUSES,
2662
2679
  mt as TERMINAL_RUN_STATUSES,
2663
2680
  qr as TRIGGER_VARS,
2664
- Xi as UNSUPPORTED,
2665
- De as USAGE_DIMENSIONS,
2666
- Pe as USAGE_DIMENSION_IDS,
2681
+ Yi as UNSUPPORTED,
2682
+ Le as USAGE_DIMENSIONS,
2683
+ Ke as USAGE_DIMENSION_IDS,
2667
2684
  yi as WORK_COMMENT_ADDED,
2668
2685
  Ai as WORK_ITEM_ASSIGNED,
2669
2686
  Tt as WORK_ITEM_SCOPE_KIND,
2687
+ bi as WORK_ITEM_STATUS_CHANGED,
2670
2688
  It as WORK_PROJECT_SCOPE_KIND,
2671
2689
  mi as acceptExampleCandidate,
2672
2690
  at as actingIdentityKey,
@@ -2680,10 +2698,10 @@ export {
2680
2698
  d as activityTypeInfo,
2681
2699
  Hr as actorKey,
2682
2700
  fi as addExampleCandidate,
2683
- Zi as agePresenceEntry,
2701
+ Qi as agePresenceEntry,
2684
2702
  xt as aiAttachmentKind,
2685
- Oi as aiAttachmentRejection,
2686
- K as aiBudgetLimit,
2703
+ xi as aiAttachmentRejection,
2704
+ P as aiBudgetLimit,
2687
2705
  Qn as aiBudgetPeriodKey,
2688
2706
  Oe as aiBudgetPeriodStart,
2689
2707
  Zn as aiBudgetState,
@@ -2709,37 +2727,37 @@ export {
2709
2727
  Rn as carriesText,
2710
2728
  xr as categoryLabel,
2711
2729
  kt as categoryOf,
2712
- Gi as channelKindForScheme,
2730
+ Bi as channelKindForScheme,
2713
2731
  On as channelKindOf,
2714
2732
  Zr as clampStepMaxTokens,
2715
- _a as cleanMessageText,
2733
+ Ta as cleanMessageText,
2716
2734
  yt as compareWorkTypes,
2717
2735
  yr as decideAssignmentState,
2718
- fa as decideCadence,
2736
+ ma as decideCadence,
2719
2737
  Li as decideIncomingCall,
2720
2738
  tt as defaultLocaleOf,
2721
- wi as defaultStatusKey,
2739
+ Mi as defaultStatusKey,
2722
2740
  Vi as defineIntent,
2723
2741
  Ze as depthOf,
2724
- Ji as derivePresence,
2725
- Di as disabledIntentsFromCapabilities,
2742
+ Zi as derivePresence,
2743
+ Ki as disabledIntentsFromCapabilities,
2726
2744
  oi as elapsedSeconds,
2727
- ha as emailDomain,
2728
- ba as endpointKey,
2745
+ ya as emailDomain,
2746
+ Ea as endpointKey,
2729
2747
  Ht as extractParams,
2730
2748
  nn as extractTerms,
2731
- Ui as filterByEndpoint,
2732
- Ki as filterByIntent,
2733
- Kt as filterByTargetScheme,
2749
+ ji as filterByEndpoint,
2750
+ Ui as filterByIntent,
2751
+ Pt as filterByTargetScheme,
2734
2752
  S as findAiVendor,
2735
2753
  tr as flattenLocales,
2736
2754
  $e as floorToPeriod,
2737
2755
  it as formatActingIdentity,
2738
2756
  li as formatClock,
2739
2757
  ci as formatHm,
2740
- bi as formatItemKey,
2758
+ Ei as formatItemKey,
2741
2759
  xe as formatPeriod,
2742
- xi as freshSources,
2760
+ $i as freshSources,
2743
2761
  Fn as getActivitySeenUserIds,
2744
2762
  Er as getContactEndpoints,
2745
2763
  Ir as getShortTitle,
@@ -2752,106 +2770,106 @@ export {
2752
2770
  Sr as isAssigned,
2753
2771
  fr as isAssignmentTerminal,
2754
2772
  ct as isAssignmentTrigger,
2755
- Wn as isChatMessageActivity,
2773
+ Vn as isChatMessageActivity,
2756
2774
  _r as isClosed,
2757
- Pn as isConnectedType,
2758
- aa as isDeepLink,
2775
+ Kn as isConnectedType,
2776
+ oa as isDeepLink,
2759
2777
  Qe as isDescendant,
2760
- Vn as isEmailActivity,
2761
- Sa as isHtmlBody,
2778
+ Wn as isEmailActivity,
2779
+ _a as isHtmlBody,
2762
2780
  ri as isInFlight,
2763
2781
  wr as isInteractionUnseen,
2764
- oa as isLandingPath,
2765
- Ta as isLikelyBulk,
2782
+ sa as isLandingPath,
2783
+ Ia as isLikelyBulk,
2766
2784
  ae as isMessageShape,
2767
2785
  xn as isMessageType,
2768
- Wt as isMoreSpecificPattern,
2786
+ Vt as isMoreSpecificPattern,
2769
2787
  gt as isPaused,
2770
- Dn as isPlaybookAuthoredType,
2771
- ya as isPublicEmailDomain,
2772
- ca as isPublicPath,
2788
+ Ln as isPlaybookAuthoredType,
2789
+ Aa as isPublicEmailDomain,
2790
+ la as isPublicPath,
2773
2791
  $n as isReplyableType,
2774
2792
  ni as isTerminal,
2775
- Ia as isThreadLongEnough,
2776
- Kn as isTranscriptType,
2777
- Mi as isWorkClosed,
2793
+ wa as isThreadLongEnough,
2794
+ Pn as isTranscriptType,
2795
+ ki as isWorkClosed,
2778
2796
  di as isWorkTypeVisible,
2779
- _i as itemDossierKeys,
2797
+ Ti as itemDossierKeys,
2780
2798
  Mt as ladderFor,
2781
2799
  Mr as linkLabel,
2782
2800
  er as listeningAllowed,
2783
2801
  Nr as localeInstruction,
2784
2802
  Cr as localeName,
2785
2803
  Or as localesOf,
2786
- ma as looksLikeEmail,
2787
- ji as matchContactToIntents,
2804
+ ga as looksLikeEmail,
2805
+ Gi as matchContactToIntents,
2788
2806
  zt as matchPublicRoute,
2789
2807
  Rr as mcpCredentialScope,
2790
- Lr as mcpToolPrefix,
2791
- pa as mergeShownKeys,
2792
- Ln as messageCountsAs,
2793
- Aa as needsPhoneRegion,
2808
+ Dr as mcpToolPrefix,
2809
+ fa as mergeShownKeys,
2810
+ Dn as messageCountsAs,
2811
+ ba as needsPhoneRegion,
2794
2812
  or as normalizeArtifactBlocks,
2795
2813
  Nn as normalizeBlocks,
2796
2814
  _e as normalizeEmail,
2797
2815
  g as normalizeExample,
2798
2816
  rn as novelty,
2799
2817
  Br as parseActingIdentity,
2800
- Ei as parseItemKey,
2818
+ Si as parseItemKey,
2801
2819
  Ft as pathToRegex,
2802
2820
  rr as periodsInRange,
2803
- ga as phoneSuffix,
2804
- Ea as plainTextFromMarkdown,
2821
+ ha as phoneSuffix,
2822
+ Sa as plainTextFromMarkdown,
2805
2823
  st as playbookActor,
2806
2824
  ti as procedureOf,
2807
- Ti as projectDossierKeys,
2808
- Vt as publicBasePathFor,
2809
- sa as publicRoutePatterns,
2825
+ Ii as projectDossierKeys,
2826
+ Wt as publicBasePathFor,
2827
+ ca as publicRoutePatterns,
2810
2828
  C as readPath,
2811
2829
  Y as readStepError,
2812
2830
  lt as refKey,
2813
2831
  fn as registrableDomain,
2814
2832
  St as rejectExampleCandidate,
2815
2833
  Gr as relatedByDefault,
2816
- Dt as resolveAccountCapabilities,
2834
+ Lt as resolveAccountCapabilities,
2817
2835
  N as resolveActivityText,
2818
- Lt as resolveChannelIntents,
2836
+ Dt as resolveChannelIntents,
2819
2837
  Je as resolveSignature,
2820
- Qi as resolveWorkMode,
2821
- ia as resourceKindOf,
2838
+ ea as resolveWorkMode,
2839
+ aa as resourceKindOf,
2822
2840
  Fr as runActor,
2823
2841
  ai as runInteractionId,
2824
2842
  He as sanitizeInline,
2825
2843
  Yt as sanitizeTranscript,
2826
2844
  $r as selectLenses,
2827
- Ri as sessionsHoldCannotReach,
2828
- $i as sessionsToHold,
2845
+ Di as sessionsHoldCannotReach,
2846
+ Ri as sessionsToHold,
2829
2847
  de as shareKeyForTeam,
2830
2848
  ue as shareKeyForUser,
2831
2849
  dr as shareKeysForViewer,
2832
- ea as shouldRunAudioPipeline,
2850
+ ta as shouldRunAudioPipeline,
2833
2851
  Ct as sortStatuses,
2834
2852
  Rt as sourceKey,
2835
- Ii as statusIn,
2853
+ wi as statusIn,
2836
2854
  ei as stepsOf,
2837
2855
  we as stripHtml,
2838
2856
  ii as subjectKeyOf,
2839
2857
  ge as subjectOf,
2840
- Si as suggestProjectKey,
2858
+ _i as suggestProjectKey,
2841
2859
  zr as targetById,
2842
- Wr as targetForActivityType,
2860
+ Vr as targetForActivityType,
2843
2861
  ot as toActingIdentity,
2844
2862
  Q as toE164,
2845
2863
  pr as toolSourceKinds,
2846
2864
  _t as topicOfferedForTeam,
2847
2865
  gi as topicsForTeam,
2848
2866
  Et as truncateExample,
2849
- ki as uniqueWorkStatusKey,
2867
+ Ci as uniqueWorkStatusKey,
2850
2868
  ui as uniqueWorkTypeKey,
2851
- Ke as usageMetricId,
2869
+ Pe as usageMetricId,
2852
2870
  ir as usageMetrics,
2853
- Ci as validateStatuses,
2854
- Vr as valueAtPath,
2871
+ Ni as validateStatuses,
2872
+ Wr as valueAtPath,
2855
2873
  gr as wakesAssignment,
2856
2874
  wt as workItemScopeKey,
2857
2875
  he as workProjectScopeKey,