@cnc-tools/storm 0.16.0 → 0.18.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 (290) hide show
  1. package/dist/bin/storm.js +54 -40
  2. package/dist/build-info.js +1 -1
  3. package/dist/chunks/{chunk-VL7WFTVQ.js → chunk-24UYAK4R.js} +465 -365
  4. package/dist/chunks/{chunk-DC2CDHNK.js → chunk-2JMWUKH3.js} +2074 -473
  5. package/dist/chunks/{chunk-FOZWA52V.js → chunk-3VXZONGE.js} +481 -376
  6. package/dist/chunks/{chunk-ZG3WQ4UF.js → chunk-55O4FCN4.js} +1 -1
  7. package/dist/chunks/{chunk-CN4EFA5J.js → chunk-72ZFEMAW.js} +1 -1
  8. package/dist/chunks/chunk-AS37D43E.js +2173 -0
  9. package/dist/chunks/chunk-CQAY6GLP.js +1260 -0
  10. package/dist/chunks/chunk-DZLU7BYK.js +340 -0
  11. package/dist/chunks/{chunk-R7XVBZOY.js → chunk-EEENLQHE.js} +59 -11
  12. package/dist/chunks/{chunk-TJNFVNKR.js → chunk-EI3XDCEI.js} +1 -1
  13. package/dist/chunks/{chunk-HVNK3I45.js → chunk-FDUY3BNF.js} +1 -1
  14. package/dist/chunks/{chunk-FCQUJDA4.js → chunk-GUCCYCIO.js} +4 -189
  15. package/dist/chunks/{chunk-OIY3DMF2.js → chunk-HBI4LEMH.js} +3 -3
  16. package/dist/chunks/{chunk-2MAD5NKK.js → chunk-K4MDQPLW.js} +1 -18
  17. package/dist/chunks/chunk-KK7PAWIZ.js +198 -0
  18. package/dist/chunks/{chunk-G3PHMXH5.js → chunk-KQ5FXRUD.js} +18 -1
  19. package/dist/chunks/{chunk-5VXBKPW6.js → chunk-LKXHGGGX.js} +1 -1
  20. package/dist/chunks/{chunk-P357TZAY.js → chunk-LOGHIUUB.js} +21 -18
  21. package/dist/chunks/{chunk-CK2GZEPK.js → chunk-OEPFINFT.js} +2 -2
  22. package/dist/chunks/{chunk-DWEAHX4T.js → chunk-OI4AP6Z7.js} +5 -5
  23. package/dist/chunks/{chunk-V4IKA3WI.js → chunk-PMBQWVTW.js} +26 -19
  24. package/dist/chunks/chunk-SZMYIIG2.js +88 -0
  25. package/dist/chunks/{chunk-5CCP36QQ.js → chunk-TXCOFC7N.js} +1 -1
  26. package/dist/chunks/{chunk-VUPZH7J2.js → chunk-UXD3TVWM.js} +1 -1
  27. package/dist/chunks/{chunk-3L52KNQA.js → chunk-WNW2QXQK.js} +8 -8
  28. package/dist/chunks/{chunk-AWBSONHB.js → chunk-XBDRVFEV.js} +55 -16
  29. package/dist/chunks/{live-app-WECQOQ4C.js → live-app-UY7BEDUN.js} +17 -13
  30. package/dist/cli.d.ts +28 -0
  31. package/dist/cli.js +64 -0
  32. package/dist/commands/exec/across-sandboxes-outcomes.d.ts +2 -2
  33. package/dist/commands/exec/across-sandboxes-outcomes.js +3 -3
  34. package/dist/commands/exec/before-run.d.ts +123 -0
  35. package/dist/commands/exec/before-run.js +105 -0
  36. package/dist/commands/exec/command.d.ts +67 -14
  37. package/dist/commands/exec/command.js +31 -95
  38. package/dist/commands/exec/driver-plan.d.ts +9 -4
  39. package/dist/commands/exec/driver-plan.js +8 -8
  40. package/dist/commands/exec/exec-words.js +1 -1
  41. package/dist/commands/exec/execute-run.d.ts +39 -0
  42. package/dist/commands/exec/execute-run.js +325 -0
  43. package/dist/commands/exec/live-view.d.ts +3 -3
  44. package/dist/commands/exec/live-view.js +16 -15
  45. package/dist/commands/exec/metadata.js +1 -1
  46. package/dist/commands/exec/mint-failed.d.ts +38 -0
  47. package/dist/commands/exec/mint-failed.js +27 -4
  48. package/dist/commands/exec/outcomes.d.ts +104 -22
  49. package/dist/commands/exec/outcomes.js +73 -26
  50. package/dist/commands/exec/plan-run.d.ts +58 -150
  51. package/dist/commands/exec/plan-run.js +239 -90
  52. package/dist/commands/exec/progress.d.ts +10 -6
  53. package/dist/commands/exec/progress.js +38 -25
  54. package/dist/commands/exec/run-bin.d.ts +11 -11
  55. package/dist/commands/exec/run-bin.js +9 -9
  56. package/dist/commands/exec/run-flags.d.ts +69 -0
  57. package/dist/commands/exec/run-flags.js +58 -0
  58. package/dist/commands/exec/run-metadata.js +4 -4
  59. package/dist/commands/exec/run-summary.d.ts +58 -0
  60. package/dist/commands/exec/run-summary.js +205 -0
  61. package/dist/commands/exec/runner-refusals.d.ts +82 -0
  62. package/dist/commands/exec/runner-refusals.js +71 -0
  63. package/dist/commands/exec/sandbox-progress.js +3 -0
  64. package/dist/commands/exec/stopped-outcome.d.ts +12 -0
  65. package/dist/commands/exec/stopped-outcome.js +77 -0
  66. package/dist/commands/exec/view.d.ts +20 -11
  67. package/dist/commands/exec/view.js +103 -47
  68. package/dist/commands/runs/facts.d.ts +8 -4
  69. package/dist/commands/runs/facts.js +19 -10
  70. package/dist/commands/runs/list/command.d.ts +16 -8
  71. package/dist/commands/runs/list/command.js +10 -10
  72. package/dist/commands/runs/list/outcomes.d.ts +8 -4
  73. package/dist/commands/runs/logs/command.js +10 -10
  74. package/dist/commands/runs/show/command.d.ts +16 -8
  75. package/dist/commands/runs/show/command.js +31 -29
  76. package/dist/commands/runs/show/metadata.js +1 -1
  77. package/dist/commands/runs/show/outcomes.d.ts +8 -4
  78. package/dist/commands/runs/show/outcomes.js +8 -6
  79. package/dist/commands/snapshots/access.d.ts +111 -0
  80. package/dist/commands/snapshots/access.js +96 -0
  81. package/dist/commands/snapshots/build/command.d.ts +376 -101
  82. package/dist/commands/snapshots/build/command.js +447 -149
  83. package/dist/commands/snapshots/build/metadata.d.ts +10 -0
  84. package/dist/commands/snapshots/build/metadata.js +31 -11
  85. package/dist/commands/snapshots/build/outcomes.d.ts +242 -47
  86. package/dist/commands/snapshots/build/outcomes.js +200 -36
  87. package/dist/commands/snapshots/list/command.d.ts +368 -27
  88. package/dist/commands/snapshots/list/command.js +298 -68
  89. package/dist/commands/snapshots/list/metadata.d.ts +16 -0
  90. package/dist/commands/snapshots/list/metadata.js +29 -6
  91. package/dist/commands/snapshots/list/outcomes.d.ts +247 -15
  92. package/dist/commands/snapshots/list/outcomes.js +223 -52
  93. package/dist/commands/snapshots/metadata.js +1 -1
  94. package/dist/commands/snapshots/prune/command.d.ts +430 -0
  95. package/dist/commands/snapshots/prune/command.js +161 -0
  96. package/dist/commands/snapshots/prune/metadata.d.ts +28 -0
  97. package/dist/commands/snapshots/prune/metadata.js +39 -0
  98. package/dist/commands/snapshots/prune/outcomes.d.ts +208 -0
  99. package/dist/commands/snapshots/prune/outcomes.js +78 -0
  100. package/dist/commands/suites/list/command.js +17 -17
  101. package/dist/commands/suites/list/outcomes.js +2 -2
  102. package/dist/commands/test/command.d.ts +67 -14
  103. package/dist/commands/test/command.js +49 -252
  104. package/dist/commands/test/outcomes.d.ts +33 -7
  105. package/dist/config/check-runner.d.ts +3 -3
  106. package/dist/config/check-runner.js +8 -7
  107. package/dist/config/credential-resolver.d.ts +50 -5
  108. package/dist/config/credential-resolver.js +51 -19
  109. package/dist/config/credential-settle.d.ts +6 -2
  110. package/dist/config/credential-settle.js +11 -5
  111. package/dist/config/index.d.ts +2 -2
  112. package/dist/config/index.js +1 -1
  113. package/dist/config/runner.d.ts +5 -5
  114. package/dist/config/runner.js +1 -1
  115. package/dist/config/schema.d.ts +2 -2
  116. package/dist/config/schema.js +1 -1
  117. package/dist/config-file/define.d.ts +1 -1
  118. package/dist/config-file/define.js +1 -1
  119. package/dist/config-file/runner.d.ts +5 -5
  120. package/dist/config-file/toolchain.d.ts +14 -4
  121. package/dist/config-file/toolchain.js +43 -7
  122. package/dist/context.d.ts +10 -6
  123. package/dist/context.js +8 -6
  124. package/dist/core/across-sandboxes.d.ts +7 -6
  125. package/dist/core/across-sandboxes.js +123 -152
  126. package/dist/core/coordinator.d.ts +166 -0
  127. package/dist/core/coordinator.js +233 -0
  128. package/dist/core/events.d.ts +2 -2
  129. package/dist/core/index.d.ts +4 -2
  130. package/dist/core/index.js +1 -1
  131. package/dist/core/outcomes.d.ts +148 -0
  132. package/dist/core/{sandbox-end.js → outcomes.js} +28 -4
  133. package/dist/core/resources.d.ts +31 -53
  134. package/dist/core/resources.js +32 -70
  135. package/dist/core/run-state.d.ts +7 -1
  136. package/dist/core/run-state.js +2 -0
  137. package/dist/core/run.d.ts +32 -236
  138. package/dist/core/run.js +107 -267
  139. package/dist/core/state-directory.d.ts +1 -1
  140. package/dist/core/state-directory.js +2 -2
  141. package/dist/credential/gateways.d.ts +15 -1
  142. package/dist/credential/index.d.ts +4 -3
  143. package/dist/credential/index.js +3 -2
  144. package/dist/credential/live/vercel-cli-gateway.d.ts +1 -1
  145. package/dist/credential/live/vercel-cli-gateway.js +1 -1
  146. package/dist/credential/live/vercel-oidc-token-gateway.d.ts +11 -0
  147. package/dist/credential/live/vercel-oidc-token-gateway.js +16 -0
  148. package/dist/credential/source.d.ts +73 -6
  149. package/dist/credential/source.js +55 -2
  150. package/dist/extension-commands.d.ts +1 -1
  151. package/dist/extension-commands.js +2 -2
  152. package/dist/extensions/testserver/commands/pool/create/command.d.ts +35 -2
  153. package/dist/extensions/testserver/commands/pool/create/command.js +7 -7
  154. package/dist/extensions/testserver/commands/pool/create/metadata.js +5 -5
  155. package/dist/extensions/testserver/commands/pool/create/outcomes.d.ts +17 -1
  156. package/dist/extensions/testserver/commands/pool/list/command.js +4 -4
  157. package/dist/extensions/testserver/credential-facts.d.ts +6 -2
  158. package/dist/extensions/testserver/credential-facts.js +29 -11
  159. package/dist/extensions/testserver/lifecycle.js +7 -1
  160. package/dist/extensions/testserver/limit.d.ts +3 -0
  161. package/dist/extensions/testserver/limit.js +3 -0
  162. package/dist/extensions/testserver/provision.d.ts +8 -1
  163. package/dist/extensions/testserver/provision.js +8 -3
  164. package/dist/extensions/testserver/refusals.d.ts +6 -1
  165. package/dist/extensions/testserver/refusals.js +16 -1
  166. package/dist/extensions/testserver/resource.d.ts +1 -1
  167. package/dist/extensions/testserver/resource.js +1 -1
  168. package/dist/extensions/testserver/result.d.ts +1 -1
  169. package/dist/extensions/testserver/result.js +9 -4
  170. package/dist/planning/driver-file-lists.d.ts +0 -15
  171. package/dist/planning/driver-file-lists.js +2 -21
  172. package/dist/planning/plan-only.d.ts +3 -14
  173. package/dist/planning/plan-only.js +11 -20
  174. package/dist/planning/run-kind-flags.js +2 -2
  175. package/dist/planning/run-plan.d.ts +45 -12
  176. package/dist/planning/run-plan.js +4 -3
  177. package/dist/planning/suites.d.ts +1 -1
  178. package/dist/planning/suites.js +2 -2
  179. package/dist/planning/test-plan.d.ts +9 -0
  180. package/dist/planning/test-plan.js +9 -0
  181. package/dist/run-directory/recording.js +3 -3
  182. package/dist/run-directory/run-record.d.ts +26 -11
  183. package/dist/run-directory/run-record.js +16 -13
  184. package/dist/runner/base.js +1 -1
  185. package/dist/runner/build-snapshots.d.ts +60 -29
  186. package/dist/runner/build-snapshots.js +136 -29
  187. package/dist/runner/context.d.ts +15 -7
  188. package/dist/runner/context.js +19 -6
  189. package/dist/runner/events.d.ts +16 -10
  190. package/dist/runner/gateways.d.ts +122 -23
  191. package/dist/runner/gateways.js +1 -1
  192. package/dist/runner/gh.d.ts +42 -0
  193. package/dist/runner/gh.js +58 -0
  194. package/dist/runner/index.d.ts +13 -8
  195. package/dist/runner/index.js +12 -6
  196. package/dist/runner/live/checkout-gateway.js +7 -0
  197. package/dist/runner/live/gh-output.d.ts +17 -0
  198. package/dist/runner/live/gh-output.js +37 -0
  199. package/dist/runner/live/gh-token-gateway.d.ts +13 -0
  200. package/dist/runner/live/gh-token-gateway.js +51 -0
  201. package/dist/runner/live/sandbox-errors.d.ts +2 -0
  202. package/dist/runner/live/sandbox-errors.js +4 -0
  203. package/dist/runner/live/sandbox-gateway.js +140 -4
  204. package/dist/runner/live/snapshot-index-gateway.d.ts +12 -0
  205. package/dist/runner/live/{snapshot-cache-gateway.js → snapshot-index-gateway.js} +11 -11
  206. package/dist/runner/live/snapshot-records.js +12 -12
  207. package/dist/runner/local-snapshot-index.d.ts +205 -0
  208. package/dist/runner/local-snapshot-index.js +210 -0
  209. package/dist/runner/network-policy.d.ts +6 -6
  210. package/dist/runner/network-policy.js +7 -7
  211. package/dist/runner/policy-writes.d.ts +1 -1
  212. package/dist/runner/policy-writes.js +1 -1
  213. package/dist/runner/prepare.d.ts +14 -14
  214. package/dist/runner/prepare.js +20 -11
  215. package/dist/runner/ready.d.ts +19 -11
  216. package/dist/runner/ready.js +104 -33
  217. package/dist/runner/sandboxed-command.d.ts +3 -3
  218. package/dist/runner/sandboxed-command.js +3 -3
  219. package/dist/runner/scope.d.ts +15 -8
  220. package/dist/runner/scope.js +16 -5
  221. package/dist/runner/secrets.d.ts +41 -18
  222. package/dist/runner/secrets.js +226 -30
  223. package/dist/runner/session.d.ts +8 -8
  224. package/dist/runner/session.js +6 -3
  225. package/dist/runner/shared-snapshot-entry.d.ts +92 -0
  226. package/dist/runner/shared-snapshot-entry.js +168 -0
  227. package/dist/runner/shared-snapshot-list.d.ts +81 -0
  228. package/dist/runner/shared-snapshot-list.js +155 -0
  229. package/dist/runner/shared-snapshot-lookup.d.ts +51 -0
  230. package/dist/runner/shared-snapshot-lookup.js +118 -0
  231. package/dist/runner/shared-snapshot-prune.d.ts +58 -0
  232. package/dist/runner/shared-snapshot-prune.js +133 -0
  233. package/dist/runner/snapshot-build.d.ts +42 -14
  234. package/dist/runner/snapshot-build.js +79 -47
  235. package/dist/runner/snapshot-choice.js +2 -1
  236. package/dist/runner/snapshot-inspect.d.ts +39 -40
  237. package/dist/runner/snapshot-inspect.js +52 -35
  238. package/dist/runner/snapshot-key.d.ts +32 -17
  239. package/dist/runner/snapshot-key.js +43 -18
  240. package/dist/runner/snapshot-source.d.ts +31 -0
  241. package/dist/runner/snapshot-source.js +122 -0
  242. package/dist/runner/steps.d.ts +1 -1
  243. package/dist/runner/steps.js +1 -1
  244. package/dist/runner/{recipe-check.d.ts → vercel-sandbox-check.d.ts} +4 -2
  245. package/dist/runner/{recipe-check.js → vercel-sandbox-check.js} +7 -2
  246. package/dist/runner/{recipe.d.ts → vercel-sandbox-options.d.ts} +59 -28
  247. package/dist/runner/{recipe.js → vercel-sandbox-options.js} +128 -84
  248. package/dist/runner/vercel-sandbox-secrets.d.ts +116 -0
  249. package/dist/runner/{recipe-secrets.js → vercel-sandbox-secrets.js} +159 -26
  250. package/dist/sdk/extension/credential-diagnosis.d.ts +3 -1
  251. package/dist/sdk/extension/credential-diagnosis.js +25 -5
  252. package/dist/sdk/extension/credential-source.d.ts +20 -3
  253. package/dist/sdk/extension/credential-source.js +4 -4
  254. package/dist/sdk/extension/index.d.ts +3 -2
  255. package/dist/sdk/extension/index.js +2 -1
  256. package/dist/sdk/extension/resource-definition.d.ts +1 -1
  257. package/dist/sdk/extension/secret-source.d.ts +1 -1
  258. package/dist/sdk/extension/secret-source.js +1 -1
  259. package/dist/sdk/extension/vercel-oidc-facts.d.ts +20 -0
  260. package/dist/sdk/extension/vercel-oidc-facts.js +20 -0
  261. package/dist/shared/cleanup.d.ts +3 -3
  262. package/dist/shared/cleanup.js +15 -5
  263. package/dist/shared/snapshot-text.d.ts +4 -4
  264. package/dist/shared/snapshot-text.js +11 -11
  265. package/dist/time/duration.js +1 -1
  266. package/package.json +5 -3
  267. package/skills/overview.md +4 -4
  268. package/skills/plan-runs.md +1 -1
  269. package/skills/read-run-output.md +6 -6
  270. package/dist/application.d.ts +0 -21
  271. package/dist/application.js +0 -30
  272. package/dist/chunks/chunk-7EENF73W.js +0 -782
  273. package/dist/chunks/chunk-Z5PBVG3Y.js +0 -2599
  274. package/dist/commands/exec/across-sandboxes-run.d.ts +0 -180
  275. package/dist/commands/exec/across-sandboxes-run.js +0 -339
  276. package/dist/commands/exec/plan-only.d.ts +0 -10
  277. package/dist/commands/exec/plan-only.js +0 -45
  278. package/dist/commands/exec/run-command.d.ts +0 -475
  279. package/dist/commands/exec/run-command.js +0 -603
  280. package/dist/commands/exec/run-planned.d.ts +0 -20
  281. package/dist/commands/exec/run-planned.js +0 -22
  282. package/dist/commands/exec/sandbox-view.d.ts +0 -19
  283. package/dist/commands/exec/sandbox-view.js +0 -72
  284. package/dist/commands/test/plan.d.ts +0 -92
  285. package/dist/commands/test/plan.js +0 -125
  286. package/dist/core/sandbox-end.d.ts +0 -64
  287. package/dist/runner/live/snapshot-cache-gateway.d.ts +0 -12
  288. package/dist/runner/recipe-secrets.d.ts +0 -67
  289. package/dist/runner/snapshot-cache.d.ts +0 -148
  290. package/dist/runner/snapshot-cache.js +0 -126
@@ -3,84 +3,74 @@ import {
3
3
  resolveProjectTests,
4
4
  resolveSuite,
5
5
  targetRedactor
6
- } from "../../chunks/chunk-OIY3DMF2.js";
6
+ } from "../../chunks/chunk-HBI4LEMH.js";
7
7
  import {
8
8
  suiteNamesText,
9
9
  suiteNotFoundErrors
10
- } from "../../chunks/chunk-CK2GZEPK.js";
10
+ } from "../../chunks/chunk-OEPFINFT.js";
11
11
  import {
12
12
  DRIVER_FILE_LISTS_HELP,
13
13
  DRIVER_SANDBOXES_HELP,
14
- SANDBOXES_DEFAULT_KEY,
15
- planAskedSandboxesRun,
16
- planDefaultSandboxesRun,
14
+ RUN_CLI_OPTIONS,
15
+ RUN_REQUEST_FIELDS,
16
+ driverSandboxesProblem,
17
+ executePlannedRun,
18
+ planRun,
19
+ runFlagProblems,
17
20
  runHelp,
18
- runPlanned
19
- } from "../../chunks/chunk-7EENF73W.js";
21
+ sandboxesFlagProblems
22
+ } from "../../chunks/chunk-AS37D43E.js";
23
+ import "../../chunks/chunk-GUCCYCIO.js";
24
+ import "../../chunks/chunk-DZLU7BYK.js";
25
+ import "../../chunks/chunk-I5GZLOLQ.js";
20
26
  import {
21
27
  PLANNED_DESCRIPTION,
22
28
  RAN_DESCRIPTION,
23
- RUN_CLI_OPTIONS,
24
29
  RUN_ERRORS,
25
- RUN_REQUEST_FIELDS,
26
30
  SANDBOXES_RAN_DESCRIPTION,
27
- canceledBeforeStart,
28
- checkoutFailedRefusal,
29
31
  fileListErrors,
30
- planCommandRun,
31
32
  plannedSchema,
32
33
  ranSchema,
33
- readFileListsFile,
34
34
  renderPlanned,
35
35
  renderRan,
36
36
  renderSandboxesRan,
37
- resolveCallerFileLists,
38
- runFlagProblems,
39
37
  sandboxesDefaultErrors,
40
38
  sandboxesErrors,
41
- sandboxesFlagProblems,
42
39
  sandboxesRanSchema
43
- } from "../../chunks/chunk-Z5PBVG3Y.js";
44
- import "../../chunks/chunk-I5GZLOLQ.js";
45
- import {
46
- dealFileLists,
47
- recordedPlan
48
- } from "../../chunks/chunk-FCQUJDA4.js";
40
+ } from "../../chunks/chunk-CQAY6GLP.js";
41
+ import "../../chunks/chunk-FDUY3BNF.js";
42
+ import "../../chunks/chunk-WNW2QXQK.js";
43
+ import "../../chunks/chunk-KK7PAWIZ.js";
49
44
  import {
50
45
  DRIVER_NAMES,
51
46
  driverNamed
52
- } from "../../chunks/chunk-DWEAHX4T.js";
53
- import "../../chunks/chunk-R7XVBZOY.js";
54
- import "../../chunks/chunk-CN4EFA5J.js";
55
- import "../../chunks/chunk-HVNK3I45.js";
56
- import "../../chunks/chunk-3L52KNQA.js";
57
- import "../../chunks/chunk-VUPZH7J2.js";
58
- import "../../chunks/chunk-ZG3WQ4UF.js";
59
- import "../../chunks/chunk-5CCP36QQ.js";
60
- import "../../chunks/chunk-2MAD5NKK.js";
47
+ } from "../../chunks/chunk-OI4AP6Z7.js";
48
+ import "../../chunks/chunk-EEENLQHE.js";
49
+ import "../../chunks/chunk-72ZFEMAW.js";
50
+ import "../../chunks/chunk-UXD3TVWM.js";
51
+ import "../../chunks/chunk-55O4FCN4.js";
52
+ import "../../chunks/chunk-TXCOFC7N.js";
53
+ import "../../chunks/chunk-K4MDQPLW.js";
54
+ import "../../chunks/chunk-KQ5FXRUD.js";
61
55
  import {
62
56
  planSchema
63
- } from "../../chunks/chunk-P357TZAY.js";
64
- import "../../chunks/chunk-G3PHMXH5.js";
57
+ } from "../../chunks/chunk-LOGHIUUB.js";
65
58
  import "../../chunks/chunk-F6N34UWB.js";
66
- import "../../chunks/chunk-FOZWA52V.js";
59
+ import "../../chunks/chunk-3VXZONGE.js";
67
60
  import {
68
61
  CONFIG_FILE_NAME,
69
- CONFIG_FILE_NAMES_TEXT,
70
- resolveSandboxCountDefault
71
- } from "../../chunks/chunk-DC2CDHNK.js";
62
+ CONFIG_FILE_NAMES_TEXT
63
+ } from "../../chunks/chunk-2JMWUKH3.js";
72
64
  import {
73
- DRIVER_PLAN_FAILURE_KINDS,
74
- NOT_COUNTED
75
- } from "../../chunks/chunk-AWBSONHB.js";
65
+ DRIVER_PLAN_FAILURE_KINDS
66
+ } from "../../chunks/chunk-XBDRVFEV.js";
76
67
  import {
77
68
  stormCommands
78
- } from "../../chunks/chunk-5VXBKPW6.js";
69
+ } from "../../chunks/chunk-LKXHGGGX.js";
79
70
  import {
80
71
  defineErrors,
81
- defineOutcomes,
82
- refused
83
- } from "../../chunks/chunk-VL7WFTVQ.js";
72
+ defineOutcomes
73
+ } from "../../chunks/chunk-24UYAK4R.js";
84
74
 
85
75
  // src/commands/test/command.ts
86
76
  import { z as z3 } from "zod";
@@ -257,198 +247,6 @@ var outcomes = defineOutcomes({
257
247
  }
258
248
  });
259
249
 
260
- // src/planning/driver-file-lists.ts
261
- function driverSandboxesRun(run) {
262
- const asked = run.asked.from === "flag" ? run.asked.count : Math.min(run.asked.default, run.max);
263
- const lists = dealFileLists(run.testFiles, asked);
264
- return {
265
- count: {
266
- count: lists.length,
267
- from: run.asked.from,
268
- max: run.max,
269
- ...run.asked.from === "default" ? { default: run.asked.default } : {},
270
- ...lists.length < asked ? { requested: asked } : {}
271
- },
272
- sandboxes: lists.map((files) => ({ argv: run.argv, files }))
273
- };
274
- }
275
- function driverCallerFileListsRun(run) {
276
- const resolved = resolveCallerFileLists(run.testFiles, run.lists);
277
- if (!resolved.ok) return resolved;
278
- return {
279
- ok: true,
280
- sandboxes: {
281
- count: {
282
- count: resolved.lists.length,
283
- from: "file-lists",
284
- max: run.max,
285
- ...resolved.leftOut > 0 ? { leftOut: resolved.leftOut } : {}
286
- },
287
- sandboxes: resolved.lists.map((files) => ({ argv: run.argv, files }))
288
- }
289
- };
290
- }
291
-
292
- // src/commands/exec/run-bin.ts
293
- import { join } from "node:path";
294
- async function findRunBin(app, name, where) {
295
- if (where.kind === "unsandboxed") {
296
- const cwd2 = app.cwd;
297
- const found2 = await app.packageBins.find(name, cwd2);
298
- return found2.ok ? { kind: "found", cwd: cwd2, counts: found2.path, runs: found2.path } : { kind: "not-found", cwd: cwd2, searched: found2.searched };
299
- }
300
- const root = await app.context.checkout.repositoryRoot({ cwd: app.cwd });
301
- if (!root.ok) return { kind: "checkout-failed", failure: root.failure };
302
- const cwd = join(root.value, where.recipe.cwd);
303
- const found = await app.context.packageBins.find({ name, from: cwd, root: root.value });
304
- return found.ok ? { kind: "found", cwd, counts: found.path, runs: name } : { kind: "not-found", cwd, searched: found.searched };
305
- }
306
-
307
- // src/commands/exec/driver-plan.ts
308
- function driverCount(driver, testPlan, countTests) {
309
- if (!testPlan && !countTests) return void 0;
310
- return { countTests: driver.countsFilesOnly !== true || countTests };
311
- }
312
- async function planDriverCommand(app, driver, errors, args, count, where, signal) {
313
- const { bin: name } = driver.program;
314
- if (count === void 0 && where.kind === "runner")
315
- return { ok: true, argv: driver.launch(name, args), testPlan: NOT_COUNTED.testPlan };
316
- const bin = await findRunBin(app, name, where);
317
- if (bin.kind === "checkout-failed") return refused(checkoutFailedRefusal(bin.failure));
318
- const planned = { args, cwd: bin.cwd };
319
- if (bin.kind === "not-found")
320
- return refused(
321
- errors.planFailed(
322
- driver.name,
323
- { kind: "start-failed", message: `found no ${name} in node_modules/.bin of ${bin.searched.join(", ")}` },
324
- planned
325
- )
326
- );
327
- if (count === void 0) return { ok: true, argv: driver.launch(bin.runs, args), testPlan: NOT_COUNTED.testPlan };
328
- const contexts = app.driverContexts;
329
- const answer = await driver.plan(contexts[driver.name])({
330
- ...planned,
331
- bin: bin.counts,
332
- countTests: count.countTests,
333
- signal
334
- });
335
- if (!answer.ok) {
336
- const { kind, message } = answer;
337
- if (kind === "canceled") return refused(canceledBeforeStart());
338
- return refused(errors.planFailed(driver.name, { kind, message }, planned));
339
- }
340
- const { tests, files } = answer.plan;
341
- if ((tests ?? files) === 0) return refused(errors.noMatchingTests(driver.name, planned));
342
- return {
343
- ok: true,
344
- argv: driver.launch(bin.runs, args),
345
- testPlan: { kind: "counted", ...tests === void 0 ? {} : { tests }, files },
346
- ...answer.testFiles === void 0 ? {} : { testFiles: answer.testFiles }
347
- };
348
- }
349
-
350
- // src/commands/test/plan.ts
351
- function driverSandboxesProblem(driver, args, asks) {
352
- const flag = asks.fileLists !== void 0 ? "--file-lists" : asks.sandboxes !== void 0 ? "--sandboxes" : void 0;
353
- if (flag === void 0) return void 0;
354
- if (driver.fileLists === void 0)
355
- return {
356
- kind: "unsupported",
357
- flag,
358
- problem: `The ${driver.name} driver has no file list support, so storm test can't run it across runner sandboxes.`
359
- };
360
- const checked = driver.fileLists.validate(args);
361
- return checked.ok ? void 0 : { kind: "args", flag, problem: checked.problem };
362
- }
363
- function testSandboxesProblems(request) {
364
- const { sandboxes } = request;
365
- return sandboxes === void 0 || Number.isInteger(sandboxes) && sandboxes >= 1 ? [] : [{ field: "sandboxes", message: `--sandboxes takes a whole number from 1, not ${sandboxes}.` }];
366
- }
367
- async function planTestRun({ app, signal }, driver, errors, args, request, asks) {
368
- const { countTests, sandboxes, fileLists: listsPath } = asks;
369
- const planDriverSandboxes = (make) => async (plan, planSignal) => {
370
- const planned = await planDriverCommand(
371
- app,
372
- driver,
373
- errors,
374
- args,
375
- { countTests: driver.countsFilesOnly !== true || countTests },
376
- plan.where,
377
- planSignal
378
- );
379
- if (!planned.ok) return planned;
380
- const { argv, testPlan, testFiles } = planned;
381
- if (testFiles === void 0)
382
- throw new Error(
383
- `planTestRun: driver ${driver.name} has file list support, and its plan step answered no test files`
384
- );
385
- const made = make({ argv, testFiles, testPlan }, plan);
386
- if (!made.ok) return made;
387
- return { ok: true, argv, testPlan, testFiles, sandboxes: made.sandboxes };
388
- };
389
- let lists;
390
- if (listsPath !== void 0) {
391
- const read = await readFileListsFile(app.context.fileListsFiles, { path: listsPath, cwd: app.cwd, sandboxes });
392
- if (!read.ok)
393
- return refused(
394
- read.kind === "unreadable" ? fileListErrors.fileListsUnreadable({ path: read.path, problem: read.problem, message: read.message }) : fileListErrors.invalidFileLists({
395
- path: read.path,
396
- problems: read.problems.map(
397
- (problem) => problem.kind === "in-two-lists" ? { ...problem, sandboxes: [...problem.sandboxes] } : { ...problem }
398
- )
399
- })
400
- );
401
- lists = read.lists;
402
- }
403
- const asked = lists !== void 0 ? { count: lists.lists.length, flag: "--file-lists" } : sandboxes === void 0 ? void 0 : { count: sandboxes, flag: "--sandboxes" };
404
- if (asked !== void 0) {
405
- const planSandboxes = planDriverSandboxes(
406
- ({ argv, testFiles }, { max }) => {
407
- if (lists === void 0)
408
- return {
409
- ok: true,
410
- sandboxes: driverSandboxesRun({ argv, testFiles, asked: { from: "flag", count: asked.count }, max })
411
- };
412
- const resolved = driverCallerFileListsRun({ argv, testFiles, lists, max });
413
- return resolved.ok ? resolved : refused(
414
- fileListErrors.fileListsUnlisted({
415
- path: lists.path,
416
- files: [...resolved.unlisted],
417
- listed: resolved.listed
418
- })
419
- );
420
- }
421
- );
422
- return await planAskedSandboxesRun(app, request, asked, planSandboxes, signal);
423
- }
424
- const planCommand = async (where, planSignal, { testPlan }) => await planDriverCommand(app, driver, errors, args, driverCount(driver, testPlan, countTests), where, planSignal);
425
- if (driver.fileLists === void 0) return await planCommandRun(app, request, planCommand, signal);
426
- const planDefaultSandboxes = planDriverSandboxes(
427
- ({ argv, testFiles, testPlan }, { where, max, settings }) => {
428
- const sandboxesDefault = where.recipe.sandboxes?.default;
429
- if (sandboxesDefault === void 0)
430
- throw new Error("planTestRun: a run across runner sandboxes from the default needs runner.sandboxes.default");
431
- const resolved = resolveSandboxCountDefault(sandboxesDefault, testPlan);
432
- const checked = driver.fileLists?.validate(args);
433
- if (checked !== void 0 && !checked.ok)
434
- return refused(
435
- sandboxesDefaultErrors.sandboxesDefaultRefused({
436
- key: SANDBOXES_DEFAULT_KEY,
437
- sandboxes: Math.min(resolved, max, testFiles.length),
438
- field: "args",
439
- problem: checked.problem,
440
- configFile: settings.configFile
441
- })
442
- );
443
- return {
444
- ok: true,
445
- sandboxes: driverSandboxesRun({ argv, testFiles, asked: { from: "default", default: resolved }, max })
446
- };
447
- }
448
- );
449
- return await planDefaultSandboxesRun(app, request, planCommand, planDefaultSandboxes, signal);
450
- }
451
-
452
250
  // src/commands/test/test-words.ts
453
251
  var TEST_HELP = {
454
252
  usage: "[--suite <NAME>] [--count-tests] [--sandboxes <N> | --file-lists <PATH>] [<args>...] [-- <dash options>...]",
@@ -491,6 +289,10 @@ var COUNT_TESTS_FLAG_HELP = {
491
289
 
492
290
  // src/commands/test/command.ts
493
291
  var help = runHelp(TEST_HELP, "args");
292
+ function testSandboxesProblems(request) {
293
+ const { sandboxes } = request;
294
+ return sandboxes === void 0 || Number.isInteger(sandboxes) && sandboxes >= 1 ? [] : [{ field: "sandboxes", message: `--sandboxes takes a whole number from 1, not ${sandboxes}.` }];
295
+ }
494
296
  var command_default = stormCommands.define({
495
297
  requestSchema: z3.object({
496
298
  ...RUN_REQUEST_FIELDS,
@@ -541,18 +343,16 @@ var command_default = stormCommands.define({
541
343
  configFile: file.path
542
344
  });
543
345
  await ui.progress?.(preRunLine(target, request.args.length, targetRedactor(target, app.env)));
544
- const plan = await planTestRun(
545
- context,
546
- driver,
547
- testDriverRefusals,
548
- args,
346
+ const plan = await planRun(
347
+ app,
549
348
  { ...request, settingsFile: target.settingsFile, suite: target.name },
550
- { countTests: request.countTests, sandboxes, fileLists }
349
+ { kind: "driver", driver, args, countTests: request.countTests, errors: testDriverRefusals },
350
+ context.signal
551
351
  );
552
352
  if (!plan.ok) return plan.refusal;
553
353
  const test = { driver: driver.name, suite: target.name };
554
354
  const extraMismatchHint = driver.fileLists?.extraMismatchHint;
555
- return await runPlanned(
355
+ return await executePlannedRun(
556
356
  context,
557
357
  request,
558
358
  {
@@ -560,15 +360,12 @@ var command_default = stormCommands.define({
560
360
  test,
561
361
  hints: driver.hints,
562
362
  ...extraMismatchHint === void 0 ? {} : { extraMismatchHint },
563
- ran: (facts, { testPlan, options }, noFinalTestResults) => {
564
- const recorded = recordedPlan(testPlan, options);
565
- return outcomes.ran({
566
- ...facts,
567
- ...recorded === void 0 ? {} : { plan: recorded },
568
- noFinalTestResults,
569
- ...test
570
- });
571
- },
363
+ ran: (facts, plan2, noFinalTestResults) => outcomes.ran({
364
+ ...facts,
365
+ ...plan2 === void 0 ? {} : { plan: plan2 },
366
+ noFinalTestResults,
367
+ ...test
368
+ }),
572
369
  sandboxesRan: (facts, noFinalTestResults) => outcomes.sandboxesRan({ ...facts, noFinalTestResults, ...test }),
573
370
  planned: (facts) => outcomes.planned(facts)
574
371
  },
@@ -96,7 +96,7 @@ export declare const outcomes: import("@vercel/clinkr").Outcomes<{
96
96
  built: z.ZodBoolean;
97
97
  vcpus: z.ZodNumber;
98
98
  region: z.ZodString;
99
- runtime: z.ZodString;
99
+ image: z.ZodString;
100
100
  buildMs: z.ZodNumber;
101
101
  }, z.core.$strip>>;
102
102
  timeline: z.ZodObject<{
@@ -259,7 +259,7 @@ export declare const outcomes: import("@vercel/clinkr").Outcomes<{
259
259
  built: z.ZodBoolean;
260
260
  vcpus: z.ZodNumber;
261
261
  region: z.ZodString;
262
- runtime: z.ZodString;
262
+ image: z.ZodString;
263
263
  uploadBytes: z.ZodNullable<z.ZodNumber>;
264
264
  }, z.core.$strip>;
265
265
  cleanup: z.ZodType<import("../../shared/cleanup.ts").StormCleanupFacts, import("../../shared/cleanup.ts").StormCleanupFacts, z.core.$ZodTypeInternals<import("../../shared/cleanup.ts").StormCleanupFacts, import("../../shared/cleanup.ts").StormCleanupFacts>>;
@@ -267,7 +267,7 @@ export declare const outcomes: import("@vercel/clinkr").Outcomes<{
267
267
  sandbox: z.ZodNumber;
268
268
  name: z.ZodString;
269
269
  stopsAt: z.ZodString;
270
- url: z.ZodString;
270
+ url: z.ZodNullable<z.ZodString>;
271
271
  }, z.core.$strip>>;
272
272
  notKept: z.ZodArray<z.ZodObject<{
273
273
  sandbox: z.ZodNumber;
@@ -356,9 +356,11 @@ export declare const outcomes: import("@vercel/clinkr").Outcomes<{
356
356
  configFile: string | null;
357
357
  }]>;
358
358
  credentialsInvalid: import("@vercel/clinkr").SharedError<"credentials_invalid", [data: {
359
- variables: {
359
+ problems: {
360
360
  name: string;
361
- problem: "missing" | "multiline" | "short";
361
+ problem: "gh-failed" | "gh-not-authenticated" | "gh-not-installed" | "gh-preframed" | "gh-timed-out" | "missing" | "multiline" | "short";
362
+ detail: string;
363
+ hint: string;
362
364
  }[];
363
365
  minLength: number;
364
366
  configFile: string | null;
@@ -426,6 +428,10 @@ export declare const outcomes: import("@vercel/clinkr").Outcomes<{
426
428
  }[];
427
429
  }[];
428
430
  }]>;
431
+ keepSandboxManagedCredentials: import("@vercel/clinkr").SharedError<"keep_sandbox_managed_credentials", [data: {
432
+ providers: string[];
433
+ configFile: string | null;
434
+ }]>;
429
435
  keepSandboxUnsafeSecretEnvVars: import("@vercel/clinkr").SharedError<"keep_sandbox_unsafe_secret_env_vars", [data: {
430
436
  variables: string[];
431
437
  configFile: string | null;
@@ -553,6 +559,13 @@ export declare const outcomes: import("@vercel/clinkr").Outcomes<{
553
559
  minLength: number;
554
560
  configFile: string | null;
555
561
  }]>;
562
+ vercelOidcTokenFailed: import("@vercel/clinkr").SharedError<"vercel_oidc_token_failed", [data: {
563
+ cause: "invalid-token" | "missing-token";
564
+ detail: string;
565
+ fix: string;
566
+ runner: boolean;
567
+ cleanup: import("../../shared/cleanup.ts").StormCleanupFacts;
568
+ }]>;
556
569
  }, {
557
570
  readonly conflictingOptions: import("@vercel/clinkr").SharedError<"conflicting_options", [data: {
558
571
  conflicts: {
@@ -568,9 +581,11 @@ export declare const outcomes: import("@vercel/clinkr").Outcomes<{
568
581
  configFile: string | null;
569
582
  }]>;
570
583
  readonly credentialsInvalid: import("@vercel/clinkr").SharedError<"credentials_invalid", [data: {
571
- variables: {
584
+ problems: {
572
585
  name: string;
573
- problem: "missing" | "multiline" | "short";
586
+ problem: "gh-failed" | "gh-not-authenticated" | "gh-not-installed" | "gh-preframed" | "gh-timed-out" | "missing" | "multiline" | "short";
587
+ detail: string;
588
+ hint: string;
574
589
  }[];
575
590
  minLength: number;
576
591
  configFile: string | null;
@@ -638,6 +653,10 @@ export declare const outcomes: import("@vercel/clinkr").Outcomes<{
638
653
  }[];
639
654
  }[];
640
655
  }]>;
656
+ readonly keepSandboxManagedCredentials: import("@vercel/clinkr").SharedError<"keep_sandbox_managed_credentials", [data: {
657
+ providers: string[];
658
+ configFile: string | null;
659
+ }]>;
641
660
  readonly keepSandboxUnsafeSecretEnvVars: import("@vercel/clinkr").SharedError<"keep_sandbox_unsafe_secret_env_vars", [data: {
642
661
  variables: string[];
643
662
  configFile: string | null;
@@ -765,4 +784,11 @@ export declare const outcomes: import("@vercel/clinkr").Outcomes<{
765
784
  minLength: number;
766
785
  configFile: string | null;
767
786
  }]>;
787
+ readonly vercelOidcTokenFailed: import("@vercel/clinkr").SharedError<"vercel_oidc_token_failed", [data: {
788
+ cause: "invalid-token" | "missing-token";
789
+ detail: string;
790
+ fix: string;
791
+ runner: boolean;
792
+ cleanup: import("../../shared/cleanup.ts").StormCleanupFacts;
793
+ }]>;
768
794
  }>;
@@ -3,9 +3,9 @@ import type { CheckedRunner } from "./runner.ts";
3
3
  import type { Checked } from "./schema.ts";
4
4
  /**
5
5
  * Checks a `runner` value from `storm.config.ts`. When `inherited` is given (the top level's raw `vercelSandbox`
6
- * options object), a suite's `vercelSandbox` options merge shallowly over `inherited` before `checkRecipe` runs, so
7
- * the suite may override only the top-level keys that differ. A declared `vcpus` rule is also checked against
8
- * `definitions` so unknown resources or options fail at config load.
6
+ * options object), a suite's `vercelSandbox` options merge shallowly over `inherited` before
7
+ * `checkVercelSandboxOptions` runs, so the suite may override only the top-level keys that differ. A declared `vcpus`
8
+ * rule is also checked against `definitions` so unknown resources or options fail at config load.
9
9
  */
10
10
  export declare function checkRunner(value: unknown, inherited?: Readonly<Record<string, unknown>>, definitions?: readonly ResourceDefinition[]): Checked<CheckedRunner>;
11
11
  /**
@@ -1,13 +1,14 @@
1
1
  // Checks a `runner` value from `storm.config.ts` (top-level or suite) and extracts top-level `vercelSandbox` options
2
- // so a suite of the same kind can merge its partial options over them before `checkRecipe` fills defaults.
3
- import { checkRecipe } from "../runner/index.js";
2
+ // so a suite of the same kind can merge its partial options over them before `checkVercelSandboxOptions` fills
3
+ // defaults.
4
+ import { checkVercelSandboxOptions } from "../runner/index.js";
4
5
  import { describeValue } from "../sdk/extension/index.js";
5
6
  const FACTORY_HINT = "must be made by vercelSandbox({ … }) or launchMachine()";
6
7
  /**
7
8
  * Checks a `runner` value from `storm.config.ts`. When `inherited` is given (the top level's raw `vercelSandbox`
8
- * options object), a suite's `vercelSandbox` options merge shallowly over `inherited` before `checkRecipe` runs, so
9
- * the suite may override only the top-level keys that differ. A declared `vcpus` rule is also checked against
10
- * `definitions` so unknown resources or options fail at config load.
9
+ * options object), a suite's `vercelSandbox` options merge shallowly over `inherited` before
10
+ * `checkVercelSandboxOptions` runs, so the suite may override only the top-level keys that differ. A declared `vcpus`
11
+ * rule is also checked against `definitions` so unknown resources or options fail at config load.
11
12
  */
12
13
  export function checkRunner(value, inherited, definitions = []) {
13
14
  if (!isRecord(value)) {
@@ -33,13 +34,13 @@ export function checkRunner(value, inherited, definitions = []) {
33
34
  ...inherited,
34
35
  ...Object.fromEntries(Object.entries(options).filter(([, entry]) => entry !== undefined)),
35
36
  };
36
- const checked = checkRecipe(rawOptions);
37
+ const checked = checkVercelSandboxOptions(rawOptions);
37
38
  if (!checked.ok)
38
39
  return checked;
39
40
  const vcpusProblems = checkVcpusRuleDefinitions(checked.value.vcpus, definitions);
40
41
  if (vcpusProblems.length > 0)
41
42
  return { ok: false, problems: vcpusProblems };
42
- return { ok: true, value: { kind: "vercel-sandbox", recipe: checked.value } };
43
+ return { ok: true, value: { kind: "vercel-sandbox", options: checked.value } };
43
44
  }
44
45
  return { ok: false, problems: [{ path: [], problem: `${FACTORY_HINT}, not ${describeValue(value)}` }] };
45
46
  }
@@ -1,6 +1,6 @@
1
1
  import { type Refusable } from "@vercel/clinkr";
2
2
  import { z } from "zod";
3
- import { type Credential, type CredentialContext, type CredentialFailure, type CredentialOrigin, type CredentialSourceChoice } from "../credential/index.ts";
3
+ import { type Credential, type CredentialContext, type CredentialFailure, type CredentialOrigin, type CredentialSourceChoice, type VercelProjectOutcome } from "../credential/index.ts";
4
4
  import { type credentialErrors } from "./credential-settle.ts";
5
5
  /**
6
6
  * The errors a credential source's `obtain()` refuses with. A command that obtains a credential spreads them into its
@@ -27,6 +27,14 @@ export declare const credentialSourceErrors: import("@vercel/clinkr").SharedErro
27
27
  detail: z.ZodString;
28
28
  fix: z.ZodString;
29
29
  }, z.core.$strip>;
30
+ vercelOidcTokenFailed: z.ZodObject<{
31
+ cause: z.ZodEnum<{
32
+ "invalid-token": "invalid-token";
33
+ "missing-token": "missing-token";
34
+ }>;
35
+ detail: z.ZodString;
36
+ fix: z.ZodString;
37
+ }, z.core.$strip>;
30
38
  }, {
31
39
  readonly mintFailed: {
32
40
  readonly exitCode: 1;
@@ -82,16 +90,39 @@ export declare const credentialSourceErrors: import("@vercel/clinkr").SharedErro
82
90
  }[];
83
91
  };
84
92
  };
93
+ readonly vercelOidcTokenFailed: {
94
+ readonly exitCode: 1;
95
+ readonly description: "With --credential vercel-oidc, VERCEL_OIDC_TOKEN is missing, empty, or not a valid Vercel project OIDC token.";
96
+ readonly schema: z.ZodObject<{
97
+ cause: z.ZodEnum<{
98
+ "invalid-token": "invalid-token";
99
+ "missing-token": "missing-token";
100
+ }>;
101
+ detail: z.ZodString;
102
+ fix: z.ZodString;
103
+ }, z.core.$strip>;
104
+ readonly render: ({ detail, fix }: {
105
+ cause: "invalid-token" | "missing-token";
106
+ detail: string;
107
+ fix: string;
108
+ }) => {
109
+ message: string;
110
+ next: {
111
+ type: "text";
112
+ text: string;
113
+ }[];
114
+ };
115
+ };
85
116
  }>;
86
117
  /** The error a credential source's `obtain()` refuses with. */
87
- export type CredentialSourceError = ReturnType<typeof credentialSourceErrors.mintFailed> | ReturnType<typeof credentialSourceErrors.tokenRequestFailed>;
118
+ export type CredentialSourceError = ReturnType<typeof credentialSourceErrors.mintFailed> | ReturnType<typeof credentialSourceErrors.tokenRequestFailed> | ReturnType<typeof credentialSourceErrors.vercelOidcTokenFailed>;
88
119
  /** A credential source's failure as the error `obtain()` refuses with. */
89
120
  export declare function credentialSourceError(failure: CredentialFailure): CredentialSourceError;
90
121
  /** A credential source as a command gets it from the credential launcher resolver. */
91
122
  export interface CommandCredentialSource {
92
123
  /**
93
124
  * A credential to use now, getting one first if the source holds none it would hand out, or the error to end the
94
- * command with: `mint_failed` or `token_request_failed`.
125
+ * command with: `mint_failed`, `token_request_failed`, or `vercel_oidc_token_failed`.
95
126
  */
96
127
  obtain(): Promise<Refusable<{
97
128
  readonly credential: Credential;
@@ -115,6 +146,13 @@ export interface CredentialTarget {
115
146
  export interface CredentialReport {
116
147
  readonly progress?: ((line: string) => Promise<void>) | undefined;
117
148
  }
149
+ /**
150
+ * A credential source for a Vercel Sandbox, as a command gets it from the credential launcher resolver: what it
151
+ * obtains carries the team and project the credential names, or why it has none (`VercelProjectOutcome`).
152
+ */
153
+ export interface CommandVercelProjectSource {
154
+ readonly obtain: () => Promise<VercelProjectOutcome>;
155
+ }
118
156
  /**
119
157
  * The credential launcher resolver. A command that uses it spreads `credentialErrors` and `credentialSourceErrors` into
120
158
  * its outcomes.
@@ -122,12 +160,19 @@ export interface CredentialReport {
122
160
  export interface CredentialResolver {
123
161
  /**
124
162
  * The credential source `choice` names. The mint needs the target's team and project, and refuses with
125
- * `missing_target` without either; a GitHub Actions OIDC token request needs neither. It gets nothing until
126
- * `obtain()`.
163
+ * `missing_target` without either; `github-actions` and `vercel-oidc` need neither. It gets nothing until `obtain()`.
127
164
  */
128
165
  source(choice: CredentialSourceChoice["source"], target: CredentialTarget, report?: CredentialReport): Refusable<{
129
166
  readonly source: CommandCredentialSource;
130
167
  }, ReturnType<typeof credentialErrors.missingTarget>>;
168
+ /**
169
+ * The credential source `choice` names for a Vercel Sandbox (`mint` or `vercel-oidc`), whose credential comes with
170
+ * the team and project it names (`vercelProjectSource`). It refuses as `source` does, and gets nothing until
171
+ * `obtain()`.
172
+ */
173
+ vercelProjectSource(choice: "mint" | "vercel-oidc", target: CredentialTarget, report?: CredentialReport): Refusable<{
174
+ readonly source: CommandVercelProjectSource;
175
+ }, ReturnType<typeof credentialErrors.missingTarget>>;
131
176
  }
132
177
  /** The credential launcher resolver over `gateways`. */
133
178
  export declare function credentialResolver(gateways: CredentialContext): CredentialResolver;