@cnc-tools/storm 0.0.0 → 0.6.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 (527) hide show
  1. package/bin/node-version.js +24 -0
  2. package/bin/storm.js +16 -0
  3. package/dist/application.d.ts +13 -0
  4. package/dist/application.js +23 -0
  5. package/dist/bin/storm.d.ts +1 -0
  6. package/dist/bin/storm.js +45 -0
  7. package/dist/build-info.js +3 -0
  8. package/dist/closed-terminal.d.ts +7 -0
  9. package/dist/closed-terminal.js +18 -0
  10. package/dist/combine-errors.d.ts +11 -0
  11. package/dist/combine-errors.js +19 -0
  12. package/dist/commands/dashboard.d.ts +11 -0
  13. package/dist/commands/dashboard.js +18 -0
  14. package/dist/commands/exec/cleanup.d.ts +135 -0
  15. package/dist/commands/exec/cleanup.js +171 -0
  16. package/dist/commands/exec/command.d.ts +272 -0
  17. package/dist/commands/exec/command.js +23 -0
  18. package/dist/commands/exec/job-summary.d.ts +10 -0
  19. package/dist/commands/exec/job-summary.js +34 -0
  20. package/dist/commands/exec/live-view.d.ts +22 -0
  21. package/dist/commands/exec/live-view.js +395 -0
  22. package/dist/commands/exec/metadata.d.ts +66 -0
  23. package/dist/commands/exec/metadata.js +55 -0
  24. package/dist/commands/exec/mint-failed.d.ts +11 -0
  25. package/dist/commands/exec/mint-failed.js +33 -0
  26. package/dist/commands/exec/outcomes.d.ts +614 -0
  27. package/dist/commands/exec/outcomes.js +338 -0
  28. package/dist/commands/exec/progress.d.ts +44 -0
  29. package/dist/commands/exec/progress.js +277 -0
  30. package/dist/commands/exec/redaction.d.ts +15 -0
  31. package/dist/commands/exec/redaction.js +40 -0
  32. package/dist/commands/exec/run-collector.d.ts +30 -0
  33. package/dist/commands/exec/run-collector.js +73 -0
  34. package/dist/commands/exec/run-command.d.ts +221 -0
  35. package/dist/commands/exec/run-command.js +663 -0
  36. package/dist/commands/exec/run-metadata.d.ts +56 -0
  37. package/dist/commands/exec/run-metadata.js +58 -0
  38. package/dist/commands/exec/run-record.d.ts +170 -0
  39. package/dist/commands/exec/run-record.js +104 -0
  40. package/dist/commands/exec/tests-summary.d.ts +34 -0
  41. package/dist/commands/exec/tests-summary.js +141 -0
  42. package/dist/commands/exec/testserver-flags.d.ts +48 -0
  43. package/dist/commands/exec/testserver-flags.js +80 -0
  44. package/dist/commands/exec/text.d.ts +22 -0
  45. package/dist/commands/exec/text.js +74 -0
  46. package/dist/commands/exec/view.d.ts +35 -0
  47. package/dist/commands/exec/view.js +163 -0
  48. package/dist/commands/exec/waterfall.d.ts +25 -0
  49. package/dist/commands/exec/waterfall.js +108 -0
  50. package/dist/commands/exec/worker-chart.d.ts +79 -0
  51. package/dist/commands/exec/worker-chart.js +313 -0
  52. package/dist/commands/runs/facts.d.ts +150 -0
  53. package/dist/commands/runs/facts.js +292 -0
  54. package/dist/commands/runs/list/command.d.ts +86 -0
  55. package/dist/commands/runs/list/command.js +36 -0
  56. package/dist/commands/runs/list/metadata.d.ts +22 -0
  57. package/dist/commands/runs/list/metadata.js +19 -0
  58. package/dist/commands/runs/list/outcomes.d.ts +74 -0
  59. package/dist/commands/runs/list/outcomes.js +89 -0
  60. package/dist/commands/runs/logs/command.d.ts +72 -0
  61. package/dist/commands/runs/logs/command.js +51 -0
  62. package/dist/commands/runs/logs/metadata.d.ts +22 -0
  63. package/dist/commands/runs/logs/metadata.js +22 -0
  64. package/dist/commands/runs/logs/outcomes.d.ts +55 -0
  65. package/dist/commands/runs/logs/outcomes.js +80 -0
  66. package/dist/commands/runs/metadata.d.ts +3 -0
  67. package/dist/commands/runs/metadata.js +3 -0
  68. package/dist/commands/runs/past-run.d.ts +72 -0
  69. package/dist/commands/runs/past-run.js +99 -0
  70. package/dist/commands/runs/show/command.d.ts +176 -0
  71. package/dist/commands/runs/show/command.js +76 -0
  72. package/dist/commands/runs/show/metadata.d.ts +25 -0
  73. package/dist/commands/runs/show/metadata.js +22 -0
  74. package/dist/commands/runs/show/outcomes.d.ts +164 -0
  75. package/dist/commands/runs/show/outcomes.js +320 -0
  76. package/dist/commands/vitest/command.d.ts +299 -0
  77. package/dist/commands/vitest/command.js +138 -0
  78. package/dist/commands/vitest/metadata.d.ts +66 -0
  79. package/dist/commands/vitest/metadata.js +35 -0
  80. package/dist/commands/vitest/outcomes.d.ts +273 -0
  81. package/dist/commands/vitest/outcomes.js +77 -0
  82. package/dist/config/by-name.d.ts +24 -0
  83. package/dist/config/by-name.js +26 -0
  84. package/dist/config/errors.d.ts +58 -0
  85. package/dist/config/errors.js +101 -0
  86. package/dist/config/gateways.d.ts +32 -0
  87. package/dist/config/gateways.js +1 -0
  88. package/dist/config/index.d.ts +10 -0
  89. package/dist/config/index.js +13 -0
  90. package/dist/config/live/config-gateway.d.ts +6 -0
  91. package/dist/config/live/config-gateway.js +71 -0
  92. package/dist/config/load.d.ts +54 -0
  93. package/dist/config/load.js +175 -0
  94. package/dist/config/resolve.d.ts +49 -0
  95. package/dist/config/resolve.js +94 -0
  96. package/dist/config/resource-config.d.ts +132 -0
  97. package/dist/config/resource-config.js +19 -0
  98. package/dist/config/schema.d.ts +64 -0
  99. package/dist/config/schema.js +57 -0
  100. package/dist/config/set.d.ts +27 -0
  101. package/dist/config/set.js +71 -0
  102. package/dist/config/settings-file.d.ts +41 -0
  103. package/dist/config/settings-file.js +72 -0
  104. package/dist/config-file/define.d.ts +39 -0
  105. package/dist/config-file/define.js +9 -0
  106. package/dist/config-file/toolchain.d.ts +9 -0
  107. package/dist/config-file/toolchain.js +41 -0
  108. package/dist/context.d.ts +89 -0
  109. package/dist/context.js +45 -0
  110. package/dist/core/command-provider.d.ts +126 -0
  111. package/dist/core/command-provider.js +13 -0
  112. package/dist/core/command-slots.d.ts +67 -0
  113. package/dist/core/command-slots.js +136 -0
  114. package/dist/core/events.d.ts +128 -0
  115. package/dist/core/events.js +15 -0
  116. package/dist/core/gateways.d.ts +249 -0
  117. package/dist/core/gateways.js +1 -0
  118. package/dist/core/index.d.ts +20 -0
  119. package/dist/core/index.js +18 -0
  120. package/dist/core/keyed.d.ts +12 -0
  121. package/dist/core/keyed.js +24 -0
  122. package/dist/core/lane.d.ts +46 -0
  123. package/dist/core/lane.js +5 -0
  124. package/dist/core/limit.d.ts +9 -0
  125. package/dist/core/limit.js +29 -0
  126. package/dist/core/live/command-gateway.d.ts +11 -0
  127. package/dist/core/live/command-gateway.js +83 -0
  128. package/dist/core/live/job-summary-gateway.d.ts +5 -0
  129. package/dist/core/live/job-summary-gateway.js +20 -0
  130. package/dist/core/live/progress-terminal.d.ts +20 -0
  131. package/dist/core/live/progress-terminal.js +173 -0
  132. package/dist/core/live/run-directory-gateway.d.ts +24 -0
  133. package/dist/core/live/run-directory-gateway.js +437 -0
  134. package/dist/core/mint.d.ts +10 -0
  135. package/dist/core/mint.js +14 -0
  136. package/dist/core/payload.d.ts +26 -0
  137. package/dist/core/payload.js +33 -0
  138. package/dist/core/presentation.d.ts +87 -0
  139. package/dist/core/presentation.js +5 -0
  140. package/dist/core/presentations.d.ts +56 -0
  141. package/dist/core/presentations.js +66 -0
  142. package/dist/core/provider.d.ts +69 -0
  143. package/dist/core/provider.js +5 -0
  144. package/dist/core/resource.d.ts +262 -0
  145. package/dist/core/resource.js +6 -0
  146. package/dist/core/resources.d.ts +131 -0
  147. package/dist/core/resources.js +254 -0
  148. package/dist/core/run-directory.d.ts +69 -0
  149. package/dist/core/run-directory.js +94 -0
  150. package/dist/core/run-state.d.ts +152 -0
  151. package/dist/core/run-state.js +313 -0
  152. package/dist/core/run.d.ts +187 -0
  153. package/dist/core/run.js +321 -0
  154. package/dist/core/state-directory.d.ts +19 -0
  155. package/dist/core/state-directory.js +29 -0
  156. package/dist/core/timeline.d.ts +63 -0
  157. package/dist/core/timeline.js +97 -0
  158. package/dist/core/timing.d.ts +22 -0
  159. package/dist/core/timing.js +26 -0
  160. package/dist/credential/credential.d.ts +46 -0
  161. package/dist/credential/credential.js +80 -0
  162. package/dist/credential/diagnosis.d.ts +18 -0
  163. package/dist/credential/diagnosis.js +99 -0
  164. package/dist/credential/gateways.d.ts +109 -0
  165. package/dist/credential/gateways.js +1 -0
  166. package/dist/credential/index.d.ts +7 -0
  167. package/dist/credential/index.js +7 -0
  168. package/dist/credential/live/github-actions-token-gateway.d.ts +15 -0
  169. package/dist/credential/live/github-actions-token-gateway.js +43 -0
  170. package/dist/credential/live/github-actions-token-response.d.ts +19 -0
  171. package/dist/credential/live/github-actions-token-response.js +49 -0
  172. package/dist/credential/live/vercel-cli-gateway.d.ts +9 -0
  173. package/dist/credential/live/vercel-cli-gateway.js +64 -0
  174. package/dist/credential/live/vercel-output.d.ts +60 -0
  175. package/dist/credential/live/vercel-output.js +122 -0
  176. package/dist/credential/live/vercel-process.d.ts +14 -0
  177. package/dist/credential/live/vercel-process.js +3 -0
  178. package/dist/credential/settle.d.ts +31 -0
  179. package/dist/credential/settle.js +49 -0
  180. package/dist/credential/source.d.ts +110 -0
  181. package/dist/credential/source.js +114 -0
  182. package/dist/help-logo.d.ts +11 -0
  183. package/dist/help-logo.js +56 -0
  184. package/dist/presentation.d.ts +26 -0
  185. package/dist/presentation.js +21 -0
  186. package/dist/resources/github/cleanup.d.ts +23 -0
  187. package/dist/resources/github/cleanup.js +39 -0
  188. package/dist/resources/github/command.d.ts +74 -0
  189. package/dist/resources/github/command.js +117 -0
  190. package/dist/resources/github/config.d.ts +16 -0
  191. package/dist/resources/github/config.js +37 -0
  192. package/dist/resources/github/events.d.ts +26 -0
  193. package/dist/resources/github/events.js +2 -0
  194. package/dist/resources/github/fixture-repo.d.ts +69 -0
  195. package/dist/resources/github/fixture-repo.js +60 -0
  196. package/dist/resources/github/gateways.d.ts +62 -0
  197. package/dist/resources/github/gateways.js +1 -0
  198. package/dist/resources/github/index.d.ts +12 -0
  199. package/dist/resources/github/index.js +15 -0
  200. package/dist/resources/github/live/fixture-repo-gateway.d.ts +12 -0
  201. package/dist/resources/github/live/fixture-repo-gateway.js +92 -0
  202. package/dist/resources/github/live/gateways.d.ts +6 -0
  203. package/dist/resources/github/live/gateways.js +13 -0
  204. package/dist/resources/github/presentation.d.ts +13 -0
  205. package/dist/resources/github/presentation.js +43 -0
  206. package/dist/resources/github/provider.d.ts +66 -0
  207. package/dist/resources/github/provider.js +58 -0
  208. package/dist/resources/github/resource-provider.d.ts +6 -0
  209. package/dist/resources/github/resource-provider.js +20 -0
  210. package/dist/resources/github/resource.d.ts +33 -0
  211. package/dist/resources/github/resource.js +12 -0
  212. package/dist/resources/testserver/cleanup.d.ts +14 -0
  213. package/dist/resources/testserver/cleanup.js +22 -0
  214. package/dist/resources/testserver/command.d.ts +322 -0
  215. package/dist/resources/testserver/command.js +245 -0
  216. package/dist/resources/testserver/commands/app.d.ts +18 -0
  217. package/dist/resources/testserver/commands/app.js +3 -0
  218. package/dist/resources/testserver/commands/create/command.d.ts +136 -0
  219. package/dist/resources/testserver/commands/create/command.js +158 -0
  220. package/dist/resources/testserver/commands/create/metadata.d.ts +31 -0
  221. package/dist/resources/testserver/commands/create/metadata.js +45 -0
  222. package/dist/resources/testserver/commands/create/outcomes.d.ts +111 -0
  223. package/dist/resources/testserver/commands/create/outcomes.js +172 -0
  224. package/dist/resources/testserver/commands/list/command.d.ts +60 -0
  225. package/dist/resources/testserver/commands/list/command.js +56 -0
  226. package/dist/resources/testserver/commands/list/metadata.d.ts +9 -0
  227. package/dist/resources/testserver/commands/list/metadata.js +9 -0
  228. package/dist/resources/testserver/commands/list/outcomes.d.ts +54 -0
  229. package/dist/resources/testserver/commands/list/outcomes.js +152 -0
  230. package/dist/resources/testserver/config.d.ts +18 -0
  231. package/dist/resources/testserver/config.js +78 -0
  232. package/dist/resources/testserver/credential-facts.d.ts +80 -0
  233. package/dist/resources/testserver/credential-facts.js +83 -0
  234. package/dist/resources/testserver/events.d.ts +59 -0
  235. package/dist/resources/testserver/events.js +4 -0
  236. package/dist/resources/testserver/index.d.ts +16 -0
  237. package/dist/resources/testserver/index.js +24 -0
  238. package/dist/resources/testserver/lane.d.ts +28 -0
  239. package/dist/resources/testserver/lane.js +139 -0
  240. package/dist/resources/testserver/live/gateways.d.ts +6 -0
  241. package/dist/resources/testserver/live/gateways.js +26 -0
  242. package/dist/resources/testserver/options.d.ts +5 -0
  243. package/dist/resources/testserver/options.js +5 -0
  244. package/dist/resources/testserver/pool/channels.d.ts +80 -0
  245. package/dist/resources/testserver/pool/channels.js +48 -0
  246. package/dist/resources/testserver/pool/create.d.ts +48 -0
  247. package/dist/resources/testserver/pool/create.js +45 -0
  248. package/dist/resources/testserver/pool/directory.d.ts +4 -0
  249. package/dist/resources/testserver/pool/directory.js +5 -0
  250. package/dist/resources/testserver/pool/gateways.d.ts +190 -0
  251. package/dist/resources/testserver/pool/gateways.js +1 -0
  252. package/dist/resources/testserver/pool/host.d.ts +8 -0
  253. package/dist/resources/testserver/pool/host.js +21 -0
  254. package/dist/resources/testserver/pool/index.d.ts +9 -0
  255. package/dist/resources/testserver/pool/index.js +10 -0
  256. package/dist/resources/testserver/pool/inspect.d.ts +53 -0
  257. package/dist/resources/testserver/pool/inspect.js +45 -0
  258. package/dist/resources/testserver/pool/lease.d.ts +84 -0
  259. package/dist/resources/testserver/pool/lease.js +125 -0
  260. package/dist/resources/testserver/pool/live/pool-records.d.ts +17 -0
  261. package/dist/resources/testserver/pool/live/pool-records.js +70 -0
  262. package/dist/resources/testserver/pool/live/pool-store-gateway.d.ts +12 -0
  263. package/dist/resources/testserver/pool/live/pool-store-gateway.js +435 -0
  264. package/dist/resources/testserver/pool/staleness.d.ts +16 -0
  265. package/dist/resources/testserver/pool/staleness.js +27 -0
  266. package/dist/resources/testserver/presentation.d.ts +9 -0
  267. package/dist/resources/testserver/presentation.js +217 -0
  268. package/dist/resources/testserver/provider.d.ts +177 -0
  269. package/dist/resources/testserver/provider.js +254 -0
  270. package/dist/resources/testserver/ran.d.ts +87 -0
  271. package/dist/resources/testserver/ran.js +140 -0
  272. package/dist/resources/testserver/resource-provider.d.ts +12 -0
  273. package/dist/resources/testserver/resource-provider.js +38 -0
  274. package/dist/resources/testserver/resource.d.ts +32 -0
  275. package/dist/resources/testserver/resource.js +10 -0
  276. package/dist/resources/testserver/run-sandbox.d.ts +13 -0
  277. package/dist/resources/testserver/run-sandbox.js +6 -0
  278. package/dist/resources/testserver/sandbox/channels.d.ts +12 -0
  279. package/dist/resources/testserver/sandbox/channels.js +21 -0
  280. package/dist/resources/testserver/sandbox/create-failure.d.ts +35 -0
  281. package/dist/resources/testserver/sandbox/create-failure.js +65 -0
  282. package/dist/resources/testserver/sandbox/create.d.ts +29 -0
  283. package/dist/resources/testserver/sandbox/create.js +37 -0
  284. package/dist/resources/testserver/sandbox/gateways.d.ts +150 -0
  285. package/dist/resources/testserver/sandbox/gateways.js +1 -0
  286. package/dist/resources/testserver/sandbox/index.d.ts +6 -0
  287. package/dist/resources/testserver/sandbox/index.js +7 -0
  288. package/dist/resources/testserver/sandbox/live/builds-response.d.ts +9 -0
  289. package/dist/resources/testserver/sandbox/live/builds-response.js +27 -0
  290. package/dist/resources/testserver/sandbox/live/control-plane-gateway.d.ts +17 -0
  291. package/dist/resources/testserver/sandbox/live/control-plane-gateway.js +133 -0
  292. package/dist/resources/testserver/sandbox/live/create-response.d.ts +35 -0
  293. package/dist/resources/testserver/sandbox/live/create-response.js +78 -0
  294. package/dist/resources/testserver/sandbox/live/fetch-failure.d.ts +24 -0
  295. package/dist/resources/testserver/sandbox/live/fetch-failure.js +45 -0
  296. package/dist/resources/testserver/sandbox/live/health-check-gateway.d.ts +11 -0
  297. package/dist/resources/testserver/sandbox/live/health-check-gateway.js +36 -0
  298. package/dist/resources/testserver/sandbox/live/sse.d.ts +12 -0
  299. package/dist/resources/testserver/sandbox/live/sse.js +32 -0
  300. package/dist/resources.d.ts +455 -0
  301. package/dist/resources.js +88 -0
  302. package/dist/runner/base.d.ts +40 -0
  303. package/dist/runner/base.js +52 -0
  304. package/dist/runner/context.d.ts +13 -0
  305. package/dist/runner/context.js +9 -0
  306. package/dist/runner/events.d.ts +179 -0
  307. package/dist/runner/events.js +16 -0
  308. package/dist/runner/gateways.d.ts +351 -0
  309. package/dist/runner/gateways.js +3 -0
  310. package/dist/runner/index.d.ts +19 -0
  311. package/dist/runner/index.js +18 -0
  312. package/dist/runner/live/checkout-gateway.d.ts +3 -0
  313. package/dist/runner/live/checkout-gateway.js +206 -0
  314. package/dist/runner/live/git-output.d.ts +14 -0
  315. package/dist/runner/live/git-output.js +32 -0
  316. package/dist/runner/live/sandbox-errors.d.ts +7 -0
  317. package/dist/runner/live/sandbox-errors.js +21 -0
  318. package/dist/runner/live/sandbox-gateway.d.ts +7 -0
  319. package/dist/runner/live/sandbox-gateway.js +427 -0
  320. package/dist/runner/live/snapshot-cache-gateway.d.ts +12 -0
  321. package/dist/runner/live/snapshot-cache-gateway.js +104 -0
  322. package/dist/runner/live/snapshot-records.d.ts +11 -0
  323. package/dist/runner/live/snapshot-records.js +57 -0
  324. package/dist/runner/live/terminal.d.ts +16 -0
  325. package/dist/runner/live/terminal.js +37 -0
  326. package/dist/runner/live/user.d.ts +2 -0
  327. package/dist/runner/live/user.js +11 -0
  328. package/dist/runner/output.d.ts +23 -0
  329. package/dist/runner/output.js +58 -0
  330. package/dist/runner/prepare.d.ts +67 -0
  331. package/dist/runner/prepare.js +59 -0
  332. package/dist/runner/ready.d.ts +68 -0
  333. package/dist/runner/ready.js +159 -0
  334. package/dist/runner/recipe.d.ts +126 -0
  335. package/dist/runner/recipe.js +302 -0
  336. package/dist/runner/remote-command.d.ts +77 -0
  337. package/dist/runner/remote-command.js +127 -0
  338. package/dist/runner/scope.d.ts +58 -0
  339. package/dist/runner/scope.js +117 -0
  340. package/dist/runner/snapshot-build.d.ts +33 -0
  341. package/dist/runner/snapshot-build.js +112 -0
  342. package/dist/runner/snapshot-cache.d.ts +84 -0
  343. package/dist/runner/snapshot-cache.js +126 -0
  344. package/dist/runner/snapshot-key.d.ts +52 -0
  345. package/dist/runner/snapshot-key.js +91 -0
  346. package/dist/runner/steps.d.ts +41 -0
  347. package/dist/runner/steps.js +49 -0
  348. package/dist/sdk/container/api-request.d.ts +32 -0
  349. package/dist/sdk/container/api-request.js +46 -0
  350. package/dist/sdk/container/container.d.ts +144 -0
  351. package/dist/sdk/container/container.js +346 -0
  352. package/dist/sdk/container/feature-flags.d.ts +37 -0
  353. package/dist/sdk/container/feature-flags.js +118 -0
  354. package/dist/sdk/container/gateways.d.ts +108 -0
  355. package/dist/sdk/container/gateways.js +1 -0
  356. package/dist/sdk/container/index.d.ts +5 -0
  357. package/dist/sdk/container/index.js +5 -0
  358. package/dist/sdk/container/live/container-gateway.d.ts +17 -0
  359. package/dist/sdk/container/live/container-gateway.js +114 -0
  360. package/dist/sdk/factories/build.d.ts +66 -0
  361. package/dist/sdk/factories/build.js +98 -0
  362. package/dist/sdk/factories/definition.d.ts +28 -0
  363. package/dist/sdk/factories/definition.js +16 -0
  364. package/dist/sdk/factories/definitions.d.ts +166 -0
  365. package/dist/sdk/factories/definitions.js +235 -0
  366. package/dist/sdk/factories/gateways.d.ts +25 -0
  367. package/dist/sdk/factories/gateways.js +1 -0
  368. package/dist/sdk/factories/index.d.ts +5 -0
  369. package/dist/sdk/factories/index.js +5 -0
  370. package/dist/sdk/factories/live/factory-gateway.d.ts +10 -0
  371. package/dist/sdk/factories/live/factory-gateway.js +29 -0
  372. package/dist/sdk/index.d.ts +7 -0
  373. package/dist/sdk/index.js +15 -0
  374. package/dist/sdk/payload/index.d.ts +2 -0
  375. package/dist/sdk/payload/index.js +4 -0
  376. package/dist/sdk/payload/payload.d.ts +47 -0
  377. package/dist/sdk/payload/payload.js +74 -0
  378. package/dist/sdk/payload/test-events.d.ts +102 -0
  379. package/dist/sdk/payload/test-events.js +59 -0
  380. package/dist/sdk/proxy/exchange.d.ts +58 -0
  381. package/dist/sdk/proxy/exchange.js +173 -0
  382. package/dist/sdk/proxy/faulted-exchange.d.ts +10 -0
  383. package/dist/sdk/proxy/faulted-exchange.js +106 -0
  384. package/dist/sdk/proxy/faults.d.ts +133 -0
  385. package/dist/sdk/proxy/faults.js +147 -0
  386. package/dist/sdk/proxy/index.d.ts +3 -0
  387. package/dist/sdk/proxy/index.js +3 -0
  388. package/dist/sdk/proxy/proxy.d.ts +93 -0
  389. package/dist/sdk/proxy/proxy.js +99 -0
  390. package/dist/sdk/proxy/records.d.ts +56 -0
  391. package/dist/sdk/proxy/records.js +56 -0
  392. package/dist/sdk/records/body.d.ts +89 -0
  393. package/dist/sdk/records/body.js +236 -0
  394. package/dist/sdk/records/index.d.ts +2 -0
  395. package/dist/sdk/records/index.js +4 -0
  396. package/dist/sdk/records/records.d.ts +49 -0
  397. package/dist/sdk/records/records.js +16 -0
  398. package/dist/sdk/seed/index.d.ts +1 -0
  399. package/dist/sdk/seed/index.js +3 -0
  400. package/dist/sdk/seed/seed.d.ts +221 -0
  401. package/dist/sdk/seed/seed.js +171 -0
  402. package/dist/sdk/testserver/clock.d.ts +8 -0
  403. package/dist/sdk/testserver/clock.js +10 -0
  404. package/dist/sdk/testserver/failure.d.ts +73 -0
  405. package/dist/sdk/testserver/failure.js +61 -0
  406. package/dist/sdk/testserver/index.d.ts +5 -0
  407. package/dist/sdk/testserver/index.js +8 -0
  408. package/dist/sdk/testserver/live/connect-failure.d.ts +7 -0
  409. package/dist/sdk/testserver/live/connect-failure.js +30 -0
  410. package/dist/sdk/testserver/live/request.d.ts +69 -0
  411. package/dist/sdk/testserver/live/request.js +89 -0
  412. package/dist/sdk/testserver/service-ids.d.ts +19 -0
  413. package/dist/sdk/testserver/service-ids.js +77 -0
  414. package/dist/sdk/testserver/test-id.d.ts +15 -0
  415. package/dist/sdk/testserver/test-id.js +28 -0
  416. package/dist/story/align.d.ts +37 -0
  417. package/dist/story/align.js +39 -0
  418. package/dist/story/artifact.d.ts +60 -0
  419. package/dist/story/artifact.js +93 -0
  420. package/dist/story/definition.d.ts +52 -0
  421. package/dist/story/definition.js +9 -0
  422. package/dist/story/diff.d.ts +9 -0
  423. package/dist/story/diff.js +97 -0
  424. package/dist/story/errors.d.ts +14 -0
  425. package/dist/story/errors.js +21 -0
  426. package/dist/story/gateways.d.ts +74 -0
  427. package/dist/story/gateways.js +3 -0
  428. package/dist/story/host.d.ts +27 -0
  429. package/dist/story/host.js +97 -0
  430. package/dist/story/index.d.ts +7 -0
  431. package/dist/story/index.js +9 -0
  432. package/dist/story/json.d.ts +16 -0
  433. package/dist/story/json.js +59 -0
  434. package/dist/story/live/artifact-gateway.d.ts +2 -0
  435. package/dist/story/live/artifact-gateway.js +82 -0
  436. package/dist/story/mode.d.ts +17 -0
  437. package/dist/story/mode.js +21 -0
  438. package/dist/story/orphans.d.ts +17 -0
  439. package/dist/story/orphans.js +15 -0
  440. package/dist/story/report.d.ts +30 -0
  441. package/dist/story/report.js +118 -0
  442. package/dist/story/run.d.ts +49 -0
  443. package/dist/story/run.js +160 -0
  444. package/dist/story/sequence.d.ts +30 -0
  445. package/dist/story/sequence.js +74 -0
  446. package/dist/story/settle.d.ts +94 -0
  447. package/dist/story/settle.js +70 -0
  448. package/dist/time/duration.d.ts +19 -0
  449. package/dist/time/duration.js +37 -0
  450. package/dist/time/index.d.ts +2 -0
  451. package/dist/time/index.js +4 -0
  452. package/dist/time/time.d.ts +15 -0
  453. package/dist/time/time.js +23 -0
  454. package/dist/vercel-cli/ansi.d.ts +13 -0
  455. package/dist/vercel-cli/ansi.js +32 -0
  456. package/dist/vercel-cli/arguments.d.ts +25 -0
  457. package/dist/vercel-cli/arguments.js +78 -0
  458. package/dist/vercel-cli/auth-config.d.ts +43 -0
  459. package/dist/vercel-cli/auth-config.js +36 -0
  460. package/dist/vercel-cli/clock.d.ts +9 -0
  461. package/dist/vercel-cli/clock.js +10 -0
  462. package/dist/vercel-cli/config-files.d.ts +24 -0
  463. package/dist/vercel-cli/config-files.js +40 -0
  464. package/dist/vercel-cli/context.d.ts +12 -0
  465. package/dist/vercel-cli/context.js +12 -0
  466. package/dist/vercel-cli/driver.d.ts +218 -0
  467. package/dist/vercel-cli/driver.js +364 -0
  468. package/dist/vercel-cli/entry.d.ts +8 -0
  469. package/dist/vercel-cli/entry.js +13 -0
  470. package/dist/vercel-cli/environment.d.ts +33 -0
  471. package/dist/vercel-cli/environment.js +72 -0
  472. package/dist/vercel-cli/errors.d.ts +8 -0
  473. package/dist/vercel-cli/errors.js +8 -0
  474. package/dist/vercel-cli/gateways.d.ts +103 -0
  475. package/dist/vercel-cli/gateways.js +4 -0
  476. package/dist/vercel-cli/index.d.ts +10 -0
  477. package/dist/vercel-cli/index.js +15 -0
  478. package/dist/vercel-cli/invocation.d.ts +234 -0
  479. package/dist/vercel-cli/invocation.js +397 -0
  480. package/dist/vercel-cli/keys.d.ts +14 -0
  481. package/dist/vercel-cli/keys.js +12 -0
  482. package/dist/vercel-cli/live/config-files.d.ts +28 -0
  483. package/dist/vercel-cli/live/config-files.js +66 -0
  484. package/dist/vercel-cli/live/process-gateway.d.ts +14 -0
  485. package/dist/vercel-cli/live/process-gateway.js +178 -0
  486. package/dist/vercel-cli/redaction.d.ts +13 -0
  487. package/dist/vercel-cli/redaction.js +22 -0
  488. package/dist/vercel-cli/report.d.ts +22 -0
  489. package/dist/vercel-cli/report.js +110 -0
  490. package/dist/vercel-cli/verbose.d.ts +7 -0
  491. package/dist/vercel-cli/verbose.js +24 -0
  492. package/dist/version.d.ts +20 -0
  493. package/dist/version.js +57 -0
  494. package/dist/vitest/config.d.ts +51 -0
  495. package/dist/vitest/config.js +61 -0
  496. package/dist/vitest/container-scope.d.ts +108 -0
  497. package/dist/vitest/container-scope.js +234 -0
  498. package/dist/vitest/diagnostics.d.ts +146 -0
  499. package/dist/vitest/diagnostics.js +306 -0
  500. package/dist/vitest/find-vitest.d.ts +7 -0
  501. package/dist/vitest/find-vitest.js +28 -0
  502. package/dist/vitest/fixtures.d.ts +64 -0
  503. package/dist/vitest/fixtures.js +172 -0
  504. package/dist/vitest/gateways.d.ts +78 -0
  505. package/dist/vitest/gateways.js +4 -0
  506. package/dist/vitest/index.d.ts +3 -0
  507. package/dist/vitest/index.js +9 -0
  508. package/dist/vitest/list-output.d.ts +3 -0
  509. package/dist/vitest/list-output.js +19 -0
  510. package/dist/vitest/live/list-gateway.d.ts +11 -0
  511. package/dist/vitest/live/list-gateway.js +107 -0
  512. package/dist/vitest/ownership.d.ts +29 -0
  513. package/dist/vitest/ownership.js +68 -0
  514. package/dist/vitest/plan.d.ts +66 -0
  515. package/dist/vitest/plan.js +104 -0
  516. package/dist/vitest/sandbox.d.ts +16 -0
  517. package/dist/vitest/sandbox.js +35 -0
  518. package/dist/vitest/test-events.d.ts +41 -0
  519. package/dist/vitest/test-events.js +92 -0
  520. package/dist/vitest/test-results.d.ts +84 -0
  521. package/dist/vitest/test-results.js +160 -0
  522. package/dist/vitest/types.d.ts +68 -0
  523. package/dist/vitest/types.js +4 -0
  524. package/package.json +119 -3
  525. package/skills/overview.md +33 -0
  526. package/skills/read-run-output.md +65 -0
  527. package/README.md +0 -3
@@ -0,0 +1,15 @@
1
+ import type { StormRunObserver } from "../../resources.ts";
2
+ import type { RunnerTerminal } from "../../runner/index.ts";
3
+ /** Text with each secret replaced by `<token>`; the identity when there is none. */
4
+ export type Redact = (text: string) => string;
5
+ /** A redaction of `secrets`, each replaced by `<token>` wherever it appears. */
6
+ export declare function redactor(secrets: readonly string[]): Redact;
7
+ /** `value` with `redact` applied to every string in it, through arrays and plain objects; anything else as it is. */
8
+ export declare function redactStrings<T>(value: T, redact: Redact): T;
9
+ /** `observer`, hearing each event with every string in it redacted. */
10
+ export declare function redactingObserver(observer: StormRunObserver, redact: Redact): StormRunObserver;
11
+ /**
12
+ * `terminal`, writing the remote command's output redacted. The output arrives a whole line at a time, so a secret
13
+ * never splits across two writes.
14
+ */
15
+ export declare function redactingTerminal(terminal: RunnerTerminal, redact: Redact): RunnerTerminal;
@@ -0,0 +1,40 @@
1
+ // Hiding a run's secrets, such as the GitHub fixture repository's token, in what the run prints and writes: its
2
+ // events (which feed progress, the run directory's `events.jsonl`, the timeline, the job summary and the outcome), the
3
+ // remote command's output (the terminal and `command.log`), and the test events a local command appended.
4
+ import { redactSecrets } from "../../sdk/index.js";
5
+ /** A redaction of `secrets`, each replaced by `<token>` wherever it appears. */
6
+ export function redactor(secrets) {
7
+ const kept = secrets.filter((secret) => secret !== "");
8
+ return kept.length === 0 ? (text) => text : (text) => redactSecrets(text, kept);
9
+ }
10
+ /** `value` with `redact` applied to every string in it, through arrays and plain objects; anything else as it is. */
11
+ export function redactStrings(value, redact) {
12
+ if (typeof value === "string")
13
+ return redact(value);
14
+ if (Array.isArray(value))
15
+ return value.map((each) => redactStrings(each, redact));
16
+ if (typeof value === "object" && value !== null) {
17
+ const prototype = Object.getPrototypeOf(value);
18
+ if (prototype !== Object.prototype && prototype !== null)
19
+ return value;
20
+ return Object.fromEntries(Object.entries(value).map(([key, each]) => [key, redactStrings(each, redact)]));
21
+ }
22
+ return value;
23
+ }
24
+ /** `observer`, hearing each event with every string in it redacted. */
25
+ export function redactingObserver(observer, redact) {
26
+ return {
27
+ observe: async (timed) => await observer.observe({ event: redactStrings(timed.event, redact), at: timed.at }),
28
+ };
29
+ }
30
+ /**
31
+ * `terminal`, writing the remote command's output redacted. The output arrives a whole line at a time, so a secret
32
+ * never splits across two writes.
33
+ */
34
+ export function redactingTerminal(terminal, redact) {
35
+ return {
36
+ color: terminal.color,
37
+ writeStdout: (text) => terminal.writeStdout(redact(text)),
38
+ writeStderr: (text) => terminal.writeStderr(redact(text)),
39
+ };
40
+ }
@@ -0,0 +1,30 @@
1
+ import { type RunDirectory } from "../../core/index.ts";
2
+ import { type StormRunObserver, type StormRunState } from "../../resources.ts";
3
+ import { type TestEvent } from "../../sdk/index.ts";
4
+ import { type Redact } from "./redaction.ts";
5
+ /** The test events the summary reads, how many lines held none, and why they may be incomplete, when they may. */
6
+ export interface RunTestEvents {
7
+ readonly events: readonly TestEvent[];
8
+ readonly unreadable: number;
9
+ readonly incomplete: string | undefined;
10
+ }
11
+ /** What a run collected once its events and any local test events have been read. */
12
+ export interface CollectedRun {
13
+ readonly state: StormRunState;
14
+ readonly tests: RunTestEvents;
15
+ /** What to add to a runner run's worker clock to read the run's; 0 for a local run or without worker events. */
16
+ readonly workerOffsetMs: number;
17
+ }
18
+ /** A run's collector: one observer for the run's events, and the local test event file's reader. */
19
+ export interface RunCollector {
20
+ readonly observer: StormRunObserver;
21
+ /** Reads a local command's staged test events once, redacting each event before it is kept or written. */
22
+ readLocal(directory: RunDirectory, redact: Redact): Promise<void>;
23
+ finish(): CollectedRun;
24
+ }
25
+ /**
26
+ * A collector that folds every event but a runner step's output into the run's state. Each test event it hears or
27
+ * reads is appended whole to `directory`'s private test events file, when there is one, and kept for the summary
28
+ * without a final result's errors and test output.
29
+ */
30
+ export declare function runCollector(directory: RunDirectory | undefined): RunCollector;
@@ -0,0 +1,73 @@
1
+ // What a run keeps while it goes: its folded state, compact test events for the summary, and the facts needed to read
2
+ // workers' times. Full redacted test events stream to the run directory's private partial file as they arrive, so a
3
+ // run keeps no test output or test errors in memory after it has handed them on.
4
+ import { EMPTY_RUN_STATE } from "../../core/index.js";
5
+ import { applyStormRunEvent } from "../../resources.js";
6
+ import { parseTestEvent, testEventLine } from "../../sdk/index.js";
7
+ import { redactStrings } from "./redaction.js";
8
+ /**
9
+ * A collector that folds every event but a runner step's output into the run's state. Each test event it hears or
10
+ * reads is appended whole to `directory`'s private test events file, when there is one, and kept for the summary
11
+ * without a final result's errors and test output.
12
+ */
13
+ export function runCollector(directory) {
14
+ let state = EMPTY_RUN_STATE;
15
+ const events = [];
16
+ let unreadable = 0;
17
+ let incomplete;
18
+ let workerOffsetMs = Infinity;
19
+ const collect = (event) => {
20
+ directory?.appendTestEvent(testEventLine(event));
21
+ events.push(summaryEvent(event));
22
+ };
23
+ return {
24
+ observer: {
25
+ observe: async (timed) => {
26
+ const { event } = timed;
27
+ if (event.kind === "runner" && event.event.kind === "step-output")
28
+ return;
29
+ state = applyStormRunEvent(state, timed);
30
+ if (event.kind === "test") {
31
+ collect(event.event);
32
+ if (event.event.kind !== "test-result")
33
+ workerOffsetMs = Math.min(workerOffsetMs, timed.at.getTime() - event.event.at);
34
+ }
35
+ else if (event.kind === "test-event-unreadable")
36
+ unreadable += 1;
37
+ else if (event.kind === "test-events-incomplete")
38
+ incomplete ??= event.message;
39
+ },
40
+ },
41
+ readLocal: async (localDirectory, redact) => {
42
+ const read = await localDirectory.readTestEvents((line) => {
43
+ const event = parseTestEvent(line);
44
+ if (event === undefined)
45
+ unreadable += 1;
46
+ else
47
+ collect(redactStrings(event, redact));
48
+ });
49
+ if (!read.ok)
50
+ incomplete ??= read.failure.message;
51
+ },
52
+ finish: () => ({
53
+ state,
54
+ tests: { events, unreadable, incomplete },
55
+ workerOffsetMs: workerOffsetMs === Infinity ? 0 : workerOffsetMs,
56
+ }),
57
+ };
58
+ }
59
+ /** `event` as the summary needs it: a final result without its errors and test output, which only the file keeps. */
60
+ function summaryEvent(event) {
61
+ if (event.kind !== "test-result")
62
+ return event;
63
+ return {
64
+ kind: event.kind,
65
+ id: event.id,
66
+ file: event.file,
67
+ test: event.test,
68
+ state: event.state,
69
+ retryCount: event.retryCount,
70
+ flaky: event.flaky,
71
+ at: event.at,
72
+ };
73
+ }
@@ -0,0 +1,221 @@
1
+ import { type ArgumentIssue, type CommandError, type CommandResult, type ExecutionContext } from "@vercel/clinkr";
2
+ import { z } from "zod";
3
+ import type { StormApp } from "../../context.ts";
4
+ import { type CredentialSourceChoice, type MintTarget } from "../../credential/index.ts";
5
+ import { type CheckedRecipe, type CheckoutFailure } from "../../runner/index.ts";
6
+ import { type StormSetValues } from "../../resources.ts";
7
+ import { type ranSchema } from "./outcomes.ts";
8
+ import { type RunRecordPlan } from "./run-record.ts";
9
+ /** The request fields every run takes, `exec`'s and `vitest`'s: each command adds the fields for its command. */
10
+ export declare const RUN_REQUEST_FIELDS: {
11
+ set: z.ZodDefault<z.ZodArray<z.ZodString>>;
12
+ testserverSandboxes: z.ZodOptional<z.ZodNumber>;
13
+ testserverBuild: z.ZodOptional<z.ZodString>;
14
+ testserverMinTimeLeft: z.ZodOptional<z.ZodString>;
15
+ testserverTtl: z.ZodOptional<z.ZodString>;
16
+ testserverNoCreate: z.ZodOptional<z.ZodBoolean>;
17
+ scope: z.ZodOptional<z.ZodString>;
18
+ project: z.ZodOptional<z.ZodString>;
19
+ credential: z.ZodOptional<z.ZodEnum<{
20
+ "github-actions": "github-actions";
21
+ mint: "mint";
22
+ }>>;
23
+ local: z.ZodDefault<z.ZodBoolean>;
24
+ rebuildSnapshot: z.ZodDefault<z.ZodBoolean>;
25
+ showOutput: z.ZodDefault<z.ZodBoolean>;
26
+ keepSandbox: z.ZodOptional<z.ZodString>;
27
+ verbose: z.ZodDefault<z.ZodBoolean>;
28
+ };
29
+ /** The CLI spellings of the fields every run takes. */
30
+ export declare const RUN_CLI_OPTIONS: {
31
+ readonly project: {
32
+ readonly short: "p";
33
+ };
34
+ };
35
+ declare const runRequestSchema: z.ZodObject<{
36
+ set: z.ZodDefault<z.ZodArray<z.ZodString>>;
37
+ testserverSandboxes: z.ZodOptional<z.ZodNumber>;
38
+ testserverBuild: z.ZodOptional<z.ZodString>;
39
+ testserverMinTimeLeft: z.ZodOptional<z.ZodString>;
40
+ testserverTtl: z.ZodOptional<z.ZodString>;
41
+ testserverNoCreate: z.ZodOptional<z.ZodBoolean>;
42
+ scope: z.ZodOptional<z.ZodString>;
43
+ project: z.ZodOptional<z.ZodString>;
44
+ credential: z.ZodOptional<z.ZodEnum<{
45
+ "github-actions": "github-actions";
46
+ mint: "mint";
47
+ }>>;
48
+ local: z.ZodDefault<z.ZodBoolean>;
49
+ rebuildSnapshot: z.ZodDefault<z.ZodBoolean>;
50
+ showOutput: z.ZodDefault<z.ZodBoolean>;
51
+ keepSandbox: z.ZodOptional<z.ZodString>;
52
+ verbose: z.ZodDefault<z.ZodBoolean>;
53
+ }, z.core.$strip>;
54
+ /** What every run's request holds. */
55
+ export type RunCommandRequest = z.output<typeof runRequestSchema>;
56
+ /** A run settled before it starts: its config file, its resources' options and requests, and where it runs. */
57
+ export type SettledRun = Extract<Awaited<ReturnType<typeof settleRun>>, {
58
+ readonly ok: true;
59
+ }>;
60
+ /** What a `ran` outcome reports of every run, which a command's own `ran` may extend. */
61
+ export type RanFacts = z.input<typeof ranSchema>;
62
+ /**
63
+ * The command a settled run runs: its argv, the settled run it runs with, which `prepare` may have changed (such as
64
+ * its Testserver sandbox count) but not its secrets, which the run hides from the settled run it gave `prepare`, and
65
+ * its test plan, which `run.json` records when there is one.
66
+ */
67
+ export interface PreparedCommand<TPlan> {
68
+ readonly ok: true;
69
+ readonly argv: readonly string[];
70
+ readonly settled: SettledRun;
71
+ readonly plan: TPlan;
72
+ }
73
+ /** How one command runs: its name, the command its settled run runs, and its `ran` outcome. */
74
+ export interface RunCommandSpec<TPlan, TRan, TRefusal> {
75
+ /** The invoking command's name, `exec` or `vitest`, which the job summary's heading names. */
76
+ readonly name: string;
77
+ /**
78
+ * The command to run once the run is settled, before anything is minted, leased or started and before a runner
79
+ * run's local checks; or a refusal, which ends the run there, with the run's secrets hidden. Once `signal`, the
80
+ * invocation's, aborts, it stops what it started as soon as it can; the run then cancels, whatever it answers.
81
+ */
82
+ prepare(settled: SettledRun, signal: AbortSignal): Promise<PreparedCommand<TPlan> | {
83
+ readonly ok: false;
84
+ readonly refusal: TRefusal;
85
+ }>;
86
+ /** The `ran` outcome for a run whose command ran, from what every run reports and the command's plan. */
87
+ ran(facts: RanFacts, plan: TPlan): TRan;
88
+ }
89
+ /**
90
+ * Runs a run's command, the argv `spec.prepare` gives once the run is settled (`exec`'s command after `--`, or the
91
+ * `vitest run` argv `vitest` builds), with the run payload in `STORM_RUN` and the host variables each resource
92
+ * names removed (`TESTSERVER_BASES`/`TESTSERVER_BASE` for the Testserver pool), waits for it, and prints a waterfall.
93
+ * With a Testserver side it first leases usable Testserver sandboxes from the pool, creates the rest, and prints the
94
+ * sandbox list, and releases the leases once the command ends. The process exits with the command's code, or `128 + n`
95
+ * when signal `n` ended it: `bin/storm.ts` applies the status this records in `app.exit`, which Clinkr's 0 or 1
96
+ * can't carry.
97
+ *
98
+ * A run holds a resource when `storm.config.ts` has it under `resources` or the command line gives one of its
99
+ * options: a `--set resources.<name>.<option>=<value>`, or for the Testserver pool resource one of its own flags
100
+ * (`--testserver-sandboxes`, `--testserver-build`, `--testserver-min-time-left`, `--testserver-ttl`,
101
+ * `--testserver-no-create`; `testserver-flags.ts`). A run has a Testserver side when it holds the Testserver pool
102
+ * resource; without one, the run payload names no Testserver sandbox.
103
+ *
104
+ * Signals: before the command starts, the first signal stops the run at its next step, lets creates in flight settle,
105
+ * releases its leases, and cancels (exit `128 + n`). A signal while `spec.prepare` runs, such as while `vitest` counts
106
+ * the tests, stops it and cancels the run before anything is minted, leased or started (`canceledBeforeStart`). While
107
+ * the command runs, Ctrl+C and a closed terminal reach it directly through its process group, so only SIGTERM is
108
+ * passed on; either way the run waits for the command. A second signal makes Clinkr's host exit at once with
109
+ * `128 + n`, leaving the leases for the next run to reclaim, since their holder is gone.
110
+ *
111
+ * `scope` and `project` come from `--scope` and `--project`, else `storm.config.ts` (found from the working
112
+ * directory and checked whole); they have no default, so one of the two must give them when the run mints. Each
113
+ * resource's options come from the command line, else the file's section, else the option's default (the registry's
114
+ * resource configs, `src/resources.ts`). On the command line, each Testserver pool option has its own
115
+ * `--testserver-<option>` flag, and any other option comes from `--set resources.<name>.<option>=<value>`, which may
116
+ * repeat. An unknown key path, a key path given twice, a key path with its own flag, or a value its option's rule
117
+ * refuses is a usage error. Options that don't fit together once merged, such as a TTL not longer than `minTimeLeft`,
118
+ * or a `--testserver-ttl` with `noCreate`, are `invalid_resource_options`, which names each value's source.
119
+ *
120
+ * By default the command runs in a runner sandbox, from the `runner` recipe of `storm.config.ts`, which only a
121
+ * runner run reads: `missing_runner` without one. `--local` (no config key) runs it on this machine instead. The
122
+ * runner's local checks (`prepareRunner`) run before anything is minted, leased or created. A runner run always mints,
123
+ * for the runner sandbox, so it needs `scope` and `project` whatever resources it holds. In a runner run, the first
124
+ * SIGINT, SIGTERM or SIGHUP stops the run in any phase: the remote command is killed, every sandbox the run started is
125
+ * stopped and deleted, the leases are released, and the run cancels. `--rebuild-snapshot` (no config key, not with
126
+ * `--local`) builds a runner snapshot whatever the cache holds.
127
+ *
128
+ * `--credential` (no config key) picks the credential source: `mint`, the default, or `github-actions`, which requests
129
+ * a GitHub Actions OIDC token instead and so needs no `--scope` or `--project`; any given are unused. A runner run
130
+ * needs the mint, so `--credential github-actions` without `--local` is a usage error. The registry says whether a held
131
+ * resource takes the credential (`RESOURCE_COMMANDS.takesCredential`): the Testserver pool does unless `noCreate`. A
132
+ * `--credential` given to a run where none does is `credential_unused`.
133
+ *
134
+ * Progress shows by the app's presentation (`presentation.ts`): a live view on a terminal a person watches, plain lines
135
+ * elsewhere, folded for GitHub Actions, nothing under `--json`. `--show-output` (no config key, not with `--local`)
136
+ * prints the runner's step output above the live view. `--verbose` (no config key) prints each create's progress
137
+ * messages and the runner's step output, and sets `verbose` in the run payload. Every run, `--json` included, writes a
138
+ * run directory (`core/run-directory.ts`), and a run that can't make one goes on without it; the waterfall names it and
139
+ * the `storm runs show` command that reads the run back by its run id, which a ran outcome carries as `runId`, and
140
+ * in a GitHub Actions step with a job summary the run appends a Markdown summary there.
141
+ *
142
+ * Each resource is a provider (the registry, `src/resources.ts`, lists them), whose folder under `src/resources/` says
143
+ * what the run does with it, and whose command half settles it (`RESOURCE_COMMANDS.settle`). The run refuses in this
144
+ * order: `invalid_config`, `invalid_resource_options`, `credential_unused`; in a runner run `missing_runner`, then
145
+ * `missing_target`; in a local run where a resource takes the credential, `missing_target` for the mint; then each
146
+ * resource's settle, in provider order; then `spec.prepare`'s refusal, if any. A resource's secrets, such as a token,
147
+ * are hidden as `<token>` in the run's progress, its run directory, its job summary, its outcome, `spec.prepare`'s
148
+ * refusal, and its command's output, in either kind of run.
149
+ */
150
+ export declare function runCommand<TPlan extends RunRecordPlan | undefined, TRan extends CommandResult, TRefusal extends CommandError = never>({ app, ui, signal }: ExecutionContext<StormApp>, request: RunCommandRequest, spec: RunCommandSpec<TPlan, TRan, TRefusal>): Promise<TRan | TRefusal | import("@vercel/clinkr").ClinkrError<"canceled"> | CommandError<"credential_unused"> | CommandError<"invalid_config"> | CommandError<"invalid_resource_options"> | CommandError<"mint_failed"> | CommandError<"missing_runner"> | CommandError<"missing_target"> | CommandError<"no_base_ref"> | CommandError<"runner_failed"> | CommandError<"snapshot_gone"> | CommandError<"spawn_failed"> | CommandError<"submodules_refused"> | CommandError<"credential_rejected" | "github_fixture_repo_unavailable" | "github_token_missing" | "no_sandboxes" | "no_usable_sandboxes" | "pool_unavailable" | "pool_unreadable" | "token_request_failed">>;
151
+ /** What is wrong with a run's request that its schema can't say, as `validate` reports it. */
152
+ export declare function runProblems({ set, credential, local, rebuildSnapshot, showOutput, keepSandbox, ...rest }: RunCommandRequest): readonly ArgumentIssue[];
153
+ /**
154
+ * A run canceled before it started, while it was settled or prepared: nothing was minted, leased or started, and the
155
+ * command didn't run.
156
+ */
157
+ export declare function canceledBeforeStart(): import("@vercel/clinkr").ClinkrError<"canceled">;
158
+ /**
159
+ * The refusal for a runner run whose checkout git couldn't read before anything was minted, leased or started:
160
+ * `runner_failed` with `checkout-failed`, holding nothing.
161
+ */
162
+ export declare function checkoutFailedRefusal(failure: CheckoutFailure): CommandError<"runner_failed">;
163
+ /** How long a runner sandbox keeps running once its run ends, when neither the flag nor the recipe says. */
164
+ export declare const DEFAULT_KEEP_SANDBOX_MINUTES = 30;
165
+ /**
166
+ * Where a settled run runs: with `--local` on this machine, with the credential source it settled when a held
167
+ * resource takes one; or by default in a runner sandbox, with the runner recipe and the team and project the runner
168
+ * sandbox's credential is minted for, whose one mint the resources share.
169
+ */
170
+ type RunWhere = {
171
+ readonly kind: "local";
172
+ readonly credential: CredentialSourceChoice | undefined;
173
+ } | {
174
+ readonly kind: "runner";
175
+ readonly recipe: CheckedRecipe;
176
+ readonly target: MintTarget;
177
+ };
178
+ /**
179
+ * Settles a run before it starts, refusing in this order: the config file (`invalid_config`); each held resource's
180
+ * merged options (`invalid_resource_options`); a `--credential` no held resource takes (`credential_unused`); in a
181
+ * runner run, the runner recipe (`missing_runner`) and the team and project its mint needs (`missing_target`); in a
182
+ * local run where a held resource takes the credential, the credential source (`missing_target` for the mint); then
183
+ * each held resource's own settle, in provider order.
184
+ */
185
+ declare function settleRun(app: StormApp, request: {
186
+ readonly given: StormSetValues;
187
+ readonly scope?: string | undefined;
188
+ readonly project?: string | undefined;
189
+ readonly local: boolean;
190
+ readonly credential?: CredentialSourceChoice["source"] | undefined;
191
+ }): Promise<{
192
+ readonly ok: false;
193
+ readonly refusal: CommandError<"invalid_config">;
194
+ } | {
195
+ readonly ok: false;
196
+ readonly refusal: CommandError<"invalid_resource_options">;
197
+ } | {
198
+ readonly ok: false;
199
+ readonly refusal: CommandError<"missing_target">;
200
+ } | {
201
+ readonly ok: false;
202
+ readonly refusal: CommandError<"credential_rejected" | "github_fixture_repo_unavailable" | "github_token_missing" | "no_sandboxes" | "no_usable_sandboxes" | "pool_unavailable" | "pool_unreadable" | "token_request_failed">;
203
+ } | {
204
+ readonly ok: false;
205
+ readonly refusal: CommandError<"credential_unused">;
206
+ } | {
207
+ readonly ok: false;
208
+ readonly refusal: CommandError<"missing_runner">;
209
+ } | {
210
+ readonly ok: true;
211
+ readonly configFile: string | null;
212
+ readonly file: {
213
+ readonly ok: true;
214
+ } & import("../../config/settings-file.ts").SettingsFile<(import("../../config/resource-config.ts").ResourceConfig<"githubFixtureRepo", import("../../resources/github/resource.ts").GitHubFixtureRepoOptions, import("../../resources/github/config.ts").GitHubFixtureRepoSettings, keyof import("../../resources/github/resource.ts").GitHubFixtureRepoOptions> | import("../../config/resource-config.ts").ResourceConfig<"testserverPool", import("../../resources/testserver/resource.ts").TestserverPoolOptions, import("../../resources/testserver/provider.ts").TestserverPoolRequest, keyof import("../../resources/testserver/resource.ts").TestserverPoolOptions>)[]>;
215
+ readonly options: import("../../config/resource-config.ts").ResolvedResources<(import("../../config/resource-config.ts").ResourceConfig<"githubFixtureRepo", import("../../resources/github/resource.ts").GitHubFixtureRepoOptions, import("../../resources/github/config.ts").GitHubFixtureRepoSettings, keyof import("../../resources/github/resource.ts").GitHubFixtureRepoOptions> | import("../../config/resource-config.ts").ResourceConfig<"testserverPool", import("../../resources/testserver/resource.ts").TestserverPoolOptions, import("../../resources/testserver/provider.ts").TestserverPoolRequest, keyof import("../../resources/testserver/resource.ts").TestserverPoolOptions>)[]>;
216
+ readonly where: RunWhere;
217
+ readonly settlement: {
218
+ readonly ok: true;
219
+ } & import("../../core/command-slots.ts").ResourcesSettlement<import("../../resources.ts").Resources>;
220
+ }>;
221
+ export {};