deepline 0.3.524 → 0.3.526

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 (176) hide show
  1. package/dist/bundling-sources/sdk/src/agent-runtime.ts +98 -0
  2. package/dist/bundling-sources/sdk/src/client-core.ts +8 -0
  3. package/dist/bundling-sources/sdk/src/http-core.ts +14 -0
  4. package/dist/bundling-sources/sdk/src/plays/play-description.ts +1 -0
  5. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  6. package/dist/bundling-sources/sdk/src/types.ts +10 -0
  7. package/dist/bundling-sources/shared_libs/observability/dlq.ts +33 -5
  8. package/dist/bundling-sources/shared_libs/observability/queue-health.ts +9 -0
  9. package/dist/bundling-sources/shared_libs/observability/queue-item-connectors.ts +1 -0
  10. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +38 -0
  11. package/dist/bundling-sources/shared_libs/play-runtime/freshness-receipt-execution.ts +94 -9
  12. package/dist/bundling-sources/shared_libs/play-runtime/run-failure-class.ts +98 -0
  13. package/dist/bundling-sources/shared_libs/play-runtime/run-retry-summary.ts +202 -0
  14. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal.ts +60 -8
  15. package/dist/bundling-sources/shared_libs/play-runtime/runtime-telemetry.ts +112 -0
  16. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +39 -1
  17. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/durable-run-inventory.ts +2 -2
  18. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/durable-run-sql.ts +52 -5
  19. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/play-run-recovery.ts +10 -1
  20. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-retry-facts.ts +62 -0
  21. package/dist/cli/{auth-QXJMVLPN.mjs → auth-JATW5XZE.mjs} +5 -5
  22. package/dist/cli/auth-L2POG3LL.js +43 -0
  23. package/dist/cli/{billing-N5R4HTHT.js → billing-TSHBJIJS.js} +83 -83
  24. package/dist/cli/{billing-SNSIFM4B.mjs → billing-UT5LIESH.mjs} +8 -8
  25. package/dist/cli/{chunk-PFKWKWUJ.mjs → chunk-26ULNPQ7.mjs} +2 -2
  26. package/dist/cli/{chunk-OQ5G7RFQ.mjs → chunk-2GJW4RAQ.mjs} +70 -3
  27. package/dist/cli/{chunk-HLAFGQPV.mjs → chunk-2JNX3MDG.mjs} +5 -2
  28. package/dist/cli/{chunk-V7KUBDEB.js → chunk-3MYI3IXW.js} +144 -141
  29. package/dist/cli/{chunk-WOEPDSO3.js → chunk-3ZEV5BS5.js} +26 -26
  30. package/dist/cli/{chunk-ATATJNJ6.js → chunk-46HEYGLY.js} +9 -9
  31. package/dist/cli/{chunk-I75VRGQG.js → chunk-477PXM65.js} +22 -22
  32. package/dist/cli/{chunk-RVHUW4TN.js → chunk-5YAJGRWB.js} +17 -17
  33. package/dist/cli/{chunk-T43FF5PF.mjs → chunk-6COGHW7B.mjs} +2 -2
  34. package/dist/cli/{chunk-V4RJ57MA.js → chunk-6DHEV6IA.js} +2 -2
  35. package/dist/cli/{chunk-VHTVXS5A.js → chunk-6H56LKJB.js} +16 -16
  36. package/dist/cli/{chunk-YKFW3NNA.mjs → chunk-6JMWATX5.mjs} +5 -5
  37. package/dist/cli/{chunk-II3BJKCH.mjs → chunk-77RAGJIZ.mjs} +2 -2
  38. package/dist/cli/{chunk-ITJ7NB2D.mjs → chunk-7AOFSZJM.mjs} +3 -1
  39. package/dist/cli/{chunk-OCT4SUJA.js → chunk-7COEN3IR.js} +146 -79
  40. package/dist/cli/{chunk-XURWFEXM.mjs → chunk-7FCD34YS.mjs} +31 -17
  41. package/dist/cli/{chunk-BXVYVIMB.js → chunk-B33J4YCC.js} +3 -3
  42. package/dist/cli/{chunk-RTDX5NNN.mjs → chunk-BFH3DJYV.mjs} +84 -57
  43. package/dist/cli/{chunk-GJYLC4JB.mjs → chunk-BNH4Y35W.mjs} +2 -2
  44. package/dist/cli/{chunk-GMO3JDZA.mjs → chunk-BVITYMBK.mjs} +2 -2
  45. package/dist/cli/{chunk-7QM6DNR4.js → chunk-BYEF4RBX.js} +11 -11
  46. package/dist/cli/{chunk-536TGWR6.mjs → chunk-C3EW6I65.mjs} +2 -2
  47. package/dist/cli/{chunk-HTYT2OHB.js → chunk-CDP3LMDT.js} +6 -6
  48. package/dist/cli/{chunk-YXVYPYIP.js → chunk-CYN2AHR6.js} +10 -10
  49. package/dist/cli/{chunk-CH7JVSA7.mjs → chunk-D2XMFXFM.mjs} +8 -8
  50. package/dist/cli/{chunk-2ZWNIS54.js → chunk-D5OEUPPM.js} +269 -269
  51. package/dist/cli/{chunk-FXTV5B3D.mjs → chunk-DY2AT3JQ.mjs} +12 -12
  52. package/dist/cli/{chunk-Z4MOEQSY.js → chunk-ED2N4NRI.js} +21 -21
  53. package/dist/cli/{chunk-RIX26ZJD.mjs → chunk-EEYZLTXX.mjs} +1 -1
  54. package/dist/cli/{chunk-7E6B7VMS.js → chunk-F5KFGF45.js} +5 -5
  55. package/dist/cli/{chunk-TZTWH53O.js → chunk-FMPGWAIR.js} +1 -1
  56. package/dist/cli/{chunk-R2VZVHJP.mjs → chunk-GESIFFQX.mjs} +1 -1
  57. package/dist/cli/{chunk-YCIXY66B.mjs → chunk-HPACLONQ.mjs} +2 -2
  58. package/dist/cli/{chunk-WCVIPZWX.mjs → chunk-IMP7WR22.mjs} +5 -5
  59. package/dist/cli/{chunk-KSQXBLRW.mjs → chunk-IWLDJQGV.mjs} +3 -3
  60. package/dist/cli/{chunk-EQNAQENZ.js → chunk-J5OXJ4JI.js} +2 -2
  61. package/dist/cli/{chunk-NUC7ZVDG.mjs → chunk-MQB25LMV.mjs} +5 -5
  62. package/dist/cli/{chunk-RUULUCBP.js → chunk-O7WUATQC.js} +97 -70
  63. package/dist/cli/{chunk-NMU3VR5U.js → chunk-PMH4GLMD.js} +1 -0
  64. package/dist/cli/{chunk-S3A4IXBQ.mjs → chunk-PSX3WHIH.mjs} +1 -0
  65. package/dist/cli/{chunk-LRWDZDBS.js → chunk-RZJWHL7L.js} +5 -5
  66. package/dist/cli/{chunk-66N76YZG.js → chunk-SCLRGDF4.js} +44 -44
  67. package/dist/cli/{chunk-SMWFOGUT.js → chunk-SJ6KUCGM.js} +53 -53
  68. package/dist/cli/{chunk-PFKKZVFK.js → chunk-TBQC2XS3.js} +41 -41
  69. package/dist/cli/{chunk-2ZX7XSAQ.mjs → chunk-TCLJXJAG.mjs} +4 -4
  70. package/dist/cli/{chunk-YGOI5ZE5.mjs → chunk-TVHDWS5U.mjs} +1 -1
  71. package/dist/cli/{chunk-MW3YMPD2.mjs → chunk-TXJW6RIM.mjs} +1 -1
  72. package/dist/cli/{chunk-KKPBCB6D.mjs → chunk-U6OUX47C.mjs} +2 -2
  73. package/dist/cli/{chunk-GTGJBZVH.js → chunk-UTCGCES2.js} +7 -7
  74. package/dist/cli/{chunk-V2YIBBVT.mjs → chunk-UUIC2JFZ.mjs} +1 -1
  75. package/dist/cli/{chunk-JDIQBZ6O.js → chunk-UWCEBS7F.js} +14 -14
  76. package/dist/cli/{chunk-ANKD3AIR.js → chunk-WBY3R55B.js} +2 -2
  77. package/dist/cli/{chunk-SF4QJVBE.js → chunk-WITNIMLE.js} +3 -3
  78. package/dist/cli/{chunk-7OQGZBDG.js → chunk-WL6GAZBD.js} +31 -17
  79. package/dist/cli/{chunk-R457IMHJ.mjs → chunk-WOLY6SU4.mjs} +1 -1
  80. package/dist/cli/{chunk-3WWTBQHC.mjs → chunk-XVIMOB2U.mjs} +2 -2
  81. package/dist/cli/{chunk-NTLBZUHD.js → chunk-XYIECA7M.js} +4 -2
  82. package/dist/cli/{chunk-BXIQD2IY.mjs → chunk-Y47OCS5V.mjs} +1 -1
  83. package/dist/cli/{chunk-EO55Y4QW.mjs → chunk-YNFPZVII.mjs} +5 -5
  84. package/dist/cli/{chunk-BN5VKY4X.js → chunk-ZS2WHWWL.js} +7 -7
  85. package/dist/cli/command-docs.js +2 -2
  86. package/dist/cli/command-docs.mjs +1 -1
  87. package/dist/cli/{csv-HT2JBCW2.mjs → csv-4BLFRED6.mjs} +4 -4
  88. package/dist/cli/{csv-Q2LWKXAV.js → csv-KSJB5Z3M.js} +13 -13
  89. package/dist/cli/{db-XEV4WEE4.js → db-G7Z5CKO2.js} +28 -28
  90. package/dist/cli/{db-CS3XQ2LX.mjs → db-OVW6C3DV.mjs} +7 -7
  91. package/dist/cli/describe-KMYR2JBC.js +50 -0
  92. package/dist/cli/describe-OEFTD7WQ.mjs +50 -0
  93. package/dist/cli/describe-core.d.mts +4 -2
  94. package/dist/cli/describe-core.d.ts +4 -2
  95. package/dist/cli/describe-core.js +5 -5
  96. package/dist/cli/describe-core.mjs +4 -4
  97. package/dist/cli/{executions-L6XFG5MP.mjs → executions-7ZKQ4ZU3.mjs} +7 -7
  98. package/dist/cli/{executions-JCC34WAD.js → executions-O7USCBCW.js} +9 -9
  99. package/dist/cli/{feedback-AWBDO5I6.mjs → feedback-KUBL5E3I.mjs} +61 -13
  100. package/dist/cli/{feedback-HV2M2G7N.js → feedback-Y55WCRIQ.js} +65 -17
  101. package/dist/cli/{git-S4LRXTRX.mjs → git-C6ZAU5JA.mjs} +5 -5
  102. package/dist/cli/git-NBVQ3VGW.js +25 -0
  103. package/dist/cli/index.js +145 -145
  104. package/dist/cli/index.mjs +44 -44
  105. package/dist/cli/{legacy-noops-7MOKBL4O.mjs → legacy-noops-MUXD4HRC.mjs} +6 -6
  106. package/dist/cli/{legacy-noops-RGSZUD6V.js → legacy-noops-OVWX4KB3.js} +9 -9
  107. package/dist/cli/{monitors-XQNXDZPQ.mjs → monitors-2ZSGBY52.mjs} +8 -8
  108. package/dist/cli/{monitors-JEFM2C5W.js → monitors-3QVYGYWA.js} +101 -101
  109. package/dist/cli/{org-KTMJZGTN.mjs → org-RDSPE5FB.mjs} +7 -7
  110. package/dist/cli/{org-GYLA5V32.js → org-S6Z3SDLI.js} +87 -87
  111. package/dist/cli/{pages-WOMU2T2O.mjs → pages-K5DSMHLJ.mjs} +7 -7
  112. package/dist/cli/{pages-RY4U7OCL.js → pages-VUWF2OR7.js} +19 -19
  113. package/dist/cli/{play-KOYGGNYS.mjs → play-PZLXOYEX.mjs} +151 -102
  114. package/dist/cli/{play-2Q6MWJ3D.js → play-SQOJTUFC.js} +756 -707
  115. package/dist/cli/{providers-7YKDITJC.mjs → providers-AMIGP3D4.mjs} +7 -7
  116. package/dist/cli/{providers-HOIRHMN2.js → providers-FZBEPUOI.js} +10 -10
  117. package/dist/cli/{quickstart-RDXHSMVX.mjs → quickstart-HNOQKGOF.mjs} +4 -4
  118. package/dist/cli/{quickstart-OWCJOSQA.js → quickstart-QIHZDBGM.js} +6 -6
  119. package/dist/cli/{run-MT2ABKO5.js → run-IQGM3TO2.js} +46 -46
  120. package/dist/cli/{run-RT73NDP5.mjs → run-JDW6BDNT.mjs} +27 -27
  121. package/dist/cli/search-BNWRL3YY.js +33 -0
  122. package/dist/cli/{search-CJPKIGSA.mjs → search-DMVUKJ23.mjs} +9 -9
  123. package/dist/cli/{search-output-AREMA544.mjs → search-output-5UAPUUHH.mjs} +4 -4
  124. package/dist/cli/{search-output-OSBZ7WK6.js → search-output-UUW6UNHF.js} +6 -6
  125. package/dist/cli/{secrets-BTIY2FEJ.mjs → secrets-46KSTPFN.mjs} +7 -7
  126. package/dist/cli/{secrets-OV6KH633.js → secrets-U532KN24.js} +16 -16
  127. package/dist/cli/sessions-JZUONXH4.js +22 -0
  128. package/dist/cli/sessions-RUNWYHYX.mjs +22 -0
  129. package/dist/cli/{settings-7BQIC7QN.mjs → settings-56L3WHCY.mjs} +14 -14
  130. package/dist/cli/{settings-LBIECYDB.js → settings-O2A37FFA.js} +87 -87
  131. package/dist/cli/{setup-QZE7QR3F.js → setup-ETFSMSCH.js} +50 -50
  132. package/dist/cli/{setup-XPTSNNES.mjs → setup-Q27X6JZY.mjs} +10 -10
  133. package/dist/cli/skills-IKDJ5JDN.js +37 -0
  134. package/dist/cli/{skills-TGGKIQLT.mjs → skills-WFQRZL4D.mjs} +8 -8
  135. package/dist/cli/tools-B735AA67.js +57 -0
  136. package/dist/cli/{tools-MKIFX2TQ.mjs → tools-EV6CKJOX.mjs} +20 -20
  137. package/dist/cli/update-CNNURAM3.js +35 -0
  138. package/dist/cli/{update-5R3D3WNH.mjs → update-KIPPFVCH.mjs} +10 -10
  139. package/dist/cli/{views-VPWEINIA.js → views-DNZ2HFTA.js} +19 -19
  140. package/dist/cli/{views-VHKDHHUP.mjs → views-LMJXWD4N.mjs} +7 -7
  141. package/dist/cli/{workflow-D5DF65N6.mjs → workflow-3XKUQ73U.mjs} +8 -8
  142. package/dist/cli/{workflow-7K2VEQ4V.js → workflow-ZUDTIOK6.js} +18 -18
  143. package/dist/{client-C5_6W8yd.d.mts → client-Bd2meveV.d.mts} +1 -1
  144. package/dist/{client-iXW4TOat.d.ts → client-CBCVhL8U.d.ts} +1 -1
  145. package/dist/{client-core-Dob428Z4.d.mts → client-core-CGj8V9mw.d.mts} +67 -0
  146. package/dist/{client-core-B-GPfmaC.d.ts → client-core-CsRRWCFy.d.ts} +67 -0
  147. package/dist/index.d.mts +3 -3
  148. package/dist/index.d.ts +3 -3
  149. package/dist/index.js +10 -10
  150. package/dist/index.mjs +7 -7
  151. package/dist/install-integrity.json +121 -118
  152. package/dist/plays/play-description.d.mts +1 -1
  153. package/dist/plays/play-description.d.ts +1 -1
  154. package/dist/plays/play-description.js +2 -2
  155. package/dist/plays/play-description.mjs +1 -1
  156. package/dist/plays/run-request.d.mts +1 -1
  157. package/dist/plays/run-request.d.ts +1 -1
  158. package/dist/release.d.mts +1 -1
  159. package/dist/release.d.ts +1 -1
  160. package/dist/release.js +2 -2
  161. package/dist/release.mjs +1 -1
  162. package/dist/server.d.mts +2 -2
  163. package/dist/server.d.ts +2 -2
  164. package/dist/server.js +6 -6
  165. package/dist/server.mjs +4 -4
  166. package/package.json +1 -1
  167. package/dist/cli/auth-OKPHHMMP.js +0 -43
  168. package/dist/cli/describe-5G5NXO5E.js +0 -50
  169. package/dist/cli/describe-OUTXLDGZ.mjs +0 -50
  170. package/dist/cli/git-GDPTG52F.js +0 -25
  171. package/dist/cli/search-7VBA6IGS.js +0 -33
  172. package/dist/cli/sessions-3CO3ZFOD.mjs +0 -18
  173. package/dist/cli/sessions-B3WNEWRW.js +0 -18
  174. package/dist/cli/skills-TXBRTWEV.js +0 -37
  175. package/dist/cli/tools-RZJV4X3J.js +0 -57
  176. package/dist/cli/update-YWGGPWUA.js +0 -35
@@ -24,14 +24,14 @@ var _chunk2KHUFWTKjs = require('./chunk-2KHUFWTK.js');
24
24
 
25
25
 
26
26
 
27
- var _chunkNMU3VR5Ujs = require('./chunk-NMU3VR5U.js');
27
+ var _chunkPMH4GLMDjs = require('./chunk-PMH4GLMD.js');
28
28
 
29
29
 
30
30
 
31
31
 
32
32
 
33
33
 
34
- var _chunkOCT4SUJAjs = require('./chunk-OCT4SUJA.js');
34
+ var _chunk7COEN3IRjs = require('./chunk-7COEN3IR.js');
35
35
 
36
36
 
37
37
  var _chunkT2N3B7IQjs = require('./chunk-T2N3B7IQ.js');
@@ -674,7 +674,7 @@ var ToolCalls = class {
674
674
  idempotencyKey,
675
675
  onResponse: (response2) => {
676
676
  lastResponse = null;
677
- atomicToolsSupported = response2.headers.get(_chunkOCT4SUJAjs.ATOMIC_TOOL_EXECUTE_SUPPORTED_HEADER) === "true";
677
+ atomicToolsSupported = response2.headers.get(_chunk7COEN3IRjs.ATOMIC_TOOL_EXECUTE_SUPPORTED_HEADER) === "true";
678
678
  recoverySupported = response2.headers.get("X-Deepline-Idempotency-Supported") === "true";
679
679
  if (_optionalChain([options, 'optionalAccess', _30 => _30.onServerTiming])) {
680
680
  try {
@@ -1060,8 +1060,8 @@ function runtimeSelectionHeaders(runtime, env) {
1060
1060
  }
1061
1061
  const receivers = _optionalChain([env, 'access', _55 => _55.DEEPLINE_RUNTIME_RETAINED_PIPELINE_RECEIVERS, 'optionalAccess', _56 => _56.trim, 'call', _57 => _57()]);
1062
1062
  return {
1063
- [_chunkOCT4SUJAjs.RUNTIME_ENVIRONMENT_TOKEN_HEADER]: token,
1064
- ...receivers ? { [_chunkOCT4SUJAjs.RETAINED_PIPELINE_RECEIVERS_HEADER]: receivers } : {}
1063
+ [_chunk7COEN3IRjs.RUNTIME_ENVIRONMENT_TOKEN_HEADER]: token,
1064
+ ...receivers ? { [_chunk7COEN3IRjs.RETAINED_PIPELINE_RECEIVERS_HEADER]: receivers } : {}
1065
1065
  };
1066
1066
  }
1067
1067
  function normalizeTestPolicyOverrides(value, source) {
@@ -1132,7 +1132,7 @@ var PlayClient = class {
1132
1132
  return _chunk2KHUFWTKjs.startPlayRun.call(void 0,
1133
1133
  this.http,
1134
1134
  resolved.request,
1135
- _optionalChain([options, 'optionalAccess', _65 => _65.cliAdmission]) ? { ...headers, "X-Deepline-API-Major": String(_chunkOCT4SUJAjs.SDK_API_MAJOR) } : headers,
1135
+ _optionalChain([options, 'optionalAccess', _65 => _65.cliAdmission]) ? { ...headers, "X-Deepline-API-Major": String(_chunk7COEN3IRjs.SDK_API_MAJOR) } : headers,
1136
1136
  options
1137
1137
  );
1138
1138
  }
@@ -3229,7 +3229,7 @@ function isolatedCiRuntimeEventReadHeaders(env) {
3229
3229
  "RUNTIME_EVENT_INTERNAL_TOKEN_REQUIRED"
3230
3230
  );
3231
3231
  }
3232
- return { [_chunkOCT4SUJAjs.COORDINATOR_INTERNAL_TOKEN_HEADER]: token };
3232
+ return { [_chunk7COEN3IRjs.COORDINATOR_INTERNAL_TOKEN_HEADER]: token };
3233
3233
  }
3234
3234
  function sleep(ms) {
3235
3235
  return new Promise((resolve) => setTimeout(resolve, ms));
@@ -4156,7 +4156,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4156
4156
  );
4157
4157
  const headers = _optionalChain([options, 'optionalAccess', _188 => _188.cliAdmission]) ? {
4158
4158
  ...runtimeHeaders,
4159
- "X-Deepline-API-Major": String(_chunkOCT4SUJAjs.SDK_API_MAJOR)
4159
+ "X-Deepline-API-Major": String(_chunk7COEN3IRjs.SDK_API_MAJOR)
4160
4160
  } : runtimeHeaders;
4161
4161
  const http = this.http;
4162
4162
  let submitted = false;
@@ -4835,12 +4835,15 @@ var DeeplineClient = (_class = class _DeeplineClient {
4835
4835
  if (_optionalChain([options, 'optionalAccess', _249 => _249.performance]) === true) {
4836
4836
  params.append("include", "performance");
4837
4837
  }
4838
+ if (_optionalChain([options, 'optionalAccess', _250 => _250.retries]) === true) {
4839
+ params.append("include", "retries");
4840
+ }
4838
4841
  const query = params.size > 0 ? `?${params.toString()}` : "";
4839
4842
  const response = await this.http.get(
4840
4843
  `/api/v2/runs/${encodeURIComponent(runId)}${query}`,
4841
4844
  { headers: { "x-deepline-run-status": "1" } }
4842
4845
  );
4843
- if (_optionalChain([options, 'optionalAccess', _250 => _250.configuration]) === true && !Object.hasOwn(response, "contract")) {
4846
+ if (_optionalChain([options, 'optionalAccess', _251 => _251.configuration]) === true && !Object.hasOwn(response, "contract")) {
4844
4847
  throw new (0, _chunkSQWET4SLjs.DeeplineError)(
4845
4848
  "This server does not support recorded configuration reads.",
4846
4849
  void 0,
@@ -4848,7 +4851,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4848
4851
  );
4849
4852
  }
4850
4853
  const status = normalizePlayStatus(response);
4851
- if (_optionalChain([options, 'optionalAccess', _251 => _251.failedLogs]) !== true || status.status !== "failed") {
4854
+ if (_optionalChain([options, 'optionalAccess', _252 => _252.failedLogs]) !== true || status.status !== "failed") {
4852
4855
  return status;
4853
4856
  }
4854
4857
  const requestedFailedLogLimit = typeof options.failedLogLimit === "number" && Number.isFinite(options.failedLogLimit) ? Math.max(1, Math.floor(options.failedLogLimit)) : RUNS_FAILED_LOG_LIMIT;
@@ -4937,7 +4940,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4937
4940
  /** The same tenant-scoped run history searched by the dashboard and CLI. */
4938
4941
  async getRunsHistory(options = {}) {
4939
4942
  const params = new URLSearchParams();
4940
- const search = _optionalChain([options, 'access', _252 => _252.search, 'optionalAccess', _253 => _253.trim, 'call', _254 => _254()]);
4943
+ const search = _optionalChain([options, 'access', _253 => _253.search, 'optionalAccess', _254 => _254.trim, 'call', _255 => _255()]);
4941
4944
  if (search && search.length > 200) {
4942
4945
  throw new Error("Run search must be at most 200 characters.");
4943
4946
  }
@@ -4963,16 +4966,16 @@ var DeeplineClient = (_class = class _DeeplineClient {
4963
4966
  }
4964
4967
  /** Read one run page without discarding server pagination metadata. */
4965
4968
  async listRunsPage(options) {
4966
- const playName = _optionalChain([options, 'access', _255 => _255.play, 'optionalAccess', _256 => _256.trim, 'call', _257 => _257()]);
4969
+ const playName = _optionalChain([options, 'access', _256 => _256.play, 'optionalAccess', _257 => _257.trim, 'call', _258 => _258()]);
4967
4970
  const params = new URLSearchParams();
4968
4971
  if (playName) {
4969
4972
  params.set("play", playName);
4970
4973
  }
4971
- const status = _optionalChain([options, 'access', _258 => _258.status, 'optionalAccess', _259 => _259.trim, 'call', _260 => _260()]);
4974
+ const status = _optionalChain([options, 'access', _259 => _259.status, 'optionalAccess', _260 => _260.trim, 'call', _261 => _261()]);
4972
4975
  if (status) {
4973
4976
  params.set("status", status);
4974
4977
  }
4975
- const node = _optionalChain([options, 'access', _261 => _261.node, 'optionalAccess', _262 => _262.trim, 'call', _263 => _263()]);
4978
+ const node = _optionalChain([options, 'access', _262 => _262.node, 'optionalAccess', _263 => _263.trim, 'call', _264 => _264()]);
4976
4979
  if (node) {
4977
4980
  if (!playName)
4978
4981
  throw new Error("runs.list options.node requires options.play.");
@@ -5046,8 +5049,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
5046
5049
  * A different key starts another rerun.
5047
5050
  */
5048
5051
  async rerun(runId, options) {
5049
- const idempotencyKey = _optionalChain([options, 'optionalAccess', _264 => _264.idempotencyKey, 'optionalAccess', _265 => _265.trim, 'call', _266 => _266()]);
5050
- if (_optionalChain([options, 'optionalAccess', _267 => _267.idempotencyKey]) !== void 0 && !idempotencyKey) {
5052
+ const idempotencyKey = _optionalChain([options, 'optionalAccess', _265 => _265.idempotencyKey, 'optionalAccess', _266 => _266.trim, 'call', _267 => _267()]);
5053
+ if (_optionalChain([options, 'optionalAccess', _268 => _268.idempotencyKey]) !== void 0 && !idempotencyKey) {
5051
5054
  throw new (0, _chunkSQWET4SLjs.DeeplineError)(
5052
5055
  "runs.rerun idempotencyKey must not be empty.",
5053
5056
  void 0,
@@ -5056,7 +5059,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5056
5059
  }
5057
5060
  return this.http.post(
5058
5061
  `/api/v2/runs/${encodeURIComponent(runId)}/rerun`,
5059
- _optionalChain([options, 'optionalAccess', _268 => _268.inputOverrides]) ? { inputOverrides: options.inputOverrides } : {},
5062
+ _optionalChain([options, 'optionalAccess', _269 => _269.inputOverrides]) ? { inputOverrides: options.inputOverrides } : {},
5060
5063
  { "Idempotency-Key": idempotencyKey || globalThis.crypto.randomUUID() }
5061
5064
  );
5062
5065
  }
@@ -5083,21 +5086,21 @@ var DeeplineClient = (_class = class _DeeplineClient {
5083
5086
  * ```
5084
5087
  */
5085
5088
  async getRunLogs(runId, options) {
5086
- if (_optionalChain([options, 'optionalAccess', _269 => _269.all]) === true && options.failed === true) {
5089
+ if (_optionalChain([options, 'optionalAccess', _270 => _270.all]) === true && options.failed === true) {
5087
5090
  throw new (0, _chunkSQWET4SLjs.DeeplineError)(
5088
5091
  "runs.logs cannot combine all and failed views.",
5089
5092
  void 0,
5090
5093
  "INVALID_RUN_LOG_VIEW"
5091
5094
  );
5092
5095
  }
5093
- if (_optionalChain([options, 'optionalAccess', _270 => _270.cursor]) !== void 0 && options.failed === true) {
5096
+ if (_optionalChain([options, 'optionalAccess', _271 => _271.cursor]) !== void 0 && options.failed === true) {
5094
5097
  throw new (0, _chunkSQWET4SLjs.DeeplineError)(
5095
5098
  "runs.logs cannot combine failed with cursor.",
5096
5099
  void 0,
5097
5100
  "INVALID_RUN_LOG_VIEW"
5098
5101
  );
5099
5102
  }
5100
- if (_optionalChain([options, 'optionalAccess', _271 => _271.failed]) === true) {
5103
+ if (_optionalChain([options, 'optionalAccess', _272 => _272.failed]) === true) {
5101
5104
  const requestedLimit = typeof options.limit === "number" && Number.isFinite(options.limit) && options.limit > 0 ? Math.trunc(options.limit) : RUNS_FAILED_LOG_LIMIT;
5102
5105
  const failedLimit = Math.min(RUNS_FAILED_LOG_LIMIT, requestedLimit);
5103
5106
  const page = await this.http.get(
@@ -5122,18 +5125,18 @@ var DeeplineClient = (_class = class _DeeplineClient {
5122
5125
  ...page.logsTruncated ? { logsTruncated: true } : {}
5123
5126
  };
5124
5127
  }
5125
- const beforeSequence = _optionalChain([options, 'optionalAccess', _272 => _272.cursor]) !== void 0 ? parseRunLogsCursor(options.cursor) : null;
5126
- const limit = _optionalChain([options, 'optionalAccess', _273 => _273.all]) ? Number.MAX_SAFE_INTEGER : typeof _optionalChain([options, 'optionalAccess', _274 => _274.limit]) === "number" && Number.isFinite(options.limit) && options.limit > 0 ? Math.trunc(options.limit) : 200;
5128
+ const beforeSequence = _optionalChain([options, 'optionalAccess', _273 => _273.cursor]) !== void 0 ? parseRunLogsCursor(options.cursor) : null;
5129
+ const limit = _optionalChain([options, 'optionalAccess', _274 => _274.all]) ? Number.MAX_SAFE_INTEGER : typeof _optionalChain([options, 'optionalAccess', _275 => _275.limit]) === "number" && Number.isFinite(options.limit) && options.limit > 0 ? Math.trunc(options.limit) : 200;
5127
5130
  const fetchPage = (afterSeq2, pageLimit) => this.http.get(
5128
5131
  `/api/v2/runs/${encodeURIComponent(runId)}/logs?afterSeq=${afterSeq2}&limit=${pageLimit}`,
5129
5132
  { retryApiErrors: true }
5130
5133
  );
5131
5134
  const probe = await fetchPage(0, 1);
5132
5135
  const lastStoredSeq = probe.lastStoredSeq;
5133
- const oldestStoredSeq = _nullishCoalesce(_optionalChain([probe, 'access', _275 => _275.entries, 'access', _276 => _276[0], 'optionalAccess', _277 => _277.seq]), () => ( null));
5136
+ const oldestStoredSeq = _nullishCoalesce(_optionalChain([probe, 'access', _276 => _276.entries, 'access', _277 => _277[0], 'optionalAccess', _278 => _278.seq]), () => ( null));
5134
5137
  const upperSeq = beforeSequence === null ? lastStoredSeq : Math.min(beforeSequence - 1, lastStoredSeq);
5135
5138
  const windowEndSeq = Math.min(upperSeq, lastStoredSeq);
5136
- let afterSeq = _optionalChain([options, 'optionalAccess', _278 => _278.all]) ? 0 : Math.max(0, windowEndSeq - limit);
5139
+ let afterSeq = _optionalChain([options, 'optionalAccess', _279 => _279.all]) ? 0 : Math.max(0, windowEndSeq - limit);
5137
5140
  const entries = [];
5138
5141
  while (entries.length < limit && afterSeq < upperSeq) {
5139
5142
  const page = await fetchPage(
@@ -5167,7 +5170,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5167
5170
  hasMore: olderLinesExist,
5168
5171
  nextCursor: olderLinesExist ? encodeRunLogsCursor(firstSequence) : null,
5169
5172
  entries: entries.map((entry) => entry.line),
5170
- view: _optionalChain([options, 'optionalAccess', _279 => _279.all]) ? "all" : "tail",
5173
+ view: _optionalChain([options, 'optionalAccess', _280 => _280.all]) ? "all" : "tail",
5171
5174
  ...probe.logsTruncated ? { logsTruncated: true } : {}
5172
5175
  };
5173
5176
  }
@@ -5343,7 +5346,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5343
5346
  limit: String(_nullishCoalesce(input.limit, () => ( 5e3))),
5344
5347
  offset: String(_nullishCoalesce(input.offset, () => ( 0)))
5345
5348
  });
5346
- if (_optionalChain([input, 'access', _280 => _280.runId, 'optionalAccess', _281 => _281.trim, 'call', _282 => _282()])) {
5349
+ if (_optionalChain([input, 'access', _281 => _281.runId, 'optionalAccess', _282 => _282.trim, 'call', _283 => _283()])) {
5347
5350
  params.set("runId", input.runId.trim());
5348
5351
  }
5349
5352
  if (input.rowMode === "all" || input.rowMode === "live") {
@@ -5356,9 +5359,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
5356
5359
  `/api/v2/plays/${encodeURIComponent(input.playName)}/sheet?${params.toString()}`,
5357
5360
  { signal: input.signal }
5358
5361
  );
5359
- const requestedRunId = _optionalChain([input, 'access', _283 => _283.runId, 'optionalAccess', _284 => _284.trim, 'call', _285 => _285()]) || "";
5362
+ const requestedRunId = _optionalChain([input, 'access', _284 => _284.runId, 'optionalAccess', _285 => _285.trim, 'call', _286 => _286()]) || "";
5360
5363
  if (requestedRunId) {
5361
- const confirmedRunId = _optionalChain([result, 'access', _286 => _286.scope, 'optionalAccess', _287 => _287.kind]) === "run" ? result.scope.runId.trim() : "";
5364
+ const confirmedRunId = _optionalChain([result, 'access', _287 => _287.scope, 'optionalAccess', _288 => _288.kind]) === "run" ? result.scope.runId.trim() : "";
5362
5365
  const foreignRowRunIds = [
5363
5366
  ...new Set(
5364
5367
  result.rows.map(
@@ -5366,7 +5369,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5366
5369
  ).filter((runId) => runId && runId !== requestedRunId)
5367
5370
  )
5368
5371
  ];
5369
- if (_optionalChain([result, 'access', _288 => _288.scope, 'optionalAccess', _289 => _289.kind]) !== "run" || confirmedRunId !== requestedRunId || foreignRowRunIds.length > 0) {
5372
+ if (_optionalChain([result, 'access', _289 => _289.scope, 'optionalAccess', _290 => _290.kind]) !== "run" || confirmedRunId !== requestedRunId || foreignRowRunIds.length > 0) {
5370
5373
  throw new (0, _chunkSQWET4SLjs.DeeplineError)(
5371
5374
  `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.`,
5372
5375
  void 0,
@@ -5395,7 +5398,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5395
5398
  async stopRun(runId, options) {
5396
5399
  return this.http.post(
5397
5400
  `/api/v2/runs/${encodeURIComponent(runId)}/stop`,
5398
- _optionalChain([options, 'optionalAccess', _290 => _290.reason]) ? { reason: options.reason } : {}
5401
+ _optionalChain([options, 'optionalAccess', _291 => _291.reason]) ? { reason: options.reason } : {}
5399
5402
  );
5400
5403
  }
5401
5404
  /**
@@ -5413,11 +5416,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
5413
5416
  * The method clears workspace run-slot state without requiring each run ID.
5414
5417
  */
5415
5418
  async stopAllRuns(options) {
5416
- const dryRun = _optionalChain([options, 'optionalAccess', _291 => _291.dryRun]) === true;
5419
+ const dryRun = _optionalChain([options, 'optionalAccess', _292 => _292.dryRun]) === true;
5417
5420
  const result = await this.http.post(
5418
5421
  "/api/v2/runs/stop-all",
5419
5422
  {
5420
- ..._optionalChain([options, 'optionalAccess', _292 => _292.reason]) ? { reason: options.reason } : {},
5423
+ ..._optionalChain([options, 'optionalAccess', _293 => _293.reason]) ? { reason: options.reason } : {},
5421
5424
  ...dryRun ? { dryRun: true } : {}
5422
5425
  }
5423
5426
  );
@@ -5438,7 +5441,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5438
5441
  * `origin: "owned"` for org-owned plays.
5439
5442
  */
5440
5443
  async listPlays(options) {
5441
- if (!_optionalChain([options, 'optionalAccess', _293 => _293.grep, 'optionalAccess', _294 => _294.trim, 'call', _295 => _295()])) {
5444
+ if (!_optionalChain([options, 'optionalAccess', _294 => _294.grep, 'optionalAccess', _295 => _295.trim, 'call', _296 => _296()])) {
5442
5445
  return (await this.requestPlaysPage(options, false)).plays;
5443
5446
  }
5444
5447
  const plays = [];
@@ -5460,46 +5463,46 @@ var DeeplineClient = (_class = class _DeeplineClient {
5460
5463
  }
5461
5464
  async requestPlaysPage(options, paginateInventory = true) {
5462
5465
  const params = new URLSearchParams();
5463
- if (paginateInventory && !_optionalChain([options, 'optionalAccess', _296 => _296.grep, 'optionalAccess', _297 => _297.trim, 'call', _298 => _298()]))
5466
+ if (paginateInventory && !_optionalChain([options, 'optionalAccess', _297 => _297.grep, 'optionalAccess', _298 => _298.trim, 'call', _299 => _299()]))
5464
5467
  params.set("inventory_paginated", "1");
5465
- if (_optionalChain([options, 'optionalAccess', _299 => _299.origin])) params.set("origin", options.origin);
5466
- if (_optionalChain([options, 'optionalAccess', _300 => _300.summaryOnly])) params.set("summary_only", "1");
5467
- if (_optionalChain([options, 'optionalAccess', _301 => _301.categories])) {
5468
+ if (_optionalChain([options, 'optionalAccess', _300 => _300.origin])) params.set("origin", options.origin);
5469
+ if (_optionalChain([options, 'optionalAccess', _301 => _301.summaryOnly])) params.set("summary_only", "1");
5470
+ if (_optionalChain([options, 'optionalAccess', _302 => _302.categories])) {
5468
5471
  params.set(
5469
5472
  "categories",
5470
5473
  Array.isArray(options.categories) ? options.categories.join(",") : options.categories
5471
5474
  );
5472
5475
  }
5473
- if (_optionalChain([options, 'optionalAccess', _302 => _302.categories]) || _optionalChain([options, 'optionalAccess', _303 => _303.includeToolCategories])) {
5476
+ if (_optionalChain([options, 'optionalAccess', _303 => _303.categories]) || _optionalChain([options, 'optionalAccess', _304 => _304.includeToolCategories])) {
5474
5477
  params.set("include_tool_categories", "1");
5475
5478
  }
5476
- if (_optionalChain([options, 'optionalAccess', _304 => _304.tags])) {
5479
+ if (_optionalChain([options, 'optionalAccess', _305 => _305.tags])) {
5477
5480
  params.set(
5478
5481
  "tags",
5479
5482
  Array.isArray(options.tags) ? options.tags.join(",") : options.tags
5480
5483
  );
5481
5484
  }
5482
- if (_optionalChain([options, 'optionalAccess', _305 => _305.includeArchived])) params.set("include_archived", "1");
5483
- if (_optionalChain([options, 'optionalAccess', _306 => _306.includeCostEstimates])) {
5485
+ if (_optionalChain([options, 'optionalAccess', _306 => _306.includeArchived])) params.set("include_archived", "1");
5486
+ if (_optionalChain([options, 'optionalAccess', _307 => _307.includeCostEstimates])) {
5484
5487
  params.set("include_cost_estimates", "1");
5485
5488
  }
5486
- if (_optionalChain([options, 'optionalAccess', _307 => _307.grep, 'optionalAccess', _308 => _308.trim, 'call', _309 => _309()])) {
5489
+ if (_optionalChain([options, 'optionalAccess', _308 => _308.grep, 'optionalAccess', _309 => _309.trim, 'call', _310 => _310()])) {
5487
5490
  params.set("grep", options.grep.trim());
5488
5491
  params.set("limit", "60");
5489
5492
  }
5490
- if (_optionalChain([options, 'optionalAccess', _310 => _310.limit]) !== void 0) {
5493
+ if (_optionalChain([options, 'optionalAccess', _311 => _311.limit]) !== void 0) {
5491
5494
  if (!Number.isSafeInteger(options.limit) || options.limit < 1) {
5492
5495
  throw new Error("Play page limit must be a positive integer");
5493
5496
  }
5494
5497
  params.set("limit", String(options.limit));
5495
5498
  }
5496
- if (_optionalChain([options, 'optionalAccess', _311 => _311.cursor])) params.set("cursor", options.cursor);
5499
+ if (_optionalChain([options, 'optionalAccess', _312 => _312.cursor])) params.set("cursor", options.cursor);
5497
5500
  const suffix = params.size ? `?${params.toString()}` : "";
5498
5501
  const response = await this.http.get(`/api/v2/plays${suffix}`);
5499
5502
  return {
5500
5503
  plays: _nullishCoalesce(response.plays, () => ( [])),
5501
- cursor: _nullishCoalesce(_nullishCoalesce(_optionalChain([response, 'access', _312 => _312.pagination, 'optionalAccess', _313 => _313.cursor]), () => ( response.cursor)), () => ( null)),
5502
- hasMore: Boolean(_nullishCoalesce(_optionalChain([response, 'access', _314 => _314.pagination, 'optionalAccess', _315 => _315.hasMore]), () => ( response.hasMore)))
5504
+ cursor: _nullishCoalesce(_nullishCoalesce(_optionalChain([response, 'access', _313 => _313.pagination, 'optionalAccess', _314 => _314.cursor]), () => ( response.cursor)), () => ( null)),
5505
+ hasMore: Boolean(_nullishCoalesce(_optionalChain([response, 'access', _315 => _315.pagination, 'optionalAccess', _316 => _316.hasMore]), () => ( response.hasMore)))
5503
5506
  };
5504
5507
  }
5505
5508
  /** Read definition-level settings, independently of code revisions. */
@@ -5563,7 +5566,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5563
5566
  }
5564
5567
  /** Start provider OAuth and return the URL to open in a browser. */
5565
5568
  async startIntegrationOAuth(provider, options = {}) {
5566
- const scopes = _optionalChain([options, 'access', _316 => _316.scopes, 'optionalAccess', _317 => _317.map, 'call', _318 => _318((scope) => scope.trim()), 'access', _319 => _319.filter, 'call', _320 => _320(Boolean)]);
5569
+ const scopes = _optionalChain([options, 'access', _317 => _317.scopes, 'optionalAccess', _318 => _318.map, 'call', _319 => _319((scope) => scope.trim()), 'access', _320 => _320.filter, 'call', _321 => _321(Boolean)]);
5567
5570
  if (scopes !== void 0 && scopes.length === 0) {
5568
5571
  throw new Error("scopes must contain at least one OAuth scope.");
5569
5572
  }
@@ -5579,8 +5582,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
5579
5582
  return this.http.post("/api/v2/integrations/connect", {
5580
5583
  provider: "slack",
5581
5584
  scopes: [...PRODUCT_NOTIFICATION_SLACK_OAUTH_SCOPES],
5582
- ..._optionalChain([options, 'optionalAccess', _321 => _321.successUrl]) ? { success_url: options.successUrl } : {},
5583
- ..._optionalChain([options, 'optionalAccess', _322 => _322.failureUrl]) ? { failure_url: options.failureUrl } : {}
5585
+ ..._optionalChain([options, 'optionalAccess', _322 => _322.successUrl]) ? { success_url: options.successUrl } : {},
5586
+ ..._optionalChain([options, 'optionalAccess', _323 => _323.failureUrl]) ? { failure_url: options.failureUrl } : {}
5584
5587
  });
5585
5588
  }
5586
5589
  /** List Slack channels visible to the connected Deepline Slack app. */
@@ -5655,7 +5658,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5655
5658
  }
5656
5659
  const targets = input.targets.map(parseNotificationGroupTarget);
5657
5660
  const legacyEvents = _nullishCoalesce(input.legacyEvents, () => ( []));
5658
- const legacyTarget = targets.length === 1 && _optionalChain([targets, 'access', _323 => _323[0], 'optionalAccess', _324 => _324.kind]) === "slack" && legacyEvents.length > 0 ? targets[0] : null;
5661
+ const legacyTarget = targets.length === 1 && _optionalChain([targets, 'access', _324 => _324[0], 'optionalAccess', _325 => _325.kind]) === "slack" && legacyEvents.length > 0 ? targets[0] : null;
5659
5662
  if (legacyEvents.length > 0 && !legacyTarget) {
5660
5663
  throw new Error(
5661
5664
  "--for is supported only by the legacy one-Slack-target form. Create the group first, then add rules in notification configuration."
@@ -5691,7 +5694,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5691
5694
  const existingGroup = current.configuration.groups.find(
5692
5695
  (candidate) => candidate.name.toLowerCase() === name.toLowerCase()
5693
5696
  );
5694
- const groupKey = _nullishCoalesce(_optionalChain([existingGroup, 'optionalAccess', _325 => _325.groupKey]), () => ( notificationObjectKey("group")));
5697
+ const groupKey = _nullishCoalesce(_optionalChain([existingGroup, 'optionalAccess', _326 => _326.groupKey]), () => ( notificationObjectKey("group")));
5695
5698
  const group = _nullishCoalesce(existingGroup, () => ( {
5696
5699
  groupKey,
5697
5700
  name,
@@ -5880,7 +5883,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5880
5883
  }
5881
5884
  );
5882
5885
  const plays = (_nullishCoalesce(response.plays, () => ( []))).map(
5883
- (play) => _chunkNMU3VR5Ujs.describePlayListItem.call(void 0, play, {
5886
+ (play) => _chunkPMH4GLMDjs.describePlayListItem.call(void 0, play, {
5884
5887
  ...options,
5885
5888
  pipeline: _nullishCoalesce(options.pipeline, () => ( true))
5886
5889
  })
@@ -5919,7 +5922,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5919
5922
  /** Read one trigger inventory page without loading run histories. */
5920
5923
  async listPlayTriggerInventory(options) {
5921
5924
  const params = new URLSearchParams({ view: "inventory" });
5922
- if (_optionalChain([options, 'optionalAccess', _326 => _326.cursor])) params.set("cursor", options.cursor);
5925
+ if (_optionalChain([options, 'optionalAccess', _327 => _327.cursor])) params.set("cursor", options.cursor);
5923
5926
  return this.http.get(`/api/v2/plays/triggers?${params}`);
5924
5927
  }
5925
5928
  /** Read one trigger's recent runs, with an explicit partial-history flag. */
@@ -5928,7 +5931,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5928
5931
  view: "history",
5929
5932
  binding_id: bindingId
5930
5933
  });
5931
- if (_optionalChain([options, 'optionalAccess', _327 => _327.limit]) !== void 0)
5934
+ if (_optionalChain([options, 'optionalAccess', _328 => _328.limit]) !== void 0)
5932
5935
  params.set("history_limit", String(options.limit));
5933
5936
  return this.http.get(`/api/v2/plays/triggers?${params}`);
5934
5937
  }
@@ -5942,7 +5945,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5942
5945
  */
5943
5946
  async describePlay(name, options = {}) {
5944
5947
  if (options.pipeline) {
5945
- return _chunkNMU3VR5Ujs.describePlayDetail.call(void 0,
5948
+ return _chunkPMH4GLMDjs.describePlayDetail.call(void 0,
5946
5949
  await this.getPlay(name, { guidance: true }),
5947
5950
  options
5948
5951
  );
@@ -5953,7 +5956,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5953
5956
  ...options.compact ? { compact: "1" } : {}
5954
5957
  });
5955
5958
  const body = await this.http.get(`/api/v2/plays/${encodeURIComponent(name)}?${params.toString()}`);
5956
- return "description" in body ? body.description : _chunkNMU3VR5Ujs.describePlayDetail.call(void 0, body, options);
5959
+ return "description" in body ? body.description : _chunkPMH4GLMDjs.describePlayDetail.call(void 0, body, options);
5957
5960
  }
5958
5961
  /**
5959
5962
  * Clear run history and durable sheet/result data for a play without deleting
@@ -6116,14 +6119,14 @@ var DeeplineClient = (_class = class _DeeplineClient {
6116
6119
  */
6117
6120
  async runPlay(code, csvPath, name, options) {
6118
6121
  const { workflowId } = await this.submitPlay(code, csvPath, name, {
6119
- input: _optionalChain([options, 'optionalAccess', _328 => _328.input]),
6120
- sourceCode: _optionalChain([options, 'optionalAccess', _329 => _329.sourceCode]),
6121
- artifact: _optionalChain([options, 'optionalAccess', _330 => _330.artifact]),
6122
- compilerManifest: _optionalChain([options, 'optionalAccess', _331 => _331.compilerManifest]),
6123
- inputFile: _optionalChain([options, 'optionalAccess', _332 => _332.inputFile]),
6124
- packagedFiles: _optionalChain([options, 'optionalAccess', _333 => _333.packagedFiles]),
6125
- force: _optionalChain([options, 'optionalAccess', _334 => _334.force]),
6126
- forceToolRefresh: _optionalChain([options, 'optionalAccess', _335 => _335.forceToolRefresh])
6122
+ input: _optionalChain([options, 'optionalAccess', _329 => _329.input]),
6123
+ sourceCode: _optionalChain([options, 'optionalAccess', _330 => _330.sourceCode]),
6124
+ artifact: _optionalChain([options, 'optionalAccess', _331 => _331.artifact]),
6125
+ compilerManifest: _optionalChain([options, 'optionalAccess', _332 => _332.compilerManifest]),
6126
+ inputFile: _optionalChain([options, 'optionalAccess', _333 => _333.inputFile]),
6127
+ packagedFiles: _optionalChain([options, 'optionalAccess', _334 => _334.packagedFiles]),
6128
+ force: _optionalChain([options, 'optionalAccess', _335 => _335.force]),
6129
+ forceToolRefresh: _optionalChain([options, 'optionalAccess', _336 => _336.forceToolRefresh])
6127
6130
  });
6128
6131
  const start = Date.now();
6129
6132
  const state = {
@@ -6134,7 +6137,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6134
6137
  latest: null
6135
6138
  };
6136
6139
  let terminalObserved = null;
6137
- if (_optionalChain([options, 'optionalAccess', _336 => _336.signal, 'optionalAccess', _337 => _337.aborted])) {
6140
+ if (_optionalChain([options, 'optionalAccess', _337 => _337.signal, 'optionalAccess', _338 => _338.aborted])) {
6138
6141
  await this.cancelPlay(workflowId);
6139
6142
  return {
6140
6143
  success: false,
@@ -6145,9 +6148,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
6145
6148
  };
6146
6149
  }
6147
6150
  for await (const event of this.watchRunEvents(workflowId, {
6148
- signal: _optionalChain([options, 'optionalAccess', _338 => _338.signal])
6151
+ signal: _optionalChain([options, 'optionalAccess', _339 => _339.signal])
6149
6152
  })) {
6150
- if (_optionalChain([options, 'optionalAccess', _339 => _339.signal, 'optionalAccess', _340 => _340.aborted])) {
6153
+ if (_optionalChain([options, 'optionalAccess', _340 => _340.signal, 'optionalAccess', _341 => _341.aborted])) {
6151
6154
  await this.cancelPlay(workflowId);
6152
6155
  return {
6153
6156
  success: false,
@@ -6157,19 +6160,19 @@ var DeeplineClient = (_class = class _DeeplineClient {
6157
6160
  error: "Cancelled by user"
6158
6161
  };
6159
6162
  }
6160
- const previousStatus = _optionalChain([state, 'access', _341 => _341.latest, 'optionalAccess', _342 => _342.status]);
6163
+ const previousStatus = _optionalChain([state, 'access', _342 => _342.latest, 'optionalAccess', _343 => _343.status]);
6161
6164
  const status = updatePlayLiveStatusState(state, event);
6162
6165
  if (!status) {
6163
6166
  continue;
6164
6167
  }
6165
6168
  if (event.type !== "play.run.status" || status.status !== previousStatus) {
6166
- _optionalChain([options, 'optionalAccess', _343 => _343.onProgress, 'optionalCall', _344 => _344(status)]);
6169
+ _optionalChain([options, 'optionalAccess', _344 => _344.onProgress, 'optionalCall', _345 => _345(status)]);
6167
6170
  }
6168
6171
  if (_chunk2KHUFWTKjs.isTerminalPlayRunLifecycleStatus.call(void 0, status.status)) {
6169
6172
  terminalObserved = status;
6170
6173
  }
6171
6174
  }
6172
- if (_optionalChain([options, 'optionalAccess', _345 => _345.signal, 'optionalAccess', _346 => _346.aborted])) {
6175
+ if (_optionalChain([options, 'optionalAccess', _346 => _346.signal, 'optionalAccess', _347 => _347.aborted])) {
6173
6176
  await this.cancelPlay(workflowId);
6174
6177
  return {
6175
6178
  success: false,
@@ -6222,7 +6225,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6222
6225
  const response = await this.http.get(
6223
6226
  `/api/v2/usage/events?request_id=${encodeURIComponent(normalizedRequestId)}`
6224
6227
  );
6225
- const event = _optionalChain([response, 'access', _347 => _347.entries, 'optionalAccess', _348 => _348[0]]);
6228
+ const event = _optionalChain([response, 'access', _348 => _348.entries, 'optionalAccess', _349 => _349[0]]);
6226
6229
  if (!event) {
6227
6230
  throw new (0, _chunkSQWET4SLjs.DeeplineError)(
6228
6231
  "No usage event was found for this request_id.",
@@ -6397,7 +6400,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6397
6400
  async cancelBillingSubscription(options) {
6398
6401
  return this.http.post(
6399
6402
  "/api/v2/billing/subscription/cancel",
6400
- { action: _optionalChain([options, 'optionalAccess', _349 => _349.undo]) ? "undo_cancel" : "cancel" }
6403
+ { action: _optionalChain([options, 'optionalAccess', _350 => _350.undo]) ? "undo_cancel" : "cancel" }
6401
6404
  );
6402
6405
  }
6403
6406
  /**
@@ -6409,7 +6412,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6409
6412
  */
6410
6413
  async listBillingInvoices(options) {
6411
6414
  const params = new URLSearchParams();
6412
- if (_optionalChain([options, 'optionalAccess', _350 => _350.limit]) !== void 0) {
6415
+ if (_optionalChain([options, 'optionalAccess', _351 => _351.limit]) !== void 0) {
6413
6416
  params.set("limit", String(options.limit));
6414
6417
  }
6415
6418
  const suffix = Array.from(params).length > 0 ? `?${params.toString()}` : "";
@@ -6519,7 +6522,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6519
6522
  /** Create a Stripe-hosted portal session for payment recovery and invoices. */
6520
6523
  async createTargetBillingPortalSession(options) {
6521
6524
  const response = await this.http.post(
6522
- _optionalChain([options, 'optionalAccess', _351 => _351.flow]) === "customer_update" ? "/api/v2/billing/portal-sessions?flow=customer_update" : "/api/v2/billing/portal-sessions",
6525
+ _optionalChain([options, 'optionalAccess', _352 => _352.flow]) === "customer_update" ? "/api/v2/billing/portal-sessions?flow=customer_update" : "/api/v2/billing/portal-sessions",
6523
6526
  {}
6524
6527
  );
6525
6528
  return response.data;
@@ -6569,8 +6572,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
6569
6572
  return this.http.request("/api/v2/monitors/audit", {
6570
6573
  method: "POST",
6571
6574
  body: {
6572
- ..._optionalChain([options, 'optionalAccess', _352 => _352.fleetId]) ? { fleet_id: options.fleetId } : {},
6573
- ..._optionalChain([options, 'optionalAccess', _353 => _353.cursor]) ? { cursor: options.cursor } : {}
6575
+ ..._optionalChain([options, 'optionalAccess', _353 => _353.fleetId]) ? { fleet_id: options.fleetId } : {},
6576
+ ..._optionalChain([options, 'optionalAccess', _354 => _354.cursor]) ? { cursor: options.cursor } : {}
6574
6577
  },
6575
6578
  maxRetries: 0
6576
6579
  });
@@ -6580,8 +6583,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
6580
6583
  return this.http.request("/api/v2/monitors/repair", {
6581
6584
  method: "POST",
6582
6585
  body: {
6583
- ..._optionalChain([options, 'optionalAccess', _354 => _354.fleetId]) ? { fleet_id: options.fleetId } : {},
6584
- ..._optionalChain([options, 'optionalAccess', _355 => _355.dryRun]) === void 0 ? {} : { dry_run: options.dryRun }
6586
+ ..._optionalChain([options, 'optionalAccess', _355 => _355.fleetId]) ? { fleet_id: options.fleetId } : {},
6587
+ ..._optionalChain([options, 'optionalAccess', _356 => _356.dryRun]) === void 0 ? {} : { dry_run: options.dryRun }
6585
6588
  },
6586
6589
  maxRetries: 0
6587
6590
  });
@@ -6589,7 +6592,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6589
6592
  /** Delivery and convergence health. Prefer `client.monitors.health(...)`. */
6590
6593
  async readMonitorsHealth(options) {
6591
6594
  const params = new URLSearchParams();
6592
- if (_optionalChain([options, 'optionalAccess', _356 => _356.fleetId])) params.set("fleet_id", options.fleetId);
6595
+ if (_optionalChain([options, 'optionalAccess', _357 => _357.fleetId])) params.set("fleet_id", options.fleetId);
6593
6596
  const query = params.toString();
6594
6597
  const suffix = query ? `?${query}` : "";
6595
6598
  return this.http.request(
@@ -6662,7 +6665,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6662
6665
  );
6663
6666
  }
6664
6667
  const params = new URLSearchParams();
6665
- if (_optionalChain([options, 'optionalAccess', _357 => _357.cursor])) params.set("cursor", options.cursor);
6668
+ if (_optionalChain([options, 'optionalAccess', _358 => _358.cursor])) params.set("cursor", options.cursor);
6666
6669
  const suffix = params.size > 0 ? `?${params}` : "";
6667
6670
  return this.http.request(
6668
6671
  `/api/v2/monitors/batch/${encodeURIComponent(runId)}${suffix}`,
@@ -6709,7 +6712,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6709
6712
  * a second charge. The submission is never replayed automatically.
6710
6713
  */
6711
6714
  async previewMonitor(definition, options) {
6712
- const idempotencyKey = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _358 => _358.idempotencyKey]), () => ( `monitor-preview-${_nullishCoalesce(_optionalChain([globalThis, 'access', _359 => _359.crypto, 'optionalAccess', _360 => _360.randomUUID, 'optionalCall', _361 => _361()]), () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`))}`));
6715
+ const idempotencyKey = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _359 => _359.idempotencyKey]), () => ( `monitor-preview-${_nullishCoalesce(_optionalChain([globalThis, 'access', _360 => _360.crypto, 'optionalAccess', _361 => _361.randomUUID, 'optionalCall', _362 => _362()]), () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`))}`));
6713
6716
  try {
6714
6717
  const result = await this.http.request(
6715
6718
  "/api/v2/monitors/preview",
@@ -6717,7 +6720,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6717
6720
  method: "POST",
6718
6721
  body: {
6719
6722
  ...definition,
6720
- ..._optionalChain([options, 'optionalAccess', _362 => _362.limit]) === void 0 ? {} : { limit: options.limit }
6723
+ ..._optionalChain([options, 'optionalAccess', _363 => _363.limit]) === void 0 ? {} : { limit: options.limit }
6721
6724
  },
6722
6725
  headers: { "Idempotency-Key": idempotencyKey },
6723
6726
  maxRetries: 0,
@@ -6739,7 +6742,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6739
6742
  * `client.monitors.deploy(...)`.
6740
6743
  */
6741
6744
  async deployMonitor(definition, options) {
6742
- if (_optionalChain([options, 'optionalAccess', _363 => _363.dryRun])) {
6745
+ if (_optionalChain([options, 'optionalAccess', _364 => _364.dryRun])) {
6743
6746
  return this.http.request("/api/v2/monitors/check", {
6744
6747
  method: "POST",
6745
6748
  body: definition
@@ -6775,12 +6778,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
6775
6778
  /** List deployed monitors. Prefer `client.monitors.list(...)`. */
6776
6779
  async listMonitors(options) {
6777
6780
  const params = new URLSearchParams();
6778
- if (_optionalChain([options, 'optionalAccess', _364 => _364.state])) params.set("state", options.state);
6779
- else if (_optionalChain([options, 'optionalAccess', _365 => _365.status])) params.set("status", options.status);
6780
- if (_optionalChain([options, 'optionalAccess', _366 => _366.limit]) !== void 0)
6781
+ if (_optionalChain([options, 'optionalAccess', _365 => _365.state])) params.set("state", options.state);
6782
+ else if (_optionalChain([options, 'optionalAccess', _366 => _366.status])) params.set("status", options.status);
6783
+ if (_optionalChain([options, 'optionalAccess', _367 => _367.limit]) !== void 0)
6781
6784
  params.set("limit", String(options.limit));
6782
- if (_optionalChain([options, 'optionalAccess', _367 => _367.cursor])) params.set("cursor", options.cursor);
6783
- if (_optionalChain([options, 'optionalAccess', _368 => _368.includeConsumers])) params.set("include_consumers", "true");
6785
+ if (_optionalChain([options, 'optionalAccess', _368 => _368.cursor])) params.set("cursor", options.cursor);
6786
+ if (_optionalChain([options, 'optionalAccess', _369 => _369.includeConsumers])) params.set("include_consumers", "true");
6784
6787
  const query = params.toString();
6785
6788
  const suffix = query ? `?${query}` : "";
6786
6789
  return this.http.request(
@@ -6791,17 +6794,17 @@ var DeeplineClient = (_class = class _DeeplineClient {
6791
6794
  /** The Monitors list. Prefer `client.monitors.ledger(...)`. */
6792
6795
  async listMonitorLedger(options) {
6793
6796
  const params = new URLSearchParams();
6794
- if (_optionalChain([options, 'optionalAccess', _369 => _369.search])) params.set("q", options.search);
6795
- for (const state of _nullishCoalesce(_optionalChain([options, 'optionalAccess', _370 => _370.states]), () => ( []))) params.append("state", state);
6796
- for (const signal of _nullishCoalesce(_optionalChain([options, 'optionalAccess', _371 => _371.signals]), () => ( [])))
6797
+ if (_optionalChain([options, 'optionalAccess', _370 => _370.search])) params.set("q", options.search);
6798
+ for (const state of _nullishCoalesce(_optionalChain([options, 'optionalAccess', _371 => _371.states]), () => ( []))) params.append("state", state);
6799
+ for (const signal of _nullishCoalesce(_optionalChain([options, 'optionalAccess', _372 => _372.signals]), () => ( [])))
6797
6800
  params.append("signal", signal);
6798
- if (_optionalChain([options, 'optionalAccess', _372 => _372.play])) params.set("play", options.play);
6799
- if (_optionalChain([options, 'optionalAccess', _373 => _373.fleet])) params.set("fleet", options.fleet);
6800
- if (_optionalChain([options, 'optionalAccess', _374 => _374.sort])) params.set("sort", options.sort);
6801
- if (_optionalChain([options, 'optionalAccess', _375 => _375.window])) params.set("window", options.window);
6802
- if (_optionalChain([options, 'optionalAccess', _376 => _376.limit]) !== void 0)
6801
+ if (_optionalChain([options, 'optionalAccess', _373 => _373.play])) params.set("play", options.play);
6802
+ if (_optionalChain([options, 'optionalAccess', _374 => _374.fleet])) params.set("fleet", options.fleet);
6803
+ if (_optionalChain([options, 'optionalAccess', _375 => _375.sort])) params.set("sort", options.sort);
6804
+ if (_optionalChain([options, 'optionalAccess', _376 => _376.window])) params.set("window", options.window);
6805
+ if (_optionalChain([options, 'optionalAccess', _377 => _377.limit]) !== void 0)
6803
6806
  params.set("limit", String(options.limit));
6804
- if (_optionalChain([options, 'optionalAccess', _377 => _377.cursor])) params.set("cursor", options.cursor);
6807
+ if (_optionalChain([options, 'optionalAccess', _378 => _378.cursor])) params.set("cursor", options.cursor);
6805
6808
  const query = params.toString();
6806
6809
  const suffix = query ? `?${query}` : "";
6807
6810
  return this.http.request(
@@ -6818,7 +6821,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6818
6821
  }
6819
6822
  /** A monitor's recent findings. Prefer `client.monitors.ledgerFindings(...)`. */
6820
6823
  async listMonitorLedgerFindings(key, options) {
6821
- const suffix = _optionalChain([options, 'optionalAccess', _378 => _378.cursor]) ? `?cursor=${encodeURIComponent(options.cursor)}` : "";
6824
+ const suffix = _optionalChain([options, 'optionalAccess', _379 => _379.cursor]) ? `?cursor=${encodeURIComponent(options.cursor)}` : "";
6822
6825
  return this.http.request(
6823
6826
  `/api/v2/monitors/ledger/${encodeURIComponent(key)}/findings${suffix}`,
6824
6827
  { method: "GET" }
@@ -6832,7 +6835,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6832
6835
  );
6833
6836
  }
6834
6837
  async testMonitorWebhook(key, payload, options) {
6835
- if (_optionalChain([options, 'optionalAccess', _379 => _379.dispatch]) === true || _optionalChain([options, 'optionalAccess', _380 => _380.validationOnly]) === false) {
6838
+ if (_optionalChain([options, 'optionalAccess', _380 => _380.dispatch]) === true || _optionalChain([options, 'optionalAccess', _381 => _381.validationOnly]) === false) {
6836
6839
  throw new (0, _chunkSQWET4SLjs.DeeplineError)(
6837
6840
  "Monitor tests are validation-only and cannot dispatch events.",
6838
6841
  void 0,
@@ -6887,7 +6890,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6887
6890
  }
6888
6891
  /** Delete a deployed monitor and its upstream provider resource. `dryRun` returns the delete plan. Prefer `client.monitors.delete(...)`. */
6889
6892
  async deleteMonitor(key, options) {
6890
- if (_optionalChain([options, 'optionalAccess', _381 => _381.localOnly]) === true) {
6893
+ if (_optionalChain([options, 'optionalAccess', _382 => _382.localOnly]) === true) {
6891
6894
  throw new (0, _chunkSQWET4SLjs.DeeplineError)(
6892
6895
  "localOnly monitor deletion is no longer supported. Monitor deletion always deprovisions the upstream provider resource.",
6893
6896
  void 0,
@@ -6895,11 +6898,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
6895
6898
  );
6896
6899
  }
6897
6900
  const params = new URLSearchParams();
6898
- if (_optionalChain([options, 'optionalAccess', _382 => _382.dryRun])) params.set("dry_run", "true");
6901
+ if (_optionalChain([options, 'optionalAccess', _383 => _383.dryRun])) params.set("dry_run", "true");
6899
6902
  const query = params.toString();
6900
6903
  return this.http.request(
6901
6904
  `/api/v2/monitors/deployed/${encodeURIComponent(key)}${query ? `?${query}` : ""}`,
6902
- _optionalChain([options, 'optionalAccess', _383 => _383.dryRun]) ? { method: "DELETE" } : {
6905
+ _optionalChain([options, 'optionalAccess', _384 => _384.dryRun]) ? { method: "DELETE" } : {
6903
6906
  method: "DELETE",
6904
6907
  // Deletion is a provider lifecycle operation. A timeout is an
6905
6908
  // unknown outcome, not authority to begin another delete attempt.
@@ -6912,10 +6915,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
6912
6915
  * Prefer `client.monitors.reactivate(...)`.
6913
6916
  */
6914
6917
  async reactivateMonitor(key, options) {
6915
- const query = _optionalChain([options, 'optionalAccess', _384 => _384.dryRun]) ? "?dry_run=true" : "";
6918
+ const query = _optionalChain([options, 'optionalAccess', _385 => _385.dryRun]) ? "?dry_run=true" : "";
6916
6919
  return this.http.request(
6917
6920
  `/api/v2/monitors/deployed/${encodeURIComponent(key)}/reactivate${query}`,
6918
- _optionalChain([options, 'optionalAccess', _385 => _385.dryRun]) ? { method: "POST", body: {} } : {
6921
+ _optionalChain([options, 'optionalAccess', _386 => _386.dryRun]) ? { method: "POST", body: {} } : {
6919
6922
  method: "POST",
6920
6923
  body: {},
6921
6924
  // Reactivation can create an upstream resource, so it must not use
@@ -6929,7 +6932,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6929
6932
  // ——————————————————————————————————————————————————————————
6930
6933
  static __initStatic() {this.MONITOR_JOB_IDEMPOTENCY_KEY_MAX_LENGTH = 96}
6931
6934
  monitorJobIdempotencyKey(operation) {
6932
- const uuid = _nullishCoalesce(_optionalChain([globalThis, 'access', _386 => _386.crypto, 'optionalAccess', _387 => _387.randomUUID, 'optionalCall', _388 => _388()]), () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`));
6935
+ const uuid = _nullishCoalesce(_optionalChain([globalThis, 'access', _387 => _387.crypto, 'optionalAccess', _388 => _388.randomUUID, 'optionalCall', _389 => _389()]), () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`));
6933
6936
  const prefix = "monitor-job-";
6934
6937
  const safeOperation = operation.replace(/[^A-Za-z0-9._-]/g, "-");
6935
6938
  const maxOperationLength = Math.max(
@@ -6940,7 +6943,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6940
6943
  }
6941
6944
  monitorJobHeaders(operation, idempotencyKey) {
6942
6945
  return {
6943
- "Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _389 => _389.trim, 'call', _390 => _390()]) || this.monitorJobIdempotencyKey(operation)
6946
+ "Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _390 => _390.trim, 'call', _391 => _391()]) || this.monitorJobIdempotencyKey(operation)
6944
6947
  };
6945
6948
  }
6946
6949
  async deployMonitorBatch(definitions, options) {
@@ -6951,7 +6954,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6951
6954
  body: { version: 1, kind: "batch", monitors: definitions },
6952
6955
  headers: this.monitorJobHeaders(
6953
6956
  "batch-deploy",
6954
- _optionalChain([options, 'optionalAccess', _391 => _391.idempotencyKey])
6957
+ _optionalChain([options, 'optionalAccess', _392 => _392.idempotencyKey])
6955
6958
  ),
6956
6959
  maxRetries: 0,
6957
6960
  exactUrlOnly: true
@@ -6970,11 +6973,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
6970
6973
  version: 1,
6971
6974
  kind: "batch",
6972
6975
  monitors: definitions,
6973
- ..._optionalChain([options, 'optionalAccess', _392 => _392.expectedGeneration]) === void 0 ? {} : { expected_generation: options.expectedGeneration }
6976
+ ..._optionalChain([options, 'optionalAccess', _393 => _393.expectedGeneration]) === void 0 ? {} : { expected_generation: options.expectedGeneration }
6974
6977
  },
6975
6978
  headers: this.monitorJobHeaders(
6976
6979
  `batch-sync-${batchId}`,
6977
- _optionalChain([options, 'optionalAccess', _393 => _393.idempotencyKey])
6980
+ _optionalChain([options, 'optionalAccess', _394 => _394.idempotencyKey])
6978
6981
  ),
6979
6982
  maxRetries: 0,
6980
6983
  exactUrlOnly: true
@@ -6989,7 +6992,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6989
6992
  body: {},
6990
6993
  headers: this.monitorJobHeaders(
6991
6994
  `batch-start-${batchId}`,
6992
- _optionalChain([options, 'optionalAccess', _394 => _394.idempotencyKey])
6995
+ _optionalChain([options, 'optionalAccess', _395 => _395.idempotencyKey])
6993
6996
  ),
6994
6997
  maxRetries: 0,
6995
6998
  exactUrlOnly: true
@@ -7004,7 +7007,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
7004
7007
  body: {},
7005
7008
  headers: this.monitorJobHeaders(
7006
7009
  `batch-stop-${batchId}`,
7007
- _optionalChain([options, 'optionalAccess', _395 => _395.idempotencyKey])
7010
+ _optionalChain([options, 'optionalAccess', _396 => _396.idempotencyKey])
7008
7011
  ),
7009
7012
  maxRetries: 0,
7010
7013
  exactUrlOnly: true
@@ -7025,7 +7028,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
7025
7028
  body: {},
7026
7029
  headers: this.monitorJobHeaders(
7027
7030
  `${action}-${monitorKey}`,
7028
- _optionalChain([options, 'optionalAccess', _396 => _396.idempotencyKey])
7031
+ _optionalChain([options, 'optionalAccess', _397 => _397.idempotencyKey])
7029
7032
  ),
7030
7033
  maxRetries: 0,
7031
7034
  exactUrlOnly: true
@@ -7038,7 +7041,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
7038
7041
  body: definition,
7039
7042
  headers: this.monitorJobHeaders(
7040
7043
  `sync-${definition.key}`,
7041
- _optionalChain([options, 'optionalAccess', _397 => _397.idempotencyKey])
7044
+ _optionalChain([options, 'optionalAccess', _398 => _398.idempotencyKey])
7042
7045
  ),
7043
7046
  maxRetries: 0,
7044
7047
  exactUrlOnly: true
@@ -7051,7 +7054,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
7051
7054
  );
7052
7055
  }
7053
7056
  async getMonitorJobLogs(jobId, options) {
7054
- const query = _optionalChain([options, 'optionalAccess', _398 => _398.limit]) === void 0 ? "" : `?limit=${encodeURIComponent(String(options.limit))}`;
7057
+ const query = _optionalChain([options, 'optionalAccess', _399 => _399.limit]) === void 0 ? "" : `?limit=${encodeURIComponent(String(options.limit))}`;
7055
7058
  return this.http.request(
7056
7059
  `/api/v2/monitors/jobs/${encodeURIComponent(jobId)}/logs${query}`,
7057
7060
  { method: "GET" }
@@ -7064,15 +7067,15 @@ var DeeplineClient = (_class = class _DeeplineClient {
7064
7067
  );
7065
7068
  }
7066
7069
  async waitForMonitorJob(jobId, options) {
7067
- const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _399 => _399.timeoutMs]), () => ( 10 * 6e4)));
7068
- const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _400 => _400.pollIntervalMs]), () => ( 2e3)));
7070
+ const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _400 => _400.timeoutMs]), () => ( 10 * 6e4)));
7071
+ const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _401 => _401.pollIntervalMs]), () => ( 2e3)));
7069
7072
  const terminal = /* @__PURE__ */ new Set(["succeeded", "failed", "cancelled"]);
7070
7073
  const startedAt = Date.now();
7071
7074
  let latest = await this.getMonitorJob(jobId);
7072
7075
  while (true) {
7073
- _optionalChain([options, 'optionalAccess', _401 => _401.onProgress, 'optionalCall', _402 => _402(latest)]);
7076
+ _optionalChain([options, 'optionalAccess', _402 => _402.onProgress, 'optionalCall', _403 => _403(latest)]);
7074
7077
  const job = latest.job;
7075
- const state = typeof _optionalChain([job, 'optionalAccess', _403 => _403.state]) === "string" ? job.state : void 0;
7078
+ const state = typeof _optionalChain([job, 'optionalAccess', _404 => _404.state]) === "string" ? job.state : void 0;
7076
7079
  if (state && terminal.has(state)) return latest;
7077
7080
  if (Date.now() - startedAt >= timeoutMs) return latest;
7078
7081
  await sleep(pollIntervalMs);
@@ -7083,12 +7086,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
7083
7086
  // Monitor Fleets
7084
7087
  // ——————————————————————————————————————————————————————————
7085
7088
  monitorFleetIdempotencyKey(operation) {
7086
- const uuid = _optionalChain([globalThis, 'access', _404 => _404.crypto, 'optionalAccess', _405 => _405.randomUUID, 'optionalCall', _406 => _406()]);
7089
+ const uuid = _optionalChain([globalThis, 'access', _405 => _405.crypto, 'optionalAccess', _406 => _406.randomUUID, 'optionalCall', _407 => _407()]);
7087
7090
  return `monitor-fleet-${operation}-${_nullishCoalesce(uuid, () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`))}`;
7088
7091
  }
7089
7092
  monitorFleetHeaders(operation, idempotencyKey) {
7090
7093
  return {
7091
- "Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _407 => _407.trim, 'call', _408 => _408()]) || this.monitorFleetIdempotencyKey(operation)
7094
+ "Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _408 => _408.trim, 'call', _409 => _409()]) || this.monitorFleetIdempotencyKey(operation)
7092
7095
  };
7093
7096
  }
7094
7097
  monitorFleetPath(fleetId) {
@@ -7108,15 +7111,15 @@ var DeeplineClient = (_class = class _DeeplineClient {
7108
7111
  const fleetId = typeof definitionOrId === "string" ? definitionOrId : definitionOrId.id;
7109
7112
  const body = {
7110
7113
  ...typeof definitionOrId === "string" ? {} : { definition: definitionOrId },
7111
- ..._optionalChain([options, 'optionalAccess', _409 => _409.dryRun]) ? { dry_run: true } : {},
7112
- ..._optionalChain([options, 'optionalAccess', _410 => _410.expectedGeneration]) !== void 0 ? { expected_generation: options.expectedGeneration } : {}
7114
+ ..._optionalChain([options, 'optionalAccess', _410 => _410.dryRun]) ? { dry_run: true } : {},
7115
+ ..._optionalChain([options, 'optionalAccess', _411 => _411.expectedGeneration]) !== void 0 ? { expected_generation: options.expectedGeneration } : {}
7113
7116
  };
7114
7117
  return this.http.request(
7115
7118
  this.monitorFleetPath(fleetId),
7116
7119
  {
7117
7120
  method: "PUT",
7118
7121
  body,
7119
- headers: this.monitorFleetHeaders("sync", _optionalChain([options, 'optionalAccess', _411 => _411.idempotencyKey])),
7122
+ headers: this.monitorFleetHeaders("sync", _optionalChain([options, 'optionalAccess', _412 => _412.idempotencyKey])),
7120
7123
  maxRetries: 0,
7121
7124
  exactUrlOnly: true
7122
7125
  }
@@ -7130,10 +7133,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
7130
7133
  /** The Fleets list. Prefer `client.monitors.fleets.overview()`. */
7131
7134
  async listMonitorFleetOverviews(options) {
7132
7135
  const params = new URLSearchParams({ view: "overview" });
7133
- if (_optionalChain([options, 'optionalAccess', _412 => _412.q])) params.set("q", options.q);
7134
- for (const state of _nullishCoalesce(_optionalChain([options, 'optionalAccess', _413 => _413.states]), () => ( []))) params.append("state", state);
7135
- if (_optionalChain([options, 'optionalAccess', _414 => _414.sort])) params.set("sort", options.sort);
7136
- if (_optionalChain([options, 'optionalAccess', _415 => _415.window])) params.set("window", options.window);
7136
+ if (_optionalChain([options, 'optionalAccess', _413 => _413.q])) params.set("q", options.q);
7137
+ for (const state of _nullishCoalesce(_optionalChain([options, 'optionalAccess', _414 => _414.states]), () => ( []))) params.append("state", state);
7138
+ if (_optionalChain([options, 'optionalAccess', _415 => _415.sort])) params.set("sort", options.sort);
7139
+ if (_optionalChain([options, 'optionalAccess', _416 => _416.window])) params.set("window", options.window);
7137
7140
  return this.http.request(
7138
7141
  `/api/v2/monitors/fleets?${params.toString()}`,
7139
7142
  { method: "GET" }
@@ -7142,7 +7145,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
7142
7145
  /** One fleet's overview. Prefer `client.monitors.fleets.overview(fleetId)`. */
7143
7146
  async getMonitorFleetOverview(fleetId, options) {
7144
7147
  const params = new URLSearchParams({ view: "overview" });
7145
- if (_optionalChain([options, 'optionalAccess', _416 => _416.window])) params.set("window", options.window);
7148
+ if (_optionalChain([options, 'optionalAccess', _417 => _417.window])) params.set("window", options.window);
7146
7149
  return this.http.request(
7147
7150
  `${this.monitorFleetPath(fleetId)}?${params.toString()}`,
7148
7151
  { method: "GET" }
@@ -7151,10 +7154,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
7151
7154
  /** A fleet's problem members. Prefer `client.monitors.fleets.issues(...)`. */
7152
7155
  async listMonitorFleetIssues(fleetId, options) {
7153
7156
  const params = new URLSearchParams();
7154
- if (_optionalChain([options, 'optionalAccess', _417 => _417.group])) params.set("group", options.group);
7155
- if (_optionalChain([options, 'optionalAccess', _418 => _418.cause])) params.set("cause", options.cause);
7156
- if (_optionalChain([options, 'optionalAccess', _419 => _419.cursor])) params.set("cursor", options.cursor);
7157
- if (_optionalChain([options, 'optionalAccess', _420 => _420.limit]) !== void 0)
7157
+ if (_optionalChain([options, 'optionalAccess', _418 => _418.group])) params.set("group", options.group);
7158
+ if (_optionalChain([options, 'optionalAccess', _419 => _419.cause])) params.set("cause", options.cause);
7159
+ if (_optionalChain([options, 'optionalAccess', _420 => _420.cursor])) params.set("cursor", options.cursor);
7160
+ if (_optionalChain([options, 'optionalAccess', _421 => _421.limit]) !== void 0)
7158
7161
  params.set("limit", String(options.limit));
7159
7162
  const query = params.toString();
7160
7163
  return this.http.request(
@@ -7164,8 +7167,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
7164
7167
  }
7165
7168
  async getMonitorFleet(fleetId, options) {
7166
7169
  const params = new URLSearchParams();
7167
- if (_optionalChain([options, 'optionalAccess', _421 => _421.drift])) params.set("drift", "1");
7168
- if (_optionalChain([options, 'optionalAccess', _422 => _422.limit]) !== void 0)
7170
+ if (_optionalChain([options, 'optionalAccess', _422 => _422.drift])) params.set("drift", "1");
7171
+ if (_optionalChain([options, 'optionalAccess', _423 => _423.limit]) !== void 0)
7169
7172
  params.set("limit", String(options.limit));
7170
7173
  const query = params.toString();
7171
7174
  return this.http.request(
@@ -7178,10 +7181,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
7178
7181
  this.monitorFleetPath(fleetId),
7179
7182
  {
7180
7183
  method: "DELETE",
7181
- body: _optionalChain([options, 'optionalAccess', _423 => _423.dryRun]) ? { dry_run: true } : {},
7184
+ body: _optionalChain([options, 'optionalAccess', _424 => _424.dryRun]) ? { dry_run: true } : {},
7182
7185
  headers: this.monitorFleetHeaders(
7183
7186
  "deactivate",
7184
- _optionalChain([options, 'optionalAccess', _424 => _424.idempotencyKey])
7187
+ _optionalChain([options, 'optionalAccess', _425 => _425.idempotencyKey])
7185
7188
  ),
7186
7189
  maxRetries: 0,
7187
7190
  exactUrlOnly: true
@@ -7196,7 +7199,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
7196
7199
  body: {},
7197
7200
  headers: this.monitorFleetHeaders(
7198
7201
  "reactivate",
7199
- _optionalChain([options, 'optionalAccess', _425 => _425.idempotencyKey])
7202
+ _optionalChain([options, 'optionalAccess', _426 => _426.idempotencyKey])
7200
7203
  ),
7201
7204
  maxRetries: 0,
7202
7205
  exactUrlOnly: true
@@ -7213,9 +7216,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
7213
7216
  * identical to "the request failed".
7214
7217
  */
7215
7218
  async waitForMonitorFleetConvergence(fleetId, options) {
7216
- const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _426 => _426.timeoutMs]), () => ( 10 * 6e4)));
7217
- const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _427 => _427.pollIntervalMs]), () => ( 2e3)));
7218
- const terminal = _optionalChain([options, 'optionalAccess', _428 => _428.until]) === "deactivated" ? /* @__PURE__ */ new Set(["deactivated", "degraded", "billing_suspended"]) : /* @__PURE__ */ new Set([
7219
+ const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _427 => _427.timeoutMs]), () => ( 10 * 6e4)));
7220
+ const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _428 => _428.pollIntervalMs]), () => ( 2e3)));
7221
+ const terminal = _optionalChain([options, 'optionalAccess', _429 => _429.until]) === "deactivated" ? /* @__PURE__ */ new Set(["deactivated", "degraded", "billing_suspended"]) : /* @__PURE__ */ new Set([
7219
7222
  "converged",
7220
7223
  "degraded",
7221
7224
  "deactivated",
@@ -7224,7 +7227,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
7224
7227
  const startedAt = Date.now();
7225
7228
  let latest = await this.getMonitorFleet(fleetId);
7226
7229
  while (true) {
7227
- _optionalChain([options, 'optionalAccess', _429 => _429.onProgress, 'optionalCall', _430 => _430(latest)]);
7230
+ _optionalChain([options, 'optionalAccess', _430 => _430.onProgress, 'optionalCall', _431 => _431(latest)]);
7228
7231
  const status = typeof latest.status === "string" ? latest.status : void 0;
7229
7232
  if (status && terminal.has(status)) return latest;
7230
7233
  if (Date.now() - startedAt >= timeoutMs) return latest;