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
@@ -1,11 +1,11 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunkW2ZWQUHTjs = require('./chunk-W2ZWQUHT.js');
3
+ var _chunkWOCHZCUJjs = require('./chunk-WOCHZCUJ.js');
4
4
 
5
5
 
6
6
 
7
7
 
8
- var _chunkCOGREZAOjs = require('./chunk-COGREZAO.js');
8
+ var _chunk2B5B5KAWjs = require('./chunk-2B5B5KAW.js');
9
9
 
10
10
  // src/cli/play-run-admission.ts
11
11
  function usesInlinePlayAdmission(command, args) {
@@ -18,19 +18,18 @@ function usesCliPlayAdmission(command, args) {
18
18
  }
19
19
  async function checkPlayRunCompatibility(baseUrl, maintenancePolicy = "configured", signal) {
20
20
  _optionalChain([signal, 'optionalAccess', _ => _.throwIfAborted, 'call', _2 => _2()]);
21
- if (maintenancePolicy !== "off") _chunkCOGREZAOjs.flushDeferredSkillsSyncNotices.call(void 0, baseUrl);
22
- const compatibility = await _chunkW2ZWQUHTjs.traceCliSpan.call(void 0,
21
+ if (maintenancePolicy !== "off") _chunk2B5B5KAWjs.flushDeferredSkillsSyncNotices.call(void 0, baseUrl);
22
+ const compatibility = await _chunkWOCHZCUJjs.traceCliSpan.call(void 0,
23
23
  "cli.sdk_compatibility",
24
24
  { baseUrl, command: "plays run" },
25
- () => _chunkCOGREZAOjs.checkSdkCompatibility.call(void 0, baseUrl, {
25
+ () => _chunk2B5B5KAWjs.requireSdkCompatibility.call(void 0, baseUrl, {
26
26
  command: "plays run",
27
27
  persistCache: maintenancePolicy !== "off",
28
28
  signal
29
29
  })
30
30
  );
31
31
  _optionalChain([signal, 'optionalAccess', _3 => _3.throwIfAborted, 'call', _4 => _4()]);
32
- if (compatibility.error) throw compatibility.error;
33
- _chunkCOGREZAOjs.enforceSdkCompatibilityResponse.call(void 0, compatibility.response, {
32
+ _chunk2B5B5KAWjs.enforceSdkCompatibilityResponse.call(void 0, compatibility, {
34
33
  quietAdvisory: true
35
34
  });
36
35
  }
@@ -3,21 +3,21 @@ import {
3
3
  } from "./chunk-MF7PCM6C.mjs";
4
4
  import {
5
5
  parseLogLevel
6
- } from "./chunk-ZMNGZ6XS.mjs";
6
+ } from "./chunk-LH5PZKER.mjs";
7
7
  import {
8
8
  setDottedInputValue
9
- } from "./chunk-LX35AXTN.mjs";
9
+ } from "./chunk-5TYLSS4Q.mjs";
10
10
  import {
11
11
  argsWantJson,
12
12
  jsonFieldArgs,
13
13
  parseJsonFields
14
- } from "./chunk-GGB3JYCW.mjs";
14
+ } from "./chunk-AGICYWGN.mjs";
15
15
  import {
16
16
  DeeplineError
17
- } from "./chunk-JL2OTMSG.mjs";
17
+ } from "./chunk-Z3A2S3QM.mjs";
18
18
 
19
19
  // ../play-runtime/governor/policy.ts
20
- var DEFAULT_MAX_CONCURRENT_EXTERNAL_CALLS = 64;
20
+ var DEFAULT_MAX_CONCURRENT_EXTERNAL_CALLS = 100;
21
21
  var MAX_CONFIGURABLE_CONCURRENT_EXTERNAL_CALLS = 1e3;
22
22
  var MAX_CONFIGURABLE_CONCURRENT_ROWS = 1e3;
23
23
  function resolveMaxConcurrentExternalCalls(requested) {
@@ -1,16 +1,16 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunkLPJPCGT3js = require('./chunk-LPJPCGT3.js');
3
+ var _chunkCACFJODGjs = require('./chunk-CACFJODG.js');
4
4
 
5
5
 
6
6
 
7
- var _chunkUDXULACQjs = require('./chunk-UDXULACQ.js');
7
+ var _chunkMLABYI4Mjs = require('./chunk-MLABYI4M.js');
8
8
 
9
9
  // src/client.ts
10
- var DeeplineClient2 = class extends _chunkLPJPCGT3js.DeeplineClient {
10
+ var DeeplineClient2 = class extends _chunkCACFJODGjs.DeeplineClient {
11
11
  constructor(options) {
12
- const config = _chunkUDXULACQjs.resolveConfig.call(void 0, options);
13
- super(config, new (0, _chunkUDXULACQjs.HttpClient)(config), _optionalChain([options, 'optionalAccess', _ => _.timeout]));
12
+ const config = _chunkMLABYI4Mjs.resolveConfig.call(void 0, options);
13
+ super(config, new (0, _chunkMLABYI4Mjs.HttpClient)(config), _optionalChain([options, 'optionalAccess', _ => _.timeout]));
14
14
  }
15
15
  };
16
16
 
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  HttpClient,
3
3
  detectAgentRuntime
4
- } from "./chunk-4D3WIZST.mjs";
4
+ } from "./chunk-OTV2UUKW.mjs";
5
5
  import {
6
6
  ConfigError
7
- } from "./chunk-NURW5XH4.mjs";
7
+ } from "./chunk-ASB47RXJ.mjs";
8
8
 
9
9
  // src/config.ts
10
10
  import {
@@ -23,9 +23,21 @@ var API_KEY_ENV = "DEEPLINE_API_KEY";
23
23
  var ACTIVE_ORG_ID_ENV = "DEEPLINE_ACTIVE_ORG_ID";
24
24
  var ACTIVE_ORG_NAME_ENV = "DEEPLINE_ACTIVE_ORG_NAME";
25
25
  var FEATURES_ENV = "DEEPLINE_FEATURES";
26
+ var WORKSPACE_ID_ENV = "DEEPLINE_WORKSPACE_ID";
26
27
  var PROD_URL = "https://code.deepline.com";
27
28
  var DEFAULT_TIMEOUT = 6e4;
28
29
  var DEFAULT_MAX_RETRIES = 3;
30
+ var TRANSIENT_HTTP_STATUSES = /* @__PURE__ */ new Set([
31
+ 408,
32
+ 425,
33
+ 429,
34
+ 502,
35
+ 503,
36
+ 504
37
+ ]);
38
+ function defaultRetryBackoffMs(retry) {
39
+ return Math.min(1e3 * 2 ** (retry - 1), 3e4);
40
+ }
29
41
  var PROJECT_DEEPLINE_ENV_FILE = ".env.deepline";
30
42
  var COWORK_IGNORED_WORKSPACE_DIRS = /* @__PURE__ */ new Set([
31
43
  ".auto-memory",
@@ -48,7 +60,8 @@ var CLI_ENV_ALLOWED_KEYS = /* @__PURE__ */ new Set([
48
60
  API_KEY_ENV,
49
61
  ACTIVE_ORG_ID_ENV,
50
62
  ACTIVE_ORG_NAME_ENV,
51
- FEATURES_ENV
63
+ FEATURES_ENV,
64
+ WORKSPACE_ID_ENV
52
65
  ]);
53
66
  function featureEnvValues(data) {
54
67
  if (!Array.isArray(data.features)) return {};
@@ -281,6 +294,10 @@ function mergePersistedEnvValues(existing, values) {
281
294
  delete merged[ACTIVE_ORG_ID_ENV];
282
295
  delete merged[ACTIVE_ORG_NAME_ENV];
283
296
  delete merged[FEATURES_ENV];
297
+ delete merged[WORKSPACE_ID_ENV];
298
+ }
299
+ if (values[WORKSPACE_ID_ENV] === void 0 && values[ACTIVE_ORG_ID_ENV] !== void 0 && values[ACTIVE_ORG_ID_ENV] !== existing[ACTIVE_ORG_ID_ENV]) {
300
+ delete merged[WORKSPACE_ID_ENV];
284
301
  }
285
302
  if (values[FEATURES_ENV] === "") {
286
303
  delete merged[FEATURES_ENV];
@@ -388,6 +405,48 @@ function resolveBaseUrlOnly(options) {
388
405
  }
389
406
  return baseUrl;
390
407
  }
408
+ function resolveCredentialEnvFile(config, startDir = process.cwd()) {
409
+ const apiKey = config.apiKey.trim();
410
+ if (!apiKey || process.env[API_KEY_ENV]?.trim()) return null;
411
+ const folder = getResolvedProjectAuthSource(config.baseUrl, apiKey, startDir);
412
+ if (folder) {
413
+ return { scope: "folder", filePath: folder.filePath, env: folder.env };
414
+ }
415
+ const filePath = sdkCliEnvFilePath(config.baseUrl);
416
+ const env = parseEnvFile(filePath);
417
+ return (env[API_KEY_ENV] ?? "").trim() === apiKey ? { scope: "global", filePath, env } : null;
418
+ }
419
+ function resolveCliWorkspace(config, explicitWorkspace) {
420
+ const option = explicitWorkspace?.trim();
421
+ if (option) return { workspaceId: option, source: "option" };
422
+ const env = process.env[WORKSPACE_ID_ENV]?.trim();
423
+ if (env) return { workspaceId: env, source: "env" };
424
+ const saved = resolveCredentialEnvFile(config)?.env[WORKSPACE_ID_ENV]?.trim();
425
+ if (saved) return { workspaceId: saved, source: "saved" };
426
+ return { workspaceId: null, source: "default" };
427
+ }
428
+ function saveCliWorkspace(config, workspaceId) {
429
+ const target = resolveCredentialEnvFile(config);
430
+ if (!target) {
431
+ throw new ConfigError(
432
+ `${API_KEY_ENV} comes from the environment, so there is no saved auth to add a workspace to. Set ${WORKSPACE_ID_ENV} for that invocation instead.`
433
+ );
434
+ }
435
+ const values = { [WORKSPACE_ID_ENV]: workspaceId ?? "" };
436
+ if (target.scope === "folder") {
437
+ mergeProjectEnvFile(target.filePath, values);
438
+ } else {
439
+ saveHostEnvValues(config.baseUrl, values);
440
+ }
441
+ return { scope: target.scope, filePath: target.filePath };
442
+ }
443
+ function workspaceConfig(baseUrl, apiKey, explicitWorkspace) {
444
+ const { workspaceId } = resolveCliWorkspace(
445
+ { baseUrl, apiKey },
446
+ explicitWorkspace
447
+ );
448
+ return workspaceId ? { workspace: workspaceId } : {};
449
+ }
391
450
  function resolveConfig(options) {
392
451
  const baseUrl = normalizeBaseUrl(
393
452
  options?.baseUrl?.trim() || autoDetectBaseUrl()
@@ -408,6 +467,7 @@ function resolveConfig(options) {
408
467
  baseUrl,
409
468
  timeout: options?.timeout ?? DEFAULT_TIMEOUT,
410
469
  maxRetries: options?.maxRetries ?? DEFAULT_MAX_RETRIES,
470
+ ...workspaceConfig(baseUrl, apiKey, options?.workspace),
411
471
  // Pass through untouched: the transport owns case-insensitive merging so
412
472
  // there is exactly one place that decides which header wins.
413
473
  ...options?.headers ? { headers: { ...options.headers } } : {},
@@ -794,6 +854,10 @@ export {
794
854
  ACTIVE_ORG_NAME_ENV,
795
855
  FEATURES_ENV,
796
856
  PROD_URL,
857
+ DEFAULT_TIMEOUT,
858
+ DEFAULT_MAX_RETRIES,
859
+ TRANSIENT_HTTP_STATUSES,
860
+ defaultRetryBackoffMs,
797
861
  featureEnvValues,
798
862
  storedHostApiKey,
799
863
  storedHostFeatures,
@@ -809,6 +873,8 @@ export {
809
873
  resolveGlobalApiKeyForBaseUrl,
810
874
  getResolvedProjectAuthSource,
811
875
  resolveBaseUrlOnly,
876
+ resolveCliWorkspace,
877
+ saveCliWorkspace,
812
878
  resolveConfig,
813
879
  ensureProjectPrivatePathsIgnored,
814
880
  saveProjectDeeplineEnvValues,
@@ -6,6 +6,9 @@ var TOOL_EXECUTION_ERROR_BRAND = Symbol.for(
6
6
  var PROVIDER_TRANSIENT_ERROR_BRAND = Symbol.for(
7
7
  "deepline.provider-transient-error.v1"
8
8
  );
9
+ var PROVIDER_REJECTED_ERROR_BRAND = Symbol.for(
10
+ "deepline.provider-rejected-error.v1"
11
+ );
9
12
  var LEGACY_TOOL_EXECUTION_ERROR_SCHEMA_VERSION = 0;
10
13
  var TOOL_EXECUTION_ERROR_SCHEMA_VERSION = 1;
11
14
  var SUPPORTED_TOOL_EXECUTION_ERROR_SCHEMA_VERSIONS = [
@@ -135,6 +138,9 @@ var ToolExecutionError = class _ToolExecutionError extends DeeplineError {
135
138
  if (isProviderTransientFailure(options)) {
136
139
  applyBrand(this, PROVIDER_TRANSIENT_ERROR_BRAND);
137
140
  }
141
+ if (isProviderRejectionFailure(options)) {
142
+ applyBrand(this, PROVIDER_REJECTED_ERROR_BRAND);
143
+ }
138
144
  }
139
145
  static [Symbol.hasInstance](value) {
140
146
  if (this !== _ToolExecutionError) return nativeInstanceOf(this, value);
@@ -147,6 +153,14 @@ function brandAsToolExecutionError(value) {
147
153
  function isProviderTransientFailure(input) {
148
154
  return input.origin === "provider" && (input.category === "rate_limit" || input.category === "network" || input.category === "upstream");
149
155
  }
156
+ var PROVIDER_REJECTION_CODES = [
157
+ "UPSTREAM_BAD_INPUT",
158
+ "UPSTREAM_NOT_FOUND"
159
+ ];
160
+ function isProviderRejectionFailure(input) {
161
+ const code = _nullishCoalesce(input.code, () => ( ""));
162
+ return isProviderTransientFailure(input) && input.category === "upstream" && PROVIDER_REJECTION_CODES.includes(code);
163
+ }
150
164
  var ProviderTransientError = (_class = class _ProviderTransientError extends ToolExecutionError {
151
165
  /** Provider attribution is guaranteed for this subtype. */
152
166
  __init() {this.origin = "provider"}
@@ -166,6 +180,26 @@ var ProviderTransientError = (_class = class _ProviderTransientError extends Too
166
180
  return hasBrand(value, PROVIDER_TRANSIENT_ERROR_BRAND);
167
181
  }
168
182
  }, _class);
183
+ var ProviderRejectedError = class _ProviderRejectedError extends ProviderTransientError {
184
+ /** Constructed by Deepline when a provider rejects the request. */
185
+ constructor(message, options) {
186
+ super(message, { ...options, category: "upstream" });
187
+ this.name = "ProviderRejectedError";
188
+ applyBrand(this, PROVIDER_REJECTED_ERROR_BRAND);
189
+ }
190
+ static [Symbol.hasInstance](value) {
191
+ if (this !== _ProviderRejectedError) return nativeInstanceOf(this, value);
192
+ if (hasBrand(value, PROVIDER_REJECTED_ERROR_BRAND)) return true;
193
+ if (!hasBrand(value, TOOL_EXECUTION_ERROR_BRAND)) return false;
194
+ const fields = value;
195
+ return isProviderRejectionFailure({
196
+ origin: fields.origin,
197
+ category: fields.category,
198
+ retryable: fields.retryable === true,
199
+ code: typeof fields.code === "string" ? fields.code : null
200
+ });
201
+ }
202
+ };
169
203
  function getProviderUnavailableReason(error) {
170
204
  if (error instanceof ProviderTransientError) return error.category;
171
205
  if (error instanceof ToolExecutionError && error.origin === "deepline" && error.category === "rate_limit") {
@@ -345,6 +379,12 @@ function deserializeToolExecutionFailure(message, value, acceptedSchemaVersion)
345
379
  }
346
380
  const failure = normalizeToolExecutionFailure(value);
347
381
  if (!failure) return null;
382
+ if (isProviderRejectionFailure(failure)) {
383
+ return new ProviderRejectedError(message, {
384
+ ...failure,
385
+ code: failure.code
386
+ });
387
+ }
348
388
  if (isProviderTransientFailure(failure)) {
349
389
  return new ProviderTransientError(message, failure);
350
390
  }
@@ -369,4 +409,5 @@ function deserializeToolExecutionFailure(message, value, acceptedSchemaVersion)
369
409
 
370
410
 
371
411
 
372
- exports.TOOL_EXECUTION_ERROR_SCHEMA_VERSION = TOOL_EXECUTION_ERROR_SCHEMA_VERSION; exports.SUPPORTED_TOOL_EXECUTION_ERROR_SCHEMA_VERSIONS = SUPPORTED_TOOL_EXECUTION_ERROR_SCHEMA_VERSIONS; exports.TOOL_EXECUTION_ERROR_SCHEMA_HEADER = TOOL_EXECUTION_ERROR_SCHEMA_HEADER; exports.readToolUpstreamResponse = readToolUpstreamResponse; exports.attachToolUpstreamResponse = attachToolUpstreamResponse; exports.DeeplineError = DeeplineError; exports.ToolExecutionError = ToolExecutionError; exports.brandAsToolExecutionError = brandAsToolExecutionError; exports.isProviderTransientFailure = isProviderTransientFailure; exports.ProviderTransientError = ProviderTransientError; exports.getProviderUnavailableReason = getProviderUnavailableReason; exports.isProviderUnavailable = isProviderUnavailable; exports.isProviderWaterfallUnavailableError = isProviderWaterfallUnavailableError; exports.brandAsProviderTransientError = brandAsProviderTransientError; exports.normalizeToolExecutionFailure = normalizeToolExecutionFailure; exports.serializeToolExecutionFailure = serializeToolExecutionFailure; exports.deserializeToolExecutionFailure = deserializeToolExecutionFailure;
412
+
413
+ exports.TOOL_EXECUTION_ERROR_SCHEMA_VERSION = TOOL_EXECUTION_ERROR_SCHEMA_VERSION; exports.SUPPORTED_TOOL_EXECUTION_ERROR_SCHEMA_VERSIONS = SUPPORTED_TOOL_EXECUTION_ERROR_SCHEMA_VERSIONS; exports.TOOL_EXECUTION_ERROR_SCHEMA_HEADER = TOOL_EXECUTION_ERROR_SCHEMA_HEADER; exports.readToolUpstreamResponse = readToolUpstreamResponse; exports.attachToolUpstreamResponse = attachToolUpstreamResponse; exports.DeeplineError = DeeplineError; exports.ToolExecutionError = ToolExecutionError; exports.brandAsToolExecutionError = brandAsToolExecutionError; exports.isProviderTransientFailure = isProviderTransientFailure; exports.ProviderTransientError = ProviderTransientError; exports.ProviderRejectedError = ProviderRejectedError; exports.getProviderUnavailableReason = getProviderUnavailableReason; exports.isProviderUnavailable = isProviderUnavailable; exports.isProviderWaterfallUnavailableError = isProviderWaterfallUnavailableError; exports.brandAsProviderTransientError = brandAsProviderTransientError; exports.normalizeToolExecutionFailure = normalizeToolExecutionFailure; exports.serializeToolExecutionFailure = serializeToolExecutionFailure; exports.deserializeToolExecutionFailure = deserializeToolExecutionFailure;
@@ -25,7 +25,7 @@ import {
25
25
  stagePlayFiles,
26
26
  startPlayRun,
27
27
  submitPreparedPlayRunAdmission
28
- } from "./chunk-LX35AXTN.mjs";
28
+ } from "./chunk-5TYLSS4Q.mjs";
29
29
  import {
30
30
  describePlayDetail,
31
31
  describePlayListItem
@@ -37,16 +37,32 @@ import {
37
37
  RETAINED_PIPELINE_RECEIVERS_HEADER,
38
38
  RUNTIME_ENVIRONMENT_TOKEN_HEADER,
39
39
  SDK_API_MAJOR
40
- } from "./chunk-4D3WIZST.mjs";
40
+ } from "./chunk-OTV2UUKW.mjs";
41
41
  import {
42
42
  CustomerDbQueryOutcomeUnknownError
43
- } from "./chunk-NURW5XH4.mjs";
43
+ } from "./chunk-ASB47RXJ.mjs";
44
44
  import {
45
45
  DeeplineError,
46
46
  TOOL_EXECUTION_ERROR_SCHEMA_HEADER,
47
47
  TOOL_EXECUTION_ERROR_SCHEMA_VERSION,
48
48
  ToolExecutionError
49
- } from "./chunk-JL2OTMSG.mjs";
49
+ } from "./chunk-Z3A2S3QM.mjs";
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) {
@@ -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));
@@ -596,7 +612,7 @@ var ToolCalls = class {
596
612
  const connection = options?.connection;
597
613
  if (connection !== void 0 && (!isToolConnectionName(connection) || options?.idempotencyKey !== void 0 || options?.recover)) {
598
614
  throw new DeeplineError(
599
- "Use a valid workspace connection name without execution recovery.",
615
+ "Use a valid org connection name without execution recovery.",
600
616
  400,
601
617
  "NAMED_CONNECTION_INVALID"
602
618
  );
@@ -2433,7 +2449,7 @@ async function findConnection(client, name, provider) {
2433
2449
  );
2434
2450
  if (matches.length === 0)
2435
2451
  throw new DeeplineError(
2436
- `No workspace connection named ${JSON.stringify(name)}. Run deepline integrations list --json.`,
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
  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;
@@ -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 (signal?.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 (!signal?.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 = 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 = 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 = 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 (signal?.aborted) {
3227
3253
  return;
3228
3254
  }
3229
- if (!isTransientPlayRunReadError(error)) {
3255
+ const heldTimeout = serverWaitMs > 0 && error instanceof 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;
@@ -3744,7 +3772,9 @@ var DeeplineClient = 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 _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: 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 _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`,
@@ -5131,7 +5180,9 @@ var DeeplineClient = 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)) {
@@ -5898,7 +5949,7 @@ var DeeplineClient = 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 _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(
@@ -6747,8 +6798,12 @@ var DeeplineClient = 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 }
@@ -7550,6 +7605,7 @@ var DeeplineClient = class _DeeplineClient {
7550
7605
  };
7551
7606
 
7552
7607
  export {
7608
+ PUBLIC_PLAN_SKUS,
7553
7609
  iterateCursorPages,
7554
7610
  requireBillingIdempotencyKey,
7555
7611
  planCustomerDbQuery,