deepline 0.3.542 → 0.3.543

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 (243) hide show
  1. package/dist/bundling-sources/sdk/src/client-core.ts +106 -2
  2. package/dist/bundling-sources/sdk/src/index.ts +7 -0
  3. package/dist/bundling-sources/sdk/src/integrations.ts +198 -0
  4. package/dist/bundling-sources/sdk/src/plays/run-request.ts +3 -0
  5. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  6. package/dist/bundling-sources/sdk/src/tool-calls.ts +35 -11
  7. package/dist/bundling-sources/sdk/src/types.ts +10 -0
  8. package/dist/bundling-sources/shared_libs/integration-contracts/calendar-delegation.ts +132 -0
  9. package/dist/bundling-sources/shared_libs/integration-contracts/tool-connection.ts +13 -0
  10. package/dist/bundling-sources/shared_libs/monitors/package.json +1 -1
  11. package/dist/bundling-sources/shared_libs/observability/queue-health.ts +9 -0
  12. package/dist/bundling-sources/shared_libs/observability/queue-item-connectors.ts +1 -0
  13. package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +5 -5
  14. package/dist/bundling-sources/shared_libs/play-data-plane/sheet-contract.ts +34 -0
  15. package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +11 -5
  16. package/dist/bundling-sources/shared_libs/play-runtime/baked-runner-image.ts +9 -7
  17. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +235 -12
  18. package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +20 -1
  19. package/dist/bundling-sources/shared_libs/play-runtime/daytona-sandbox-janitor.ts +39 -30
  20. package/dist/bundling-sources/shared_libs/play-runtime/event-wait-tools.ts +2 -0
  21. package/dist/bundling-sources/shared_libs/play-runtime/experiment-switches.ts +10 -4
  22. package/dist/bundling-sources/shared_libs/play-runtime/fleet-sandbox-sweep.ts +209 -0
  23. package/dist/bundling-sources/shared_libs/play-runtime/launch-identity.ts +4 -0
  24. package/dist/bundling-sources/shared_libs/play-runtime/play-run-recovery-policy.ts +24 -1
  25. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/sandbox-cleanup/contracts.ts +2 -1
  26. package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +6 -1
  27. package/dist/bundling-sources/shared_libs/play-runtime/run-ledger.ts +37 -0
  28. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +42 -3
  29. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-tool-hooks.ts +7 -0
  30. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-modal-fallback.ts +15 -0
  31. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-payload-transport.ts +23 -5
  32. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal.ts +320 -836
  33. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/vercel-sandbox.ts +1061 -0
  34. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/early-sandbox.ts +862 -0
  35. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/runtime-sandbox-reconciliation.ts +45 -0
  36. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/sandbox-create-outcome.ts +3 -1
  37. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/types.ts +11 -5
  38. package/dist/bundling-sources/shared_libs/play-runtime/runtime-sandbox-contract.ts +20 -2
  39. package/dist/bundling-sources/shared_libs/play-runtime/runtime-sandbox-placement-policy.ts +71 -34
  40. package/dist/bundling-sources/shared_libs/play-runtime/runtime-sandbox-provider-profile.ts +286 -0
  41. package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/contract.ts +4 -1
  42. package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/runner-backend-adapter.ts +12 -3
  43. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backend.ts +7 -0
  44. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +46 -55
  45. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-worker-required-env.ts +127 -5
  46. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd.ts +7 -1
  47. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/early-sandbox-lane.ts +214 -0
  48. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/managed-sandbox-resource-sql.ts +118 -0
  49. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-progress.ts +1 -0
  50. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +226 -144
  51. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-event-search.ts +1 -1
  52. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-capacity.ts +2 -1
  53. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-ledger-reconciliation.ts +11 -13
  54. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-operation.ts +42 -7
  55. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-worker-wake.ts +2 -1
  56. package/dist/bundling-sources/shared_libs/play-runtime/suspension.ts +2 -2
  57. package/dist/bundling-sources/shared_libs/play-runtime/tool-cache-policy.ts +17 -0
  58. package/dist/bundling-sources/shared_libs/play-runtime/vercel-sandbox-runtime-config.ts +217 -0
  59. package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +23 -0
  60. package/dist/bundling-sources/shared_libs/plays/bundling/index.ts +1 -0
  61. package/dist/bundling-sources/shared_libs/plays/script-entry.ts +76 -6
  62. package/dist/bundling-sources/shared_libs/plays/static-pipeline.ts +1 -0
  63. package/dist/bundling-sources/shared_libs/security/credential-revision.ts +50 -0
  64. package/dist/bundling-sources/shared_libs/security/internal-actor.ts +2 -1
  65. package/dist/bundling-sources/shared_libs/security/receipt-admission-token.ts +37 -0
  66. package/dist/cli/{auth-IGBGOB4E.mjs → auth-ITAELTOA.mjs} +5 -5
  67. package/dist/cli/auth-S6B5WUU5.js +43 -0
  68. package/dist/cli/{billing-IB2TWE74.js → billing-33XVFDUJ.js} +101 -101
  69. package/dist/cli/{billing-N37W2I62.mjs → billing-WZ7RVZW4.mjs} +12 -12
  70. package/dist/cli/{chunk-D44DP4KJ.js → chunk-23D224GI.js} +37 -17
  71. package/dist/cli/{chunk-B5NP3SHX.mjs → chunk-274WKLSY.mjs} +2 -2
  72. package/dist/cli/{chunk-GBAT5NMI.mjs → chunk-2HSZCQMT.mjs} +48 -6
  73. package/dist/cli/{chunk-VLEVVDWG.js → chunk-2JHYYB3F.js} +3 -3
  74. package/dist/cli/{chunk-FGGPCAGC.js → chunk-2KTGZKRE.js} +18 -18
  75. package/dist/cli/{chunk-AWLPERL3.js → chunk-2LNTKICO.js} +3 -3
  76. package/dist/cli/{chunk-5CAVURVS.js → chunk-2NCJQEZH.js} +53 -53
  77. package/dist/cli/{chunk-6SLEHAXX.js → chunk-3JZXU5OB.js} +5 -5
  78. package/dist/cli/{chunk-4I47NCRI.js → chunk-46BEBZ3M.js} +497 -328
  79. package/dist/cli/{chunk-V4EYJKGJ.js → chunk-4JQEAYN3.js} +156 -17
  80. package/dist/cli/{chunk-DADH3WPE.mjs → chunk-4SKDSSPU.mjs} +2 -2
  81. package/dist/cli/{chunk-FX4OWXKK.mjs → chunk-52YK3EII.mjs} +2 -2
  82. package/dist/cli/{chunk-HAITCPCG.js → chunk-5MN3BKNB.js} +16 -16
  83. package/dist/cli/{chunk-FFDZT255.mjs → chunk-5VIPTLRX.mjs} +1 -1
  84. package/dist/cli/{chunk-OLH2PHMC.mjs → chunk-6P7TGCHQ.mjs} +1 -1
  85. package/dist/cli/{chunk-YK7NNZD4.mjs → chunk-6SJZMMD5.mjs} +37 -190
  86. package/dist/cli/chunk-7AUQTNLB.mjs +455 -0
  87. package/dist/cli/{chunk-I5EAIFGO.mjs → chunk-AACKPOGA.mjs} +1 -1
  88. package/dist/cli/{chunk-GM73TZ2W.js → chunk-BGAUADV4.js} +41 -41
  89. package/dist/cli/{chunk-KQSTV4MW.js → chunk-BLYW6FFB.js} +60 -18
  90. package/dist/cli/{chunk-LFMQVSEI.js → chunk-C35NLLSA.js} +5 -5
  91. package/dist/cli/{chunk-5APOJWJF.mjs → chunk-D6YAU3CF.mjs} +182 -13
  92. package/dist/cli/{chunk-TT4JUUC3.mjs → chunk-DH43ECTN.mjs} +7 -3
  93. package/dist/cli/{chunk-TTBHOMAA.js → chunk-DI3GL3T6.js} +316 -469
  94. package/dist/cli/{chunk-D7GWEBMF.js → chunk-DUGTPVT7.js} +7 -7
  95. package/dist/cli/{chunk-UNDLNT3V.js → chunk-ECWOIXAV.js} +1 -1
  96. package/dist/cli/{chunk-CFZCRM6R.js → chunk-EHUG6EUT.js} +26 -26
  97. package/dist/cli/chunk-F6VSQ5LN.js +455 -0
  98. package/dist/cli/{chunk-ACVTMAW4.mjs → chunk-FNW2SGPD.mjs} +2 -2
  99. package/dist/cli/{chunk-EHLCWGWN.js → chunk-GRCFX2EG.js} +4 -4
  100. package/dist/cli/{chunk-OVX3Q5Q3.mjs → chunk-GWNYLIF7.mjs} +1 -1
  101. package/dist/cli/{chunk-6WQDHEVF.mjs → chunk-HKJ26NRN.mjs} +5 -5
  102. package/dist/cli/{chunk-L2VKAASU.mjs → chunk-HXIR3VQL.mjs} +21 -0
  103. package/dist/cli/{chunk-WL2GUGNZ.js → chunk-J2F6F5GL.js} +7 -7
  104. package/dist/cli/{chunk-2VRKBHMD.mjs → chunk-JXG7HWBA.mjs} +1 -1
  105. package/dist/cli/{chunk-Z2XA6YU4.mjs → chunk-LX35AXTN.mjs} +1 -0
  106. package/dist/cli/{chunk-DNGACHFX.js → chunk-MCBUWK5K.js} +22 -22
  107. package/dist/cli/{chunk-Q7WDXLYO.js → chunk-NHKP2NSU.js} +2 -2
  108. package/dist/cli/{chunk-FANIRW74.mjs → chunk-NIPLY25A.mjs} +0 -2
  109. package/dist/cli/{chunk-AKY7KZRJ.js → chunk-NLENABRU.js} +6 -6
  110. package/dist/cli/{chunk-ORA5TMML.mjs → chunk-NR3O56FT.mjs} +5 -5
  111. package/dist/cli/{chunk-3XXXMSSP.js → chunk-O2KLWUNI.js} +44 -44
  112. package/dist/cli/{chunk-ZVNYBQ77.mjs → chunk-OAFKUHN5.mjs} +4 -4
  113. package/dist/cli/{chunk-2ZGSHVZE.mjs → chunk-OELJKQOL.mjs} +24 -4
  114. package/dist/cli/{chunk-E7B73LGT.js → chunk-PX7XAVUC.js} +24 -20
  115. package/dist/cli/{chunk-VHJUH3TB.js → chunk-QFRMVI4S.js} +3 -3
  116. package/dist/cli/{chunk-Z5YRKX7K.mjs → chunk-R57UCXQG.mjs} +1 -1
  117. package/dist/cli/{chunk-IPVRMYWT.js → chunk-RKF263LR.js} +5 -5
  118. package/dist/cli/{chunk-CQDQNZGH.js → chunk-SL6MYJYM.js} +1 -0
  119. package/dist/cli/{chunk-JPT6VE54.js → chunk-STXG2LFC.js} +2 -2
  120. package/dist/cli/{chunk-SCLP5H4P.mjs → chunk-SU4K4SUU.mjs} +1 -1
  121. package/dist/cli/{chunk-NLZHLEHD.mjs → chunk-SYOPHFKB.mjs} +6 -6
  122. package/dist/cli/{chunk-WACIN4PR.mjs → chunk-SZNJENGT.mjs} +3 -3
  123. package/dist/cli/{chunk-QXNOSCYL.js → chunk-TBCNL2T5.js} +1 -1
  124. package/dist/cli/{chunk-E4CABWXL.js → chunk-TI6DTURF.js} +22 -1
  125. package/dist/cli/{chunk-NDNEARE3.js → chunk-UJ6GOV7K.js} +13 -13
  126. package/dist/cli/{chunk-GWHA4DAC.js → chunk-UV4RU2TE.js} +0 -2
  127. package/dist/cli/{chunk-P4MDTBAA.mjs → chunk-VSJEOSYL.mjs} +1 -1
  128. package/dist/cli/{chunk-EGOCGWCI.mjs → chunk-W2OPPSAZ.mjs} +3 -3
  129. package/dist/cli/{chunk-46V7QSJE.mjs → chunk-XBM3KABD.mjs} +3 -3
  130. package/dist/cli/{chunk-QONO7FRF.mjs → chunk-XFPVFWZR.mjs} +1 -1
  131. package/dist/cli/{chunk-PLIKPGOO.mjs → chunk-XSN6BAZT.mjs} +5 -5
  132. package/dist/cli/{chunk-IDDKNMFX.mjs → chunk-Y3T5GWYK.mjs} +153 -14
  133. package/dist/cli/{chunk-AUFE624T.js → chunk-YE3T73BV.js} +10 -10
  134. package/dist/cli/{chunk-DMXLZ57N.js → chunk-YJYKZ2U3.js} +2 -2
  135. package/dist/cli/{chunk-F6QV42MC.mjs → chunk-Z7SXGOIQ.mjs} +1 -1
  136. package/dist/cli/{chunk-SWO5QOXB.mjs → chunk-ZRT2PNYY.mjs} +1 -1
  137. package/dist/cli/{chunk-3LEUSRV3.mjs → chunk-ZSPBJB7I.mjs} +4 -4
  138. package/dist/cli/command-docs.js +3 -3
  139. package/dist/cli/command-docs.mjs +2 -2
  140. package/dist/cli/concurrent-runs-help-E4OYD3DS.js +21 -0
  141. package/dist/cli/{concurrent-runs-help-DIBGMEIN.mjs → concurrent-runs-help-Z6ODNL4E.mjs} +7 -7
  142. package/dist/cli/{csv-CAVA3EMS.mjs → csv-5QW2HPHT.mjs} +4 -4
  143. package/dist/cli/{csv-XZAM7EYZ.js → csv-SSOFTXHU.js} +13 -13
  144. package/dist/cli/{db-PPGEOBNG.js → db-4LK5AJNO.js} +29 -29
  145. package/dist/cli/{db-HD332QI7.mjs → db-K2JMR6EM.mjs} +8 -8
  146. package/dist/cli/describe-AC6PLEFP.js +50 -0
  147. package/dist/cli/describe-AXHQZHTT.mjs +50 -0
  148. package/dist/cli/describe-core.d.mts +3 -3
  149. package/dist/cli/describe-core.d.ts +3 -3
  150. package/dist/cli/describe-core.js +3 -3
  151. package/dist/cli/describe-core.mjs +2 -2
  152. package/dist/cli/{executions-4ZKBL7IC.js → executions-AATJQQAQ.js} +10 -10
  153. package/dist/cli/{executions-AFEOLB4A.mjs → executions-FY2XTX2W.mjs} +8 -8
  154. package/dist/cli/{feedback-J2YPLKMF.mjs → feedback-MKBPRGS6.mjs} +6 -6
  155. package/dist/cli/{feedback-M6Y33JKT.js → feedback-QPVJER75.js} +14 -14
  156. package/dist/cli/{git-632RYEF6.mjs → git-AGRFZR3K.mjs} +5 -5
  157. package/dist/cli/git-RUYFQEJX.js +25 -0
  158. package/dist/cli/index.js +150 -146
  159. package/dist/cli/index.mjs +49 -45
  160. package/dist/cli/integrations-OUQ6U33M.mjs +98 -0
  161. package/dist/cli/integrations-R6OUFZXI.js +98 -0
  162. package/dist/cli/{legacy-noops-KWZMXYAU.mjs → legacy-noops-DVL2RRKL.mjs} +6 -6
  163. package/dist/cli/{legacy-noops-4Y62TKPC.js → legacy-noops-H7INM2QN.js} +9 -9
  164. package/dist/cli/{mcp-PESLHAAC.mjs → mcp-2Z2YVOLK.mjs} +72 -15
  165. package/dist/cli/{mcp-35QA6YG7.js → mcp-33F7D7WI.js} +89 -32
  166. package/dist/cli/{monitors-4DTUZLAI.js → monitors-KDUJHAKJ.js} +102 -102
  167. package/dist/cli/{monitors-YVBKBJBU.mjs → monitors-NZD2WIKK.mjs} +9 -9
  168. package/dist/cli/{org-FWCBZMER.js → org-4PQGHLEB.js} +90 -90
  169. package/dist/cli/{org-DJNKMFCZ.mjs → org-EJW45RUA.mjs} +8 -8
  170. package/dist/cli/{play-PHVQEEEZ.mjs → play-3CM5RT5J.mjs} +44 -25
  171. package/dist/cli/{play-FZ45M4KD.js → play-MLHMQL4G.js} +374 -355
  172. package/dist/cli/{providers-46E67QG7.mjs → providers-BHYBJI4R.mjs} +10 -9
  173. package/dist/cli/{providers-QJU6FMDD.js → providers-YBJG7277.js} +13 -12
  174. package/dist/cli/{quickstart-6HMJJ4RR.mjs → quickstart-LL3MR562.mjs} +4 -4
  175. package/dist/cli/{quickstart-HOL7H5FS.js → quickstart-O7L2NNGJ.js} +6 -6
  176. package/dist/cli/{run-WKSIRXEC.js → run-HJ2AR6CM.js} +49 -48
  177. package/dist/cli/{run-2W2TJ6QA.mjs → run-OK545H5Q.mjs} +28 -27
  178. package/dist/cli/search-UUNS6BCC.js +32 -0
  179. package/dist/cli/{search-Y2CFLSYB.mjs → search-Z5ZKMRTX.mjs} +9 -9
  180. package/dist/cli/{search-output-FCZ35PHF.mjs → search-output-Q5VHNUWG.mjs} +4 -4
  181. package/dist/cli/{search-output-2IK6ZZDY.js → search-output-SVW4DETG.js} +6 -6
  182. package/dist/cli/{secrets-JVJIHGU4.js → secrets-ENQWMCB5.js} +17 -17
  183. package/dist/cli/{secrets-PNPNUZLX.mjs → secrets-QIKIEFWB.mjs} +8 -8
  184. package/dist/cli/{sessions-GY5VVQGO.mjs → sessions-AETO22RF.mjs} +6 -6
  185. package/dist/cli/sessions-FNSUDERA.js +22 -0
  186. package/dist/cli/{settings-YQOPF3AI.mjs → settings-G5RGRPFV.mjs} +16 -16
  187. package/dist/cli/{settings-5WHMFRNQ.js → settings-OFLIFTMZ.js} +89 -89
  188. package/dist/cli/{setup-O5U5IEVW.mjs → setup-G4N3X6KG.mjs} +9 -9
  189. package/dist/cli/{setup-3VJMKDEU.js → setup-QW7Y62XD.js} +49 -49
  190. package/dist/cli/skills-3IXIY2IV.js +36 -0
  191. package/dist/cli/{skills-G6J5PF35.mjs → skills-QRFQGHNA.mjs} +7 -7
  192. package/dist/cli/{tools-AG7SWL5Y.mjs → tools-52BH7UTF.mjs} +20 -19
  193. package/dist/cli/tools-MYBUMPKH.js +57 -0
  194. package/dist/cli/update-GT7574UU.js +34 -0
  195. package/dist/cli/{update-K73DD6CR.mjs → update-SDGZLAGL.mjs} +9 -9
  196. package/dist/cli/{views-MO6DIOMR.mjs → views-3BIJFJMQ.mjs} +8 -8
  197. package/dist/cli/{views-4D2OTLIO.js → views-5QKAWYPI.js} +23 -23
  198. package/dist/cli/{workflow-ZEMFCS4Y.js → workflow-G67RPWVY.js} +19 -19
  199. package/dist/cli/{workflow-MMZMAELI.mjs → workflow-QAK773FR.mjs} +9 -9
  200. package/dist/{client-X-FJD5Dp.d.ts → client-D1ga52xq.d.ts} +1 -1
  201. package/dist/{client-DLG9mHDh.d.mts → client-bd4QQIXo.d.mts} +1 -1
  202. package/dist/{client-core-0jmHfFBv.d.ts → client-core-B6eMVx8h.d.ts} +334 -3
  203. package/dist/{client-core-WtnqyBwY.d.mts → client-core-CqfWNf2Q.d.mts} +334 -3
  204. package/dist/{compiler-manifest-Cys06iYg.d.mts → compiler-manifest-BWFtsQIC.d.mts} +21 -0
  205. package/dist/{compiler-manifest-Cys06iYg.d.ts → compiler-manifest-BWFtsQIC.d.ts} +21 -0
  206. package/dist/{errors-B6eMjKcr.d.mts → errors-CwKXXtuu.d.mts} +1 -1
  207. package/dist/{errors-rdOUqcU2.d.ts → errors-Lm9_vJHZ.d.ts} +1 -1
  208. package/dist/{index-ejWadAL5.d.ts → index-3vJ-V9yw.d.ts} +1 -1
  209. package/dist/{index-CZdYO81A.d.mts → index-DjwsAt82.d.mts} +1 -1
  210. package/dist/index.d.mts +7 -7
  211. package/dist/index.d.ts +7 -7
  212. package/dist/index.js +12 -12
  213. package/dist/index.mjs +8 -8
  214. package/dist/install-integrity.json +147 -133
  215. package/dist/plays/bundle-play-file.d.mts +3 -3
  216. package/dist/plays/bundle-play-file.d.ts +3 -3
  217. package/dist/plays/bundle-play-file.mjs +23 -4
  218. package/dist/plays/play-description.d.mts +2 -2
  219. package/dist/plays/play-description.d.ts +2 -2
  220. package/dist/plays/run-request.d.mts +2 -2
  221. package/dist/plays/run-request.d.ts +2 -2
  222. package/dist/plays/run-request.js +2 -2
  223. package/dist/plays/run-request.mjs +1 -1
  224. package/dist/release.d.mts +1 -1
  225. package/dist/release.d.ts +1 -1
  226. package/dist/release.js +2 -2
  227. package/dist/release.mjs +1 -1
  228. package/dist/server.d.mts +4 -4
  229. package/dist/server.d.ts +4 -4
  230. package/dist/server.js +7 -7
  231. package/dist/server.mjs +5 -5
  232. package/package.json +1 -1
  233. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal-resource-usage.ts +0 -222
  234. package/dist/cli/auth-2PH6RSKL.js +0 -43
  235. package/dist/cli/concurrent-runs-help-BNIDBKML.js +0 -21
  236. package/dist/cli/describe-5TFFB2PM.js +0 -49
  237. package/dist/cli/describe-THQU7N47.mjs +0 -49
  238. package/dist/cli/git-AQLQYWRI.js +0 -25
  239. package/dist/cli/search-YLJFCJTK.js +0 -32
  240. package/dist/cli/sessions-TZ33UCPS.js +0 -22
  241. package/dist/cli/skills-WZY3XDT3.js +0 -36
  242. package/dist/cli/tools-BXQBL72Q.js +0 -56
  243. package/dist/cli/update-XYP5EII6.js +0 -34
@@ -8,6 +8,11 @@ import {
8
8
  inspectDetachedModalRunner,
9
9
  readDetachedModalRuntimeCompletion,
10
10
  } from './backends/modal';
11
+ import {
12
+ deleteVercelSandboxByName,
13
+ inspectDetachedVercelRunner,
14
+ readDetachedVercelRuntimeCompletion,
15
+ } from './backends/vercel-sandbox';
11
16
  import {
12
17
  readPersistedRuntimeSandboxRef,
13
18
  type RuntimeSandboxProviderId,
@@ -175,6 +180,18 @@ export function runtimeSandboxRefFromResource(
175
180
  : null,
176
181
  };
177
182
  }
183
+ if (resource.kind === 'vercel_sandbox') {
184
+ return {
185
+ schemaVersion: 1,
186
+ provider: 'vercel',
187
+ resourceId,
188
+ routingDomain:
189
+ typeof resource.vercelProjectId === 'string' &&
190
+ resource.vercelProjectId.trim()
191
+ ? resource.vercelProjectId.trim()
192
+ : null,
193
+ };
194
+ }
178
195
  return null;
179
196
  }
180
197
 
@@ -274,5 +291,33 @@ export const defaultRuntimeSandboxReconciliation =
274
291
  expectedAppId: ref.routingDomain,
275
292
  }),
276
293
  },
294
+ {
295
+ // Preview-only (`vercel_sandbox_only@1`). The resource id is the
296
+ // sandbox name recorded before its create; the domain is the project.
297
+ provider: 'vercel',
298
+ delete: async (ref) => {
299
+ const outcome = await deleteVercelSandboxByName({
300
+ name: ref.resourceId,
301
+ expectedProjectId: ref.routingDomain,
302
+ });
303
+ return { ...outcome, routingDomain: outcome.projectId };
304
+ },
305
+ inspectDetachedRunner: (ref, suspension, options) =>
306
+ inspectDetachedVercelRunner({
307
+ name: ref.resourceId,
308
+ outputPath: suspension.outputPath,
309
+ exitCodePath: suspension.exitCodePath,
310
+ expectedProjectId: ref.routingDomain,
311
+ ...(options?.skipCapturedOutput
312
+ ? { skipCapturedOutput: true }
313
+ : {}),
314
+ }),
315
+ readWorkCompletedAt: (ref, path) =>
316
+ readDetachedVercelRuntimeCompletion({
317
+ name: ref.resourceId,
318
+ runtimeCompletedPath: path,
319
+ expectedProjectId: ref.routingDomain,
320
+ }),
321
+ },
277
322
  ],
278
323
  });
@@ -1,3 +1,5 @@
1
+ import type { RuntimeSandboxProviderId } from '../runtime-sandbox-provider-profile';
2
+
1
3
  export type SandboxCreateOutcome = 'succeeded' | 'failed' | 'unknown';
2
4
 
3
5
  /**
@@ -8,7 +10,7 @@ export type SandboxCreateOutcome = 'succeeded' | 'failed' | 'unknown';
8
10
  * `unknown` means the request outlived its client deadline and may still land.
9
11
  */
10
12
  export function logSandboxCreateOutcome(input: {
11
- provider: 'daytona' | 'modal';
13
+ provider: RuntimeSandboxProviderId;
12
14
  outcome: SandboxCreateOutcome;
13
15
  runId: string | null | undefined;
14
16
  reason?: string | null;
@@ -11,7 +11,11 @@ import type {
11
11
  } from '../protocol';
12
12
 
13
13
  export type PlayRunnerRuntimeResource = {
14
- kind: 'daytona_sandbox' | 'modal_sandbox' | 'agentcore_runtime_session';
14
+ kind:
15
+ | 'daytona_sandbox'
16
+ | 'modal_sandbox'
17
+ | 'agentcore_runtime_session'
18
+ | 'vercel_sandbox';
15
19
  sandboxId: string;
16
20
  /** Runtime estate that owns provider credentials and durable cleanup. */
17
21
  runtimeEnvironment?: 'preview' | 'production';
@@ -26,6 +30,8 @@ export type PlayRunnerRuntimeResource = {
26
30
  * the cleanup routing domain.
27
31
  */
28
32
  agentcoreRuntimeArn?: string;
33
+ /** Stable, non-secret Vercel project that owns a `vercel_sandbox`. */
34
+ vercelProjectId?: string;
29
35
  billingStartedAt: number;
30
36
  billingEndedAt?: number | null;
31
37
  /**
@@ -105,7 +111,7 @@ export type PlayRunnerRuntimeLifecycleEvent = {
105
111
  * resource identity to cross the no-replay boundary.
106
112
  */
107
113
  export type PlayRunnerCommandAcceptance = {
108
- provider: 'daytona' | 'modal' | 'agentcore_runtime';
114
+ provider: 'daytona' | 'modal' | 'agentcore_runtime' | 'vercel';
109
115
  sandboxId: string;
110
116
  };
111
117
 
@@ -218,7 +224,7 @@ export interface PlayRunnerCallbacks {
218
224
  workerSlot?: PlayRunnerWorkerSlot;
219
225
  /** Reserve one physical-sandbox slot immediately before a provider create. */
220
226
  reserveSandboxCapacity?: (
221
- provider: 'daytona' | 'modal' | 'agentcore_runtime',
227
+ provider: 'daytona' | 'modal' | 'agentcore_runtime' | 'vercel',
222
228
  providerAttempt?: number,
223
229
  ) => Promise<{
224
230
  leaseId: string;
@@ -239,11 +245,11 @@ export interface PlayRunnerCallbacks {
239
245
  * pre-code recovery outcome instead.
240
246
  */
241
247
  shouldAttemptSandboxProvider?: (
242
- provider: 'daytona' | 'modal' | 'agentcore_runtime',
248
+ provider: 'daytona' | 'modal' | 'agentcore_runtime' | 'vercel',
243
249
  ) => Promise<{ allowed: boolean; probeToken: string | null }>;
244
250
  /** A durably recorded resource may close only the probe that owns it. */
245
251
  markSandboxProviderHealthy?: (
246
- provider: 'daytona' | 'modal' | 'agentcore_runtime',
252
+ provider: 'daytona' | 'modal' | 'agentcore_runtime' | 'vercel',
247
253
  probeToken: string | null,
248
254
  ) => Promise<void>;
249
255
  /**
@@ -1,6 +1,10 @@
1
1
  import { deployed, readDeployedObject } from '@deepline/deployed-contracts';
2
+ import {
3
+ isRuntimeSandboxProviderId,
4
+ type RuntimeSandboxProviderId,
5
+ } from './runtime-sandbox-provider-profile';
2
6
 
3
- export type RuntimeSandboxProviderId = 'daytona' | 'modal';
7
+ export type { RuntimeSandboxProviderId };
4
8
 
5
9
  export type RuntimeSandboxRef = {
6
10
  /** Internal normalized form; persisted writer markers are diagnostic only. */
@@ -48,7 +52,7 @@ export function readPersistedRuntimeSandboxRef(input: {
48
52
  typeof value.resourceId === 'string' ? value.resourceId.trim() : '';
49
53
  const routingDomain = value.routingDomain;
50
54
  if (
51
- (provider !== 'daytona' && provider !== 'modal') ||
55
+ !isRuntimeSandboxProviderId(provider) ||
52
56
  !resourceId ||
53
57
  resourceId !== input.expectedSandboxId.trim() ||
54
58
  (routingDomain !== null && typeof routingDomain !== 'string') ||
@@ -66,3 +70,17 @@ export function readPersistedRuntimeSandboxRef(input: {
66
70
  typeof routingDomain === 'string' ? routingDomain.trim() : null,
67
71
  };
68
72
  }
73
+
74
+ /** A new ref in its one internal normalized form. */
75
+ export function runtimeSandboxRef(input: {
76
+ provider: RuntimeSandboxProviderId;
77
+ resourceId: string;
78
+ routingDomain: string | null;
79
+ }): RuntimeSandboxRef {
80
+ return {
81
+ schemaVersion: 1,
82
+ provider: input.provider,
83
+ resourceId: input.resourceId,
84
+ routingDomain: input.routingDomain,
85
+ };
86
+ }
@@ -1,14 +1,51 @@
1
1
  import { PLAY_RUNTIME_BACKENDS, type PlayRuntimeBackendId } from './backend';
2
2
  import { createHash } from 'node:crypto';
3
3
  import { isIsolatedRuntimeSchedulerSchema } from './runtime-scheduler-topology';
4
+ import {
5
+ runtimeSandboxProviderCredentialEnv,
6
+ runtimeSandboxProviderProfile,
7
+ runtimeSandboxProvidersInCanonicalOrder,
8
+ type RuntimeSandboxProviderId,
9
+ } from './runtime-sandbox-provider-profile';
4
10
 
5
11
  export const RUNTIME_SANDBOX_PROVIDERS = {
6
12
  daytona: 'daytona',
7
13
  modal: 'modal',
8
- } as const;
14
+ /** Preview-only: its profile does not support Production. */
15
+ vercel: 'vercel',
16
+ } as const satisfies Record<RuntimeSandboxProviderId, RuntimeSandboxProviderId>;
9
17
 
10
- export type RuntimeSandboxProvider =
11
- (typeof RUNTIME_SANDBOX_PROVIDERS)[keyof typeof RUNTIME_SANDBOX_PROVIDERS];
18
+ export type RuntimeSandboxProvider = RuntimeSandboxProviderId;
19
+
20
+ /**
21
+ * Credentials and cleanup ownership follow from the providers a policy may
22
+ * place on; the Provider Profile owns both facts.
23
+ */
24
+ function placementPolicy(
25
+ policy: Omit<
26
+ RuntimeSandboxPlacementPolicy,
27
+ 'requiredCredentialEnv' | 'cleanupProviders' | 'previewOnly'
28
+ >,
29
+ ): RuntimeSandboxPlacementPolicy {
30
+ return {
31
+ ...policy,
32
+ requiredCredentialEnv: runtimeSandboxProviderCredentialEnv(
33
+ policy.providers,
34
+ ),
35
+ cleanupProviders: runtimeSandboxProvidersInCanonicalOrder(
36
+ policy.providers,
37
+ ),
38
+ // A policy placing on any provider without Production support runs only
39
+ // on a Preview lane pinned to it.
40
+ ...(policy.providers.every(
41
+ (provider) =>
42
+ runtimeSandboxProviderProfile(provider).capabilities.production
43
+ .supported,
44
+ )
45
+ ? {}
46
+ : { previewOnly: true as const }),
47
+ };
48
+ }
12
49
 
13
50
  /**
14
51
  * Stable durable ids. Changing provider order or transition rules creates a
@@ -20,6 +57,7 @@ export const RUNTIME_SANDBOX_PLACEMENT_POLICIES = {
20
57
  daytonaModalCanaryV1: 'daytona_modal_canary@1',
21
58
  modalOnlyV1: 'modal_only@1',
22
59
  modalThenDaytonaV1: 'modal_then_daytona@1',
60
+ vercelSandboxOnlyV1: 'vercel_sandbox_only@1',
23
61
  } as const;
24
62
 
25
63
  /** Deployment-scoped policy selection for an isolated runtime lane. */
@@ -49,6 +87,12 @@ export type RuntimeSandboxPlacementPolicy = Readonly<{
49
87
  transitions: readonly RuntimeSandboxPlacementTransition[];
50
88
  requiredCredentialEnv: readonly string[];
51
89
  cleanupProviders: readonly RuntimeSandboxProvider[];
90
+ /**
91
+ * Runs only on a worker lane pinned to this exact policy, in Preview. It is
92
+ * never an operator default, never part of an unpinned worker's catalog, and
93
+ * a launch writer refuses it in Production.
94
+ */
95
+ previewOnly?: true;
52
96
  canary?: Readonly<{
53
97
  provider: RuntimeSandboxProvider;
54
98
  basisPoints: number;
@@ -102,7 +146,7 @@ export function selectRuntimeSandboxCanary(input: {
102
146
  };
103
147
  }
104
148
 
105
- const DAYTONA_THEN_MODAL_V1: RuntimeSandboxPlacementPolicy = {
149
+ const DAYTONA_THEN_MODAL_V1 = placementPolicy({
106
150
  id: RUNTIME_SANDBOX_PLACEMENT_POLICIES.daytonaThenModalV1,
107
151
  compatibilityRuntimeBackend: PLAY_RUNTIME_BACKENDS.daytona,
108
152
  providers: [
@@ -120,16 +164,7 @@ const DAYTONA_THEN_MODAL_V1: RuntimeSandboxPlacementPolicy = {
120
164
  ],
121
165
  },
122
166
  ],
123
- requiredCredentialEnv: [
124
- 'DAYTONA_API_KEY',
125
- 'MODAL_TOKEN_ID',
126
- 'MODAL_TOKEN_SECRET',
127
- ],
128
- cleanupProviders: [
129
- RUNTIME_SANDBOX_PROVIDERS.daytona,
130
- RUNTIME_SANDBOX_PROVIDERS.modal,
131
- ],
132
- };
167
+ });
133
168
 
134
169
  /**
135
170
  * Staged Daytona-compatible policy. Workers learn this policy before launch
@@ -152,23 +187,19 @@ const DAYTONA_MODAL_CANARY_V1: RuntimeSandboxPlacementPolicy = {
152
187
  * Frozen compatibility policy for launches written before placement policy ids
153
188
  * existed. It is retained until every pre-policy release lane has drained.
154
189
  */
155
- const DAYTONA_ONLY_V1: RuntimeSandboxPlacementPolicy = {
190
+ const DAYTONA_ONLY_V1 = placementPolicy({
156
191
  id: RUNTIME_SANDBOX_PLACEMENT_POLICIES.daytonaOnlyV1,
157
192
  compatibilityRuntimeBackend: PLAY_RUNTIME_BACKENDS.daytona,
158
193
  providers: [RUNTIME_SANDBOX_PROVIDERS.daytona],
159
194
  transitions: [],
160
- requiredCredentialEnv: ['DAYTONA_API_KEY'],
161
- cleanupProviders: [RUNTIME_SANDBOX_PROVIDERS.daytona],
162
- };
195
+ });
163
196
 
164
- const MODAL_ONLY_V1: RuntimeSandboxPlacementPolicy = {
197
+ const MODAL_ONLY_V1 = placementPolicy({
165
198
  id: RUNTIME_SANDBOX_PLACEMENT_POLICIES.modalOnlyV1,
166
199
  compatibilityRuntimeBackend: PLAY_RUNTIME_BACKENDS.modal,
167
200
  providers: [RUNTIME_SANDBOX_PROVIDERS.modal],
168
201
  transitions: [],
169
- requiredCredentialEnv: ['MODAL_TOKEN_ID', 'MODAL_TOKEN_SECRET'],
170
- cleanupProviders: [RUNTIME_SANDBOX_PROVIDERS.modal],
171
- };
202
+ });
172
203
 
173
204
  /**
174
205
  * Modal first, for when Daytona is unhealthy. It runs on the Daytona lane and
@@ -178,7 +209,7 @@ const MODAL_ONLY_V1: RuntimeSandboxPlacementPolicy = {
178
209
  * a cleanup obligation and never runs the Play. Any later Modal failure stays
179
210
  * on Modal.
180
211
  */
181
- const MODAL_THEN_DAYTONA_V1: RuntimeSandboxPlacementPolicy = {
212
+ const MODAL_THEN_DAYTONA_V1 = placementPolicy({
182
213
  id: RUNTIME_SANDBOX_PLACEMENT_POLICIES.modalThenDaytonaV1,
183
214
  compatibilityRuntimeBackend: PLAY_RUNTIME_BACKENDS.daytona,
184
215
  providers: [
@@ -193,16 +224,20 @@ const MODAL_THEN_DAYTONA_V1: RuntimeSandboxPlacementPolicy = {
193
224
  reasons: ['provider_capacity_exhausted'],
194
225
  },
195
226
  ],
196
- requiredCredentialEnv: [
197
- 'DAYTONA_API_KEY',
198
- 'MODAL_TOKEN_ID',
199
- 'MODAL_TOKEN_SECRET',
200
- ],
201
- cleanupProviders: [
202
- RUNTIME_SANDBOX_PROVIDERS.daytona,
203
- RUNTIME_SANDBOX_PROVIDERS.modal,
204
- ],
205
- };
227
+ });
228
+
229
+ /**
230
+ * Vercel Sandbox, Preview only (its Provider Profile has no Production
231
+ * support). It runs on the Modal logical lane (same artifact and worker image)
232
+ * but never touches Modal: its only provider is Vercel Sandbox. It uses the
233
+ * shared capacity ledger, operation ledger and durable cleanup like the others.
234
+ */
235
+ const VERCEL_SANDBOX_ONLY_V1 = placementPolicy({
236
+ id: RUNTIME_SANDBOX_PLACEMENT_POLICIES.vercelSandboxOnlyV1,
237
+ compatibilityRuntimeBackend: PLAY_RUNTIME_BACKENDS.modal,
238
+ providers: [RUNTIME_SANDBOX_PROVIDERS.vercel],
239
+ transitions: [],
240
+ });
206
241
 
207
242
  export const RUNTIME_SANDBOX_PLACEMENT_POLICY_CATALOG: Readonly<
208
243
  Record<RuntimeSandboxPlacementPolicyId, RuntimeSandboxPlacementPolicy>
@@ -215,6 +250,8 @@ export const RUNTIME_SANDBOX_PLACEMENT_POLICY_CATALOG: Readonly<
215
250
  [RUNTIME_SANDBOX_PLACEMENT_POLICIES.modalOnlyV1]: MODAL_ONLY_V1,
216
251
  [RUNTIME_SANDBOX_PLACEMENT_POLICIES.modalThenDaytonaV1]:
217
252
  MODAL_THEN_DAYTONA_V1,
253
+ [RUNTIME_SANDBOX_PLACEMENT_POLICIES.vercelSandboxOnlyV1]:
254
+ VERCEL_SANDBOX_ONLY_V1,
218
255
  };
219
256
 
220
257
  export function resolveRuntimeSandboxPlacementPolicy(
@@ -278,7 +315,7 @@ export function operatorDefaultRuntimeSandboxPlacementPolicyIds(
278
315
  backend: PlayRuntimeBackendId,
279
316
  ): readonly RuntimeSandboxPlacementPolicyId[] {
280
317
  return runtimeSandboxPlacementPoliciesForBackend(backend)
281
- .filter((policy) => policy !== DAYTONA_ONLY_V1)
318
+ .filter((policy) => policy !== DAYTONA_ONLY_V1 && !policy.previewOnly)
282
319
  .map((policy) => policy.id);
283
320
  }
284
321
 
@@ -0,0 +1,286 @@
1
+ /**
2
+ * Runtime Sandbox Provider Profile: the one place that says what a placement
3
+ * sandbox provider (Daytona, Modal, Vercel Sandbox) is and what it supports. AgentCore runtime
4
+ * sessions are not placement providers and are deliberately outside it.
5
+ *
6
+ * Placement policies derive their credentials and cleanup ownership from these
7
+ * profiles, and a worker lane is refused at boot when a provider it would
8
+ * place on lacks a capability the lane needs. A provider that does not support
9
+ * something says so here, with a reason, instead of a runtime branch deciding
10
+ * it mid-run.
11
+ *
12
+ * Pure data: no provider SDK, scheduler or app imports.
13
+ */
14
+
15
+ export type RuntimeSandboxProviderSupport =
16
+ | Readonly<{ supported: true }>
17
+ | Readonly<{ supported: false; reason: string }>;
18
+
19
+ const SUPPORTED: RuntimeSandboxProviderSupport = { supported: true };
20
+
21
+ function unsupported(reason: string): RuntimeSandboxProviderSupport {
22
+ return { supported: false, reason };
23
+ }
24
+
25
+ /**
26
+ * Capabilities a lane can require. Each is owned by a shared Module; the
27
+ * provider only declares whether its Adapter plugs into it.
28
+ */
29
+ export type RuntimeSandboxProviderCapability =
30
+ /** Customer runs in Production. */
31
+ | 'production'
32
+ /** The shared per-org capacity ledger and provider operation ledger. */
33
+ | 'capacityLedger'
34
+ /** The shared durable cleanup jobs and the reconciliation registry. */
35
+ | 'durableCleanup'
36
+ /** The shared compute billing session (`compute_billing_jobs_v2`). */
37
+ | 'computeBilling'
38
+ /** Fleet orphan enumeration of every sandbox the provider holds for us. */
39
+ | 'orphanEnumeration'
40
+ /** The hash-verified prebuilt runner image (`baked-runner-image.ts`). */
41
+ | 'bakedRunner'
42
+ /** Early sandbox start at admission (E2). */
43
+ | 'earlyStart'
44
+ /** Pre-booting the runner in an early sandbox (PB). */
45
+ | 'preboot'
46
+ /** Early-sandbox claim affinity (CA/CAR). */
47
+ | 'claimAffinity'
48
+ /** An egress CIDR allowlist, required before Production. */
49
+ | 'egressAllowlist';
50
+
51
+ export const RUNTIME_SANDBOX_PROVIDER_CAPABILITIES = [
52
+ 'production',
53
+ 'capacityLedger',
54
+ 'durableCleanup',
55
+ 'computeBilling',
56
+ 'orphanEnumeration',
57
+ 'bakedRunner',
58
+ 'earlyStart',
59
+ 'preboot',
60
+ 'claimAffinity',
61
+ 'egressAllowlist',
62
+ ] as const satisfies readonly RuntimeSandboxProviderCapability[];
63
+
64
+ export type RuntimeSandboxProviderProfile = Readonly<{
65
+ provider: string;
66
+ /** `PlayRunnerRuntimeResource.kind` this provider's resource facts carry. */
67
+ resourceKind: string;
68
+ /** Worker-only credentials a lane must hold to place on this provider. */
69
+ credentialEnv: readonly string[];
70
+ capabilities: Readonly<
71
+ Record<RuntimeSandboxProviderCapability, RuntimeSandboxProviderSupport>
72
+ >;
73
+ }>;
74
+
75
+ const DAYTONA_PROFILE = {
76
+ provider: 'daytona',
77
+ resourceKind: 'daytona_sandbox',
78
+ credentialEnv: ['DAYTONA_API_KEY'],
79
+ capabilities: {
80
+ production: SUPPORTED,
81
+ capacityLedger: SUPPORTED,
82
+ durableCleanup: SUPPORTED,
83
+ computeBilling: SUPPORTED,
84
+ orphanEnumeration: SUPPORTED,
85
+ bakedRunner: unsupported(
86
+ 'The Daytona Adapter never plans a baked launch; it always uploads the runner bundle.',
87
+ ),
88
+ earlyStart: unsupported(
89
+ 'Early sandbox start is implemented only in the Modal Adapter.',
90
+ ),
91
+ preboot: unsupported(
92
+ 'Runner pre-boot is implemented only in the Modal Adapter.',
93
+ ),
94
+ claimAffinity: unsupported(
95
+ 'Claim affinity follows an early sandbox, which Daytona does not start.',
96
+ ),
97
+ egressAllowlist: SUPPORTED,
98
+ },
99
+ } as const satisfies RuntimeSandboxProviderProfile;
100
+
101
+ const MODAL_PROFILE = {
102
+ provider: 'modal',
103
+ resourceKind: 'modal_sandbox',
104
+ credentialEnv: ['MODAL_TOKEN_ID', 'MODAL_TOKEN_SECRET'],
105
+ capabilities: {
106
+ production: SUPPORTED,
107
+ capacityLedger: SUPPORTED,
108
+ durableCleanup: SUPPORTED,
109
+ computeBilling: SUPPORTED,
110
+ orphanEnumeration: unsupported(
111
+ 'The Fleet Sandbox Sweep enumerates only unadopted early Modal sandboxes (by their early-start tags); every other Modal sandbox relies on durable cleanup and the sandbox lifetime.',
112
+ ),
113
+ bakedRunner: SUPPORTED,
114
+ earlyStart: SUPPORTED,
115
+ preboot: SUPPORTED,
116
+ claimAffinity: SUPPORTED,
117
+ egressAllowlist: SUPPORTED,
118
+ },
119
+ } as const satisfies RuntimeSandboxProviderProfile;
120
+
121
+ /** Canonical order: credentials and cleanup ownership are listed in it. */
122
+ const VERCEL_PROFILE = {
123
+ provider: 'vercel',
124
+ resourceKind: 'vercel_sandbox',
125
+ credentialEnv: ['VERCEL_SANDBOX_TOKEN'],
126
+ capabilities: {
127
+ production: unsupported(
128
+ 'Vercel Sandbox is a Preview-only experiment: Production placement needs owner approval, priced compute billing and a Sandbox-scoped credential.',
129
+ ),
130
+ capacityLedger: SUPPORTED,
131
+ durableCleanup: SUPPORTED,
132
+ computeBilling: unsupported(
133
+ 'No Vercel Sandbox compute price is approved; its sandboxes are not billed.',
134
+ ),
135
+ orphanEnumeration: unsupported(
136
+ 'Every Vercel sandbox name is recorded before create, so durable cleanup owns it; fleet enumeration is not wired.',
137
+ ),
138
+ bakedRunner: SUPPORTED,
139
+ earlyStart: unsupported(
140
+ 'Early sandbox start is implemented only in the Modal Adapter.',
141
+ ),
142
+ preboot: unsupported(
143
+ 'Runner pre-boot is implemented only in the Modal Adapter.',
144
+ ),
145
+ claimAffinity: unsupported(
146
+ 'Claim affinity follows an early sandbox, which Vercel does not start.',
147
+ ),
148
+ egressAllowlist: SUPPORTED,
149
+ },
150
+ } as const satisfies RuntimeSandboxProviderProfile;
151
+
152
+ export const RUNTIME_SANDBOX_PROVIDER_PROFILES = [
153
+ DAYTONA_PROFILE,
154
+ MODAL_PROFILE,
155
+ VERCEL_PROFILE,
156
+ ] as const;
157
+
158
+ export type RuntimeSandboxProviderId =
159
+ (typeof RUNTIME_SANDBOX_PROVIDER_PROFILES)[number]['provider'];
160
+
161
+ export type RuntimeSandboxResourceKind =
162
+ (typeof RUNTIME_SANDBOX_PROVIDER_PROFILES)[number]['resourceKind'];
163
+
164
+ export const RUNTIME_SANDBOX_PROVIDER_IDS: readonly RuntimeSandboxProviderId[] =
165
+ RUNTIME_SANDBOX_PROVIDER_PROFILES.map((profile) => profile.provider);
166
+
167
+ export function isRuntimeSandboxProviderId(
168
+ value: unknown,
169
+ ): value is RuntimeSandboxProviderId {
170
+ return (
171
+ typeof value === 'string' &&
172
+ (RUNTIME_SANDBOX_PROVIDER_IDS as readonly string[]).includes(value)
173
+ );
174
+ }
175
+
176
+ export function runtimeSandboxProviderProfile(
177
+ provider: RuntimeSandboxProviderId,
178
+ ): RuntimeSandboxProviderProfile {
179
+ const profile = RUNTIME_SANDBOX_PROVIDER_PROFILES.find(
180
+ (candidate) => candidate.provider === provider,
181
+ );
182
+ if (!profile) {
183
+ throw new Error(`Unknown runtime sandbox provider "${String(provider)}".`);
184
+ }
185
+ return profile;
186
+ }
187
+
188
+ /** The given providers, deduplicated, in canonical profile order. */
189
+ export function runtimeSandboxProvidersInCanonicalOrder(
190
+ providers: readonly RuntimeSandboxProviderId[],
191
+ ): RuntimeSandboxProviderId[] {
192
+ return RUNTIME_SANDBOX_PROVIDER_IDS.filter((id) => providers.includes(id));
193
+ }
194
+
195
+ /** Credentials for a set of providers, deduplicated, in canonical order. */
196
+ export function runtimeSandboxProviderCredentialEnv(
197
+ providers: readonly RuntimeSandboxProviderId[],
198
+ ): string[] {
199
+ return [
200
+ ...new Set(
201
+ runtimeSandboxProvidersInCanonicalOrder(providers).flatMap(
202
+ (provider) => runtimeSandboxProviderProfile(provider).credentialEnv,
203
+ ),
204
+ ),
205
+ ];
206
+ }
207
+
208
+ /**
209
+ * What a worker lane needs from every provider it may place on. Production
210
+ * lanes need the shared capacity, cleanup and billing owners; an `enforce`
211
+ * capacity lane needs the ledger.
212
+ */
213
+ export function runtimeSandboxLaneRequiredCapabilities(lane: {
214
+ environment: 'preview' | 'production';
215
+ capacityAdmission: 'observe' | 'enforce';
216
+ }): RuntimeSandboxProviderCapability[] {
217
+ const required = new Set<RuntimeSandboxProviderCapability>();
218
+ if (lane.environment === 'production') {
219
+ required.add('production');
220
+ required.add('capacityLedger');
221
+ required.add('durableCleanup');
222
+ required.add('computeBilling');
223
+ }
224
+ if (lane.capacityAdmission === 'enforce') required.add('capacityLedger');
225
+ return RUNTIME_SANDBOX_PROVIDER_CAPABILITIES.filter((capability) =>
226
+ required.has(capability),
227
+ );
228
+ }
229
+
230
+ export type RuntimeSandboxCapabilityShortfall = Readonly<{
231
+ provider: RuntimeSandboxProviderId;
232
+ capability: RuntimeSandboxProviderCapability;
233
+ reason: string;
234
+ }>;
235
+
236
+ export function runtimeSandboxCapabilityShortfalls(input: {
237
+ providers: readonly RuntimeSandboxProviderId[];
238
+ required: readonly RuntimeSandboxProviderCapability[];
239
+ }): RuntimeSandboxCapabilityShortfall[] {
240
+ const shortfalls: RuntimeSandboxCapabilityShortfall[] = [];
241
+ for (const provider of runtimeSandboxProvidersInCanonicalOrder(
242
+ input.providers,
243
+ )) {
244
+ const profile = runtimeSandboxProviderProfile(provider);
245
+ for (const capability of input.required) {
246
+ const support = profile.capabilities[capability];
247
+ // `in` narrows under every tsconfig, including non-strict ones.
248
+ if ('reason' in support) {
249
+ shortfalls.push({ provider, capability, reason: support.reason });
250
+ }
251
+ }
252
+ }
253
+ return shortfalls;
254
+ }
255
+
256
+ export class RuntimeSandboxCapabilityUnsupportedError extends Error {
257
+ constructor(
258
+ readonly subject: string,
259
+ readonly shortfalls: readonly RuntimeSandboxCapabilityShortfall[],
260
+ ) {
261
+ super(
262
+ `${subject} needs sandbox capabilities its providers do not support: ${shortfalls
263
+ .map(
264
+ (shortfall) =>
265
+ `${shortfall.provider} lacks ${shortfall.capability} (${shortfall.reason})`,
266
+ )
267
+ .join('; ')}.`,
268
+ );
269
+ this.name = 'RuntimeSandboxCapabilityUnsupportedError';
270
+ }
271
+ }
272
+
273
+ /** Fails loudly, before any run, when a provider lacks a required capability. */
274
+ export function assertRuntimeSandboxProvidersSupport(input: {
275
+ subject: string;
276
+ providers: readonly RuntimeSandboxProviderId[];
277
+ required: readonly RuntimeSandboxProviderCapability[];
278
+ }): void {
279
+ const shortfalls = runtimeSandboxCapabilityShortfalls(input);
280
+ if (shortfalls.length > 0) {
281
+ throw new RuntimeSandboxCapabilityUnsupportedError(
282
+ input.subject,
283
+ shortfalls,
284
+ );
285
+ }
286
+ }
@@ -1,4 +1,5 @@
1
1
  import type { PlayRunnerDaytonaCleanupIntent } from '../runner-backends/types';
2
+ import type { RuntimeSandboxProviderId } from '../runtime-sandbox-provider-profile';
2
3
 
3
4
  /**
4
5
  * Sandbox Runs is the portable lifecycle boundary around a physical execution
@@ -17,6 +18,7 @@ export type SandboxProvider =
17
18
  | 'daytona'
18
19
  | 'modal'
19
20
  | 'agentcore_runtime'
21
+ | 'vercel'
20
22
  | 'local';
21
23
 
22
24
  /** A portable, credential-free description of one execution resource. */
@@ -199,6 +201,7 @@ export type SandboxExecutionResource = SandboxRunResource & {
199
201
  | 'daytona_sandbox'
200
202
  | 'modal_sandbox'
201
203
  | 'agentcore_runtime_session'
204
+ | 'vercel_sandbox'
202
205
  | 'local_process';
203
206
  runtimeEnvironment?: 'preview' | 'production';
204
207
  billingEndedAtMs?: number | null;
@@ -221,7 +224,7 @@ export type SandboxCreateIntent = {
221
224
  };
222
225
 
223
226
  export type SandboxProviderLifecycleEvent = {
224
- provider: 'daytona' | 'modal';
227
+ provider: RuntimeSandboxProviderId;
225
228
  type: 'create_call_started' | 'create_call_succeeded' | 'create_call_failed';
226
229
  providerAttempt: number;
227
230
  occurredAtMs: number;