deepline 0.3.392 → 0.3.393

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 (145) hide show
  1. package/dist/bundling-sources/sdk/src/client.ts +156 -24
  2. package/dist/bundling-sources/sdk/src/compat.ts +9 -0
  3. package/dist/bundling-sources/sdk/src/http.ts +5 -1
  4. package/dist/bundling-sources/sdk/src/index.ts +5 -0
  5. package/dist/bundling-sources/sdk/src/plays/run-request.ts +182 -6
  6. package/dist/bundling-sources/sdk/src/release.ts +4 -1
  7. package/dist/bundling-sources/sdk/src/types.ts +13 -0
  8. package/dist/bundling-sources/shared_libs/integration-contracts/request-warnings.ts +64 -0
  9. package/dist/bundling-sources/shared_libs/play-data-plane/runtime-sheet-storage-contract.ts +315 -0
  10. package/dist/bundling-sources/shared_libs/play-runtime/async-operation.ts +41 -8
  11. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +418 -44
  12. package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +36 -3
  13. package/dist/bundling-sources/shared_libs/play-runtime/durable-invocation-fence.ts +36 -0
  14. package/dist/bundling-sources/shared_libs/play-runtime/map-execution-frame.ts +11 -3
  15. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/projection/gateway-adapter.ts +1 -0
  16. package/dist/bundling-sources/shared_libs/play-runtime/play-runtime-semantics.ts +19 -1
  17. package/dist/bundling-sources/shared_libs/play-runtime/run-identity.ts +26 -0
  18. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +158 -10
  19. package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +235 -2
  20. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +92 -58
  21. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-pool.ts +7 -1
  22. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-progress.ts +30 -7
  23. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +1161 -316
  24. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-event-search.ts +28 -15
  25. package/dist/bundling-sources/shared_libs/play-runtime/tool-execute-retry-policy.ts +24 -3
  26. package/dist/bundling-sources/shared_libs/play-runtime/tool-result.ts +31 -0
  27. package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +37 -4
  28. package/dist/bundling-sources/shared_libs/plays/dataset.ts +172 -79
  29. package/dist/bundling-sources/shared_libs/plays/static-pipeline.ts +173 -1
  30. package/dist/cli/{auth-6JSA2ZCW.mjs → auth-5PXHA232.mjs} +4 -4
  31. package/dist/cli/auth-P3MVDTXM.js +39 -0
  32. package/dist/cli/{billing-Q5BLQHIU.js → billing-JFB2XLSO.js} +101 -74
  33. package/dist/cli/{billing-MRRO643H.mjs → billing-Z2N7ZAGM.mjs} +32 -5
  34. package/dist/cli/{chunk-CVLM3WMJ.js → chunk-2HAD745V.js} +242 -183
  35. package/dist/cli/{chunk-HGYBEAQP.mjs → chunk-2LGC4EFT.mjs} +3 -3
  36. package/dist/cli/{chunk-A3APGZFP.mjs → chunk-4PT2VA3A.mjs} +2 -2
  37. package/dist/cli/{chunk-6DBOU7UH.js → chunk-4XX6443T.js} +176 -87
  38. package/dist/cli/{chunk-2QLML6G4.mjs → chunk-5KWKZIQR.mjs} +4 -4
  39. package/dist/cli/{chunk-2G7DXFHI.mjs → chunk-5PRVMXKB.mjs} +27 -2
  40. package/dist/cli/{chunk-DSWSEHRX.mjs → chunk-6I73X254.mjs} +1 -1
  41. package/dist/cli/{chunk-ZTACINO5.mjs → chunk-7HR7BGZL.mjs} +13 -3
  42. package/dist/cli/{chunk-BB3FNYFY.js → chunk-AARX5L4B.js} +2 -2
  43. package/dist/cli/{chunk-WMS5U6YB.js → chunk-CDFH2DYL.js} +20 -19
  44. package/dist/cli/{chunk-R3O2CZ4H.mjs → chunk-FQ6VHPW4.mjs} +2 -2
  45. package/dist/cli/{chunk-MU6M3URX.mjs → chunk-HLEESTCH.mjs} +1 -1
  46. package/dist/cli/{chunk-Q6EOHNRH.mjs → chunk-JI2B4RZP.mjs} +119 -6
  47. package/dist/cli/{chunk-2Q3GEFL4.mjs → chunk-KIYU2TGL.mjs} +2 -2
  48. package/dist/cli/{chunk-Y6VOGHF2.mjs → chunk-KZZC33PY.mjs} +0 -181
  49. package/dist/cli/{chunk-UCKJQG25.js → chunk-L2SYLGRP.js} +8 -8
  50. package/dist/cli/{chunk-2GAHHSLB.mjs → chunk-LMMEAMA7.mjs} +3 -2
  51. package/dist/cli/{chunk-YAZCDBXX.mjs → chunk-LZPCDB7U.mjs} +3 -2
  52. package/dist/cli/{chunk-RV6ALZIX.js → chunk-M7Y7JYZX.js} +32 -7
  53. package/dist/cli/{chunk-QGKPTBRR.js → chunk-MS6GUPBB.js} +3 -3
  54. package/dist/cli/{chunk-4SFPVW7A.js → chunk-OXNOAD6Y.js} +26 -26
  55. package/dist/cli/{chunk-JOFPQGXW.js → chunk-PTDECJGP.js} +50 -50
  56. package/dist/cli/{chunk-5O4B6AUN.js → chunk-PWSWAN7Q.js} +25 -2
  57. package/dist/cli/{chunk-YN6YA7ZZ.mjs → chunk-Q26LUSQ2.mjs} +79 -20
  58. package/dist/cli/{chunk-3VN4FTE3.js → chunk-RDXFGPJU.js} +1 -182
  59. package/dist/cli/{chunk-7E66A24V.mjs → chunk-RKMB3N7K.mjs} +25 -2
  60. package/dist/cli/{chunk-JSLPHFP7.js → chunk-RWHWF5ZJ.js} +3 -2
  61. package/dist/cli/{chunk-3FV4GBRK.mjs → chunk-STNYIMIV.mjs} +97 -8
  62. package/dist/cli/chunk-UBKA33KY.mjs +310 -0
  63. package/dist/cli/{chunk-PAIMOGCM.js → chunk-UHNDVD3P.js} +125 -12
  64. package/dist/cli/{chunk-24VEN5PQ.mjs → chunk-UOGZUA24.mjs} +179 -17
  65. package/dist/cli/{chunk-T7OKJ2T6.js → chunk-VIQJIX2P.js} +73 -63
  66. package/dist/cli/{chunk-RIV2GS5E.js → chunk-VIWE6WRK.js} +627 -465
  67. package/dist/cli/{chunk-EY7RFC6A.js → chunk-W4WOMXR3.js} +15 -15
  68. package/dist/cli/chunk-XDVT3GOM.js +310 -0
  69. package/dist/cli/{chunk-2FQG2HU4.js → chunk-Z3OOZM5L.js} +8 -8
  70. package/dist/cli/{csv-E4QGUIGI.mjs → csv-KJWZHKCH.mjs} +3 -3
  71. package/dist/cli/{csv-26U5T24Z.js → csv-P3Z3YE7H.js} +12 -12
  72. package/dist/cli/{db-JTRJIAQW.mjs → db-NCM4CQIS.mjs} +6 -5
  73. package/dist/cli/{db-QHBFLMVL.js → db-NUZGJNQC.js} +31 -30
  74. package/dist/cli/{describe-E3DE3ZK3.mjs → describe-WT6MM2GO.mjs} +17 -16
  75. package/dist/cli/{describe-FDV2V74F.js → describe-YGSEN5WC.js} +24 -23
  76. package/dist/cli/{executions-VZYOGVQY.js → executions-PCOLHN7Q.js} +8 -7
  77. package/dist/cli/{executions-B3GTNPRE.mjs → executions-XS2IPJ4W.mjs} +6 -5
  78. package/dist/cli/{feedback-CR55FJA2.js → feedback-4MSH7TFU.js} +7 -7
  79. package/dist/cli/{feedback-4CEBR3OV.mjs → feedback-CCLTS5SV.mjs} +3 -3
  80. package/dist/cli/{git-NM2PHHZ4.mjs → git-K2DHPMPC.mjs} +4 -4
  81. package/dist/cli/git-RNM45FX4.js +23 -0
  82. package/dist/cli/index.js +96 -92
  83. package/dist/cli/index.mjs +46 -42
  84. package/dist/cli/{legacy-noops-A7MSW5ND.mjs → legacy-noops-B5S4AR3P.mjs} +4 -4
  85. package/dist/cli/{legacy-noops-ZUA4YFIH.js → legacy-noops-GPNOPFXV.js} +7 -7
  86. package/dist/cli/{monitors-NVPRQYP3.mjs → monitors-JLMAIPRG.mjs} +6 -5
  87. package/dist/cli/{monitors-ZE3TLZ4H.js → monitors-ZAWD7NSN.js} +87 -86
  88. package/dist/cli/{org-U7A6DV5D.js → org-P2KN4CES.js} +66 -65
  89. package/dist/cli/{org-KUBILNQV.mjs → org-T3JTHP4G.mjs} +6 -5
  90. package/dist/cli/{play-HRDXQ4QE.mjs → play-NK6BLRGL.mjs} +11 -10
  91. package/dist/cli/play-PDXR6JFB.js +158 -0
  92. package/dist/cli/{providers-OHIWI453.mjs → providers-3NQRA7IT.mjs} +6 -5
  93. package/dist/cli/{providers-VD6YTVQZ.js → providers-5QRZN3DT.js} +9 -8
  94. package/dist/cli/{quickstart-UBV2FONF.mjs → quickstart-PIA2JGPV.mjs} +3 -3
  95. package/dist/cli/{quickstart-ETTCWPA4.js → quickstart-R7NUZGNW.js} +5 -5
  96. package/dist/cli/run-identity-G257GQED.js +25 -0
  97. package/dist/cli/run-identity-MRNCEGV2.mjs +25 -0
  98. package/dist/cli/{search-F44IZRT7.mjs → search-AIDIIGLY.mjs} +7 -6
  99. package/dist/cli/search-QRWL7MFM.js +27 -0
  100. package/dist/cli/{secrets-CAEMRORF.js → secrets-BT3PGMWN.js} +15 -14
  101. package/dist/cli/{secrets-R6XOJZKU.mjs → secrets-OQNHL45O.mjs} +6 -5
  102. package/dist/cli/{sessions-6GC7OFTT.js → sessions-EYXWOSWK.js} +5 -5
  103. package/dist/cli/{sessions-RLN6UQS3.mjs → sessions-SF7WJPJP.mjs} +4 -4
  104. package/dist/cli/{settings-DPNVUAV2.js → settings-BA3GHBOD.js} +76 -75
  105. package/dist/cli/{settings-KIPAMRPP.mjs → settings-Y57JTFDD.mjs} +9 -8
  106. package/dist/cli/{setup-TU2F7PU5.mjs → setup-7GR5GBHA.mjs} +6 -6
  107. package/dist/cli/{setup-DTL3L5SG.js → setup-RERXYC66.js} +41 -41
  108. package/dist/cli/{skills-UV5MYJ46.mjs → skills-SJWIQAV5.mjs} +4 -4
  109. package/dist/cli/skills-V7EY75HB.js +28 -0
  110. package/dist/cli/tools-H5HLBCHH.js +41 -0
  111. package/dist/cli/{tools-QRRNDCQ7.mjs → tools-ZF3JXPNL.mjs} +10 -9
  112. package/dist/cli/update-472HA3LT.js +28 -0
  113. package/dist/cli/{update-4426TF35.mjs → update-FFFYQAOJ.mjs} +6 -6
  114. package/dist/cli/{workflow-HNLOVISB.js → workflow-SZJVQH4T.js} +17 -16
  115. package/dist/cli/{workflow-N4U5VLZ3.mjs → workflow-XVFEEGAS.mjs} +7 -6
  116. package/dist/{client-e6Qh5ZIg.d.mts → client-DU5dtHDy.d.mts} +153 -4
  117. package/dist/{client-Uxuy-xQ2.d.ts → client-mCE88hC4.d.ts} +153 -4
  118. package/dist/{compiler-manifest-CY2v8ab0.d.ts → compiler-manifest-DE4RdAiY.d.mts} +61 -1
  119. package/dist/{compiler-manifest-CY2v8ab0.d.mts → compiler-manifest-DE4RdAiY.d.ts} +61 -1
  120. package/dist/{index-B9fBZH1g.d.mts → index-BI6nWgaV.d.mts} +1 -1
  121. package/dist/{index-BZ6uzZJl.d.ts → index-Bi-f7HFT.d.ts} +1 -1
  122. package/dist/index.d.mts +5 -5
  123. package/dist/index.d.ts +5 -5
  124. package/dist/index.js +120 -29
  125. package/dist/index.mjs +111 -20
  126. package/dist/install-integrity.json +91 -86
  127. package/dist/plays/bundle-play-file.d.mts +3 -3
  128. package/dist/plays/bundle-play-file.d.ts +3 -3
  129. package/dist/plays/bundle-play-file.mjs +2 -2
  130. package/dist/plays/run-request.d.mts +2 -2
  131. package/dist/plays/run-request.d.ts +2 -2
  132. package/dist/plays/run-request.js +5 -2
  133. package/dist/plays/run-request.mjs +4 -1
  134. package/dist/release.d.mts +4 -1
  135. package/dist/release.d.ts +4 -1
  136. package/dist/release.js +2 -2
  137. package/dist/release.mjs +1 -1
  138. package/package.json +1 -1
  139. package/dist/cli/auth-67TAELQL.js +0 -39
  140. package/dist/cli/git-I5JTK6YU.js +0 -23
  141. package/dist/cli/play-A2V7YDU7.js +0 -157
  142. package/dist/cli/search-WWXMBVPH.js +0 -26
  143. package/dist/cli/skills-SWOSEZLB.js +0 -28
  144. package/dist/cli/tools-IL2YCDQ6.js +0 -40
  145. package/dist/cli/update-BERDPEYR.js +0 -28
@@ -13,7 +13,7 @@ var _chunkS6R3OX7Bjs = require('./chunk-S6R3OX7B.js');
13
13
 
14
14
 
15
15
 
16
- var _chunkPAIMOGCMjs = require('./chunk-PAIMOGCM.js');
16
+ var _chunkUHNDVD3Pjs = require('./chunk-UHNDVD3P.js');
17
17
 
18
18
 
19
19
 
@@ -21,7 +21,7 @@ var _chunkPAIMOGCMjs = require('./chunk-PAIMOGCM.js');
21
21
 
22
22
 
23
23
 
24
- var _chunkWMS5U6YBjs = require('./chunk-WMS5U6YB.js');
24
+ var _chunkCDFH2DYLjs = require('./chunk-CDFH2DYL.js');
25
25
 
26
26
 
27
27
 
@@ -137,7 +137,7 @@ async function queryCustomerDatabase(http, input) {
137
137
  if (error instanceof _chunk7P5AA3SNjs.DeeplineError && (_optionalChain([error, 'access', _ => _.code, 'optionalAccess', _2 => _2.startsWith, 'call', _3 => _3("NETWORK_")]) || // Older API readers return PostgreSQL errors as HTTP 400, including
138
138
  // lost connections and explicitly unknown transaction resolution.
139
139
  /^08[A-Z0-9]{3}$/.test(_nullishCoalesce(error.code, () => ( ""))) || ["57P01", "57P02", "57P03"].includes(_nullishCoalesce(error.code, () => ( ""))) || error.statusCode === 408 || (_nullishCoalesce(error.statusCode, () => ( 0))) >= 500)) {
140
- throw new (0, _chunkWMS5U6YBjs.CustomerDbQueryOutcomeUnknownError)(
140
+ throw new (0, _chunkCDFH2DYLjs.CustomerDbQueryOutcomeUnknownError)(
141
141
  error,
142
142
  plan.request.body.operation_key
143
143
  );
@@ -145,7 +145,7 @@ async function queryCustomerDatabase(http, input) {
145
145
  throw error;
146
146
  }
147
147
  if (!result || typeof result !== "object" || Array.isArray(result) || typeof result.command !== "string" || !Array.isArray(result.columns) || !Array.isArray(result.rows) || typeof result.truncated !== "boolean" || result.row_count !== null && (!Number.isSafeInteger(result.row_count) || result.row_count < 0) || !Number.isSafeInteger(result.row_count_returned) || result.row_count_returned < 0) {
148
- throw new (0, _chunkWMS5U6YBjs.CustomerDbQueryOutcomeUnknownError)(
148
+ throw new (0, _chunkCDFH2DYLjs.CustomerDbQueryOutcomeUnknownError)(
149
149
  new (0, _chunk7P5AA3SNjs.DeeplineError)(
150
150
  "The SQL response did not contain a valid result.",
151
151
  200,
@@ -156,7 +156,7 @@ async function queryCustomerDatabase(http, input) {
156
156
  }
157
157
  const operation = result.operation;
158
158
  if (input.operationKey !== void 0 && (!operation || operation.operation_key !== input.operationKey || !Number.isSafeInteger(operation.completed_at_ms) || operation.completed_at_ms < 0 || !["executed", "operation_recovery"].includes(operation.source))) {
159
- throw new (0, _chunkWMS5U6YBjs.CustomerDbQueryOutcomeUnknownError)(
159
+ throw new (0, _chunkCDFH2DYLjs.CustomerDbQueryOutcomeUnknownError)(
160
160
  new (0, _chunk7P5AA3SNjs.DeeplineError)(
161
161
  "The server did not confirm the original atomic SQL operation.",
162
162
  200,
@@ -2341,7 +2341,7 @@ var TERMINAL_STATUS_BY_EVENT_TYPE = {
2341
2341
 
2342
2342
  // ../play-runtime/run-snapshot-stream.ts
2343
2343
  function isTerminalPlayRunLiveStatus(status) {
2344
- return _chunkPAIMOGCMjs.isTerminalPlayRunLifecycleStatus.call(void 0, status);
2344
+ return _chunkUHNDVD3Pjs.isTerminalPlayRunLifecycleStatus.call(void 0, status);
2345
2345
  }
2346
2346
  function makeRunStreamEvent(input) {
2347
2347
  return {
@@ -2911,8 +2911,8 @@ function runtimeSelectionHeaders(runtime, env) {
2911
2911
  }
2912
2912
  const receivers = _optionalChain([env, 'access', _98 => _98.DEEPLINE_RUNTIME_RETAINED_PIPELINE_RECEIVERS, 'optionalAccess', _99 => _99.trim, 'call', _100 => _100()]);
2913
2913
  return {
2914
- [_chunkWMS5U6YBjs.RUNTIME_ENVIRONMENT_TOKEN_HEADER]: token,
2915
- ...receivers ? { [_chunkWMS5U6YBjs.RETAINED_PIPELINE_RECEIVERS_HEADER]: receivers } : {}
2914
+ [_chunkCDFH2DYLjs.RUNTIME_ENVIRONMENT_TOKEN_HEADER]: token,
2915
+ ...receivers ? { [_chunkCDFH2DYLjs.RETAINED_PIPELINE_RECEIVERS_HEADER]: receivers } : {}
2916
2916
  };
2917
2917
  }
2918
2918
  function isolatedCiRuntimeEventReadHeaders(env) {
@@ -2928,7 +2928,7 @@ function isolatedCiRuntimeEventReadHeaders(env) {
2928
2928
  "RUNTIME_EVENT_INTERNAL_TOKEN_REQUIRED"
2929
2929
  );
2930
2930
  }
2931
- return { [_chunkWMS5U6YBjs.COORDINATOR_INTERNAL_TOKEN_HEADER]: token };
2931
+ return { [_chunkCDFH2DYLjs.COORDINATOR_INTERNAL_TOKEN_HEADER]: token };
2932
2932
  }
2933
2933
  function normalizeTestPolicyOverrides(value, source) {
2934
2934
  if (value && typeof value === "object" && !Array.isArray(value)) {
@@ -3076,10 +3076,10 @@ function preferPrebuiltPlayDescriptions(plays) {
3076
3076
  ).map(({ play }) => play);
3077
3077
  }
3078
3078
  function normalizePlayStatus(raw) {
3079
- const runPackage = _chunkPAIMOGCMjs.isPlayRunPackage.call(void 0, raw) ? raw : _chunkPAIMOGCMjs.isPlayRunPackage.call(void 0, raw.package) ? raw.package : null;
3079
+ const runPackage = _chunkUHNDVD3Pjs.isPlayRunPackage.call(void 0, raw) ? raw : _chunkUHNDVD3Pjs.isPlayRunPackage.call(void 0, raw.package) ? raw.package : null;
3080
3080
  const packageRun = _optionalChain([runPackage, 'optionalAccess', _125 => _125.run]);
3081
3081
  const rawStatus = typeof raw.status === "string" ? raw.status : typeof _optionalChain([packageRun, 'optionalAccess', _126 => _126.status]) === "string" ? packageRun.status : null;
3082
- const status = _chunkPAIMOGCMjs.decodePlayRunPublicStatus.call(void 0, rawStatus);
3082
+ const status = _chunkUHNDVD3Pjs.decodePlayRunPublicStatus.call(void 0, rawStatus);
3083
3083
  if (!status) {
3084
3084
  throw new Error(
3085
3085
  `Invalid play run lifecycle status in API response: ${JSON.stringify(rawStatus)}.`
@@ -3113,7 +3113,7 @@ function playLiveRunStatus(event) {
3113
3113
  return null;
3114
3114
  }
3115
3115
  const payload = getPlayLiveEventPayload(event);
3116
- return _nullishCoalesce(_chunkPAIMOGCMjs.decodePlayRunPublicStatus.call(void 0, payload.status), () => ( (_chunkPAIMOGCMjs.isPlayRunPackage.call(void 0, payload) ? _chunkPAIMOGCMjs.decodePlayRunPublicStatus.call(void 0, payload.run.status) : null)));
3116
+ return _nullishCoalesce(_chunkUHNDVD3Pjs.decodePlayRunPublicStatus.call(void 0, payload.status), () => ( (_chunkUHNDVD3Pjs.isPlayRunPackage.call(void 0, payload) ? _chunkUHNDVD3Pjs.decodePlayRunPublicStatus.call(void 0, payload.run.status) : null)));
3117
3117
  }
3118
3118
  function appendPlayLiveLogLines(state, payload) {
3119
3119
  const lines = readStringArray(payload.lines);
@@ -3145,7 +3145,7 @@ function updatePlayLiveStatusState(state, event) {
3145
3145
  if (event.type !== "play.run.snapshot" && event.type !== "play.run.status" && event.type !== "play.run.final_status") {
3146
3146
  return null;
3147
3147
  }
3148
- const runId = typeof payload.runId === "string" && payload.runId ? payload.runId : _chunkPAIMOGCMjs.isPlayRunPackage.call(void 0, payload) ? payload.run.id : state.runId;
3148
+ const runId = typeof payload.runId === "string" && payload.runId ? payload.runId : _chunkUHNDVD3Pjs.isPlayRunPackage.call(void 0, payload) ? payload.run.id : state.runId;
3149
3149
  const status = _nullishCoalesce(playLiveRunStatus(event), () => ( state.status));
3150
3150
  const progressPayload = isRecord2(payload.progress) ? payload.progress : {};
3151
3151
  if (event.type === "play.run.final_status" && state.logs.length === 0 && state.lastLogSeq === 0) {
@@ -3158,7 +3158,7 @@ function updatePlayLiveStatusState(state, event) {
3158
3158
  }
3159
3159
  if ("result" in payload) {
3160
3160
  state.result = payload.result;
3161
- } else if (_chunkPAIMOGCMjs.isPlayRunPackage.call(void 0, payload)) {
3161
+ } else if (_chunkUHNDVD3Pjs.isPlayRunPackage.call(void 0, payload)) {
3162
3162
  state.result = payload;
3163
3163
  }
3164
3164
  if (typeof payload.error === "string" && payload.error.trim()) {
@@ -3171,7 +3171,7 @@ function updatePlayLiveStatusState(state, event) {
3171
3171
  ...payload,
3172
3172
  runId,
3173
3173
  status,
3174
- ..._chunkPAIMOGCMjs.isPlayRunPackage.call(void 0, payload) ? { package: payload, outputs: payload.outputs } : {},
3174
+ ..._chunkUHNDVD3Pjs.isPlayRunPackage.call(void 0, payload) ? { package: payload, outputs: payload.outputs } : {},
3175
3175
  progress: {
3176
3176
  ...progressRecord,
3177
3177
  status: typeof progressRecord.status === "string" ? progressRecord.status : status,
@@ -3219,9 +3219,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
3219
3219
  * @throws {@link ConfigError} if no API key can be resolved from any source.
3220
3220
  */
3221
3221
  constructor(options) {
3222
- this.config = _chunkWMS5U6YBjs.resolveConfig.call(void 0, options);
3222
+ this.config = _chunkCDFH2DYLjs.resolveConfig.call(void 0, options);
3223
3223
  this.environment = _nullishCoalesce(this.config.environment, () => ( process.env));
3224
- this.http = new (0, _chunkWMS5U6YBjs.HttpClient)(this.config);
3224
+ this.http = new (0, _chunkCDFH2DYLjs.HttpClient)(this.config);
3225
3225
  this.toolCalls = new ToolCalls(
3226
3226
  this.http,
3227
3227
  this.config.timeout,
@@ -3256,6 +3256,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
3256
3256
  input: (runId) => this.getRunInput(runId),
3257
3257
  rerun: (runId, options2) => this.rerun(runId, options2),
3258
3258
  exportDatasetRows: (input) => this.getPlaySheetRows(input),
3259
+ rowHistory: (input) => this.getPlayRunRowHistory(input),
3259
3260
  stop: (runId, options2) => this.stopRun(runId, options2),
3260
3261
  stopAll: ((options2) => this.stopAllRuns(options2))
3261
3262
  };
@@ -3264,6 +3265,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
3264
3265
  planQuery: (input) => planCustomerDbQuery(input)
3265
3266
  };
3266
3267
  this.billing = {
3268
+ quote: (input) => this.http.post("/api/v2/billing/quote", input),
3267
3269
  entitlements: () => this.http.get("/api/v2/billing/entitlements"),
3268
3270
  topUp: (options2) => this.topUpBillingBalance(options2),
3269
3271
  topUpWithReceipt: (options2) => this.topUpBillingBalanceWithReceipt(options2),
@@ -3737,14 +3739,62 @@ var DeeplineClient = (_class = class _DeeplineClient {
3737
3739
  * });
3738
3740
  * ```
3739
3741
  */
3740
- async startPlayRun(request) {
3742
+ async startPlayRun(request, options) {
3741
3743
  const resolved = resolveStartPlayRunRequest(request, this.environment);
3742
- return _chunkPAIMOGCMjs.startPlayRun.call(void 0,
3744
+ return _chunkUHNDVD3Pjs.startPlayRun.call(void 0,
3743
3745
  this.http,
3744
3746
  resolved.request,
3745
- runtimeSelectionHeaders(resolved.runtime, this.environment)
3747
+ runtimeSelectionHeaders(resolved.runtime, this.environment),
3748
+ _optionalChain([options, 'optionalAccess', _184 => _184.onSubmission])
3746
3749
  );
3747
3750
  }
3751
+ /**
3752
+ * Prepare a tenant-scoped start intent without executing it. Its stream
3753
+ * sender retains the exact body and transport selected during preparation.
3754
+ */
3755
+ async preparePlayRunAdmission(request, options) {
3756
+ const resolved = resolveStartPlayRunRequest(request, this.environment);
3757
+ const prepared = await _chunkUHNDVD3Pjs.preparePlayRunAdmission.call(void 0,
3758
+ this.http,
3759
+ resolved.request,
3760
+ _optionalChain([options, 'optionalAccess', _185 => _185.onSubmission])
3761
+ );
3762
+ const bodyJson = JSON.stringify(prepared.body);
3763
+ const headers = runtimeSelectionHeaders(resolved.runtime, this.environment);
3764
+ const http = this.http;
3765
+ let submitted = false;
3766
+ return {
3767
+ ...prepared,
3768
+ async *startStream(streamOptions) {
3769
+ if (submitted && !prepared.supportsCallerIntent) {
3770
+ throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
3771
+ "This server has not enabled caller-owned admission recovery. Do not retry an ambiguous start.",
3772
+ 409,
3773
+ "PLAY_RUN_ADMISSION_RECOVERY_UNSUPPORTED"
3774
+ );
3775
+ }
3776
+ if (submitted) {
3777
+ await _chunkUHNDVD3Pjs.preparePlayRunAdmission.call(void 0,
3778
+ http,
3779
+ JSON.parse(bodyJson)
3780
+ );
3781
+ }
3782
+ submitted = true;
3783
+ for await (const event of http.streamSse(
3784
+ _chunkUHNDVD3Pjs.PLAY_RUN_START_STREAM_PATH,
3785
+ {
3786
+ method: "POST",
3787
+ body: JSON.parse(bodyJson),
3788
+ headers,
3789
+ signal: _optionalChain([streamOptions, 'optionalAccess', _186 => _186.signal]),
3790
+ exactUrlOnly: true
3791
+ }
3792
+ )) {
3793
+ if (event.scope === "play") yield event;
3794
+ }
3795
+ }
3796
+ };
3797
+ }
3748
3798
  /**
3749
3799
  * Submit a play run through the legacy event response.
3750
3800
  *
@@ -3759,21 +3809,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
3759
3809
  * @returns Async generator of play-scoped live events.
3760
3810
  */
3761
3811
  async *startPlayRunStream(request, options) {
3762
- const resolved = resolveStartPlayRunRequest(request, this.environment);
3763
- const body = _chunkPAIMOGCMjs.buildPlayRunStartBody.call(void 0, resolved.request);
3764
- for await (const event of this.http.streamSse(
3765
- _chunkPAIMOGCMjs.PLAY_RUN_START_STREAM_PATH,
3766
- {
3767
- method: "POST",
3768
- body,
3769
- headers: runtimeSelectionHeaders(resolved.runtime, this.environment),
3770
- signal: _optionalChain([options, 'optionalAccess', _184 => _184.signal])
3771
- }
3772
- )) {
3773
- if (event.scope === "play") {
3774
- yield event;
3775
- }
3776
- }
3812
+ const prepared = await this.preparePlayRunAdmission(request, options);
3813
+ yield* prepared.startStream({ signal: _optionalChain([options, 'optionalAccess', _187 => _187.signal]) });
3777
3814
  }
3778
3815
  /**
3779
3816
  * Register a bundled play artifact.
@@ -3927,7 +3964,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
3927
3964
  compilerManifest,
3928
3965
  ...input.input ? { input: input.input } : {},
3929
3966
  ...input.inputFile ? { inputFile: input.inputFile } : {},
3930
- ..._optionalChain([input, 'access', _185 => _185.packagedFiles, 'optionalAccess', _186 => _186.length]) ? { packagedFiles: input.packagedFiles } : {},
3967
+ ..._optionalChain([input, 'access', _188 => _188.packagedFiles, 'optionalAccess', _189 => _189.length]) ? { packagedFiles: input.packagedFiles } : {},
3931
3968
  ...input.force ? { force: true } : {},
3932
3969
  ...input.forceToolRefresh ? { forceToolRefresh: true } : {}
3933
3970
  });
@@ -3957,29 +3994,29 @@ var DeeplineClient = (_class = class _DeeplineClient {
3957
3994
  * ```
3958
3995
  */
3959
3996
  async submitPlay(code, csvPath, name, options) {
3960
- const runtimeInput = _optionalChain([options, 'optionalAccess', _187 => _187.input]) ? { ...options.input } : {};
3997
+ const runtimeInput = _optionalChain([options, 'optionalAccess', _190 => _190.input]) ? { ...options.input } : {};
3961
3998
  if (csvPath) {
3962
3999
  runtimeInput.file = csvPath;
3963
4000
  }
3964
- const sourceCode = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _188 => _188.sourceCode]), () => ( code));
3965
- const artifact = _optionalChain([options, 'optionalAccess', _189 => _189.artifact]);
3966
- if (!_optionalChain([name, 'optionalAccess', _190 => _190.trim, 'call', _191 => _191()])) {
4001
+ const sourceCode = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _191 => _191.sourceCode]), () => ( code));
4002
+ const artifact = _optionalChain([options, 'optionalAccess', _192 => _192.artifact]);
4003
+ if (!_optionalChain([name, 'optionalAccess', _193 => _193.trim, 'call', _194 => _194()])) {
3967
4004
  throw new Error("submitPlay requires a play name.");
3968
4005
  }
3969
4006
  if (!artifact) {
3970
4007
  throw new Error("submitPlay requires a bundled play artifact.");
3971
4008
  }
3972
- const compilerManifest = await _asyncNullishCoalesce(await _asyncOptionalChain([options, 'optionalAccess', async _192 => _192.compilerManifest]), async () => ( await this.compilePlayManifest({
4009
+ const compilerManifest = await _asyncNullishCoalesce(await _asyncOptionalChain([options, 'optionalAccess', async _195 => _195.compilerManifest]), async () => ( await this.compilePlayManifest({
3973
4010
  name,
3974
4011
  sourceCode,
3975
- sourceFiles: _optionalChain([options, 'optionalAccess', _193 => _193.sourceFiles]),
4012
+ sourceFiles: _optionalChain([options, 'optionalAccess', _196 => _196.sourceFiles]),
3976
4013
  artifact
3977
4014
  })));
3978
4015
  const registeredArtifact = await this.registerPlayArtifact({
3979
4016
  name,
3980
4017
  sourceCode,
3981
- sourceFiles: _optionalChain([options, 'optionalAccess', _194 => _194.sourceFiles]),
3982
- description: _optionalChain([options, 'optionalAccess', _195 => _195.description]),
4018
+ sourceFiles: _optionalChain([options, 'optionalAccess', _197 => _197.sourceFiles]),
4019
+ description: _optionalChain([options, 'optionalAccess', _198 => _198.description]),
3983
4020
  artifact,
3984
4021
  compilerManifest,
3985
4022
  publish: false
@@ -3993,17 +4030,17 @@ var DeeplineClient = (_class = class _DeeplineClient {
3993
4030
  name,
3994
4031
  artifactStorageKey: registeredArtifact.artifactStorageKey,
3995
4032
  sourceCode,
3996
- description: _optionalChain([options, 'optionalAccess', _196 => _196.description]),
4033
+ description: _optionalChain([options, 'optionalAccess', _199 => _199.description]),
3997
4034
  staticPipeline: _nullishCoalesce(registeredArtifact.staticPipeline, () => ( null)),
3998
4035
  artifactHash: typeof artifact.artifactHash === "string" ? artifact.artifactHash : void 0,
3999
4036
  graphHash: typeof artifact.graphHash === "string" ? artifact.graphHash : void 0,
4000
4037
  runtimeArtifact: artifact,
4001
4038
  compilerManifest,
4002
4039
  ...Object.keys(runtimeInput).length > 0 ? { input: runtimeInput } : {},
4003
- ..._optionalChain([options, 'optionalAccess', _197 => _197.inputFile]) ? { inputFile: options.inputFile } : {},
4004
- ..._optionalChain([options, 'optionalAccess', _198 => _198.packagedFiles, 'optionalAccess', _199 => _199.length]) ? { packagedFiles: options.packagedFiles } : {},
4005
- ..._optionalChain([options, 'optionalAccess', _200 => _200.force]) ? { force: true } : {},
4006
- ..._optionalChain([options, 'optionalAccess', _201 => _201.forceToolRefresh]) ? { forceToolRefresh: true } : {}
4040
+ ..._optionalChain([options, 'optionalAccess', _200 => _200.inputFile]) ? { inputFile: options.inputFile } : {},
4041
+ ..._optionalChain([options, 'optionalAccess', _201 => _201.packagedFiles, 'optionalAccess', _202 => _202.length]) ? { packagedFiles: options.packagedFiles } : {},
4042
+ ..._optionalChain([options, 'optionalAccess', _203 => _203.force]) ? { force: true } : {},
4043
+ ..._optionalChain([options, 'optionalAccess', _204 => _204.forceToolRefresh]) ? { forceToolRefresh: true } : {}
4007
4044
  });
4008
4045
  }
4009
4046
  /**
@@ -4031,7 +4068,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4031
4068
  * ```
4032
4069
  */
4033
4070
  async stagePlayFiles(files) {
4034
- return _chunkPAIMOGCMjs.stagePlayFiles.call(void 0, this.http, files);
4071
+ return _chunkUHNDVD3Pjs.stagePlayFiles.call(void 0, this.http, files);
4035
4072
  }
4036
4073
  /**
4037
4074
  * Mint short-lived presigned upload targets for staged play files.
@@ -4041,7 +4078,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4041
4078
  * already holds, or a presigned PUT URL the caller uploads the body to.
4042
4079
  */
4043
4080
  async mintStagedPlayFileUploads(files) {
4044
- return _chunkPAIMOGCMjs.mintStagedPlayFileUploads.call(void 0, this.http, files);
4081
+ return _chunkUHNDVD3Pjs.mintStagedPlayFileUploads.call(void 0, this.http, files);
4045
4082
  }
4046
4083
  /**
4047
4084
  * Resolve staged play files by content hash without uploading bytes.
@@ -4073,10 +4110,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
4073
4110
  */
4074
4111
  async getPlayStatus(workflowId, options) {
4075
4112
  const params = new URLSearchParams();
4076
- if (_optionalChain([options, 'optionalAccess', _202 => _202.billing]) === false) {
4113
+ if (_optionalChain([options, 'optionalAccess', _205 => _205.billing]) === false) {
4077
4114
  params.set("billing", "false");
4078
4115
  }
4079
- if (_optionalChain([options, 'optionalAccess', _203 => _203.full]) === true) {
4116
+ if (_optionalChain([options, 'optionalAccess', _206 => _206.full]) === true) {
4080
4117
  params.set("full", "true");
4081
4118
  }
4082
4119
  const query = params.size > 0 ? `?${params.toString()}` : "";
@@ -4090,9 +4127,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
4090
4127
  for await (const event of watchRunEvents({
4091
4128
  http: this.http,
4092
4129
  runId: workflowId,
4093
- signal: _optionalChain([options, 'optionalAccess', _204 => _204.signal]),
4094
- onNotice: _optionalChain([options, 'optionalAccess', _205 => _205.onNotice]),
4095
- onRetry: _optionalChain([options, 'optionalAccess', _206 => _206.onRetry])
4130
+ signal: _optionalChain([options, 'optionalAccess', _207 => _207.signal]),
4131
+ onNotice: _optionalChain([options, 'optionalAccess', _208 => _208.onNotice]),
4132
+ onRetry: _optionalChain([options, 'optionalAccess', _209 => _209.onRetry])
4096
4133
  })) {
4097
4134
  yield event;
4098
4135
  }
@@ -4104,12 +4141,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
4104
4141
  * @deprecated Use `watchRunEvents` for ordinary run watching.
4105
4142
  */
4106
4143
  async *streamPlayRunEvents(workflowId, options) {
4107
- const headers = _optionalChain([options, 'optionalAccess', _207 => _207.lastEventId]) && options.lastEventId.trim() ? { "Last-Event-ID": options.lastEventId.trim() } : void 0;
4144
+ const headers = _optionalChain([options, 'optionalAccess', _210 => _210.lastEventId]) && options.lastEventId.trim() ? { "Last-Event-ID": options.lastEventId.trim() } : void 0;
4108
4145
  const params = new URLSearchParams();
4109
- params.set("mode", _nullishCoalesce(_optionalChain([options, 'optionalAccess', _208 => _208.mode]), () => ( "cli")));
4146
+ params.set("mode", _nullishCoalesce(_optionalChain([options, 'optionalAccess', _211 => _211.mode]), () => ( "cli")));
4110
4147
  for await (const event of this.http.streamSse(
4111
4148
  `/api/v2/runs/${encodeURIComponent(workflowId)}/tail?${params.toString()}`,
4112
- { signal: _optionalChain([options, 'optionalAccess', _209 => _209.signal]), headers }
4149
+ { signal: _optionalChain([options, 'optionalAccess', _212 => _212.signal]), headers }
4113
4150
  )) {
4114
4151
  if (event.scope === "play") {
4115
4152
  yield event;
@@ -4125,28 +4162,28 @@ var DeeplineClient = (_class = class _DeeplineClient {
4125
4162
  */
4126
4163
  async *observeRunEvents(runId, options) {
4127
4164
  yield* this.watchRunEvents(runId, {
4128
- signal: _optionalChain([options, 'optionalAccess', _210 => _210.signal]),
4129
- onNotice: _optionalChain([options, 'optionalAccess', _211 => _211.onNotice])
4165
+ signal: _optionalChain([options, 'optionalAccess', _213 => _213.signal]),
4166
+ onNotice: _optionalChain([options, 'optionalAccess', _214 => _214.onNotice])
4130
4167
  });
4131
4168
  }
4132
4169
  /** Poll snapshots to terminal status and return the durable package. */
4133
4170
  async watchRunToTerminal(runId, options) {
4134
4171
  let terminalObserved = false;
4135
4172
  for await (const event of this.watchRunEvents(runId, {
4136
- signal: _optionalChain([options, 'optionalAccess', _212 => _212.signal]),
4137
- onNotice: _optionalChain([options, 'optionalAccess', _213 => _213.onNotice]),
4138
- onRetry: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _214 => _214.onRetry]), () => ( _optionalChain([options, 'optionalAccess', _215 => _215.onReconnect])))
4173
+ signal: _optionalChain([options, 'optionalAccess', _215 => _215.signal]),
4174
+ onNotice: _optionalChain([options, 'optionalAccess', _216 => _216.onNotice]),
4175
+ onRetry: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _217 => _217.onRetry]), () => ( _optionalChain([options, 'optionalAccess', _218 => _218.onReconnect])))
4139
4176
  })) {
4140
- _optionalChain([options, 'optionalAccess', _216 => _216.onEvent, 'optionalCall', _217 => _217(event)]);
4141
- if (_chunkPAIMOGCMjs.isTerminalPlayRunLifecycleStatus.call(void 0, playLiveRunStatus(event))) {
4177
+ _optionalChain([options, 'optionalAccess', _219 => _219.onEvent, 'optionalCall', _220 => _220(event)]);
4178
+ if (_chunkUHNDVD3Pjs.isTerminalPlayRunLifecycleStatus.call(void 0, playLiveRunStatus(event))) {
4142
4179
  terminalObserved = true;
4143
4180
  }
4144
4181
  }
4145
- if (_optionalChain([options, 'optionalAccess', _218 => _218.signal, 'optionalAccess', _219 => _219.aborted])) {
4182
+ if (_optionalChain([options, 'optionalAccess', _221 => _221.signal, 'optionalAccess', _222 => _222.aborted])) {
4146
4183
  throw new (0, _chunk7P5AA3SNjs.DeeplineError)("Run watch aborted.", void 0, "ABORTED");
4147
4184
  }
4148
4185
  const refreshed = await this.getRunStatus(runId);
4149
- if (terminalObserved || _chunkPAIMOGCMjs.isTerminalPlayRunLifecycleStatus.call(void 0, refreshed.status)) {
4186
+ if (terminalObserved || _chunkUHNDVD3Pjs.isTerminalPlayRunLifecycleStatus.call(void 0, refreshed.status)) {
4150
4187
  return refreshed;
4151
4188
  }
4152
4189
  throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
@@ -4196,7 +4233,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4196
4233
  async stopPlay(workflowId, options) {
4197
4234
  return this.http.post(
4198
4235
  `/api/v2/runs/${encodeURIComponent(workflowId)}/stop`,
4199
- _optionalChain([options, 'optionalAccess', _220 => _220.reason]) ? { reason: options.reason } : {}
4236
+ _optionalChain([options, 'optionalAccess', _223 => _223.reason]) ? { reason: options.reason } : {}
4200
4237
  );
4201
4238
  }
4202
4239
  /**
@@ -4232,7 +4269,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4232
4269
  /** List the org's workflows. `GET /api/v2/workflows`. */
4233
4270
  async listWorkflows(options) {
4234
4271
  const params = new URLSearchParams();
4235
- if (typeof _optionalChain([options, 'optionalAccess', _221 => _221.limit]) === "number") {
4272
+ if (typeof _optionalChain([options, 'optionalAccess', _224 => _224.limit]) === "number") {
4236
4273
  params.set("limit", String(options.limit));
4237
4274
  }
4238
4275
  const query = params.size > 0 ? `?${params.toString()}` : "";
@@ -4285,7 +4322,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4285
4322
  /** List a workflow's runs. `GET /api/v2/workflows/:id/runs`. */
4286
4323
  async listWorkflowRuns(id, options) {
4287
4324
  const params = new URLSearchParams();
4288
- if (typeof _optionalChain([options, 'optionalAccess', _222 => _222.limit]) === "number") {
4325
+ if (typeof _optionalChain([options, 'optionalAccess', _225 => _225.limit]) === "number") {
4289
4326
  params.set("limit", String(options.limit));
4290
4327
  }
4291
4328
  const query = params.size > 0 ? `?${params.toString()}` : "";
@@ -4321,10 +4358,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
4321
4358
  */
4322
4359
  async getRunStatus(runId, options) {
4323
4360
  const params = new URLSearchParams();
4324
- if (_optionalChain([options, 'optionalAccess', _223 => _223.full]) === true) {
4361
+ if (_optionalChain([options, 'optionalAccess', _226 => _226.full]) === true) {
4325
4362
  params.set("full", "true");
4326
4363
  }
4327
- if (_optionalChain([options, 'optionalAccess', _224 => _224.configuration]) === true) {
4364
+ if (_optionalChain([options, 'optionalAccess', _227 => _227.configuration]) === true) {
4328
4365
  params.set("include", "configuration");
4329
4366
  }
4330
4367
  const query = params.size > 0 ? `?${params.toString()}` : "";
@@ -4332,7 +4369,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4332
4369
  `/api/v2/runs/${encodeURIComponent(runId)}${query}`,
4333
4370
  { headers: { "x-deepline-run-status": "1" } }
4334
4371
  );
4335
- if (_optionalChain([options, 'optionalAccess', _225 => _225.configuration]) === true && !Object.hasOwn(response, "contract")) {
4372
+ if (_optionalChain([options, 'optionalAccess', _228 => _228.configuration]) === true && !Object.hasOwn(response, "contract")) {
4336
4373
  throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
4337
4374
  "This server does not support recorded configuration reads.",
4338
4375
  void 0,
@@ -4340,7 +4377,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4340
4377
  );
4341
4378
  }
4342
4379
  const status = normalizePlayStatus(response);
4343
- if (_optionalChain([options, 'optionalAccess', _226 => _226.failedLogs]) !== true || status.status !== "failed") {
4380
+ if (_optionalChain([options, 'optionalAccess', _229 => _229.failedLogs]) !== true || status.status !== "failed") {
4344
4381
  return status;
4345
4382
  }
4346
4383
  const requestedFailedLogLimit = typeof options.failedLogLimit === "number" && Number.isFinite(options.failedLogLimit) ? Math.max(1, Math.floor(options.failedLogLimit)) : RUNS_FAILED_LOG_LIMIT;
@@ -4429,7 +4466,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4429
4466
  /** The same tenant-scoped run history searched by the dashboard and CLI. */
4430
4467
  async getRunsHistory(options = {}) {
4431
4468
  const params = new URLSearchParams();
4432
- const search = _optionalChain([options, 'access', _227 => _227.search, 'optionalAccess', _228 => _228.trim, 'call', _229 => _229()]);
4469
+ const search = _optionalChain([options, 'access', _230 => _230.search, 'optionalAccess', _231 => _231.trim, 'call', _232 => _232()]);
4433
4470
  if (search && search.length > 200) {
4434
4471
  throw new Error("Run search must be at most 200 characters.");
4435
4472
  }
@@ -4455,16 +4492,16 @@ var DeeplineClient = (_class = class _DeeplineClient {
4455
4492
  }
4456
4493
  /** Read one run page without discarding server pagination metadata. */
4457
4494
  async listRunsPage(options) {
4458
- const playName = _optionalChain([options, 'access', _230 => _230.play, 'optionalAccess', _231 => _231.trim, 'call', _232 => _232()]);
4495
+ const playName = _optionalChain([options, 'access', _233 => _233.play, 'optionalAccess', _234 => _234.trim, 'call', _235 => _235()]);
4459
4496
  const params = new URLSearchParams();
4460
4497
  if (playName) {
4461
4498
  params.set("play", playName);
4462
4499
  }
4463
- const status = _optionalChain([options, 'access', _233 => _233.status, 'optionalAccess', _234 => _234.trim, 'call', _235 => _235()]);
4500
+ const status = _optionalChain([options, 'access', _236 => _236.status, 'optionalAccess', _237 => _237.trim, 'call', _238 => _238()]);
4464
4501
  if (status) {
4465
4502
  params.set("status", status);
4466
4503
  }
4467
- const node = _optionalChain([options, 'access', _236 => _236.node, 'optionalAccess', _237 => _237.trim, 'call', _238 => _238()]);
4504
+ const node = _optionalChain([options, 'access', _239 => _239.node, 'optionalAccess', _240 => _240.trim, 'call', _241 => _241()]);
4468
4505
  if (node) {
4469
4506
  if (!playName)
4470
4507
  throw new Error("runs.list options.node requires options.play.");
@@ -4538,8 +4575,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
4538
4575
  * different key intentionally starts another rerun.
4539
4576
  */
4540
4577
  async rerun(runId, options) {
4541
- const idempotencyKey = _optionalChain([options, 'optionalAccess', _239 => _239.idempotencyKey, 'optionalAccess', _240 => _240.trim, 'call', _241 => _241()]);
4542
- if (_optionalChain([options, 'optionalAccess', _242 => _242.idempotencyKey]) !== void 0 && !idempotencyKey) {
4578
+ const idempotencyKey = _optionalChain([options, 'optionalAccess', _242 => _242.idempotencyKey, 'optionalAccess', _243 => _243.trim, 'call', _244 => _244()]);
4579
+ if (_optionalChain([options, 'optionalAccess', _245 => _245.idempotencyKey]) !== void 0 && !idempotencyKey) {
4543
4580
  throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
4544
4581
  "runs.rerun idempotencyKey must not be empty.",
4545
4582
  void 0,
@@ -4548,7 +4585,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4548
4585
  }
4549
4586
  return this.http.post(
4550
4587
  `/api/v2/runs/${encodeURIComponent(runId)}/rerun`,
4551
- _optionalChain([options, 'optionalAccess', _243 => _243.inputOverrides]) ? { inputOverrides: options.inputOverrides } : {},
4588
+ _optionalChain([options, 'optionalAccess', _246 => _246.inputOverrides]) ? { inputOverrides: options.inputOverrides } : {},
4552
4589
  { "Idempotency-Key": idempotencyKey || globalThis.crypto.randomUUID() }
4553
4590
  );
4554
4591
  }
@@ -4562,21 +4599,21 @@ var DeeplineClient = (_class = class _DeeplineClient {
4562
4599
  * ```
4563
4600
  */
4564
4601
  async getRunLogs(runId, options) {
4565
- if (_optionalChain([options, 'optionalAccess', _244 => _244.all]) === true && options.failed === true) {
4602
+ if (_optionalChain([options, 'optionalAccess', _247 => _247.all]) === true && options.failed === true) {
4566
4603
  throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
4567
4604
  "runs.logs cannot combine all and failed views.",
4568
4605
  void 0,
4569
4606
  "INVALID_RUN_LOG_VIEW"
4570
4607
  );
4571
4608
  }
4572
- if (_optionalChain([options, 'optionalAccess', _245 => _245.cursor]) !== void 0 && options.failed === true) {
4609
+ if (_optionalChain([options, 'optionalAccess', _248 => _248.cursor]) !== void 0 && options.failed === true) {
4573
4610
  throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
4574
4611
  "runs.logs cannot combine failed with cursor.",
4575
4612
  void 0,
4576
4613
  "INVALID_RUN_LOG_VIEW"
4577
4614
  );
4578
4615
  }
4579
- if (_optionalChain([options, 'optionalAccess', _246 => _246.failed]) === true) {
4616
+ if (_optionalChain([options, 'optionalAccess', _249 => _249.failed]) === true) {
4580
4617
  const requestedLimit = typeof options.limit === "number" && Number.isFinite(options.limit) && options.limit > 0 ? Math.trunc(options.limit) : RUNS_FAILED_LOG_LIMIT;
4581
4618
  const failedLimit = Math.min(RUNS_FAILED_LOG_LIMIT, requestedLimit);
4582
4619
  const page = await this.http.get(
@@ -4601,18 +4638,18 @@ var DeeplineClient = (_class = class _DeeplineClient {
4601
4638
  ...page.logsTruncated ? { logsTruncated: true } : {}
4602
4639
  };
4603
4640
  }
4604
- const beforeSequence = _optionalChain([options, 'optionalAccess', _247 => _247.cursor]) !== void 0 ? parseRunLogsCursor(options.cursor) : null;
4605
- const limit = _optionalChain([options, 'optionalAccess', _248 => _248.all]) ? Number.MAX_SAFE_INTEGER : typeof _optionalChain([options, 'optionalAccess', _249 => _249.limit]) === "number" && Number.isFinite(options.limit) && options.limit > 0 ? Math.trunc(options.limit) : 200;
4641
+ const beforeSequence = _optionalChain([options, 'optionalAccess', _250 => _250.cursor]) !== void 0 ? parseRunLogsCursor(options.cursor) : null;
4642
+ const limit = _optionalChain([options, 'optionalAccess', _251 => _251.all]) ? Number.MAX_SAFE_INTEGER : typeof _optionalChain([options, 'optionalAccess', _252 => _252.limit]) === "number" && Number.isFinite(options.limit) && options.limit > 0 ? Math.trunc(options.limit) : 200;
4606
4643
  const fetchPage = (afterSeq2, pageLimit) => this.http.get(
4607
4644
  `/api/v2/runs/${encodeURIComponent(runId)}/logs?afterSeq=${afterSeq2}&limit=${pageLimit}`,
4608
4645
  { retryApiErrors: true }
4609
4646
  );
4610
4647
  const probe = await fetchPage(0, 1);
4611
4648
  const lastStoredSeq = probe.lastStoredSeq;
4612
- const oldestStoredSeq = _nullishCoalesce(_optionalChain([probe, 'access', _250 => _250.entries, 'access', _251 => _251[0], 'optionalAccess', _252 => _252.seq]), () => ( null));
4649
+ const oldestStoredSeq = _nullishCoalesce(_optionalChain([probe, 'access', _253 => _253.entries, 'access', _254 => _254[0], 'optionalAccess', _255 => _255.seq]), () => ( null));
4613
4650
  const upperSeq = beforeSequence === null ? Number.POSITIVE_INFINITY : Math.min(beforeSequence - 1, lastStoredSeq);
4614
4651
  const windowEndSeq = Math.min(upperSeq, lastStoredSeq);
4615
- let afterSeq = _optionalChain([options, 'optionalAccess', _253 => _253.all]) ? 0 : Math.max(0, windowEndSeq - limit);
4652
+ let afterSeq = _optionalChain([options, 'optionalAccess', _256 => _256.all]) ? 0 : Math.max(0, windowEndSeq - limit);
4616
4653
  const entries = [];
4617
4654
  while (entries.length < limit && afterSeq < upperSeq) {
4618
4655
  const page = await fetchPage(
@@ -4646,7 +4683,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4646
4683
  hasMore: olderLinesExist,
4647
4684
  nextCursor: olderLinesExist ? encodeRunLogsCursor(firstSequence) : null,
4648
4685
  entries: entries.map((entry) => entry.line),
4649
- view: _optionalChain([options, 'optionalAccess', _254 => _254.all]) ? "all" : "tail",
4686
+ view: _optionalChain([options, 'optionalAccess', _257 => _257.all]) ? "all" : "tail",
4650
4687
  ...probe.logsTruncated ? { logsTruncated: true } : {}
4651
4688
  };
4652
4689
  }
@@ -4795,6 +4832,21 @@ var DeeplineClient = (_class = class _DeeplineClient {
4795
4832
  { headers, retryApiErrors: true }
4796
4833
  );
4797
4834
  }
4835
+ /**
4836
+ * Read one page of immutable admitted and terminal rows for a Play Run dataset.
4837
+ * Follow nextCursor; coverage explicitly identifies unavailable or incomplete history.
4838
+ */
4839
+ async getPlayRunRowHistory(input) {
4840
+ const params = new URLSearchParams({
4841
+ runId: input.runId,
4842
+ tableNamespace: input.tableNamespace
4843
+ });
4844
+ if (input.limit !== void 0) params.set("limit", String(input.limit));
4845
+ if (input.cursor !== void 0) params.set("cursor", input.cursor);
4846
+ return this.http.get(
4847
+ `/api/v2/plays/${encodeURIComponent(input.playName)}/sheet/history?${params}`
4848
+ );
4849
+ }
4798
4850
  /**
4799
4851
  * Export persisted runtime-sheet rows for a play dataset/table namespace.
4800
4852
  *
@@ -4807,7 +4859,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4807
4859
  limit: String(_nullishCoalesce(input.limit, () => ( 5e3))),
4808
4860
  offset: String(_nullishCoalesce(input.offset, () => ( 0)))
4809
4861
  });
4810
- if (_optionalChain([input, 'access', _255 => _255.runId, 'optionalAccess', _256 => _256.trim, 'call', _257 => _257()])) {
4862
+ if (_optionalChain([input, 'access', _258 => _258.runId, 'optionalAccess', _259 => _259.trim, 'call', _260 => _260()])) {
4811
4863
  params.set("runId", input.runId.trim());
4812
4864
  }
4813
4865
  if (input.rowMode === "all" || input.rowMode === "live") {
@@ -4817,9 +4869,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
4817
4869
  `/api/v2/plays/${encodeURIComponent(input.playName)}/sheet?${params.toString()}`,
4818
4870
  { signal: input.signal }
4819
4871
  );
4820
- const requestedRunId = _optionalChain([input, 'access', _258 => _258.runId, 'optionalAccess', _259 => _259.trim, 'call', _260 => _260()]) || "";
4872
+ const requestedRunId = _optionalChain([input, 'access', _261 => _261.runId, 'optionalAccess', _262 => _262.trim, 'call', _263 => _263()]) || "";
4821
4873
  if (requestedRunId) {
4822
- const confirmedRunId = _optionalChain([result, 'access', _261 => _261.scope, 'optionalAccess', _262 => _262.kind]) === "run" ? result.scope.runId.trim() : "";
4874
+ const confirmedRunId = _optionalChain([result, 'access', _264 => _264.scope, 'optionalAccess', _265 => _265.kind]) === "run" ? result.scope.runId.trim() : "";
4823
4875
  const foreignRowRunIds = [
4824
4876
  ...new Set(
4825
4877
  result.rows.map(
@@ -4827,7 +4879,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4827
4879
  ).filter((runId) => runId && runId !== requestedRunId)
4828
4880
  )
4829
4881
  ];
4830
- if (_optionalChain([result, 'access', _263 => _263.scope, 'optionalAccess', _264 => _264.kind]) !== "run" || confirmedRunId !== requestedRunId || foreignRowRunIds.length > 0) {
4882
+ if (_optionalChain([result, 'access', _266 => _266.scope, 'optionalAccess', _267 => _267.kind]) !== "run" || confirmedRunId !== requestedRunId || foreignRowRunIds.length > 0) {
4831
4883
  throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
4832
4884
  `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.`,
4833
4885
  void 0,
@@ -4856,7 +4908,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4856
4908
  async stopRun(runId, options) {
4857
4909
  return this.http.post(
4858
4910
  `/api/v2/runs/${encodeURIComponent(runId)}/stop`,
4859
- _optionalChain([options, 'optionalAccess', _265 => _265.reason]) ? { reason: options.reason } : {}
4911
+ _optionalChain([options, 'optionalAccess', _268 => _268.reason]) ? { reason: options.reason } : {}
4860
4912
  );
4861
4913
  }
4862
4914
  /**
@@ -4874,11 +4926,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
4874
4926
  * need to clear the workspace run-slot state without knowing each run id.
4875
4927
  */
4876
4928
  async stopAllRuns(options) {
4877
- const dryRun = _optionalChain([options, 'optionalAccess', _266 => _266.dryRun]) === true;
4929
+ const dryRun = _optionalChain([options, 'optionalAccess', _269 => _269.dryRun]) === true;
4878
4930
  const result = await this.http.post(
4879
4931
  "/api/v2/runs/stop-all",
4880
4932
  {
4881
- ..._optionalChain([options, 'optionalAccess', _267 => _267.reason]) ? { reason: options.reason } : {},
4933
+ ..._optionalChain([options, 'optionalAccess', _270 => _270.reason]) ? { reason: options.reason } : {},
4882
4934
  ...dryRun ? { dryRun: true } : {}
4883
4935
  }
4884
4936
  );
@@ -4899,7 +4951,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4899
4951
  * `origin: "owned"` for org-owned plays.
4900
4952
  */
4901
4953
  async listPlays(options) {
4902
- if (!_optionalChain([options, 'optionalAccess', _268 => _268.grep, 'optionalAccess', _269 => _269.trim, 'call', _270 => _270()])) {
4954
+ if (!_optionalChain([options, 'optionalAccess', _271 => _271.grep, 'optionalAccess', _272 => _272.trim, 'call', _273 => _273()])) {
4903
4955
  return (await this.requestPlaysPage(options, false)).plays;
4904
4956
  }
4905
4957
  const plays = [];
@@ -4921,45 +4973,45 @@ var DeeplineClient = (_class = class _DeeplineClient {
4921
4973
  }
4922
4974
  async requestPlaysPage(options, paginateInventory = true) {
4923
4975
  const params = new URLSearchParams();
4924
- if (paginateInventory && !_optionalChain([options, 'optionalAccess', _271 => _271.grep, 'optionalAccess', _272 => _272.trim, 'call', _273 => _273()]))
4976
+ if (paginateInventory && !_optionalChain([options, 'optionalAccess', _274 => _274.grep, 'optionalAccess', _275 => _275.trim, 'call', _276 => _276()]))
4925
4977
  params.set("inventory_paginated", "1");
4926
- if (_optionalChain([options, 'optionalAccess', _274 => _274.origin])) params.set("origin", options.origin);
4927
- if (_optionalChain([options, 'optionalAccess', _275 => _275.categories])) {
4978
+ if (_optionalChain([options, 'optionalAccess', _277 => _277.origin])) params.set("origin", options.origin);
4979
+ if (_optionalChain([options, 'optionalAccess', _278 => _278.categories])) {
4928
4980
  params.set(
4929
4981
  "categories",
4930
4982
  Array.isArray(options.categories) ? options.categories.join(",") : options.categories
4931
4983
  );
4932
4984
  }
4933
- if (_optionalChain([options, 'optionalAccess', _276 => _276.categories]) || _optionalChain([options, 'optionalAccess', _277 => _277.includeToolCategories])) {
4985
+ if (_optionalChain([options, 'optionalAccess', _279 => _279.categories]) || _optionalChain([options, 'optionalAccess', _280 => _280.includeToolCategories])) {
4934
4986
  params.set("include_tool_categories", "1");
4935
4987
  }
4936
- if (_optionalChain([options, 'optionalAccess', _278 => _278.tags])) {
4988
+ if (_optionalChain([options, 'optionalAccess', _281 => _281.tags])) {
4937
4989
  params.set(
4938
4990
  "tags",
4939
4991
  Array.isArray(options.tags) ? options.tags.join(",") : options.tags
4940
4992
  );
4941
4993
  }
4942
- if (_optionalChain([options, 'optionalAccess', _279 => _279.includeArchived])) params.set("include_archived", "1");
4943
- if (_optionalChain([options, 'optionalAccess', _280 => _280.includeCostEstimates])) {
4994
+ if (_optionalChain([options, 'optionalAccess', _282 => _282.includeArchived])) params.set("include_archived", "1");
4995
+ if (_optionalChain([options, 'optionalAccess', _283 => _283.includeCostEstimates])) {
4944
4996
  params.set("include_cost_estimates", "1");
4945
4997
  }
4946
- if (_optionalChain([options, 'optionalAccess', _281 => _281.grep, 'optionalAccess', _282 => _282.trim, 'call', _283 => _283()])) {
4998
+ if (_optionalChain([options, 'optionalAccess', _284 => _284.grep, 'optionalAccess', _285 => _285.trim, 'call', _286 => _286()])) {
4947
4999
  params.set("grep", options.grep.trim());
4948
5000
  params.set("limit", "60");
4949
5001
  }
4950
- if (_optionalChain([options, 'optionalAccess', _284 => _284.limit]) !== void 0) {
5002
+ if (_optionalChain([options, 'optionalAccess', _287 => _287.limit]) !== void 0) {
4951
5003
  if (!Number.isSafeInteger(options.limit) || options.limit < 1) {
4952
5004
  throw new Error("Play page limit must be a positive integer");
4953
5005
  }
4954
5006
  params.set("limit", String(options.limit));
4955
5007
  }
4956
- if (_optionalChain([options, 'optionalAccess', _285 => _285.cursor])) params.set("cursor", options.cursor);
5008
+ if (_optionalChain([options, 'optionalAccess', _288 => _288.cursor])) params.set("cursor", options.cursor);
4957
5009
  const suffix = params.size ? `?${params.toString()}` : "";
4958
5010
  const response = await this.http.get(`/api/v2/plays${suffix}`);
4959
5011
  return {
4960
5012
  plays: _nullishCoalesce(response.plays, () => ( [])),
4961
- cursor: _nullishCoalesce(_nullishCoalesce(_optionalChain([response, 'access', _286 => _286.pagination, 'optionalAccess', _287 => _287.cursor]), () => ( response.cursor)), () => ( null)),
4962
- hasMore: Boolean(_nullishCoalesce(_optionalChain([response, 'access', _288 => _288.pagination, 'optionalAccess', _289 => _289.hasMore]), () => ( response.hasMore)))
5013
+ cursor: _nullishCoalesce(_nullishCoalesce(_optionalChain([response, 'access', _289 => _289.pagination, 'optionalAccess', _290 => _290.cursor]), () => ( response.cursor)), () => ( null)),
5014
+ hasMore: Boolean(_nullishCoalesce(_optionalChain([response, 'access', _291 => _291.pagination, 'optionalAccess', _292 => _292.hasMore]), () => ( response.hasMore)))
4963
5015
  };
4964
5016
  }
4965
5017
  /** Read definition-level settings, independently of code revisions. */
@@ -5004,13 +5056,20 @@ var DeeplineClient = (_class = class _DeeplineClient {
5004
5056
  async getNotificationSettings() {
5005
5057
  return this.http.get("/api/v2/settings/notifications");
5006
5058
  }
5059
+ /** Save provider-owned credential fields without starting an OAuth browser flow. */
5060
+ async setIntegrationCredentials(provider, credentials) {
5061
+ return this.http.post("/api/v2/integrations/connect", {
5062
+ provider,
5063
+ credentials
5064
+ });
5065
+ }
5007
5066
  /** Start the Slack OAuth flow required by product notifications. */
5008
5067
  async connectNotificationSlack(options) {
5009
5068
  return this.http.post("/api/v2/integrations/connect", {
5010
5069
  provider: "slack",
5011
5070
  scopes: [...PRODUCT_NOTIFICATION_SLACK_OAUTH_SCOPES],
5012
- ..._optionalChain([options, 'optionalAccess', _290 => _290.successUrl]) ? { success_url: options.successUrl } : {},
5013
- ..._optionalChain([options, 'optionalAccess', _291 => _291.failureUrl]) ? { failure_url: options.failureUrl } : {}
5071
+ ..._optionalChain([options, 'optionalAccess', _293 => _293.successUrl]) ? { success_url: options.successUrl } : {},
5072
+ ..._optionalChain([options, 'optionalAccess', _294 => _294.failureUrl]) ? { failure_url: options.failureUrl } : {}
5014
5073
  });
5015
5074
  }
5016
5075
  /** List Slack channels visible to the connected Deepline Slack app. */
@@ -5085,7 +5144,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5085
5144
  }
5086
5145
  const targets = input.targets.map(parseNotificationGroupTarget);
5087
5146
  const legacyEvents = _nullishCoalesce(input.legacyEvents, () => ( []));
5088
- const legacyTarget = targets.length === 1 && _optionalChain([targets, 'access', _292 => _292[0], 'optionalAccess', _293 => _293.kind]) === "slack" && legacyEvents.length > 0 ? targets[0] : null;
5147
+ const legacyTarget = targets.length === 1 && _optionalChain([targets, 'access', _295 => _295[0], 'optionalAccess', _296 => _296.kind]) === "slack" && legacyEvents.length > 0 ? targets[0] : null;
5089
5148
  if (legacyEvents.length > 0 && !legacyTarget) {
5090
5149
  throw new Error(
5091
5150
  "--for is supported only by the legacy one-Slack-target form. Create the group first, then add rules in notification configuration."
@@ -5121,7 +5180,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5121
5180
  const existingGroup = current.configuration.groups.find(
5122
5181
  (candidate) => candidate.name.toLowerCase() === name.toLowerCase()
5123
5182
  );
5124
- const groupKey = _nullishCoalesce(_optionalChain([existingGroup, 'optionalAccess', _294 => _294.groupKey]), () => ( notificationObjectKey("group")));
5183
+ const groupKey = _nullishCoalesce(_optionalChain([existingGroup, 'optionalAccess', _297 => _297.groupKey]), () => ( notificationObjectKey("group")));
5125
5184
  const group = _nullishCoalesce(existingGroup, () => ( {
5126
5185
  groupKey,
5127
5186
  name,
@@ -5339,13 +5398,13 @@ var DeeplineClient = (_class = class _DeeplineClient {
5339
5398
  */
5340
5399
  async getPlay(name, options) {
5341
5400
  const encodedName = encodeURIComponent(name);
5342
- const query = _optionalChain([options, 'optionalAccess', _295 => _295.source]) ? `?include=source&revision=${encodeURIComponent(options.source)}` : _optionalChain([options, 'optionalAccess', _296 => _296.guidance]) ? "?include=guidance" : "";
5401
+ const query = _optionalChain([options, 'optionalAccess', _298 => _298.source]) ? `?include=source&revision=${encodeURIComponent(options.source)}` : _optionalChain([options, 'optionalAccess', _299 => _299.guidance]) ? "?include=guidance" : "";
5343
5402
  return this.http.get(`/api/v2/plays/${encodedName}${query}`);
5344
5403
  }
5345
5404
  /** Read one trigger inventory page without loading run histories. */
5346
5405
  async listPlayTriggerInventory(options) {
5347
5406
  const params = new URLSearchParams({ view: "inventory" });
5348
- if (_optionalChain([options, 'optionalAccess', _297 => _297.cursor])) params.set("cursor", options.cursor);
5407
+ if (_optionalChain([options, 'optionalAccess', _300 => _300.cursor])) params.set("cursor", options.cursor);
5349
5408
  return this.http.get(`/api/v2/plays/triggers?${params}`);
5350
5409
  }
5351
5410
  /** Read one trigger's recent runs, with an explicit partial-history flag. */
@@ -5354,7 +5413,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5354
5413
  view: "history",
5355
5414
  binding_id: bindingId
5356
5415
  });
5357
- if (_optionalChain([options, 'optionalAccess', _298 => _298.limit]) !== void 0)
5416
+ if (_optionalChain([options, 'optionalAccess', _301 => _301.limit]) !== void 0)
5358
5417
  params.set("history_limit", String(options.limit));
5359
5418
  return this.http.get(`/api/v2/plays/triggers?${params}`);
5360
5419
  }
@@ -5390,7 +5449,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5390
5449
  */
5391
5450
  async listPlayVersions(name, options) {
5392
5451
  const encodedName = encodeURIComponent(name);
5393
- const suffix = _optionalChain([options, 'optionalAccess', _299 => _299.full]) ? "?full=true" : "";
5452
+ const suffix = _optionalChain([options, 'optionalAccess', _302 => _302.full]) ? "?full=true" : "";
5394
5453
  const response = await this.http.get(
5395
5454
  `/api/v2/plays/${encodedName}/versions${suffix}`
5396
5455
  );
@@ -5543,14 +5602,14 @@ var DeeplineClient = (_class = class _DeeplineClient {
5543
5602
  */
5544
5603
  async runPlay(code, csvPath, name, options) {
5545
5604
  const { workflowId } = await this.submitPlay(code, csvPath, name, {
5546
- input: _optionalChain([options, 'optionalAccess', _300 => _300.input]),
5547
- sourceCode: _optionalChain([options, 'optionalAccess', _301 => _301.sourceCode]),
5548
- artifact: _optionalChain([options, 'optionalAccess', _302 => _302.artifact]),
5549
- compilerManifest: _optionalChain([options, 'optionalAccess', _303 => _303.compilerManifest]),
5550
- inputFile: _optionalChain([options, 'optionalAccess', _304 => _304.inputFile]),
5551
- packagedFiles: _optionalChain([options, 'optionalAccess', _305 => _305.packagedFiles]),
5552
- force: _optionalChain([options, 'optionalAccess', _306 => _306.force]),
5553
- forceToolRefresh: _optionalChain([options, 'optionalAccess', _307 => _307.forceToolRefresh])
5605
+ input: _optionalChain([options, 'optionalAccess', _303 => _303.input]),
5606
+ sourceCode: _optionalChain([options, 'optionalAccess', _304 => _304.sourceCode]),
5607
+ artifact: _optionalChain([options, 'optionalAccess', _305 => _305.artifact]),
5608
+ compilerManifest: _optionalChain([options, 'optionalAccess', _306 => _306.compilerManifest]),
5609
+ inputFile: _optionalChain([options, 'optionalAccess', _307 => _307.inputFile]),
5610
+ packagedFiles: _optionalChain([options, 'optionalAccess', _308 => _308.packagedFiles]),
5611
+ force: _optionalChain([options, 'optionalAccess', _309 => _309.force]),
5612
+ forceToolRefresh: _optionalChain([options, 'optionalAccess', _310 => _310.forceToolRefresh])
5554
5613
  });
5555
5614
  const start = Date.now();
5556
5615
  const state = {
@@ -5561,7 +5620,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5561
5620
  latest: null
5562
5621
  };
5563
5622
  let terminalObserved = null;
5564
- if (_optionalChain([options, 'optionalAccess', _308 => _308.signal, 'optionalAccess', _309 => _309.aborted])) {
5623
+ if (_optionalChain([options, 'optionalAccess', _311 => _311.signal, 'optionalAccess', _312 => _312.aborted])) {
5565
5624
  await this.cancelPlay(workflowId);
5566
5625
  return {
5567
5626
  success: false,
@@ -5572,9 +5631,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
5572
5631
  };
5573
5632
  }
5574
5633
  for await (const event of this.watchRunEvents(workflowId, {
5575
- signal: _optionalChain([options, 'optionalAccess', _310 => _310.signal])
5634
+ signal: _optionalChain([options, 'optionalAccess', _313 => _313.signal])
5576
5635
  })) {
5577
- if (_optionalChain([options, 'optionalAccess', _311 => _311.signal, 'optionalAccess', _312 => _312.aborted])) {
5636
+ if (_optionalChain([options, 'optionalAccess', _314 => _314.signal, 'optionalAccess', _315 => _315.aborted])) {
5578
5637
  await this.cancelPlay(workflowId);
5579
5638
  return {
5580
5639
  success: false,
@@ -5584,19 +5643,19 @@ var DeeplineClient = (_class = class _DeeplineClient {
5584
5643
  error: "Cancelled by user"
5585
5644
  };
5586
5645
  }
5587
- const previousStatus = _optionalChain([state, 'access', _313 => _313.latest, 'optionalAccess', _314 => _314.status]);
5646
+ const previousStatus = _optionalChain([state, 'access', _316 => _316.latest, 'optionalAccess', _317 => _317.status]);
5588
5647
  const status = updatePlayLiveStatusState(state, event);
5589
5648
  if (!status) {
5590
5649
  continue;
5591
5650
  }
5592
5651
  if (event.type !== "play.run.status" || status.status !== previousStatus) {
5593
- _optionalChain([options, 'optionalAccess', _315 => _315.onProgress, 'optionalCall', _316 => _316(status)]);
5652
+ _optionalChain([options, 'optionalAccess', _318 => _318.onProgress, 'optionalCall', _319 => _319(status)]);
5594
5653
  }
5595
- if (_chunkPAIMOGCMjs.isTerminalPlayRunLifecycleStatus.call(void 0, status.status)) {
5654
+ if (_chunkUHNDVD3Pjs.isTerminalPlayRunLifecycleStatus.call(void 0, status.status)) {
5596
5655
  terminalObserved = status;
5597
5656
  }
5598
5657
  }
5599
- if (_optionalChain([options, 'optionalAccess', _317 => _317.signal, 'optionalAccess', _318 => _318.aborted])) {
5658
+ if (_optionalChain([options, 'optionalAccess', _320 => _320.signal, 'optionalAccess', _321 => _321.aborted])) {
5600
5659
  await this.cancelPlay(workflowId);
5601
5660
  return {
5602
5661
  success: false,
@@ -5649,7 +5708,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5649
5708
  const response = await this.http.get(
5650
5709
  `/api/v2/usage/events?request_id=${encodeURIComponent(normalizedRequestId)}`
5651
5710
  );
5652
- const event = _optionalChain([response, 'access', _319 => _319.entries, 'optionalAccess', _320 => _320[0]]);
5711
+ const event = _optionalChain([response, 'access', _322 => _322.entries, 'optionalAccess', _323 => _323[0]]);
5653
5712
  if (!event) {
5654
5713
  throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
5655
5714
  "No usage event was found for this request_id.",
@@ -5780,7 +5839,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5780
5839
  async cancelBillingSubscription(options) {
5781
5840
  return this.http.post(
5782
5841
  "/api/v2/billing/subscription/cancel",
5783
- { action: _optionalChain([options, 'optionalAccess', _321 => _321.undo]) ? "undo_cancel" : "cancel" }
5842
+ { action: _optionalChain([options, 'optionalAccess', _324 => _324.undo]) ? "undo_cancel" : "cancel" }
5784
5843
  );
5785
5844
  }
5786
5845
  /**
@@ -5792,7 +5851,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5792
5851
  */
5793
5852
  async listBillingInvoices(options) {
5794
5853
  const params = new URLSearchParams();
5795
- if (_optionalChain([options, 'optionalAccess', _322 => _322.limit]) !== void 0) {
5854
+ if (_optionalChain([options, 'optionalAccess', _325 => _325.limit]) !== void 0) {
5796
5855
  params.set("limit", String(options.limit));
5797
5856
  }
5798
5857
  const suffix = Array.from(params).length > 0 ? `?${params.toString()}` : "";
@@ -5902,7 +5961,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5902
5961
  /** Create a Stripe-hosted portal session for payment recovery and invoices. */
5903
5962
  async createTargetBillingPortalSession(options) {
5904
5963
  const response = await this.http.post(
5905
- _optionalChain([options, 'optionalAccess', _323 => _323.flow]) === "customer_update" ? "/api/v2/billing/portal-sessions?flow=customer_update" : "/api/v2/billing/portal-sessions",
5964
+ _optionalChain([options, 'optionalAccess', _326 => _326.flow]) === "customer_update" ? "/api/v2/billing/portal-sessions?flow=customer_update" : "/api/v2/billing/portal-sessions",
5906
5965
  {}
5907
5966
  );
5908
5967
  return response.data;
@@ -5952,8 +6011,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
5952
6011
  return this.http.request("/api/v2/monitors/audit", {
5953
6012
  method: "POST",
5954
6013
  body: {
5955
- ..._optionalChain([options, 'optionalAccess', _324 => _324.fleetId]) ? { fleet_id: options.fleetId } : {},
5956
- ..._optionalChain([options, 'optionalAccess', _325 => _325.cursor]) ? { cursor: options.cursor } : {}
6014
+ ..._optionalChain([options, 'optionalAccess', _327 => _327.fleetId]) ? { fleet_id: options.fleetId } : {},
6015
+ ..._optionalChain([options, 'optionalAccess', _328 => _328.cursor]) ? { cursor: options.cursor } : {}
5957
6016
  },
5958
6017
  maxRetries: 0
5959
6018
  });
@@ -5963,8 +6022,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
5963
6022
  return this.http.request("/api/v2/monitors/repair", {
5964
6023
  method: "POST",
5965
6024
  body: {
5966
- ..._optionalChain([options, 'optionalAccess', _326 => _326.fleetId]) ? { fleet_id: options.fleetId } : {},
5967
- ..._optionalChain([options, 'optionalAccess', _327 => _327.dryRun]) === void 0 ? {} : { dry_run: options.dryRun }
6025
+ ..._optionalChain([options, 'optionalAccess', _329 => _329.fleetId]) ? { fleet_id: options.fleetId } : {},
6026
+ ..._optionalChain([options, 'optionalAccess', _330 => _330.dryRun]) === void 0 ? {} : { dry_run: options.dryRun }
5968
6027
  },
5969
6028
  maxRetries: 0
5970
6029
  });
@@ -5972,7 +6031,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5972
6031
  /** Delivery and convergence health. Prefer `client.monitors.health(...)`. */
5973
6032
  async readMonitorsHealth(options) {
5974
6033
  const params = new URLSearchParams();
5975
- if (_optionalChain([options, 'optionalAccess', _328 => _328.fleetId])) params.set("fleet_id", options.fleetId);
6034
+ if (_optionalChain([options, 'optionalAccess', _331 => _331.fleetId])) params.set("fleet_id", options.fleetId);
5976
6035
  const query = params.toString();
5977
6036
  const suffix = query ? `?${query}` : "";
5978
6037
  return this.http.request(
@@ -6045,7 +6104,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6045
6104
  );
6046
6105
  }
6047
6106
  const params = new URLSearchParams();
6048
- if (_optionalChain([options, 'optionalAccess', _329 => _329.cursor])) params.set("cursor", options.cursor);
6107
+ if (_optionalChain([options, 'optionalAccess', _332 => _332.cursor])) params.set("cursor", options.cursor);
6049
6108
  const suffix = params.size > 0 ? `?${params}` : "";
6050
6109
  return this.http.request(
6051
6110
  `/api/v2/monitors/batch/${encodeURIComponent(runId)}${suffix}`,
@@ -6089,7 +6148,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6089
6148
  * `client.monitors.deploy(...)`.
6090
6149
  */
6091
6150
  async deployMonitor(definition, options) {
6092
- if (_optionalChain([options, 'optionalAccess', _330 => _330.dryRun])) {
6151
+ if (_optionalChain([options, 'optionalAccess', _333 => _333.dryRun])) {
6093
6152
  return this.http.request("/api/v2/monitors/check", {
6094
6153
  method: "POST",
6095
6154
  body: definition
@@ -6125,12 +6184,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
6125
6184
  /** List deployed monitors. Prefer `client.monitors.list(...)`. */
6126
6185
  async listMonitors(options) {
6127
6186
  const params = new URLSearchParams();
6128
- if (_optionalChain([options, 'optionalAccess', _331 => _331.state])) params.set("state", options.state);
6129
- else if (_optionalChain([options, 'optionalAccess', _332 => _332.status])) params.set("status", options.status);
6130
- if (_optionalChain([options, 'optionalAccess', _333 => _333.limit]) !== void 0)
6187
+ if (_optionalChain([options, 'optionalAccess', _334 => _334.state])) params.set("state", options.state);
6188
+ else if (_optionalChain([options, 'optionalAccess', _335 => _335.status])) params.set("status", options.status);
6189
+ if (_optionalChain([options, 'optionalAccess', _336 => _336.limit]) !== void 0)
6131
6190
  params.set("limit", String(options.limit));
6132
- if (_optionalChain([options, 'optionalAccess', _334 => _334.cursor])) params.set("cursor", options.cursor);
6133
- if (_optionalChain([options, 'optionalAccess', _335 => _335.includeConsumers])) params.set("include_consumers", "true");
6191
+ if (_optionalChain([options, 'optionalAccess', _337 => _337.cursor])) params.set("cursor", options.cursor);
6192
+ if (_optionalChain([options, 'optionalAccess', _338 => _338.includeConsumers])) params.set("include_consumers", "true");
6134
6193
  const query = params.toString();
6135
6194
  const suffix = query ? `?${query}` : "";
6136
6195
  return this.http.request(
@@ -6146,7 +6205,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6146
6205
  );
6147
6206
  }
6148
6207
  async testMonitorWebhook(key, payload, options) {
6149
- if (_optionalChain([options, 'optionalAccess', _336 => _336.dispatch]) === true || _optionalChain([options, 'optionalAccess', _337 => _337.validationOnly]) === false) {
6208
+ if (_optionalChain([options, 'optionalAccess', _339 => _339.dispatch]) === true || _optionalChain([options, 'optionalAccess', _340 => _340.validationOnly]) === false) {
6150
6209
  throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
6151
6210
  "Monitor tests are validation-only and cannot dispatch events.",
6152
6211
  void 0,
@@ -6201,7 +6260,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6201
6260
  }
6202
6261
  /** Delete a deployed monitor and its upstream provider resource. `dryRun` returns the delete plan. Prefer `client.monitors.delete(...)`. */
6203
6262
  async deleteMonitor(key, options) {
6204
- if (_optionalChain([options, 'optionalAccess', _338 => _338.localOnly]) === true) {
6263
+ if (_optionalChain([options, 'optionalAccess', _341 => _341.localOnly]) === true) {
6205
6264
  throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
6206
6265
  "localOnly monitor deletion is no longer supported. Monitor deletion always deprovisions the upstream provider resource.",
6207
6266
  void 0,
@@ -6209,11 +6268,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
6209
6268
  );
6210
6269
  }
6211
6270
  const params = new URLSearchParams();
6212
- if (_optionalChain([options, 'optionalAccess', _339 => _339.dryRun])) params.set("dry_run", "true");
6271
+ if (_optionalChain([options, 'optionalAccess', _342 => _342.dryRun])) params.set("dry_run", "true");
6213
6272
  const query = params.toString();
6214
6273
  return this.http.request(
6215
6274
  `/api/v2/monitors/deployed/${encodeURIComponent(key)}${query ? `?${query}` : ""}`,
6216
- _optionalChain([options, 'optionalAccess', _340 => _340.dryRun]) ? { method: "DELETE" } : {
6275
+ _optionalChain([options, 'optionalAccess', _343 => _343.dryRun]) ? { method: "DELETE" } : {
6217
6276
  method: "DELETE",
6218
6277
  // Deletion is a provider lifecycle operation. A timeout is an
6219
6278
  // unknown outcome, not authority to begin another delete attempt.
@@ -6226,10 +6285,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
6226
6285
  * Prefer `client.monitors.reactivate(...)`.
6227
6286
  */
6228
6287
  async reactivateMonitor(key, options) {
6229
- const query = _optionalChain([options, 'optionalAccess', _341 => _341.dryRun]) ? "?dry_run=true" : "";
6288
+ const query = _optionalChain([options, 'optionalAccess', _344 => _344.dryRun]) ? "?dry_run=true" : "";
6230
6289
  return this.http.request(
6231
6290
  `/api/v2/monitors/deployed/${encodeURIComponent(key)}/reactivate${query}`,
6232
- _optionalChain([options, 'optionalAccess', _342 => _342.dryRun]) ? { method: "POST", body: {} } : {
6291
+ _optionalChain([options, 'optionalAccess', _345 => _345.dryRun]) ? { method: "POST", body: {} } : {
6233
6292
  method: "POST",
6234
6293
  body: {},
6235
6294
  // Reactivation can create an upstream resource, so it must not use
@@ -6243,7 +6302,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6243
6302
  // ——————————————————————————————————————————————————————————
6244
6303
  static __initStatic() {this.MONITOR_JOB_IDEMPOTENCY_KEY_MAX_LENGTH = 96}
6245
6304
  monitorJobIdempotencyKey(operation) {
6246
- const uuid = _nullishCoalesce(_optionalChain([globalThis, 'access', _343 => _343.crypto, 'optionalAccess', _344 => _344.randomUUID, 'optionalCall', _345 => _345()]), () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`));
6305
+ const uuid = _nullishCoalesce(_optionalChain([globalThis, 'access', _346 => _346.crypto, 'optionalAccess', _347 => _347.randomUUID, 'optionalCall', _348 => _348()]), () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`));
6247
6306
  const prefix = "monitor-job-";
6248
6307
  const safeOperation = operation.replace(/[^A-Za-z0-9._-]/g, "-");
6249
6308
  const maxOperationLength = Math.max(
@@ -6254,7 +6313,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6254
6313
  }
6255
6314
  monitorJobHeaders(operation, idempotencyKey) {
6256
6315
  return {
6257
- "Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _346 => _346.trim, 'call', _347 => _347()]) || this.monitorJobIdempotencyKey(operation)
6316
+ "Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _349 => _349.trim, 'call', _350 => _350()]) || this.monitorJobIdempotencyKey(operation)
6258
6317
  };
6259
6318
  }
6260
6319
  async deployMonitorBatch(definitions, options) {
@@ -6265,7 +6324,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6265
6324
  body: { version: 1, kind: "batch", monitors: definitions },
6266
6325
  headers: this.monitorJobHeaders(
6267
6326
  "batch-deploy",
6268
- _optionalChain([options, 'optionalAccess', _348 => _348.idempotencyKey])
6327
+ _optionalChain([options, 'optionalAccess', _351 => _351.idempotencyKey])
6269
6328
  ),
6270
6329
  maxRetries: 0,
6271
6330
  exactUrlOnly: true
@@ -6284,11 +6343,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
6284
6343
  version: 1,
6285
6344
  kind: "batch",
6286
6345
  monitors: definitions,
6287
- ..._optionalChain([options, 'optionalAccess', _349 => _349.expectedGeneration]) === void 0 ? {} : { expected_generation: options.expectedGeneration }
6346
+ ..._optionalChain([options, 'optionalAccess', _352 => _352.expectedGeneration]) === void 0 ? {} : { expected_generation: options.expectedGeneration }
6288
6347
  },
6289
6348
  headers: this.monitorJobHeaders(
6290
6349
  `batch-sync-${batchId}`,
6291
- _optionalChain([options, 'optionalAccess', _350 => _350.idempotencyKey])
6350
+ _optionalChain([options, 'optionalAccess', _353 => _353.idempotencyKey])
6292
6351
  ),
6293
6352
  maxRetries: 0,
6294
6353
  exactUrlOnly: true
@@ -6303,7 +6362,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6303
6362
  body: {},
6304
6363
  headers: this.monitorJobHeaders(
6305
6364
  `batch-start-${batchId}`,
6306
- _optionalChain([options, 'optionalAccess', _351 => _351.idempotencyKey])
6365
+ _optionalChain([options, 'optionalAccess', _354 => _354.idempotencyKey])
6307
6366
  ),
6308
6367
  maxRetries: 0,
6309
6368
  exactUrlOnly: true
@@ -6318,7 +6377,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6318
6377
  body: {},
6319
6378
  headers: this.monitorJobHeaders(
6320
6379
  `batch-stop-${batchId}`,
6321
- _optionalChain([options, 'optionalAccess', _352 => _352.idempotencyKey])
6380
+ _optionalChain([options, 'optionalAccess', _355 => _355.idempotencyKey])
6322
6381
  ),
6323
6382
  maxRetries: 0,
6324
6383
  exactUrlOnly: true
@@ -6339,7 +6398,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6339
6398
  body: {},
6340
6399
  headers: this.monitorJobHeaders(
6341
6400
  `${action}-${monitorKey}`,
6342
- _optionalChain([options, 'optionalAccess', _353 => _353.idempotencyKey])
6401
+ _optionalChain([options, 'optionalAccess', _356 => _356.idempotencyKey])
6343
6402
  ),
6344
6403
  maxRetries: 0,
6345
6404
  exactUrlOnly: true
@@ -6352,7 +6411,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6352
6411
  body: definition,
6353
6412
  headers: this.monitorJobHeaders(
6354
6413
  `sync-${definition.key}`,
6355
- _optionalChain([options, 'optionalAccess', _354 => _354.idempotencyKey])
6414
+ _optionalChain([options, 'optionalAccess', _357 => _357.idempotencyKey])
6356
6415
  ),
6357
6416
  maxRetries: 0,
6358
6417
  exactUrlOnly: true
@@ -6365,7 +6424,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6365
6424
  );
6366
6425
  }
6367
6426
  async getMonitorJobLogs(jobId, options) {
6368
- const query = _optionalChain([options, 'optionalAccess', _355 => _355.limit]) === void 0 ? "" : `?limit=${encodeURIComponent(String(options.limit))}`;
6427
+ const query = _optionalChain([options, 'optionalAccess', _358 => _358.limit]) === void 0 ? "" : `?limit=${encodeURIComponent(String(options.limit))}`;
6369
6428
  return this.http.request(
6370
6429
  `/api/v2/monitors/jobs/${encodeURIComponent(jobId)}/logs${query}`,
6371
6430
  { method: "GET" }
@@ -6378,15 +6437,15 @@ var DeeplineClient = (_class = class _DeeplineClient {
6378
6437
  );
6379
6438
  }
6380
6439
  async waitForMonitorJob(jobId, options) {
6381
- const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _356 => _356.timeoutMs]), () => ( 10 * 6e4)));
6382
- const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _357 => _357.pollIntervalMs]), () => ( 2e3)));
6440
+ const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _359 => _359.timeoutMs]), () => ( 10 * 6e4)));
6441
+ const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _360 => _360.pollIntervalMs]), () => ( 2e3)));
6383
6442
  const terminal = /* @__PURE__ */ new Set(["succeeded", "failed", "cancelled"]);
6384
6443
  const startedAt = Date.now();
6385
6444
  let latest = await this.getMonitorJob(jobId);
6386
6445
  while (true) {
6387
- _optionalChain([options, 'optionalAccess', _358 => _358.onProgress, 'optionalCall', _359 => _359(latest)]);
6446
+ _optionalChain([options, 'optionalAccess', _361 => _361.onProgress, 'optionalCall', _362 => _362(latest)]);
6388
6447
  const job = latest.job;
6389
- const state = typeof _optionalChain([job, 'optionalAccess', _360 => _360.state]) === "string" ? job.state : void 0;
6448
+ const state = typeof _optionalChain([job, 'optionalAccess', _363 => _363.state]) === "string" ? job.state : void 0;
6390
6449
  if (state && terminal.has(state)) return latest;
6391
6450
  if (Date.now() - startedAt >= timeoutMs) return latest;
6392
6451
  await sleep(pollIntervalMs);
@@ -6397,12 +6456,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
6397
6456
  // Monitor Fleets
6398
6457
  // ——————————————————————————————————————————————————————————
6399
6458
  monitorFleetIdempotencyKey(operation) {
6400
- const uuid = _optionalChain([globalThis, 'access', _361 => _361.crypto, 'optionalAccess', _362 => _362.randomUUID, 'optionalCall', _363 => _363()]);
6459
+ const uuid = _optionalChain([globalThis, 'access', _364 => _364.crypto, 'optionalAccess', _365 => _365.randomUUID, 'optionalCall', _366 => _366()]);
6401
6460
  return `monitor-fleet-${operation}-${_nullishCoalesce(uuid, () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`))}`;
6402
6461
  }
6403
6462
  monitorFleetHeaders(operation, idempotencyKey) {
6404
6463
  return {
6405
- "Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _364 => _364.trim, 'call', _365 => _365()]) || this.monitorFleetIdempotencyKey(operation)
6464
+ "Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _367 => _367.trim, 'call', _368 => _368()]) || this.monitorFleetIdempotencyKey(operation)
6406
6465
  };
6407
6466
  }
6408
6467
  monitorFleetPath(fleetId) {
@@ -6422,15 +6481,15 @@ var DeeplineClient = (_class = class _DeeplineClient {
6422
6481
  const fleetId = typeof definitionOrId === "string" ? definitionOrId : definitionOrId.id;
6423
6482
  const body = {
6424
6483
  ...typeof definitionOrId === "string" ? {} : { definition: definitionOrId },
6425
- ..._optionalChain([options, 'optionalAccess', _366 => _366.dryRun]) ? { dry_run: true } : {},
6426
- ..._optionalChain([options, 'optionalAccess', _367 => _367.expectedGeneration]) !== void 0 ? { expected_generation: options.expectedGeneration } : {}
6484
+ ..._optionalChain([options, 'optionalAccess', _369 => _369.dryRun]) ? { dry_run: true } : {},
6485
+ ..._optionalChain([options, 'optionalAccess', _370 => _370.expectedGeneration]) !== void 0 ? { expected_generation: options.expectedGeneration } : {}
6427
6486
  };
6428
6487
  return this.http.request(
6429
6488
  this.monitorFleetPath(fleetId),
6430
6489
  {
6431
6490
  method: "PUT",
6432
6491
  body,
6433
- headers: this.monitorFleetHeaders("sync", _optionalChain([options, 'optionalAccess', _368 => _368.idempotencyKey])),
6492
+ headers: this.monitorFleetHeaders("sync", _optionalChain([options, 'optionalAccess', _371 => _371.idempotencyKey])),
6434
6493
  maxRetries: 0,
6435
6494
  exactUrlOnly: true
6436
6495
  }
@@ -6443,8 +6502,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
6443
6502
  }
6444
6503
  async getMonitorFleet(fleetId, options) {
6445
6504
  const params = new URLSearchParams();
6446
- if (_optionalChain([options, 'optionalAccess', _369 => _369.drift])) params.set("drift", "1");
6447
- if (_optionalChain([options, 'optionalAccess', _370 => _370.limit]) !== void 0)
6505
+ if (_optionalChain([options, 'optionalAccess', _372 => _372.drift])) params.set("drift", "1");
6506
+ if (_optionalChain([options, 'optionalAccess', _373 => _373.limit]) !== void 0)
6448
6507
  params.set("limit", String(options.limit));
6449
6508
  const query = params.toString();
6450
6509
  return this.http.request(
@@ -6457,10 +6516,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
6457
6516
  this.monitorFleetPath(fleetId),
6458
6517
  {
6459
6518
  method: "DELETE",
6460
- body: _optionalChain([options, 'optionalAccess', _371 => _371.dryRun]) ? { dry_run: true } : {},
6519
+ body: _optionalChain([options, 'optionalAccess', _374 => _374.dryRun]) ? { dry_run: true } : {},
6461
6520
  headers: this.monitorFleetHeaders(
6462
6521
  "deactivate",
6463
- _optionalChain([options, 'optionalAccess', _372 => _372.idempotencyKey])
6522
+ _optionalChain([options, 'optionalAccess', _375 => _375.idempotencyKey])
6464
6523
  ),
6465
6524
  maxRetries: 0,
6466
6525
  exactUrlOnly: true
@@ -6475,7 +6534,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6475
6534
  body: {},
6476
6535
  headers: this.monitorFleetHeaders(
6477
6536
  "reactivate",
6478
- _optionalChain([options, 'optionalAccess', _373 => _373.idempotencyKey])
6537
+ _optionalChain([options, 'optionalAccess', _376 => _376.idempotencyKey])
6479
6538
  ),
6480
6539
  maxRetries: 0,
6481
6540
  exactUrlOnly: true
@@ -6492,13 +6551,13 @@ var DeeplineClient = (_class = class _DeeplineClient {
6492
6551
  * identical to "the request failed".
6493
6552
  */
6494
6553
  async waitForMonitorFleetConvergence(fleetId, options) {
6495
- const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _374 => _374.timeoutMs]), () => ( 10 * 6e4)));
6496
- const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _375 => _375.pollIntervalMs]), () => ( 2e3)));
6497
- const terminal = _optionalChain([options, 'optionalAccess', _376 => _376.until]) === "deactivated" ? /* @__PURE__ */ new Set(["deactivated", "degraded"]) : /* @__PURE__ */ new Set(["converged", "degraded", "deactivated"]);
6554
+ const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _377 => _377.timeoutMs]), () => ( 10 * 6e4)));
6555
+ const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _378 => _378.pollIntervalMs]), () => ( 2e3)));
6556
+ const terminal = _optionalChain([options, 'optionalAccess', _379 => _379.until]) === "deactivated" ? /* @__PURE__ */ new Set(["deactivated", "degraded"]) : /* @__PURE__ */ new Set(["converged", "degraded", "deactivated"]);
6498
6557
  const startedAt = Date.now();
6499
6558
  let latest = await this.getMonitorFleet(fleetId);
6500
6559
  while (true) {
6501
- _optionalChain([options, 'optionalAccess', _377 => _377.onProgress, 'optionalCall', _378 => _378(latest)]);
6560
+ _optionalChain([options, 'optionalAccess', _380 => _380.onProgress, 'optionalCall', _381 => _381(latest)]);
6502
6561
  const status = typeof latest.status === "string" ? latest.status : void 0;
6503
6562
  if (status && terminal.has(status)) return latest;
6504
6563
  if (Date.now() - startedAt >= timeoutMs) return latest;