deepline 0.3.552 → 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 (319) hide show
  1. package/dist/bundling-sources/sdk/src/client-core.ts +107 -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 +118 -8
  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 +8 -1
  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 +9 -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-resource-failure.ts +26 -3
  43. package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-dead-letter.ts +41 -13
  44. package/dist/bundling-sources/shared_libs/monitors/signal-radars/raw-receipt-causes.ts +219 -0
  45. package/dist/bundling-sources/shared_libs/monitors/snitcher-ip2company.ts +21 -10
  46. package/dist/bundling-sources/shared_libs/monitors/starter-templates.ts +13 -0
  47. package/dist/bundling-sources/shared_libs/monitors/tracking-provider-guidance.ts +6 -0
  48. package/dist/bundling-sources/shared_libs/monitors/tracking-provider-integrations.ts +13 -0
  49. package/dist/bundling-sources/shared_libs/observability/dlq.ts +1 -1
  50. package/dist/bundling-sources/shared_libs/observability/log-metadata.ts +5 -3
  51. package/dist/bundling-sources/shared_libs/observability/queue-health.ts +10 -1
  52. package/dist/bundling-sources/shared_libs/observability/queue-item-connectors.ts +1 -0
  53. package/dist/bundling-sources/shared_libs/observability/redaction.ts +24 -1
  54. package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +168 -41
  55. package/dist/bundling-sources/shared_libs/observability/scheduled-work-manual.ts +1 -2
  56. package/dist/bundling-sources/shared_libs/play-data-plane/preview-r2-oidc.ts +188 -0
  57. package/dist/bundling-sources/shared_libs/play-data-plane/r2.ts +170 -16
  58. package/dist/bundling-sources/shared_libs/play-data-plane/runtime-sheet-storage-contract.ts +5 -0
  59. package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +68 -2
  60. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +444 -39
  61. package/dist/bundling-sources/shared_libs/play-runtime/ctx-fetch-caller-deadline.ts +200 -0
  62. package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +6 -0
  63. package/dist/bundling-sources/shared_libs/play-runtime/deployment/runtime-topology.ts +21 -1
  64. package/dist/bundling-sources/shared_libs/play-runtime/durable-call-cache.ts +3 -2
  65. package/dist/bundling-sources/shared_libs/play-runtime/durable-summary-events.ts +70 -2
  66. package/dist/bundling-sources/shared_libs/play-runtime/durable-tool-identity.ts +3 -3
  67. package/dist/bundling-sources/shared_libs/play-runtime/execution-capabilities.ts +16 -0
  68. package/dist/bundling-sources/shared_libs/play-runtime/experiment-switches.ts +72 -0
  69. package/dist/bundling-sources/shared_libs/play-runtime/fixture-behavior.ts +1 -0
  70. package/dist/bundling-sources/shared_libs/play-runtime/governor/policy.ts +7 -1
  71. package/dist/bundling-sources/shared_libs/play-runtime/internal-bootstrap-token.ts +62 -0
  72. package/dist/bundling-sources/shared_libs/play-runtime/map-memory-limits.ts +74 -3
  73. package/dist/bundling-sources/shared_libs/play-runtime/output-size-limits.ts +31 -3
  74. package/dist/bundling-sources/shared_libs/play-runtime/play-http-request.ts +6 -0
  75. package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +8 -0
  76. package/dist/bundling-sources/shared_libs/play-runtime/query-result-dataset.ts +19 -0
  77. package/dist/bundling-sources/shared_libs/play-runtime/resource-governor.ts +39 -2
  78. package/dist/bundling-sources/shared_libs/play-runtime/run-failure.ts +9 -1
  79. package/dist/bundling-sources/shared_libs/play-runtime/run-identity.ts +33 -0
  80. package/dist/bundling-sources/shared_libs/play-runtime/run-ledger-projection-contract.ts +24 -0
  81. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +254 -44
  82. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-payload-transport.ts +87 -6
  83. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal.ts +241 -10
  84. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/early-sandbox-egress.ts +161 -14
  85. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/early-sandbox.ts +16 -3
  86. package/dist/bundling-sources/shared_libs/play-runtime/runtime-api-compression.ts +37 -0
  87. package/dist/bundling-sources/shared_libs/play-runtime/runtime-api-paths.ts +9 -0
  88. package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +259 -52
  89. package/dist/bundling-sources/shared_libs/play-runtime/runtime-authority.ts +13 -0
  90. package/dist/bundling-sources/shared_libs/play-runtime/runtime-constants.ts +30 -0
  91. package/dist/bundling-sources/shared_libs/play-runtime/runtime-operation-contract.ts +62 -1
  92. package/dist/bundling-sources/shared_libs/play-runtime/runtime-scheduler-topology.ts +36 -0
  93. package/dist/bundling-sources/shared_libs/play-runtime/runtime-sheet-row-transition.ts +36 -0
  94. package/dist/bundling-sources/shared_libs/play-runtime/runtime-speed-profile.ts +206 -2
  95. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-pool.ts +42 -0
  96. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +185 -64
  97. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-worker-slot-ledger.ts +157 -0
  98. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/early-sandbox-lane.ts +110 -2
  99. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/early-sandbox-listener-hint.ts +323 -0
  100. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/executor-attempt-standing.ts +72 -0
  101. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/integration-operation-value-storage.ts +23 -4
  102. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-workspace-purge.ts +199 -0
  103. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +632 -66
  104. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-outbox-recovery.ts +517 -16
  105. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-api-origin.ts +1 -1
  106. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-receipt-value-storage.ts +9 -0
  107. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-worker-wake.ts +599 -2
  108. package/dist/bundling-sources/shared_libs/play-runtime/secret-resolution-retry-policy.ts +26 -1
  109. package/dist/bundling-sources/shared_libs/play-runtime/startup-read-tool-ids.ts +60 -0
  110. package/dist/bundling-sources/shared_libs/play-runtime/test-runtime-seams.ts +51 -0
  111. package/dist/bundling-sources/shared_libs/play-runtime/tool-call-retry-facts.ts +2 -0
  112. package/dist/bundling-sources/shared_libs/play-runtime/tool-execute-retry-policy.ts +113 -3
  113. package/dist/bundling-sources/shared_libs/play-runtime/tool-http-errors.ts +5 -7
  114. package/dist/bundling-sources/shared_libs/play-runtime/work-receipt-storage-contract.ts +2 -0
  115. package/dist/bundling-sources/shared_libs/play-runtime/workflow-executor-auth.ts +3 -0
  116. package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +40 -5
  117. package/dist/bundling-sources/shared_libs/plays/deploy/api-client.ts +3 -0
  118. package/dist/bundling-sources/shared_libs/plays/deploy/control-plane-types.ts +16 -0
  119. package/dist/bundling-sources/shared_libs/plays/deploy/run-deployment.ts +10 -41
  120. package/dist/bundling-sources/shared_libs/plays/extension-bridge.ts +33 -0
  121. package/dist/bundling-sources/shared_libs/plays/row-identity.ts +18 -1
  122. package/dist/bundling-sources/shared_libs/plays/tool-execution-error.ts +108 -0
  123. package/dist/bundling-sources/shared_libs/plays/trigger-config-contract.ts +14 -0
  124. package/dist/bundling-sources/shared_libs/product-notifications/catalog.ts +171 -0
  125. package/dist/bundling-sources/shared_libs/product-notifications/events.ts +27 -1
  126. package/dist/bundling-sources/shared_libs/security/email-blacklist.ts +9 -24
  127. package/dist/bundling-sources/shared_libs/security/secret-redaction.ts +178 -5
  128. package/dist/bundling-sources/shared_libs/security/signup-email-dns-screen.ts +148 -0
  129. package/dist/bundling-sources/shared_libs/tool-execution-error.ts +108 -0
  130. package/dist/cli/{auth-KVSBJZOX.mjs → auth-I3QAU4RV.mjs} +8 -7
  131. package/dist/cli/auth-MQCN7WGZ.js +44 -0
  132. package/dist/cli/{billing-54RHFEBI.mjs → billing-3IC54OQQ.mjs} +197 -61
  133. package/dist/cli/{billing-FQREA7UA.js → billing-YGFFVAIC.js} +297 -161
  134. package/dist/cli/{chunk-4MK42735.js → chunk-2B5B5KAW.js} +210 -128
  135. package/dist/cli/{chunk-UBKA33KY.mjs → chunk-2MGZAI54.mjs} +17 -0
  136. package/dist/cli/{chunk-4NQF6KJ3.js → chunk-3NTP2OSG.js} +13 -13
  137. package/dist/cli/{chunk-HYC4MKGK.mjs → chunk-45OAVGU6.mjs} +5 -5
  138. package/dist/cli/{chunk-WLN3SUIA.js → chunk-4747TPLV.js} +3 -3
  139. package/dist/cli/{chunk-AZQ264ID.mjs → chunk-4BFTDNHU.mjs} +1 -1
  140. package/dist/cli/{chunk-BGBJV26E.mjs → chunk-4HYNMXXF.mjs} +4 -4
  141. package/dist/cli/{chunk-DJ2JDK4O.mjs → chunk-4SMCFQ23.mjs} +1 -1
  142. package/dist/cli/{chunk-QPKH23EC.mjs → chunk-55F6HNOY.mjs} +5 -5
  143. package/dist/cli/{chunk-LX35AXTN.mjs → chunk-5TYLSS4Q.mjs} +6 -6
  144. package/dist/cli/{chunk-634ZDA3F.js → chunk-6NE3RRRY.js} +1 -1
  145. package/dist/cli/{chunk-EITMD3A5.js → chunk-6VLFQZK6.js} +8 -8
  146. package/dist/cli/{chunk-EOPEYCY7.mjs → chunk-72V4PDH5.mjs} +18 -18
  147. package/dist/cli/{chunk-IHRKLXZN.js → chunk-74RES4DS.js} +5 -5
  148. package/dist/cli/{chunk-45PVGZST.js → chunk-7GEMELKI.js} +366 -320
  149. package/dist/cli/{chunk-4UUR4TCH.js → chunk-7O6J6A7P.js} +1871 -92
  150. package/dist/cli/{chunk-XVB7V4N7.js → chunk-7SERLBNR.js} +161 -53
  151. package/dist/cli/{chunk-F2LH7TGF.js → chunk-7YRJ5UC4.js} +21 -21
  152. package/dist/cli/{chunk-YJHE3O5M.mjs → chunk-A7DLBE5K.mjs} +136 -54
  153. package/dist/cli/{chunk-6PRW5UBA.mjs → chunk-AGICYWGN.mjs} +299 -69
  154. package/dist/cli/{chunk-S5S355UY.mjs → chunk-AGIQDA2T.mjs} +12 -12
  155. package/dist/cli/{chunk-RBEUVDZF.js → chunk-AGLR6QVN.js} +249 -107
  156. package/dist/cli/{chunk-NURW5XH4.mjs → chunk-ASB47RXJ.mjs} +1 -1
  157. package/dist/cli/{chunk-RQZQVFCJ.js → chunk-BVDKFS2T.js} +2 -2
  158. package/dist/cli/{chunk-PFO3ISXA.js → chunk-CACFJODG.js} +174 -129
  159. package/dist/cli/{chunk-6RZOWL2V.mjs → chunk-CAEBJOYU.mjs} +1 -1
  160. package/dist/cli/{chunk-XDVT3GOM.js → chunk-CFJFUVX2.js} +18 -1
  161. package/dist/cli/{chunk-6YCA5NKJ.js → chunk-DP2VH7CO.js} +12 -12
  162. package/dist/cli/{chunk-AWJPDPMA.mjs → chunk-DP64MD6U.mjs} +1 -1
  163. package/dist/cli/{chunk-PTVD2GVQ.mjs → chunk-DZA7RFGL.mjs} +5 -5
  164. package/dist/cli/{chunk-V436Z54K.js → chunk-E2G2DNAB.js} +3 -1
  165. package/dist/cli/{chunk-GGGAEVCX.mjs → chunk-E7WZOX2A.mjs} +22 -18
  166. package/dist/cli/{chunk-IDVVIXPJ.js → chunk-FM7LPUPA.js} +41 -41
  167. package/dist/cli/{chunk-AQWQ2BFX.mjs → chunk-GAVZ4EOD.mjs} +1 -1
  168. package/dist/cli/{chunk-GKYAYLRI.js → chunk-HEBO3XNZ.js} +27 -31
  169. package/dist/cli/{chunk-IYSTRCLX.mjs → chunk-HSJ6X2AQ.mjs} +4 -4
  170. package/dist/cli/{chunk-UPMRIVZB.js → chunk-HVI55MTK.js} +61 -10
  171. package/dist/cli/{chunk-KWSH5T7K.js → chunk-IH6GDNKW.js} +21 -21
  172. package/dist/cli/{chunk-HO3XK3R7.js → chunk-IMX7J4DU.js} +8 -8
  173. package/dist/cli/{chunk-EUPVF4SU.mjs → chunk-INEMTYMT.mjs} +8 -8
  174. package/dist/cli/{chunk-3FD5EQ62.js → chunk-IUOGII7D.js} +6 -7
  175. package/dist/cli/{chunk-U7QRMBIY.mjs → chunk-JJGWHITQ.mjs} +5 -5
  176. package/dist/cli/{chunk-SHLFOPD6.js → chunk-JLGP5XAJ.js} +5 -5
  177. package/dist/cli/{chunk-4TALT2M3.mjs → chunk-LFOERUQY.mjs} +69 -3
  178. package/dist/cli/{chunk-BBTKAASQ.js → chunk-LFQJW4S2.js} +42 -1
  179. package/dist/cli/{chunk-Z5TSLLOW.mjs → chunk-LH5PZKER.mjs} +63 -18
  180. package/dist/cli/{chunk-S46HWQKO.js → chunk-LRDHPOZW.js} +69 -69
  181. package/dist/cli/{chunk-6ZORHRKB.mjs → chunk-LRZGS6RZ.mjs} +2 -0
  182. package/dist/cli/{chunk-SL6MYJYM.js → chunk-MJTVX4QK.js} +35 -35
  183. package/dist/cli/{chunk-7IKQKKNX.js → chunk-MLABYI4M.js} +90 -24
  184. package/dist/cli/{chunk-ZIAXDBXX.mjs → chunk-NDNHYONK.mjs} +17 -21
  185. package/dist/cli/{chunk-YLTMXJFC.mjs → chunk-OTV2UUKW.mjs} +158 -16
  186. package/dist/cli/{chunk-G4O75EXF.js → chunk-Q6Z6N3A7.js} +18 -18
  187. package/dist/cli/{chunk-WE5HES3H.mjs → chunk-QG6JIWUL.mjs} +151 -43
  188. package/dist/cli/{chunk-QY3ZNU6Z.mjs → chunk-QI5S5HWB.mjs} +2 -2
  189. package/dist/cli/{chunk-CBV7AKWM.js → chunk-R6DZ6NQ2.js} +5 -5
  190. package/dist/cli/{chunk-57VZVF5D.mjs → chunk-RMNOZKRI.mjs} +3 -3
  191. package/dist/cli/{chunk-BAIST2BR.js → chunk-RTV4RF7N.js} +36 -36
  192. package/dist/cli/{chunk-JWUAX6OP.js → chunk-SBH4CKPN.js} +11 -11
  193. package/dist/cli/{chunk-FTJLJCE5.mjs → chunk-SG3LUONJ.mjs} +3 -3
  194. package/dist/cli/{chunk-2WFPHBR4.js → chunk-TFEXSHPM.js} +22 -18
  195. package/dist/cli/{chunk-QAORXEY3.mjs → chunk-TN4TY6TT.mjs} +6 -7
  196. package/dist/cli/{chunk-WEHCBH5R.mjs → chunk-UEVKMZLR.mjs} +54 -3
  197. package/dist/cli/{chunk-QILKGXYF.mjs → chunk-UVQJYV76.mjs} +2 -2
  198. package/dist/cli/{chunk-FSIVF2SI.mjs → chunk-VZGLIK5U.mjs} +1 -1
  199. package/dist/cli/{chunk-MF2GHZDO.js → chunk-WOCHZCUJ.js} +2 -2
  200. package/dist/cli/{chunk-VQALXEXO.js → chunk-XLIHTJVM.js} +348 -118
  201. package/dist/cli/{chunk-ADRC5I3R.js → chunk-Y6SP3JMI.js} +22 -22
  202. package/dist/cli/{chunk-77AAAGVB.js → chunk-YUA6HA6D.js} +2 -2
  203. package/dist/cli/{chunk-JL2OTMSG.mjs → chunk-Z3A2S3QM.mjs} +41 -0
  204. package/dist/cli/{chunk-6O5HOODW.mjs → chunk-Z6XPSHKM.mjs} +87 -41
  205. package/dist/cli/{chunk-QX7LFGJR.mjs → chunk-Z7AOIHFE.mjs} +1870 -91
  206. package/dist/cli/command-docs.js +3 -3
  207. package/dist/cli/command-docs.mjs +2 -2
  208. package/dist/cli/concurrent-runs-help-CFJH4KXV.js +22 -0
  209. package/dist/cli/{concurrent-runs-help-Q4KPAUJX.mjs → concurrent-runs-help-DNV2X5AZ.mjs} +9 -8
  210. package/dist/cli/{csv-F5VAGX4K.js → csv-SA6ELJY6.js} +16 -15
  211. package/dist/cli/{csv-2PTVDNO6.mjs → csv-ZXZGHWOM.mjs} +7 -6
  212. package/dist/cli/{db-IEDXAUF7.mjs → db-A54SP6AD.mjs} +16 -16
  213. package/dist/cli/{db-Z3OIUFMM.js → db-JHFEIQBU.js} +43 -43
  214. package/dist/cli/describe-PHQ33AGS.mjs +50 -0
  215. package/dist/cli/describe-RHJ4XRFI.js +50 -0
  216. package/dist/cli/describe-core.d.mts +3 -3
  217. package/dist/cli/describe-core.d.ts +3 -3
  218. package/dist/cli/describe-core.js +6 -6
  219. package/dist/cli/describe-core.mjs +5 -5
  220. package/dist/cli/{executions-R3LP74QN.mjs → executions-HL2M2DFU.mjs} +10 -10
  221. package/dist/cli/{executions-H6H5655J.js → executions-TLFZRHBJ.js} +12 -12
  222. package/dist/cli/{feedback-VFOUR66B.js → feedback-5UEX5UZK.js} +17 -16
  223. package/dist/cli/{feedback-WL3MRVT5.mjs → feedback-QMBTNXVG.mjs} +9 -8
  224. package/dist/cli/git-4JWOOHBG.js +26 -0
  225. package/dist/cli/{git-YX2J4GCI.mjs → git-LKGXVIVC.mjs} +8 -7
  226. package/dist/cli/index.js +170 -158
  227. package/dist/cli/index.mjs +60 -48
  228. package/dist/cli/{integrations-E2JZYKHS.js → integrations-6RUTLMN7.js} +23 -27
  229. package/dist/cli/{integrations-5ZK5KLVP.mjs → integrations-FGGRVUJ7.mjs} +15 -19
  230. package/dist/cli/{legacy-noops-3VW4IJTH.js → legacy-noops-J3Z7QRWZ.js} +12 -11
  231. package/dist/cli/{legacy-noops-SMN3GSXY.mjs → legacy-noops-YIPRMVXZ.mjs} +9 -8
  232. package/dist/cli/{mcp-UQV2K4EW.js → mcp-6LWFP7RW.js} +121 -48
  233. package/dist/cli/{mcp-V6MGCYAG.mjs → mcp-CHDYFO7F.mjs} +100 -27
  234. package/dist/cli/{monitors-R3BBDCRC.js → monitors-STM6A7OU.js} +221 -186
  235. package/dist/cli/{monitors-GGKS5W6M.mjs → monitors-UGRY2BXI.mjs} +58 -23
  236. package/dist/cli/org-3SYOUQCX.mjs +2289 -0
  237. package/dist/cli/org-ZOBSNSIB.js +2289 -0
  238. package/dist/cli/outcomes-H4YYAT5X.js +2865 -0
  239. package/dist/cli/outcomes-Z3P2JE67.mjs +2865 -0
  240. package/dist/cli/{play-2MVO27VO.js → play-SM4CW2GS.js} +1116 -846
  241. package/dist/cli/{play-MDWPR4XG.mjs → play-SN5YWLS7.mjs} +375 -105
  242. package/dist/cli/{providers-AKDYFZJZ.mjs → providers-WZ4YBR5Y.mjs} +10 -10
  243. package/dist/cli/{providers-2AACRUZH.js → providers-WZARYMCF.js} +13 -13
  244. package/dist/cli/{quickstart-QDGRJFZY.mjs → quickstart-2575BNKA.mjs} +7 -6
  245. package/dist/cli/{quickstart-H6IV3PV3.js → quickstart-PS4YHQJ6.js} +9 -8
  246. package/dist/cli/{run-2634REDK.js → run-FLZ6OTM7.js} +51 -51
  247. package/dist/cli/{run-RTSQNGRD.mjs → run-ZUHCZOJS.mjs} +31 -31
  248. package/dist/cli/run-identity-LMLFMACS.js +31 -0
  249. package/dist/cli/{run-identity-MRNCEGV2.mjs → run-identity-MAZ7ANH5.mjs} +9 -3
  250. package/dist/cli/{search-6AOJ4XPP.mjs → search-HLPPKQEO.mjs} +11 -11
  251. package/dist/cli/search-JJWVHR3N.js +32 -0
  252. package/dist/cli/{search-output-6ADMTOU5.mjs → search-output-PDAXNOGP.mjs} +9 -8
  253. package/dist/cli/{search-output-S5ODBL5E.js → search-output-RXJLU36B.js} +12 -11
  254. package/dist/cli/{secrets-TFIFBFB3.mjs → secrets-CGELYQ3H.mjs} +11 -11
  255. package/dist/cli/{secrets-LHCIIHMT.js → secrets-QJNG7G2Y.js} +20 -20
  256. package/dist/cli/sessions-DHTBT2GN.js +23 -0
  257. package/dist/cli/{sessions-WHBVUHVW.mjs → sessions-ELMWVR4M.mjs} +9 -8
  258. package/dist/cli/{settings-CP4FVK2W.js → settings-44I44P5F.js} +89 -89
  259. package/dist/cli/{settings-EBONWL5C.mjs → settings-RR3LZXL7.mjs} +16 -16
  260. package/dist/cli/{setup-I5AZE3IU.mjs → setup-KGWRWH4B.mjs} +20 -19
  261. package/dist/cli/{setup-LFGHTNLQ.js → setup-KTEYOCJO.js} +60 -59
  262. package/dist/cli/skills-EPZPEXI2.js +37 -0
  263. package/dist/cli/{skills-W76AO5XE.mjs → skills-FPRID2I5.mjs} +10 -9
  264. package/dist/cli/tools-IGQQ5TML.js +57 -0
  265. package/dist/cli/{tools-7IJHGF6W.mjs → tools-PI4WMDLY.mjs} +23 -23
  266. package/dist/cli/update-4RNCVYGE.js +37 -0
  267. package/dist/cli/{update-GFOPZTHY.mjs → update-VJOJAZ7B.mjs} +14 -11
  268. package/dist/cli/{views-BPL2TQJ4.js → views-NTUOLNQU.js} +62 -64
  269. package/dist/cli/{views-D4NX4SBG.mjs → views-OVPSINZO.mjs} +47 -49
  270. package/dist/cli/{workflow-ZYNAUCKC.js → workflow-2UDYDM6F.js} +23 -23
  271. package/dist/cli/{workflow-YXP42FUI.mjs → workflow-7OEFNXZC.mjs} +13 -13
  272. package/dist/{client-CyXGrO4D.d.mts → client-B8f7RNF8.d.mts} +1 -1
  273. package/dist/{client-Bf3IpUKN.d.ts → client-C5TgXmJQ.d.ts} +1 -1
  274. package/dist/{client-core-BxsLnXlm.d.mts → client-core-SLLGBTht.d.mts} +268 -23
  275. package/dist/{client-core-BWd0lX0Z.d.ts → client-core-p0sOxnkl.d.ts} +268 -23
  276. package/dist/{compiler-manifest-BqwVrOri.d.ts → compiler-manifest-D_zZEh9Q.d.mts} +70 -5
  277. package/dist/{compiler-manifest-BqwVrOri.d.mts → compiler-manifest-D_zZEh9Q.d.ts} +70 -5
  278. package/dist/{errors-BU8FB99X.d.mts → errors-CZCrBFrQ.d.mts} +1 -1
  279. package/dist/{errors-DfVN_FUG.d.ts → errors-DsUkLrdZ.d.ts} +1 -1
  280. package/dist/{index-BGnvtYGc.d.ts → index-B6RTOZGC.d.ts} +1 -1
  281. package/dist/{index-DjZgwpGw.d.mts → index-DeOVrEmX.d.mts} +1 -1
  282. package/dist/index.d.mts +7 -7
  283. package/dist/index.d.ts +7 -7
  284. package/dist/index.js +66 -55
  285. package/dist/index.mjs +25 -14
  286. package/dist/install-integrity.json +161 -142
  287. package/dist/plays/bundle-play-file.d.mts +3 -3
  288. package/dist/plays/bundle-play-file.d.ts +3 -3
  289. package/dist/plays/bundle-play-file.mjs +23 -4
  290. package/dist/plays/csv-data-input.js +3 -3
  291. package/dist/plays/csv-data-input.mjs +2 -2
  292. package/dist/plays/play-description.d.mts +2 -2
  293. package/dist/plays/play-description.d.ts +2 -2
  294. package/dist/plays/run-request.d.mts +2 -2
  295. package/dist/plays/run-request.d.ts +2 -2
  296. package/dist/plays/run-request.js +4 -4
  297. package/dist/plays/run-request.mjs +3 -3
  298. package/dist/release.d.mts +1 -1
  299. package/dist/release.d.ts +1 -1
  300. package/dist/release.js +2 -2
  301. package/dist/release.mjs +1 -1
  302. package/dist/server.d.mts +4 -4
  303. package/dist/server.d.ts +4 -4
  304. package/dist/server.js +15 -13
  305. package/dist/server.mjs +9 -7
  306. package/package.json +1 -1
  307. package/dist/cli/auth-MMNVWATX.js +0 -43
  308. package/dist/cli/concurrent-runs-help-FQAIHKKC.js +0 -21
  309. package/dist/cli/describe-QDANCTS3.mjs +0 -50
  310. package/dist/cli/describe-VUTT5ZKU.js +0 -50
  311. package/dist/cli/git-ETB3GH3K.js +0 -25
  312. package/dist/cli/org-GRYVMNSW.js +0 -1282
  313. package/dist/cli/org-Z37NGJV4.mjs +0 -1282
  314. package/dist/cli/run-identity-G257GQED.js +0 -25
  315. package/dist/cli/search-VTW2YNBS.js +0 -32
  316. package/dist/cli/sessions-CJ4FJ2WB.js +0 -22
  317. package/dist/cli/skills-R7EBXREW.js +0 -36
  318. package/dist/cli/tools-V7U2BDXM.js +0 -57
  319. package/dist/cli/update-4COPZETK.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 _chunkMF2GHZDOjs = require('./chunk-MF2GHZDO.js');
3
+ var _chunkWOCHZCUJjs = require('./chunk-WOCHZCUJ.js');
4
4
 
5
5
 
6
6
 
7
7
 
8
- var _chunk4MK42735js = require('./chunk-4MK42735.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") _chunk4MK42735js.flushDeferredSkillsSyncNotices.call(void 0, baseUrl);
22
- const compatibility = await _chunkMF2GHZDOjs.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
- () => _chunk4MK42735js.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
- _chunk4MK42735js.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-Z5TSLLOW.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-6PRW5UBA.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 _chunkPFO3ISXAjs = require('./chunk-PFO3ISXA.js');
3
+ var _chunkCACFJODGjs = require('./chunk-CACFJODG.js');
4
4
 
5
5
 
6
6
 
7
- var _chunk7IKQKKNXjs = require('./chunk-7IKQKKNX.js');
7
+ var _chunkMLABYI4Mjs = require('./chunk-MLABYI4M.js');
8
8
 
9
9
  // src/client.ts
10
- var DeeplineClient2 = class extends _chunkPFO3ISXAjs.DeeplineClient {
10
+ var DeeplineClient2 = class extends _chunkCACFJODGjs.DeeplineClient {
11
11
  constructor(options) {
12
- const config = _chunk7IKQKKNXjs.resolveConfig.call(void 0, options);
13
- super(config, new (0, _chunk7IKQKKNXjs.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-YLTMXJFC.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-YLTMXJFC.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;
@@ -3080,6 +3099,7 @@ var RUN_WATCH_SERVER_WAIT_MS = 2e4;
3080
3099
  var RUN_WATCH_SERVER_WAIT_FROM_START = true;
3081
3100
  var RUN_WATCH_HOLD_HEADER = "x-deepline-run-watch-hold";
3082
3101
  var TERMINAL_LOG_PROJECTION_RETRY_LIMIT = 3;
3102
+ var TERMINAL_LOG_PROJECTION_RETRY_INTERVAL_MS = 250;
3083
3103
  function waitForNextPoll(ms, signal) {
3084
3104
  if (signal?.aborted) {
3085
3105
  return Promise.resolve(false);
@@ -3270,7 +3290,7 @@ async function* watchRunEvents(options) {
3270
3290
  terminalLogProjectionRetries += 1;
3271
3291
  const remaining2 = Math.max(
3272
3292
  0,
3273
- pollIntervalMs - (Date.now() - pollStartedAt)
3293
+ Math.min(pollIntervalMs, TERMINAL_LOG_PROJECTION_RETRY_INTERVAL_MS) - (Date.now() - pollStartedAt)
3274
3294
  );
3275
3295
  if (!await waitForNextPoll(remaining2, signal)) return;
3276
3296
  continue;
@@ -3752,7 +3772,9 @@ var DeeplineClient = class _DeeplineClient {
3752
3772
  purchaseCredits: (options) => this.purchaseTargetBillingCredits(options),
3753
3773
  recoverCreditPurchase: (options) => this.recoverTargetBillingCreditPurchase(options),
3754
3774
  transitionPlan: (options) => this.transitionTargetBillingPlan(options),
3755
- 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)
3756
3778
  };
3757
3779
  this.workspaces = {
3758
3780
  members: (options) => {
@@ -3877,6 +3899,25 @@ var DeeplineClient = class _DeeplineClient {
3877
3899
  // ——————————————————————————————————————————————————————————
3878
3900
  // Views
3879
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
+ }
3880
3921
  /** List this workspace's views, most recently changed first. */
3881
3922
  async listViews(input) {
3882
3923
  const params = new URLSearchParams();
@@ -3902,7 +3943,7 @@ var DeeplineClient = class _DeeplineClient {
3902
3943
  input
3903
3944
  );
3904
3945
  }
3905
- /** 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. */
3906
3947
  async setViewAccess(id, access) {
3907
3948
  return await this.http.post(
3908
3949
  `/api/v2/views/${encodeURIComponent(id)}/access`,
@@ -5139,7 +5180,9 @@ var DeeplineClient = class _DeeplineClient {
5139
5180
  if (!playName)
5140
5181
  throw new Error("runs.list options.steps requires options.play.");
5141
5182
  if (node)
5142
- 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
+ );
5143
5186
  params.set("steps", "true");
5144
5187
  }
5145
5188
  if (typeof options.limit === "number" && Number.isFinite(options.limit)) {
@@ -5906,7 +5949,7 @@ var DeeplineClient = class _DeeplineClient {
5906
5949
  }
5907
5950
  if (!legacyTarget && name.toLowerCase() === "default") {
5908
5951
  throw new Error(
5909
- "Default is reserved for the workspace default notification group."
5952
+ "Default is reserved for the org default notification group."
5910
5953
  );
5911
5954
  }
5912
5955
  const normalizedTargets = targets.map(
@@ -5982,7 +6025,7 @@ var DeeplineClient = class _DeeplineClient {
5982
6025
  const connectionId = current.slackConnection.connectionId;
5983
6026
  if (slackTargets.size > 0 && !connectionId) {
5984
6027
  throw new Error(
5985
- "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."
5986
6029
  );
5987
6030
  }
5988
6031
  const resolvedSlackTargets = await Promise.all(
@@ -6755,11 +6798,12 @@ var DeeplineClient = class _DeeplineClient {
6755
6798
  {
6756
6799
  action: options.action,
6757
6800
  ...options.action === "start_or_change" && options.billingEmail ? { billing_email: options.billingEmail } : {},
6758
- ...options.targetPlanSku ? { target_plan_sku: options.targetPlanSku } : {},
6801
+ ...options.targetPlanSku ? { target_plan_sku: resolvePublicPlanSku(options.targetPlanSku) } : {},
6759
6802
  ...options.action === "start_or_change" && options.promoCode ? { promo_code: options.promoCode } : {},
6760
6803
  // Sent only for an annual purchase, so a monthly request's body (and
6761
6804
  // its idempotency hash) is unchanged.
6762
- ...options.action === "start_or_change" && options.billingInterval === "year" ? { billing_interval: "year" } : {}
6805
+ ...options.action === "start_or_change" && options.billingInterval === "year" ? { billing_interval: "year" } : {},
6806
+ ...options.action === "start_or_change" && options.paymentMethod === "invoice" ? { payment_method: "invoice" } : {}
6763
6807
  },
6764
6808
  { "Idempotency-Key": idempotencyKey },
6765
6809
  { maxRetries: 0, exactUrlOnly: true }
@@ -7561,6 +7605,7 @@ var DeeplineClient = class _DeeplineClient {
7561
7605
  };
7562
7606
 
7563
7607
  export {
7608
+ PUBLIC_PLAN_SKUS,
7564
7609
  iterateCursorPages,
7565
7610
  requireBillingIdempotencyKey,
7566
7611
  planCustomerDbQuery,