deepline 0.3.314 → 0.3.316

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.
Files changed (134) hide show
  1. package/dist/bundling-sources/sdk/src/client.ts +12 -0
  2. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  3. package/dist/bundling-sources/sdk/src/runs/overview.ts +17 -10
  4. package/dist/bundling-sources/sdk/src/types.ts +16 -5
  5. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +217 -488
  6. package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +15 -0
  7. package/dist/bundling-sources/shared_libs/play-runtime/execution-capabilities.ts +4 -1
  8. package/dist/bundling-sources/shared_libs/play-runtime/internal-bootstrap-token.ts +13 -4
  9. package/dist/bundling-sources/shared_libs/play-runtime/launch-identity.ts +1 -0
  10. package/dist/bundling-sources/shared_libs/play-runtime/live-events.ts +31 -0
  11. package/dist/bundling-sources/shared_libs/play-runtime/map-execution-frame.ts +444 -51
  12. package/dist/bundling-sources/shared_libs/play-runtime/run-snapshot-stream.ts +22 -43
  13. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +4 -3
  14. package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +136 -87
  15. package/dist/bundling-sources/shared_libs/play-runtime/runtime-authority.ts +24 -6
  16. package/dist/bundling-sources/shared_libs/play-runtime/runtime-operation-contract.ts +56 -0
  17. package/dist/bundling-sources/shared_libs/play-runtime/runtime-sheet-errors.ts +94 -0
  18. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backend.ts +2 -0
  19. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-shared.ts +5 -2
  20. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd.ts +20 -11
  21. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-progress.ts +18 -12
  22. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +140 -9
  23. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-dispatch-authority.ts +2 -0
  24. package/dist/bundling-sources/shared_libs/play-runtime/work-receipt-storage-contract.ts +13 -0
  25. package/dist/bundling-sources/shared_libs/play-runtime/workflow-executor-auth.ts +2 -0
  26. package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +3 -2
  27. package/dist/bundling-sources/shared_libs/plays/docflow-binding-owner.ts +61 -11
  28. package/dist/cli/{auth-GWF55S3N.mjs → auth-JP7ZJ4OI.mjs} +4 -4
  29. package/dist/cli/auth-SPUJ4EXC.js +31 -0
  30. package/dist/cli/{billing-WWOJN7GV.mjs → billing-KG6MC2BC.mjs} +4 -4
  31. package/dist/cli/{billing-2YU6E2IF.js → billing-WZGS32ME.js} +70 -70
  32. package/dist/cli/{chunk-OJ243ZA5.js → chunk-2HKPAZVJ.js} +1 -1
  33. package/dist/cli/{chunk-YVMJTXEG.js → chunk-35YXDTOB.js} +26 -26
  34. package/dist/cli/{chunk-QB5MAFCU.mjs → chunk-46ZOD4PQ.mjs} +1 -1
  35. package/dist/cli/{chunk-CPN2N6EZ.mjs → chunk-6R5ACEWN.mjs} +43 -17
  36. package/dist/cli/{chunk-US4S3E4Y.mjs → chunk-7PZFGB7L.mjs} +1 -1
  37. package/dist/cli/{chunk-3CKNUJVZ.mjs → chunk-AXAPMVUC.mjs} +4 -4
  38. package/dist/cli/{chunk-ENQZV7NR.js → chunk-B6OOVO3A.js} +562 -536
  39. package/dist/cli/{chunk-WDPRE6DU.js → chunk-BOKHMPCZ.js} +48 -48
  40. package/dist/cli/{chunk-VFRZG4OW.js → chunk-C6QGM72M.js} +1 -1
  41. package/dist/cli/{chunk-IZTIBG7A.mjs → chunk-D3NMIACS.mjs} +29 -15
  42. package/dist/cli/{chunk-DR3S76BG.mjs → chunk-DAFGPNVW.mjs} +1 -1
  43. package/dist/cli/{chunk-3K6QD7Z3.mjs → chunk-F2T5UENG.mjs} +1 -1
  44. package/dist/cli/{chunk-VWW6VHQX.js → chunk-G2G67D3L.js} +60 -60
  45. package/dist/cli/{chunk-ODEWOXWW.js → chunk-GHLWDXUB.js} +6 -6
  46. package/dist/cli/{chunk-25SPKKF2.mjs → chunk-IDSDRGKF.mjs} +1 -1
  47. package/dist/cli/{chunk-OUHCJL5B.mjs → chunk-J3ZPMADG.mjs} +1 -1
  48. package/dist/cli/{chunk-MLEJ2FYH.js → chunk-K3BIRBT3.js} +248 -234
  49. package/dist/cli/{chunk-N5V2SBB2.mjs → chunk-KP7W5NO6.mjs} +1 -1
  50. package/dist/cli/{chunk-B5LUKLKH.js → chunk-MCPHK7AF.js} +4 -4
  51. package/dist/cli/{chunk-2Q2IKUL5.mjs → chunk-OB3SYJGU.mjs} +3 -3
  52. package/dist/cli/{chunk-UZTTPEG2.js → chunk-PJERS5VW.js} +6 -6
  53. package/dist/cli/{chunk-VBRO5QCI.js → chunk-RBBSRB56.js} +15 -15
  54. package/dist/cli/{chunk-NG4WDOGN.js → chunk-SRUWVQ66.js} +6 -6
  55. package/dist/cli/{chunk-WTO3ITBC.mjs → chunk-TYSAKSX7.mjs} +2 -2
  56. package/dist/cli/{chunk-HTXZLCSP.mjs → chunk-VC25WFXV.mjs} +2 -2
  57. package/dist/cli/{chunk-3A4LJUX6.mjs → chunk-VDPBQCRQ.mjs} +2 -2
  58. package/dist/cli/{chunk-IALPYID6.js → chunk-XSEMQ4II.js} +3 -3
  59. package/dist/cli/{chunk-JNUHGWB2.js → chunk-YEMOOWZI.js} +50 -50
  60. package/dist/cli/{chunk-JZZT4GAY.mjs → chunk-YNSAVFWL.mjs} +5 -5
  61. package/dist/cli/{chunk-GSRDZD7R.js → chunk-ZNHGAWYI.js} +2 -2
  62. package/dist/cli/client-GMMPQT7B.js +20 -0
  63. package/dist/cli/{client-EYGNDORT.mjs → client-MNPM4ME3.mjs} +3 -3
  64. package/dist/cli/{csv-YOW5JMOH.js → csv-G72FIQWI.js} +12 -12
  65. package/dist/cli/{csv-NZCN7SVV.mjs → csv-ZME7HAPR.mjs} +3 -3
  66. package/dist/cli/{db-HALJV3KY.mjs → db-K2DS4PEY.mjs} +4 -4
  67. package/dist/cli/{db-6BIYLZ6F.js → db-KRBWHSMA.js} +20 -20
  68. package/dist/cli/{describe-KY2ZYGBR.mjs → describe-LXBJP6OP.mjs} +10 -10
  69. package/dist/cli/{describe-WA6R2JSH.js → describe-UKFV376D.js} +17 -17
  70. package/dist/cli/{executions-CBOAN6KI.mjs → executions-2V3AROY6.mjs} +4 -4
  71. package/dist/cli/{executions-NMCTN7XM.js → executions-E66AM4JU.js} +6 -6
  72. package/dist/cli/{feedback-ZZFDSCWS.js → feedback-7C2N7M37.js} +6 -6
  73. package/dist/cli/{feedback-FOMPE3DJ.mjs → feedback-IEPZ2XKZ.mjs} +3 -3
  74. package/dist/cli/{git-YQR2NBCO.mjs → git-AR5KGN4O.mjs} +4 -4
  75. package/dist/cli/git-EXYB66IH.js +23 -0
  76. package/dist/cli/index.js +171 -98
  77. package/dist/cli/index.mjs +114 -41
  78. package/dist/cli/{legacy-noops-XH2TFFI6.js → legacy-noops-A2SH45P4.js} +7 -7
  79. package/dist/cli/{legacy-noops-KMU6P3K4.mjs → legacy-noops-LC2EGAZU.mjs} +4 -4
  80. package/dist/cli/{monitors-2ONK5L3I.mjs → monitors-5YPW3IZQ.mjs} +4 -4
  81. package/dist/cli/{monitors-5M3BZ5OR.js → monitors-IZBUPKPW.js} +85 -85
  82. package/dist/cli/{org-LR5BMCGL.mjs → org-2OMYI5KJ.mjs} +4 -4
  83. package/dist/cli/{org-6MKULUZI.js → org-L42SQ65U.js} +60 -60
  84. package/dist/cli/play-CQI3IDDN.js +152 -0
  85. package/dist/cli/{play-4NOSD7DW.mjs → play-UPCBLAOH.mjs} +9 -9
  86. package/dist/cli/{providers-UFJD3VKF.js → providers-GGNDWUKB.js} +7 -7
  87. package/dist/cli/{providers-UBGIKGCA.mjs → providers-VE2RM56M.mjs} +4 -4
  88. package/dist/cli/{quickstart-KQZHZE6C.js → quickstart-4CZHURUX.js} +5 -5
  89. package/dist/cli/{quickstart-KDUKQRUH.mjs → quickstart-HSJ7FU7Z.mjs} +3 -3
  90. package/dist/cli/{search-4BVOOS5Q.mjs → search-MWBM3I2L.mjs} +5 -5
  91. package/dist/cli/search-PD5FBCUN.js +26 -0
  92. package/dist/cli/{secrets-TVXZ3WJ3.js → secrets-CWBPGDZV.js} +13 -13
  93. package/dist/cli/{secrets-YGV23N3N.mjs → secrets-W5DQYKGU.mjs} +4 -4
  94. package/dist/cli/{sessions-RWIQWDFD.js → sessions-EDCFU6P2.js} +5 -5
  95. package/dist/cli/{sessions-G7ROUW35.mjs → sessions-Q42GUYTF.mjs} +4 -4
  96. package/dist/cli/{settings-TG3E2NR7.js → settings-OKRENZGX.js} +74 -74
  97. package/dist/cli/{settings-QZEVGCXE.mjs → settings-SO56AJPQ.mjs} +7 -7
  98. package/dist/cli/{setup-3KDUNEEE.js → setup-7PLHLNLS.js} +41 -41
  99. package/dist/cli/{setup-HUXINKOH.mjs → setup-OTYMF5CZ.mjs} +6 -6
  100. package/dist/cli/{skills-LHU3DB7J.mjs → skills-4UFS4FXP.mjs} +4 -4
  101. package/dist/cli/skills-IP7IW7EQ.js +28 -0
  102. package/dist/cli/{tools-J5WQ33BB.mjs → tools-6FV543YV.mjs} +6 -6
  103. package/dist/cli/tools-A2YNR6PI.js +38 -0
  104. package/dist/cli/{update-T6744RM7.mjs → update-6POGDXYW.mjs} +6 -6
  105. package/dist/cli/update-QXSGKLJG.js +28 -0
  106. package/dist/cli/{workflow-CG2B65HD.mjs → workflow-HVZSFWYR.mjs} +5 -5
  107. package/dist/cli/{workflow-YF5SQJLG.js → workflow-RB4POZP5.js} +15 -15
  108. package/dist/{client-OBwghxPC.d.ts → client-BV68GMPo.d.ts} +19 -6
  109. package/dist/{client-CtVdLZux.d.mts → client-D9ACjiRC.d.mts} +19 -6
  110. package/dist/{compiler-manifest-wOKNiXpa.d.mts → compiler-manifest-BXcZ4P4W.d.mts} +2 -2
  111. package/dist/{compiler-manifest-wOKNiXpa.d.ts → compiler-manifest-BXcZ4P4W.d.ts} +2 -2
  112. package/dist/index.d.mts +4 -4
  113. package/dist/index.d.ts +4 -4
  114. package/dist/index.js +7 -7
  115. package/dist/index.mjs +4 -4
  116. package/dist/install-integrity.json +82 -82
  117. package/dist/plays/bundle-play-file.d.mts +2 -2
  118. package/dist/plays/bundle-play-file.d.ts +2 -2
  119. package/dist/plays/bundle-play-file.mjs +2 -2
  120. package/dist/plays/run-request.d.mts +2 -2
  121. package/dist/plays/run-request.d.ts +2 -2
  122. package/dist/release.d.mts +1 -1
  123. package/dist/release.d.ts +1 -1
  124. package/dist/release.js +2 -2
  125. package/dist/release.mjs +1 -1
  126. package/package.json +1 -1
  127. package/dist/cli/auth-QX2L4LPM.js +0 -31
  128. package/dist/cli/client-Z4VFNTUB.js +0 -20
  129. package/dist/cli/git-AC2ATBDK.js +0 -23
  130. package/dist/cli/play-U3CZ4F2W.js +0 -152
  131. package/dist/cli/search-Y7OTFRCI.js +0 -26
  132. package/dist/cli/skills-CO5YUWBK.js +0 -28
  133. package/dist/cli/tools-MWPT5X47.js +0 -38
  134. package/dist/cli/update-VVIJW7ZJ.js +0 -28
@@ -14,7 +14,7 @@ var _chunkLA46MMTLjs = require('./chunk-LA46MMTL.js');
14
14
 
15
15
 
16
16
 
17
- var _chunkB5LUKLKHjs = require('./chunk-B5LUKLKH.js');
17
+ var _chunkMCPHK7AFjs = require('./chunk-MCPHK7AF.js');
18
18
 
19
19
 
20
20
 
@@ -606,6 +606,18 @@ var DEFAULT_PRODUCT_NOTIFICATION_DELIVERY_TIMING = {
606
606
  };
607
607
 
608
608
  // ../play-runtime/live-events.ts
609
+ function projectPlayStepProgressCounters(progress) {
610
+ return {
611
+ completed: progress.completed,
612
+ total: progress.total,
613
+ failed: progress.failed,
614
+ startedRows: progress.startedRows,
615
+ activeRows: progress.activeRows,
616
+ waitingRows: progress.waitingRows,
617
+ completedRows: progress.completedRows,
618
+ supersededRows: progress.supersededRows
619
+ };
620
+ }
609
621
  function resolveTimingWindow(input) {
610
622
  const startedAt = typeof input.startedAt === "number" && Number.isFinite(input.startedAt) ? input.startedAt : null;
611
623
  const completedAt = typeof input.completedAt === "number" && Number.isFinite(input.completedAt) ? input.completedAt : null;
@@ -1640,19 +1652,17 @@ function getStepStatusSignature(snapshot) {
1640
1652
  ).join("|");
1641
1653
  }
1642
1654
  function getStepProgressSignature(snapshot) {
1643
- return snapshot.nodeStates.map(
1644
- (state) => [
1655
+ return JSON.stringify(
1656
+ snapshot.nodeStates.map((state) => [
1645
1657
  state.nodeId,
1646
- _nullishCoalesce(_optionalChain([state, 'access', _28 => _28.progress, 'optionalAccess', _29 => _29.completed]), () => ( "")),
1647
- _nullishCoalesce(_optionalChain([state, 'access', _30 => _30.progress, 'optionalAccess', _31 => _31.total]), () => ( "")),
1648
- _nullishCoalesce(_optionalChain([state, 'access', _32 => _32.progress, 'optionalAccess', _33 => _33.failed]), () => ( "")),
1649
- _nullishCoalesce(_optionalChain([state, 'access', _34 => _34.progress, 'optionalAccess', _35 => _35.artifactTableNamespace]), () => ( "")),
1650
- _nullishCoalesce(_optionalChain([state, 'access', _36 => _36.progress, 'optionalAccess', _37 => _37.startedAt]), () => ( "")),
1651
- _nullishCoalesce(_optionalChain([state, 'access', _38 => _38.progress, 'optionalAccess', _39 => _39.completedAt]), () => ( "")),
1652
- _nullishCoalesce(_optionalChain([state, 'access', _40 => _40.progress, 'optionalAccess', _41 => _41.updatedAt]), () => ( "")),
1653
- _nullishCoalesce(_optionalChain([state, 'access', _42 => _42.progress, 'optionalAccess', _43 => _43.message]), () => ( ""))
1654
- ].join(":")
1655
- ).join("|");
1658
+ projectPlayStepProgressCounters(_nullishCoalesce(state.progress, () => ( {}))),
1659
+ _nullishCoalesce(_optionalChain([state, 'access', _28 => _28.progress, 'optionalAccess', _29 => _29.artifactTableNamespace]), () => ( "")),
1660
+ _nullishCoalesce(_optionalChain([state, 'access', _30 => _30.progress, 'optionalAccess', _31 => _31.startedAt]), () => ( "")),
1661
+ _nullishCoalesce(_optionalChain([state, 'access', _32 => _32.progress, 'optionalAccess', _33 => _33.completedAt]), () => ( "")),
1662
+ _nullishCoalesce(_optionalChain([state, 'access', _34 => _34.progress, 'optionalAccess', _35 => _35.updatedAt]), () => ( "")),
1663
+ _nullishCoalesce(_optionalChain([state, 'access', _36 => _36.progress, 'optionalAccess', _37 => _37.message]), () => ( ""))
1664
+ ])
1665
+ );
1656
1666
  }
1657
1667
  function getSnapshotSignature(snapshot) {
1658
1668
  return JSON.stringify(snapshot);
@@ -1720,8 +1730,8 @@ function diffPlayRunStreamEvents(input) {
1720
1730
  if (state.status === "idle") {
1721
1731
  continue;
1722
1732
  }
1723
- const persistedStartedAt = _nullishCoalesce(_nullishCoalesce(state.startedAt, () => ( _optionalChain([state, 'access', _44 => _44.progress, 'optionalAccess', _45 => _45.startedAt]))), () => ( null));
1724
- const persistedCompletedAt = _nullishCoalesce(_nullishCoalesce(state.completedAt, () => ( _optionalChain([state, 'access', _46 => _46.progress, 'optionalAccess', _47 => _47.completedAt]))), () => ( null));
1733
+ const persistedStartedAt = _nullishCoalesce(_nullishCoalesce(state.startedAt, () => ( _optionalChain([state, 'access', _38 => _38.progress, 'optionalAccess', _39 => _39.startedAt]))), () => ( null));
1734
+ const persistedCompletedAt = _nullishCoalesce(_nullishCoalesce(state.completedAt, () => ( _optionalChain([state, 'access', _40 => _40.progress, 'optionalAccess', _41 => _41.completedAt]))), () => ( null));
1725
1735
  events.push(
1726
1736
  makeRunStreamEvent({
1727
1737
  cursor,
@@ -1735,7 +1745,7 @@ function diffPlayRunStreamEvents(input) {
1735
1745
  ...resolveTimingWindow({
1736
1746
  startedAt: persistedStartedAt,
1737
1747
  completedAt: persistedCompletedAt,
1738
- updatedAt: _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(state.updatedAt, () => ( _optionalChain([state, 'access', _48 => _48.progress, 'optionalAccess', _49 => _49.updatedAt]))), () => ( snapshot.updatedAt)), () => ( null))
1748
+ updatedAt: _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(state.updatedAt, () => ( _optionalChain([state, 'access', _42 => _42.progress, 'optionalAccess', _43 => _43.updatedAt]))), () => ( snapshot.updatedAt)), () => ( null))
1739
1749
  })
1740
1750
  }
1741
1751
  })
@@ -1757,13 +1767,7 @@ function diffPlayRunStreamEvents(input) {
1757
1767
  payload: {
1758
1768
  runId: snapshot.runId,
1759
1769
  stepId: state.nodeId,
1760
- completed: state.progress.completed,
1761
- total: state.progress.total,
1762
- failed: state.progress.failed,
1763
- startedRows: state.progress.startedRows,
1764
- activeRows: state.progress.activeRows,
1765
- waitingRows: state.progress.waitingRows,
1766
- completedRows: state.progress.completedRows,
1770
+ ...projectPlayStepProgressCounters(state.progress),
1767
1771
  message: state.progress.message,
1768
1772
  artifactTableNamespace: _nullishCoalesce(_nullishCoalesce(state.progress.artifactTableNamespace, () => ( state.artifactTableNamespace)), () => ( null)),
1769
1773
  ...resolveTimingWindow({
@@ -1795,9 +1799,9 @@ function diffPlayRunStreamEvents(input) {
1795
1799
  if (next.snapshotSignature !== previous.snapshotSignature) {
1796
1800
  const enrichedNodeStates = snapshot.nodeStates.map((state) => {
1797
1801
  const timing = resolveTimingWindow({
1798
- startedAt: _nullishCoalesce(_nullishCoalesce(state.startedAt, () => ( _optionalChain([state, 'access', _50 => _50.progress, 'optionalAccess', _51 => _51.startedAt]))), () => ( null)),
1799
- completedAt: _nullishCoalesce(_nullishCoalesce(state.completedAt, () => ( _optionalChain([state, 'access', _52 => _52.progress, 'optionalAccess', _53 => _53.completedAt]))), () => ( null)),
1800
- updatedAt: _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(state.updatedAt, () => ( _optionalChain([state, 'access', _54 => _54.progress, 'optionalAccess', _55 => _55.updatedAt]))), () => ( snapshot.updatedAt)), () => ( null))
1802
+ startedAt: _nullishCoalesce(_nullishCoalesce(state.startedAt, () => ( _optionalChain([state, 'access', _44 => _44.progress, 'optionalAccess', _45 => _45.startedAt]))), () => ( null)),
1803
+ completedAt: _nullishCoalesce(_nullishCoalesce(state.completedAt, () => ( _optionalChain([state, 'access', _46 => _46.progress, 'optionalAccess', _47 => _47.completedAt]))), () => ( null)),
1804
+ updatedAt: _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(state.updatedAt, () => ( _optionalChain([state, 'access', _48 => _48.progress, 'optionalAccess', _49 => _49.updatedAt]))), () => ( snapshot.updatedAt)), () => ( null))
1801
1805
  });
1802
1806
  return {
1803
1807
  ...state,
@@ -1856,18 +1860,18 @@ function isTransientPlayRunReadError(error) {
1856
1860
  // src/runs/watch-polling.ts
1857
1861
  var RUN_WATCH_POLL_INTERVAL_MS = 2e3;
1858
1862
  function waitForNextPoll(ms, signal) {
1859
- if (_optionalChain([signal, 'optionalAccess', _56 => _56.aborted])) {
1863
+ if (_optionalChain([signal, 'optionalAccess', _50 => _50.aborted])) {
1860
1864
  return Promise.resolve(false);
1861
1865
  }
1862
1866
  return new Promise((resolve) => {
1863
1867
  const finish = (elapsed) => {
1864
1868
  clearTimeout(timeout);
1865
- _optionalChain([signal, 'optionalAccess', _57 => _57.removeEventListener, 'call', _58 => _58("abort", onAbort)]);
1869
+ _optionalChain([signal, 'optionalAccess', _51 => _51.removeEventListener, 'call', _52 => _52("abort", onAbort)]);
1866
1870
  resolve(elapsed);
1867
1871
  };
1868
1872
  const onAbort = () => finish(false);
1869
1873
  const timeout = setTimeout(() => finish(true), ms);
1870
- _optionalChain([signal, 'optionalAccess', _59 => _59.addEventListener, 'call', _60 => _60("abort", onAbort, { once: true })]);
1874
+ _optionalChain([signal, 'optionalAccess', _53 => _53.addEventListener, 'call', _54 => _54("abort", onAbort, { once: true })]);
1871
1875
  });
1872
1876
  }
1873
1877
  function readSnapshotResponse(response, runId) {
@@ -1924,7 +1928,7 @@ async function* watchRunEvents(options) {
1924
1928
  let previous = EMPTY_PLAY_RUN_STREAM_DIFF_STATE;
1925
1929
  let consecutiveFailures = 0;
1926
1930
  let outageNoticeSent = false;
1927
- while (!_optionalChain([signal, 'optionalAccess', _61 => _61.aborted])) {
1931
+ while (!_optionalChain([signal, 'optionalAccess', _55 => _55.aborted])) {
1928
1932
  const pollStartedAt = Date.now();
1929
1933
  let snapshot;
1930
1934
  try {
@@ -1937,7 +1941,7 @@ async function* watchRunEvents(options) {
1937
1941
  signal
1938
1942
  });
1939
1943
  } catch (error) {
1940
- if (_optionalChain([signal, 'optionalAccess', _62 => _62.aborted])) {
1944
+ if (_optionalChain([signal, 'optionalAccess', _56 => _56.aborted])) {
1941
1945
  return;
1942
1946
  }
1943
1947
  if (!isTransientPlayRunReadError(error)) {
@@ -1946,12 +1950,12 @@ async function* watchRunEvents(options) {
1946
1950
  consecutiveFailures += 1;
1947
1951
  const reason = error instanceof Error ? error.message : String(error);
1948
1952
  if (!outageNoticeSent) {
1949
- _optionalChain([options, 'access', _63 => _63.onRetry, 'optionalCall', _64 => _64({
1953
+ _optionalChain([options, 'access', _57 => _57.onRetry, 'optionalCall', _58 => _58({
1950
1954
  attempt: consecutiveFailures,
1951
1955
  delayMs: pollIntervalMs,
1952
1956
  reason
1953
1957
  })]);
1954
- _optionalChain([options, 'access', _65 => _65.onNotice, 'optionalCall', _66 => _66(
1958
+ _optionalChain([options, 'access', _59 => _59.onNotice, 'optionalCall', _60 => _60(
1955
1959
  `[watch] run snapshot request failed; retrying every ${pollIntervalMs / 1e3}s (${reason})`
1956
1960
  )]);
1957
1961
  outageNoticeSent = true;
@@ -1966,7 +1970,7 @@ async function* watchRunEvents(options) {
1966
1970
  continue;
1967
1971
  }
1968
1972
  if (outageNoticeSent) {
1969
- _optionalChain([options, 'access', _67 => _67.onNotice, 'optionalCall', _68 => _68("[watch] run snapshot polling recovered")]);
1973
+ _optionalChain([options, 'access', _61 => _61.onNotice, 'optionalCall', _62 => _62("[watch] run snapshot polling recovered")]);
1970
1974
  outageNoticeSent = false;
1971
1975
  }
1972
1976
  consecutiveFailures = 0;
@@ -2296,7 +2300,7 @@ function parseDsl(input) {
2296
2300
  input.slice(position)
2297
2301
  );
2298
2302
  if (!operation) {
2299
- const token = _nullishCoalesce(_nullishCoalesce(_optionalChain([/^(?:[=!<>~]+|[A-Za-z_]+)/, 'access', _69 => _69.exec, 'call', _70 => _70(input.slice(position)), 'optionalAccess', _71 => _71[0]]), () => ( input[position])), () => ( "<end>"));
2303
+ const token = _nullishCoalesce(_nullishCoalesce(_optionalChain([/^(?:[=!<>~]+|[A-Za-z_]+)/, 'access', _63 => _63.exec, 'call', _64 => _64(input.slice(position)), 'optionalAccess', _65 => _65[0]]), () => ( input[position])), () => ( "<end>"));
2300
2304
  if (token === "=") {
2301
2305
  const corrected = `${input.slice(0, position)}==${input.slice(position + 1)}`;
2302
2306
  fail(
@@ -2375,7 +2379,7 @@ function normalizeRunEventQueryTimestamp(value) {
2375
2379
  return /[1-9]/.test(extraMicros) ? canonical2.replace(/Z$/, `${extraMicros}Z`) : canonical2;
2376
2380
  }
2377
2381
  function timestampMicros(value) {
2378
- const fraction = _nullishCoalesce(_optionalChain([/\.(\d+)Z$/, 'access', _72 => _72.exec, 'call', _73 => _73(value), 'optionalAccess', _74 => _74[1]]), () => ( ""));
2382
+ const fraction = _nullishCoalesce(_optionalChain([/\.(\d+)Z$/, 'access', _66 => _66.exec, 'call', _67 => _67(value), 'optionalAccess', _68 => _68[1]]), () => ( ""));
2379
2383
  return BigInt(Date.parse(value)) * BigInt(1e3) + BigInt(fraction.padEnd(6, "0").slice(3));
2380
2384
  }
2381
2385
  function time(value, nowMs, fallback) {
@@ -2608,7 +2612,7 @@ function parseNotificationGroupTarget(value) {
2608
2612
  }
2609
2613
  return { kind: "email", email };
2610
2614
  }
2611
- const slack = _optionalChain([/^slack:(.+)$/i, 'access', _75 => _75.exec, 'call', _76 => _76(normalized), 'optionalAccess', _77 => _77[1], 'optionalAccess', _78 => _78.trim, 'call', _79 => _79()]);
2615
+ const slack = _optionalChain([/^slack:(.+)$/i, 'access', _69 => _69.exec, 'call', _70 => _70(normalized), 'optionalAccess', _71 => _71[1], 'optionalAccess', _72 => _72.trim, 'call', _73 => _73()]);
2612
2616
  if (!slack) {
2613
2617
  const provider = normalized.split(":", 1)[0] || normalized;
2614
2618
  throw new Error(
@@ -2616,7 +2620,7 @@ function parseNotificationGroupTarget(value) {
2616
2620
  );
2617
2621
  }
2618
2622
  const member = /^member:([UW][A-Z0-9]{8,})$/i.exec(slack);
2619
- if (_optionalChain([member, 'optionalAccess', _80 => _80[1]])) {
2623
+ if (_optionalChain([member, 'optionalAccess', _74 => _74[1]])) {
2620
2624
  return { kind: "slack", memberId: member[1].toUpperCase() };
2621
2625
  }
2622
2626
  if (slack.toLowerCase().startsWith("member:")) {
@@ -2663,10 +2667,10 @@ function resolvePlayRunRuntimeSelection(request) {
2663
2667
  }
2664
2668
  return runtime;
2665
2669
  }
2666
- const configured = _optionalChain([process, 'access', _81 => _81.env, 'access', _82 => _82.DEEPLINE_RUNTIME_ENVIRONMENT, 'optionalAccess', _83 => _83.trim, 'call', _84 => _84()]);
2667
- const configuredNamespace = _optionalChain([process, 'access', _85 => _85.env, 'access', _86 => _86.DEEPLINE_RUNTIME_NAMESPACE, 'optionalAccess', _87 => _87.trim, 'call', _88 => _88()]);
2668
- const configuredToken = _optionalChain([process, 'access', _89 => _89.env, 'access', _90 => _90.DEEPLINE_RUNTIME_ENVIRONMENT_TOKEN, 'optionalAccess', _91 => _91.trim, 'call', _92 => _92()]);
2669
- const configuredPlacementPolicy = _optionalChain([process, 'access', _93 => _93.env, 'access', _94 => _94.DEEPLINE_RUNTIME_SANDBOX_PLACEMENT_POLICY, 'optionalAccess', _95 => _95.trim, 'call', _96 => _96()]);
2670
+ const configured = _optionalChain([process, 'access', _75 => _75.env, 'access', _76 => _76.DEEPLINE_RUNTIME_ENVIRONMENT, 'optionalAccess', _77 => _77.trim, 'call', _78 => _78()]);
2671
+ const configuredNamespace = _optionalChain([process, 'access', _79 => _79.env, 'access', _80 => _80.DEEPLINE_RUNTIME_NAMESPACE, 'optionalAccess', _81 => _81.trim, 'call', _82 => _82()]);
2672
+ const configuredToken = _optionalChain([process, 'access', _83 => _83.env, 'access', _84 => _84.DEEPLINE_RUNTIME_ENVIRONMENT_TOKEN, 'optionalAccess', _85 => _85.trim, 'call', _86 => _86()]);
2673
+ const configuredPlacementPolicy = _optionalChain([process, 'access', _87 => _87.env, 'access', _88 => _88.DEEPLINE_RUNTIME_SANDBOX_PLACEMENT_POLICY, 'optionalAccess', _89 => _89.trim, 'call', _90 => _90()]);
2670
2674
  if (!configured) {
2671
2675
  if (configuredNamespace || configuredToken || configuredPlacementPolicy) {
2672
2676
  const present = [];
@@ -2705,7 +2709,7 @@ function resolvePlayRunRuntimeSelection(request) {
2705
2709
  "INVALID_RUNTIME_NAMESPACE"
2706
2710
  );
2707
2711
  }
2708
- const configuredBackendValue = _optionalChain([process, 'access', _97 => _97.env, 'access', _98 => _98.DEEPLINE_PLAY_RUNNER_BACKEND, 'optionalAccess', _99 => _99.trim, 'call', _100 => _100()]);
2712
+ const configuredBackendValue = _optionalChain([process, 'access', _91 => _91.env, 'access', _92 => _92.DEEPLINE_PLAY_RUNNER_BACKEND, 'optionalAccess', _93 => _93.trim, 'call', _94 => _94()]);
2709
2713
  const configuredBackend = configuredBackendValue === "daytona" || configuredBackendValue === "modal" ? configuredBackendValue : void 0;
2710
2714
  if (configuredBackendValue && !configuredBackend) {
2711
2715
  throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
@@ -2743,7 +2747,7 @@ function resolveStartPlayRunRequest(request) {
2743
2747
  }
2744
2748
  function runtimeSelectionHeaders(runtime) {
2745
2749
  if (!runtime) return void 0;
2746
- const token = _optionalChain([process, 'access', _101 => _101.env, 'access', _102 => _102.DEEPLINE_RUNTIME_ENVIRONMENT_TOKEN, 'optionalAccess', _103 => _103.trim, 'call', _104 => _104()]);
2750
+ const token = _optionalChain([process, 'access', _95 => _95.env, 'access', _96 => _96.DEEPLINE_RUNTIME_ENVIRONMENT_TOKEN, 'optionalAccess', _97 => _97.trim, 'call', _98 => _98()]);
2747
2751
  if (!token) {
2748
2752
  throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
2749
2753
  "DEEPLINE_RUNTIME_ENVIRONMENT_TOKEN is required for explicit preview runtime selection.",
@@ -2751,18 +2755,18 @@ function runtimeSelectionHeaders(runtime) {
2751
2755
  "RUNTIME_ENVIRONMENT_TOKEN_REQUIRED"
2752
2756
  );
2753
2757
  }
2754
- const receivers = _optionalChain([process, 'access', _105 => _105.env, 'access', _106 => _106.DEEPLINE_RUNTIME_RETAINED_PIPELINE_RECEIVERS, 'optionalAccess', _107 => _107.trim, 'call', _108 => _108()]);
2758
+ const receivers = _optionalChain([process, 'access', _99 => _99.env, 'access', _100 => _100.DEEPLINE_RUNTIME_RETAINED_PIPELINE_RECEIVERS, 'optionalAccess', _101 => _101.trim, 'call', _102 => _102()]);
2755
2759
  return {
2756
- [_chunkB5LUKLKHjs.RUNTIME_ENVIRONMENT_TOKEN_HEADER]: token,
2757
- ...receivers ? { [_chunkB5LUKLKHjs.RETAINED_PIPELINE_RECEIVERS_HEADER]: receivers } : {}
2760
+ [_chunkMCPHK7AFjs.RUNTIME_ENVIRONMENT_TOKEN_HEADER]: token,
2761
+ ...receivers ? { [_chunkMCPHK7AFjs.RETAINED_PIPELINE_RECEIVERS_HEADER]: receivers } : {}
2758
2762
  };
2759
2763
  }
2760
2764
  function isolatedCiRuntimeEventReadHeaders() {
2761
- const schema = _optionalChain([process, 'access', _109 => _109.env, 'access', _110 => _110.DEEPLINE_RUNTIME_SCHEDULER_SCHEMA, 'optionalAccess', _111 => _111.trim, 'call', _112 => _112()]);
2762
- if (_optionalChain([process, 'access', _113 => _113.env, 'access', _114 => _114.DEEPLINE_SYNTHETIC_RUN, 'optionalAccess', _115 => _115.trim, 'call', _116 => _116()]) !== "1" || !schema || !/^fly_absurd_pr_\d+_\d+(?:_\d+)?$/.test(schema)) {
2765
+ const schema = _optionalChain([process, 'access', _103 => _103.env, 'access', _104 => _104.DEEPLINE_RUNTIME_SCHEDULER_SCHEMA, 'optionalAccess', _105 => _105.trim, 'call', _106 => _106()]);
2766
+ if (_optionalChain([process, 'access', _107 => _107.env, 'access', _108 => _108.DEEPLINE_SYNTHETIC_RUN, 'optionalAccess', _109 => _109.trim, 'call', _110 => _110()]) !== "1" || !schema || !/^fly_absurd_pr_\d+_\d+(?:_\d+)?$/.test(schema)) {
2763
2767
  return void 0;
2764
2768
  }
2765
- const token = _optionalChain([process, 'access', _117 => _117.env, 'access', _118 => _118.DEEPLINE_INTERNAL_TOKEN, 'optionalAccess', _119 => _119.trim, 'call', _120 => _120()]);
2769
+ const token = _optionalChain([process, 'access', _111 => _111.env, 'access', _112 => _112.DEEPLINE_INTERNAL_TOKEN, 'optionalAccess', _113 => _113.trim, 'call', _114 => _114()]);
2766
2770
  if (!token) {
2767
2771
  throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
2768
2772
  "DEEPLINE_INTERNAL_TOKEN is required for isolated CI runtime event reads.",
@@ -2770,7 +2774,7 @@ function isolatedCiRuntimeEventReadHeaders() {
2770
2774
  "RUNTIME_EVENT_INTERNAL_TOKEN_REQUIRED"
2771
2775
  );
2772
2776
  }
2773
- return { [_chunkB5LUKLKHjs.COORDINATOR_INTERNAL_TOKEN_HEADER]: token };
2777
+ return { [_chunkMCPHK7AFjs.COORDINATOR_INTERNAL_TOKEN_HEADER]: token };
2774
2778
  }
2775
2779
  function normalizeTestPolicyOverrides(value, source) {
2776
2780
  if (value && typeof value === "object" && !Array.isArray(value)) {
@@ -2783,8 +2787,8 @@ function normalizeTestPolicyOverrides(value, source) {
2783
2787
  );
2784
2788
  }
2785
2789
  function parseEnvTestPolicyOverrides() {
2786
- const raw = typeof process !== "undefined" ? _optionalChain([process, 'access', _121 => _121.env, 'optionalAccess', _122 => _122.DEEPLINE_TEST_POLICY_OVERRIDES]) : void 0;
2787
- const trimmed = _optionalChain([raw, 'optionalAccess', _123 => _123.trim, 'call', _124 => _124()]);
2790
+ const raw = typeof process !== "undefined" ? _optionalChain([process, 'access', _115 => _115.env, 'optionalAccess', _116 => _116.DEEPLINE_TEST_POLICY_OVERRIDES]) : void 0;
2791
+ const trimmed = _optionalChain([raw, 'optionalAccess', _117 => _117.trim, 'call', _118 => _118()]);
2788
2792
  if (!trimmed) return void 0;
2789
2793
  let parsed;
2790
2794
  try {
@@ -2812,7 +2816,7 @@ function isTransientCompileManifestError(error) {
2812
2816
  );
2813
2817
  }
2814
2818
  function requireCompileManifestResponse(response, playName) {
2815
- const compilerManifest = _optionalChain([response, 'optionalAccess', _125 => _125.compilerManifest]);
2819
+ const compilerManifest = _optionalChain([response, 'optionalAccess', _119 => _119.compilerManifest]);
2816
2820
  if (!compilerManifest || typeof compilerManifest !== "object" || Array.isArray(compilerManifest)) {
2817
2821
  throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
2818
2822
  `Compile manifest response did not include compilerManifest for ${playName}.`,
@@ -2864,7 +2868,7 @@ function chunkRegisterPlayArtifacts(artifacts) {
2864
2868
  }
2865
2869
  function searchParams(options) {
2866
2870
  const params = new URLSearchParams();
2867
- params.set("q", _nullishCoalesce(_optionalChain([options, 'access', _126 => _126.query, 'optionalAccess', _127 => _127.trim, 'call', _128 => _128()]), () => ( "")));
2871
+ params.set("q", _nullishCoalesce(_optionalChain([options, 'access', _120 => _120.query, 'optionalAccess', _121 => _121.trim, 'call', _122 => _122()]), () => ( "")));
2868
2872
  params.set(
2869
2873
  "include_search_debug",
2870
2874
  options.includeSearchDebug ? "true" : "false"
@@ -2874,13 +2878,13 @@ function searchParams(options) {
2874
2878
  if (options.offset !== void 0) {
2875
2879
  params.set("offset", String(options.offset));
2876
2880
  }
2877
- if (_optionalChain([options, 'access', _129 => _129.categories, 'optionalAccess', _130 => _130.trim, 'call', _131 => _131()])) {
2881
+ if (_optionalChain([options, 'access', _123 => _123.categories, 'optionalAccess', _124 => _124.trim, 'call', _125 => _125()])) {
2878
2882
  params.set("categories", options.categories.trim());
2879
2883
  }
2880
- if (_optionalChain([options, 'access', _132 => _132.searchTerms, 'optionalAccess', _133 => _133.trim, 'call', _134 => _134()])) {
2884
+ if (_optionalChain([options, 'access', _126 => _126.searchTerms, 'optionalAccess', _127 => _127.trim, 'call', _128 => _128()])) {
2881
2885
  params.set("search_terms", options.searchTerms.trim());
2882
2886
  }
2883
- if (_optionalChain([options, 'access', _135 => _135.task, 'optionalAccess', _136 => _136.trim, 'call', _137 => _137()])) params.set("task", options.task.trim());
2887
+ if (_optionalChain([options, 'access', _129 => _129.task, 'optionalAccess', _130 => _130.trim, 'call', _131 => _131()])) params.set("task", options.task.trim());
2884
2888
  return params;
2885
2889
  }
2886
2890
  var RUNS_FAILED_LOG_LIMIT = 20;
@@ -2930,17 +2934,17 @@ function preferPrebuiltPlayDescriptions(plays) {
2930
2934
  }
2931
2935
  function normalizePlayStatus(raw) {
2932
2936
  const runPackage = _chunkLA46MMTLjs.isPlayRunPackage.call(void 0, raw) ? raw : _chunkLA46MMTLjs.isPlayRunPackage.call(void 0, raw.package) ? raw.package : null;
2933
- const packageRun = _optionalChain([runPackage, 'optionalAccess', _138 => _138.run]);
2934
- const rawStatus = typeof raw.status === "string" ? raw.status : typeof _optionalChain([packageRun, 'optionalAccess', _139 => _139.status]) === "string" ? packageRun.status : null;
2937
+ const packageRun = _optionalChain([runPackage, 'optionalAccess', _132 => _132.run]);
2938
+ const rawStatus = typeof raw.status === "string" ? raw.status : typeof _optionalChain([packageRun, 'optionalAccess', _133 => _133.status]) === "string" ? packageRun.status : null;
2935
2939
  const status = _chunkLA46MMTLjs.decodePlayRunPublicStatus.call(void 0, rawStatus);
2936
2940
  if (!status) {
2937
2941
  throw new Error(
2938
2942
  `Invalid play run lifecycle status in API response: ${JSON.stringify(rawStatus)}.`
2939
2943
  );
2940
2944
  }
2941
- const runId = typeof raw.runId === "string" ? raw.runId : typeof raw.workflowId === "string" ? raw.workflowId : _nullishCoalesce(_optionalChain([packageRun, 'optionalAccess', _140 => _140.id]), () => ( ""));
2942
- const legacyOverview = _nullishCoalesce(_optionalChain([runPackage, 'optionalAccess', _141 => _141.overview]), () => ( raw.overview));
2943
- const runStatus = _nullishCoalesce(_optionalChain([runPackage, 'optionalAccess', _142 => _142.runStatus]), () => ( raw.runStatus));
2945
+ const runId = typeof raw.runId === "string" ? raw.runId : typeof raw.workflowId === "string" ? raw.workflowId : _nullishCoalesce(_optionalChain([packageRun, 'optionalAccess', _134 => _134.id]), () => ( ""));
2946
+ const legacyOverview = _nullishCoalesce(_optionalChain([runPackage, 'optionalAccess', _135 => _135.overview]), () => ( raw.overview));
2947
+ const runStatus = _nullishCoalesce(_optionalChain([runPackage, 'optionalAccess', _136 => _136.runStatus]), () => ( raw.runStatus));
2944
2948
  return {
2945
2949
  ...raw,
2946
2950
  runId,
@@ -3042,9 +3046,9 @@ function playRunResultFromStatus(status, startedAt, fallbackRunId) {
3042
3046
  runId: status.runId || fallbackRunId,
3043
3047
  result: _nullishCoalesce(status.package, () => ( status.result)),
3044
3048
  ...status.package ? { package: status.package } : {},
3045
- logs: _nullishCoalesce(_optionalChain([status, 'access', _143 => _143.progress, 'optionalAccess', _144 => _144.logs]), () => ( [])),
3049
+ logs: _nullishCoalesce(_optionalChain([status, 'access', _137 => _137.progress, 'optionalAccess', _138 => _138.logs]), () => ( [])),
3046
3050
  durationMs: Date.now() - startedAt,
3047
- error: _nullishCoalesce(_optionalChain([status, 'access', _145 => _145.progress, 'optionalAccess', _146 => _146.error]), () => ( (status.status !== "completed" ? status.status : void 0)))
3051
+ error: _nullishCoalesce(_optionalChain([status, 'access', _139 => _139.progress, 'optionalAccess', _140 => _140.error]), () => ( (status.status !== "completed" ? status.status : void 0)))
3048
3052
  };
3049
3053
  }
3050
3054
  var DeeplineClient = (_class = class _DeeplineClient {
@@ -3071,12 +3075,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
3071
3075
  * @throws {@link ConfigError} if no API key can be resolved from any source.
3072
3076
  */
3073
3077
  constructor(options) {
3074
- this.config = _chunkB5LUKLKHjs.resolveConfig.call(void 0, options);
3075
- this.http = new (0, _chunkB5LUKLKHjs.HttpClient)(this.config);
3078
+ this.config = _chunkMCPHK7AFjs.resolveConfig.call(void 0, options);
3079
+ this.http = new (0, _chunkMCPHK7AFjs.HttpClient)(this.config);
3076
3080
  this.toolCalls = new ToolCalls(
3077
3081
  this.http,
3078
3082
  this.config.timeout,
3079
- _optionalChain([options, 'optionalAccess', _147 => _147.timeout])
3083
+ _optionalChain([options, 'optionalAccess', _141 => _141.timeout])
3080
3084
  );
3081
3085
  this.runs = {
3082
3086
  getReceipts: (runId, options2) => this.getRunReceipts(runId, options2),
@@ -3135,7 +3139,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
3135
3139
  {},
3136
3140
  {
3137
3141
  "Idempotency-Key": requireTargetBillingIdempotencyKey(
3138
- _nullishCoalesce(_optionalChain([options2, 'optionalAccess', _148 => _148.idempotencyKey]), () => ( globalThis.crypto.randomUUID()))
3142
+ _nullishCoalesce(_optionalChain([options2, 'optionalAccess', _142 => _142.idempotencyKey]), () => ( globalThis.crypto.randomUUID()))
3139
3143
  )
3140
3144
  }
3141
3145
  ),
@@ -3154,7 +3158,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
3154
3158
  available: (toolIdOrOptions, options2) => this.getMonitorsAvailable(toolIdOrOptions, options2),
3155
3159
  check: (definition) => this.checkMonitor(definition),
3156
3160
  deploy: (definition, options2) => this.deployMonitor(definition, options2),
3157
- sync: (definition, options2) => _optionalChain([options2, 'optionalAccess', _149 => _149.dryRun]) ? this.deployMonitor(definition, { dryRun: true }) : this.syncScalarMonitor(definition, options2),
3161
+ sync: (definition, options2) => _optionalChain([options2, 'optionalAccess', _143 => _143.dryRun]) ? this.deployMonitor(definition, { dryRun: true }) : this.syncScalarMonitor(definition, options2),
3158
3162
  list: (options2) => this.listMonitors(options2),
3159
3163
  get: (key) => this.getMonitor(key),
3160
3164
  test: (key, payload, options2) => this.testMonitorWebhook(key, payload, options2),
@@ -3163,13 +3167,13 @@ var DeeplineClient = (_class = class _DeeplineClient {
3163
3167
  update: (key, patch) => this.updateMonitor(key, patch),
3164
3168
  delete: (key, options2) => this.deleteMonitor(key, options2),
3165
3169
  reactivate: (key, options2) => this.reactivateMonitor(key, options2),
3166
- start: (key, options2) => _optionalChain([options2, 'optionalAccess', _150 => _150.dryRun]) ? this.submitMonitorBatch({
3170
+ start: (key, options2) => _optionalChain([options2, 'optionalAccess', _144 => _144.dryRun]) ? this.submitMonitorBatch({
3167
3171
  kind: "reactivate",
3168
3172
  scope: { kind: "keys", monitorKeys: [key] },
3169
3173
  dryRun: true,
3170
3174
  idempotencyKey: _nullishCoalesce(options2.idempotencyKey, () => ( this.monitorJobIdempotencyKey(`start-${key}`)))
3171
3175
  }) : this.submitScalarMonitorLifecycle(key, "start", options2),
3172
- stop: (key, options2) => _optionalChain([options2, 'optionalAccess', _151 => _151.dryRun]) ? this.submitMonitorBatch({
3176
+ stop: (key, options2) => _optionalChain([options2, 'optionalAccess', _145 => _145.dryRun]) ? this.submitMonitorBatch({
3173
3177
  kind: "deactivate",
3174
3178
  scope: { kind: "keys", monitorKeys: [key] },
3175
3179
  dryRun: true,
@@ -3220,7 +3224,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
3220
3224
  type: _nullishCoalesce(field.type, () => ( void 0)),
3221
3225
  required: _nullishCoalesce(field.required, () => ( void 0))
3222
3226
  } : null
3223
- ).filter((field) => Boolean(_optionalChain([field, 'optionalAccess', _152 => _152.name]))) : [];
3227
+ ).filter((field) => Boolean(_optionalChain([field, 'optionalAccess', _146 => _146.name]))) : [];
3224
3228
  return fields.length > 0 ? { fields } : schema;
3225
3229
  }
3226
3230
  schemaMetadata(schema, key) {
@@ -3250,13 +3254,13 @@ var DeeplineClient = (_class = class _DeeplineClient {
3250
3254
  };
3251
3255
  }
3252
3256
  summarizePlayListItem(play, options) {
3253
- const aliases = _optionalChain([play, 'access', _153 => _153.aliases, 'optionalAccess', _154 => _154.length]) ? play.aliases : [play.name];
3257
+ const aliases = _optionalChain([play, 'access', _147 => _147.aliases, 'optionalAccess', _148 => _148.length]) ? play.aliases : [play.name];
3254
3258
  const csvInput = this.schemaMetadata(play.inputSchema, "csvInput");
3255
3259
  const rowOutputSchema = this.schemaMetadata(
3256
3260
  play.outputSchema,
3257
3261
  "rowOutputSchema"
3258
3262
  );
3259
- const description = _optionalChain([play, 'access', _155 => _155.description, 'optionalAccess', _156 => _156.trim, 'call', _157 => _157()]) || _optionalChain([play, 'access', _158 => _158.currentRevision, 'optionalAccess', _159 => _159.description, 'optionalAccess', _160 => _160.trim, 'call', _161 => _161()]) || _optionalChain([play, 'access', _162 => _162.liveRevision, 'optionalAccess', _163 => _163.description, 'optionalAccess', _164 => _164.trim, 'call', _165 => _165()]) || null;
3263
+ const description = _optionalChain([play, 'access', _149 => _149.description, 'optionalAccess', _150 => _150.trim, 'call', _151 => _151()]) || _optionalChain([play, 'access', _152 => _152.currentRevision, 'optionalAccess', _153 => _153.description, 'optionalAccess', _154 => _154.trim, 'call', _155 => _155()]) || _optionalChain([play, 'access', _156 => _156.liveRevision, 'optionalAccess', _157 => _157.description, 'optionalAccess', _158 => _158.trim, 'call', _159 => _159()]) || null;
3260
3264
  const runCommand = this.playRunCommand(play);
3261
3265
  const cloneEditStarter = this.playCloneEditStarter(play);
3262
3266
  return {
@@ -3276,9 +3280,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
3276
3280
  canEdit: play.canEdit,
3277
3281
  canClone: play.canClone,
3278
3282
  aliases,
3279
- inputSchema: _optionalChain([options, 'optionalAccess', _166 => _166.compact]) ? this.compactSchema(play.inputSchema) : _nullishCoalesce(play.inputSchema, () => ( null)),
3280
- outputSchema: _optionalChain([options, 'optionalAccess', _167 => _167.compact]) ? this.compactSchema(play.outputSchema) : _nullishCoalesce(play.outputSchema, () => ( null)),
3281
- staticPipeline: isRecord2(play.staticPipeline) ? play.staticPipeline : isRecord2(_optionalChain([play, 'access', _168 => _168.currentRevision, 'optionalAccess', _169 => _169.staticPipeline])) ? play.currentRevision.staticPipeline : isRecord2(_optionalChain([play, 'access', _170 => _170.liveRevision, 'optionalAccess', _171 => _171.staticPipeline])) ? play.liveRevision.staticPipeline : null,
3283
+ inputSchema: _optionalChain([options, 'optionalAccess', _160 => _160.compact]) ? this.compactSchema(play.inputSchema) : _nullishCoalesce(play.inputSchema, () => ( null)),
3284
+ outputSchema: _optionalChain([options, 'optionalAccess', _161 => _161.compact]) ? this.compactSchema(play.outputSchema) : _nullishCoalesce(play.outputSchema, () => ( null)),
3285
+ staticPipeline: isRecord2(play.staticPipeline) ? play.staticPipeline : isRecord2(_optionalChain([play, 'access', _162 => _162.currentRevision, 'optionalAccess', _163 => _163.staticPipeline])) ? play.currentRevision.staticPipeline : isRecord2(_optionalChain([play, 'access', _164 => _164.liveRevision, 'optionalAccess', _165 => _165.staticPipeline])) ? play.liveRevision.staticPipeline : null,
3282
3286
  ...csvInput ? {
3283
3287
  csvInput: { ...csvInput, headerMatching: CSV_HEADER_MATCHING_NOTE }
3284
3288
  } : {},
@@ -3290,7 +3294,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
3290
3294
  // Read the live version off the live revision. It was previously only
3291
3295
  // ever written by the publish/live routes, so every list and describe
3292
3296
  // payload reported liveVersion: null even for an actively serving play.
3293
- liveVersion: _nullishCoalesce(_optionalChain([play, 'access', _172 => _172.liveRevision, 'optionalAccess', _173 => _173.version]), () => ( null)),
3297
+ liveVersion: _nullishCoalesce(_optionalChain([play, 'access', _166 => _166.liveRevision, 'optionalAccess', _167 => _167.version]), () => ( null)),
3294
3298
  ...play.triggerStatus ? { triggerStatus: play.triggerStatus } : {},
3295
3299
  isDraftDirty: play.isDraftDirty
3296
3300
  };
@@ -3299,8 +3303,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
3299
3303
  const play = detail.play;
3300
3304
  return {
3301
3305
  ...this.summarizePlayListItem(play, options),
3302
- currentPublishedVersion: _nullishCoalesce(_nullishCoalesce(play.currentPublishedVersion, () => ( _optionalChain([play, 'access', _174 => _174.liveRevision, 'optionalAccess', _175 => _175.version]))), () => ( null)),
3303
- latestRunId: _nullishCoalesce(_nullishCoalesce(play.latestRunId, () => ( _optionalChain([detail, 'access', _176 => _176.latestRuns, 'access', _177 => _177[0], 'optionalAccess', _178 => _178.workflowId]))), () => ( null)),
3306
+ currentPublishedVersion: _nullishCoalesce(_nullishCoalesce(play.currentPublishedVersion, () => ( _optionalChain([play, 'access', _168 => _168.liveRevision, 'optionalAccess', _169 => _169.version]))), () => ( null)),
3307
+ latestRunId: _nullishCoalesce(_nullishCoalesce(play.latestRunId, () => ( _optionalChain([detail, 'access', _170 => _170.latestRuns, 'access', _171 => _171[0], 'optionalAccess', _172 => _172.workflowId]))), () => ( null)),
3304
3308
  ...play.triggerMetadata ? { triggerMetadata: play.triggerMetadata } : {},
3305
3309
  ...play.runtimeLimit ? { runtimeLimit: play.runtimeLimit } : {},
3306
3310
  ...play.activeScheduledPlays ? { activeScheduledPlays: play.activeScheduledPlays } : {}
@@ -3367,17 +3371,17 @@ var DeeplineClient = (_class = class _DeeplineClient {
3367
3371
  */
3368
3372
  async listTools(options) {
3369
3373
  const params = new URLSearchParams();
3370
- if (_optionalChain([options, 'optionalAccess', _179 => _179.categories, 'optionalAccess', _180 => _180.trim, 'call', _181 => _181()])) {
3374
+ if (_optionalChain([options, 'optionalAccess', _173 => _173.categories, 'optionalAccess', _174 => _174.trim, 'call', _175 => _175()])) {
3371
3375
  params.set("categories", options.categories.trim());
3372
3376
  }
3373
- if (_optionalChain([options, 'optionalAccess', _182 => _182.tags, 'optionalAccess', _183 => _183.trim, 'call', _184 => _184()])) {
3377
+ if (_optionalChain([options, 'optionalAccess', _176 => _176.tags, 'optionalAccess', _177 => _177.trim, 'call', _178 => _178()])) {
3374
3378
  params.set("tags", options.tags.trim());
3375
3379
  }
3376
- if (_optionalChain([options, 'optionalAccess', _185 => _185.grep, 'optionalAccess', _186 => _186.trim, 'call', _187 => _187()])) {
3380
+ if (_optionalChain([options, 'optionalAccess', _179 => _179.grep, 'optionalAccess', _180 => _180.trim, 'call', _181 => _181()])) {
3377
3381
  params.set("grep", options.grep.trim());
3378
3382
  params.set("grep_mode", _nullishCoalesce(options.grepMode, () => ( "all")));
3379
3383
  }
3380
- params.set("compact", _optionalChain([options, 'optionalAccess', _188 => _188.compact]) === true ? "true" : "false");
3384
+ params.set("compact", _optionalChain([options, 'optionalAccess', _182 => _182.compact]) === true ? "true" : "false");
3381
3385
  const suffix = params.toString() ? `?${params.toString()}` : "";
3382
3386
  const res = await this.http.get(
3383
3387
  `/api/v2/tools${suffix}`
@@ -3386,7 +3390,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
3386
3390
  }
3387
3391
  /** List discoverable providers without requiring a local plugin catalog. */
3388
3392
  async listProviders(options) {
3389
- const suffix = _optionalChain([options, 'optionalAccess', _189 => _189.changed]) ? "?changed=true" : "";
3393
+ const suffix = _optionalChain([options, 'optionalAccess', _183 => _183.changed]) ? "?changed=true" : "";
3390
3394
  const res = await this.http.get(
3391
3395
  `/api/v2/tools/providers${suffix}`
3392
3396
  );
@@ -3417,8 +3421,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
3417
3421
  */
3418
3422
  async search(options = {}) {
3419
3423
  const params = searchParams(options);
3420
- if (_optionalChain([options, 'access', _190 => _190.types, 'optionalAccess', _191 => _191.length])) params.set("types", options.types.join(","));
3421
- if (_optionalChain([options, 'access', _192 => _192.exclude, 'optionalAccess', _193 => _193.length])) {
3424
+ if (_optionalChain([options, 'access', _184 => _184.types, 'optionalAccess', _185 => _185.length])) params.set("types", options.types.join(","));
3425
+ if (_optionalChain([options, 'access', _186 => _186.exclude, 'optionalAccess', _187 => _187.length])) {
3422
3426
  params.set("exclude", options.exclude.join(","));
3423
3427
  }
3424
3428
  return this.http.get(`/api/v2/search?${params.toString()}`);
@@ -3440,7 +3444,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
3440
3444
  * ```
3441
3445
  */
3442
3446
  async getTool(toolId, options) {
3443
- if (_optionalChain([options, 'optionalAccess', _194 => _194.cliInvocationId]) !== void 0) {
3447
+ if (_optionalChain([options, 'optionalAccess', _188 => _188.cliInvocationId]) !== void 0) {
3444
3448
  validateCliInvocationId(options.cliInvocationId);
3445
3449
  }
3446
3450
  return this.http.request(
@@ -3453,7 +3457,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
3453
3457
  retryApiErrors: true,
3454
3458
  headers: {
3455
3459
  "x-deepline-tool-meta-only": "1",
3456
- ..._optionalChain([options, 'optionalAccess', _195 => _195.cliInvocationId]) !== void 0 ? { "x-deepline-cli-invocation-id": options.cliInvocationId } : {}
3460
+ ..._optionalChain([options, 'optionalAccess', _189 => _189.cliInvocationId]) !== void 0 ? { "x-deepline-cli-invocation-id": options.cliInvocationId } : {}
3457
3461
  }
3458
3462
  }
3459
3463
  );
@@ -3555,7 +3559,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
3555
3559
  return this.http.post(
3556
3560
  "/api/v2/ingestion/repair",
3557
3561
  {
3558
- ..._optionalChain([input, 'optionalAccess', _196 => _196.provider]) ? { provider: input.provider } : {}
3562
+ ..._optionalChain([input, 'optionalAccess', _190 => _190.provider]) ? { provider: input.provider } : {}
3559
3563
  }
3560
3564
  );
3561
3565
  }
@@ -3625,7 +3629,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
3625
3629
  method: "POST",
3626
3630
  body,
3627
3631
  headers: runtimeSelectionHeaders(resolved.runtime),
3628
- signal: _optionalChain([options, 'optionalAccess', _197 => _197.signal])
3632
+ signal: _optionalChain([options, 'optionalAccess', _191 => _191.signal])
3629
3633
  }
3630
3634
  )) {
3631
3635
  if (event.scope === "play") {
@@ -3785,7 +3789,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
3785
3789
  compilerManifest,
3786
3790
  ...input.input ? { input: input.input } : {},
3787
3791
  ...input.inputFile ? { inputFile: input.inputFile } : {},
3788
- ..._optionalChain([input, 'access', _198 => _198.packagedFiles, 'optionalAccess', _199 => _199.length]) ? { packagedFiles: input.packagedFiles } : {},
3792
+ ..._optionalChain([input, 'access', _192 => _192.packagedFiles, 'optionalAccess', _193 => _193.length]) ? { packagedFiles: input.packagedFiles } : {},
3789
3793
  ...input.force ? { force: true } : {},
3790
3794
  ...input.forceToolRefresh ? { forceToolRefresh: true } : {}
3791
3795
  });
@@ -3815,29 +3819,29 @@ var DeeplineClient = (_class = class _DeeplineClient {
3815
3819
  * ```
3816
3820
  */
3817
3821
  async submitPlay(code, csvPath, name, options) {
3818
- const runtimeInput = _optionalChain([options, 'optionalAccess', _200 => _200.input]) ? { ...options.input } : {};
3822
+ const runtimeInput = _optionalChain([options, 'optionalAccess', _194 => _194.input]) ? { ...options.input } : {};
3819
3823
  if (csvPath) {
3820
3824
  runtimeInput.file = csvPath;
3821
3825
  }
3822
- const sourceCode = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _201 => _201.sourceCode]), () => ( code));
3823
- const artifact = _optionalChain([options, 'optionalAccess', _202 => _202.artifact]);
3824
- if (!_optionalChain([name, 'optionalAccess', _203 => _203.trim, 'call', _204 => _204()])) {
3826
+ const sourceCode = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _195 => _195.sourceCode]), () => ( code));
3827
+ const artifact = _optionalChain([options, 'optionalAccess', _196 => _196.artifact]);
3828
+ if (!_optionalChain([name, 'optionalAccess', _197 => _197.trim, 'call', _198 => _198()])) {
3825
3829
  throw new Error("submitPlay requires a play name.");
3826
3830
  }
3827
3831
  if (!artifact) {
3828
3832
  throw new Error("submitPlay requires a bundled play artifact.");
3829
3833
  }
3830
- const compilerManifest = await _asyncNullishCoalesce(await _asyncOptionalChain([options, 'optionalAccess', async _205 => _205.compilerManifest]), async () => ( await this.compilePlayManifest({
3834
+ const compilerManifest = await _asyncNullishCoalesce(await _asyncOptionalChain([options, 'optionalAccess', async _199 => _199.compilerManifest]), async () => ( await this.compilePlayManifest({
3831
3835
  name,
3832
3836
  sourceCode,
3833
- sourceFiles: _optionalChain([options, 'optionalAccess', _206 => _206.sourceFiles]),
3837
+ sourceFiles: _optionalChain([options, 'optionalAccess', _200 => _200.sourceFiles]),
3834
3838
  artifact
3835
3839
  })));
3836
3840
  const registeredArtifact = await this.registerPlayArtifact({
3837
3841
  name,
3838
3842
  sourceCode,
3839
- sourceFiles: _optionalChain([options, 'optionalAccess', _207 => _207.sourceFiles]),
3840
- description: _optionalChain([options, 'optionalAccess', _208 => _208.description]),
3843
+ sourceFiles: _optionalChain([options, 'optionalAccess', _201 => _201.sourceFiles]),
3844
+ description: _optionalChain([options, 'optionalAccess', _202 => _202.description]),
3841
3845
  artifact,
3842
3846
  compilerManifest,
3843
3847
  publish: false
@@ -3851,17 +3855,17 @@ var DeeplineClient = (_class = class _DeeplineClient {
3851
3855
  name,
3852
3856
  artifactStorageKey: registeredArtifact.artifactStorageKey,
3853
3857
  sourceCode,
3854
- description: _optionalChain([options, 'optionalAccess', _209 => _209.description]),
3858
+ description: _optionalChain([options, 'optionalAccess', _203 => _203.description]),
3855
3859
  staticPipeline: _nullishCoalesce(registeredArtifact.staticPipeline, () => ( null)),
3856
3860
  artifactHash: typeof artifact.artifactHash === "string" ? artifact.artifactHash : void 0,
3857
3861
  graphHash: typeof artifact.graphHash === "string" ? artifact.graphHash : void 0,
3858
3862
  runtimeArtifact: artifact,
3859
3863
  compilerManifest,
3860
3864
  ...Object.keys(runtimeInput).length > 0 ? { input: runtimeInput } : {},
3861
- ..._optionalChain([options, 'optionalAccess', _210 => _210.inputFile]) ? { inputFile: options.inputFile } : {},
3862
- ..._optionalChain([options, 'optionalAccess', _211 => _211.packagedFiles, 'optionalAccess', _212 => _212.length]) ? { packagedFiles: options.packagedFiles } : {},
3863
- ..._optionalChain([options, 'optionalAccess', _213 => _213.force]) ? { force: true } : {},
3864
- ..._optionalChain([options, 'optionalAccess', _214 => _214.forceToolRefresh]) ? { forceToolRefresh: true } : {}
3865
+ ..._optionalChain([options, 'optionalAccess', _204 => _204.inputFile]) ? { inputFile: options.inputFile } : {},
3866
+ ..._optionalChain([options, 'optionalAccess', _205 => _205.packagedFiles, 'optionalAccess', _206 => _206.length]) ? { packagedFiles: options.packagedFiles } : {},
3867
+ ..._optionalChain([options, 'optionalAccess', _207 => _207.force]) ? { force: true } : {},
3868
+ ..._optionalChain([options, 'optionalAccess', _208 => _208.forceToolRefresh]) ? { forceToolRefresh: true } : {}
3865
3869
  });
3866
3870
  }
3867
3871
  /**
@@ -3931,10 +3935,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
3931
3935
  */
3932
3936
  async getPlayStatus(workflowId, options) {
3933
3937
  const params = new URLSearchParams();
3934
- if (_optionalChain([options, 'optionalAccess', _215 => _215.billing]) === false) {
3938
+ if (_optionalChain([options, 'optionalAccess', _209 => _209.billing]) === false) {
3935
3939
  params.set("billing", "false");
3936
3940
  }
3937
- if (_optionalChain([options, 'optionalAccess', _216 => _216.full]) === true) {
3941
+ if (_optionalChain([options, 'optionalAccess', _210 => _210.full]) === true) {
3938
3942
  params.set("full", "true");
3939
3943
  }
3940
3944
  const query = params.size > 0 ? `?${params.toString()}` : "";
@@ -3948,9 +3952,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
3948
3952
  for await (const event of watchRunEvents({
3949
3953
  http: this.http,
3950
3954
  runId: workflowId,
3951
- signal: _optionalChain([options, 'optionalAccess', _217 => _217.signal]),
3952
- onNotice: _optionalChain([options, 'optionalAccess', _218 => _218.onNotice]),
3953
- onRetry: _optionalChain([options, 'optionalAccess', _219 => _219.onRetry])
3955
+ signal: _optionalChain([options, 'optionalAccess', _211 => _211.signal]),
3956
+ onNotice: _optionalChain([options, 'optionalAccess', _212 => _212.onNotice]),
3957
+ onRetry: _optionalChain([options, 'optionalAccess', _213 => _213.onRetry])
3954
3958
  })) {
3955
3959
  yield event;
3956
3960
  }
@@ -3962,12 +3966,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
3962
3966
  * @deprecated Use `watchRunEvents` for ordinary run watching.
3963
3967
  */
3964
3968
  async *streamPlayRunEvents(workflowId, options) {
3965
- const headers = _optionalChain([options, 'optionalAccess', _220 => _220.lastEventId]) && options.lastEventId.trim() ? { "Last-Event-ID": options.lastEventId.trim() } : void 0;
3969
+ const headers = _optionalChain([options, 'optionalAccess', _214 => _214.lastEventId]) && options.lastEventId.trim() ? { "Last-Event-ID": options.lastEventId.trim() } : void 0;
3966
3970
  const params = new URLSearchParams();
3967
- params.set("mode", _nullishCoalesce(_optionalChain([options, 'optionalAccess', _221 => _221.mode]), () => ( "cli")));
3971
+ params.set("mode", _nullishCoalesce(_optionalChain([options, 'optionalAccess', _215 => _215.mode]), () => ( "cli")));
3968
3972
  for await (const event of this.http.streamSse(
3969
3973
  `/api/v2/runs/${encodeURIComponent(workflowId)}/tail?${params.toString()}`,
3970
- { signal: _optionalChain([options, 'optionalAccess', _222 => _222.signal]), headers }
3974
+ { signal: _optionalChain([options, 'optionalAccess', _216 => _216.signal]), headers }
3971
3975
  )) {
3972
3976
  if (event.scope === "play") {
3973
3977
  yield event;
@@ -3983,24 +3987,24 @@ var DeeplineClient = (_class = class _DeeplineClient {
3983
3987
  */
3984
3988
  async *observeRunEvents(runId, options) {
3985
3989
  yield* this.watchRunEvents(runId, {
3986
- signal: _optionalChain([options, 'optionalAccess', _223 => _223.signal]),
3987
- onNotice: _optionalChain([options, 'optionalAccess', _224 => _224.onNotice])
3990
+ signal: _optionalChain([options, 'optionalAccess', _217 => _217.signal]),
3991
+ onNotice: _optionalChain([options, 'optionalAccess', _218 => _218.onNotice])
3988
3992
  });
3989
3993
  }
3990
3994
  /** Poll snapshots to terminal status and return the durable package. */
3991
3995
  async watchRunToTerminal(runId, options) {
3992
3996
  let terminalObserved = false;
3993
3997
  for await (const event of this.watchRunEvents(runId, {
3994
- signal: _optionalChain([options, 'optionalAccess', _225 => _225.signal]),
3995
- onNotice: _optionalChain([options, 'optionalAccess', _226 => _226.onNotice]),
3996
- onRetry: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _227 => _227.onRetry]), () => ( _optionalChain([options, 'optionalAccess', _228 => _228.onReconnect])))
3998
+ signal: _optionalChain([options, 'optionalAccess', _219 => _219.signal]),
3999
+ onNotice: _optionalChain([options, 'optionalAccess', _220 => _220.onNotice]),
4000
+ onRetry: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _221 => _221.onRetry]), () => ( _optionalChain([options, 'optionalAccess', _222 => _222.onReconnect])))
3997
4001
  })) {
3998
- _optionalChain([options, 'optionalAccess', _229 => _229.onEvent, 'optionalCall', _230 => _230(event)]);
4002
+ _optionalChain([options, 'optionalAccess', _223 => _223.onEvent, 'optionalCall', _224 => _224(event)]);
3999
4003
  if (_chunkLA46MMTLjs.isTerminalPlayRunLifecycleStatus.call(void 0, playLiveRunStatus(event))) {
4000
4004
  terminalObserved = true;
4001
4005
  }
4002
4006
  }
4003
- if (_optionalChain([options, 'optionalAccess', _231 => _231.signal, 'optionalAccess', _232 => _232.aborted])) {
4007
+ if (_optionalChain([options, 'optionalAccess', _225 => _225.signal, 'optionalAccess', _226 => _226.aborted])) {
4004
4008
  throw new (0, _chunk7P5AA3SNjs.DeeplineError)("Run watch aborted.", void 0, "ABORTED");
4005
4009
  }
4006
4010
  const refreshed = await this.getRunStatus(runId);
@@ -4054,7 +4058,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4054
4058
  async stopPlay(workflowId, options) {
4055
4059
  return this.http.post(
4056
4060
  `/api/v2/runs/${encodeURIComponent(workflowId)}/stop`,
4057
- _optionalChain([options, 'optionalAccess', _233 => _233.reason]) ? { reason: options.reason } : {}
4061
+ _optionalChain([options, 'optionalAccess', _227 => _227.reason]) ? { reason: options.reason } : {}
4058
4062
  );
4059
4063
  }
4060
4064
  /**
@@ -4090,7 +4094,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4090
4094
  /** List the org's workflows. `GET /api/v2/workflows`. */
4091
4095
  async listWorkflows(options) {
4092
4096
  const params = new URLSearchParams();
4093
- if (typeof _optionalChain([options, 'optionalAccess', _234 => _234.limit]) === "number") {
4097
+ if (typeof _optionalChain([options, 'optionalAccess', _228 => _228.limit]) === "number") {
4094
4098
  params.set("limit", String(options.limit));
4095
4099
  }
4096
4100
  const query = params.size > 0 ? `?${params.toString()}` : "";
@@ -4143,7 +4147,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4143
4147
  /** List a workflow's runs. `GET /api/v2/workflows/:id/runs`. */
4144
4148
  async listWorkflowRuns(id, options) {
4145
4149
  const params = new URLSearchParams();
4146
- if (typeof _optionalChain([options, 'optionalAccess', _235 => _235.limit]) === "number") {
4150
+ if (typeof _optionalChain([options, 'optionalAccess', _229 => _229.limit]) === "number") {
4147
4151
  params.set("limit", String(options.limit));
4148
4152
  }
4149
4153
  const query = params.size > 0 ? `?${params.toString()}` : "";
@@ -4179,10 +4183,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
4179
4183
  */
4180
4184
  async getRunStatus(runId, options) {
4181
4185
  const params = new URLSearchParams();
4182
- if (_optionalChain([options, 'optionalAccess', _236 => _236.full]) === true) {
4186
+ if (_optionalChain([options, 'optionalAccess', _230 => _230.full]) === true) {
4183
4187
  params.set("full", "true");
4184
4188
  }
4185
- if (_optionalChain([options, 'optionalAccess', _237 => _237.configuration]) === true) {
4189
+ if (_optionalChain([options, 'optionalAccess', _231 => _231.configuration]) === true) {
4186
4190
  params.set("include", "configuration");
4187
4191
  }
4188
4192
  const query = params.size > 0 ? `?${params.toString()}` : "";
@@ -4190,7 +4194,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4190
4194
  `/api/v2/runs/${encodeURIComponent(runId)}${query}`,
4191
4195
  { headers: { "x-deepline-run-status": "1" } }
4192
4196
  );
4193
- if (_optionalChain([options, 'optionalAccess', _238 => _238.configuration]) === true && !Object.hasOwn(response, "contract")) {
4197
+ if (_optionalChain([options, 'optionalAccess', _232 => _232.configuration]) === true && !Object.hasOwn(response, "contract")) {
4194
4198
  throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
4195
4199
  "This server does not support recorded configuration reads.",
4196
4200
  void 0,
@@ -4198,7 +4202,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4198
4202
  );
4199
4203
  }
4200
4204
  const status = normalizePlayStatus(response);
4201
- if (_optionalChain([options, 'optionalAccess', _239 => _239.failedLogs]) !== true || status.status !== "failed") {
4205
+ if (_optionalChain([options, 'optionalAccess', _233 => _233.failedLogs]) !== true || status.status !== "failed") {
4202
4206
  return status;
4203
4207
  }
4204
4208
  const requestedFailedLogLimit = typeof options.failedLogLimit === "number" && Number.isFinite(options.failedLogLimit) ? Math.max(1, Math.floor(options.failedLogLimit)) : RUNS_FAILED_LOG_LIMIT;
@@ -4287,7 +4291,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4287
4291
  /** The same tenant-scoped run history searched by the dashboard and CLI. */
4288
4292
  async getRunsHistory(options = {}) {
4289
4293
  const params = new URLSearchParams();
4290
- const search = _optionalChain([options, 'access', _240 => _240.search, 'optionalAccess', _241 => _241.trim, 'call', _242 => _242()]);
4294
+ const search = _optionalChain([options, 'access', _234 => _234.search, 'optionalAccess', _235 => _235.trim, 'call', _236 => _236()]);
4291
4295
  if (search && search.length > 200) {
4292
4296
  throw new Error("Run search must be at most 200 characters.");
4293
4297
  }
@@ -4313,15 +4317,25 @@ var DeeplineClient = (_class = class _DeeplineClient {
4313
4317
  }
4314
4318
  /** Read one run page without discarding server pagination metadata. */
4315
4319
  async listRunsPage(options) {
4316
- const playName = _optionalChain([options, 'access', _243 => _243.play, 'optionalAccess', _244 => _244.trim, 'call', _245 => _245()]);
4320
+ const playName = _optionalChain([options, 'access', _237 => _237.play, 'optionalAccess', _238 => _238.trim, 'call', _239 => _239()]);
4317
4321
  const params = new URLSearchParams();
4318
4322
  if (playName) {
4319
4323
  params.set("play", playName);
4320
4324
  }
4321
- const status = _optionalChain([options, 'access', _246 => _246.status, 'optionalAccess', _247 => _247.trim, 'call', _248 => _248()]);
4325
+ const status = _optionalChain([options, 'access', _240 => _240.status, 'optionalAccess', _241 => _241.trim, 'call', _242 => _242()]);
4322
4326
  if (status) {
4323
4327
  params.set("status", status);
4324
4328
  }
4329
+ const node = _optionalChain([options, 'access', _243 => _243.node, 'optionalAccess', _244 => _244.trim, 'call', _245 => _245()]);
4330
+ if (node) {
4331
+ if (!playName)
4332
+ throw new Error("runs.list options.node requires options.play.");
4333
+ if (node.length > 300)
4334
+ throw new Error(
4335
+ "runs.list options.node must be at most 300 characters."
4336
+ );
4337
+ params.set("node", node);
4338
+ }
4325
4339
  if (typeof options.limit === "number" && Number.isFinite(options.limit)) {
4326
4340
  params.set("limit", String(Math.max(1, Math.floor(options.limit))));
4327
4341
  }
@@ -4386,8 +4400,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
4386
4400
  * different key intentionally starts another rerun.
4387
4401
  */
4388
4402
  async rerun(runId, options) {
4389
- const idempotencyKey = _optionalChain([options, 'optionalAccess', _249 => _249.idempotencyKey, 'optionalAccess', _250 => _250.trim, 'call', _251 => _251()]);
4390
- if (_optionalChain([options, 'optionalAccess', _252 => _252.idempotencyKey]) !== void 0 && !idempotencyKey) {
4403
+ const idempotencyKey = _optionalChain([options, 'optionalAccess', _246 => _246.idempotencyKey, 'optionalAccess', _247 => _247.trim, 'call', _248 => _248()]);
4404
+ if (_optionalChain([options, 'optionalAccess', _249 => _249.idempotencyKey]) !== void 0 && !idempotencyKey) {
4391
4405
  throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
4392
4406
  "runs.rerun idempotencyKey must not be empty.",
4393
4407
  void 0,
@@ -4396,7 +4410,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4396
4410
  }
4397
4411
  return this.http.post(
4398
4412
  `/api/v2/runs/${encodeURIComponent(runId)}/rerun`,
4399
- _optionalChain([options, 'optionalAccess', _253 => _253.inputOverrides]) ? { inputOverrides: options.inputOverrides } : {},
4413
+ _optionalChain([options, 'optionalAccess', _250 => _250.inputOverrides]) ? { inputOverrides: options.inputOverrides } : {},
4400
4414
  { "Idempotency-Key": idempotencyKey || globalThis.crypto.randomUUID() }
4401
4415
  );
4402
4416
  }
@@ -4410,21 +4424,21 @@ var DeeplineClient = (_class = class _DeeplineClient {
4410
4424
  * ```
4411
4425
  */
4412
4426
  async getRunLogs(runId, options) {
4413
- if (_optionalChain([options, 'optionalAccess', _254 => _254.all]) === true && options.failed === true) {
4427
+ if (_optionalChain([options, 'optionalAccess', _251 => _251.all]) === true && options.failed === true) {
4414
4428
  throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
4415
4429
  "runs.logs cannot combine all and failed views.",
4416
4430
  void 0,
4417
4431
  "INVALID_RUN_LOG_VIEW"
4418
4432
  );
4419
4433
  }
4420
- if (_optionalChain([options, 'optionalAccess', _255 => _255.cursor]) !== void 0 && options.failed === true) {
4434
+ if (_optionalChain([options, 'optionalAccess', _252 => _252.cursor]) !== void 0 && options.failed === true) {
4421
4435
  throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
4422
4436
  "runs.logs cannot combine failed with cursor.",
4423
4437
  void 0,
4424
4438
  "INVALID_RUN_LOG_VIEW"
4425
4439
  );
4426
4440
  }
4427
- if (_optionalChain([options, 'optionalAccess', _256 => _256.failed]) === true) {
4441
+ if (_optionalChain([options, 'optionalAccess', _253 => _253.failed]) === true) {
4428
4442
  const requestedLimit = typeof options.limit === "number" && Number.isFinite(options.limit) && options.limit > 0 ? Math.trunc(options.limit) : RUNS_FAILED_LOG_LIMIT;
4429
4443
  const failedLimit = Math.min(RUNS_FAILED_LOG_LIMIT, requestedLimit);
4430
4444
  const page = await this.http.get(
@@ -4449,18 +4463,18 @@ var DeeplineClient = (_class = class _DeeplineClient {
4449
4463
  ...page.logsTruncated ? { logsTruncated: true } : {}
4450
4464
  };
4451
4465
  }
4452
- const beforeSequence = _optionalChain([options, 'optionalAccess', _257 => _257.cursor]) !== void 0 ? parseRunLogsCursor(options.cursor) : null;
4453
- const limit = _optionalChain([options, 'optionalAccess', _258 => _258.all]) ? Number.MAX_SAFE_INTEGER : typeof _optionalChain([options, 'optionalAccess', _259 => _259.limit]) === "number" && Number.isFinite(options.limit) && options.limit > 0 ? Math.trunc(options.limit) : 200;
4466
+ const beforeSequence = _optionalChain([options, 'optionalAccess', _254 => _254.cursor]) !== void 0 ? parseRunLogsCursor(options.cursor) : null;
4467
+ const limit = _optionalChain([options, 'optionalAccess', _255 => _255.all]) ? Number.MAX_SAFE_INTEGER : typeof _optionalChain([options, 'optionalAccess', _256 => _256.limit]) === "number" && Number.isFinite(options.limit) && options.limit > 0 ? Math.trunc(options.limit) : 200;
4454
4468
  const fetchPage = (afterSeq2, pageLimit) => this.http.get(
4455
4469
  `/api/v2/runs/${encodeURIComponent(runId)}/logs?afterSeq=${afterSeq2}&limit=${pageLimit}`,
4456
4470
  { retryApiErrors: true }
4457
4471
  );
4458
4472
  const probe = await fetchPage(0, 1);
4459
4473
  const lastStoredSeq = probe.lastStoredSeq;
4460
- const oldestStoredSeq = _nullishCoalesce(_optionalChain([probe, 'access', _260 => _260.entries, 'access', _261 => _261[0], 'optionalAccess', _262 => _262.seq]), () => ( null));
4474
+ const oldestStoredSeq = _nullishCoalesce(_optionalChain([probe, 'access', _257 => _257.entries, 'access', _258 => _258[0], 'optionalAccess', _259 => _259.seq]), () => ( null));
4461
4475
  const upperSeq = beforeSequence === null ? Number.POSITIVE_INFINITY : Math.min(beforeSequence - 1, lastStoredSeq);
4462
4476
  const windowEndSeq = Math.min(upperSeq, lastStoredSeq);
4463
- let afterSeq = _optionalChain([options, 'optionalAccess', _263 => _263.all]) ? 0 : Math.max(0, windowEndSeq - limit);
4477
+ let afterSeq = _optionalChain([options, 'optionalAccess', _260 => _260.all]) ? 0 : Math.max(0, windowEndSeq - limit);
4464
4478
  const entries = [];
4465
4479
  while (entries.length < limit && afterSeq < upperSeq) {
4466
4480
  const page = await fetchPage(
@@ -4494,7 +4508,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4494
4508
  hasMore: olderLinesExist,
4495
4509
  nextCursor: olderLinesExist ? encodeRunLogsCursor(firstSequence) : null,
4496
4510
  entries: entries.map((entry) => entry.line),
4497
- view: _optionalChain([options, 'optionalAccess', _264 => _264.all]) ? "all" : "tail",
4511
+ view: _optionalChain([options, 'optionalAccess', _261 => _261.all]) ? "all" : "tail",
4498
4512
  ...probe.logsTruncated ? { logsTruncated: true } : {}
4499
4513
  };
4500
4514
  }
@@ -4655,7 +4669,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4655
4669
  limit: String(_nullishCoalesce(input.limit, () => ( 5e3))),
4656
4670
  offset: String(_nullishCoalesce(input.offset, () => ( 0)))
4657
4671
  });
4658
- if (_optionalChain([input, 'access', _265 => _265.runId, 'optionalAccess', _266 => _266.trim, 'call', _267 => _267()])) {
4672
+ if (_optionalChain([input, 'access', _262 => _262.runId, 'optionalAccess', _263 => _263.trim, 'call', _264 => _264()])) {
4659
4673
  params.set("runId", input.runId.trim());
4660
4674
  }
4661
4675
  if (input.rowMode === "all" || input.rowMode === "live") {
@@ -4665,9 +4679,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
4665
4679
  `/api/v2/plays/${encodeURIComponent(input.playName)}/sheet?${params.toString()}`,
4666
4680
  { signal: input.signal }
4667
4681
  );
4668
- const requestedRunId = _optionalChain([input, 'access', _268 => _268.runId, 'optionalAccess', _269 => _269.trim, 'call', _270 => _270()]) || "";
4682
+ const requestedRunId = _optionalChain([input, 'access', _265 => _265.runId, 'optionalAccess', _266 => _266.trim, 'call', _267 => _267()]) || "";
4669
4683
  if (requestedRunId) {
4670
- const confirmedRunId = _optionalChain([result, 'access', _271 => _271.scope, 'optionalAccess', _272 => _272.kind]) === "run" ? result.scope.runId.trim() : "";
4684
+ const confirmedRunId = _optionalChain([result, 'access', _268 => _268.scope, 'optionalAccess', _269 => _269.kind]) === "run" ? result.scope.runId.trim() : "";
4671
4685
  const foreignRowRunIds = [
4672
4686
  ...new Set(
4673
4687
  result.rows.map(
@@ -4675,7 +4689,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4675
4689
  ).filter((runId) => runId && runId !== requestedRunId)
4676
4690
  )
4677
4691
  ];
4678
- if (_optionalChain([result, 'access', _273 => _273.scope, 'optionalAccess', _274 => _274.kind]) !== "run" || confirmedRunId !== requestedRunId || foreignRowRunIds.length > 0) {
4692
+ if (_optionalChain([result, 'access', _270 => _270.scope, 'optionalAccess', _271 => _271.kind]) !== "run" || confirmedRunId !== requestedRunId || foreignRowRunIds.length > 0) {
4679
4693
  throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
4680
4694
  `Run-scoped dataset export was not confirmed for ${requestedRunId}; no rows were returned to the caller. Update Deepline, then retry the same export command. Do not rerun the play.`,
4681
4695
  void 0,
@@ -4704,7 +4718,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4704
4718
  async stopRun(runId, options) {
4705
4719
  return this.http.post(
4706
4720
  `/api/v2/runs/${encodeURIComponent(runId)}/stop`,
4707
- _optionalChain([options, 'optionalAccess', _275 => _275.reason]) ? { reason: options.reason } : {}
4721
+ _optionalChain([options, 'optionalAccess', _272 => _272.reason]) ? { reason: options.reason } : {}
4708
4722
  );
4709
4723
  }
4710
4724
  /**
@@ -4722,11 +4736,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
4722
4736
  * need to clear the workspace run-slot state without knowing each run id.
4723
4737
  */
4724
4738
  async stopAllRuns(options) {
4725
- const dryRun = _optionalChain([options, 'optionalAccess', _276 => _276.dryRun]) === true;
4739
+ const dryRun = _optionalChain([options, 'optionalAccess', _273 => _273.dryRun]) === true;
4726
4740
  const result = await this.http.post(
4727
4741
  "/api/v2/runs/stop-all",
4728
4742
  {
4729
- ..._optionalChain([options, 'optionalAccess', _277 => _277.reason]) ? { reason: options.reason } : {},
4743
+ ..._optionalChain([options, 'optionalAccess', _274 => _274.reason]) ? { reason: options.reason } : {},
4730
4744
  ...dryRun ? { dryRun: true } : {}
4731
4745
  }
4732
4746
  );
@@ -4747,7 +4761,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4747
4761
  * `origin: "owned"` for org-owned plays.
4748
4762
  */
4749
4763
  async listPlays(options) {
4750
- if (!_optionalChain([options, 'optionalAccess', _278 => _278.grep, 'optionalAccess', _279 => _279.trim, 'call', _280 => _280()])) {
4764
+ if (!_optionalChain([options, 'optionalAccess', _275 => _275.grep, 'optionalAccess', _276 => _276.trim, 'call', _277 => _277()])) {
4751
4765
  return (await this.requestPlaysPage(options, false)).plays;
4752
4766
  }
4753
4767
  const plays = [];
@@ -4769,45 +4783,45 @@ var DeeplineClient = (_class = class _DeeplineClient {
4769
4783
  }
4770
4784
  async requestPlaysPage(options, paginateInventory = true) {
4771
4785
  const params = new URLSearchParams();
4772
- if (paginateInventory && !_optionalChain([options, 'optionalAccess', _281 => _281.grep, 'optionalAccess', _282 => _282.trim, 'call', _283 => _283()]))
4786
+ if (paginateInventory && !_optionalChain([options, 'optionalAccess', _278 => _278.grep, 'optionalAccess', _279 => _279.trim, 'call', _280 => _280()]))
4773
4787
  params.set("inventory_paginated", "1");
4774
- if (_optionalChain([options, 'optionalAccess', _284 => _284.origin])) params.set("origin", options.origin);
4775
- if (_optionalChain([options, 'optionalAccess', _285 => _285.categories])) {
4788
+ if (_optionalChain([options, 'optionalAccess', _281 => _281.origin])) params.set("origin", options.origin);
4789
+ if (_optionalChain([options, 'optionalAccess', _282 => _282.categories])) {
4776
4790
  params.set(
4777
4791
  "categories",
4778
4792
  Array.isArray(options.categories) ? options.categories.join(",") : options.categories
4779
4793
  );
4780
4794
  }
4781
- if (_optionalChain([options, 'optionalAccess', _286 => _286.categories]) || _optionalChain([options, 'optionalAccess', _287 => _287.includeToolCategories])) {
4795
+ if (_optionalChain([options, 'optionalAccess', _283 => _283.categories]) || _optionalChain([options, 'optionalAccess', _284 => _284.includeToolCategories])) {
4782
4796
  params.set("include_tool_categories", "1");
4783
4797
  }
4784
- if (_optionalChain([options, 'optionalAccess', _288 => _288.tags])) {
4798
+ if (_optionalChain([options, 'optionalAccess', _285 => _285.tags])) {
4785
4799
  params.set(
4786
4800
  "tags",
4787
4801
  Array.isArray(options.tags) ? options.tags.join(",") : options.tags
4788
4802
  );
4789
4803
  }
4790
- if (_optionalChain([options, 'optionalAccess', _289 => _289.includeArchived])) params.set("include_archived", "1");
4791
- if (_optionalChain([options, 'optionalAccess', _290 => _290.includeCostEstimates])) {
4804
+ if (_optionalChain([options, 'optionalAccess', _286 => _286.includeArchived])) params.set("include_archived", "1");
4805
+ if (_optionalChain([options, 'optionalAccess', _287 => _287.includeCostEstimates])) {
4792
4806
  params.set("include_cost_estimates", "1");
4793
4807
  }
4794
- if (_optionalChain([options, 'optionalAccess', _291 => _291.grep, 'optionalAccess', _292 => _292.trim, 'call', _293 => _293()])) {
4808
+ if (_optionalChain([options, 'optionalAccess', _288 => _288.grep, 'optionalAccess', _289 => _289.trim, 'call', _290 => _290()])) {
4795
4809
  params.set("grep", options.grep.trim());
4796
4810
  params.set("limit", "60");
4797
4811
  }
4798
- if (_optionalChain([options, 'optionalAccess', _294 => _294.limit]) !== void 0) {
4812
+ if (_optionalChain([options, 'optionalAccess', _291 => _291.limit]) !== void 0) {
4799
4813
  if (!Number.isSafeInteger(options.limit) || options.limit < 1) {
4800
4814
  throw new Error("Play page limit must be a positive integer");
4801
4815
  }
4802
4816
  params.set("limit", String(options.limit));
4803
4817
  }
4804
- if (_optionalChain([options, 'optionalAccess', _295 => _295.cursor])) params.set("cursor", options.cursor);
4818
+ if (_optionalChain([options, 'optionalAccess', _292 => _292.cursor])) params.set("cursor", options.cursor);
4805
4819
  const suffix = params.size ? `?${params.toString()}` : "";
4806
4820
  const response = await this.http.get(`/api/v2/plays${suffix}`);
4807
4821
  return {
4808
4822
  plays: _nullishCoalesce(response.plays, () => ( [])),
4809
- cursor: _nullishCoalesce(_nullishCoalesce(_optionalChain([response, 'access', _296 => _296.pagination, 'optionalAccess', _297 => _297.cursor]), () => ( response.cursor)), () => ( null)),
4810
- hasMore: Boolean(_nullishCoalesce(_optionalChain([response, 'access', _298 => _298.pagination, 'optionalAccess', _299 => _299.hasMore]), () => ( response.hasMore)))
4823
+ cursor: _nullishCoalesce(_nullishCoalesce(_optionalChain([response, 'access', _293 => _293.pagination, 'optionalAccess', _294 => _294.cursor]), () => ( response.cursor)), () => ( null)),
4824
+ hasMore: Boolean(_nullishCoalesce(_optionalChain([response, 'access', _295 => _295.pagination, 'optionalAccess', _296 => _296.hasMore]), () => ( response.hasMore)))
4811
4825
  };
4812
4826
  }
4813
4827
  /** Read definition-level settings, independently of code revisions. */
@@ -4857,8 +4871,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
4857
4871
  return this.http.post("/api/v2/integrations/connect", {
4858
4872
  provider: "slack",
4859
4873
  scopes: [...PRODUCT_NOTIFICATION_SLACK_OAUTH_SCOPES],
4860
- ..._optionalChain([options, 'optionalAccess', _300 => _300.successUrl]) ? { success_url: options.successUrl } : {},
4861
- ..._optionalChain([options, 'optionalAccess', _301 => _301.failureUrl]) ? { failure_url: options.failureUrl } : {}
4874
+ ..._optionalChain([options, 'optionalAccess', _297 => _297.successUrl]) ? { success_url: options.successUrl } : {},
4875
+ ..._optionalChain([options, 'optionalAccess', _298 => _298.failureUrl]) ? { failure_url: options.failureUrl } : {}
4862
4876
  });
4863
4877
  }
4864
4878
  /** List Slack channels visible to the connected Deepline Slack app. */
@@ -4933,7 +4947,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4933
4947
  }
4934
4948
  const targets = input.targets.map(parseNotificationGroupTarget);
4935
4949
  const legacyEvents = _nullishCoalesce(input.legacyEvents, () => ( []));
4936
- const legacyTarget = targets.length === 1 && _optionalChain([targets, 'access', _302 => _302[0], 'optionalAccess', _303 => _303.kind]) === "slack" && legacyEvents.length > 0 ? targets[0] : null;
4950
+ const legacyTarget = targets.length === 1 && _optionalChain([targets, 'access', _299 => _299[0], 'optionalAccess', _300 => _300.kind]) === "slack" && legacyEvents.length > 0 ? targets[0] : null;
4937
4951
  if (legacyEvents.length > 0 && !legacyTarget) {
4938
4952
  throw new Error(
4939
4953
  "--for is supported only by the legacy one-Slack-target form. Create the group first, then add rules in notification configuration."
@@ -4969,7 +4983,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4969
4983
  const existingGroup = current.configuration.groups.find(
4970
4984
  (candidate) => candidate.name.toLowerCase() === name.toLowerCase()
4971
4985
  );
4972
- const groupKey = _nullishCoalesce(_optionalChain([existingGroup, 'optionalAccess', _304 => _304.groupKey]), () => ( notificationObjectKey("group")));
4986
+ const groupKey = _nullishCoalesce(_optionalChain([existingGroup, 'optionalAccess', _301 => _301.groupKey]), () => ( notificationObjectKey("group")));
4973
4987
  const group = _nullishCoalesce(existingGroup, () => ( {
4974
4988
  groupKey,
4975
4989
  name,
@@ -5187,13 +5201,13 @@ var DeeplineClient = (_class = class _DeeplineClient {
5187
5201
  */
5188
5202
  async getPlay(name, options) {
5189
5203
  const encodedName = encodeURIComponent(name);
5190
- const query = _optionalChain([options, 'optionalAccess', _305 => _305.source]) ? `?include=source&revision=${encodeURIComponent(options.source)}` : _optionalChain([options, 'optionalAccess', _306 => _306.guidance]) ? "?include=guidance" : "";
5204
+ const query = _optionalChain([options, 'optionalAccess', _302 => _302.source]) ? `?include=source&revision=${encodeURIComponent(options.source)}` : _optionalChain([options, 'optionalAccess', _303 => _303.guidance]) ? "?include=guidance" : "";
5191
5205
  return this.http.get(`/api/v2/plays/${encodedName}${query}`);
5192
5206
  }
5193
5207
  /** Read one trigger inventory page without loading run histories. */
5194
5208
  async listPlayTriggerInventory(options) {
5195
5209
  const params = new URLSearchParams({ view: "inventory" });
5196
- if (_optionalChain([options, 'optionalAccess', _307 => _307.cursor])) params.set("cursor", options.cursor);
5210
+ if (_optionalChain([options, 'optionalAccess', _304 => _304.cursor])) params.set("cursor", options.cursor);
5197
5211
  return this.http.get(`/api/v2/plays/triggers?${params}`);
5198
5212
  }
5199
5213
  /** Read one trigger's recent runs, with an explicit partial-history flag. */
@@ -5202,7 +5216,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5202
5216
  view: "history",
5203
5217
  binding_id: bindingId
5204
5218
  });
5205
- if (_optionalChain([options, 'optionalAccess', _308 => _308.limit]) !== void 0)
5219
+ if (_optionalChain([options, 'optionalAccess', _305 => _305.limit]) !== void 0)
5206
5220
  params.set("history_limit", String(options.limit));
5207
5221
  return this.http.get(`/api/v2/plays/triggers?${params}`);
5208
5222
  }
@@ -5238,7 +5252,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5238
5252
  */
5239
5253
  async listPlayVersions(name, options) {
5240
5254
  const encodedName = encodeURIComponent(name);
5241
- const suffix = _optionalChain([options, 'optionalAccess', _309 => _309.full]) ? "?full=true" : "";
5255
+ const suffix = _optionalChain([options, 'optionalAccess', _306 => _306.full]) ? "?full=true" : "";
5242
5256
  const response = await this.http.get(
5243
5257
  `/api/v2/plays/${encodedName}/versions${suffix}`
5244
5258
  );
@@ -5391,14 +5405,14 @@ var DeeplineClient = (_class = class _DeeplineClient {
5391
5405
  */
5392
5406
  async runPlay(code, csvPath, name, options) {
5393
5407
  const { workflowId } = await this.submitPlay(code, csvPath, name, {
5394
- input: _optionalChain([options, 'optionalAccess', _310 => _310.input]),
5395
- sourceCode: _optionalChain([options, 'optionalAccess', _311 => _311.sourceCode]),
5396
- artifact: _optionalChain([options, 'optionalAccess', _312 => _312.artifact]),
5397
- compilerManifest: _optionalChain([options, 'optionalAccess', _313 => _313.compilerManifest]),
5398
- inputFile: _optionalChain([options, 'optionalAccess', _314 => _314.inputFile]),
5399
- packagedFiles: _optionalChain([options, 'optionalAccess', _315 => _315.packagedFiles]),
5400
- force: _optionalChain([options, 'optionalAccess', _316 => _316.force]),
5401
- forceToolRefresh: _optionalChain([options, 'optionalAccess', _317 => _317.forceToolRefresh])
5408
+ input: _optionalChain([options, 'optionalAccess', _307 => _307.input]),
5409
+ sourceCode: _optionalChain([options, 'optionalAccess', _308 => _308.sourceCode]),
5410
+ artifact: _optionalChain([options, 'optionalAccess', _309 => _309.artifact]),
5411
+ compilerManifest: _optionalChain([options, 'optionalAccess', _310 => _310.compilerManifest]),
5412
+ inputFile: _optionalChain([options, 'optionalAccess', _311 => _311.inputFile]),
5413
+ packagedFiles: _optionalChain([options, 'optionalAccess', _312 => _312.packagedFiles]),
5414
+ force: _optionalChain([options, 'optionalAccess', _313 => _313.force]),
5415
+ forceToolRefresh: _optionalChain([options, 'optionalAccess', _314 => _314.forceToolRefresh])
5402
5416
  });
5403
5417
  const start = Date.now();
5404
5418
  const state = {
@@ -5409,7 +5423,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5409
5423
  latest: null
5410
5424
  };
5411
5425
  let terminalObserved = null;
5412
- if (_optionalChain([options, 'optionalAccess', _318 => _318.signal, 'optionalAccess', _319 => _319.aborted])) {
5426
+ if (_optionalChain([options, 'optionalAccess', _315 => _315.signal, 'optionalAccess', _316 => _316.aborted])) {
5413
5427
  await this.cancelPlay(workflowId);
5414
5428
  return {
5415
5429
  success: false,
@@ -5420,9 +5434,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
5420
5434
  };
5421
5435
  }
5422
5436
  for await (const event of this.watchRunEvents(workflowId, {
5423
- signal: _optionalChain([options, 'optionalAccess', _320 => _320.signal])
5437
+ signal: _optionalChain([options, 'optionalAccess', _317 => _317.signal])
5424
5438
  })) {
5425
- if (_optionalChain([options, 'optionalAccess', _321 => _321.signal, 'optionalAccess', _322 => _322.aborted])) {
5439
+ if (_optionalChain([options, 'optionalAccess', _318 => _318.signal, 'optionalAccess', _319 => _319.aborted])) {
5426
5440
  await this.cancelPlay(workflowId);
5427
5441
  return {
5428
5442
  success: false,
@@ -5432,19 +5446,19 @@ var DeeplineClient = (_class = class _DeeplineClient {
5432
5446
  error: "Cancelled by user"
5433
5447
  };
5434
5448
  }
5435
- const previousStatus = _optionalChain([state, 'access', _323 => _323.latest, 'optionalAccess', _324 => _324.status]);
5449
+ const previousStatus = _optionalChain([state, 'access', _320 => _320.latest, 'optionalAccess', _321 => _321.status]);
5436
5450
  const status = updatePlayLiveStatusState(state, event);
5437
5451
  if (!status) {
5438
5452
  continue;
5439
5453
  }
5440
5454
  if (event.type !== "play.run.status" || status.status !== previousStatus) {
5441
- _optionalChain([options, 'optionalAccess', _325 => _325.onProgress, 'optionalCall', _326 => _326(status)]);
5455
+ _optionalChain([options, 'optionalAccess', _322 => _322.onProgress, 'optionalCall', _323 => _323(status)]);
5442
5456
  }
5443
5457
  if (_chunkLA46MMTLjs.isTerminalPlayRunLifecycleStatus.call(void 0, status.status)) {
5444
5458
  terminalObserved = status;
5445
5459
  }
5446
5460
  }
5447
- if (_optionalChain([options, 'optionalAccess', _327 => _327.signal, 'optionalAccess', _328 => _328.aborted])) {
5461
+ if (_optionalChain([options, 'optionalAccess', _324 => _324.signal, 'optionalAccess', _325 => _325.aborted])) {
5448
5462
  await this.cancelPlay(workflowId);
5449
5463
  return {
5450
5464
  success: false,
@@ -5497,7 +5511,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5497
5511
  const response = await this.http.get(
5498
5512
  `/api/v2/usage/events?request_id=${encodeURIComponent(normalizedRequestId)}`
5499
5513
  );
5500
- const event = _optionalChain([response, 'access', _329 => _329.entries, 'optionalAccess', _330 => _330[0]]);
5514
+ const event = _optionalChain([response, 'access', _326 => _326.entries, 'optionalAccess', _327 => _327[0]]);
5501
5515
  if (!event) {
5502
5516
  throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
5503
5517
  "No usage event was found for this request_id.",
@@ -5623,7 +5637,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5623
5637
  async cancelBillingSubscription(options) {
5624
5638
  return this.http.post(
5625
5639
  "/api/v2/billing/subscription/cancel",
5626
- { action: _optionalChain([options, 'optionalAccess', _331 => _331.undo]) ? "undo_cancel" : "cancel" }
5640
+ { action: _optionalChain([options, 'optionalAccess', _328 => _328.undo]) ? "undo_cancel" : "cancel" }
5627
5641
  );
5628
5642
  }
5629
5643
  /**
@@ -5635,7 +5649,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5635
5649
  */
5636
5650
  async listBillingInvoices(options) {
5637
5651
  const params = new URLSearchParams();
5638
- if (_optionalChain([options, 'optionalAccess', _332 => _332.limit]) !== void 0) {
5652
+ if (_optionalChain([options, 'optionalAccess', _329 => _329.limit]) !== void 0) {
5639
5653
  params.set("limit", String(options.limit));
5640
5654
  }
5641
5655
  const suffix = Array.from(params).length > 0 ? `?${params.toString()}` : "";
@@ -5745,7 +5759,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5745
5759
  /** Create a Stripe-hosted portal session for payment recovery and invoices. */
5746
5760
  async createTargetBillingPortalSession(options) {
5747
5761
  const response = await this.http.post(
5748
- _optionalChain([options, 'optionalAccess', _333 => _333.flow]) === "customer_update" ? "/api/v2/billing/portal-sessions?flow=customer_update" : "/api/v2/billing/portal-sessions",
5762
+ _optionalChain([options, 'optionalAccess', _330 => _330.flow]) === "customer_update" ? "/api/v2/billing/portal-sessions?flow=customer_update" : "/api/v2/billing/portal-sessions",
5749
5763
  {}
5750
5764
  );
5751
5765
  return response.data;
@@ -5795,8 +5809,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
5795
5809
  return this.http.request("/api/v2/monitors/audit", {
5796
5810
  method: "POST",
5797
5811
  body: {
5798
- ..._optionalChain([options, 'optionalAccess', _334 => _334.fleetId]) ? { fleet_id: options.fleetId } : {},
5799
- ..._optionalChain([options, 'optionalAccess', _335 => _335.cursor]) ? { cursor: options.cursor } : {}
5812
+ ..._optionalChain([options, 'optionalAccess', _331 => _331.fleetId]) ? { fleet_id: options.fleetId } : {},
5813
+ ..._optionalChain([options, 'optionalAccess', _332 => _332.cursor]) ? { cursor: options.cursor } : {}
5800
5814
  },
5801
5815
  maxRetries: 0
5802
5816
  });
@@ -5806,8 +5820,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
5806
5820
  return this.http.request("/api/v2/monitors/repair", {
5807
5821
  method: "POST",
5808
5822
  body: {
5809
- ..._optionalChain([options, 'optionalAccess', _336 => _336.fleetId]) ? { fleet_id: options.fleetId } : {},
5810
- ..._optionalChain([options, 'optionalAccess', _337 => _337.dryRun]) === void 0 ? {} : { dry_run: options.dryRun }
5823
+ ..._optionalChain([options, 'optionalAccess', _333 => _333.fleetId]) ? { fleet_id: options.fleetId } : {},
5824
+ ..._optionalChain([options, 'optionalAccess', _334 => _334.dryRun]) === void 0 ? {} : { dry_run: options.dryRun }
5811
5825
  },
5812
5826
  maxRetries: 0
5813
5827
  });
@@ -5815,7 +5829,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5815
5829
  /** Delivery and convergence health. Prefer `client.monitors.health(...)`. */
5816
5830
  async readMonitorsHealth(options) {
5817
5831
  const params = new URLSearchParams();
5818
- if (_optionalChain([options, 'optionalAccess', _338 => _338.fleetId])) params.set("fleet_id", options.fleetId);
5832
+ if (_optionalChain([options, 'optionalAccess', _335 => _335.fleetId])) params.set("fleet_id", options.fleetId);
5819
5833
  const query = params.toString();
5820
5834
  const suffix = query ? `?${query}` : "";
5821
5835
  return this.http.request(
@@ -5888,7 +5902,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5888
5902
  );
5889
5903
  }
5890
5904
  const params = new URLSearchParams();
5891
- if (_optionalChain([options, 'optionalAccess', _339 => _339.cursor])) params.set("cursor", options.cursor);
5905
+ if (_optionalChain([options, 'optionalAccess', _336 => _336.cursor])) params.set("cursor", options.cursor);
5892
5906
  const suffix = params.size > 0 ? `?${params}` : "";
5893
5907
  return this.http.request(
5894
5908
  `/api/v2/monitors/batch/${encodeURIComponent(runId)}${suffix}`,
@@ -5932,7 +5946,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5932
5946
  * `client.monitors.deploy(...)`.
5933
5947
  */
5934
5948
  async deployMonitor(definition, options) {
5935
- if (_optionalChain([options, 'optionalAccess', _340 => _340.dryRun])) {
5949
+ if (_optionalChain([options, 'optionalAccess', _337 => _337.dryRun])) {
5936
5950
  return this.http.request("/api/v2/monitors/check", {
5937
5951
  method: "POST",
5938
5952
  body: definition
@@ -5968,12 +5982,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
5968
5982
  /** List deployed monitors. Prefer `client.monitors.list(...)`. */
5969
5983
  async listMonitors(options) {
5970
5984
  const params = new URLSearchParams();
5971
- if (_optionalChain([options, 'optionalAccess', _341 => _341.state])) params.set("state", options.state);
5972
- else if (_optionalChain([options, 'optionalAccess', _342 => _342.status])) params.set("status", options.status);
5973
- if (_optionalChain([options, 'optionalAccess', _343 => _343.limit]) !== void 0)
5985
+ if (_optionalChain([options, 'optionalAccess', _338 => _338.state])) params.set("state", options.state);
5986
+ else if (_optionalChain([options, 'optionalAccess', _339 => _339.status])) params.set("status", options.status);
5987
+ if (_optionalChain([options, 'optionalAccess', _340 => _340.limit]) !== void 0)
5974
5988
  params.set("limit", String(options.limit));
5975
- if (_optionalChain([options, 'optionalAccess', _344 => _344.cursor])) params.set("cursor", options.cursor);
5976
- if (_optionalChain([options, 'optionalAccess', _345 => _345.includeConsumers])) params.set("include_consumers", "true");
5989
+ if (_optionalChain([options, 'optionalAccess', _341 => _341.cursor])) params.set("cursor", options.cursor);
5990
+ if (_optionalChain([options, 'optionalAccess', _342 => _342.includeConsumers])) params.set("include_consumers", "true");
5977
5991
  const query = params.toString();
5978
5992
  const suffix = query ? `?${query}` : "";
5979
5993
  return this.http.request(
@@ -5989,7 +6003,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5989
6003
  );
5990
6004
  }
5991
6005
  async testMonitorWebhook(key, payload, options) {
5992
- if (_optionalChain([options, 'optionalAccess', _346 => _346.dispatch]) === true || _optionalChain([options, 'optionalAccess', _347 => _347.validationOnly]) === false) {
6006
+ if (_optionalChain([options, 'optionalAccess', _343 => _343.dispatch]) === true || _optionalChain([options, 'optionalAccess', _344 => _344.validationOnly]) === false) {
5993
6007
  throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
5994
6008
  "Monitor tests are validation-only and cannot dispatch events.",
5995
6009
  void 0,
@@ -6044,7 +6058,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6044
6058
  }
6045
6059
  /** Delete a deployed monitor and its upstream provider resource. `dryRun` returns the delete plan. Prefer `client.monitors.delete(...)`. */
6046
6060
  async deleteMonitor(key, options) {
6047
- if (_optionalChain([options, 'optionalAccess', _348 => _348.localOnly]) === true) {
6061
+ if (_optionalChain([options, 'optionalAccess', _345 => _345.localOnly]) === true) {
6048
6062
  throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
6049
6063
  "localOnly monitor deletion is no longer supported. Monitor deletion always deprovisions the upstream provider resource.",
6050
6064
  void 0,
@@ -6052,11 +6066,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
6052
6066
  );
6053
6067
  }
6054
6068
  const params = new URLSearchParams();
6055
- if (_optionalChain([options, 'optionalAccess', _349 => _349.dryRun])) params.set("dry_run", "true");
6069
+ if (_optionalChain([options, 'optionalAccess', _346 => _346.dryRun])) params.set("dry_run", "true");
6056
6070
  const query = params.toString();
6057
6071
  return this.http.request(
6058
6072
  `/api/v2/monitors/deployed/${encodeURIComponent(key)}${query ? `?${query}` : ""}`,
6059
- _optionalChain([options, 'optionalAccess', _350 => _350.dryRun]) ? { method: "DELETE" } : {
6073
+ _optionalChain([options, 'optionalAccess', _347 => _347.dryRun]) ? { method: "DELETE" } : {
6060
6074
  method: "DELETE",
6061
6075
  // Deletion is a provider lifecycle operation. A timeout is an
6062
6076
  // unknown outcome, not authority to begin another delete attempt.
@@ -6069,10 +6083,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
6069
6083
  * Prefer `client.monitors.reactivate(...)`.
6070
6084
  */
6071
6085
  async reactivateMonitor(key, options) {
6072
- const query = _optionalChain([options, 'optionalAccess', _351 => _351.dryRun]) ? "?dry_run=true" : "";
6086
+ const query = _optionalChain([options, 'optionalAccess', _348 => _348.dryRun]) ? "?dry_run=true" : "";
6073
6087
  return this.http.request(
6074
6088
  `/api/v2/monitors/deployed/${encodeURIComponent(key)}/reactivate${query}`,
6075
- _optionalChain([options, 'optionalAccess', _352 => _352.dryRun]) ? { method: "POST", body: {} } : {
6089
+ _optionalChain([options, 'optionalAccess', _349 => _349.dryRun]) ? { method: "POST", body: {} } : {
6076
6090
  method: "POST",
6077
6091
  body: {},
6078
6092
  // Reactivation can create an upstream resource, so it must not use
@@ -6086,7 +6100,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6086
6100
  // ——————————————————————————————————————————————————————————
6087
6101
  static __initStatic() {this.MONITOR_JOB_IDEMPOTENCY_KEY_MAX_LENGTH = 96}
6088
6102
  monitorJobIdempotencyKey(operation) {
6089
- const uuid = _nullishCoalesce(_optionalChain([globalThis, 'access', _353 => _353.crypto, 'optionalAccess', _354 => _354.randomUUID, 'optionalCall', _355 => _355()]), () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`));
6103
+ const uuid = _nullishCoalesce(_optionalChain([globalThis, 'access', _350 => _350.crypto, 'optionalAccess', _351 => _351.randomUUID, 'optionalCall', _352 => _352()]), () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`));
6090
6104
  const prefix = "monitor-job-";
6091
6105
  const safeOperation = operation.replace(/[^A-Za-z0-9._-]/g, "-");
6092
6106
  const maxOperationLength = Math.max(
@@ -6097,7 +6111,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6097
6111
  }
6098
6112
  monitorJobHeaders(operation, idempotencyKey) {
6099
6113
  return {
6100
- "Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _356 => _356.trim, 'call', _357 => _357()]) || this.monitorJobIdempotencyKey(operation)
6114
+ "Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _353 => _353.trim, 'call', _354 => _354()]) || this.monitorJobIdempotencyKey(operation)
6101
6115
  };
6102
6116
  }
6103
6117
  async deployMonitorBatch(definitions, options) {
@@ -6108,7 +6122,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6108
6122
  body: { version: 1, kind: "batch", monitors: definitions },
6109
6123
  headers: this.monitorJobHeaders(
6110
6124
  "batch-deploy",
6111
- _optionalChain([options, 'optionalAccess', _358 => _358.idempotencyKey])
6125
+ _optionalChain([options, 'optionalAccess', _355 => _355.idempotencyKey])
6112
6126
  ),
6113
6127
  maxRetries: 0,
6114
6128
  exactUrlOnly: true
@@ -6127,11 +6141,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
6127
6141
  version: 1,
6128
6142
  kind: "batch",
6129
6143
  monitors: definitions,
6130
- ..._optionalChain([options, 'optionalAccess', _359 => _359.expectedGeneration]) === void 0 ? {} : { expected_generation: options.expectedGeneration }
6144
+ ..._optionalChain([options, 'optionalAccess', _356 => _356.expectedGeneration]) === void 0 ? {} : { expected_generation: options.expectedGeneration }
6131
6145
  },
6132
6146
  headers: this.monitorJobHeaders(
6133
6147
  `batch-sync-${batchId}`,
6134
- _optionalChain([options, 'optionalAccess', _360 => _360.idempotencyKey])
6148
+ _optionalChain([options, 'optionalAccess', _357 => _357.idempotencyKey])
6135
6149
  ),
6136
6150
  maxRetries: 0,
6137
6151
  exactUrlOnly: true
@@ -6146,7 +6160,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6146
6160
  body: {},
6147
6161
  headers: this.monitorJobHeaders(
6148
6162
  `batch-start-${batchId}`,
6149
- _optionalChain([options, 'optionalAccess', _361 => _361.idempotencyKey])
6163
+ _optionalChain([options, 'optionalAccess', _358 => _358.idempotencyKey])
6150
6164
  ),
6151
6165
  maxRetries: 0,
6152
6166
  exactUrlOnly: true
@@ -6161,7 +6175,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6161
6175
  body: {},
6162
6176
  headers: this.monitorJobHeaders(
6163
6177
  `batch-stop-${batchId}`,
6164
- _optionalChain([options, 'optionalAccess', _362 => _362.idempotencyKey])
6178
+ _optionalChain([options, 'optionalAccess', _359 => _359.idempotencyKey])
6165
6179
  ),
6166
6180
  maxRetries: 0,
6167
6181
  exactUrlOnly: true
@@ -6182,7 +6196,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6182
6196
  body: {},
6183
6197
  headers: this.monitorJobHeaders(
6184
6198
  `${action}-${monitorKey}`,
6185
- _optionalChain([options, 'optionalAccess', _363 => _363.idempotencyKey])
6199
+ _optionalChain([options, 'optionalAccess', _360 => _360.idempotencyKey])
6186
6200
  ),
6187
6201
  maxRetries: 0,
6188
6202
  exactUrlOnly: true
@@ -6195,7 +6209,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6195
6209
  body: definition,
6196
6210
  headers: this.monitorJobHeaders(
6197
6211
  `sync-${definition.key}`,
6198
- _optionalChain([options, 'optionalAccess', _364 => _364.idempotencyKey])
6212
+ _optionalChain([options, 'optionalAccess', _361 => _361.idempotencyKey])
6199
6213
  ),
6200
6214
  maxRetries: 0,
6201
6215
  exactUrlOnly: true
@@ -6208,7 +6222,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6208
6222
  );
6209
6223
  }
6210
6224
  async getMonitorJobLogs(jobId, options) {
6211
- const query = _optionalChain([options, 'optionalAccess', _365 => _365.limit]) === void 0 ? "" : `?limit=${encodeURIComponent(String(options.limit))}`;
6225
+ const query = _optionalChain([options, 'optionalAccess', _362 => _362.limit]) === void 0 ? "" : `?limit=${encodeURIComponent(String(options.limit))}`;
6212
6226
  return this.http.request(
6213
6227
  `/api/v2/monitors/jobs/${encodeURIComponent(jobId)}/logs${query}`,
6214
6228
  { method: "GET" }
@@ -6221,15 +6235,15 @@ var DeeplineClient = (_class = class _DeeplineClient {
6221
6235
  );
6222
6236
  }
6223
6237
  async waitForMonitorJob(jobId, options) {
6224
- const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _366 => _366.timeoutMs]), () => ( 10 * 6e4)));
6225
- const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _367 => _367.pollIntervalMs]), () => ( 2e3)));
6238
+ const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _363 => _363.timeoutMs]), () => ( 10 * 6e4)));
6239
+ const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _364 => _364.pollIntervalMs]), () => ( 2e3)));
6226
6240
  const terminal = /* @__PURE__ */ new Set(["succeeded", "failed", "cancelled"]);
6227
6241
  const startedAt = Date.now();
6228
6242
  let latest = await this.getMonitorJob(jobId);
6229
6243
  while (true) {
6230
- _optionalChain([options, 'optionalAccess', _368 => _368.onProgress, 'optionalCall', _369 => _369(latest)]);
6244
+ _optionalChain([options, 'optionalAccess', _365 => _365.onProgress, 'optionalCall', _366 => _366(latest)]);
6231
6245
  const job = latest.job;
6232
- const state = typeof _optionalChain([job, 'optionalAccess', _370 => _370.state]) === "string" ? job.state : void 0;
6246
+ const state = typeof _optionalChain([job, 'optionalAccess', _367 => _367.state]) === "string" ? job.state : void 0;
6233
6247
  if (state && terminal.has(state)) return latest;
6234
6248
  if (Date.now() - startedAt >= timeoutMs) return latest;
6235
6249
  await sleep(pollIntervalMs);
@@ -6240,12 +6254,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
6240
6254
  // Monitor Fleets
6241
6255
  // ——————————————————————————————————————————————————————————
6242
6256
  monitorFleetIdempotencyKey(operation) {
6243
- const uuid = _optionalChain([globalThis, 'access', _371 => _371.crypto, 'optionalAccess', _372 => _372.randomUUID, 'optionalCall', _373 => _373()]);
6257
+ const uuid = _optionalChain([globalThis, 'access', _368 => _368.crypto, 'optionalAccess', _369 => _369.randomUUID, 'optionalCall', _370 => _370()]);
6244
6258
  return `monitor-fleet-${operation}-${_nullishCoalesce(uuid, () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`))}`;
6245
6259
  }
6246
6260
  monitorFleetHeaders(operation, idempotencyKey) {
6247
6261
  return {
6248
- "Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _374 => _374.trim, 'call', _375 => _375()]) || this.monitorFleetIdempotencyKey(operation)
6262
+ "Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _371 => _371.trim, 'call', _372 => _372()]) || this.monitorFleetIdempotencyKey(operation)
6249
6263
  };
6250
6264
  }
6251
6265
  monitorFleetPath(fleetId) {
@@ -6265,15 +6279,15 @@ var DeeplineClient = (_class = class _DeeplineClient {
6265
6279
  const fleetId = typeof definitionOrId === "string" ? definitionOrId : definitionOrId.id;
6266
6280
  const body = {
6267
6281
  ...typeof definitionOrId === "string" ? {} : { definition: definitionOrId },
6268
- ..._optionalChain([options, 'optionalAccess', _376 => _376.dryRun]) ? { dry_run: true } : {},
6269
- ..._optionalChain([options, 'optionalAccess', _377 => _377.expectedGeneration]) !== void 0 ? { expected_generation: options.expectedGeneration } : {}
6282
+ ..._optionalChain([options, 'optionalAccess', _373 => _373.dryRun]) ? { dry_run: true } : {},
6283
+ ..._optionalChain([options, 'optionalAccess', _374 => _374.expectedGeneration]) !== void 0 ? { expected_generation: options.expectedGeneration } : {}
6270
6284
  };
6271
6285
  return this.http.request(
6272
6286
  this.monitorFleetPath(fleetId),
6273
6287
  {
6274
6288
  method: "PUT",
6275
6289
  body,
6276
- headers: this.monitorFleetHeaders("sync", _optionalChain([options, 'optionalAccess', _378 => _378.idempotencyKey])),
6290
+ headers: this.monitorFleetHeaders("sync", _optionalChain([options, 'optionalAccess', _375 => _375.idempotencyKey])),
6277
6291
  maxRetries: 0,
6278
6292
  exactUrlOnly: true
6279
6293
  }
@@ -6286,8 +6300,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
6286
6300
  }
6287
6301
  async getMonitorFleet(fleetId, options) {
6288
6302
  const params = new URLSearchParams();
6289
- if (_optionalChain([options, 'optionalAccess', _379 => _379.drift])) params.set("drift", "1");
6290
- if (_optionalChain([options, 'optionalAccess', _380 => _380.limit]) !== void 0)
6303
+ if (_optionalChain([options, 'optionalAccess', _376 => _376.drift])) params.set("drift", "1");
6304
+ if (_optionalChain([options, 'optionalAccess', _377 => _377.limit]) !== void 0)
6291
6305
  params.set("limit", String(options.limit));
6292
6306
  const query = params.toString();
6293
6307
  return this.http.request(
@@ -6300,10 +6314,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
6300
6314
  this.monitorFleetPath(fleetId),
6301
6315
  {
6302
6316
  method: "DELETE",
6303
- body: _optionalChain([options, 'optionalAccess', _381 => _381.dryRun]) ? { dry_run: true } : {},
6317
+ body: _optionalChain([options, 'optionalAccess', _378 => _378.dryRun]) ? { dry_run: true } : {},
6304
6318
  headers: this.monitorFleetHeaders(
6305
6319
  "deactivate",
6306
- _optionalChain([options, 'optionalAccess', _382 => _382.idempotencyKey])
6320
+ _optionalChain([options, 'optionalAccess', _379 => _379.idempotencyKey])
6307
6321
  ),
6308
6322
  maxRetries: 0,
6309
6323
  exactUrlOnly: true
@@ -6318,7 +6332,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6318
6332
  body: {},
6319
6333
  headers: this.monitorFleetHeaders(
6320
6334
  "reactivate",
6321
- _optionalChain([options, 'optionalAccess', _383 => _383.idempotencyKey])
6335
+ _optionalChain([options, 'optionalAccess', _380 => _380.idempotencyKey])
6322
6336
  ),
6323
6337
  maxRetries: 0,
6324
6338
  exactUrlOnly: true
@@ -6335,13 +6349,13 @@ var DeeplineClient = (_class = class _DeeplineClient {
6335
6349
  * identical to "the request failed".
6336
6350
  */
6337
6351
  async waitForMonitorFleetConvergence(fleetId, options) {
6338
- const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _384 => _384.timeoutMs]), () => ( 10 * 6e4)));
6339
- const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _385 => _385.pollIntervalMs]), () => ( 2e3)));
6340
- const terminal = _optionalChain([options, 'optionalAccess', _386 => _386.until]) === "deactivated" ? /* @__PURE__ */ new Set(["deactivated", "degraded"]) : /* @__PURE__ */ new Set(["converged", "degraded", "deactivated"]);
6352
+ const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _381 => _381.timeoutMs]), () => ( 10 * 6e4)));
6353
+ const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _382 => _382.pollIntervalMs]), () => ( 2e3)));
6354
+ const terminal = _optionalChain([options, 'optionalAccess', _383 => _383.until]) === "deactivated" ? /* @__PURE__ */ new Set(["deactivated", "degraded"]) : /* @__PURE__ */ new Set(["converged", "degraded", "deactivated"]);
6341
6355
  const startedAt = Date.now();
6342
6356
  let latest = await this.getMonitorFleet(fleetId);
6343
6357
  while (true) {
6344
- _optionalChain([options, 'optionalAccess', _387 => _387.onProgress, 'optionalCall', _388 => _388(latest)]);
6358
+ _optionalChain([options, 'optionalAccess', _384 => _384.onProgress, 'optionalCall', _385 => _385(latest)]);
6345
6359
  const status = typeof latest.status === "string" ? latest.status : void 0;
6346
6360
  if (status && terminal.has(status)) return latest;
6347
6361
  if (Date.now() - startedAt >= timeoutMs) return latest;