@cnc-tools/storm 0.14.2 → 0.15.0

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 (401) hide show
  1. package/dist/application.js +3 -1
  2. package/dist/bin/storm.js +9 -7
  3. package/dist/build-info.js +1 -1
  4. package/dist/chunks/chunk-4U4DZ7VG.js +40 -0
  5. package/dist/chunks/{chunk-GSC6SRTW.js → chunk-5CCP36QQ.js} +1 -1
  6. package/dist/chunks/chunk-5GBMR4HM.js +966 -0
  7. package/dist/chunks/{chunk-43MWZLJR.js → chunk-5VXBKPW6.js} +1 -1
  8. package/dist/chunks/{chunk-RA4L2ACU.js → chunk-AWBSONHB.js} +88 -34
  9. package/dist/chunks/{chunk-BRUIATTR.js → chunk-CN4EFA5J.js} +59 -12
  10. package/dist/chunks/{chunk-3HBPNQ4Y.js → chunk-CXAT7ZKP.js} +2 -2
  11. package/dist/chunks/chunk-E4PJNZVG.js +783 -0
  12. package/dist/chunks/{chunk-T6AZIDZD.js → chunk-F6N34UWB.js} +12 -244
  13. package/dist/chunks/{chunk-RUPD4TLT.js → chunk-KC4KDJ5K.js} +147 -26
  14. package/dist/chunks/{chunk-I7AN3DIJ.js → chunk-L36GBUBB.js} +1626 -676
  15. package/dist/chunks/{chunk-XZCDA5PE.js → chunk-OX7X4B2L.js} +7 -2
  16. package/dist/chunks/{chunk-UUBZTGLV.js → chunk-PN5ULTTH.js} +140 -130
  17. package/dist/chunks/chunk-QUHY6FGN.js +108 -0
  18. package/dist/chunks/chunk-QVS7HRU7.js +74 -0
  19. package/dist/chunks/{chunk-UC6DULWY.js → chunk-R7XVBZOY.js} +130 -39
  20. package/dist/chunks/{chunk-LUOHJ3LB.js → chunk-RAQEXKL6.js} +1120 -465
  21. package/dist/chunks/{chunk-GJOEPJJL.js → chunk-SZEURWRS.js} +446 -52
  22. package/dist/chunks/chunk-TJNFVNKR.js +246 -0
  23. package/dist/chunks/{chunk-BW2ADH7U.js → chunk-VUPZH7J2.js} +1 -1
  24. package/dist/chunks/{chunk-HDL4WKIB.js → chunk-XEVHP5ZW.js} +2 -2
  25. package/dist/chunks/{chunk-VH2POPW5.js → chunk-YV7GE6EV.js} +635 -79
  26. package/dist/chunks/{chunk-GQIL3AHY.js → chunk-ZG3WQ4UF.js} +1 -1
  27. package/dist/chunks/{live-app-SZGEILCQ.js → live-app-PI3BAN6Y.js} +28 -23
  28. package/dist/command-tree.d.ts +2 -2
  29. package/dist/command-tree.js +2 -2
  30. package/dist/commands/exec/across-sandboxes-outcomes.d.ts +364 -0
  31. package/dist/commands/exec/across-sandboxes-outcomes.js +229 -0
  32. package/dist/commands/exec/across-sandboxes-run.d.ts +180 -0
  33. package/dist/commands/exec/across-sandboxes-run.js +339 -0
  34. package/dist/commands/exec/command.d.ts +577 -75
  35. package/dist/commands/exec/command.js +165 -32
  36. package/dist/commands/exec/driver-plan.d.ts +8 -2
  37. package/dist/commands/exec/driver-plan.js +13 -3
  38. package/dist/commands/exec/exec-words.d.ts +17 -3
  39. package/dist/commands/exec/exec-words.js +27 -16
  40. package/dist/commands/exec/live-view.d.ts +3 -4
  41. package/dist/commands/exec/live-view.js +37 -28
  42. package/dist/commands/exec/metadata.js +2 -2
  43. package/dist/commands/exec/mint-failed.d.ts +4 -4
  44. package/dist/commands/exec/mint-failed.js +6 -6
  45. package/dist/commands/exec/outcomes.d.ts +530 -73
  46. package/dist/commands/exec/outcomes.js +202 -66
  47. package/dist/commands/exec/plan-only.d.ts +10 -0
  48. package/dist/commands/exec/plan-only.js +46 -0
  49. package/dist/commands/exec/plan-run.d.ts +54 -35
  50. package/dist/commands/exec/plan-run.js +81 -38
  51. package/dist/commands/exec/planned-outcome.d.ts +15 -0
  52. package/dist/commands/exec/planned-outcome.js +35 -0
  53. package/dist/commands/exec/progress.d.ts +2 -2
  54. package/dist/commands/exec/progress.js +35 -18
  55. package/dist/commands/exec/resource-refusals.d.ts +2 -2
  56. package/dist/commands/exec/resource-refusals.js +3 -3
  57. package/dist/commands/exec/run-bin.d.ts +1 -1
  58. package/dist/commands/exec/run-bin.js +2 -2
  59. package/dist/commands/exec/run-command.d.ts +345 -63
  60. package/dist/commands/exec/run-command.js +308 -258
  61. package/dist/commands/exec/run-metadata.d.ts +42 -8
  62. package/dist/commands/exec/run-metadata.js +40 -21
  63. package/dist/commands/exec/run-planned.d.ts +20 -0
  64. package/dist/commands/exec/run-planned.js +22 -0
  65. package/dist/commands/exec/sandbox-lines.d.ts +42 -0
  66. package/dist/commands/exec/sandbox-lines.js +59 -0
  67. package/dist/commands/exec/sandbox-progress.d.ts +30 -0
  68. package/dist/commands/exec/sandbox-progress.js +232 -0
  69. package/dist/commands/exec/sandbox-view.d.ts +19 -0
  70. package/dist/commands/exec/sandbox-view.js +72 -0
  71. package/dist/commands/exec/view.d.ts +3 -2
  72. package/dist/commands/exec/view.js +10 -6
  73. package/dist/commands/runs/facts.d.ts +51 -9
  74. package/dist/commands/runs/facts.js +49 -29
  75. package/dist/commands/runs/list/command.d.ts +80 -4
  76. package/dist/commands/runs/list/command.js +11 -10
  77. package/dist/commands/runs/list/metadata.js +1 -1
  78. package/dist/commands/runs/list/outcomes.d.ts +40 -2
  79. package/dist/commands/runs/logs/command.d.ts +103 -8
  80. package/dist/commands/runs/logs/command.js +139 -24
  81. package/dist/commands/runs/logs/metadata.d.ts +4 -0
  82. package/dist/commands/runs/logs/metadata.js +14 -7
  83. package/dist/commands/runs/logs/outcomes.d.ts +49 -2
  84. package/dist/commands/runs/logs/outcomes.js +110 -6
  85. package/dist/commands/runs/past-run.d.ts +77 -6
  86. package/dist/commands/runs/past-run.js +133 -4
  87. package/dist/commands/runs/show/command.d.ts +568 -10
  88. package/dist/commands/runs/show/command.js +634 -119
  89. package/dist/commands/runs/show/metadata.d.ts +17 -0
  90. package/dist/commands/runs/show/metadata.js +48 -7
  91. package/dist/commands/runs/show/outcomes.d.ts +276 -5
  92. package/dist/commands/runs/show/outcomes.js +484 -96
  93. package/dist/commands/snapshots/build/command.d.ts +109 -18
  94. package/dist/commands/snapshots/build/command.js +72 -36
  95. package/dist/commands/snapshots/build/metadata.d.ts +4 -0
  96. package/dist/commands/snapshots/build/metadata.js +5 -1
  97. package/dist/commands/snapshots/build/outcomes.d.ts +53 -8
  98. package/dist/commands/snapshots/build/outcomes.js +26 -3
  99. package/dist/commands/snapshots/list/command.d.ts +72 -7
  100. package/dist/commands/snapshots/list/command.js +57 -24
  101. package/dist/commands/snapshots/list/metadata.d.ts +4 -0
  102. package/dist/commands/snapshots/list/metadata.js +4 -0
  103. package/dist/commands/snapshots/list/outcomes.d.ts +31 -0
  104. package/dist/commands/snapshots/list/outcomes.js +25 -2
  105. package/dist/commands/suites/list/command.d.ts +129 -0
  106. package/dist/commands/suites/list/command.js +162 -0
  107. package/dist/commands/suites/list/metadata.d.ts +11 -0
  108. package/dist/commands/suites/list/metadata.js +15 -0
  109. package/dist/commands/suites/list/outcomes.d.ts +91 -0
  110. package/dist/commands/suites/list/outcomes.js +122 -0
  111. package/dist/commands/suites/metadata.js +8 -0
  112. package/dist/commands/test/command.d.ts +1389 -0
  113. package/dist/commands/test/command.js +583 -0
  114. package/dist/commands/test/metadata.js +8 -0
  115. package/dist/commands/test/outcomes.d.ts +765 -0
  116. package/dist/commands/test/outcomes.js +140 -0
  117. package/dist/commands/test/plan.d.ts +92 -0
  118. package/dist/commands/test/plan.js +128 -0
  119. package/dist/commands/test/test-words.d.ts +12 -0
  120. package/dist/commands/test/test-words.js +42 -0
  121. package/dist/config/check-resources.d.ts +14 -0
  122. package/dist/config/check-resources.js +98 -0
  123. package/dist/config/check-runner.d.ts +13 -0
  124. package/dist/config/check-runner.js +54 -0
  125. package/dist/config/check-suites.d.ts +14 -0
  126. package/dist/config/check-suites.js +99 -0
  127. package/dist/config/gateways.d.ts +24 -0
  128. package/dist/config/index.d.ts +6 -3
  129. package/dist/config/index.js +3 -1
  130. package/dist/config/live/file-lists-file-gateway.d.ts +4 -0
  131. package/dist/config/live/file-lists-file-gateway.js +27 -0
  132. package/dist/config/load.d.ts +11 -10
  133. package/dist/config/load.js +35 -103
  134. package/dist/config/recipe-run.d.ts +8 -1
  135. package/dist/config/recipe-run.js +2 -1
  136. package/dist/config/resolve.d.ts +3 -2
  137. package/dist/config/resolve.js +6 -3
  138. package/dist/config/resolver.d.ts +20 -6
  139. package/dist/config/resolver.js +11 -8
  140. package/dist/config/runner.d.ts +24 -0
  141. package/dist/config/runner.js +4 -0
  142. package/dist/config/schema.d.ts +26 -18
  143. package/dist/config/schema.js +41 -9
  144. package/dist/config/settings-file.d.ts +9 -3
  145. package/dist/config/settings-file.js +41 -4
  146. package/dist/config/suite.d.ts +39 -0
  147. package/dist/config/suite.js +5 -0
  148. package/dist/config-file/define.d.ts +49 -18
  149. package/dist/config-file/define.js +9 -8
  150. package/dist/config-file/runner.d.ts +12 -0
  151. package/dist/config-file/runner.js +9 -0
  152. package/dist/context.d.ts +12 -8
  153. package/dist/context.js +9 -3
  154. package/dist/core/across-sandboxes.d.ts +43 -0
  155. package/dist/core/across-sandboxes.js +319 -0
  156. package/dist/core/before-run.d.ts +5 -3
  157. package/dist/core/before-run.js +12 -1
  158. package/dist/core/events.d.ts +62 -6
  159. package/dist/core/events.js +14 -0
  160. package/dist/core/index.d.ts +4 -2
  161. package/dist/core/index.js +3 -1
  162. package/dist/core/payload.d.ts +2 -1
  163. package/dist/core/payload.js +2 -1
  164. package/dist/core/presentations.js +1 -1
  165. package/dist/core/resource.d.ts +1 -1
  166. package/dist/core/resources.d.ts +56 -6
  167. package/dist/core/resources.js +81 -5
  168. package/dist/core/run-state.js +9 -0
  169. package/dist/core/run.d.ts +77 -15
  170. package/dist/core/run.js +150 -86
  171. package/dist/core/sandbox-end.d.ts +64 -0
  172. package/dist/core/sandbox-end.js +128 -0
  173. package/dist/core/timeline.d.ts +4 -4
  174. package/dist/core/timeline.js +3 -3
  175. package/dist/credential/live/vercel-cli-gateway.d.ts +7 -0
  176. package/dist/credential/live/vercel-cli-gateway.js +14 -1
  177. package/dist/extensions/github/context.d.ts +1 -1
  178. package/dist/extensions/github/definition.d.ts +11 -9
  179. package/dist/extensions/github/definition.js +8 -6
  180. package/dist/extensions/github/extension.d.ts +3 -3
  181. package/dist/extensions/github/fixture-repo.d.ts +21 -2
  182. package/dist/extensions/github/fixture-repo.js +31 -2
  183. package/dist/extensions/github/index.d.ts +2 -2
  184. package/dist/extensions/github/index.js +2 -2
  185. package/dist/extensions/github/lifecycle.d.ts +16 -6
  186. package/dist/extensions/github/lifecycle.js +42 -25
  187. package/dist/extensions/github/options.d.ts +17 -11
  188. package/dist/extensions/github/options.js +14 -13
  189. package/dist/extensions/github/refusals.d.ts +23 -6
  190. package/dist/extensions/github/refusals.js +34 -12
  191. package/dist/extensions/github/resource.d.ts +21 -12
  192. package/dist/extensions/github/resource.js +16 -8
  193. package/dist/extensions/github/run/payload.d.ts +6 -6
  194. package/dist/extensions/github/run/payload.js +3 -5
  195. package/dist/extensions/github/split.d.ts +10 -0
  196. package/dist/extensions/github/split.js +12 -0
  197. package/dist/extensions/playwright/driver.js +6 -26
  198. package/dist/extensions/playwright/extension.js +1 -1
  199. package/dist/extensions/testserver/commands/pool/create/command.js +8 -8
  200. package/dist/extensions/testserver/commands/pool/list/command.js +4 -4
  201. package/dist/extensions/testserver/definition.d.ts +4 -4
  202. package/dist/extensions/testserver/definition.js +41 -31
  203. package/dist/extensions/testserver/extension.d.ts +4 -5
  204. package/dist/extensions/testserver/extension.js +14 -41
  205. package/dist/extensions/testserver/index.d.ts +1 -1
  206. package/dist/extensions/testserver/index.js +1 -1
  207. package/dist/extensions/testserver/lifecycle.d.ts +10 -2
  208. package/dist/extensions/testserver/lifecycle.js +29 -6
  209. package/dist/extensions/testserver/options/rules.d.ts +5 -5
  210. package/dist/extensions/testserver/options/rules.js +10 -8
  211. package/dist/extensions/testserver/options/sandboxes.d.ts +4 -2
  212. package/dist/extensions/testserver/options/sandboxes.js +8 -3
  213. package/dist/extensions/testserver/pool/gateways.d.ts +29 -4
  214. package/dist/extensions/testserver/pool/index.d.ts +2 -2
  215. package/dist/extensions/testserver/pool/index.js +1 -1
  216. package/dist/extensions/testserver/pool/lease.d.ts +10 -0
  217. package/dist/extensions/testserver/pool/lease.js +21 -0
  218. package/dist/extensions/testserver/pool/live/pool-store-gateway.js +38 -3
  219. package/dist/extensions/testserver/refusals.d.ts +12 -0
  220. package/dist/extensions/testserver/refusals.js +18 -0
  221. package/dist/extensions/testserver/release.d.ts +16 -0
  222. package/dist/extensions/testserver/release.js +56 -4
  223. package/dist/extensions/testserver/resource.d.ts +4 -4
  224. package/dist/extensions/testserver/resource.js +1 -1
  225. package/dist/extensions/testserver/split.d.ts +9 -0
  226. package/dist/extensions/testserver/split.js +22 -0
  227. package/dist/extensions/testserver/vitest/fixtures.d.ts +5 -5
  228. package/dist/extensions/testserver/vitest/fixtures.js +9 -38
  229. package/dist/extensions/vitest/driver.d.ts +7 -0
  230. package/dist/extensions/vitest/driver.js +33 -37
  231. package/dist/extensions/vitest/extension.js +1 -1
  232. package/dist/extensions/vitest/plan/plan-over.d.ts +8 -1
  233. package/dist/extensions/vitest/plan/plan-over.js +16 -2
  234. package/dist/extensions.d.ts +17 -16
  235. package/dist/extensions.js +5 -4
  236. package/dist/forward-sigterm.js +1 -1
  237. package/dist/launcher-resolvers/local-services.d.ts +1 -1
  238. package/dist/live-app.js +4 -3
  239. package/dist/local-services.js +1 -1
  240. package/dist/planning/driver-file-lists.d.ts +61 -0
  241. package/dist/planning/driver-file-lists.js +66 -0
  242. package/dist/{commands/exec → planning}/driver-refusals.d.ts +11 -10
  243. package/dist/{commands/exec → planning}/driver-refusals.js +18 -14
  244. package/dist/planning/file-lists-file.d.ts +58 -0
  245. package/dist/planning/file-lists-file.js +105 -0
  246. package/dist/planning/file-lists.d.ts +28 -0
  247. package/dist/planning/file-lists.js +52 -0
  248. package/dist/{commands/exec → planning}/final-results.d.ts +1 -1
  249. package/dist/{commands/exec → planning}/final-results.js +6 -6
  250. package/dist/planning/plan-only.d.ts +81 -0
  251. package/dist/planning/plan-only.js +83 -0
  252. package/dist/{commands/exec → planning}/redaction.d.ts +2 -2
  253. package/dist/{commands/exec → planning}/redaction.js +5 -4
  254. package/dist/{commands/exec → planning}/resource-flags.d.ts +5 -12
  255. package/dist/{commands/exec → planning}/resource-flags.js +6 -16
  256. package/dist/planning/run-kind-flags.d.ts +20 -0
  257. package/dist/planning/run-kind-flags.js +48 -0
  258. package/dist/planning/run-plan.d.ts +30 -0
  259. package/dist/planning/run-plan.js +4 -0
  260. package/dist/planning/sandbox-placeholders.d.ts +22 -0
  261. package/dist/planning/sandbox-placeholders.js +60 -0
  262. package/dist/planning/suite-not-found.d.ts +37 -0
  263. package/dist/planning/suite-not-found.js +36 -0
  264. package/dist/planning/suites.d.ts +43 -0
  265. package/dist/planning/suites.js +89 -0
  266. package/dist/{commands/exec → planning}/test-plan.d.ts +8 -3
  267. package/dist/{commands/exec → planning}/test-plan.js +32 -4
  268. package/dist/playwright/reporter.d.ts +20 -8
  269. package/dist/playwright/reporter.js +195 -15
  270. package/dist/presentation.d.ts +10 -6
  271. package/dist/presentation.js +13 -15
  272. package/dist/run-directory/gateways.d.ts +60 -4
  273. package/dist/run-directory/index.d.ts +4 -4
  274. package/dist/run-directory/index.js +2 -1
  275. package/dist/run-directory/live/run-directory-gateway.js +92 -16
  276. package/dist/run-directory/plan.d.ts +35 -2
  277. package/dist/run-directory/plan.js +44 -7
  278. package/dist/run-directory/reader.d.ts +26 -5
  279. package/dist/run-directory/reader.js +24 -1
  280. package/dist/run-directory/recording.d.ts +75 -49
  281. package/dist/run-directory/recording.js +214 -28
  282. package/dist/run-directory/run-directory.d.ts +22 -1
  283. package/dist/run-directory/run-directory.js +24 -0
  284. package/dist/run-directory/run-record.d.ts +144 -21
  285. package/dist/run-directory/run-record.js +118 -19
  286. package/dist/run-directory/timeline-facts.js +4 -4
  287. package/dist/runner/build-snapshots.d.ts +7 -7
  288. package/dist/runner/build-snapshots.js +12 -16
  289. package/dist/runner/events.d.ts +29 -8
  290. package/dist/runner/gateways.d.ts +49 -6
  291. package/dist/runner/index.d.ts +6 -4
  292. package/dist/runner/index.js +3 -2
  293. package/dist/runner/live/sandbox-gateway.js +161 -31
  294. package/dist/runner/network-policy.d.ts +55 -0
  295. package/dist/runner/network-policy.js +46 -0
  296. package/dist/runner/policy-writes.d.ts +40 -0
  297. package/dist/runner/policy-writes.js +124 -0
  298. package/dist/runner/prepare.d.ts +6 -7
  299. package/dist/runner/ready.d.ts +39 -10
  300. package/dist/runner/ready.js +59 -47
  301. package/dist/runner/recipe-check.d.ts +6 -0
  302. package/dist/runner/recipe-check.js +29 -0
  303. package/dist/runner/recipe-secrets.d.ts +67 -0
  304. package/dist/runner/recipe-secrets.js +230 -0
  305. package/dist/runner/recipe.d.ts +115 -26
  306. package/dist/runner/recipe.js +147 -154
  307. package/dist/runner/sandboxed-command.d.ts +22 -8
  308. package/dist/runner/sandboxed-command.js +33 -10
  309. package/dist/runner/scope.d.ts +107 -21
  310. package/dist/runner/scope.js +274 -54
  311. package/dist/runner/secrets.d.ts +42 -31
  312. package/dist/runner/secrets.js +62 -40
  313. package/dist/runner/session.d.ts +59 -26
  314. package/dist/runner/session.js +82 -41
  315. package/dist/runner/snapshot-build.d.ts +7 -4
  316. package/dist/runner/snapshot-build.js +48 -28
  317. package/dist/runner/snapshot-choice.d.ts +37 -0
  318. package/dist/runner/snapshot-choice.js +38 -0
  319. package/dist/runner/snapshot-key.d.ts +16 -14
  320. package/dist/runner/snapshot-key.js +24 -18
  321. package/dist/runner/steps.d.ts +13 -5
  322. package/dist/runner/steps.js +34 -4
  323. package/dist/runner/time-limit.d.ts +10 -0
  324. package/dist/runner/time-limit.js +43 -0
  325. package/dist/sdk/extension/commands.d.ts +1 -7
  326. package/dist/sdk/extension/driver.d.ts +39 -46
  327. package/dist/sdk/extension/driver.js +6 -6
  328. package/dist/sdk/extension/index.d.ts +3 -3
  329. package/dist/sdk/extension/index.js +3 -4
  330. package/dist/sdk/extension/lifecycle.d.ts +52 -9
  331. package/dist/sdk/extension/lifecycle.js +1 -1
  332. package/dist/sdk/extension/resource-definition.d.ts +13 -10
  333. package/dist/sdk/extension/resource-definition.js +7 -2
  334. package/dist/sdk/extension/resource.d.ts +2 -2
  335. package/dist/sdk/extension/secret-source.d.ts +58 -0
  336. package/dist/sdk/extension/secret-source.js +78 -0
  337. package/dist/sdk/index.d.ts +2 -2
  338. package/dist/sdk/index.js +1 -1
  339. package/dist/sdk/run/launcher.d.ts +1 -1
  340. package/dist/sdk/run/launcher.js +1 -1
  341. package/dist/sdk/run/payload.d.ts +16 -1
  342. package/dist/sdk/run/payload.js +17 -2
  343. package/dist/sdk/run/redact.js +2 -2
  344. package/dist/sdk/run/test-events.d.ts +23 -6
  345. package/dist/sdk/run/test-events.js +6 -4
  346. package/dist/sdk/run/test-result-writer.d.ts +8 -3
  347. package/dist/sdk/run/test-result-writer.js +22 -2
  348. package/dist/{commands/exec → shared}/cleanup.d.ts +3 -3
  349. package/dist/{commands/exec → shared}/cleanup.js +11 -6
  350. package/dist/shared/job-summary.d.ts +19 -0
  351. package/dist/{commands/exec → shared}/job-summary.js +17 -0
  352. package/dist/shared/sandbox-table.d.ts +48 -0
  353. package/dist/shared/sandbox-table.js +109 -0
  354. package/dist/{commands/exec → shared}/snapshot-text.d.ts +1 -1
  355. package/dist/{commands/exec → shared}/tests-summary.d.ts +22 -6
  356. package/dist/{commands/exec → shared}/tests-summary.js +74 -31
  357. package/dist/{commands/exec → shared}/text.d.ts +7 -2
  358. package/dist/{commands/exec → shared}/text.js +9 -1
  359. package/dist/{commands/exec → shared}/waterfall.d.ts +8 -6
  360. package/dist/{commands/exec → shared}/waterfall.js +71 -24
  361. package/dist/shared/worker-chart.d.ts +172 -0
  362. package/dist/shared/worker-chart.js +623 -0
  363. package/dist/vitest/config.d.ts +35 -11
  364. package/dist/vitest/config.js +47 -14
  365. package/dist/vitest/index.d.ts +1 -1
  366. package/dist/vitest/index.js +3 -3
  367. package/dist/vitest/sequencer.d.ts +23 -0
  368. package/dist/vitest/sequencer.js +73 -0
  369. package/dist/vitest/setup.d.ts +1 -0
  370. package/dist/vitest/setup.js +34 -0
  371. package/dist/vitest/test-events.d.ts +32 -6
  372. package/dist/vitest/test-events.js +25 -5
  373. package/dist/vitest/test-results.d.ts +8 -3
  374. package/dist/vitest/test-results.js +6 -0
  375. package/package.json +7 -2
  376. package/skills/overview.md +21 -17
  377. package/skills/plan-runs.md +67 -0
  378. package/skills/read-run-output.md +51 -19
  379. package/dist/chunks/chunk-E3QU74NX.js +0 -49
  380. package/dist/chunks/chunk-HP54VHGY.js +0 -201
  381. package/dist/chunks/chunk-NMVODY3P.js +0 -19
  382. package/dist/chunks/chunk-TVMEKVOW.js +0 -607
  383. package/dist/commands/exec/define-run-command.d.ts +0 -671
  384. package/dist/commands/exec/define-run-command.js +0 -91
  385. package/dist/commands/exec/job-summary.d.ts +0 -10
  386. package/dist/commands/exec/worker-chart.d.ts +0 -87
  387. package/dist/commands/exec/worker-chart.js +0 -343
  388. package/dist/commands/playwright/command.d.ts +0 -661
  389. package/dist/commands/playwright/command.js +0 -31
  390. package/dist/commands/playwright/metadata.js +0 -8
  391. package/dist/commands/vitest/command.d.ts +0 -662
  392. package/dist/commands/vitest/command.js +0 -31
  393. package/dist/commands/vitest/metadata.js +0 -8
  394. package/dist/sdk/extension/ci.d.ts +0 -2
  395. package/dist/sdk/extension/ci.js +0 -6
  396. package/dist/chunks/{chunk-YM6TZV4L.js → chunk-VL7WFTVQ.js} +52 -52
  397. package/dist/commands/{playwright → suites}/metadata.d.ts +1 -1
  398. package/dist/commands/{vitest → test}/metadata.d.ts +1 -1
  399. /package/dist/{commands → shared}/dashboard.d.ts +0 -0
  400. /package/dist/{commands → shared}/dashboard.js +0 -0
  401. /package/dist/{commands/exec → shared}/snapshot-text.js +0 -0
@@ -1,34 +1,43 @@
1
- export type { GitHubFixtureRepoOptions } from "./options.ts";
1
+ export type { GitHubFixtureRepoOptions, GitHubFixtureRepoToken } from "./options.ts";
2
2
  export type { GitHubFixtureRepoPayload } from "./run/payload.ts";
3
+ export type { SecretSource } from "../../sdk/extension/index.ts";
3
4
  /**
4
5
  * The GitHub fixture repository resource, for `resources.githubFixtureRepo` in `storm.config.ts`: one standing GitHub
5
- * repository a run hands its command, with a token for it and a branch prefix of the run's own.
6
+ * repository a run hands its command, with a branch prefix of the run's own.
6
7
  *
7
8
  * ```ts
8
- * resources: { githubFixtureRepo: githubFixtureRepo({ repo: "owner/name", tokenEnv: "CNC_GITHUB_FIXTURE_TOKEN" }) }
9
+ * resources: {
10
+ * githubFixtureRepo: githubFixtureRepo({
11
+ * repo: "owner/name",
12
+ * token: { source: { kind: "env", name: "CNC_GITHUB_FIXTURE_TOKEN" } },
13
+ * }),
14
+ * }
9
15
  * ```
10
16
  *
11
- * `repo` and `tokenEnv` are required. A run with the resource reads the token from the launcher environment variable
12
- * `tokenEnv`, checks that the token can read `repo`, picks a run prefix (`run/<UTC timestamp>-<suffix>`), and hands all
13
- * three to its command in the run payload. Once the command has stopped, the run deletes every branch under the run
14
- * prefix. With `optional: true`, or `storm exec`'s and `storm vitest`'s `--github-optional`, a run without the token
15
- * goes on without the repository. A command reads the repository with `readRunPayload().get(githubFixtureRepoPayload)`,
16
- * from `@vercel/storm/github/payload`; a runner recipe reads its options with `run.get(githubFixtureRepo)`.
17
+ * `repo` and `token` are required. A run with the resource reads the token from `token.source`, checks that the token
18
+ * can read `repo`, picks a run prefix (`run/<UTC timestamp>-<suffix>`), and hands the repository and the prefix to its
19
+ * command in the run payload. The token never enters the runner sandbox: while the command runs, the firewall adds it
20
+ * to every request to `api.github.com` and `github.com`, so `git` over HTTPS needs no credential and `gh` needs only a
21
+ * placeholder `GH_TOKEN`, and a run with the resource needs a runner sandbox: storm refuses a run with no runner that
22
+ * uses it. Once the command has stopped, the run deletes every branch under the run prefix. With `optional: true`, or
23
+ * `storm exec`'s and `storm test`'s `--github-optional`, a run without the token goes on without the repository. A
24
+ * command reads the repository with `readRunPayload().get(githubFixtureRepoPayload)`, from
25
+ * `@vercel/storm/github/payload`; a runner recipe reads its options with `run.get(githubFixtureRepo)`.
17
26
  */
18
27
  export declare const githubFixtureRepo: import("../../sdk/extension/resource-factory.ts").ResourceFactory<import("../../sdk/extension/resource-definition.ts").ResourceDefinition<"githubFixtureRepo", {
19
28
  readonly repo: {
20
29
  readonly schema: import("zod").ZodString;
21
30
  readonly required: true;
22
31
  };
23
- readonly tokenEnv: {
24
- readonly schema: import("zod").ZodString;
32
+ readonly token: {
33
+ readonly schema: import("zod").ZodType<import("./options.ts").GitHubFixtureRepoToken, unknown, import("zod/v4/core").$ZodTypeInternals<import("./options.ts").GitHubFixtureRepoToken, unknown>>;
25
34
  readonly required: true;
26
35
  };
27
36
  readonly optional: {
28
37
  readonly schema: import("zod").ZodBoolean;
29
38
  readonly default: false;
30
39
  readonly flag: {
31
- readonly description: "Whether the run goes on without the GitHub fixture repository when the launcher environment variable its tokenEnv names is unset, overriding resources.githubFixtureRepo.optional in storm.config.ts; default false. --github-optional=false makes the repository required for this run, so a run without its token is refused with github_token_missing before anything starts. Gives the run the GitHub fixture repository resource, whose repo and tokenEnv only storm.config.ts gives.";
40
+ readonly description: "Whether the run goes on without the GitHub fixture repository when the launcher environment variable its token.source names is unset, overriding resources.githubFixtureRepo.optional in storm.config.ts; default false. --github-optional=false makes the repository required for this run, so a run without its token is refused with github_token_missing before anything starts. Gives the run the GitHub fixture repository resource, whose repo and token only storm.config.ts gives.";
32
41
  };
33
42
  };
34
43
  }, import("./run/payload.ts").GitHubFixtureRepoPayload, import("./context.ts").GitHubFixtureRepoContext>>;
@@ -5,17 +5,25 @@ import { resourceFactory } from "../../sdk/extension/index.js";
5
5
  import { githubFixtureRepoDefinition } from "./definition.js";
6
6
  /**
7
7
  * The GitHub fixture repository resource, for `resources.githubFixtureRepo` in `storm.config.ts`: one standing GitHub
8
- * repository a run hands its command, with a token for it and a branch prefix of the run's own.
8
+ * repository a run hands its command, with a branch prefix of the run's own.
9
9
  *
10
10
  * ```ts
11
- * resources: { githubFixtureRepo: githubFixtureRepo({ repo: "owner/name", tokenEnv: "CNC_GITHUB_FIXTURE_TOKEN" }) }
11
+ * resources: {
12
+ * githubFixtureRepo: githubFixtureRepo({
13
+ * repo: "owner/name",
14
+ * token: { source: { kind: "env", name: "CNC_GITHUB_FIXTURE_TOKEN" } },
15
+ * }),
16
+ * }
12
17
  * ```
13
18
  *
14
- * `repo` and `tokenEnv` are required. A run with the resource reads the token from the launcher environment variable
15
- * `tokenEnv`, checks that the token can read `repo`, picks a run prefix (`run/<UTC timestamp>-<suffix>`), and hands all
16
- * three to its command in the run payload. Once the command has stopped, the run deletes every branch under the run
17
- * prefix. With `optional: true`, or `storm exec`'s and `storm vitest`'s `--github-optional`, a run without the token
18
- * goes on without the repository. A command reads the repository with `readRunPayload().get(githubFixtureRepoPayload)`,
19
- * from `@vercel/storm/github/payload`; a runner recipe reads its options with `run.get(githubFixtureRepo)`.
19
+ * `repo` and `token` are required. A run with the resource reads the token from `token.source`, checks that the token
20
+ * can read `repo`, picks a run prefix (`run/<UTC timestamp>-<suffix>`), and hands the repository and the prefix to its
21
+ * command in the run payload. The token never enters the runner sandbox: while the command runs, the firewall adds it
22
+ * to every request to `api.github.com` and `github.com`, so `git` over HTTPS needs no credential and `gh` needs only a
23
+ * placeholder `GH_TOKEN`, and a run with the resource needs a runner sandbox: storm refuses a run with no runner that
24
+ * uses it. Once the command has stopped, the run deletes every branch under the run prefix. With `optional: true`, or
25
+ * `storm exec`'s and `storm test`'s `--github-optional`, a run without the token goes on without the repository. A
26
+ * command reads the repository with `readRunPayload().get(githubFixtureRepoPayload)`, from
27
+ * `@vercel/storm/github/payload`; a runner recipe reads its options with `run.get(githubFixtureRepo)`.
20
28
  */
21
29
  export const githubFixtureRepo = resourceFactory(githubFixtureRepoDefinition);
@@ -2,20 +2,20 @@ import type { PayloadCheckResult, PayloadContract } from "../../../sdk/run/launc
2
2
  /** The GitHub fixture repository resource's name: its key under `resources` in the config file and the run payload. */
3
3
  export declare const GITHUB_FIXTURE_REPO_NAME = "githubFixtureRepo";
4
4
  /**
5
- * The GitHub fixture repository a run hands its command: the HTTPS URL to clone it from, its `owner/name`, a token
6
- * for it, and the run prefix (`run/<UTC timestamp>-<suffix>`), the branches under which the run deletes once the
7
- * command has stopped. The token is test data limited to this repository; storm hides it in what it prints and
8
- * writes, and the command should too.
5
+ * The GitHub fixture repository a run hands its command: the HTTPS URL to clone it from, its `owner/name`, and the run
6
+ * prefix (`run/<UTC timestamp>-<suffix>`), the branches under which the run deletes once the command has stopped. It
7
+ * holds no credential: while the command runs, the runner sandbox's firewall adds the repository's token to every
8
+ * request to `api.github.com` and `github.com`, so `git` over HTTPS needs no credential, and `gh` needs only a
9
+ * `GH_TOKEN` of any non-empty value, which the firewall replaces.
9
10
  */
10
11
  export interface GitHubFixtureRepoPayload {
11
12
  readonly url: string;
12
13
  readonly nameWithOwner: string;
13
- readonly token: string;
14
14
  readonly runPrefix: string;
15
15
  }
16
16
  /**
17
17
  * The GitHub fixture repository's payload check: whether `section` is a `GitHubFixtureRepoPayload`, each field a
18
- * non-empty string. A refusal names the field, never its value, since the token is one.
18
+ * non-empty string. A refusal names the field, never its value.
19
19
  */
20
20
  export declare function checkGitHubFixtureRepoPayload(section: unknown): PayloadCheckResult<GitHubFixtureRepoPayload>;
21
21
  /**
@@ -7,21 +7,19 @@
7
7
  export const GITHUB_FIXTURE_REPO_NAME = "githubFixtureRepo";
8
8
  /**
9
9
  * The GitHub fixture repository's payload check: whether `section` is a `GitHubFixtureRepoPayload`, each field a
10
- * non-empty string. A refusal names the field, never its value, since the token is one.
10
+ * non-empty string. A refusal names the field, never its value.
11
11
  */
12
12
  export function checkGitHubFixtureRepoPayload(section) {
13
13
  if (!isObject(section))
14
14
  return { ok: false, at: [], problem: "must be an object" };
15
- const { url, nameWithOwner, token, runPrefix } = section;
15
+ const { url, nameWithOwner, runPrefix } = section;
16
16
  if (!filled(url))
17
17
  return refused("url");
18
18
  if (!filled(nameWithOwner))
19
19
  return refused("nameWithOwner");
20
- if (!filled(token))
21
- return refused("token");
22
20
  if (!filled(runPrefix))
23
21
  return refused("runPrefix");
24
- return { ok: true, value: { url, nameWithOwner, token, runPrefix } };
22
+ return { ok: true, value: { url, nameWithOwner, runPrefix } };
25
23
  }
26
24
  /** Whether `value` is a JSON object: not `null`, and not an array. */
27
25
  function isObject(value) {
@@ -0,0 +1,10 @@
1
+ import type { SplitAnswer, SplitInput } from "../../sdk/extension/index.ts";
2
+ import type { GitHubFixtureRepoPayload } from "./run/payload.ts";
3
+ /**
4
+ * Hands every runner sandbox the whole payload: the same repository, token, and run prefix. The run opens the
5
+ * repository once and deletes the branches under the run prefix once, after every runner sandbox has ended, so the
6
+ * runner sandboxes share one run prefix and a branch name under it must be the name of one runner sandbox only. A
7
+ * command that names its branches by its test, as a test runner's tests do when each test runs in one runner sandbox,
8
+ * keeps to that. It never refuses.
9
+ */
10
+ export declare function splitFixtureRepo({ payload, sandboxes, }: SplitInput<GitHubFixtureRepoPayload>): SplitAnswer<GitHubFixtureRepoPayload>;
@@ -0,0 +1,12 @@
1
+ // The GitHub fixture repository's split: what a run across runner sandboxes hands each runner sandbox of the repository
2
+ // the run opened. Pure: it reads only the payload and the number of runner sandboxes.
3
+ /**
4
+ * Hands every runner sandbox the whole payload: the same repository, token, and run prefix. The run opens the
5
+ * repository once and deletes the branches under the run prefix once, after every runner sandbox has ended, so the
6
+ * runner sandboxes share one run prefix and a branch name under it must be the name of one runner sandbox only. A
7
+ * command that names its branches by its test, as a test runner's tests do when each test runs in one runner sandbox,
8
+ * keeps to that. It never refuses.
9
+ */
10
+ export function splitFixtureRepo({ payload, sandboxes, }) {
11
+ return { parts: Array.from({ length: sandboxes }, () => payload) };
12
+ }
@@ -1,9 +1,8 @@
1
- // storm's Playwright driver: what the launcher knows of Playwright, the program `storm playwright`'s command starts. It
2
- // names the binary, builds the `playwright test` argv, counts the tests, where `storm.config.ts` sets `testPlan`, with
3
- // `playwright test --list` through its gateway (`plan/`), a test once per Playwright project that runs it, and holds
4
- // the words that name Playwright: `storm playwright`'s leaf help, what its run's summary says to do next, and what its
5
- // two refusals say. The launcher makes `storm playwright` from it (`defineRunCommand`), reaching it through the
6
- // registry (`src/extensions.ts`).
1
+ // storm's Playwright driver: what the launcher knows of Playwright when `storm.config.ts` selects
2
+ // `driver: "playwright"` for `storm test`. It names the binary, builds the `playwright test` argv, counts the tests
3
+ // (where `storm.config.ts` sets `testPlan` or `--count-tests` is passed) with `playwright test --list` through its
4
+ // gateway (`plan/`), a test once per Playwright project that runs it, and holds the words that name Playwright in the
5
+ // run's summary and its two refusals.
7
6
  import { argsText, defineDriver } from "../../sdk/extension/index.js";
8
7
  import { describePlaywrightListFailure, livePlaywrightListGateway, planPlaywrightRun, playwrightRunArgv, } from "./plan/plan.js";
9
8
  export const playwrightDriver = defineDriver({
@@ -20,23 +19,6 @@ export const playwrightDriver = defineDriver({
20
19
  const { failure } = planned;
21
20
  return { ok: false, kind: failure.kind, message: describePlaywrightListFailure(failure) };
22
21
  },
23
- help: {
24
- usage: "[<playwright test args>...] [-- <playwright dash options>...]",
25
- args: "What playwright test gets, unchanged and in order: every argument that isn't one of storm's flags, such as file filters, then everything after --, such as --project or --grep. Give file filters before --: Playwright reads each argument after --project as another project. playwright test --list gets the same arguments when it counts the tests, where storm.config.ts sets testPlan.",
26
- // Nothing storm brings a Playwright project reads the run payload's `verbose`: storm's Playwright reporter never
27
- // prints (`printsToStdio()` is false).
28
- verbose: "which test code can read; storm's Playwright reporter prints nothing either way",
29
- examples: [
30
- {
31
- argv: "",
32
- description: "Run every test in a runner sandbox, with the runner recipe, team, project and resources from storm.config.ts. Where it sets testPlan, storm counts the tests first, and each resource that sizes itself is sized from that count.",
33
- },
34
- {
35
- argv: "--unsandboxed tests/login.spec.ts -- --project chromium",
36
- description: "Run the chromium project's tests in tests/login.spec.ts on this machine.",
37
- },
38
- ],
39
- },
40
22
  hints: {
41
23
  // No final result: the Playwright config doesn't list storm's Playwright reporter, or a `--reporter` on
42
24
  // Playwright's command line replaced it. A config lists a reporter as a tuple of its module name.
@@ -45,17 +27,15 @@ export const playwrightDriver = defineDriver({
45
27
  // install storm under either of its npm names.
46
28
  addReporter: [
47
29
  'In the Playwright config the run loads (playwright.config.ts, or the file --config names), set reporter to a list that holds ["@vercel/storm/playwright/reporter"], as in defineConfig({ reporter: [["list"], ["@vercel/storm/playwright/reporter"]] }). If reporter already names reporters, keep them and add ["@vercel/storm/playwright/reporter"] to the list. In a package that installs storm as @cnc-tools/storm, name "@cnc-tools/storm/playwright/reporter".',
48
- "Remove any --reporter from the arguments given to playwright test, since it replaces the config's reporters, storm's among them. Then run the same storm playwright command again.",
30
+ "Remove any --reporter from the arguments given to playwright test, since it replaces the config's reporters, storm's among them. Then run the same storm test command again.",
49
31
  ],
50
32
  },
51
33
  refusals: {
52
34
  noMatchingTests: {
53
- description: "storm.config.ts sets testPlan, and playwright test --list found no test for the arguments given to playwright test, so nothing was minted, acquired or started.",
54
35
  message: ({ args, cwd }) => `playwright test --list found no test for playwright test ${argsText(args)} in ${cwd}. The command didn't run.`,
55
36
  next: ({ args }) => `Change the arguments given to playwright test (${argsText(args)}), then retry. Put Playwright's own dash options after --.`,
56
37
  },
57
38
  planFailed: {
58
- description: "storm couldn't plan the run: playwright wasn't found, or, where storm.config.ts sets testPlan, playwright test --list failed to start, didn't finish within 120s, exited other than 0, or wrote something other than a list of tests. Nothing was minted, acquired or started.",
59
39
  next: {
60
40
  "start-failed": "Install @playwright/test in the package, or run the command with storm exec, which needs no playwright.",
61
41
  "timed-out": "Check why playwright test --list doesn't finish, such as a config file that waits, then retry.",
@@ -1,5 +1,5 @@
1
1
  // The Playwright extension: storm's Playwright driver (`driver.ts`), which it lists for the registry
2
- // (`src/extensions.ts`). It brings no resource and no commands of its own: the launcher makes `storm playwright` from
2
+ // (`src/extensions.ts`). It brings no resource and no commands of its own: the launcher makes `storm test` from
3
3
  // the driver. The one value the folder hands the registry. What test code uses with Playwright is the test runner
4
4
  // library (`src/playwright/`), which knows nothing of this extension.
5
5
  import { defineExtension } from "../../sdk/extension/commands.js";
@@ -6,7 +6,7 @@ import {
6
6
  rejectedCredentialShape,
7
7
  rejectedCredentialText,
8
8
  testserverPoolDefinition
9
- } from "../../../../../chunks/chunk-UC6DULWY.js";
9
+ } from "../../../../../chunks/chunk-R7XVBZOY.js";
10
10
  import {
11
11
  CREATE_ATTEMPTS,
12
12
  DEFAULT_TTL_MINUTES,
@@ -19,20 +19,20 @@ import {
19
19
  parseTtl,
20
20
  resolvePrBuild,
21
21
  shortSha
22
- } from "../../../../../chunks/chunk-BRUIATTR.js";
22
+ } from "../../../../../chunks/chunk-CN4EFA5J.js";
23
+ import {
24
+ testserverCommands
25
+ } from "../../../../../chunks/chunk-5CCP36QQ.js";
23
26
  import {
24
27
  configErrors,
25
28
  credentialErrors,
26
29
  credentialSourceErrors
27
- } from "../../../../../chunks/chunk-I7AN3DIJ.js";
28
- import "../../../../../chunks/chunk-RA4L2ACU.js";
29
- import {
30
- testserverCommands
31
- } from "../../../../../chunks/chunk-GSC6SRTW.js";
30
+ } from "../../../../../chunks/chunk-L36GBUBB.js";
31
+ import "../../../../../chunks/chunk-AWBSONHB.js";
32
32
  import {
33
33
  defineOutcomes,
34
34
  renderOutcome
35
- } from "../../../../../chunks/chunk-YM6TZV4L.js";
35
+ } from "../../../../../chunks/chunk-VL7WFTVQ.js";
36
36
 
37
37
  // src/extensions/testserver/commands/pool/create/command.ts
38
38
  import { z as z2 } from "zod";
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  inspectPool
3
- } from "../../../../../chunks/chunk-BRUIATTR.js";
4
- import "../../../../../chunks/chunk-RA4L2ACU.js";
3
+ } from "../../../../../chunks/chunk-CN4EFA5J.js";
5
4
  import {
6
5
  testserverCommands
7
- } from "../../../../../chunks/chunk-GSC6SRTW.js";
6
+ } from "../../../../../chunks/chunk-5CCP36QQ.js";
7
+ import "../../../../../chunks/chunk-AWBSONHB.js";
8
8
  import {
9
9
  defineOutcomes,
10
10
  renderOutcome
11
- } from "../../../../../chunks/chunk-YM6TZV4L.js";
11
+ } from "../../../../../chunks/chunk-VL7WFTVQ.js";
12
12
 
13
13
  // src/extensions/testserver/commands/pool/list/command.ts
14
14
  import { z as z2 } from "zod";
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * The Testserver pool resource's definition, for `resources.testserverPool` in `storm.config.ts`: the Testserver
3
3
  * sandboxes a run leases or creates for its command. Its presence gives a run the Testserver pool; `testserverPool()`
4
- * takes every default. `storm vitest` and `storm exec` override each option with its own flag, `--testserver-<option>`,
4
+ * takes every default. `storm test` and `storm exec` override each option with its own flag, `--testserver-<option>`,
5
5
  * and `pool create` reads `build` and `ttl`. Its checks across options:
6
6
  *
7
7
  * - with `create` false, which creates no Testserver sandbox, a `ttl` from a flag is refused, and the file's is unused;
@@ -17,10 +17,10 @@
17
17
  export declare const testserverPoolDefinition: import("../../sdk/extension/resource-definition.ts").ResourceDefinition<"testserverPool", {
18
18
  readonly sandboxes: {
19
19
  readonly schema: import("zod").ZodNumber;
20
- readonly default: ({ testPlan }: import("../../sdk/extension/resource-definition.ts").PlannedRun) => number;
20
+ readonly default: ({ testPlan, sandboxes: runnerSandboxes }: import("../../sdk/extension/resource-definition.ts").PlannedRun) => number;
21
21
  readonly flag: {
22
22
  readonly valueLabel: "N";
23
- readonly description: "How many Testserver sandboxes the command gets, 1 to 32, overriding resources.testserverPool.sandboxes in storm.config.ts; default 1, or one per 4 test files when storm vitest or storm playwright counts them (testPlan in storm.config.ts), at most 8. Gives the run the Testserver pool.";
23
+ readonly description: "How many Testserver sandboxes the run gets in all, 1 to 32 and at least one for each runner sandbox, overriding resources.testserverPool.sandboxes in storm.config.ts; default 1, or one per 4 test files when storm test counts them (testPlan in storm.config.ts or --count-tests), at most 8. With --sandboxes, each runner sandbox gets its own part of them, and the default is at least 1 and at most 8 for each runner sandbox. Gives the run the Testserver pool.";
24
24
  };
25
25
  };
26
26
  readonly build: {
@@ -51,7 +51,7 @@ export declare const testserverPoolDefinition: import("../../sdk/extension/resou
51
51
  readonly schema: import("zod").ZodBoolean;
52
52
  readonly default: true;
53
53
  readonly flag: {
54
- readonly description: "Whether the run may create Testserver sandboxes, overriding resources.testserverPool.create in storm.config.ts; default true. --testserver-create=false runs only on Testserver sandboxes already in the pool, never minting for Testserver or creating: it needs no --scope or --project with --unsandboxed, and takes no --testserver-ttl. --testserver-create turns creating on over the file's create: false. Gives the run the Testserver pool.";
54
+ readonly description: "Whether the run may create Testserver sandboxes, overriding resources.testserverPool.create in storm.config.ts; default true. --testserver-create=false runs only on Testserver sandboxes already in the pool, never minting for Testserver or creating: it needs no --scope or --project with the launch machine runner, and takes no --testserver-ttl. --testserver-create turns creating on over the file's create: false. Gives the run the Testserver pool.";
55
55
  };
56
56
  };
57
57
  }, import("./run/connection.ts").TestserverConnection, import("./context.ts").TestserverPoolContext>;
@@ -3,11 +3,11 @@
3
3
  // options, its payload contract, its Context, its lifecycle and its progress (its lifecycle words its refusals in
4
4
  // `refusals.ts` and its result in `result.ts`). A config file makes its resource with its resource factory,
5
5
  // `testserverPool({ … })` (`resource.ts`, `@vercel/storm/testserver`). `config` loads and merges against it, and the
6
- // launcher makes `exec`'s, `vitest`'s and `playwright`'s flags and their help from it. Its name and its payload
6
+ // launcher makes `storm test`'s and `storm exec`'s flags and their help from it. Its name and its payload
7
7
  // contract are the SDK's Testserver connection (`src/sdk/testserver/connection.ts`), which a command and the Testserver
8
8
  // Vitest fixtures read the run payload's section through. It loads no Clinkr: the Testserver extension (`extension.ts`)
9
9
  // joins it with its commands.
10
- import { defineResource, optionKeyPath } from "../../sdk/extension/index.js";
10
+ import { defineResource, optionKeyPath, } from "../../sdk/extension/index.js";
11
11
  import { TESTSERVER_POOL_NAME, testserverConnection } from "./run/connection.js";
12
12
  import { testserverPoolLifecycle } from "./lifecycle.js";
13
13
  import { liveTestserverPoolContext } from "./live/context.js";
@@ -18,7 +18,7 @@ const NAME = TESTSERVER_POOL_NAME;
18
18
  /**
19
19
  * The Testserver pool resource's definition, for `resources.testserverPool` in `storm.config.ts`: the Testserver
20
20
  * sandboxes a run leases or creates for its command. Its presence gives a run the Testserver pool; `testserverPool()`
21
- * takes every default. `storm vitest` and `storm exec` override each option with its own flag, `--testserver-<option>`,
21
+ * takes every default. `storm test` and `storm exec` override each option with its own flag, `--testserver-<option>`,
22
22
  * and `pool create` reads `build` and `ttl`. Its checks across options:
23
23
  *
24
24
  * - with `create` false, which creates no Testserver sandbox, a `ttl` from a flag is refused, and the file's is unused;
@@ -35,34 +35,7 @@ export const testserverPoolDefinition = defineResource({
35
35
  name: NAME,
36
36
  flagPrefix: "testserver",
37
37
  options: testserverPoolRules,
38
- check: ({ minTimeLeft, ttl, create }) => {
39
- if (!create.value)
40
- return ttl.source === "flag"
41
- ? [
42
- {
43
- option: "ttl",
44
- problem: `doesn't apply with ${optionKeyPath(NAME, "create")}=false, which creates no Testserver sandbox`,
45
- involves: ["ttl", "create"],
46
- },
47
- ]
48
- : [];
49
- if (ttlMinutes({ ttl: ttl.value }) > minTimeLeftMinutes({ minTimeLeft: minTimeLeft.value }))
50
- return [];
51
- // Name the value that was given over the other's default: a file's or a flag's `minTimeLeft` against the default
52
- // `ttl` is the `minTimeLeft` that is too long.
53
- const problem = ttl.source === "default" && minTimeLeft.source !== "default"
54
- ? {
55
- option: "minTimeLeft",
56
- problem: `must be shorter than ${optionKeyPath(NAME, "ttl")} (${ttl.value}), not ${minTimeLeft.value}`,
57
- involves: ["minTimeLeft", "ttl"],
58
- }
59
- : {
60
- option: "ttl",
61
- problem: `must be longer than ${optionKeyPath(NAME, "minTimeLeft")} (${minTimeLeft.value}), not ${ttl.value}`,
62
- involves: ["ttl", "minTimeLeft"],
63
- };
64
- return [problem];
65
- },
38
+ check: (settings, run) => [...runnerSandboxProblems(settings.sandboxes, run.sandboxes), ...optionProblems(settings)],
66
39
  // Not the extension's own: the SDK's Testserver connection (`src/sdk/testserver/connection.ts`), its name and payload
67
40
  // check, which the Testserver Vitest fixtures read too. Every other value here is the extension's (`ResourceSpec`).
68
41
  payload: testserverConnection,
@@ -70,3 +43,40 @@ export const testserverPoolDefinition = defineResource({
70
43
  lifecycle: testserverPoolLifecycle,
71
44
  progress: testserverPoolProgress,
72
45
  });
46
+ function runnerSandboxProblems(sandboxes, runnerSandboxes) {
47
+ if (sandboxes.value >= runnerSandboxes)
48
+ return [];
49
+ return [
50
+ {
51
+ option: "sandboxes",
52
+ problem: `must be at least ${runnerSandboxes}, one Testserver sandbox for each of the run's ${runnerSandboxes} runner sandboxes, not ${sandboxes.value}`,
53
+ involves: ["sandboxes"],
54
+ },
55
+ ];
56
+ }
57
+ function optionProblems({ minTimeLeft, ttl, create, }) {
58
+ if (!create.value)
59
+ return ttl.source === "flag"
60
+ ? [
61
+ {
62
+ option: "ttl",
63
+ problem: `doesn't apply with ${optionKeyPath(NAME, "create")}=false, which creates no Testserver sandbox`,
64
+ involves: ["ttl", "create"],
65
+ },
66
+ ]
67
+ : [];
68
+ if (ttlMinutes({ ttl: ttl.value }) > minTimeLeftMinutes({ minTimeLeft: minTimeLeft.value }))
69
+ return [];
70
+ const problem = ttl.source === "default" && minTimeLeft.source !== "default"
71
+ ? {
72
+ option: "minTimeLeft",
73
+ problem: `must be shorter than ${optionKeyPath(NAME, "ttl")} (${ttl.value}), not ${minTimeLeft.value}`,
74
+ involves: ["minTimeLeft", "ttl"],
75
+ }
76
+ : {
77
+ option: "ttl",
78
+ problem: `must be longer than ${optionKeyPath(NAME, "minTimeLeft")} (${minTimeLeft.value}), not ${ttl.value}`,
79
+ involves: ["ttl", "minTimeLeft"],
80
+ };
81
+ return [problem];
82
+ }
@@ -1,16 +1,15 @@
1
1
  /**
2
2
  * The Testserver extension. Its one resource is the Testserver pool, `resources.testserverPool`. Its commands
3
3
  * (`command-tree.ts`) take `TestserverCommandApp`, which their mount projects from the launcher's app. Its run examples
4
- * show the Testserver pool's `--testserver-<option>` flags: those for `storm exec`, and those for the commands of the
5
- * drivers named `vitest` and `playwright`, which it names as plain strings and imports nothing of.
4
+ * show the Testserver pool's `--testserver-<option>` flags for `storm exec`.
6
5
  */
7
6
  export declare const testserverExtension: import("../../sdk/extension/commands.ts").Extension<"testserver", readonly [import("../../sdk/extension/resource-definition.ts").ResourceDefinition<"testserverPool", {
8
7
  readonly sandboxes: {
9
8
  readonly schema: import("zod").ZodNumber;
10
- readonly default: ({ testPlan }: import("../../sdk/extension/resource-definition.ts").PlannedRun) => number;
9
+ readonly default: ({ testPlan, sandboxes: runnerSandboxes }: import("../../sdk/extension/resource-definition.ts").PlannedRun) => number;
11
10
  readonly flag: {
12
11
  readonly valueLabel: "N";
13
- readonly description: "How many Testserver sandboxes the command gets, 1 to 32, overriding resources.testserverPool.sandboxes in storm.config.ts; default 1, or one per 4 test files when storm vitest or storm playwright counts them (testPlan in storm.config.ts), at most 8. Gives the run the Testserver pool.";
12
+ readonly description: "How many Testserver sandboxes the run gets in all, 1 to 32 and at least one for each runner sandbox, overriding resources.testserverPool.sandboxes in storm.config.ts; default 1, or one per 4 test files when storm test counts them (testPlan in storm.config.ts or --count-tests), at most 8. With --sandboxes, each runner sandbox gets its own part of them, and the default is at least 1 and at most 8 for each runner sandbox. Gives the run the Testserver pool.";
14
13
  };
15
14
  };
16
15
  readonly build: {
@@ -41,7 +40,7 @@ export declare const testserverExtension: import("../../sdk/extension/commands.t
41
40
  readonly schema: import("zod").ZodBoolean;
42
41
  readonly default: true;
43
42
  readonly flag: {
44
- readonly description: "Whether the run may create Testserver sandboxes, overriding resources.testserverPool.create in storm.config.ts; default true. --testserver-create=false runs only on Testserver sandboxes already in the pool, never minting for Testserver or creating: it needs no --scope or --project with --unsandboxed, and takes no --testserver-ttl. --testserver-create turns creating on over the file's create: false. Gives the run the Testserver pool.";
43
+ readonly description: "Whether the run may create Testserver sandboxes, overriding resources.testserverPool.create in storm.config.ts; default true. --testserver-create=false runs only on Testserver sandboxes already in the pool, never minting for Testserver or creating: it needs no --scope or --project with the launch machine runner, and takes no --testserver-ttl. --testserver-create turns creating on over the file's create: false. Gives the run the Testserver pool.";
45
44
  };
46
45
  };
47
46
  }, import("./run/connection.ts").TestserverConnection, import("./context.ts").TestserverPoolContext>], import("./commands/app.ts").TestserverLauncherApp, readonly []>;
@@ -1,16 +1,15 @@
1
1
  // The Testserver extension: the Testserver pool resource's definition (`definition.ts`) joined with its own commands,
2
- // `pool create` and `pool list`, mounted as `storm ext testserver`, and the run examples its flags bring to `exec`'s,
3
- // `vitest`'s and `playwright`'s help. The one value the folder hands the registry (`src/extensions.ts`). It imports
4
- // every part statically: a config file loads only `resource.ts` and its definition, which load no Clinkr, and the
5
- // registry loads this when a command runs.
2
+ // `pool create` and `pool list`, mounted as `storm ext testserver`, and the run examples its flags bring to
3
+ // `storm exec`'s help. The one value the folder hands the registry (`src/extensions.ts`). It imports every part
4
+ // statically: a config file loads only `resource.ts` and its definition, which load no Clinkr, and the registry loads
5
+ // this when a command runs.
6
6
  import { defineExtension } from "../../sdk/extension/commands.js";
7
7
  import { testserverExtensionCommands } from "./command-tree.js";
8
8
  import { testserverPoolDefinition } from "./definition.js";
9
9
  /**
10
10
  * The Testserver extension. Its one resource is the Testserver pool, `resources.testserverPool`. Its commands
11
11
  * (`command-tree.ts`) take `TestserverCommandApp`, which their mount projects from the launcher's app. Its run examples
12
- * show the Testserver pool's `--testserver-<option>` flags: those for `storm exec`, and those for the commands of the
13
- * drivers named `vitest` and `playwright`, which it names as plain strings and imports nothing of.
12
+ * show the Testserver pool's `--testserver-<option>` flags for `storm exec`.
14
13
  */
15
14
  export const testserverExtension = defineExtension({
16
15
  name: "testserver",
@@ -23,59 +22,33 @@ export const testserverExtension = defineExtension({
23
22
  description: "Run a script in a runner sandbox against 4 Testserver sandboxes.",
24
23
  },
25
24
  {
26
- argv: "--unsandboxed --testserver-sandboxes 4 --scope vercel --project vercel -- pnpm test",
27
- description: "Run the tests on this machine against 4 Testserver sandboxes on the stable build channel.",
25
+ argv: "--runner launch-machine --testserver-sandboxes 4 --scope vercel --project vercel -- pnpm test",
26
+ description: "Run the tests on the launch machine against 4 Testserver sandboxes on the stable build channel.",
28
27
  },
29
28
  {
30
- argv: "--unsandboxed --testserver-ttl 30m --testserver-min-time-left 25m -- pnpm test",
29
+ argv: "--runner launch-machine --testserver-ttl 30m --testserver-min-time-left 25m -- pnpm test",
31
30
  description: "Create Testserver sandboxes that live 30 minutes, with team and project from storm.config.ts.",
32
31
  },
33
32
  {
34
- argv: "--unsandboxed --testserver-build pr:104196 -- pnpm test",
35
- description: "Run the tests on this machine against the Testserver build of vercel/api pull request 104196's head commit.",
33
+ argv: "--runner launch-machine --testserver-build pr:104196 -- pnpm test",
34
+ description: "Run the tests on the launch machine against the Testserver build of vercel/api pull request 104196's head commit.",
36
35
  },
37
36
  {
38
- argv: "--unsandboxed --testserver-create=false --testserver-sandboxes 4 -- pnpm test",
37
+ argv: "--runner launch-machine --testserver-create=false --testserver-sandboxes 4 -- pnpm test",
39
38
  description: "Run only on Testserver sandboxes already in the pool, never minting.",
40
39
  },
41
40
  {
42
- argv: "--unsandboxed --verbose --testserver-sandboxes 2 -- pnpm test",
41
+ argv: "--runner launch-machine --verbose --testserver-sandboxes 2 -- pnpm test",
43
42
  description: "Run the tests, printing each create's progress and, through storm's Vitest reporters, each test as it ends.",
44
43
  },
45
44
  {
46
- argv: "--unsandboxed --credential github-actions --testserver-ttl 30m --testserver-min-time-left 25m -- pnpm test",
45
+ argv: "--runner launch-machine --credential github-actions --testserver-ttl 30m --testserver-min-time-left 25m -- pnpm test",
47
46
  description: "In a GitHub Actions job, create Testserver sandboxes with a GitHub Actions OIDC token.",
48
47
  },
49
48
  {
50
- argv: "--unsandboxed --testserver-build latest_main --testserver-min-time-left 75m --scope vercel --project vercel -- pnpm test",
49
+ argv: "--runner launch-machine --testserver-build latest_main --testserver-min-time-left 75m --scope vercel --project vercel -- pnpm test",
51
50
  description: "Run them on the newest main build, with Testserver sandboxes that live at least 75 more minutes.",
52
51
  },
53
52
  ],
54
- drivers: {
55
- vitest: [
56
- {
57
- argv: "--testserver-build pr:104196",
58
- description: "Run every test against the Testserver build of vercel/api pull request 104196's head commit.",
59
- },
60
- {
61
- argv: "--unsandboxed --testserver-create=false",
62
- description: "Run on this machine, on Testserver sandboxes already in the pool, never minting.",
63
- },
64
- {
65
- argv: "--testserver-sandboxes 6 -- --project testserver",
66
- description: "Run vitest's testserver project against 6 Testserver sandboxes, whatever the test count.",
67
- },
68
- ],
69
- playwright: [
70
- {
71
- argv: "--unsandboxed --testserver-sandboxes 1 -- --project chromium",
72
- description: "Run Playwright's chromium project on this machine against 1 Testserver sandbox.",
73
- },
74
- {
75
- argv: "--testserver-build pr:104196",
76
- description: "Run every test against the Testserver build of vercel/api pull request 104196's head commit.",
77
- },
78
- ],
79
- },
80
53
  },
81
54
  });
@@ -1,4 +1,4 @@
1
- export { testserverPoolReleased, testserverPoolReleasedText, testserverPoolReleaseWarnings } from "./release.ts";
1
+ export { testserverPoolDropped, testserverPoolDroppedText, testserverPoolDropWarnings, testserverPoolReleased, testserverPoolReleasedText, testserverPoolReleaseWarnings, } from "./release.ts";
2
2
  export { testserverCanceledLines } from "./canceled.ts";
3
3
  export { credentialRejected, noSandboxes, noUsableSandboxes, poolUnavailable, poolUnreadable, tokenRequestFailed, } from "./refusals.ts";
4
4
  export { prBuildRefusal } from "./pr-build-facts.ts";
@@ -11,7 +11,7 @@
11
11
  // `pool/` and `pull-request/` keep their own `index.ts` for the files in this folder; everything outside it imports
12
12
  // only this file: the registry. Its own commands, `pool create` and `pool list`, are `commands/pool/`, which
13
13
  // `src/extension-commands.ts` mounts as `storm ext testserver`. The rest of what it exports is for tests.
14
- export { testserverPoolReleased, testserverPoolReleasedText, testserverPoolReleaseWarnings } from "./release.js";
14
+ export { testserverPoolDropped, testserverPoolDroppedText, testserverPoolDropWarnings, testserverPoolReleased, testserverPoolReleasedText, testserverPoolReleaseWarnings, } from "./release.js";
15
15
  export { testserverCanceledLines } from "./canceled.js";
16
16
  export { credentialRejected, noSandboxes, noUsableSandboxes, poolUnavailable, poolUnreadable, tokenRequestFailed, } from "./refusals.js";
17
17
  export { prBuildRefusal } from "./pr-build-facts.js";
@@ -3,6 +3,7 @@ import type { TestserverConnection } from "./run/connection.ts";
3
3
  import type { TestserverPoolEvent } from "./events.ts";
4
4
  import type { TestserverPoolOptions, TestserverPoolSources } from "./options/index.ts";
5
5
  import { type TestserverPoolResult } from "./result.ts";
6
+ import { splitTestserverConnection } from "./split.ts";
6
7
  import type { TestserverPoolContext } from "./context.ts";
7
8
  /**
8
9
  * The Testserver pool's lifecycle over `context`. Its acquire takes the hosts it leases.
@@ -16,10 +17,17 @@ import type { TestserverPoolContext } from "./context.ts";
16
17
  * A mint that fails with no Testserver sandbox in hand answers `mintFailed`, which ends the run as the run's own
17
18
  * `mint_failed`.
18
19
  * - `releaseAfterRun` releases every lease, reports how many it released and each release that failed as a warning,
19
- * and answers, when none failed, that the run holds no lease.
20
+ * and answers, when none failed, that the run holds no lease. When the launcher didn't fence the run's runner
21
+ * sandbox (`runnerSandboxFenced` is false), it may still be running, and code in it still has each Testserver URL,
22
+ * so a released lease would hand a later run a Testserver sandbox the earlier run can still use. It then drops each
23
+ * Testserver sandbox it took from the pool instead (`dropLeasedEntries`), the pool entry and its lease together,
24
+ * reports how many it dropped and why, and warns that it did (`sandboxes_dropped`). A Testserver sandbox it couldn't
25
+ * drop keeps its lease, which a later run reclaims once this process exits, so it warns of each (`drop_failed`).
26
+ * Nothing deletes a Testserver sandbox: a dropped one runs until its TTL ends.
20
27
  */
21
28
  export declare function testserverPoolLifecycle(context: TestserverPoolContext): {
22
29
  beforeRun: ({ options, }: BeforeRunInput<TestserverPoolOptions, TestserverPoolSources>) => Promise<BeforeRunAnswer<NoSecrets>>;
23
30
  acquireForRun: ({ options, credential, take, report, signal, }: AcquireForRunInput<TestserverPoolOptions, NoSecrets, string, TestserverPoolEvent>) => Promise<AcquireForRunAnswer<TestserverConnection, TestserverPoolResult, TestserverPoolEvent>>;
24
- releaseAfterRun: ({ taken, report, }: ReleaseAfterRunInput<string, TestserverPoolEvent>) => Promise<ReleaseAfterRunAnswer>;
31
+ split: typeof splitTestserverConnection;
32
+ releaseAfterRun: ({ taken, runnerSandboxFenced, report, }: ReleaseAfterRunInput<string, TestserverPoolEvent>) => Promise<ReleaseAfterRunAnswer>;
25
33
  };