@cnc-tools/storm 0.9.0 → 0.10.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 (652) hide show
  1. package/bin/storm.js +11 -13
  2. package/dist/application.d.ts +18 -10
  3. package/dist/application.js +13 -12
  4. package/dist/bin/storm.js +102 -42
  5. package/dist/build-info.js +1 -1
  6. package/dist/chunks/chunk-AGWW3HDT.js +2559 -0
  7. package/dist/chunks/chunk-AKKNF3WZ.js +2023 -0
  8. package/dist/chunks/chunk-H2VCSNVU.js +351 -0
  9. package/dist/chunks/chunk-I5GZLOLQ.js +38 -0
  10. package/dist/chunks/chunk-J6ZNYUDV.js +21 -0
  11. package/dist/chunks/chunk-JQ2HK4RN.js +425 -0
  12. package/dist/chunks/chunk-OVXD7GES.js +841 -0
  13. package/dist/chunks/chunk-VJQLMGOH.js +4716 -0
  14. package/dist/chunks/chunk-WF4KJ7YG.js +431 -0
  15. package/dist/chunks/chunk-XHJGHJBW.js +1509 -0
  16. package/dist/chunks/chunk-YF3ICDBY.js +10 -0
  17. package/dist/chunks/chunk-ZJ2USLAT.js +4420 -0
  18. package/dist/chunks/live-app-RIJM3QFD.js +97 -0
  19. package/dist/chunks/version-X7RMSKZI.js +12 -0
  20. package/dist/command-tree.d.ts +3 -0
  21. package/dist/command-tree.js +3 -0
  22. package/dist/commands/dashboard.d.ts +1 -1
  23. package/dist/commands/dashboard.js +1 -1
  24. package/dist/commands/exec/cleanup.d.ts +27 -43
  25. package/dist/commands/exec/cleanup.js +20 -54
  26. package/dist/commands/exec/command.d.ts +72 -544
  27. package/dist/commands/exec/command.js +69 -22
  28. package/dist/commands/exec/job-summary.d.ts +2 -2
  29. package/dist/commands/exec/job-summary.js +3 -3
  30. package/dist/commands/exec/live-view.d.ts +9 -9
  31. package/dist/commands/exec/live-view.js +48 -41
  32. package/dist/commands/exec/metadata.d.ts +0 -65
  33. package/dist/commands/exec/metadata.js +7 -58
  34. package/dist/commands/exec/mint-failed.d.ts +1 -1
  35. package/dist/commands/exec/mint-failed.js +8 -8
  36. package/dist/commands/exec/outcomes.d.ts +63 -468
  37. package/dist/commands/exec/outcomes.js +42 -69
  38. package/dist/commands/exec/plan-run.d.ts +150 -0
  39. package/dist/commands/exec/plan-run.js +121 -0
  40. package/dist/commands/exec/progress.d.ts +25 -15
  41. package/dist/commands/exec/progress.js +61 -40
  42. package/dist/commands/exec/redaction.d.ts +3 -3
  43. package/dist/commands/exec/redaction.js +4 -4
  44. package/dist/commands/exec/resource-flags.d.ts +50 -0
  45. package/dist/commands/exec/resource-flags.js +125 -0
  46. package/dist/commands/exec/resource-refusals.d.ts +64 -0
  47. package/dist/commands/exec/resource-refusals.js +58 -0
  48. package/dist/commands/exec/run-collector.d.ts +15 -10
  49. package/dist/commands/exec/run-collector.js +5 -5
  50. package/dist/commands/exec/run-command.d.ts +80 -165
  51. package/dist/commands/exec/run-command.js +264 -275
  52. package/dist/commands/exec/run-metadata.d.ts +20 -43
  53. package/dist/commands/exec/run-metadata.js +18 -37
  54. package/dist/commands/exec/run-record.d.ts +67 -58
  55. package/dist/commands/exec/run-record.js +15 -32
  56. package/dist/commands/exec/test-plan.d.ts +45 -0
  57. package/dist/commands/exec/test-plan.js +59 -0
  58. package/dist/commands/exec/tests-summary.d.ts +5 -5
  59. package/dist/commands/exec/tests-summary.js +2 -2
  60. package/dist/commands/exec/text.d.ts +8 -2
  61. package/dist/commands/exec/text.js +8 -0
  62. package/dist/commands/exec/timeline-facts.d.ts +57 -0
  63. package/dist/commands/exec/timeline-facts.js +92 -0
  64. package/dist/commands/exec/view.d.ts +5 -7
  65. package/dist/commands/exec/view.js +21 -13
  66. package/dist/commands/exec/waterfall.d.ts +2 -9
  67. package/dist/commands/exec/waterfall.js +9 -30
  68. package/dist/commands/exec/worker-chart.d.ts +1 -1
  69. package/dist/commands/ext/metadata.d.ts +4 -0
  70. package/dist/commands/ext/metadata.js +8 -0
  71. package/dist/commands/runs/facts.d.ts +9 -5
  72. package/dist/commands/runs/facts.js +26 -14
  73. package/dist/commands/runs/list/command.d.ts +15 -8
  74. package/dist/commands/runs/list/command.js +142 -33
  75. package/dist/commands/runs/list/metadata.d.ts +16 -14
  76. package/dist/commands/runs/list/metadata.js +21 -15
  77. package/dist/commands/runs/list/outcomes.d.ts +6 -2
  78. package/dist/commands/runs/logs/command.d.ts +3 -4
  79. package/dist/commands/runs/logs/command.js +135 -49
  80. package/dist/commands/runs/logs/metadata.d.ts +17 -15
  81. package/dist/commands/runs/logs/metadata.js +23 -17
  82. package/dist/commands/runs/metadata.js +6 -2
  83. package/dist/commands/runs/past-run.d.ts +3 -9
  84. package/dist/commands/runs/past-run.js +2 -17
  85. package/dist/commands/runs/show/command.d.ts +57 -42
  86. package/dist/commands/runs/show/command.js +404 -74
  87. package/dist/commands/runs/show/metadata.d.ts +20 -18
  88. package/dist/commands/runs/show/metadata.js +23 -17
  89. package/dist/commands/runs/show/outcomes.d.ts +27 -19
  90. package/dist/commands/runs/show/outcomes.js +8 -6
  91. package/dist/commands/vitest/command.d.ts +94 -559
  92. package/dist/commands/vitest/command.js +176 -132
  93. package/dist/commands/vitest/metadata.d.ts +0 -65
  94. package/dist/commands/vitest/metadata.js +7 -38
  95. package/dist/commands/vitest/outcomes.d.ts +44 -274
  96. package/dist/commands/vitest/outcomes.js +7 -14
  97. package/dist/config/credential-resolver.d.ts +131 -0
  98. package/dist/config/credential-resolver.js +69 -0
  99. package/dist/{credential/settle.d.ts → config/credential-settle.d.ts} +1 -2
  100. package/dist/config/errors.d.ts +1 -1
  101. package/dist/config/errors.js +5 -5
  102. package/dist/config/index.d.ts +7 -6
  103. package/dist/config/index.js +13 -9
  104. package/dist/config/load.d.ts +16 -13
  105. package/dist/config/load.js +55 -40
  106. package/dist/config/recipe-run.d.ts +26 -0
  107. package/dist/config/recipe-run.js +27 -0
  108. package/dist/config/resolve.d.ts +103 -15
  109. package/dist/config/resolve.js +137 -47
  110. package/dist/config/resolver.d.ts +40 -0
  111. package/dist/config/resolver.js +31 -0
  112. package/dist/config/schema.d.ts +13 -17
  113. package/dist/config/schema.js +14 -35
  114. package/dist/config/settings-file.d.ts +28 -16
  115. package/dist/config/settings-file.js +39 -24
  116. package/dist/config/typed-options.d.ts +21 -0
  117. package/dist/config/typed-options.js +28 -0
  118. package/dist/config-file/define.d.ts +33 -31
  119. package/dist/config-file/define.js +14 -4
  120. package/dist/config-file/toolchain.d.ts +1 -1
  121. package/dist/context.d.ts +37 -24
  122. package/dist/context.js +16 -8
  123. package/dist/core/before-run.d.ts +37 -0
  124. package/dist/core/before-run.js +44 -0
  125. package/dist/core/events.d.ts +55 -46
  126. package/dist/core/gateways.d.ts +17 -18
  127. package/dist/core/index.d.ts +12 -12
  128. package/dist/core/index.js +12 -8
  129. package/dist/core/launcher-supplies.d.ts +11 -0
  130. package/dist/core/launcher-supplies.js +28 -0
  131. package/dist/core/mint.js +2 -2
  132. package/dist/core/payload.d.ts +13 -14
  133. package/dist/core/payload.js +9 -8
  134. package/dist/core/presentations.d.ts +37 -37
  135. package/dist/core/presentations.js +49 -56
  136. package/dist/core/reports.d.ts +5 -0
  137. package/dist/core/reports.js +13 -0
  138. package/dist/core/resource-registry.d.ts +54 -0
  139. package/dist/core/resource-registry.js +57 -0
  140. package/dist/core/resource-reports.d.ts +36 -0
  141. package/dist/core/resource-reports.js +38 -0
  142. package/dist/core/resource.d.ts +135 -243
  143. package/dist/core/resource.js +7 -5
  144. package/dist/core/resources-of.d.ts +16 -0
  145. package/dist/core/resources-of.js +8 -0
  146. package/dist/core/resources.d.ts +96 -84
  147. package/dist/core/resources.js +168 -165
  148. package/dist/core/run-directory.d.ts +10 -11
  149. package/dist/core/run-directory.js +9 -9
  150. package/dist/core/run-state.d.ts +29 -41
  151. package/dist/core/run-state.js +56 -60
  152. package/dist/core/run.d.ts +77 -66
  153. package/dist/core/run.js +83 -74
  154. package/dist/core/state-directory.js +4 -3
  155. package/dist/core/timeline.d.ts +42 -24
  156. package/dist/core/timeline.js +45 -27
  157. package/dist/core/timing.d.ts +3 -3
  158. package/dist/core/timing.js +1 -1
  159. package/dist/credential/gateways.d.ts +1 -80
  160. package/dist/credential/index.d.ts +3 -5
  161. package/dist/credential/index.js +7 -5
  162. package/dist/credential/live/github-actions-token-response.js +1 -1
  163. package/dist/credential/live/vercel-cli-gateway.d.ts +2 -1
  164. package/dist/credential/live/vercel-cli-gateway.js +1 -1
  165. package/dist/credential/live/vercel-output.d.ts +1 -1
  166. package/dist/credential/source.d.ts +16 -59
  167. package/dist/credential/source.js +21 -7
  168. package/dist/credential/target.d.ts +1 -1
  169. package/dist/extension-commands.d.ts +14 -0
  170. package/dist/extension-commands.js +20 -0
  171. package/dist/extensions/github/definition.d.ts +26 -0
  172. package/dist/extensions/github/definition.js +29 -0
  173. package/dist/extensions/github/extension.d.ts +18 -0
  174. package/dist/extensions/github/extension.js +6 -0
  175. package/dist/{resources → extensions}/github/fixture-repo.d.ts +11 -8
  176. package/dist/{resources → extensions}/github/fixture-repo.js +8 -4
  177. package/dist/extensions/github/index.d.ts +13 -0
  178. package/dist/extensions/github/index.js +17 -0
  179. package/dist/extensions/github/lifecycle.d.ts +30 -0
  180. package/dist/extensions/github/lifecycle.js +69 -0
  181. package/dist/extensions/github/live/world.d.ts +6 -0
  182. package/dist/extensions/github/live/world.js +16 -0
  183. package/dist/extensions/github/options.d.ts +36 -0
  184. package/dist/extensions/github/options.js +36 -0
  185. package/dist/extensions/github/refusals.d.ts +32 -0
  186. package/dist/extensions/github/refusals.js +43 -0
  187. package/dist/extensions/github/release.d.ts +17 -0
  188. package/dist/extensions/github/release.js +34 -0
  189. package/dist/extensions/github/resource.d.ts +36 -0
  190. package/dist/extensions/github/resource.js +21 -0
  191. package/dist/extensions/github/run/payload.d.ts +27 -0
  192. package/dist/extensions/github/run/payload.js +42 -0
  193. package/dist/extensions/github/world.d.ts +15 -0
  194. package/dist/extensions/github/world.js +3 -0
  195. package/dist/extensions/testserver/canceled.d.ts +7 -0
  196. package/dist/extensions/testserver/canceled.js +27 -0
  197. package/dist/extensions/testserver/command-tree.d.ts +6 -0
  198. package/dist/extensions/testserver/command-tree.js +21 -0
  199. package/dist/extensions/testserver/commands/app.d.ts +22 -0
  200. package/dist/extensions/testserver/commands/app.js +5 -0
  201. package/dist/{resources/testserver/commands → extensions/testserver/commands/pool}/create/command.d.ts +277 -237
  202. package/dist/extensions/testserver/commands/pool/create/command.js +352 -0
  203. package/dist/extensions/testserver/commands/pool/create/metadata.d.ts +33 -0
  204. package/dist/extensions/testserver/commands/pool/create/metadata.js +55 -0
  205. package/dist/{resources/testserver/commands → extensions/testserver/commands/pool}/create/outcomes.d.ts +132 -112
  206. package/dist/{resources/testserver/commands → extensions/testserver/commands/pool}/create/outcomes.js +6 -24
  207. package/dist/{resources/testserver/commands → extensions/testserver/commands/pool}/list/command.d.ts +3 -4
  208. package/dist/extensions/testserver/commands/pool/list/command.js +203 -0
  209. package/dist/extensions/testserver/commands/pool/list/metadata.d.ts +11 -0
  210. package/dist/extensions/testserver/commands/pool/list/metadata.js +15 -0
  211. package/dist/{resources/testserver/commands → extensions/testserver/commands/pool}/list/outcomes.js +1 -1
  212. package/dist/extensions/testserver/commands/pool/metadata.d.ts +3 -0
  213. package/dist/extensions/testserver/commands/pool/metadata.js +7 -0
  214. package/dist/extensions/testserver/commands/tree.d.ts +2 -0
  215. package/dist/extensions/testserver/commands/tree.js +6 -0
  216. package/dist/{resources → extensions}/testserver/credential-facts.d.ts +6 -40
  217. package/dist/{resources → extensions}/testserver/credential-facts.js +13 -35
  218. package/dist/extensions/testserver/definition.d.ts +57 -0
  219. package/dist/extensions/testserver/definition.js +71 -0
  220. package/dist/{resources → extensions}/testserver/events.d.ts +5 -4
  221. package/dist/extensions/testserver/events.js +4 -0
  222. package/dist/extensions/testserver/extension.d.ts +46 -0
  223. package/dist/extensions/testserver/extension.js +68 -0
  224. package/dist/extensions/testserver/index.d.ts +20 -0
  225. package/dist/extensions/testserver/index.js +31 -0
  226. package/dist/extensions/testserver/lifecycle.d.ts +24 -0
  227. package/dist/extensions/testserver/lifecycle.js +116 -0
  228. package/dist/{core → extensions/testserver}/limit.js +1 -0
  229. package/dist/extensions/testserver/live/world.d.ts +8 -0
  230. package/dist/extensions/testserver/live/world.js +38 -0
  231. package/dist/{resources/testserver/sandbox → extensions/testserver/options}/channels.d.ts +1 -1
  232. package/dist/extensions/testserver/options/index.d.ts +5 -0
  233. package/dist/extensions/testserver/options/index.js +11 -0
  234. package/dist/extensions/testserver/options/rules.d.ts +69 -0
  235. package/dist/extensions/testserver/options/rules.js +92 -0
  236. package/dist/extensions/testserver/options/sandboxes.d.ts +29 -0
  237. package/dist/extensions/testserver/options/sandboxes.js +33 -0
  238. package/dist/extensions/testserver/options/ttl.d.ts +23 -0
  239. package/dist/extensions/testserver/options/ttl.js +42 -0
  240. package/dist/{resources → extensions}/testserver/pool/channels.d.ts +3 -3
  241. package/dist/{resources → extensions}/testserver/pool/channels.js +2 -2
  242. package/dist/{resources → extensions}/testserver/pool/create.d.ts +1 -2
  243. package/dist/{resources → extensions}/testserver/pool/create.js +2 -1
  244. package/dist/{resources → extensions}/testserver/pool/index.d.ts +0 -1
  245. package/dist/{resources → extensions}/testserver/pool/index.js +2 -3
  246. package/dist/{resources → extensions}/testserver/pool/inspect.d.ts +1 -1
  247. package/dist/{resources → extensions}/testserver/pool/lease.d.ts +1 -1
  248. package/dist/extensions/testserver/pool/live/pool-store-gateway.d.ts +12 -0
  249. package/dist/{resources → extensions}/testserver/pool/live/pool-store-gateway.js +4 -4
  250. package/dist/{resources → extensions}/testserver/pool/pull-request.d.ts +8 -5
  251. package/dist/{resources → extensions}/testserver/pool/pull-request.js +2 -2
  252. package/dist/extensions/testserver/pr-build-facts.d.ts +156 -0
  253. package/dist/extensions/testserver/pr-build-facts.js +309 -0
  254. package/dist/extensions/testserver/presentation.d.ts +11 -0
  255. package/dist/{resources → extensions}/testserver/presentation.js +35 -56
  256. package/dist/{resources/testserver/lane.d.ts → extensions/testserver/progress.d.ts} +10 -6
  257. package/dist/{resources/testserver/lane.js → extensions/testserver/progress.js} +21 -16
  258. package/dist/extensions/testserver/provision.d.ts +160 -0
  259. package/dist/{resources/testserver/provider.js → extensions/testserver/provision.js} +80 -108
  260. package/dist/{resources → extensions}/testserver/pull-request/gateways.d.ts +1 -1
  261. package/dist/extensions/testserver/pull-request/gateways.js +5 -0
  262. package/dist/{resources → extensions}/testserver/pull-request/index.js +2 -2
  263. package/dist/{resources → extensions}/testserver/pull-request/live/github-token-gateway.d.ts +4 -4
  264. package/dist/{resources → extensions}/testserver/pull-request/live/github-token-gateway.js +4 -4
  265. package/dist/extensions/testserver/refusals.d.ts +72 -0
  266. package/dist/extensions/testserver/refusals.js +117 -0
  267. package/dist/extensions/testserver/release.d.ts +14 -0
  268. package/dist/extensions/testserver/release.js +26 -0
  269. package/dist/extensions/testserver/resource.d.ts +57 -0
  270. package/dist/extensions/testserver/resource.js +19 -0
  271. package/dist/extensions/testserver/result.d.ts +55 -0
  272. package/dist/extensions/testserver/result.js +98 -0
  273. package/dist/extensions/testserver/run/connection.d.ts +21 -0
  274. package/dist/extensions/testserver/run/connection.js +39 -0
  275. package/dist/extensions/testserver/run-sandbox.d.ts +16 -0
  276. package/dist/extensions/testserver/run-sandbox.js +11 -0
  277. package/dist/{resources → extensions}/testserver/sandbox/create.d.ts +1 -11
  278. package/dist/{resources → extensions}/testserver/sandbox/create.js +0 -15
  279. package/dist/{resources → extensions}/testserver/sandbox/gateways.d.ts +1 -1
  280. package/dist/{resources → extensions}/testserver/sandbox/index.d.ts +1 -3
  281. package/dist/extensions/testserver/sandbox/index.js +6 -0
  282. package/dist/extensions/testserver/testserver-sdk.d.ts +1 -0
  283. package/dist/extensions/testserver/testserver-sdk.js +4 -0
  284. package/dist/{vercel-cli → extensions/testserver/vercel-cli}/arguments.js +1 -1
  285. package/dist/{vercel-cli → extensions/testserver/vercel-cli}/context.js +1 -1
  286. package/dist/{vercel-cli → extensions/testserver/vercel-cli}/driver.d.ts +1 -1
  287. package/dist/{vercel-cli → extensions/testserver/vercel-cli}/gateways.js +1 -1
  288. package/dist/{vercel-cli → extensions/testserver/vercel-cli}/index.js +4 -4
  289. package/dist/{vercel-cli → extensions/testserver/vercel-cli}/invocation.d.ts +1 -1
  290. package/dist/{vercel-cli → extensions/testserver/vercel-cli}/invocation.js +1 -1
  291. package/dist/{vercel-cli → extensions/testserver/vercel-cli}/redaction.js +1 -1
  292. package/dist/{vercel-cli → extensions/testserver/vercel-cli}/report.d.ts +1 -1
  293. package/dist/{vercel-cli → extensions/testserver/vercel-cli}/report.js +1 -1
  294. package/dist/{vercel-cli → extensions/testserver/vercel-cli}/verbose.js +1 -1
  295. package/dist/extensions/testserver/vitest/config.d.ts +28 -0
  296. package/dist/extensions/testserver/vitest/config.js +39 -0
  297. package/dist/{vitest → extensions/testserver/vitest}/container-scope.d.ts +33 -15
  298. package/dist/{vitest → extensions/testserver/vitest}/container-scope.js +75 -14
  299. package/dist/extensions/testserver/vitest/container-start.d.ts +19 -0
  300. package/dist/extensions/testserver/vitest/container-start.js +31 -0
  301. package/dist/{vitest → extensions/testserver/vitest}/diagnostics.d.ts +72 -29
  302. package/dist/{vitest → extensions/testserver/vitest}/diagnostics.js +151 -52
  303. package/dist/{vitest → extensions/testserver/vitest}/fixtures.d.ts +8 -5
  304. package/dist/{vitest → extensions/testserver/vitest}/fixtures.js +45 -22
  305. package/dist/extensions/testserver/vitest/index.d.ts +3 -0
  306. package/dist/extensions/testserver/vitest/index.js +10 -0
  307. package/dist/extensions/testserver/vitest/sandbox.d.ts +25 -0
  308. package/dist/extensions/testserver/vitest/sandbox.js +43 -0
  309. package/dist/{vitest → extensions/testserver/vitest}/types.d.ts +1 -1
  310. package/dist/extensions/testserver/world.d.ts +25 -0
  311. package/dist/extensions/testserver/world.js +4 -0
  312. package/dist/extensions.d.ts +153 -0
  313. package/dist/extensions.js +53 -0
  314. package/dist/help-logo.js +5 -5
  315. package/dist/launch.js +46 -0
  316. package/dist/launcher-resolvers/index.d.ts +1 -0
  317. package/dist/launcher-resolvers/index.js +7 -0
  318. package/dist/live-app.d.ts +9 -0
  319. package/dist/live-app.js +25 -0
  320. package/dist/presentation.js +2 -2
  321. package/dist/runner/base.js +1 -1
  322. package/dist/runner/context.js +1 -1
  323. package/dist/runner/events.js +1 -1
  324. package/dist/runner/gateways.d.ts +11 -11
  325. package/dist/runner/gateways.js +1 -1
  326. package/dist/runner/index.d.ts +4 -4
  327. package/dist/runner/index.js +1 -1
  328. package/dist/runner/live/sandbox-gateway.js +4 -4
  329. package/dist/runner/live/terminal.d.ts +1 -1
  330. package/dist/runner/live/terminal.js +1 -1
  331. package/dist/runner/prepare.d.ts +13 -12
  332. package/dist/runner/prepare.js +3 -3
  333. package/dist/runner/ready.js +2 -2
  334. package/dist/runner/recipe.d.ts +24 -20
  335. package/dist/runner/recipe.js +19 -17
  336. package/dist/runner/{remote-command.d.ts → sandboxed-command.d.ts} +18 -19
  337. package/dist/runner/{remote-command.js → sandboxed-command.js} +21 -22
  338. package/dist/runner/scope.d.ts +3 -3
  339. package/dist/runner/secrets.js +1 -1
  340. package/dist/runner/snapshot-key.d.ts +1 -1
  341. package/dist/runner/snapshot-key.js +4 -4
  342. package/dist/runner/snapshot-save.js +3 -3
  343. package/dist/sdk/extension/commands.d.ts +71 -0
  344. package/dist/sdk/extension/commands.js +31 -0
  345. package/dist/{credential/diagnosis.d.ts → sdk/extension/credential-diagnosis.d.ts} +1 -7
  346. package/dist/{credential/diagnosis.js → sdk/extension/credential-diagnosis.js} +2 -11
  347. package/dist/sdk/extension/credential-source.d.ts +132 -0
  348. package/dist/sdk/extension/credential-source.js +5 -0
  349. package/dist/{credential → sdk/extension}/credential.d.ts +8 -7
  350. package/dist/{credential → sdk/extension}/credential.js +9 -6
  351. package/dist/sdk/extension/index.d.ts +15 -0
  352. package/dist/sdk/extension/index.js +39 -0
  353. package/dist/sdk/extension/launcher-supplies.d.ts +24 -0
  354. package/dist/sdk/extension/launcher-supplies.js +3 -0
  355. package/dist/sdk/extension/lifecycle.d.ts +211 -0
  356. package/dist/sdk/extension/lifecycle.js +9 -0
  357. package/dist/sdk/extension/presentation.d.ts +31 -0
  358. package/dist/sdk/extension/presentation.js +7 -0
  359. package/dist/sdk/extension/progress.d.ts +75 -0
  360. package/dist/sdk/extension/progress.js +8 -0
  361. package/dist/sdk/extension/reports.d.ts +15 -0
  362. package/dist/sdk/extension/reports.js +5 -0
  363. package/dist/sdk/extension/resource-definition.d.ts +204 -0
  364. package/dist/sdk/extension/resource-definition.js +24 -0
  365. package/dist/sdk/extension/resource-factory.d.ts +10 -0
  366. package/dist/sdk/extension/resource-factory.js +15 -0
  367. package/dist/sdk/extension/resource.d.ts +60 -0
  368. package/dist/sdk/extension/resource.js +42 -0
  369. package/dist/sdk/extension/rules.d.ts +16 -0
  370. package/dist/sdk/extension/rules.js +30 -0
  371. package/dist/sdk/extension/span.d.ts +8 -0
  372. package/dist/sdk/extension/span.js +4 -0
  373. package/dist/sdk/extension/time.d.ts +11 -0
  374. package/dist/sdk/extension/time.js +4 -0
  375. package/dist/sdk/extension/token-request-facts.d.ts +39 -0
  376. package/dist/sdk/extension/token-request-facts.js +35 -0
  377. package/dist/sdk/index.d.ts +4 -7
  378. package/dist/sdk/index.js +7 -15
  379. package/dist/sdk/run/contract.d.ts +32 -0
  380. package/dist/sdk/run/contract.js +12 -0
  381. package/dist/sdk/run/launcher.d.ts +5 -0
  382. package/dist/sdk/run/launcher.js +6 -0
  383. package/dist/sdk/run/payload.d.ts +58 -0
  384. package/dist/sdk/run/payload.js +73 -0
  385. package/dist/sdk/run/present.d.ts +11 -0
  386. package/dist/sdk/run/present.js +4 -0
  387. package/dist/sdk/run/redact.d.ts +5 -0
  388. package/dist/sdk/run/redact.js +12 -0
  389. package/dist/time/duration.js +2 -2
  390. package/dist/time/index.js +2 -1
  391. package/dist/time/time.d.ts +2 -11
  392. package/dist/time/time.js +2 -2
  393. package/dist/{sdk → vendor/testserver-sdk}/container/api-request.d.ts +14 -2
  394. package/dist/vendor/testserver-sdk/container/api-request.js +68 -0
  395. package/dist/{sdk → vendor/testserver-sdk}/container/container.d.ts +74 -24
  396. package/dist/{sdk → vendor/testserver-sdk}/container/container.js +180 -90
  397. package/dist/vendor/testserver-sdk/container/external.d.ts +111 -0
  398. package/dist/vendor/testserver-sdk/container/external.js +76 -0
  399. package/dist/vendor/testserver-sdk/container/gateways.d.ts +156 -0
  400. package/dist/{sdk → vendor/testserver-sdk}/container/index.d.ts +2 -1
  401. package/dist/{sdk → vendor/testserver-sdk}/container/index.js +2 -1
  402. package/dist/vendor/testserver-sdk/container/live/container-gateway.d.ts +22 -0
  403. package/dist/vendor/testserver-sdk/container/live/container-gateway.js +165 -0
  404. package/dist/vendor/testserver-sdk/container/recorder.d.ts +69 -0
  405. package/dist/vendor/testserver-sdk/container/recorder.js +121 -0
  406. package/dist/{sdk → vendor/testserver-sdk}/factories/build.d.ts +33 -12
  407. package/dist/{sdk → vendor/testserver-sdk}/factories/build.js +36 -14
  408. package/dist/vendor/testserver-sdk/factories/definition.d.ts +39 -0
  409. package/dist/{sdk → vendor/testserver-sdk}/factories/definition.js +1 -1
  410. package/dist/{sdk → vendor/testserver-sdk}/factories/definitions.d.ts +7 -4
  411. package/dist/{sdk → vendor/testserver-sdk}/factories/definitions.js +10 -0
  412. package/dist/vendor/testserver-sdk/factories/gateways.d.ts +31 -0
  413. package/dist/vendor/testserver-sdk/factories/index.d.ts +4 -0
  414. package/dist/{sdk → vendor/testserver-sdk}/factories/index.js +3 -3
  415. package/dist/vendor/testserver-sdk/index.d.ts +6 -0
  416. package/dist/vendor/testserver-sdk/index.js +11 -0
  417. package/dist/{sdk → vendor/testserver-sdk}/proxy/exchange.d.ts +2 -1
  418. package/dist/{sdk → vendor/testserver-sdk}/proxy/exchange.js +8 -4
  419. package/dist/{sdk → vendor/testserver-sdk}/proxy/faulted-exchange.js +7 -2
  420. package/dist/{sdk → vendor/testserver-sdk}/proxy/faults.d.ts +2 -1
  421. package/dist/{sdk → vendor/testserver-sdk}/proxy/records.d.ts +10 -1
  422. package/dist/{sdk → vendor/testserver-sdk}/proxy/records.js +13 -0
  423. package/dist/{sdk → vendor/testserver-sdk}/records/index.d.ts +1 -1
  424. package/dist/{sdk → vendor/testserver-sdk}/records/records.d.ts +17 -1
  425. package/dist/vendor/testserver-sdk/testserver/external-ids.d.ts +38 -0
  426. package/dist/vendor/testserver-sdk/testserver/external-ids.js +46 -0
  427. package/dist/vendor/testserver-sdk/testserver/failure.d.ts +101 -0
  428. package/dist/vendor/testserver-sdk/testserver/failure.js +108 -0
  429. package/dist/vendor/testserver-sdk/testserver/index.d.ts +7 -0
  430. package/dist/vendor/testserver-sdk/testserver/index.js +11 -0
  431. package/dist/{sdk → vendor/testserver-sdk}/testserver/live/request.d.ts +8 -10
  432. package/dist/{sdk → vendor/testserver-sdk}/testserver/live/request.js +8 -6
  433. package/dist/vendor/testserver-sdk/testserver/routes.d.ts +60 -0
  434. package/dist/vendor/testserver-sdk/testserver/routes.js +84 -0
  435. package/dist/vendor/testserver-sdk/testserver/service-ids.d.ts +31 -0
  436. package/dist/{sdk → vendor/testserver-sdk}/testserver/service-ids.js +27 -4
  437. package/dist/version.d.ts +2 -2
  438. package/dist/version.js +10 -11
  439. package/dist/vitest/config.d.ts +2 -32
  440. package/dist/vitest/config.js +6 -40
  441. package/dist/vitest/gateways.js +1 -1
  442. package/dist/vitest/index.d.ts +2 -3
  443. package/dist/vitest/index.js +5 -9
  444. package/dist/vitest/plan.d.ts +1 -16
  445. package/dist/vitest/plan.js +4 -36
  446. package/dist/vitest/test-events.d.ts +1 -18
  447. package/dist/vitest/test-events.js +2 -31
  448. package/package.json +53 -23
  449. package/skills/overview.md +9 -9
  450. package/skills/read-run-output.md +25 -2
  451. package/skills/testserver-builds.md +8 -8
  452. package/bin/node-version.js +0 -24
  453. package/dist/closed-terminal.d.ts +0 -7
  454. package/dist/closed-terminal.js +0 -18
  455. package/dist/combine-errors.d.ts +0 -11
  456. package/dist/combine-errors.js +0 -19
  457. package/dist/commands/exec/testserver-flags.d.ts +0 -48
  458. package/dist/commands/exec/testserver-flags.js +0 -80
  459. package/dist/config/by-name.d.ts +0 -24
  460. package/dist/config/by-name.js +0 -26
  461. package/dist/config/resource-config.d.ts +0 -132
  462. package/dist/config/resource-config.js +0 -19
  463. package/dist/config/set.d.ts +0 -27
  464. package/dist/config/set.js +0 -71
  465. package/dist/core/command-provider.d.ts +0 -126
  466. package/dist/core/command-provider.js +0 -13
  467. package/dist/core/command-slots.d.ts +0 -73
  468. package/dist/core/command-slots.js +0 -140
  469. package/dist/core/keyed.d.ts +0 -12
  470. package/dist/core/keyed.js +0 -24
  471. package/dist/core/lane.d.ts +0 -46
  472. package/dist/core/lane.js +0 -5
  473. package/dist/core/presentation.d.ts +0 -87
  474. package/dist/core/presentation.js +0 -5
  475. package/dist/core/provider.d.ts +0 -69
  476. package/dist/core/provider.js +0 -5
  477. package/dist/resources/github/cleanup.d.ts +0 -23
  478. package/dist/resources/github/cleanup.js +0 -39
  479. package/dist/resources/github/command.d.ts +0 -126
  480. package/dist/resources/github/command.js +0 -117
  481. package/dist/resources/github/config.d.ts +0 -16
  482. package/dist/resources/github/config.js +0 -37
  483. package/dist/resources/github/events.d.ts +0 -26
  484. package/dist/resources/github/events.js +0 -2
  485. package/dist/resources/github/index.d.ts +0 -12
  486. package/dist/resources/github/index.js +0 -15
  487. package/dist/resources/github/live/gateways.d.ts +0 -6
  488. package/dist/resources/github/live/gateways.js +0 -13
  489. package/dist/resources/github/presentation.d.ts +0 -13
  490. package/dist/resources/github/presentation.js +0 -43
  491. package/dist/resources/github/provider.d.ts +0 -66
  492. package/dist/resources/github/provider.js +0 -58
  493. package/dist/resources/github/resource-provider.d.ts +0 -6
  494. package/dist/resources/github/resource-provider.js +0 -20
  495. package/dist/resources/github/resource.d.ts +0 -33
  496. package/dist/resources/github/resource.js +0 -12
  497. package/dist/resources/testserver/cleanup.d.ts +0 -14
  498. package/dist/resources/testserver/cleanup.js +0 -22
  499. package/dist/resources/testserver/command.d.ts +0 -520
  500. package/dist/resources/testserver/command.js +0 -252
  501. package/dist/resources/testserver/commands/app.d.ts +0 -18
  502. package/dist/resources/testserver/commands/app.js +0 -3
  503. package/dist/resources/testserver/commands/create/command.js +0 -208
  504. package/dist/resources/testserver/commands/create/metadata.d.ts +0 -31
  505. package/dist/resources/testserver/commands/create/metadata.js +0 -49
  506. package/dist/resources/testserver/commands/list/command.js +0 -56
  507. package/dist/resources/testserver/commands/list/metadata.d.ts +0 -9
  508. package/dist/resources/testserver/commands/list/metadata.js +0 -9
  509. package/dist/resources/testserver/config.d.ts +0 -18
  510. package/dist/resources/testserver/config.js +0 -88
  511. package/dist/resources/testserver/events.js +0 -4
  512. package/dist/resources/testserver/index.d.ts +0 -16
  513. package/dist/resources/testserver/index.js +0 -25
  514. package/dist/resources/testserver/live/gateways.d.ts +0 -8
  515. package/dist/resources/testserver/live/gateways.js +0 -39
  516. package/dist/resources/testserver/options.d.ts +0 -5
  517. package/dist/resources/testserver/options.js +0 -5
  518. package/dist/resources/testserver/pool/directory.d.ts +0 -4
  519. package/dist/resources/testserver/pool/directory.js +0 -5
  520. package/dist/resources/testserver/pool/live/pool-store-gateway.d.ts +0 -12
  521. package/dist/resources/testserver/pr-build-facts.d.ts +0 -130
  522. package/dist/resources/testserver/pr-build-facts.js +0 -261
  523. package/dist/resources/testserver/presentation.d.ts +0 -9
  524. package/dist/resources/testserver/provider.d.ts +0 -187
  525. package/dist/resources/testserver/pull-request/gateways.js +0 -5
  526. package/dist/resources/testserver/ran.d.ts +0 -92
  527. package/dist/resources/testserver/ran.js +0 -156
  528. package/dist/resources/testserver/resource-provider.d.ts +0 -12
  529. package/dist/resources/testserver/resource-provider.js +0 -38
  530. package/dist/resources/testserver/resource.d.ts +0 -36
  531. package/dist/resources/testserver/resource.js +0 -10
  532. package/dist/resources/testserver/run-sandbox.d.ts +0 -13
  533. package/dist/resources/testserver/run-sandbox.js +0 -6
  534. package/dist/resources/testserver/sandbox/index.js +0 -8
  535. package/dist/resources.d.ts +0 -705
  536. package/dist/resources.js +0 -88
  537. package/dist/sdk/container/api-request.js +0 -46
  538. package/dist/sdk/container/gateways.d.ts +0 -108
  539. package/dist/sdk/container/live/container-gateway.d.ts +0 -17
  540. package/dist/sdk/container/live/container-gateway.js +0 -114
  541. package/dist/sdk/factories/definition.d.ts +0 -28
  542. package/dist/sdk/factories/gateways.d.ts +0 -25
  543. package/dist/sdk/factories/index.d.ts +0 -5
  544. package/dist/sdk/factories/live/factory-gateway.d.ts +0 -10
  545. package/dist/sdk/factories/live/factory-gateway.js +0 -29
  546. package/dist/sdk/payload/index.d.ts +0 -2
  547. package/dist/sdk/payload/index.js +0 -4
  548. package/dist/sdk/payload/payload.d.ts +0 -47
  549. package/dist/sdk/payload/payload.js +0 -74
  550. package/dist/sdk/testserver/failure.d.ts +0 -73
  551. package/dist/sdk/testserver/failure.js +0 -61
  552. package/dist/sdk/testserver/index.d.ts +0 -5
  553. package/dist/sdk/testserver/index.js +0 -8
  554. package/dist/sdk/testserver/service-ids.d.ts +0 -19
  555. package/dist/vitest/sandbox.d.ts +0 -16
  556. package/dist/vitest/sandbox.js +0 -35
  557. /package/dist/{credential/settle.js → config/credential-settle.js} +0 -0
  558. /package/dist/{resources → extensions}/github/gateways.d.ts +0 -0
  559. /package/dist/{resources → extensions}/github/gateways.js +0 -0
  560. /package/dist/{resources → extensions}/github/live/fixture-repo-gateway.d.ts +0 -0
  561. /package/dist/{resources → extensions}/github/live/fixture-repo-gateway.js +0 -0
  562. /package/dist/{resources/testserver/commands → extensions/testserver/commands/pool}/list/outcomes.d.ts +0 -0
  563. /package/dist/{core → extensions/testserver}/limit.d.ts +0 -0
  564. /package/dist/{resources/testserver/sandbox → extensions/testserver/options}/build-reference.d.ts +0 -0
  565. /package/dist/{resources/testserver/sandbox → extensions/testserver/options}/build-reference.js +0 -0
  566. /package/dist/{resources/testserver/sandbox → extensions/testserver/options}/channels.js +0 -0
  567. /package/dist/{resources → extensions}/testserver/pool/gateways.d.ts +0 -0
  568. /package/dist/{resources → extensions}/testserver/pool/gateways.js +0 -0
  569. /package/dist/{resources → extensions}/testserver/pool/host.d.ts +0 -0
  570. /package/dist/{resources → extensions}/testserver/pool/host.js +0 -0
  571. /package/dist/{resources → extensions}/testserver/pool/inspect.js +0 -0
  572. /package/dist/{resources → extensions}/testserver/pool/lease.js +0 -0
  573. /package/dist/{resources → extensions}/testserver/pool/live/pool-records.d.ts +0 -0
  574. /package/dist/{resources → extensions}/testserver/pool/live/pool-records.js +0 -0
  575. /package/dist/{resources → extensions}/testserver/pool/staleness.d.ts +0 -0
  576. /package/dist/{resources → extensions}/testserver/pool/staleness.js +0 -0
  577. /package/dist/{resources → extensions}/testserver/pull-request/index.d.ts +0 -0
  578. /package/dist/{resources → extensions}/testserver/pull-request/live/github-rest.d.ts +0 -0
  579. /package/dist/{resources → extensions}/testserver/pull-request/live/github-rest.js +0 -0
  580. /package/dist/{resources → extensions}/testserver/pull-request/live/pull-request-gateway.d.ts +0 -0
  581. /package/dist/{resources → extensions}/testserver/pull-request/live/pull-request-gateway.js +0 -0
  582. /package/dist/{resources → extensions}/testserver/pull-request/live/testserver-workflow-gateway.d.ts +0 -0
  583. /package/dist/{resources → extensions}/testserver/pull-request/live/testserver-workflow-gateway.js +0 -0
  584. /package/dist/{resources → extensions}/testserver/sandbox/create-failure.d.ts +0 -0
  585. /package/dist/{resources → extensions}/testserver/sandbox/create-failure.js +0 -0
  586. /package/dist/{resources → extensions}/testserver/sandbox/gateways.js +0 -0
  587. /package/dist/{resources → extensions}/testserver/sandbox/live/builds-response.d.ts +0 -0
  588. /package/dist/{resources → extensions}/testserver/sandbox/live/builds-response.js +0 -0
  589. /package/dist/{resources → extensions}/testserver/sandbox/live/control-plane-gateway.d.ts +0 -0
  590. /package/dist/{resources → extensions}/testserver/sandbox/live/control-plane-gateway.js +0 -0
  591. /package/dist/{resources → extensions}/testserver/sandbox/live/create-response.d.ts +0 -0
  592. /package/dist/{resources → extensions}/testserver/sandbox/live/create-response.js +0 -0
  593. /package/dist/{resources → extensions}/testserver/sandbox/live/fetch-failure.d.ts +0 -0
  594. /package/dist/{resources → extensions}/testserver/sandbox/live/fetch-failure.js +0 -0
  595. /package/dist/{resources → extensions}/testserver/sandbox/live/health-check-gateway.d.ts +0 -0
  596. /package/dist/{resources → extensions}/testserver/sandbox/live/health-check-gateway.js +0 -0
  597. /package/dist/{resources → extensions}/testserver/sandbox/live/sse.d.ts +0 -0
  598. /package/dist/{resources → extensions}/testserver/sandbox/live/sse.js +0 -0
  599. /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/ansi.d.ts +0 -0
  600. /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/ansi.js +0 -0
  601. /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/arguments.d.ts +0 -0
  602. /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/auth-config.d.ts +0 -0
  603. /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/auth-config.js +0 -0
  604. /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/clock.d.ts +0 -0
  605. /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/clock.js +0 -0
  606. /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/config-files.d.ts +0 -0
  607. /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/config-files.js +0 -0
  608. /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/context.d.ts +0 -0
  609. /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/driver.js +0 -0
  610. /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/entry.d.ts +0 -0
  611. /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/entry.js +0 -0
  612. /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/environment.d.ts +0 -0
  613. /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/environment.js +0 -0
  614. /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/errors.d.ts +0 -0
  615. /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/errors.js +0 -0
  616. /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/gateways.d.ts +0 -0
  617. /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/index.d.ts +0 -0
  618. /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/keys.d.ts +0 -0
  619. /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/keys.js +0 -0
  620. /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/live/config-files.d.ts +0 -0
  621. /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/live/config-files.js +0 -0
  622. /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/live/process-gateway.d.ts +0 -0
  623. /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/live/process-gateway.js +0 -0
  624. /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/redaction.d.ts +0 -0
  625. /package/dist/{vercel-cli → extensions/testserver/vercel-cli}/verbose.d.ts +0 -0
  626. /package/dist/{vitest → extensions/testserver/vitest}/types.js +0 -0
  627. /package/dist/sdk/{payload → run}/test-events.d.ts +0 -0
  628. /package/dist/sdk/{payload → run}/test-events.js +0 -0
  629. /package/dist/{sdk → vendor/testserver-sdk}/container/feature-flags.d.ts +0 -0
  630. /package/dist/{sdk → vendor/testserver-sdk}/container/feature-flags.js +0 -0
  631. /package/dist/{sdk → vendor/testserver-sdk}/container/gateways.js +0 -0
  632. /package/dist/{sdk → vendor/testserver-sdk}/factories/gateways.js +0 -0
  633. /package/dist/{sdk → vendor/testserver-sdk}/proxy/faulted-exchange.d.ts +0 -0
  634. /package/dist/{sdk → vendor/testserver-sdk}/proxy/faults.js +0 -0
  635. /package/dist/{sdk → vendor/testserver-sdk}/proxy/index.d.ts +0 -0
  636. /package/dist/{sdk → vendor/testserver-sdk}/proxy/index.js +0 -0
  637. /package/dist/{sdk → vendor/testserver-sdk}/proxy/proxy.d.ts +0 -0
  638. /package/dist/{sdk → vendor/testserver-sdk}/proxy/proxy.js +0 -0
  639. /package/dist/{sdk → vendor/testserver-sdk}/records/body.d.ts +0 -0
  640. /package/dist/{sdk → vendor/testserver-sdk}/records/body.js +0 -0
  641. /package/dist/{sdk → vendor/testserver-sdk}/records/index.js +0 -0
  642. /package/dist/{sdk → vendor/testserver-sdk}/records/records.js +0 -0
  643. /package/dist/{sdk → vendor/testserver-sdk}/seed/index.d.ts +0 -0
  644. /package/dist/{sdk → vendor/testserver-sdk}/seed/index.js +0 -0
  645. /package/dist/{sdk → vendor/testserver-sdk}/seed/seed.d.ts +0 -0
  646. /package/dist/{sdk → vendor/testserver-sdk}/seed/seed.js +0 -0
  647. /package/dist/{sdk → vendor/testserver-sdk}/testserver/clock.d.ts +0 -0
  648. /package/dist/{sdk → vendor/testserver-sdk}/testserver/clock.js +0 -0
  649. /package/dist/{sdk → vendor/testserver-sdk}/testserver/live/connect-failure.d.ts +0 -0
  650. /package/dist/{sdk → vendor/testserver-sdk}/testserver/live/connect-failure.js +0 -0
  651. /package/dist/{sdk → vendor/testserver-sdk}/testserver/test-id.d.ts +0 -0
  652. /package/dist/{sdk → vendor/testserver-sdk}/testserver/test-id.js +0 -0
@@ -1,59 +1,36 @@
1
1
  /** The flags every run takes, as a usage line names them, before the command's own arguments. */
2
- export declare const RUN_USAGE_FLAGS = "[--testserver-sandboxes <N>] [--testserver-build <BUILD>] [--testserver-min-time-left <DURATION>] [--testserver-ttl <DURATION> | --testserver-no-create] [--set <KEY=VALUE>]... [--credential <SOURCE>] [--scope <TEAM> --project <PROJECT>] [--local | [--rebuild-snapshot] [--save-snapshot] [--show-output] [--keep-sandbox <DURATION>]] [--verbose]";
3
- /** The field descriptions of the flags every run takes. */
2
+ export declare const RUN_USAGE_FLAGS: string;
3
+ /** The field descriptions of the flags every run takes: the resources' flags, then the run's own. */
4
4
  export declare const RUN_FIELDS: {
5
- readonly testserverSandboxes: {
6
- readonly valueLabel: "N";
7
- readonly description: "How many Testserver sandboxes the command gets, 1 to 32, overriding resources.testserverPool.sandboxes in storm.config.ts; default 1. Gives the run a Testserver side.";
8
- };
9
- readonly testserverBuild: {
10
- readonly valueLabel: "BUILD";
11
- readonly description: "The build the Testserver sandboxes run: a build name, the build channel stable or latest_main, or a vercel/api pull request as pr:<N> or its URL, overriding resources.testserverPool.build in storm.config.ts; default stable. A pull request runs on the newest build made from its head commit, which storm reads from GitHub with GITHUB_TOKEN, GH_TOKEN or gh auth token, or refuses. Gives the run a Testserver side.";
12
- };
13
- readonly testserverMinTimeLeft: {
14
- readonly valueLabel: "DURATION";
15
- readonly description: "The least time left a Testserver sandbox from the pool needs, in whole minutes or hours (30m, 2h), overriding resources.testserverPool.minTimeLeft in storm.config.ts; default 30m. Gives the run a Testserver side.";
16
- };
17
- readonly testserverTtl: {
18
- readonly valueLabel: "DURATION";
19
- readonly description: "How long each Testserver sandbox the run creates lives, 10m to 5h and longer than minTimeLeft, overriding resources.testserverPool.ttl in storm.config.ts; default 5h. Not with noCreate. Gives the run a Testserver side.";
20
- };
21
- readonly testserverNoCreate: {
22
- readonly description: "Run only on Testserver sandboxes already in the pool, never minting for Testserver or creating: needs no --scope or --project with --local, and takes no --testserver-ttl. Turns on resources.testserverPool.noCreate whatever storm.config.ts says; without it, the file's noCreate, default false, applies. Gives the run a Testserver side.";
23
- };
24
- readonly set: {
25
- readonly valueLabel: "KEY=VALUE";
26
- readonly description: "Set a resource's option for this run by its key path in storm.config.ts, resources.<name>.<option>, overriding the file and the default; repeat it for each option. The key paths: resources.githubFixtureRepo.repo, the GitHub repository as owner/name, required; resources.githubFixtureRepo.tokenEnv, the host environment variable holding its token, required; resources.githubFixtureRepo.optional, true or false, default false: false refuses the run without the token, true goes on without the repository. The Testserver pool resource's options have their own flags, --testserver-<option>, which --set doesn't take. Any --set of a resource's option gives the run that resource, as storm.config.ts does. An unknown key path, one given twice, one with its own flag, or a value its option refuses is a usage error. Options that don't fit together once merged, or a required one nothing gives, are invalid_resource_options, naming where each value came from.";
27
- };
28
- readonly credential: {
5
+ credential: {
29
6
  readonly valueLabel: "SOURCE";
30
- readonly description: "The credential source: mint, the default, mints one with the vercel CLI for --scope and --project; github-actions requests a GitHub Actions OIDC token, in a GitHub Actions job with permissions id-token: write, anew once it is 4 minutes old, and needs no --scope or --project. Only --local takes it: a runner run needs the mint. Only a run holding a resource that takes a credential takes it, the Testserver pool resource without noCreate (resources.testserverPool in storm.config.ts, or any --testserver-* flag but --testserver-no-create); otherwise it is credential_unused. No config key.";
7
+ readonly description: "The credential source: mint, the default, mints one with the vercel CLI for --scope and --project; github-actions requests a GitHub Actions OIDC token, in a GitHub Actions job with permissions id-token: write, anew once it is 4 minutes old, and needs no --scope or --project. Only --unsandboxed takes it: a sandboxed run needs the mint. Only a run with a resource that takes a credential takes it, as that resource's options decide; otherwise it is credential_unused. No config key.";
31
8
  };
32
- readonly local: {
33
- readonly description: "Run the command on this machine instead of in a runner sandbox. Without it, the command runs in a Vercel Sandbox started from a runner snapshot of the base, with this checkout's changes applied, installed and built, from the runner key of storm.config.ts, and its output streams back with paths rewritten to this checkout's. No config key.";
9
+ unsandboxed: {
10
+ readonly description: "Run the command on this machine, with no isolation: it sees this machine's files and environment, less the variables the resources drop. Without it, the command runs in a Vercel Sandbox started from a runner snapshot of the base, with this checkout's changes applied, installed and built, from the runner key of storm.config.ts, and its output streams back with paths rewritten to this checkout's. No config key.";
34
11
  };
35
- readonly rebuildSnapshot: {
36
- readonly description: "Build a runner snapshot of the base whatever the runner snapshot cache holds, replacing an entry for the same base, and drop this branch's saved branch snapshots from the cache. Not with --local. No config key.";
12
+ rebuildSnapshot: {
13
+ readonly description: "Build a runner snapshot of the base whatever the runner snapshot cache holds, replacing an entry for the same base, and drop this branch's saved branch snapshots from the cache. Not with --unsandboxed. No config key.";
37
14
  };
38
- readonly saveSnapshot: {
39
- readonly description: "Once the command ends on its own after a successful install and build, save the runner sandbox as this branch's runner snapshot, so the next run on the branch starts from this run's install and build outputs. The run resets the working tree to the snapshot's base, keeps .git and ignored files such as node_modules and build outputs, and empties /tmp; the snapshot keeps whatever the command wrote there and to $HOME, a resource's token included. A run with it on a branch keeps no runner sandbox, even when it fails or stops before the save. With a detached HEAD it says so as it starts and keeps the runner sandbox as without the flag. Not with --local, or with --keep-sandbox above 0. No config key.";
15
+ saveSnapshot: {
16
+ readonly description: "Once the command ends on its own after a successful install and build, save the runner sandbox as this branch's runner snapshot, so the next run on the branch starts from this run's install and build outputs. The run resets the working tree to the snapshot's base, keeps .git and ignored files such as node_modules and build outputs, and empties /tmp; the snapshot keeps whatever the command wrote there and to $HOME, a resource's token included. A run with it on a branch keeps no runner sandbox, even when it fails or stops before the save. With a detached HEAD it says so as it starts and keeps the runner sandbox as without the flag. Not with --unsandboxed, or with --keep-sandbox above 0. No config key.";
40
17
  };
41
- readonly keepSandbox: {
18
+ keepSandbox: {
42
19
  readonly valueLabel: "DURATION";
43
- readonly description: "How long the runner sandbox keeps running once the run ends, however it ends, so you can connect to it from its page in the Vercel dashboard: 0, which stops and deletes it with the run's other sandboxes, or a whole number of minutes or hours up to 5h (30m, 2h). The run asks Vercel Sandbox to extend the runner sandbox's timeout when it would stop sooner; it never shortens it, so the sandbox may run past the keep time until its own timeout. The run says until when it runs, and storm runs show and runs list say so too. Default: keepSandbox in the runner recipe, else 30m, or 0 when CI is set. Not with --local.";
20
+ readonly description: "How long the runner sandbox keeps running once the run ends, however it ends, so you can connect to it from its page in the Vercel dashboard: 0, which stops and deletes it with the run's other sandboxes, or a whole number of minutes or hours up to 5h (30m, 2h). The run asks Vercel Sandbox to extend the runner sandbox's timeout when it would stop sooner; it never shortens it, so the sandbox may run past the keep time until its own timeout. The run says until when it runs, and storm runs show and runs list say so too. Default: keepSandbox in the runner recipe, else 30m, or 0 when CI is set. Not with --unsandboxed.";
44
21
  };
45
- readonly showOutput: {
46
- readonly description: "In a runner run on a terminal, print the runner's step output (a snapshot build, the install, the build) above the live view instead of keeping only each step's last line there. Plain output always prints it. Either way, the run directory keeps it whole. Not with --local. No config key.";
22
+ showOutput: {
23
+ readonly description: "In a sandboxed run on a terminal, print the runner's step output (a snapshot build, the install, the build) above the live view instead of keeping only each step's last line there. Plain output always prints it. Either way, the run directory keeps it whole. Not with --unsandboxed. No config key.";
47
24
  };
48
- readonly verbose: {
49
- readonly description: "Print more as it happens: each Testserver sandbox create's progress messages, the runner's step output as with --show-output, and verbose in the run payload, which has the Vitest adapter's reporters print each test as it finishes and its fixtures print each container start, proxied request and vercel invocation, for passing tests too. No config key.";
25
+ verbose: {
26
+ readonly description: "Print more as it happens: each resource's detailed progress, the runner's step output as with --show-output, and verbose in the run payload, which has the Vitest adapter's reporters print each test as it finishes and its fixtures print each container start, proxied request and vercel invocation, for passing tests too. No config key.";
50
27
  };
51
- readonly scope: {
28
+ scope: {
52
29
  readonly valueLabel: "TEAM";
53
- readonly description: "The control plane team: the Vercel team whose project's development OIDC tokens the Testserver control plane trusts. Required, from this flag or scope in storm.config.ts, unless --local without a Testserver side, with noCreate or with --credential github-actions.";
30
+ readonly description: "The control plane team: the Vercel team whose project the credential is minted for and a sandboxed run's sandboxes run in. Required, from this flag or scope in storm.config.ts, unless an unsandboxed run has no resource that takes a credential or takes --credential github-actions.";
54
31
  };
55
- readonly project: {
32
+ project: {
56
33
  readonly valueLabel: "PROJECT";
57
- readonly description: "The control plane project: the Vercel project, within the team, to mint the credential for. Required, from this flag or project in storm.config.ts, unless --local without a Testserver side, with noCreate or with --credential github-actions.";
34
+ readonly description: "The control plane project: the Vercel project, within the team, to mint the credential for. Required, from this flag or project in storm.config.ts, unless an unsandboxed run has no resource that takes a credential or takes --credential github-actions.";
58
35
  };
59
36
  };
@@ -1,61 +1,42 @@
1
1
  // The help every run's command shares, `exec`'s and `vitest`'s: the usage of the flags every run takes, and their field
2
- // descriptions. Clinkr loads each command's metadata eagerly for navigation, so this module imports nothing.
2
+ // descriptions: the run's own, and each resource option's flag, from the registry's resource definitions
3
+ // (`resource-flags.ts`). `exec`'s and `vitest`'s `command.ts` read it for their leaf help.
4
+ import { RESOURCE_FLAG_HELP, RESOURCE_USAGE_FLAGS } from "./resource-flags.js";
3
5
  /** The flags every run takes, as a usage line names them, before the command's own arguments. */
4
- export const RUN_USAGE_FLAGS = "[--testserver-sandboxes <N>] [--testserver-build <BUILD>] [--testserver-min-time-left <DURATION>] [--testserver-ttl <DURATION> | --testserver-no-create] [--set <KEY=VALUE>]... [--credential <SOURCE>] [--scope <TEAM> --project <PROJECT>] [--local | [--rebuild-snapshot] [--save-snapshot] [--show-output] [--keep-sandbox <DURATION>]] [--verbose]";
5
- /** The field descriptions of the flags every run takes. */
6
- export const RUN_FIELDS = {
7
- testserverSandboxes: {
8
- valueLabel: "N",
9
- description: "How many Testserver sandboxes the command gets, 1 to 32, overriding resources.testserverPool.sandboxes in storm.config.ts; default 1. Gives the run a Testserver side.",
10
- },
11
- testserverBuild: {
12
- valueLabel: "BUILD",
13
- description: "The build the Testserver sandboxes run: a build name, the build channel stable or latest_main, or a vercel/api pull request as pr:<N> or its URL, overriding resources.testserverPool.build in storm.config.ts; default stable. A pull request runs on the newest build made from its head commit, which storm reads from GitHub with GITHUB_TOKEN, GH_TOKEN or gh auth token, or refuses. Gives the run a Testserver side.",
14
- },
15
- testserverMinTimeLeft: {
16
- valueLabel: "DURATION",
17
- description: "The least time left a Testserver sandbox from the pool needs, in whole minutes or hours (30m, 2h), overriding resources.testserverPool.minTimeLeft in storm.config.ts; default 30m. Gives the run a Testserver side.",
18
- },
19
- testserverTtl: {
20
- valueLabel: "DURATION",
21
- description: "How long each Testserver sandbox the run creates lives, 10m to 5h and longer than minTimeLeft, overriding resources.testserverPool.ttl in storm.config.ts; default 5h. Not with noCreate. Gives the run a Testserver side.",
22
- },
23
- testserverNoCreate: {
24
- description: "Run only on Testserver sandboxes already in the pool, never minting for Testserver or creating: needs no --scope or --project with --local, and takes no --testserver-ttl. Turns on resources.testserverPool.noCreate whatever storm.config.ts says; without it, the file's noCreate, default false, applies. Gives the run a Testserver side.",
25
- },
26
- set: {
27
- valueLabel: "KEY=VALUE",
28
- description: "Set a resource's option for this run by its key path in storm.config.ts, resources.<name>.<option>, overriding the file and the default; repeat it for each option. The key paths: resources.githubFixtureRepo.repo, the GitHub repository as owner/name, required; resources.githubFixtureRepo.tokenEnv, the host environment variable holding its token, required; resources.githubFixtureRepo.optional, true or false, default false: false refuses the run without the token, true goes on without the repository. The Testserver pool resource's options have their own flags, --testserver-<option>, which --set doesn't take. Any --set of a resource's option gives the run that resource, as storm.config.ts does. An unknown key path, one given twice, one with its own flag, or a value its option refuses is a usage error. Options that don't fit together once merged, or a required one nothing gives, are invalid_resource_options, naming where each value came from.",
29
- },
6
+ export const RUN_USAGE_FLAGS = `${RESOURCE_USAGE_FLAGS} [--credential <SOURCE>] [--scope <TEAM> --project <PROJECT>] [--unsandboxed | [--rebuild-snapshot] [--save-snapshot] [--show-output] [--keep-sandbox <DURATION>]] [--verbose]`;
7
+ /** The field descriptions of the run's own flags. */
8
+ const OWN_RUN_FIELDS = {
30
9
  credential: {
31
10
  valueLabel: "SOURCE",
32
- description: "The credential source: mint, the default, mints one with the vercel CLI for --scope and --project; github-actions requests a GitHub Actions OIDC token, in a GitHub Actions job with permissions id-token: write, anew once it is 4 minutes old, and needs no --scope or --project. Only --local takes it: a runner run needs the mint. Only a run holding a resource that takes a credential takes it, the Testserver pool resource without noCreate (resources.testserverPool in storm.config.ts, or any --testserver-* flag but --testserver-no-create); otherwise it is credential_unused. No config key.",
11
+ description: "The credential source: mint, the default, mints one with the vercel CLI for --scope and --project; github-actions requests a GitHub Actions OIDC token, in a GitHub Actions job with permissions id-token: write, anew once it is 4 minutes old, and needs no --scope or --project. Only --unsandboxed takes it: a sandboxed run needs the mint. Only a run with a resource that takes a credential takes it, as that resource's options decide; otherwise it is credential_unused. No config key.",
33
12
  },
34
- local: {
35
- description: "Run the command on this machine instead of in a runner sandbox. Without it, the command runs in a Vercel Sandbox started from a runner snapshot of the base, with this checkout's changes applied, installed and built, from the runner key of storm.config.ts, and its output streams back with paths rewritten to this checkout's. No config key.",
13
+ unsandboxed: {
14
+ description: "Run the command on this machine, with no isolation: it sees this machine's files and environment, less the variables the resources drop. Without it, the command runs in a Vercel Sandbox started from a runner snapshot of the base, with this checkout's changes applied, installed and built, from the runner key of storm.config.ts, and its output streams back with paths rewritten to this checkout's. No config key.",
36
15
  },
37
16
  rebuildSnapshot: {
38
- description: "Build a runner snapshot of the base whatever the runner snapshot cache holds, replacing an entry for the same base, and drop this branch's saved branch snapshots from the cache. Not with --local. No config key.",
17
+ description: "Build a runner snapshot of the base whatever the runner snapshot cache holds, replacing an entry for the same base, and drop this branch's saved branch snapshots from the cache. Not with --unsandboxed. No config key.",
39
18
  },
40
19
  saveSnapshot: {
41
- description: "Once the command ends on its own after a successful install and build, save the runner sandbox as this branch's runner snapshot, so the next run on the branch starts from this run's install and build outputs. The run resets the working tree to the snapshot's base, keeps .git and ignored files such as node_modules and build outputs, and empties /tmp; the snapshot keeps whatever the command wrote there and to $HOME, a resource's token included. A run with it on a branch keeps no runner sandbox, even when it fails or stops before the save. With a detached HEAD it says so as it starts and keeps the runner sandbox as without the flag. Not with --local, or with --keep-sandbox above 0. No config key.",
20
+ description: "Once the command ends on its own after a successful install and build, save the runner sandbox as this branch's runner snapshot, so the next run on the branch starts from this run's install and build outputs. The run resets the working tree to the snapshot's base, keeps .git and ignored files such as node_modules and build outputs, and empties /tmp; the snapshot keeps whatever the command wrote there and to $HOME, a resource's token included. A run with it on a branch keeps no runner sandbox, even when it fails or stops before the save. With a detached HEAD it says so as it starts and keeps the runner sandbox as without the flag. Not with --unsandboxed, or with --keep-sandbox above 0. No config key.",
42
21
  },
43
22
  keepSandbox: {
44
23
  valueLabel: "DURATION",
45
- description: "How long the runner sandbox keeps running once the run ends, however it ends, so you can connect to it from its page in the Vercel dashboard: 0, which stops and deletes it with the run's other sandboxes, or a whole number of minutes or hours up to 5h (30m, 2h). The run asks Vercel Sandbox to extend the runner sandbox's timeout when it would stop sooner; it never shortens it, so the sandbox may run past the keep time until its own timeout. The run says until when it runs, and storm runs show and runs list say so too. Default: keepSandbox in the runner recipe, else 30m, or 0 when CI is set. Not with --local.",
24
+ description: "How long the runner sandbox keeps running once the run ends, however it ends, so you can connect to it from its page in the Vercel dashboard: 0, which stops and deletes it with the run's other sandboxes, or a whole number of minutes or hours up to 5h (30m, 2h). The run asks Vercel Sandbox to extend the runner sandbox's timeout when it would stop sooner; it never shortens it, so the sandbox may run past the keep time until its own timeout. The run says until when it runs, and storm runs show and runs list say so too. Default: keepSandbox in the runner recipe, else 30m, or 0 when CI is set. Not with --unsandboxed.",
46
25
  },
47
26
  showOutput: {
48
- description: "In a runner run on a terminal, print the runner's step output (a snapshot build, the install, the build) above the live view instead of keeping only each step's last line there. Plain output always prints it. Either way, the run directory keeps it whole. Not with --local. No config key.",
27
+ description: "In a sandboxed run on a terminal, print the runner's step output (a snapshot build, the install, the build) above the live view instead of keeping only each step's last line there. Plain output always prints it. Either way, the run directory keeps it whole. Not with --unsandboxed. No config key.",
49
28
  },
50
29
  verbose: {
51
- description: "Print more as it happens: each Testserver sandbox create's progress messages, the runner's step output as with --show-output, and verbose in the run payload, which has the Vitest adapter's reporters print each test as it finishes and its fixtures print each container start, proxied request and vercel invocation, for passing tests too. No config key.",
30
+ description: "Print more as it happens: each resource's detailed progress, the runner's step output as with --show-output, and verbose in the run payload, which has the Vitest adapter's reporters print each test as it finishes and its fixtures print each container start, proxied request and vercel invocation, for passing tests too. No config key.",
52
31
  },
53
32
  scope: {
54
33
  valueLabel: "TEAM",
55
- description: "The control plane team: the Vercel team whose project's development OIDC tokens the Testserver control plane trusts. Required, from this flag or scope in storm.config.ts, unless --local without a Testserver side, with noCreate or with --credential github-actions.",
34
+ description: "The control plane team: the Vercel team whose project the credential is minted for and a sandboxed run's sandboxes run in. Required, from this flag or scope in storm.config.ts, unless an unsandboxed run has no resource that takes a credential or takes --credential github-actions.",
56
35
  },
57
36
  project: {
58
37
  valueLabel: "PROJECT",
59
- description: "The control plane project: the Vercel project, within the team, to mint the credential for. Required, from this flag or project in storm.config.ts, unless --local without a Testserver side, with noCreate or with --credential github-actions.",
38
+ description: "The control plane project: the Vercel project, within the team, to mint the credential for. Required, from this flag or project in storm.config.ts, unless an unsandboxed run has no resource that takes a credential or takes --credential github-actions.",
60
39
  },
61
40
  };
41
+ /** The field descriptions of the flags every run takes: the resources' flags, then the run's own. */
42
+ export const RUN_FIELDS = { ...RESOURCE_FLAG_HELP, ...OWN_RUN_FIELDS };
@@ -1,6 +1,7 @@
1
+ import type { Row } from "@vercel/clinkr";
1
2
  import { z } from "zod";
2
- import { type StormResourceRanFacts } from "../../resources.ts";
3
- import type { TestEvent } from "../../sdk/index.ts";
3
+ import type { TestEvent } from "../../sdk/run/launcher.ts";
4
+ import { type TestPlanFacts } from "./test-plan.ts";
4
5
  declare const testTotalsSchema: z.ZodObject<{
5
6
  passed: z.ZodNumber;
6
7
  failed: z.ZodNumber;
@@ -18,26 +19,41 @@ declare const endedSchema: z.ZodObject<{
18
19
  failed: z.ZodNumber;
19
20
  skipped: z.ZodNumber;
20
21
  }, z.core.$strip>>;
21
- testsIncomplete: z.ZodDefault<z.ZodNullable<z.ZodString>>;
22
- resources: z.ZodUnknown;
22
+ testsIncomplete: z.ZodNullable<z.ZodString>;
23
+ resources: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
24
+ definition: z.ZodString;
25
+ facts: z.ZodUnknown;
26
+ }, z.core.$strip>>>;
27
+ resourceRows: z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>], null>>;
23
28
  }, z.core.$strip>;
24
29
  /**
25
- * How a run ended: its outcome's kind (`ran`, `canceled`, `spawn-failed`, …), the status storm exited with and
26
- * the signal that ended the command, for a run whose command ran (null otherwise), how long the command took (null
27
- * when it never ended), its tests' totals (null without a final result), why those may be incomplete (null unless a
28
- * runner run's final read of its test events file failed), and what each resource it acquired reports
29
- * of itself, as a `ran` outcome does, such as the Testserver sandboxes and their log viewer URLs (null for any other
30
- * outcome).
30
+ * What each resource instance a run acquired reported of itself, by resource key, as recorded: its definition's name
31
+ * and its facts, whose shape is the definition's as of the run.
31
32
  */
32
- export type RunRecordEnd = Readonly<Omit<z.output<typeof endedSchema>, "resources"> & {
33
- readonly resources: StormResourceRanFacts | null;
33
+ export type RecordedResources = {
34
+ readonly [key: string]: {
35
+ readonly definition: string;
36
+ readonly facts: unknown;
37
+ };
38
+ };
39
+ /**
40
+ * How a run ended: its outcome's kind (`ran`, `canceled`, `spawn-failed`, …), the status storm exited with and the
41
+ * signal that ended the command, for a run whose command ran (null otherwise), how long the command took (null when it
42
+ * never ended), its tests' totals (null without a final result), why those may be incomplete (null unless a sandboxed
43
+ * run's final read of its test events file failed), what each resource instance it acquired reports of itself, as a
44
+ * `ran` outcome does (null for any other outcome), and the rows `storm runs show` lists for those, as storm rendered
45
+ * them when the run ended (none for any other outcome).
46
+ */
47
+ export type RunRecordEnd = Readonly<Omit<z.output<typeof endedSchema>, "resources" | "resourceRows"> & {
48
+ readonly resources: RecordedResources | null;
49
+ readonly resourceRows: readonly Row[];
34
50
  }>;
35
51
  declare const snapshotSchema: z.ZodObject<{
36
52
  id: z.ZodString;
37
53
  base: z.ZodString;
38
54
  built: z.ZodBoolean;
39
- branch: z.ZodDefault<z.ZodNullable<z.ZodString>>;
40
- head: z.ZodDefault<z.ZodNullable<z.ZodString>>;
55
+ branch: z.ZodNullable<z.ZodString>;
56
+ head: z.ZodNullable<z.ZodString>;
41
57
  }, z.core.$strip>;
42
58
  /**
43
59
  * The runner snapshot a runner sandbox started from: its id, the base it is of, which the run's changes were uploaded
@@ -74,7 +90,7 @@ export declare const saveSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
74
90
  /** How saving the runner sandbox as a branch snapshot ended. */
75
91
  export type RunRecordSave = z.output<typeof saveSchema>;
76
92
  declare const whereSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
77
- kind: z.ZodLiteral<"local">;
93
+ kind: z.ZodLiteral<"unsandboxed">;
78
94
  }, z.core.$strip>, z.ZodObject<{
79
95
  kind: z.ZodLiteral<"runner">;
80
96
  team: z.ZodString;
@@ -89,11 +105,11 @@ declare const whereSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
89
105
  id: z.ZodString;
90
106
  base: z.ZodString;
91
107
  built: z.ZodBoolean;
92
- branch: z.ZodDefault<z.ZodNullable<z.ZodString>>;
93
- head: z.ZodDefault<z.ZodNullable<z.ZodString>>;
108
+ branch: z.ZodNullable<z.ZodString>;
109
+ head: z.ZodNullable<z.ZodString>;
94
110
  }, z.core.$strip>>;
95
- keptUntil: z.ZodDefault<z.ZodNullable<z.ZodString>>;
96
- save: z.ZodDefault<z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
111
+ keptUntil: z.ZodNullable<z.ZodString>;
112
+ save: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
97
113
  kind: z.ZodLiteral<"saved">;
98
114
  snapshotId: z.ZodString;
99
115
  base: z.ZodString;
@@ -114,14 +130,14 @@ declare const whereSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
114
130
  message: z.ZodString;
115
131
  }, z.core.$strip>, z.ZodObject<{
116
132
  kind: z.ZodLiteral<"stopped">;
117
- }, z.core.$strip>], "kind">>>;
133
+ }, z.core.$strip>], "kind">>;
118
134
  }, z.core.$strip>], "kind">;
119
135
  /**
120
- * Where a run's command ran: on this machine (`local`, with `--local`), or in a runner sandbox (`runner`): the control
121
- * plane team and project it runs in, its region, runtime and vCPUs, and the run's base, HEAD's merge-base with
122
- * `baseRef`, all known as the run starts; then, once the run is over, the runner sandbox's name and the runner snapshot
123
- * it started from, each null when the run stopped before it, when the runner sandbox's timeout stops it, as an ISO
124
- * time, when the run kept it running (null when it stopped and deleted it), and how saving it as a branch snapshot
136
+ * Where a run's command ran: on this machine (`unsandboxed`, with `--unsandboxed`), or in a runner sandbox (`runner`):
137
+ * the control plane team and project it runs in, its region, runtime and vCPUs, and the run's base, HEAD's merge-base
138
+ * with `baseRef`, all known as the run starts; then, once the run is over, the runner sandbox's name and the runner
139
+ * snapshot it started from, each null when the run stopped before it, when the runner sandbox's timeout stops it, as an
140
+ * ISO time, when the run kept it running (null when it stopped and deleted it), and how saving it as a branch snapshot
125
141
  * ended (null without `--save-snapshot`). A reused runner snapshot can be of an older base.
126
142
  */
127
143
  export type RunRecordWhere = Readonly<z.output<typeof whereSchema>>;
@@ -135,24 +151,13 @@ declare const gitSchema: z.ZodObject<{
135
151
  * tree had uncommitted changes or untracked files.
136
152
  */
137
153
  export type RunRecordGit = Readonly<z.output<typeof gitSchema>>;
138
- declare const planSchema: z.ZodObject<{
139
- tests: z.ZodNumber;
140
- files: z.ZodNumber;
141
- sandboxes: z.ZodNullable<z.ZodNumber>;
142
- sandboxesFrom: z.ZodNullable<z.ZodEnum<{
143
- auto: "auto";
144
- file: "file";
145
- flag: "flag";
146
- }>>;
147
- }, z.core.$strip>;
148
154
  /**
149
- * A `storm vitest` run's test plan: how many tests `vitest list` counted, in how many files, and, with a Testserver
150
- * side, how many Testserver sandboxes the run asked for and where that count came from (`--testserver-sandboxes`, the
151
- * config file's `resources.testserverPool.sandboxes`, or sized automatically from the files); both null without one.
155
+ * A `storm vitest` run's test plan: how many tests `vitest list` counted, in how many files, and each resource option
156
+ * whose default is a function of the planned run, with its value and where that came from (`test-plan.ts`).
152
157
  */
153
- export type RunRecordPlan = Readonly<z.output<typeof planSchema>>;
158
+ export type RunRecordPlan = TestPlanFacts;
154
159
  declare const runRecordSchema: z.ZodObject<{
155
- version: z.ZodLiteral<1>;
160
+ version: z.ZodLiteral<3>;
156
161
  startedAt: z.ZodString;
157
162
  cwd: z.ZodString;
158
163
  configFile: z.ZodNullable<z.ZodString>;
@@ -160,15 +165,18 @@ declare const runRecordSchema: z.ZodObject<{
160
165
  plan: z.ZodExactOptional<z.ZodObject<{
161
166
  tests: z.ZodNumber;
162
167
  files: z.ZodNumber;
163
- sandboxes: z.ZodNullable<z.ZodNumber>;
164
- sandboxesFrom: z.ZodNullable<z.ZodEnum<{
165
- auto: "auto";
166
- file: "file";
167
- flag: "flag";
168
- }>>;
168
+ options: z.ZodArray<z.ZodObject<{
169
+ path: z.ZodString;
170
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
171
+ from: z.ZodEnum<{
172
+ default: "default";
173
+ file: "file";
174
+ flag: "flag";
175
+ }>;
176
+ }, z.core.$strip>>;
169
177
  }, z.core.$strip>>;
170
178
  where: z.ZodDiscriminatedUnion<[z.ZodObject<{
171
- kind: z.ZodLiteral<"local">;
179
+ kind: z.ZodLiteral<"unsandboxed">;
172
180
  }, z.core.$strip>, z.ZodObject<{
173
181
  kind: z.ZodLiteral<"runner">;
174
182
  team: z.ZodString;
@@ -183,11 +191,11 @@ declare const runRecordSchema: z.ZodObject<{
183
191
  id: z.ZodString;
184
192
  base: z.ZodString;
185
193
  built: z.ZodBoolean;
186
- branch: z.ZodDefault<z.ZodNullable<z.ZodString>>;
187
- head: z.ZodDefault<z.ZodNullable<z.ZodString>>;
194
+ branch: z.ZodNullable<z.ZodString>;
195
+ head: z.ZodNullable<z.ZodString>;
188
196
  }, z.core.$strip>>;
189
- keptUntil: z.ZodDefault<z.ZodNullable<z.ZodString>>;
190
- save: z.ZodDefault<z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
197
+ keptUntil: z.ZodNullable<z.ZodString>;
198
+ save: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
191
199
  kind: z.ZodLiteral<"saved">;
192
200
  snapshotId: z.ZodString;
193
201
  base: z.ZodString;
@@ -208,7 +216,7 @@ declare const runRecordSchema: z.ZodObject<{
208
216
  message: z.ZodString;
209
217
  }, z.core.$strip>, z.ZodObject<{
210
218
  kind: z.ZodLiteral<"stopped">;
211
- }, z.core.$strip>], "kind">>>;
219
+ }, z.core.$strip>], "kind">>;
212
220
  }, z.core.$strip>], "kind">;
213
221
  git: z.ZodNullable<z.ZodObject<{
214
222
  branch: z.ZodNullable<z.ZodString>;
@@ -225,8 +233,12 @@ declare const runRecordSchema: z.ZodObject<{
225
233
  failed: z.ZodNumber;
226
234
  skipped: z.ZodNumber;
227
235
  }, z.core.$strip>>;
228
- testsIncomplete: z.ZodDefault<z.ZodNullable<z.ZodString>>;
229
- resources: z.ZodUnknown;
236
+ testsIncomplete: z.ZodNullable<z.ZodString>;
237
+ resources: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
238
+ definition: z.ZodString;
239
+ facts: z.ZodUnknown;
240
+ }, z.core.$strip>>>;
241
+ resourceRows: z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>], null>>;
230
242
  }, z.core.$strip>>;
231
243
  }, z.core.$strip>;
232
244
  /**
@@ -239,10 +251,7 @@ export type RunRecord = Readonly<Omit<z.output<typeof runRecordSchema>, "ended">
239
251
  }>;
240
252
  /** `run.json`'s text for `record`. */
241
253
  export declare function runRecordText(record: RunRecord): string;
242
- /**
243
- * The run `text` records; undefined when there is no text, or it isn't a version 1 `run.json`. Resources' facts it
244
- * can't read, such as another storm's, read as null.
245
- */
254
+ /** The run `text` records; undefined when there is no text, or it isn't a version 3 `run.json`. */
246
255
  export declare function parseRunRecord(text: string | undefined): RunRecord | undefined;
247
256
  /** The totals of `events`' final results; null without one. */
248
257
  export declare function testTotals(events: readonly TestEvent[]): RunTestTotals | null;
@@ -1,8 +1,10 @@
1
1
  // What a run records about itself in its run directory's `run.json`, which `storm runs` reads back: written as
2
2
  // the run directory opens, then replaced with how the run ended once it is over. The run directory stores the text;
3
- // this module owns its shape, version 1.
3
+ // this module owns its shape, version 3. Reading it back asks the registry nothing: each resource instance's facts
4
+ // read as recorded, beside its definition's name, and `runs show` lists the rows storm rendered for them when the run
5
+ // ended, so a past run reads the same after a resource definition is renamed or its extension removed.
4
6
  import { z } from "zod";
5
- import { RESOURCE_REPORTS } from "../../resources.js";
7
+ import { planSchema } from "./test-plan.js";
6
8
  const testTotalsSchema = z.object({
7
9
  passed: z.number().int().nonnegative(),
8
10
  failed: z.number().int().nonnegative(),
@@ -14,18 +16,16 @@ const endedSchema = z.object({
14
16
  signal: z.string().nullable(),
15
17
  ms: z.number().nonnegative().nullable(),
16
18
  tests: testTotalsSchema.nullable(),
17
- // Absent from a run.json an earlier storm wrote.
18
- testsIncomplete: z.string().nullable().default(null),
19
- // Read on its own in `parseRunRecord`, so a resource's facts another storm wrote cost only themselves.
20
- resources: z.unknown(),
19
+ testsIncomplete: z.string().nullable(),
20
+ resources: z.record(z.string(), z.object({ definition: z.string(), facts: z.unknown() })).nullable(),
21
+ resourceRows: z.array(z.tuple([z.string(), z.union([z.string(), z.array(z.string())])])),
21
22
  });
22
23
  const snapshotSchema = z.object({
23
24
  id: z.string(),
24
25
  base: z.string(),
25
26
  built: z.boolean(),
26
- // Absent from a run.json an earlier storm wrote, which started from no branch snapshot.
27
- branch: z.string().nullable().default(null),
28
- head: z.string().nullable().default(null),
27
+ branch: z.string().nullable(),
28
+ head: z.string().nullable(),
29
29
  });
30
30
  /**
31
31
  * How saving the runner sandbox as a branch snapshot ended (`--save-snapshot`), as a `ran` outcome and `run.json`
@@ -67,7 +67,7 @@ export const saveSchema = z.discriminatedUnion("kind", [
67
67
  }),
68
68
  ]);
69
69
  const whereSchema = z.discriminatedUnion("kind", [
70
- z.object({ kind: z.literal("local") }),
70
+ z.object({ kind: z.literal("unsandboxed") }),
71
71
  z.object({
72
72
  kind: z.literal("runner"),
73
73
  team: z.string(),
@@ -79,21 +79,13 @@ const whereSchema = z.discriminatedUnion("kind", [
79
79
  baseRef: z.string(),
80
80
  sandbox: z.string().nullable(),
81
81
  snapshot: snapshotSchema.nullable(),
82
- // Absent from a run.json an earlier storm wrote, which kept no runner sandbox.
83
- keptUntil: z.string().nullable().default(null),
84
- // Absent from a run.json an earlier storm wrote, which saved no branch snapshot.
85
- save: saveSchema.nullable().default(null),
82
+ keptUntil: z.string().nullable(),
83
+ save: saveSchema.nullable(),
86
84
  }),
87
85
  ]);
88
86
  const gitSchema = z.object({ branch: z.string().nullable(), commit: z.string(), dirty: z.boolean() });
89
- const planSchema = z.object({
90
- tests: z.number().int().nonnegative(),
91
- files: z.number().int().nonnegative(),
92
- sandboxes: z.number().int().positive().nullable(),
93
- sandboxesFrom: z.enum(["flag", "file", "auto"]).nullable(),
94
- });
95
87
  const runRecordSchema = z.object({
96
- version: z.literal(1),
88
+ version: z.literal(3),
97
89
  startedAt: z.string(),
98
90
  cwd: z.string(),
99
91
  configFile: z.string().nullable(),
@@ -108,10 +100,7 @@ const runRecordSchema = z.object({
108
100
  export function runRecordText(record) {
109
101
  return JSON.stringify(record);
110
102
  }
111
- /**
112
- * The run `text` records; undefined when there is no text, or it isn't a version 1 `run.json`. Resources' facts it
113
- * can't read, such as another storm's, read as null.
114
- */
103
+ /** The run `text` records; undefined when there is no text, or it isn't a version 3 `run.json`. */
115
104
  export function parseRunRecord(text) {
116
105
  if (text === undefined)
117
106
  return undefined;
@@ -123,13 +112,7 @@ export function parseRunRecord(text) {
123
112
  return undefined;
124
113
  }
125
114
  const parsed = runRecordSchema.safeParse(json);
126
- if (!parsed.success)
127
- return undefined;
128
- const { ended, ...started } = parsed.data;
129
- if (ended === undefined)
130
- return started;
131
- const resources = RESOURCE_REPORTS.ranSchema.safeParse(ended.resources);
132
- return { ...started, ended: { ...ended, resources: resources.success ? resources.data : null } };
115
+ return parsed.success ? parsed.data : undefined;
133
116
  }
134
117
  /** The totals of `events`' final results; null without one. */
135
118
  export function testTotals(events) {
@@ -0,0 +1,45 @@
1
+ import { z } from "zod";
2
+ import { type RunTestPlan } from "../../sdk/extension/index.ts";
3
+ declare const planOptionSchema: z.ZodObject<{
4
+ path: z.ZodString;
5
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
6
+ from: z.ZodEnum<{
7
+ default: "default";
8
+ file: "file";
9
+ flag: "flag";
10
+ }>;
11
+ }, z.core.$strip>;
12
+ /**
13
+ * One resource option whose default is a function of the planned run: its key path, value and where the value came
14
+ * from.
15
+ */
16
+ export type PlanOption = Readonly<z.output<typeof planOptionSchema>>;
17
+ /** A run's test plan, as `vitest`'s `ran` outcome, `run.json` and `runs show` hold it. */
18
+ export declare const planSchema: z.ZodObject<{
19
+ tests: z.ZodNumber;
20
+ files: z.ZodNumber;
21
+ options: z.ZodArray<z.ZodObject<{
22
+ path: z.ZodString;
23
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
24
+ from: z.ZodEnum<{
25
+ default: "default";
26
+ file: "file";
27
+ flag: "flag";
28
+ }>;
29
+ }, z.core.$strip>>;
30
+ }, z.core.$strip>;
31
+ /**
32
+ * A run's test plan: how many tests `vitest list` counted, in how many files, and each resource option whose default is
33
+ * a function of the planned run, with its value and where that came from.
34
+ */
35
+ export type TestPlanFacts = Readonly<z.output<typeof planSchema>>;
36
+ /** The plan a run records: with a counted test plan, its counts and `options`; none for a run that counted nothing. */
37
+ export declare function recordedPlan(testPlan: RunTestPlan, options: readonly PlanOption[]): TestPlanFacts | undefined;
38
+ /**
39
+ * The plan as `vitest` says it before the run: `Running 65 tests in 19 files; resources.<key>.<option> 5 (default)`,
40
+ * each option with where its value came from, or `Running 65 tests in 19 files` without one.
41
+ */
42
+ export declare function testPlanLine(plan: TestPlanFacts): string;
43
+ /** The plan as a phrase: `65 tests in 19 files; resources.<key>.<option> 5 (--<prefix>-<option>)`. */
44
+ export declare function testPlanText(plan: TestPlanFacts): string;
45
+ export {};
@@ -0,0 +1,59 @@
1
+ // A run's test plan as storm says and records it: what `vitest` counted before the run, and each resource option whose
2
+ // default is a function of the planned run, with its value and where that came from. `vitest`'s `ran` outcome,
3
+ // `run.json` and `runs show` share its shape, and `vitest`'s line before the run and `runs show`'s row its text.
4
+ import { z } from "zod";
5
+ import { CONFIG_FILE_NAME } from "../../config/index.js";
6
+ import { optionKeyPath } from "../../sdk/extension/index.js";
7
+ import { formatPlan } from "../../vitest/plan.js";
8
+ import { RESOURCE_FLAGS } from "./resource-flags.js";
9
+ const planOptionSchema = z.object({
10
+ /** The option's key path, `resources.<key>.<option>`, under its resource key. */
11
+ path: z.string(),
12
+ /** Its value. */
13
+ value: z.union([z.string(), z.number(), z.boolean()]),
14
+ /** Where the value came from: its flag (`flag`), storm.config.ts (`file`), or its default, given the test plan (`default`). */
15
+ from: z.enum(["flag", "file", "default"]),
16
+ });
17
+ /** A run's test plan, as `vitest`'s `ran` outcome, `run.json` and `runs show` hold it. */
18
+ export const planSchema = z.object({
19
+ /** How many tests `vitest list --json <args>` counted. */
20
+ tests: z.number().int().nonnegative(),
21
+ /** How many distinct test files they are in. */
22
+ files: z.number().int().nonnegative(),
23
+ /**
24
+ * Each resource option whose default is a function of the test plan, with its value and where that came from; empty
25
+ * when the run has none.
26
+ */
27
+ options: z.array(planOptionSchema),
28
+ });
29
+ /** The plan a run records: with a counted test plan, its counts and `options`; none for a run that counted nothing. */
30
+ export function recordedPlan(testPlan, options) {
31
+ return testPlan.kind === "counted"
32
+ ? { tests: testPlan.tests, files: testPlan.files, options: options.map((option) => ({ ...option })) }
33
+ : undefined;
34
+ }
35
+ /**
36
+ * The plan as `vitest` says it before the run: `Running 65 tests in 19 files; resources.<key>.<option> 5 (default)`,
37
+ * each option with where its value came from, or `Running 65 tests in 19 files` without one.
38
+ */
39
+ export function testPlanLine(plan) {
40
+ return `Running ${testPlanText(plan)}`;
41
+ }
42
+ /** The plan as a phrase: `65 tests in 19 files; resources.<key>.<option> 5 (--<prefix>-<option>)`. */
43
+ export function testPlanText(plan) {
44
+ return [formatPlan(plan), ...plan.options.map(planOptionText)].join("; ");
45
+ }
46
+ /** An option as the plan names it: its key path, its value, and where that came from, a flag by its spelling. */
47
+ function planOptionText({ path, value, from }) {
48
+ return `${path} ${String(value)} (${fromText(path, from)})`;
49
+ }
50
+ function fromText(path, from) {
51
+ switch (from) {
52
+ case "flag":
53
+ return RESOURCE_FLAGS.find(({ resource, option }) => optionKeyPath(resource, option) === path)?.flag ?? "a flag";
54
+ case "file":
55
+ return CONFIG_FILE_NAME;
56
+ case "default":
57
+ return "default";
58
+ }
59
+ }