deepline 0.3.552 → 0.3.553

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (319) hide show
  1. package/dist/bundling-sources/sdk/src/client-core.ts +107 -12
  2. package/dist/bundling-sources/sdk/src/compat.ts +239 -87
  3. package/dist/bundling-sources/sdk/src/config.ts +113 -2
  4. package/dist/bundling-sources/sdk/src/errors.ts +2 -0
  5. package/dist/bundling-sources/sdk/src/http-core.ts +118 -8
  6. package/dist/bundling-sources/sdk/src/index.ts +2 -0
  7. package/dist/bundling-sources/sdk/src/integrations.ts +6 -4
  8. package/dist/bundling-sources/sdk/src/play.ts +3 -0
  9. package/dist/bundling-sources/sdk/src/plays/run-request.ts +1 -1
  10. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  11. package/dist/bundling-sources/sdk/src/runs/watch-polling.ts +8 -1
  12. package/dist/bundling-sources/sdk/src/tool-calls.ts +2 -1
  13. package/dist/bundling-sources/sdk/src/tool-failure-hint.ts +104 -0
  14. package/dist/bundling-sources/sdk/src/types.ts +9 -1
  15. package/dist/bundling-sources/shared_libs/integration-contracts/billing-entitlements.ts +4 -2
  16. package/dist/bundling-sources/shared_libs/integration-contracts/billing-plan-skus.ts +25 -0
  17. package/dist/bundling-sources/shared_libs/monitors/action-actor.ts +2 -0
  18. package/dist/bundling-sources/shared_libs/monitors/billing/credit-recovery.ts +58 -4
  19. package/dist/bundling-sources/shared_libs/monitors/billing/policy-builders.ts +8 -0
  20. package/dist/bundling-sources/shared_libs/monitors/billing/pricing.ts +11 -0
  21. package/dist/bundling-sources/shared_libs/monitors/billing/types.ts +13 -0
  22. package/dist/bundling-sources/shared_libs/monitors/deactivation-reasons.ts +103 -5
  23. package/dist/bundling-sources/shared_libs/monitors/fleets/converge-admission.ts +133 -0
  24. package/dist/bundling-sources/shared_libs/monitors/fleets/fence-attention.ts +165 -0
  25. package/dist/bundling-sources/shared_libs/monitors/fleets/fence-release.ts +726 -0
  26. package/dist/bundling-sources/shared_libs/monitors/fleets/fence-walk.ts +274 -0
  27. package/dist/bundling-sources/shared_libs/monitors/fleets/issues.ts +1 -0
  28. package/dist/bundling-sources/shared_libs/monitors/fleets/limits.ts +28 -0
  29. package/dist/bundling-sources/shared_libs/monitors/fleets/provider-bulk-wait.ts +126 -0
  30. package/dist/bundling-sources/shared_libs/monitors/fleets/shared-payload.ts +189 -0
  31. package/dist/bundling-sources/shared_libs/monitors/http-error-response.ts +28 -0
  32. package/dist/bundling-sources/shared_libs/monitors/inbound-publish-key.ts +4 -0
  33. package/dist/bundling-sources/shared_libs/monitors/inventory-counter-errors.ts +25 -0
  34. package/dist/bundling-sources/shared_libs/monitors/org-monitor-limits.ts +65 -0
  35. package/dist/bundling-sources/shared_libs/monitors/package.json +9 -0
  36. package/dist/bundling-sources/shared_libs/monitors/provider-callback-verification.ts +152 -1
  37. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-batch-operation.ts +6 -0
  38. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-capability.ts +390 -10
  39. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-errors.ts +34 -0
  40. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-identity-claims.ts +66 -30
  41. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-state.ts +30 -0
  42. package/dist/bundling-sources/shared_libs/monitors/provider-resource-failure.ts +26 -3
  43. package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-dead-letter.ts +41 -13
  44. package/dist/bundling-sources/shared_libs/monitors/signal-radars/raw-receipt-causes.ts +219 -0
  45. package/dist/bundling-sources/shared_libs/monitors/snitcher-ip2company.ts +21 -10
  46. package/dist/bundling-sources/shared_libs/monitors/starter-templates.ts +13 -0
  47. package/dist/bundling-sources/shared_libs/monitors/tracking-provider-guidance.ts +6 -0
  48. package/dist/bundling-sources/shared_libs/monitors/tracking-provider-integrations.ts +13 -0
  49. package/dist/bundling-sources/shared_libs/observability/dlq.ts +1 -1
  50. package/dist/bundling-sources/shared_libs/observability/log-metadata.ts +5 -3
  51. package/dist/bundling-sources/shared_libs/observability/queue-health.ts +10 -1
  52. package/dist/bundling-sources/shared_libs/observability/queue-item-connectors.ts +1 -0
  53. package/dist/bundling-sources/shared_libs/observability/redaction.ts +24 -1
  54. package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +168 -41
  55. package/dist/bundling-sources/shared_libs/observability/scheduled-work-manual.ts +1 -2
  56. package/dist/bundling-sources/shared_libs/play-data-plane/preview-r2-oidc.ts +188 -0
  57. package/dist/bundling-sources/shared_libs/play-data-plane/r2.ts +170 -16
  58. package/dist/bundling-sources/shared_libs/play-data-plane/runtime-sheet-storage-contract.ts +5 -0
  59. package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +68 -2
  60. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +444 -39
  61. package/dist/bundling-sources/shared_libs/play-runtime/ctx-fetch-caller-deadline.ts +200 -0
  62. package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +6 -0
  63. package/dist/bundling-sources/shared_libs/play-runtime/deployment/runtime-topology.ts +21 -1
  64. package/dist/bundling-sources/shared_libs/play-runtime/durable-call-cache.ts +3 -2
  65. package/dist/bundling-sources/shared_libs/play-runtime/durable-summary-events.ts +70 -2
  66. package/dist/bundling-sources/shared_libs/play-runtime/durable-tool-identity.ts +3 -3
  67. package/dist/bundling-sources/shared_libs/play-runtime/execution-capabilities.ts +16 -0
  68. package/dist/bundling-sources/shared_libs/play-runtime/experiment-switches.ts +72 -0
  69. package/dist/bundling-sources/shared_libs/play-runtime/fixture-behavior.ts +1 -0
  70. package/dist/bundling-sources/shared_libs/play-runtime/governor/policy.ts +7 -1
  71. package/dist/bundling-sources/shared_libs/play-runtime/internal-bootstrap-token.ts +62 -0
  72. package/dist/bundling-sources/shared_libs/play-runtime/map-memory-limits.ts +74 -3
  73. package/dist/bundling-sources/shared_libs/play-runtime/output-size-limits.ts +31 -3
  74. package/dist/bundling-sources/shared_libs/play-runtime/play-http-request.ts +6 -0
  75. package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +8 -0
  76. package/dist/bundling-sources/shared_libs/play-runtime/query-result-dataset.ts +19 -0
  77. package/dist/bundling-sources/shared_libs/play-runtime/resource-governor.ts +39 -2
  78. package/dist/bundling-sources/shared_libs/play-runtime/run-failure.ts +9 -1
  79. package/dist/bundling-sources/shared_libs/play-runtime/run-identity.ts +33 -0
  80. package/dist/bundling-sources/shared_libs/play-runtime/run-ledger-projection-contract.ts +24 -0
  81. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +254 -44
  82. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-payload-transport.ts +87 -6
  83. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal.ts +241 -10
  84. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/early-sandbox-egress.ts +161 -14
  85. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/early-sandbox.ts +16 -3
  86. package/dist/bundling-sources/shared_libs/play-runtime/runtime-api-compression.ts +37 -0
  87. package/dist/bundling-sources/shared_libs/play-runtime/runtime-api-paths.ts +9 -0
  88. package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +259 -52
  89. package/dist/bundling-sources/shared_libs/play-runtime/runtime-authority.ts +13 -0
  90. package/dist/bundling-sources/shared_libs/play-runtime/runtime-constants.ts +30 -0
  91. package/dist/bundling-sources/shared_libs/play-runtime/runtime-operation-contract.ts +62 -1
  92. package/dist/bundling-sources/shared_libs/play-runtime/runtime-scheduler-topology.ts +36 -0
  93. package/dist/bundling-sources/shared_libs/play-runtime/runtime-sheet-row-transition.ts +36 -0
  94. package/dist/bundling-sources/shared_libs/play-runtime/runtime-speed-profile.ts +206 -2
  95. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-pool.ts +42 -0
  96. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +185 -64
  97. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-worker-slot-ledger.ts +157 -0
  98. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/early-sandbox-lane.ts +110 -2
  99. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/early-sandbox-listener-hint.ts +323 -0
  100. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/executor-attempt-standing.ts +72 -0
  101. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/integration-operation-value-storage.ts +23 -4
  102. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-workspace-purge.ts +199 -0
  103. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +632 -66
  104. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-outbox-recovery.ts +517 -16
  105. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-api-origin.ts +1 -1
  106. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-receipt-value-storage.ts +9 -0
  107. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-worker-wake.ts +599 -2
  108. package/dist/bundling-sources/shared_libs/play-runtime/secret-resolution-retry-policy.ts +26 -1
  109. package/dist/bundling-sources/shared_libs/play-runtime/startup-read-tool-ids.ts +60 -0
  110. package/dist/bundling-sources/shared_libs/play-runtime/test-runtime-seams.ts +51 -0
  111. package/dist/bundling-sources/shared_libs/play-runtime/tool-call-retry-facts.ts +2 -0
  112. package/dist/bundling-sources/shared_libs/play-runtime/tool-execute-retry-policy.ts +113 -3
  113. package/dist/bundling-sources/shared_libs/play-runtime/tool-http-errors.ts +5 -7
  114. package/dist/bundling-sources/shared_libs/play-runtime/work-receipt-storage-contract.ts +2 -0
  115. package/dist/bundling-sources/shared_libs/play-runtime/workflow-executor-auth.ts +3 -0
  116. package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +40 -5
  117. package/dist/bundling-sources/shared_libs/plays/deploy/api-client.ts +3 -0
  118. package/dist/bundling-sources/shared_libs/plays/deploy/control-plane-types.ts +16 -0
  119. package/dist/bundling-sources/shared_libs/plays/deploy/run-deployment.ts +10 -41
  120. package/dist/bundling-sources/shared_libs/plays/extension-bridge.ts +33 -0
  121. package/dist/bundling-sources/shared_libs/plays/row-identity.ts +18 -1
  122. package/dist/bundling-sources/shared_libs/plays/tool-execution-error.ts +108 -0
  123. package/dist/bundling-sources/shared_libs/plays/trigger-config-contract.ts +14 -0
  124. package/dist/bundling-sources/shared_libs/product-notifications/catalog.ts +171 -0
  125. package/dist/bundling-sources/shared_libs/product-notifications/events.ts +27 -1
  126. package/dist/bundling-sources/shared_libs/security/email-blacklist.ts +9 -24
  127. package/dist/bundling-sources/shared_libs/security/secret-redaction.ts +178 -5
  128. package/dist/bundling-sources/shared_libs/security/signup-email-dns-screen.ts +148 -0
  129. package/dist/bundling-sources/shared_libs/tool-execution-error.ts +108 -0
  130. package/dist/cli/{auth-KVSBJZOX.mjs → auth-I3QAU4RV.mjs} +8 -7
  131. package/dist/cli/auth-MQCN7WGZ.js +44 -0
  132. package/dist/cli/{billing-54RHFEBI.mjs → billing-3IC54OQQ.mjs} +197 -61
  133. package/dist/cli/{billing-FQREA7UA.js → billing-YGFFVAIC.js} +297 -161
  134. package/dist/cli/{chunk-4MK42735.js → chunk-2B5B5KAW.js} +210 -128
  135. package/dist/cli/{chunk-UBKA33KY.mjs → chunk-2MGZAI54.mjs} +17 -0
  136. package/dist/cli/{chunk-4NQF6KJ3.js → chunk-3NTP2OSG.js} +13 -13
  137. package/dist/cli/{chunk-HYC4MKGK.mjs → chunk-45OAVGU6.mjs} +5 -5
  138. package/dist/cli/{chunk-WLN3SUIA.js → chunk-4747TPLV.js} +3 -3
  139. package/dist/cli/{chunk-AZQ264ID.mjs → chunk-4BFTDNHU.mjs} +1 -1
  140. package/dist/cli/{chunk-BGBJV26E.mjs → chunk-4HYNMXXF.mjs} +4 -4
  141. package/dist/cli/{chunk-DJ2JDK4O.mjs → chunk-4SMCFQ23.mjs} +1 -1
  142. package/dist/cli/{chunk-QPKH23EC.mjs → chunk-55F6HNOY.mjs} +5 -5
  143. package/dist/cli/{chunk-LX35AXTN.mjs → chunk-5TYLSS4Q.mjs} +6 -6
  144. package/dist/cli/{chunk-634ZDA3F.js → chunk-6NE3RRRY.js} +1 -1
  145. package/dist/cli/{chunk-EITMD3A5.js → chunk-6VLFQZK6.js} +8 -8
  146. package/dist/cli/{chunk-EOPEYCY7.mjs → chunk-72V4PDH5.mjs} +18 -18
  147. package/dist/cli/{chunk-IHRKLXZN.js → chunk-74RES4DS.js} +5 -5
  148. package/dist/cli/{chunk-45PVGZST.js → chunk-7GEMELKI.js} +366 -320
  149. package/dist/cli/{chunk-4UUR4TCH.js → chunk-7O6J6A7P.js} +1871 -92
  150. package/dist/cli/{chunk-XVB7V4N7.js → chunk-7SERLBNR.js} +161 -53
  151. package/dist/cli/{chunk-F2LH7TGF.js → chunk-7YRJ5UC4.js} +21 -21
  152. package/dist/cli/{chunk-YJHE3O5M.mjs → chunk-A7DLBE5K.mjs} +136 -54
  153. package/dist/cli/{chunk-6PRW5UBA.mjs → chunk-AGICYWGN.mjs} +299 -69
  154. package/dist/cli/{chunk-S5S355UY.mjs → chunk-AGIQDA2T.mjs} +12 -12
  155. package/dist/cli/{chunk-RBEUVDZF.js → chunk-AGLR6QVN.js} +249 -107
  156. package/dist/cli/{chunk-NURW5XH4.mjs → chunk-ASB47RXJ.mjs} +1 -1
  157. package/dist/cli/{chunk-RQZQVFCJ.js → chunk-BVDKFS2T.js} +2 -2
  158. package/dist/cli/{chunk-PFO3ISXA.js → chunk-CACFJODG.js} +174 -129
  159. package/dist/cli/{chunk-6RZOWL2V.mjs → chunk-CAEBJOYU.mjs} +1 -1
  160. package/dist/cli/{chunk-XDVT3GOM.js → chunk-CFJFUVX2.js} +18 -1
  161. package/dist/cli/{chunk-6YCA5NKJ.js → chunk-DP2VH7CO.js} +12 -12
  162. package/dist/cli/{chunk-AWJPDPMA.mjs → chunk-DP64MD6U.mjs} +1 -1
  163. package/dist/cli/{chunk-PTVD2GVQ.mjs → chunk-DZA7RFGL.mjs} +5 -5
  164. package/dist/cli/{chunk-V436Z54K.js → chunk-E2G2DNAB.js} +3 -1
  165. package/dist/cli/{chunk-GGGAEVCX.mjs → chunk-E7WZOX2A.mjs} +22 -18
  166. package/dist/cli/{chunk-IDVVIXPJ.js → chunk-FM7LPUPA.js} +41 -41
  167. package/dist/cli/{chunk-AQWQ2BFX.mjs → chunk-GAVZ4EOD.mjs} +1 -1
  168. package/dist/cli/{chunk-GKYAYLRI.js → chunk-HEBO3XNZ.js} +27 -31
  169. package/dist/cli/{chunk-IYSTRCLX.mjs → chunk-HSJ6X2AQ.mjs} +4 -4
  170. package/dist/cli/{chunk-UPMRIVZB.js → chunk-HVI55MTK.js} +61 -10
  171. package/dist/cli/{chunk-KWSH5T7K.js → chunk-IH6GDNKW.js} +21 -21
  172. package/dist/cli/{chunk-HO3XK3R7.js → chunk-IMX7J4DU.js} +8 -8
  173. package/dist/cli/{chunk-EUPVF4SU.mjs → chunk-INEMTYMT.mjs} +8 -8
  174. package/dist/cli/{chunk-3FD5EQ62.js → chunk-IUOGII7D.js} +6 -7
  175. package/dist/cli/{chunk-U7QRMBIY.mjs → chunk-JJGWHITQ.mjs} +5 -5
  176. package/dist/cli/{chunk-SHLFOPD6.js → chunk-JLGP5XAJ.js} +5 -5
  177. package/dist/cli/{chunk-4TALT2M3.mjs → chunk-LFOERUQY.mjs} +69 -3
  178. package/dist/cli/{chunk-BBTKAASQ.js → chunk-LFQJW4S2.js} +42 -1
  179. package/dist/cli/{chunk-Z5TSLLOW.mjs → chunk-LH5PZKER.mjs} +63 -18
  180. package/dist/cli/{chunk-S46HWQKO.js → chunk-LRDHPOZW.js} +69 -69
  181. package/dist/cli/{chunk-6ZORHRKB.mjs → chunk-LRZGS6RZ.mjs} +2 -0
  182. package/dist/cli/{chunk-SL6MYJYM.js → chunk-MJTVX4QK.js} +35 -35
  183. package/dist/cli/{chunk-7IKQKKNX.js → chunk-MLABYI4M.js} +90 -24
  184. package/dist/cli/{chunk-ZIAXDBXX.mjs → chunk-NDNHYONK.mjs} +17 -21
  185. package/dist/cli/{chunk-YLTMXJFC.mjs → chunk-OTV2UUKW.mjs} +158 -16
  186. package/dist/cli/{chunk-G4O75EXF.js → chunk-Q6Z6N3A7.js} +18 -18
  187. package/dist/cli/{chunk-WE5HES3H.mjs → chunk-QG6JIWUL.mjs} +151 -43
  188. package/dist/cli/{chunk-QY3ZNU6Z.mjs → chunk-QI5S5HWB.mjs} +2 -2
  189. package/dist/cli/{chunk-CBV7AKWM.js → chunk-R6DZ6NQ2.js} +5 -5
  190. package/dist/cli/{chunk-57VZVF5D.mjs → chunk-RMNOZKRI.mjs} +3 -3
  191. package/dist/cli/{chunk-BAIST2BR.js → chunk-RTV4RF7N.js} +36 -36
  192. package/dist/cli/{chunk-JWUAX6OP.js → chunk-SBH4CKPN.js} +11 -11
  193. package/dist/cli/{chunk-FTJLJCE5.mjs → chunk-SG3LUONJ.mjs} +3 -3
  194. package/dist/cli/{chunk-2WFPHBR4.js → chunk-TFEXSHPM.js} +22 -18
  195. package/dist/cli/{chunk-QAORXEY3.mjs → chunk-TN4TY6TT.mjs} +6 -7
  196. package/dist/cli/{chunk-WEHCBH5R.mjs → chunk-UEVKMZLR.mjs} +54 -3
  197. package/dist/cli/{chunk-QILKGXYF.mjs → chunk-UVQJYV76.mjs} +2 -2
  198. package/dist/cli/{chunk-FSIVF2SI.mjs → chunk-VZGLIK5U.mjs} +1 -1
  199. package/dist/cli/{chunk-MF2GHZDO.js → chunk-WOCHZCUJ.js} +2 -2
  200. package/dist/cli/{chunk-VQALXEXO.js → chunk-XLIHTJVM.js} +348 -118
  201. package/dist/cli/{chunk-ADRC5I3R.js → chunk-Y6SP3JMI.js} +22 -22
  202. package/dist/cli/{chunk-77AAAGVB.js → chunk-YUA6HA6D.js} +2 -2
  203. package/dist/cli/{chunk-JL2OTMSG.mjs → chunk-Z3A2S3QM.mjs} +41 -0
  204. package/dist/cli/{chunk-6O5HOODW.mjs → chunk-Z6XPSHKM.mjs} +87 -41
  205. package/dist/cli/{chunk-QX7LFGJR.mjs → chunk-Z7AOIHFE.mjs} +1870 -91
  206. package/dist/cli/command-docs.js +3 -3
  207. package/dist/cli/command-docs.mjs +2 -2
  208. package/dist/cli/concurrent-runs-help-CFJH4KXV.js +22 -0
  209. package/dist/cli/{concurrent-runs-help-Q4KPAUJX.mjs → concurrent-runs-help-DNV2X5AZ.mjs} +9 -8
  210. package/dist/cli/{csv-F5VAGX4K.js → csv-SA6ELJY6.js} +16 -15
  211. package/dist/cli/{csv-2PTVDNO6.mjs → csv-ZXZGHWOM.mjs} +7 -6
  212. package/dist/cli/{db-IEDXAUF7.mjs → db-A54SP6AD.mjs} +16 -16
  213. package/dist/cli/{db-Z3OIUFMM.js → db-JHFEIQBU.js} +43 -43
  214. package/dist/cli/describe-PHQ33AGS.mjs +50 -0
  215. package/dist/cli/describe-RHJ4XRFI.js +50 -0
  216. package/dist/cli/describe-core.d.mts +3 -3
  217. package/dist/cli/describe-core.d.ts +3 -3
  218. package/dist/cli/describe-core.js +6 -6
  219. package/dist/cli/describe-core.mjs +5 -5
  220. package/dist/cli/{executions-R3LP74QN.mjs → executions-HL2M2DFU.mjs} +10 -10
  221. package/dist/cli/{executions-H6H5655J.js → executions-TLFZRHBJ.js} +12 -12
  222. package/dist/cli/{feedback-VFOUR66B.js → feedback-5UEX5UZK.js} +17 -16
  223. package/dist/cli/{feedback-WL3MRVT5.mjs → feedback-QMBTNXVG.mjs} +9 -8
  224. package/dist/cli/git-4JWOOHBG.js +26 -0
  225. package/dist/cli/{git-YX2J4GCI.mjs → git-LKGXVIVC.mjs} +8 -7
  226. package/dist/cli/index.js +170 -158
  227. package/dist/cli/index.mjs +60 -48
  228. package/dist/cli/{integrations-E2JZYKHS.js → integrations-6RUTLMN7.js} +23 -27
  229. package/dist/cli/{integrations-5ZK5KLVP.mjs → integrations-FGGRVUJ7.mjs} +15 -19
  230. package/dist/cli/{legacy-noops-3VW4IJTH.js → legacy-noops-J3Z7QRWZ.js} +12 -11
  231. package/dist/cli/{legacy-noops-SMN3GSXY.mjs → legacy-noops-YIPRMVXZ.mjs} +9 -8
  232. package/dist/cli/{mcp-UQV2K4EW.js → mcp-6LWFP7RW.js} +121 -48
  233. package/dist/cli/{mcp-V6MGCYAG.mjs → mcp-CHDYFO7F.mjs} +100 -27
  234. package/dist/cli/{monitors-R3BBDCRC.js → monitors-STM6A7OU.js} +221 -186
  235. package/dist/cli/{monitors-GGKS5W6M.mjs → monitors-UGRY2BXI.mjs} +58 -23
  236. package/dist/cli/org-3SYOUQCX.mjs +2289 -0
  237. package/dist/cli/org-ZOBSNSIB.js +2289 -0
  238. package/dist/cli/outcomes-H4YYAT5X.js +2865 -0
  239. package/dist/cli/outcomes-Z3P2JE67.mjs +2865 -0
  240. package/dist/cli/{play-2MVO27VO.js → play-SM4CW2GS.js} +1116 -846
  241. package/dist/cli/{play-MDWPR4XG.mjs → play-SN5YWLS7.mjs} +375 -105
  242. package/dist/cli/{providers-AKDYFZJZ.mjs → providers-WZ4YBR5Y.mjs} +10 -10
  243. package/dist/cli/{providers-2AACRUZH.js → providers-WZARYMCF.js} +13 -13
  244. package/dist/cli/{quickstart-QDGRJFZY.mjs → quickstart-2575BNKA.mjs} +7 -6
  245. package/dist/cli/{quickstart-H6IV3PV3.js → quickstart-PS4YHQJ6.js} +9 -8
  246. package/dist/cli/{run-2634REDK.js → run-FLZ6OTM7.js} +51 -51
  247. package/dist/cli/{run-RTSQNGRD.mjs → run-ZUHCZOJS.mjs} +31 -31
  248. package/dist/cli/run-identity-LMLFMACS.js +31 -0
  249. package/dist/cli/{run-identity-MRNCEGV2.mjs → run-identity-MAZ7ANH5.mjs} +9 -3
  250. package/dist/cli/{search-6AOJ4XPP.mjs → search-HLPPKQEO.mjs} +11 -11
  251. package/dist/cli/search-JJWVHR3N.js +32 -0
  252. package/dist/cli/{search-output-6ADMTOU5.mjs → search-output-PDAXNOGP.mjs} +9 -8
  253. package/dist/cli/{search-output-S5ODBL5E.js → search-output-RXJLU36B.js} +12 -11
  254. package/dist/cli/{secrets-TFIFBFB3.mjs → secrets-CGELYQ3H.mjs} +11 -11
  255. package/dist/cli/{secrets-LHCIIHMT.js → secrets-QJNG7G2Y.js} +20 -20
  256. package/dist/cli/sessions-DHTBT2GN.js +23 -0
  257. package/dist/cli/{sessions-WHBVUHVW.mjs → sessions-ELMWVR4M.mjs} +9 -8
  258. package/dist/cli/{settings-CP4FVK2W.js → settings-44I44P5F.js} +89 -89
  259. package/dist/cli/{settings-EBONWL5C.mjs → settings-RR3LZXL7.mjs} +16 -16
  260. package/dist/cli/{setup-I5AZE3IU.mjs → setup-KGWRWH4B.mjs} +20 -19
  261. package/dist/cli/{setup-LFGHTNLQ.js → setup-KTEYOCJO.js} +60 -59
  262. package/dist/cli/skills-EPZPEXI2.js +37 -0
  263. package/dist/cli/{skills-W76AO5XE.mjs → skills-FPRID2I5.mjs} +10 -9
  264. package/dist/cli/tools-IGQQ5TML.js +57 -0
  265. package/dist/cli/{tools-7IJHGF6W.mjs → tools-PI4WMDLY.mjs} +23 -23
  266. package/dist/cli/update-4RNCVYGE.js +37 -0
  267. package/dist/cli/{update-GFOPZTHY.mjs → update-VJOJAZ7B.mjs} +14 -11
  268. package/dist/cli/{views-BPL2TQJ4.js → views-NTUOLNQU.js} +62 -64
  269. package/dist/cli/{views-D4NX4SBG.mjs → views-OVPSINZO.mjs} +47 -49
  270. package/dist/cli/{workflow-ZYNAUCKC.js → workflow-2UDYDM6F.js} +23 -23
  271. package/dist/cli/{workflow-YXP42FUI.mjs → workflow-7OEFNXZC.mjs} +13 -13
  272. package/dist/{client-CyXGrO4D.d.mts → client-B8f7RNF8.d.mts} +1 -1
  273. package/dist/{client-Bf3IpUKN.d.ts → client-C5TgXmJQ.d.ts} +1 -1
  274. package/dist/{client-core-BxsLnXlm.d.mts → client-core-SLLGBTht.d.mts} +268 -23
  275. package/dist/{client-core-BWd0lX0Z.d.ts → client-core-p0sOxnkl.d.ts} +268 -23
  276. package/dist/{compiler-manifest-BqwVrOri.d.ts → compiler-manifest-D_zZEh9Q.d.mts} +70 -5
  277. package/dist/{compiler-manifest-BqwVrOri.d.mts → compiler-manifest-D_zZEh9Q.d.ts} +70 -5
  278. package/dist/{errors-BU8FB99X.d.mts → errors-CZCrBFrQ.d.mts} +1 -1
  279. package/dist/{errors-DfVN_FUG.d.ts → errors-DsUkLrdZ.d.ts} +1 -1
  280. package/dist/{index-BGnvtYGc.d.ts → index-B6RTOZGC.d.ts} +1 -1
  281. package/dist/{index-DjZgwpGw.d.mts → index-DeOVrEmX.d.mts} +1 -1
  282. package/dist/index.d.mts +7 -7
  283. package/dist/index.d.ts +7 -7
  284. package/dist/index.js +66 -55
  285. package/dist/index.mjs +25 -14
  286. package/dist/install-integrity.json +161 -142
  287. package/dist/plays/bundle-play-file.d.mts +3 -3
  288. package/dist/plays/bundle-play-file.d.ts +3 -3
  289. package/dist/plays/bundle-play-file.mjs +23 -4
  290. package/dist/plays/csv-data-input.js +3 -3
  291. package/dist/plays/csv-data-input.mjs +2 -2
  292. package/dist/plays/play-description.d.mts +2 -2
  293. package/dist/plays/play-description.d.ts +2 -2
  294. package/dist/plays/run-request.d.mts +2 -2
  295. package/dist/plays/run-request.d.ts +2 -2
  296. package/dist/plays/run-request.js +4 -4
  297. package/dist/plays/run-request.mjs +3 -3
  298. package/dist/release.d.mts +1 -1
  299. package/dist/release.d.ts +1 -1
  300. package/dist/release.js +2 -2
  301. package/dist/release.mjs +1 -1
  302. package/dist/server.d.mts +4 -4
  303. package/dist/server.d.ts +4 -4
  304. package/dist/server.js +15 -13
  305. package/dist/server.mjs +9 -7
  306. package/package.json +1 -1
  307. package/dist/cli/auth-MMNVWATX.js +0 -43
  308. package/dist/cli/concurrent-runs-help-FQAIHKKC.js +0 -21
  309. package/dist/cli/describe-QDANCTS3.mjs +0 -50
  310. package/dist/cli/describe-VUTT5ZKU.js +0 -50
  311. package/dist/cli/git-ETB3GH3K.js +0 -25
  312. package/dist/cli/org-GRYVMNSW.js +0 -1282
  313. package/dist/cli/org-Z37NGJV4.mjs +0 -1282
  314. package/dist/cli/run-identity-G257GQED.js +0 -25
  315. package/dist/cli/search-VTW2YNBS.js +0 -32
  316. package/dist/cli/sessions-CJ4FJ2WB.js +0 -22
  317. package/dist/cli/skills-R7EBXREW.js +0 -36
  318. package/dist/cli/tools-V7U2BDXM.js +0 -57
  319. package/dist/cli/update-4COPZETK.js +0 -34
@@ -12,9 +12,12 @@ import { RUN_EVENT_KIND } from '../run-event-catalog';
12
12
  import { hydratePlayRunnerConfig } from '../protocol';
13
13
  import { DURABLE_RUNS_ROLLOUT } from '../durable-runs-rollout';
14
14
  import {
15
+ readRuntimeToolStartupReadAnswer,
15
16
  readStartupReadToolIds,
17
+ RUNTIME_TOOL_STARTUP_READS_TOOL_PARAM,
16
18
  staticPipelineStartupReadToolIds,
17
19
  } from '../startup-read-tool-ids';
20
+ import { PLAY_RUNTIME_TOOL_STARTUP_READS_PATH } from '../runtime-api-paths';
18
21
  import { appendFileSync, createReadStream, writeFileSync } from 'node:fs';
19
22
  import { readFile } from 'node:fs/promises';
20
23
  import { dirname, isAbsolute, resolve } from 'node:path';
@@ -63,7 +66,11 @@ import {
63
66
  runtimeLimitExceededCause,
64
67
  runtimeLimitExceededFailure,
65
68
  } from '../run-failure';
66
- import { createPlayContext } from '../context';
69
+ import {
70
+ createPlayContext,
71
+ SERIALIZE_DATASET_ROWS_ONCE,
72
+ } from '../context';
73
+ import { resolveExperimentSwitch } from '../experiment-switches';
67
74
  import {
68
75
  isHtmlErrorBody,
69
76
  normalizeToolHttpErrorMessage,
@@ -289,6 +296,8 @@ import {
289
296
  import { RUNTIME_CAPACITY_POLICY } from '../runtime-capacity-policy';
290
297
  import { RUNTIME_RELIABILITY_POLICY } from '../runtime-reliability-policy';
291
298
  import {
299
+ isAccountAccessUnavailableResponse,
300
+ RUNNER_ACCOUNT_ACCESS_UNAVAILABLE_RETRY_BUDGET_MS,
292
301
  RUNNER_GATEWAY_CONNECTION_RETRY_BUDGET_MS,
293
302
  RUNNER_GATEWAY_SCHEDULER_UNAVAILABLE_RETRY_BUDGET_MS,
294
303
  } from '../runtime-constants';
@@ -620,6 +629,64 @@ async function sleepRunnerRuntimeControlRetry(ms: number): Promise<void> {
620
629
  await new Promise<void>((resolve) => setTimeout(resolve, ms));
621
630
  }
622
631
 
632
+ /**
633
+ * Whether the execution gateway attests execute-fenced-v2. Only an answer is
634
+ * a verdict: a definitive response without the attestation means unsupported.
635
+ * A transport failure, timeout or retryable status retries under the runtime
636
+ * control policy and, once exhausted, throws: one unreachable hop is not
637
+ * evidence the gateway lacks the receiver. Answering `false` there failed
638
+ * every row of a Play with "does not support execute-fenced-v2" while the
639
+ * gateway was serving other runs (PR Checks run 44427143252).
640
+ */
641
+ export async function probeDurableInvocationFenceSupport(input: {
642
+ gatewayBaseUrl: string;
643
+ signal?: AbortSignal;
644
+ fetchImpl?: (url: string, init: RequestInit) => Promise<Response>;
645
+ sleep?: (ms: number) => Promise<void>;
646
+ }): Promise<boolean> {
647
+ const fetchImpl = input.fetchImpl ?? safeNodeOutboundFetch;
648
+ const sleep = input.sleep ?? sleepRunnerRuntimeControlRetry;
649
+ let lastFailure: unknown;
650
+ for (
651
+ let attempt = 1;
652
+ attempt <= RUNNER_RUNTIME_CONTROL_MAX_ATTEMPTS;
653
+ attempt += 1
654
+ ) {
655
+ if (attempt > 1) await sleep(runnerRuntimeControlRetryDelayMs(attempt - 1));
656
+ input.signal?.throwIfAborted();
657
+ const timeoutSignal = AbortSignal.timeout(
658
+ RUNNER_RUNTIME_CONTROL_REQUEST_TIMEOUT_MS,
659
+ );
660
+ let response: Response;
661
+ try {
662
+ response = await fetchImpl(`${input.gatewayBaseUrl}/healthz`, {
663
+ redirect: 'manual',
664
+ signal: input.signal
665
+ ? AbortSignal.any([input.signal, timeoutSignal])
666
+ : timeoutSignal,
667
+ });
668
+ } catch (error) {
669
+ input.signal?.throwIfAborted();
670
+ lastFailure = error;
671
+ continue;
672
+ }
673
+ if (isRetryableRuntimeControlStatus(response.status)) {
674
+ lastFailure = new Error(`HTTP ${response.status}`);
675
+ continue;
676
+ }
677
+ return (
678
+ response.ok &&
679
+ response.headers.get(DURABLE_INVOCATION_FENCE_ATTESTATION_HEADER) ===
680
+ DURABLE_INVOCATION_FENCE_ATTESTATION_VALUE
681
+ );
682
+ }
683
+ throw new Error(
684
+ `The execution gateway health probe at ${runnerRuntimeControlUrlHost(input.gatewayBaseUrl)} ` +
685
+ `did not answer after ${RUNNER_RUNTIME_CONTROL_MAX_ATTEMPTS} attempt(s). No provider request was submitted.`,
686
+ { cause: lastFailure },
687
+ );
688
+ }
689
+
623
690
  function runnerRuntimeControlUrlHost(url: string): string {
624
691
  try {
625
692
  return new URL(url).host;
@@ -648,11 +715,40 @@ export class RunnerRuntimeControlRedirectError extends Error {
648
715
  * including a failed or non-200 prefetch, falls through to the unchanged
649
716
  * request path with its own retries and errors.
650
717
  */
718
+ type RunnerStartupReadAnswer = {
719
+ status: number;
720
+ headers: [string, string][];
721
+ body: string;
722
+ } | null;
723
+
651
724
  const runnerStartupReadPrefetch = new Map<
652
725
  string,
653
- Promise<{ status: number; headers: [string, string][]; body: string } | null>
726
+ Promise<RunnerStartupReadAnswer>
654
727
  >();
655
728
 
729
+ function runnerStartupReadGet(
730
+ url: string,
731
+ headers: Record<string, string>,
732
+ fetchImpl: typeof fetch,
733
+ ): Promise<RunnerStartupReadAnswer> {
734
+ return fetchImpl(url, {
735
+ method: 'GET',
736
+ headers,
737
+ redirect: 'manual',
738
+ signal: AbortSignal.timeout(RUNNER_RUNTIME_CONTROL_REQUEST_TIMEOUT_MS),
739
+ }).then(
740
+ async (response) =>
741
+ response.status === 200
742
+ ? {
743
+ status: response.status,
744
+ headers: [...response.headers.entries()],
745
+ body: await response.text(),
746
+ }
747
+ : (await response.text().catch(() => ''), null),
748
+ () => null,
749
+ );
750
+ }
751
+
656
752
  export function prefetchRunnerRuntimeControlGet(
657
753
  url: string,
658
754
  headers: Record<string, string>,
@@ -661,23 +757,130 @@ export function prefetchRunnerRuntimeControlGet(
661
757
  if (runnerStartupReadPrefetch.has(url)) return;
662
758
  runnerStartupReadPrefetch.set(
663
759
  url,
664
- fetchImpl(url, {
760
+ runnerStartupReadGet(url, headers, fetchImpl),
761
+ );
762
+ }
763
+
764
+ /** The gateway's cap on one runtime-tools lookup response. */
765
+ const RUNNER_STARTUP_READ_ANSWER_MAX_BYTES = 256 * 1024;
766
+
767
+ /**
768
+ * Switch SR (`startupReadBatch`): the same startup reads as
769
+ * `prefetchRunnerRuntimeControlGet` gives each tool's metadata and auth-scope
770
+ * URL, fetched in one GET (`PLAY_RUNTIME_TOOL_STARTUP_READS_PATH`) whose body
771
+ * carries each per-tool route's status and body. Each URL keeps its own entry
772
+ * and is consumed exactly as before:
773
+ * - a 200 answer is reused once, with the headers the runner reads from that
774
+ * lookup (the relay's recovery transport header, which it sets on this
775
+ * response as on an auth-scope GET);
776
+ * - a non-200 or oversized answer is not reused, so the first real lookup
777
+ * makes the per-tool GET and meets that route's own outcome;
778
+ * - a batch refused at once (any 4xx but 429: an older gateway's or app's
779
+ * refusal of the unknown path), a malformed body, or a body missing a
780
+ * lookup turns that lookup into its per-tool prefetch, as with the switch
781
+ * off;
782
+ * - a batch that failed slowly or under load (timeout, transport error, 5xx,
783
+ * 429) is not repeated per tool: each lookup is a failed prefetch, so the
784
+ * first real lookup makes its own GET with its own retries, and one startup
785
+ * read never waits out two timeouts.
786
+ */
787
+ export function prefetchRunnerStartupReadsInOneRequest(
788
+ baseUrl: string,
789
+ toolIds: readonly string[],
790
+ headers: Record<string, string>,
791
+ fetchImpl: typeof fetch = fetch,
792
+ ): void {
793
+ const reads = toolIds
794
+ .flatMap((toolId) => {
795
+ const base = `${baseUrl}/api/v2/plays/runtime-tools/${encodeURIComponent(toolId)}`;
796
+ return [
797
+ { toolId, kind: 'metadata' as const, url: base },
798
+ { toolId, kind: 'authScope' as const, url: `${base}/auth-scope` },
799
+ ];
800
+ })
801
+ .filter(({ url }) => !runnerStartupReadPrefetch.has(url));
802
+ if (reads.length === 0) return;
803
+ const query = new URLSearchParams(
804
+ [...new Set(reads.map(({ toolId }) => toolId))].map((toolId) => [
805
+ RUNTIME_TOOL_STARTUP_READS_TOOL_PARAM,
806
+ toolId,
807
+ ]),
808
+ );
809
+ const batch = fetchImpl(
810
+ `${baseUrl}${PLAY_RUNTIME_TOOL_STARTUP_READS_PATH}?${query}`,
811
+ {
665
812
  method: 'GET',
666
813
  headers,
667
814
  redirect: 'manual',
668
815
  signal: AbortSignal.timeout(RUNNER_RUNTIME_CONTROL_REQUEST_TIMEOUT_MS),
669
- }).then(
670
- async (response) =>
671
- response.status === 200
672
- ? {
673
- status: response.status,
674
- headers: [...response.headers.entries()],
675
- body: await response.text(),
676
- }
677
- : (await response.text().catch(() => ''), null),
678
- () => null,
679
- ),
680
- );
816
+ },
817
+ )
818
+ .then(
819
+ async (
820
+ response,
821
+ ): Promise<
822
+ 'refused' | 'failed' | { body: unknown; transport: string | null }
823
+ > => {
824
+ if (response.status !== 200) {
825
+ await response.text().catch(() => '');
826
+ return response.status >= 400 &&
827
+ response.status < 500 &&
828
+ response.status !== 429
829
+ ? 'refused'
830
+ : 'failed';
831
+ }
832
+ const text = await response.text();
833
+ let body: unknown;
834
+ try {
835
+ body = JSON.parse(text);
836
+ } catch {
837
+ return 'refused';
838
+ }
839
+ return {
840
+ body,
841
+ transport: response.headers.get(
842
+ RUNTIME_ASYNC_EXECUTION_RECOVERY_TRANSPORT_HEADER,
843
+ ),
844
+ };
845
+ },
846
+ )
847
+ .catch(() => 'failed' as const);
848
+ for (const read of reads) {
849
+ runnerStartupReadPrefetch.set(
850
+ read.url,
851
+ batch.then((served) => {
852
+ if (served === 'failed') return null;
853
+ const answer =
854
+ served === 'refused'
855
+ ? null
856
+ : readRuntimeToolStartupReadAnswer(
857
+ served.body,
858
+ read.toolId,
859
+ read.kind,
860
+ );
861
+ if (served === 'refused' || !answer)
862
+ return runnerStartupReadGet(read.url, headers, fetchImpl);
863
+ if (
864
+ answer.status !== 200 ||
865
+ new TextEncoder().encode(answer.body).byteLength >
866
+ RUNNER_STARTUP_READ_ANSWER_MAX_BYTES
867
+ )
868
+ return null;
869
+ const answerHeaders: [string, string][] = [
870
+ ['content-type', 'application/json'],
871
+ ];
872
+ if (read.kind === 'authScope') {
873
+ answerHeaders.push(['cache-control', 'no-store']);
874
+ if (served.transport !== null)
875
+ answerHeaders.push([
876
+ RUNTIME_ASYNC_EXECUTION_RECOVERY_TRANSPORT_HEADER,
877
+ served.transport,
878
+ ]);
879
+ }
880
+ return { status: 200, headers: answerHeaders, body: answer.body };
881
+ }),
882
+ );
883
+ }
681
884
  }
682
885
 
683
886
  async function takeRunnerStartupRead(
@@ -719,6 +922,10 @@ export async function prefetchStaticToolStartupReads(
719
922
  Authorization: `Bearer ${token}`,
720
923
  ...(await vercelBypassHeaders(config)),
721
924
  };
925
+ if (config.context.startupReadBatch === true) {
926
+ prefetchRunnerStartupReadsInOneRequest(baseUrl, [...toolIds], headers);
927
+ return;
928
+ }
722
929
  for (const id of toolIds) {
723
930
  const base = `${baseUrl}/api/v2/plays/runtime-tools/${encodeURIComponent(id)}`;
724
931
  prefetchRunnerRuntimeControlGet(base, headers);
@@ -785,10 +992,7 @@ export async function fetchRunnerRuntimeControl(input: {
785
992
  );
786
993
  }
787
994
  respondedAttempts += 1;
788
- if (
789
- input.retrySafe &&
790
- isRetryableRuntimeControlStatus(response.status)
791
- ) {
995
+ if (input.retrySafe && isRetryableRuntimeControlStatus(response.status)) {
792
996
  const delayMs = runnerRuntimeControlRetryDelayMs(respondedAttempts);
793
997
  // A declared scheduler-breaker 503 outlasts three quick attempts, so it
794
998
  // keeps retrying within its own wall-clock budget, then fails loudly.
@@ -797,9 +1001,18 @@ export async function fetchRunnerRuntimeControl(input: {
797
1001
  isRunnerGatewaySchedulerUnavailableResponse(response) &&
798
1002
  Date.now() - startedAt + delayMs <=
799
1003
  RUNNER_GATEWAY_SCHEDULER_UNAVAILABLE_RETRY_BUDGET_MS;
1004
+ // The app's account-access cutoff could not verify the executor (its
1005
+ // dependency failed); it refused before any route ran. A blip of a few
1006
+ // seconds outlasts three quick attempts, so it gets its own budget.
1007
+ const accountAccessRetryAllowed =
1008
+ !input.init.signal?.aborted &&
1009
+ isAccountAccessUnavailableResponse(response) &&
1010
+ Date.now() - startedAt + delayMs <=
1011
+ RUNNER_ACCOUNT_ACCESS_UNAVAILABLE_RETRY_BUDGET_MS;
800
1012
  if (
801
1013
  respondedAttempts < RUNNER_RUNTIME_CONTROL_MAX_ATTEMPTS ||
802
- schedulerOutageRetryAllowed
1014
+ schedulerOutageRetryAllowed ||
1015
+ accountAccessRetryAllowed
803
1016
  ) {
804
1017
  await response.text().catch(() => '');
805
1018
  await sleepImpl(delayMs);
@@ -851,7 +1064,9 @@ export async function fetchRunnerRuntimeControl(input: {
851
1064
  }
852
1065
  }
853
1066
 
854
- function createRuntimeToolMetadataResolver(config: PlayRunnerExecutionConfig) {
1067
+ export function createRuntimeToolMetadataResolver(
1068
+ config: PlayRunnerExecutionConfig,
1069
+ ) {
855
1070
  const cached = new Map<string, Promise<RuntimeToolMetadata>>();
856
1071
 
857
1072
  return async (toolId: string): Promise<RuntimeToolMetadata> => {
@@ -1557,7 +1772,11 @@ export function playRunnerContextCachePolicy(
1557
1772
  const policy = playRunnerContextForcePolicy(context);
1558
1773
  const window = context.cacheReuseWindowSeconds;
1559
1774
  // Optional launch field: older launches carry none.
1560
- if (typeof window !== 'number' || !Number.isSafeInteger(window) || window <= 0)
1775
+ if (
1776
+ typeof window !== 'number' ||
1777
+ !Number.isSafeInteger(window) ||
1778
+ window <= 0
1779
+ )
1561
1780
  return policy;
1562
1781
  return { ...policy, cacheReuseWindowSeconds: window };
1563
1782
  }
@@ -2553,7 +2772,10 @@ async function run(
2553
2772
  sheetContract?: PlaySheetContract;
2554
2773
  }): string[] =>
2555
2774
  settlement.sheetContract
2556
- ? datasetDisplayColumnOrder(settlement.columns ?? [], settlement.sheetContract)
2775
+ ? datasetDisplayColumnOrder(
2776
+ settlement.columns ?? [],
2777
+ settlement.sheetContract,
2778
+ )
2557
2779
  : [...(settlement.columns ?? [])];
2558
2780
  const runtimeSheetAttemptKey = (input: {
2559
2781
  playName: string;
@@ -2660,6 +2882,7 @@ async function run(
2660
2882
  executionGatewayBaseUrl: config.context.executionGatewayBaseUrl,
2661
2883
  ...playRunnerInvocationFenceFlags(config.context),
2662
2884
  runtimeTestFaultHeader: config.context.runtimeTestFaultHeader ?? null,
2885
+ experimentSwitchOverrides: config.context.experimentSwitchOverrides ?? null,
2663
2886
  integrationMode: config.context.integrationMode,
2664
2887
  docflowEnabled: config.context.docflowEnabled === true,
2665
2888
  fixtureBehavior: config.context.fixtureBehavior,
@@ -2679,27 +2902,7 @@ async function run(
2679
2902
  ) {
2680
2903
  return false;
2681
2904
  }
2682
- try {
2683
- const timeoutSignal = AbortSignal.timeout(
2684
- RUNNER_RUNTIME_CONTROL_REQUEST_TIMEOUT_MS,
2685
- );
2686
- const response = await safeNodeOutboundFetch(
2687
- `${gatewayBaseUrl}/healthz`,
2688
- {
2689
- redirect: 'manual',
2690
- signal: signal
2691
- ? AbortSignal.any([signal, timeoutSignal])
2692
- : timeoutSignal,
2693
- },
2694
- );
2695
- return (
2696
- response.ok &&
2697
- response.headers.get(DURABLE_INVOCATION_FENCE_ATTESTATION_HEADER) ===
2698
- DURABLE_INVOCATION_FENCE_ATTESTATION_VALUE
2699
- );
2700
- } catch {
2701
- return false;
2702
- }
2905
+ return probeDurableInvocationFenceSupport({ gatewayBaseUrl, signal });
2703
2906
  },
2704
2907
  dbSessionStrategy: config.context.dbSessionStrategy,
2705
2908
  createRuntimeSheetDatasetPageReader: (scope) =>
@@ -3405,6 +3608,13 @@ async function run(
3405
3608
  attemptSeq: attempt?.attemptSeq ?? runnerRunAttempt,
3406
3609
  writeVersion: attempt?.writeVersion ?? null,
3407
3610
  },
3611
+ {
3612
+ preparedBody: resolveExperimentSwitch(
3613
+ 'SO1',
3614
+ config.context.experimentSwitchOverrides,
3615
+ SERIALIZE_DATASET_ROWS_ONCE,
3616
+ ),
3617
+ },
3408
3618
  );
3409
3619
  const result = await retryRuntimeSheetPersistence({
3410
3620
  description: `runtime map persist table=${input.tableNamespace}`,
@@ -38,6 +38,7 @@ import {
38
38
  export { buildDaytonaPayloadMaterializerSource } from '../../daytona-payload-contract';
39
39
  import { compactPlayArtifactForRuntimeTransport } from '../../../plays/artifact-transport';
40
40
  import { buildBakedRunnerVerifySource } from '../../baked-runner-image';
41
+ import { resolveExperimentSwitch } from '../../experiment-switches';
41
42
  import { DURABLE_RUNS_ROLLOUT } from '../../durable-runs-rollout';
42
43
  import type {
43
44
  DaytonaExecutionContext,
@@ -254,6 +255,36 @@ export function buildCombinedMaterializeAndWatchdogSource(
254
255
  return `{${buildDaytonaPayloadMaterializerSource()}}process.argv.splice(1,6);${watchdogSource}`;
255
256
  }
256
257
 
258
+ /**
259
+ * N1 (off): on the inline baked launch, one Node process verifies the baked
260
+ * runner, materializes the payload and becomes the runtime watchdog. Today
261
+ * that is three Node starts in series before the runner's own (the shell
262
+ * guard's `node -e` verify, the materializer, the watchdog); on the 0.5-core
263
+ * standard sandbox each start is a large share of command-accepted to
264
+ * heartbeat. The verdict line and its meaning are unchanged: it is written
265
+ * first, on the exec's stdout (fd 3, duplicated before the output capture),
266
+ * and any non-`ok` verdict exits 98 before the payload is materialized or the
267
+ * runner is started. The shell then exits 98 without running the
268
+ * crash-terminal epilogue, exactly as the shell guard did. Per-run capable
269
+ * (experiment switch N1). The combined process keeps the materializer's heap
270
+ * for the run (about 13 MiB in the #10002 comparison).
271
+ */
272
+ export const ONE_NODE_GUARDED_INLINE_LAUNCH = false;
273
+
274
+ /**
275
+ * The N1 verify block: reads the baked runner path, its expected sha256 and
276
+ * the pass marker path from argv[1..3]. On `ok` it first writes the pass
277
+ * marker (a failed write makes the verdict `unverified`, which is not `ok`).
278
+ * It then prints exactly one `baked-runner:<verdict>` line on fd 3 and closes
279
+ * it, and on any verdict but `ok` exits 98. The arguments are then removed, so
280
+ * the materializer and the watchdog read the positions they always had. The
281
+ * shell exits 98 unless the pass marker exists, so a guard that refused or
282
+ * died before a verdict never reaches the epilogue (as with the shell guard).
283
+ */
284
+ export function buildOneNodeBakedRunnerGuardSource(): string {
285
+ return `{const fs=require('node:fs');const c=require('node:crypto');let r='missing';try{r=c.createHash('sha256').update(fs.readFileSync(process.argv[1])).digest('hex')===process.argv[2]?'ok':'mismatch'}catch(e){}if(r==='ok'){try{fs.writeFileSync(process.argv[3],'ok')}catch(e){r='unverified'}}try{fs.writeSync(3,'baked-runner:'+r+'\\n');fs.closeSync(3)}catch(e){}if(r!=='ok')process.exit(${INLINE_BAKED_RUNNER_UNVERIFIED_EXIT_CODE})}process.argv.splice(1,3);`;
286
+ }
287
+
257
288
  /**
258
289
  * Crash-containment epilogue (push execution). The parked worker no longer
259
290
  * holds anything that returns when the runner process dies, so a runner that
@@ -727,8 +758,23 @@ function buildDetachedRunnerCommand(input: {
727
758
  artifactCodePath: string;
728
759
  artifactSourceMapPath: string;
729
760
  } | null;
730
- }): DetachedRunnerPaths & { command: string } {
761
+ /**
762
+ * N1: verify this baked runner inside the single materialize-and-watchdog
763
+ * Node process (verdict on fd 3) instead of a separate shell guard. Needs
764
+ * `materialize`.
765
+ */
766
+ oneNodeBakedGuard?: { path: string; hash: string };
767
+ }): DetachedRunnerPaths & {
768
+ command: string;
769
+ /** N1 only: the marker the guard writes once the baked runner verified. */
770
+ bakedPassMarkerPath?: string;
771
+ } {
731
772
  const { workDir, configPath, crashPusherPath, materialize } = input;
773
+ const oneNodeBakedGuard =
774
+ materialize !== null ? (input.oneNodeBakedGuard ?? null) : null;
775
+ const bakedPassMarkerPath = oneNodeBakedGuard
776
+ ? `${workDir}/deepline-play-baked-verified-${randomUUID()}.txt`
777
+ : null;
732
778
  const runtimeLimitSeconds = input.sandboxRuntimeLimits.timeoutSeconds;
733
779
  const outputPath = `${workDir}/deepline-play-output-${randomUUID()}.log`;
734
780
  const crashPusherLogPath = `${workDir}/deepline-play-crash-terminal-${randomUUID()}.log`;
@@ -759,7 +805,9 @@ function buildDetachedRunnerCommand(input: {
759
805
  ? shellQuote(input.nodeBinaryPath)
760
806
  : 'node';
761
807
  const singleNodeStart =
762
- materialize !== null && DURABLE_RUNS_ROLLOUT.singleNodeMaterializeWatchdog;
808
+ materialize !== null &&
809
+ (oneNodeBakedGuard !== null ||
810
+ DURABLE_RUNS_ROLLOUT.singleNodeMaterializeWatchdog);
763
811
  const watchdogSource = buildDaytonaRuntimeWatchdogSource(
764
812
  input.sandboxRuntimeLimits,
765
813
  input.memoryLimitMiB,
@@ -770,9 +818,17 @@ function buildDetachedRunnerCommand(input: {
770
818
  '-e',
771
819
  shellQuote(
772
820
  singleNodeStart
773
- ? buildCombinedMaterializeAndWatchdogSource(watchdogSource)
821
+ ? `${oneNodeBakedGuard ? buildOneNodeBakedRunnerGuardSource() : ''}${buildCombinedMaterializeAndWatchdogSource(watchdogSource)}`
774
822
  : watchdogSource,
775
823
  ),
824
+ // N1 guard arguments, consumed (and removed from argv) first.
825
+ ...(oneNodeBakedGuard && bakedPassMarkerPath
826
+ ? [
827
+ shellQuote(oneNodeBakedGuard.path),
828
+ shellQuote(oneNodeBakedGuard.hash),
829
+ shellQuote(bakedPassMarkerPath),
830
+ ]
831
+ : []),
776
832
  // Materializer arguments, consumed (and removed from argv) before the
777
833
  // watchdog reads its own.
778
834
  ...(singleNodeStart && materialize
@@ -821,10 +877,20 @@ function buildDetachedRunnerCommand(input: {
821
877
  // Its own retry diagnostics are kept in a separate log: appending them to
822
878
  // `outputPath` after a near-gateway-sized result could hide that result from
823
879
  // a later bounded-tail recovery read.
824
- const command = `rm -f ${shellQuote(outputPath)} ${shellQuote(crashPusherLogPath)} ${shellQuote(exitCodePath)} ${shellQuote(oomKillBaselinePath)} ${shellQuote(runnerPidPath)} ${shellQuote(runtimeStartedPath)} ${shellQuote(runtimeCompletedPath)} ${shellQuote(runtimeLimitMarkerPath)} ${shellQuote(terminationDiagnosticPath)} ${shellQuote(memoryLedgerPath)} ${shellQuote(`${memoryLedgerPath}.tmp`)} ${shellQuote(memoryPressurePath)} ${shellQuote(progressEventPath)} ${shellQuote(`${progressEventPath}.*`)} ${shellQuote(startupDiagnosticPath)}; ( awk '$1 == "oom_kill" { print $2 }' /sys/fs/cgroup/memory.events 2>/dev/null || true ) > ${shellQuote(oomKillBaselinePath)}; ( ${runnerCommand} ) > ${shellQuote(outputPath)} 2>&1; code=$?; printf '%s' "$code" > ${shellQuote(exitCodePath)}; ${runtimeReliabilityEnv}${nodeCommand} ${shellQuote(crashPusherPath)} ${shellQuote(configPath)} "$code" ${shellQuote(outputPath)} ${shellQuote(runtimeLimitMarkerPath)} ${shellQuote(oomKillBaselinePath)} /sys/fs/cgroup/memory.events ${shellQuote(terminationDiagnosticPath)} ${shellQuote(runtimeCompletedPath)} > ${shellQuote(crashPusherLogPath)} 2>&1 || true; printf 'deepline runner output captured: %s\\n' ${shellQuote(outputPath)}; exit "$code"`;
880
+ // N1: unless the guard proved the baked runner (its pass marker), exit 98
881
+ // here, before the epilogue, as the shell guard did: no crash terminal is
882
+ // pushed for a run whose launch falls back to the full upload.
883
+ const bakedRefusalExit = bakedPassMarkerPath
884
+ ? `if [ ! -e ${shellQuote(bakedPassMarkerPath)} ]; then exit ${INLINE_BAKED_RUNNER_UNVERIFIED_EXIT_CODE}; fi; `
885
+ : '';
886
+ const bakedRefusalCleanup = bakedPassMarkerPath
887
+ ? ` ${shellQuote(bakedPassMarkerPath)}`
888
+ : '';
889
+ const command = `rm -f${bakedRefusalCleanup} ${shellQuote(outputPath)} ${shellQuote(crashPusherLogPath)} ${shellQuote(exitCodePath)} ${shellQuote(oomKillBaselinePath)} ${shellQuote(runnerPidPath)} ${shellQuote(runtimeStartedPath)} ${shellQuote(runtimeCompletedPath)} ${shellQuote(runtimeLimitMarkerPath)} ${shellQuote(terminationDiagnosticPath)} ${shellQuote(memoryLedgerPath)} ${shellQuote(`${memoryLedgerPath}.tmp`)} ${shellQuote(memoryPressurePath)} ${shellQuote(progressEventPath)} ${shellQuote(`${progressEventPath}.*`)} ${shellQuote(startupDiagnosticPath)}; ( awk '$1 == "oom_kill" { print $2 }' /sys/fs/cgroup/memory.events 2>/dev/null || true ) > ${shellQuote(oomKillBaselinePath)}; ( ${runnerCommand} ) > ${shellQuote(outputPath)} 2>&1; code=$?; ${bakedRefusalExit}printf '%s' "$code" > ${shellQuote(exitCodePath)}; ${runtimeReliabilityEnv}${nodeCommand} ${shellQuote(crashPusherPath)} ${shellQuote(configPath)} "$code" ${shellQuote(outputPath)} ${shellQuote(runtimeLimitMarkerPath)} ${shellQuote(oomKillBaselinePath)} /sys/fs/cgroup/memory.events ${shellQuote(terminationDiagnosticPath)} ${shellQuote(runtimeCompletedPath)} > ${shellQuote(crashPusherLogPath)} 2>&1 || true; printf 'deepline runner output captured: %s\\n' ${shellQuote(outputPath)}; exit "$code"`;
825
890
 
826
891
  return {
827
892
  command,
893
+ ...(bakedPassMarkerPath ? { bakedPassMarkerPath } : {}),
828
894
  outputPath,
829
895
  exitCodePath,
830
896
  oomKillBaselinePath,
@@ -1221,6 +1287,18 @@ export async function stageRunnerPayload(input: {
1221
1287
  };
1222
1288
  }
1223
1289
 
1290
+ // N1: only the inline baked launch that verifies in its own command, so a
1291
+ // refusal still exits 98 before anything runs and selects the full upload.
1292
+ const oneNodeBakedGuard =
1293
+ inlineDelivery &&
1294
+ input.bakedRunner?.verifyInCommand === true &&
1295
+ resolveExperimentSwitch(
1296
+ 'N1',
1297
+ input.config.context.experimentSwitchOverrides,
1298
+ ONE_NODE_GUARDED_INLINE_LAUNCH,
1299
+ )
1300
+ ? { path: input.bakedRunner.path, hash: input.bakedRunner.hash }
1301
+ : null;
1224
1302
  const {
1225
1303
  command,
1226
1304
  outputPath,
@@ -1233,6 +1311,7 @@ export async function stageRunnerPayload(input: {
1233
1311
  progressEventPath,
1234
1312
  startupDiagnosticPath,
1235
1313
  } = buildDetachedRunnerCommand({
1314
+ ...(oneNodeBakedGuard ? { oneNodeBakedGuard } : {}),
1236
1315
  workDir,
1237
1316
  nodeBinaryPath: input.nodeBinaryPath,
1238
1317
  sandboxTarget: input.sandbox.target,
@@ -1263,11 +1342,13 @@ export async function stageRunnerPayload(input: {
1263
1342
  envelopePath,
1264
1343
  envelope: inlineEnvelope,
1265
1344
  base64,
1266
- inlineCommand: `${inlineEnvelopeCommandPrefix({
1345
+ // N1 writes its verdict on fd 3: the exec's stdout, duplicated before
1346
+ // the runner's output capture replaces fd 1.
1347
+ inlineCommand: `${oneNodeBakedGuard ? 'exec 3>&1; ' : ''}${inlineEnvelopeCommandPrefix({
1267
1348
  envelopePath,
1268
1349
  base64Length: base64.length,
1269
1350
  bytes: inlineEnvelope.byteLength,
1270
- ...(input.bakedRunner?.verifyInCommand
1351
+ ...(input.bakedRunner?.verifyInCommand && !oneNodeBakedGuard
1271
1352
  ? {
1272
1353
  verifyBakedRunner: {
1273
1354
  nodeCommand,