deepline 0.3.552 → 0.3.554

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 (323) 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-HJUNW7T2.mjs} +8 -7
  131. package/dist/cli/auth-SP6SKZJZ.js +44 -0
  132. package/dist/cli/{billing-FQREA7UA.js → billing-4TSA5HEC.js} +297 -161
  133. package/dist/cli/{billing-54RHFEBI.mjs → billing-SJYRJAQ2.mjs} +197 -61
  134. package/dist/cli/{chunk-4MK42735.js → chunk-2HMN5H54.js} +215 -130
  135. package/dist/cli/{chunk-UBKA33KY.mjs → chunk-2MGZAI54.mjs} +17 -0
  136. package/dist/cli/{chunk-EOPEYCY7.mjs → chunk-2ORPFQUA.mjs} +18 -18
  137. package/dist/cli/{chunk-RQZQVFCJ.js → chunk-2OVHNHCF.js} +2 -2
  138. package/dist/cli/{chunk-QX7LFGJR.mjs → chunk-33WRQSQ2.mjs} +1874 -91
  139. package/dist/cli/{chunk-UPMRIVZB.js → chunk-3IKGZ4CG.js} +74 -13
  140. package/dist/cli/{chunk-EUPVF4SU.mjs → chunk-3Z4VFCXO.mjs} +8 -8
  141. package/dist/cli/{chunk-GKYAYLRI.js → chunk-4DOFGIEJ.js} +27 -31
  142. package/dist/cli/{chunk-4TALT2M3.mjs → chunk-52Q5KETX.mjs} +69 -3
  143. package/dist/cli/{chunk-RBEUVDZF.js → chunk-5CYZHOKI.js} +249 -107
  144. package/dist/cli/{chunk-LX35AXTN.mjs → chunk-5TYLSS4Q.mjs} +6 -6
  145. package/dist/cli/{chunk-IYSTRCLX.mjs → chunk-62AUAWQV.mjs} +4 -4
  146. package/dist/cli/{chunk-ZIAXDBXX.mjs → chunk-62HWJXST.mjs} +17 -21
  147. package/dist/cli/{chunk-QY3ZNU6Z.mjs → chunk-6EXOAT6T.mjs} +2 -2
  148. package/dist/cli/{chunk-EITMD3A5.js → chunk-6VLFQZK6.js} +8 -8
  149. package/dist/cli/{chunk-ADRC5I3R.js → chunk-7OWI736E.js} +30 -30
  150. package/dist/cli/{chunk-NURW5XH4.mjs → chunk-ASB47RXJ.mjs} +1 -1
  151. package/dist/cli/{chunk-PTVD2GVQ.mjs → chunk-B6HO2XWH.mjs} +13 -13
  152. package/dist/cli/{chunk-YJHE3O5M.mjs → chunk-BOZAP2EM.mjs} +141 -56
  153. package/dist/cli/chunk-BVXIGOBZ.js +32 -0
  154. package/dist/cli/{chunk-XDVT3GOM.js → chunk-CFJFUVX2.js} +18 -1
  155. package/dist/cli/{chunk-WE5HES3H.mjs → chunk-D6Z6POKE.mjs} +151 -43
  156. package/dist/cli/{chunk-AZQ264ID.mjs → chunk-DSKSFFK2.mjs} +1 -1
  157. package/dist/cli/{chunk-SHLFOPD6.js → chunk-DUBXUAAO.js} +5 -5
  158. package/dist/cli/{chunk-V436Z54K.js → chunk-E2G2DNAB.js} +3 -1
  159. package/dist/cli/{chunk-HO3XK3R7.js → chunk-E74KGKFZ.js} +8 -8
  160. package/dist/cli/{chunk-77AAAGVB.js → chunk-ECHKAC7M.js} +2 -2
  161. package/dist/cli/{chunk-KWSH5T7K.js → chunk-EN5NHCCQ.js} +21 -21
  162. package/dist/cli/{chunk-6RZOWL2V.mjs → chunk-F7CMRKSK.mjs} +1 -1
  163. package/dist/cli/{chunk-JWUAX6OP.js → chunk-FBAFX43W.js} +11 -11
  164. package/dist/cli/{chunk-AQWQ2BFX.mjs → chunk-FXQ3JKE3.mjs} +1 -1
  165. package/dist/cli/{chunk-QPKH23EC.mjs → chunk-GA2M3G3Y.mjs} +5 -5
  166. package/dist/cli/{chunk-G4O75EXF.js → chunk-GHT2NDL7.js} +18 -18
  167. package/dist/cli/{chunk-MF2GHZDO.js → chunk-GRZENGNE.js} +2 -2
  168. package/dist/cli/{chunk-4UUR4TCH.js → chunk-IVZKMJUK.js} +1875 -92
  169. package/dist/cli/{chunk-FTJLJCE5.mjs → chunk-KVBQY4ST.mjs} +3 -3
  170. package/dist/cli/{chunk-S5S355UY.mjs → chunk-KZHBDMGF.mjs} +12 -12
  171. package/dist/cli/{chunk-BBTKAASQ.js → chunk-LFQJW4S2.js} +42 -1
  172. package/dist/cli/{chunk-6ZORHRKB.mjs → chunk-LRZGS6RZ.mjs} +2 -0
  173. package/dist/cli/{chunk-2WFPHBR4.js → chunk-LY5MMXFF.js} +47 -29
  174. package/dist/cli/{chunk-BAIST2BR.js → chunk-M7STM3MZ.js} +36 -36
  175. package/dist/cli/{chunk-SL6MYJYM.js → chunk-MJTVX4QK.js} +35 -35
  176. package/dist/cli/{chunk-45PVGZST.js → chunk-OPTV7D2V.js} +508 -361
  177. package/dist/cli/{chunk-PFO3ISXA.js → chunk-OVEYWO4H.js} +174 -129
  178. package/dist/cli/{chunk-BGBJV26E.mjs → chunk-PC2FTUCP.mjs} +4 -4
  179. package/dist/cli/{chunk-WLN3SUIA.js → chunk-PQQMPUCZ.js} +3 -3
  180. package/dist/cli/{chunk-HYC4MKGK.mjs → chunk-Q7ACILL2.mjs} +5 -5
  181. package/dist/cli/{chunk-CBV7AKWM.js → chunk-R6DZ6NQ2.js} +5 -5
  182. package/dist/cli/{chunk-57VZVF5D.mjs → chunk-RBBTCYQB.mjs} +3 -3
  183. package/dist/cli/{chunk-F2LH7TGF.js → chunk-RTHMGSZX.js} +21 -21
  184. package/dist/cli/{chunk-YLTMXJFC.mjs → chunk-S6W6SJ6E.mjs} +158 -16
  185. package/dist/cli/chunk-STXDSVQZ.mjs +32 -0
  186. package/dist/cli/{chunk-WEHCBH5R.mjs → chunk-TGUQET3O.mjs} +67 -6
  187. package/dist/cli/{chunk-IHRKLXZN.js → chunk-TJ6HLN56.js} +5 -5
  188. package/dist/cli/{chunk-3FD5EQ62.js → chunk-TOO3YM5N.js} +6 -7
  189. package/dist/cli/{chunk-QILKGXYF.mjs → chunk-UBBYHB2B.mjs} +2 -2
  190. package/dist/cli/{chunk-6PRW5UBA.mjs → chunk-UC4BDZKI.mjs} +299 -69
  191. package/dist/cli/{chunk-634ZDA3F.js → chunk-UNNOZKRT.js} +1 -1
  192. package/dist/cli/{chunk-IDVVIXPJ.js → chunk-UOT7HPBH.js} +41 -41
  193. package/dist/cli/{chunk-6YCA5NKJ.js → chunk-UYCZFQYQ.js} +12 -12
  194. package/dist/cli/{chunk-7IKQKKNX.js → chunk-VIUUTEHY.js} +90 -24
  195. package/dist/cli/{chunk-Z5TSLLOW.mjs → chunk-VLO5NFH2.mjs} +63 -18
  196. package/dist/cli/{chunk-U7QRMBIY.mjs → chunk-VQ75KX7G.mjs} +5 -5
  197. package/dist/cli/{chunk-4NQF6KJ3.js → chunk-VV4XGZ24.js} +13 -13
  198. package/dist/cli/{chunk-FSIVF2SI.mjs → chunk-VZGLIK5U.mjs} +1 -1
  199. package/dist/cli/{chunk-S46HWQKO.js → chunk-W6CZDTIR.js} +69 -69
  200. package/dist/cli/{chunk-XVB7V4N7.js → chunk-WL7P32PI.js} +161 -53
  201. package/dist/cli/{chunk-DJ2JDK4O.mjs → chunk-XD3MFTHA.mjs} +1 -1
  202. package/dist/cli/{chunk-GGGAEVCX.mjs → chunk-XFZX6FNM.mjs} +40 -22
  203. package/dist/cli/{chunk-AWJPDPMA.mjs → chunk-XU6QNM4D.mjs} +1 -1
  204. package/dist/cli/{chunk-QAORXEY3.mjs → chunk-YCOGPOUX.mjs} +6 -7
  205. package/dist/cli/{chunk-VQALXEXO.js → chunk-YQKCH4R7.js} +348 -118
  206. package/dist/cli/{chunk-6O5HOODW.mjs → chunk-YY55NYAH.mjs} +207 -60
  207. package/dist/cli/{chunk-JL2OTMSG.mjs → chunk-Z3A2S3QM.mjs} +41 -0
  208. package/dist/cli/command-docs.js +3 -3
  209. package/dist/cli/command-docs.mjs +2 -2
  210. package/dist/cli/{concurrent-runs-help-Q4KPAUJX.mjs → concurrent-runs-help-O3Q5IPLF.mjs} +9 -8
  211. package/dist/cli/concurrent-runs-help-ZFRZWX5V.js +22 -0
  212. package/dist/cli/{csv-F5VAGX4K.js → csv-4ZQ2RATI.js} +16 -15
  213. package/dist/cli/{csv-2PTVDNO6.mjs → csv-Y3BFPEM6.mjs} +7 -6
  214. package/dist/cli/{db-IEDXAUF7.mjs → db-3JYY4JNN.mjs} +17 -17
  215. package/dist/cli/{db-Z3OIUFMM.js → db-VEIFS4M7.js} +45 -45
  216. package/dist/cli/describe-EVJ4MFVU.mjs +50 -0
  217. package/dist/cli/describe-FG625QPF.js +50 -0
  218. package/dist/cli/describe-core.d.mts +3 -3
  219. package/dist/cli/describe-core.d.ts +3 -3
  220. package/dist/cli/describe-core.js +7 -7
  221. package/dist/cli/describe-core.mjs +6 -6
  222. package/dist/cli/{executions-H6H5655J.js → executions-HPZXOOVX.js} +12 -12
  223. package/dist/cli/{executions-R3LP74QN.mjs → executions-PCXZKEHM.mjs} +10 -10
  224. package/dist/cli/{feedback-WL3MRVT5.mjs → feedback-Y6VKZNY6.mjs} +9 -8
  225. package/dist/cli/{feedback-VFOUR66B.js → feedback-ZKFHFVL6.js} +17 -16
  226. package/dist/cli/git-RUBMALLH.js +26 -0
  227. package/dist/cli/{git-YX2J4GCI.mjs → git-UMPR2QYC.mjs} +8 -7
  228. package/dist/cli/index.js +170 -158
  229. package/dist/cli/index.mjs +60 -48
  230. package/dist/cli/{integrations-E2JZYKHS.js → integrations-3GQCTRTF.js} +23 -27
  231. package/dist/cli/{integrations-5ZK5KLVP.mjs → integrations-V3TM6XAB.mjs} +15 -19
  232. package/dist/cli/{legacy-noops-SMN3GSXY.mjs → legacy-noops-JZBUD7ZE.mjs} +9 -8
  233. package/dist/cli/{legacy-noops-3VW4IJTH.js → legacy-noops-VYCO7NGW.js} +12 -11
  234. package/dist/cli/{mcp-UQV2K4EW.js → mcp-4OIWTCE6.js} +121 -48
  235. package/dist/cli/{mcp-V6MGCYAG.mjs → mcp-PH4KZ76P.mjs} +100 -27
  236. package/dist/cli/{monitors-R3BBDCRC.js → monitors-E2A6VPBY.js} +221 -186
  237. package/dist/cli/{monitors-GGKS5W6M.mjs → monitors-SSMGIDGX.mjs} +58 -23
  238. package/dist/cli/org-SFDKSK5D.mjs +2289 -0
  239. package/dist/cli/org-WUDZGWBT.js +2289 -0
  240. package/dist/cli/outcomes-QT7LQBPK.mjs +2865 -0
  241. package/dist/cli/outcomes-Y7SZTLSL.js +2865 -0
  242. package/dist/cli/{play-MDWPR4XG.mjs → play-EK7KSFPL.mjs} +376 -106
  243. package/dist/cli/{play-2MVO27VO.js → play-GDNHCRRR.js} +1150 -880
  244. package/dist/cli/{providers-AKDYFZJZ.mjs → providers-FVZLRXAU.mjs} +10 -10
  245. package/dist/cli/{providers-2AACRUZH.js → providers-ZKOSECLV.js} +13 -13
  246. package/dist/cli/{quickstart-H6IV3PV3.js → quickstart-KSDKIXYD.js} +9 -8
  247. package/dist/cli/{quickstart-QDGRJFZY.mjs → quickstart-UJZ6PIQV.mjs} +7 -6
  248. package/dist/cli/{run-RTSQNGRD.mjs → run-E7MZ7P35.mjs} +35 -33
  249. package/dist/cli/{run-2634REDK.js → run-PD2BBG6S.js} +55 -53
  250. package/dist/cli/run-identity-LMLFMACS.js +31 -0
  251. package/dist/cli/{run-identity-MRNCEGV2.mjs → run-identity-MAZ7ANH5.mjs} +9 -3
  252. package/dist/cli/search-TKSPTPHA.js +32 -0
  253. package/dist/cli/{search-6AOJ4XPP.mjs → search-VTFUFTOY.mjs} +11 -11
  254. package/dist/cli/{search-output-S5ODBL5E.js → search-output-G2AGDCOY.js} +13 -12
  255. package/dist/cli/{search-output-6ADMTOU5.mjs → search-output-PFVXQCWA.mjs} +10 -9
  256. package/dist/cli/{secrets-TFIFBFB3.mjs → secrets-7CIMEMX7.mjs} +11 -11
  257. package/dist/cli/{secrets-LHCIIHMT.js → secrets-BCOQ4U7U.js} +20 -20
  258. package/dist/cli/sessions-4CO556VD.js +23 -0
  259. package/dist/cli/{sessions-WHBVUHVW.mjs → sessions-IUCQZEF7.mjs} +9 -8
  260. package/dist/cli/{settings-EBONWL5C.mjs → settings-KZN62UQK.mjs} +16 -16
  261. package/dist/cli/{settings-CP4FVK2W.js → settings-REL4736M.js} +89 -89
  262. package/dist/cli/{setup-I5AZE3IU.mjs → setup-2P7OG3OU.mjs} +22 -24
  263. package/dist/cli/{setup-LFGHTNLQ.js → setup-2XIVBBCS.js} +62 -64
  264. package/dist/cli/skills-JYT5DEY6.js +37 -0
  265. package/dist/cli/{skills-W76AO5XE.mjs → skills-VIGNDJKI.mjs} +10 -9
  266. package/dist/cli/tools-NTVUQ2TG.js +57 -0
  267. package/dist/cli/{tools-7IJHGF6W.mjs → tools-W3QT5EJY.mjs} +24 -24
  268. package/dist/cli/{update-GFOPZTHY.mjs → update-GZVBVMY3.mjs} +14 -11
  269. package/dist/cli/update-TWJZPUZM.js +37 -0
  270. package/dist/cli/{views-D4NX4SBG.mjs → views-BOGEH424.mjs} +47 -49
  271. package/dist/cli/{views-BPL2TQJ4.js → views-TOLJNLSV.js} +62 -64
  272. package/dist/cli/{workflow-ZYNAUCKC.js → workflow-ENWFRK5M.js} +23 -23
  273. package/dist/cli/{workflow-YXP42FUI.mjs → workflow-VDG2FDQV.mjs} +13 -13
  274. package/dist/{client-CyXGrO4D.d.mts → client-B8f7RNF8.d.mts} +1 -1
  275. package/dist/{client-Bf3IpUKN.d.ts → client-C5TgXmJQ.d.ts} +1 -1
  276. package/dist/{client-core-BxsLnXlm.d.mts → client-core-SLLGBTht.d.mts} +268 -23
  277. package/dist/{client-core-BWd0lX0Z.d.ts → client-core-p0sOxnkl.d.ts} +268 -23
  278. package/dist/{compiler-manifest-BqwVrOri.d.ts → compiler-manifest-D_zZEh9Q.d.mts} +70 -5
  279. package/dist/{compiler-manifest-BqwVrOri.d.mts → compiler-manifest-D_zZEh9Q.d.ts} +70 -5
  280. package/dist/{errors-BU8FB99X.d.mts → errors-CZCrBFrQ.d.mts} +1 -1
  281. package/dist/{errors-DfVN_FUG.d.ts → errors-DsUkLrdZ.d.ts} +1 -1
  282. package/dist/{index-BGnvtYGc.d.ts → index-B6RTOZGC.d.ts} +1 -1
  283. package/dist/{index-DjZgwpGw.d.mts → index-DeOVrEmX.d.mts} +1 -1
  284. package/dist/index.d.mts +7 -7
  285. package/dist/index.d.ts +7 -7
  286. package/dist/index.js +66 -55
  287. package/dist/index.mjs +25 -14
  288. package/dist/install-integrity.json +163 -144
  289. package/dist/plays/bundle-play-file.d.mts +3 -3
  290. package/dist/plays/bundle-play-file.d.ts +3 -3
  291. package/dist/plays/bundle-play-file.mjs +23 -4
  292. package/dist/plays/csv-data-input.js +3 -3
  293. package/dist/plays/csv-data-input.mjs +2 -2
  294. package/dist/plays/play-description.d.mts +2 -2
  295. package/dist/plays/play-description.d.ts +2 -2
  296. package/dist/plays/run-request.d.mts +2 -2
  297. package/dist/plays/run-request.d.ts +2 -2
  298. package/dist/plays/run-request.js +4 -4
  299. package/dist/plays/run-request.mjs +3 -3
  300. package/dist/release.d.mts +1 -1
  301. package/dist/release.d.ts +1 -1
  302. package/dist/release.js +2 -2
  303. package/dist/release.mjs +1 -1
  304. package/dist/server.d.mts +4 -4
  305. package/dist/server.d.ts +4 -4
  306. package/dist/server.js +15 -13
  307. package/dist/server.mjs +9 -7
  308. package/package.json +1 -1
  309. package/dist/cli/auth-MMNVWATX.js +0 -43
  310. package/dist/cli/chunk-AID3OYVJ.js +0 -8
  311. package/dist/cli/chunk-OVDNJAJN.mjs +0 -8
  312. package/dist/cli/concurrent-runs-help-FQAIHKKC.js +0 -21
  313. package/dist/cli/describe-QDANCTS3.mjs +0 -50
  314. package/dist/cli/describe-VUTT5ZKU.js +0 -50
  315. package/dist/cli/git-ETB3GH3K.js +0 -25
  316. package/dist/cli/org-GRYVMNSW.js +0 -1282
  317. package/dist/cli/org-Z37NGJV4.mjs +0 -1282
  318. package/dist/cli/run-identity-G257GQED.js +0 -25
  319. package/dist/cli/search-VTW2YNBS.js +0 -32
  320. package/dist/cli/sessions-CJ4FJ2WB.js +0 -22
  321. package/dist/cli/skills-R7EBXREW.js +0 -36
  322. package/dist/cli/tools-V7U2BDXM.js +0 -57
  323. package/dist/cli/update-4COPZETK.js +0 -34
@@ -1,12 +1,16 @@
1
1
  import {
2
2
  getActiveCliProgress
3
- } from "./chunk-AZQ264ID.mjs";
3
+ } from "./chunk-DSKSFFK2.mjs";
4
4
  import {
5
5
  maybeReportAutomaticSkillsSyncFailure
6
- } from "./chunk-6PRW5UBA.mjs";
6
+ } from "./chunk-UC4BDZKI.mjs";
7
7
  import {
8
+ DEFAULT_MAX_RETRIES,
8
9
  DEFAULT_SKILL_AGENTS,
10
+ DEFAULT_TIMEOUT,
9
11
  KNOWN_SKILL_AGENTS,
12
+ TRANSIENT_HTTP_STATUSES,
13
+ defaultRetryBackoffMs,
10
14
  hasActivePluginSkills,
11
15
  readSdkSkillsLocalVersion,
12
16
  resolveApiKeyForBaseUrl,
@@ -14,17 +18,20 @@ import {
14
18
  sdkCliStateDirPath,
15
19
  skillsAgentPathSegment,
16
20
  writeSdkSkillsLocalVersion
17
- } from "./chunk-4TALT2M3.mjs";
21
+ } from "./chunk-52Q5KETX.mjs";
18
22
  import {
19
23
  SDK_API_CONTRACT,
20
24
  SDK_API_MAJOR,
21
25
  SDK_VERSION,
22
26
  deploymentProtectionHeaders,
23
27
  detectAgentRuntime
24
- } from "./chunk-YLTMXJFC.mjs";
28
+ } from "./chunk-S6W6SJ6E.mjs";
29
+ import {
30
+ DeeplineError
31
+ } from "./chunk-Z3A2S3QM.mjs";
25
32
  import {
26
33
  SDK_RELEASE
27
- } from "./chunk-AQWQ2BFX.mjs";
34
+ } from "./chunk-FXQ3JKE3.mjs";
28
35
 
29
36
  // src/compat.ts
30
37
  import { randomUUID } from "crypto";
@@ -176,18 +183,16 @@ function writeCachedCompatibility(baseUrl, command, skillsVersion, response) {
176
183
  } catch {
177
184
  }
178
185
  }
179
- async function checkSdkCompatibility(baseUrl, options = {}) {
180
- if (shouldSkipCompatibilityCheck()) {
181
- return { response: null, error: null };
182
- }
186
+ function asError(error) {
187
+ return error instanceof Error ? error : new Error(String(error));
188
+ }
189
+ async function attemptSdkCompatibility(baseUrl, options, timeoutMs) {
183
190
  const controller = new AbortController();
184
191
  const abortFromCaller = () => controller.abort(options.signal?.reason);
185
192
  if (options.signal?.aborted) abortFromCaller();
186
- else options.signal?.addEventListener("abort", abortFromCaller, { once: true });
187
- const timeout = setTimeout(
188
- () => controller.abort(),
189
- options.timeoutMs ?? CHECK_TIMEOUT_MS
190
- );
193
+ else
194
+ options.signal?.addEventListener("abort", abortFromCaller, { once: true });
195
+ const timeout = setTimeout(() => controller.abort(), timeoutMs);
191
196
  try {
192
197
  const url = new URL("/api/v2/sdk/compat", baseUrl);
193
198
  url.searchParams.set("version", SDK_VERSION);
@@ -222,56 +227,132 @@ async function checkSdkCompatibility(baseUrl, options = {}) {
222
227
  },
223
228
  signal: controller.signal
224
229
  });
225
- const raw = await response.json().catch(() => null);
226
- options.signal?.throwIfAborted();
227
- if (!raw || typeof raw.ok !== "boolean" || typeof raw.status !== "string") {
228
- throw new Error(
229
- `SDK compatibility endpoint returned a non-policy response (HTTP ${response.status}).`
230
- );
231
- }
232
- const { catalog_metadata: catalogMetadata, ...data } = raw;
233
- if (options.persistCache !== false) {
234
- writeCachedCompatibility(
235
- baseUrl,
236
- options.command,
237
- options.skillsVersion,
238
- data
239
- );
240
- }
241
- if (data.ok && options.catalog && catalogMetadata && typeof catalogMetadata === "object" && "toolId" in catalogMetadata && catalogMetadata.toolId === options.catalog.toolId) {
242
- options.catalog.acceptMetadata(catalogMetadata);
230
+ const text = await response.text();
231
+ controller.signal.throwIfAborted();
232
+ let raw;
233
+ try {
234
+ raw = JSON.parse(text);
235
+ } catch {
236
+ raw = null;
243
237
  }
244
- return { response: data, error: null };
245
- } catch (error) {
246
- if (options.signal?.aborted) {
238
+ if (!raw || typeof raw.ok !== "boolean" || typeof raw.status !== "string") {
247
239
  return {
248
- response: null,
249
- error: error instanceof Error ? error : new Error(String(error))
240
+ ok: false,
241
+ transient: TRANSIENT_HTTP_STATUSES.has(response.status),
242
+ error: new Error(
243
+ `SDK compatibility endpoint returned a non-policy response (HTTP ${response.status}).`
244
+ )
250
245
  };
251
246
  }
252
- const cached = readCachedCompatibility(
247
+ const { catalog_metadata: catalogMetadata, ...data } = raw;
248
+ return { ok: true, response: data, catalogMetadata };
249
+ } catch (error) {
250
+ options.signal?.throwIfAborted();
251
+ return { ok: false, transient: true, error: asError(error) };
252
+ } finally {
253
+ clearTimeout(timeout);
254
+ options.signal?.removeEventListener("abort", abortFromCaller);
255
+ }
256
+ }
257
+ function acceptSdkCompatibility(baseUrl, options, attempt) {
258
+ const { response: data, catalogMetadata } = attempt;
259
+ if (options.persistCache !== false) {
260
+ writeCachedCompatibility(
253
261
  baseUrl,
254
262
  options.command,
255
- options.skillsVersion
263
+ options.skillsVersion,
264
+ data
256
265
  );
257
- if (cached) {
258
- if (options.persistCache !== false && options.timeoutMs !== void 0 && options.timeoutMs < CHECK_TIMEOUT_MS) {
259
- invalidateCachedCompatibility(
260
- baseUrl,
261
- options.command,
262
- options.skillsVersion
263
- );
264
- }
265
- return { response: cached, error: null };
266
- }
266
+ }
267
+ if (data.ok && options.catalog && catalogMetadata && typeof catalogMetadata === "object" && "toolId" in catalogMetadata && catalogMetadata.toolId === options.catalog.toolId) {
268
+ options.catalog.acceptMetadata(catalogMetadata);
269
+ }
270
+ return data;
271
+ }
272
+ async function checkSdkCompatibility(baseUrl, options = {}) {
273
+ if (shouldSkipCompatibilityCheck()) {
274
+ return { response: null, error: null, live: false };
275
+ }
276
+ let attempt;
277
+ try {
278
+ attempt = await attemptSdkCompatibility(
279
+ baseUrl,
280
+ options,
281
+ options.timeoutMs ?? CHECK_TIMEOUT_MS
282
+ );
283
+ } catch (error) {
284
+ return { response: null, error: asError(error), live: false };
285
+ }
286
+ if (attempt.ok) {
267
287
  return {
268
- response: null,
269
- error: error instanceof Error ? error : new Error(String(error))
288
+ response: acceptSdkCompatibility(baseUrl, options, attempt),
289
+ error: null,
290
+ live: true
270
291
  };
271
- } finally {
272
- clearTimeout(timeout);
273
- options.signal?.removeEventListener("abort", abortFromCaller);
274
292
  }
293
+ const cached = readCachedCompatibility(
294
+ baseUrl,
295
+ options.command,
296
+ options.skillsVersion
297
+ );
298
+ if (cached) {
299
+ if (options.persistCache !== false && options.timeoutMs !== void 0 && options.timeoutMs < CHECK_TIMEOUT_MS) {
300
+ invalidateCachedCompatibility(
301
+ baseUrl,
302
+ options.command,
303
+ options.skillsVersion
304
+ );
305
+ }
306
+ return { response: cached, error: null, live: false };
307
+ }
308
+ return { response: null, error: attempt.error, live: false };
309
+ }
310
+ async function requireSdkCompatibility(baseUrl, options = {}) {
311
+ if (shouldSkipCompatibilityCheck()) return null;
312
+ const maxRetries = options.maxRetries ?? DEFAULT_MAX_RETRIES;
313
+ const backoffMs = options.backoffMs ?? defaultRetryBackoffMs;
314
+ let attempt;
315
+ let attempts = 0;
316
+ for (; ; ) {
317
+ attempts += 1;
318
+ attempt = await attemptSdkCompatibility(
319
+ baseUrl,
320
+ options,
321
+ options.attemptTimeoutMs ?? DEFAULT_TIMEOUT
322
+ );
323
+ if (attempt.ok) return acceptSdkCompatibility(baseUrl, options, attempt);
324
+ if (!attempt.transient || attempts > maxRetries) break;
325
+ await sleepUnlessAborted(backoffMs(attempts), options.signal);
326
+ }
327
+ const cached = readCachedCompatibility(
328
+ baseUrl,
329
+ options.command,
330
+ options.skillsVersion
331
+ );
332
+ if (cached) return cached;
333
+ throw Object.assign(
334
+ new DeeplineError(
335
+ `Could not read the Deepline SDK compatibility policy from ${baseUrl} after ${attempts} attempt${attempts === 1 ? "" : "s"}: ${attempt.error.message}`,
336
+ void 0,
337
+ "SDK_COMPATIBILITY_UNAVAILABLE",
338
+ { attempts, transient: attempt.transient }
339
+ ),
340
+ { cause: attempt.error }
341
+ );
342
+ }
343
+ function sleepUnlessAborted(ms, signal) {
344
+ signal?.throwIfAborted();
345
+ return new Promise((resolve, reject) => {
346
+ const onAbort = () => {
347
+ clearTimeout(timer);
348
+ reject(signal?.reason);
349
+ };
350
+ const timer = setTimeout(() => {
351
+ signal?.removeEventListener("abort", onAbort);
352
+ resolve();
353
+ }, ms);
354
+ signal?.addEventListener("abort", onAbort, { once: true });
355
+ });
275
356
  }
276
357
  function isCiEnvironment() {
277
358
  return ["CI", "GITHUB_ACTIONS"].some((name) => {
@@ -443,8 +524,11 @@ function resolveShellSpawn(command, args, platform = process.platform, env = pro
443
524
  return { command: executable, args: [...args], shell: false };
444
525
  }
445
526
  return {
446
- command: escapeCmdCommand(executable),
447
- args: args.map((arg) => escapeCmdArgument(arg)),
527
+ command: [
528
+ escapeCmdCommand(executable),
529
+ ...args.map((arg) => escapeCmdArgument(arg))
530
+ ].join(" "),
531
+ args: [],
448
532
  shell: true
449
533
  };
450
534
  }
@@ -1610,6 +1694,7 @@ export {
1610
1694
  readTrustedCleanCompatibility,
1611
1695
  claimUpdateAdvisory,
1612
1696
  checkSdkCompatibility,
1697
+ requireSdkCompatibility,
1613
1698
  isCiEnvironment,
1614
1699
  enforceSdkCompatibilityResponse,
1615
1700
  SKILLS_NPX_PACKAGE,
@@ -0,0 +1,32 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/cli/shell-quote.ts
2
+ function shellQuote(value) {
3
+ return `'${value.replace(/'/g, `'\\''`)}'`;
4
+ }
5
+ function shellArgument(value, platform = process.platform) {
6
+ if (platform !== "win32") return shellQuote(value);
7
+ if (/^[A-Za-z0-9_+:./\\-][A-Za-z0-9_+=:./\\-]*$/.test(value)) return value;
8
+ if (!/["\u201C\u201D\u201E$`!%\\\r\n]/.test(value)) return `"${value}"`;
9
+ return `'${value.replace(/['\u2018\u2019\u201A\u201B]/g, (quote) => quote + quote)}'`;
10
+ }
11
+ var EXAMPLE_INPUT_FILE = "input.json";
12
+ function exampleJsonInput(json, platform = process.platform) {
13
+ if (platform !== "win32") return { argument: `--input ${shellQuote(json)}` };
14
+ return {
15
+ argument: `--input-file ${EXAMPLE_INPUT_FILE}`,
16
+ file: { path: EXAMPLE_INPUT_FILE, contents: json }
17
+ };
18
+ }
19
+ function examplePlaceholderInput(platform = process.platform) {
20
+ return platform === "win32" ? `--input-file ${EXAMPLE_INPUT_FILE}` : `--input '{...}'`;
21
+ }
22
+ function exampleInputFileLine(file) {
23
+ return `Save this as ${file.path}: ${file.contents}`;
24
+ }
25
+
26
+
27
+
28
+
29
+
30
+
31
+
32
+ exports.shellQuote = shellQuote; exports.shellArgument = shellArgument; exports.exampleJsonInput = exampleJsonInput; exports.examplePlaceholderInput = examplePlaceholderInput; exports.exampleInputFileLine = exampleInputFileLine;
@@ -243,6 +243,20 @@ function callerPlayWorkflowIdMatchesRequest(workflowId, request) {
243
243
  const { workflowId: _ignored, ...intent } = request;
244
244
  return match[1] === sha256Hex(stableStringify(JSON.parse(JSON.stringify(intent))));
245
245
  }
246
+ var SHORT_PLAY_RUN_ID_RE = /^play\/[a-z0-9/-]+\/run\/\d{8}t\d{6}-\d{3}-[a-z0-9]{8}$/;
247
+ function isShortPlayRunId(value) {
248
+ return SHORT_PLAY_RUN_ID_RE.test(value);
249
+ }
250
+ function shortPlayRunId(runId) {
251
+ const short = runId.replace(/-caller-[a-f0-9]{64}$/, "");
252
+ return isShortPlayRunId(short) ? short : runId;
253
+ }
254
+ function playRunIdLookupPrefix(value) {
255
+ if (isShortPlayRunId(value)) return value;
256
+ const match = /^(.*)-caller-([a-f0-9]*)$/i.exec(value);
257
+ if (!match || /^[a-f0-9]{64}$/.test(match[2])) return null;
258
+ return isShortPlayRunId(match[1]) ? match[1] : null;
259
+ }
246
260
  function buildPlayRunIdentity(playName, now, options = {}) {
247
261
  const workflowId = buildPlayWorkflowId(playName, now, {
248
262
  unique: _nullishCoalesce(options.unique, () => ( now === void 0))
@@ -307,4 +321,7 @@ function buildAsyncPlayRequestFingerprint(input) {
307
321
 
308
322
 
309
323
 
310
- exports.stableStringify = stableStringify; exports.sha256Hex = sha256Hex; exports.normalizeTableNamespace = normalizeTableNamespace; exports.buildPlayWorkflowFamilyKey = buildPlayWorkflowFamilyKey; exports.buildPlayWorkflowRunSuffix = buildPlayWorkflowRunSuffix; exports.canonicalPlayRunStartedAtMs = canonicalPlayRunStartedAtMs; exports.buildPlayWorkflowId = buildPlayWorkflowId; exports.buildCallerPlayWorkflowId = buildCallerPlayWorkflowId; exports.callerPlayWorkflowIdMatchesRequest = callerPlayWorkflowIdMatchesRequest; exports.buildPlayRunIdentity = buildPlayRunIdentity; exports.buildAsyncPlayRunIdentity = buildAsyncPlayRunIdentity; exports.buildRerunPlayRunIdentity = buildRerunPlayRunIdentity; exports.buildAsyncPlayRequestFingerprint = buildAsyncPlayRequestFingerprint;
324
+
325
+
326
+
327
+ exports.stableStringify = stableStringify; exports.sha256Hex = sha256Hex; exports.normalizeTableNamespace = normalizeTableNamespace; exports.buildPlayWorkflowFamilyKey = buildPlayWorkflowFamilyKey; exports.buildPlayWorkflowRunSuffix = buildPlayWorkflowRunSuffix; exports.canonicalPlayRunStartedAtMs = canonicalPlayRunStartedAtMs; exports.buildPlayWorkflowId = buildPlayWorkflowId; exports.buildCallerPlayWorkflowId = buildCallerPlayWorkflowId; exports.callerPlayWorkflowIdMatchesRequest = callerPlayWorkflowIdMatchesRequest; exports.isShortPlayRunId = isShortPlayRunId; exports.shortPlayRunId = shortPlayRunId; exports.playRunIdLookupPrefix = playRunIdLookupPrefix; exports.buildPlayRunIdentity = buildPlayRunIdentity; exports.buildAsyncPlayRunIdentity = buildAsyncPlayRunIdentity; exports.buildRerunPlayRunIdentity = buildRerunPlayRunIdentity; exports.buildAsyncPlayRequestFingerprint = buildAsyncPlayRequestFingerprint;
@@ -1,19 +1,23 @@
1
1
  import {
2
2
  npmSupportsAllowScripts,
3
3
  readNpmVersion
4
- } from "./chunk-DJ2JDK4O.mjs";
4
+ } from "./chunk-XD3MFTHA.mjs";
5
5
  import {
6
6
  runSkillsCommand
7
- } from "./chunk-IYSTRCLX.mjs";
7
+ } from "./chunk-62AUAWQV.mjs";
8
8
  import {
9
9
  resolveShellSpawn
10
- } from "./chunk-YJHE3O5M.mjs";
10
+ } from "./chunk-BOZAP2EM.mjs";
11
11
  import {
12
12
  printCommandEnvelope
13
- } from "./chunk-6PRW5UBA.mjs";
13
+ } from "./chunk-UC4BDZKI.mjs";
14
14
  import {
15
- autoDetectBaseUrl
16
- } from "./chunk-4TALT2M3.mjs";
15
+ DEFAULT_MAX_RETRIES,
16
+ DEFAULT_TIMEOUT,
17
+ TRANSIENT_HTTP_STATUSES,
18
+ autoDetectBaseUrl,
19
+ defaultRetryBackoffMs
20
+ } from "./chunk-52Q5KETX.mjs";
17
21
 
18
22
  // src/cli/commands/update.ts
19
23
  import { spawn, spawnSync } from "child_process";
@@ -1163,43 +1167,121 @@ function normalizePinnedVersion(value) {
1163
1167
  const normalized = value?.trim().replace(/^v/, "") ?? "";
1164
1168
  return /^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/.test(normalized) ? normalized : null;
1165
1169
  }
1166
- async function publishedVersionSupportsPin(version, fallbackRegistryUrl) {
1170
+ async function readPinMetadata(registryUrl, version) {
1171
+ const controller = new AbortController();
1172
+ const timeout = setTimeout(() => controller.abort(), DEFAULT_TIMEOUT);
1173
+ try {
1174
+ const response = await fetch(
1175
+ new URL(
1176
+ `deepline/${encodeURIComponent(version)}`,
1177
+ registryUrl.endsWith("/") ? registryUrl : `${registryUrl}/`
1178
+ ),
1179
+ {
1180
+ headers: { accept: "application/json" },
1181
+ signal: controller.signal
1182
+ }
1183
+ );
1184
+ if (response.status === 404) return { kind: "answer", supportsPin: false };
1185
+ if (!response.ok) {
1186
+ return {
1187
+ kind: "miss",
1188
+ transient: TRANSIENT_HTTP_STATUSES.has(response.status),
1189
+ error: new Error(`${registryUrl} returned HTTP ${response.status}`)
1190
+ };
1191
+ }
1192
+ const text = await response.text();
1193
+ let metadata;
1194
+ try {
1195
+ metadata = JSON.parse(text);
1196
+ } catch {
1197
+ return {
1198
+ kind: "miss",
1199
+ transient: false,
1200
+ error: new Error(`${registryUrl} returned malformed package metadata`)
1201
+ };
1202
+ }
1203
+ return {
1204
+ kind: "answer",
1205
+ supportsPin: metadata?.deepline?.updatePreferences === 1
1206
+ };
1207
+ } catch (error) {
1208
+ return {
1209
+ kind: "miss",
1210
+ transient: true,
1211
+ error: error instanceof Error ? error : new Error(String(error))
1212
+ };
1213
+ } finally {
1214
+ clearTimeout(timeout);
1215
+ }
1216
+ }
1217
+ async function publishedVersionSupportsPin(version, fallbackRegistryUrl, retry = {}) {
1167
1218
  const registryUrls = [
1168
1219
  "https://registry.npmjs.org/",
1169
1220
  ...fallbackRegistryUrl ? [fallbackRegistryUrl] : []
1170
1221
  ];
1222
+ const maxRetries = retry.maxRetries ?? DEFAULT_MAX_RETRIES;
1223
+ const backoffMs = retry.backoffMs ?? defaultRetryBackoffMs;
1171
1224
  let lastError = null;
1172
- for (const registryUrl of registryUrls) {
1173
- const controller = new AbortController();
1174
- const timeout = setTimeout(() => controller.abort(), 3e3);
1175
- try {
1176
- const response = await fetch(
1177
- new URL(
1178
- `deepline/${encodeURIComponent(version)}`,
1179
- registryUrl.endsWith("/") ? registryUrl : `${registryUrl}/`
1180
- ),
1181
- {
1182
- headers: { accept: "application/json" },
1183
- signal: controller.signal
1184
- }
1185
- );
1186
- if (response.status === 404) return false;
1187
- if (!response.ok) {
1188
- lastError = new Error(
1189
- `${registryUrl} returned HTTP ${response.status}`
1190
- );
1191
- continue;
1192
- }
1193
- const metadata = await response.json();
1194
- return metadata.deepline?.updatePreferences === 1;
1195
- } catch (error) {
1196
- lastError = error instanceof Error ? error : new Error(String(error));
1197
- } finally {
1198
- clearTimeout(timeout);
1225
+ for (let round = 1; ; round += 1) {
1226
+ let transientOnly = true;
1227
+ for (const registryUrl of registryUrls) {
1228
+ const read = await readPinMetadata(registryUrl, version);
1229
+ if (read.kind === "answer") return read.supportsPin;
1230
+ lastError = read.error;
1231
+ if (!read.transient) transientOnly = false;
1199
1232
  }
1233
+ if (!transientOnly || round > maxRetries) break;
1234
+ await new Promise((resolve3) => setTimeout(resolve3, backoffMs(round)));
1200
1235
  }
1201
1236
  throw lastError ?? new Error("No npm registry was available");
1202
1237
  }
1238
+ var PUBLISHED_LATEST_READ_TIMEOUT_MS = 5e3;
1239
+ async function readPublishedLatestVersion(registryUrl) {
1240
+ const controller = new AbortController();
1241
+ const timeout = setTimeout(
1242
+ () => controller.abort(),
1243
+ PUBLISHED_LATEST_READ_TIMEOUT_MS
1244
+ );
1245
+ try {
1246
+ const response = await fetch(
1247
+ new URL(
1248
+ "deepline/latest",
1249
+ registryUrl.endsWith("/") ? registryUrl : `${registryUrl}/`
1250
+ ),
1251
+ { headers: { accept: "application/json" }, signal: controller.signal }
1252
+ );
1253
+ if (!response.ok) return null;
1254
+ const metadata = await response.json();
1255
+ return typeof metadata?.version === "string" && parseSemver(metadata.version) ? metadata.version : null;
1256
+ } catch {
1257
+ return null;
1258
+ } finally {
1259
+ clearTimeout(timeout);
1260
+ }
1261
+ }
1262
+ async function resolveInstalledVersionIfLatest(plan) {
1263
+ if (plan.kind !== "npm-global" && plan.kind !== "python-sidecar") {
1264
+ return null;
1265
+ }
1266
+ if (autoUpdatePackageSpec(plan) !== "deepline@latest") return null;
1267
+ let installedVersion = "";
1268
+ try {
1269
+ installedVersion = installedUpdateVersion(resolveUpdateInstallation(plan));
1270
+ } catch {
1271
+ return null;
1272
+ }
1273
+ if (!parseSemver(installedVersion)) return null;
1274
+ const registryUrls = plan.kind === "python-sidecar" ? [plan.registryUrl] : [
1275
+ plan.primaryRegistryUrl ?? "https://registry.npmjs.org/",
1276
+ ...plan.fallbackRegistryUrl ? [plan.fallbackRegistryUrl] : []
1277
+ ];
1278
+ for (const registryUrl of registryUrls) {
1279
+ const latestVersion = await readPublishedLatestVersion(registryUrl);
1280
+ if (!latestVersion) continue;
1281
+ return compareUpdateVersions(installedVersion, latestVersion) === 0 ? installedVersion : null;
1282
+ }
1283
+ return null;
1284
+ }
1203
1285
  async function runUpdateCommand(options, dependencies = {}) {
1204
1286
  const detectBaseUrl = dependencies.detectBaseUrl ?? autoDetectBaseUrl;
1205
1287
  const resolvePlan = dependencies.resolvePlan ?? resolveUpdatePlan;
@@ -1222,6 +1304,7 @@ async function runUpdateCommand(options, dependencies = {}) {
1222
1304
  const setPinnedVersion = dependencies.setPinnedVersion ?? setCliPinnedVersion;
1223
1305
  const clearPinnedVersion = dependencies.clearPinnedVersion ?? clearCliPinnedVersion;
1224
1306
  const targetSupportsPin = dependencies.targetSupportsPin ?? publishedVersionSupportsPin;
1307
+ const resolveUpToDateVersion = dependencies.resolveUpToDateVersion ?? resolveInstalledVersionIfLatest;
1225
1308
  const pinnedVersion = options.pin ? normalizePinnedVersion(options.pin) : null;
1226
1309
  if (options.pin && !pinnedVersion) {
1227
1310
  stderr.write(
@@ -1279,7 +1362,16 @@ async function runUpdateCommand(options, dependencies = {}) {
1279
1362
  ]
1280
1363
  };
1281
1364
  if (options.json && !options.executeWithJson) {
1282
- printCommandEnvelope({ ...plan, render }, { json: true });
1365
+ const upToDateVersion2 = pinnedVersion || options.force ? null : await resolveUpToDateVersion(plan);
1366
+ printCommandEnvelope(
1367
+ {
1368
+ ...plan,
1369
+ updated: false,
1370
+ ...upToDateVersion2 ? { upToDate: true, version: upToDateVersion2 } : {},
1371
+ render
1372
+ },
1373
+ { json: true }
1374
+ );
1283
1375
  return 0;
1284
1376
  }
1285
1377
  if (options.printCommand) {
@@ -1299,11 +1391,19 @@ async function runUpdateCommand(options, dependencies = {}) {
1299
1391
  printCommandEnvelope({ ...plan, render }, { json: false });
1300
1392
  return 0;
1301
1393
  }
1302
- stderr.write(`Updating Deepline SDK/CLI with: ${plan.manualCommand}
1394
+ const upToDateVersion = pinnedVersion || options.force ? null : await resolveUpToDateVersion(plan);
1395
+ if (upToDateVersion) {
1396
+ stderr.write(
1397
+ `Deepline CLI is already up to date (${upToDateVersion}). Run deepline update --force to reinstall it.
1398
+ `
1399
+ );
1400
+ } else {
1401
+ stderr.write(`Updating Deepline SDK/CLI with: ${plan.manualCommand}
1303
1402
  `);
1304
- const updateExitCode = await runPlan(plan);
1305
- if (updateExitCode !== 0) {
1306
- return updateExitCode;
1403
+ const updateExitCode = await runPlan(plan);
1404
+ if (updateExitCode !== 0) {
1405
+ return updateExitCode;
1406
+ }
1307
1407
  }
1308
1408
  if (pinnedVersion) {
1309
1409
  setPinnedVersion(pinnedVersion);
@@ -1329,7 +1429,9 @@ To retry with full installer output, run: deepline skills install
1329
1429
  printCommandEnvelope(
1330
1430
  {
1331
1431
  ok: true,
1332
- pinnedVersion
1432
+ pinnedVersion,
1433
+ updated: !upToDateVersion,
1434
+ ...upToDateVersion ? { version: upToDateVersion } : {}
1333
1435
  },
1334
1436
  { json: true }
1335
1437
  );
@@ -1341,7 +1443,9 @@ function registerUpdateCommand(program) {
1341
1443
  "after",
1342
1444
  `
1343
1445
  Notes:
1344
- For the published npm CLI, this runs npm install -g deepline@latest.
1446
+ For the published npm CLI, this runs npm install -g deepline@latest, unless
1447
+ the installed version is already the latest published one. Use --force to
1448
+ reinstall anyway.
1345
1449
  Automatic updates are enabled by default and run before normal commands.
1346
1450
  Configure automatic updates with deepline settings autoupdate.
1347
1451
  For a Homebrew installation, this prints brew upgrade deepline; Homebrew
@@ -1354,9 +1458,12 @@ Notes:
1354
1458
  Examples:
1355
1459
  deepline update
1356
1460
  deepline update --print-command
1357
- deepline update
1461
+ deepline update --force
1358
1462
  `
1359
- ).option("--print-command", "Print the update command without running it").option("--json", "Emit the resolved update plan as JSON").action(async (options) => {
1463
+ ).option("--print-command", "Print the update command without running it").option("--json", "Emit the resolved update plan as JSON").option(
1464
+ "--force",
1465
+ "Reinstall even when the installed CLI is already the latest version"
1466
+ ).action(async (options) => {
1360
1467
  process.exitCode = await runUpdateCommand(options);
1361
1468
  });
1362
1469
  }
@@ -1371,6 +1478,7 @@ export {
1371
1478
  compareUpdateVersions,
1372
1479
  runUpdatePlan,
1373
1480
  publishedVersionSupportsPin,
1481
+ resolveInstalledVersionIfLatest,
1374
1482
  runUpdateCommand,
1375
1483
  registerUpdateCommand
1376
1484
  };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isJsonOutputMode
3
- } from "./chunk-6PRW5UBA.mjs";
3
+ } from "./chunk-UC4BDZKI.mjs";
4
4
 
5
5
  // src/cli/progress.ts
6
6
  import { Worker } from "worker_threads";
@@ -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 _chunkOVEYWO4Hjs = require('./chunk-OVEYWO4H.js');
4
4
 
5
5
 
6
6
 
7
- var _chunk7IKQKKNXjs = require('./chunk-7IKQKKNX.js');
7
+ var _chunkVIUUTEHYjs = require('./chunk-VIUUTEHY.js');
8
8
 
9
9
  // src/client.ts
10
- var DeeplineClient2 = class extends _chunkPFO3ISXAjs.DeeplineClient {
10
+ var DeeplineClient2 = class extends _chunkOVEYWO4Hjs.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 = _chunkVIUUTEHYjs.resolveConfig.call(void 0, options);
13
+ super(config, new (0, _chunkVIUUTEHYjs.HttpClient)(config), _optionalChain([options, 'optionalAccess', _ => _.timeout]));
14
14
  }
15
15
  };
16
16
 
@@ -207,4 +207,6 @@ function formatNonStandardSandboxRuntimeWarning(limits) {
207
207
 
208
208
 
209
209
 
210
- exports.PLAY_SANDBOX_COMPUTE_RATE_MULTIPLIERS = PLAY_SANDBOX_COMPUTE_RATE_MULTIPLIERS; exports.formatNonStandardSandboxRuntimeWarning = formatNonStandardSandboxRuntimeWarning;
210
+
211
+
212
+ exports.DEFAULT_USD_PER_CUSTOMER_CREDIT = DEFAULT_USD_PER_CUSTOMER_CREDIT; exports.DEFAULT_PROVIDER_MARKUP_MULTIPLIER = DEFAULT_PROVIDER_MARKUP_MULTIPLIER; exports.PLAY_SANDBOX_COMPUTE_RATE_MULTIPLIERS = PLAY_SANDBOX_COMPUTE_RATE_MULTIPLIERS; exports.formatNonStandardSandboxRuntimeWarning = formatNonStandardSandboxRuntimeWarning;