deepline 0.3.465 → 0.3.467

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 (156) hide show
  1. package/dist/bundling-sources/sdk/src/client-core.ts +43 -3
  2. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  3. package/dist/bundling-sources/shared_libs/integration-contracts/billing-entitlements.ts +17 -0
  4. package/dist/bundling-sources/shared_libs/play-runtime/tool-result.ts +325 -44
  5. package/dist/bundling-sources/shared_libs/plays/field-catalog.ts +15 -0
  6. package/dist/bundling-sources/shared_libs/plays/tool-result-types.ts +51 -6
  7. package/dist/bundling-sources/shared_libs/product-notifications/billing-sales.ts +37 -1
  8. package/dist/cli/{auth-WZCX4MTH.mjs → auth-7H62VDZD.mjs} +5 -5
  9. package/dist/cli/auth-EXW5E3DI.js +41 -0
  10. package/dist/cli/{billing-ATR3CLIW.mjs → billing-6TM3ZXDR.mjs} +44 -6
  11. package/dist/cli/{billing-DQUD3DBY.js → billing-N5BNGGYN.js} +115 -77
  12. package/dist/cli/{chunk-7YDN6AEK.mjs → chunk-3RGWTKK3.mjs} +10 -0
  13. package/dist/cli/{chunk-4URRABMM.js → chunk-3ZGSR6X7.js} +1 -1
  14. package/dist/cli/{chunk-PIGMBDBZ.js → chunk-42AW4SQR.js} +21 -21
  15. package/dist/cli/{chunk-E3EYQ2FQ.mjs → chunk-4LTQYDZG.mjs} +4 -4
  16. package/dist/cli/{chunk-NIJYJI67.mjs → chunk-5RXKAXFD.mjs} +2 -2
  17. package/dist/cli/{chunk-UMQT7QMB.mjs → chunk-6UZ4MRWN.mjs} +2 -2
  18. package/dist/cli/{chunk-7R76B3WE.js → chunk-7Y53LJLE.js} +5 -5
  19. package/dist/cli/{chunk-6WKYRHGT.js → chunk-7ZZWOJTM.js} +3 -3
  20. package/dist/cli/{chunk-QPJ2BDFD.js → chunk-AD5BZUAP.js} +5 -5
  21. package/dist/cli/{chunk-FFTLJGZQ.mjs → chunk-AU4BWQTT.mjs} +5 -5
  22. package/dist/cli/{chunk-YZZGFUQ4.mjs → chunk-AUVEQ3JX.mjs} +1 -1
  23. package/dist/cli/{chunk-6Y34LU6P.mjs → chunk-C4GBOGTW.mjs} +2 -2
  24. package/dist/cli/{chunk-RREWUPC3.js → chunk-C6EGT3LO.js} +184 -174
  25. package/dist/cli/{chunk-HXWZ52CW.mjs → chunk-CER3XHT3.mjs} +3 -3
  26. package/dist/cli/{chunk-X6BQ4JAD.mjs → chunk-DCDTCG2D.mjs} +2 -2
  27. package/dist/cli/{chunk-TJXGEK7P.js → chunk-FFOAOQ77.js} +6 -6
  28. package/dist/cli/{chunk-B6GAIXVD.mjs → chunk-FP3DH46P.mjs} +4 -4
  29. package/dist/cli/{chunk-7Y2MLWTM.mjs → chunk-FQIGRZ52.mjs} +1 -1
  30. package/dist/cli/{chunk-3XFNF6RR.js → chunk-FRY76AFK.js} +8 -8
  31. package/dist/cli/{chunk-W4J2EK5K.js → chunk-FS55YDCW.js} +3 -3
  32. package/dist/cli/{chunk-GBQSEOXE.js → chunk-FVA6XLRA.js} +7 -7
  33. package/dist/cli/{chunk-OGCAGZXO.mjs → chunk-FVYAEBGO.mjs} +23 -2
  34. package/dist/cli/{chunk-XFAO5A5R.mjs → chunk-G35HNL6P.mjs} +1 -1
  35. package/dist/cli/{chunk-E3PLLFE2.js → chunk-H3QDLCRT.js} +53 -53
  36. package/dist/cli/{chunk-HIMV32ZX.js → chunk-HNP5V5BN.js} +23 -2
  37. package/dist/cli/{chunk-GW7RUNLW.mjs → chunk-HTXQUA3V.mjs} +12 -2
  38. package/dist/cli/{chunk-OEU3ZNBZ.mjs → chunk-I3LWDZRN.mjs} +1 -1
  39. package/dist/cli/{chunk-BQNUJK53.js → chunk-KMYCHMZF.js} +26 -26
  40. package/dist/cli/{chunk-GNLCGR7R.mjs → chunk-KUCUHRLC.mjs} +2 -2
  41. package/dist/cli/{chunk-OQDN6JK6.js → chunk-LAMHSZ74.js} +13 -13
  42. package/dist/cli/{chunk-DJD4KLIX.js → chunk-LKVOV7PX.js} +258 -258
  43. package/dist/cli/{chunk-OKI3HWFF.js → chunk-MGUQGKHE.js} +8 -8
  44. package/dist/cli/{chunk-EA2F4YVX.mjs → chunk-MRBDFPJ7.mjs} +2 -2
  45. package/dist/cli/{chunk-JLZKF7EY.js → chunk-NPZBE64X.js} +11 -1
  46. package/dist/cli/{chunk-HS6CM7TF.mjs → chunk-NU64F53H.mjs} +11 -11
  47. package/dist/cli/{chunk-EISIAWBD.mjs → chunk-OSKGEBE7.mjs} +1 -1
  48. package/dist/cli/{chunk-3K3EHT6E.mjs → chunk-R5ZJICJA.mjs} +1 -1
  49. package/dist/cli/{chunk-SSQXSMAT.mjs → chunk-RH6DVPGW.mjs} +2 -2
  50. package/dist/cli/{chunk-5VGMRONE.js → chunk-SHGBHP6J.js} +3 -3
  51. package/dist/cli/{chunk-EVQBOVOJ.mjs → chunk-SYLR33PS.mjs} +3 -3
  52. package/dist/cli/{chunk-L3U44YVO.js → chunk-T5GRG37B.js} +5 -5
  53. package/dist/cli/{chunk-JQSPKPHT.mjs → chunk-TNAXVJEG.mjs} +5 -5
  54. package/dist/cli/{chunk-6P4OYABU.js → chunk-V6OMS7E2.js} +6 -6
  55. package/dist/cli/{chunk-SBM5JVTK.mjs → chunk-VGWH3BFC.mjs} +1 -1
  56. package/dist/cli/{chunk-DDF74332.js → chunk-VOPKDTJT.js} +2 -2
  57. package/dist/cli/{chunk-JN7AOVD4.js → chunk-WBYC7AYC.js} +16 -16
  58. package/dist/cli/{chunk-LFTLH5BK.js → chunk-WGMNXDRZ.js} +2 -2
  59. package/dist/cli/{chunk-N27BUJU3.mjs → chunk-WISHPL5Q.mjs} +5 -5
  60. package/dist/cli/{chunk-N57JYG7J.js → chunk-WS2BY2ST.js} +36 -36
  61. package/dist/cli/{chunk-XJ5W64AC.js → chunk-WTVTCSPY.js} +4 -4
  62. package/dist/cli/{chunk-MUQAKLBP.mjs → chunk-X3RAGNNZ.mjs} +1 -1
  63. package/dist/cli/{chunk-I2TCWIW2.mjs → chunk-XSX6TJUA.mjs} +1 -1
  64. package/dist/cli/{chunk-SOIXDMZK.js → chunk-YIJS7ET7.js} +51 -51
  65. package/dist/cli/{chunk-A3GML7WW.js → chunk-ZTA4JIAB.js} +9 -9
  66. package/dist/cli/command-docs.js +2 -2
  67. package/dist/cli/command-docs.mjs +1 -1
  68. package/dist/cli/{csv-AE7OLXCV.mjs → csv-435JAJ45.mjs} +4 -4
  69. package/dist/cli/{csv-ZVFGYRB7.js → csv-BPZ4VLR6.js} +13 -13
  70. package/dist/cli/{db-JOD2MQ2T.js → db-EBR2UQK3.js} +27 -27
  71. package/dist/cli/{db-KTXMCLB5.mjs → db-IEUTNOOC.mjs} +6 -6
  72. package/dist/cli/describe-EPT52IUE.js +48 -0
  73. package/dist/cli/{describe-FENTKQFK.mjs → describe-GM233O75.mjs} +20 -20
  74. package/dist/cli/describe-core.d.mts +3 -3
  75. package/dist/cli/describe-core.d.ts +3 -3
  76. package/dist/cli/describe-core.js +4 -4
  77. package/dist/cli/describe-core.mjs +3 -3
  78. package/dist/cli/{executions-IT6TQ65Q.js → executions-5SWPQTLB.js} +8 -8
  79. package/dist/cli/{executions-FJCV5L37.mjs → executions-LDPBVSKZ.mjs} +6 -6
  80. package/dist/cli/{feedback-LTTO73YD.mjs → feedback-JB7BBF64.mjs} +4 -4
  81. package/dist/cli/{feedback-WGURC3BG.js → feedback-YFW5KT36.js} +8 -8
  82. package/dist/cli/git-7L7LKOKW.js +25 -0
  83. package/dist/cli/{git-ZYEDB2UG.mjs → git-MCGUPO2W.mjs} +5 -5
  84. package/dist/cli/index.js +139 -139
  85. package/dist/cli/index.mjs +41 -41
  86. package/dist/cli/{legacy-noops-EGQ4G4BT.mjs → legacy-noops-EHNXHQL7.mjs} +5 -5
  87. package/dist/cli/{legacy-noops-JFXWEOZF.js → legacy-noops-LMGSIBWM.js} +8 -8
  88. package/dist/cli/{monitors-IK6GWLCA.mjs → monitors-355EWLGN.mjs} +7 -7
  89. package/dist/cli/{monitors-WKN2K6ZH.js → monitors-VRQ32EAA.js} +91 -91
  90. package/dist/cli/{org-PD5YBUHR.mjs → org-MJ6XMAI4.mjs} +51 -10
  91. package/dist/cli/{org-FE5VMAKF.js → org-W3YZN65W.js} +113 -72
  92. package/dist/cli/{pages-ZVKSOSZJ.mjs → pages-62QNUXV2.mjs} +6 -6
  93. package/dist/cli/{pages-H3DKEVVI.js → pages-JPK6UVMV.js} +17 -17
  94. package/dist/cli/{play-RLIQY22H.mjs → play-CKBPES6Q.mjs} +18 -18
  95. package/dist/cli/{play-2UL5OPGH.js → play-WPPJQBBS.js} +305 -305
  96. package/dist/cli/{providers-2IMHQDBC.js → providers-DH5JJ5HN.js} +9 -9
  97. package/dist/cli/{providers-M4AFFJF2.mjs → providers-LLPKHVXL.mjs} +6 -6
  98. package/dist/cli/{quickstart-PS4QKNG2.mjs → quickstart-K5HVPO2L.mjs} +4 -4
  99. package/dist/cli/{quickstart-OE64DBKK.js → quickstart-NNEF37EG.js} +6 -6
  100. package/dist/cli/{run-SWLGV2VS.js → run-N2KY2VNQ.js} +40 -40
  101. package/dist/cli/{run-3TKR5CZU.mjs → run-SKIZFJ5O.mjs} +25 -25
  102. package/dist/cli/{search-AMZ67RKO.mjs → search-2WXJ3GID.mjs} +7 -7
  103. package/dist/cli/search-HO7ARG3H.js +32 -0
  104. package/dist/cli/{secrets-ZTLJY7L2.js → secrets-5YVX7LK7.js} +15 -15
  105. package/dist/cli/{secrets-INBXKNFM.mjs → secrets-6GEQ75OU.mjs} +6 -6
  106. package/dist/cli/{sessions-ZVBTKQ7J.mjs → sessions-GOPZ3YRN.mjs} +5 -5
  107. package/dist/cli/{sessions-3GKS45NP.js → sessions-H3QES7C2.js} +6 -6
  108. package/dist/cli/{settings-7YG3UWJH.js → settings-62SU5ROV.js} +78 -78
  109. package/dist/cli/{settings-AUPDZZ2U.mjs → settings-IP47HYC6.mjs} +11 -11
  110. package/dist/cli/{setup-44QB72NU.mjs → setup-LCKXUSW5.mjs} +9 -9
  111. package/dist/cli/{setup-YGESCFTH.js → setup-YCCU7TU4.js} +44 -44
  112. package/dist/cli/{skills-N3AWWCWO.mjs → skills-3QAQI6X7.mjs} +7 -7
  113. package/dist/cli/skills-UVAIKQNC.js +31 -0
  114. package/dist/cli/{tools-3SHNTJPU.mjs → tools-HKD4G6HA.mjs} +18 -18
  115. package/dist/cli/tools-KAIUUBTD.js +55 -0
  116. package/dist/cli/{update-3TWB5EEV.mjs → update-2VYSBSDD.mjs} +9 -9
  117. package/dist/cli/update-Q3AMECAG.js +33 -0
  118. package/dist/cli/{workflow-SYP62XNN.mjs → workflow-EFRGY6JD.mjs} +7 -7
  119. package/dist/cli/{workflow-ULIZU7KI.js → workflow-MMWGUSGY.js} +17 -17
  120. package/dist/{client-BClp2yrq.d.ts → client-BOEAXwJj.d.ts} +1 -1
  121. package/dist/{client-ADFHNtFM.d.mts → client-DL0koOaP.d.mts} +1 -1
  122. package/dist/{client-core-BFU73Ttw.d.ts → client-core-BX_8khUY.d.ts} +23 -1
  123. package/dist/{client-core-DWLmmJWo.d.mts → client-core-CowyuxKu.d.mts} +23 -1
  124. package/dist/{compiler-manifest-Cs17yO-H.d.ts → compiler-manifest-D5dARg3M.d.mts} +64 -10
  125. package/dist/{compiler-manifest-Cs17yO-H.d.mts → compiler-manifest-D5dARg3M.d.ts} +64 -10
  126. package/dist/{errors-Dee-QpVS.d.ts → errors-BtHHzWL8.d.ts} +1 -1
  127. package/dist/{errors-qNfvQuRB.d.mts → errors-BveMVPwA.d.mts} +1 -1
  128. package/dist/{index-BTqNNXmC.d.mts → index-BboApDGD.d.mts} +1 -1
  129. package/dist/{index-DXTh1Lxe.d.ts → index-C6sovoYP.d.ts} +1 -1
  130. package/dist/index.d.mts +7 -7
  131. package/dist/index.d.ts +7 -7
  132. package/dist/index.js +277 -76
  133. package/dist/index.mjs +239 -38
  134. package/dist/install-integrity.json +114 -114
  135. package/dist/plays/bundle-play-file.d.mts +3 -3
  136. package/dist/plays/bundle-play-file.d.ts +3 -3
  137. package/dist/plays/play-description.d.mts +2 -2
  138. package/dist/plays/play-description.d.ts +2 -2
  139. package/dist/plays/run-request.d.mts +2 -2
  140. package/dist/plays/run-request.d.ts +2 -2
  141. package/dist/release.d.mts +1 -1
  142. package/dist/release.d.ts +1 -1
  143. package/dist/release.js +2 -2
  144. package/dist/release.mjs +1 -1
  145. package/dist/server.d.mts +4 -4
  146. package/dist/server.d.ts +4 -4
  147. package/dist/server.js +5 -5
  148. package/dist/server.mjs +3 -3
  149. package/package.json +1 -1
  150. package/dist/cli/auth-W62UTNJZ.js +0 -41
  151. package/dist/cli/describe-2IKB4KIX.js +0 -48
  152. package/dist/cli/git-UOIC2DJL.js +0 -25
  153. package/dist/cli/search-LXG7T6YZ.js +0 -32
  154. package/dist/cli/skills-QALGBUFY.js +0 -31
  155. package/dist/cli/tools-PUQ3JBZ7.js +0 -55
  156. package/dist/cli/update-O7XSJMLX.js +0 -33
@@ -26,7 +26,7 @@ var _chunkNMU3VR5Ujs = require('./chunk-NMU3VR5U.js');
26
26
 
27
27
 
28
28
 
29
- var _chunkXJ5W64ACjs = require('./chunk-XJ5W64AC.js');
29
+ var _chunkWTVTCSPYjs = require('./chunk-WTVTCSPY.js');
30
30
 
31
31
 
32
32
  var _chunkALJJRZNJjs = require('./chunk-ALJJRZNJ.js');
@@ -647,7 +647,7 @@ var ToolCalls = class {
647
647
  idempotencyKey,
648
648
  onResponse: (response2) => {
649
649
  lastResponse = null;
650
- atomicToolsSupported = response2.headers.get(_chunkXJ5W64ACjs.ATOMIC_TOOL_EXECUTE_SUPPORTED_HEADER) === "true";
650
+ atomicToolsSupported = response2.headers.get(_chunkWTVTCSPYjs.ATOMIC_TOOL_EXECUTE_SUPPORTED_HEADER) === "true";
651
651
  recoverySupported = response2.headers.get("X-Deepline-Idempotency-Supported") === "true";
652
652
  if (_optionalChain([options, 'optionalAccess', _30 => _30.onServerTiming])) {
653
653
  try {
@@ -1026,8 +1026,8 @@ function runtimeSelectionHeaders(runtime, env) {
1026
1026
  }
1027
1027
  const receivers = _optionalChain([env, 'access', _52 => _52.DEEPLINE_RUNTIME_RETAINED_PIPELINE_RECEIVERS, 'optionalAccess', _53 => _53.trim, 'call', _54 => _54()]);
1028
1028
  return {
1029
- [_chunkXJ5W64ACjs.RUNTIME_ENVIRONMENT_TOKEN_HEADER]: token,
1030
- ...receivers ? { [_chunkXJ5W64ACjs.RETAINED_PIPELINE_RECEIVERS_HEADER]: receivers } : {}
1029
+ [_chunkWTVTCSPYjs.RUNTIME_ENVIRONMENT_TOKEN_HEADER]: token,
1030
+ ...receivers ? { [_chunkWTVTCSPYjs.RETAINED_PIPELINE_RECEIVERS_HEADER]: receivers } : {}
1031
1031
  };
1032
1032
  }
1033
1033
  function normalizeTestPolicyOverrides(value, source) {
@@ -1098,7 +1098,7 @@ var PlayClient = class {
1098
1098
  return _chunkJKVRBCZLjs.startPlayRun.call(void 0,
1099
1099
  this.http,
1100
1100
  resolved.request,
1101
- _optionalChain([options, 'optionalAccess', _62 => _62.cliAdmission]) ? { ...headers, "X-Deepline-API-Major": String(_chunkXJ5W64ACjs.SDK_API_MAJOR) } : headers,
1101
+ _optionalChain([options, 'optionalAccess', _62 => _62.cliAdmission]) ? { ...headers, "X-Deepline-API-Major": String(_chunkWTVTCSPYjs.SDK_API_MAJOR) } : headers,
1102
1102
  options
1103
1103
  );
1104
1104
  }
@@ -3175,7 +3175,7 @@ function isolatedCiRuntimeEventReadHeaders(env) {
3175
3175
  "RUNTIME_EVENT_INTERNAL_TOKEN_REQUIRED"
3176
3176
  );
3177
3177
  }
3178
- return { [_chunkXJ5W64ACjs.COORDINATOR_INTERNAL_TOKEN_HEADER]: token };
3178
+ return { [_chunkWTVTCSPYjs.COORDINATOR_INTERNAL_TOKEN_HEADER]: token };
3179
3179
  }
3180
3180
  function sleep(ms) {
3181
3181
  return new Promise((resolve) => setTimeout(resolve, ms));
@@ -3462,6 +3462,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
3462
3462
  this.billing = {
3463
3463
  quote: (input) => this.http.post("/api/v2/billing/quote", input),
3464
3464
  entitlements: () => this.http.get("/api/v2/billing/entitlements"),
3465
+ includedCompute: () => this.http.get("/api/v2/billing/included-compute"),
3466
+ enableIncludedCompute: () => this.http.post("/api/v2/billing/included-compute", {}),
3465
3467
  topUp: (options) => this.topUpBillingBalance(options),
3466
3468
  topUpWithReceipt: (options) => this.topUpBillingBalanceWithReceipt(options),
3467
3469
  plans: () => this.getBillingPlans(),
@@ -3496,6 +3498,14 @@ var DeeplineClient = (_class = class _DeeplineClient {
3496
3498
  portalSession: (options) => this.createTargetBillingPortalSession(options)
3497
3499
  };
3498
3500
  this.workspaces = {
3501
+ members: (options) => {
3502
+ const query = _optionalChain([options, 'optionalAccess', _152 => _152.cursor]) ? `?cursor=${encodeURIComponent(options.cursor)}` : "";
3503
+ return this.http.get(`/api/v2/auth/workspace/members${query}`);
3504
+ },
3505
+ setMemberGrants: (memberId, grants) => this.http.patch(
3506
+ `/api/v2/auth/workspace/members/${encodeURIComponent(memberId)}/role`,
3507
+ { role: grants.join(",") }
3508
+ ),
3499
3509
  create: (options) => this.createWorkspace(options)
3500
3510
  };
3501
3511
  this.monitors = {
@@ -3504,7 +3514,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
3504
3514
  check: (definition) => this.checkMonitor(definition),
3505
3515
  preview: (definition, options) => this.previewMonitor(definition, options),
3506
3516
  deploy: (definition, options) => this.deployMonitor(definition, options),
3507
- sync: (definition, options) => _optionalChain([options, 'optionalAccess', _152 => _152.dryRun]) ? this.deployMonitor(definition, { dryRun: true }) : this.syncScalarMonitor(definition, options),
3517
+ sync: (definition, options) => _optionalChain([options, 'optionalAccess', _153 => _153.dryRun]) ? this.deployMonitor(definition, { dryRun: true }) : this.syncScalarMonitor(definition, options),
3508
3518
  list: (options) => this.listMonitors(options),
3509
3519
  get: (key) => this.getMonitor(key),
3510
3520
  test: (key, payload, options) => this.testMonitorWebhook(key, payload, options),
@@ -3513,13 +3523,13 @@ var DeeplineClient = (_class = class _DeeplineClient {
3513
3523
  update: (key, patch) => this.updateMonitor(key, patch),
3514
3524
  delete: (key, options) => this.deleteMonitor(key, options),
3515
3525
  reactivate: (key, options) => this.reactivateMonitor(key, options),
3516
- start: (key, options) => _optionalChain([options, 'optionalAccess', _153 => _153.dryRun]) ? this.submitMonitorBatch({
3526
+ start: (key, options) => _optionalChain([options, 'optionalAccess', _154 => _154.dryRun]) ? this.submitMonitorBatch({
3517
3527
  kind: "reactivate",
3518
3528
  scope: { kind: "keys", monitorKeys: [key] },
3519
3529
  dryRun: true,
3520
3530
  idempotencyKey: _nullishCoalesce(options.idempotencyKey, () => ( this.monitorJobIdempotencyKey(`start-${key}`)))
3521
3531
  }) : this.submitScalarMonitorLifecycle(key, "start", options),
3522
- stop: (key, options) => _optionalChain([options, 'optionalAccess', _154 => _154.dryRun]) ? this.submitMonitorBatch({
3532
+ stop: (key, options) => _optionalChain([options, 'optionalAccess', _155 => _155.dryRun]) ? this.submitMonitorBatch({
3523
3533
  kind: "deactivate",
3524
3534
  scope: { kind: "keys", monitorKeys: [key] },
3525
3535
  dryRun: true,
@@ -3568,8 +3578,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
3568
3578
  /** List this workspace's hosted pages, newest update first. */
3569
3579
  async listPages(input) {
3570
3580
  const params = new URLSearchParams();
3571
- if (_optionalChain([input, 'optionalAccess', _155 => _155.cursor])) params.set("cursor", input.cursor);
3572
- if (_optionalChain([input, 'optionalAccess', _156 => _156.limit])) params.set("limit", String(input.limit));
3581
+ if (_optionalChain([input, 'optionalAccess', _156 => _156.cursor])) params.set("cursor", input.cursor);
3582
+ if (_optionalChain([input, 'optionalAccess', _157 => _157.limit])) params.set("limit", String(input.limit));
3573
3583
  const query = params.size > 0 ? `?${params}` : "";
3574
3584
  return await this.http.get(`/api/v2/pages${query}`);
3575
3585
  }
@@ -3685,17 +3695,17 @@ var DeeplineClient = (_class = class _DeeplineClient {
3685
3695
  */
3686
3696
  async listTools(options) {
3687
3697
  const params = new URLSearchParams();
3688
- if (_optionalChain([options, 'optionalAccess', _157 => _157.categories, 'optionalAccess', _158 => _158.trim, 'call', _159 => _159()])) {
3698
+ if (_optionalChain([options, 'optionalAccess', _158 => _158.categories, 'optionalAccess', _159 => _159.trim, 'call', _160 => _160()])) {
3689
3699
  params.set("categories", options.categories.trim());
3690
3700
  }
3691
- if (_optionalChain([options, 'optionalAccess', _160 => _160.tags, 'optionalAccess', _161 => _161.trim, 'call', _162 => _162()])) {
3701
+ if (_optionalChain([options, 'optionalAccess', _161 => _161.tags, 'optionalAccess', _162 => _162.trim, 'call', _163 => _163()])) {
3692
3702
  params.set("tags", options.tags.trim());
3693
3703
  }
3694
- if (_optionalChain([options, 'optionalAccess', _163 => _163.grep, 'optionalAccess', _164 => _164.trim, 'call', _165 => _165()])) {
3704
+ if (_optionalChain([options, 'optionalAccess', _164 => _164.grep, 'optionalAccess', _165 => _165.trim, 'call', _166 => _166()])) {
3695
3705
  params.set("grep", options.grep.trim());
3696
3706
  params.set("grep_mode", _nullishCoalesce(options.grepMode, () => ( "all")));
3697
3707
  }
3698
- params.set("compact", _optionalChain([options, 'optionalAccess', _166 => _166.compact]) === true ? "true" : "false");
3708
+ params.set("compact", _optionalChain([options, 'optionalAccess', _167 => _167.compact]) === true ? "true" : "false");
3699
3709
  const suffix = params.toString() ? `?${params.toString()}` : "";
3700
3710
  const res = await this.http.get(
3701
3711
  `/api/v2/tools${suffix}`
@@ -3728,7 +3738,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
3728
3738
  const params = new URLSearchParams({
3729
3739
  view: "category",
3730
3740
  categories: normalizedCategory,
3731
- compact: _optionalChain([options, 'optionalAccess', _167 => _167.compact]) === true ? "true" : "false"
3741
+ compact: _optionalChain([options, 'optionalAccess', _168 => _168.compact]) === true ? "true" : "false"
3732
3742
  });
3733
3743
  const response = await this.http.get(
3734
3744
  `/api/v2/tools?${params}`
@@ -3743,7 +3753,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
3743
3753
  }
3744
3754
  /** List discoverable providers without requiring a local plugin catalog. */
3745
3755
  async listProviders(options) {
3746
- const suffix = _optionalChain([options, 'optionalAccess', _168 => _168.changed]) ? "?changed=true" : "";
3756
+ const suffix = _optionalChain([options, 'optionalAccess', _169 => _169.changed]) ? "?changed=true" : "";
3747
3757
  const res = await this.http.get(
3748
3758
  `/api/v2/tools/providers${suffix}`
3749
3759
  );
@@ -3774,8 +3784,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
3774
3784
  */
3775
3785
  async search(options = {}) {
3776
3786
  const params = searchParams(options);
3777
- if (_optionalChain([options, 'access', _169 => _169.types, 'optionalAccess', _170 => _170.length])) params.set("types", options.types.join(","));
3778
- if (_optionalChain([options, 'access', _171 => _171.exclude, 'optionalAccess', _172 => _172.length])) {
3787
+ if (_optionalChain([options, 'access', _170 => _170.types, 'optionalAccess', _171 => _171.length])) params.set("types", options.types.join(","));
3788
+ if (_optionalChain([options, 'access', _172 => _172.exclude, 'optionalAccess', _173 => _173.length])) {
3779
3789
  params.set("exclude", options.exclude.join(","));
3780
3790
  }
3781
3791
  return this.http.get(`/api/v2/search?${params.toString()}`);
@@ -3797,7 +3807,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
3797
3807
  * ```
3798
3808
  */
3799
3809
  async getTool(toolId, options) {
3800
- if (_optionalChain([options, 'optionalAccess', _173 => _173.cliInvocationId]) !== void 0) {
3810
+ if (_optionalChain([options, 'optionalAccess', _174 => _174.cliInvocationId]) !== void 0) {
3801
3811
  validateCliInvocationId(options.cliInvocationId);
3802
3812
  }
3803
3813
  return this.http.request(
@@ -3810,7 +3820,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
3810
3820
  retryApiErrors: true,
3811
3821
  headers: {
3812
3822
  "x-deepline-tool-meta-only": "1",
3813
- ..._optionalChain([options, 'optionalAccess', _174 => _174.cliInvocationId]) !== void 0 ? { "x-deepline-cli-invocation-id": options.cliInvocationId } : {}
3823
+ ..._optionalChain([options, 'optionalAccess', _175 => _175.cliInvocationId]) !== void 0 ? { "x-deepline-cli-invocation-id": options.cliInvocationId } : {}
3814
3824
  }
3815
3825
  }
3816
3826
  );
@@ -3901,7 +3911,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
3901
3911
  return this.http.post(
3902
3912
  "/api/v2/ingestion/repair",
3903
3913
  {
3904
- ..._optionalChain([input, 'optionalAccess', _175 => _175.provider]) ? { provider: input.provider } : {}
3914
+ ..._optionalChain([input, 'optionalAccess', _176 => _176.provider]) ? { provider: input.provider } : {}
3905
3915
  }
3906
3916
  );
3907
3917
  }
@@ -3956,7 +3966,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
3956
3966
  const prepared = await _chunkJKVRBCZLjs.preparePlayRunAdmission.call(void 0,
3957
3967
  this.http,
3958
3968
  resolved.request,
3959
- _optionalChain([options, 'optionalAccess', _176 => _176.onSubmission])
3969
+ _optionalChain([options, 'optionalAccess', _177 => _177.onSubmission])
3960
3970
  );
3961
3971
  const bodyJson = JSON.stringify(prepared.body);
3962
3972
  const headers = runtimeSelectionHeaders(resolved.runtime, this.environment);
@@ -3979,19 +3989,19 @@ var DeeplineClient = (_class = class _DeeplineClient {
3979
3989
  );
3980
3990
  }
3981
3991
  submitted = true;
3982
- const streamPath = _optionalChain([options, 'optionalAccess', _177 => _177.cliAdmission]) ? _chunkJKVRBCZLjs.CLI_PLAY_RUN_START_STREAM_PATH : _chunkJKVRBCZLjs.PLAY_RUN_START_STREAM_PATH;
3992
+ const streamPath = _optionalChain([options, 'optionalAccess', _178 => _178.cliAdmission]) ? _chunkJKVRBCZLjs.CLI_PLAY_RUN_START_STREAM_PATH : _chunkJKVRBCZLjs.PLAY_RUN_START_STREAM_PATH;
3983
3993
  try {
3984
3994
  for await (const event of http.streamSse(streamPath, {
3985
3995
  method: "POST",
3986
3996
  body: JSON.parse(bodyJson),
3987
3997
  headers,
3988
- signal: _optionalChain([streamOptions, 'optionalAccess', _178 => _178.signal]),
3998
+ signal: _optionalChain([streamOptions, 'optionalAccess', _179 => _179.signal]),
3989
3999
  exactUrlOnly: true
3990
4000
  })) {
3991
4001
  if (event.scope === "play") yield event;
3992
4002
  }
3993
4003
  } catch (error) {
3994
- if (_optionalChain([options, 'optionalAccess', _179 => _179.cliAdmission]) && error instanceof _chunkDIAWYWT5js.DeeplineError && (error.statusCode === 404 || error.statusCode === 405)) {
4004
+ if (_optionalChain([options, 'optionalAccess', _180 => _180.cliAdmission]) && error instanceof _chunkDIAWYWT5js.DeeplineError && (error.statusCode === 404 || error.statusCode === 405)) {
3995
4005
  throw new (0, _chunkJKVRBCZLjs.CliPlayAdmissionUnsupportedError)(error.statusCode);
3996
4006
  }
3997
4007
  throw error;
@@ -4014,7 +4024,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4014
4024
  */
4015
4025
  async *startPlayRunStream(request, options) {
4016
4026
  const prepared = await this.preparePlayRunAdmission(request, options);
4017
- yield* prepared.startStream({ signal: _optionalChain([options, 'optionalAccess', _180 => _180.signal]) });
4027
+ yield* prepared.startStream({ signal: _optionalChain([options, 'optionalAccess', _181 => _181.signal]) });
4018
4028
  }
4019
4029
  /**
4020
4030
  * Register a bundled play artifact.
@@ -4167,7 +4177,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4167
4177
  compilerManifest,
4168
4178
  ...input.input ? { input: input.input } : {},
4169
4179
  ...input.inputFile ? { inputFile: input.inputFile } : {},
4170
- ..._optionalChain([input, 'access', _181 => _181.packagedFiles, 'optionalAccess', _182 => _182.length]) ? { packagedFiles: input.packagedFiles } : {},
4180
+ ..._optionalChain([input, 'access', _182 => _182.packagedFiles, 'optionalAccess', _183 => _183.length]) ? { packagedFiles: input.packagedFiles } : {},
4171
4181
  ...input.force ? { force: true } : {},
4172
4182
  ...input.forceToolRefresh ? { forceToolRefresh: true } : {}
4173
4183
  });
@@ -4197,29 +4207,29 @@ var DeeplineClient = (_class = class _DeeplineClient {
4197
4207
  * ```
4198
4208
  */
4199
4209
  async submitPlay(code, csvPath, name, options) {
4200
- const runtimeInput = _optionalChain([options, 'optionalAccess', _183 => _183.input]) ? { ...options.input } : {};
4210
+ const runtimeInput = _optionalChain([options, 'optionalAccess', _184 => _184.input]) ? { ...options.input } : {};
4201
4211
  if (csvPath) {
4202
4212
  runtimeInput.file = csvPath;
4203
4213
  }
4204
- const sourceCode = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _184 => _184.sourceCode]), () => ( code));
4205
- const artifact = _optionalChain([options, 'optionalAccess', _185 => _185.artifact]);
4206
- if (!_optionalChain([name, 'optionalAccess', _186 => _186.trim, 'call', _187 => _187()])) {
4214
+ const sourceCode = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _185 => _185.sourceCode]), () => ( code));
4215
+ const artifact = _optionalChain([options, 'optionalAccess', _186 => _186.artifact]);
4216
+ if (!_optionalChain([name, 'optionalAccess', _187 => _187.trim, 'call', _188 => _188()])) {
4207
4217
  throw new Error("submitPlay requires a play name.");
4208
4218
  }
4209
4219
  if (!artifact) {
4210
4220
  throw new Error("submitPlay requires a bundled play artifact.");
4211
4221
  }
4212
- const compilerManifest = await _asyncNullishCoalesce(await _asyncOptionalChain([options, 'optionalAccess', async _188 => _188.compilerManifest]), async () => ( await this.compilePlayManifest({
4222
+ const compilerManifest = await _asyncNullishCoalesce(await _asyncOptionalChain([options, 'optionalAccess', async _189 => _189.compilerManifest]), async () => ( await this.compilePlayManifest({
4213
4223
  name,
4214
4224
  sourceCode,
4215
- sourceFiles: _optionalChain([options, 'optionalAccess', _189 => _189.sourceFiles]),
4225
+ sourceFiles: _optionalChain([options, 'optionalAccess', _190 => _190.sourceFiles]),
4216
4226
  artifact
4217
4227
  })));
4218
4228
  const registeredArtifact = await this.registerPlayArtifact({
4219
4229
  name,
4220
4230
  sourceCode,
4221
- sourceFiles: _optionalChain([options, 'optionalAccess', _190 => _190.sourceFiles]),
4222
- description: _optionalChain([options, 'optionalAccess', _191 => _191.description]),
4231
+ sourceFiles: _optionalChain([options, 'optionalAccess', _191 => _191.sourceFiles]),
4232
+ description: _optionalChain([options, 'optionalAccess', _192 => _192.description]),
4223
4233
  artifact,
4224
4234
  compilerManifest,
4225
4235
  publish: false
@@ -4233,17 +4243,17 @@ var DeeplineClient = (_class = class _DeeplineClient {
4233
4243
  name,
4234
4244
  artifactStorageKey: registeredArtifact.artifactStorageKey,
4235
4245
  sourceCode,
4236
- description: _optionalChain([options, 'optionalAccess', _192 => _192.description]),
4246
+ description: _optionalChain([options, 'optionalAccess', _193 => _193.description]),
4237
4247
  staticPipeline: _nullishCoalesce(registeredArtifact.staticPipeline, () => ( null)),
4238
4248
  artifactHash: typeof artifact.artifactHash === "string" ? artifact.artifactHash : void 0,
4239
4249
  graphHash: typeof artifact.graphHash === "string" ? artifact.graphHash : void 0,
4240
4250
  runtimeArtifact: artifact,
4241
4251
  compilerManifest,
4242
4252
  ...Object.keys(runtimeInput).length > 0 ? { input: runtimeInput } : {},
4243
- ..._optionalChain([options, 'optionalAccess', _193 => _193.inputFile]) ? { inputFile: options.inputFile } : {},
4244
- ..._optionalChain([options, 'optionalAccess', _194 => _194.packagedFiles, 'optionalAccess', _195 => _195.length]) ? { packagedFiles: options.packagedFiles } : {},
4245
- ..._optionalChain([options, 'optionalAccess', _196 => _196.force]) ? { force: true } : {},
4246
- ..._optionalChain([options, 'optionalAccess', _197 => _197.forceToolRefresh]) ? { forceToolRefresh: true } : {}
4253
+ ..._optionalChain([options, 'optionalAccess', _194 => _194.inputFile]) ? { inputFile: options.inputFile } : {},
4254
+ ..._optionalChain([options, 'optionalAccess', _195 => _195.packagedFiles, 'optionalAccess', _196 => _196.length]) ? { packagedFiles: options.packagedFiles } : {},
4255
+ ..._optionalChain([options, 'optionalAccess', _197 => _197.force]) ? { force: true } : {},
4256
+ ..._optionalChain([options, 'optionalAccess', _198 => _198.forceToolRefresh]) ? { forceToolRefresh: true } : {}
4247
4257
  });
4248
4258
  }
4249
4259
  /**
@@ -4319,13 +4329,13 @@ var DeeplineClient = (_class = class _DeeplineClient {
4319
4329
  for await (const event of watchRunEvents({
4320
4330
  http: this.http,
4321
4331
  runId: workflowId,
4322
- signal: _optionalChain([options, 'optionalAccess', _198 => _198.signal]),
4323
- onNotice: _optionalChain([options, 'optionalAccess', _199 => _199.onNotice]),
4324
- onRetry: _optionalChain([options, 'optionalAccess', _200 => _200.onRetry]),
4325
- deferLogs: _optionalChain([options, 'optionalAccess', _201 => _201.deferLogs]),
4326
- omitTerminalLogs: _optionalChain([options, 'optionalAccess', _202 => _202.omitTerminalLogs]),
4327
- onPoll: _optionalChain([options, 'optionalAccess', _203 => _203.onPoll]),
4328
- ..._optionalChain([options, 'optionalAccess', _204 => _204.terminalStatus]) ? {
4332
+ signal: _optionalChain([options, 'optionalAccess', _199 => _199.signal]),
4333
+ onNotice: _optionalChain([options, 'optionalAccess', _200 => _200.onNotice]),
4334
+ onRetry: _optionalChain([options, 'optionalAccess', _201 => _201.onRetry]),
4335
+ deferLogs: _optionalChain([options, 'optionalAccess', _202 => _202.deferLogs]),
4336
+ omitTerminalLogs: _optionalChain([options, 'optionalAccess', _203 => _203.omitTerminalLogs]),
4337
+ onPoll: _optionalChain([options, 'optionalAccess', _204 => _204.onPoll]),
4338
+ ..._optionalChain([options, 'optionalAccess', _205 => _205.terminalStatus]) ? {
4329
4339
  terminalStatus: {
4330
4340
  ...options.terminalStatus,
4331
4341
  onStatus: async (raw, expectedStatus) => {
@@ -4335,7 +4345,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4335
4345
  `Run watch returned a mismatched terminal status for ${workflowId}.`
4336
4346
  );
4337
4347
  }
4338
- await _optionalChain([options, 'access', _205 => _205.terminalStatus, 'optionalAccess', _206 => _206.onStatus, 'call', _207 => _207(status)]);
4348
+ await _optionalChain([options, 'access', _206 => _206.terminalStatus, 'optionalAccess', _207 => _207.onStatus, 'call', _208 => _208(status)]);
4339
4349
  }
4340
4350
  }
4341
4351
  } : {}
@@ -4350,12 +4360,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
4350
4360
  * @deprecated Use `watchRunEvents` for ordinary run watching.
4351
4361
  */
4352
4362
  async *streamPlayRunEvents(workflowId, options) {
4353
- const headers = _optionalChain([options, 'optionalAccess', _208 => _208.lastEventId]) && options.lastEventId.trim() ? { "Last-Event-ID": options.lastEventId.trim() } : void 0;
4363
+ const headers = _optionalChain([options, 'optionalAccess', _209 => _209.lastEventId]) && options.lastEventId.trim() ? { "Last-Event-ID": options.lastEventId.trim() } : void 0;
4354
4364
  const params = new URLSearchParams();
4355
- params.set("mode", _nullishCoalesce(_optionalChain([options, 'optionalAccess', _209 => _209.mode]), () => ( "cli")));
4365
+ params.set("mode", _nullishCoalesce(_optionalChain([options, 'optionalAccess', _210 => _210.mode]), () => ( "cli")));
4356
4366
  for await (const event of this.http.streamSse(
4357
4367
  `/api/v2/runs/${encodeURIComponent(workflowId)}/tail?${params.toString()}`,
4358
- { signal: _optionalChain([options, 'optionalAccess', _210 => _210.signal]), headers }
4368
+ { signal: _optionalChain([options, 'optionalAccess', _211 => _211.signal]), headers }
4359
4369
  )) {
4360
4370
  if (event.scope === "play") {
4361
4371
  yield event;
@@ -4371,8 +4381,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
4371
4381
  */
4372
4382
  async *observeRunEvents(runId, options) {
4373
4383
  yield* this.watchRunEvents(runId, {
4374
- signal: _optionalChain([options, 'optionalAccess', _211 => _211.signal]),
4375
- onNotice: _optionalChain([options, 'optionalAccess', _212 => _212.onNotice])
4384
+ signal: _optionalChain([options, 'optionalAccess', _212 => _212.signal]),
4385
+ onNotice: _optionalChain([options, 'optionalAccess', _213 => _213.onNotice])
4376
4386
  });
4377
4387
  }
4378
4388
  /** Poll snapshots to terminal status and return the durable package. */
@@ -4380,9 +4390,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
4380
4390
  let terminalObserved = false;
4381
4391
  let terminalStatus = null;
4382
4392
  for await (const event of this.watchRunEvents(runId, {
4383
- signal: _optionalChain([options, 'optionalAccess', _213 => _213.signal]),
4384
- onNotice: _optionalChain([options, 'optionalAccess', _214 => _214.onNotice]),
4385
- onRetry: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _215 => _215.onRetry]), () => ( _optionalChain([options, 'optionalAccess', _216 => _216.onReconnect]))),
4393
+ signal: _optionalChain([options, 'optionalAccess', _214 => _214.signal]),
4394
+ onNotice: _optionalChain([options, 'optionalAccess', _215 => _215.onNotice]),
4395
+ onRetry: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _216 => _216.onRetry]), () => ( _optionalChain([options, 'optionalAccess', _217 => _217.onReconnect]))),
4386
4396
  terminalStatus: {
4387
4397
  runStatus: true,
4388
4398
  onStatus: (status) => {
@@ -4390,12 +4400,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
4390
4400
  }
4391
4401
  }
4392
4402
  })) {
4393
- _optionalChain([options, 'optionalAccess', _217 => _217.onEvent, 'optionalCall', _218 => _218(event)]);
4403
+ _optionalChain([options, 'optionalAccess', _218 => _218.onEvent, 'optionalCall', _219 => _219(event)]);
4394
4404
  if (_chunkJKVRBCZLjs.isTerminalPlayRunLifecycleStatus.call(void 0, playLiveRunStatus(event))) {
4395
4405
  terminalObserved = true;
4396
4406
  }
4397
4407
  }
4398
- if (_optionalChain([options, 'optionalAccess', _219 => _219.signal, 'optionalAccess', _220 => _220.aborted])) {
4408
+ if (_optionalChain([options, 'optionalAccess', _220 => _220.signal, 'optionalAccess', _221 => _221.aborted])) {
4399
4409
  throw new (0, _chunkDIAWYWT5js.DeeplineError)("Run watch aborted.", void 0, "ABORTED");
4400
4410
  }
4401
4411
  const refreshed = await _asyncNullishCoalesce(terminalStatus, async () => ( await this.getRunStatus(runId)));
@@ -4475,7 +4485,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4475
4485
  /** List the org's workflows. `GET /api/v2/workflows`. */
4476
4486
  async listWorkflows(options) {
4477
4487
  const params = new URLSearchParams();
4478
- if (typeof _optionalChain([options, 'optionalAccess', _221 => _221.limit]) === "number") {
4488
+ if (typeof _optionalChain([options, 'optionalAccess', _222 => _222.limit]) === "number") {
4479
4489
  params.set("limit", String(options.limit));
4480
4490
  }
4481
4491
  const query = params.size > 0 ? `?${params.toString()}` : "";
@@ -4528,7 +4538,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4528
4538
  /** List a workflow's runs. `GET /api/v2/workflows/:id/runs`. */
4529
4539
  async listWorkflowRuns(id, options) {
4530
4540
  const params = new URLSearchParams();
4531
- if (typeof _optionalChain([options, 'optionalAccess', _222 => _222.limit]) === "number") {
4541
+ if (typeof _optionalChain([options, 'optionalAccess', _223 => _223.limit]) === "number") {
4532
4542
  params.set("limit", String(options.limit));
4533
4543
  }
4534
4544
  const query = params.size > 0 ? `?${params.toString()}` : "";
@@ -4564,10 +4574,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
4564
4574
  */
4565
4575
  async getRunStatus(runId, options) {
4566
4576
  const params = new URLSearchParams();
4567
- if (_optionalChain([options, 'optionalAccess', _223 => _223.full]) === true) {
4577
+ if (_optionalChain([options, 'optionalAccess', _224 => _224.full]) === true) {
4568
4578
  params.set("full", "true");
4569
4579
  }
4570
- if (_optionalChain([options, 'optionalAccess', _224 => _224.configuration]) === true) {
4580
+ if (_optionalChain([options, 'optionalAccess', _225 => _225.configuration]) === true) {
4571
4581
  params.set("include", "configuration");
4572
4582
  }
4573
4583
  const query = params.size > 0 ? `?${params.toString()}` : "";
@@ -4575,7 +4585,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4575
4585
  `/api/v2/runs/${encodeURIComponent(runId)}${query}`,
4576
4586
  { headers: { "x-deepline-run-status": "1" } }
4577
4587
  );
4578
- if (_optionalChain([options, 'optionalAccess', _225 => _225.configuration]) === true && !Object.hasOwn(response, "contract")) {
4588
+ if (_optionalChain([options, 'optionalAccess', _226 => _226.configuration]) === true && !Object.hasOwn(response, "contract")) {
4579
4589
  throw new (0, _chunkDIAWYWT5js.DeeplineError)(
4580
4590
  "This server does not support recorded configuration reads.",
4581
4591
  void 0,
@@ -4583,7 +4593,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4583
4593
  );
4584
4594
  }
4585
4595
  const status = normalizePlayStatus(response);
4586
- if (_optionalChain([options, 'optionalAccess', _226 => _226.failedLogs]) !== true || status.status !== "failed") {
4596
+ if (_optionalChain([options, 'optionalAccess', _227 => _227.failedLogs]) !== true || status.status !== "failed") {
4587
4597
  return status;
4588
4598
  }
4589
4599
  const requestedFailedLogLimit = typeof options.failedLogLimit === "number" && Number.isFinite(options.failedLogLimit) ? Math.max(1, Math.floor(options.failedLogLimit)) : RUNS_FAILED_LOG_LIMIT;
@@ -4672,7 +4682,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4672
4682
  /** The same tenant-scoped run history searched by the dashboard and CLI. */
4673
4683
  async getRunsHistory(options = {}) {
4674
4684
  const params = new URLSearchParams();
4675
- const search = _optionalChain([options, 'access', _227 => _227.search, 'optionalAccess', _228 => _228.trim, 'call', _229 => _229()]);
4685
+ const search = _optionalChain([options, 'access', _228 => _228.search, 'optionalAccess', _229 => _229.trim, 'call', _230 => _230()]);
4676
4686
  if (search && search.length > 200) {
4677
4687
  throw new Error("Run search must be at most 200 characters.");
4678
4688
  }
@@ -4698,16 +4708,16 @@ var DeeplineClient = (_class = class _DeeplineClient {
4698
4708
  }
4699
4709
  /** Read one run page without discarding server pagination metadata. */
4700
4710
  async listRunsPage(options) {
4701
- const playName = _optionalChain([options, 'access', _230 => _230.play, 'optionalAccess', _231 => _231.trim, 'call', _232 => _232()]);
4711
+ const playName = _optionalChain([options, 'access', _231 => _231.play, 'optionalAccess', _232 => _232.trim, 'call', _233 => _233()]);
4702
4712
  const params = new URLSearchParams();
4703
4713
  if (playName) {
4704
4714
  params.set("play", playName);
4705
4715
  }
4706
- const status = _optionalChain([options, 'access', _233 => _233.status, 'optionalAccess', _234 => _234.trim, 'call', _235 => _235()]);
4716
+ const status = _optionalChain([options, 'access', _234 => _234.status, 'optionalAccess', _235 => _235.trim, 'call', _236 => _236()]);
4707
4717
  if (status) {
4708
4718
  params.set("status", status);
4709
4719
  }
4710
- const node = _optionalChain([options, 'access', _236 => _236.node, 'optionalAccess', _237 => _237.trim, 'call', _238 => _238()]);
4720
+ const node = _optionalChain([options, 'access', _237 => _237.node, 'optionalAccess', _238 => _238.trim, 'call', _239 => _239()]);
4711
4721
  if (node) {
4712
4722
  if (!playName)
4713
4723
  throw new Error("runs.list options.node requires options.play.");
@@ -4781,8 +4791,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
4781
4791
  * A different key starts another rerun.
4782
4792
  */
4783
4793
  async rerun(runId, options) {
4784
- const idempotencyKey = _optionalChain([options, 'optionalAccess', _239 => _239.idempotencyKey, 'optionalAccess', _240 => _240.trim, 'call', _241 => _241()]);
4785
- if (_optionalChain([options, 'optionalAccess', _242 => _242.idempotencyKey]) !== void 0 && !idempotencyKey) {
4794
+ const idempotencyKey = _optionalChain([options, 'optionalAccess', _240 => _240.idempotencyKey, 'optionalAccess', _241 => _241.trim, 'call', _242 => _242()]);
4795
+ if (_optionalChain([options, 'optionalAccess', _243 => _243.idempotencyKey]) !== void 0 && !idempotencyKey) {
4786
4796
  throw new (0, _chunkDIAWYWT5js.DeeplineError)(
4787
4797
  "runs.rerun idempotencyKey must not be empty.",
4788
4798
  void 0,
@@ -4791,7 +4801,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4791
4801
  }
4792
4802
  return this.http.post(
4793
4803
  `/api/v2/runs/${encodeURIComponent(runId)}/rerun`,
4794
- _optionalChain([options, 'optionalAccess', _243 => _243.inputOverrides]) ? { inputOverrides: options.inputOverrides } : {},
4804
+ _optionalChain([options, 'optionalAccess', _244 => _244.inputOverrides]) ? { inputOverrides: options.inputOverrides } : {},
4795
4805
  { "Idempotency-Key": idempotencyKey || globalThis.crypto.randomUUID() }
4796
4806
  );
4797
4807
  }
@@ -4805,21 +4815,21 @@ var DeeplineClient = (_class = class _DeeplineClient {
4805
4815
  * ```
4806
4816
  */
4807
4817
  async getRunLogs(runId, options) {
4808
- if (_optionalChain([options, 'optionalAccess', _244 => _244.all]) === true && options.failed === true) {
4818
+ if (_optionalChain([options, 'optionalAccess', _245 => _245.all]) === true && options.failed === true) {
4809
4819
  throw new (0, _chunkDIAWYWT5js.DeeplineError)(
4810
4820
  "runs.logs cannot combine all and failed views.",
4811
4821
  void 0,
4812
4822
  "INVALID_RUN_LOG_VIEW"
4813
4823
  );
4814
4824
  }
4815
- if (_optionalChain([options, 'optionalAccess', _245 => _245.cursor]) !== void 0 && options.failed === true) {
4825
+ if (_optionalChain([options, 'optionalAccess', _246 => _246.cursor]) !== void 0 && options.failed === true) {
4816
4826
  throw new (0, _chunkDIAWYWT5js.DeeplineError)(
4817
4827
  "runs.logs cannot combine failed with cursor.",
4818
4828
  void 0,
4819
4829
  "INVALID_RUN_LOG_VIEW"
4820
4830
  );
4821
4831
  }
4822
- if (_optionalChain([options, 'optionalAccess', _246 => _246.failed]) === true) {
4832
+ if (_optionalChain([options, 'optionalAccess', _247 => _247.failed]) === true) {
4823
4833
  const requestedLimit = typeof options.limit === "number" && Number.isFinite(options.limit) && options.limit > 0 ? Math.trunc(options.limit) : RUNS_FAILED_LOG_LIMIT;
4824
4834
  const failedLimit = Math.min(RUNS_FAILED_LOG_LIMIT, requestedLimit);
4825
4835
  const page = await this.http.get(
@@ -4844,18 +4854,18 @@ var DeeplineClient = (_class = class _DeeplineClient {
4844
4854
  ...page.logsTruncated ? { logsTruncated: true } : {}
4845
4855
  };
4846
4856
  }
4847
- const beforeSequence = _optionalChain([options, 'optionalAccess', _247 => _247.cursor]) !== void 0 ? parseRunLogsCursor(options.cursor) : null;
4848
- 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;
4857
+ const beforeSequence = _optionalChain([options, 'optionalAccess', _248 => _248.cursor]) !== void 0 ? parseRunLogsCursor(options.cursor) : null;
4858
+ const limit = _optionalChain([options, 'optionalAccess', _249 => _249.all]) ? Number.MAX_SAFE_INTEGER : typeof _optionalChain([options, 'optionalAccess', _250 => _250.limit]) === "number" && Number.isFinite(options.limit) && options.limit > 0 ? Math.trunc(options.limit) : 200;
4849
4859
  const fetchPage = (afterSeq2, pageLimit) => this.http.get(
4850
4860
  `/api/v2/runs/${encodeURIComponent(runId)}/logs?afterSeq=${afterSeq2}&limit=${pageLimit}`,
4851
4861
  { retryApiErrors: true }
4852
4862
  );
4853
4863
  const probe = await fetchPage(0, 1);
4854
4864
  const lastStoredSeq = probe.lastStoredSeq;
4855
- const oldestStoredSeq = _nullishCoalesce(_optionalChain([probe, 'access', _250 => _250.entries, 'access', _251 => _251[0], 'optionalAccess', _252 => _252.seq]), () => ( null));
4856
- const upperSeq = beforeSequence === null ? Number.POSITIVE_INFINITY : Math.min(beforeSequence - 1, lastStoredSeq);
4865
+ const oldestStoredSeq = _nullishCoalesce(_optionalChain([probe, 'access', _251 => _251.entries, 'access', _252 => _252[0], 'optionalAccess', _253 => _253.seq]), () => ( null));
4866
+ const upperSeq = beforeSequence === null ? lastStoredSeq : Math.min(beforeSequence - 1, lastStoredSeq);
4857
4867
  const windowEndSeq = Math.min(upperSeq, lastStoredSeq);
4858
- let afterSeq = _optionalChain([options, 'optionalAccess', _253 => _253.all]) ? 0 : Math.max(0, windowEndSeq - limit);
4868
+ let afterSeq = _optionalChain([options, 'optionalAccess', _254 => _254.all]) ? 0 : Math.max(0, windowEndSeq - limit);
4859
4869
  const entries = [];
4860
4870
  while (entries.length < limit && afterSeq < upperSeq) {
4861
4871
  const page = await fetchPage(
@@ -4889,7 +4899,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4889
4899
  hasMore: olderLinesExist,
4890
4900
  nextCursor: olderLinesExist ? encodeRunLogsCursor(firstSequence) : null,
4891
4901
  entries: entries.map((entry) => entry.line),
4892
- view: _optionalChain([options, 'optionalAccess', _254 => _254.all]) ? "all" : "tail",
4902
+ view: _optionalChain([options, 'optionalAccess', _255 => _255.all]) ? "all" : "tail",
4893
4903
  ...probe.logsTruncated ? { logsTruncated: true } : {}
4894
4904
  };
4895
4905
  }
@@ -5065,7 +5075,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5065
5075
  limit: String(_nullishCoalesce(input.limit, () => ( 5e3))),
5066
5076
  offset: String(_nullishCoalesce(input.offset, () => ( 0)))
5067
5077
  });
5068
- if (_optionalChain([input, 'access', _255 => _255.runId, 'optionalAccess', _256 => _256.trim, 'call', _257 => _257()])) {
5078
+ if (_optionalChain([input, 'access', _256 => _256.runId, 'optionalAccess', _257 => _257.trim, 'call', _258 => _258()])) {
5069
5079
  params.set("runId", input.runId.trim());
5070
5080
  }
5071
5081
  if (input.rowMode === "all" || input.rowMode === "live") {
@@ -5078,9 +5088,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
5078
5088
  `/api/v2/plays/${encodeURIComponent(input.playName)}/sheet?${params.toString()}`,
5079
5089
  { signal: input.signal }
5080
5090
  );
5081
- const requestedRunId = _optionalChain([input, 'access', _258 => _258.runId, 'optionalAccess', _259 => _259.trim, 'call', _260 => _260()]) || "";
5091
+ const requestedRunId = _optionalChain([input, 'access', _259 => _259.runId, 'optionalAccess', _260 => _260.trim, 'call', _261 => _261()]) || "";
5082
5092
  if (requestedRunId) {
5083
- const confirmedRunId = _optionalChain([result, 'access', _261 => _261.scope, 'optionalAccess', _262 => _262.kind]) === "run" ? result.scope.runId.trim() : "";
5093
+ const confirmedRunId = _optionalChain([result, 'access', _262 => _262.scope, 'optionalAccess', _263 => _263.kind]) === "run" ? result.scope.runId.trim() : "";
5084
5094
  const foreignRowRunIds = [
5085
5095
  ...new Set(
5086
5096
  result.rows.map(
@@ -5088,7 +5098,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5088
5098
  ).filter((runId) => runId && runId !== requestedRunId)
5089
5099
  )
5090
5100
  ];
5091
- if (_optionalChain([result, 'access', _263 => _263.scope, 'optionalAccess', _264 => _264.kind]) !== "run" || confirmedRunId !== requestedRunId || foreignRowRunIds.length > 0) {
5101
+ if (_optionalChain([result, 'access', _264 => _264.scope, 'optionalAccess', _265 => _265.kind]) !== "run" || confirmedRunId !== requestedRunId || foreignRowRunIds.length > 0) {
5092
5102
  throw new (0, _chunkDIAWYWT5js.DeeplineError)(
5093
5103
  `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.`,
5094
5104
  void 0,
@@ -5117,7 +5127,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5117
5127
  async stopRun(runId, options) {
5118
5128
  return this.http.post(
5119
5129
  `/api/v2/runs/${encodeURIComponent(runId)}/stop`,
5120
- _optionalChain([options, 'optionalAccess', _265 => _265.reason]) ? { reason: options.reason } : {}
5130
+ _optionalChain([options, 'optionalAccess', _266 => _266.reason]) ? { reason: options.reason } : {}
5121
5131
  );
5122
5132
  }
5123
5133
  /**
@@ -5135,11 +5145,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
5135
5145
  * The method clears workspace run-slot state without requiring each run ID.
5136
5146
  */
5137
5147
  async stopAllRuns(options) {
5138
- const dryRun = _optionalChain([options, 'optionalAccess', _266 => _266.dryRun]) === true;
5148
+ const dryRun = _optionalChain([options, 'optionalAccess', _267 => _267.dryRun]) === true;
5139
5149
  const result = await this.http.post(
5140
5150
  "/api/v2/runs/stop-all",
5141
5151
  {
5142
- ..._optionalChain([options, 'optionalAccess', _267 => _267.reason]) ? { reason: options.reason } : {},
5152
+ ..._optionalChain([options, 'optionalAccess', _268 => _268.reason]) ? { reason: options.reason } : {},
5143
5153
  ...dryRun ? { dryRun: true } : {}
5144
5154
  }
5145
5155
  );
@@ -5160,7 +5170,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5160
5170
  * `origin: "owned"` for org-owned plays.
5161
5171
  */
5162
5172
  async listPlays(options) {
5163
- if (!_optionalChain([options, 'optionalAccess', _268 => _268.grep, 'optionalAccess', _269 => _269.trim, 'call', _270 => _270()])) {
5173
+ if (!_optionalChain([options, 'optionalAccess', _269 => _269.grep, 'optionalAccess', _270 => _270.trim, 'call', _271 => _271()])) {
5164
5174
  return (await this.requestPlaysPage(options, false)).plays;
5165
5175
  }
5166
5176
  const plays = [];
@@ -5182,45 +5192,45 @@ var DeeplineClient = (_class = class _DeeplineClient {
5182
5192
  }
5183
5193
  async requestPlaysPage(options, paginateInventory = true) {
5184
5194
  const params = new URLSearchParams();
5185
- if (paginateInventory && !_optionalChain([options, 'optionalAccess', _271 => _271.grep, 'optionalAccess', _272 => _272.trim, 'call', _273 => _273()]))
5195
+ if (paginateInventory && !_optionalChain([options, 'optionalAccess', _272 => _272.grep, 'optionalAccess', _273 => _273.trim, 'call', _274 => _274()]))
5186
5196
  params.set("inventory_paginated", "1");
5187
- if (_optionalChain([options, 'optionalAccess', _274 => _274.origin])) params.set("origin", options.origin);
5188
- if (_optionalChain([options, 'optionalAccess', _275 => _275.categories])) {
5197
+ if (_optionalChain([options, 'optionalAccess', _275 => _275.origin])) params.set("origin", options.origin);
5198
+ if (_optionalChain([options, 'optionalAccess', _276 => _276.categories])) {
5189
5199
  params.set(
5190
5200
  "categories",
5191
5201
  Array.isArray(options.categories) ? options.categories.join(",") : options.categories
5192
5202
  );
5193
5203
  }
5194
- if (_optionalChain([options, 'optionalAccess', _276 => _276.categories]) || _optionalChain([options, 'optionalAccess', _277 => _277.includeToolCategories])) {
5204
+ if (_optionalChain([options, 'optionalAccess', _277 => _277.categories]) || _optionalChain([options, 'optionalAccess', _278 => _278.includeToolCategories])) {
5195
5205
  params.set("include_tool_categories", "1");
5196
5206
  }
5197
- if (_optionalChain([options, 'optionalAccess', _278 => _278.tags])) {
5207
+ if (_optionalChain([options, 'optionalAccess', _279 => _279.tags])) {
5198
5208
  params.set(
5199
5209
  "tags",
5200
5210
  Array.isArray(options.tags) ? options.tags.join(",") : options.tags
5201
5211
  );
5202
5212
  }
5203
- if (_optionalChain([options, 'optionalAccess', _279 => _279.includeArchived])) params.set("include_archived", "1");
5204
- if (_optionalChain([options, 'optionalAccess', _280 => _280.includeCostEstimates])) {
5213
+ if (_optionalChain([options, 'optionalAccess', _280 => _280.includeArchived])) params.set("include_archived", "1");
5214
+ if (_optionalChain([options, 'optionalAccess', _281 => _281.includeCostEstimates])) {
5205
5215
  params.set("include_cost_estimates", "1");
5206
5216
  }
5207
- if (_optionalChain([options, 'optionalAccess', _281 => _281.grep, 'optionalAccess', _282 => _282.trim, 'call', _283 => _283()])) {
5217
+ if (_optionalChain([options, 'optionalAccess', _282 => _282.grep, 'optionalAccess', _283 => _283.trim, 'call', _284 => _284()])) {
5208
5218
  params.set("grep", options.grep.trim());
5209
5219
  params.set("limit", "60");
5210
5220
  }
5211
- if (_optionalChain([options, 'optionalAccess', _284 => _284.limit]) !== void 0) {
5221
+ if (_optionalChain([options, 'optionalAccess', _285 => _285.limit]) !== void 0) {
5212
5222
  if (!Number.isSafeInteger(options.limit) || options.limit < 1) {
5213
5223
  throw new Error("Play page limit must be a positive integer");
5214
5224
  }
5215
5225
  params.set("limit", String(options.limit));
5216
5226
  }
5217
- if (_optionalChain([options, 'optionalAccess', _285 => _285.cursor])) params.set("cursor", options.cursor);
5227
+ if (_optionalChain([options, 'optionalAccess', _286 => _286.cursor])) params.set("cursor", options.cursor);
5218
5228
  const suffix = params.size ? `?${params.toString()}` : "";
5219
5229
  const response = await this.http.get(`/api/v2/plays${suffix}`);
5220
5230
  return {
5221
5231
  plays: _nullishCoalesce(response.plays, () => ( [])),
5222
- cursor: _nullishCoalesce(_nullishCoalesce(_optionalChain([response, 'access', _286 => _286.pagination, 'optionalAccess', _287 => _287.cursor]), () => ( response.cursor)), () => ( null)),
5223
- hasMore: Boolean(_nullishCoalesce(_optionalChain([response, 'access', _288 => _288.pagination, 'optionalAccess', _289 => _289.hasMore]), () => ( response.hasMore)))
5232
+ cursor: _nullishCoalesce(_nullishCoalesce(_optionalChain([response, 'access', _287 => _287.pagination, 'optionalAccess', _288 => _288.cursor]), () => ( response.cursor)), () => ( null)),
5233
+ hasMore: Boolean(_nullishCoalesce(_optionalChain([response, 'access', _289 => _289.pagination, 'optionalAccess', _290 => _290.hasMore]), () => ( response.hasMore)))
5224
5234
  };
5225
5235
  }
5226
5236
  /** Read definition-level settings, independently of code revisions. */
@@ -5274,7 +5284,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5274
5284
  }
5275
5285
  /** Start provider OAuth and return the URL to open in a browser. */
5276
5286
  async startIntegrationOAuth(provider, options = {}) {
5277
- const scopes = _optionalChain([options, 'access', _290 => _290.scopes, 'optionalAccess', _291 => _291.map, 'call', _292 => _292((scope) => scope.trim()), 'access', _293 => _293.filter, 'call', _294 => _294(Boolean)]);
5287
+ const scopes = _optionalChain([options, 'access', _291 => _291.scopes, 'optionalAccess', _292 => _292.map, 'call', _293 => _293((scope) => scope.trim()), 'access', _294 => _294.filter, 'call', _295 => _295(Boolean)]);
5278
5288
  if (scopes !== void 0 && scopes.length === 0) {
5279
5289
  throw new Error("scopes must contain at least one OAuth scope.");
5280
5290
  }
@@ -5290,8 +5300,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
5290
5300
  return this.http.post("/api/v2/integrations/connect", {
5291
5301
  provider: "slack",
5292
5302
  scopes: [...PRODUCT_NOTIFICATION_SLACK_OAUTH_SCOPES],
5293
- ..._optionalChain([options, 'optionalAccess', _295 => _295.successUrl]) ? { success_url: options.successUrl } : {},
5294
- ..._optionalChain([options, 'optionalAccess', _296 => _296.failureUrl]) ? { failure_url: options.failureUrl } : {}
5303
+ ..._optionalChain([options, 'optionalAccess', _296 => _296.successUrl]) ? { success_url: options.successUrl } : {},
5304
+ ..._optionalChain([options, 'optionalAccess', _297 => _297.failureUrl]) ? { failure_url: options.failureUrl } : {}
5295
5305
  });
5296
5306
  }
5297
5307
  /** List Slack channels visible to the connected Deepline Slack app. */
@@ -5366,7 +5376,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5366
5376
  }
5367
5377
  const targets = input.targets.map(parseNotificationGroupTarget);
5368
5378
  const legacyEvents = _nullishCoalesce(input.legacyEvents, () => ( []));
5369
- const legacyTarget = targets.length === 1 && _optionalChain([targets, 'access', _297 => _297[0], 'optionalAccess', _298 => _298.kind]) === "slack" && legacyEvents.length > 0 ? targets[0] : null;
5379
+ const legacyTarget = targets.length === 1 && _optionalChain([targets, 'access', _298 => _298[0], 'optionalAccess', _299 => _299.kind]) === "slack" && legacyEvents.length > 0 ? targets[0] : null;
5370
5380
  if (legacyEvents.length > 0 && !legacyTarget) {
5371
5381
  throw new Error(
5372
5382
  "--for is supported only by the legacy one-Slack-target form. Create the group first, then add rules in notification configuration."
@@ -5402,7 +5412,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5402
5412
  const existingGroup = current.configuration.groups.find(
5403
5413
  (candidate) => candidate.name.toLowerCase() === name.toLowerCase()
5404
5414
  );
5405
- const groupKey = _nullishCoalesce(_optionalChain([existingGroup, 'optionalAccess', _299 => _299.groupKey]), () => ( notificationObjectKey("group")));
5415
+ const groupKey = _nullishCoalesce(_optionalChain([existingGroup, 'optionalAccess', _300 => _300.groupKey]), () => ( notificationObjectKey("group")));
5406
5416
  const group = _nullishCoalesce(existingGroup, () => ( {
5407
5417
  groupKey,
5408
5418
  name,
@@ -5626,7 +5636,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5626
5636
  /** Read one trigger inventory page without loading run histories. */
5627
5637
  async listPlayTriggerInventory(options) {
5628
5638
  const params = new URLSearchParams({ view: "inventory" });
5629
- if (_optionalChain([options, 'optionalAccess', _300 => _300.cursor])) params.set("cursor", options.cursor);
5639
+ if (_optionalChain([options, 'optionalAccess', _301 => _301.cursor])) params.set("cursor", options.cursor);
5630
5640
  return this.http.get(`/api/v2/plays/triggers?${params}`);
5631
5641
  }
5632
5642
  /** Read one trigger's recent runs, with an explicit partial-history flag. */
@@ -5635,7 +5645,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5635
5645
  view: "history",
5636
5646
  binding_id: bindingId
5637
5647
  });
5638
- if (_optionalChain([options, 'optionalAccess', _301 => _301.limit]) !== void 0)
5648
+ if (_optionalChain([options, 'optionalAccess', _302 => _302.limit]) !== void 0)
5639
5649
  params.set("history_limit", String(options.limit));
5640
5650
  return this.http.get(`/api/v2/plays/triggers?${params}`);
5641
5651
  }
@@ -5823,14 +5833,14 @@ var DeeplineClient = (_class = class _DeeplineClient {
5823
5833
  */
5824
5834
  async runPlay(code, csvPath, name, options) {
5825
5835
  const { workflowId } = await this.submitPlay(code, csvPath, name, {
5826
- input: _optionalChain([options, 'optionalAccess', _302 => _302.input]),
5827
- sourceCode: _optionalChain([options, 'optionalAccess', _303 => _303.sourceCode]),
5828
- artifact: _optionalChain([options, 'optionalAccess', _304 => _304.artifact]),
5829
- compilerManifest: _optionalChain([options, 'optionalAccess', _305 => _305.compilerManifest]),
5830
- inputFile: _optionalChain([options, 'optionalAccess', _306 => _306.inputFile]),
5831
- packagedFiles: _optionalChain([options, 'optionalAccess', _307 => _307.packagedFiles]),
5832
- force: _optionalChain([options, 'optionalAccess', _308 => _308.force]),
5833
- forceToolRefresh: _optionalChain([options, 'optionalAccess', _309 => _309.forceToolRefresh])
5836
+ input: _optionalChain([options, 'optionalAccess', _303 => _303.input]),
5837
+ sourceCode: _optionalChain([options, 'optionalAccess', _304 => _304.sourceCode]),
5838
+ artifact: _optionalChain([options, 'optionalAccess', _305 => _305.artifact]),
5839
+ compilerManifest: _optionalChain([options, 'optionalAccess', _306 => _306.compilerManifest]),
5840
+ inputFile: _optionalChain([options, 'optionalAccess', _307 => _307.inputFile]),
5841
+ packagedFiles: _optionalChain([options, 'optionalAccess', _308 => _308.packagedFiles]),
5842
+ force: _optionalChain([options, 'optionalAccess', _309 => _309.force]),
5843
+ forceToolRefresh: _optionalChain([options, 'optionalAccess', _310 => _310.forceToolRefresh])
5834
5844
  });
5835
5845
  const start = Date.now();
5836
5846
  const state = {
@@ -5841,7 +5851,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5841
5851
  latest: null
5842
5852
  };
5843
5853
  let terminalObserved = null;
5844
- if (_optionalChain([options, 'optionalAccess', _310 => _310.signal, 'optionalAccess', _311 => _311.aborted])) {
5854
+ if (_optionalChain([options, 'optionalAccess', _311 => _311.signal, 'optionalAccess', _312 => _312.aborted])) {
5845
5855
  await this.cancelPlay(workflowId);
5846
5856
  return {
5847
5857
  success: false,
@@ -5852,9 +5862,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
5852
5862
  };
5853
5863
  }
5854
5864
  for await (const event of this.watchRunEvents(workflowId, {
5855
- signal: _optionalChain([options, 'optionalAccess', _312 => _312.signal])
5865
+ signal: _optionalChain([options, 'optionalAccess', _313 => _313.signal])
5856
5866
  })) {
5857
- if (_optionalChain([options, 'optionalAccess', _313 => _313.signal, 'optionalAccess', _314 => _314.aborted])) {
5867
+ if (_optionalChain([options, 'optionalAccess', _314 => _314.signal, 'optionalAccess', _315 => _315.aborted])) {
5858
5868
  await this.cancelPlay(workflowId);
5859
5869
  return {
5860
5870
  success: false,
@@ -5864,19 +5874,19 @@ var DeeplineClient = (_class = class _DeeplineClient {
5864
5874
  error: "Cancelled by user"
5865
5875
  };
5866
5876
  }
5867
- const previousStatus = _optionalChain([state, 'access', _315 => _315.latest, 'optionalAccess', _316 => _316.status]);
5877
+ const previousStatus = _optionalChain([state, 'access', _316 => _316.latest, 'optionalAccess', _317 => _317.status]);
5868
5878
  const status = updatePlayLiveStatusState(state, event);
5869
5879
  if (!status) {
5870
5880
  continue;
5871
5881
  }
5872
5882
  if (event.type !== "play.run.status" || status.status !== previousStatus) {
5873
- _optionalChain([options, 'optionalAccess', _317 => _317.onProgress, 'optionalCall', _318 => _318(status)]);
5883
+ _optionalChain([options, 'optionalAccess', _318 => _318.onProgress, 'optionalCall', _319 => _319(status)]);
5874
5884
  }
5875
5885
  if (_chunkJKVRBCZLjs.isTerminalPlayRunLifecycleStatus.call(void 0, status.status)) {
5876
5886
  terminalObserved = status;
5877
5887
  }
5878
5888
  }
5879
- if (_optionalChain([options, 'optionalAccess', _319 => _319.signal, 'optionalAccess', _320 => _320.aborted])) {
5889
+ if (_optionalChain([options, 'optionalAccess', _320 => _320.signal, 'optionalAccess', _321 => _321.aborted])) {
5880
5890
  await this.cancelPlay(workflowId);
5881
5891
  return {
5882
5892
  success: false,
@@ -5929,7 +5939,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5929
5939
  const response = await this.http.get(
5930
5940
  `/api/v2/usage/events?request_id=${encodeURIComponent(normalizedRequestId)}`
5931
5941
  );
5932
- const event = _optionalChain([response, 'access', _321 => _321.entries, 'optionalAccess', _322 => _322[0]]);
5942
+ const event = _optionalChain([response, 'access', _322 => _322.entries, 'optionalAccess', _323 => _323[0]]);
5933
5943
  if (!event) {
5934
5944
  throw new (0, _chunkDIAWYWT5js.DeeplineError)(
5935
5945
  "No usage event was found for this request_id.",
@@ -6103,7 +6113,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6103
6113
  async cancelBillingSubscription(options) {
6104
6114
  return this.http.post(
6105
6115
  "/api/v2/billing/subscription/cancel",
6106
- { action: _optionalChain([options, 'optionalAccess', _323 => _323.undo]) ? "undo_cancel" : "cancel" }
6116
+ { action: _optionalChain([options, 'optionalAccess', _324 => _324.undo]) ? "undo_cancel" : "cancel" }
6107
6117
  );
6108
6118
  }
6109
6119
  /**
@@ -6115,7 +6125,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6115
6125
  */
6116
6126
  async listBillingInvoices(options) {
6117
6127
  const params = new URLSearchParams();
6118
- if (_optionalChain([options, 'optionalAccess', _324 => _324.limit]) !== void 0) {
6128
+ if (_optionalChain([options, 'optionalAccess', _325 => _325.limit]) !== void 0) {
6119
6129
  params.set("limit", String(options.limit));
6120
6130
  }
6121
6131
  const suffix = Array.from(params).length > 0 ? `?${params.toString()}` : "";
@@ -6225,7 +6235,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6225
6235
  /** Create a Stripe-hosted portal session for payment recovery and invoices. */
6226
6236
  async createTargetBillingPortalSession(options) {
6227
6237
  const response = await this.http.post(
6228
- _optionalChain([options, 'optionalAccess', _325 => _325.flow]) === "customer_update" ? "/api/v2/billing/portal-sessions?flow=customer_update" : "/api/v2/billing/portal-sessions",
6238
+ _optionalChain([options, 'optionalAccess', _326 => _326.flow]) === "customer_update" ? "/api/v2/billing/portal-sessions?flow=customer_update" : "/api/v2/billing/portal-sessions",
6229
6239
  {}
6230
6240
  );
6231
6241
  return response.data;
@@ -6275,8 +6285,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
6275
6285
  return this.http.request("/api/v2/monitors/audit", {
6276
6286
  method: "POST",
6277
6287
  body: {
6278
- ..._optionalChain([options, 'optionalAccess', _326 => _326.fleetId]) ? { fleet_id: options.fleetId } : {},
6279
- ..._optionalChain([options, 'optionalAccess', _327 => _327.cursor]) ? { cursor: options.cursor } : {}
6288
+ ..._optionalChain([options, 'optionalAccess', _327 => _327.fleetId]) ? { fleet_id: options.fleetId } : {},
6289
+ ..._optionalChain([options, 'optionalAccess', _328 => _328.cursor]) ? { cursor: options.cursor } : {}
6280
6290
  },
6281
6291
  maxRetries: 0
6282
6292
  });
@@ -6286,8 +6296,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
6286
6296
  return this.http.request("/api/v2/monitors/repair", {
6287
6297
  method: "POST",
6288
6298
  body: {
6289
- ..._optionalChain([options, 'optionalAccess', _328 => _328.fleetId]) ? { fleet_id: options.fleetId } : {},
6290
- ..._optionalChain([options, 'optionalAccess', _329 => _329.dryRun]) === void 0 ? {} : { dry_run: options.dryRun }
6299
+ ..._optionalChain([options, 'optionalAccess', _329 => _329.fleetId]) ? { fleet_id: options.fleetId } : {},
6300
+ ..._optionalChain([options, 'optionalAccess', _330 => _330.dryRun]) === void 0 ? {} : { dry_run: options.dryRun }
6291
6301
  },
6292
6302
  maxRetries: 0
6293
6303
  });
@@ -6295,7 +6305,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6295
6305
  /** Delivery and convergence health. Prefer `client.monitors.health(...)`. */
6296
6306
  async readMonitorsHealth(options) {
6297
6307
  const params = new URLSearchParams();
6298
- if (_optionalChain([options, 'optionalAccess', _330 => _330.fleetId])) params.set("fleet_id", options.fleetId);
6308
+ if (_optionalChain([options, 'optionalAccess', _331 => _331.fleetId])) params.set("fleet_id", options.fleetId);
6299
6309
  const query = params.toString();
6300
6310
  const suffix = query ? `?${query}` : "";
6301
6311
  return this.http.request(
@@ -6368,7 +6378,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6368
6378
  );
6369
6379
  }
6370
6380
  const params = new URLSearchParams();
6371
- if (_optionalChain([options, 'optionalAccess', _331 => _331.cursor])) params.set("cursor", options.cursor);
6381
+ if (_optionalChain([options, 'optionalAccess', _332 => _332.cursor])) params.set("cursor", options.cursor);
6372
6382
  const suffix = params.size > 0 ? `?${params}` : "";
6373
6383
  return this.http.request(
6374
6384
  `/api/v2/monitors/batch/${encodeURIComponent(runId)}${suffix}`,
@@ -6415,7 +6425,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6415
6425
  * a second charge. The submission is never replayed automatically.
6416
6426
  */
6417
6427
  async previewMonitor(definition, options) {
6418
- const idempotencyKey = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _332 => _332.idempotencyKey]), () => ( `monitor-preview-${_nullishCoalesce(_optionalChain([globalThis, 'access', _333 => _333.crypto, 'optionalAccess', _334 => _334.randomUUID, 'optionalCall', _335 => _335()]), () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`))}`));
6428
+ const idempotencyKey = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _333 => _333.idempotencyKey]), () => ( `monitor-preview-${_nullishCoalesce(_optionalChain([globalThis, 'access', _334 => _334.crypto, 'optionalAccess', _335 => _335.randomUUID, 'optionalCall', _336 => _336()]), () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`))}`));
6419
6429
  try {
6420
6430
  const result = await this.http.request(
6421
6431
  "/api/v2/monitors/preview",
@@ -6423,7 +6433,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6423
6433
  method: "POST",
6424
6434
  body: {
6425
6435
  ...definition,
6426
- ..._optionalChain([options, 'optionalAccess', _336 => _336.limit]) === void 0 ? {} : { limit: options.limit }
6436
+ ..._optionalChain([options, 'optionalAccess', _337 => _337.limit]) === void 0 ? {} : { limit: options.limit }
6427
6437
  },
6428
6438
  headers: { "Idempotency-Key": idempotencyKey },
6429
6439
  maxRetries: 0,
@@ -6445,7 +6455,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6445
6455
  * `client.monitors.deploy(...)`.
6446
6456
  */
6447
6457
  async deployMonitor(definition, options) {
6448
- if (_optionalChain([options, 'optionalAccess', _337 => _337.dryRun])) {
6458
+ if (_optionalChain([options, 'optionalAccess', _338 => _338.dryRun])) {
6449
6459
  return this.http.request("/api/v2/monitors/check", {
6450
6460
  method: "POST",
6451
6461
  body: definition
@@ -6481,12 +6491,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
6481
6491
  /** List deployed monitors. Prefer `client.monitors.list(...)`. */
6482
6492
  async listMonitors(options) {
6483
6493
  const params = new URLSearchParams();
6484
- if (_optionalChain([options, 'optionalAccess', _338 => _338.state])) params.set("state", options.state);
6485
- else if (_optionalChain([options, 'optionalAccess', _339 => _339.status])) params.set("status", options.status);
6486
- if (_optionalChain([options, 'optionalAccess', _340 => _340.limit]) !== void 0)
6494
+ if (_optionalChain([options, 'optionalAccess', _339 => _339.state])) params.set("state", options.state);
6495
+ else if (_optionalChain([options, 'optionalAccess', _340 => _340.status])) params.set("status", options.status);
6496
+ if (_optionalChain([options, 'optionalAccess', _341 => _341.limit]) !== void 0)
6487
6497
  params.set("limit", String(options.limit));
6488
- if (_optionalChain([options, 'optionalAccess', _341 => _341.cursor])) params.set("cursor", options.cursor);
6489
- if (_optionalChain([options, 'optionalAccess', _342 => _342.includeConsumers])) params.set("include_consumers", "true");
6498
+ if (_optionalChain([options, 'optionalAccess', _342 => _342.cursor])) params.set("cursor", options.cursor);
6499
+ if (_optionalChain([options, 'optionalAccess', _343 => _343.includeConsumers])) params.set("include_consumers", "true");
6490
6500
  const query = params.toString();
6491
6501
  const suffix = query ? `?${query}` : "";
6492
6502
  return this.http.request(
@@ -6502,7 +6512,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6502
6512
  );
6503
6513
  }
6504
6514
  async testMonitorWebhook(key, payload, options) {
6505
- if (_optionalChain([options, 'optionalAccess', _343 => _343.dispatch]) === true || _optionalChain([options, 'optionalAccess', _344 => _344.validationOnly]) === false) {
6515
+ if (_optionalChain([options, 'optionalAccess', _344 => _344.dispatch]) === true || _optionalChain([options, 'optionalAccess', _345 => _345.validationOnly]) === false) {
6506
6516
  throw new (0, _chunkDIAWYWT5js.DeeplineError)(
6507
6517
  "Monitor tests are validation-only and cannot dispatch events.",
6508
6518
  void 0,
@@ -6557,7 +6567,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6557
6567
  }
6558
6568
  /** Delete a deployed monitor and its upstream provider resource. `dryRun` returns the delete plan. Prefer `client.monitors.delete(...)`. */
6559
6569
  async deleteMonitor(key, options) {
6560
- if (_optionalChain([options, 'optionalAccess', _345 => _345.localOnly]) === true) {
6570
+ if (_optionalChain([options, 'optionalAccess', _346 => _346.localOnly]) === true) {
6561
6571
  throw new (0, _chunkDIAWYWT5js.DeeplineError)(
6562
6572
  "localOnly monitor deletion is no longer supported. Monitor deletion always deprovisions the upstream provider resource.",
6563
6573
  void 0,
@@ -6565,11 +6575,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
6565
6575
  );
6566
6576
  }
6567
6577
  const params = new URLSearchParams();
6568
- if (_optionalChain([options, 'optionalAccess', _346 => _346.dryRun])) params.set("dry_run", "true");
6578
+ if (_optionalChain([options, 'optionalAccess', _347 => _347.dryRun])) params.set("dry_run", "true");
6569
6579
  const query = params.toString();
6570
6580
  return this.http.request(
6571
6581
  `/api/v2/monitors/deployed/${encodeURIComponent(key)}${query ? `?${query}` : ""}`,
6572
- _optionalChain([options, 'optionalAccess', _347 => _347.dryRun]) ? { method: "DELETE" } : {
6582
+ _optionalChain([options, 'optionalAccess', _348 => _348.dryRun]) ? { method: "DELETE" } : {
6573
6583
  method: "DELETE",
6574
6584
  // Deletion is a provider lifecycle operation. A timeout is an
6575
6585
  // unknown outcome, not authority to begin another delete attempt.
@@ -6582,10 +6592,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
6582
6592
  * Prefer `client.monitors.reactivate(...)`.
6583
6593
  */
6584
6594
  async reactivateMonitor(key, options) {
6585
- const query = _optionalChain([options, 'optionalAccess', _348 => _348.dryRun]) ? "?dry_run=true" : "";
6595
+ const query = _optionalChain([options, 'optionalAccess', _349 => _349.dryRun]) ? "?dry_run=true" : "";
6586
6596
  return this.http.request(
6587
6597
  `/api/v2/monitors/deployed/${encodeURIComponent(key)}/reactivate${query}`,
6588
- _optionalChain([options, 'optionalAccess', _349 => _349.dryRun]) ? { method: "POST", body: {} } : {
6598
+ _optionalChain([options, 'optionalAccess', _350 => _350.dryRun]) ? { method: "POST", body: {} } : {
6589
6599
  method: "POST",
6590
6600
  body: {},
6591
6601
  // Reactivation can create an upstream resource, so it must not use
@@ -6599,7 +6609,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6599
6609
  // ——————————————————————————————————————————————————————————
6600
6610
  static __initStatic() {this.MONITOR_JOB_IDEMPOTENCY_KEY_MAX_LENGTH = 96}
6601
6611
  monitorJobIdempotencyKey(operation) {
6602
- const uuid = _nullishCoalesce(_optionalChain([globalThis, 'access', _350 => _350.crypto, 'optionalAccess', _351 => _351.randomUUID, 'optionalCall', _352 => _352()]), () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`));
6612
+ const uuid = _nullishCoalesce(_optionalChain([globalThis, 'access', _351 => _351.crypto, 'optionalAccess', _352 => _352.randomUUID, 'optionalCall', _353 => _353()]), () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`));
6603
6613
  const prefix = "monitor-job-";
6604
6614
  const safeOperation = operation.replace(/[^A-Za-z0-9._-]/g, "-");
6605
6615
  const maxOperationLength = Math.max(
@@ -6610,7 +6620,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6610
6620
  }
6611
6621
  monitorJobHeaders(operation, idempotencyKey) {
6612
6622
  return {
6613
- "Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _353 => _353.trim, 'call', _354 => _354()]) || this.monitorJobIdempotencyKey(operation)
6623
+ "Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _354 => _354.trim, 'call', _355 => _355()]) || this.monitorJobIdempotencyKey(operation)
6614
6624
  };
6615
6625
  }
6616
6626
  async deployMonitorBatch(definitions, options) {
@@ -6621,7 +6631,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6621
6631
  body: { version: 1, kind: "batch", monitors: definitions },
6622
6632
  headers: this.monitorJobHeaders(
6623
6633
  "batch-deploy",
6624
- _optionalChain([options, 'optionalAccess', _355 => _355.idempotencyKey])
6634
+ _optionalChain([options, 'optionalAccess', _356 => _356.idempotencyKey])
6625
6635
  ),
6626
6636
  maxRetries: 0,
6627
6637
  exactUrlOnly: true
@@ -6640,11 +6650,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
6640
6650
  version: 1,
6641
6651
  kind: "batch",
6642
6652
  monitors: definitions,
6643
- ..._optionalChain([options, 'optionalAccess', _356 => _356.expectedGeneration]) === void 0 ? {} : { expected_generation: options.expectedGeneration }
6653
+ ..._optionalChain([options, 'optionalAccess', _357 => _357.expectedGeneration]) === void 0 ? {} : { expected_generation: options.expectedGeneration }
6644
6654
  },
6645
6655
  headers: this.monitorJobHeaders(
6646
6656
  `batch-sync-${batchId}`,
6647
- _optionalChain([options, 'optionalAccess', _357 => _357.idempotencyKey])
6657
+ _optionalChain([options, 'optionalAccess', _358 => _358.idempotencyKey])
6648
6658
  ),
6649
6659
  maxRetries: 0,
6650
6660
  exactUrlOnly: true
@@ -6659,7 +6669,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6659
6669
  body: {},
6660
6670
  headers: this.monitorJobHeaders(
6661
6671
  `batch-start-${batchId}`,
6662
- _optionalChain([options, 'optionalAccess', _358 => _358.idempotencyKey])
6672
+ _optionalChain([options, 'optionalAccess', _359 => _359.idempotencyKey])
6663
6673
  ),
6664
6674
  maxRetries: 0,
6665
6675
  exactUrlOnly: true
@@ -6674,7 +6684,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6674
6684
  body: {},
6675
6685
  headers: this.monitorJobHeaders(
6676
6686
  `batch-stop-${batchId}`,
6677
- _optionalChain([options, 'optionalAccess', _359 => _359.idempotencyKey])
6687
+ _optionalChain([options, 'optionalAccess', _360 => _360.idempotencyKey])
6678
6688
  ),
6679
6689
  maxRetries: 0,
6680
6690
  exactUrlOnly: true
@@ -6695,7 +6705,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6695
6705
  body: {},
6696
6706
  headers: this.monitorJobHeaders(
6697
6707
  `${action}-${monitorKey}`,
6698
- _optionalChain([options, 'optionalAccess', _360 => _360.idempotencyKey])
6708
+ _optionalChain([options, 'optionalAccess', _361 => _361.idempotencyKey])
6699
6709
  ),
6700
6710
  maxRetries: 0,
6701
6711
  exactUrlOnly: true
@@ -6708,7 +6718,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6708
6718
  body: definition,
6709
6719
  headers: this.monitorJobHeaders(
6710
6720
  `sync-${definition.key}`,
6711
- _optionalChain([options, 'optionalAccess', _361 => _361.idempotencyKey])
6721
+ _optionalChain([options, 'optionalAccess', _362 => _362.idempotencyKey])
6712
6722
  ),
6713
6723
  maxRetries: 0,
6714
6724
  exactUrlOnly: true
@@ -6721,7 +6731,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6721
6731
  );
6722
6732
  }
6723
6733
  async getMonitorJobLogs(jobId, options) {
6724
- const query = _optionalChain([options, 'optionalAccess', _362 => _362.limit]) === void 0 ? "" : `?limit=${encodeURIComponent(String(options.limit))}`;
6734
+ const query = _optionalChain([options, 'optionalAccess', _363 => _363.limit]) === void 0 ? "" : `?limit=${encodeURIComponent(String(options.limit))}`;
6725
6735
  return this.http.request(
6726
6736
  `/api/v2/monitors/jobs/${encodeURIComponent(jobId)}/logs${query}`,
6727
6737
  { method: "GET" }
@@ -6734,15 +6744,15 @@ var DeeplineClient = (_class = class _DeeplineClient {
6734
6744
  );
6735
6745
  }
6736
6746
  async waitForMonitorJob(jobId, options) {
6737
- const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _363 => _363.timeoutMs]), () => ( 10 * 6e4)));
6738
- const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _364 => _364.pollIntervalMs]), () => ( 2e3)));
6747
+ const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _364 => _364.timeoutMs]), () => ( 10 * 6e4)));
6748
+ const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _365 => _365.pollIntervalMs]), () => ( 2e3)));
6739
6749
  const terminal = /* @__PURE__ */ new Set(["succeeded", "failed", "cancelled"]);
6740
6750
  const startedAt = Date.now();
6741
6751
  let latest = await this.getMonitorJob(jobId);
6742
6752
  while (true) {
6743
- _optionalChain([options, 'optionalAccess', _365 => _365.onProgress, 'optionalCall', _366 => _366(latest)]);
6753
+ _optionalChain([options, 'optionalAccess', _366 => _366.onProgress, 'optionalCall', _367 => _367(latest)]);
6744
6754
  const job = latest.job;
6745
- const state = typeof _optionalChain([job, 'optionalAccess', _367 => _367.state]) === "string" ? job.state : void 0;
6755
+ const state = typeof _optionalChain([job, 'optionalAccess', _368 => _368.state]) === "string" ? job.state : void 0;
6746
6756
  if (state && terminal.has(state)) return latest;
6747
6757
  if (Date.now() - startedAt >= timeoutMs) return latest;
6748
6758
  await sleep(pollIntervalMs);
@@ -6753,12 +6763,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
6753
6763
  // Monitor Fleets
6754
6764
  // ——————————————————————————————————————————————————————————
6755
6765
  monitorFleetIdempotencyKey(operation) {
6756
- const uuid = _optionalChain([globalThis, 'access', _368 => _368.crypto, 'optionalAccess', _369 => _369.randomUUID, 'optionalCall', _370 => _370()]);
6766
+ const uuid = _optionalChain([globalThis, 'access', _369 => _369.crypto, 'optionalAccess', _370 => _370.randomUUID, 'optionalCall', _371 => _371()]);
6757
6767
  return `monitor-fleet-${operation}-${_nullishCoalesce(uuid, () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`))}`;
6758
6768
  }
6759
6769
  monitorFleetHeaders(operation, idempotencyKey) {
6760
6770
  return {
6761
- "Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _371 => _371.trim, 'call', _372 => _372()]) || this.monitorFleetIdempotencyKey(operation)
6771
+ "Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _372 => _372.trim, 'call', _373 => _373()]) || this.monitorFleetIdempotencyKey(operation)
6762
6772
  };
6763
6773
  }
6764
6774
  monitorFleetPath(fleetId) {
@@ -6778,15 +6788,15 @@ var DeeplineClient = (_class = class _DeeplineClient {
6778
6788
  const fleetId = typeof definitionOrId === "string" ? definitionOrId : definitionOrId.id;
6779
6789
  const body = {
6780
6790
  ...typeof definitionOrId === "string" ? {} : { definition: definitionOrId },
6781
- ..._optionalChain([options, 'optionalAccess', _373 => _373.dryRun]) ? { dry_run: true } : {},
6782
- ..._optionalChain([options, 'optionalAccess', _374 => _374.expectedGeneration]) !== void 0 ? { expected_generation: options.expectedGeneration } : {}
6791
+ ..._optionalChain([options, 'optionalAccess', _374 => _374.dryRun]) ? { dry_run: true } : {},
6792
+ ..._optionalChain([options, 'optionalAccess', _375 => _375.expectedGeneration]) !== void 0 ? { expected_generation: options.expectedGeneration } : {}
6783
6793
  };
6784
6794
  return this.http.request(
6785
6795
  this.monitorFleetPath(fleetId),
6786
6796
  {
6787
6797
  method: "PUT",
6788
6798
  body,
6789
- headers: this.monitorFleetHeaders("sync", _optionalChain([options, 'optionalAccess', _375 => _375.idempotencyKey])),
6799
+ headers: this.monitorFleetHeaders("sync", _optionalChain([options, 'optionalAccess', _376 => _376.idempotencyKey])),
6790
6800
  maxRetries: 0,
6791
6801
  exactUrlOnly: true
6792
6802
  }
@@ -6799,8 +6809,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
6799
6809
  }
6800
6810
  async getMonitorFleet(fleetId, options) {
6801
6811
  const params = new URLSearchParams();
6802
- if (_optionalChain([options, 'optionalAccess', _376 => _376.drift])) params.set("drift", "1");
6803
- if (_optionalChain([options, 'optionalAccess', _377 => _377.limit]) !== void 0)
6812
+ if (_optionalChain([options, 'optionalAccess', _377 => _377.drift])) params.set("drift", "1");
6813
+ if (_optionalChain([options, 'optionalAccess', _378 => _378.limit]) !== void 0)
6804
6814
  params.set("limit", String(options.limit));
6805
6815
  const query = params.toString();
6806
6816
  return this.http.request(
@@ -6813,10 +6823,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
6813
6823
  this.monitorFleetPath(fleetId),
6814
6824
  {
6815
6825
  method: "DELETE",
6816
- body: _optionalChain([options, 'optionalAccess', _378 => _378.dryRun]) ? { dry_run: true } : {},
6826
+ body: _optionalChain([options, 'optionalAccess', _379 => _379.dryRun]) ? { dry_run: true } : {},
6817
6827
  headers: this.monitorFleetHeaders(
6818
6828
  "deactivate",
6819
- _optionalChain([options, 'optionalAccess', _379 => _379.idempotencyKey])
6829
+ _optionalChain([options, 'optionalAccess', _380 => _380.idempotencyKey])
6820
6830
  ),
6821
6831
  maxRetries: 0,
6822
6832
  exactUrlOnly: true
@@ -6831,7 +6841,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6831
6841
  body: {},
6832
6842
  headers: this.monitorFleetHeaders(
6833
6843
  "reactivate",
6834
- _optionalChain([options, 'optionalAccess', _380 => _380.idempotencyKey])
6844
+ _optionalChain([options, 'optionalAccess', _381 => _381.idempotencyKey])
6835
6845
  ),
6836
6846
  maxRetries: 0,
6837
6847
  exactUrlOnly: true
@@ -6848,13 +6858,13 @@ var DeeplineClient = (_class = class _DeeplineClient {
6848
6858
  * identical to "the request failed".
6849
6859
  */
6850
6860
  async waitForMonitorFleetConvergence(fleetId, options) {
6851
- const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _381 => _381.timeoutMs]), () => ( 10 * 6e4)));
6852
- const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _382 => _382.pollIntervalMs]), () => ( 2e3)));
6853
- const terminal = _optionalChain([options, 'optionalAccess', _383 => _383.until]) === "deactivated" ? /* @__PURE__ */ new Set(["deactivated", "degraded"]) : /* @__PURE__ */ new Set(["converged", "degraded", "deactivated"]);
6861
+ const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _382 => _382.timeoutMs]), () => ( 10 * 6e4)));
6862
+ const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _383 => _383.pollIntervalMs]), () => ( 2e3)));
6863
+ const terminal = _optionalChain([options, 'optionalAccess', _384 => _384.until]) === "deactivated" ? /* @__PURE__ */ new Set(["deactivated", "degraded"]) : /* @__PURE__ */ new Set(["converged", "degraded", "deactivated"]);
6854
6864
  const startedAt = Date.now();
6855
6865
  let latest = await this.getMonitorFleet(fleetId);
6856
6866
  while (true) {
6857
- _optionalChain([options, 'optionalAccess', _384 => _384.onProgress, 'optionalCall', _385 => _385(latest)]);
6867
+ _optionalChain([options, 'optionalAccess', _385 => _385.onProgress, 'optionalCall', _386 => _386(latest)]);
6858
6868
  const status = typeof latest.status === "string" ? latest.status : void 0;
6859
6869
  if (status && terminal.has(status)) return latest;
6860
6870
  if (Date.now() - startedAt >= timeoutMs) return latest;