deepline 0.3.542 → 0.3.544

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 (246) hide show
  1. package/dist/bundling-sources/sdk/src/client-core.ts +112 -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/monitor-fleet-contract.ts +3 -1
  10. package/dist/bundling-sources/shared_libs/integration-contracts/tool-connection.ts +13 -0
  11. package/dist/bundling-sources/shared_libs/monitors/fleets/plan.ts +108 -1
  12. package/dist/bundling-sources/shared_libs/monitors/package.json +1 -1
  13. package/dist/bundling-sources/shared_libs/observability/queue-health.ts +9 -0
  14. package/dist/bundling-sources/shared_libs/observability/queue-item-connectors.ts +1 -0
  15. package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +5 -5
  16. package/dist/bundling-sources/shared_libs/play-data-plane/sheet-contract.ts +34 -0
  17. package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +11 -5
  18. package/dist/bundling-sources/shared_libs/play-runtime/baked-runner-image.ts +9 -7
  19. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +235 -12
  20. package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +20 -1
  21. package/dist/bundling-sources/shared_libs/play-runtime/daytona-sandbox-janitor.ts +39 -30
  22. package/dist/bundling-sources/shared_libs/play-runtime/durable-summary-events.ts +29 -0
  23. package/dist/bundling-sources/shared_libs/play-runtime/event-wait-tools.ts +2 -0
  24. package/dist/bundling-sources/shared_libs/play-runtime/experiment-switches.ts +10 -4
  25. package/dist/bundling-sources/shared_libs/play-runtime/fleet-sandbox-sweep.ts +209 -0
  26. package/dist/bundling-sources/shared_libs/play-runtime/launch-identity.ts +4 -0
  27. package/dist/bundling-sources/shared_libs/play-runtime/play-run-recovery-policy.ts +24 -1
  28. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/sandbox-cleanup/contracts.ts +2 -1
  29. package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +6 -1
  30. package/dist/bundling-sources/shared_libs/play-runtime/run-ledger.ts +37 -0
  31. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +43 -3
  32. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-tool-hooks.ts +7 -0
  33. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-modal-fallback.ts +15 -0
  34. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-payload-transport.ts +23 -5
  35. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal.ts +320 -836
  36. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/vercel-sandbox.ts +1061 -0
  37. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/early-sandbox.ts +862 -0
  38. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/runtime-sandbox-reconciliation.ts +45 -0
  39. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/sandbox-create-outcome.ts +3 -1
  40. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/types.ts +11 -5
  41. package/dist/bundling-sources/shared_libs/play-runtime/runtime-sandbox-contract.ts +20 -2
  42. package/dist/bundling-sources/shared_libs/play-runtime/runtime-sandbox-placement-policy.ts +71 -34
  43. package/dist/bundling-sources/shared_libs/play-runtime/runtime-sandbox-provider-profile.ts +286 -0
  44. package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/contract.ts +4 -1
  45. package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/runner-backend-adapter.ts +12 -3
  46. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backend.ts +7 -0
  47. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +49 -55
  48. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-worker-required-env.ts +127 -5
  49. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd.ts +7 -1
  50. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/early-sandbox-lane.ts +214 -0
  51. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/managed-sandbox-resource-sql.ts +118 -0
  52. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-progress.ts +1 -0
  53. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +229 -144
  54. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-event-search.ts +2 -2
  55. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-capacity.ts +2 -1
  56. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-ledger-reconciliation.ts +11 -13
  57. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-operation.ts +42 -7
  58. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-worker-wake.ts +2 -1
  59. package/dist/bundling-sources/shared_libs/play-runtime/suspension.ts +2 -2
  60. package/dist/bundling-sources/shared_libs/play-runtime/tool-cache-policy.ts +17 -0
  61. package/dist/bundling-sources/shared_libs/play-runtime/vercel-sandbox-runtime-config.ts +217 -0
  62. package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +23 -0
  63. package/dist/bundling-sources/shared_libs/plays/bundling/index.ts +1 -0
  64. package/dist/bundling-sources/shared_libs/plays/script-entry.ts +76 -6
  65. package/dist/bundling-sources/shared_libs/plays/static-pipeline.ts +1 -0
  66. package/dist/bundling-sources/shared_libs/security/credential-revision.ts +50 -0
  67. package/dist/bundling-sources/shared_libs/security/internal-actor.ts +2 -1
  68. package/dist/bundling-sources/shared_libs/security/receipt-admission-token.ts +37 -0
  69. package/dist/cli/auth-ENBXAKQS.js +43 -0
  70. package/dist/cli/{auth-IGBGOB4E.mjs → auth-IMWJAHPU.mjs} +5 -5
  71. package/dist/cli/{billing-IB2TWE74.js → billing-Y55PR2PV.js} +101 -101
  72. package/dist/cli/{billing-N37W2I62.mjs → billing-YQMW3QJI.mjs} +12 -12
  73. package/dist/cli/chunk-22OBDYHP.js +455 -0
  74. package/dist/cli/{chunk-GBAT5NMI.mjs → chunk-2HSZCQMT.mjs} +48 -6
  75. package/dist/cli/{chunk-VLEVVDWG.js → chunk-2JHYYB3F.js} +3 -3
  76. package/dist/cli/{chunk-D44DP4KJ.js → chunk-3I26HMJ7.js} +37 -17
  77. package/dist/cli/{chunk-B5NP3SHX.mjs → chunk-3JDA23NN.mjs} +2 -2
  78. package/dist/cli/{chunk-QXNOSCYL.js → chunk-3KGMM4KS.js} +1 -1
  79. package/dist/cli/{chunk-6WQDHEVF.mjs → chunk-456RRXAP.mjs} +5 -5
  80. package/dist/cli/{chunk-V4EYJKGJ.js → chunk-4JQEAYN3.js} +156 -17
  81. package/dist/cli/{chunk-FGGPCAGC.js → chunk-4PKHFW56.js} +18 -18
  82. package/dist/cli/{chunk-QONO7FRF.mjs → chunk-57G4NYOL.mjs} +1 -1
  83. package/dist/cli/{chunk-46V7QSJE.mjs → chunk-5PR4VLLL.mjs} +3 -3
  84. package/dist/cli/{chunk-OLH2PHMC.mjs → chunk-6P7TGCHQ.mjs} +1 -1
  85. package/dist/cli/{chunk-AKY7KZRJ.js → chunk-7GNZEOTH.js} +6 -6
  86. package/dist/cli/{chunk-LFMQVSEI.js → chunk-7HMMTSDA.js} +5 -5
  87. package/dist/cli/{chunk-ORA5TMML.mjs → chunk-BEQ7RQLT.mjs} +5 -5
  88. package/dist/cli/{chunk-KQSTV4MW.js → chunk-BLYW6FFB.js} +60 -18
  89. package/dist/cli/{chunk-GM73TZ2W.js → chunk-C4P2KLWT.js} +41 -41
  90. package/dist/cli/{chunk-DNGACHFX.js → chunk-COJHT2KF.js} +22 -22
  91. package/dist/cli/{chunk-6SLEHAXX.js → chunk-DF2X7GJG.js} +5 -5
  92. package/dist/cli/{chunk-TT4JUUC3.mjs → chunk-DVDWAC2M.mjs} +7 -3
  93. package/dist/cli/{chunk-5CAVURVS.js → chunk-DYDHLBSK.js} +53 -53
  94. package/dist/cli/{chunk-UNDLNT3V.js → chunk-ECWOIXAV.js} +1 -1
  95. package/dist/cli/{chunk-EHLCWGWN.js → chunk-G26VJCNT.js} +4 -4
  96. package/dist/cli/{chunk-WL2GUGNZ.js → chunk-GQHRGBHV.js} +7 -7
  97. package/dist/cli/{chunk-DADH3WPE.mjs → chunk-GV45TTI6.mjs} +2 -2
  98. package/dist/cli/{chunk-OVX3Q5Q3.mjs → chunk-GWNYLIF7.mjs} +1 -1
  99. package/dist/cli/{chunk-EGOCGWCI.mjs → chunk-H4SAHB3Q.mjs} +3 -3
  100. package/dist/cli/{chunk-FX4OWXKK.mjs → chunk-HAQRF6DJ.mjs} +2 -2
  101. package/dist/cli/{chunk-NLZHLEHD.mjs → chunk-HBSWATOU.mjs} +6 -6
  102. package/dist/cli/{chunk-ACVTMAW4.mjs → chunk-HVJQF5BI.mjs} +2 -2
  103. package/dist/cli/{chunk-L2VKAASU.mjs → chunk-HXIR3VQL.mjs} +21 -0
  104. package/dist/cli/{chunk-Z5YRKX7K.mjs → chunk-HXM2JUGD.mjs} +1 -1
  105. package/dist/cli/{chunk-JPT6VE54.js → chunk-IFIJ4DBJ.js} +2 -2
  106. package/dist/cli/{chunk-HAITCPCG.js → chunk-JBWOE6AP.js} +16 -16
  107. package/dist/cli/{chunk-AWLPERL3.js → chunk-JWVG7ZPX.js} +3 -3
  108. package/dist/cli/{chunk-3XXXMSSP.js → chunk-KE6CSCUF.js} +44 -44
  109. package/dist/cli/{chunk-2ZGSHVZE.mjs → chunk-LPUBBUKX.mjs} +24 -4
  110. package/dist/cli/{chunk-PLIKPGOO.mjs → chunk-LQ6RRYXN.mjs} +5 -5
  111. package/dist/cli/{chunk-FFDZT255.mjs → chunk-LW274RO7.mjs} +1 -1
  112. package/dist/cli/{chunk-Z2XA6YU4.mjs → chunk-LX35AXTN.mjs} +1 -0
  113. package/dist/cli/{chunk-FANIRW74.mjs → chunk-NIPLY25A.mjs} +0 -2
  114. package/dist/cli/{chunk-VHJUH3TB.js → chunk-ON56ISO6.js} +3 -3
  115. package/dist/cli/{chunk-4I47NCRI.js → chunk-PDJ4UDCO.js} +498 -328
  116. package/dist/cli/{chunk-SWO5QOXB.mjs → chunk-PFGOCUH3.mjs} +1 -1
  117. package/dist/cli/{chunk-Q7WDXLYO.js → chunk-PKRW76XG.js} +2 -2
  118. package/dist/cli/{chunk-YK7NNZD4.mjs → chunk-PMW5YP72.mjs} +37 -190
  119. package/dist/cli/{chunk-5APOJWJF.mjs → chunk-Q7ZOWNKR.mjs} +183 -13
  120. package/dist/cli/{chunk-WACIN4PR.mjs → chunk-REEOMNCO.mjs} +3 -3
  121. package/dist/cli/{chunk-DMXLZ57N.js → chunk-RG34YBDE.js} +2 -2
  122. package/dist/cli/{chunk-3LEUSRV3.mjs → chunk-RJPDCSTD.mjs} +4 -4
  123. package/dist/cli/{chunk-IPVRMYWT.js → chunk-RKF263LR.js} +5 -5
  124. package/dist/cli/{chunk-AUFE624T.js → chunk-RUFR4PUO.js} +10 -10
  125. package/dist/cli/{chunk-I5EAIFGO.mjs → chunk-SK3HPU2J.mjs} +1 -1
  126. package/dist/cli/{chunk-ZVNYBQ77.mjs → chunk-SKS53WM6.mjs} +4 -4
  127. package/dist/cli/{chunk-CQDQNZGH.js → chunk-SL6MYJYM.js} +1 -0
  128. package/dist/cli/{chunk-E4CABWXL.js → chunk-TI6DTURF.js} +22 -1
  129. package/dist/cli/{chunk-CFZCRM6R.js → chunk-UHIAQPVA.js} +26 -26
  130. package/dist/cli/{chunk-D7GWEBMF.js → chunk-UNMNGRPB.js} +7 -7
  131. package/dist/cli/{chunk-GWHA4DAC.js → chunk-UV4RU2TE.js} +0 -2
  132. package/dist/cli/{chunk-TTBHOMAA.js → chunk-W7X4KH45.js} +316 -469
  133. package/dist/cli/chunk-WBSGPLH5.mjs +455 -0
  134. package/dist/cli/{chunk-SCLP5H4P.mjs → chunk-WUEORIOY.mjs} +1 -1
  135. package/dist/cli/{chunk-IDDKNMFX.mjs → chunk-Y3T5GWYK.mjs} +153 -14
  136. package/dist/cli/{chunk-P4MDTBAA.mjs → chunk-YIRVKMON.mjs} +1 -1
  137. package/dist/cli/{chunk-NDNEARE3.js → chunk-Z44YTSTA.js} +13 -13
  138. package/dist/cli/{chunk-F6QV42MC.mjs → chunk-Z7SXGOIQ.mjs} +1 -1
  139. package/dist/cli/{chunk-2VRKBHMD.mjs → chunk-ZHY4T5M6.mjs} +1 -1
  140. package/dist/cli/{chunk-E7B73LGT.js → chunk-ZY6FL4O4.js} +24 -20
  141. package/dist/cli/command-docs.js +3 -3
  142. package/dist/cli/command-docs.mjs +2 -2
  143. package/dist/cli/{concurrent-runs-help-DIBGMEIN.mjs → concurrent-runs-help-KBWPKSTP.mjs} +7 -7
  144. package/dist/cli/concurrent-runs-help-TOMLCMV7.js +21 -0
  145. package/dist/cli/{csv-CAVA3EMS.mjs → csv-M5EBEMZH.mjs} +4 -4
  146. package/dist/cli/{csv-XZAM7EYZ.js → csv-XGGDZTQI.js} +13 -13
  147. package/dist/cli/{db-PPGEOBNG.js → db-CVPR54XK.js} +29 -29
  148. package/dist/cli/{db-HD332QI7.mjs → db-M6FJ6J6E.mjs} +8 -8
  149. package/dist/cli/describe-RUODIS6M.js +50 -0
  150. package/dist/cli/describe-X6QA2U3C.mjs +50 -0
  151. package/dist/cli/describe-core.d.mts +3 -3
  152. package/dist/cli/describe-core.d.ts +3 -3
  153. package/dist/cli/describe-core.js +3 -3
  154. package/dist/cli/describe-core.mjs +2 -2
  155. package/dist/cli/{executions-AFEOLB4A.mjs → executions-EHTS2XJX.mjs} +8 -8
  156. package/dist/cli/{executions-4ZKBL7IC.js → executions-VJEEWN22.js} +10 -10
  157. package/dist/cli/{feedback-J2YPLKMF.mjs → feedback-76VGY4GP.mjs} +6 -6
  158. package/dist/cli/{feedback-M6Y33JKT.js → feedback-DQPUCUXO.js} +14 -14
  159. package/dist/cli/{git-632RYEF6.mjs → git-IY6DKKLR.mjs} +5 -5
  160. package/dist/cli/git-RLHTSYRY.js +25 -0
  161. package/dist/cli/index.js +150 -146
  162. package/dist/cli/index.mjs +49 -45
  163. package/dist/cli/integrations-242LE3TQ.mjs +98 -0
  164. package/dist/cli/integrations-CQSTIKFY.js +98 -0
  165. package/dist/cli/{legacy-noops-KWZMXYAU.mjs → legacy-noops-SWTSTMRY.mjs} +6 -6
  166. package/dist/cli/{legacy-noops-4Y62TKPC.js → legacy-noops-U72DO6ZF.js} +9 -9
  167. package/dist/cli/{mcp-PESLHAAC.mjs → mcp-JJH6JR52.mjs} +72 -15
  168. package/dist/cli/{mcp-35QA6YG7.js → mcp-L473BKLJ.js} +89 -32
  169. package/dist/cli/{monitors-4DTUZLAI.js → monitors-3TF2DOFD.js} +119 -104
  170. package/dist/cli/{monitors-YVBKBJBU.mjs → monitors-VSYHUBKC.mjs} +26 -11
  171. package/dist/cli/{org-DJNKMFCZ.mjs → org-S5VIKU2E.mjs} +8 -8
  172. package/dist/cli/{org-FWCBZMER.js → org-YKVI2ZTI.js} +90 -90
  173. package/dist/cli/{play-PHVQEEEZ.mjs → play-C7T5A3QM.mjs} +44 -25
  174. package/dist/cli/{play-FZ45M4KD.js → play-DOWEG45Y.js} +374 -355
  175. package/dist/cli/{providers-46E67QG7.mjs → providers-BMVVX3VD.mjs} +10 -9
  176. package/dist/cli/{providers-QJU6FMDD.js → providers-TAZPPFTB.js} +13 -12
  177. package/dist/cli/{quickstart-6HMJJ4RR.mjs → quickstart-A3WKMKTW.mjs} +4 -4
  178. package/dist/cli/{quickstart-HOL7H5FS.js → quickstart-HD6FQXGR.js} +6 -6
  179. package/dist/cli/{run-WKSIRXEC.js → run-BVVV2UX7.js} +49 -48
  180. package/dist/cli/{run-2W2TJ6QA.mjs → run-FV7TWNOC.mjs} +28 -27
  181. package/dist/cli/{search-Y2CFLSYB.mjs → search-MGK6WIKS.mjs} +9 -9
  182. package/dist/cli/search-VJFCWUZN.js +32 -0
  183. package/dist/cli/{search-output-2IK6ZZDY.js → search-output-6Y7KEPIE.js} +6 -6
  184. package/dist/cli/{search-output-FCZ35PHF.mjs → search-output-GM7LDZKE.mjs} +4 -4
  185. package/dist/cli/{secrets-PNPNUZLX.mjs → secrets-4RFAR7YI.mjs} +8 -8
  186. package/dist/cli/{secrets-JVJIHGU4.js → secrets-SISXIXSZ.js} +17 -17
  187. package/dist/cli/{sessions-GY5VVQGO.mjs → sessions-CE3OMEG7.mjs} +6 -6
  188. package/dist/cli/sessions-OWWZJZXH.js +22 -0
  189. package/dist/cli/{settings-5WHMFRNQ.js → settings-4HPM3K4A.js} +89 -89
  190. package/dist/cli/{settings-YQOPF3AI.mjs → settings-E22IDSX2.mjs} +16 -16
  191. package/dist/cli/{setup-3VJMKDEU.js → setup-BDRSNLKX.js} +49 -49
  192. package/dist/cli/{setup-O5U5IEVW.mjs → setup-BK65MDZ6.mjs} +9 -9
  193. package/dist/cli/{skills-G6J5PF35.mjs → skills-FI2GZMR4.mjs} +7 -7
  194. package/dist/cli/skills-ZLBFUAFR.js +36 -0
  195. package/dist/cli/tools-3K72VE33.js +57 -0
  196. package/dist/cli/{tools-AG7SWL5Y.mjs → tools-HMMWYUNW.mjs} +20 -19
  197. package/dist/cli/update-QZV6DH5V.js +34 -0
  198. package/dist/cli/{update-K73DD6CR.mjs → update-WDKBSXV5.mjs} +9 -9
  199. package/dist/cli/{views-4D2OTLIO.js → views-775AUDWQ.js} +23 -23
  200. package/dist/cli/{views-MO6DIOMR.mjs → views-JYIJCO23.mjs} +8 -8
  201. package/dist/cli/{workflow-ZEMFCS4Y.js → workflow-4H6KQRFQ.js} +19 -19
  202. package/dist/cli/{workflow-MMZMAELI.mjs → workflow-FKKHE3IU.mjs} +9 -9
  203. package/dist/{client-DLG9mHDh.d.mts → client-ANT3pyoa.d.mts} +1 -1
  204. package/dist/{client-X-FJD5Dp.d.ts → client-DD_FyJVd.d.ts} +1 -1
  205. package/dist/{client-core-WtnqyBwY.d.mts → client-core-Dg9tKhdB.d.mts} +339 -3
  206. package/dist/{client-core-0jmHfFBv.d.ts → client-core-QHmo73k1.d.ts} +339 -3
  207. package/dist/{compiler-manifest-Cys06iYg.d.mts → compiler-manifest-BWFtsQIC.d.mts} +21 -0
  208. package/dist/{compiler-manifest-Cys06iYg.d.ts → compiler-manifest-BWFtsQIC.d.ts} +21 -0
  209. package/dist/{errors-B6eMjKcr.d.mts → errors-CwKXXtuu.d.mts} +1 -1
  210. package/dist/{errors-rdOUqcU2.d.ts → errors-Lm9_vJHZ.d.ts} +1 -1
  211. package/dist/{index-ejWadAL5.d.ts → index-3vJ-V9yw.d.ts} +1 -1
  212. package/dist/{index-CZdYO81A.d.mts → index-DjwsAt82.d.mts} +1 -1
  213. package/dist/index.d.mts +7 -7
  214. package/dist/index.d.ts +7 -7
  215. package/dist/index.js +12 -12
  216. package/dist/index.mjs +8 -8
  217. package/dist/install-integrity.json +147 -133
  218. package/dist/plays/bundle-play-file.d.mts +3 -3
  219. package/dist/plays/bundle-play-file.d.ts +3 -3
  220. package/dist/plays/bundle-play-file.mjs +23 -4
  221. package/dist/plays/play-description.d.mts +2 -2
  222. package/dist/plays/play-description.d.ts +2 -2
  223. package/dist/plays/run-request.d.mts +2 -2
  224. package/dist/plays/run-request.d.ts +2 -2
  225. package/dist/plays/run-request.js +2 -2
  226. package/dist/plays/run-request.mjs +1 -1
  227. package/dist/release.d.mts +1 -1
  228. package/dist/release.d.ts +1 -1
  229. package/dist/release.js +2 -2
  230. package/dist/release.mjs +1 -1
  231. package/dist/server.d.mts +4 -4
  232. package/dist/server.d.ts +4 -4
  233. package/dist/server.js +7 -7
  234. package/dist/server.mjs +5 -5
  235. package/package.json +1 -1
  236. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal-resource-usage.ts +0 -222
  237. package/dist/cli/auth-2PH6RSKL.js +0 -43
  238. package/dist/cli/concurrent-runs-help-BNIDBKML.js +0 -21
  239. package/dist/cli/describe-5TFFB2PM.js +0 -49
  240. package/dist/cli/describe-THQU7N47.mjs +0 -49
  241. package/dist/cli/git-AQLQYWRI.js +0 -25
  242. package/dist/cli/search-YLJFCJTK.js +0 -32
  243. package/dist/cli/sessions-TZ33UCPS.js +0 -22
  244. package/dist/cli/skills-WZY3XDT3.js +0 -36
  245. package/dist/cli/tools-BXQBL72Q.js +0 -56
  246. package/dist/cli/update-XYP5EII6.js +0 -34
@@ -0,0 +1,214 @@
1
+ import {
2
+ normalizePlayRuntimeBackend,
3
+ type PlayRuntimeBackendId,
4
+ } from '../backend';
5
+ import { modalEarlySandboxAdapter } from '../runner-backends/backends/modal';
6
+ import {
7
+ EARLY_SANDBOX_START,
8
+ EARLY_SANDBOX_SWEEP_INTERVAL_MS,
9
+ PREBOOT_RUNNER_IN_EARLY_SANDBOX,
10
+ startEarlySandbox,
11
+ type EarlySandboxAdapter,
12
+ type EarlySandboxStartRequest,
13
+ type EarlySandboxSwitches,
14
+ } from '../runner-backends/early-sandbox';
15
+ import { resolveExperimentSwitch } from '../experiment-switches';
16
+ import type { FleetSandboxSweepAdapter } from '../fleet-sandbox-sweep';
17
+ import {
18
+ runtimeSandboxProviderProfile,
19
+ type RuntimeSandboxProviderId,
20
+ } from '../runtime-sandbox-provider-profile';
21
+ import { assertEarlySandboxLaneSupported } from './absurd-worker-required-env';
22
+ import { CLAIM_AFFINITY_FOR_EARLY_SANDBOX } from './early-sandbox-claim-affinity';
23
+
24
+ /**
25
+ * Early-sandbox Adapter selection for a worker lane. The Runtime Sandbox
26
+ * Provider Profile says which providers support early start, pre-boot and
27
+ * claim affinity; this map says which Adapter implements it. Modal is the
28
+ * only one: Daytona declares all three unsupported, and a lane that would
29
+ * place on it refuses the switches loudly instead of starting a sandbox no
30
+ * launch on that lane adopts.
31
+ */
32
+ export const EARLY_SANDBOX_ADAPTERS: Readonly<
33
+ Partial<Record<RuntimeSandboxProviderId, EarlySandboxAdapter>>
34
+ > = {
35
+ modal: modalEarlySandboxAdapter,
36
+ };
37
+
38
+ export class EarlySandboxAdapterSelectionError extends Error {
39
+ constructor(message: string) {
40
+ super(message);
41
+ this.name = 'EarlySandboxAdapterSelectionError';
42
+ }
43
+ }
44
+
45
+ /** A hinted run's early-sandbox switches (E2, PB, CA). */
46
+ export function resolveRunEarlySandboxSwitches(
47
+ overrides: EarlySandboxStartRequest['experimentSwitchOverrides'],
48
+ ): EarlySandboxSwitches {
49
+ return {
50
+ earlyStart: resolveExperimentSwitch('E2', overrides, EARLY_SANDBOX_START),
51
+ preboot: resolveExperimentSwitch(
52
+ 'PB',
53
+ overrides,
54
+ PREBOOT_RUNNER_IN_EARLY_SANDBOX,
55
+ ),
56
+ claimAffinity: resolveExperimentSwitch(
57
+ 'CA',
58
+ overrides,
59
+ CLAIM_AFFINITY_FOR_EARLY_SANDBOX,
60
+ ),
61
+ };
62
+ }
63
+
64
+ /**
65
+ * The Adapter this lane starts a run's early sandbox with. Throws
66
+ * `RuntimeSandboxCapabilityUnsupportedError` when a lane provider's profile
67
+ * lacks a capability the switches need, and
68
+ * `EarlySandboxAdapterSelectionError` when the lane's providers do not name
69
+ * exactly one implemented Adapter.
70
+ */
71
+ export function selectEarlySandboxAdapter(input: {
72
+ backend: PlayRuntimeBackendId;
73
+ env: Readonly<Record<string, string | undefined>>;
74
+ switches: EarlySandboxSwitches;
75
+ adapters?: Readonly<
76
+ Partial<Record<RuntimeSandboxProviderId, EarlySandboxAdapter>>
77
+ >;
78
+ }): EarlySandboxAdapter {
79
+ const subject = `Early sandbox on the ${input.backend} worker lane`;
80
+ const providers = assertEarlySandboxLaneSupported({
81
+ subject,
82
+ backend: input.backend,
83
+ env: input.env,
84
+ switches: input.switches,
85
+ });
86
+ const [provider, ...others] = providers;
87
+ if (!provider || others.length > 0) {
88
+ throw new EarlySandboxAdapterSelectionError(
89
+ `${subject} needs exactly one lead provider; the lane has ${
90
+ providers.length === 0 ? 'none' : providers.join(', ')
91
+ }.`,
92
+ );
93
+ }
94
+ // The profile says it is supported; an Adapter must then exist.
95
+ const adapter = (input.adapters ?? EARLY_SANDBOX_ADAPTERS)[provider];
96
+ if (!adapter) {
97
+ throw new EarlySandboxAdapterSelectionError(
98
+ `${subject}: ${provider} declares early start supported but has no early-sandbox Adapter.`,
99
+ );
100
+ }
101
+ return adapter;
102
+ }
103
+
104
+ /**
105
+ * The worker's early-sandbox hint handler: with E2 off for the run it does
106
+ * nothing (no lane read, no provider call, as before). Otherwise it selects
107
+ * the lane's Adapter, refusing loudly (logged, hint not started) when the
108
+ * lane's providers do not support the run's switches.
109
+ */
110
+ export function startWorkerLaneEarlySandbox(
111
+ input: EarlySandboxStartRequest & {
112
+ env?: Readonly<Record<string, string | undefined>>;
113
+ adapters?: Readonly<
114
+ Partial<Record<RuntimeSandboxProviderId, EarlySandboxAdapter>>
115
+ >;
116
+ },
117
+ ): boolean {
118
+ const switches = resolveRunEarlySandboxSwitches(
119
+ input.experimentSwitchOverrides,
120
+ );
121
+ if (!switches.earlyStart) return false;
122
+ const env = input.env ?? process.env;
123
+ const backend = normalizePlayRuntimeBackend(
124
+ env.DEEPLINE_PLAY_RUNNER_BACKEND?.trim() || 'daytona',
125
+ );
126
+ let adapter: EarlySandboxAdapter;
127
+ try {
128
+ adapter = selectEarlySandboxAdapter({
129
+ backend,
130
+ env,
131
+ switches,
132
+ ...(input.adapters ? { adapters: input.adapters } : {}),
133
+ });
134
+ } catch (error) {
135
+ console.error(
136
+ JSON.stringify({
137
+ event: 'play-runner.early.selection_refused',
138
+ backend,
139
+ workflowId: input.workflowId,
140
+ errorName: error instanceof Error ? error.name : null,
141
+ error: error instanceof Error ? error.message : String(error),
142
+ }),
143
+ );
144
+ return false;
145
+ }
146
+ return startEarlySandbox(adapter, {
147
+ workflowId: input.workflowId,
148
+ orgId: input.orgId ?? null,
149
+ runtimeSchedulerSchema: input.runtimeSchedulerSchema,
150
+ experimentSwitchOverrides: input.experimentSwitchOverrides ?? null,
151
+ });
152
+ }
153
+
154
+ /**
155
+ * The early-sandbox Adapters whose orphans a worker lane sweeps: one per
156
+ * cleanup provider whose profile supports early start.
157
+ */
158
+ export function earlySandboxSweepAdapters(
159
+ providers: readonly RuntimeSandboxProviderId[] | undefined,
160
+ adapters: Readonly<
161
+ Partial<Record<RuntimeSandboxProviderId, EarlySandboxAdapter>>
162
+ > = EARLY_SANDBOX_ADAPTERS,
163
+ ): EarlySandboxAdapter[] {
164
+ return (providers ?? []).flatMap((provider) => {
165
+ const adapter = adapters[provider];
166
+ return adapter &&
167
+ runtimeSandboxProviderProfile(provider).capabilities.earlyStart.supported
168
+ ? [adapter]
169
+ : [];
170
+ });
171
+ }
172
+
173
+ /**
174
+ * The Fleet Sandbox Sweep Adapter for one provider's early-sandbox orphan
175
+ * sweep. It sweeps only unadopted early sandboxes: they are created before
176
+ * any run row exists, so their create tags are the cleanup obligation. Every
177
+ * other sandbox is owned by durable cleanup, so this scope needs no
178
+ * `orphanEnumeration`.
179
+ *
180
+ * Enumeration, the age check, and confirmed termination stay in the
181
+ * early-sandbox Adapter's `sweepOrphansForWorker`; this only plugs it into the
182
+ * shared cadence, single flight and failure isolation. Each runtime worker
183
+ * runs it from its sandbox cleanup controller, scoped to its lane.
184
+ */
185
+ export function earlySandboxFleetSweepAdapter(input: {
186
+ adapter: EarlySandboxAdapter;
187
+ runtimeSchedulerSchema: string | null;
188
+ /** The cleanup controller's rate-limited reconciliation failure logger. */
189
+ reportFailure: (message: string, detail: Record<string, unknown>) => void;
190
+ }): FleetSandboxSweepAdapter {
191
+ const provider = input.adapter.provider;
192
+ return {
193
+ provider,
194
+ scope: 'unadopted_early_sandboxes',
195
+ intervalMs: EARLY_SANDBOX_SWEEP_INTERVAL_MS,
196
+ async runPass() {
197
+ const outcome = await input.adapter.sweepOrphansForWorker({
198
+ runtimeSchedulerSchema: input.runtimeSchedulerSchema,
199
+ });
200
+ if ('observed' in outcome && outcome.observed > 0) {
201
+ console.info(
202
+ `[absurd-runtime.worker] early_${provider}_sandbox_sweep_observed`,
203
+ outcome,
204
+ );
205
+ }
206
+ },
207
+ reportPassFailure(error) {
208
+ input.reportFailure(
209
+ `[absurd-runtime.worker] early_${provider}_sandbox_sweep_failed`,
210
+ { error: error instanceof Error ? error.message : String(error) },
211
+ );
212
+ },
213
+ };
214
+ }
@@ -0,0 +1,118 @@
1
+ /**
2
+ * SQL fragments for managed-sandbox resource facts in `attempts.resource_json`.
3
+ *
4
+ * One owner for which resource kinds are managed sandboxes and how a kind maps
5
+ * to its provider and routing domain, so the scheduler's cleanup, custody,
6
+ * settlement and reconciliation queries cannot disagree. A provider joins these
7
+ * queries by joining this list, after its scheduler tables admit it.
8
+ *
9
+ * Every value here is a code-owned constant; nothing is caller input.
10
+ */
11
+
12
+ type ManagedSandboxResourceKind = Readonly<{
13
+ kind: string;
14
+ provider: string;
15
+ /** Resource field holding the provider's stable ownership domain. */
16
+ routingDomainField: string;
17
+ /**
18
+ * Opens a compute billing job at terminal. Set only once the provider's
19
+ * compute item is priced (its Provider Profile's `computeBilling`).
20
+ */
21
+ computeBilled: boolean;
22
+ }>;
23
+
24
+ export const MANAGED_SANDBOX_RESOURCE_KINDS = [
25
+ {
26
+ kind: 'daytona_sandbox',
27
+ provider: 'daytona',
28
+ routingDomainField: 'daytonaOrganizationId',
29
+ computeBilled: true,
30
+ },
31
+ {
32
+ kind: 'modal_sandbox',
33
+ provider: 'modal',
34
+ routingDomainField: 'modalAppId',
35
+ computeBilled: true,
36
+ },
37
+ {
38
+ kind: 'vercel_sandbox',
39
+ provider: 'vercel',
40
+ routingDomainField: 'vercelProjectId',
41
+ // No approved Vercel Sandbox compute price: cleaned up, never billed.
42
+ computeBilled: false,
43
+ },
44
+ ] as const satisfies readonly ManagedSandboxResourceKind[];
45
+
46
+ function sqlLiteral(value: string): string {
47
+ return `'${value.replace(/'/g, "''")}'`;
48
+ }
49
+
50
+ /** `('daytona_sandbox', 'modal_sandbox')`, for `<kind> IN ${...}`. */
51
+ export const MANAGED_SANDBOX_RESOURCE_KIND_LIST_SQL = `(${MANAGED_SANDBOX_RESOURCE_KINDS.map(
52
+ (entry) => sqlLiteral(entry.kind),
53
+ ).join(', ')})`;
54
+
55
+ /**
56
+ * Managed-sandbox kinds that open a compute billing job. A provider joins only
57
+ * once its compute item is priced (its Provider Profile's `computeBilling`);
58
+ * until then its sandboxes are cleaned up and reconciled but never billed.
59
+ * The `enqueue_terminal_compute_billing_job` trigger body repeats this list
60
+ * literally; change both together.
61
+ */
62
+ export const COMPUTE_BILLED_SANDBOX_RESOURCE_KIND_LIST_SQL = `(${MANAGED_SANDBOX_RESOURCE_KINDS.filter(
63
+ (entry) => entry.computeBilled,
64
+ )
65
+ .map((entry) => sqlLiteral(entry.kind))
66
+ .join(', ')})`;
67
+
68
+ /**
69
+ * The provider of a managed-sandbox kind expression. NULL for any other kind:
70
+ * callers select managed kinds first, and a kind this list does not know must
71
+ * never be routed as some other provider.
72
+ */
73
+ export function managedSandboxProviderSql(kindExpression: string): string {
74
+ return `(CASE ${kindExpression} ${MANAGED_SANDBOX_RESOURCE_KINDS.map(
75
+ (entry) =>
76
+ `WHEN ${sqlLiteral(entry.kind)} THEN ${sqlLiteral(entry.provider)}`,
77
+ ).join(' ')} END)`;
78
+ }
79
+
80
+ /**
81
+ * The routing domain of a managed-sandbox resource, `NULLIF(..., '')` of its
82
+ * provider's ownership field. `resourceExpression` is a jsonb resource.
83
+ */
84
+ export function managedSandboxRoutingDomainSql(
85
+ resourceExpression: string,
86
+ ): string {
87
+ return `(CASE ${resourceExpression}->>'kind' ${MANAGED_SANDBOX_RESOURCE_KINDS.map(
88
+ (entry) =>
89
+ `WHEN ${sqlLiteral(entry.kind)} THEN NULLIF(${resourceExpression}->>${sqlLiteral(entry.routingDomainField)}, '')`,
90
+ ).join(' ')} END)`;
91
+ }
92
+
93
+ /**
94
+ * The routing domain of a resource whose provider is already known as the
95
+ * text expression `providerExpression` (for example a query parameter).
96
+ */
97
+ export function managedSandboxRoutingDomainForProviderSql(
98
+ providerExpression: string,
99
+ resourceExpression: string,
100
+ ): string {
101
+ return `(CASE ${providerExpression} ${MANAGED_SANDBOX_RESOURCE_KINDS.map(
102
+ (entry) =>
103
+ `WHEN ${sqlLiteral(entry.provider)} THEN NULLIF(${resourceExpression}->>${sqlLiteral(entry.routingDomainField)}, '')`,
104
+ ).join(' ')} END)`;
105
+ }
106
+
107
+ /**
108
+ * The resource kind of a provider text expression. NULL for a provider this
109
+ * list does not know, so it never matches some other provider's resource.
110
+ */
111
+ export function managedSandboxKindForProviderSql(
112
+ providerExpression: string,
113
+ ): string {
114
+ return `(CASE ${providerExpression} ${MANAGED_SANDBOX_RESOURCE_KINDS.map(
115
+ (entry) =>
116
+ `WHEN ${sqlLiteral(entry.provider)} THEN ${sqlLiteral(entry.kind)}`,
117
+ ).join(' ')} END)`;
118
+ }
@@ -2117,6 +2117,7 @@ export async function collectGatewayRunnerTerminalProgressLedgerEvents(input: {
2117
2117
  ...(event.failedRows === undefined ? {} : { failedRows: event.failedRows }),
2118
2118
  ...(event.complete === undefined ? {} : { complete: event.complete }),
2119
2119
  ...(event.bornFrom === undefined ? {} : { bornFrom: event.bornFrom }),
2120
+ ...(event.columns === undefined ? {} : { columns: event.columns }),
2120
2121
  }));
2121
2122
  const activityEvents: PlayRunLedgerEvent[] = (
2122
2123
  finalUpdate.activityObservations ?? []