@cnc-tools/storm 0.14.2 → 0.16.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 (414) 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-2MAD5NKK.js +108 -0
  5. package/dist/chunks/{chunk-HDL4WKIB.js → chunk-3L52KNQA.js} +2 -2
  6. package/dist/chunks/{chunk-GSC6SRTW.js → chunk-5CCP36QQ.js} +1 -1
  7. package/dist/chunks/{chunk-43MWZLJR.js → chunk-5VXBKPW6.js} +1 -1
  8. package/dist/chunks/chunk-7EENF73W.js +782 -0
  9. package/dist/chunks/{chunk-RA4L2ACU.js → chunk-AWBSONHB.js} +88 -34
  10. package/dist/chunks/chunk-CK2GZEPK.js +40 -0
  11. package/dist/chunks/{chunk-BRUIATTR.js → chunk-CN4EFA5J.js} +59 -12
  12. package/dist/chunks/{chunk-I7AN3DIJ.js → chunk-DC2CDHNK.js} +1928 -738
  13. package/dist/chunks/{chunk-UUBZTGLV.js → chunk-DWEAHX4T.js} +140 -130
  14. package/dist/chunks/{chunk-T6AZIDZD.js → chunk-F6N34UWB.js} +12 -244
  15. package/dist/chunks/chunk-FCQUJDA4.js +963 -0
  16. package/dist/chunks/{chunk-VH2POPW5.js → chunk-FOZWA52V.js} +635 -79
  17. package/dist/chunks/{chunk-XZCDA5PE.js → chunk-G3PHMXH5.js} +7 -2
  18. package/dist/chunks/{chunk-3HBPNQ4Y.js → chunk-HVNK3I45.js} +2 -2
  19. package/dist/chunks/chunk-OIY3DMF2.js +74 -0
  20. package/dist/chunks/{chunk-GJOEPJJL.js → chunk-P357TZAY.js} +446 -52
  21. package/dist/chunks/{chunk-UC6DULWY.js → chunk-R7XVBZOY.js} +130 -39
  22. package/dist/chunks/chunk-TJNFVNKR.js +246 -0
  23. package/dist/chunks/{chunk-RUPD4TLT.js → chunk-V4IKA3WI.js} +198 -63
  24. package/dist/chunks/{chunk-BW2ADH7U.js → chunk-VUPZH7J2.js} +1 -1
  25. package/dist/chunks/{chunk-LUOHJ3LB.js → chunk-Z5PBVG3Y.js} +1131 -468
  26. package/dist/chunks/{chunk-GQIL3AHY.js → chunk-ZG3WQ4UF.js} +1 -1
  27. package/dist/chunks/{live-app-SZGEILCQ.js → live-app-WECQOQ4C.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 +230 -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 +583 -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 +533 -73
  46. package/dist/commands/exec/outcomes.js +203 -67
  47. package/dist/commands/exec/plan-only.d.ts +10 -0
  48. package/dist/commands/exec/plan-only.js +45 -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 +42 -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 +344 -63
  60. package/dist/commands/exec/run-command.js +312 -263
  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 +53 -10
  74. package/dist/commands/runs/facts.js +60 -32
  75. package/dist/commands/runs/list/command.d.ts +82 -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 +41 -2
  79. package/dist/commands/runs/logs/command.d.ts +109 -10
  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 +52 -3
  84. package/dist/commands/runs/logs/outcomes.js +110 -6
  85. package/dist/commands/runs/past-run.d.ts +91 -11
  86. package/dist/commands/runs/past-run.js +149 -9
  87. package/dist/commands/runs/show/command.d.ts +574 -12
  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 +279 -6
  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 +5 -1
  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 +163 -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 +1395 -0
  113. package/dist/commands/test/command.js +581 -0
  114. package/dist/commands/test/metadata.js +8 -0
  115. package/dist/commands/test/outcomes.d.ts +768 -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 +125 -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 +15 -0
  124. package/dist/config/check-runner.js +79 -0
  125. package/dist/config/check-suites.d.ts +14 -0
  126. package/dist/config/check-suites.js +100 -0
  127. package/dist/config/gateways.d.ts +31 -3
  128. package/dist/config/index.d.ts +8 -6
  129. package/dist/config/index.js +5 -4
  130. package/dist/config/live/config-gateway.js +5 -2
  131. package/dist/config/live/file-lists-file-gateway.d.ts +4 -0
  132. package/dist/config/live/file-lists-file-gateway.js +27 -0
  133. package/dist/config/load.d.ts +32 -14
  134. package/dist/config/load.js +162 -116
  135. package/dist/config/resolve.d.ts +3 -2
  136. package/dist/config/resolve.js +6 -3
  137. package/dist/config/resolver.d.ts +20 -6
  138. package/dist/config/resolver.js +11 -8
  139. package/dist/config/runner.d.ts +23 -0
  140. package/dist/config/runner.js +4 -0
  141. package/dist/config/schema.d.ts +39 -19
  142. package/dist/config/schema.js +50 -10
  143. package/dist/config/settings-file.d.ts +9 -3
  144. package/dist/config/settings-file.js +41 -4
  145. package/dist/config/suite.d.ts +39 -0
  146. package/dist/config/suite.js +5 -0
  147. package/dist/config/typed-options.d.ts +1 -6
  148. package/dist/config/typed-options.js +2 -10
  149. package/dist/config-file/define.d.ts +45 -24
  150. package/dist/config-file/define.js +9 -8
  151. package/dist/config-file/runner.d.ts +11 -0
  152. package/dist/config-file/runner.js +9 -0
  153. package/dist/config-file/toolchain.d.ts +13 -7
  154. package/dist/config-file/toolchain.js +51 -35
  155. package/dist/context.d.ts +12 -8
  156. package/dist/context.js +9 -3
  157. package/dist/core/across-sandboxes.d.ts +43 -0
  158. package/dist/core/across-sandboxes.js +319 -0
  159. package/dist/core/before-run.d.ts +5 -3
  160. package/dist/core/before-run.js +12 -1
  161. package/dist/core/events.d.ts +62 -6
  162. package/dist/core/events.js +14 -0
  163. package/dist/core/index.d.ts +4 -2
  164. package/dist/core/index.js +3 -1
  165. package/dist/core/payload.d.ts +2 -1
  166. package/dist/core/payload.js +2 -1
  167. package/dist/core/presentations.js +1 -1
  168. package/dist/core/resource.d.ts +1 -1
  169. package/dist/core/resources.d.ts +56 -6
  170. package/dist/core/resources.js +81 -5
  171. package/dist/core/run-state.js +9 -0
  172. package/dist/core/run.d.ts +77 -15
  173. package/dist/core/run.js +150 -86
  174. package/dist/core/sandbox-end.d.ts +64 -0
  175. package/dist/core/sandbox-end.js +128 -0
  176. package/dist/core/timeline.d.ts +4 -4
  177. package/dist/core/timeline.js +3 -3
  178. package/dist/credential/live/vercel-cli-gateway.d.ts +7 -0
  179. package/dist/credential/live/vercel-cli-gateway.js +14 -1
  180. package/dist/extensions/github/context.d.ts +1 -1
  181. package/dist/extensions/github/definition.d.ts +11 -9
  182. package/dist/extensions/github/definition.js +8 -6
  183. package/dist/extensions/github/extension.d.ts +3 -3
  184. package/dist/extensions/github/fixture-repo.d.ts +21 -2
  185. package/dist/extensions/github/fixture-repo.js +31 -2
  186. package/dist/extensions/github/index.d.ts +2 -2
  187. package/dist/extensions/github/index.js +2 -2
  188. package/dist/extensions/github/lifecycle.d.ts +16 -6
  189. package/dist/extensions/github/lifecycle.js +42 -25
  190. package/dist/extensions/github/options.d.ts +17 -11
  191. package/dist/extensions/github/options.js +14 -13
  192. package/dist/extensions/github/refusals.d.ts +23 -6
  193. package/dist/extensions/github/refusals.js +34 -12
  194. package/dist/extensions/github/resource.d.ts +21 -12
  195. package/dist/extensions/github/resource.js +16 -8
  196. package/dist/extensions/github/run/payload.d.ts +6 -6
  197. package/dist/extensions/github/run/payload.js +3 -5
  198. package/dist/extensions/github/split.d.ts +10 -0
  199. package/dist/extensions/github/split.js +12 -0
  200. package/dist/extensions/playwright/driver.js +6 -26
  201. package/dist/extensions/playwright/extension.js +1 -1
  202. package/dist/extensions/testserver/commands/pool/create/command.js +8 -8
  203. package/dist/extensions/testserver/commands/pool/list/command.js +4 -4
  204. package/dist/extensions/testserver/definition.d.ts +4 -4
  205. package/dist/extensions/testserver/definition.js +41 -31
  206. package/dist/extensions/testserver/extension.d.ts +4 -5
  207. package/dist/extensions/testserver/extension.js +14 -41
  208. package/dist/extensions/testserver/index.d.ts +1 -1
  209. package/dist/extensions/testserver/index.js +1 -1
  210. package/dist/extensions/testserver/lifecycle.d.ts +10 -2
  211. package/dist/extensions/testserver/lifecycle.js +29 -6
  212. package/dist/extensions/testserver/options/rules.d.ts +5 -5
  213. package/dist/extensions/testserver/options/rules.js +10 -8
  214. package/dist/extensions/testserver/options/sandboxes.d.ts +4 -2
  215. package/dist/extensions/testserver/options/sandboxes.js +8 -3
  216. package/dist/extensions/testserver/pool/gateways.d.ts +29 -4
  217. package/dist/extensions/testserver/pool/index.d.ts +2 -2
  218. package/dist/extensions/testserver/pool/index.js +1 -1
  219. package/dist/extensions/testserver/pool/lease.d.ts +10 -0
  220. package/dist/extensions/testserver/pool/lease.js +21 -0
  221. package/dist/extensions/testserver/pool/live/pool-store-gateway.js +38 -3
  222. package/dist/extensions/testserver/refusals.d.ts +12 -0
  223. package/dist/extensions/testserver/refusals.js +18 -0
  224. package/dist/extensions/testserver/release.d.ts +16 -0
  225. package/dist/extensions/testserver/release.js +56 -4
  226. package/dist/extensions/testserver/resource.d.ts +6 -6
  227. package/dist/extensions/testserver/resource.js +3 -3
  228. package/dist/extensions/testserver/split.d.ts +9 -0
  229. package/dist/extensions/testserver/split.js +22 -0
  230. package/dist/extensions/testserver/vitest/fixtures.d.ts +5 -5
  231. package/dist/extensions/testserver/vitest/fixtures.js +9 -38
  232. package/dist/extensions/vitest/driver.d.ts +7 -0
  233. package/dist/extensions/vitest/driver.js +33 -37
  234. package/dist/extensions/vitest/extension.js +1 -1
  235. package/dist/extensions/vitest/plan/plan-over.d.ts +8 -1
  236. package/dist/extensions/vitest/plan/plan-over.js +16 -2
  237. package/dist/extensions.d.ts +17 -16
  238. package/dist/extensions.js +5 -4
  239. package/dist/forward-sigterm.js +1 -1
  240. package/dist/launcher-resolvers/local-services.d.ts +1 -1
  241. package/dist/live-app.js +4 -3
  242. package/dist/local-services.js +1 -1
  243. package/dist/planning/driver-file-lists.d.ts +61 -0
  244. package/dist/planning/driver-file-lists.js +66 -0
  245. package/dist/{commands/exec → planning}/driver-refusals.d.ts +11 -10
  246. package/dist/{commands/exec → planning}/driver-refusals.js +18 -14
  247. package/dist/planning/file-lists-file.d.ts +58 -0
  248. package/dist/planning/file-lists-file.js +105 -0
  249. package/dist/planning/file-lists.d.ts +28 -0
  250. package/dist/planning/file-lists.js +52 -0
  251. package/dist/{commands/exec → planning}/final-results.d.ts +1 -1
  252. package/dist/{commands/exec → planning}/final-results.js +6 -6
  253. package/dist/planning/plan-only.d.ts +84 -0
  254. package/dist/planning/plan-only.js +86 -0
  255. package/dist/{commands/exec → planning}/redaction.d.ts +2 -2
  256. package/dist/{commands/exec → planning}/redaction.js +5 -4
  257. package/dist/{commands/exec → planning}/resource-flags.d.ts +5 -12
  258. package/dist/{commands/exec → planning}/resource-flags.js +6 -16
  259. package/dist/planning/run-kind-flags.d.ts +20 -0
  260. package/dist/planning/run-kind-flags.js +48 -0
  261. package/dist/planning/run-plan.d.ts +29 -0
  262. package/dist/planning/run-plan.js +4 -0
  263. package/dist/planning/sandbox-placeholders.d.ts +22 -0
  264. package/dist/planning/sandbox-placeholders.js +60 -0
  265. package/dist/planning/suite-not-found.d.ts +37 -0
  266. package/dist/planning/suite-not-found.js +36 -0
  267. package/dist/planning/suites.d.ts +43 -0
  268. package/dist/planning/suites.js +89 -0
  269. package/dist/{commands/exec → planning}/test-plan.d.ts +8 -3
  270. package/dist/{commands/exec → planning}/test-plan.js +32 -5
  271. package/dist/playwright/reporter.d.ts +20 -8
  272. package/dist/playwright/reporter.js +195 -15
  273. package/dist/presentation.d.ts +10 -6
  274. package/dist/presentation.js +13 -15
  275. package/dist/run-directory/gateways.d.ts +60 -4
  276. package/dist/run-directory/index.d.ts +4 -4
  277. package/dist/run-directory/index.js +2 -1
  278. package/dist/run-directory/live/run-directory-gateway.js +92 -16
  279. package/dist/run-directory/plan.d.ts +35 -2
  280. package/dist/run-directory/plan.js +44 -7
  281. package/dist/run-directory/reader.d.ts +26 -5
  282. package/dist/run-directory/reader.js +24 -1
  283. package/dist/run-directory/recording.d.ts +75 -49
  284. package/dist/run-directory/recording.js +214 -28
  285. package/dist/run-directory/run-directory.d.ts +22 -1
  286. package/dist/run-directory/run-directory.js +24 -0
  287. package/dist/run-directory/run-record.d.ts +144 -21
  288. package/dist/run-directory/run-record.js +118 -19
  289. package/dist/run-directory/timeline-facts.js +4 -4
  290. package/dist/runner/base.d.ts +0 -6
  291. package/dist/runner/base.js +0 -15
  292. package/dist/runner/build-snapshots.d.ts +7 -7
  293. package/dist/runner/build-snapshots.js +19 -24
  294. package/dist/runner/events.d.ts +29 -8
  295. package/dist/runner/gateways.d.ts +54 -6
  296. package/dist/runner/index.d.ts +6 -4
  297. package/dist/runner/index.js +3 -2
  298. package/dist/runner/live/sandbox-gateway.js +173 -31
  299. package/dist/runner/network-policy.d.ts +55 -0
  300. package/dist/runner/network-policy.js +46 -0
  301. package/dist/runner/policy-writes.d.ts +40 -0
  302. package/dist/runner/policy-writes.js +124 -0
  303. package/dist/runner/prepare.d.ts +16 -16
  304. package/dist/runner/prepare.js +11 -12
  305. package/dist/runner/ready.d.ts +39 -10
  306. package/dist/runner/ready.js +59 -47
  307. package/dist/runner/recipe-check.d.ts +6 -0
  308. package/dist/runner/recipe-check.js +29 -0
  309. package/dist/runner/recipe-secrets.d.ts +67 -0
  310. package/dist/runner/recipe-secrets.js +230 -0
  311. package/dist/runner/recipe.d.ts +151 -63
  312. package/dist/runner/recipe.js +277 -200
  313. package/dist/runner/sandboxed-command.d.ts +22 -8
  314. package/dist/runner/sandboxed-command.js +33 -10
  315. package/dist/runner/scope.d.ts +107 -21
  316. package/dist/runner/scope.js +274 -54
  317. package/dist/runner/secrets.d.ts +42 -31
  318. package/dist/runner/secrets.js +62 -40
  319. package/dist/runner/session.d.ts +59 -26
  320. package/dist/runner/session.js +82 -41
  321. package/dist/runner/snapshot-build.d.ts +8 -5
  322. package/dist/runner/snapshot-build.js +56 -29
  323. package/dist/runner/snapshot-choice.d.ts +37 -0
  324. package/dist/runner/snapshot-choice.js +38 -0
  325. package/dist/runner/snapshot-inspect.d.ts +4 -4
  326. package/dist/runner/snapshot-inspect.js +7 -7
  327. package/dist/runner/snapshot-key.d.ts +27 -17
  328. package/dist/runner/snapshot-key.js +51 -26
  329. package/dist/runner/steps.d.ts +13 -5
  330. package/dist/runner/steps.js +34 -4
  331. package/dist/runner/time-limit.d.ts +10 -0
  332. package/dist/runner/time-limit.js +43 -0
  333. package/dist/sdk/extension/commands.d.ts +1 -7
  334. package/dist/sdk/extension/driver.d.ts +39 -46
  335. package/dist/sdk/extension/driver.js +6 -6
  336. package/dist/sdk/extension/index.d.ts +3 -3
  337. package/dist/sdk/extension/index.js +3 -4
  338. package/dist/sdk/extension/lifecycle.d.ts +52 -9
  339. package/dist/sdk/extension/lifecycle.js +1 -1
  340. package/dist/sdk/extension/resource-definition.d.ts +16 -12
  341. package/dist/sdk/extension/resource-definition.js +10 -4
  342. package/dist/sdk/extension/resource-factory.js +3 -4
  343. package/dist/sdk/extension/resource.d.ts +2 -2
  344. package/dist/sdk/extension/secret-source.d.ts +58 -0
  345. package/dist/sdk/extension/secret-source.js +78 -0
  346. package/dist/sdk/index.d.ts +2 -2
  347. package/dist/sdk/index.js +1 -1
  348. package/dist/sdk/run/launcher.d.ts +1 -1
  349. package/dist/sdk/run/launcher.js +1 -1
  350. package/dist/sdk/run/payload.d.ts +16 -1
  351. package/dist/sdk/run/payload.js +17 -2
  352. package/dist/sdk/run/present.d.ts +3 -3
  353. package/dist/sdk/run/present.js +1 -3
  354. package/dist/sdk/run/redact.js +2 -2
  355. package/dist/sdk/run/test-events.d.ts +23 -6
  356. package/dist/sdk/run/test-events.js +6 -4
  357. package/dist/sdk/run/test-result-writer.d.ts +8 -3
  358. package/dist/sdk/run/test-result-writer.js +22 -2
  359. package/dist/{commands/exec → shared}/cleanup.d.ts +3 -3
  360. package/dist/{commands/exec → shared}/cleanup.js +11 -6
  361. package/dist/shared/job-summary.d.ts +19 -0
  362. package/dist/{commands/exec → shared}/job-summary.js +17 -0
  363. package/dist/shared/sandbox-table.d.ts +48 -0
  364. package/dist/shared/sandbox-table.js +109 -0
  365. package/dist/{commands/exec → shared}/snapshot-text.d.ts +1 -1
  366. package/dist/{commands/exec → shared}/tests-summary.d.ts +22 -6
  367. package/dist/{commands/exec → shared}/tests-summary.js +74 -31
  368. package/dist/{commands/exec → shared}/text.d.ts +7 -2
  369. package/dist/{commands/exec → shared}/text.js +9 -1
  370. package/dist/{commands/exec → shared}/waterfall.d.ts +8 -6
  371. package/dist/{commands/exec → shared}/waterfall.js +71 -24
  372. package/dist/shared/worker-chart.d.ts +172 -0
  373. package/dist/shared/worker-chart.js +623 -0
  374. package/dist/vitest/config.d.ts +35 -11
  375. package/dist/vitest/config.js +47 -14
  376. package/dist/vitest/index.d.ts +1 -1
  377. package/dist/vitest/index.js +3 -3
  378. package/dist/vitest/sequencer.d.ts +23 -0
  379. package/dist/vitest/sequencer.js +73 -0
  380. package/dist/vitest/setup.d.ts +1 -0
  381. package/dist/vitest/setup.js +34 -0
  382. package/dist/vitest/test-events.d.ts +32 -6
  383. package/dist/vitest/test-events.js +25 -5
  384. package/dist/vitest/test-results.d.ts +8 -3
  385. package/dist/vitest/test-results.js +6 -0
  386. package/package.json +7 -2
  387. package/skills/overview.md +23 -17
  388. package/skills/plan-runs.md +67 -0
  389. package/skills/read-run-output.md +51 -19
  390. package/dist/chunks/chunk-E3QU74NX.js +0 -49
  391. package/dist/chunks/chunk-HP54VHGY.js +0 -201
  392. package/dist/chunks/chunk-NMVODY3P.js +0 -19
  393. package/dist/chunks/chunk-TVMEKVOW.js +0 -607
  394. package/dist/commands/exec/define-run-command.d.ts +0 -671
  395. package/dist/commands/exec/define-run-command.js +0 -91
  396. package/dist/commands/exec/job-summary.d.ts +0 -10
  397. package/dist/commands/exec/worker-chart.d.ts +0 -87
  398. package/dist/commands/exec/worker-chart.js +0 -343
  399. package/dist/commands/playwright/command.d.ts +0 -661
  400. package/dist/commands/playwright/command.js +0 -31
  401. package/dist/commands/playwright/metadata.js +0 -8
  402. package/dist/commands/vitest/command.d.ts +0 -662
  403. package/dist/commands/vitest/command.js +0 -31
  404. package/dist/commands/vitest/metadata.js +0 -8
  405. package/dist/config/recipe-run.d.ts +0 -26
  406. package/dist/config/recipe-run.js +0 -27
  407. package/dist/sdk/extension/ci.d.ts +0 -2
  408. package/dist/sdk/extension/ci.js +0 -6
  409. package/dist/chunks/{chunk-YM6TZV4L.js → chunk-VL7WFTVQ.js} +52 -52
  410. package/dist/commands/{playwright → suites}/metadata.d.ts +1 -1
  411. package/dist/commands/{vitest → test}/metadata.d.ts +1 -1
  412. /package/dist/{commands → shared}/dashboard.d.ts +0 -0
  413. /package/dist/{commands → shared}/dashboard.js +0 -0
  414. /package/dist/{commands/exec → shared}/snapshot-text.js +0 -0
@@ -1,11 +1,17 @@
1
1
  import type { CheckoutGateway } from "./gateways.ts";
2
- import { type CheckedRecipe, type ResolvedRunnerStep, type RunnerStep } from "./recipe.ts";
2
+ import { type CheckedRecipe, type RunnerStep } from "./recipe.ts";
3
3
  /**
4
4
  * Bump when a runner snapshot changes in a way its steps' text doesn't show (the scripts between the steps, what is
5
5
  * uploaded, the build sandbox), or the key's encoding changes, so earlier snapshots stop matching. 2 added each step's
6
- * runner secret names. 3 dropped dev snapshots.
6
+ * runner secret names. 3 dropped dev snapshots. 4 replaced per-step runner secret names with the recipe's credential
7
+ * source identities (`credentials=`). 5 added declared base files' paths and contents (`baseFiles=`).
7
8
  */
8
- export declare const SNAPSHOT_FORMAT = 3;
9
+ export declare const SNAPSHOT_FORMAT = 5;
10
+ /** One declared base file read from the base commit, to stage into `/vercel/sandbox/<path>` before toolchain steps. */
11
+ export interface DeclaredBaseFile {
12
+ readonly path: string;
13
+ readonly text: string;
14
+ }
9
15
  /** Where the repository lives in every runner and build sandbox. */
10
16
  export declare const SANDBOX_ROOT = "/vercel/sandbox";
11
17
  /** The names of the files uploaded to a sandbox's staging directory. */
@@ -32,22 +38,25 @@ export declare function baseIndexScript(base: string, staging: string): string;
32
38
  */
33
39
  export declare function applyScript(staging: string, root?: string): string;
34
40
  /**
35
- * The snapshot key: sha256 hex over `format=<SNAPSHOT_FORMAT>`, each toolchain step's label, script and
36
- * `secrets=<its runner secret names, sorted, joined with ",">`, the base-index script with the placeholders `<base>`
37
- * and `<staging>`, and each prebuild step's three fields the same way, joined with NUL. Every step gives all three, so a
38
- * step without runner secrets gives `secrets=`. The names are in the key, never the values: a step that gets another
39
- * secret may build another snapshot, and every machine with the same recipe shares one. The base isn't in the key: a
41
+ * The snapshot key: sha256 hex over `format=<SNAPSHOT_FORMAT>`, `credentials=<the secret source identities the recipe's
42
+ * credentials read, sorted, once each, joined with ",">`, `baseFiles=<count>` followed by each sorted declared base
43
+ * file's path and text, each toolchain step's label and script, the base-index script with the placeholders `<base>`
44
+ * and `<staging>`, and each prebuild step's label and script, joined with NUL. A recipe without credentials gives
45
+ * `credentials=`, and one without declared base files gives `baseFiles=0`. Every snapshot step gets every credential,
46
+ * so the source identities are in the key once, never the values, domains, or headers: a recipe that reads another
47
+ * source builds another snapshot, and every machine with the same recipe shares one. The base isn't in the key: a
40
48
  * cache entry records it beside the key.
41
49
  */
42
50
  export declare function snapshotKey(steps: {
51
+ readonly credentials: readonly string[];
52
+ readonly baseFiles: readonly DeclaredBaseFile[];
43
53
  readonly toolchains: readonly RunnerStep[];
44
54
  readonly prebuild: readonly RunnerStep[];
45
55
  }): string;
46
- /** A recipe's snapshot steps at one base and their key, or the step key whose function failed there and why. */
47
- export type SnapshotStepsAt = {
56
+ /** A recipe's snapshot inputs at one base and their key, or why a declared base file couldn't be read there. */
57
+ export type SnapshotInputsAt = {
48
58
  readonly ok: true;
49
- readonly toolchains: readonly ResolvedRunnerStep[];
50
- readonly prebuild: readonly ResolvedRunnerStep[];
59
+ readonly baseFiles: readonly DeclaredBaseFile[];
51
60
  readonly key: string;
52
61
  } | {
53
62
  readonly ok: false;
@@ -55,14 +64,15 @@ export type SnapshotStepsAt = {
55
64
  readonly problem: string;
56
65
  };
57
66
  /**
58
- * Evaluates `recipe`'s toolchain and prebuild steps at `base`, each step's runner secrets checked against the recipe's
59
- * `secrets`, and computes their snapshot key.
67
+ * Reads `recipe`'s declared base files at `base` and computes its snapshot key with the secret source identities the
68
+ * recipe's credentials read. Fails with `path: ["snapshot", "toolchains"]` if any declared base file is missing or
69
+ * unreadable at `base`.
60
70
  */
61
- export declare function snapshotStepsAt(checkout: CheckoutGateway, request: {
71
+ export declare function snapshotInputsAt(checkout: CheckoutGateway, request: {
62
72
  readonly repoRoot: string;
63
73
  readonly base: string;
64
74
  readonly recipe: {
65
75
  readonly snapshot: Pick<CheckedRecipe["snapshot"], "toolchains" | "prebuild">;
66
- readonly secrets: CheckedRecipe["secrets"];
76
+ readonly credentials: CheckedRecipe["credentials"];
67
77
  };
68
- }): Promise<SnapshotStepsAt>;
78
+ }): Promise<SnapshotInputsAt>;
@@ -1,15 +1,16 @@
1
1
  // What a runner snapshot is built from, and the scripts that commit a base in a build sandbox and a run's changes in
2
- // a runner sandbox. The snapshot key hashes the steps' text and the names of the runner secrets each gets, so editing
3
- // a step means a new snapshot.
2
+ // a runner sandbox. The snapshot key hashes the declared base files' paths and contents, the steps' text, and the
3
+ // secret source identities the recipe's credentials read, so editing a step or a declared base file means a new
4
+ // snapshot.
4
5
  import { createHash } from "node:crypto";
5
- import { baseStepContext } from "./base.js";
6
- import { resolveSteps } from "./recipe.js";
6
+ import { credentialSourceIds, declaredBaseFilePaths } from "./recipe.js";
7
7
  /**
8
8
  * Bump when a runner snapshot changes in a way its steps' text doesn't show (the scripts between the steps, what is
9
9
  * uploaded, the build sandbox), or the key's encoding changes, so earlier snapshots stop matching. 2 added each step's
10
- * runner secret names. 3 dropped dev snapshots.
10
+ * runner secret names. 3 dropped dev snapshots. 4 replaced per-step runner secret names with the recipe's credential
11
+ * source identities (`credentials=`). 5 added declared base files' paths and contents (`baseFiles=`).
11
12
  */
12
- export const SNAPSHOT_FORMAT = 3;
13
+ export const SNAPSHOT_FORMAT = 5;
13
14
  /** Where the repository lives in every runner and build sandbox. */
14
15
  export const SANDBOX_ROOT = "/vercel/sandbox";
15
16
  /** The names of the files uploaded to a sandbox's staging directory. */
@@ -69,18 +70,24 @@ export function applyScript(staging, root = SANDBOX_ROOT) {
69
70
  ], root);
70
71
  }
71
72
  /**
72
- * The snapshot key: sha256 hex over `format=<SNAPSHOT_FORMAT>`, each toolchain step's label, script and
73
- * `secrets=<its runner secret names, sorted, joined with ",">`, the base-index script with the placeholders `<base>`
74
- * and `<staging>`, and each prebuild step's three fields the same way, joined with NUL. Every step gives all three, so a
75
- * step without runner secrets gives `secrets=`. The names are in the key, never the values: a step that gets another
76
- * secret may build another snapshot, and every machine with the same recipe shares one. The base isn't in the key: a
73
+ * The snapshot key: sha256 hex over `format=<SNAPSHOT_FORMAT>`, `credentials=<the secret source identities the recipe's
74
+ * credentials read, sorted, once each, joined with ",">`, `baseFiles=<count>` followed by each sorted declared base
75
+ * file's path and text, each toolchain step's label and script, the base-index script with the placeholders `<base>`
76
+ * and `<staging>`, and each prebuild step's label and script, joined with NUL. A recipe without credentials gives
77
+ * `credentials=`, and one without declared base files gives `baseFiles=0`. Every snapshot step gets every credential,
78
+ * so the source identities are in the key once, never the values, domains, or headers: a recipe that reads another
79
+ * source builds another snapshot, and every machine with the same recipe shares one. The base isn't in the key: a
77
80
  * cache entry records it beside the key.
78
81
  */
79
82
  export function snapshotKey(steps) {
80
- const text = (list) => list.flatMap(({ label, script, secrets }) => [label, script, `secrets=${(secrets ?? []).toSorted().join(",")}`]);
83
+ const text = (list) => list.flatMap(({ label, script }) => [label, script]);
84
+ const baseFiles = [...steps.baseFiles].toSorted((a, b) => (a.path < b.path ? -1 : a.path > b.path ? 1 : 0));
81
85
  return createHash("sha256")
82
86
  .update([
83
87
  `format=${SNAPSHOT_FORMAT}`,
88
+ `credentials=${[...new Set(steps.credentials)].toSorted().join(",")}`,
89
+ `baseFiles=${baseFiles.length}`,
90
+ ...baseFiles.flatMap(({ path, text: content }) => [path, content]),
84
91
  ...text(steps.toolchains),
85
92
  baseIndexScript("<base>", "<staging>"),
86
93
  ...text(steps.prebuild),
@@ -88,22 +95,40 @@ export function snapshotKey(steps) {
88
95
  .digest("hex");
89
96
  }
90
97
  /**
91
- * Evaluates `recipe`'s toolchain and prebuild steps at `base`, each step's runner secrets checked against the recipe's
92
- * `secrets`, and computes their snapshot key.
98
+ * Reads `recipe`'s declared base files at `base` and computes its snapshot key with the secret source identities the
99
+ * recipe's credentials read. Fails with `path: ["snapshot", "toolchains"]` if any declared base file is missing or
100
+ * unreadable at `base`.
93
101
  */
94
- export async function snapshotStepsAt(checkout, request) {
95
- const context = baseStepContext(checkout, request);
96
- const { snapshot, secrets } = request.recipe;
97
- const toolchains = await resolveSteps(snapshot.toolchains, context, secrets);
98
- if (!toolchains.ok)
99
- return { ok: false, path: ["snapshot", "toolchains"], problem: toolchains.problem };
100
- const prebuild = await resolveSteps(snapshot.prebuild, context, secrets);
101
- if (!prebuild.ok)
102
- return { ok: false, path: ["snapshot", "prebuild"], problem: prebuild.problem };
102
+ export async function snapshotInputsAt(checkout, request) {
103
+ const { repoRoot, base, recipe } = request;
104
+ const { snapshot } = recipe;
105
+ const baseFiles = [];
106
+ for (const path of declaredBaseFilePaths(snapshot.toolchains)) {
107
+ const file = await checkout.readFileAt({ repoRoot, commit: base, path });
108
+ if (file.kind === "missing") {
109
+ return {
110
+ ok: false,
111
+ path: ["snapshot", "toolchains"],
112
+ problem: `declared base file "${path}" doesn't exist at base ${base.slice(0, 12)}`,
113
+ };
114
+ }
115
+ if (file.kind === "failed") {
116
+ return {
117
+ ok: false,
118
+ path: ["snapshot", "toolchains"],
119
+ problem: `can't read declared base file "${path}" at base ${base.slice(0, 12)}: ${file.failure.message}`,
120
+ };
121
+ }
122
+ baseFiles.push({ path, text: file.text });
123
+ }
103
124
  return {
104
125
  ok: true,
105
- toolchains: toolchains.steps,
106
- prebuild: prebuild.steps,
107
- key: snapshotKey({ toolchains: toolchains.steps, prebuild: prebuild.steps }),
126
+ baseFiles,
127
+ key: snapshotKey({
128
+ credentials: credentialSourceIds(recipe),
129
+ baseFiles,
130
+ toolchains: snapshot.toolchains,
131
+ prebuild: snapshot.prebuild,
132
+ }),
108
133
  };
109
134
  }
@@ -1,7 +1,7 @@
1
1
  import type { Clock } from "../time/index.ts";
2
- import { type RunnerFailure, type RunnerProgress, type RunnerSandboxCall, type RunnerStage, type RunnerStepPhase } from "./events.ts";
2
+ import { type NetworkPolicyPlace, type RunnerFailure, type RunnerProgress, type RunnerSandboxCall, type RunnerStage, type RunnerStepPhase } from "./events.ts";
3
3
  import type { RunnerSandbox, RunnerSandboxFailure, RunnerSandboxGateway, RunnerStartFailure } from "./gateways.ts";
4
- import type { RunnerSecrets } from "./secrets.ts";
4
+ import type { NetworkPolicyWriteFailure } from "./network-policy.ts";
5
5
  /** Every step's environment: no Git hook, prompt or update check gets in the way. */
6
6
  export declare const STEP_ENV: Readonly<Record<string, string>>;
7
7
  /**
@@ -23,8 +23,9 @@ export type StepOutcome = {
23
23
  readonly failure: RunnerSandboxFailure;
24
24
  };
25
25
  /**
26
- * Runs `script` in `sandbox` as a step labeled `label`, reporting it under `phase`. Its environment is `STEP_ENV` and
27
- * `secrets`: for a recipe's step, the runner secrets that step names; storm's own steps pass none.
26
+ * Runs `script` in `sandbox` as a step labeled `label`, reporting it under `phase`. Its environment is `STEP_ENV`, for
27
+ * every step: no credential enters a step's environment; a credential reaches only the step's requests, through the
28
+ * sandbox's network policy (`RunnerSandboxScope.grantCredentials`).
28
29
  */
29
30
  export declare function runStep(context: {
30
31
  readonly runnerSandboxes: RunnerSandboxGateway;
@@ -34,8 +35,15 @@ export declare function runStep(context: {
34
35
  readonly phase: RunnerStepPhase;
35
36
  readonly label: string;
36
37
  readonly script: string;
37
- readonly secrets?: RunnerSecrets;
38
38
  }, progress: RunnerProgress, signal: AbortSignal): Promise<StepOutcome>;
39
+ /**
40
+ * How a stage ends on a failed network policy write at `around`: granting credentials before the recipe's snapshot
41
+ * steps, its run steps, or the command, or revoking them before a snapshot save. A stop when the run was canceled, or
42
+ * closing the scope began, a failure otherwise.
43
+ */
44
+ export declare function networkPolicyStop(operation: "inject" | "remove", around: NetworkPolicyPlace, failure: NetworkPolicyWriteFailure): Exclude<RunnerStage<never>, {
45
+ readonly kind: "ok";
46
+ }>;
39
47
  /** A Sandbox failure other than an abort, as the runner reports it. */
40
48
  export declare function sandboxApiFailure(operation: RunnerSandboxCall, failure: Exclude<RunnerStartFailure, {
41
49
  readonly kind: "aborted";
@@ -1,5 +1,5 @@
1
1
  // Running one step in a sandbox: its output streamed line by line to the run's progress, its last lines kept for the
2
- // error when it fails, and how long it took.
2
+ // error when it fails, and how long it took, plus translating Sandbox and network policy failures into stage outcomes.
3
3
  import { progressQueue, } from "./events.js";
4
4
  import { lineSplitter, outputTail, splitLines } from "./output.js";
5
5
  /** Every step's environment: no Git hook, prompt or update check gets in the way. */
@@ -10,8 +10,9 @@ export const STEP_ENV = {
10
10
  npm_config_update_notifier: "false",
11
11
  };
12
12
  /**
13
- * Runs `script` in `sandbox` as a step labeled `label`, reporting it under `phase`. Its environment is `STEP_ENV` and
14
- * `secrets`: for a recipe's step, the runner secrets that step names; storm's own steps pass none.
13
+ * Runs `script` in `sandbox` as a step labeled `label`, reporting it under `phase`. Its environment is `STEP_ENV`, for
14
+ * every step: no credential enters a step's environment; a credential reaches only the step's requests, through the
15
+ * sandbox's network policy (`RunnerSandboxScope.grantCredentials`).
15
16
  */
16
17
  export async function runStep(context, request, progress, signal) {
17
18
  const { phase, label } = request;
@@ -26,7 +27,7 @@ export async function runStep(context, request, progress, signal) {
26
27
  queue.add({ kind: "step-output", phase, stream, line });
27
28
  }
28
29
  };
29
- const ran = await context.runnerSandboxes.runScript(request.sandbox, { script: request.script, env: { ...STEP_ENV, ...request.secrets } }, ({ stream, data }) => emit(stream, splitters[stream].push(data)), signal);
30
+ const ran = await context.runnerSandboxes.runScript(request.sandbox, { script: request.script, env: { ...STEP_ENV } }, ({ stream, data }) => emit(stream, splitters[stream].push(data)), signal);
30
31
  emit("stdout", splitters.stdout.flush());
31
32
  emit("stderr", splitters.stderr.flush());
32
33
  await queue.flush();
@@ -38,6 +39,35 @@ export async function runStep(context, request, progress, signal) {
38
39
  await progress.emit({ kind: "step-finished", phase, label, ms });
39
40
  return { kind: "succeeded", ms };
40
41
  }
42
+ /**
43
+ * How a stage ends on a failed network policy write at `around`: granting credentials before the recipe's snapshot
44
+ * steps, its run steps, or the command, or revoking them before a snapshot save. A stop when the run was canceled, or
45
+ * closing the scope began, a failure otherwise.
46
+ */
47
+ export function networkPolicyStop(operation, around, failure) {
48
+ if (failure.kind === "aborted")
49
+ return { kind: "aborted" };
50
+ return {
51
+ kind: "failed",
52
+ failure: failure.kind === "timed-out"
53
+ ? {
54
+ kind: "network-policy-failed",
55
+ operation,
56
+ around,
57
+ reason: "timed-out",
58
+ status: null,
59
+ message: `no answer within ${failure.limitMs / 1000} seconds`,
60
+ }
61
+ : {
62
+ kind: "network-policy-failed",
63
+ operation,
64
+ around,
65
+ reason: "api",
66
+ status: failure.status ?? null,
67
+ message: failure.message,
68
+ },
69
+ };
70
+ }
41
71
  /** A Sandbox failure other than an abort, as the runner reports it. */
42
72
  export function sandboxApiFailure(operation, failure) {
43
73
  if (failure.kind === "snapshot-gone")
@@ -0,0 +1,10 @@
1
+ import type { Timer } from "../time/index.ts";
2
+ /**
3
+ * Calls `call` with a signal that aborts after `ms` on `timer`: the call's answer, or null when it had none by then,
4
+ * when the wait ends. The call's answer comes first, so an instant answer wins against a timer that never waits.
5
+ */
6
+ export declare function callWithin<T>(timer: Timer, ms: number, call: (signal: AbortSignal) => Promise<T>): Promise<T | null>;
7
+ /** Returned by `untilAborted` when the signal aborted before the promise settled. */
8
+ export declare const ABORTED: unique symbol;
9
+ /** `promise`'s answer, or `ABORTED` as soon as `signal` aborts, whether or not `promise` has answered by then. */
10
+ export declare function untilAborted<T>(promise: Promise<T>, signal: AbortSignal): Promise<T | typeof ABORTED>;
@@ -0,0 +1,43 @@
1
+ // A call with a time limit: every platform call the runner bounds, such as a network policy write, each stop and delete
2
+ // of a sandbox, keeping the runner sandbox running, and the end of following the test events file, goes through it.
3
+ /**
4
+ * Calls `call` with a signal that aborts after `ms` on `timer`: the call's answer, or null when it had none by then,
5
+ * when the wait ends. The call's answer comes first, so an instant answer wins against a timer that never waits.
6
+ */
7
+ export function callWithin(timer, ms, call) {
8
+ const abort = new AbortController();
9
+ const limit = new AbortController();
10
+ return new Promise((resolve, reject) => {
11
+ call(abort.signal).then((answer) => {
12
+ limit.abort();
13
+ resolve(answer);
14
+ }, (error) => {
15
+ limit.abort();
16
+ reject(error);
17
+ });
18
+ void timer.sleep(ms, limit.signal).then(() => {
19
+ if (limit.signal.aborted)
20
+ return;
21
+ abort.abort();
22
+ resolve(null);
23
+ });
24
+ });
25
+ }
26
+ /** Returned by `untilAborted` when the signal aborted before the promise settled. */
27
+ export const ABORTED = Symbol("aborted");
28
+ /** `promise`'s answer, or `ABORTED` as soon as `signal` aborts, whether or not `promise` has answered by then. */
29
+ export function untilAborted(promise, signal) {
30
+ if (signal.aborted)
31
+ return Promise.resolve(ABORTED);
32
+ return new Promise((resolve, reject) => {
33
+ const onAbort = () => resolve(ABORTED);
34
+ signal.addEventListener("abort", onAbort, { once: true });
35
+ promise.then((answer) => {
36
+ signal.removeEventListener("abort", onAbort);
37
+ resolve(answer);
38
+ }, (error) => {
39
+ signal.removeEventListener("abort", onAbort);
40
+ reject(error);
41
+ });
42
+ });
43
+ }
@@ -47,16 +47,10 @@ interface ClinkrExample {
47
47
  readonly description?: string;
48
48
  }
49
49
  /**
50
- * The run examples an extension brings to the run commands' help, which each lists after its own: those for
51
- * `storm exec`, which has no driver, and those for each driver's command, by the driver's name
52
- * (`Driver.name`). A name is a plain string, with no import behind it: examples under a name no driver in the
53
- * registry has show in no help.
50
+ * The run examples an extension brings to `storm exec`'s help, listed after `storm exec`'s own examples.
54
51
  */
55
52
  export interface RunExamples {
56
53
  readonly exec: readonly ClinkrExample[];
57
- readonly drivers: {
58
- readonly [driver: string]: readonly ClinkrExample[];
59
- };
60
54
  }
61
55
  /** What an extension reads of each resource it brings: its definition's name. */
62
56
  interface NamedResource {
@@ -1,28 +1,3 @@
1
- /** A driver's words in its command's leaf help. */
2
- export interface DriverHelp {
3
- /** The usage after the flags every run takes, such as `[<vitest run args>...] [-- <vitest dash options>...]`. */
4
- readonly usage: string;
5
- /** What the driver's arguments are and where they go: their request field's description. */
6
- readonly args: string;
7
- /**
8
- * What `verbose` in the run payload does under the driver's program, which ends the description of the run flag
9
- * `--verbose`: a clause that follows `… and verbose in the run payload, `, without its full stop, such as
10
- * `which has its reporters print each test as it finishes`.
11
- */
12
- readonly verbose: string;
13
- /** The driver's own examples, which its command lists before the run examples the extensions bring. */
14
- readonly examples: readonly {
15
- readonly argv: string;
16
- readonly description: string;
17
- }[];
18
- }
19
- /**
20
- * A driver whose plan step counts only the test files by default: `--count-tests`'s help, in words that name the
21
- * driver's program, which say what counting each test costs and what counting only the files gives up.
22
- */
23
- export interface DriverTestCount {
24
- readonly description: string;
25
- }
26
1
  /** What a run says to do next, in words that name the driver's program. */
27
2
  export interface DriverHints {
28
3
  /**
@@ -48,7 +23,7 @@ export interface DriverPlanRequest {
48
23
  readonly bin: string;
49
24
  /**
50
25
  * Whether the plan step counts each test, not only the test files: true when the run took `--count-tests`, and
51
- * always true for a driver with no `countTests`, whose plan step always counts each test.
26
+ * always true for a driver whose `countsFilesOnly` is not set, whose plan step always counts each test.
52
27
  */
53
28
  readonly countTests: boolean;
54
29
  /** Aborts once the invocation is signaled: the plan step stops what it started and answers `canceled`. */
@@ -73,24 +48,42 @@ export type DriverPlanAnswer = {
73
48
  readonly tests?: number;
74
49
  readonly files: number;
75
50
  };
51
+ /** The distinct test files the run would run, as paths relative to `cwd`, sorted. */
52
+ readonly testFiles?: readonly string[];
76
53
  } | {
77
54
  readonly ok: false;
78
55
  readonly kind: DriverPlanFailureKind | "canceled";
79
56
  readonly message: string;
80
57
  };
58
+ /** Whether a driver's user arguments are valid for a run across runner sandboxes. */
59
+ export type DriverFileListValidation = {
60
+ readonly ok: true;
61
+ } | {
62
+ readonly ok: false;
63
+ readonly problem: string;
64
+ };
65
+ /**
66
+ * File list support declared by a driver whose test runner reads each runner sandbox's assigned file list from
67
+ * `STORM_RUN` (`sandbox.files`) while receiving the run's arguments unchanged.
68
+ */
69
+ export interface DriverFileListSupport {
70
+ /** Validates that the user's driver arguments do not conflict with storm's file lists. */
71
+ validate(args: readonly string[]): DriverFileListValidation;
72
+ /**
73
+ * Optional guidance appended to `file_list_mismatch` warnings when a runner sandbox reports files outside its
74
+ * assigned list.
75
+ */
76
+ readonly extraMismatchHint?: string;
77
+ }
81
78
  /** Where a plan step ran and what it was given, which both refusals report. */
82
79
  export interface DriverPlanned {
83
80
  readonly args: readonly string[];
84
81
  readonly cwd: string;
85
82
  }
86
- /**
87
- * What a driver's two refusals say, in words that name its program. Each description is the error's own, which
88
- * `--json-schema` shows.
89
- */
83
+ /** What a driver's two refusals say, in words that name its program. */
90
84
  export interface DriverRefusalWords {
91
85
  /** `no_matching_tests`: the plan step ran and counted no test, or no test file when it counted only the files. */
92
86
  readonly noMatchingTests: {
93
- readonly description: string;
94
87
  /** What went wrong. */
95
88
  message(planned: DriverPlanned): string;
96
89
  /** What to do next. */
@@ -101,7 +94,6 @@ export interface DriverRefusalWords {
101
94
  * `message` (`DriverPlanAnswer`), or the launcher's for a binary it didn't find.
102
95
  */
103
96
  readonly planFailed: {
104
- readonly description: string;
105
97
  /** What to do next, for each way the plan step fails. */
106
98
  readonly next: {
107
99
  readonly [Kind in DriverPlanFailureKind]: string;
@@ -111,22 +103,23 @@ export interface DriverRefusalWords {
111
103
  /**
112
104
  * Everything a driver's author writes of it with `defineDriver`:
113
105
  *
114
- * - `name`: its command's word, which `driver_plan_failed` and `no_matching_tests` carry as `data.driver`, and the
115
- * name the launcher keeps its Context by.
106
+ * - `name`: the driver's name in `storm.config.ts`, which `driver_plan_failed` and `no_matching_tests` carry as
107
+ * `data.driver`, and the name the launcher keeps its Context by.
116
108
  * - `program`: its program, by the name of the binary the launcher looks for in `node_modules/.bin`.
117
109
  * - `context`: its Context, what its plan step reaches the outside through, built live. Tests hand
118
110
  * the plan step a Context over fakes.
119
111
  * - `launch`: the argv that starts the program with `args`, such as `[bin, "run", ...args]`. `bin` is the path of the
120
112
  * binary the launcher found, or the program's bare name where the runner's `PATH` finds it.
121
113
  * - `plan`: its plan step, over its Context: asks the program what it would run with the request's arguments, without
122
- * running it, and words its failure. The launcher calls it once, before anything is minted, acquired or started, and
114
+ * running it, and words its failure. The launcher calls it once, before anything is minted, acquired, or started, and
123
115
  * only for a run that counts: one whose config file sets `testPlan`, or that took `--count-tests`.
124
- * - `countTests`: present for a driver whose plan step counts only the test files unless the run asks it to count each
125
- * test, which is faster for a program that must load each test file to list its tests. Its command then takes
126
- * `--count-tests`, which sets the plan request's `countTests`, and `description` is that flag's help, in the
127
- * driver's words. Without it, the plan step always counts each test, and the command takes no such flag.
128
- * - `help`: its part of its command's leaf help.
129
- * - `hints`: what its run's summary says to do next.
116
+ * - `countsFilesOnly`: `true` for a driver whose plan step counts only the test files unless the run takes
117
+ * `--count-tests` (which sets the plan request's `countTests: true`). Without it, the plan step always counts each
118
+ * test (`countTests: true`).
119
+ * - `fileLists`: present for a driver whose test runner reads each runner sandbox's file list from `STORM_RUN`
120
+ * (`sandbox.files`), so `storm test` can run it across runner sandboxes (`--sandboxes`, `--file-lists`, and
121
+ * `runner.sandboxes.default`): it checks the run's arguments for that, and may add a hint to `file_list_mismatch`.
122
+ * - `hints`: what its run's summary and `no_final_test_results` warning say to do next.
130
123
  * - `refusals`: what its two refusals say, beside the message its plan step answers.
131
124
  */
132
125
  export interface DriverSpec<Name extends string, Context> {
@@ -137,8 +130,8 @@ export interface DriverSpec<Name extends string, Context> {
137
130
  readonly context: () => Context;
138
131
  readonly launch: (bin: string, args: readonly string[]) => readonly string[];
139
132
  readonly plan: (context: NoInfer<Context>) => (request: DriverPlanRequest) => Promise<DriverPlanAnswer>;
140
- readonly countTests?: DriverTestCount;
141
- readonly help: DriverHelp;
133
+ readonly countsFilesOnly?: boolean;
134
+ readonly fileLists?: DriverFileListSupport;
142
135
  readonly hints: DriverHints;
143
136
  readonly refusals: DriverRefusalWords;
144
137
  }
@@ -155,14 +148,14 @@ export interface Driver<Name extends string = string, Context = unknown> {
155
148
  readonly context: () => Context;
156
149
  readonly launch: (bin: string, args: readonly string[]) => readonly string[];
157
150
  readonly plan: (context: unknown) => (request: DriverPlanRequest) => Promise<DriverPlanAnswer>;
158
- readonly countTests?: DriverTestCount;
159
- readonly help: DriverHelp;
151
+ readonly countsFilesOnly?: boolean;
152
+ readonly fileLists?: DriverFileListSupport;
160
153
  readonly hints: DriverHints;
161
154
  readonly refusals: DriverRefusalWords;
162
155
  }
163
156
  /**
164
157
  * One driver, as one plain object: its extension lists it (`drivers`, `defineExtension`), and the registry takes it
165
- * from there. The launcher makes its run command from it.
158
+ * from there. `storm test` runs it when `storm.config.ts` names it.
166
159
  */
167
160
  export declare function defineDriver<const Name extends string, Context>(spec: DriverSpec<Name, Context>): Driver<Name, Context>;
168
161
  /** Arguments as a person reads them, for a driver's words: `(none)` when there are none. */
@@ -1,8 +1,8 @@
1
1
  // How an extension folder writes its driver: one `defineDriver` call, in its `driver.ts`, which holds everything the
2
2
  // launcher knows of one program that the command starts (`GLOSSARY.md`, **Driver**), and returns one plain object,
3
3
  // the driver (`Driver`). The launcher finds the program, asks the driver's plan step what it would run, starts it, and
4
- // words its run command's leaf help, its two refusals and its run's summary with the driver's words. A driver has only
5
- // this launcher side: storm's own code for a test runner is a test runner library, which belongs to no extension.
4
+ // words its run's summary and its two refusals with the driver's words. A driver has only this launcher side: storm's
5
+ // own code for a test runner is a test runner library, which belongs to no extension.
6
6
  //
7
7
  // The types flow from the call: its plan step takes the Context its `context` builds. The launcher sees the same object
8
8
  // through the bare `Driver`, whose Context is `unknown`; `defineDriver` turns one into the other with its one cast,
@@ -11,18 +11,18 @@
11
11
  export const DRIVER_PLAN_FAILURE_KINDS = ["start-failed", "timed-out", "exited", "unreadable-output"];
12
12
  /**
13
13
  * One driver, as one plain object: its extension lists it (`drivers`, `defineExtension`), and the registry takes it
14
- * from there. The launcher makes its run command from it.
14
+ * from there. `storm test` runs it when `storm.config.ts` names it.
15
15
  */
16
16
  export function defineDriver(spec) {
17
- const { name, program, context, launch, plan, countTests, help, hints, refusals } = spec;
17
+ const { name, program, context, launch, plan, countsFilesOnly, fileLists, hints, refusals } = spec;
18
18
  const driver = {
19
19
  name,
20
20
  program,
21
21
  context,
22
22
  launch,
23
23
  plan,
24
- ...(countTests === undefined ? {} : { countTests }),
25
- help,
24
+ ...(countsFilesOnly === undefined ? {} : { countsFilesOnly }),
25
+ ...(fileLists === undefined ? {} : { fileLists }),
26
26
  hints,
27
27
  refusals,
28
28
  };
@@ -1,12 +1,11 @@
1
- export { isCi } from "./ci.ts";
2
1
  export { Credential, type GitHubActionsClaims, type VercelProject } from "./credential.ts";
3
2
  export { type CredentialDiagnosis, describeCredentialFailure, describeMintFailure, describeTokenRequestFailure, } from "./credential-diagnosis.ts";
4
3
  export type { CredentialFailure, CredentialOrigin, CredentialOutcome, CredentialSource, MintFailure, MintStep, MintTarget, TokenAttemptFailure, TokenRequestFailure, TokenRequestVariable, } from "./credential-source.ts";
5
4
  export { tokenRequestFailureFacts, tokenRequestFailureShape } from "./token-request-facts.ts";
6
5
  export type { Clock, Timer } from "./time.ts";
7
6
  export { defineResource, type ResourceSpec } from "./resource.ts";
8
- export { argsText, defineDriver, type Driver, DRIVER_PLAN_FAILURE_KINDS, type DriverHelp, type DriverHints, type DriverPlanAnswer, type DriverPlanFailureKind, type DriverPlanned, type DriverPlanRequest, type DriverRefusalWords, type DriverSpec, type DriverTestCount, } from "./driver.ts";
9
- export type { Acquired, AcquireForRunAnswer, AcquireForRunInput, BeforeRunAnswer, BeforeRunInput, LifecycleTypes, MintFailed, NextStep, NoSecrets, Refusal, RefusalContent, ReleaseAfterRunAnswer, ReleaseAfterRunInput, Released, Report, ResourceLifecycle, ResourceUse, ResultAnswer, } from "./lifecycle.ts";
7
+ export { argsText, defineDriver, type Driver, DRIVER_PLAN_FAILURE_KINDS, type DriverHints, type DriverPlanAnswer, type DriverPlanFailureKind, type DriverPlanned, type DriverPlanRequest, type DriverRefusalWords, type DriverFileListSupport, type DriverFileListValidation, type DriverSpec, } from "./driver.ts";
8
+ export type { Acquired, AcquireForRunAnswer, AcquireForRunInput, BeforeRunAnswer, BeforeRunInput, LifecycleTypes, MintFailed, NextStep, NoSecrets, Refusal, RefusalContent, ReleaseAfterRunAnswer, ReleaseAfterRunInput, Released, Report, ResourceLifecycle, ResourceUse, ResultAnswer, SandboxCredential, SplitAnswer, SplitInput, } from "./lifecycle.ts";
10
9
  export type { LauncherContext, StateDirectory } from "./launcher-context.ts";
11
10
  export type { LaneDraw, Paint, ResourceNotice } from "./presentation.ts";
12
11
  export type { LaneOutcome, LaneRow, LaneStates, ResourceProgress } from "./progress.ts";
@@ -15,3 +14,4 @@ export type { Span, SpanStatus } from "./span.ts";
15
14
  export { type DefaultsFit, defaultResourceKey, resourceCall, type WrittenOptions, type FlagHelp, type GivenOptions, NOT_COUNTED, optionKeyPath, type OptionDefault, type OptionOf, type OptionProblem, type OptionRule, type OptionRules, type OptionSettings, type OptionSources, type OptionsOf, type OptionValue, type PayloadOf, type PlannedRun, type PresentOption, type ResolvedOptions, type ResourceDefinition, type Resource, type RunTestPlan, type Setting, type SettingSource, type SettingsOf, type SourcesOf, } from "./resource-definition.ts";
16
15
  export { type ResourceFactory, resourceFactory } from "./resource-factory.ts";
17
16
  export { booleanOption, describeValue, mustBe, nonEmptyString } from "./rules.ts";
17
+ export { describeSecretSource, ENV_VAR_NAME_PATTERN, ENV_VAR_NAME_RULE, readSecretSource, readSecretSourceValue, SECRET_MIN_LENGTH, type SecretProblem, type SecretSource, type SecretSourceRead, secretSourceId, secretSourceSchema, } from "./secret-source.ts";
@@ -17,9 +17,8 @@
17
17
  // - how a driver is written: one `defineDriver` per driver (`driver.ts`), in its folder's `driver.ts`, which holds
18
18
  // what the launcher knows of one program that the command starts (`Driver`): its name, its program, its Context,
19
19
  // the argv that starts it, its plan step over its Context (`DriverPlanRequest`, `DriverPlanAnswer`), whether it
20
- // counts only the test files unless asked (`DriverTestCount`) and its words,
21
- // its part of its command's help (`DriverHelp`), what its run's summary says to do next (`DriverHints`) and what its
22
- // two refusals say (`DriverRefusalWords`);
20
+ // counts only the test files unless asked (`countsFilesOnly`), what its run's summary says to do next
21
+ // (`DriverHints`), and what its two refusals say (`DriverRefusalWords`);
23
22
  // - each lifecycle point's input and answer (`lifecycle.ts`), the refusal a lifecycle point words where it refuses
24
23
  // (`Refusal`, `RefusalContent`, `NextStep`), and what the launcher hands a Context builder (`LauncherContext`,
25
24
  // `launcher-context.ts`), with the clock and timer (`Clock`, `Timer`, `time.ts`);
@@ -36,7 +35,6 @@
36
35
  // launcher module, which `test/integration/extension-api-clinkr-free.integration.test.ts` holds, and nothing of
37
36
  // `commands.ts`, even for types, so its declarations reach no Clinkr either
38
37
  // (`test/integration/package-types.integration.test.ts`).
39
- export { isCi } from "./ci.js";
40
38
  export { Credential } from "./credential.js";
41
39
  export { describeCredentialFailure, describeMintFailure, describeTokenRequestFailure, } from "./credential-diagnosis.js";
42
40
  export { tokenRequestFailureFacts, tokenRequestFailureShape } from "./token-request-facts.js";
@@ -45,3 +43,4 @@ export { argsText, defineDriver, DRIVER_PLAN_FAILURE_KINDS, } from "./driver.js"
45
43
  export { defaultResourceKey, resourceCall, NOT_COUNTED, optionKeyPath, } from "./resource-definition.js";
46
44
  export { resourceFactory } from "./resource-factory.js";
47
45
  export { booleanOption, describeValue, mustBe, nonEmptyString } from "./rules.js";
46
+ export { describeSecretSource, ENV_VAR_NAME_PATTERN, ENV_VAR_NAME_RULE, readSecretSource, readSecretSourceValue, SECRET_MIN_LENGTH, secretSourceId, secretSourceSchema, } from "./secret-source.js";