deepline 0.3.315 → 0.3.317

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/release.ts +1 -1
  2. package/dist/bundling-sources/sdk/src/runs/overview.ts +17 -10
  3. package/dist/bundling-sources/sdk/src/types.ts +6 -5
  4. package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +64 -0
  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 +396 -35
  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/scheduler-backends/run-ledger-outbox-recovery.ts +123 -19
  25. package/dist/bundling-sources/shared_libs/play-runtime/work-receipt-storage-contract.ts +13 -0
  26. package/dist/bundling-sources/shared_libs/play-runtime/workflow-executor-auth.ts +2 -0
  27. package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +3 -2
  28. package/dist/cli/auth-XPLGQ2KO.js +31 -0
  29. package/dist/cli/{auth-OVWOO5NP.mjs → auth-YAHBE5WU.mjs} +4 -4
  30. package/dist/cli/{billing-W3OXKWNE.mjs → billing-AY4OS7MR.mjs} +4 -4
  31. package/dist/cli/{billing-SRZL7UOH.js → billing-ORZDEMH2.js} +70 -70
  32. package/dist/cli/{chunk-OJP4FCCX.js → chunk-2FKXFTOF.js} +48 -48
  33. package/dist/cli/{chunk-OJ243ZA5.js → chunk-2HKPAZVJ.js} +1 -1
  34. package/dist/cli/{chunk-LOWURQMF.js → chunk-342BTES3.js} +50 -50
  35. package/dist/cli/{chunk-FGAK6FET.js → chunk-3NRNDPAE.js} +26 -26
  36. package/dist/cli/{chunk-GK67FYMS.mjs → chunk-5BLF3HDM.mjs} +5 -5
  37. package/dist/cli/{chunk-TZ5KUDPP.mjs → chunk-5OFRM64Y.mjs} +1 -1
  38. package/dist/cli/{chunk-US4S3E4Y.mjs → chunk-7PZFGB7L.mjs} +1 -1
  39. package/dist/cli/{chunk-YL42TF53.js → chunk-AMJYFPFK.js} +6 -6
  40. package/dist/cli/{chunk-PPONZ6IE.js → chunk-AW355CLN.js} +15 -15
  41. package/dist/cli/{chunk-TQK662WG.js → chunk-BGBYK2T3.js} +60 -60
  42. package/dist/cli/{chunk-TQ3F77AC.mjs → chunk-CGGM4CE6.mjs} +3 -3
  43. package/dist/cli/{chunk-FTJQO757.mjs → chunk-D5MHSO5T.mjs} +1 -1
  44. package/dist/cli/{chunk-Y42UERUY.js → chunk-DSTUP75H.js} +6 -6
  45. package/dist/cli/{chunk-HNKHMHJ7.mjs → chunk-FRK2AGSG.mjs} +1 -1
  46. package/dist/cli/{chunk-OUIIYFG3.mjs → chunk-GX3WO4M4.mjs} +2 -2
  47. package/dist/cli/{chunk-OYJCNCUW.js → chunk-GYOLWON6.js} +2 -2
  48. package/dist/cli/{chunk-N5V2SBB2.mjs → chunk-KP7W5NO6.mjs} +1 -1
  49. package/dist/cli/{chunk-L5TSFCJ6.mjs → chunk-KXOXXVYJ.mjs} +2 -2
  50. package/dist/cli/{chunk-B473QUQU.mjs → chunk-L6ERGROE.mjs} +4 -4
  51. package/dist/cli/{chunk-R3IFZDJL.mjs → chunk-LI6YPPBR.mjs} +2 -2
  52. package/dist/cli/{chunk-IGE7EJJY.mjs → chunk-NDFBAMVI.mjs} +19 -15
  53. package/dist/cli/{chunk-JF4O5OMH.mjs → chunk-OTI562P3.mjs} +1 -1
  54. package/dist/cli/{chunk-AO4IWPP7.mjs → chunk-PSHIZP3K.mjs} +17 -15
  55. package/dist/cli/{chunk-VYK23G2C.js → chunk-QFKVAUIQ.js} +239 -235
  56. package/dist/cli/{chunk-AZWQJAQF.mjs → chunk-QPKHOZI3.mjs} +1 -1
  57. package/dist/cli/{chunk-URVZGYGG.js → chunk-SUPQQYGY.js} +4 -4
  58. package/dist/cli/{chunk-C5WSTXUB.js → chunk-TJ2V2JA3.js} +537 -535
  59. package/dist/cli/{chunk-6BJACIVK.js → chunk-UGQHYOT4.js} +1 -1
  60. package/dist/cli/{chunk-IALPYID6.js → chunk-XSEMQ4II.js} +3 -3
  61. package/dist/cli/{chunk-SNFSO2AN.js → chunk-Z5NRL7A7.js} +6 -6
  62. package/dist/cli/{client-WQ3J5BSH.mjs → client-QNLVLW54.mjs} +3 -3
  63. package/dist/cli/client-ZW5VAHWD.js +20 -0
  64. package/dist/cli/{csv-36ARCBNQ.mjs → csv-AKZASZP6.mjs} +3 -3
  65. package/dist/cli/{csv-CENMEWDH.js → csv-PW6S3SMJ.js} +12 -12
  66. package/dist/cli/{db-JU7XLKQM.mjs → db-DNF53LDS.mjs} +4 -4
  67. package/dist/cli/{db-6DQZG6NB.js → db-FLDYET2D.js} +20 -20
  68. package/dist/cli/{describe-VUD4AFBY.js → describe-JDAEOCYQ.js} +17 -17
  69. package/dist/cli/{describe-34ALEEFO.mjs → describe-U6RGIFMA.mjs} +10 -10
  70. package/dist/cli/{executions-H2UXS6FP.js → executions-DASCB6LS.js} +6 -6
  71. package/dist/cli/{executions-H66BMN6N.mjs → executions-W6BBU2HN.mjs} +4 -4
  72. package/dist/cli/{feedback-Q7LXXLSH.mjs → feedback-BVWPDWZG.mjs} +3 -3
  73. package/dist/cli/{feedback-YSYFQSAB.js → feedback-N3MBCT4A.js} +6 -6
  74. package/dist/cli/{git-XV43NSWN.mjs → git-4GJOKOLU.mjs} +4 -4
  75. package/dist/cli/git-WVHH3QXQ.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-Z2DTZQN3.mjs → legacy-noops-5XMSV7WL.mjs} +4 -4
  79. package/dist/cli/{legacy-noops-RGDW6SCA.js → legacy-noops-D7C7ZVKK.js} +7 -7
  80. package/dist/cli/{monitors-I75KZ2BP.js → monitors-NYP4LG3K.js} +85 -85
  81. package/dist/cli/{monitors-OFQ56O4S.mjs → monitors-Y4RKWAS5.mjs} +4 -4
  82. package/dist/cli/{org-75AH6RIB.js → org-PYKQMP6F.js} +60 -60
  83. package/dist/cli/{org-ZYMCU6XO.mjs → org-XZ26CUCV.mjs} +4 -4
  84. package/dist/cli/play-BYZCR4PP.js +152 -0
  85. package/dist/cli/{play-BKXM76DV.mjs → play-FYHIYZ3W.mjs} +9 -9
  86. package/dist/cli/{providers-GWG2WFIY.mjs → providers-3UG7NK55.mjs} +4 -4
  87. package/dist/cli/{providers-Z77MM7ID.js → providers-QS5X236G.js} +7 -7
  88. package/dist/cli/{quickstart-I4RECIQC.js → quickstart-GMASUT7T.js} +5 -5
  89. package/dist/cli/{quickstart-BGVIV374.mjs → quickstart-PHHHHHWO.mjs} +3 -3
  90. package/dist/cli/search-52CC3OVI.js +26 -0
  91. package/dist/cli/{search-TIKBP3RE.mjs → search-AVGITJP4.mjs} +5 -5
  92. package/dist/cli/{secrets-SNGRI4KS.js → secrets-HY5E6F6G.js} +13 -13
  93. package/dist/cli/{secrets-YCHKLWKC.mjs → secrets-RBEZRQ6P.mjs} +4 -4
  94. package/dist/cli/{sessions-WXLADGDX.js → sessions-7CDLWLVV.js} +5 -5
  95. package/dist/cli/{sessions-IRDG6ZRX.mjs → sessions-ME5R5FTG.mjs} +4 -4
  96. package/dist/cli/{settings-KZALJDXW.mjs → settings-X4JQLBB6.mjs} +7 -7
  97. package/dist/cli/{settings-72J4BVF6.js → settings-ZCVJPOFP.js} +74 -74
  98. package/dist/cli/{setup-FFB3KLFD.js → setup-DROGU6MC.js} +41 -41
  99. package/dist/cli/{setup-4KCA7ESV.mjs → setup-NEILS2UF.mjs} +6 -6
  100. package/dist/cli/skills-KUV3WWW5.js +28 -0
  101. package/dist/cli/{skills-MQZPYUQ3.mjs → skills-PC57GDXZ.mjs} +4 -4
  102. package/dist/cli/{tools-M3WKRZ5T.mjs → tools-IFJUWQC5.mjs} +6 -6
  103. package/dist/cli/tools-NHDAOQPB.js +38 -0
  104. package/dist/cli/update-DRWQCVXJ.js +28 -0
  105. package/dist/cli/{update-QJMNYGNF.mjs → update-N4HSH2TJ.mjs} +6 -6
  106. package/dist/cli/{workflow-6T2EUFCN.mjs → workflow-2OZBTUU2.mjs} +5 -5
  107. package/dist/cli/{workflow-35UUOZ5E.js → workflow-LP4Z6RF5.js} +15 -15
  108. package/dist/{client-Dh_4Ph1R.d.ts → client-BV68GMPo.d.ts} +7 -6
  109. package/dist/{client-CvpZsBqt.d.mts → client-D9ACjiRC.d.mts} +7 -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-P2TTZU36.js +0 -31
  128. package/dist/cli/client-CXFPFCIG.js +0 -20
  129. package/dist/cli/git-SYFCYIFP.js +0 -23
  130. package/dist/cli/play-OKXUWPMO.js +0 -152
  131. package/dist/cli/search-3KISUDDT.js +0 -26
  132. package/dist/cli/skills-XGOK4GRW.js +0 -28
  133. package/dist/cli/tools-LEAJ7EPW.js +0 -38
  134. package/dist/cli/update-ZN6LDUHS.js +0 -28
@@ -14,7 +14,7 @@ var _chunkLA46MMTLjs = require('./chunk-LA46MMTL.js');
14
14
 
15
15
 
16
16
 
17
- var _chunkURVZGYGGjs = require('./chunk-URVZGYGG.js');
17
+ var _chunkSUPQQYGYjs = require('./chunk-SUPQQYGY.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
- [_chunkURVZGYGGjs.RUNTIME_ENVIRONMENT_TOKEN_HEADER]: token,
2757
- ...receivers ? { [_chunkURVZGYGGjs.RETAINED_PIPELINE_RECEIVERS_HEADER]: receivers } : {}
2760
+ [_chunkSUPQQYGYjs.RUNTIME_ENVIRONMENT_TOKEN_HEADER]: token,
2761
+ ...receivers ? { [_chunkSUPQQYGYjs.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 { [_chunkURVZGYGGjs.COORDINATOR_INTERNAL_TOKEN_HEADER]: token };
2777
+ return { [_chunkSUPQQYGYjs.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 = _chunkURVZGYGGjs.resolveConfig.call(void 0, options);
3075
- this.http = new (0, _chunkURVZGYGGjs.HttpClient)(this.config);
3078
+ this.config = _chunkSUPQQYGYjs.resolveConfig.call(void 0, options);
3079
+ this.http = new (0, _chunkSUPQQYGYjs.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,16 +4317,16 @@ 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
  }
4325
- const node = _optionalChain([options, 'access', _249 => _249.node, 'optionalAccess', _250 => _250.trim, 'call', _251 => _251()]);
4329
+ const node = _optionalChain([options, 'access', _243 => _243.node, 'optionalAccess', _244 => _244.trim, 'call', _245 => _245()]);
4326
4330
  if (node) {
4327
4331
  if (!playName)
4328
4332
  throw new Error("runs.list options.node requires options.play.");
@@ -4396,8 +4400,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
4396
4400
  * different key intentionally starts another rerun.
4397
4401
  */
4398
4402
  async rerun(runId, options) {
4399
- const idempotencyKey = _optionalChain([options, 'optionalAccess', _252 => _252.idempotencyKey, 'optionalAccess', _253 => _253.trim, 'call', _254 => _254()]);
4400
- if (_optionalChain([options, 'optionalAccess', _255 => _255.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) {
4401
4405
  throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
4402
4406
  "runs.rerun idempotencyKey must not be empty.",
4403
4407
  void 0,
@@ -4406,7 +4410,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4406
4410
  }
4407
4411
  return this.http.post(
4408
4412
  `/api/v2/runs/${encodeURIComponent(runId)}/rerun`,
4409
- _optionalChain([options, 'optionalAccess', _256 => _256.inputOverrides]) ? { inputOverrides: options.inputOverrides } : {},
4413
+ _optionalChain([options, 'optionalAccess', _250 => _250.inputOverrides]) ? { inputOverrides: options.inputOverrides } : {},
4410
4414
  { "Idempotency-Key": idempotencyKey || globalThis.crypto.randomUUID() }
4411
4415
  );
4412
4416
  }
@@ -4420,21 +4424,21 @@ var DeeplineClient = (_class = class _DeeplineClient {
4420
4424
  * ```
4421
4425
  */
4422
4426
  async getRunLogs(runId, options) {
4423
- if (_optionalChain([options, 'optionalAccess', _257 => _257.all]) === true && options.failed === true) {
4427
+ if (_optionalChain([options, 'optionalAccess', _251 => _251.all]) === true && options.failed === true) {
4424
4428
  throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
4425
4429
  "runs.logs cannot combine all and failed views.",
4426
4430
  void 0,
4427
4431
  "INVALID_RUN_LOG_VIEW"
4428
4432
  );
4429
4433
  }
4430
- if (_optionalChain([options, 'optionalAccess', _258 => _258.cursor]) !== void 0 && options.failed === true) {
4434
+ if (_optionalChain([options, 'optionalAccess', _252 => _252.cursor]) !== void 0 && options.failed === true) {
4431
4435
  throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
4432
4436
  "runs.logs cannot combine failed with cursor.",
4433
4437
  void 0,
4434
4438
  "INVALID_RUN_LOG_VIEW"
4435
4439
  );
4436
4440
  }
4437
- if (_optionalChain([options, 'optionalAccess', _259 => _259.failed]) === true) {
4441
+ if (_optionalChain([options, 'optionalAccess', _253 => _253.failed]) === true) {
4438
4442
  const requestedLimit = typeof options.limit === "number" && Number.isFinite(options.limit) && options.limit > 0 ? Math.trunc(options.limit) : RUNS_FAILED_LOG_LIMIT;
4439
4443
  const failedLimit = Math.min(RUNS_FAILED_LOG_LIMIT, requestedLimit);
4440
4444
  const page = await this.http.get(
@@ -4459,18 +4463,18 @@ var DeeplineClient = (_class = class _DeeplineClient {
4459
4463
  ...page.logsTruncated ? { logsTruncated: true } : {}
4460
4464
  };
4461
4465
  }
4462
- const beforeSequence = _optionalChain([options, 'optionalAccess', _260 => _260.cursor]) !== void 0 ? parseRunLogsCursor(options.cursor) : null;
4463
- const limit = _optionalChain([options, 'optionalAccess', _261 => _261.all]) ? Number.MAX_SAFE_INTEGER : typeof _optionalChain([options, 'optionalAccess', _262 => _262.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;
4464
4468
  const fetchPage = (afterSeq2, pageLimit) => this.http.get(
4465
4469
  `/api/v2/runs/${encodeURIComponent(runId)}/logs?afterSeq=${afterSeq2}&limit=${pageLimit}`,
4466
4470
  { retryApiErrors: true }
4467
4471
  );
4468
4472
  const probe = await fetchPage(0, 1);
4469
4473
  const lastStoredSeq = probe.lastStoredSeq;
4470
- const oldestStoredSeq = _nullishCoalesce(_optionalChain([probe, 'access', _263 => _263.entries, 'access', _264 => _264[0], 'optionalAccess', _265 => _265.seq]), () => ( null));
4474
+ const oldestStoredSeq = _nullishCoalesce(_optionalChain([probe, 'access', _257 => _257.entries, 'access', _258 => _258[0], 'optionalAccess', _259 => _259.seq]), () => ( null));
4471
4475
  const upperSeq = beforeSequence === null ? Number.POSITIVE_INFINITY : Math.min(beforeSequence - 1, lastStoredSeq);
4472
4476
  const windowEndSeq = Math.min(upperSeq, lastStoredSeq);
4473
- let afterSeq = _optionalChain([options, 'optionalAccess', _266 => _266.all]) ? 0 : Math.max(0, windowEndSeq - limit);
4477
+ let afterSeq = _optionalChain([options, 'optionalAccess', _260 => _260.all]) ? 0 : Math.max(0, windowEndSeq - limit);
4474
4478
  const entries = [];
4475
4479
  while (entries.length < limit && afterSeq < upperSeq) {
4476
4480
  const page = await fetchPage(
@@ -4504,7 +4508,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4504
4508
  hasMore: olderLinesExist,
4505
4509
  nextCursor: olderLinesExist ? encodeRunLogsCursor(firstSequence) : null,
4506
4510
  entries: entries.map((entry) => entry.line),
4507
- view: _optionalChain([options, 'optionalAccess', _267 => _267.all]) ? "all" : "tail",
4511
+ view: _optionalChain([options, 'optionalAccess', _261 => _261.all]) ? "all" : "tail",
4508
4512
  ...probe.logsTruncated ? { logsTruncated: true } : {}
4509
4513
  };
4510
4514
  }
@@ -4665,7 +4669,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4665
4669
  limit: String(_nullishCoalesce(input.limit, () => ( 5e3))),
4666
4670
  offset: String(_nullishCoalesce(input.offset, () => ( 0)))
4667
4671
  });
4668
- if (_optionalChain([input, 'access', _268 => _268.runId, 'optionalAccess', _269 => _269.trim, 'call', _270 => _270()])) {
4672
+ if (_optionalChain([input, 'access', _262 => _262.runId, 'optionalAccess', _263 => _263.trim, 'call', _264 => _264()])) {
4669
4673
  params.set("runId", input.runId.trim());
4670
4674
  }
4671
4675
  if (input.rowMode === "all" || input.rowMode === "live") {
@@ -4675,9 +4679,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
4675
4679
  `/api/v2/plays/${encodeURIComponent(input.playName)}/sheet?${params.toString()}`,
4676
4680
  { signal: input.signal }
4677
4681
  );
4678
- const requestedRunId = _optionalChain([input, 'access', _271 => _271.runId, 'optionalAccess', _272 => _272.trim, 'call', _273 => _273()]) || "";
4682
+ const requestedRunId = _optionalChain([input, 'access', _265 => _265.runId, 'optionalAccess', _266 => _266.trim, 'call', _267 => _267()]) || "";
4679
4683
  if (requestedRunId) {
4680
- const confirmedRunId = _optionalChain([result, 'access', _274 => _274.scope, 'optionalAccess', _275 => _275.kind]) === "run" ? result.scope.runId.trim() : "";
4684
+ const confirmedRunId = _optionalChain([result, 'access', _268 => _268.scope, 'optionalAccess', _269 => _269.kind]) === "run" ? result.scope.runId.trim() : "";
4681
4685
  const foreignRowRunIds = [
4682
4686
  ...new Set(
4683
4687
  result.rows.map(
@@ -4685,7 +4689,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4685
4689
  ).filter((runId) => runId && runId !== requestedRunId)
4686
4690
  )
4687
4691
  ];
4688
- if (_optionalChain([result, 'access', _276 => _276.scope, 'optionalAccess', _277 => _277.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) {
4689
4693
  throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
4690
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.`,
4691
4695
  void 0,
@@ -4714,7 +4718,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4714
4718
  async stopRun(runId, options) {
4715
4719
  return this.http.post(
4716
4720
  `/api/v2/runs/${encodeURIComponent(runId)}/stop`,
4717
- _optionalChain([options, 'optionalAccess', _278 => _278.reason]) ? { reason: options.reason } : {}
4721
+ _optionalChain([options, 'optionalAccess', _272 => _272.reason]) ? { reason: options.reason } : {}
4718
4722
  );
4719
4723
  }
4720
4724
  /**
@@ -4732,11 +4736,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
4732
4736
  * need to clear the workspace run-slot state without knowing each run id.
4733
4737
  */
4734
4738
  async stopAllRuns(options) {
4735
- const dryRun = _optionalChain([options, 'optionalAccess', _279 => _279.dryRun]) === true;
4739
+ const dryRun = _optionalChain([options, 'optionalAccess', _273 => _273.dryRun]) === true;
4736
4740
  const result = await this.http.post(
4737
4741
  "/api/v2/runs/stop-all",
4738
4742
  {
4739
- ..._optionalChain([options, 'optionalAccess', _280 => _280.reason]) ? { reason: options.reason } : {},
4743
+ ..._optionalChain([options, 'optionalAccess', _274 => _274.reason]) ? { reason: options.reason } : {},
4740
4744
  ...dryRun ? { dryRun: true } : {}
4741
4745
  }
4742
4746
  );
@@ -4757,7 +4761,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4757
4761
  * `origin: "owned"` for org-owned plays.
4758
4762
  */
4759
4763
  async listPlays(options) {
4760
- if (!_optionalChain([options, 'optionalAccess', _281 => _281.grep, 'optionalAccess', _282 => _282.trim, 'call', _283 => _283()])) {
4764
+ if (!_optionalChain([options, 'optionalAccess', _275 => _275.grep, 'optionalAccess', _276 => _276.trim, 'call', _277 => _277()])) {
4761
4765
  return (await this.requestPlaysPage(options, false)).plays;
4762
4766
  }
4763
4767
  const plays = [];
@@ -4779,45 +4783,45 @@ var DeeplineClient = (_class = class _DeeplineClient {
4779
4783
  }
4780
4784
  async requestPlaysPage(options, paginateInventory = true) {
4781
4785
  const params = new URLSearchParams();
4782
- if (paginateInventory && !_optionalChain([options, 'optionalAccess', _284 => _284.grep, 'optionalAccess', _285 => _285.trim, 'call', _286 => _286()]))
4786
+ if (paginateInventory && !_optionalChain([options, 'optionalAccess', _278 => _278.grep, 'optionalAccess', _279 => _279.trim, 'call', _280 => _280()]))
4783
4787
  params.set("inventory_paginated", "1");
4784
- if (_optionalChain([options, 'optionalAccess', _287 => _287.origin])) params.set("origin", options.origin);
4785
- if (_optionalChain([options, 'optionalAccess', _288 => _288.categories])) {
4788
+ if (_optionalChain([options, 'optionalAccess', _281 => _281.origin])) params.set("origin", options.origin);
4789
+ if (_optionalChain([options, 'optionalAccess', _282 => _282.categories])) {
4786
4790
  params.set(
4787
4791
  "categories",
4788
4792
  Array.isArray(options.categories) ? options.categories.join(",") : options.categories
4789
4793
  );
4790
4794
  }
4791
- if (_optionalChain([options, 'optionalAccess', _289 => _289.categories]) || _optionalChain([options, 'optionalAccess', _290 => _290.includeToolCategories])) {
4795
+ if (_optionalChain([options, 'optionalAccess', _283 => _283.categories]) || _optionalChain([options, 'optionalAccess', _284 => _284.includeToolCategories])) {
4792
4796
  params.set("include_tool_categories", "1");
4793
4797
  }
4794
- if (_optionalChain([options, 'optionalAccess', _291 => _291.tags])) {
4798
+ if (_optionalChain([options, 'optionalAccess', _285 => _285.tags])) {
4795
4799
  params.set(
4796
4800
  "tags",
4797
4801
  Array.isArray(options.tags) ? options.tags.join(",") : options.tags
4798
4802
  );
4799
4803
  }
4800
- if (_optionalChain([options, 'optionalAccess', _292 => _292.includeArchived])) params.set("include_archived", "1");
4801
- if (_optionalChain([options, 'optionalAccess', _293 => _293.includeCostEstimates])) {
4804
+ if (_optionalChain([options, 'optionalAccess', _286 => _286.includeArchived])) params.set("include_archived", "1");
4805
+ if (_optionalChain([options, 'optionalAccess', _287 => _287.includeCostEstimates])) {
4802
4806
  params.set("include_cost_estimates", "1");
4803
4807
  }
4804
- if (_optionalChain([options, 'optionalAccess', _294 => _294.grep, 'optionalAccess', _295 => _295.trim, 'call', _296 => _296()])) {
4808
+ if (_optionalChain([options, 'optionalAccess', _288 => _288.grep, 'optionalAccess', _289 => _289.trim, 'call', _290 => _290()])) {
4805
4809
  params.set("grep", options.grep.trim());
4806
4810
  params.set("limit", "60");
4807
4811
  }
4808
- if (_optionalChain([options, 'optionalAccess', _297 => _297.limit]) !== void 0) {
4812
+ if (_optionalChain([options, 'optionalAccess', _291 => _291.limit]) !== void 0) {
4809
4813
  if (!Number.isSafeInteger(options.limit) || options.limit < 1) {
4810
4814
  throw new Error("Play page limit must be a positive integer");
4811
4815
  }
4812
4816
  params.set("limit", String(options.limit));
4813
4817
  }
4814
- if (_optionalChain([options, 'optionalAccess', _298 => _298.cursor])) params.set("cursor", options.cursor);
4818
+ if (_optionalChain([options, 'optionalAccess', _292 => _292.cursor])) params.set("cursor", options.cursor);
4815
4819
  const suffix = params.size ? `?${params.toString()}` : "";
4816
4820
  const response = await this.http.get(`/api/v2/plays${suffix}`);
4817
4821
  return {
4818
4822
  plays: _nullishCoalesce(response.plays, () => ( [])),
4819
- cursor: _nullishCoalesce(_nullishCoalesce(_optionalChain([response, 'access', _299 => _299.pagination, 'optionalAccess', _300 => _300.cursor]), () => ( response.cursor)), () => ( null)),
4820
- hasMore: Boolean(_nullishCoalesce(_optionalChain([response, 'access', _301 => _301.pagination, 'optionalAccess', _302 => _302.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)))
4821
4825
  };
4822
4826
  }
4823
4827
  /** Read definition-level settings, independently of code revisions. */
@@ -4867,8 +4871,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
4867
4871
  return this.http.post("/api/v2/integrations/connect", {
4868
4872
  provider: "slack",
4869
4873
  scopes: [...PRODUCT_NOTIFICATION_SLACK_OAUTH_SCOPES],
4870
- ..._optionalChain([options, 'optionalAccess', _303 => _303.successUrl]) ? { success_url: options.successUrl } : {},
4871
- ..._optionalChain([options, 'optionalAccess', _304 => _304.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 } : {}
4872
4876
  });
4873
4877
  }
4874
4878
  /** List Slack channels visible to the connected Deepline Slack app. */
@@ -4943,7 +4947,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4943
4947
  }
4944
4948
  const targets = input.targets.map(parseNotificationGroupTarget);
4945
4949
  const legacyEvents = _nullishCoalesce(input.legacyEvents, () => ( []));
4946
- const legacyTarget = targets.length === 1 && _optionalChain([targets, 'access', _305 => _305[0], 'optionalAccess', _306 => _306.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;
4947
4951
  if (legacyEvents.length > 0 && !legacyTarget) {
4948
4952
  throw new Error(
4949
4953
  "--for is supported only by the legacy one-Slack-target form. Create the group first, then add rules in notification configuration."
@@ -4979,7 +4983,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4979
4983
  const existingGroup = current.configuration.groups.find(
4980
4984
  (candidate) => candidate.name.toLowerCase() === name.toLowerCase()
4981
4985
  );
4982
- const groupKey = _nullishCoalesce(_optionalChain([existingGroup, 'optionalAccess', _307 => _307.groupKey]), () => ( notificationObjectKey("group")));
4986
+ const groupKey = _nullishCoalesce(_optionalChain([existingGroup, 'optionalAccess', _301 => _301.groupKey]), () => ( notificationObjectKey("group")));
4983
4987
  const group = _nullishCoalesce(existingGroup, () => ( {
4984
4988
  groupKey,
4985
4989
  name,
@@ -5197,13 +5201,13 @@ var DeeplineClient = (_class = class _DeeplineClient {
5197
5201
  */
5198
5202
  async getPlay(name, options) {
5199
5203
  const encodedName = encodeURIComponent(name);
5200
- const query = _optionalChain([options, 'optionalAccess', _308 => _308.source]) ? `?include=source&revision=${encodeURIComponent(options.source)}` : _optionalChain([options, 'optionalAccess', _309 => _309.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" : "";
5201
5205
  return this.http.get(`/api/v2/plays/${encodedName}${query}`);
5202
5206
  }
5203
5207
  /** Read one trigger inventory page without loading run histories. */
5204
5208
  async listPlayTriggerInventory(options) {
5205
5209
  const params = new URLSearchParams({ view: "inventory" });
5206
- if (_optionalChain([options, 'optionalAccess', _310 => _310.cursor])) params.set("cursor", options.cursor);
5210
+ if (_optionalChain([options, 'optionalAccess', _304 => _304.cursor])) params.set("cursor", options.cursor);
5207
5211
  return this.http.get(`/api/v2/plays/triggers?${params}`);
5208
5212
  }
5209
5213
  /** Read one trigger's recent runs, with an explicit partial-history flag. */
@@ -5212,7 +5216,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5212
5216
  view: "history",
5213
5217
  binding_id: bindingId
5214
5218
  });
5215
- if (_optionalChain([options, 'optionalAccess', _311 => _311.limit]) !== void 0)
5219
+ if (_optionalChain([options, 'optionalAccess', _305 => _305.limit]) !== void 0)
5216
5220
  params.set("history_limit", String(options.limit));
5217
5221
  return this.http.get(`/api/v2/plays/triggers?${params}`);
5218
5222
  }
@@ -5248,7 +5252,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5248
5252
  */
5249
5253
  async listPlayVersions(name, options) {
5250
5254
  const encodedName = encodeURIComponent(name);
5251
- const suffix = _optionalChain([options, 'optionalAccess', _312 => _312.full]) ? "?full=true" : "";
5255
+ const suffix = _optionalChain([options, 'optionalAccess', _306 => _306.full]) ? "?full=true" : "";
5252
5256
  const response = await this.http.get(
5253
5257
  `/api/v2/plays/${encodedName}/versions${suffix}`
5254
5258
  );
@@ -5401,14 +5405,14 @@ var DeeplineClient = (_class = class _DeeplineClient {
5401
5405
  */
5402
5406
  async runPlay(code, csvPath, name, options) {
5403
5407
  const { workflowId } = await this.submitPlay(code, csvPath, name, {
5404
- input: _optionalChain([options, 'optionalAccess', _313 => _313.input]),
5405
- sourceCode: _optionalChain([options, 'optionalAccess', _314 => _314.sourceCode]),
5406
- artifact: _optionalChain([options, 'optionalAccess', _315 => _315.artifact]),
5407
- compilerManifest: _optionalChain([options, 'optionalAccess', _316 => _316.compilerManifest]),
5408
- inputFile: _optionalChain([options, 'optionalAccess', _317 => _317.inputFile]),
5409
- packagedFiles: _optionalChain([options, 'optionalAccess', _318 => _318.packagedFiles]),
5410
- force: _optionalChain([options, 'optionalAccess', _319 => _319.force]),
5411
- forceToolRefresh: _optionalChain([options, 'optionalAccess', _320 => _320.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])
5412
5416
  });
5413
5417
  const start = Date.now();
5414
5418
  const state = {
@@ -5419,7 +5423,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5419
5423
  latest: null
5420
5424
  };
5421
5425
  let terminalObserved = null;
5422
- if (_optionalChain([options, 'optionalAccess', _321 => _321.signal, 'optionalAccess', _322 => _322.aborted])) {
5426
+ if (_optionalChain([options, 'optionalAccess', _315 => _315.signal, 'optionalAccess', _316 => _316.aborted])) {
5423
5427
  await this.cancelPlay(workflowId);
5424
5428
  return {
5425
5429
  success: false,
@@ -5430,9 +5434,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
5430
5434
  };
5431
5435
  }
5432
5436
  for await (const event of this.watchRunEvents(workflowId, {
5433
- signal: _optionalChain([options, 'optionalAccess', _323 => _323.signal])
5437
+ signal: _optionalChain([options, 'optionalAccess', _317 => _317.signal])
5434
5438
  })) {
5435
- if (_optionalChain([options, 'optionalAccess', _324 => _324.signal, 'optionalAccess', _325 => _325.aborted])) {
5439
+ if (_optionalChain([options, 'optionalAccess', _318 => _318.signal, 'optionalAccess', _319 => _319.aborted])) {
5436
5440
  await this.cancelPlay(workflowId);
5437
5441
  return {
5438
5442
  success: false,
@@ -5442,19 +5446,19 @@ var DeeplineClient = (_class = class _DeeplineClient {
5442
5446
  error: "Cancelled by user"
5443
5447
  };
5444
5448
  }
5445
- const previousStatus = _optionalChain([state, 'access', _326 => _326.latest, 'optionalAccess', _327 => _327.status]);
5449
+ const previousStatus = _optionalChain([state, 'access', _320 => _320.latest, 'optionalAccess', _321 => _321.status]);
5446
5450
  const status = updatePlayLiveStatusState(state, event);
5447
5451
  if (!status) {
5448
5452
  continue;
5449
5453
  }
5450
5454
  if (event.type !== "play.run.status" || status.status !== previousStatus) {
5451
- _optionalChain([options, 'optionalAccess', _328 => _328.onProgress, 'optionalCall', _329 => _329(status)]);
5455
+ _optionalChain([options, 'optionalAccess', _322 => _322.onProgress, 'optionalCall', _323 => _323(status)]);
5452
5456
  }
5453
5457
  if (_chunkLA46MMTLjs.isTerminalPlayRunLifecycleStatus.call(void 0, status.status)) {
5454
5458
  terminalObserved = status;
5455
5459
  }
5456
5460
  }
5457
- if (_optionalChain([options, 'optionalAccess', _330 => _330.signal, 'optionalAccess', _331 => _331.aborted])) {
5461
+ if (_optionalChain([options, 'optionalAccess', _324 => _324.signal, 'optionalAccess', _325 => _325.aborted])) {
5458
5462
  await this.cancelPlay(workflowId);
5459
5463
  return {
5460
5464
  success: false,
@@ -5507,7 +5511,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5507
5511
  const response = await this.http.get(
5508
5512
  `/api/v2/usage/events?request_id=${encodeURIComponent(normalizedRequestId)}`
5509
5513
  );
5510
- const event = _optionalChain([response, 'access', _332 => _332.entries, 'optionalAccess', _333 => _333[0]]);
5514
+ const event = _optionalChain([response, 'access', _326 => _326.entries, 'optionalAccess', _327 => _327[0]]);
5511
5515
  if (!event) {
5512
5516
  throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
5513
5517
  "No usage event was found for this request_id.",
@@ -5633,7 +5637,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5633
5637
  async cancelBillingSubscription(options) {
5634
5638
  return this.http.post(
5635
5639
  "/api/v2/billing/subscription/cancel",
5636
- { action: _optionalChain([options, 'optionalAccess', _334 => _334.undo]) ? "undo_cancel" : "cancel" }
5640
+ { action: _optionalChain([options, 'optionalAccess', _328 => _328.undo]) ? "undo_cancel" : "cancel" }
5637
5641
  );
5638
5642
  }
5639
5643
  /**
@@ -5645,7 +5649,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5645
5649
  */
5646
5650
  async listBillingInvoices(options) {
5647
5651
  const params = new URLSearchParams();
5648
- if (_optionalChain([options, 'optionalAccess', _335 => _335.limit]) !== void 0) {
5652
+ if (_optionalChain([options, 'optionalAccess', _329 => _329.limit]) !== void 0) {
5649
5653
  params.set("limit", String(options.limit));
5650
5654
  }
5651
5655
  const suffix = Array.from(params).length > 0 ? `?${params.toString()}` : "";
@@ -5755,7 +5759,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5755
5759
  /** Create a Stripe-hosted portal session for payment recovery and invoices. */
5756
5760
  async createTargetBillingPortalSession(options) {
5757
5761
  const response = await this.http.post(
5758
- _optionalChain([options, 'optionalAccess', _336 => _336.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",
5759
5763
  {}
5760
5764
  );
5761
5765
  return response.data;
@@ -5805,8 +5809,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
5805
5809
  return this.http.request("/api/v2/monitors/audit", {
5806
5810
  method: "POST",
5807
5811
  body: {
5808
- ..._optionalChain([options, 'optionalAccess', _337 => _337.fleetId]) ? { fleet_id: options.fleetId } : {},
5809
- ..._optionalChain([options, 'optionalAccess', _338 => _338.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 } : {}
5810
5814
  },
5811
5815
  maxRetries: 0
5812
5816
  });
@@ -5816,8 +5820,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
5816
5820
  return this.http.request("/api/v2/monitors/repair", {
5817
5821
  method: "POST",
5818
5822
  body: {
5819
- ..._optionalChain([options, 'optionalAccess', _339 => _339.fleetId]) ? { fleet_id: options.fleetId } : {},
5820
- ..._optionalChain([options, 'optionalAccess', _340 => _340.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 }
5821
5825
  },
5822
5826
  maxRetries: 0
5823
5827
  });
@@ -5825,7 +5829,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5825
5829
  /** Delivery and convergence health. Prefer `client.monitors.health(...)`. */
5826
5830
  async readMonitorsHealth(options) {
5827
5831
  const params = new URLSearchParams();
5828
- if (_optionalChain([options, 'optionalAccess', _341 => _341.fleetId])) params.set("fleet_id", options.fleetId);
5832
+ if (_optionalChain([options, 'optionalAccess', _335 => _335.fleetId])) params.set("fleet_id", options.fleetId);
5829
5833
  const query = params.toString();
5830
5834
  const suffix = query ? `?${query}` : "";
5831
5835
  return this.http.request(
@@ -5898,7 +5902,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5898
5902
  );
5899
5903
  }
5900
5904
  const params = new URLSearchParams();
5901
- if (_optionalChain([options, 'optionalAccess', _342 => _342.cursor])) params.set("cursor", options.cursor);
5905
+ if (_optionalChain([options, 'optionalAccess', _336 => _336.cursor])) params.set("cursor", options.cursor);
5902
5906
  const suffix = params.size > 0 ? `?${params}` : "";
5903
5907
  return this.http.request(
5904
5908
  `/api/v2/monitors/batch/${encodeURIComponent(runId)}${suffix}`,
@@ -5942,7 +5946,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5942
5946
  * `client.monitors.deploy(...)`.
5943
5947
  */
5944
5948
  async deployMonitor(definition, options) {
5945
- if (_optionalChain([options, 'optionalAccess', _343 => _343.dryRun])) {
5949
+ if (_optionalChain([options, 'optionalAccess', _337 => _337.dryRun])) {
5946
5950
  return this.http.request("/api/v2/monitors/check", {
5947
5951
  method: "POST",
5948
5952
  body: definition
@@ -5978,12 +5982,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
5978
5982
  /** List deployed monitors. Prefer `client.monitors.list(...)`. */
5979
5983
  async listMonitors(options) {
5980
5984
  const params = new URLSearchParams();
5981
- if (_optionalChain([options, 'optionalAccess', _344 => _344.state])) params.set("state", options.state);
5982
- else if (_optionalChain([options, 'optionalAccess', _345 => _345.status])) params.set("status", options.status);
5983
- if (_optionalChain([options, 'optionalAccess', _346 => _346.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)
5984
5988
  params.set("limit", String(options.limit));
5985
- if (_optionalChain([options, 'optionalAccess', _347 => _347.cursor])) params.set("cursor", options.cursor);
5986
- if (_optionalChain([options, 'optionalAccess', _348 => _348.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");
5987
5991
  const query = params.toString();
5988
5992
  const suffix = query ? `?${query}` : "";
5989
5993
  return this.http.request(
@@ -5999,7 +6003,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5999
6003
  );
6000
6004
  }
6001
6005
  async testMonitorWebhook(key, payload, options) {
6002
- if (_optionalChain([options, 'optionalAccess', _349 => _349.dispatch]) === true || _optionalChain([options, 'optionalAccess', _350 => _350.validationOnly]) === false) {
6006
+ if (_optionalChain([options, 'optionalAccess', _343 => _343.dispatch]) === true || _optionalChain([options, 'optionalAccess', _344 => _344.validationOnly]) === false) {
6003
6007
  throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
6004
6008
  "Monitor tests are validation-only and cannot dispatch events.",
6005
6009
  void 0,
@@ -6054,7 +6058,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6054
6058
  }
6055
6059
  /** Delete a deployed monitor and its upstream provider resource. `dryRun` returns the delete plan. Prefer `client.monitors.delete(...)`. */
6056
6060
  async deleteMonitor(key, options) {
6057
- if (_optionalChain([options, 'optionalAccess', _351 => _351.localOnly]) === true) {
6061
+ if (_optionalChain([options, 'optionalAccess', _345 => _345.localOnly]) === true) {
6058
6062
  throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
6059
6063
  "localOnly monitor deletion is no longer supported. Monitor deletion always deprovisions the upstream provider resource.",
6060
6064
  void 0,
@@ -6062,11 +6066,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
6062
6066
  );
6063
6067
  }
6064
6068
  const params = new URLSearchParams();
6065
- if (_optionalChain([options, 'optionalAccess', _352 => _352.dryRun])) params.set("dry_run", "true");
6069
+ if (_optionalChain([options, 'optionalAccess', _346 => _346.dryRun])) params.set("dry_run", "true");
6066
6070
  const query = params.toString();
6067
6071
  return this.http.request(
6068
6072
  `/api/v2/monitors/deployed/${encodeURIComponent(key)}${query ? `?${query}` : ""}`,
6069
- _optionalChain([options, 'optionalAccess', _353 => _353.dryRun]) ? { method: "DELETE" } : {
6073
+ _optionalChain([options, 'optionalAccess', _347 => _347.dryRun]) ? { method: "DELETE" } : {
6070
6074
  method: "DELETE",
6071
6075
  // Deletion is a provider lifecycle operation. A timeout is an
6072
6076
  // unknown outcome, not authority to begin another delete attempt.
@@ -6079,10 +6083,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
6079
6083
  * Prefer `client.monitors.reactivate(...)`.
6080
6084
  */
6081
6085
  async reactivateMonitor(key, options) {
6082
- const query = _optionalChain([options, 'optionalAccess', _354 => _354.dryRun]) ? "?dry_run=true" : "";
6086
+ const query = _optionalChain([options, 'optionalAccess', _348 => _348.dryRun]) ? "?dry_run=true" : "";
6083
6087
  return this.http.request(
6084
6088
  `/api/v2/monitors/deployed/${encodeURIComponent(key)}/reactivate${query}`,
6085
- _optionalChain([options, 'optionalAccess', _355 => _355.dryRun]) ? { method: "POST", body: {} } : {
6089
+ _optionalChain([options, 'optionalAccess', _349 => _349.dryRun]) ? { method: "POST", body: {} } : {
6086
6090
  method: "POST",
6087
6091
  body: {},
6088
6092
  // Reactivation can create an upstream resource, so it must not use
@@ -6096,7 +6100,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6096
6100
  // ——————————————————————————————————————————————————————————
6097
6101
  static __initStatic() {this.MONITOR_JOB_IDEMPOTENCY_KEY_MAX_LENGTH = 96}
6098
6102
  monitorJobIdempotencyKey(operation) {
6099
- const uuid = _nullishCoalesce(_optionalChain([globalThis, 'access', _356 => _356.crypto, 'optionalAccess', _357 => _357.randomUUID, 'optionalCall', _358 => _358()]), () => ( `${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)}`));
6100
6104
  const prefix = "monitor-job-";
6101
6105
  const safeOperation = operation.replace(/[^A-Za-z0-9._-]/g, "-");
6102
6106
  const maxOperationLength = Math.max(
@@ -6107,7 +6111,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6107
6111
  }
6108
6112
  monitorJobHeaders(operation, idempotencyKey) {
6109
6113
  return {
6110
- "Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _359 => _359.trim, 'call', _360 => _360()]) || this.monitorJobIdempotencyKey(operation)
6114
+ "Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _353 => _353.trim, 'call', _354 => _354()]) || this.monitorJobIdempotencyKey(operation)
6111
6115
  };
6112
6116
  }
6113
6117
  async deployMonitorBatch(definitions, options) {
@@ -6118,7 +6122,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6118
6122
  body: { version: 1, kind: "batch", monitors: definitions },
6119
6123
  headers: this.monitorJobHeaders(
6120
6124
  "batch-deploy",
6121
- _optionalChain([options, 'optionalAccess', _361 => _361.idempotencyKey])
6125
+ _optionalChain([options, 'optionalAccess', _355 => _355.idempotencyKey])
6122
6126
  ),
6123
6127
  maxRetries: 0,
6124
6128
  exactUrlOnly: true
@@ -6137,11 +6141,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
6137
6141
  version: 1,
6138
6142
  kind: "batch",
6139
6143
  monitors: definitions,
6140
- ..._optionalChain([options, 'optionalAccess', _362 => _362.expectedGeneration]) === void 0 ? {} : { expected_generation: options.expectedGeneration }
6144
+ ..._optionalChain([options, 'optionalAccess', _356 => _356.expectedGeneration]) === void 0 ? {} : { expected_generation: options.expectedGeneration }
6141
6145
  },
6142
6146
  headers: this.monitorJobHeaders(
6143
6147
  `batch-sync-${batchId}`,
6144
- _optionalChain([options, 'optionalAccess', _363 => _363.idempotencyKey])
6148
+ _optionalChain([options, 'optionalAccess', _357 => _357.idempotencyKey])
6145
6149
  ),
6146
6150
  maxRetries: 0,
6147
6151
  exactUrlOnly: true
@@ -6156,7 +6160,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6156
6160
  body: {},
6157
6161
  headers: this.monitorJobHeaders(
6158
6162
  `batch-start-${batchId}`,
6159
- _optionalChain([options, 'optionalAccess', _364 => _364.idempotencyKey])
6163
+ _optionalChain([options, 'optionalAccess', _358 => _358.idempotencyKey])
6160
6164
  ),
6161
6165
  maxRetries: 0,
6162
6166
  exactUrlOnly: true
@@ -6171,7 +6175,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6171
6175
  body: {},
6172
6176
  headers: this.monitorJobHeaders(
6173
6177
  `batch-stop-${batchId}`,
6174
- _optionalChain([options, 'optionalAccess', _365 => _365.idempotencyKey])
6178
+ _optionalChain([options, 'optionalAccess', _359 => _359.idempotencyKey])
6175
6179
  ),
6176
6180
  maxRetries: 0,
6177
6181
  exactUrlOnly: true
@@ -6192,7 +6196,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6192
6196
  body: {},
6193
6197
  headers: this.monitorJobHeaders(
6194
6198
  `${action}-${monitorKey}`,
6195
- _optionalChain([options, 'optionalAccess', _366 => _366.idempotencyKey])
6199
+ _optionalChain([options, 'optionalAccess', _360 => _360.idempotencyKey])
6196
6200
  ),
6197
6201
  maxRetries: 0,
6198
6202
  exactUrlOnly: true
@@ -6205,7 +6209,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6205
6209
  body: definition,
6206
6210
  headers: this.monitorJobHeaders(
6207
6211
  `sync-${definition.key}`,
6208
- _optionalChain([options, 'optionalAccess', _367 => _367.idempotencyKey])
6212
+ _optionalChain([options, 'optionalAccess', _361 => _361.idempotencyKey])
6209
6213
  ),
6210
6214
  maxRetries: 0,
6211
6215
  exactUrlOnly: true
@@ -6218,7 +6222,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6218
6222
  );
6219
6223
  }
6220
6224
  async getMonitorJobLogs(jobId, options) {
6221
- const query = _optionalChain([options, 'optionalAccess', _368 => _368.limit]) === void 0 ? "" : `?limit=${encodeURIComponent(String(options.limit))}`;
6225
+ const query = _optionalChain([options, 'optionalAccess', _362 => _362.limit]) === void 0 ? "" : `?limit=${encodeURIComponent(String(options.limit))}`;
6222
6226
  return this.http.request(
6223
6227
  `/api/v2/monitors/jobs/${encodeURIComponent(jobId)}/logs${query}`,
6224
6228
  { method: "GET" }
@@ -6231,15 +6235,15 @@ var DeeplineClient = (_class = class _DeeplineClient {
6231
6235
  );
6232
6236
  }
6233
6237
  async waitForMonitorJob(jobId, options) {
6234
- const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _369 => _369.timeoutMs]), () => ( 10 * 6e4)));
6235
- const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _370 => _370.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)));
6236
6240
  const terminal = /* @__PURE__ */ new Set(["succeeded", "failed", "cancelled"]);
6237
6241
  const startedAt = Date.now();
6238
6242
  let latest = await this.getMonitorJob(jobId);
6239
6243
  while (true) {
6240
- _optionalChain([options, 'optionalAccess', _371 => _371.onProgress, 'optionalCall', _372 => _372(latest)]);
6244
+ _optionalChain([options, 'optionalAccess', _365 => _365.onProgress, 'optionalCall', _366 => _366(latest)]);
6241
6245
  const job = latest.job;
6242
- const state = typeof _optionalChain([job, 'optionalAccess', _373 => _373.state]) === "string" ? job.state : void 0;
6246
+ const state = typeof _optionalChain([job, 'optionalAccess', _367 => _367.state]) === "string" ? job.state : void 0;
6243
6247
  if (state && terminal.has(state)) return latest;
6244
6248
  if (Date.now() - startedAt >= timeoutMs) return latest;
6245
6249
  await sleep(pollIntervalMs);
@@ -6250,12 +6254,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
6250
6254
  // Monitor Fleets
6251
6255
  // ——————————————————————————————————————————————————————————
6252
6256
  monitorFleetIdempotencyKey(operation) {
6253
- const uuid = _optionalChain([globalThis, 'access', _374 => _374.crypto, 'optionalAccess', _375 => _375.randomUUID, 'optionalCall', _376 => _376()]);
6257
+ const uuid = _optionalChain([globalThis, 'access', _368 => _368.crypto, 'optionalAccess', _369 => _369.randomUUID, 'optionalCall', _370 => _370()]);
6254
6258
  return `monitor-fleet-${operation}-${_nullishCoalesce(uuid, () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`))}`;
6255
6259
  }
6256
6260
  monitorFleetHeaders(operation, idempotencyKey) {
6257
6261
  return {
6258
- "Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _377 => _377.trim, 'call', _378 => _378()]) || this.monitorFleetIdempotencyKey(operation)
6262
+ "Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _371 => _371.trim, 'call', _372 => _372()]) || this.monitorFleetIdempotencyKey(operation)
6259
6263
  };
6260
6264
  }
6261
6265
  monitorFleetPath(fleetId) {
@@ -6275,15 +6279,15 @@ var DeeplineClient = (_class = class _DeeplineClient {
6275
6279
  const fleetId = typeof definitionOrId === "string" ? definitionOrId : definitionOrId.id;
6276
6280
  const body = {
6277
6281
  ...typeof definitionOrId === "string" ? {} : { definition: definitionOrId },
6278
- ..._optionalChain([options, 'optionalAccess', _379 => _379.dryRun]) ? { dry_run: true } : {},
6279
- ..._optionalChain([options, 'optionalAccess', _380 => _380.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 } : {}
6280
6284
  };
6281
6285
  return this.http.request(
6282
6286
  this.monitorFleetPath(fleetId),
6283
6287
  {
6284
6288
  method: "PUT",
6285
6289
  body,
6286
- headers: this.monitorFleetHeaders("sync", _optionalChain([options, 'optionalAccess', _381 => _381.idempotencyKey])),
6290
+ headers: this.monitorFleetHeaders("sync", _optionalChain([options, 'optionalAccess', _375 => _375.idempotencyKey])),
6287
6291
  maxRetries: 0,
6288
6292
  exactUrlOnly: true
6289
6293
  }
@@ -6296,8 +6300,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
6296
6300
  }
6297
6301
  async getMonitorFleet(fleetId, options) {
6298
6302
  const params = new URLSearchParams();
6299
- if (_optionalChain([options, 'optionalAccess', _382 => _382.drift])) params.set("drift", "1");
6300
- if (_optionalChain([options, 'optionalAccess', _383 => _383.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)
6301
6305
  params.set("limit", String(options.limit));
6302
6306
  const query = params.toString();
6303
6307
  return this.http.request(
@@ -6310,10 +6314,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
6310
6314
  this.monitorFleetPath(fleetId),
6311
6315
  {
6312
6316
  method: "DELETE",
6313
- body: _optionalChain([options, 'optionalAccess', _384 => _384.dryRun]) ? { dry_run: true } : {},
6317
+ body: _optionalChain([options, 'optionalAccess', _378 => _378.dryRun]) ? { dry_run: true } : {},
6314
6318
  headers: this.monitorFleetHeaders(
6315
6319
  "deactivate",
6316
- _optionalChain([options, 'optionalAccess', _385 => _385.idempotencyKey])
6320
+ _optionalChain([options, 'optionalAccess', _379 => _379.idempotencyKey])
6317
6321
  ),
6318
6322
  maxRetries: 0,
6319
6323
  exactUrlOnly: true
@@ -6328,7 +6332,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6328
6332
  body: {},
6329
6333
  headers: this.monitorFleetHeaders(
6330
6334
  "reactivate",
6331
- _optionalChain([options, 'optionalAccess', _386 => _386.idempotencyKey])
6335
+ _optionalChain([options, 'optionalAccess', _380 => _380.idempotencyKey])
6332
6336
  ),
6333
6337
  maxRetries: 0,
6334
6338
  exactUrlOnly: true
@@ -6345,13 +6349,13 @@ var DeeplineClient = (_class = class _DeeplineClient {
6345
6349
  * identical to "the request failed".
6346
6350
  */
6347
6351
  async waitForMonitorFleetConvergence(fleetId, options) {
6348
- const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _387 => _387.timeoutMs]), () => ( 10 * 6e4)));
6349
- const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _388 => _388.pollIntervalMs]), () => ( 2e3)));
6350
- const terminal = _optionalChain([options, 'optionalAccess', _389 => _389.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"]);
6351
6355
  const startedAt = Date.now();
6352
6356
  let latest = await this.getMonitorFleet(fleetId);
6353
6357
  while (true) {
6354
- _optionalChain([options, 'optionalAccess', _390 => _390.onProgress, 'optionalCall', _391 => _391(latest)]);
6358
+ _optionalChain([options, 'optionalAccess', _384 => _384.onProgress, 'optionalCall', _385 => _385(latest)]);
6355
6359
  const status = typeof latest.status === "string" ? latest.status : void 0;
6356
6360
  if (status && terminal.has(status)) return latest;
6357
6361
  if (Date.now() - startedAt >= timeoutMs) return latest;