deepline 0.3.461 → 0.3.463

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 (297) hide show
  1. package/dist/bundling-sources/sdk/src/client-core.ts +7593 -0
  2. package/dist/bundling-sources/sdk/src/client.ts +8 -7366
  3. package/dist/bundling-sources/sdk/src/http-core.ts +1239 -0
  4. package/dist/bundling-sources/sdk/src/http.ts +6 -1231
  5. package/dist/bundling-sources/sdk/src/index.ts +4 -1
  6. package/dist/bundling-sources/sdk/src/play.ts +5 -5
  7. package/dist/bundling-sources/sdk/src/plays/client-core.ts +437 -0
  8. package/dist/bundling-sources/sdk/src/plays/client.ts +4 -421
  9. package/dist/bundling-sources/sdk/src/plays/input-example.ts +3 -4
  10. package/dist/bundling-sources/sdk/src/plays/play-description.ts +1 -1
  11. package/dist/bundling-sources/sdk/src/plays/run-request.ts +1 -1
  12. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  13. package/dist/bundling-sources/sdk/src/server.ts +43 -0
  14. package/dist/bundling-sources/sdk/src/types.ts +15 -5
  15. package/dist/bundling-sources/shared_libs/integration-contracts/billing-entitlements.ts +15 -0
  16. package/dist/bundling-sources/shared_libs/monitors/billing/tamradar.ts +17 -17
  17. package/dist/bundling-sources/shared_libs/monitors/callback-security.ts +0 -307
  18. package/dist/bundling-sources/shared_libs/monitors/http-error-response.ts +3 -0
  19. package/dist/bundling-sources/shared_libs/monitors/lifecycle-notifications.ts +3 -2
  20. package/dist/bundling-sources/shared_libs/monitors/package.json +2 -0
  21. package/dist/bundling-sources/shared_libs/monitors/provider-callback-verification.ts +34 -0
  22. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-batch-operation.ts +61 -0
  23. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-upstream-identity.ts +122 -2
  24. package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-dead-letter.ts +11 -1
  25. package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-failure-codes.ts +24 -0
  26. package/dist/bundling-sources/shared_libs/observability/dlq.ts +32 -0
  27. package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +57 -3
  28. package/dist/bundling-sources/shared_libs/observability/scheduled-work.ts +1 -0
  29. package/dist/bundling-sources/shared_libs/play-data-plane/r2.ts +66 -1
  30. package/dist/bundling-sources/shared_libs/play-data-plane/sheet-column-storage.ts +36 -7
  31. package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +250 -11
  32. package/dist/bundling-sources/shared_libs/play-runtime/array-input-store.ts +319 -0
  33. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +991 -359
  34. package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +17 -0
  35. package/dist/bundling-sources/shared_libs/play-runtime/daytona-sandbox-janitor.ts +13 -0
  36. package/dist/bundling-sources/shared_libs/play-runtime/daytona-sandbox-reaper.ts +110 -0
  37. package/dist/bundling-sources/shared_libs/play-runtime/deployment/fly-machines.ts +155 -6
  38. package/dist/bundling-sources/shared_libs/play-runtime/deployment/fly-registry.ts +110 -6
  39. package/dist/bundling-sources/shared_libs/play-runtime/durable-receipt-execution.ts +127 -13
  40. package/dist/bundling-sources/shared_libs/play-runtime/execution-capabilities.ts +14 -1
  41. package/dist/bundling-sources/shared_libs/play-runtime/fixture-behavior.ts +57 -1
  42. package/dist/bundling-sources/shared_libs/play-runtime/free-company-lookup-batching.ts +218 -0
  43. package/dist/bundling-sources/shared_libs/play-runtime/gateway-postgres-admission.ts +42 -5
  44. package/dist/bundling-sources/shared_libs/play-runtime/governor/app-runtime-budget-state-backend.ts +6 -1
  45. package/dist/bundling-sources/shared_libs/play-runtime/governor/app-runtime-rate-state-backend.ts +92 -31
  46. package/dist/bundling-sources/shared_libs/play-runtime/governor/block-reserving-budget-state-backend.ts +69 -14
  47. package/dist/bundling-sources/shared_libs/play-runtime/governor/governor.ts +93 -23
  48. package/dist/bundling-sources/shared_libs/play-runtime/governor/in-memory-rate-state-backend.ts +15 -4
  49. package/dist/bundling-sources/shared_libs/play-runtime/governor/policy.ts +22 -18
  50. package/dist/bundling-sources/shared_libs/play-runtime/governor/rate-state-backend.ts +5 -0
  51. package/dist/bundling-sources/shared_libs/play-runtime/launch-identity.ts +2 -0
  52. package/dist/bundling-sources/shared_libs/play-runtime/map-memory-limits.ts +190 -14
  53. package/dist/bundling-sources/shared_libs/play-runtime/memory-ledger.ts +131 -0
  54. package/dist/bundling-sources/shared_libs/play-runtime/modal-runtime-config.ts +77 -2
  55. package/dist/bundling-sources/shared_libs/play-runtime/output-size-limits.ts +271 -2
  56. package/dist/bundling-sources/shared_libs/play-runtime/play-run-recovery-policy.ts +51 -0
  57. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/sandbox-cleanup/contracts.ts +2 -0
  58. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/sandbox-cleanup/job.ts +27 -1
  59. package/dist/bundling-sources/shared_libs/play-runtime/play-runtime-batching-registry.ts +2 -0
  60. package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +3 -0
  61. package/dist/bundling-sources/shared_libs/play-runtime/provider-text-for-log.ts +63 -0
  62. package/dist/bundling-sources/shared_libs/play-runtime/resource-governor.ts +19 -0
  63. package/dist/bundling-sources/shared_libs/play-runtime/run-ledger-event-transport.ts +112 -16
  64. package/dist/bundling-sources/shared_libs/play-runtime/run-ledger.ts +104 -2
  65. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +265 -151
  66. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-gateway-transport.ts +17 -0
  67. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-progress-push.ts +35 -14
  68. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-sheet-persistence-retry.ts +12 -1
  69. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-control-transport.ts +4 -0
  70. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-labels.ts +36 -0
  71. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-launch-transport.ts +136 -70
  72. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-lifecycle.ts +237 -36
  73. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-runtime-watchdog.ts +148 -4
  74. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-session-execution.ts +6 -0
  75. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona.ts +285 -32
  76. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal.ts +251 -56
  77. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/runtime-sandbox-reconciliation.ts +29 -4
  78. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/sandbox-create-outcome.ts +27 -0
  79. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/types.ts +22 -1
  80. package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +1397 -382
  81. package/dist/bundling-sources/shared_libs/play-runtime/runtime-array-input-receipts.ts +920 -0
  82. package/dist/bundling-sources/shared_libs/play-runtime/runtime-constants.ts +16 -0
  83. package/dist/bundling-sources/shared_libs/play-runtime/runtime-environment.ts +38 -0
  84. package/dist/bundling-sources/shared_libs/play-runtime/runtime-flow.ts +6 -0
  85. package/dist/bundling-sources/shared_libs/play-runtime/runtime-incident-drills.ts +26 -1
  86. package/dist/bundling-sources/shared_libs/play-runtime/runtime-operation-contract.ts +30 -0
  87. package/dist/bundling-sources/shared_libs/play-runtime/runtime-receipt-store-adapter.ts +14 -3
  88. package/dist/bundling-sources/shared_libs/play-runtime/runtime-receipt-writer.ts +31 -4
  89. package/dist/bundling-sources/shared_libs/play-runtime/runtime-sheet-row-transition.ts +47 -0
  90. package/dist/bundling-sources/shared_libs/play-runtime/sandbox-compute-usage.ts +20 -7
  91. package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/contract.ts +12 -0
  92. package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/index.ts +9 -0
  93. package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/runner-backend-adapter.ts +10 -0
  94. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backend.ts +4 -0
  95. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +1496 -320
  96. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-worker-required-env.ts +31 -1
  97. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +1389 -129
  98. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/receipt-gateway.ts +36 -0
  99. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-dispatch-authority.ts +4 -0
  100. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-outbox-recovery.ts +162 -23
  101. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-event-search.ts +499 -115
  102. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-capacity.ts +377 -9
  103. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-ledger-reconciliation.ts +117 -8
  104. package/dist/bundling-sources/shared_libs/play-runtime/secret-resolution-retry-policy.ts +25 -0
  105. package/dist/bundling-sources/shared_libs/play-runtime/terminal-runtime-performance.ts +391 -0
  106. package/dist/bundling-sources/shared_libs/play-runtime/test-runtime-seams.ts +40 -0
  107. package/dist/bundling-sources/shared_libs/play-runtime/tool-call/index.ts +6 -0
  108. package/dist/bundling-sources/shared_libs/play-runtime/tool-call/mapped-calls.ts +171 -0
  109. package/dist/bundling-sources/shared_libs/play-runtime/tool-call/receipt-cohort.ts +16 -1
  110. package/dist/bundling-sources/shared_libs/play-runtime/tool-execute-retry-policy.ts +38 -12
  111. package/dist/bundling-sources/shared_libs/play-runtime/tool-result.ts +33 -9
  112. package/dist/bundling-sources/shared_libs/play-runtime/transport-error-diagnostics.ts +28 -0
  113. package/dist/bundling-sources/shared_libs/play-runtime/work-receipt-storage-contract.ts +55 -5
  114. package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +41 -1
  115. package/dist/bundling-sources/shared_libs/plays/contracts.ts +4 -0
  116. package/dist/bundling-sources/shared_libs/plays/dataset.ts +9 -3
  117. package/dist/bundling-sources/shared_libs/plays/deploy/manifest-contract.ts +2 -0
  118. package/dist/bundling-sources/shared_libs/plays/deploy/manifest.ts +3 -2
  119. package/dist/bundling-sources/shared_libs/plays/deploy/project-serializer.ts +2 -2
  120. package/dist/bundling-sources/shared_libs/plays/run-output-summary.ts +66 -0
  121. package/dist/bundling-sources/shared_libs/plays/script-entry.ts +1 -1
  122. package/dist/bundling-sources/shared_libs/product-notifications/catalog.ts +43 -1
  123. package/dist/bundling-sources/shared_libs/product-notifications/content.ts +9 -0
  124. package/dist/bundling-sources/shared_libs/product-notifications/email.ts +91 -13
  125. package/dist/bundling-sources/shared_libs/product-notifications/events.ts +3 -0
  126. package/dist/bundling-sources/shared_libs/product-notifications/slack-delivery.ts +41 -24
  127. package/dist/bundling-sources/shared_libs/security/attested-client-ip.ts +91 -0
  128. package/dist/bundling-sources/shared_libs/security/internal-actor.ts +0 -11
  129. package/dist/cli/{auth-6HJXNWUG.mjs → auth-LZLBR4C3.mjs} +5 -4
  130. package/dist/cli/auth-XPGKBJKB.js +41 -0
  131. package/dist/cli/{billing-6P5HO6QG.js → billing-6TJPNJQD.js} +152 -78
  132. package/dist/cli/{billing-MJ42N7YF.mjs → billing-OTOP5RE4.mjs} +84 -10
  133. package/dist/cli/{chunk-FCAZQ7WV.js → chunk-2NISBXMN.js} +52 -50
  134. package/dist/cli/{chunk-PNATXKLP.js → chunk-2ZIRCBYG.js} +6 -6
  135. package/dist/cli/{chunk-5FDKJQZE.js → chunk-3BOIOCNX.js} +1 -1
  136. package/dist/cli/chunk-3BVLLJ3H.mjs +1038 -0
  137. package/dist/cli/{chunk-FJZILBL7.mjs → chunk-3U5EAP6E.mjs} +5 -5
  138. package/dist/cli/{describe-FRAVCY5F.mjs → chunk-4YZKBBLZ.mjs} +19 -36
  139. package/dist/cli/{chunk-QWRHGGUH.js → chunk-5DRNNC72.js} +20 -2
  140. package/dist/cli/{chunk-Z2GUFYT6.js → chunk-5LEAXRHV.js} +11 -11
  141. package/dist/cli/{chunk-5MDIZX7M.js → chunk-5LHXOIPT.js} +8 -6
  142. package/dist/cli/{chunk-NMJ4D2WO.js → chunk-6PMCRYDA.js} +216 -91
  143. package/dist/cli/{chunk-EBU7LQ64.js → chunk-6V7KVRR5.js} +3 -3
  144. package/dist/cli/{chunk-MGXEUZHL.mjs → chunk-7D6X7IXW.mjs} +7 -5
  145. package/dist/cli/{chunk-SAZFZQRI.js → chunk-7FCYPAPP.js} +2 -2
  146. package/dist/cli/{chunk-ACCR7POB.js → chunk-7XYDDCQ2.js} +27 -27
  147. package/dist/cli/{chunk-5IYOUBFZ.js → chunk-ALZBANZI.js} +28 -54
  148. package/dist/cli/{chunk-3DNKFH2G.mjs → chunk-BAPTQDLF.mjs} +19 -1
  149. package/dist/cli/chunk-BGNWI3KH.js +827 -0
  150. package/dist/cli/{chunk-V7REJRDZ.mjs → chunk-C25QE4CH.mjs} +1 -1
  151. package/dist/cli/{chunk-FGMX4HUZ.js → chunk-CBZP6J3V.js} +29 -27
  152. package/dist/cli/{chunk-QEYHTIV4.mjs → chunk-CTQ56DXP.mjs} +10 -1
  153. package/dist/cli/{chunk-IHHLTHE7.mjs → chunk-CVQ7N5CV.mjs} +267 -38
  154. package/dist/cli/{chunk-7DH2FD7Y.mjs → chunk-D464JW3N.mjs} +5 -85
  155. package/dist/cli/{chunk-MEAIOXJL.mjs → chunk-DHXCBITQ.mjs} +7 -5
  156. package/dist/cli/chunk-F2RHUPVH.mjs +827 -0
  157. package/dist/cli/chunk-F6QV42MC.mjs +91 -0
  158. package/dist/cli/{chunk-OZBWRICM.js → chunk-FK2HNDCN.js} +2 -2
  159. package/dist/cli/{chunk-BGY2PLP7.mjs → chunk-GUT7CLOL.mjs} +23 -49
  160. package/dist/cli/{chunk-RY4IVOU3.mjs → chunk-I624J4H5.mjs} +16 -806
  161. package/dist/cli/{chunk-Z2XUZC34.js → chunk-IAYSWZDJ.js} +188 -76
  162. package/dist/cli/{chunk-FGLKOWSC.mjs → chunk-IKWRUNAP.mjs} +1 -1
  163. package/dist/cli/{chunk-KCCOQ5G5.js → chunk-JVDKZJUH.js} +511 -282
  164. package/dist/cli/{chunk-HDFRJ4IT.mjs → chunk-JVHOS3K3.mjs} +177 -65
  165. package/dist/cli/chunk-LYFKBLJI.mjs +1039 -0
  166. package/dist/cli/{chunk-SLEUWLJE.mjs → chunk-MSY22NQW.mjs} +5 -5
  167. package/dist/cli/{chunk-5FY72YOV.js → chunk-NAPTMYTY.js} +8 -8
  168. package/dist/cli/{chunk-O6QOMHCH.js → chunk-NDHJR2WZ.js} +37 -35
  169. package/dist/cli/{chunk-KXMNM4AQ.js → chunk-NMU3VR5U.js} +4 -5
  170. package/dist/cli/chunk-NTLI6P6Y.mjs +19 -0
  171. package/dist/cli/{chunk-RFONC4WJ.mjs → chunk-O3BJYD6D.mjs} +3 -3
  172. package/dist/cli/{describe-2WQY7ZCY.js → chunk-PVY4DPPF.js} +27 -44
  173. package/dist/cli/{chunk-WIYWSYDS.mjs → chunk-Q2EIZKVX.mjs} +3 -3
  174. package/dist/cli/{chunk-VZBCEA5S.mjs → chunk-RD6IQ2JY.mjs} +223 -92
  175. package/dist/cli/chunk-RGOUCIIZ.js +1039 -0
  176. package/dist/cli/{chunk-EIMG75BT.mjs → chunk-S3A4IXBQ.mjs} +4 -5
  177. package/dist/cli/{chunk-QIW7TVV6.mjs → chunk-S4XQCFES.mjs} +14 -12
  178. package/dist/cli/chunk-SKU6ECIY.js +19 -0
  179. package/dist/cli/{chunk-CRYOUPEB.js → chunk-TIRBDQ3W.js} +16 -16
  180. package/dist/cli/{chunk-G7L27KZB.mjs → chunk-TKAQR3IB.mjs} +31 -21
  181. package/dist/cli/{chunk-MDJPEGVN.js → chunk-UC4SFYNU.js} +392 -261
  182. package/dist/cli/{chunk-3BMLICF7.mjs → chunk-UIURR26V.mjs} +13 -8
  183. package/dist/cli/{chunk-TNMBPMMC.js → chunk-UROQDCVW.js} +13 -4
  184. package/dist/cli/{chunk-R64BGGRQ.mjs → chunk-VDGTTH7K.mjs} +2 -2
  185. package/dist/cli/chunk-VLEVVDWG.js +91 -0
  186. package/dist/cli/{chunk-R2GLGLDR.mjs → chunk-VPHN2HAL.mjs} +216 -91
  187. package/dist/cli/chunk-VY2GBNTX.js +1038 -0
  188. package/dist/cli/{chunk-CFUTOWE4.js → chunk-WG3KGAII.js} +8 -88
  189. package/dist/cli/{chunk-QAJAJPKK.mjs → chunk-WUMIYOXQ.mjs} +4 -2
  190. package/dist/cli/{chunk-SCIR5JXW.js → chunk-WUZS2HK6.js} +56 -51
  191. package/dist/cli/{chunk-T3MVIPHG.mjs → chunk-XDWS2JJT.mjs} +1 -1
  192. package/dist/cli/{chunk-KGQNIA37.js → chunk-XQCTG5OO.js} +44 -34
  193. package/dist/cli/{chunk-KVJ5VHW5.mjs → chunk-XW2JIYG7.mjs} +2 -2
  194. package/dist/cli/chunk-YGGIZ3VT.js +920 -0
  195. package/dist/cli/command-docs.d.mts +5 -0
  196. package/dist/cli/command-docs.d.ts +5 -0
  197. package/dist/cli/command-docs.js +2 -2
  198. package/dist/cli/command-docs.mjs +1 -1
  199. package/dist/cli/{csv-NX7NO3O6.js → csv-EH5QWR4O.js} +13 -12
  200. package/dist/cli/{csv-DQ6GW5B5.mjs → csv-OK45Z5XQ.mjs} +4 -3
  201. package/dist/cli/{db-R72DFMP6.js → db-3ESJKETS.js} +30 -27
  202. package/dist/cli/{db-2YP33M4K.mjs → db-6Z5E4HKN.mjs} +10 -7
  203. package/dist/cli/describe-PNDQB7YS.mjs +48 -0
  204. package/dist/cli/describe-QUF7VTTR.js +48 -0
  205. package/dist/cli/describe-core.d.mts +153 -5
  206. package/dist/cli/describe-core.d.ts +153 -5
  207. package/dist/cli/describe-core.js +9 -5
  208. package/dist/cli/describe-core.mjs +10 -6
  209. package/dist/cli/{executions-WFBU7L2Q.mjs → executions-2NTWQFEG.mjs} +7 -5
  210. package/dist/cli/{executions-ZLHD4QIT.js → executions-KUOBRX5V.js} +9 -7
  211. package/dist/cli/{feedback-CN3HJFVF.mjs → feedback-7RPRMSGY.mjs} +6 -5
  212. package/dist/cli/{feedback-NDV6TPHG.js → feedback-UPHAZJ4C.js} +10 -9
  213. package/dist/cli/getting-started.d.mts +6 -6
  214. package/dist/cli/getting-started.d.ts +6 -6
  215. package/dist/cli/getting-started.js +2 -2
  216. package/dist/cli/getting-started.mjs +1 -1
  217. package/dist/cli/{git-QAD6E3HW.mjs → git-SCYP6WSZ.mjs} +5 -4
  218. package/dist/cli/git-UH653WHV.js +25 -0
  219. package/dist/cli/index.js +152 -142
  220. package/dist/cli/index.mjs +56 -46
  221. package/dist/cli/{legacy-noops-KVC5QJ74.js → legacy-noops-7XMFCVRG.js} +8 -7
  222. package/dist/cli/{legacy-noops-TPTKNBI2.mjs → legacy-noops-A4KYAGI6.mjs} +5 -4
  223. package/dist/cli/{monitors-SV57JFLO.mjs → monitors-FLC5J7RI.mjs} +19 -6
  224. package/dist/cli/{monitors-KCROV6PJ.js → monitors-NZV6IX5H.js} +103 -90
  225. package/dist/cli/{org-NJYX5743.js → org-IZ7UP3XF.js} +70 -67
  226. package/dist/cli/{org-KX6QIR7A.mjs → org-LUETJ7Z5.mjs} +9 -6
  227. package/dist/cli/pages-22ML3O7O.js +252 -0
  228. package/dist/cli/pages-EUX5EAGF.mjs +252 -0
  229. package/dist/cli/{play-IQQ57L7Z.mjs → play-CDHPAKKM.mjs} +512 -1508
  230. package/dist/cli/{play-32L7EQN4.js → play-USJBQADG.js} +1090 -2086
  231. package/dist/cli/{providers-4WEC2EQN.mjs → providers-CCXZ3SQF.mjs} +7 -5
  232. package/dist/cli/{providers-ZQV6QLVQ.js → providers-WFEUNPGC.js} +10 -8
  233. package/dist/cli/{quickstart-HKUSFADF.js → quickstart-O4JSUORZ.js} +13 -12
  234. package/dist/cli/{quickstart-RQ76RIUE.mjs → quickstart-ZUULI635.mjs} +5 -4
  235. package/dist/cli/run-ISDJYJMU.js +443 -0
  236. package/dist/cli/run-QJ4NX5F5.mjs +443 -0
  237. package/dist/cli/{search-ZRAVFBZC.mjs → search-IX3XKZJ3.mjs} +8 -6
  238. package/dist/cli/search-TIFNLRPM.js +32 -0
  239. package/dist/cli/{secrets-CMJOVNVH.mjs → secrets-7VUDXTUZ.mjs} +7 -5
  240. package/dist/cli/{secrets-J3G5Y43U.js → secrets-ELQSNCTR.js} +16 -14
  241. package/dist/cli/{sessions-WY7VN4AE.js → sessions-A3FG3AZX.js} +6 -5
  242. package/dist/cli/{sessions-MDQYY5CB.mjs → sessions-VOIQ62GB.mjs} +5 -4
  243. package/dist/cli/{settings-4RWZPCT5.mjs → settings-S6N6EFBG.mjs} +14 -11
  244. package/dist/cli/{settings-HTNTFKCE.js → settings-ZTXQEMZI.js} +80 -77
  245. package/dist/cli/{setup-P3GYYZWG.mjs → setup-AYPIK4JE.mjs} +12 -10
  246. package/dist/cli/{setup-QGCAP62X.js → setup-Y3WOIFLS.js} +53 -51
  247. package/dist/cli/{skills-7NAE4ICL.mjs → skills-5SF5QWNI.mjs} +7 -6
  248. package/dist/cli/skills-MWFRMG3H.js +31 -0
  249. package/dist/cli/tools-3XNZ4J64.mjs +55 -0
  250. package/dist/cli/tools-XEC4OD3R.js +55 -0
  251. package/dist/cli/{update-GODLRKNB.mjs → update-3U4OVX5R.mjs} +9 -8
  252. package/dist/cli/update-DWYEYTZE.js +33 -0
  253. package/dist/cli/{workflow-4BXOUVEO.mjs → workflow-2M5JP7SA.mjs} +10 -8
  254. package/dist/cli/{workflow-AO3A6LXN.js → workflow-RM7H7555.js} +20 -18
  255. package/dist/client-DS2IWYZF.d.ts +10 -0
  256. package/dist/client-DTwnz_AW.d.mts +10 -0
  257. package/dist/{client-CYqG23K1.d.ts → client-core-B_6HAIBy.d.ts} +385 -12
  258. package/dist/{client-BbU5_j7n.d.mts → client-core-DzBSlY1U.d.mts} +385 -12
  259. package/dist/{compiler-manifest-CWz_sNOQ.d.ts → compiler-manifest-Dcyd3-Zd.d.mts} +43 -1
  260. package/dist/{compiler-manifest-CWz_sNOQ.d.mts → compiler-manifest-Dcyd3-Zd.d.ts} +43 -1
  261. package/dist/errors-d-sTrZhe.d.mts +142 -0
  262. package/dist/errors-yQwfgrcX.d.ts +142 -0
  263. package/dist/{index-BF2JB_Ug.d.mts → index-C6oXchjN.d.mts} +1 -1
  264. package/dist/{index-4NPXDzlD.d.ts → index-P56zy_z5.d.ts} +1 -1
  265. package/dist/index.d.mts +11 -147
  266. package/dist/index.d.ts +11 -147
  267. package/dist/index.js +16 -12
  268. package/dist/index.mjs +15 -11
  269. package/dist/install-integrity.json +141 -104
  270. package/dist/plays/bundle-play-file.d.mts +3 -3
  271. package/dist/plays/bundle-play-file.d.ts +3 -3
  272. package/dist/plays/bundle-play-file.mjs +2 -1
  273. package/dist/plays/play-description.d.mts +2 -2
  274. package/dist/plays/play-description.d.ts +2 -2
  275. package/dist/plays/play-description.js +2 -2
  276. package/dist/plays/play-description.mjs +1 -1
  277. package/dist/plays/run-request.d.mts +2 -2
  278. package/dist/plays/run-request.d.ts +2 -2
  279. package/dist/release.d.mts +1 -1
  280. package/dist/release.d.ts +1 -1
  281. package/dist/release.js +2 -2
  282. package/dist/release.mjs +1 -1
  283. package/dist/server.d.mts +17 -0
  284. package/dist/server.d.ts +17 -0
  285. package/dist/server.js +76 -0
  286. package/dist/server.mjs +76 -0
  287. package/package.json +6 -1
  288. package/dist/cli/auth-IACERYQH.js +0 -40
  289. package/dist/cli/chunk-PQUUWFXY.js +0 -95
  290. package/dist/cli/chunk-YBWAG72P.mjs +0 -95
  291. package/dist/cli/chunk-YQDUODZW.js +0 -1710
  292. package/dist/cli/git-JVI36ZFV.js +0 -24
  293. package/dist/cli/search-75X5LTDE.js +0 -30
  294. package/dist/cli/skills-BKJ53JOQ.js +0 -30
  295. package/dist/cli/tools-COWMIEJ6.mjs +0 -45
  296. package/dist/cli/tools-TASOCE7I.js +0 -45
  297. package/dist/cli/update-SJIKVME6.js +0 -32
@@ -19,16 +19,14 @@ var _chunkJKVRBCZLjs = require('./chunk-JKVRBCZL.js');
19
19
 
20
20
 
21
21
 
22
- var _chunkKXMNM4AQjs = require('./chunk-KXMNM4AQ.js');
22
+ var _chunkNMU3VR5Ujs = require('./chunk-NMU3VR5U.js');
23
23
 
24
24
 
25
25
 
26
26
 
27
27
 
28
28
 
29
-
30
-
31
- var _chunkYQDUODZWjs = require('./chunk-YQDUODZW.js');
29
+ var _chunkYGGIZ3VTjs = require('./chunk-YGGIZ3VT.js');
32
30
 
33
31
 
34
32
  var _chunkALJJRZNJjs = require('./chunk-ALJJRZNJ.js');
@@ -649,7 +647,7 @@ var ToolCalls = class {
649
647
  idempotencyKey,
650
648
  onResponse: (response2) => {
651
649
  lastResponse = null;
652
- atomicToolsSupported = response2.headers.get(_chunkYQDUODZWjs.ATOMIC_TOOL_EXECUTE_SUPPORTED_HEADER) === "true";
650
+ atomicToolsSupported = response2.headers.get(_chunkYGGIZ3VTjs.ATOMIC_TOOL_EXECUTE_SUPPORTED_HEADER) === "true";
653
651
  recoverySupported = response2.headers.get("X-Deepline-Idempotency-Supported") === "true";
654
652
  if (_optionalChain([options, 'optionalAccess', _30 => _30.onServerTiming])) {
655
653
  try {
@@ -881,11 +879,27 @@ function normalizePlayRuntimeSelection(value) {
881
879
  ...sandboxPlacementPolicy ? { sandboxPlacementPolicy } : {}
882
880
  };
883
881
  }
882
+ function normalizePlayRunRuntimeSelection(value) {
883
+ if (!value || typeof value !== "object" || Array.isArray(value)) return null;
884
+ const record = value;
885
+ if (record.environment !== "native") {
886
+ return normalizePlayRuntimeSelection(value);
887
+ }
888
+ if (Object.keys(record).some(
889
+ (key) => key !== "environment" && key !== "sandboxPlacementPolicy"
890
+ )) {
891
+ return null;
892
+ }
893
+ const sandboxPlacementPolicy = normalizePlayRuntimeSandboxPlacementPolicy(
894
+ record.sandboxPlacementPolicy
895
+ );
896
+ return sandboxPlacementPolicy ? { environment: "native", sandboxPlacementPolicy } : null;
897
+ }
884
898
  function normalizePlayRuntimeEnvironment(value) {
885
899
  return typeof value === "string" && PLAY_RUNTIME_ENVIRONMENTS.includes(value) ? value : null;
886
900
  }
887
901
 
888
- // src/plays/client.ts
902
+ // src/plays/client-core.ts
889
903
  function normalizePlayRunIntegrationMode(value) {
890
904
  if (value === "live" || value === "eval_stub" || value === "fixture") {
891
905
  return value;
@@ -899,10 +913,10 @@ function resolvePlayRunIntegrationMode(request, env) {
899
913
  }
900
914
  function resolvePlayRunRuntimeSelection(request, env) {
901
915
  if (request.runtime !== void 0) {
902
- const runtime = normalizePlayRuntimeSelection(request.runtime);
916
+ const runtime = normalizePlayRunRuntimeSelection(request.runtime);
903
917
  if (!runtime) {
904
918
  throw new (0, _chunkDIAWYWT5js.DeeplineError)(
905
- 'runtime must be { environment: "preview", namespace, backend?: "daytona" | "modal", sandboxPlacementPolicy?: "policy_name@1" } with namespace matching ^[a-z][a-z0-9-]{0,30}$.',
919
+ 'runtime must be { environment: "preview", namespace, backend?: "daytona" | "modal", sandboxPlacementPolicy?: "policy_name@1" } with namespace matching ^[a-z][a-z0-9-]{0,30}$, or { environment: "native", sandboxPlacementPolicy: "policy_name@1" }.',
906
920
  void 0,
907
921
  "INVALID_RUNTIME_SELECTION"
908
922
  );
@@ -935,10 +949,23 @@ function resolvePlayRunRuntimeSelection(request, env) {
935
949
  }
936
950
  return void 0;
937
951
  }
952
+ if (configured === "native") {
953
+ const sandboxPlacementPolicy = normalizePlayRuntimeSandboxPlacementPolicy(
954
+ configuredPlacementPolicy
955
+ );
956
+ if (configuredNamespace || !sandboxPlacementPolicy) {
957
+ throw new (0, _chunkDIAWYWT5js.DeeplineError)(
958
+ "DEEPLINE_RUNTIME_ENVIRONMENT=native requires DEEPLINE_RUNTIME_SANDBOX_PLACEMENT_POLICY (such as modal_only@1) and no DEEPLINE_RUNTIME_NAMESPACE.",
959
+ void 0,
960
+ "INVALID_RUNTIME_ENVIRONMENT"
961
+ );
962
+ }
963
+ return { environment: "native", sandboxPlacementPolicy };
964
+ }
938
965
  const environment = normalizePlayRuntimeEnvironment(configured);
939
966
  if (!environment) {
940
967
  throw new (0, _chunkDIAWYWT5js.DeeplineError)(
941
- `DEEPLINE_RUNTIME_ENVIRONMENT supports only explicit preview selection. Received "${configured}". Omit it to use the app-native runtime.`,
968
+ `DEEPLINE_RUNTIME_ENVIRONMENT must be preview or native. Received "${configured}". Omit it to use the app-native runtime.`,
942
969
  void 0,
943
970
  "INVALID_RUNTIME_ENVIRONMENT"
944
971
  );
@@ -988,7 +1015,7 @@ function resolveStartPlayRunRequest(request, env) {
988
1015
  return { request: resolved, runtime };
989
1016
  }
990
1017
  function runtimeSelectionHeaders(runtime, env) {
991
- if (!runtime) return void 0;
1018
+ if (!runtime || runtime.environment === "native") return void 0;
992
1019
  const token = _optionalChain([env, 'access', _49 => _49.DEEPLINE_RUNTIME_ENVIRONMENT_TOKEN, 'optionalAccess', _50 => _50.trim, 'call', _51 => _51()]);
993
1020
  if (!token) {
994
1021
  throw new (0, _chunkDIAWYWT5js.DeeplineError)(
@@ -999,8 +1026,8 @@ function runtimeSelectionHeaders(runtime, env) {
999
1026
  }
1000
1027
  const receivers = _optionalChain([env, 'access', _52 => _52.DEEPLINE_RUNTIME_RETAINED_PIPELINE_RECEIVERS, 'optionalAccess', _53 => _53.trim, 'call', _54 => _54()]);
1001
1028
  return {
1002
- [_chunkYQDUODZWjs.RUNTIME_ENVIRONMENT_TOKEN_HEADER]: token,
1003
- ...receivers ? { [_chunkYQDUODZWjs.RETAINED_PIPELINE_RECEIVERS_HEADER]: receivers } : {}
1029
+ [_chunkYGGIZ3VTjs.RUNTIME_ENVIRONMENT_TOKEN_HEADER]: token,
1030
+ ...receivers ? { [_chunkYGGIZ3VTjs.RETAINED_PIPELINE_RECEIVERS_HEADER]: receivers } : {}
1004
1031
  };
1005
1032
  }
1006
1033
  function normalizeTestPolicyOverrides(value, source) {
@@ -1071,7 +1098,7 @@ var PlayClient = class {
1071
1098
  return _chunkJKVRBCZLjs.startPlayRun.call(void 0,
1072
1099
  this.http,
1073
1100
  resolved.request,
1074
- _optionalChain([options, 'optionalAccess', _62 => _62.cliAdmission]) ? { ...headers, "X-Deepline-API-Major": String(_chunkYQDUODZWjs.SDK_API_MAJOR) } : headers,
1101
+ _optionalChain([options, 'optionalAccess', _62 => _62.cliAdmission]) ? { ...headers, "X-Deepline-API-Major": String(_chunkYGGIZ3VTjs.SDK_API_MAJOR) } : headers,
1075
1102
  options
1076
1103
  );
1077
1104
  }
@@ -1136,13 +1163,6 @@ var PlayClient = class {
1136
1163
  );
1137
1164
  }
1138
1165
  };
1139
- function createPlayClient(options) {
1140
- const config = _chunkYQDUODZWjs.resolveConfig.call(void 0, options);
1141
- return new PlayClient(
1142
- new (0, _chunkYQDUODZWjs.HttpClient)(config),
1143
- _nullishCoalesce(config.environment, () => ( process.env))
1144
- );
1145
- }
1146
1166
 
1147
1167
  // ../product-notifications/contract.ts
1148
1168
  var PRODUCT_NOTIFICATION_EVENT_CATALOG = [
@@ -2447,10 +2467,12 @@ var RUNTIME_RECEIPT_OUTPUT_MAX_BYTES = 10 * 1024 * 1024;
2447
2467
  var RUNTIME_RECEIPT_COMPLETION_BUFFER_MAX_BYTES = 32 * 1024 * 1024;
2448
2468
  var RUNTIME_RECEIPT_CONTROL_BUFFER_MAX_BYTES = 2 * 1024 * 1024;
2449
2469
  var RUNNER_TERMINAL_PUSH_MAX_BODY_BYTES = 16 * 1024 * 1024;
2470
+ var RUNTIME_SHEET_START_TARGET_BODY_BYTES = 12 * 1024 * 1024;
2450
2471
  var RUNTIME_RECEIPT_GATEWAY_BATCH_MAX_BYTES = 12 * 1024 * 1024;
2451
2472
  var RUNTIME_RECEIPT_WRITER_TARGET_BATCH_BYTES = 8 * 1024 * 1024;
2452
2473
  var RUNNER_POST_TERMINAL_DIAGNOSTIC_MAX_BYTES = 64 * 1024;
2453
2474
  var JSON_SIZE_LIMIT_REACHED = Symbol("JSON_SIZE_LIMIT_REACHED");
2475
+ var OMIT_JSON_OUTPUT_VALUE = Symbol("OMIT_JSON_OUTPUT_VALUE");
2454
2476
 
2455
2477
  // ../play-runtime/docflow-node-io.ts
2456
2478
  var utf8Encoder = new TextEncoder();
@@ -3068,7 +3090,7 @@ async function* watchRunEvents(options) {
3068
3090
  }
3069
3091
  }
3070
3092
 
3071
- // src/client.ts
3093
+ // src/client-core.ts
3072
3094
  function invalidToolDiscoveryResponse() {
3073
3095
  return new (0, _chunkDIAWYWT5js.DeeplineError)(
3074
3096
  "The server returned an invalid tool discovery response.",
@@ -3153,7 +3175,7 @@ function isolatedCiRuntimeEventReadHeaders(env) {
3153
3175
  "RUNTIME_EVENT_INTERNAL_TOKEN_REQUIRED"
3154
3176
  );
3155
3177
  }
3156
- return { [_chunkYQDUODZWjs.COORDINATOR_INTERNAL_TOKEN_HEADER]: token };
3178
+ return { [_chunkYGGIZ3VTjs.COORDINATOR_INTERNAL_TOKEN_HEADER]: token };
3157
3179
  }
3158
3180
  function sleep(ms) {
3159
3181
  return new Promise((resolve) => setTimeout(resolve, ms));
@@ -3390,48 +3412,48 @@ var DeeplineClient = (_class = class _DeeplineClient {
3390
3412
  * @param options - Optional overrides for API key, base URL, timeout, and retries.
3391
3413
  * @throws {@link ConfigError} if no API key can be resolved from any source.
3392
3414
  */
3393
- constructor(options) {
3394
- this.config = _chunkYQDUODZWjs.resolveConfig.call(void 0, options);
3415
+ constructor(config, http, explicitTimeout) {
3416
+ this.config = config;
3395
3417
  this.environment = _nullishCoalesce(this.config.environment, () => ( process.env));
3396
- this.http = new (0, _chunkYQDUODZWjs.HttpClient)(this.config);
3418
+ this.http = http;
3397
3419
  this.playClient = new PlayClient(this.http, this.environment);
3398
3420
  this.toolCalls = new ToolCalls(
3399
3421
  this.http,
3400
3422
  this.config.timeout,
3401
- _optionalChain([options, 'optionalAccess', _151 => _151.timeout])
3423
+ explicitTimeout
3402
3424
  );
3403
3425
  this.runs = {
3404
- getReceipts: (runId, options2) => this.getRunReceipts(runId, options2),
3405
- get: (runId, options2) => this.getRunStatus(runId, options2),
3406
- children: (parentRunId, options2) => this.getRunChildren(parentRunId, options2),
3426
+ getReceipts: (runId, options) => this.getRunReceipts(runId, options),
3427
+ get: (runId, options) => this.getRunStatus(runId, options),
3428
+ children: (parentRunId, options) => this.getRunChildren(parentRunId, options),
3407
3429
  status: (runId) => this.getRunLifecycleStatus(runId),
3408
- list: (options2) => this.listRuns(options2),
3409
- listPage: (options2) => this.listRunsPage(options2),
3410
- history: (options2) => this.getRunsHistory(options2),
3411
- watch: (runId, options2) => this.watchRunToTerminal(runId, options2),
3412
- tail: (runId, options2) => this.tailRun(runId, options2),
3430
+ list: (options) => this.listRuns(options),
3431
+ listPage: (options) => this.listRunsPage(options),
3432
+ history: (options) => this.getRunsHistory(options),
3433
+ watch: (runId, options) => this.watchRunToTerminal(runId, options),
3434
+ tail: (runId, options) => this.tailRun(runId, options),
3413
3435
  logs: Object.assign(
3414
- (runId, options2) => this.getRunLogs(runId, options2),
3436
+ (runId, options) => this.getRunLogs(runId, options),
3415
3437
  {
3416
- query: (runId, options2) => this.queryRunLogs(runId, options2),
3438
+ query: (runId, options) => this.queryRunLogs(runId, options),
3417
3439
  count: (runId, criteria) => this.countRunLogs(runId, criteria),
3418
- summarize: (runId, options2) => this.summarizeRunLogs(runId, options2),
3419
- fields: (options2) => this.getRunEventFields("logs", options2)
3440
+ summarize: (runId, options) => this.summarizeRunLogs(runId, options),
3441
+ fields: (options) => this.getRunEventFields("logs", options)
3420
3442
  }
3421
3443
  ),
3422
3444
  events: {
3423
- list: (options2) => this.listRunEvents(options2),
3445
+ list: (options) => this.listRunEvents(options),
3424
3446
  count: (criteria) => this.countRunEvents(criteria),
3425
- summarize: (options2) => this.summarizeRunEvents(options2),
3426
- fields: (options2) => this.getRunEventFields("events", options2)
3447
+ summarize: (options) => this.summarizeRunEvents(options),
3448
+ fields: (options) => this.getRunEventFields("events", options)
3427
3449
  },
3428
- searchEvents: (options2) => this.searchRunEvents(options2),
3450
+ searchEvents: (options) => this.searchRunEvents(options),
3429
3451
  input: (runId) => this.getRunInput(runId),
3430
- rerun: (runId, options2) => this.rerun(runId, options2),
3452
+ rerun: (runId, options) => this.rerun(runId, options),
3431
3453
  exportDatasetRows: (input) => this.getPlaySheetRows(input),
3432
3454
  rowHistory: (input) => this.getPlayRunRowHistory(input),
3433
- stop: (runId, options2) => this.stopRun(runId, options2),
3434
- stopAll: ((options2) => this.stopAllRuns(options2))
3455
+ stop: (runId, options) => this.stopRun(runId, options),
3456
+ stopAll: ((options) => this.stopAllRuns(options))
3435
3457
  };
3436
3458
  this.db = {
3437
3459
  query: (input) => this.queryDb(input),
@@ -3440,98 +3462,99 @@ var DeeplineClient = (_class = class _DeeplineClient {
3440
3462
  this.billing = {
3441
3463
  quote: (input) => this.http.post("/api/v2/billing/quote", input),
3442
3464
  entitlements: () => this.http.get("/api/v2/billing/entitlements"),
3443
- topUp: (options2) => this.topUpBillingBalance(options2),
3444
- topUpWithReceipt: (options2) => this.topUpBillingBalanceWithReceipt(options2),
3465
+ topUp: (options) => this.topUpBillingBalance(options),
3466
+ topUpWithReceipt: (options) => this.topUpBillingBalanceWithReceipt(options),
3445
3467
  plans: () => this.getBillingPlans(),
3446
3468
  subscription: {
3447
3469
  status: () => this.getBillingSubscriptionStatus(),
3448
- cancel: (options2) => this.cancelBillingSubscription(options2)
3470
+ cancel: (options) => this.cancelBillingSubscription(options)
3449
3471
  },
3450
3472
  invoices: {
3451
- list: (options2) => this.listBillingInvoices(options2)
3473
+ list: (options) => this.listBillingInvoices(options)
3452
3474
  },
3453
3475
  usageEvent: (requestId) => this.getBillingUsageEvent(requestId),
3454
- usage: (options2) => this.getBillingUsage(options2),
3476
+ usageEvents: (options) => this.getBillingUsageEvents(options),
3477
+ usage: (options) => this.getBillingUsage(options),
3455
3478
  targetPlans: () => this.getTargetBillingPlans(),
3456
3479
  targetStatus: () => this.getTargetBillingStatus(),
3457
3480
  autoRecharge: {
3458
3481
  get: () => this.getTargetAutoRecharge(),
3459
- trigger: (options2) => this.http.post(
3482
+ trigger: (options) => this.http.post(
3460
3483
  "/api/v2/billing/auto-recharge/trigger",
3461
3484
  {},
3462
3485
  {
3463
3486
  "Idempotency-Key": requireBillingIdempotencyKey(
3464
- _nullishCoalesce(_optionalChain([options2, 'optionalAccess', _152 => _152.idempotencyKey]), () => ( globalThis.crypto.randomUUID()))
3487
+ _nullishCoalesce(_optionalChain([options, 'optionalAccess', _151 => _151.idempotencyKey]), () => ( globalThis.crypto.randomUUID()))
3465
3488
  )
3466
3489
  }
3467
3490
  ),
3468
- update: (options2) => this.updateTargetAutoRecharge(options2)
3491
+ update: (options) => this.updateTargetAutoRecharge(options)
3469
3492
  },
3470
- purchaseCredits: (options2) => this.purchaseTargetBillingCredits(options2),
3471
- recoverCreditPurchase: (options2) => this.recoverTargetBillingCreditPurchase(options2),
3472
- transitionPlan: (options2) => this.transitionTargetBillingPlan(options2),
3473
- portalSession: (options2) => this.createTargetBillingPortalSession(options2)
3493
+ purchaseCredits: (options) => this.purchaseTargetBillingCredits(options),
3494
+ recoverCreditPurchase: (options) => this.recoverTargetBillingCreditPurchase(options),
3495
+ transitionPlan: (options) => this.transitionTargetBillingPlan(options),
3496
+ portalSession: (options) => this.createTargetBillingPortalSession(options)
3474
3497
  };
3475
3498
  this.workspaces = {
3476
- create: (options2) => this.createWorkspace(options2)
3499
+ create: (options) => this.createWorkspace(options)
3477
3500
  };
3478
3501
  this.monitors = {
3479
3502
  status: () => this.getMonitorsAccess(),
3480
- available: (toolIdOrOptions, options2) => this.getMonitorsAvailable(toolIdOrOptions, options2),
3503
+ available: (toolIdOrOptions, options) => this.getMonitorsAvailable(toolIdOrOptions, options),
3481
3504
  check: (definition) => this.checkMonitor(definition),
3482
- preview: (definition, options2) => this.previewMonitor(definition, options2),
3483
- deploy: (definition, options2) => this.deployMonitor(definition, options2),
3484
- sync: (definition, options2) => _optionalChain([options2, 'optionalAccess', _153 => _153.dryRun]) ? this.deployMonitor(definition, { dryRun: true }) : this.syncScalarMonitor(definition, options2),
3485
- list: (options2) => this.listMonitors(options2),
3505
+ preview: (definition, options) => this.previewMonitor(definition, options),
3506
+ 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),
3508
+ list: (options) => this.listMonitors(options),
3486
3509
  get: (key) => this.getMonitor(key),
3487
- test: (key, payload, options2) => this.testMonitorWebhook(key, payload, options2),
3510
+ test: (key, payload, options) => this.testMonitorWebhook(key, payload, options),
3488
3511
  validate: (key) => this.validateMonitor(key),
3489
3512
  dependents: (key) => this.getMonitorDependents(key),
3490
3513
  update: (key, patch) => this.updateMonitor(key, patch),
3491
- delete: (key, options2) => this.deleteMonitor(key, options2),
3492
- reactivate: (key, options2) => this.reactivateMonitor(key, options2),
3493
- start: (key, options2) => _optionalChain([options2, 'optionalAccess', _154 => _154.dryRun]) ? this.submitMonitorBatch({
3514
+ delete: (key, options) => this.deleteMonitor(key, options),
3515
+ reactivate: (key, options) => this.reactivateMonitor(key, options),
3516
+ start: (key, options) => _optionalChain([options, 'optionalAccess', _153 => _153.dryRun]) ? this.submitMonitorBatch({
3494
3517
  kind: "reactivate",
3495
3518
  scope: { kind: "keys", monitorKeys: [key] },
3496
3519
  dryRun: true,
3497
- idempotencyKey: _nullishCoalesce(options2.idempotencyKey, () => ( this.monitorJobIdempotencyKey(`start-${key}`)))
3498
- }) : this.submitScalarMonitorLifecycle(key, "start", options2),
3499
- stop: (key, options2) => _optionalChain([options2, 'optionalAccess', _155 => _155.dryRun]) ? this.submitMonitorBatch({
3520
+ idempotencyKey: _nullishCoalesce(options.idempotencyKey, () => ( this.monitorJobIdempotencyKey(`start-${key}`)))
3521
+ }) : this.submitScalarMonitorLifecycle(key, "start", options),
3522
+ stop: (key, options) => _optionalChain([options, 'optionalAccess', _154 => _154.dryRun]) ? this.submitMonitorBatch({
3500
3523
  kind: "deactivate",
3501
3524
  scope: { kind: "keys", monitorKeys: [key] },
3502
3525
  dryRun: true,
3503
- idempotencyKey: _nullishCoalesce(options2.idempotencyKey, () => ( this.monitorJobIdempotencyKey(`stop-${key}`)))
3504
- }) : this.submitScalarMonitorLifecycle(key, "stop", options2),
3505
- audit: (options2) => this.auditMonitors(options2),
3506
- repair: (options2) => this.repairMonitors(options2),
3507
- health: (options2) => this.readMonitorsHealth(options2),
3526
+ idempotencyKey: _nullishCoalesce(options.idempotencyKey, () => ( this.monitorJobIdempotencyKey(`stop-${key}`)))
3527
+ }) : this.submitScalarMonitorLifecycle(key, "stop", options),
3528
+ audit: (options) => this.auditMonitors(options),
3529
+ repair: (options) => this.repairMonitors(options),
3530
+ health: (options) => this.readMonitorsHealth(options),
3508
3531
  batch: {
3509
- deploy: (definitions, options2) => this.deployMonitorBatch(definitions, options2),
3510
- submit: (options2) => this.submitMonitorBatch(options2),
3511
- get: (operationId, options2) => this.getMonitorBatch(operationId, options2)
3532
+ deploy: (definitions, options) => this.deployMonitorBatch(definitions, options),
3533
+ submit: (options) => this.submitMonitorBatch(options),
3534
+ get: (operationId, options) => this.getMonitorBatch(operationId, options)
3512
3535
  },
3513
3536
  batches: {
3514
- sync: (batchId, definitions, options2) => this.syncNamedMonitorBatch(batchId, definitions, options2),
3515
- start: (batchId, options2) => this.startNamedMonitorBatch(batchId, options2),
3516
- stop: (batchId, options2) => this.stopNamedMonitorBatch(batchId, options2),
3537
+ sync: (batchId, definitions, options) => this.syncNamedMonitorBatch(batchId, definitions, options),
3538
+ start: (batchId, options) => this.startNamedMonitorBatch(batchId, options),
3539
+ stop: (batchId, options) => this.stopNamedMonitorBatch(batchId, options),
3517
3540
  get: (batchId) => this.getNamedMonitorBatch(batchId)
3518
3541
  },
3519
3542
  jobs: {
3520
3543
  get: (jobId) => this.getMonitorJob(jobId),
3521
- logs: (jobId, options2) => this.getMonitorJobLogs(jobId, options2),
3544
+ logs: (jobId, options) => this.getMonitorJobLogs(jobId, options),
3522
3545
  cancel: (jobId) => this.cancelMonitorJob(jobId),
3523
- wait: (jobId, options2) => this.waitForMonitorJob(jobId, options2)
3546
+ wait: (jobId, options) => this.waitForMonitorJob(jobId, options)
3524
3547
  },
3525
3548
  fleets: {
3526
- deploy: (definitionOrId, options2) => this.syncMonitorFleet(definitionOrId, options2),
3527
- sync: (definitionOrId, options2) => this.syncMonitorFleet(definitionOrId, options2),
3528
- get: (fleetId, options2) => fleetId === void 0 ? this.listMonitorFleets() : this.getMonitorFleet(fleetId, options2),
3549
+ deploy: (definitionOrId, options) => this.syncMonitorFleet(definitionOrId, options),
3550
+ sync: (definitionOrId, options) => this.syncMonitorFleet(definitionOrId, options),
3551
+ get: (fleetId, options) => fleetId === void 0 ? this.listMonitorFleets() : this.getMonitorFleet(fleetId, options),
3529
3552
  list: () => this.listMonitorFleets(),
3530
- deactivate: (fleetId, options2) => this.deactivateMonitorFleet(fleetId, options2),
3531
- reactivate: (fleetId, options2) => this.reactivateMonitorFleet(fleetId, options2),
3532
- start: (fleetId, options2) => this.reactivateMonitorFleet(fleetId, options2),
3533
- stop: (fleetId, options2) => this.deactivateMonitorFleet(fleetId, options2),
3534
- waitForConvergence: (fleetId, options2) => this.waitForMonitorFleetConvergence(fleetId, options2)
3553
+ deactivate: (fleetId, options) => this.deactivateMonitorFleet(fleetId, options),
3554
+ reactivate: (fleetId, options) => this.reactivateMonitorFleet(fleetId, options),
3555
+ start: (fleetId, options) => this.reactivateMonitorFleet(fleetId, options),
3556
+ stop: (fleetId, options) => this.deactivateMonitorFleet(fleetId, options),
3557
+ waitForConvergence: (fleetId, options) => this.waitForMonitorFleetConvergence(fleetId, options)
3535
3558
  }
3536
3559
  };
3537
3560
  }
@@ -3542,6 +3565,68 @@ var DeeplineClient = (_class = class _DeeplineClient {
3542
3565
  // ——————————————————————————————————————————————————————————
3543
3566
  // Secrets
3544
3567
  // ——————————————————————————————————————————————————————————
3568
+ /** List this workspace's hosted pages, newest update first. */
3569
+ async listPages(input) {
3570
+ 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));
3573
+ const query = params.size > 0 ? `?${params}` : "";
3574
+ return await this.http.get(`/api/v2/pages${query}`);
3575
+ }
3576
+ /** Read one hosted page's metadata. */
3577
+ async getPage(name) {
3578
+ return await this.http.get(
3579
+ `/api/v2/pages/${encodeURIComponent(name)}`
3580
+ );
3581
+ }
3582
+ /** Replace a page's whole content. `public` says who the write is for. */
3583
+ async writePage(name, input) {
3584
+ return await this.http.put(
3585
+ `/api/v2/pages/${encodeURIComponent(name)}`,
3586
+ {
3587
+ public: input.public,
3588
+ content_base64: input.contentBase64,
3589
+ content_type: input.contentType,
3590
+ description: input.description
3591
+ }
3592
+ );
3593
+ }
3594
+ /** Delete a page, its content, and its links. Safe to repeat. */
3595
+ async deletePage(name) {
3596
+ return await this.http.delete(
3597
+ `/api/v2/pages/${encodeURIComponent(name)}`
3598
+ );
3599
+ }
3600
+ /** The explicit way to change who can see an existing page. */
3601
+ async setPageVisibility(name, isPublic) {
3602
+ return await this.http.post(
3603
+ `/api/v2/pages/${encodeURIComponent(name)}/visibility`,
3604
+ { public: isPublic }
3605
+ );
3606
+ }
3607
+ /** List a page's links. Their URLs cannot be shown again. */
3608
+ async listPageLinks(name) {
3609
+ return await this.http.get(
3610
+ `/api/v2/pages/${encodeURIComponent(name)}/links`
3611
+ );
3612
+ }
3613
+ /** The returned URL is shown once. Either expiry or `permanent` is required. */
3614
+ async createPageLink(name, input) {
3615
+ return await this.http.post(
3616
+ `/api/v2/pages/${encodeURIComponent(name)}/links`,
3617
+ {
3618
+ expires_in_seconds: input.expiresInSeconds,
3619
+ permanent: input.permanent,
3620
+ label: input.label
3621
+ }
3622
+ );
3623
+ }
3624
+ /** Stop a link working. Safe to repeat. */
3625
+ async revokePageLink(name, linkId) {
3626
+ return await this.http.delete(
3627
+ `/api/v2/pages/${encodeURIComponent(name)}/links/${encodeURIComponent(linkId)}`
3628
+ );
3629
+ }
3545
3630
  /** List secret metadata visible to the current workspace. */
3546
3631
  async listSecrets() {
3547
3632
  const response = await this.http.get(
@@ -3600,17 +3685,17 @@ var DeeplineClient = (_class = class _DeeplineClient {
3600
3685
  */
3601
3686
  async listTools(options) {
3602
3687
  const params = new URLSearchParams();
3603
- if (_optionalChain([options, 'optionalAccess', _156 => _156.categories, 'optionalAccess', _157 => _157.trim, 'call', _158 => _158()])) {
3688
+ if (_optionalChain([options, 'optionalAccess', _157 => _157.categories, 'optionalAccess', _158 => _158.trim, 'call', _159 => _159()])) {
3604
3689
  params.set("categories", options.categories.trim());
3605
3690
  }
3606
- if (_optionalChain([options, 'optionalAccess', _159 => _159.tags, 'optionalAccess', _160 => _160.trim, 'call', _161 => _161()])) {
3691
+ if (_optionalChain([options, 'optionalAccess', _160 => _160.tags, 'optionalAccess', _161 => _161.trim, 'call', _162 => _162()])) {
3607
3692
  params.set("tags", options.tags.trim());
3608
3693
  }
3609
- if (_optionalChain([options, 'optionalAccess', _162 => _162.grep, 'optionalAccess', _163 => _163.trim, 'call', _164 => _164()])) {
3694
+ if (_optionalChain([options, 'optionalAccess', _163 => _163.grep, 'optionalAccess', _164 => _164.trim, 'call', _165 => _165()])) {
3610
3695
  params.set("grep", options.grep.trim());
3611
3696
  params.set("grep_mode", _nullishCoalesce(options.grepMode, () => ( "all")));
3612
3697
  }
3613
- params.set("compact", _optionalChain([options, 'optionalAccess', _165 => _165.compact]) === true ? "true" : "false");
3698
+ params.set("compact", _optionalChain([options, 'optionalAccess', _166 => _166.compact]) === true ? "true" : "false");
3614
3699
  const suffix = params.toString() ? `?${params.toString()}` : "";
3615
3700
  const res = await this.http.get(
3616
3701
  `/api/v2/tools${suffix}`
@@ -3643,7 +3728,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
3643
3728
  const params = new URLSearchParams({
3644
3729
  view: "category",
3645
3730
  categories: normalizedCategory,
3646
- compact: _optionalChain([options, 'optionalAccess', _166 => _166.compact]) === true ? "true" : "false"
3731
+ compact: _optionalChain([options, 'optionalAccess', _167 => _167.compact]) === true ? "true" : "false"
3647
3732
  });
3648
3733
  const response = await this.http.get(
3649
3734
  `/api/v2/tools?${params}`
@@ -3658,7 +3743,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
3658
3743
  }
3659
3744
  /** List discoverable providers without requiring a local plugin catalog. */
3660
3745
  async listProviders(options) {
3661
- const suffix = _optionalChain([options, 'optionalAccess', _167 => _167.changed]) ? "?changed=true" : "";
3746
+ const suffix = _optionalChain([options, 'optionalAccess', _168 => _168.changed]) ? "?changed=true" : "";
3662
3747
  const res = await this.http.get(
3663
3748
  `/api/v2/tools/providers${suffix}`
3664
3749
  );
@@ -3689,8 +3774,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
3689
3774
  */
3690
3775
  async search(options = {}) {
3691
3776
  const params = searchParams(options);
3692
- if (_optionalChain([options, 'access', _168 => _168.types, 'optionalAccess', _169 => _169.length])) params.set("types", options.types.join(","));
3693
- if (_optionalChain([options, 'access', _170 => _170.exclude, 'optionalAccess', _171 => _171.length])) {
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])) {
3694
3779
  params.set("exclude", options.exclude.join(","));
3695
3780
  }
3696
3781
  return this.http.get(`/api/v2/search?${params.toString()}`);
@@ -3712,7 +3797,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
3712
3797
  * ```
3713
3798
  */
3714
3799
  async getTool(toolId, options) {
3715
- if (_optionalChain([options, 'optionalAccess', _172 => _172.cliInvocationId]) !== void 0) {
3800
+ if (_optionalChain([options, 'optionalAccess', _173 => _173.cliInvocationId]) !== void 0) {
3716
3801
  validateCliInvocationId(options.cliInvocationId);
3717
3802
  }
3718
3803
  return this.http.request(
@@ -3725,7 +3810,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
3725
3810
  retryApiErrors: true,
3726
3811
  headers: {
3727
3812
  "x-deepline-tool-meta-only": "1",
3728
- ..._optionalChain([options, 'optionalAccess', _173 => _173.cliInvocationId]) !== void 0 ? { "x-deepline-cli-invocation-id": options.cliInvocationId } : {}
3813
+ ..._optionalChain([options, 'optionalAccess', _174 => _174.cliInvocationId]) !== void 0 ? { "x-deepline-cli-invocation-id": options.cliInvocationId } : {}
3729
3814
  }
3730
3815
  }
3731
3816
  );
@@ -3816,7 +3901,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
3816
3901
  return this.http.post(
3817
3902
  "/api/v2/ingestion/repair",
3818
3903
  {
3819
- ..._optionalChain([input, 'optionalAccess', _174 => _174.provider]) ? { provider: input.provider } : {}
3904
+ ..._optionalChain([input, 'optionalAccess', _175 => _175.provider]) ? { provider: input.provider } : {}
3820
3905
  }
3821
3906
  );
3822
3907
  }
@@ -3832,8 +3917,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
3832
3917
  *
3833
3918
  * These interfaces share the run contract and return a workflow or run ID:
3834
3919
  *
3835
- * - `deepline plays run`.
3836
- * - Repository scripts such as `bun run deepline -- plays run`.
3920
+ * - `deepline run`.
3921
+ * - Repository scripts such as `bun run deepline -- run`.
3837
3922
  * - SDK context calls such as `Deepline.connect().play(name).run()`.
3838
3923
  * - Direct `POST /api/v2/plays/run` calls.
3839
3924
  *
@@ -3871,7 +3956,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
3871
3956
  const prepared = await _chunkJKVRBCZLjs.preparePlayRunAdmission.call(void 0,
3872
3957
  this.http,
3873
3958
  resolved.request,
3874
- _optionalChain([options, 'optionalAccess', _175 => _175.onSubmission])
3959
+ _optionalChain([options, 'optionalAccess', _176 => _176.onSubmission])
3875
3960
  );
3876
3961
  const bodyJson = JSON.stringify(prepared.body);
3877
3962
  const headers = runtimeSelectionHeaders(resolved.runtime, this.environment);
@@ -3894,19 +3979,19 @@ var DeeplineClient = (_class = class _DeeplineClient {
3894
3979
  );
3895
3980
  }
3896
3981
  submitted = true;
3897
- const streamPath = _optionalChain([options, 'optionalAccess', _176 => _176.cliAdmission]) ? _chunkJKVRBCZLjs.CLI_PLAY_RUN_START_STREAM_PATH : _chunkJKVRBCZLjs.PLAY_RUN_START_STREAM_PATH;
3982
+ const streamPath = _optionalChain([options, 'optionalAccess', _177 => _177.cliAdmission]) ? _chunkJKVRBCZLjs.CLI_PLAY_RUN_START_STREAM_PATH : _chunkJKVRBCZLjs.PLAY_RUN_START_STREAM_PATH;
3898
3983
  try {
3899
3984
  for await (const event of http.streamSse(streamPath, {
3900
3985
  method: "POST",
3901
3986
  body: JSON.parse(bodyJson),
3902
3987
  headers,
3903
- signal: _optionalChain([streamOptions, 'optionalAccess', _177 => _177.signal]),
3988
+ signal: _optionalChain([streamOptions, 'optionalAccess', _178 => _178.signal]),
3904
3989
  exactUrlOnly: true
3905
3990
  })) {
3906
3991
  if (event.scope === "play") yield event;
3907
3992
  }
3908
3993
  } catch (error) {
3909
- if (_optionalChain([options, 'optionalAccess', _178 => _178.cliAdmission]) && error instanceof _chunkDIAWYWT5js.DeeplineError && (error.statusCode === 404 || error.statusCode === 405)) {
3994
+ if (_optionalChain([options, 'optionalAccess', _179 => _179.cliAdmission]) && error instanceof _chunkDIAWYWT5js.DeeplineError && (error.statusCode === 404 || error.statusCode === 405)) {
3910
3995
  throw new (0, _chunkJKVRBCZLjs.CliPlayAdmissionUnsupportedError)(error.statusCode);
3911
3996
  }
3912
3997
  throw error;
@@ -3929,7 +4014,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
3929
4014
  */
3930
4015
  async *startPlayRunStream(request, options) {
3931
4016
  const prepared = await this.preparePlayRunAdmission(request, options);
3932
- yield* prepared.startStream({ signal: _optionalChain([options, 'optionalAccess', _179 => _179.signal]) });
4017
+ yield* prepared.startStream({ signal: _optionalChain([options, 'optionalAccess', _180 => _180.signal]) });
3933
4018
  }
3934
4019
  /**
3935
4020
  * Register a bundled play artifact.
@@ -4082,7 +4167,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4082
4167
  compilerManifest,
4083
4168
  ...input.input ? { input: input.input } : {},
4084
4169
  ...input.inputFile ? { inputFile: input.inputFile } : {},
4085
- ..._optionalChain([input, 'access', _180 => _180.packagedFiles, 'optionalAccess', _181 => _181.length]) ? { packagedFiles: input.packagedFiles } : {},
4170
+ ..._optionalChain([input, 'access', _181 => _181.packagedFiles, 'optionalAccess', _182 => _182.length]) ? { packagedFiles: input.packagedFiles } : {},
4086
4171
  ...input.force ? { force: true } : {},
4087
4172
  ...input.forceToolRefresh ? { forceToolRefresh: true } : {}
4088
4173
  });
@@ -4093,7 +4178,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4093
4178
  * This method wraps {@link registerPlayArtifact} and {@link startPlayRun}.
4094
4179
  * Packaging wrappers use this method for file-based Plays.
4095
4180
  * Pass the returned ID to {@link getPlayStatus}.
4096
- * The method returns the same durable `{ result }` object that the CLI prints after `plays run` completes.
4181
+ * The method returns the same durable `{ result }` object that `deepline run` saves when it completes.
4097
4182
  *
4098
4183
  * @param code - Fallback source string. Pass the bundled artifact in `options.artifact`.
4099
4184
  * @param csvPath - Path to the input CSV file, or `null`.
@@ -4112,29 +4197,29 @@ var DeeplineClient = (_class = class _DeeplineClient {
4112
4197
  * ```
4113
4198
  */
4114
4199
  async submitPlay(code, csvPath, name, options) {
4115
- const runtimeInput = _optionalChain([options, 'optionalAccess', _182 => _182.input]) ? { ...options.input } : {};
4200
+ const runtimeInput = _optionalChain([options, 'optionalAccess', _183 => _183.input]) ? { ...options.input } : {};
4116
4201
  if (csvPath) {
4117
4202
  runtimeInput.file = csvPath;
4118
4203
  }
4119
- const sourceCode = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _183 => _183.sourceCode]), () => ( code));
4120
- const artifact = _optionalChain([options, 'optionalAccess', _184 => _184.artifact]);
4121
- if (!_optionalChain([name, 'optionalAccess', _185 => _185.trim, 'call', _186 => _186()])) {
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()])) {
4122
4207
  throw new Error("submitPlay requires a play name.");
4123
4208
  }
4124
4209
  if (!artifact) {
4125
4210
  throw new Error("submitPlay requires a bundled play artifact.");
4126
4211
  }
4127
- const compilerManifest = await _asyncNullishCoalesce(await _asyncOptionalChain([options, 'optionalAccess', async _187 => _187.compilerManifest]), async () => ( await this.compilePlayManifest({
4212
+ const compilerManifest = await _asyncNullishCoalesce(await _asyncOptionalChain([options, 'optionalAccess', async _188 => _188.compilerManifest]), async () => ( await this.compilePlayManifest({
4128
4213
  name,
4129
4214
  sourceCode,
4130
- sourceFiles: _optionalChain([options, 'optionalAccess', _188 => _188.sourceFiles]),
4215
+ sourceFiles: _optionalChain([options, 'optionalAccess', _189 => _189.sourceFiles]),
4131
4216
  artifact
4132
4217
  })));
4133
4218
  const registeredArtifact = await this.registerPlayArtifact({
4134
4219
  name,
4135
4220
  sourceCode,
4136
- sourceFiles: _optionalChain([options, 'optionalAccess', _189 => _189.sourceFiles]),
4137
- description: _optionalChain([options, 'optionalAccess', _190 => _190.description]),
4221
+ sourceFiles: _optionalChain([options, 'optionalAccess', _190 => _190.sourceFiles]),
4222
+ description: _optionalChain([options, 'optionalAccess', _191 => _191.description]),
4138
4223
  artifact,
4139
4224
  compilerManifest,
4140
4225
  publish: false
@@ -4148,17 +4233,17 @@ var DeeplineClient = (_class = class _DeeplineClient {
4148
4233
  name,
4149
4234
  artifactStorageKey: registeredArtifact.artifactStorageKey,
4150
4235
  sourceCode,
4151
- description: _optionalChain([options, 'optionalAccess', _191 => _191.description]),
4236
+ description: _optionalChain([options, 'optionalAccess', _192 => _192.description]),
4152
4237
  staticPipeline: _nullishCoalesce(registeredArtifact.staticPipeline, () => ( null)),
4153
4238
  artifactHash: typeof artifact.artifactHash === "string" ? artifact.artifactHash : void 0,
4154
4239
  graphHash: typeof artifact.graphHash === "string" ? artifact.graphHash : void 0,
4155
4240
  runtimeArtifact: artifact,
4156
4241
  compilerManifest,
4157
4242
  ...Object.keys(runtimeInput).length > 0 ? { input: runtimeInput } : {},
4158
- ..._optionalChain([options, 'optionalAccess', _192 => _192.inputFile]) ? { inputFile: options.inputFile } : {},
4159
- ..._optionalChain([options, 'optionalAccess', _193 => _193.packagedFiles, 'optionalAccess', _194 => _194.length]) ? { packagedFiles: options.packagedFiles } : {},
4160
- ..._optionalChain([options, 'optionalAccess', _195 => _195.force]) ? { force: true } : {},
4161
- ..._optionalChain([options, 'optionalAccess', _196 => _196.forceToolRefresh]) ? { forceToolRefresh: true } : {}
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 } : {}
4162
4247
  });
4163
4248
  }
4164
4249
  /**
@@ -4212,7 +4297,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4212
4297
  * Get the current status of a play execution.
4213
4298
  *
4214
4299
  * Internal/advanced primitive. Public callers should usually prefer
4215
- * {@link runPlay}, {@link PlayJob.get}, or `deepline plays run`.
4300
+ * {@link runPlay}, {@link PlayJob.get}, or `deepline run`.
4216
4301
  *
4217
4302
  * @param workflowId - Play-run id from {@link startPlayRun}
4218
4303
  * @returns Current status with progress logs and partial results
@@ -4234,13 +4319,13 @@ var DeeplineClient = (_class = class _DeeplineClient {
4234
4319
  for await (const event of watchRunEvents({
4235
4320
  http: this.http,
4236
4321
  runId: workflowId,
4237
- signal: _optionalChain([options, 'optionalAccess', _197 => _197.signal]),
4238
- onNotice: _optionalChain([options, 'optionalAccess', _198 => _198.onNotice]),
4239
- onRetry: _optionalChain([options, 'optionalAccess', _199 => _199.onRetry]),
4240
- deferLogs: _optionalChain([options, 'optionalAccess', _200 => _200.deferLogs]),
4241
- omitTerminalLogs: _optionalChain([options, 'optionalAccess', _201 => _201.omitTerminalLogs]),
4242
- onPoll: _optionalChain([options, 'optionalAccess', _202 => _202.onPoll]),
4243
- ..._optionalChain([options, 'optionalAccess', _203 => _203.terminalStatus]) ? {
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]) ? {
4244
4329
  terminalStatus: {
4245
4330
  ...options.terminalStatus,
4246
4331
  onStatus: async (raw, expectedStatus) => {
@@ -4250,7 +4335,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4250
4335
  `Run watch returned a mismatched terminal status for ${workflowId}.`
4251
4336
  );
4252
4337
  }
4253
- await _optionalChain([options, 'access', _204 => _204.terminalStatus, 'optionalAccess', _205 => _205.onStatus, 'call', _206 => _206(status)]);
4338
+ await _optionalChain([options, 'access', _205 => _205.terminalStatus, 'optionalAccess', _206 => _206.onStatus, 'call', _207 => _207(status)]);
4254
4339
  }
4255
4340
  }
4256
4341
  } : {}
@@ -4265,12 +4350,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
4265
4350
  * @deprecated Use `watchRunEvents` for ordinary run watching.
4266
4351
  */
4267
4352
  async *streamPlayRunEvents(workflowId, options) {
4268
- const headers = _optionalChain([options, 'optionalAccess', _207 => _207.lastEventId]) && options.lastEventId.trim() ? { "Last-Event-ID": options.lastEventId.trim() } : void 0;
4353
+ const headers = _optionalChain([options, 'optionalAccess', _208 => _208.lastEventId]) && options.lastEventId.trim() ? { "Last-Event-ID": options.lastEventId.trim() } : void 0;
4269
4354
  const params = new URLSearchParams();
4270
- params.set("mode", _nullishCoalesce(_optionalChain([options, 'optionalAccess', _208 => _208.mode]), () => ( "cli")));
4355
+ params.set("mode", _nullishCoalesce(_optionalChain([options, 'optionalAccess', _209 => _209.mode]), () => ( "cli")));
4271
4356
  for await (const event of this.http.streamSse(
4272
4357
  `/api/v2/runs/${encodeURIComponent(workflowId)}/tail?${params.toString()}`,
4273
- { signal: _optionalChain([options, 'optionalAccess', _209 => _209.signal]), headers }
4358
+ { signal: _optionalChain([options, 'optionalAccess', _210 => _210.signal]), headers }
4274
4359
  )) {
4275
4360
  if (event.scope === "play") {
4276
4361
  yield event;
@@ -4286,8 +4371,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
4286
4371
  */
4287
4372
  async *observeRunEvents(runId, options) {
4288
4373
  yield* this.watchRunEvents(runId, {
4289
- signal: _optionalChain([options, 'optionalAccess', _210 => _210.signal]),
4290
- onNotice: _optionalChain([options, 'optionalAccess', _211 => _211.onNotice])
4374
+ signal: _optionalChain([options, 'optionalAccess', _211 => _211.signal]),
4375
+ onNotice: _optionalChain([options, 'optionalAccess', _212 => _212.onNotice])
4291
4376
  });
4292
4377
  }
4293
4378
  /** Poll snapshots to terminal status and return the durable package. */
@@ -4295,9 +4380,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
4295
4380
  let terminalObserved = false;
4296
4381
  let terminalStatus = null;
4297
4382
  for await (const event of this.watchRunEvents(runId, {
4298
- signal: _optionalChain([options, 'optionalAccess', _212 => _212.signal]),
4299
- onNotice: _optionalChain([options, 'optionalAccess', _213 => _213.onNotice]),
4300
- onRetry: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _214 => _214.onRetry]), () => ( _optionalChain([options, 'optionalAccess', _215 => _215.onReconnect]))),
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]))),
4301
4386
  terminalStatus: {
4302
4387
  runStatus: true,
4303
4388
  onStatus: (status) => {
@@ -4305,12 +4390,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
4305
4390
  }
4306
4391
  }
4307
4392
  })) {
4308
- _optionalChain([options, 'optionalAccess', _216 => _216.onEvent, 'optionalCall', _217 => _217(event)]);
4393
+ _optionalChain([options, 'optionalAccess', _217 => _217.onEvent, 'optionalCall', _218 => _218(event)]);
4309
4394
  if (_chunkJKVRBCZLjs.isTerminalPlayRunLifecycleStatus.call(void 0, playLiveRunStatus(event))) {
4310
4395
  terminalObserved = true;
4311
4396
  }
4312
4397
  }
4313
- if (_optionalChain([options, 'optionalAccess', _218 => _218.signal, 'optionalAccess', _219 => _219.aborted])) {
4398
+ if (_optionalChain([options, 'optionalAccess', _219 => _219.signal, 'optionalAccess', _220 => _220.aborted])) {
4314
4399
  throw new (0, _chunkDIAWYWT5js.DeeplineError)("Run watch aborted.", void 0, "ABORTED");
4315
4400
  }
4316
4401
  const refreshed = await _asyncNullishCoalesce(terminalStatus, async () => ( await this.getRunStatus(runId)));
@@ -4390,7 +4475,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4390
4475
  /** List the org's workflows. `GET /api/v2/workflows`. */
4391
4476
  async listWorkflows(options) {
4392
4477
  const params = new URLSearchParams();
4393
- if (typeof _optionalChain([options, 'optionalAccess', _220 => _220.limit]) === "number") {
4478
+ if (typeof _optionalChain([options, 'optionalAccess', _221 => _221.limit]) === "number") {
4394
4479
  params.set("limit", String(options.limit));
4395
4480
  }
4396
4481
  const query = params.size > 0 ? `?${params.toString()}` : "";
@@ -4443,7 +4528,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4443
4528
  /** List a workflow's runs. `GET /api/v2/workflows/:id/runs`. */
4444
4529
  async listWorkflowRuns(id, options) {
4445
4530
  const params = new URLSearchParams();
4446
- if (typeof _optionalChain([options, 'optionalAccess', _221 => _221.limit]) === "number") {
4531
+ if (typeof _optionalChain([options, 'optionalAccess', _222 => _222.limit]) === "number") {
4447
4532
  params.set("limit", String(options.limit));
4448
4533
  }
4449
4534
  const query = params.size > 0 ? `?${params.toString()}` : "";
@@ -4479,10 +4564,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
4479
4564
  */
4480
4565
  async getRunStatus(runId, options) {
4481
4566
  const params = new URLSearchParams();
4482
- if (_optionalChain([options, 'optionalAccess', _222 => _222.full]) === true) {
4567
+ if (_optionalChain([options, 'optionalAccess', _223 => _223.full]) === true) {
4483
4568
  params.set("full", "true");
4484
4569
  }
4485
- if (_optionalChain([options, 'optionalAccess', _223 => _223.configuration]) === true) {
4570
+ if (_optionalChain([options, 'optionalAccess', _224 => _224.configuration]) === true) {
4486
4571
  params.set("include", "configuration");
4487
4572
  }
4488
4573
  const query = params.size > 0 ? `?${params.toString()}` : "";
@@ -4490,7 +4575,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4490
4575
  `/api/v2/runs/${encodeURIComponent(runId)}${query}`,
4491
4576
  { headers: { "x-deepline-run-status": "1" } }
4492
4577
  );
4493
- if (_optionalChain([options, 'optionalAccess', _224 => _224.configuration]) === true && !Object.hasOwn(response, "contract")) {
4578
+ if (_optionalChain([options, 'optionalAccess', _225 => _225.configuration]) === true && !Object.hasOwn(response, "contract")) {
4494
4579
  throw new (0, _chunkDIAWYWT5js.DeeplineError)(
4495
4580
  "This server does not support recorded configuration reads.",
4496
4581
  void 0,
@@ -4498,7 +4583,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4498
4583
  );
4499
4584
  }
4500
4585
  const status = normalizePlayStatus(response);
4501
- if (_optionalChain([options, 'optionalAccess', _225 => _225.failedLogs]) !== true || status.status !== "failed") {
4586
+ if (_optionalChain([options, 'optionalAccess', _226 => _226.failedLogs]) !== true || status.status !== "failed") {
4502
4587
  return status;
4503
4588
  }
4504
4589
  const requestedFailedLogLimit = typeof options.failedLogLimit === "number" && Number.isFinite(options.failedLogLimit) ? Math.max(1, Math.floor(options.failedLogLimit)) : RUNS_FAILED_LOG_LIMIT;
@@ -4587,7 +4672,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4587
4672
  /** The same tenant-scoped run history searched by the dashboard and CLI. */
4588
4673
  async getRunsHistory(options = {}) {
4589
4674
  const params = new URLSearchParams();
4590
- const search = _optionalChain([options, 'access', _226 => _226.search, 'optionalAccess', _227 => _227.trim, 'call', _228 => _228()]);
4675
+ const search = _optionalChain([options, 'access', _227 => _227.search, 'optionalAccess', _228 => _228.trim, 'call', _229 => _229()]);
4591
4676
  if (search && search.length > 200) {
4592
4677
  throw new Error("Run search must be at most 200 characters.");
4593
4678
  }
@@ -4613,16 +4698,16 @@ var DeeplineClient = (_class = class _DeeplineClient {
4613
4698
  }
4614
4699
  /** Read one run page without discarding server pagination metadata. */
4615
4700
  async listRunsPage(options) {
4616
- const playName = _optionalChain([options, 'access', _229 => _229.play, 'optionalAccess', _230 => _230.trim, 'call', _231 => _231()]);
4701
+ const playName = _optionalChain([options, 'access', _230 => _230.play, 'optionalAccess', _231 => _231.trim, 'call', _232 => _232()]);
4617
4702
  const params = new URLSearchParams();
4618
4703
  if (playName) {
4619
4704
  params.set("play", playName);
4620
4705
  }
4621
- const status = _optionalChain([options, 'access', _232 => _232.status, 'optionalAccess', _233 => _233.trim, 'call', _234 => _234()]);
4706
+ const status = _optionalChain([options, 'access', _233 => _233.status, 'optionalAccess', _234 => _234.trim, 'call', _235 => _235()]);
4622
4707
  if (status) {
4623
4708
  params.set("status", status);
4624
4709
  }
4625
- const node = _optionalChain([options, 'access', _235 => _235.node, 'optionalAccess', _236 => _236.trim, 'call', _237 => _237()]);
4710
+ const node = _optionalChain([options, 'access', _236 => _236.node, 'optionalAccess', _237 => _237.trim, 'call', _238 => _238()]);
4626
4711
  if (node) {
4627
4712
  if (!playName)
4628
4713
  throw new Error("runs.list options.node requires options.play.");
@@ -4696,8 +4781,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
4696
4781
  * A different key starts another rerun.
4697
4782
  */
4698
4783
  async rerun(runId, options) {
4699
- const idempotencyKey = _optionalChain([options, 'optionalAccess', _238 => _238.idempotencyKey, 'optionalAccess', _239 => _239.trim, 'call', _240 => _240()]);
4700
- if (_optionalChain([options, 'optionalAccess', _241 => _241.idempotencyKey]) !== void 0 && !idempotencyKey) {
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) {
4701
4786
  throw new (0, _chunkDIAWYWT5js.DeeplineError)(
4702
4787
  "runs.rerun idempotencyKey must not be empty.",
4703
4788
  void 0,
@@ -4706,7 +4791,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4706
4791
  }
4707
4792
  return this.http.post(
4708
4793
  `/api/v2/runs/${encodeURIComponent(runId)}/rerun`,
4709
- _optionalChain([options, 'optionalAccess', _242 => _242.inputOverrides]) ? { inputOverrides: options.inputOverrides } : {},
4794
+ _optionalChain([options, 'optionalAccess', _243 => _243.inputOverrides]) ? { inputOverrides: options.inputOverrides } : {},
4710
4795
  { "Idempotency-Key": idempotencyKey || globalThis.crypto.randomUUID() }
4711
4796
  );
4712
4797
  }
@@ -4720,21 +4805,21 @@ var DeeplineClient = (_class = class _DeeplineClient {
4720
4805
  * ```
4721
4806
  */
4722
4807
  async getRunLogs(runId, options) {
4723
- if (_optionalChain([options, 'optionalAccess', _243 => _243.all]) === true && options.failed === true) {
4808
+ if (_optionalChain([options, 'optionalAccess', _244 => _244.all]) === true && options.failed === true) {
4724
4809
  throw new (0, _chunkDIAWYWT5js.DeeplineError)(
4725
4810
  "runs.logs cannot combine all and failed views.",
4726
4811
  void 0,
4727
4812
  "INVALID_RUN_LOG_VIEW"
4728
4813
  );
4729
4814
  }
4730
- if (_optionalChain([options, 'optionalAccess', _244 => _244.cursor]) !== void 0 && options.failed === true) {
4815
+ if (_optionalChain([options, 'optionalAccess', _245 => _245.cursor]) !== void 0 && options.failed === true) {
4731
4816
  throw new (0, _chunkDIAWYWT5js.DeeplineError)(
4732
4817
  "runs.logs cannot combine failed with cursor.",
4733
4818
  void 0,
4734
4819
  "INVALID_RUN_LOG_VIEW"
4735
4820
  );
4736
4821
  }
4737
- if (_optionalChain([options, 'optionalAccess', _245 => _245.failed]) === true) {
4822
+ if (_optionalChain([options, 'optionalAccess', _246 => _246.failed]) === true) {
4738
4823
  const requestedLimit = typeof options.limit === "number" && Number.isFinite(options.limit) && options.limit > 0 ? Math.trunc(options.limit) : RUNS_FAILED_LOG_LIMIT;
4739
4824
  const failedLimit = Math.min(RUNS_FAILED_LOG_LIMIT, requestedLimit);
4740
4825
  const page = await this.http.get(
@@ -4759,18 +4844,18 @@ var DeeplineClient = (_class = class _DeeplineClient {
4759
4844
  ...page.logsTruncated ? { logsTruncated: true } : {}
4760
4845
  };
4761
4846
  }
4762
- const beforeSequence = _optionalChain([options, 'optionalAccess', _246 => _246.cursor]) !== void 0 ? parseRunLogsCursor(options.cursor) : null;
4763
- const limit = _optionalChain([options, 'optionalAccess', _247 => _247.all]) ? Number.MAX_SAFE_INTEGER : typeof _optionalChain([options, 'optionalAccess', _248 => _248.limit]) === "number" && Number.isFinite(options.limit) && options.limit > 0 ? Math.trunc(options.limit) : 200;
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;
4764
4849
  const fetchPage = (afterSeq2, pageLimit) => this.http.get(
4765
4850
  `/api/v2/runs/${encodeURIComponent(runId)}/logs?afterSeq=${afterSeq2}&limit=${pageLimit}`,
4766
4851
  { retryApiErrors: true }
4767
4852
  );
4768
4853
  const probe = await fetchPage(0, 1);
4769
4854
  const lastStoredSeq = probe.lastStoredSeq;
4770
- const oldestStoredSeq = _nullishCoalesce(_optionalChain([probe, 'access', _249 => _249.entries, 'access', _250 => _250[0], 'optionalAccess', _251 => _251.seq]), () => ( null));
4855
+ const oldestStoredSeq = _nullishCoalesce(_optionalChain([probe, 'access', _250 => _250.entries, 'access', _251 => _251[0], 'optionalAccess', _252 => _252.seq]), () => ( null));
4771
4856
  const upperSeq = beforeSequence === null ? Number.POSITIVE_INFINITY : Math.min(beforeSequence - 1, lastStoredSeq);
4772
4857
  const windowEndSeq = Math.min(upperSeq, lastStoredSeq);
4773
- let afterSeq = _optionalChain([options, 'optionalAccess', _252 => _252.all]) ? 0 : Math.max(0, windowEndSeq - limit);
4858
+ let afterSeq = _optionalChain([options, 'optionalAccess', _253 => _253.all]) ? 0 : Math.max(0, windowEndSeq - limit);
4774
4859
  const entries = [];
4775
4860
  while (entries.length < limit && afterSeq < upperSeq) {
4776
4861
  const page = await fetchPage(
@@ -4804,7 +4889,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4804
4889
  hasMore: olderLinesExist,
4805
4890
  nextCursor: olderLinesExist ? encodeRunLogsCursor(firstSequence) : null,
4806
4891
  entries: entries.map((entry) => entry.line),
4807
- view: _optionalChain([options, 'optionalAccess', _253 => _253.all]) ? "all" : "tail",
4892
+ view: _optionalChain([options, 'optionalAccess', _254 => _254.all]) ? "all" : "tail",
4808
4893
  ...probe.logsTruncated ? { logsTruncated: true } : {}
4809
4894
  };
4810
4895
  }
@@ -4980,19 +5065,22 @@ var DeeplineClient = (_class = class _DeeplineClient {
4980
5065
  limit: String(_nullishCoalesce(input.limit, () => ( 5e3))),
4981
5066
  offset: String(_nullishCoalesce(input.offset, () => ( 0)))
4982
5067
  });
4983
- if (_optionalChain([input, 'access', _254 => _254.runId, 'optionalAccess', _255 => _255.trim, 'call', _256 => _256()])) {
5068
+ if (_optionalChain([input, 'access', _255 => _255.runId, 'optionalAccess', _256 => _256.trim, 'call', _257 => _257()])) {
4984
5069
  params.set("runId", input.runId.trim());
4985
5070
  }
4986
5071
  if (input.rowMode === "all" || input.rowMode === "live") {
4987
5072
  params.set("rowMode", input.rowMode);
4988
5073
  }
5074
+ if (input.summary === "counts") {
5075
+ params.set("summary", "counts");
5076
+ }
4989
5077
  const result = await this.http.get(
4990
5078
  `/api/v2/plays/${encodeURIComponent(input.playName)}/sheet?${params.toString()}`,
4991
5079
  { signal: input.signal }
4992
5080
  );
4993
- const requestedRunId = _optionalChain([input, 'access', _257 => _257.runId, 'optionalAccess', _258 => _258.trim, 'call', _259 => _259()]) || "";
5081
+ const requestedRunId = _optionalChain([input, 'access', _258 => _258.runId, 'optionalAccess', _259 => _259.trim, 'call', _260 => _260()]) || "";
4994
5082
  if (requestedRunId) {
4995
- const confirmedRunId = _optionalChain([result, 'access', _260 => _260.scope, 'optionalAccess', _261 => _261.kind]) === "run" ? result.scope.runId.trim() : "";
5083
+ const confirmedRunId = _optionalChain([result, 'access', _261 => _261.scope, 'optionalAccess', _262 => _262.kind]) === "run" ? result.scope.runId.trim() : "";
4996
5084
  const foreignRowRunIds = [
4997
5085
  ...new Set(
4998
5086
  result.rows.map(
@@ -5000,7 +5088,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5000
5088
  ).filter((runId) => runId && runId !== requestedRunId)
5001
5089
  )
5002
5090
  ];
5003
- if (_optionalChain([result, 'access', _262 => _262.scope, 'optionalAccess', _263 => _263.kind]) !== "run" || confirmedRunId !== requestedRunId || foreignRowRunIds.length > 0) {
5091
+ if (_optionalChain([result, 'access', _263 => _263.scope, 'optionalAccess', _264 => _264.kind]) !== "run" || confirmedRunId !== requestedRunId || foreignRowRunIds.length > 0) {
5004
5092
  throw new (0, _chunkDIAWYWT5js.DeeplineError)(
5005
5093
  `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.`,
5006
5094
  void 0,
@@ -5029,7 +5117,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5029
5117
  async stopRun(runId, options) {
5030
5118
  return this.http.post(
5031
5119
  `/api/v2/runs/${encodeURIComponent(runId)}/stop`,
5032
- _optionalChain([options, 'optionalAccess', _264 => _264.reason]) ? { reason: options.reason } : {}
5120
+ _optionalChain([options, 'optionalAccess', _265 => _265.reason]) ? { reason: options.reason } : {}
5033
5121
  );
5034
5122
  }
5035
5123
  /**
@@ -5047,11 +5135,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
5047
5135
  * The method clears workspace run-slot state without requiring each run ID.
5048
5136
  */
5049
5137
  async stopAllRuns(options) {
5050
- const dryRun = _optionalChain([options, 'optionalAccess', _265 => _265.dryRun]) === true;
5138
+ const dryRun = _optionalChain([options, 'optionalAccess', _266 => _266.dryRun]) === true;
5051
5139
  const result = await this.http.post(
5052
5140
  "/api/v2/runs/stop-all",
5053
5141
  {
5054
- ..._optionalChain([options, 'optionalAccess', _266 => _266.reason]) ? { reason: options.reason } : {},
5142
+ ..._optionalChain([options, 'optionalAccess', _267 => _267.reason]) ? { reason: options.reason } : {},
5055
5143
  ...dryRun ? { dryRun: true } : {}
5056
5144
  }
5057
5145
  );
@@ -5072,7 +5160,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5072
5160
  * `origin: "owned"` for org-owned plays.
5073
5161
  */
5074
5162
  async listPlays(options) {
5075
- if (!_optionalChain([options, 'optionalAccess', _267 => _267.grep, 'optionalAccess', _268 => _268.trim, 'call', _269 => _269()])) {
5163
+ if (!_optionalChain([options, 'optionalAccess', _268 => _268.grep, 'optionalAccess', _269 => _269.trim, 'call', _270 => _270()])) {
5076
5164
  return (await this.requestPlaysPage(options, false)).plays;
5077
5165
  }
5078
5166
  const plays = [];
@@ -5094,45 +5182,45 @@ var DeeplineClient = (_class = class _DeeplineClient {
5094
5182
  }
5095
5183
  async requestPlaysPage(options, paginateInventory = true) {
5096
5184
  const params = new URLSearchParams();
5097
- if (paginateInventory && !_optionalChain([options, 'optionalAccess', _270 => _270.grep, 'optionalAccess', _271 => _271.trim, 'call', _272 => _272()]))
5185
+ if (paginateInventory && !_optionalChain([options, 'optionalAccess', _271 => _271.grep, 'optionalAccess', _272 => _272.trim, 'call', _273 => _273()]))
5098
5186
  params.set("inventory_paginated", "1");
5099
- if (_optionalChain([options, 'optionalAccess', _273 => _273.origin])) params.set("origin", options.origin);
5100
- if (_optionalChain([options, 'optionalAccess', _274 => _274.categories])) {
5187
+ if (_optionalChain([options, 'optionalAccess', _274 => _274.origin])) params.set("origin", options.origin);
5188
+ if (_optionalChain([options, 'optionalAccess', _275 => _275.categories])) {
5101
5189
  params.set(
5102
5190
  "categories",
5103
5191
  Array.isArray(options.categories) ? options.categories.join(",") : options.categories
5104
5192
  );
5105
5193
  }
5106
- if (_optionalChain([options, 'optionalAccess', _275 => _275.categories]) || _optionalChain([options, 'optionalAccess', _276 => _276.includeToolCategories])) {
5194
+ if (_optionalChain([options, 'optionalAccess', _276 => _276.categories]) || _optionalChain([options, 'optionalAccess', _277 => _277.includeToolCategories])) {
5107
5195
  params.set("include_tool_categories", "1");
5108
5196
  }
5109
- if (_optionalChain([options, 'optionalAccess', _277 => _277.tags])) {
5197
+ if (_optionalChain([options, 'optionalAccess', _278 => _278.tags])) {
5110
5198
  params.set(
5111
5199
  "tags",
5112
5200
  Array.isArray(options.tags) ? options.tags.join(",") : options.tags
5113
5201
  );
5114
5202
  }
5115
- if (_optionalChain([options, 'optionalAccess', _278 => _278.includeArchived])) params.set("include_archived", "1");
5116
- if (_optionalChain([options, 'optionalAccess', _279 => _279.includeCostEstimates])) {
5203
+ if (_optionalChain([options, 'optionalAccess', _279 => _279.includeArchived])) params.set("include_archived", "1");
5204
+ if (_optionalChain([options, 'optionalAccess', _280 => _280.includeCostEstimates])) {
5117
5205
  params.set("include_cost_estimates", "1");
5118
5206
  }
5119
- if (_optionalChain([options, 'optionalAccess', _280 => _280.grep, 'optionalAccess', _281 => _281.trim, 'call', _282 => _282()])) {
5207
+ if (_optionalChain([options, 'optionalAccess', _281 => _281.grep, 'optionalAccess', _282 => _282.trim, 'call', _283 => _283()])) {
5120
5208
  params.set("grep", options.grep.trim());
5121
5209
  params.set("limit", "60");
5122
5210
  }
5123
- if (_optionalChain([options, 'optionalAccess', _283 => _283.limit]) !== void 0) {
5211
+ if (_optionalChain([options, 'optionalAccess', _284 => _284.limit]) !== void 0) {
5124
5212
  if (!Number.isSafeInteger(options.limit) || options.limit < 1) {
5125
5213
  throw new Error("Play page limit must be a positive integer");
5126
5214
  }
5127
5215
  params.set("limit", String(options.limit));
5128
5216
  }
5129
- if (_optionalChain([options, 'optionalAccess', _284 => _284.cursor])) params.set("cursor", options.cursor);
5217
+ if (_optionalChain([options, 'optionalAccess', _285 => _285.cursor])) params.set("cursor", options.cursor);
5130
5218
  const suffix = params.size ? `?${params.toString()}` : "";
5131
5219
  const response = await this.http.get(`/api/v2/plays${suffix}`);
5132
5220
  return {
5133
5221
  plays: _nullishCoalesce(response.plays, () => ( [])),
5134
- cursor: _nullishCoalesce(_nullishCoalesce(_optionalChain([response, 'access', _285 => _285.pagination, 'optionalAccess', _286 => _286.cursor]), () => ( response.cursor)), () => ( null)),
5135
- hasMore: Boolean(_nullishCoalesce(_optionalChain([response, 'access', _287 => _287.pagination, 'optionalAccess', _288 => _288.hasMore]), () => ( response.hasMore)))
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)))
5136
5224
  };
5137
5225
  }
5138
5226
  /** Read definition-level settings, independently of code revisions. */
@@ -5186,7 +5274,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5186
5274
  }
5187
5275
  /** Start provider OAuth and return the URL to open in a browser. */
5188
5276
  async startIntegrationOAuth(provider, options = {}) {
5189
- const scopes = _optionalChain([options, 'access', _289 => _289.scopes, 'optionalAccess', _290 => _290.map, 'call', _291 => _291((scope) => scope.trim()), 'access', _292 => _292.filter, 'call', _293 => _293(Boolean)]);
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)]);
5190
5278
  if (scopes !== void 0 && scopes.length === 0) {
5191
5279
  throw new Error("scopes must contain at least one OAuth scope.");
5192
5280
  }
@@ -5202,8 +5290,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
5202
5290
  return this.http.post("/api/v2/integrations/connect", {
5203
5291
  provider: "slack",
5204
5292
  scopes: [...PRODUCT_NOTIFICATION_SLACK_OAUTH_SCOPES],
5205
- ..._optionalChain([options, 'optionalAccess', _294 => _294.successUrl]) ? { success_url: options.successUrl } : {},
5206
- ..._optionalChain([options, 'optionalAccess', _295 => _295.failureUrl]) ? { failure_url: options.failureUrl } : {}
5293
+ ..._optionalChain([options, 'optionalAccess', _295 => _295.successUrl]) ? { success_url: options.successUrl } : {},
5294
+ ..._optionalChain([options, 'optionalAccess', _296 => _296.failureUrl]) ? { failure_url: options.failureUrl } : {}
5207
5295
  });
5208
5296
  }
5209
5297
  /** List Slack channels visible to the connected Deepline Slack app. */
@@ -5278,7 +5366,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5278
5366
  }
5279
5367
  const targets = input.targets.map(parseNotificationGroupTarget);
5280
5368
  const legacyEvents = _nullishCoalesce(input.legacyEvents, () => ( []));
5281
- const legacyTarget = targets.length === 1 && _optionalChain([targets, 'access', _296 => _296[0], 'optionalAccess', _297 => _297.kind]) === "slack" && legacyEvents.length > 0 ? targets[0] : null;
5369
+ const legacyTarget = targets.length === 1 && _optionalChain([targets, 'access', _297 => _297[0], 'optionalAccess', _298 => _298.kind]) === "slack" && legacyEvents.length > 0 ? targets[0] : null;
5282
5370
  if (legacyEvents.length > 0 && !legacyTarget) {
5283
5371
  throw new Error(
5284
5372
  "--for is supported only by the legacy one-Slack-target form. Create the group first, then add rules in notification configuration."
@@ -5314,7 +5402,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5314
5402
  const existingGroup = current.configuration.groups.find(
5315
5403
  (candidate) => candidate.name.toLowerCase() === name.toLowerCase()
5316
5404
  );
5317
- const groupKey = _nullishCoalesce(_optionalChain([existingGroup, 'optionalAccess', _298 => _298.groupKey]), () => ( notificationObjectKey("group")));
5405
+ const groupKey = _nullishCoalesce(_optionalChain([existingGroup, 'optionalAccess', _299 => _299.groupKey]), () => ( notificationObjectKey("group")));
5318
5406
  const group = _nullishCoalesce(existingGroup, () => ( {
5319
5407
  groupKey,
5320
5408
  name,
@@ -5503,7 +5591,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5503
5591
  }
5504
5592
  );
5505
5593
  const plays = (_nullishCoalesce(response.plays, () => ( []))).map(
5506
- (play) => _chunkKXMNM4AQjs.describePlayListItem.call(void 0, play, {
5594
+ (play) => _chunkNMU3VR5Ujs.describePlayListItem.call(void 0, play, {
5507
5595
  ...options,
5508
5596
  pipeline: _nullishCoalesce(options.pipeline, () => ( true))
5509
5597
  })
@@ -5538,7 +5626,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5538
5626
  /** Read one trigger inventory page without loading run histories. */
5539
5627
  async listPlayTriggerInventory(options) {
5540
5628
  const params = new URLSearchParams({ view: "inventory" });
5541
- if (_optionalChain([options, 'optionalAccess', _299 => _299.cursor])) params.set("cursor", options.cursor);
5629
+ if (_optionalChain([options, 'optionalAccess', _300 => _300.cursor])) params.set("cursor", options.cursor);
5542
5630
  return this.http.get(`/api/v2/plays/triggers?${params}`);
5543
5631
  }
5544
5632
  /** Read one trigger's recent runs, with an explicit partial-history flag. */
@@ -5547,7 +5635,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5547
5635
  view: "history",
5548
5636
  binding_id: bindingId
5549
5637
  });
5550
- if (_optionalChain([options, 'optionalAccess', _300 => _300.limit]) !== void 0)
5638
+ if (_optionalChain([options, 'optionalAccess', _301 => _301.limit]) !== void 0)
5551
5639
  params.set("history_limit", String(options.limit));
5552
5640
  return this.http.get(`/api/v2/plays/triggers?${params}`);
5553
5641
  }
@@ -5561,7 +5649,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5561
5649
  */
5562
5650
  async describePlay(name, options = {}) {
5563
5651
  if (options.pipeline) {
5564
- return _chunkKXMNM4AQjs.describePlayDetail.call(void 0,
5652
+ return _chunkNMU3VR5Ujs.describePlayDetail.call(void 0,
5565
5653
  await this.getPlay(name, { guidance: true }),
5566
5654
  options
5567
5655
  );
@@ -5572,7 +5660,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5572
5660
  ...options.compact ? { compact: "1" } : {}
5573
5661
  });
5574
5662
  const body = await this.http.get(`/api/v2/plays/${encodeURIComponent(name)}?${params.toString()}`);
5575
- return "description" in body ? body.description : _chunkKXMNM4AQjs.describePlayDetail.call(void 0, body, options);
5663
+ return "description" in body ? body.description : _chunkNMU3VR5Ujs.describePlayDetail.call(void 0, body, options);
5576
5664
  }
5577
5665
  /**
5578
5666
  * Clear run history and durable sheet/result data for a play without deleting
@@ -5735,14 +5823,14 @@ var DeeplineClient = (_class = class _DeeplineClient {
5735
5823
  */
5736
5824
  async runPlay(code, csvPath, name, options) {
5737
5825
  const { workflowId } = await this.submitPlay(code, csvPath, name, {
5738
- input: _optionalChain([options, 'optionalAccess', _301 => _301.input]),
5739
- sourceCode: _optionalChain([options, 'optionalAccess', _302 => _302.sourceCode]),
5740
- artifact: _optionalChain([options, 'optionalAccess', _303 => _303.artifact]),
5741
- compilerManifest: _optionalChain([options, 'optionalAccess', _304 => _304.compilerManifest]),
5742
- inputFile: _optionalChain([options, 'optionalAccess', _305 => _305.inputFile]),
5743
- packagedFiles: _optionalChain([options, 'optionalAccess', _306 => _306.packagedFiles]),
5744
- force: _optionalChain([options, 'optionalAccess', _307 => _307.force]),
5745
- forceToolRefresh: _optionalChain([options, 'optionalAccess', _308 => _308.forceToolRefresh])
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])
5746
5834
  });
5747
5835
  const start = Date.now();
5748
5836
  const state = {
@@ -5753,7 +5841,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5753
5841
  latest: null
5754
5842
  };
5755
5843
  let terminalObserved = null;
5756
- if (_optionalChain([options, 'optionalAccess', _309 => _309.signal, 'optionalAccess', _310 => _310.aborted])) {
5844
+ if (_optionalChain([options, 'optionalAccess', _310 => _310.signal, 'optionalAccess', _311 => _311.aborted])) {
5757
5845
  await this.cancelPlay(workflowId);
5758
5846
  return {
5759
5847
  success: false,
@@ -5764,9 +5852,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
5764
5852
  };
5765
5853
  }
5766
5854
  for await (const event of this.watchRunEvents(workflowId, {
5767
- signal: _optionalChain([options, 'optionalAccess', _311 => _311.signal])
5855
+ signal: _optionalChain([options, 'optionalAccess', _312 => _312.signal])
5768
5856
  })) {
5769
- if (_optionalChain([options, 'optionalAccess', _312 => _312.signal, 'optionalAccess', _313 => _313.aborted])) {
5857
+ if (_optionalChain([options, 'optionalAccess', _313 => _313.signal, 'optionalAccess', _314 => _314.aborted])) {
5770
5858
  await this.cancelPlay(workflowId);
5771
5859
  return {
5772
5860
  success: false,
@@ -5776,19 +5864,19 @@ var DeeplineClient = (_class = class _DeeplineClient {
5776
5864
  error: "Cancelled by user"
5777
5865
  };
5778
5866
  }
5779
- const previousStatus = _optionalChain([state, 'access', _314 => _314.latest, 'optionalAccess', _315 => _315.status]);
5867
+ const previousStatus = _optionalChain([state, 'access', _315 => _315.latest, 'optionalAccess', _316 => _316.status]);
5780
5868
  const status = updatePlayLiveStatusState(state, event);
5781
5869
  if (!status) {
5782
5870
  continue;
5783
5871
  }
5784
5872
  if (event.type !== "play.run.status" || status.status !== previousStatus) {
5785
- _optionalChain([options, 'optionalAccess', _316 => _316.onProgress, 'optionalCall', _317 => _317(status)]);
5873
+ _optionalChain([options, 'optionalAccess', _317 => _317.onProgress, 'optionalCall', _318 => _318(status)]);
5786
5874
  }
5787
5875
  if (_chunkJKVRBCZLjs.isTerminalPlayRunLifecycleStatus.call(void 0, status.status)) {
5788
5876
  terminalObserved = status;
5789
5877
  }
5790
5878
  }
5791
- if (_optionalChain([options, 'optionalAccess', _318 => _318.signal, 'optionalAccess', _319 => _319.aborted])) {
5879
+ if (_optionalChain([options, 'optionalAccess', _319 => _319.signal, 'optionalAccess', _320 => _320.aborted])) {
5792
5880
  await this.cancelPlay(workflowId);
5793
5881
  return {
5794
5882
  success: false,
@@ -5841,7 +5929,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5841
5929
  const response = await this.http.get(
5842
5930
  `/api/v2/usage/events?request_id=${encodeURIComponent(normalizedRequestId)}`
5843
5931
  );
5844
- const event = _optionalChain([response, 'access', _320 => _320.entries, 'optionalAccess', _321 => _321[0]]);
5932
+ const event = _optionalChain([response, 'access', _321 => _321.entries, 'optionalAccess', _322 => _322[0]]);
5845
5933
  if (!event) {
5846
5934
  throw new (0, _chunkDIAWYWT5js.DeeplineError)(
5847
5935
  "No usage event was found for this request_id.",
@@ -5851,6 +5939,49 @@ var DeeplineClient = (_class = class _DeeplineClient {
5851
5939
  }
5852
5940
  return event;
5853
5941
  }
5942
+ /**
5943
+ * Read one authenticated raw usage-event page. This history is not a final
5944
+ * charge or settlement oracle. Empty pages may still carry a continuation.
5945
+ */
5946
+ async getBillingUsageEvents(options = {}) {
5947
+ const invalid = (message) => {
5948
+ throw new (0, _chunkDIAWYWT5js.DeeplineError)(
5949
+ message,
5950
+ void 0,
5951
+ "INVALID_USAGE_EVENTS_OPTIONS"
5952
+ );
5953
+ };
5954
+ if ("offset" in options) {
5955
+ invalid(
5956
+ "Usage events do not support offset; use the preceding next_cursor."
5957
+ );
5958
+ }
5959
+ const params = new URLSearchParams();
5960
+ if (options.limit !== void 0) {
5961
+ if (!Number.isInteger(options.limit) || options.limit < 1 || options.limit > 500) {
5962
+ invalid("Usage events limit must be an integer from 1 to 500.");
5963
+ }
5964
+ params.set("limit", String(options.limit));
5965
+ }
5966
+ for (const [name, value] of [
5967
+ ["cursor", options.cursor],
5968
+ ["run_id", options.runId]
5969
+ ]) {
5970
+ if (value !== void 0) {
5971
+ if (typeof value !== "string" || !value || value !== value.trim()) {
5972
+ invalid(
5973
+ `Usage events ${name} must be a non-empty string without surrounding whitespace.`
5974
+ );
5975
+ }
5976
+ params.set(name, value);
5977
+ }
5978
+ }
5979
+ const query = params.toString();
5980
+ const querySuffix = query ? `?${query}` : "";
5981
+ return this.http.get(
5982
+ `/api/v2/usage/events${querySuffix}`
5983
+ );
5984
+ }
5854
5985
  /**
5855
5986
  * Read Deepline credits billed to each run and whether charges are still settling.
5856
5987
  * The response never shows provider spend. The dashboard runs grid uses the same read.
@@ -5972,7 +6103,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5972
6103
  async cancelBillingSubscription(options) {
5973
6104
  return this.http.post(
5974
6105
  "/api/v2/billing/subscription/cancel",
5975
- { action: _optionalChain([options, 'optionalAccess', _322 => _322.undo]) ? "undo_cancel" : "cancel" }
6106
+ { action: _optionalChain([options, 'optionalAccess', _323 => _323.undo]) ? "undo_cancel" : "cancel" }
5976
6107
  );
5977
6108
  }
5978
6109
  /**
@@ -5984,7 +6115,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5984
6115
  */
5985
6116
  async listBillingInvoices(options) {
5986
6117
  const params = new URLSearchParams();
5987
- if (_optionalChain([options, 'optionalAccess', _323 => _323.limit]) !== void 0) {
6118
+ if (_optionalChain([options, 'optionalAccess', _324 => _324.limit]) !== void 0) {
5988
6119
  params.set("limit", String(options.limit));
5989
6120
  }
5990
6121
  const suffix = Array.from(params).length > 0 ? `?${params.toString()}` : "";
@@ -6094,7 +6225,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6094
6225
  /** Create a Stripe-hosted portal session for payment recovery and invoices. */
6095
6226
  async createTargetBillingPortalSession(options) {
6096
6227
  const response = await this.http.post(
6097
- _optionalChain([options, 'optionalAccess', _324 => _324.flow]) === "customer_update" ? "/api/v2/billing/portal-sessions?flow=customer_update" : "/api/v2/billing/portal-sessions",
6228
+ _optionalChain([options, 'optionalAccess', _325 => _325.flow]) === "customer_update" ? "/api/v2/billing/portal-sessions?flow=customer_update" : "/api/v2/billing/portal-sessions",
6098
6229
  {}
6099
6230
  );
6100
6231
  return response.data;
@@ -6144,8 +6275,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
6144
6275
  return this.http.request("/api/v2/monitors/audit", {
6145
6276
  method: "POST",
6146
6277
  body: {
6147
- ..._optionalChain([options, 'optionalAccess', _325 => _325.fleetId]) ? { fleet_id: options.fleetId } : {},
6148
- ..._optionalChain([options, 'optionalAccess', _326 => _326.cursor]) ? { cursor: options.cursor } : {}
6278
+ ..._optionalChain([options, 'optionalAccess', _326 => _326.fleetId]) ? { fleet_id: options.fleetId } : {},
6279
+ ..._optionalChain([options, 'optionalAccess', _327 => _327.cursor]) ? { cursor: options.cursor } : {}
6149
6280
  },
6150
6281
  maxRetries: 0
6151
6282
  });
@@ -6155,8 +6286,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
6155
6286
  return this.http.request("/api/v2/monitors/repair", {
6156
6287
  method: "POST",
6157
6288
  body: {
6158
- ..._optionalChain([options, 'optionalAccess', _327 => _327.fleetId]) ? { fleet_id: options.fleetId } : {},
6159
- ..._optionalChain([options, 'optionalAccess', _328 => _328.dryRun]) === void 0 ? {} : { dry_run: options.dryRun }
6289
+ ..._optionalChain([options, 'optionalAccess', _328 => _328.fleetId]) ? { fleet_id: options.fleetId } : {},
6290
+ ..._optionalChain([options, 'optionalAccess', _329 => _329.dryRun]) === void 0 ? {} : { dry_run: options.dryRun }
6160
6291
  },
6161
6292
  maxRetries: 0
6162
6293
  });
@@ -6164,7 +6295,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6164
6295
  /** Delivery and convergence health. Prefer `client.monitors.health(...)`. */
6165
6296
  async readMonitorsHealth(options) {
6166
6297
  const params = new URLSearchParams();
6167
- if (_optionalChain([options, 'optionalAccess', _329 => _329.fleetId])) params.set("fleet_id", options.fleetId);
6298
+ if (_optionalChain([options, 'optionalAccess', _330 => _330.fleetId])) params.set("fleet_id", options.fleetId);
6168
6299
  const query = params.toString();
6169
6300
  const suffix = query ? `?${query}` : "";
6170
6301
  return this.http.request(
@@ -6237,7 +6368,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6237
6368
  );
6238
6369
  }
6239
6370
  const params = new URLSearchParams();
6240
- if (_optionalChain([options, 'optionalAccess', _330 => _330.cursor])) params.set("cursor", options.cursor);
6371
+ if (_optionalChain([options, 'optionalAccess', _331 => _331.cursor])) params.set("cursor", options.cursor);
6241
6372
  const suffix = params.size > 0 ? `?${params}` : "";
6242
6373
  return this.http.request(
6243
6374
  `/api/v2/monitors/batch/${encodeURIComponent(runId)}${suffix}`,
@@ -6284,7 +6415,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6284
6415
  * a second charge. The submission is never replayed automatically.
6285
6416
  */
6286
6417
  async previewMonitor(definition, options) {
6287
- const idempotencyKey = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _331 => _331.idempotencyKey]), () => ( `monitor-preview-${_nullishCoalesce(_optionalChain([globalThis, 'access', _332 => _332.crypto, 'optionalAccess', _333 => _333.randomUUID, 'optionalCall', _334 => _334()]), () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`))}`));
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)}`))}`));
6288
6419
  try {
6289
6420
  const result = await this.http.request(
6290
6421
  "/api/v2/monitors/preview",
@@ -6292,7 +6423,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6292
6423
  method: "POST",
6293
6424
  body: {
6294
6425
  ...definition,
6295
- ..._optionalChain([options, 'optionalAccess', _335 => _335.limit]) === void 0 ? {} : { limit: options.limit }
6426
+ ..._optionalChain([options, 'optionalAccess', _336 => _336.limit]) === void 0 ? {} : { limit: options.limit }
6296
6427
  },
6297
6428
  headers: { "Idempotency-Key": idempotencyKey },
6298
6429
  maxRetries: 0,
@@ -6314,7 +6445,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6314
6445
  * `client.monitors.deploy(...)`.
6315
6446
  */
6316
6447
  async deployMonitor(definition, options) {
6317
- if (_optionalChain([options, 'optionalAccess', _336 => _336.dryRun])) {
6448
+ if (_optionalChain([options, 'optionalAccess', _337 => _337.dryRun])) {
6318
6449
  return this.http.request("/api/v2/monitors/check", {
6319
6450
  method: "POST",
6320
6451
  body: definition
@@ -6350,12 +6481,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
6350
6481
  /** List deployed monitors. Prefer `client.monitors.list(...)`. */
6351
6482
  async listMonitors(options) {
6352
6483
  const params = new URLSearchParams();
6353
- if (_optionalChain([options, 'optionalAccess', _337 => _337.state])) params.set("state", options.state);
6354
- else if (_optionalChain([options, 'optionalAccess', _338 => _338.status])) params.set("status", options.status);
6355
- if (_optionalChain([options, 'optionalAccess', _339 => _339.limit]) !== void 0)
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)
6356
6487
  params.set("limit", String(options.limit));
6357
- if (_optionalChain([options, 'optionalAccess', _340 => _340.cursor])) params.set("cursor", options.cursor);
6358
- if (_optionalChain([options, 'optionalAccess', _341 => _341.includeConsumers])) params.set("include_consumers", "true");
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");
6359
6490
  const query = params.toString();
6360
6491
  const suffix = query ? `?${query}` : "";
6361
6492
  return this.http.request(
@@ -6371,7 +6502,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6371
6502
  );
6372
6503
  }
6373
6504
  async testMonitorWebhook(key, payload, options) {
6374
- if (_optionalChain([options, 'optionalAccess', _342 => _342.dispatch]) === true || _optionalChain([options, 'optionalAccess', _343 => _343.validationOnly]) === false) {
6505
+ if (_optionalChain([options, 'optionalAccess', _343 => _343.dispatch]) === true || _optionalChain([options, 'optionalAccess', _344 => _344.validationOnly]) === false) {
6375
6506
  throw new (0, _chunkDIAWYWT5js.DeeplineError)(
6376
6507
  "Monitor tests are validation-only and cannot dispatch events.",
6377
6508
  void 0,
@@ -6426,7 +6557,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6426
6557
  }
6427
6558
  /** Delete a deployed monitor and its upstream provider resource. `dryRun` returns the delete plan. Prefer `client.monitors.delete(...)`. */
6428
6559
  async deleteMonitor(key, options) {
6429
- if (_optionalChain([options, 'optionalAccess', _344 => _344.localOnly]) === true) {
6560
+ if (_optionalChain([options, 'optionalAccess', _345 => _345.localOnly]) === true) {
6430
6561
  throw new (0, _chunkDIAWYWT5js.DeeplineError)(
6431
6562
  "localOnly monitor deletion is no longer supported. Monitor deletion always deprovisions the upstream provider resource.",
6432
6563
  void 0,
@@ -6434,11 +6565,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
6434
6565
  );
6435
6566
  }
6436
6567
  const params = new URLSearchParams();
6437
- if (_optionalChain([options, 'optionalAccess', _345 => _345.dryRun])) params.set("dry_run", "true");
6568
+ if (_optionalChain([options, 'optionalAccess', _346 => _346.dryRun])) params.set("dry_run", "true");
6438
6569
  const query = params.toString();
6439
6570
  return this.http.request(
6440
6571
  `/api/v2/monitors/deployed/${encodeURIComponent(key)}${query ? `?${query}` : ""}`,
6441
- _optionalChain([options, 'optionalAccess', _346 => _346.dryRun]) ? { method: "DELETE" } : {
6572
+ _optionalChain([options, 'optionalAccess', _347 => _347.dryRun]) ? { method: "DELETE" } : {
6442
6573
  method: "DELETE",
6443
6574
  // Deletion is a provider lifecycle operation. A timeout is an
6444
6575
  // unknown outcome, not authority to begin another delete attempt.
@@ -6451,10 +6582,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
6451
6582
  * Prefer `client.monitors.reactivate(...)`.
6452
6583
  */
6453
6584
  async reactivateMonitor(key, options) {
6454
- const query = _optionalChain([options, 'optionalAccess', _347 => _347.dryRun]) ? "?dry_run=true" : "";
6585
+ const query = _optionalChain([options, 'optionalAccess', _348 => _348.dryRun]) ? "?dry_run=true" : "";
6455
6586
  return this.http.request(
6456
6587
  `/api/v2/monitors/deployed/${encodeURIComponent(key)}/reactivate${query}`,
6457
- _optionalChain([options, 'optionalAccess', _348 => _348.dryRun]) ? { method: "POST", body: {} } : {
6588
+ _optionalChain([options, 'optionalAccess', _349 => _349.dryRun]) ? { method: "POST", body: {} } : {
6458
6589
  method: "POST",
6459
6590
  body: {},
6460
6591
  // Reactivation can create an upstream resource, so it must not use
@@ -6468,7 +6599,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6468
6599
  // ——————————————————————————————————————————————————————————
6469
6600
  static __initStatic() {this.MONITOR_JOB_IDEMPOTENCY_KEY_MAX_LENGTH = 96}
6470
6601
  monitorJobIdempotencyKey(operation) {
6471
- const uuid = _nullishCoalesce(_optionalChain([globalThis, 'access', _349 => _349.crypto, 'optionalAccess', _350 => _350.randomUUID, 'optionalCall', _351 => _351()]), () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`));
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)}`));
6472
6603
  const prefix = "monitor-job-";
6473
6604
  const safeOperation = operation.replace(/[^A-Za-z0-9._-]/g, "-");
6474
6605
  const maxOperationLength = Math.max(
@@ -6479,7 +6610,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6479
6610
  }
6480
6611
  monitorJobHeaders(operation, idempotencyKey) {
6481
6612
  return {
6482
- "Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _352 => _352.trim, 'call', _353 => _353()]) || this.monitorJobIdempotencyKey(operation)
6613
+ "Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _353 => _353.trim, 'call', _354 => _354()]) || this.monitorJobIdempotencyKey(operation)
6483
6614
  };
6484
6615
  }
6485
6616
  async deployMonitorBatch(definitions, options) {
@@ -6490,7 +6621,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6490
6621
  body: { version: 1, kind: "batch", monitors: definitions },
6491
6622
  headers: this.monitorJobHeaders(
6492
6623
  "batch-deploy",
6493
- _optionalChain([options, 'optionalAccess', _354 => _354.idempotencyKey])
6624
+ _optionalChain([options, 'optionalAccess', _355 => _355.idempotencyKey])
6494
6625
  ),
6495
6626
  maxRetries: 0,
6496
6627
  exactUrlOnly: true
@@ -6509,11 +6640,11 @@ var DeeplineClient = (_class = class _DeeplineClient {
6509
6640
  version: 1,
6510
6641
  kind: "batch",
6511
6642
  monitors: definitions,
6512
- ..._optionalChain([options, 'optionalAccess', _355 => _355.expectedGeneration]) === void 0 ? {} : { expected_generation: options.expectedGeneration }
6643
+ ..._optionalChain([options, 'optionalAccess', _356 => _356.expectedGeneration]) === void 0 ? {} : { expected_generation: options.expectedGeneration }
6513
6644
  },
6514
6645
  headers: this.monitorJobHeaders(
6515
6646
  `batch-sync-${batchId}`,
6516
- _optionalChain([options, 'optionalAccess', _356 => _356.idempotencyKey])
6647
+ _optionalChain([options, 'optionalAccess', _357 => _357.idempotencyKey])
6517
6648
  ),
6518
6649
  maxRetries: 0,
6519
6650
  exactUrlOnly: true
@@ -6528,7 +6659,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6528
6659
  body: {},
6529
6660
  headers: this.monitorJobHeaders(
6530
6661
  `batch-start-${batchId}`,
6531
- _optionalChain([options, 'optionalAccess', _357 => _357.idempotencyKey])
6662
+ _optionalChain([options, 'optionalAccess', _358 => _358.idempotencyKey])
6532
6663
  ),
6533
6664
  maxRetries: 0,
6534
6665
  exactUrlOnly: true
@@ -6543,7 +6674,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6543
6674
  body: {},
6544
6675
  headers: this.monitorJobHeaders(
6545
6676
  `batch-stop-${batchId}`,
6546
- _optionalChain([options, 'optionalAccess', _358 => _358.idempotencyKey])
6677
+ _optionalChain([options, 'optionalAccess', _359 => _359.idempotencyKey])
6547
6678
  ),
6548
6679
  maxRetries: 0,
6549
6680
  exactUrlOnly: true
@@ -6564,7 +6695,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6564
6695
  body: {},
6565
6696
  headers: this.monitorJobHeaders(
6566
6697
  `${action}-${monitorKey}`,
6567
- _optionalChain([options, 'optionalAccess', _359 => _359.idempotencyKey])
6698
+ _optionalChain([options, 'optionalAccess', _360 => _360.idempotencyKey])
6568
6699
  ),
6569
6700
  maxRetries: 0,
6570
6701
  exactUrlOnly: true
@@ -6577,7 +6708,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6577
6708
  body: definition,
6578
6709
  headers: this.monitorJobHeaders(
6579
6710
  `sync-${definition.key}`,
6580
- _optionalChain([options, 'optionalAccess', _360 => _360.idempotencyKey])
6711
+ _optionalChain([options, 'optionalAccess', _361 => _361.idempotencyKey])
6581
6712
  ),
6582
6713
  maxRetries: 0,
6583
6714
  exactUrlOnly: true
@@ -6590,7 +6721,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6590
6721
  );
6591
6722
  }
6592
6723
  async getMonitorJobLogs(jobId, options) {
6593
- const query = _optionalChain([options, 'optionalAccess', _361 => _361.limit]) === void 0 ? "" : `?limit=${encodeURIComponent(String(options.limit))}`;
6724
+ const query = _optionalChain([options, 'optionalAccess', _362 => _362.limit]) === void 0 ? "" : `?limit=${encodeURIComponent(String(options.limit))}`;
6594
6725
  return this.http.request(
6595
6726
  `/api/v2/monitors/jobs/${encodeURIComponent(jobId)}/logs${query}`,
6596
6727
  { method: "GET" }
@@ -6603,15 +6734,15 @@ var DeeplineClient = (_class = class _DeeplineClient {
6603
6734
  );
6604
6735
  }
6605
6736
  async waitForMonitorJob(jobId, options) {
6606
- const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _362 => _362.timeoutMs]), () => ( 10 * 6e4)));
6607
- const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _363 => _363.pollIntervalMs]), () => ( 2e3)));
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)));
6608
6739
  const terminal = /* @__PURE__ */ new Set(["succeeded", "failed", "cancelled"]);
6609
6740
  const startedAt = Date.now();
6610
6741
  let latest = await this.getMonitorJob(jobId);
6611
6742
  while (true) {
6612
- _optionalChain([options, 'optionalAccess', _364 => _364.onProgress, 'optionalCall', _365 => _365(latest)]);
6743
+ _optionalChain([options, 'optionalAccess', _365 => _365.onProgress, 'optionalCall', _366 => _366(latest)]);
6613
6744
  const job = latest.job;
6614
- const state = typeof _optionalChain([job, 'optionalAccess', _366 => _366.state]) === "string" ? job.state : void 0;
6745
+ const state = typeof _optionalChain([job, 'optionalAccess', _367 => _367.state]) === "string" ? job.state : void 0;
6615
6746
  if (state && terminal.has(state)) return latest;
6616
6747
  if (Date.now() - startedAt >= timeoutMs) return latest;
6617
6748
  await sleep(pollIntervalMs);
@@ -6622,12 +6753,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
6622
6753
  // Monitor Fleets
6623
6754
  // ——————————————————————————————————————————————————————————
6624
6755
  monitorFleetIdempotencyKey(operation) {
6625
- const uuid = _optionalChain([globalThis, 'access', _367 => _367.crypto, 'optionalAccess', _368 => _368.randomUUID, 'optionalCall', _369 => _369()]);
6756
+ const uuid = _optionalChain([globalThis, 'access', _368 => _368.crypto, 'optionalAccess', _369 => _369.randomUUID, 'optionalCall', _370 => _370()]);
6626
6757
  return `monitor-fleet-${operation}-${_nullishCoalesce(uuid, () => ( `${Date.now()}-${Math.random().toString(36).slice(2)}`))}`;
6627
6758
  }
6628
6759
  monitorFleetHeaders(operation, idempotencyKey) {
6629
6760
  return {
6630
- "Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _370 => _370.trim, 'call', _371 => _371()]) || this.monitorFleetIdempotencyKey(operation)
6761
+ "Idempotency-Key": _optionalChain([idempotencyKey, 'optionalAccess', _371 => _371.trim, 'call', _372 => _372()]) || this.monitorFleetIdempotencyKey(operation)
6631
6762
  };
6632
6763
  }
6633
6764
  monitorFleetPath(fleetId) {
@@ -6647,15 +6778,15 @@ var DeeplineClient = (_class = class _DeeplineClient {
6647
6778
  const fleetId = typeof definitionOrId === "string" ? definitionOrId : definitionOrId.id;
6648
6779
  const body = {
6649
6780
  ...typeof definitionOrId === "string" ? {} : { definition: definitionOrId },
6650
- ..._optionalChain([options, 'optionalAccess', _372 => _372.dryRun]) ? { dry_run: true } : {},
6651
- ..._optionalChain([options, 'optionalAccess', _373 => _373.expectedGeneration]) !== void 0 ? { expected_generation: options.expectedGeneration } : {}
6781
+ ..._optionalChain([options, 'optionalAccess', _373 => _373.dryRun]) ? { dry_run: true } : {},
6782
+ ..._optionalChain([options, 'optionalAccess', _374 => _374.expectedGeneration]) !== void 0 ? { expected_generation: options.expectedGeneration } : {}
6652
6783
  };
6653
6784
  return this.http.request(
6654
6785
  this.monitorFleetPath(fleetId),
6655
6786
  {
6656
6787
  method: "PUT",
6657
6788
  body,
6658
- headers: this.monitorFleetHeaders("sync", _optionalChain([options, 'optionalAccess', _374 => _374.idempotencyKey])),
6789
+ headers: this.monitorFleetHeaders("sync", _optionalChain([options, 'optionalAccess', _375 => _375.idempotencyKey])),
6659
6790
  maxRetries: 0,
6660
6791
  exactUrlOnly: true
6661
6792
  }
@@ -6668,8 +6799,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
6668
6799
  }
6669
6800
  async getMonitorFleet(fleetId, options) {
6670
6801
  const params = new URLSearchParams();
6671
- if (_optionalChain([options, 'optionalAccess', _375 => _375.drift])) params.set("drift", "1");
6672
- if (_optionalChain([options, 'optionalAccess', _376 => _376.limit]) !== void 0)
6802
+ if (_optionalChain([options, 'optionalAccess', _376 => _376.drift])) params.set("drift", "1");
6803
+ if (_optionalChain([options, 'optionalAccess', _377 => _377.limit]) !== void 0)
6673
6804
  params.set("limit", String(options.limit));
6674
6805
  const query = params.toString();
6675
6806
  return this.http.request(
@@ -6682,10 +6813,10 @@ var DeeplineClient = (_class = class _DeeplineClient {
6682
6813
  this.monitorFleetPath(fleetId),
6683
6814
  {
6684
6815
  method: "DELETE",
6685
- body: _optionalChain([options, 'optionalAccess', _377 => _377.dryRun]) ? { dry_run: true } : {},
6816
+ body: _optionalChain([options, 'optionalAccess', _378 => _378.dryRun]) ? { dry_run: true } : {},
6686
6817
  headers: this.monitorFleetHeaders(
6687
6818
  "deactivate",
6688
- _optionalChain([options, 'optionalAccess', _378 => _378.idempotencyKey])
6819
+ _optionalChain([options, 'optionalAccess', _379 => _379.idempotencyKey])
6689
6820
  ),
6690
6821
  maxRetries: 0,
6691
6822
  exactUrlOnly: true
@@ -6700,7 +6831,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6700
6831
  body: {},
6701
6832
  headers: this.monitorFleetHeaders(
6702
6833
  "reactivate",
6703
- _optionalChain([options, 'optionalAccess', _379 => _379.idempotencyKey])
6834
+ _optionalChain([options, 'optionalAccess', _380 => _380.idempotencyKey])
6704
6835
  ),
6705
6836
  maxRetries: 0,
6706
6837
  exactUrlOnly: true
@@ -6717,13 +6848,13 @@ var DeeplineClient = (_class = class _DeeplineClient {
6717
6848
  * identical to "the request failed".
6718
6849
  */
6719
6850
  async waitForMonitorFleetConvergence(fleetId, options) {
6720
- const timeoutMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _380 => _380.timeoutMs]), () => ( 10 * 6e4)));
6721
- const pollIntervalMs = Math.max(1, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _381 => _381.pollIntervalMs]), () => ( 2e3)));
6722
- const terminal = _optionalChain([options, 'optionalAccess', _382 => _382.until]) === "deactivated" ? /* @__PURE__ */ new Set(["deactivated", "degraded"]) : /* @__PURE__ */ new Set(["converged", "degraded", "deactivated"]);
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"]);
6723
6854
  const startedAt = Date.now();
6724
6855
  let latest = await this.getMonitorFleet(fleetId);
6725
6856
  while (true) {
6726
- _optionalChain([options, 'optionalAccess', _383 => _383.onProgress, 'optionalCall', _384 => _384(latest)]);
6857
+ _optionalChain([options, 'optionalAccess', _384 => _384.onProgress, 'optionalCall', _385 => _385(latest)]);
6727
6858
  const status = typeof latest.status === "string" ? latest.status : void 0;
6728
6859
  if (status && terminal.has(status)) return latest;
6729
6860
  if (Date.now() - startedAt >= timeoutMs) return latest;
@@ -6785,4 +6916,4 @@ var DeeplineClient = (_class = class _DeeplineClient {
6785
6916
 
6786
6917
 
6787
6918
 
6788
- exports.iterateCursorPages = iterateCursorPages; exports.requireBillingIdempotencyKey = requireBillingIdempotencyKey; exports.planCustomerDbQuery = planCustomerDbQuery; exports.validateExecutionIdempotencyKey = validateExecutionIdempotencyKey; exports.normalizePlayStatus = normalizePlayStatus; exports.createPlayClient = createPlayClient; exports.PRODUCT_NOTIFICATION_EVENT_CATALOG = PRODUCT_NOTIFICATION_EVENT_CATALOG; exports.resolveLegacySlackNotification = resolveLegacySlackNotification; exports.RUN_EVENT_SEARCH_KIND_VALUES = RUN_EVENT_SEARCH_KIND_VALUES; exports.logProvenanceReaches = logProvenanceReaches; exports.logLevelReaches = logLevelReaches; exports.parseLogLevel = parseLogLevel; exports.classifyLogLine = classifyLogLine; exports.isTransientPlayRunReadError = isTransientPlayRunReadError; exports.encodeRunLogsCursor = encodeRunLogsCursor; exports.isRunLogsCursor = isRunLogsCursor; exports.RunEventQueryInputError = RunEventQueryInputError; exports.normalizeRunEventOperationRequest = normalizeRunEventOperationRequest; exports.isStopAllPlayRunsDryRunResult = isStopAllPlayRunsDryRunResult; exports.MONITOR_JOB_STATES = MONITOR_JOB_STATES; exports.MONITOR_JOB_PHASES = MONITOR_JOB_PHASES; exports.MONITOR_JOB_RECONCILIATION_STATES = MONITOR_JOB_RECONCILIATION_STATES; exports.DeeplineClient = DeeplineClient;
6919
+ exports.iterateCursorPages = iterateCursorPages; exports.requireBillingIdempotencyKey = requireBillingIdempotencyKey; exports.planCustomerDbQuery = planCustomerDbQuery; exports.validateExecutionIdempotencyKey = validateExecutionIdempotencyKey; exports.normalizePlayStatus = normalizePlayStatus; exports.PlayClient = PlayClient; exports.PRODUCT_NOTIFICATION_EVENT_CATALOG = PRODUCT_NOTIFICATION_EVENT_CATALOG; exports.resolveLegacySlackNotification = resolveLegacySlackNotification; exports.RUN_EVENT_SEARCH_KIND_VALUES = RUN_EVENT_SEARCH_KIND_VALUES; exports.logProvenanceReaches = logProvenanceReaches; exports.logLevelReaches = logLevelReaches; exports.parseLogLevel = parseLogLevel; exports.classifyLogLine = classifyLogLine; exports.isTransientPlayRunReadError = isTransientPlayRunReadError; exports.encodeRunLogsCursor = encodeRunLogsCursor; exports.isRunLogsCursor = isRunLogsCursor; exports.RunEventQueryInputError = RunEventQueryInputError; exports.normalizeRunEventOperationRequest = normalizeRunEventOperationRequest; exports.isStopAllPlayRunsDryRunResult = isStopAllPlayRunsDryRunResult; exports.MONITOR_JOB_STATES = MONITOR_JOB_STATES; exports.MONITOR_JOB_PHASES = MONITOR_JOB_PHASES; exports.MONITOR_JOB_RECONCILIATION_STATES = MONITOR_JOB_RECONCILIATION_STATES; exports.DeeplineClient = DeeplineClient;