deepline 0.3.551 → 0.3.553

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 (324) hide show
  1. package/dist/bundling-sources/sdk/src/client-core.ts +130 -12
  2. package/dist/bundling-sources/sdk/src/compat.ts +239 -87
  3. package/dist/bundling-sources/sdk/src/config.ts +113 -2
  4. package/dist/bundling-sources/sdk/src/errors.ts +2 -0
  5. package/dist/bundling-sources/sdk/src/http-core.ts +124 -10
  6. package/dist/bundling-sources/sdk/src/index.ts +2 -0
  7. package/dist/bundling-sources/sdk/src/integrations.ts +6 -4
  8. package/dist/bundling-sources/sdk/src/play.ts +3 -0
  9. package/dist/bundling-sources/sdk/src/plays/run-request.ts +1 -1
  10. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  11. package/dist/bundling-sources/sdk/src/runs/watch-polling.ts +66 -30
  12. package/dist/bundling-sources/sdk/src/tool-calls.ts +2 -1
  13. package/dist/bundling-sources/sdk/src/tool-failure-hint.ts +104 -0
  14. package/dist/bundling-sources/sdk/src/types.ts +9 -1
  15. package/dist/bundling-sources/shared_libs/integration-contracts/billing-entitlements.ts +4 -2
  16. package/dist/bundling-sources/shared_libs/integration-contracts/billing-plan-skus.ts +25 -0
  17. package/dist/bundling-sources/shared_libs/monitors/action-actor.ts +2 -0
  18. package/dist/bundling-sources/shared_libs/monitors/billing/credit-recovery.ts +58 -4
  19. package/dist/bundling-sources/shared_libs/monitors/billing/policy-builders.ts +8 -0
  20. package/dist/bundling-sources/shared_libs/monitors/billing/pricing.ts +11 -0
  21. package/dist/bundling-sources/shared_libs/monitors/billing/types.ts +13 -0
  22. package/dist/bundling-sources/shared_libs/monitors/deactivation-reasons.ts +103 -5
  23. package/dist/bundling-sources/shared_libs/monitors/fleets/converge-admission.ts +133 -0
  24. package/dist/bundling-sources/shared_libs/monitors/fleets/fence-attention.ts +165 -0
  25. package/dist/bundling-sources/shared_libs/monitors/fleets/fence-release.ts +726 -0
  26. package/dist/bundling-sources/shared_libs/monitors/fleets/fence-walk.ts +274 -0
  27. package/dist/bundling-sources/shared_libs/monitors/fleets/issues.ts +1 -0
  28. package/dist/bundling-sources/shared_libs/monitors/fleets/limits.ts +28 -0
  29. package/dist/bundling-sources/shared_libs/monitors/fleets/provider-bulk-wait.ts +126 -0
  30. package/dist/bundling-sources/shared_libs/monitors/fleets/shared-payload.ts +189 -0
  31. package/dist/bundling-sources/shared_libs/monitors/http-error-response.ts +28 -0
  32. package/dist/bundling-sources/shared_libs/monitors/inbound-publish-key.ts +4 -0
  33. package/dist/bundling-sources/shared_libs/monitors/inventory-counter-errors.ts +25 -0
  34. package/dist/bundling-sources/shared_libs/monitors/org-monitor-limits.ts +65 -0
  35. package/dist/bundling-sources/shared_libs/monitors/package.json +11 -0
  36. package/dist/bundling-sources/shared_libs/monitors/provider-callback-verification.ts +152 -1
  37. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-batch-operation.ts +6 -0
  38. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-capability.ts +390 -10
  39. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-errors.ts +34 -0
  40. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-identity-claims.ts +66 -30
  41. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-state.ts +30 -0
  42. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-upstream-identity.ts +80 -13
  43. package/dist/bundling-sources/shared_libs/monitors/provider-resource-failure.ts +26 -3
  44. package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-dead-letter.ts +41 -13
  45. package/dist/bundling-sources/shared_libs/monitors/signal-radars/raw-receipt-causes.ts +219 -0
  46. package/dist/bundling-sources/shared_libs/monitors/snitcher-ip2company.ts +21 -10
  47. package/dist/bundling-sources/shared_libs/monitors/starter-templates.ts +13 -0
  48. package/dist/bundling-sources/shared_libs/monitors/tamradar-countries.ts +285 -0
  49. package/dist/bundling-sources/shared_libs/monitors/tracking-provider-guidance.ts +6 -0
  50. package/dist/bundling-sources/shared_libs/monitors/tracking-provider-integrations.ts +13 -0
  51. package/dist/bundling-sources/shared_libs/observability/dlq.ts +1 -1
  52. package/dist/bundling-sources/shared_libs/observability/log-metadata.ts +5 -3
  53. package/dist/bundling-sources/shared_libs/observability/queue-health.ts +10 -1
  54. package/dist/bundling-sources/shared_libs/observability/queue-item-connectors.ts +1 -0
  55. package/dist/bundling-sources/shared_libs/observability/redaction.ts +24 -1
  56. package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +312 -41
  57. package/dist/bundling-sources/shared_libs/observability/scheduled-work-manual.ts +1 -2
  58. package/dist/bundling-sources/shared_libs/play-data-plane/preview-r2-oidc.ts +188 -0
  59. package/dist/bundling-sources/shared_libs/play-data-plane/r2.ts +170 -16
  60. package/dist/bundling-sources/shared_libs/play-data-plane/runtime-sheet-storage-contract.ts +5 -0
  61. package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +68 -2
  62. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +568 -26
  63. package/dist/bundling-sources/shared_libs/play-runtime/ctx-fetch-caller-deadline.ts +200 -0
  64. package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +6 -0
  65. package/dist/bundling-sources/shared_libs/play-runtime/deployment/runtime-topology.ts +21 -1
  66. package/dist/bundling-sources/shared_libs/play-runtime/durable-call-cache.ts +3 -2
  67. package/dist/bundling-sources/shared_libs/play-runtime/durable-runs-rollout.ts +14 -2
  68. package/dist/bundling-sources/shared_libs/play-runtime/durable-summary-events.ts +70 -2
  69. package/dist/bundling-sources/shared_libs/play-runtime/durable-tool-identity.ts +3 -3
  70. package/dist/bundling-sources/shared_libs/play-runtime/execution-capabilities.ts +16 -0
  71. package/dist/bundling-sources/shared_libs/play-runtime/experiment-switches.ts +92 -16
  72. package/dist/bundling-sources/shared_libs/play-runtime/fixture-behavior.ts +1 -0
  73. package/dist/bundling-sources/shared_libs/play-runtime/governor/policy.ts +7 -1
  74. package/dist/bundling-sources/shared_libs/play-runtime/internal-bootstrap-token.ts +62 -0
  75. package/dist/bundling-sources/shared_libs/play-runtime/map-memory-limits.ts +74 -3
  76. package/dist/bundling-sources/shared_libs/play-runtime/output-size-limits.ts +31 -3
  77. package/dist/bundling-sources/shared_libs/play-runtime/play-http-request.ts +6 -0
  78. package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +8 -0
  79. package/dist/bundling-sources/shared_libs/play-runtime/query-result-dataset.ts +19 -0
  80. package/dist/bundling-sources/shared_libs/play-runtime/resource-governor.ts +39 -2
  81. package/dist/bundling-sources/shared_libs/play-runtime/run-failure.ts +9 -1
  82. package/dist/bundling-sources/shared_libs/play-runtime/run-identity.ts +33 -0
  83. package/dist/bundling-sources/shared_libs/play-runtime/run-ledger-projection-contract.ts +24 -0
  84. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +300 -57
  85. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-payload-transport.ts +87 -6
  86. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal.ts +241 -10
  87. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/early-sandbox-egress.ts +161 -14
  88. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/early-sandbox.ts +16 -3
  89. package/dist/bundling-sources/shared_libs/play-runtime/runtime-api-compression.ts +37 -0
  90. package/dist/bundling-sources/shared_libs/play-runtime/runtime-api-paths.ts +9 -0
  91. package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +298 -46
  92. package/dist/bundling-sources/shared_libs/play-runtime/runtime-authority.ts +13 -0
  93. package/dist/bundling-sources/shared_libs/play-runtime/runtime-constants.ts +39 -0
  94. package/dist/bundling-sources/shared_libs/play-runtime/runtime-operation-contract.ts +62 -1
  95. package/dist/bundling-sources/shared_libs/play-runtime/runtime-scheduler-topology.ts +36 -0
  96. package/dist/bundling-sources/shared_libs/play-runtime/runtime-sheet-row-transition.ts +36 -0
  97. package/dist/bundling-sources/shared_libs/play-runtime/runtime-speed-profile.ts +206 -2
  98. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-pool.ts +42 -0
  99. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +185 -64
  100. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-worker-slot-ledger.ts +157 -0
  101. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/early-sandbox-lane.ts +110 -2
  102. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/early-sandbox-listener-hint.ts +323 -0
  103. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/executor-attempt-standing.ts +72 -0
  104. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/integration-operation-value-storage.ts +23 -4
  105. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-rate-state.ts +32 -10
  106. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-workspace-purge.ts +199 -0
  107. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +632 -66
  108. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-outbox-recovery.ts +517 -16
  109. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-api-origin.ts +1 -1
  110. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-receipt-value-storage.ts +9 -0
  111. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-worker-wake.ts +599 -2
  112. package/dist/bundling-sources/shared_libs/play-runtime/secret-resolution-retry-policy.ts +26 -1
  113. package/dist/bundling-sources/shared_libs/play-runtime/startup-read-tool-ids.ts +60 -0
  114. package/dist/bundling-sources/shared_libs/play-runtime/test-runtime-seams.ts +51 -0
  115. package/dist/bundling-sources/shared_libs/play-runtime/tool-call-retry-facts.ts +2 -0
  116. package/dist/bundling-sources/shared_libs/play-runtime/tool-execute-retry-policy.ts +113 -3
  117. package/dist/bundling-sources/shared_libs/play-runtime/tool-http-errors.ts +5 -7
  118. package/dist/bundling-sources/shared_libs/play-runtime/tool-result.ts +37 -7
  119. package/dist/bundling-sources/shared_libs/play-runtime/work-receipt-storage-contract.ts +2 -0
  120. package/dist/bundling-sources/shared_libs/play-runtime/workflow-executor-auth.ts +3 -0
  121. package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +40 -5
  122. package/dist/bundling-sources/shared_libs/plays/deploy/api-client.ts +3 -0
  123. package/dist/bundling-sources/shared_libs/plays/deploy/control-plane-types.ts +16 -0
  124. package/dist/bundling-sources/shared_libs/plays/deploy/run-deployment.ts +10 -41
  125. package/dist/bundling-sources/shared_libs/plays/extension-bridge.ts +33 -0
  126. package/dist/bundling-sources/shared_libs/plays/row-identity.ts +18 -1
  127. package/dist/bundling-sources/shared_libs/plays/tool-execution-error.ts +108 -0
  128. package/dist/bundling-sources/shared_libs/plays/trigger-config-contract.ts +14 -0
  129. package/dist/bundling-sources/shared_libs/product-notifications/catalog.ts +171 -0
  130. package/dist/bundling-sources/shared_libs/product-notifications/events.ts +27 -1
  131. package/dist/bundling-sources/shared_libs/security/email-blacklist.ts +9 -24
  132. package/dist/bundling-sources/shared_libs/security/secret-redaction.ts +178 -5
  133. package/dist/bundling-sources/shared_libs/security/signup-email-dns-screen.ts +148 -0
  134. package/dist/bundling-sources/shared_libs/tool-execution-error.ts +108 -0
  135. package/dist/cli/{auth-E7BH4GMJ.mjs → auth-I3QAU4RV.mjs} +8 -7
  136. package/dist/cli/auth-MQCN7WGZ.js +44 -0
  137. package/dist/cli/{billing-OXKU462W.mjs → billing-3IC54OQQ.mjs} +202 -59
  138. package/dist/cli/{billing-DNQAZGX7.js → billing-YGFFVAIC.js} +302 -159
  139. package/dist/cli/{chunk-COGREZAO.js → chunk-2B5B5KAW.js} +210 -128
  140. package/dist/cli/{chunk-UBKA33KY.mjs → chunk-2MGZAI54.mjs} +17 -0
  141. package/dist/cli/{chunk-T2B5BVZE.js → chunk-3NTP2OSG.js} +13 -13
  142. package/dist/cli/{chunk-FOTGUFVK.mjs → chunk-45OAVGU6.mjs} +5 -5
  143. package/dist/cli/{chunk-54EEYLTF.js → chunk-4747TPLV.js} +3 -3
  144. package/dist/cli/{chunk-CLRAANWH.mjs → chunk-4BFTDNHU.mjs} +1 -1
  145. package/dist/cli/{chunk-BGBJV26E.mjs → chunk-4HYNMXXF.mjs} +4 -4
  146. package/dist/cli/{chunk-5S6PHKRV.mjs → chunk-4SMCFQ23.mjs} +1 -1
  147. package/dist/cli/{chunk-VWLHRZFG.mjs → chunk-55F6HNOY.mjs} +5 -5
  148. package/dist/cli/{chunk-LX35AXTN.mjs → chunk-5TYLSS4Q.mjs} +6 -6
  149. package/dist/cli/{chunk-VTGG2RT3.js → chunk-6NE3RRRY.js} +1 -1
  150. package/dist/cli/{chunk-EITMD3A5.js → chunk-6VLFQZK6.js} +8 -8
  151. package/dist/cli/{chunk-MNSTCJMX.mjs → chunk-72V4PDH5.mjs} +18 -18
  152. package/dist/cli/{chunk-ZCDKE4UH.js → chunk-74RES4DS.js} +5 -5
  153. package/dist/cli/{chunk-WKBHUB6R.js → chunk-7GEMELKI.js} +366 -320
  154. package/dist/cli/{chunk-C4CUZH57.js → chunk-7O6J6A7P.js} +1871 -92
  155. package/dist/cli/{chunk-7RSIFA72.js → chunk-7SERLBNR.js} +161 -53
  156. package/dist/cli/{chunk-3G6QZACZ.js → chunk-7YRJ5UC4.js} +21 -21
  157. package/dist/cli/{chunk-I4VKGNAQ.mjs → chunk-A7DLBE5K.mjs} +136 -54
  158. package/dist/cli/{chunk-GGB3JYCW.mjs → chunk-AGICYWGN.mjs} +299 -69
  159. package/dist/cli/{chunk-44KSACJW.mjs → chunk-AGIQDA2T.mjs} +12 -12
  160. package/dist/cli/{chunk-PACD5DGC.js → chunk-AGLR6QVN.js} +255 -109
  161. package/dist/cli/{chunk-NURW5XH4.mjs → chunk-ASB47RXJ.mjs} +1 -1
  162. package/dist/cli/{chunk-4OMAGJ6U.js → chunk-BVDKFS2T.js} +2 -2
  163. package/dist/cli/{chunk-LPJPCGT3.js → chunk-CACFJODG.js} +190 -134
  164. package/dist/cli/{chunk-GVYLCCKN.mjs → chunk-CAEBJOYU.mjs} +1 -1
  165. package/dist/cli/{chunk-XDVT3GOM.js → chunk-CFJFUVX2.js} +18 -1
  166. package/dist/cli/{chunk-POLUE7D5.js → chunk-DP2VH7CO.js} +12 -12
  167. package/dist/cli/{chunk-D6M5HFBB.mjs → chunk-DP64MD6U.mjs} +1 -1
  168. package/dist/cli/{chunk-W425ERWN.mjs → chunk-DZA7RFGL.mjs} +5 -5
  169. package/dist/cli/{chunk-R7J7CJPZ.js → chunk-E2G2DNAB.js} +4 -1
  170. package/dist/cli/{chunk-GGGAEVCX.mjs → chunk-E7WZOX2A.mjs} +22 -18
  171. package/dist/cli/{chunk-44I675YK.js → chunk-FM7LPUPA.js} +41 -41
  172. package/dist/cli/{chunk-2UXDHFSF.mjs → chunk-GAVZ4EOD.mjs} +1 -1
  173. package/dist/cli/{chunk-Z2FIOG3V.js → chunk-HEBO3XNZ.js} +27 -31
  174. package/dist/cli/{chunk-6PWJKMFQ.mjs → chunk-HSJ6X2AQ.mjs} +4 -4
  175. package/dist/cli/{chunk-UPMRIVZB.js → chunk-HVI55MTK.js} +61 -10
  176. package/dist/cli/{chunk-KWSH5T7K.js → chunk-IH6GDNKW.js} +21 -21
  177. package/dist/cli/{chunk-3KYBDAR3.js → chunk-IMX7J4DU.js} +8 -8
  178. package/dist/cli/{chunk-HEHVGEZV.mjs → chunk-INEMTYMT.mjs} +8 -8
  179. package/dist/cli/{chunk-5VVSEU67.js → chunk-IUOGII7D.js} +6 -7
  180. package/dist/cli/{chunk-MXGA6JFI.mjs → chunk-JJGWHITQ.mjs} +5 -5
  181. package/dist/cli/{chunk-QM6Y6S4E.js → chunk-JLGP5XAJ.js} +5 -5
  182. package/dist/cli/{chunk-V6SCP4B7.mjs → chunk-LFOERUQY.mjs} +69 -3
  183. package/dist/cli/{chunk-BBTKAASQ.js → chunk-LFQJW4S2.js} +42 -1
  184. package/dist/cli/{chunk-ZMNGZ6XS.mjs → chunk-LH5PZKER.mjs} +80 -24
  185. package/dist/cli/{chunk-MR5LTVHD.js → chunk-LRDHPOZW.js} +69 -69
  186. package/dist/cli/{chunk-5LUF4LAR.mjs → chunk-LRZGS6RZ.mjs} +3 -0
  187. package/dist/cli/{chunk-SL6MYJYM.js → chunk-MJTVX4QK.js} +35 -35
  188. package/dist/cli/{chunk-UDXULACQ.js → chunk-MLABYI4M.js} +90 -24
  189. package/dist/cli/{chunk-S7IZWGUA.mjs → chunk-NDNHYONK.mjs} +17 -21
  190. package/dist/cli/{chunk-4D3WIZST.mjs → chunk-OTV2UUKW.mjs} +164 -18
  191. package/dist/cli/{chunk-XYE5XPGF.js → chunk-Q6Z6N3A7.js} +18 -18
  192. package/dist/cli/{chunk-7WQNWJQW.mjs → chunk-QG6JIWUL.mjs} +151 -43
  193. package/dist/cli/{chunk-3T65J5RG.mjs → chunk-QI5S5HWB.mjs} +2 -2
  194. package/dist/cli/{chunk-CBV7AKWM.js → chunk-R6DZ6NQ2.js} +5 -5
  195. package/dist/cli/{chunk-PM7MO62Y.mjs → chunk-RMNOZKRI.mjs} +3 -3
  196. package/dist/cli/{chunk-NMWGZD6Y.js → chunk-RTV4RF7N.js} +36 -36
  197. package/dist/cli/{chunk-CQ6JYQSW.js → chunk-SBH4CKPN.js} +11 -11
  198. package/dist/cli/{chunk-BIIJATTX.mjs → chunk-SG3LUONJ.mjs} +3 -3
  199. package/dist/cli/{chunk-2WFPHBR4.js → chunk-TFEXSHPM.js} +22 -18
  200. package/dist/cli/{chunk-5IL7SC45.mjs → chunk-TN4TY6TT.mjs} +6 -7
  201. package/dist/cli/{chunk-WEHCBH5R.mjs → chunk-UEVKMZLR.mjs} +54 -3
  202. package/dist/cli/{chunk-RE5MJBEV.mjs → chunk-UVQJYV76.mjs} +2 -2
  203. package/dist/cli/{chunk-FSIVF2SI.mjs → chunk-VZGLIK5U.mjs} +1 -1
  204. package/dist/cli/{chunk-W2ZWQUHT.js → chunk-WOCHZCUJ.js} +2 -2
  205. package/dist/cli/{chunk-ZDQFBJPO.js → chunk-XLIHTJVM.js} +348 -118
  206. package/dist/cli/{chunk-2ZYRBMQM.js → chunk-Y6SP3JMI.js} +22 -22
  207. package/dist/cli/{chunk-PPSDCN6C.js → chunk-YUA6HA6D.js} +2 -2
  208. package/dist/cli/{chunk-JL2OTMSG.mjs → chunk-Z3A2S3QM.mjs} +41 -0
  209. package/dist/cli/{chunk-E64HFB4L.mjs → chunk-Z6XPSHKM.mjs} +87 -41
  210. package/dist/cli/{chunk-7DOQ3OEX.mjs → chunk-Z7AOIHFE.mjs} +1870 -91
  211. package/dist/cli/command-docs.js +3 -3
  212. package/dist/cli/command-docs.mjs +2 -2
  213. package/dist/cli/concurrent-runs-help-CFJH4KXV.js +22 -0
  214. package/dist/cli/{concurrent-runs-help-C6L6I5OR.mjs → concurrent-runs-help-DNV2X5AZ.mjs} +9 -8
  215. package/dist/cli/{csv-QMF4FWE7.js → csv-SA6ELJY6.js} +16 -15
  216. package/dist/cli/{csv-SYSDXFEM.mjs → csv-ZXZGHWOM.mjs} +7 -6
  217. package/dist/cli/{db-Q7HURWRZ.mjs → db-A54SP6AD.mjs} +16 -16
  218. package/dist/cli/{db-YSHPPA4H.js → db-JHFEIQBU.js} +43 -43
  219. package/dist/cli/describe-PHQ33AGS.mjs +50 -0
  220. package/dist/cli/describe-RHJ4XRFI.js +50 -0
  221. package/dist/cli/describe-core.d.mts +3 -3
  222. package/dist/cli/describe-core.d.ts +3 -3
  223. package/dist/cli/describe-core.js +6 -6
  224. package/dist/cli/describe-core.mjs +5 -5
  225. package/dist/cli/{executions-G7U3VUXN.mjs → executions-HL2M2DFU.mjs} +10 -10
  226. package/dist/cli/{executions-MWBC5TAW.js → executions-TLFZRHBJ.js} +12 -12
  227. package/dist/cli/{feedback-SD55OY6H.js → feedback-5UEX5UZK.js} +17 -16
  228. package/dist/cli/{feedback-GMHIFLBJ.mjs → feedback-QMBTNXVG.mjs} +9 -8
  229. package/dist/cli/git-4JWOOHBG.js +26 -0
  230. package/dist/cli/{git-HPE45OPD.mjs → git-LKGXVIVC.mjs} +8 -7
  231. package/dist/cli/index.js +170 -158
  232. package/dist/cli/index.mjs +60 -48
  233. package/dist/cli/{integrations-HFKVBY6G.js → integrations-6RUTLMN7.js} +23 -27
  234. package/dist/cli/{integrations-2W4MGIQR.mjs → integrations-FGGRVUJ7.mjs} +15 -19
  235. package/dist/cli/{legacy-noops-SXVNDEXN.js → legacy-noops-J3Z7QRWZ.js} +12 -11
  236. package/dist/cli/{legacy-noops-GZYKNU2Z.mjs → legacy-noops-YIPRMVXZ.mjs} +9 -8
  237. package/dist/cli/{mcp-PJRHQHHU.js → mcp-6LWFP7RW.js} +121 -48
  238. package/dist/cli/{mcp-BWA6KULG.mjs → mcp-CHDYFO7F.mjs} +100 -27
  239. package/dist/cli/{monitors-K2WSI6CR.js → monitors-STM6A7OU.js} +221 -186
  240. package/dist/cli/{monitors-SYQKCATO.mjs → monitors-UGRY2BXI.mjs} +58 -23
  241. package/dist/cli/org-3SYOUQCX.mjs +2289 -0
  242. package/dist/cli/org-ZOBSNSIB.js +2289 -0
  243. package/dist/cli/outcomes-H4YYAT5X.js +2865 -0
  244. package/dist/cli/outcomes-Z3P2JE67.mjs +2865 -0
  245. package/dist/cli/{play-SZXY2F2S.js → play-SM4CW2GS.js} +1116 -846
  246. package/dist/cli/{play-TTMABJEI.mjs → play-SN5YWLS7.mjs} +375 -105
  247. package/dist/cli/{providers-GQIOMRQO.mjs → providers-WZ4YBR5Y.mjs} +10 -10
  248. package/dist/cli/{providers-YDHCTZAF.js → providers-WZARYMCF.js} +13 -13
  249. package/dist/cli/{quickstart-PHSSMKCA.mjs → quickstart-2575BNKA.mjs} +7 -6
  250. package/dist/cli/{quickstart-BNYOXQXG.js → quickstart-PS4YHQJ6.js} +9 -8
  251. package/dist/cli/{run-GFIAZXVL.js → run-FLZ6OTM7.js} +51 -51
  252. package/dist/cli/{run-74C3C75C.mjs → run-ZUHCZOJS.mjs} +31 -31
  253. package/dist/cli/run-identity-LMLFMACS.js +31 -0
  254. package/dist/cli/{run-identity-MRNCEGV2.mjs → run-identity-MAZ7ANH5.mjs} +9 -3
  255. package/dist/cli/{search-3SWUB7KX.mjs → search-HLPPKQEO.mjs} +11 -11
  256. package/dist/cli/search-JJWVHR3N.js +32 -0
  257. package/dist/cli/{search-output-K2SWHVHQ.mjs → search-output-PDAXNOGP.mjs} +9 -8
  258. package/dist/cli/{search-output-6JF3S4TP.js → search-output-RXJLU36B.js} +12 -11
  259. package/dist/cli/{secrets-2M4XWEKE.mjs → secrets-CGELYQ3H.mjs} +11 -11
  260. package/dist/cli/{secrets-2SAKLH2H.js → secrets-QJNG7G2Y.js} +20 -20
  261. package/dist/cli/sessions-DHTBT2GN.js +23 -0
  262. package/dist/cli/{sessions-A64BCXTO.mjs → sessions-ELMWVR4M.mjs} +9 -8
  263. package/dist/cli/{settings-HV64WIJF.js → settings-44I44P5F.js} +89 -89
  264. package/dist/cli/{settings-SVGEC3FI.mjs → settings-RR3LZXL7.mjs} +16 -16
  265. package/dist/cli/{setup-EDC3NEJ3.mjs → setup-KGWRWH4B.mjs} +20 -19
  266. package/dist/cli/{setup-FHXOLQGQ.js → setup-KTEYOCJO.js} +60 -59
  267. package/dist/cli/skills-EPZPEXI2.js +37 -0
  268. package/dist/cli/{skills-3HGHZMXB.mjs → skills-FPRID2I5.mjs} +10 -9
  269. package/dist/cli/tools-IGQQ5TML.js +57 -0
  270. package/dist/cli/{tools-P2QS6A6Q.mjs → tools-PI4WMDLY.mjs} +23 -23
  271. package/dist/cli/update-4RNCVYGE.js +37 -0
  272. package/dist/cli/{update-552BYQM4.mjs → update-VJOJAZ7B.mjs} +14 -11
  273. package/dist/cli/{views-PA25NAE3.js → views-NTUOLNQU.js} +62 -64
  274. package/dist/cli/{views-LD5HXJYY.mjs → views-OVPSINZO.mjs} +47 -49
  275. package/dist/cli/{workflow-FIDBUQV6.js → workflow-2UDYDM6F.js} +23 -23
  276. package/dist/cli/{workflow-LDYFGBYP.mjs → workflow-7OEFNXZC.mjs} +13 -13
  277. package/dist/{client-DuDFiJDU.d.mts → client-B8f7RNF8.d.mts} +1 -1
  278. package/dist/{client-t9HZAkFD.d.ts → client-C5TgXmJQ.d.ts} +1 -1
  279. package/dist/{client-core-DydMQOft.d.mts → client-core-SLLGBTht.d.mts} +285 -23
  280. package/dist/{client-core-CJRzLanv.d.ts → client-core-p0sOxnkl.d.ts} +285 -23
  281. package/dist/{compiler-manifest-BqwVrOri.d.mts → compiler-manifest-D_zZEh9Q.d.mts} +70 -5
  282. package/dist/{compiler-manifest-BqwVrOri.d.ts → compiler-manifest-D_zZEh9Q.d.ts} +70 -5
  283. package/dist/{errors-BU8FB99X.d.mts → errors-CZCrBFrQ.d.mts} +1 -1
  284. package/dist/{errors-DfVN_FUG.d.ts → errors-DsUkLrdZ.d.ts} +1 -1
  285. package/dist/{index-BGnvtYGc.d.ts → index-B6RTOZGC.d.ts} +1 -1
  286. package/dist/{index-DjZgwpGw.d.mts → index-DeOVrEmX.d.mts} +1 -1
  287. package/dist/index.d.mts +7 -7
  288. package/dist/index.d.ts +7 -7
  289. package/dist/index.js +66 -55
  290. package/dist/index.mjs +25 -14
  291. package/dist/install-integrity.json +162 -142
  292. package/dist/plays/bundle-play-file.d.mts +3 -3
  293. package/dist/plays/bundle-play-file.d.ts +3 -3
  294. package/dist/plays/bundle-play-file.mjs +23 -4
  295. package/dist/plays/csv-data-input.js +3 -3
  296. package/dist/plays/csv-data-input.mjs +2 -2
  297. package/dist/plays/play-description.d.mts +2 -2
  298. package/dist/plays/play-description.d.ts +2 -2
  299. package/dist/plays/run-request.d.mts +2 -2
  300. package/dist/plays/run-request.d.ts +2 -2
  301. package/dist/plays/run-request.js +4 -4
  302. package/dist/plays/run-request.mjs +3 -3
  303. package/dist/release.d.mts +1 -1
  304. package/dist/release.d.ts +1 -1
  305. package/dist/release.js +2 -2
  306. package/dist/release.mjs +1 -1
  307. package/dist/server.d.mts +4 -4
  308. package/dist/server.d.ts +4 -4
  309. package/dist/server.js +15 -13
  310. package/dist/server.mjs +9 -7
  311. package/package.json +1 -1
  312. package/dist/cli/auth-B4PI7GVY.js +0 -43
  313. package/dist/cli/concurrent-runs-help-JEFQZTJI.js +0 -21
  314. package/dist/cli/describe-PXTSBJTL.js +0 -50
  315. package/dist/cli/describe-YGMQBV44.mjs +0 -50
  316. package/dist/cli/git-I3JV7IGH.js +0 -25
  317. package/dist/cli/org-5KD7X7IA.mjs +0 -1282
  318. package/dist/cli/org-YQ2CR32B.js +0 -1282
  319. package/dist/cli/run-identity-G257GQED.js +0 -25
  320. package/dist/cli/search-2RRRF4LW.js +0 -32
  321. package/dist/cli/sessions-SBH27JNW.js +0 -22
  322. package/dist/cli/skills-Y3SRLOYD.js +0 -36
  323. package/dist/cli/tools-OFYPUPUV.js +0 -57
  324. package/dist/cli/update-SOUSCLB7.js +0 -34
@@ -25,7 +25,7 @@ var _chunk4WAM6TLDjs = require('./chunk-4WAM6TLD.js');
25
25
 
26
26
 
27
27
 
28
- var _chunkSL6MYJYMjs = require('./chunk-SL6MYJYM.js');
28
+ var _chunkMJTVX4QKjs = require('./chunk-MJTVX4QK.js');
29
29
 
30
30
 
31
31
 
@@ -37,16 +37,32 @@ var _chunkPMH4GLMDjs = require('./chunk-PMH4GLMD.js');
37
37
 
38
38
 
39
39
 
40
- var _chunkPACD5DGCjs = require('./chunk-PACD5DGC.js');
40
+ var _chunkAGLR6QVNjs = require('./chunk-AGLR6QVN.js');
41
41
 
42
42
 
43
- var _chunkEITMD3A5js = require('./chunk-EITMD3A5.js');
43
+ var _chunk6VLFQZK6js = require('./chunk-6VLFQZK6.js');
44
44
 
45
45
 
46
46
 
47
47
 
48
48
 
49
- var _chunkBBTKAASQjs = require('./chunk-BBTKAASQ.js');
49
+ var _chunkLFQJW4S2js = require('./chunk-LFQJW4S2.js');
50
+
51
+ // ../integration-contracts/billing-plan-skus.ts
52
+ var PLAN_OFFER_SKUS = {
53
+ solo: "payg-v1",
54
+ builder: "builder-v1",
55
+ team: "growth-v1",
56
+ scale: "team-v2",
57
+ founding: "legacy-growth-v1",
58
+ enterprise: "enterprise-v1"
59
+ };
60
+ var PUBLIC_PLAN_SKUS = Object.keys(
61
+ PLAN_OFFER_SKUS
62
+ );
63
+ function resolvePublicPlanSku(sku) {
64
+ return Object.hasOwn(PLAN_OFFER_SKUS, sku) ? PLAN_OFFER_SKUS[sku] : sku;
65
+ }
50
66
 
51
67
  // src/pagination.ts
52
68
  async function* iterateCursorPages(fetchPage) {
@@ -80,7 +96,7 @@ function requireBillingIdempotencyKey(value) {
80
96
  }
81
97
  }
82
98
  if (!valid) {
83
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(
99
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(
84
100
  "Billing idempotencyKey must contain 1\u2013200 characters with no leading or trailing whitespace and be valid HTTP header text.",
85
101
  void 0,
86
102
  "INVALID_BILLING_IDEMPOTENCY_KEY"
@@ -92,23 +108,23 @@ function requireBillingIdempotencyKey(value) {
92
108
  // src/db/query.ts
93
109
  function planCustomerDbQuery(input, maxRetries = 3) {
94
110
  if (typeof input.sql !== "string" || !input.sql.trim())
95
- throw new (0, _chunkBBTKAASQjs.DeeplineError)("sql must not be empty.", 400, "INVALID_SQL");
111
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)("sql must not be empty.", 400, "INVALID_SQL");
96
112
  if (input.operationKey !== void 0 && typeof input.operationKey !== "string")
97
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(
113
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(
98
114
  "operationKey must be a string containing 1\u2013512 characters.",
99
115
  400,
100
116
  "INVALID_OPERATION_KEY"
101
117
  );
102
118
  const operationKey = input.operationKey;
103
119
  if (operationKey !== void 0 && (!operationKey.trim() || operationKey.length > 512)) {
104
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(
120
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(
105
121
  "operationKey must contain 1\u2013512 characters.",
106
122
  400,
107
123
  "INVALID_OPERATION_KEY"
108
124
  );
109
125
  }
110
126
  if (input.maxRows !== void 0 && (!Number.isSafeInteger(input.maxRows) || input.maxRows < 1 || input.maxRows > 1e3)) {
111
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(
127
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(
112
128
  "maxRows must be a whole number from 1 to 1000.",
113
129
  400,
114
130
  "INVALID_MAX_ROWS"
@@ -150,10 +166,10 @@ async function queryCustomerDatabase(http, input, maxRetries) {
150
166
  }
151
167
  );
152
168
  } catch (error) {
153
- if (error instanceof _chunkBBTKAASQjs.DeeplineError && (_optionalChain([error, 'access', _ => _.code, 'optionalAccess', _2 => _2.startsWith, 'call', _3 => _3("NETWORK_")]) || // Older API readers return PostgreSQL errors as HTTP 400, including
169
+ if (error instanceof _chunkLFQJW4S2js.DeeplineError && (_optionalChain([error, 'access', _ => _.code, 'optionalAccess', _2 => _2.startsWith, 'call', _3 => _3("NETWORK_")]) || // Older API readers return PostgreSQL errors as HTTP 400, including
154
170
  // lost connections and explicitly unknown transaction resolution.
155
171
  /^08[A-Z0-9]{3}$/.test(_nullishCoalesce(error.code, () => ( ""))) || ["57P01", "57P02", "57P03"].includes(_nullishCoalesce(error.code, () => ( ""))) || error.statusCode === 408 || (_nullishCoalesce(error.statusCode, () => ( 0))) >= 500)) {
156
- throw new (0, _chunkEITMD3A5js.CustomerDbQueryOutcomeUnknownError)(
172
+ throw new (0, _chunk6VLFQZK6js.CustomerDbQueryOutcomeUnknownError)(
157
173
  error,
158
174
  plan.request.body.operation_key
159
175
  );
@@ -161,8 +177,8 @@ async function queryCustomerDatabase(http, input, maxRetries) {
161
177
  throw error;
162
178
  }
163
179
  if (!result || typeof result !== "object" || Array.isArray(result) || typeof result.command !== "string" || !Array.isArray(result.columns) || !Array.isArray(result.rows) || typeof result.truncated !== "boolean" || result.row_count !== null && (!Number.isSafeInteger(result.row_count) || result.row_count < 0) || !Number.isSafeInteger(result.row_count_returned) || result.row_count_returned < 0) {
164
- throw new (0, _chunkEITMD3A5js.CustomerDbQueryOutcomeUnknownError)(
165
- new (0, _chunkBBTKAASQjs.DeeplineError)(
180
+ throw new (0, _chunk6VLFQZK6js.CustomerDbQueryOutcomeUnknownError)(
181
+ new (0, _chunkLFQJW4S2js.DeeplineError)(
166
182
  "The SQL response did not contain a valid result.",
167
183
  200,
168
184
  "CUSTOMER_DB_QUERY_RESPONSE_INVALID"
@@ -172,8 +188,8 @@ async function queryCustomerDatabase(http, input, maxRetries) {
172
188
  }
173
189
  const operation = result.operation;
174
190
  if (input.operationKey !== void 0 && (!operation || operation.operation_key !== input.operationKey || !Number.isSafeInteger(operation.completed_at_ms) || operation.completed_at_ms < 0 || !["executed", "operation_recovery"].includes(operation.source))) {
175
- throw new (0, _chunkEITMD3A5js.CustomerDbQueryOutcomeUnknownError)(
176
- new (0, _chunkBBTKAASQjs.DeeplineError)(
191
+ throw new (0, _chunk6VLFQZK6js.CustomerDbQueryOutcomeUnknownError)(
192
+ new (0, _chunkLFQJW4S2js.DeeplineError)(
177
193
  "The server did not confirm the original atomic SQL operation.",
178
194
  200,
179
195
  "CUSTOMER_DB_OPERATION_ACK_INVALID"
@@ -452,7 +468,7 @@ function usesExtendedBetterContactLauncherBudget(toolId) {
452
468
  var CLI_INVOCATION_ID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
453
469
  function validateCliInvocationId(value) {
454
470
  if (!CLI_INVOCATION_ID_PATTERN.test(value)) {
455
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(
471
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(
456
472
  "CLI invocation IDs must be UUID v4 values.",
457
473
  void 0,
458
474
  "CLI_INVOCATION_ID_INVALID"
@@ -468,7 +484,7 @@ var RAW_V2_EXECUTE_RESPONSE_CONTRACT = _chunk4WAM6TLDjs.RAW_V2_TOOL_RESPONSE_CON
468
484
  var DEFAULT_EXECUTION_RECOVERY_TIMEOUT_MS = 15 * 60 * 1e3;
469
485
  function validateExecutionIdempotencyKey(key) {
470
486
  if (typeof key !== "string" || key.length < 1 || key.length > 200 || !/^[A-Za-z0-9._:-]+$/.test(key)) {
471
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(
487
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(
472
488
  "Execution idempotency keys must be 1\u2013200 ASCII letters, digits, dots, underscores, colons, or hyphens.",
473
489
  void 0,
474
490
  "IDEMPOTENCY_KEY_INVALID"
@@ -481,20 +497,20 @@ function getExecutionRecoveryState(value) {
481
497
  return state === "running" || state === "completed" || state === "outcome_unknown" ? state : null;
482
498
  }
483
499
  function isRecoverableExecutionAttemptError(error) {
484
- if (error instanceof _chunkBBTKAASQjs.ToolExecutionError) {
500
+ if (error instanceof _chunkLFQJW4S2js.ToolExecutionError) {
485
501
  return error.code === "EXECUTION_IN_PROGRESS" || error.origin === "deepline" && error.category === "network" && error.networkScope === "client_to_deepline";
486
502
  }
487
- return error instanceof _chunkBBTKAASQjs.DeeplineError && (error.code === "EXECUTION_IN_PROGRESS" || _optionalChain([error, 'access', _9 => _9.code, 'optionalAccess', _10 => _10.startsWith, 'call', _11 => _11("NETWORK_")]) === true && error.statusCode === void 0);
503
+ return error instanceof _chunkLFQJW4S2js.DeeplineError && (error.code === "EXECUTION_IN_PROGRESS" || _optionalChain([error, 'access', _9 => _9.code, 'optionalAccess', _10 => _10.startsWith, 'call', _11 => _11("NETWORK_")]) === true && error.statusCode === void 0);
488
504
  }
489
505
  function isRecoverableExecutionLookupError(error) {
490
506
  if (isRecoverableExecutionAttemptError(error)) return true;
491
- return error instanceof _chunkBBTKAASQjs.DeeplineError && (error.statusCode === 429 || error.statusCode !== void 0 && error.statusCode >= 500);
507
+ return error instanceof _chunkLFQJW4S2js.DeeplineError && (error.statusCode === 429 || error.statusCode !== void 0 && error.statusCode >= 500);
492
508
  }
493
509
  function timeoutWithinRecoveryBudget(requestTimeoutMs, defaultRequestTimeoutMs, remainingMs) {
494
510
  return Math.min(_nullishCoalesce(requestTimeoutMs, () => ( defaultRequestTimeoutMs)), remainingMs);
495
511
  }
496
512
  function executionRecoveryError(input) {
497
- return new (0, _chunkBBTKAASQjs.ToolExecutionError)(input.message, {
513
+ return new (0, _chunkLFQJW4S2js.ToolExecutionError)(input.message, {
498
514
  toolId: input.toolId,
499
515
  provider: null,
500
516
  operation: input.toolId,
@@ -537,7 +553,7 @@ function resolveToolExecuteTimeoutMs(toolId, input, configuredRequestTimeoutMs)
537
553
  if (usesExtendedBetterContactLauncherBudget(normalized)) {
538
554
  return BETTERCONTACT_LAUNCHER_CLIENT_TIMEOUT_MS;
539
555
  }
540
- return normalized === "deeplineagent" || normalized === "deeplineagent_deeplineagent" || normalized === "ai_inference" || normalized === "deeplineagent_ai_inference" || normalized === "ai_evaluate" || normalized === "deeplineagent_ai_evaluate" || normalized === "aiinference" ? DEEPLINEAGENT_EXECUTE_TIMEOUT_MS : void 0;
556
+ return normalized === "deeplineagent" || normalized === "deeplineagent_deeplineagent" || normalized === "ai_inference" || normalized === "deeplineagent_ai_inference" || normalized === "ai_evaluate" || normalized === "deeplineagent_ai_evaluate" || normalized === "ai_decision" || normalized === "aiinference" ? DEEPLINEAGENT_EXECUTE_TIMEOUT_MS : void 0;
541
557
  }
542
558
  function isRecord(value) {
543
559
  return Boolean(value && typeof value === "object" && !Array.isArray(value));
@@ -595,8 +611,8 @@ var ToolCalls = class {
595
611
  async call(toolId, input, options) {
596
612
  const connection = _optionalChain([options, 'optionalAccess', _12 => _12.connection]);
597
613
  if (connection !== void 0 && (!_chunk4WAM6TLDjs.isToolConnectionName.call(void 0, connection) || _optionalChain([options, 'optionalAccess', _13 => _13.idempotencyKey]) !== void 0 || _optionalChain([options, 'optionalAccess', _14 => _14.recover]))) {
598
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(
599
- "Use a valid workspace connection name without execution recovery.",
614
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(
615
+ "Use a valid org connection name without execution recovery.",
600
616
  400,
601
617
  "NAMED_CONNECTION_INVALID"
602
618
  );
@@ -610,7 +626,7 @@ var ToolCalls = class {
610
626
  if (idempotencyKey !== void 0) {
611
627
  validateExecutionIdempotencyKey(idempotencyKey);
612
628
  if (_optionalChain([options, 'optionalAccess', _19 => _19.recoveryTimeoutMs]) !== void 0 && (!Number.isFinite(options.recoveryTimeoutMs) || options.recoveryTimeoutMs < 0)) {
613
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(
629
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(
614
630
  "recoveryTimeoutMs must be a finite, non-negative number.",
615
631
  void 0,
616
632
  "IDEMPOTENCY_KEY_INVALID"
@@ -627,8 +643,8 @@ var ToolCalls = class {
627
643
  const headers = {
628
644
  [EXECUTE_RESPONSE_CONTRACT_HEADER]: RAW_V2_EXECUTE_RESPONSE_CONTRACT,
629
645
  ...isApifySync ? { "X-Deepline-Apify-Sync-Response-Budget": "extended-v1" } : {},
630
- [_chunkBBTKAASQjs.TOOL_EXECUTION_ERROR_SCHEMA_HEADER]: String(
631
- _chunkBBTKAASQjs.TOOL_EXECUTION_ERROR_SCHEMA_VERSION
646
+ [_chunkLFQJW4S2js.TOOL_EXECUTION_ERROR_SCHEMA_HEADER]: String(
647
+ _chunkLFQJW4S2js.TOOL_EXECUTION_ERROR_SCHEMA_VERSION
632
648
  ),
633
649
  ..._optionalChain([options, 'optionalAccess', _23 => _23.includeToolMetadata]) ? { [INCLUDE_TOOL_METADATA_HEADER]: "true" } : {},
634
650
  [EXECUTE_RESPONSE_INTENT_HEADER]: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _24 => _24.responseIntent]), () => ( "raw")),
@@ -641,7 +657,7 @@ var ToolCalls = class {
641
657
  if (!lastResponse) return;
642
658
  if (failure) {
643
659
  const { error } = failure;
644
- if (isRecoverableExecutionAttemptError(error) || !(error instanceof _chunkBBTKAASQjs.DeeplineError) || error.statusCode === void 0 || error.statusCode !== lastResponse.httpStatus || error.code === "EXECUTION_OUTCOME_UNKNOWN")
660
+ if (isRecoverableExecutionAttemptError(error) || !(error instanceof _chunkLFQJW4S2js.DeeplineError) || error.statusCode === void 0 || error.statusCode !== lastResponse.httpStatus || error.code === "EXECUTION_OUTCOME_UNKNOWN")
645
661
  return;
646
662
  }
647
663
  const body = lastResponse.body;
@@ -689,7 +705,7 @@ var ToolCalls = class {
689
705
  idempotencyKey,
690
706
  onResponse: (response2) => {
691
707
  lastResponse = null;
692
- atomicToolsSupported = response2.headers.get(_chunkPACD5DGCjs.ATOMIC_TOOL_EXECUTE_SUPPORTED_HEADER) === "true";
708
+ atomicToolsSupported = response2.headers.get(_chunkAGLR6QVNjs.ATOMIC_TOOL_EXECUTE_SUPPORTED_HEADER) === "true";
693
709
  recoverySupported = response2.headers.get("X-Deepline-Idempotency-Supported") === "true";
694
710
  if (_optionalChain([options, 'optionalAccess', _33 => _33.onServerTiming])) {
695
711
  try {
@@ -713,8 +729,8 @@ var ToolCalls = class {
713
729
  } catch (error) {
714
730
  if (connection !== void 0) throw error;
715
731
  if (atomicToolOnly) {
716
- if (!atomicToolsSupported && !recoverySupported && !(error instanceof _chunkBBTKAASQjs.ToolExecutionError) && error instanceof _chunkBBTKAASQjs.DeeplineError && (error.statusCode === 404 || error.statusCode === 405)) {
717
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(
732
+ if (!atomicToolsSupported && !recoverySupported && !(error instanceof _chunkLFQJW4S2js.ToolExecutionError) && error instanceof _chunkLFQJW4S2js.DeeplineError && (error.statusCode === 404 || error.statusCode === 405)) {
733
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(
718
734
  "This server does not support atomic tool execution.",
719
735
  error.statusCode,
720
736
  "ATOMIC_TOOL_EXECUTE_UNSUPPORTED"
@@ -722,7 +738,7 @@ var ToolCalls = class {
722
738
  }
723
739
  throw error;
724
740
  }
725
- if (useLegacyEndpoint || recoverySupported || !(error instanceof _chunkBBTKAASQjs.DeeplineError) || error.statusCode !== 404 && error.statusCode !== 405)
741
+ if (useLegacyEndpoint || recoverySupported || !(error instanceof _chunkLFQJW4S2js.DeeplineError) || error.statusCode !== 404 && error.statusCode !== 405)
726
742
  throw error;
727
743
  lastResponse = null;
728
744
  await this.lookupExecutionByKey(
@@ -811,7 +827,7 @@ var ToolCalls = class {
811
827
  recoveryDeadline = Date.now() + recoveryTimeoutMs;
812
828
  }
813
829
  } catch (error) {
814
- if (idempotencyKey && error instanceof _chunkBBTKAASQjs.DeeplineError && error.code === "EXECUTION_OUTCOME_UNKNOWN") {
830
+ if (idempotencyKey && error instanceof _chunkLFQJW4S2js.DeeplineError && error.code === "EXECUTION_OUTCOME_UNKNOWN") {
815
831
  throw executionRecoveryError({
816
832
  toolId,
817
833
  idempotencyKey,
@@ -846,7 +862,7 @@ var ToolCalls = class {
846
862
  validateExecutionIdempotencyKey(idempotencyKey);
847
863
  const result = await this.lookupExecutionByKey(idempotencyKey);
848
864
  if (!result) {
849
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(
865
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(
850
866
  `No execution exists for idempotency key ${idempotencyKey}.`,
851
867
  404,
852
868
  "EXECUTION_NOT_FOUND"
@@ -872,7 +888,7 @@ var ToolCalls = class {
872
888
  }
873
889
  );
874
890
  if (!supported) {
875
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(
891
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(
876
892
  "This Deepline server does not support recoverable tool executions; no tool was dispatched.",
877
893
  422,
878
894
  "IDEMPOTENCY_NOT_SUPPORTED"
@@ -958,7 +974,7 @@ function resolvePlayRunRuntimeSelection(request, env) {
958
974
  if (request.runtime !== void 0) {
959
975
  const runtime = normalizePlayRunRuntimeSelection(request.runtime);
960
976
  if (!runtime) {
961
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(
977
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(
962
978
  '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" }.',
963
979
  void 0,
964
980
  "INVALID_RUNTIME_SELECTION"
@@ -971,7 +987,7 @@ function resolvePlayRunRuntimeSelection(request, env) {
971
987
  const configuredToken = _optionalChain([env, 'access', _43 => _43.DEEPLINE_RUNTIME_ENVIRONMENT_TOKEN, 'optionalAccess', _44 => _44.trim, 'call', _45 => _45()]);
972
988
  const configuredPlacementPolicy = _optionalChain([env, 'access', _46 => _46.DEEPLINE_RUNTIME_SANDBOX_PLACEMENT_POLICY, 'optionalAccess', _47 => _47.trim, 'call', _48 => _48()]);
973
989
  if (_optionalChain([env, 'access', _49 => _49.DEEPLINE_RUNTIME_GATEWAY_PROFILE, 'optionalAccess', _50 => _50.trim, 'call', _51 => _51()])) {
974
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(
990
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(
975
991
  "DEEPLINE_RUNTIME_GATEWAY_PROFILE was removed: Runtime gateway profiles (vercel_app@1) are no longer available. Unset it to run on the default gateways.",
976
992
  void 0,
977
993
  "RUNTIME_GATEWAY_PROFILE_REMOVED"
@@ -986,7 +1002,7 @@ function resolvePlayRunRuntimeSelection(request, env) {
986
1002
  present.push("DEEPLINE_RUNTIME_SANDBOX_PLACEMENT_POLICY");
987
1003
  }
988
1004
  const isPlural = present.length > 1;
989
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(
1005
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(
990
1006
  [
991
1007
  `Incomplete play runtime selection: ${present.join(" and ")} ${isPlural ? "are" : "is"} set but DEEPLINE_RUNTIME_ENVIRONMENT is not.`,
992
1008
  "Preview routing requires DEEPLINE_RUNTIME_ENVIRONMENT=preview together with DEEPLINE_RUNTIME_NAMESPACE; the token alone authorizes nothing.",
@@ -1004,7 +1020,7 @@ function resolvePlayRunRuntimeSelection(request, env) {
1004
1020
  configuredPlacementPolicy
1005
1021
  );
1006
1022
  if (configuredNamespace || !sandboxPlacementPolicy) {
1007
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(
1023
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(
1008
1024
  "DEEPLINE_RUNTIME_ENVIRONMENT=native requires DEEPLINE_RUNTIME_SANDBOX_PLACEMENT_POLICY (such as modal_only@1) and no DEEPLINE_RUNTIME_NAMESPACE.",
1009
1025
  void 0,
1010
1026
  "INVALID_RUNTIME_ENVIRONMENT"
@@ -1014,7 +1030,7 @@ function resolvePlayRunRuntimeSelection(request, env) {
1014
1030
  }
1015
1031
  const environment = normalizePlayRuntimeEnvironment(configured);
1016
1032
  if (!environment) {
1017
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(
1033
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(
1018
1034
  `DEEPLINE_RUNTIME_ENVIRONMENT must be preview or native. Received "${configured}". Omit it to use the app-native runtime.`,
1019
1035
  void 0,
1020
1036
  "INVALID_RUNTIME_ENVIRONMENT"
@@ -1022,7 +1038,7 @@ function resolvePlayRunRuntimeSelection(request, env) {
1022
1038
  }
1023
1039
  const namespace = normalizePlayRuntimeNamespace(configuredNamespace);
1024
1040
  if (!namespace) {
1025
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(
1041
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(
1026
1042
  "DEEPLINE_RUNTIME_NAMESPACE is required for preview and must match ^[a-z][a-z0-9-]{0,30}$.",
1027
1043
  void 0,
1028
1044
  "INVALID_RUNTIME_NAMESPACE"
@@ -1031,14 +1047,14 @@ function resolvePlayRunRuntimeSelection(request, env) {
1031
1047
  const configuredBackendValue = _optionalChain([env, 'access', _52 => _52.DEEPLINE_PLAY_RUNNER_BACKEND, 'optionalAccess', _53 => _53.trim, 'call', _54 => _54()]);
1032
1048
  const configuredBackend = configuredBackendValue === "daytona" || configuredBackendValue === "modal" ? configuredBackendValue : void 0;
1033
1049
  if (configuredBackendValue && !configuredBackend) {
1034
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(
1050
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(
1035
1051
  `DEEPLINE_PLAY_RUNNER_BACKEND must be daytona or modal for preview runtime selection. Received "${configuredBackendValue}".`,
1036
1052
  void 0,
1037
1053
  "INVALID_RUNTIME_BACKEND"
1038
1054
  );
1039
1055
  }
1040
1056
  if (configuredPlacementPolicy && !normalizePlayRuntimeSandboxPlacementPolicy(configuredPlacementPolicy)) {
1041
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(
1057
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(
1042
1058
  `DEEPLINE_RUNTIME_SANDBOX_PLACEMENT_POLICY must be a versioned placement policy id such as daytona_only@1. Received "${configuredPlacementPolicy}".`,
1043
1059
  void 0,
1044
1060
  "INVALID_RUNTIME_SANDBOX_PLACEMENT_POLICY"
@@ -1068,7 +1084,7 @@ function runtimeSelectionHeaders(runtime, env) {
1068
1084
  if (!runtime || runtime.environment === "native") return void 0;
1069
1085
  const token = _optionalChain([env, 'access', _55 => _55.DEEPLINE_RUNTIME_ENVIRONMENT_TOKEN, 'optionalAccess', _56 => _56.trim, 'call', _57 => _57()]);
1070
1086
  if (!token) {
1071
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(
1087
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(
1072
1088
  "DEEPLINE_RUNTIME_ENVIRONMENT_TOKEN is required for explicit preview runtime selection.",
1073
1089
  void 0,
1074
1090
  "RUNTIME_ENVIRONMENT_TOKEN_REQUIRED"
@@ -1076,21 +1092,21 @@ function runtimeSelectionHeaders(runtime, env) {
1076
1092
  }
1077
1093
  const receivers = _optionalChain([env, 'access', _58 => _58.DEEPLINE_RUNTIME_RETAINED_PIPELINE_RECEIVERS, 'optionalAccess', _59 => _59.trim, 'call', _60 => _60()]);
1078
1094
  return {
1079
- [_chunkPACD5DGCjs.RUNTIME_ENVIRONMENT_TOKEN_HEADER]: token,
1080
- ...receivers ? { [_chunkPACD5DGCjs.RETAINED_PIPELINE_RECEIVERS_HEADER]: receivers } : {}
1095
+ [_chunkAGLR6QVNjs.RUNTIME_ENVIRONMENT_TOKEN_HEADER]: token,
1096
+ ...receivers ? { [_chunkAGLR6QVNjs.RETAINED_PIPELINE_RECEIVERS_HEADER]: receivers } : {}
1081
1097
  };
1082
1098
  }
1083
1099
  function playRunStartHeaders(runtime, env) {
1084
1100
  const headers = runtimeSelectionHeaders(runtime, env);
1085
1101
  const experimentSwitches = _optionalChain([env, 'access', _61 => _61.DEEPLINE_EXPERIMENT_SWITCHES, 'optionalAccess', _62 => _62.trim, 'call', _63 => _63()]);
1086
1102
  if (!experimentSwitches) return headers;
1087
- return { ...headers, [_chunkPACD5DGCjs.EXPERIMENT_SWITCHES_HEADER]: experimentSwitches };
1103
+ return { ...headers, [_chunkAGLR6QVNjs.EXPERIMENT_SWITCHES_HEADER]: experimentSwitches };
1088
1104
  }
1089
1105
  function normalizeTestPolicyOverrides(value, source) {
1090
1106
  if (value && typeof value === "object" && !Array.isArray(value)) {
1091
1107
  return value;
1092
1108
  }
1093
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(
1109
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(
1094
1110
  `${source} must be a JSON object.`,
1095
1111
  void 0,
1096
1112
  "INVALID_TEST_POLICY_OVERRIDES"
@@ -1105,7 +1121,7 @@ function parseEnvTestPolicyOverrides(env) {
1105
1121
  parsed = JSON.parse(trimmed);
1106
1122
  } catch (error) {
1107
1123
  const detail = error instanceof Error ? ` ${error.message}` : "";
1108
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(
1124
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(
1109
1125
  `DEEPLINE_TEST_POLICY_OVERRIDES must be valid JSON.${detail}`,
1110
1126
  void 0,
1111
1127
  "INVALID_TEST_POLICY_OVERRIDES"
@@ -1117,10 +1133,10 @@ function isRecord2(value) {
1117
1133
  return Boolean(value && typeof value === "object" && !Array.isArray(value));
1118
1134
  }
1119
1135
  function normalizePlayStatus(raw) {
1120
- const runPackage = _chunkSL6MYJYMjs.isPlayRunPackage.call(void 0, raw) ? raw : _chunkSL6MYJYMjs.isPlayRunPackage.call(void 0, raw.package) ? raw.package : null;
1136
+ const runPackage = _chunkMJTVX4QKjs.isPlayRunPackage.call(void 0, raw) ? raw : _chunkMJTVX4QKjs.isPlayRunPackage.call(void 0, raw.package) ? raw.package : null;
1121
1137
  const packageRun = _optionalChain([runPackage, 'optionalAccess', _66 => _66.run]);
1122
1138
  const rawStatus = typeof raw.status === "string" ? raw.status : typeof _optionalChain([packageRun, 'optionalAccess', _67 => _67.status]) === "string" ? packageRun.status : null;
1123
- const status = _chunkSL6MYJYMjs.decodePlayRunPublicStatus.call(void 0, rawStatus);
1139
+ const status = _chunkMJTVX4QKjs.decodePlayRunPublicStatus.call(void 0, rawStatus);
1124
1140
  if (!status) {
1125
1141
  throw new Error(
1126
1142
  `Invalid play run lifecycle status in API response: ${JSON.stringify(rawStatus)}.`
@@ -1151,10 +1167,10 @@ var PlayClient = class {
1151
1167
  async startPlayRun(request, options) {
1152
1168
  const resolved = resolveStartPlayRunRequest(request, this.environment);
1153
1169
  const headers = playRunStartHeaders(resolved.runtime, this.environment);
1154
- return _chunkSL6MYJYMjs.startPlayRun.call(void 0,
1170
+ return _chunkMJTVX4QKjs.startPlayRun.call(void 0,
1155
1171
  this.http,
1156
1172
  resolved.request,
1157
- _optionalChain([options, 'optionalAccess', _71 => _71.cliAdmission]) ? { ...headers, "X-Deepline-API-Major": String(_chunkPACD5DGCjs.SDK_API_MAJOR) } : headers,
1173
+ _optionalChain([options, 'optionalAccess', _71 => _71.cliAdmission]) ? { ...headers, "X-Deepline-API-Major": String(_chunkAGLR6QVNjs.SDK_API_MAJOR) } : headers,
1158
1174
  options
1159
1175
  );
1160
1176
  }
@@ -1428,13 +1444,13 @@ function stripLeadingTimestamp(line) {
1428
1444
 
1429
1445
  // src/runs/read-errors.ts
1430
1446
  function isTransientPlayRunReadError(error) {
1431
- if (error instanceof _chunkBBTKAASQjs.DeeplineError && error.code === "PLAY_START_OUTCOME_UNKNOWN") {
1447
+ if (error instanceof _chunkLFQJW4S2js.DeeplineError && error.code === "PLAY_START_OUTCOME_UNKNOWN") {
1432
1448
  return false;
1433
1449
  }
1434
- if (error instanceof _chunkBBTKAASQjs.DeeplineError && error.code === "PLAY_STREAM_NETWORK_ABORTED") {
1450
+ if (error instanceof _chunkLFQJW4S2js.DeeplineError && error.code === "PLAY_STREAM_NETWORK_ABORTED") {
1435
1451
  return true;
1436
1452
  }
1437
- if (error instanceof _chunkBBTKAASQjs.DeeplineError && typeof error.statusCode === "number") {
1453
+ if (error instanceof _chunkLFQJW4S2js.DeeplineError && typeof error.statusCode === "number") {
1438
1454
  return error.statusCode >= 500 && error.statusCode < 600;
1439
1455
  }
1440
1456
  const text = error instanceof Error ? error.message : String(error);
@@ -2421,7 +2437,7 @@ function isStopAllPlayRunsDryRunResult(result) {
2421
2437
  // src/integrations.ts
2422
2438
  var CALENDAR_PROVIDER = "google_calendar_availability";
2423
2439
  function invalid(message) {
2424
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(message, 400, "INVALID_ARGUMENT");
2440
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(message, 400, "INVALID_ARGUMENT");
2425
2441
  }
2426
2442
  async function findConnection(client, name, provider) {
2427
2443
  const { connections } = await client.listWorkspaceConnectionInventory(
@@ -2432,8 +2448,8 @@ async function findConnection(client, name, provider) {
2432
2448
  (row) => row.name === name && (!provider || row.provider === provider)
2433
2449
  );
2434
2450
  if (matches.length === 0)
2435
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(
2436
- `No workspace connection named ${JSON.stringify(name)}. Run deepline integrations list --json.`,
2451
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(
2452
+ `No org connection named ${JSON.stringify(name)}. Run deepline integrations list --json.`,
2437
2453
  404,
2438
2454
  "NOT_FOUND"
2439
2455
  );
@@ -2449,9 +2465,11 @@ async function changeConnection(client, action, name, options) {
2449
2465
  invalid("Use --list-calendars with Google Workspace verify or reconnect.");
2450
2466
  if (row.type === "workspace_delegation") {
2451
2467
  if (row.provider !== CALENDAR_PROVIDER || !row.domain)
2452
- invalid("The workspace approval is missing its provider or domain.");
2468
+ invalid(
2469
+ "The Google Workspace approval is missing its provider or domain."
2470
+ );
2453
2471
  if (row.authorizationVersion === void 0)
2454
- invalid("The API did not return a workspace approval revision.");
2472
+ invalid("The API did not return a Google Workspace approval revision.");
2455
2473
  if (action === "reconnect") {
2456
2474
  return verifyWorkspace(client, row.domain, options, row);
2457
2475
  }
@@ -2504,7 +2522,7 @@ async function verifyWorkspace(client, domain, options, existing) {
2504
2522
  grantedScopes: existing.scopes
2505
2523
  } : await client.getCalendarDelegation(void 0, void 0, domain);
2506
2524
  if (settings.grantRevision === void 0)
2507
- invalid("The API did not return a workspace approval revision.");
2525
+ invalid("The API did not return a Google Workspace approval revision.");
2508
2526
  const requestedScopes = [
2509
2527
  .../* @__PURE__ */ new Set([
2510
2528
  _chunk4WAM6TLDjs.GOOGLE_WORKSPACE_AVAILABILITY_SCOPE,
@@ -2646,6 +2664,7 @@ var RUNTIME_RECEIPT_COMPLETION_BUFFER_MAX_BYTES = 32 * 1024 * 1024;
2646
2664
  var RUNTIME_RECEIPT_CONTROL_BUFFER_MAX_BYTES = 2 * 1024 * 1024;
2647
2665
  var RUNNER_TERMINAL_PUSH_MAX_BODY_BYTES = 16 * 1024 * 1024;
2648
2666
  var RUNTIME_SHEET_START_TARGET_BODY_BYTES = 12 * 1024 * 1024;
2667
+ var RUNTIME_SHEET_START_TARGET_RESPONSE_BYTES = 1024 * 1024;
2649
2668
  var RUNTIME_RECEIPT_GATEWAY_BATCH_MAX_BYTES = 12 * 1024 * 1024;
2650
2669
  var RUNTIME_RECEIPT_WRITER_TARGET_BATCH_BYTES = 8 * 1024 * 1024;
2651
2670
  var RUNNER_POST_TERMINAL_DIAGNOSTIC_MAX_BYTES = 64 * 1024;
@@ -2841,7 +2860,7 @@ var TERMINAL_STATUS_BY_EVENT_TYPE = {
2841
2860
 
2842
2861
  // ../play-runtime/run-snapshot-stream.ts
2843
2862
  function isTerminalPlayRunLiveStatus(status) {
2844
- return _chunkSL6MYJYMjs.isTerminalPlayRunLifecycleStatus.call(void 0, status);
2863
+ return _chunkMJTVX4QKjs.isTerminalPlayRunLifecycleStatus.call(void 0, status);
2845
2864
  }
2846
2865
  function makeRunStreamEvent(input) {
2847
2866
  return {
@@ -3076,9 +3095,11 @@ var RUN_WATCH_STARTUP_POLL_INTERVAL_MS = 300;
3076
3095
  var RUN_WATCH_STARTUP_WINDOW_MS = 6e3;
3077
3096
  var RUN_WATCH_INTERACTIVE_POLL_INTERVAL_MS = 500;
3078
3097
  var RUN_WATCH_INTERACTIVE_WINDOW_MS = 3e4;
3079
- var RUN_WATCH_SERVER_WAIT_MS = 0;
3080
- var RUN_WATCH_SERVER_WAIT_FROM_START = false;
3098
+ var RUN_WATCH_SERVER_WAIT_MS = 2e4;
3099
+ var RUN_WATCH_SERVER_WAIT_FROM_START = true;
3100
+ var RUN_WATCH_HOLD_HEADER = "x-deepline-run-watch-hold";
3081
3101
  var TERMINAL_LOG_PROJECTION_RETRY_LIMIT = 3;
3102
+ var TERMINAL_LOG_PROJECTION_RETRY_INTERVAL_MS = 250;
3082
3103
  function waitForNextPoll(ms, signal) {
3083
3104
  if (_optionalChain([signal, 'optionalAccess', _118 => _118.aborted])) {
3084
3105
  return Promise.resolve(false);
@@ -3172,14 +3193,16 @@ async function* watchRunEvents(options) {
3172
3193
  let outageNoticeSent = false;
3173
3194
  let pollCount = 0;
3174
3195
  let terminalLogProjectionRetries = 0;
3196
+ let serverHoldDeclined = false;
3175
3197
  while (!_optionalChain([signal, 'optionalAccess', _123 => _123.aborted])) {
3176
3198
  const pollStartedAt = Date.now();
3177
3199
  const poll = ++pollCount;
3178
3200
  const watchedMs = pollStartedAt - watchStartedAt;
3179
3201
  const pastStartup = watchedMs >= RUN_WATCH_STARTUP_WINDOW_MS;
3180
3202
  const pastInteractive = watchedMs >= RUN_WATCH_INTERACTIVE_WINDOW_MS;
3181
- const serverWaitMs = options.pollIntervalMs === void 0 && options.deferLogs && (pastStartup || RUN_WATCH_SERVER_WAIT_FROM_START) && RUN_WATCH_SERVER_WAIT_MS > 0 ? RUN_WATCH_SERVER_WAIT_MS : 0;
3182
- const pollIntervalMs = _nullishCoalesce(options.pollIntervalMs, () => ( (serverWaitMs > 0 ? 0 : pastInteractive ? RUN_WATCH_POLL_INTERVAL_MS : pastStartup ? RUN_WATCH_INTERACTIVE_POLL_INTERVAL_MS : RUN_WATCH_STARTUP_POLL_INTERVAL_MS)));
3203
+ const serverWaitMs = options.pollIntervalMs === void 0 && options.deferLogs && !serverHoldDeclined && (pastStartup || RUN_WATCH_SERVER_WAIT_FROM_START) && RUN_WATCH_SERVER_WAIT_MS > 0 ? RUN_WATCH_SERVER_WAIT_MS : 0;
3204
+ const clientPollIntervalMs = _nullishCoalesce(options.pollIntervalMs, () => ( (pastInteractive ? RUN_WATCH_POLL_INTERVAL_MS : pastStartup ? RUN_WATCH_INTERACTIVE_POLL_INTERVAL_MS : RUN_WATCH_STARTUP_POLL_INTERVAL_MS)));
3205
+ const pollIntervalMs = clientPollIntervalMs;
3183
3206
  let snapshot;
3184
3207
  let terminalStatus;
3185
3208
  let responseStatus;
@@ -3203,10 +3226,13 @@ async function* watchRunEvents(options) {
3203
3226
  serverWaitMs > 0 ? `${path}&waitForTerminalMs=${serverWaitMs}` : path,
3204
3227
  {
3205
3228
  signal,
3206
- ...options.onPoll ? {
3229
+ ...options.onPoll || serverWaitMs > 0 ? {
3207
3230
  onResponse: (response2) => {
3208
3231
  responseStatus = response2.status;
3209
3232
  serverTiming = _nullishCoalesce(response2.headers.get("server-timing"), () => ( void 0));
3233
+ if (serverWaitMs > 0 && response2.ok && response2.headers.get(RUN_WATCH_HOLD_HEADER) !== "applied") {
3234
+ serverHoldDeclined = true;
3235
+ }
3210
3236
  }
3211
3237
  } : {}
3212
3238
  }
@@ -3226,7 +3252,9 @@ async function* watchRunEvents(options) {
3226
3252
  if (_optionalChain([signal, 'optionalAccess', _124 => _124.aborted])) {
3227
3253
  return;
3228
3254
  }
3229
- if (!isTransientPlayRunReadError(error)) {
3255
+ const heldTimeout = serverWaitMs > 0 && error instanceof _chunkLFQJW4S2js.DeeplineError && error.code === "NETWORK_TIMEOUT";
3256
+ if (heldTimeout) serverHoldDeclined = true;
3257
+ if (!heldTimeout && !isTransientPlayRunReadError(error)) {
3230
3258
  throw error;
3231
3259
  }
3232
3260
  consecutiveFailures += 1;
@@ -3262,7 +3290,7 @@ async function* watchRunEvents(options) {
3262
3290
  terminalLogProjectionRetries += 1;
3263
3291
  const remaining2 = Math.max(
3264
3292
  0,
3265
- pollIntervalMs - (Date.now() - pollStartedAt)
3293
+ Math.min(pollIntervalMs, TERMINAL_LOG_PROJECTION_RETRY_INTERVAL_MS) - (Date.now() - pollStartedAt)
3266
3294
  );
3267
3295
  if (!await waitForNextPoll(remaining2, signal)) return;
3268
3296
  continue;
@@ -3300,7 +3328,7 @@ async function* watchRunEvents(options) {
3300
3328
 
3301
3329
  // src/client-core.ts
3302
3330
  function invalidToolDiscoveryResponse() {
3303
- return new (0, _chunkBBTKAASQjs.DeeplineError)(
3331
+ return new (0, _chunkLFQJW4S2js.DeeplineError)(
3304
3332
  "The server returned an invalid tool discovery response.",
3305
3333
  502,
3306
3334
  "INVALID_TOOL_DISCOVERY_RESPONSE"
@@ -3377,19 +3405,19 @@ function isolatedCiRuntimeEventReadHeaders(env) {
3377
3405
  }
3378
3406
  const token = _optionalChain([env, 'access', _148 => _148.DEEPLINE_INTERNAL_TOKEN, 'optionalAccess', _149 => _149.trim, 'call', _150 => _150()]);
3379
3407
  if (!token) {
3380
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(
3408
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(
3381
3409
  "DEEPLINE_INTERNAL_TOKEN is required for isolated CI runtime event reads.",
3382
3410
  void 0,
3383
3411
  "RUNTIME_EVENT_INTERNAL_TOKEN_REQUIRED"
3384
3412
  );
3385
3413
  }
3386
- return { [_chunkPACD5DGCjs.COORDINATOR_INTERNAL_TOKEN_HEADER]: token };
3414
+ return { [_chunkAGLR6QVNjs.COORDINATOR_INTERNAL_TOKEN_HEADER]: token };
3387
3415
  }
3388
3416
  function sleep(ms) {
3389
3417
  return new Promise((resolve) => setTimeout(resolve, ms));
3390
3418
  }
3391
3419
  function isTransientCompileManifestError(error) {
3392
- if (error instanceof _chunkBBTKAASQjs.DeeplineError && typeof error.statusCode === "number") {
3420
+ if (error instanceof _chunkLFQJW4S2js.DeeplineError && typeof error.statusCode === "number") {
3393
3421
  return error.statusCode === 408 || error.statusCode === 425 || error.statusCode === 499 || error.statusCode >= 500 && error.statusCode < 600;
3394
3422
  }
3395
3423
  const message = error instanceof Error ? error.message : String(error);
@@ -3400,7 +3428,7 @@ function isTransientCompileManifestError(error) {
3400
3428
  function requireCompileManifestResponse(response, playName) {
3401
3429
  const compilerManifest = _optionalChain([response, 'optionalAccess', _151 => _151.compilerManifest]);
3402
3430
  if (!compilerManifest || typeof compilerManifest !== "object" || Array.isArray(compilerManifest)) {
3403
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(
3431
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(
3404
3432
  `Compile manifest response did not include compilerManifest for ${playName}.`,
3405
3433
  502,
3406
3434
  "API_RESPONSE_INVALID",
@@ -3514,7 +3542,7 @@ function playLiveRunStatus(event) {
3514
3542
  return null;
3515
3543
  }
3516
3544
  const payload = getPlayLiveEventPayload(event);
3517
- return _nullishCoalesce(_chunkSL6MYJYMjs.decodePlayRunPublicStatus.call(void 0, payload.status), () => ( (_chunkSL6MYJYMjs.isPlayRunPackage.call(void 0, payload) ? _chunkSL6MYJYMjs.decodePlayRunPublicStatus.call(void 0, payload.run.status) : null)));
3545
+ return _nullishCoalesce(_chunkMJTVX4QKjs.decodePlayRunPublicStatus.call(void 0, payload.status), () => ( (_chunkMJTVX4QKjs.isPlayRunPackage.call(void 0, payload) ? _chunkMJTVX4QKjs.decodePlayRunPublicStatus.call(void 0, payload.run.status) : null)));
3518
3546
  }
3519
3547
  function appendPlayLiveLogLines(state, payload) {
3520
3548
  const lines = readStringArray(payload.lines);
@@ -3546,7 +3574,7 @@ function updatePlayLiveStatusState(state, event) {
3546
3574
  if (event.type !== "play.run.snapshot" && event.type !== "play.run.status" && event.type !== "play.run.final_status") {
3547
3575
  return null;
3548
3576
  }
3549
- const runId = typeof payload.runId === "string" && payload.runId ? payload.runId : _chunkSL6MYJYMjs.isPlayRunPackage.call(void 0, payload) ? payload.run.id : state.runId;
3577
+ const runId = typeof payload.runId === "string" && payload.runId ? payload.runId : _chunkMJTVX4QKjs.isPlayRunPackage.call(void 0, payload) ? payload.run.id : state.runId;
3550
3578
  const status = _nullishCoalesce(playLiveRunStatus(event), () => ( state.status));
3551
3579
  const progressPayload = isRecord3(payload.progress) ? payload.progress : {};
3552
3580
  if (event.type === "play.run.final_status" && state.logs.length === 0 && state.lastLogSeq === 0) {
@@ -3559,7 +3587,7 @@ function updatePlayLiveStatusState(state, event) {
3559
3587
  }
3560
3588
  if ("result" in payload) {
3561
3589
  state.result = payload.result;
3562
- } else if (_chunkSL6MYJYMjs.isPlayRunPackage.call(void 0, payload)) {
3590
+ } else if (_chunkMJTVX4QKjs.isPlayRunPackage.call(void 0, payload)) {
3563
3591
  state.result = payload;
3564
3592
  }
3565
3593
  if (typeof payload.error === "string" && payload.error.trim()) {
@@ -3572,7 +3600,7 @@ function updatePlayLiveStatusState(state, event) {
3572
3600
  ...payload,
3573
3601
  runId,
3574
3602
  status,
3575
- ..._chunkSL6MYJYMjs.isPlayRunPackage.call(void 0, payload) ? { package: payload, outputs: payload.outputs } : {},
3603
+ ..._chunkMJTVX4QKjs.isPlayRunPackage.call(void 0, payload) ? { package: payload, outputs: payload.outputs } : {},
3576
3604
  progress: {
3577
3605
  ...progressRecord,
3578
3606
  status: typeof progressRecord.status === "string" ? progressRecord.status : status,
@@ -3744,7 +3772,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
3744
3772
  purchaseCredits: (options) => this.purchaseTargetBillingCredits(options),
3745
3773
  recoverCreditPurchase: (options) => this.recoverTargetBillingCreditPurchase(options),
3746
3774
  transitionPlan: (options) => this.transitionTargetBillingPlan(options),
3747
- portalSession: (options) => this.createTargetBillingPortalSession(options)
3775
+ portalSession: (options) => this.createTargetBillingPortalSession(options),
3776
+ getDetails: () => this.http.get("/api/v2/billing/details"),
3777
+ setDetails: (details) => this.http.put("/api/v2/billing/details", details)
3748
3778
  };
3749
3779
  this.workspaces = {
3750
3780
  members: (options) => {
@@ -3869,6 +3899,25 @@ var DeeplineClient = (_class = class _DeeplineClient {
3869
3899
  // ——————————————————————————————————————————————————————————
3870
3900
  // Views
3871
3901
  // ——————————————————————————————————————————————————————————
3902
+ /**
3903
+ * Call the outcomes API. Outcomes are roles handed
3904
+ * to agents and people: a versioned spec, a feed of entries, tasks and asks
3905
+ * with states, and stakeholders. `deepline outcomes` renders these calls;
3906
+ * `deepline outcomes --help` documents each one.
3907
+ *
3908
+ * @param path - Path below `/api/v2/outcomes`, starting with `/` or empty.
3909
+ * @param options.timeout - Raise this for held requests (`wait`, `claim --wait`).
3910
+ * @param options.maxRetries - Automatic retries of a failed request. The
3911
+ * client default applies when it is left out.
3912
+ * @internal Out of the public reference while Outcomes is behind its rollout.
3913
+ */
3914
+ async outcomesApi(method, path, body, options) {
3915
+ return await this.http.request(`/api/v2/outcomes${path}`, {
3916
+ method,
3917
+ ...method === "GET" ? {} : { body: _nullishCoalesce(body, () => ( {})) },
3918
+ ...options
3919
+ });
3920
+ }
3872
3921
  /** List this workspace's views, most recently changed first. */
3873
3922
  async listViews(input) {
3874
3923
  const params = new URLSearchParams();
@@ -3894,7 +3943,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
3894
3943
  input
3895
3944
  );
3896
3945
  }
3897
- /** Who can open a view: workspace members, or anyone with its URL. */
3946
+ /** Who can open a view: its workspace, every org member, or anyone with its URL. */
3898
3947
  async setViewAccess(id, access) {
3899
3948
  return await this.http.post(
3900
3949
  `/api/v2/views/${encodeURIComponent(id)}/access`,
@@ -4051,7 +4100,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4051
4100
  async listToolsInCategory(category, options) {
4052
4101
  const normalizedCategory = category.trim();
4053
4102
  if (!normalizedCategory || category.includes(",")) {
4054
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(
4103
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(
4055
4104
  "Provide one non-empty tool category.",
4056
4105
  400,
4057
4106
  "INVALID_TOOL_CATEGORY"
@@ -4285,7 +4334,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4285
4334
  */
4286
4335
  async preparePlayRunAdmission(request, options) {
4287
4336
  const resolved = resolveStartPlayRunRequest(request, this.environment);
4288
- const prepared = await _chunkSL6MYJYMjs.preparePlayRunAdmission.call(void 0,
4337
+ const prepared = await _chunkMJTVX4QKjs.preparePlayRunAdmission.call(void 0,
4289
4338
  this.http,
4290
4339
  resolved.request,
4291
4340
  _optionalChain([options, 'optionalAccess', _199 => _199.onSubmission]),
@@ -4298,7 +4347,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4298
4347
  );
4299
4348
  const headers = _optionalChain([options, 'optionalAccess', _200 => _200.cliAdmission]) ? {
4300
4349
  ...runtimeHeaders,
4301
- "X-Deepline-API-Major": String(_chunkPACD5DGCjs.SDK_API_MAJOR)
4350
+ "X-Deepline-API-Major": String(_chunkAGLR6QVNjs.SDK_API_MAJOR)
4302
4351
  } : runtimeHeaders;
4303
4352
  const http = this.http;
4304
4353
  let submitted = false;
@@ -4306,7 +4355,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4306
4355
  ...prepared,
4307
4356
  async start(startOptions) {
4308
4357
  if (submitted && !prepared.supportsCallerIntent) {
4309
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(
4358
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(
4310
4359
  "This server has not enabled caller-owned admission recovery. Do not retry an ambiguous start.",
4311
4360
  409,
4312
4361
  "PLAY_RUN_ADMISSION_RECOVERY_UNSUPPORTED"
@@ -4314,7 +4363,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4314
4363
  }
4315
4364
  if (submitted) {
4316
4365
  if (!_optionalChain([options, 'optionalAccess', _201 => _201.callerIntentV2])) {
4317
- await _chunkSL6MYJYMjs.preparePlayRunAdmission.call(void 0,
4366
+ await _chunkMJTVX4QKjs.preparePlayRunAdmission.call(void 0,
4318
4367
  http,
4319
4368
  JSON.parse(bodyJson),
4320
4369
  void 0,
@@ -4324,7 +4373,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4324
4373
  }
4325
4374
  submitted = true;
4326
4375
  try {
4327
- return await _chunkSL6MYJYMjs.submitPreparedPlayRunAdmission.call(void 0,
4376
+ return await _chunkMJTVX4QKjs.submitPreparedPlayRunAdmission.call(void 0,
4328
4377
  http,
4329
4378
  JSON.parse(bodyJson),
4330
4379
  prepared.workflowId,
@@ -4337,7 +4386,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4337
4386
  }
4338
4387
  );
4339
4388
  } catch (error) {
4340
- if (error instanceof _chunkSL6MYJYMjs.CliPlayAdmissionUnsupportedError || error instanceof _chunkSL6MYJYMjs.CliPlayAdmissionCallerIntentV2UnsupportedError) {
4389
+ if (error instanceof _chunkMJTVX4QKjs.CliPlayAdmissionUnsupportedError || error instanceof _chunkMJTVX4QKjs.CliPlayAdmissionCallerIntentV2UnsupportedError) {
4341
4390
  submitted = false;
4342
4391
  }
4343
4392
  throw error;
@@ -4345,7 +4394,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4345
4394
  },
4346
4395
  async *startStream(streamOptions) {
4347
4396
  if (submitted && !prepared.supportsCallerIntent) {
4348
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(
4397
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(
4349
4398
  "This server has not enabled caller-owned admission recovery. Do not retry an ambiguous start.",
4350
4399
  409,
4351
4400
  "PLAY_RUN_ADMISSION_RECOVERY_UNSUPPORTED"
@@ -4353,7 +4402,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4353
4402
  }
4354
4403
  if (submitted) {
4355
4404
  if (!_optionalChain([options, 'optionalAccess', _209 => _209.callerIntentV2])) {
4356
- await _chunkSL6MYJYMjs.preparePlayRunAdmission.call(void 0,
4405
+ await _chunkMJTVX4QKjs.preparePlayRunAdmission.call(void 0,
4357
4406
  http,
4358
4407
  JSON.parse(bodyJson),
4359
4408
  void 0,
@@ -4362,7 +4411,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4362
4411
  }
4363
4412
  }
4364
4413
  submitted = true;
4365
- const streamPath = _optionalChain([options, 'optionalAccess', _211 => _211.callerIntentV2]) ? _chunkSL6MYJYMjs.CLI_PLAY_RUN_CALLER_INTENT_V2_START_STREAM_PATH : _optionalChain([options, 'optionalAccess', _212 => _212.cliAdmission]) ? _chunkSL6MYJYMjs.CLI_PLAY_RUN_START_STREAM_PATH : _chunkSL6MYJYMjs.PLAY_RUN_START_STREAM_PATH;
4414
+ const streamPath = _optionalChain([options, 'optionalAccess', _211 => _211.callerIntentV2]) ? _chunkMJTVX4QKjs.CLI_PLAY_RUN_CALLER_INTENT_V2_START_STREAM_PATH : _optionalChain([options, 'optionalAccess', _212 => _212.cliAdmission]) ? _chunkMJTVX4QKjs.CLI_PLAY_RUN_START_STREAM_PATH : _chunkMJTVX4QKjs.PLAY_RUN_START_STREAM_PATH;
4366
4415
  let cliAdmissionSupported = false;
4367
4416
  try {
4368
4417
  for await (const event of http.streamSse(streamPath, {
@@ -4373,22 +4422,22 @@ var DeeplineClient = (_class = class _DeeplineClient {
4373
4422
  exactUrlOnly: true,
4374
4423
  ..._optionalChain([options, 'optionalAccess', _214 => _214.cliAdmission]) ? {
4375
4424
  onResponse: (response) => {
4376
- cliAdmissionSupported = response.headers.get(_chunkSL6MYJYMjs.CLI_PLAY_RUN_SUPPORTED_HEADER) === "true";
4425
+ cliAdmissionSupported = response.headers.get(_chunkMJTVX4QKjs.CLI_PLAY_RUN_SUPPORTED_HEADER) === "true";
4377
4426
  }
4378
4427
  } : {}
4379
4428
  })) {
4380
4429
  if (event.scope === "play") yield event;
4381
4430
  }
4382
4431
  } catch (error) {
4383
- if (_optionalChain([options, 'optionalAccess', _215 => _215.cliAdmission]) && !cliAdmissionSupported && error instanceof _chunkBBTKAASQjs.DeeplineError && (error.statusCode === 404 || error.statusCode === 405)) {
4432
+ if (_optionalChain([options, 'optionalAccess', _215 => _215.cliAdmission]) && !cliAdmissionSupported && error instanceof _chunkLFQJW4S2js.DeeplineError && (error.statusCode === 404 || error.statusCode === 405)) {
4384
4433
  if (options.callerIntentV2) {
4385
4434
  submitted = false;
4386
- throw new (0, _chunkSL6MYJYMjs.CliPlayAdmissionCallerIntentV2UnsupportedError)(
4435
+ throw new (0, _chunkMJTVX4QKjs.CliPlayAdmissionCallerIntentV2UnsupportedError)(
4387
4436
  error.statusCode
4388
4437
  );
4389
4438
  }
4390
4439
  submitted = false;
4391
- throw new (0, _chunkSL6MYJYMjs.CliPlayAdmissionUnsupportedError)(error.statusCode);
4440
+ throw new (0, _chunkMJTVX4QKjs.CliPlayAdmissionUnsupportedError)(error.statusCode);
4392
4441
  }
4393
4442
  throw error;
4394
4443
  }
@@ -4401,7 +4450,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4401
4450
  * @internal
4402
4451
  */
4403
4452
  async prefetchPlayRunAdmissionCapability(options) {
4404
- return _chunkSL6MYJYMjs.readPlayRunAdmissionCapability.call(void 0, this.http, options);
4453
+ return _chunkMJTVX4QKjs.readPlayRunAdmissionCapability.call(void 0, this.http, options);
4405
4454
  }
4406
4455
  /**
4407
4456
  * Submit a play run through the legacy event response.
@@ -4675,7 +4724,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4675
4724
  * ```
4676
4725
  */
4677
4726
  async stagePlayFiles(files) {
4678
- return _chunkSL6MYJYMjs.stagePlayFiles.call(void 0, this.http, files);
4727
+ return _chunkMJTVX4QKjs.stagePlayFiles.call(void 0, this.http, files);
4679
4728
  }
4680
4729
  /**
4681
4730
  * Mint short-lived presigned upload targets for staged play files.
@@ -4684,7 +4733,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4684
4733
  * For other files, the server returns a presigned PUT URL. Upload the file body to that URL.
4685
4734
  */
4686
4735
  async mintStagedPlayFileUploads(files) {
4687
- return _chunkSL6MYJYMjs.mintStagedPlayFileUploads.call(void 0, this.http, files);
4736
+ return _chunkMJTVX4QKjs.mintStagedPlayFileUploads.call(void 0, this.http, files);
4688
4737
  }
4689
4738
  /**
4690
4739
  * Resolve staged play files by content hash without uploading bytes.
@@ -4795,18 +4844,18 @@ var DeeplineClient = (_class = class _DeeplineClient {
4795
4844
  }
4796
4845
  })) {
4797
4846
  _optionalChain([options, 'optionalAccess', _253 => _253.onEvent, 'optionalCall', _254 => _254(event)]);
4798
- if (_chunkSL6MYJYMjs.isTerminalPlayRunLifecycleStatus.call(void 0, playLiveRunStatus(event))) {
4847
+ if (_chunkMJTVX4QKjs.isTerminalPlayRunLifecycleStatus.call(void 0, playLiveRunStatus(event))) {
4799
4848
  terminalObserved = true;
4800
4849
  }
4801
4850
  }
4802
4851
  if (_optionalChain([options, 'optionalAccess', _255 => _255.signal, 'optionalAccess', _256 => _256.aborted])) {
4803
- throw new (0, _chunkBBTKAASQjs.DeeplineError)("Run watch aborted.", void 0, "ABORTED");
4852
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)("Run watch aborted.", void 0, "ABORTED");
4804
4853
  }
4805
4854
  const refreshed = await _asyncNullishCoalesce(terminalStatus, async () => ( await this.getRunStatus(runId)));
4806
- if (terminalObserved || _chunkSL6MYJYMjs.isTerminalPlayRunLifecycleStatus.call(void 0, refreshed.status)) {
4855
+ if (terminalObserved || _chunkMJTVX4QKjs.isTerminalPlayRunLifecycleStatus.call(void 0, refreshed.status)) {
4807
4856
  return refreshed;
4808
4857
  }
4809
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(
4858
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(
4810
4859
  `Run watch for ${runId} ended before a terminal status.`,
4811
4860
  void 0,
4812
4861
  "PLAY_WATCH_ENDED"
@@ -4986,7 +5035,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
4986
5035
  { headers: { "x-deepline-run-status": "1" } }
4987
5036
  );
4988
5037
  if (_optionalChain([options, 'optionalAccess', _263 => _263.configuration]) === true && !Object.hasOwn(response, "contract")) {
4989
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(
5038
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(
4990
5039
  "This server does not support recorded configuration reads.",
4991
5040
  void 0,
4992
5041
  "RUN_CONFIGURATION_UNAVAILABLE"
@@ -5037,14 +5086,14 @@ var DeeplineClient = (_class = class _DeeplineClient {
5037
5086
  async getRunChildren(parentRunId, options) {
5038
5087
  const launchKey = options.launchKey.trim();
5039
5088
  if (!launchKey) {
5040
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(
5089
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(
5041
5090
  "runs.children requires a nonempty launchKey.",
5042
5091
  void 0,
5043
5092
  "INVALID_CHILD_RUN_LAUNCH_KEY"
5044
5093
  );
5045
5094
  }
5046
5095
  if (options.limit !== void 0 && (!Number.isInteger(options.limit) || options.limit < 1 || options.limit > 50)) {
5047
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(
5096
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(
5048
5097
  "runs.children limit must be an integer from 1 to 50.",
5049
5098
  void 0,
5050
5099
  "INVALID_CHILD_RUN_PAGE_LIMIT"
@@ -5131,7 +5180,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
5131
5180
  if (!playName)
5132
5181
  throw new Error("runs.list options.steps requires options.play.");
5133
5182
  if (node)
5134
- throw new Error("runs.list options.steps cannot be combined with node.");
5183
+ throw new Error(
5184
+ "runs.list options.steps cannot be combined with node."
5185
+ );
5135
5186
  params.set("steps", "true");
5136
5187
  }
5137
5188
  if (typeof options.limit === "number" && Number.isFinite(options.limit)) {
@@ -5200,7 +5251,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5200
5251
  async rerun(runId, options) {
5201
5252
  const idempotencyKey = _optionalChain([options, 'optionalAccess', _277 => _277.idempotencyKey, 'optionalAccess', _278 => _278.trim, 'call', _279 => _279()]);
5202
5253
  if (_optionalChain([options, 'optionalAccess', _280 => _280.idempotencyKey]) !== void 0 && !idempotencyKey) {
5203
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(
5254
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(
5204
5255
  "runs.rerun idempotencyKey must not be empty.",
5205
5256
  void 0,
5206
5257
  "INVALID_IDEMPOTENCY_KEY"
@@ -5236,14 +5287,14 @@ var DeeplineClient = (_class = class _DeeplineClient {
5236
5287
  */
5237
5288
  async getRunLogs(runId, options) {
5238
5289
  if (_optionalChain([options, 'optionalAccess', _282 => _282.all]) === true && options.failed === true) {
5239
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(
5290
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(
5240
5291
  "runs.logs cannot combine all and failed views.",
5241
5292
  void 0,
5242
5293
  "INVALID_RUN_LOG_VIEW"
5243
5294
  );
5244
5295
  }
5245
5296
  if (_optionalChain([options, 'optionalAccess', _283 => _283.cursor]) !== void 0 && options.failed === true) {
5246
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(
5297
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(
5247
5298
  "runs.logs cannot combine failed with cursor.",
5248
5299
  void 0,
5249
5300
  "INVALID_RUN_LOG_VIEW"
@@ -5393,7 +5444,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5393
5444
  if (selection !== void 0) {
5394
5445
  const runtime = normalizePlayRuntimeSelection(selection);
5395
5446
  if (!runtime) {
5396
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(
5447
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(
5397
5448
  "Run event queries require a valid Preview runtime selection.",
5398
5449
  void 0,
5399
5450
  "INVALID_RUNTIME_SELECTION"
@@ -5450,7 +5501,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5450
5501
  if (options.runtime !== void 0) {
5451
5502
  const runtime = normalizePlayRuntimeSelection(options.runtime);
5452
5503
  if (!runtime) {
5453
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(
5504
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(
5454
5505
  "runs.searchEvents runtime must be a valid Preview selection.",
5455
5506
  void 0,
5456
5507
  "INVALID_RUNTIME_SELECTION"
@@ -5519,7 +5570,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5519
5570
  )
5520
5571
  ];
5521
5572
  if (_optionalChain([result, 'access', _301 => _301.scope, 'optionalAccess', _302 => _302.kind]) !== "run" || confirmedRunId !== requestedRunId || foreignRowRunIds.length > 0) {
5522
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(
5573
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(
5523
5574
  `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.`,
5524
5575
  void 0,
5525
5576
  "RUN_EXPORT_SCOPE_MISMATCH",
@@ -5574,7 +5625,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5574
5625
  }
5575
5626
  );
5576
5627
  if (dryRun && !isStopAllPlayRunsDryRunResult(result)) {
5577
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(
5628
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(
5578
5629
  "This Deepline server does not support runs stop-all --dry-run and performed a real stop-all. Update the server before using --dry-run.",
5579
5630
  void 0,
5580
5631
  "STOP_ALL_DRY_RUN_UNSUPPORTED"
@@ -5898,7 +5949,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5898
5949
  }
5899
5950
  if (!legacyTarget && name.toLowerCase() === "default") {
5900
5951
  throw new Error(
5901
- "Default is reserved for the workspace default notification group."
5952
+ "Default is reserved for the org default notification group."
5902
5953
  );
5903
5954
  }
5904
5955
  const normalizedTargets = targets.map(
@@ -5974,7 +6025,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5974
6025
  const connectionId = current.slackConnection.connectionId;
5975
6026
  if (slackTargets.size > 0 && !connectionId) {
5976
6027
  throw new Error(
5977
- "Slack is not connected to this workspace. Connect it in Dashboard \u2192 Integrations, then retry."
6028
+ "Slack is not connected to this org. Connect it in Dashboard \u2192 Integrations, then retry."
5978
6029
  );
5979
6030
  }
5980
6031
  const resolvedSlackTargets = await Promise.all(
@@ -6400,7 +6451,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6400
6451
  if (event.type !== "play.run.status" || status.status !== previousStatus) {
6401
6452
  _optionalChain([options, 'optionalAccess', _358 => _358.onProgress, 'optionalCall', _359 => _359(status)]);
6402
6453
  }
6403
- if (_chunkSL6MYJYMjs.isTerminalPlayRunLifecycleStatus.call(void 0, status.status)) {
6454
+ if (_chunkMJTVX4QKjs.isTerminalPlayRunLifecycleStatus.call(void 0, status.status)) {
6404
6455
  terminalObserved = status;
6405
6456
  }
6406
6457
  }
@@ -6420,7 +6471,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6420
6471
  ).catch(() => terminalObserved);
6421
6472
  return playRunResultFromStatus(finalStatus, start, workflowId);
6422
6473
  }
6423
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(
6474
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(
6424
6475
  `Run watch for ${workflowId} ended before the run reached a terminal state.`,
6425
6476
  void 0,
6426
6477
  "PLAY_RUN_STREAM_ENDED",
@@ -6448,7 +6499,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6448
6499
  async getBillingUsageEvent(requestId) {
6449
6500
  const normalizedRequestId = requestId.trim();
6450
6501
  if (normalizedRequestId.length === 0 || normalizedRequestId.length > 200 || normalizedRequestId !== requestId) {
6451
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(
6502
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(
6452
6503
  "Usage request_id must contain 1\u2013200 characters with no leading or trailing whitespace.",
6453
6504
  void 0,
6454
6505
  "INVALID_USAGE_REQUEST_ID"
@@ -6459,7 +6510,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6459
6510
  );
6460
6511
  const event = _optionalChain([response, 'access', _362 => _362.entries, 'optionalAccess', _363 => _363[0]]);
6461
6512
  if (!event) {
6462
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(
6513
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(
6463
6514
  "No usage event was found for this request_id.",
6464
6515
  void 0,
6465
6516
  "USAGE_EVENT_NOT_FOUND"
@@ -6473,7 +6524,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6473
6524
  */
6474
6525
  async getBillingUsageEvents(options = {}) {
6475
6526
  const invalid2 = (message) => {
6476
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(
6527
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(
6477
6528
  message,
6478
6529
  void 0,
6479
6530
  "INVALID_USAGE_EVENTS_OPTIONS"
@@ -6531,14 +6582,14 @@ var DeeplineClient = (_class = class _DeeplineClient {
6531
6582
  if (options.requestId !== void 0) {
6532
6583
  const requestId = options.requestId.trim();
6533
6584
  if (requestId.length === 0 || requestId.length > 200 || requestId !== options.requestId) {
6534
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(
6585
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(
6535
6586
  "Usage request_id must contain 1\u2013200 characters with no leading or trailing whitespace.",
6536
6587
  void 0,
6537
6588
  "INVALID_USAGE_REQUEST_ID"
6538
6589
  );
6539
6590
  }
6540
6591
  if (options.runId !== void 0 || options.cursor !== void 0 || options.offset !== void 0) {
6541
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(
6592
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(
6542
6593
  "requestId cannot be combined with runId, cursor, or offset.",
6543
6594
  void 0,
6544
6595
  "INVALID_USAGE_FILTERS"
@@ -6704,7 +6755,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6704
6755
  /** Recover only the original workspace, credit amount, and purchase key; never charge. */
6705
6756
  async recoverTargetBillingCreditPurchase(options) {
6706
6757
  if (typeof options.idempotencyKey !== "string") {
6707
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(
6758
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(
6708
6759
  "The original billing idempotencyKey is required.",
6709
6760
  void 0,
6710
6761
  "INVALID_BILLING_IDEMPOTENCY_KEY"
@@ -6714,14 +6765,14 @@ var DeeplineClient = (_class = class _DeeplineClient {
6714
6765
  options.idempotencyKey
6715
6766
  );
6716
6767
  if (!Number.isSafeInteger(options.credits) || options.credits <= 0) {
6717
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(
6768
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(
6718
6769
  "credits must be a positive safe integer.",
6719
6770
  void 0,
6720
6771
  "INVALID_CREDITS"
6721
6772
  );
6722
6773
  }
6723
6774
  if (typeof options.orgId !== "string" || !options.orgId.trim() || options.orgId !== options.orgId.trim()) {
6724
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(
6775
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(
6725
6776
  "The original orgId is required without surrounding whitespace.",
6726
6777
  void 0,
6727
6778
  "INVALID_ORG_ID"
@@ -6747,8 +6798,12 @@ var DeeplineClient = (_class = class _DeeplineClient {
6747
6798
  {
6748
6799
  action: options.action,
6749
6800
  ...options.action === "start_or_change" && options.billingEmail ? { billing_email: options.billingEmail } : {},
6750
- ...options.targetPlanSku ? { target_plan_sku: options.targetPlanSku } : {},
6751
- ...options.action === "start_or_change" && options.promoCode ? { promo_code: options.promoCode } : {}
6801
+ ...options.targetPlanSku ? { target_plan_sku: resolvePublicPlanSku(options.targetPlanSku) } : {},
6802
+ ...options.action === "start_or_change" && options.promoCode ? { promo_code: options.promoCode } : {},
6803
+ // Sent only for an annual purchase, so a monthly request's body (and
6804
+ // its idempotency hash) is unchanged.
6805
+ ...options.action === "start_or_change" && options.billingInterval === "year" ? { billing_interval: "year" } : {},
6806
+ ...options.action === "start_or_change" && options.paymentMethod === "invoice" ? { payment_method: "invoice" } : {}
6752
6807
  },
6753
6808
  { "Idempotency-Key": idempotencyKey },
6754
6809
  { maxRetries: 0, exactUrlOnly: true }
@@ -6839,7 +6894,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6839
6894
  async submitMonitorBatch(options) {
6840
6895
  const idempotencyKey = options.idempotencyKey.trim();
6841
6896
  if (!idempotencyKey) {
6842
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(
6897
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(
6843
6898
  "Monitor batch idempotencyKey is required.",
6844
6899
  void 0,
6845
6900
  "INVALID_MONITOR_BATCH_IDEMPOTENCY_KEY"
@@ -6847,7 +6902,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6847
6902
  }
6848
6903
  if (options.kind === "deploy") {
6849
6904
  if (!options.manifestNdjson.trim()) {
6850
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(
6905
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(
6851
6906
  "Monitor batch deploy requires a non-empty NDJSON manifest.",
6852
6907
  void 0,
6853
6908
  "INVALID_MONITOR_BATCH_MANIFEST"
@@ -6893,7 +6948,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
6893
6948
  async getMonitorBatch(operationId, options) {
6894
6949
  const runId = operationId.trim();
6895
6950
  if (!runId) {
6896
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(
6951
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(
6897
6952
  "Monitor batch operation id is required.",
6898
6953
  void 0,
6899
6954
  "INVALID_MONITOR_BATCH_OPERATION_ID"
@@ -7071,7 +7126,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
7071
7126
  }
7072
7127
  async testMonitorWebhook(key, payload, options) {
7073
7128
  if (_optionalChain([options, 'optionalAccess', _395 => _395.dispatch]) === true || _optionalChain([options, 'optionalAccess', _396 => _396.validationOnly]) === false) {
7074
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(
7129
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(
7075
7130
  "Monitor tests are validation-only and cannot dispatch events.",
7076
7131
  void 0,
7077
7132
  "MONITOR_TEST_DISPATCH_NOT_SUPPORTED"
@@ -7126,7 +7181,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
7126
7181
  /** Delete a deployed monitor and its upstream provider resource. `dryRun` returns the delete plan. Prefer `client.monitors.delete(...)`. */
7127
7182
  async deleteMonitor(key, options) {
7128
7183
  if (_optionalChain([options, 'optionalAccess', _397 => _397.localOnly]) === true) {
7129
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(
7184
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(
7130
7185
  "localOnly monitor deletion is no longer supported. Monitor deletion always deprovisions the upstream provider resource.",
7131
7186
  void 0,
7132
7187
  "MONITOR_LOCAL_ONLY_DELETE_NOT_SUPPORTED"
@@ -7391,7 +7446,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
7391
7446
  stalledRequests = remaining < remainingBefore ? 0 : stalledRequests + 1;
7392
7447
  remainingBefore = remaining;
7393
7448
  if (!(thisRequest > 0) || stalledRequests >= 2) {
7394
- throw new (0, _chunkBBTKAASQjs.DeeplineError)(
7449
+ throw new (0, _chunkLFQJW4S2js.DeeplineError)(
7395
7450
  `Monitor Fleet '${fleetId}' commit made no progress in request ${attempt}. Re-run the same command to continue from where it stopped.`,
7396
7451
  202,
7397
7452
  "MONITOR_FLEET_COMMIT_STALLED",
@@ -7573,4 +7628,5 @@ var DeeplineClient = (_class = class _DeeplineClient {
7573
7628
 
7574
7629
 
7575
7630
 
7576
- 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;
7631
+
7632
+ exports.PUBLIC_PLAN_SKUS = PUBLIC_PLAN_SKUS; 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;