@cnc-tools/storm 0.15.0 → 0.17.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 (305) hide show
  1. package/dist/application.d.ts +22 -13
  2. package/dist/application.js +21 -10
  3. package/dist/bin/run.d.ts +18 -0
  4. package/dist/bin/run.js +31 -0
  5. package/dist/bin/storm.js +42 -26
  6. package/dist/build-info.js +1 -1
  7. package/dist/chunks/{chunk-5CCP36QQ.js → chunk-2RNDPDTJ.js} +2 -2
  8. package/dist/chunks/chunk-2VP4GRJM.js +1219 -0
  9. package/dist/chunks/{chunk-SZEURWRS.js → chunk-4O5C2XGJ.js} +18 -15
  10. package/dist/chunks/{chunk-VL7WFTVQ.js → chunk-4WAMTUWZ.js} +419 -340
  11. package/dist/chunks/{chunk-QVS7HRU7.js → chunk-6UHIJXZG.js} +3 -3
  12. package/dist/chunks/{chunk-CN4EFA5J.js → chunk-72ZFEMAW.js} +1 -1
  13. package/dist/chunks/{chunk-4U4DZ7VG.js → chunk-7DZE67QM.js} +2 -2
  14. package/dist/chunks/{chunk-VUPZH7J2.js → chunk-BCBKYOHW.js} +1 -1
  15. package/dist/chunks/{chunk-QUHY6FGN.js → chunk-CKGZA25H.js} +1 -18
  16. package/dist/chunks/{chunk-ZG3WQ4UF.js → chunk-D27KILIA.js} +1 -1
  17. package/dist/chunks/{chunk-KC4KDJ5K.js → chunk-DADEYJDW.js} +174 -153
  18. package/dist/chunks/{chunk-R7XVBZOY.js → chunk-EEENLQHE.js} +59 -11
  19. package/dist/chunks/chunk-F4MOYHRY.js +198 -0
  20. package/dist/chunks/{chunk-CXAT7ZKP.js → chunk-FNBB6V4R.js} +1 -1
  21. package/dist/chunks/{chunk-OX7X4B2L.js → chunk-GRT3UIBV.js} +18 -1
  22. package/dist/chunks/chunk-HP3CURSZ.js +88 -0
  23. package/dist/chunks/{chunk-PN5ULTTH.js → chunk-HWIQ2S7K.js} +5 -5
  24. package/dist/chunks/chunk-JN3YY6ZH.js +2166 -0
  25. package/dist/chunks/{chunk-TJNFVNKR.js → chunk-LKTZ5OXS.js} +1 -1
  26. package/dist/chunks/{chunk-XEVHP5ZW.js → chunk-M7EKRGVD.js} +8 -8
  27. package/dist/chunks/chunk-MR77L2GK.js +340 -0
  28. package/dist/chunks/{chunk-L36GBUBB.js → chunk-RNAS7JHE.js} +1755 -522
  29. package/dist/chunks/{chunk-5GBMR4HM.js → chunk-RWIXDDCK.js} +4 -192
  30. package/dist/chunks/{chunk-5VXBKPW6.js → chunk-WV3DP6NR.js} +1 -1
  31. package/dist/chunks/{chunk-AWBSONHB.js → chunk-XBDRVFEV.js} +55 -16
  32. package/dist/chunks/{chunk-YV7GE6EV.js → chunk-YEPFSLQR.js} +480 -375
  33. package/dist/chunks/{live-app-PI3BAN6Y.js → live-app-R76JQXZL.js} +15 -13
  34. package/dist/commands/exec/across-sandboxes-outcomes.d.ts +1 -1
  35. package/dist/commands/exec/across-sandboxes-outcomes.js +4 -3
  36. package/dist/commands/exec/before-run.d.ts +123 -0
  37. package/dist/commands/exec/before-run.js +105 -0
  38. package/dist/commands/exec/command.d.ts +39 -4
  39. package/dist/commands/exec/command.js +31 -95
  40. package/dist/commands/exec/driver-plan.d.ts +9 -4
  41. package/dist/commands/exec/driver-plan.js +8 -8
  42. package/dist/commands/exec/exec-words.js +1 -1
  43. package/dist/commands/exec/execute-run.d.ts +39 -0
  44. package/dist/commands/exec/execute-run.js +325 -0
  45. package/dist/commands/exec/live-view.d.ts +3 -3
  46. package/dist/commands/exec/live-view.js +16 -15
  47. package/dist/commands/exec/metadata.js +1 -1
  48. package/dist/commands/exec/mint-failed.d.ts +38 -0
  49. package/dist/commands/exec/mint-failed.js +27 -4
  50. package/dist/commands/exec/outcomes.d.ts +38 -9
  51. package/dist/commands/exec/outcomes.js +32 -25
  52. package/dist/commands/exec/plan-run.d.ts +58 -150
  53. package/dist/commands/exec/plan-run.js +232 -88
  54. package/dist/commands/exec/planned-outcome.js +8 -1
  55. package/dist/commands/exec/progress.d.ts +10 -6
  56. package/dist/commands/exec/progress.js +38 -25
  57. package/dist/commands/exec/run-bin.d.ts +11 -11
  58. package/dist/commands/exec/run-bin.js +9 -9
  59. package/dist/commands/exec/run-flags.d.ts +69 -0
  60. package/dist/commands/exec/run-flags.js +58 -0
  61. package/dist/commands/exec/run-metadata.js +5 -5
  62. package/dist/commands/exec/run-summary.d.ts +58 -0
  63. package/dist/commands/exec/run-summary.js +205 -0
  64. package/dist/commands/exec/runner-refusals.d.ts +82 -0
  65. package/dist/commands/exec/runner-refusals.js +71 -0
  66. package/dist/commands/exec/sandbox-progress.js +3 -0
  67. package/dist/commands/exec/stopped-outcome.d.ts +12 -0
  68. package/dist/commands/exec/stopped-outcome.js +77 -0
  69. package/dist/commands/exec/view.d.ts +20 -11
  70. package/dist/commands/exec/view.js +103 -47
  71. package/dist/commands/runs/facts.d.ts +9 -4
  72. package/dist/commands/runs/facts.js +28 -11
  73. package/dist/commands/runs/list/command.d.ts +16 -6
  74. package/dist/commands/runs/list/command.js +10 -10
  75. package/dist/commands/runs/list/outcomes.d.ts +8 -3
  76. package/dist/commands/runs/logs/command.d.ts +6 -2
  77. package/dist/commands/runs/logs/command.js +10 -10
  78. package/dist/commands/runs/logs/outcomes.d.ts +3 -1
  79. package/dist/commands/runs/past-run.d.ts +14 -5
  80. package/dist/commands/runs/past-run.js +16 -5
  81. package/dist/commands/runs/show/command.d.ts +20 -8
  82. package/dist/commands/runs/show/command.js +30 -28
  83. package/dist/commands/runs/show/outcomes.d.ts +10 -4
  84. package/dist/commands/runs/show/outcomes.js +7 -5
  85. package/dist/commands/snapshots/access.d.ts +111 -0
  86. package/dist/commands/snapshots/access.js +96 -0
  87. package/dist/commands/snapshots/build/command.d.ts +360 -93
  88. package/dist/commands/snapshots/build/command.js +446 -150
  89. package/dist/commands/snapshots/build/metadata.d.ts +10 -0
  90. package/dist/commands/snapshots/build/metadata.js +31 -11
  91. package/dist/commands/snapshots/build/outcomes.d.ts +234 -43
  92. package/dist/commands/snapshots/build/outcomes.js +200 -36
  93. package/dist/commands/snapshots/list/command.d.ts +368 -27
  94. package/dist/commands/snapshots/list/command.js +296 -66
  95. package/dist/commands/snapshots/list/metadata.d.ts +16 -0
  96. package/dist/commands/snapshots/list/metadata.js +29 -6
  97. package/dist/commands/snapshots/list/outcomes.d.ts +245 -13
  98. package/dist/commands/snapshots/list/outcomes.js +221 -50
  99. package/dist/commands/snapshots/metadata.js +1 -1
  100. package/dist/commands/snapshots/prune/command.d.ts +430 -0
  101. package/dist/commands/snapshots/prune/command.js +161 -0
  102. package/dist/commands/snapshots/prune/metadata.d.ts +28 -0
  103. package/dist/commands/snapshots/prune/metadata.js +39 -0
  104. package/dist/commands/snapshots/prune/outcomes.d.ts +208 -0
  105. package/dist/commands/snapshots/prune/outcomes.js +78 -0
  106. package/dist/commands/suites/list/command.js +19 -18
  107. package/dist/commands/suites/list/outcomes.js +4 -4
  108. package/dist/commands/test/command.d.ts +39 -4
  109. package/dist/commands/test/command.js +50 -255
  110. package/dist/commands/test/metadata.js +1 -1
  111. package/dist/commands/test/outcomes.d.ts +19 -2
  112. package/dist/commands/test/outcomes.js +2 -2
  113. package/dist/config/check-runner.d.ts +5 -3
  114. package/dist/config/check-runner.js +33 -7
  115. package/dist/config/check-suites.js +1 -0
  116. package/dist/config/credential-resolver.d.ts +50 -5
  117. package/dist/config/credential-resolver.js +51 -19
  118. package/dist/config/credential-settle.d.ts +6 -2
  119. package/dist/config/credential-settle.js +11 -5
  120. package/dist/config/gateways.d.ts +7 -3
  121. package/dist/config/index.d.ts +4 -5
  122. package/dist/config/index.js +3 -4
  123. package/dist/config/live/config-gateway.js +5 -2
  124. package/dist/config/load.d.ts +21 -4
  125. package/dist/config/load.js +129 -15
  126. package/dist/config/runner.d.ts +7 -8
  127. package/dist/config/runner.js +1 -1
  128. package/dist/config/schema.d.ts +17 -5
  129. package/dist/config/schema.js +11 -3
  130. package/dist/config/typed-options.d.ts +1 -6
  131. package/dist/config/typed-options.js +2 -10
  132. package/dist/config-file/define.d.ts +1 -11
  133. package/dist/config-file/define.js +3 -3
  134. package/dist/config-file/runner.d.ts +5 -6
  135. package/dist/config-file/toolchain.d.ts +13 -7
  136. package/dist/config-file/toolchain.js +53 -37
  137. package/dist/context.d.ts +8 -6
  138. package/dist/context.js +7 -6
  139. package/dist/core/across-sandboxes.d.ts +7 -6
  140. package/dist/core/across-sandboxes.js +123 -152
  141. package/dist/core/coordinator.d.ts +166 -0
  142. package/dist/core/coordinator.js +233 -0
  143. package/dist/core/events.d.ts +2 -2
  144. package/dist/core/index.d.ts +4 -2
  145. package/dist/core/index.js +1 -1
  146. package/dist/core/outcomes.d.ts +148 -0
  147. package/dist/core/{sandbox-end.js → outcomes.js} +28 -4
  148. package/dist/core/resources.d.ts +31 -53
  149. package/dist/core/resources.js +32 -70
  150. package/dist/core/run-state.d.ts +7 -1
  151. package/dist/core/run-state.js +2 -0
  152. package/dist/core/run.d.ts +32 -236
  153. package/dist/core/run.js +106 -266
  154. package/dist/core/state-directory.d.ts +1 -1
  155. package/dist/core/state-directory.js +2 -2
  156. package/dist/credential/gateways.d.ts +15 -1
  157. package/dist/credential/index.d.ts +4 -3
  158. package/dist/credential/index.js +3 -2
  159. package/dist/credential/live/vercel-cli-gateway.d.ts +1 -1
  160. package/dist/credential/live/vercel-cli-gateway.js +1 -1
  161. package/dist/credential/live/vercel-oidc-token-gateway.d.ts +11 -0
  162. package/dist/credential/live/vercel-oidc-token-gateway.js +16 -0
  163. package/dist/credential/source.d.ts +73 -6
  164. package/dist/credential/source.js +55 -2
  165. package/dist/extension-commands.d.ts +6 -1
  166. package/dist/extension-commands.js +15 -1
  167. package/dist/extensions/github/resource.d.ts +1 -1
  168. package/dist/extensions/github/resource.js +1 -1
  169. package/dist/extensions/testserver/commands/pool/create/command.d.ts +35 -2
  170. package/dist/extensions/testserver/commands/pool/create/command.js +7 -7
  171. package/dist/extensions/testserver/commands/pool/create/metadata.js +5 -5
  172. package/dist/extensions/testserver/commands/pool/create/outcomes.d.ts +17 -1
  173. package/dist/extensions/testserver/commands/pool/list/command.js +4 -4
  174. package/dist/extensions/testserver/credential-facts.d.ts +6 -2
  175. package/dist/extensions/testserver/credential-facts.js +29 -11
  176. package/dist/extensions/testserver/lifecycle.js +7 -1
  177. package/dist/extensions/testserver/limit.d.ts +3 -0
  178. package/dist/extensions/testserver/limit.js +3 -0
  179. package/dist/extensions/testserver/provision.d.ts +8 -1
  180. package/dist/extensions/testserver/provision.js +8 -3
  181. package/dist/extensions/testserver/refusals.d.ts +6 -1
  182. package/dist/extensions/testserver/refusals.js +16 -1
  183. package/dist/extensions/testserver/resource.d.ts +2 -2
  184. package/dist/extensions/testserver/resource.js +2 -2
  185. package/dist/extensions/testserver/result.d.ts +1 -1
  186. package/dist/extensions/testserver/result.js +9 -4
  187. package/dist/planning/driver-file-lists.d.ts +0 -15
  188. package/dist/planning/driver-file-lists.js +2 -21
  189. package/dist/planning/plan-only.d.ts +7 -15
  190. package/dist/planning/plan-only.js +16 -22
  191. package/dist/planning/run-kind-flags.js +2 -2
  192. package/dist/planning/run-plan.d.ts +45 -13
  193. package/dist/planning/run-plan.js +4 -3
  194. package/dist/planning/suites.d.ts +1 -1
  195. package/dist/planning/suites.js +2 -2
  196. package/dist/planning/test-plan.d.ts +9 -0
  197. package/dist/planning/test-plan.js +10 -2
  198. package/dist/run-directory/recording.js +2 -2
  199. package/dist/run-directory/run-record.d.ts +21 -6
  200. package/dist/run-directory/run-record.js +12 -9
  201. package/dist/runner/base.d.ts +0 -6
  202. package/dist/runner/base.js +1 -16
  203. package/dist/runner/build-snapshots.d.ts +55 -29
  204. package/dist/runner/build-snapshots.js +135 -35
  205. package/dist/runner/context.d.ts +15 -7
  206. package/dist/runner/context.js +19 -6
  207. package/dist/runner/events.d.ts +16 -10
  208. package/dist/runner/gateways.d.ts +92 -21
  209. package/dist/runner/gateways.js +1 -1
  210. package/dist/runner/index.d.ts +11 -7
  211. package/dist/runner/index.js +9 -4
  212. package/dist/runner/live/sandbox-errors.d.ts +2 -0
  213. package/dist/runner/live/sandbox-errors.js +4 -0
  214. package/dist/runner/live/sandbox-gateway.js +141 -3
  215. package/dist/runner/live/snapshot-index-gateway.d.ts +12 -0
  216. package/dist/runner/live/{snapshot-cache-gateway.js → snapshot-index-gateway.js} +11 -11
  217. package/dist/runner/live/snapshot-records.js +6 -7
  218. package/dist/runner/local-snapshot-index.d.ts +199 -0
  219. package/dist/runner/local-snapshot-index.js +211 -0
  220. package/dist/runner/network-policy.d.ts +6 -6
  221. package/dist/runner/network-policy.js +7 -7
  222. package/dist/runner/policy-writes.d.ts +1 -1
  223. package/dist/runner/policy-writes.js +1 -1
  224. package/dist/runner/prepare.d.ts +25 -24
  225. package/dist/runner/prepare.js +28 -20
  226. package/dist/runner/ready.d.ts +18 -10
  227. package/dist/runner/ready.js +104 -33
  228. package/dist/runner/sandboxed-command.d.ts +3 -3
  229. package/dist/runner/sandboxed-command.js +3 -3
  230. package/dist/runner/scope.d.ts +10 -6
  231. package/dist/runner/scope.js +10 -3
  232. package/dist/runner/secrets.d.ts +13 -13
  233. package/dist/runner/secrets.js +18 -15
  234. package/dist/runner/session.d.ts +8 -8
  235. package/dist/runner/session.js +3 -3
  236. package/dist/runner/shared-snapshot-entry.d.ts +92 -0
  237. package/dist/runner/shared-snapshot-entry.js +168 -0
  238. package/dist/runner/shared-snapshot-list.d.ts +81 -0
  239. package/dist/runner/shared-snapshot-list.js +155 -0
  240. package/dist/runner/shared-snapshot-lookup.d.ts +51 -0
  241. package/dist/runner/shared-snapshot-lookup.js +118 -0
  242. package/dist/runner/shared-snapshot-prune.d.ts +58 -0
  243. package/dist/runner/shared-snapshot-prune.js +133 -0
  244. package/dist/runner/snapshot-build.d.ts +42 -14
  245. package/dist/runner/snapshot-build.js +38 -28
  246. package/dist/runner/snapshot-choice.js +1 -1
  247. package/dist/runner/snapshot-inspect.d.ts +39 -40
  248. package/dist/runner/snapshot-inspect.js +58 -38
  249. package/dist/runner/snapshot-key.d.ts +30 -21
  250. package/dist/runner/snapshot-key.js +49 -29
  251. package/dist/runner/steps.d.ts +1 -1
  252. package/dist/runner/steps.js +1 -1
  253. package/dist/runner/{recipe-check.d.ts → vercel-sandbox-check.d.ts} +2 -2
  254. package/dist/runner/{recipe-check.js → vercel-sandbox-check.js} +3 -2
  255. package/dist/runner/{recipe.d.ts → vercel-sandbox-options.d.ts} +82 -82
  256. package/dist/runner/vercel-sandbox-options.js +510 -0
  257. package/dist/runner/{recipe-secrets.d.ts → vercel-sandbox-secrets.d.ts} +6 -6
  258. package/dist/runner/{recipe-secrets.js → vercel-sandbox-secrets.js} +20 -20
  259. package/dist/sdk/extension/commands.d.ts +8 -3
  260. package/dist/sdk/extension/commands.js +3 -1
  261. package/dist/sdk/extension/credential-diagnosis.d.ts +3 -1
  262. package/dist/sdk/extension/credential-diagnosis.js +25 -5
  263. package/dist/sdk/extension/credential-source.d.ts +20 -3
  264. package/dist/sdk/extension/credential-source.js +4 -4
  265. package/dist/sdk/extension/index.d.ts +3 -2
  266. package/dist/sdk/extension/index.js +2 -1
  267. package/dist/sdk/extension/resource-definition.d.ts +4 -3
  268. package/dist/sdk/extension/resource-definition.js +3 -2
  269. package/dist/sdk/extension/resource-factory.js +3 -4
  270. package/dist/sdk/extension/secret-source.d.ts +1 -1
  271. package/dist/sdk/extension/secret-source.js +1 -1
  272. package/dist/sdk/extension/vercel-oidc-facts.d.ts +20 -0
  273. package/dist/sdk/extension/vercel-oidc-facts.js +20 -0
  274. package/dist/sdk/run/present.d.ts +3 -3
  275. package/dist/sdk/run/present.js +1 -3
  276. package/dist/shared/cleanup.d.ts +3 -3
  277. package/dist/shared/cleanup.js +15 -5
  278. package/dist/shared/snapshot-text.d.ts +4 -4
  279. package/dist/shared/snapshot-text.js +11 -11
  280. package/dist/time/duration.js +1 -1
  281. package/package.json +3 -2
  282. package/skills/overview.md +6 -4
  283. package/skills/plan-runs.md +2 -2
  284. package/skills/read-run-output.md +6 -6
  285. package/dist/chunks/chunk-E4PJNZVG.js +0 -783
  286. package/dist/chunks/chunk-RAQEXKL6.js +0 -2591
  287. package/dist/commands/exec/across-sandboxes-run.d.ts +0 -180
  288. package/dist/commands/exec/across-sandboxes-run.js +0 -339
  289. package/dist/commands/exec/plan-only.d.ts +0 -10
  290. package/dist/commands/exec/plan-only.js +0 -46
  291. package/dist/commands/exec/run-command.d.ts +0 -476
  292. package/dist/commands/exec/run-command.js +0 -604
  293. package/dist/commands/exec/run-planned.d.ts +0 -20
  294. package/dist/commands/exec/run-planned.js +0 -22
  295. package/dist/commands/exec/sandbox-view.d.ts +0 -19
  296. package/dist/commands/exec/sandbox-view.js +0 -72
  297. package/dist/commands/test/plan.d.ts +0 -92
  298. package/dist/commands/test/plan.js +0 -128
  299. package/dist/config/recipe-run.d.ts +0 -33
  300. package/dist/config/recipe-run.js +0 -28
  301. package/dist/core/sandbox-end.d.ts +0 -64
  302. package/dist/runner/live/snapshot-cache-gateway.d.ts +0 -12
  303. package/dist/runner/recipe.js +0 -425
  304. package/dist/runner/snapshot-cache.d.ts +0 -148
  305. package/dist/runner/snapshot-cache.js +0 -126
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  redactor
3
- } from "./chunk-CXAT7ZKP.js";
3
+ } from "./chunk-FNBB6V4R.js";
4
4
  import {
5
5
  declaredSecretValues,
6
6
  effectiveConfig
7
- } from "./chunk-L36GBUBB.js";
7
+ } from "./chunk-RNAS7JHE.js";
8
8
 
9
9
  // src/planning/suites.ts
10
10
  function resolveProjectTests(file, driverByName) {
@@ -51,7 +51,7 @@ function formatCommandLine(command) {
51
51
  }
52
52
  function targetRedactor(target, env) {
53
53
  const runner = target.settingsFile.values?.settings.runner;
54
- return redactor(declaredSecretValues(runner?.kind === "vercel-sandbox" ? runner.recipe : void 0, env));
54
+ return redactor(declaredSecretValues(runner?.kind === "vercel-sandbox" ? runner.options : void 0, env));
55
55
  }
56
56
  function preRunLine(target, extraCliArgs, redact) {
57
57
  const label = target.name === null ? "tests" : `suite ${target.name}`;
@@ -2,7 +2,7 @@ import {
2
2
  booleanOption,
3
3
  mustBe,
4
4
  nonEmptyString
5
- } from "./chunk-AWBSONHB.js";
5
+ } from "./chunk-XBDRVFEV.js";
6
6
 
7
7
  // src/extensions/testserver/options/channels.ts
8
8
  var BUILD_CHANNELS = ["stable", "latest_main"];
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  CONFIG_FILE_NAME
3
- } from "./chunk-L36GBUBB.js";
3
+ } from "./chunk-RNAS7JHE.js";
4
4
  import {
5
5
  defineErrors
6
- } from "./chunk-VL7WFTVQ.js";
6
+ } from "./chunk-4WAMTUWZ.js";
7
7
 
8
8
  // src/planning/suite-not-found.ts
9
9
  import { z } from "zod";
@@ -7,7 +7,7 @@ import {
7
7
  resolveColorDepth,
8
8
  resolveUnicode,
9
9
  runCliWith
10
- } from "./chunk-VL7WFTVQ.js";
10
+ } from "./chunk-4WAMTUWZ.js";
11
11
 
12
12
  // ../../../libs/clinkr/ts/dist/node/environment.js
13
13
  var AGENT_VARIABLES = [
@@ -2,21 +2,7 @@ import {
2
2
  isoSecondsText,
3
3
  paint,
4
4
  seconds
5
- } from "./chunk-OX7X4B2L.js";
6
-
7
- // src/shared/dashboard.ts
8
- function projectPage({ team, project }) {
9
- return `https://vercel.com/${encodeURIComponent(team)}/${encodeURIComponent(project)}`;
10
- }
11
- function sandboxPage(where, name) {
12
- return `${projectPage(where)}/sandboxes/${encodeURIComponent(name)}`;
13
- }
14
- function sandboxConnectPage(where, name) {
15
- return `${sandboxPage(where, name)}/connect`;
16
- }
17
- function snapshotPage(where, id) {
18
- return `${projectPage(where)}/sandboxes/snapshots/${encodeURIComponent(id)}`;
19
- }
5
+ } from "./chunk-GRT3UIBV.js";
20
6
 
21
7
  // src/shared/sandbox-table.ts
22
8
  var SANDBOX_TABLE_HEADER = [
@@ -92,9 +78,6 @@ function sandboxTableLines(records, style = paint(false)) {
92
78
  }
93
79
 
94
80
  export {
95
- sandboxPage,
96
- sandboxConnectPage,
97
- snapshotPage,
98
81
  SANDBOX_TABLE_HEADER,
99
82
  testTotalsText,
100
83
  sandboxStateText,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  defineExtensionCommands,
3
3
  testserverCommands
4
- } from "./chunk-5CCP36QQ.js";
4
+ } from "./chunk-2RNDPDTJ.js";
5
5
 
6
6
  // src/extensions/testserver/command-tree.ts
7
7
  var testserverExtensionCommands = defineExtensionCommands({
@@ -1,23 +1,147 @@
1
1
  import {
2
2
  muted
3
- } from "./chunk-TJNFVNKR.js";
3
+ } from "./chunk-LKTZ5OXS.js";
4
4
  import {
5
- sandboxPage,
6
- snapshotPage,
7
5
  testTotalsText
8
- } from "./chunk-QUHY6FGN.js";
9
- import {
10
- sandboxRecordSchema
11
- } from "./chunk-SZEURWRS.js";
6
+ } from "./chunk-CKGZA25H.js";
12
7
  import {
13
8
  isoSecondsText,
9
+ sandboxPage,
14
10
  seconds,
15
- short
16
- } from "./chunk-OX7X4B2L.js";
11
+ short,
12
+ snapshotPage
13
+ } from "./chunk-GRT3UIBV.js";
14
+ import {
15
+ sandboxRecordSchema
16
+ } from "./chunk-4O5C2XGJ.js";
17
17
  import {
18
18
  stripAnsi
19
19
  } from "./chunk-F6N34UWB.js";
20
20
 
21
+ // src/commands/runs/past-run.ts
22
+ var ALL_RUNS_WHY = ["flag", "no-config-file", "config-file-conflict"];
23
+ function runScope(all, found) {
24
+ if (all) return { kind: "all", why: "flag" };
25
+ switch (found.kind) {
26
+ case "none":
27
+ return { kind: "all", why: "no-config-file" };
28
+ case "conflict":
29
+ return { kind: "all", why: "config-file-conflict" };
30
+ case "found":
31
+ return { kind: "config", configFile: found.path };
32
+ }
33
+ }
34
+ function runsInScope(listed, scope) {
35
+ return scope.kind === "all" ? listed : listed.filter(({ record }) => record?.configFile === scope.configFile);
36
+ }
37
+ function onBranch(runs, branch) {
38
+ return branch === void 0 ? runs : runs.filter(({ record }) => record?.git?.branch === branch);
39
+ }
40
+ function newestFinished(runs) {
41
+ return runs.find((run) => !run.active && run.record?.ended !== void 0);
42
+ }
43
+ function newest(runs) {
44
+ return runs[0];
45
+ }
46
+ function finalResults(events) {
47
+ return events.flatMap((event) => event.kind === "test-result" ? [event] : []);
48
+ }
49
+ function sandboxDidNotPass(state, active) {
50
+ return state !== "passed" && !(active && state === "pending");
51
+ }
52
+ function ofSandbox(events, sandbox) {
53
+ return sandbox === void 0 ? events : events.filter((event) => event.sandbox === sandbox);
54
+ }
55
+ function testFiles(events) {
56
+ const files = /* @__PURE__ */ new Map();
57
+ for (const event of events) {
58
+ const sandbox = event.sandbox ?? null;
59
+ const key = `${sandbox ?? ""}\0${event.file}`;
60
+ let held = files.get(key);
61
+ if (held === void 0) {
62
+ held = { file: event.file, sandbox, tests: { passed: 0, failed: 0, skipped: 0 } };
63
+ files.set(key, held);
64
+ }
65
+ if (event.kind === "file-started") held.started = Math.min(held.started ?? event.at, event.at);
66
+ else if (event.kind === "file-finished") held.finished = Math.max(held.finished ?? event.at, event.at);
67
+ else if (event.kind === "test-result")
68
+ held.tests[event.state === "pass" ? "passed" : event.state === "fail" ? "failed" : "skipped"] += 1;
69
+ }
70
+ return [...files.values()].toSorted((a, b) => (a.sandbox ?? -1) - (b.sandbox ?? -1) || (a.file < b.file ? -1 : a.file > b.file ? 1 : 0)).map(({ file, sandbox, started, finished, tests }) => ({
71
+ file,
72
+ sandbox,
73
+ startedAt: started === void 0 ? null : new Date(started).toISOString(),
74
+ finishedAt: finished === void 0 ? null : new Date(finished).toISOString(),
75
+ ms: started === void 0 || finished === void 0 ? null : Math.max(0, finished - started),
76
+ tests: { ...tests }
77
+ }));
78
+ }
79
+ function testTimings(events) {
80
+ const bySandbox = /* @__PURE__ */ new Map();
81
+ for (const event of events) {
82
+ if (event.kind !== "test-started" && event.kind !== "test-attempt-finished") continue;
83
+ let timings = bySandbox.get(event.sandbox);
84
+ if (timings === void 0) {
85
+ timings = /* @__PURE__ */ new Map();
86
+ bySandbox.set(event.sandbox, timings);
87
+ }
88
+ const durationMs = timings.get(event.id)?.durationMs ?? null;
89
+ timings.set(event.id, {
90
+ durationMs: event.kind === "test-attempt-finished" ? (durationMs ?? 0) + event.ms : durationMs,
91
+ worker: event.worker
92
+ });
93
+ }
94
+ return bySandbox;
95
+ }
96
+ function totalAttemptMs(events) {
97
+ let sum = 0;
98
+ for (const event of events) {
99
+ if (event.kind === "test-attempt-finished") sum += event.ms;
100
+ }
101
+ return sum;
102
+ }
103
+ function parseWorkerFlag(raw) {
104
+ const match = /^w?(0|[1-9]\d*)$/i.exec(raw);
105
+ if (match === null) return void 0;
106
+ const parsed = Number(match[1]);
107
+ return Number.isSafeInteger(parsed) && parsed >= 0 ? parsed : void 0;
108
+ }
109
+ function sortBySlowest(tests) {
110
+ return [...tests].toSorted((a, b) => {
111
+ if (a.durationMs === null && b.durationMs === null) return 0;
112
+ if (a.durationMs === null) return 1;
113
+ if (b.durationMs === null) return -1;
114
+ return b.durationMs - a.durationMs;
115
+ });
116
+ }
117
+ function selected(result, filters, testWorker = null) {
118
+ if (filters.failed && result.state !== "fail") return false;
119
+ if (filters.test !== void 0 && !result.test.includes(filters.test) && !result.file.includes(filters.test))
120
+ return false;
121
+ if (filters.worker !== void 0 && testWorker !== filters.worker) return false;
122
+ return true;
123
+ }
124
+ function deduplicateTestErrors(errors) {
125
+ if (errors === void 0 || errors.length === 0) return [];
126
+ const collapsed = [];
127
+ const byKey = /* @__PURE__ */ new Map();
128
+ for (const error of errors) {
129
+ const name = stripAnsi(error.name);
130
+ const message = stripAnsi(error.message);
131
+ const stack = error.stack === void 0 ? null : stripAnsi(error.stack);
132
+ const diff = error.diff === void 0 ? null : stripAnsi(error.diff);
133
+ const key = `${name}\0${message}\0${stack ?? ""}\0${diff ?? ""}`;
134
+ const existing = byKey.get(key);
135
+ if (existing !== void 0) {
136
+ collapsed[existing].occurrences += 1;
137
+ continue;
138
+ }
139
+ byKey.set(key, collapsed.length);
140
+ collapsed.push({ name, message, stack, diff, occurrences: 1 });
141
+ }
142
+ return collapsed;
143
+ }
144
+
21
145
  // src/commands/runs/facts.ts
22
146
  import { z } from "zod";
23
147
  var LOG_STEPS = ["command", "install", "build", "apply", "snapshot"];
@@ -31,8 +155,8 @@ var scopeSchema = z.discriminatedUnion("kind", [
31
155
  z.object({
32
156
  /** Every run. */
33
157
  kind: z.literal("all"),
34
- /** `flag` for `--all`; `no-config-file` when no storm.config.ts was found from the working directory. */
35
- why: z.enum(["flag", "no-config-file"])
158
+ /** Why every run: one of `ALL_RUNS_WHY`. */
159
+ why: z.enum(ALL_RUNS_WHY)
36
160
  })
37
161
  ]);
38
162
  var runFactsSchema = z.object({
@@ -55,10 +179,10 @@ var runFactsSchema = z.object({
55
179
  z.object({ kind: z.literal("launch-machine") }),
56
180
  z.object({
57
181
  kind: z.literal("vercel-sandbox"),
58
- /** The control plane team the runner sandbox ran in. */
59
- team: z.string(),
60
- /** The control plane project the runner sandbox ran in. */
61
- project: z.string(),
182
+ /** The control plane team the runner sandbox ran in; null when unknown (for example, --credential vercel-oidc without --scope). */
183
+ team: z.string().nullable(),
184
+ /** The control plane project the runner sandbox ran in; null when unknown (for example, --credential vercel-oidc without --project). */
185
+ project: z.string().nullable(),
62
186
  /** The runner sandbox's region, such as iad1. */
63
187
  region: z.string(),
64
188
  /** The runner sandbox's runtime, such as node24. */
@@ -77,14 +201,16 @@ var runFactsSchema = z.object({
77
201
  keptUntil: z.string().nullable(),
78
202
  /** How many whole minutes are left until keptUntil, as of reading the run, 0 once it has passed; null when keptUntil is. */
79
203
  keptMinutesLeft: z.number().nullable(),
80
- /** The runner snapshot it started from: its id, the base it is of, which the run's changes went on top of, whether this run built it or reused it, and its page in the Vercel dashboard. Null until known. */
204
+ /** The runner snapshot it started from: its id, the base it is of, which the run's changes went on top of, whether this run built it or reused it, where a reused snapshot came from (`local` or `shared`), and its page in the Vercel dashboard. Null until known. */
81
205
  snapshot: z.object({
82
206
  id: z.string(),
83
207
  base: z.string(),
84
208
  built: z.boolean(),
85
209
  /** How many commits the run's HEAD had that its base, the commit it was built at, lacks; null when the run state had no count. */
86
210
  builtBehind: z.number().nullable(),
87
- url: z.string()
211
+ /** Where a reused snapshot came from (`local` or `shared`); null when this run built it or when unknown. */
212
+ source: z.enum(["local", "shared"]).nullable(),
213
+ url: z.string().nullable()
88
214
  }).nullable(),
89
215
  /** How many bytes of changes the run uploaded to the runner sandbox; null when the run stopped before the upload. */
90
216
  uploadBytes: z.number().nullable()
@@ -157,11 +283,16 @@ function runFacts(run, now) {
157
283
  function whereFacts(where, now) {
158
284
  if (where.kind === "launch-machine") return { kind: "launch-machine" };
159
285
  const { sandbox, snapshot, keptUntil } = where;
286
+ const project = where.team !== null && where.project !== null ? { team: where.team, project: where.project } : null;
160
287
  return {
161
288
  ...where,
162
289
  keptMinutesLeft: keptUntil === null ? null : Math.max(0, Math.floor((Date.parse(keptUntil) - now.getTime()) / 6e4)),
163
- sandboxUrl: sandbox === null ? null : sandboxPage(where, sandbox),
164
- snapshot: snapshot === null ? null : { ...snapshot, url: snapshotPage(where, snapshot.id) }
290
+ sandboxUrl: sandbox === null || project === null ? null : sandboxPage(project, sandbox),
291
+ snapshot: snapshot === null ? null : {
292
+ ...snapshot,
293
+ source: snapshot.source ?? null,
294
+ url: project === null ? null : snapshotPage(project, snapshot.id)
295
+ }
165
296
  };
166
297
  }
167
298
  function scopeFacts(scope) {
@@ -169,7 +300,14 @@ function scopeFacts(scope) {
169
300
  }
170
301
  function scopeText(scope) {
171
302
  if (scope.kind === "config") return scope.configFile;
172
- return scope.why === "flag" ? "every config (--all)" : "every config (no storm.config.ts found)";
303
+ switch (scope.why) {
304
+ case "flag":
305
+ return "every config (--all)";
306
+ case "no-config-file":
307
+ return "every config (no config file found)";
308
+ case "config-file-conflict":
309
+ return "every config (storm.config.ts and storm.config.mts in one directory)";
310
+ }
173
311
  }
174
312
  var runsUnreadable = {
175
313
  exitCode: 1,
@@ -273,124 +411,22 @@ function commandText(run) {
273
411
  return run.argv.map((arg) => /^[\w@%+=:,./-]+$/.test(arg) ? arg : `'${arg.replaceAll("'", `'\\''`)}'`).join(" ");
274
412
  }
275
413
 
276
- // src/commands/runs/past-run.ts
277
- function runScope(all, configFile) {
278
- if (all) return { kind: "all", why: "flag" };
279
- if (configFile === void 0) return { kind: "all", why: "no-config-file" };
280
- return { kind: "config", configFile };
281
- }
282
- function runsInScope(listed, scope) {
283
- return scope.kind === "all" ? listed : listed.filter(({ record }) => record?.configFile === scope.configFile);
284
- }
285
- function onBranch(runs, branch) {
286
- return branch === void 0 ? runs : runs.filter(({ record }) => record?.git?.branch === branch);
287
- }
288
- function newestFinished(runs) {
289
- return runs.find((run) => !run.active && run.record?.ended !== void 0);
290
- }
291
- function newest(runs) {
292
- return runs[0];
293
- }
294
- function finalResults(events) {
295
- return events.flatMap((event) => event.kind === "test-result" ? [event] : []);
296
- }
297
- function sandboxDidNotPass(state, active) {
298
- return state !== "passed" && !(active && state === "pending");
299
- }
300
- function ofSandbox(events, sandbox) {
301
- return sandbox === void 0 ? events : events.filter((event) => event.sandbox === sandbox);
302
- }
303
- function testFiles(events) {
304
- const files = /* @__PURE__ */ new Map();
305
- for (const event of events) {
306
- const sandbox = event.sandbox ?? null;
307
- const key = `${sandbox ?? ""}\0${event.file}`;
308
- let held = files.get(key);
309
- if (held === void 0) {
310
- held = { file: event.file, sandbox, tests: { passed: 0, failed: 0, skipped: 0 } };
311
- files.set(key, held);
312
- }
313
- if (event.kind === "file-started") held.started = Math.min(held.started ?? event.at, event.at);
314
- else if (event.kind === "file-finished") held.finished = Math.max(held.finished ?? event.at, event.at);
315
- else if (event.kind === "test-result")
316
- held.tests[event.state === "pass" ? "passed" : event.state === "fail" ? "failed" : "skipped"] += 1;
317
- }
318
- return [...files.values()].toSorted((a, b) => (a.sandbox ?? -1) - (b.sandbox ?? -1) || (a.file < b.file ? -1 : a.file > b.file ? 1 : 0)).map(({ file, sandbox, started, finished, tests }) => ({
319
- file,
320
- sandbox,
321
- startedAt: started === void 0 ? null : new Date(started).toISOString(),
322
- finishedAt: finished === void 0 ? null : new Date(finished).toISOString(),
323
- ms: started === void 0 || finished === void 0 ? null : Math.max(0, finished - started),
324
- tests: { ...tests }
325
- }));
326
- }
327
- function testTimings(events) {
328
- const bySandbox = /* @__PURE__ */ new Map();
329
- for (const event of events) {
330
- if (event.kind !== "test-started" && event.kind !== "test-attempt-finished") continue;
331
- let timings = bySandbox.get(event.sandbox);
332
- if (timings === void 0) {
333
- timings = /* @__PURE__ */ new Map();
334
- bySandbox.set(event.sandbox, timings);
335
- }
336
- const durationMs = timings.get(event.id)?.durationMs ?? null;
337
- timings.set(event.id, {
338
- durationMs: event.kind === "test-attempt-finished" ? (durationMs ?? 0) + event.ms : durationMs,
339
- worker: event.worker
340
- });
341
- }
342
- return bySandbox;
343
- }
344
- function totalAttemptMs(events) {
345
- let sum = 0;
346
- for (const event of events) {
347
- if (event.kind === "test-attempt-finished") sum += event.ms;
348
- }
349
- return sum;
350
- }
351
- function parseWorkerFlag(raw) {
352
- const match = /^w?(0|[1-9]\d*)$/i.exec(raw);
353
- if (match === null) return void 0;
354
- const parsed = Number(match[1]);
355
- return Number.isSafeInteger(parsed) && parsed >= 0 ? parsed : void 0;
356
- }
357
- function sortBySlowest(tests) {
358
- return [...tests].toSorted((a, b) => {
359
- if (a.durationMs === null && b.durationMs === null) return 0;
360
- if (a.durationMs === null) return 1;
361
- if (b.durationMs === null) return -1;
362
- return b.durationMs - a.durationMs;
363
- });
364
- }
365
- function selected(result, filters, testWorker = null) {
366
- if (filters.failed && result.state !== "fail") return false;
367
- if (filters.test !== void 0 && !result.test.includes(filters.test) && !result.file.includes(filters.test))
368
- return false;
369
- if (filters.worker !== void 0 && testWorker !== filters.worker) return false;
370
- return true;
371
- }
372
- function deduplicateTestErrors(errors) {
373
- if (errors === void 0 || errors.length === 0) return [];
374
- const collapsed = [];
375
- const byKey = /* @__PURE__ */ new Map();
376
- for (const error of errors) {
377
- const name = stripAnsi(error.name);
378
- const message = stripAnsi(error.message);
379
- const stack = error.stack === void 0 ? null : stripAnsi(error.stack);
380
- const diff = error.diff === void 0 ? null : stripAnsi(error.diff);
381
- const key = `${name}\0${message}\0${stack ?? ""}\0${diff ?? ""}`;
382
- const existing = byKey.get(key);
383
- if (existing !== void 0) {
384
- collapsed[existing].occurrences += 1;
385
- continue;
386
- }
387
- byKey.set(key, collapsed.length);
388
- collapsed.push({ name, message, stack, diff, occurrences: 1 });
389
- }
390
- return collapsed;
391
- }
392
-
393
414
  export {
415
+ runScope,
416
+ runsInScope,
417
+ onBranch,
418
+ newestFinished,
419
+ newest,
420
+ finalResults,
421
+ sandboxDidNotPass,
422
+ ofSandbox,
423
+ testFiles,
424
+ testTimings,
425
+ totalAttemptMs,
426
+ parseWorkerFlag,
427
+ sortBySlowest,
428
+ selected,
429
+ deduplicateTestErrors,
394
430
  LOG_STEPS,
395
431
  scopeSchema,
396
432
  runFactsSchema,
@@ -410,20 +446,5 @@ export {
410
446
  branchText,
411
447
  gitText,
412
448
  startedText,
413
- commandText,
414
- runScope,
415
- runsInScope,
416
- onBranch,
417
- newestFinished,
418
- newest,
419
- finalResults,
420
- sandboxDidNotPass,
421
- ofSandbox,
422
- testFiles,
423
- testTimings,
424
- totalAttemptMs,
425
- parseWorkerFlag,
426
- sortBySlowest,
427
- selected,
428
- deduplicateTestErrors
449
+ commandText
429
450
  };
@@ -22,13 +22,14 @@ import {
22
22
  testserverPoolRules,
23
23
  ttlMinutes,
24
24
  unavailablePoolStoreGateway
25
- } from "./chunk-CN4EFA5J.js";
25
+ } from "./chunk-72ZFEMAW.js";
26
26
  import {
27
27
  defineResource,
28
28
  describeCredentialFailure,
29
29
  optionKeyPath,
30
- tokenRequestFailureFacts
31
- } from "./chunk-AWBSONHB.js";
30
+ tokenRequestFailureFacts,
31
+ vercelOidcTokenFailureFacts
32
+ } from "./chunk-XBDRVFEV.js";
32
33
 
33
34
  // src/extensions/testserver/credential-facts.ts
34
35
  import { z } from "zod";
@@ -46,34 +47,54 @@ var credentialOriginSchema = z.discriminatedUnion("source", [
46
47
  source: z.literal("github-actions"),
47
48
  /** The token's aud and repository claims; null when they can't be read. */
48
49
  claims: z.object({ aud: z.string(), repository: z.string() }).nullable()
50
+ }),
51
+ z.object({
52
+ /** A pre-minted Vercel project OIDC token from VERCEL_OIDC_TOKEN. */
53
+ source: z.literal("vercel-oidc")
49
54
  })
50
55
  ]);
51
56
  var rejectedCredentialShape = {
52
57
  origin: credentialOriginSchema,
53
- /** The one fix: a trusted team and project for the mint, a Trusted Source rule for a GitHub Actions OIDC token. */
58
+ /** The one fix: a trusted team and project for the mint, a Trusted Source rule for a GitHub Actions OIDC token, or a trusted project's token for VERCEL_OIDC_TOKEN. */
54
59
  fix: z.string()
55
60
  };
56
61
  function rejectedCredentialFacts(origin) {
57
62
  return {
58
- origin: origin.source === "mint" ? { source: "mint", ...origin.target } : { source: "github-actions", claims: origin.claims === void 0 ? null : { ...origin.claims } },
63
+ origin: origin.source === "mint" ? { source: "mint", ...origin.target } : origin.source === "vercel-oidc" ? { source: "vercel-oidc" } : { source: "github-actions", claims: origin.claims === void 0 ? null : { ...origin.claims } },
59
64
  fix: rejectedCredentialFix(origin)
60
65
  };
61
66
  }
62
67
  function rejectedCredentialFix(origin) {
63
68
  if (origin.source === "mint")
64
69
  return "The Testserver control plane trusts development OIDC tokens only from projects in its Trusted Sources; vercel-internal mints for project vercel on team vercel. Use a trusted team and project, then retry.";
70
+ if (origin.source === "vercel-oidc")
71
+ return "The Testserver control plane trusts development OIDC tokens only from projects in its Trusted Sources. Set VERCEL_OIDC_TOKEN to a token from a trusted project, then retry.";
65
72
  const aud = origin.claims?.aud ?? "https://github.com/<owner>";
66
73
  const repository = origin.claims?.repository ?? "<owner>/<repo>";
67
74
  return `The Testserver control plane trusts GitHub Actions OIDC tokens only from repositories in its Trusted Sources. Ask the \`vercel/testserver\` owners for a Trusted Source rule matching \`aud: ${aud}\` and \`repository: ${repository}\`, then rerun the job.`;
68
75
  }
69
76
  function rejectedCredentialText(origin) {
70
- return origin.source === "mint" ? `the credential minted for project ${origin.project} on team ${origin.team}` : "the GitHub Actions OIDC token";
77
+ switch (origin.source) {
78
+ case "mint":
79
+ return `the credential minted for project ${origin.project} on team ${origin.team}`;
80
+ case "github-actions":
81
+ return "the GitHub Actions OIDC token";
82
+ case "vercel-oidc":
83
+ return "the Vercel OIDC token from VERCEL_OIDC_TOKEN";
84
+ }
71
85
  }
72
86
  function credentialOriginRows(origin) {
73
- return origin.source === "mint" ? [["Team", origin.team], ["Project", origin.project]] : [
74
- ["aud", origin.claims?.aud ?? "unreadable"],
75
- ["repository", origin.claims?.repository ?? "unreadable"]
76
- ];
87
+ switch (origin.source) {
88
+ case "mint":
89
+ return [["Team", origin.team], ["Project", origin.project]];
90
+ case "github-actions":
91
+ return [
92
+ ["aud", origin.claims?.aud ?? "unreadable"],
93
+ ["repository", origin.claims?.repository ?? "unreadable"]
94
+ ];
95
+ case "vercel-oidc":
96
+ return [["Credential", "VERCEL_OIDC_TOKEN"]];
97
+ }
77
98
  }
78
99
 
79
100
  // src/extensions/testserver/pr-build-facts.ts
@@ -443,7 +464,14 @@ function createWith(options, credential) {
443
464
  return { source: credential, ttlMinutes: ttlMinutes(options) };
444
465
  }
445
466
  function credentialFailed(failure, ttlMinutes2, failedCreates) {
446
- return failure.source === "mint" ? { kind: "mint-failed", failed: failure } : { kind: "token-request-failed", failure: failure.failure, ttlMinutes: ttlMinutes2, failedCreates };
467
+ switch (failure.source) {
468
+ case "mint":
469
+ return { kind: "mint-failed", failed: failure };
470
+ case "github-actions":
471
+ return { kind: "token-request-failed", failure: failure.failure, ttlMinutes: ttlMinutes2, failedCreates };
472
+ case "vercel-oidc":
473
+ return { kind: "vercel-oidc-token-failed", failure: failure.failure, ttlMinutes: ttlMinutes2, failedCreates };
474
+ }
447
475
  }
448
476
  function testserverCanceledFacts(options, facts) {
449
477
  return canceledAfter(facts, options.create ? ttlMinutes(options) : void 0);
@@ -675,6 +703,17 @@ function tokenRequestFailed(failure, data) {
675
703
  next: [{ type: "text", text: facts.fix }, ...mayExistSteps(mayExist, ttlMinutes2)]
676
704
  };
677
705
  }
706
+ function vercelOidcTokenFailed(failure, data) {
707
+ const facts = vercelOidcTokenFailureFacts(failure);
708
+ const { ttlMinutes: ttlMinutes2, failedCreates, sandboxMayExist: mayExist } = data;
709
+ return {
710
+ refused: "vercel_oidc_token_failed",
711
+ data: { ...facts, ...data },
712
+ message: `Couldn't use VERCEL_OIDC_TOKEN: ${facts.detail}. The pool had no usable Testserver sandbox, so the command didn't run.`,
713
+ rows: failedCreateRows(failedCreates),
714
+ next: [{ type: "text", text: facts.fix }, ...mayExistSteps(mayExist, ttlMinutes2)]
715
+ };
716
+ }
678
717
  function credentialRejected(credential, data) {
679
718
  const { origin, fix } = rejectedCredentialFacts(credential);
680
719
  const { status, vercelId, ttlMinutes: ttlMinutes2, failedCreates, unpooled, sandboxMayExist: mayExist } = data;
@@ -811,6 +850,9 @@ function testserverPoolResultWarnings(facts) {
811
850
  facts.uncreated.source === "mint" ? {
812
851
  reason: "mint_failed",
813
852
  message: `Couldn't create ${facts.uncreated.count} more Testserver sandboxes: couldn't mint a credential: ${facts.uncreated.cause}. ${facts.uncreated.fix}`
853
+ } : facts.uncreated.source === "vercel-oidc" ? {
854
+ reason: "vercel_oidc_token_failed",
855
+ message: `Couldn't create ${facts.uncreated.count} more Testserver sandboxes: couldn't use VERCEL_OIDC_TOKEN: ${facts.uncreated.cause}. ${facts.uncreated.fix}`
814
856
  } : {
815
857
  reason: "token_request_failed",
816
858
  message: `Couldn't create ${facts.uncreated.count} more Testserver sandboxes: couldn't request a GitHub Actions OIDC token: ${facts.uncreated.cause}. ${facts.uncreated.fix}`
@@ -941,6 +983,12 @@ function acquireRefusal(refusal) {
941
983
  failedCreates: failedCreateFacts(refusal.failedCreates),
942
984
  sandboxMayExist: refusal.failedCreates.some(mayLeaveSandbox)
943
985
  });
986
+ case "vercel-oidc-token-failed":
987
+ return vercelOidcTokenFailed(refusal.failure, {
988
+ ttlMinutes: refusal.ttlMinutes,
989
+ failedCreates: failedCreateFacts(refusal.failedCreates),
990
+ sandboxMayExist: refusal.failedCreates.some(mayLeaveSandbox)
991
+ });
944
992
  case "credential-rejected":
945
993
  return credentialRejected(refusal.origin, {
946
994
  status: refusal.failure.status,