@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,9 +1,8 @@
1
- // How a run acquires, announces, hands over and releases its resource instances, through each definition's lifecycle
2
- // over its Context (`acquireForRun`, `releaseAfterRun`). One policy serves a run with or without a lane beside the
3
- // resources, and names no resource. `instanceOf` binds each of the run's resources to the run as a resource instance,
4
- // which calls its definition's lifecycle itself, keeps what its acquire took, how acquiring it answered and the
5
- // warnings it reported, reports what it reports under its key, and hands each its own back: the routing the core view
6
- // of a resource rests on (`ResourceDefinition`).
1
+ // How a run acquires, announces, splits, hands over, and releases its resource instances, through each definition's
2
+ // lifecycle over its Context (`acquireForRun`, `split`, `releaseAfterRun`). Purely resource-focused (zero runner-lane
3
+ // concepts): `acquireResources` distinguishes user cancellation (`canceled`) from an internal sibling abort
4
+ // (`internal-stopped`, `ts/src/GLOSSARY.md`), while `core/coordinator.ts` coordinates concurrent resource and runner
5
+ // stages.
7
6
  /**
8
7
  * Each resource `requests` holds, in its order, bound to this run as a resource instance of its definition from
9
8
  * `lookup`, over the definition's Context from `resourceContexts`.
@@ -11,24 +10,19 @@
11
10
  export function resourceInstances({ named }, resourceContexts, requests) {
12
11
  return Object.entries(requests).map(([key, request]) => instanceOf(named(request.definition, key), key, resourceContexts, request));
13
12
  }
14
- /**
15
- * The resource under key `key`, of definition `resource`, bound to this run. It hands the lifecycle only its own
16
- * definition's Context, its acquire's own options and secrets, and its release only what its own acquire took, and
17
- * reads back only what this instance's acquire and release answered.
18
- */
13
+ /** Emits `lane-started` for every resource instance that has a lane, in order. */
14
+ export async function startResourceLanes(instances, progress) {
15
+ for (const instance of instances)
16
+ await instance.startLane(progress);
17
+ }
19
18
  function instanceOf(resource, key, resourceContexts, request) {
20
19
  const { name } = resource;
21
20
  const lifecycle = resource.lifecycle(resourceContexts[name]);
22
21
  const taken = [];
23
22
  let result;
24
- // What a canceled run says acquiring it changed, once its acquire answered: none for one that never answered, was
25
- // refused or failed a mint.
26
23
  let canceled = [];
27
- // The warnings its acquire reported, and its release.
28
24
  const acquireWarnings = [];
29
25
  const releaseWarnings = [];
30
- // What the instance reports, under its key and its definition; the resource never builds the event. A warning prints
31
- // in `lane`, the lane of the lifecycle point it reports from, and `kept` keeps it.
32
26
  const report = (progress, lane, kept) => ({
33
27
  run: (text) => progress.emit({ kind: "resource-notice", resource: key, definition: name, lane: "run", text }),
34
28
  cleanup: (text) => progress.emit({ kind: "resource-notice", resource: key, definition: name, lane: "cleanup", text }),
@@ -125,25 +119,20 @@ function instanceOf(resource, key, resourceContexts, request) {
125
119
  };
126
120
  }
127
121
  /**
128
- * Acquires every resource instance of the run at once, in order, and readies the lane beside them (`beside`), when
129
- * there is one. Everything runs under one internal abort combined with the user's `signal`: an instance that
130
- * refuses or throws, a lane that ends short of ready, or a lane whose end can't be reported aborts the rest, so all end
131
- * soon. It waits for all of them before it answers, so the run's cleanup sees everything their acquires took. First
132
- * each instance with a lane reports its lane's start, in order, so every `acquireForRun` then starts at once, beside
133
- * the beside lane; each of those lanes reports how it ended as it ends, a throw as failed.
122
+ * Acquires every resource instance of the run concurrently. A resource refusal or throw aborts the remaining
123
+ * resources immediately via an internal controller; `stopSignal` lets a sibling lane stop acquisition without
124
+ * misclassifying it as a user cancellation (`internal-stopped` vs. `canceled`).
134
125
  *
135
- * A throw rethrows, the beside lane's first, then the resources' in order. Otherwise the outcome ranks, the same with
136
- * or without a lane beside them: the user's `signal` (`canceled`), then the beside lane's failure, then each instance's
137
- * refusal in order (its own, or the run's `mint_failed` when the mint it needed failed), then an instance's
138
- * cancellation. A refusal aborts the other instances, so one that stops on that abort answers `canceled`; ranking every
139
- * refusal above every cancellation keeps the refusal that caused it.
126
+ * Waits for every instance to settle so cleanup sees everything taken. Rethrows the first instance throw in order;
127
+ * otherwise ranks user cancellation (`cancelSignal`), then the first resource refusal in order, then
128
+ * `internal-stopped` (when `stopSignal` aborted), then `canceled`.
140
129
  */
141
130
  export async function acquireResources(instances, input) {
142
- const { progress, beside } = input;
131
+ const { progress, cancelSignal, stopSignal } = input;
143
132
  const internal = new AbortController();
144
- const signal = AbortSignal.any([input.signal, internal.signal]);
145
- // Each lane says how it ended, whichever way, a rejection as failed. Anything that ends short of ready, or can't
146
- // report its end, stops the rest.
133
+ const signal = stopSignal === undefined
134
+ ? AbortSignal.any([cancelSignal, internal.signal])
135
+ : AbortSignal.any([cancelSignal, stopSignal, internal.signal]);
147
136
  const finishLane = async (lane, task, outcomeOf) => {
148
137
  let value;
149
138
  let outcome;
@@ -154,7 +143,6 @@ export async function acquireResources(instances, input) {
154
143
  await progress.emit({ kind: "lane-ended", ...lane, outcome });
155
144
  }
156
145
  catch (error) {
157
- // A lane that ended without saying so still says it failed; one whose report failed has said nothing more.
158
146
  if (lane !== undefined && outcome === undefined)
159
147
  await progress.emit({ kind: "lane-ended", ...lane, outcome: "failed" }).catch(() => undefined);
160
148
  internal.abort();
@@ -164,49 +152,30 @@ export async function acquireResources(instances, input) {
164
152
  internal.abort();
165
153
  return value;
166
154
  };
167
- for (const instance of instances)
168
- await instance.startLane(progress);
169
155
  const instanceTasks = instances.map((instance) => instance.acquire({ signal, credential: input.credential, progress, finishLane }));
170
- const besideTask = beside === undefined ? Promise.resolve(undefined) : finishLane(beside.lane, beside.start(signal), beside.outcomeOf);
171
- const [[besideEnded], instancesEnded] = await Promise.all([
172
- Promise.allSettled([besideTask]),
173
- Promise.allSettled(instanceTasks),
174
- ]);
175
- if (besideEnded.status === "rejected")
176
- throw besideEnded.reason;
156
+ const instancesEnded = await Promise.allSettled(instanceTasks);
177
157
  const outcomes = [];
178
158
  for (const one of instancesEnded) {
179
159
  if (one.status === "rejected")
180
160
  throw one.reason;
181
161
  outcomes.push(one.value);
182
162
  }
183
- if (input.signal.aborted)
184
- return { kind: "stopped", outcome: canceledStop() };
185
- const besideValue = besideEnded.value;
186
- const besideStopped = besideValue === undefined ? undefined : beside?.stopped(besideValue);
187
- if (besideStopped !== undefined)
188
- return { kind: "stopped", outcome: besideStopped };
163
+ if (cancelSignal.aborted)
164
+ return { kind: "canceled" };
189
165
  for (const outcome of outcomes)
190
- if (outcome?.kind === "refused")
166
+ if (outcome.kind === "refused")
191
167
  return { kind: "stopped", outcome: outcome.outcome };
192
- if (outcomes.some((outcome) => outcome?.kind === "canceled"))
193
- return { kind: "stopped", outcome: canceledStop() };
194
- return { kind: "acquired", beside: besideValue };
168
+ if (stopSignal?.aborted)
169
+ return { kind: "internal-stopped" };
170
+ if (outcomes.some((outcome) => outcome.kind === "canceled"))
171
+ return { kind: "canceled" };
172
+ return { kind: "acquired" };
195
173
  }
196
- /** How an instance's lane ended, by how acquiring it did: ready once acquired, stopped when canceled, else failed. */
197
174
  function resourceLaneOutcome(result) {
198
175
  if ("acquired" in result)
199
176
  return "ready";
200
177
  return "canceled" in result ? "stopped" : "failed";
201
178
  }
202
- /**
203
- * The `canceled` stop of a run. What it says each resource instance changed comes from its cleanup record: what its
204
- * acquire said a canceled run changed, what its release finished, and its release's warnings
205
- * (`ResourceCleanupRecords`).
206
- */
207
- export function canceledStop() {
208
- return { kind: "canceled" };
209
- }
210
179
  /**
211
180
  * Says each acquired instance acquired, in order (`resource-acquired`), each followed by its acquire's `announce`, if
212
181
  * it answered one: once every instance is acquired, and the runner, when there is one, is ready, just before the
@@ -230,13 +199,7 @@ export function resourcesPayload(instances) {
230
199
  /**
231
200
  * Every sandbox credential the acquired instances answered, in the instances' order, each normalized (lowercase domain
232
201
  * and header, `requests` defaulted to `"read"`) with its resource key, checked against each other and against
233
- * `configCredentials`, the run's own (`runner.credentials`), which share the command's network policy with them. Two
234
- * credentials can't hold together when they name the same domain and header (compared without case), since the firewall
235
- * sets one value per header, or the same domain with different `requests` (`read` when a credential says none), since
236
- * the firewall has one rule set per domain: either throws, naming both sources (each resource key, or
237
- * `runner.credentials`), the domain, and the header or both `requests`, never a value, before the command starts, and
238
- * the run's release still runs, as for any throw. One instance that names the same domain and header twice is the same
239
- * mistake, and throws too.
202
+ * `configCredentials`, the run's own (`runner.credentials`), which share the command's network policy with them.
240
203
  */
241
204
  export function resourcesCredentials(instances, configCredentials = []) {
242
205
  const all = [];
@@ -306,9 +269,8 @@ export function releasedResources(instances) {
306
269
  }
307
270
  /**
308
271
  * Releases every resource instance of the run, in reverse order, and answers what that did, keyed by resource key:
309
- * only the instances whose release reported something. Each release gets `runner.runnerSandboxFenced`: false when the
310
- * run had a runner sandbox it couldn't confirm stopped, always true in a run with no runner. Each release runs even
311
- * when one before it threw; the first throw is rethrown once all have run.
272
+ * only the instances whose release reported something. Each release runs even when one before it threw; the first
273
+ * throw is rethrown once all have run.
312
274
  */
313
275
  export async function releaseResources(instances, progress, runner) {
314
276
  let releaseFacts = {};
@@ -28,7 +28,13 @@ export interface RunnerStepState {
28
28
  * `builtBehind` is how many commits HEAD has that the base lacks, null when the base isn't in HEAD's history.
29
29
  */
30
30
  export type RunnerSnapshotState = {
31
- readonly kind: "reused" | "built";
31
+ readonly kind: "reused";
32
+ readonly id: string;
33
+ readonly base: string;
34
+ readonly builtBehind: number | null;
35
+ readonly source: "local" | "shared";
36
+ } | {
37
+ readonly kind: "built";
32
38
  readonly id: string;
33
39
  readonly base: string;
34
40
  readonly builtBehind: number | null;
@@ -221,6 +221,7 @@ function applyRunnerEvent(state, event, at) {
221
221
  id: event.snapshotId,
222
222
  base: event.base,
223
223
  builtBehind: event.builtBehind,
224
+ source: event.source,
224
225
  },
225
226
  }));
226
227
  case "snapshot-build-started":
@@ -272,6 +273,7 @@ function applyRunnerEvent(state, event, at) {
272
273
  case "output-started":
273
274
  case "output-ended":
274
275
  case "snapshot-entry-not-written":
276
+ case "shared-snapshot-lookup-failed":
275
277
  case "command-output-started":
276
278
  return state;
277
279
  }
@@ -1,39 +1,34 @@
1
- import { type CredentialGateway, type CredentialSource, type CredentialSourceChoice, type GitHubActionsTokenGateway, type MintFailure, type MintTarget } from "../credential/index.ts";
2
- import { type RunnerCleanupFacts, type RunnerContext, type RunnerFailure, type RunnerSession, type RunnerSessionCleanup, type RunnerSessionRequest, type RunnerSnapshotCacheFailure, type RunnerSnapshotEntry, type SandboxAccess } from "../runner/index.ts";
3
- import type { Clock } from "../time/index.ts";
4
- import type { SandboxCredential } from "../sdk/extension/index.ts";
5
- import type { BaseRunEvent, RunProgress } from "./events.ts";
6
- import type { CommandGateway } from "./gateways.ts";
1
+ import { type CredentialSourceChoice } from "../credential/index.ts";
2
+ import { type RunContext, type RunControl, type RunnerCredentialChoice, type RunRunnerRequest } from "./coordinator.ts";
3
+ import type { RunProgress } from "./events.ts";
4
+ import { type SingleRunOutcome } from "./outcomes.ts";
7
5
  import { type ResourceDefinitionSet } from "./resource-definition-set.ts";
8
- import type { ResourceCleanupRecords, ResourceRanRecords, ResourceRefusal, ResourceRequests, ResourceSkip, ResourceContextMap } from "./resource.ts";
9
- import { type ResourceInstance } from "./resources.ts";
10
- import type { AcrossSandboxesOutcome } from "./sandbox-end.ts";
11
- import type { RanCommand } from "./timing.ts";
12
- /**
13
- * The gateways and seams the core reaches the outside through: the mint and GitHub Actions' OIDC token issuer, which
14
- * the run's credential source uses, the command, and the runner's (the checkout, the runner snapshot cache, Vercel
15
- * Sandbox, the terminal and the timer), which only a sandboxed run uses, but for the terminal, where an unsandboxed
16
- * command's output goes too, and the timer a token request's retries wait on; and the clock. Each resource reaches the
17
- * outside through its own Context instead (`ResourceContextMap`).
18
- */
19
- export interface RunContext extends RunnerContext {
20
- readonly clock: Clock;
21
- readonly credentials: CredentialGateway;
22
- readonly githubActionsTokens: GitHubActionsTokenGateway;
23
- readonly commands: CommandGateway;
6
+ import type { ResourceContextMap, ResourceRequests, ResourceSkip } from "./resource.ts";
7
+ /** Launch-machine runner configuration for a single run (`executeRun`). */
8
+ export interface LaunchMachineRunRunner {
9
+ readonly kind: "launch-machine";
10
+ /** The base environment passed to the child command on the launch machine. */
11
+ readonly env: Readonly<Record<string, string | undefined>>;
12
+ /**
13
+ * The credential source chosen when one of the run's resources needs the Vercel credential: the core builds it once
14
+ * and hands it to every instance it acquires.
15
+ */
16
+ readonly credential?: CredentialSourceChoice;
17
+ /** File path where the command stages test events for the caller to read after the run ends. */
18
+ readonly testEvents?: string;
24
19
  }
25
- /**
26
- * What a sandboxed run needs beyond an unsandboxed run: what its runner session runs (`RunnerSessionRequest`), the
27
- * runner checked on this machine, the team and project the run's credential is minted for, the local user, the recipe's
28
- * credentials and unsafe secret environment variables with their values, and how long it keeps the runner sandbox.
29
- */
30
- export type RunRunnerRequest = RunnerSessionRequest;
31
- /** What every run was asked to do, unsandboxed or sandboxed. */
32
- interface RunRequestBase {
20
+ /** Vercel Sandbox runner configuration for a single run (`executeRun`). */
21
+ export interface VercelSandboxRunRunner {
22
+ readonly kind: "vercel-sandbox";
23
+ readonly session: RunRunnerRequest;
24
+ readonly credential: RunnerCredentialChoice;
25
+ }
26
+ /** Peer runner union accepted by `RunRequest` (`executeRun`). */
27
+ export type RunRunner = LaunchMachineRunRunner | VercelSandboxRunRunner;
28
+ /** What a single run (`executeRun`) was asked to do. */
29
+ export interface RunRequest {
33
30
  /** The command. */
34
31
  readonly argv: readonly string[];
35
- /** The base of the command's environment. */
36
- readonly env: Readonly<Record<string, string | undefined>>;
37
32
  /** storm's version, reported first. */
38
33
  readonly version: string;
39
34
  /** The git commit storm was built from, as the version line shows it; null when unknown. */
@@ -42,217 +37,18 @@ interface RunRequestBase {
42
37
  readonly configFile: string | null;
43
38
  /** Under `--verbose`: the run payload asks the command to print what each test did as it goes. */
44
39
  readonly verbose?: boolean;
40
+ /** The run's peer runner (`launch-machine` or `vercel-sandbox`). */
41
+ readonly runner: RunRunner;
42
+ /** Each resource instance's part of the run's request, by resource key; a run that names none has no resource. */
43
+ readonly resources: ResourceRequests;
45
44
  /**
46
45
  * The resources whose `beforeRun` skipped them, with each one's notice, in definition order: the run goes on without
47
46
  * them and says so right after it starts (`resource-skipped`). None when undefined.
48
47
  */
49
48
  readonly skipped?: readonly ResourceSkip[];
50
49
  }
51
- /** A run whose command runs on this machine. */
52
- export interface UnsandboxedRunRequest extends RunRequestBase {
53
- readonly runner?: undefined;
54
- /** Each resource instance's part of the run's request, by resource key; a run that names none has no resource. */
55
- readonly resources: ResourceRequests;
56
- /**
57
- * The credential source the run chose (`--credential`), which it does when one of its resources needs the Vercel
58
- * credential: the core builds the source once and hands it to every instance it acquires. None when none needs it.
59
- */
60
- readonly credential?: CredentialSourceChoice;
61
- /**
62
- * The file the run payload names for the command's test events, which the caller reads once the run is done; none
63
- * when undefined. A sandboxed run follows them in the runner sandbox instead.
64
- */
65
- readonly testEvents?: string;
66
- }
67
- /** A sandboxed run: the command runs in a runner sandbox, readied beside the resources. */
68
- export interface SandboxedRunRequest extends RunRequestBase {
69
- readonly runner: RunRunnerRequest;
70
- /**
71
- * Each resource instance's part of the run's request, by resource key; a run that names none has no resource. A
72
- * sandboxed run always mints, for the runner sandbox, and shares that mint with the resources, so it names no
73
- * credential source.
74
- */
75
- readonly resources: ResourceRequests;
76
- }
77
- /** What a run was asked to do. */
78
- export type RunRequest = UnsandboxedRunRequest | SandboxedRunRequest;
79
- /**
80
- * How a run is stopped. `signal` aborting before the command starts cancels the run at its next step; once the
81
- * command runs, the run waits for it whatever `signal` does. `terminate` aborting sends the command SIGTERM.
82
- * In a sandboxed run, `signal` aborting stops the run in any phase: it kills the sandboxed command if it started and
83
- * starts stopping the runner's sandboxes it doesn't keep at once, and `terminate` goes unused.
84
- */
85
- export interface RunControl {
86
- readonly signal: AbortSignal;
87
- readonly terminate: AbortSignal;
88
- }
89
- /**
90
- * Why the runner couldn't run the command: a runner failure (`RunnerFailure`), or `credential-claims-missing`, a
91
- * credential whose token names no team and project ids, found before any Sandbox call.
92
- */
93
- export type RunRunnerFailure = RunnerFailure | {
94
- readonly kind: "credential-claims-missing";
95
- readonly target: MintTarget;
96
- };
97
- /** What a sandboxed run got from the runner sandbox, once the command ran in it. */
98
- export interface RanRunner {
99
- /** The runner snapshot it started from, and its base. */
100
- readonly snapshotId: string;
101
- readonly base: string;
102
- /** Whether this run built the runner snapshot. */
103
- readonly built: boolean;
104
- /** How many commits HEAD has that the snapshot's base lacks. */
105
- readonly builtBehind: number;
106
- /** How many bytes of changes the run uploaded on top of the snapshot's base. */
107
- readonly uploadBytes: number;
108
- readonly vcpus: number;
109
- readonly region: string;
110
- readonly runtime: string;
111
- /** How long the build step took, in milliseconds. */
112
- readonly buildMs: number;
113
- }
114
- /**
115
- * How a run that is not across runner sandboxes ended.
116
- *
117
- * - `ran`: the command ran and ended; the caller exits with its status (see `commandExitStatus`). `resources` holds
118
- * what it reports of each acquired resource instance that reports something (`ResourceRanRecords`).
119
- * - `resource_refused`: a resource refused while the run acquired (`ResourceRefusal`), so the command didn't run.
120
- * - `mint_failed`: the run's mint failed. In a sandboxed run, the mint for the runner sandbox (`runner: true`), which
121
- * happens first, whatever the resources are; in an unsandboxed run, the mint a resource needed and couldn't go on
122
- * without (`runner: false`): its `acquireForRun` answered `mintFailed`.
123
- * - `spawn_failed`: the command couldn't start.
124
- * - `canceled`: `signal` aborted before the command started, or in a sandboxed run in any phase. What each resource
125
- * instance changed is in its cleanup record (`canceled`, `done`, and `warnings`); in a sandboxed run,
126
- * `commandStopped` says whether the sandboxed command had started and was killed.
127
- * - `runner_failed`: in a sandboxed run, the runner couldn't run the command.
128
- * - `snapshot_gone`: in a sandboxed run, cached runner snapshot `entry` was gone when the runner sandbox started from
129
- * it; its entry was removed, unless `removal` says why it couldn't be.
130
- *
131
- * Every outcome carries `runnerCleanup`: in a sandboxed run, the report of closing the runner's sandbox scope, which
132
- * the run opens before it mints, so the report is there however the run ended, with the team and project its sandboxes
133
- * are in; `null` otherwise. It carries `resourceCleanup` too (`ResourceCleanupRecords`): every resource instance is
134
- * released before it returns, whichever way it ended, and in a sandboxed run after the runner's sandboxes it doesn't
135
- * keep are stopped and the one it keeps is fenced, and before they are deleted or kept running. `executeRun` sets both
136
- * once.
137
- */
138
- export type SingleRunOutcome = RanRun | (RunStopped & RunCleanup);
139
- /**
140
- * How a run ended, across runner sandboxes (`AcrossSandboxesOutcome`) or not (`SingleRunOutcome`): what `run.json`
141
- * records of either.
142
- */
143
- export type RunOutcome = SingleRunOutcome | AcrossSandboxesOutcome;
144
- /** What closing a sandboxed run's sandbox scope left, and the team and project its sandboxes are in. */
145
- export type { RunnerCleanupFacts };
146
- /** What a run reports of its cleanup. */
147
- export interface RunCleanup {
148
- readonly runnerCleanup: RunnerCleanupFacts | null;
149
- readonly resourceCleanup: ResourceCleanupRecords;
150
- }
151
- /** The command ran and ended. */
152
- export interface RanRun extends RunCleanup {
153
- readonly kind: "ran";
154
- readonly resources: ResourceRanRecords;
155
- readonly command: RanCommand;
156
- /** In a sandboxed run, the runner sandbox the command ran in; undefined otherwise. */
157
- readonly runner: RanRunner | undefined;
158
- }
159
- /**
160
- * How a run ended short of the command ending, before the run releases its resources and attaches the runner's
161
- * cleanup report. A resource's refusal is one of these.
162
- */
163
- export type RunStopped = ResourceRefusal | {
164
- readonly kind: "mint_failed";
165
- readonly failure: MintFailure;
166
- /** What the mint was for. */
167
- readonly target: MintTarget;
168
- /** Whether the mint was for the runner sandbox, in a sandboxed run. */
169
- readonly runner: boolean;
170
- } | {
171
- readonly kind: "spawn_failed";
172
- readonly executable: string;
173
- readonly message: string;
174
- } | {
175
- readonly kind: "canceled";
176
- /** In a sandboxed run, whether the sandboxed command had started, and so was killed. */
177
- readonly commandStopped?: boolean;
178
- } | {
179
- readonly kind: "runner_failed";
180
- readonly failure: RunRunnerFailure;
181
- } | {
182
- readonly kind: "snapshot_gone";
183
- readonly entry: RunnerSnapshotEntry;
184
- /** Why its cache entry couldn't be removed; undefined when it was. */
185
- readonly removal: RunnerSnapshotCacheFailure | undefined;
186
- };
187
- /**
188
- * Shared opening events emitted at the start of every run (across runner sandboxes or not): `started`, skips, and
189
- * `runner-prepared`.
190
- */
191
- export declare function emitRunOpening(progress: RunProgress, request: Pick<RunRequestBase, "version" | "commit" | "configFile" | "skipped"> & {
192
- readonly runner?: RunRunnerRequest | undefined;
193
- }, instances: readonly ResourceInstance[]): Promise<void>;
194
- /** Result of minting a runner credential and checking its project claims. */
195
- export type MintedCredential = {
196
- readonly ok: true;
197
- readonly mint: CredentialSource;
198
- readonly access: SandboxAccess;
199
- } | {
200
- readonly ok: false;
201
- readonly outcome: RunStopped;
202
- };
203
- /**
204
- * Mints a Vercel OIDC credential for `target`, checks its team and project claims, and honors `signal`. Every run
205
- * shares it, across runner sandboxes or not.
206
- */
207
- export declare function mintCredential(context: RunContext, target: MintTarget, signal: AbortSignal, progress: RunProgress): Promise<MintedCredential>;
208
- /** Result of running a command inside a ready runner sandbox, including test-event pumping. */
209
- export type SandboxCommandExecution = {
210
- readonly ok: true;
211
- readonly command: RanCommand;
212
- } | {
213
- readonly ok: false;
214
- readonly outcome: RunStopped;
215
- };
216
- /**
217
- * Runs `request.argv` in `session` with `request.runPayload`, pumping test events in arrival order and mapping sandbox
218
- * exit/kill/failure outcomes into `RanCommand` or `RunStopped`. Every run shares it, across runner sandboxes or not.
219
- */
220
- export declare function runCommandInSandbox(session: RunnerSession, request: {
221
- readonly argv: readonly string[];
222
- readonly runPayload: string;
223
- /** The sandbox credentials the run's resources give the command (`RunnerSession.runCommand`). */
224
- readonly credentials?: readonly Required<SandboxCredential>[];
225
- }, signal: AbortSignal, progress: {
226
- emit(event: BaseRunEvent): Promise<void>;
227
- }, onStarted?: () => void): Promise<SandboxCommandExecution>;
228
- /**
229
- * Runs `body` with idempotent `startCleanup` / `release` hooks, guarantees every acquired resource instance is
230
- * released in `finally`, and returns both `body`'s result and the collected `resourceCleanup`.
231
- */
232
- export declare function withResourceCleanup<T>(instances: readonly ResourceInstance[], keepMs: number | null, progress: RunProgress, body: (cleanup: RunnerSessionCleanup) => Promise<T>): Promise<{
233
- readonly value: T;
234
- readonly resourceCleanup: ResourceCleanupRecords;
235
- }>;
236
50
  /**
237
51
  * Runs `request.argv` with the resources it asks for, through `definitionSet`'s resource definitions, in definition
238
- * order. Each resource's `beforeRun` has run already, before the run started: the request holds what it answered. It
239
- * says each resource `beforeRun` skipped right after it starts (`resource-skipped`), acquires the other resource
240
- * instances all at once through their `acquireForRun` (`acquireResources`), says each acquired (`resource-acquired`),
241
- * runs the command with the run payload in `STORM_RUN`, waits for it, and hands each instance what its acquire took to
242
- * its `releaseAfterRun`. It reports each step to `progress`. What acquiring and releasing do is each resource
243
- * definition's own: see its lifecycle. A run that asks for no resource goes straight to its command. It calls each
244
- * definition's lifecycle with its own Context from `resourceContexts`, and hands `context` to none.
245
- *
246
- * In a sandboxed run (`request.runner`), the command runs in a runner sandbox, readied beside the resources (see
247
- * `runSandboxed`).
248
- *
249
- * Release happens however the run ended, a throw included: once the command has stopped and, in a sandboxed run, the
250
- * runner session has fenced the run's sandboxes, each resource instance is released in reverse order, even when the
251
- * `cleanup-started` event can't be reported. An unsandboxed run releases them in `finally`; a sandboxed run's runner
252
- * session does, as it finishes or closes, between the fence and the scope's close: the fence stops every sandbox the
253
- * run doesn't keep and leaves the runner sandbox it keeps with no network access; the close then deletes the stopped
254
- * sandboxes and keeps the kept one running. Each release hears whether the launcher fenced the run's runner sandbox
255
- * (`ReleaseAfterRunInput.runnerSandboxFenced`): what the runner session says once the fence answered, and true in an
256
- * unsandboxed run, which has nothing to fence.
52
+ * order. Releases every resource instance in reverse order however the run ends, and reports cleanup completion.
257
53
  */
258
54
  export declare function executeRun(definitionSet: ResourceDefinitionSet, context: RunContext, resourceContexts: ResourceContextMap, request: RunRequest, control: RunControl, progress: RunProgress): Promise<SingleRunOutcome>;