@cnc-tools/storm 0.6.0 → 0.8.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 (174) hide show
  1. package/dist/build-info.js +1 -1
  2. package/dist/commands/exec/cleanup.d.ts +3 -3
  3. package/dist/commands/exec/cleanup.js +1 -1
  4. package/dist/commands/exec/command.d.ts +797 -1
  5. package/dist/commands/exec/command.js +1 -1
  6. package/dist/commands/exec/live-view.js +32 -15
  7. package/dist/commands/exec/metadata.d.ts +5 -2
  8. package/dist/commands/exec/metadata.js +4 -0
  9. package/dist/commands/exec/mint-failed.d.ts +28 -0
  10. package/dist/commands/exec/outcomes.d.ts +526 -0
  11. package/dist/commands/exec/outcomes.js +9 -0
  12. package/dist/commands/exec/progress.d.ts +14 -2
  13. package/dist/commands/exec/progress.js +57 -14
  14. package/dist/commands/exec/run-command.d.ts +10 -4
  15. package/dist/commands/exec/run-command.js +41 -8
  16. package/dist/commands/exec/run-metadata.d.ts +6 -3
  17. package/dist/commands/exec/run-metadata.js +6 -3
  18. package/dist/commands/exec/run-record.d.ts +83 -4
  19. package/dist/commands/exec/run-record.js +49 -1
  20. package/dist/commands/exec/tests-summary.d.ts +1 -1
  21. package/dist/commands/exec/tests-summary.js +1 -1
  22. package/dist/commands/exec/view.js +36 -4
  23. package/dist/commands/runs/facts.d.ts +25 -0
  24. package/dist/commands/runs/facts.js +36 -3
  25. package/dist/commands/runs/list/command.d.ts +154 -1
  26. package/dist/commands/runs/list/command.js +1 -1
  27. package/dist/commands/runs/list/outcomes.d.ts +41 -0
  28. package/dist/commands/runs/logs/command.d.ts +263 -1
  29. package/dist/commands/runs/logs/command.js +1 -1
  30. package/dist/commands/runs/logs/outcomes.d.ts +105 -0
  31. package/dist/commands/runs/show/command.d.ts +354 -1
  32. package/dist/commands/runs/show/command.js +1 -1
  33. package/dist/commands/runs/show/metadata.js +1 -1
  34. package/dist/commands/runs/show/outcomes.d.ts +96 -0
  35. package/dist/commands/runs/show/outcomes.js +30 -1
  36. package/dist/commands/vitest/command.d.ts +912 -1
  37. package/dist/commands/vitest/command.js +1 -1
  38. package/dist/commands/vitest/metadata.d.ts +5 -2
  39. package/dist/commands/vitest/metadata.js +4 -0
  40. package/dist/commands/vitest/outcomes.d.ts +320 -0
  41. package/dist/config/errors.d.ts +73 -0
  42. package/dist/config/schema.d.ts +1 -1
  43. package/dist/config-file/define.d.ts +4 -3
  44. package/dist/config-file/define.js +1 -1
  45. package/dist/config-file/toolchain.js +1 -1
  46. package/dist/core/command-slots.d.ts +8 -2
  47. package/dist/core/command-slots.js +6 -2
  48. package/dist/core/events.d.ts +9 -7
  49. package/dist/core/index.d.ts +1 -1
  50. package/dist/core/run-state.d.ts +30 -6
  51. package/dist/core/run-state.js +19 -4
  52. package/dist/core/run.d.ts +17 -4
  53. package/dist/core/run.js +61 -25
  54. package/dist/credential/index.d.ts +1 -0
  55. package/dist/credential/index.js +1 -0
  56. package/dist/credential/settle.d.ts +20 -0
  57. package/dist/credential/target.d.ts +6 -0
  58. package/dist/credential/target.js +7 -0
  59. package/dist/resources/github/command.d.ts +54 -2
  60. package/dist/resources/github/config.js +1 -1
  61. package/dist/resources/github/index.js +1 -1
  62. package/dist/resources/github/resource.js +2 -2
  63. package/dist/resources/testserver/command.d.ts +208 -10
  64. package/dist/resources/testserver/command.js +7 -0
  65. package/dist/resources/testserver/commands/create/command.d.ts +808 -1
  66. package/dist/resources/testserver/commands/create/command.js +64 -23
  67. package/dist/resources/testserver/commands/create/metadata.js +6 -2
  68. package/dist/resources/testserver/commands/create/outcomes.d.ts +347 -0
  69. package/dist/resources/testserver/commands/create/outcomes.js +14 -1
  70. package/dist/resources/testserver/commands/list/command.d.ts +84 -1
  71. package/dist/resources/testserver/commands/list/command.js +1 -1
  72. package/dist/resources/testserver/commands/list/outcomes.d.ts +16 -0
  73. package/dist/resources/testserver/config.js +14 -4
  74. package/dist/resources/testserver/events.d.ts +9 -0
  75. package/dist/resources/testserver/index.js +8 -7
  76. package/dist/resources/testserver/lane.js +1 -0
  77. package/dist/resources/testserver/live/gateways.d.ts +2 -0
  78. package/dist/resources/testserver/live/gateways.js +16 -3
  79. package/dist/resources/testserver/pool/channels.d.ts +5 -2
  80. package/dist/resources/testserver/pool/channels.js +1 -1
  81. package/dist/resources/testserver/pool/create.d.ts +6 -2
  82. package/dist/resources/testserver/pool/create.js +6 -5
  83. package/dist/resources/testserver/pool/index.d.ts +1 -0
  84. package/dist/resources/testserver/pool/index.js +1 -0
  85. package/dist/resources/testserver/pool/pull-request.d.ts +89 -0
  86. package/dist/resources/testserver/pool/pull-request.js +85 -0
  87. package/dist/resources/testserver/pr-build-facts.d.ts +130 -0
  88. package/dist/resources/testserver/pr-build-facts.js +261 -0
  89. package/dist/resources/testserver/presentation.d.ts +2 -2
  90. package/dist/resources/testserver/presentation.js +12 -3
  91. package/dist/resources/testserver/provider.d.ts +16 -6
  92. package/dist/resources/testserver/provider.js +46 -15
  93. package/dist/resources/testserver/pull-request/gateways.d.ts +117 -0
  94. package/dist/resources/testserver/pull-request/gateways.js +5 -0
  95. package/dist/resources/testserver/pull-request/index.d.ts +5 -0
  96. package/dist/resources/testserver/pull-request/index.js +6 -0
  97. package/dist/resources/testserver/pull-request/live/github-rest.d.ts +28 -0
  98. package/dist/resources/testserver/pull-request/live/github-rest.js +114 -0
  99. package/dist/resources/testserver/pull-request/live/github-token-gateway.d.ts +12 -0
  100. package/dist/resources/testserver/pull-request/live/github-token-gateway.js +39 -0
  101. package/dist/resources/testserver/pull-request/live/pull-request-gateway.d.ts +10 -0
  102. package/dist/resources/testserver/pull-request/live/pull-request-gateway.js +27 -0
  103. package/dist/resources/testserver/pull-request/live/testserver-workflow-gateway.d.ts +21 -0
  104. package/dist/resources/testserver/pull-request/live/testserver-workflow-gateway.js +64 -0
  105. package/dist/resources/testserver/ran.d.ts +5 -0
  106. package/dist/resources/testserver/ran.js +19 -3
  107. package/dist/resources/testserver/resource.d.ts +5 -1
  108. package/dist/resources/testserver/resource.js +2 -2
  109. package/dist/resources/testserver/sandbox/build-reference.d.ts +38 -0
  110. package/dist/resources/testserver/sandbox/build-reference.js +79 -0
  111. package/dist/resources/testserver/sandbox/index.d.ts +1 -0
  112. package/dist/resources/testserver/sandbox/index.js +1 -0
  113. package/dist/resources.d.ts +265 -15
  114. package/dist/runner/events.d.ts +64 -1
  115. package/dist/runner/gateways.d.ts +17 -6
  116. package/dist/runner/index.d.ts +5 -4
  117. package/dist/runner/index.js +4 -3
  118. package/dist/runner/live/snapshot-records.js +18 -4
  119. package/dist/runner/prepare.d.ts +23 -4
  120. package/dist/runner/prepare.js +13 -3
  121. package/dist/runner/ready.d.ts +7 -3
  122. package/dist/runner/ready.js +11 -5
  123. package/dist/runner/scope.d.ts +17 -1
  124. package/dist/runner/scope.js +4 -0
  125. package/dist/runner/snapshot-build.d.ts +3 -1
  126. package/dist/runner/snapshot-build.js +12 -2
  127. package/dist/runner/snapshot-cache.d.ts +46 -8
  128. package/dist/runner/snapshot-cache.js +60 -11
  129. package/dist/runner/snapshot-key.d.ts +12 -1
  130. package/dist/runner/snapshot-key.js +17 -1
  131. package/dist/runner/snapshot-save.d.ts +53 -0
  132. package/dist/runner/snapshot-save.js +148 -0
  133. package/dist/sdk/index.js +2 -2
  134. package/dist/story/align.d.ts +1 -1
  135. package/dist/story/align.js +1 -1
  136. package/dist/story/command-line.d.ts +34 -0
  137. package/dist/story/command-line.js +100 -0
  138. package/dist/story/definition.d.ts +22 -15
  139. package/dist/story/definition.js +2 -2
  140. package/dist/story/errors.js +1 -1
  141. package/dist/story/gateways.d.ts +45 -25
  142. package/dist/story/gateways.js +2 -2
  143. package/dist/story/host.d.ts +11 -8
  144. package/dist/story/host.js +37 -37
  145. package/dist/story/index.d.ts +2 -1
  146. package/dist/story/index.js +6 -5
  147. package/dist/story/json.d.ts +1 -1
  148. package/dist/story/json.js +2 -2
  149. package/dist/story/live/recording-gateway.d.ts +2 -0
  150. package/dist/story/live/{artifact-gateway.js → recording-gateway.js} +33 -12
  151. package/dist/story/mode.d.ts +2 -2
  152. package/dist/story/mode.js +1 -1
  153. package/dist/story/orphans.d.ts +23 -5
  154. package/dist/story/orphans.js +44 -8
  155. package/dist/story/recording.d.ts +62 -0
  156. package/dist/story/{artifact.js → recording.js} +31 -27
  157. package/dist/story/report.d.ts +21 -9
  158. package/dist/story/report.js +37 -25
  159. package/dist/story/settle.d.ts +23 -21
  160. package/dist/story/settle.js +17 -16
  161. package/dist/story/{run.d.ts → start.d.ts} +18 -17
  162. package/dist/story/{run.js → start.js} +66 -43
  163. package/dist/vercel-cli/context.js +1 -1
  164. package/dist/vercel-cli/index.js +1 -1
  165. package/dist/vitest/config.js +2 -2
  166. package/dist/vitest/fixtures.d.ts +1 -1
  167. package/dist/vitest/fixtures.js +1 -1
  168. package/dist/vitest/index.js +3 -3
  169. package/dist/vitest/plan.js +1 -1
  170. package/package.json +3 -3
  171. package/skills/overview.md +2 -0
  172. package/skills/testserver-builds.md +80 -0
  173. package/dist/story/artifact.d.ts +0 -60
  174. package/dist/story/live/artifact-gateway.d.ts +0 -2
@@ -0,0 +1,79 @@
1
+ import { isBuildChannel } from "./channels.js";
2
+ /** The one repository whose pull requests have Testserver builds: its PR builds. */
3
+ export const TESTSERVER_REPO = "vercel/api";
4
+ /** A pull request number as written: a positive whole number with no sign or leading zero. */
5
+ const PR_NUMBER = /^[1-9][0-9]*$/;
6
+ /**
7
+ * What `text` names, or the problem with it, worded to follow the option's key as an option rule's problem is:
8
+ *
9
+ * - `pr:<N>`, N a positive whole number with no sign or leading zero, is a PR build reference;
10
+ * - an `http` or `https` URL on `github.com` or `www.github.com` whose path is `/vercel/api/pull/<N>`, with any
11
+ * further segments (`/files`, `/checks`, `/commits/<sha>`), a trailing slash, a query or a fragment, is one too;
12
+ * the owner and repository match in any case;
13
+ * - another `github.com` pull request URL, another `github.com` URL, or a bad `pr:` number is a problem;
14
+ * - `stable` and `latest_main` are build channels, and anything else is a build named directly.
15
+ */
16
+ export function parseBuildReference(text) {
17
+ if (isBuildChannel(text))
18
+ return { ok: true, reference: { kind: "channel", channel: text } };
19
+ if (text.startsWith("pr:")) {
20
+ const number = pullRequestNumber(text.slice("pr:".length));
21
+ return number === undefined
22
+ ? {
23
+ ok: false,
24
+ problem: `must name a pull request number after pr:, such as pr:104196, not ${JSON.stringify(text)}`,
25
+ }
26
+ : { ok: true, reference: { kind: "pull-request", number } };
27
+ }
28
+ const url = gitHubUrl(text);
29
+ if (url === undefined)
30
+ return { ok: true, reference: { kind: "named", build: text } };
31
+ const [owner, repo, pull, number] = url.pathname.split("/").slice(1);
32
+ const parsed = pull === "pull" && number !== undefined ? pullRequestNumber(number) : undefined;
33
+ if (owner === undefined || repo === undefined || parsed === undefined)
34
+ return {
35
+ ok: false,
36
+ problem: `must be a ${TESTSERVER_REPO} pull request URL, such as https://github.com/${TESTSERVER_REPO}/pull/104196, not ${JSON.stringify(text)}`,
37
+ };
38
+ if (`${owner}/${repo}`.toLowerCase() !== TESTSERVER_REPO)
39
+ return {
40
+ ok: false,
41
+ problem: `must be a ${TESTSERVER_REPO} pull request: only ${TESTSERVER_REPO} pull requests have Testserver builds, not ${owner}/${repo}`,
42
+ };
43
+ return { ok: true, reference: { kind: "pull-request", number: parsed } };
44
+ }
45
+ /** How a reference is written once settled: the channel, `pr:<N>` or the build's name. */
46
+ export function buildReferenceText(reference) {
47
+ switch (reference.kind) {
48
+ case "channel":
49
+ return reference.channel;
50
+ case "pull-request":
51
+ return `pr:${reference.number}`;
52
+ case "named":
53
+ return reference.build;
54
+ }
55
+ }
56
+ /** A commit's short form, as GitHub shows it: its first 7 characters. */
57
+ export function shortSha(sha) {
58
+ return sha.slice(0, 7);
59
+ }
60
+ /** `text` as a pull request number, or undefined when it isn't one. */
61
+ function pullRequestNumber(text) {
62
+ if (!PR_NUMBER.test(text))
63
+ return undefined;
64
+ const number = Number(text);
65
+ return Number.isSafeInteger(number) ? number : undefined;
66
+ }
67
+ /** `text` as an `http` or `https` URL on GitHub's web host, or undefined when it isn't one. */
68
+ function gitHubUrl(text) {
69
+ let url;
70
+ try {
71
+ url = new URL(text);
72
+ }
73
+ catch {
74
+ return undefined;
75
+ }
76
+ if (url.protocol !== "https:" && url.protocol !== "http:")
77
+ return undefined;
78
+ return url.hostname === "github.com" || url.hostname === "www.github.com" ? url : undefined;
79
+ }
@@ -1,3 +1,4 @@
1
+ export { type BuildReference, buildReferenceText, parseBuildReference, shortSha, TESTSERVER_REPO, } from "./build-reference.ts";
1
2
  export { BUILD_CHANNELS, type BuildChannel, isBuildChannel, resolveChannel } from "./channels.ts";
2
3
  export { CREATE_ATTEMPTS, createSandbox, DEFAULT_TTL_MINUTES, describeTtl, invalidTtlMessage } from "./create.ts";
3
4
  export { createFailureText, describeCreateFailure, mayLeaveSandbox } from "./create-failure.ts";
@@ -1,5 +1,6 @@
1
1
  // The Testserver folder's `sandbox/` barrel, for the other files in `resources/testserver/`. Code outside that folder
2
2
  // imports `resources/testserver/index.ts` instead.
3
+ export { buildReferenceText, parseBuildReference, shortSha, TESTSERVER_REPO, } from "./build-reference.js";
3
4
  export { BUILD_CHANNELS, isBuildChannel, resolveChannel } from "./channels.js";
4
5
  export { CREATE_ATTEMPTS, createSandbox, DEFAULT_TTL_MINUTES, describeTtl, invalidTtlMessage } from "./create.js";
5
6
  export { createFailureText, describeCreateFailure, mayLeaveSandbox } from "./create-failure.js";
@@ -21,13 +21,39 @@ export declare const PROVIDERS: readonly [import("./core/provider.ts").Provider<
21
21
  set: "set";
22
22
  }>;
23
23
  }, import("zod/v4/core").$strip>;
24
+ }, {
25
+ readonly githubTokenMissing: {
26
+ readonly exitCode: 2;
27
+ readonly description: "The run holds resources.githubFixtureRepo, required (optional is false: in the file, by --set resources.githubFixtureRepo.optional=false, or by default), and the host environment variable its tokenEnv names is unset or empty, so the run didn't start.";
28
+ readonly schema: import("zod").ZodObject<{
29
+ tokenEnv: import("zod").ZodString;
30
+ repo: import("zod").ZodString;
31
+ configFile: import("zod").ZodNullable<import("zod").ZodString>;
32
+ requiredBy: import("zod").ZodEnum<{
33
+ config: "config";
34
+ set: "set";
35
+ }>;
36
+ }, import("zod/v4/core").$strip>;
37
+ readonly render: ({ tokenEnv, repo, requiredBy }: {
38
+ tokenEnv: string;
39
+ repo: string;
40
+ configFile: string | null;
41
+ requiredBy: "config" | "set";
42
+ }) => {
43
+ message: string;
44
+ next: {
45
+ type: "text";
46
+ text: string;
47
+ }[];
48
+ };
49
+ };
24
50
  }>;
25
51
  refusalErrors: {
26
52
  readonly githubFixtureRepoUnavailable: import("@vercel/clinkr").DataErrorDefinition<import("zod").ZodObject<{
27
53
  repo: import("zod").ZodString;
28
54
  status: import("zod").ZodNullable<import("zod").ZodNumber>;
29
55
  message: import("zod").ZodString;
30
- }, import("zod/v4/core").$strip>>;
56
+ }, import("zod/v4/core").$strip>, readonly []>;
31
57
  };
32
58
  settle: ({ options, env, configFile }: import("./core/command-provider.ts").ResourceSettleInput<import("./resources/github/provider.ts").GitHubFixtureRepoKind>) => {
33
59
  readonly ok: false;
@@ -56,12 +82,82 @@ export declare const PROVIDERS: readonly [import("./core/provider.ts").Provider<
56
82
  path: import("zod").ZodString;
57
83
  message: import("zod").ZodString;
58
84
  }, import("zod/v4/core").$strip>;
85
+ }, {
86
+ readonly poolUnavailable: {
87
+ readonly exitCode: 1;
88
+ readonly description: "storm couldn't use the pool, so it minted no credential and didn't run the command.";
89
+ readonly schema: import("zod").ZodObject<{
90
+ path: import("zod").ZodString;
91
+ message: import("zod").ZodString;
92
+ }, import("zod/v4/core").$strip>;
93
+ readonly render: ({ path, message }: {
94
+ path: string;
95
+ message: string;
96
+ }) => {
97
+ message: string;
98
+ rows: [string, string][];
99
+ next: {
100
+ type: "text";
101
+ text: string;
102
+ }[];
103
+ };
104
+ };
59
105
  }>;
60
106
  refusalErrors: {
107
+ readonly pullRequestUnreadable: import("@vercel/clinkr").DataErrorDefinition<import("zod").ZodObject<{
108
+ pr: import("zod").ZodNumber;
109
+ repo: import("zod").ZodString;
110
+ kind: import("zod").ZodEnum<{
111
+ "connect-failed": "connect-failed";
112
+ "http-error": "http-error";
113
+ malformed: "malformed";
114
+ "no-token": "no-token";
115
+ "not-found": "not-found";
116
+ rejected: "rejected";
117
+ timeout: "timeout";
118
+ }>;
119
+ status: import("zod").ZodNullable<import("zod").ZodNumber>;
120
+ message: import("zod").ZodNullable<import("zod").ZodString>;
121
+ tokenOrigin: import("zod").ZodNullable<import("zod").ZodEnum<{
122
+ GH_TOKEN: "GH_TOKEN";
123
+ GITHUB_TOKEN: "GITHUB_TOKEN";
124
+ "gh auth token": "gh auth token";
125
+ }>>;
126
+ }, import("zod/v4/core").$strip>, readonly []>;
127
+ readonly prBuildsUnlisted: import("@vercel/clinkr").DataErrorDefinition<import("zod").ZodObject<{
128
+ pr: import("zod").ZodNumber;
129
+ failure: import("zod").ZodObject<{
130
+ kind: import("zod").ZodEnum<{
131
+ "connect-failed": "connect-failed";
132
+ "http-error": "http-error";
133
+ malformed: "malformed";
134
+ "not-found": "not-found";
135
+ rejected: "rejected";
136
+ timeout: "timeout";
137
+ }>;
138
+ status: import("zod").ZodNullable<import("zod").ZodNumber>;
139
+ detail: import("zod").ZodString;
140
+ }, import("zod/v4/core").$strip>;
141
+ }, import("zod/v4/core").$strip>, readonly []>;
142
+ readonly prBuildNotReady: import("@vercel/clinkr").DataErrorDefinition<import("zod").ZodObject<{
143
+ pr: import("zod").ZodNumber;
144
+ headSha: import("zod").ZodString;
145
+ newest: import("zod").ZodNullable<import("zod").ZodObject<{
146
+ build: import("zod").ZodString;
147
+ headSha: import("zod").ZodString;
148
+ createdAt: import("zod").ZodString;
149
+ }, import("zod/v4/core").$strip>>;
150
+ }, import("zod/v4/core").$strip>, readonly []>;
151
+ readonly prBuildExpired: import("@vercel/clinkr").DataErrorDefinition<import("zod").ZodObject<{
152
+ pr: import("zod").ZodNumber;
153
+ headSha: import("zod").ZodString;
154
+ build: import("zod").ZodString;
155
+ expiresAt: import("zod").ZodString;
156
+ }, import("zod/v4/core").$strip>, readonly []>;
61
157
  readonly poolUnreadable: import("@vercel/clinkr").DataErrorDefinition<import("zod").ZodObject<{
62
158
  path: import("zod").ZodString;
63
159
  message: import("zod").ZodString;
64
- }, import("zod/v4/core").$strip>>;
160
+ }, import("zod/v4/core").$strip>, readonly []>;
65
161
  readonly tokenRequestFailed: import("@vercel/clinkr").DataErrorDefinition<import("zod").ZodObject<{
66
162
  cause: import("zod").ZodEnum<{
67
163
  "request-failed": "request-failed";
@@ -89,7 +185,7 @@ export declare const PROVIDERS: readonly [import("./core/provider.ts").Provider<
89
185
  detail: import("zod").ZodNullable<import("zod").ZodString>;
90
186
  }, import("zod/v4/core").$strip>>;
91
187
  sandboxMayExist: import("zod").ZodBoolean;
92
- }, import("zod/v4/core").$strip>>;
188
+ }, import("zod/v4/core").$strip>, readonly []>;
93
189
  readonly credentialRejected: import("@vercel/clinkr").DataErrorDefinition<import("zod").ZodObject<{
94
190
  origin: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
95
191
  source: import("zod").ZodLiteral<"mint">;
@@ -124,7 +220,7 @@ export declare const PROVIDERS: readonly [import("./core/provider.ts").Provider<
124
220
  message: import("zod").ZodString;
125
221
  }, import("zod/v4/core").$strip>>;
126
222
  sandboxMayExist: import("zod").ZodBoolean;
127
- }, import("zod/v4/core").$strip>>;
223
+ }, import("zod/v4/core").$strip>, readonly []>;
128
224
  readonly noSandboxes: import("@vercel/clinkr").DataErrorDefinition<import("zod").ZodObject<{
129
225
  requested: import("zod").ZodNumber;
130
226
  ttlMinutes: import("zod").ZodNumber;
@@ -141,11 +237,11 @@ export declare const PROVIDERS: readonly [import("./core/provider.ts").Provider<
141
237
  detail: import("zod").ZodNullable<import("zod").ZodString>;
142
238
  }, import("zod/v4/core").$strip>>;
143
239
  sandboxMayExist: import("zod").ZodBoolean;
144
- }, import("zod/v4/core").$strip>>;
240
+ }, import("zod/v4/core").$strip>, readonly []>;
145
241
  readonly noUsableSandboxes: import("@vercel/clinkr").DataErrorDefinition<import("zod").ZodObject<{
146
242
  requested: import("zod").ZodNumber;
147
243
  build: import("zod").ZodString;
148
- }, import("zod/v4/core").$strip>>;
244
+ }, import("zod/v4/core").$strip>, readonly []>;
149
245
  };
150
246
  settle: ({ options }: import("./core/command-provider.ts").ResourceSettleInput<import("./resources/testserver/provider.ts").TestserverPoolKind>) => {
151
247
  ok: true;
@@ -158,6 +254,64 @@ export declare const PROVIDERS: readonly [import("./core/provider.ts").Provider<
158
254
  readonly failure: import("./resources/testserver/pool/gateways.ts").PoolStoreFailure;
159
255
  }) => import("@vercel/clinkr").CommandError<"pool_unavailable">;
160
256
  refusalFacts: (refusal: import("./resources/testserver/provider.ts").TestserverRefusal) => {
257
+ readonly key: "pullRequestUnreadable";
258
+ readonly data: import("zod").input<import("zod").ZodObject<{
259
+ pr: import("zod").ZodNumber;
260
+ repo: import("zod").ZodString;
261
+ kind: import("zod").ZodEnum<{
262
+ "connect-failed": "connect-failed";
263
+ "http-error": "http-error";
264
+ malformed: "malformed";
265
+ "no-token": "no-token";
266
+ "not-found": "not-found";
267
+ rejected: "rejected";
268
+ timeout: "timeout";
269
+ }>;
270
+ status: import("zod").ZodNullable<import("zod").ZodNumber>;
271
+ message: import("zod").ZodNullable<import("zod").ZodString>;
272
+ tokenOrigin: import("zod").ZodNullable<import("zod").ZodEnum<{
273
+ GH_TOKEN: "GH_TOKEN";
274
+ GITHUB_TOKEN: "GITHUB_TOKEN";
275
+ "gh auth token": "gh auth token";
276
+ }>>;
277
+ }, import("zod/v4/core").$strip>>;
278
+ } | {
279
+ readonly key: "prBuildsUnlisted";
280
+ readonly data: import("zod").input<import("zod").ZodObject<{
281
+ pr: import("zod").ZodNumber;
282
+ failure: import("zod").ZodObject<{
283
+ kind: import("zod").ZodEnum<{
284
+ "connect-failed": "connect-failed";
285
+ "http-error": "http-error";
286
+ malformed: "malformed";
287
+ "not-found": "not-found";
288
+ rejected: "rejected";
289
+ timeout: "timeout";
290
+ }>;
291
+ status: import("zod").ZodNullable<import("zod").ZodNumber>;
292
+ detail: import("zod").ZodString;
293
+ }, import("zod/v4/core").$strip>;
294
+ }, import("zod/v4/core").$strip>>;
295
+ } | {
296
+ readonly key: "prBuildNotReady";
297
+ readonly data: import("zod").input<import("zod").ZodObject<{
298
+ pr: import("zod").ZodNumber;
299
+ headSha: import("zod").ZodString;
300
+ newest: import("zod").ZodNullable<import("zod").ZodObject<{
301
+ build: import("zod").ZodString;
302
+ headSha: import("zod").ZodString;
303
+ createdAt: import("zod").ZodString;
304
+ }, import("zod/v4/core").$strip>>;
305
+ }, import("zod/v4/core").$strip>>;
306
+ } | {
307
+ readonly key: "prBuildExpired";
308
+ readonly data: import("zod").input<import("zod").ZodObject<{
309
+ pr: import("zod").ZodNumber;
310
+ headSha: import("zod").ZodString;
311
+ build: import("zod").ZodString;
312
+ expiresAt: import("zod").ZodString;
313
+ }, import("zod/v4/core").$strip>>;
314
+ } | {
161
315
  key: "poolUnreadable";
162
316
  data: {
163
317
  path: string;
@@ -302,12 +456,62 @@ export declare const RESOURCE_ERRORS: import("./commands/exec/cleanup.ts").WithC
302
456
  repo: import("zod").ZodString;
303
457
  status: import("zod").ZodNullable<import("zod").ZodNumber>;
304
458
  message: import("zod").ZodString;
305
- }, import("zod/v4/core").$strip>>;
459
+ }, import("zod/v4/core").$strip>, readonly []>;
306
460
  } & {
461
+ readonly pullRequestUnreadable: import("@vercel/clinkr").DataErrorDefinition<import("zod").ZodObject<{
462
+ pr: import("zod").ZodNumber;
463
+ repo: import("zod").ZodString;
464
+ kind: import("zod").ZodEnum<{
465
+ "connect-failed": "connect-failed";
466
+ "http-error": "http-error";
467
+ malformed: "malformed";
468
+ "no-token": "no-token";
469
+ "not-found": "not-found";
470
+ rejected: "rejected";
471
+ timeout: "timeout";
472
+ }>;
473
+ status: import("zod").ZodNullable<import("zod").ZodNumber>;
474
+ message: import("zod").ZodNullable<import("zod").ZodString>;
475
+ tokenOrigin: import("zod").ZodNullable<import("zod").ZodEnum<{
476
+ GH_TOKEN: "GH_TOKEN";
477
+ GITHUB_TOKEN: "GITHUB_TOKEN";
478
+ "gh auth token": "gh auth token";
479
+ }>>;
480
+ }, import("zod/v4/core").$strip>, readonly []>;
481
+ readonly prBuildsUnlisted: import("@vercel/clinkr").DataErrorDefinition<import("zod").ZodObject<{
482
+ pr: import("zod").ZodNumber;
483
+ failure: import("zod").ZodObject<{
484
+ kind: import("zod").ZodEnum<{
485
+ "connect-failed": "connect-failed";
486
+ "http-error": "http-error";
487
+ malformed: "malformed";
488
+ "not-found": "not-found";
489
+ rejected: "rejected";
490
+ timeout: "timeout";
491
+ }>;
492
+ status: import("zod").ZodNullable<import("zod").ZodNumber>;
493
+ detail: import("zod").ZodString;
494
+ }, import("zod/v4/core").$strip>;
495
+ }, import("zod/v4/core").$strip>, readonly []>;
496
+ readonly prBuildNotReady: import("@vercel/clinkr").DataErrorDefinition<import("zod").ZodObject<{
497
+ pr: import("zod").ZodNumber;
498
+ headSha: import("zod").ZodString;
499
+ newest: import("zod").ZodNullable<import("zod").ZodObject<{
500
+ build: import("zod").ZodString;
501
+ headSha: import("zod").ZodString;
502
+ createdAt: import("zod").ZodString;
503
+ }, import("zod/v4/core").$strip>>;
504
+ }, import("zod/v4/core").$strip>, readonly []>;
505
+ readonly prBuildExpired: import("@vercel/clinkr").DataErrorDefinition<import("zod").ZodObject<{
506
+ pr: import("zod").ZodNumber;
507
+ headSha: import("zod").ZodString;
508
+ build: import("zod").ZodString;
509
+ expiresAt: import("zod").ZodString;
510
+ }, import("zod/v4/core").$strip>, readonly []>;
307
511
  readonly poolUnreadable: import("@vercel/clinkr").DataErrorDefinition<import("zod").ZodObject<{
308
512
  path: import("zod").ZodString;
309
513
  message: import("zod").ZodString;
310
- }, import("zod/v4/core").$strip>>;
514
+ }, import("zod/v4/core").$strip>, readonly []>;
311
515
  readonly tokenRequestFailed: import("@vercel/clinkr").DataErrorDefinition<import("zod").ZodObject<{
312
516
  cause: import("zod").ZodEnum<{
313
517
  "request-failed": "request-failed";
@@ -335,7 +539,7 @@ export declare const RESOURCE_ERRORS: import("./commands/exec/cleanup.ts").WithC
335
539
  detail: import("zod").ZodNullable<import("zod").ZodString>;
336
540
  }, import("zod/v4/core").$strip>>;
337
541
  sandboxMayExist: import("zod").ZodBoolean;
338
- }, import("zod/v4/core").$strip>>;
542
+ }, import("zod/v4/core").$strip>, readonly []>;
339
543
  readonly credentialRejected: import("@vercel/clinkr").DataErrorDefinition<import("zod").ZodObject<{
340
544
  origin: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
341
545
  source: import("zod").ZodLiteral<"mint">;
@@ -370,7 +574,7 @@ export declare const RESOURCE_ERRORS: import("./commands/exec/cleanup.ts").WithC
370
574
  message: import("zod").ZodString;
371
575
  }, import("zod/v4/core").$strip>>;
372
576
  sandboxMayExist: import("zod").ZodBoolean;
373
- }, import("zod/v4/core").$strip>>;
577
+ }, import("zod/v4/core").$strip>, readonly []>;
374
578
  readonly noSandboxes: import("@vercel/clinkr").DataErrorDefinition<import("zod").ZodObject<{
375
579
  requested: import("zod").ZodNumber;
376
580
  ttlMinutes: import("zod").ZodNumber;
@@ -387,11 +591,11 @@ export declare const RESOURCE_ERRORS: import("./commands/exec/cleanup.ts").WithC
387
591
  detail: import("zod").ZodNullable<import("zod").ZodString>;
388
592
  }, import("zod/v4/core").$strip>>;
389
593
  sandboxMayExist: import("zod").ZodBoolean;
390
- }, import("zod/v4/core").$strip>>;
594
+ }, import("zod/v4/core").$strip>, readonly []>;
391
595
  readonly noUsableSandboxes: import("@vercel/clinkr").DataErrorDefinition<import("zod").ZodObject<{
392
596
  requested: import("zod").ZodNumber;
393
597
  build: import("zod").ZodString;
394
- }, import("zod/v4/core").$strip>>;
598
+ }, import("zod/v4/core").$strip>, readonly []>;
395
599
  }> & import("@vercel/clinkr").SharedErrors<{
396
600
  githubTokenMissing: import("zod").ZodObject<{
397
601
  tokenEnv: import("zod").ZodString;
@@ -402,11 +606,57 @@ export declare const RESOURCE_ERRORS: import("./commands/exec/cleanup.ts").WithC
402
606
  set: "set";
403
607
  }>;
404
608
  }, import("zod/v4/core").$strip>;
609
+ }, {
610
+ readonly githubTokenMissing: {
611
+ readonly exitCode: 2;
612
+ readonly description: "The run holds resources.githubFixtureRepo, required (optional is false: in the file, by --set resources.githubFixtureRepo.optional=false, or by default), and the host environment variable its tokenEnv names is unset or empty, so the run didn't start.";
613
+ readonly schema: import("zod").ZodObject<{
614
+ tokenEnv: import("zod").ZodString;
615
+ repo: import("zod").ZodString;
616
+ configFile: import("zod").ZodNullable<import("zod").ZodString>;
617
+ requiredBy: import("zod").ZodEnum<{
618
+ config: "config";
619
+ set: "set";
620
+ }>;
621
+ }, import("zod/v4/core").$strip>;
622
+ readonly render: ({ tokenEnv, repo, requiredBy }: {
623
+ tokenEnv: string;
624
+ repo: string;
625
+ configFile: string | null;
626
+ requiredBy: "config" | "set";
627
+ }) => {
628
+ message: string;
629
+ next: {
630
+ type: "text";
631
+ text: string;
632
+ }[];
633
+ };
634
+ };
405
635
  }> & import("@vercel/clinkr").SharedErrors<{
406
636
  poolUnavailable: import("zod").ZodObject<{
407
637
  path: import("zod").ZodString;
408
638
  message: import("zod").ZodString;
409
639
  }, import("zod/v4/core").$strip>;
640
+ }, {
641
+ readonly poolUnavailable: {
642
+ readonly exitCode: 1;
643
+ readonly description: "storm couldn't use the pool, so it minted no credential and didn't run the command.";
644
+ readonly schema: import("zod").ZodObject<{
645
+ path: import("zod").ZodString;
646
+ message: import("zod").ZodString;
647
+ }, import("zod/v4/core").$strip>;
648
+ readonly render: ({ path, message }: {
649
+ path: string;
650
+ message: string;
651
+ }) => {
652
+ message: string;
653
+ rows: [string, string][];
654
+ next: {
655
+ type: "text";
656
+ text: string;
657
+ }[];
658
+ };
659
+ };
410
660
  }>;
411
661
  /**
412
662
  * Every resource's command half, bound to its name: what `exec` and `vitest` settle and report through, and
@@ -414,12 +664,12 @@ export declare const RESOURCE_ERRORS: import("./commands/exec/cleanup.ts").WithC
414
664
  * cleanup.
415
665
  */
416
666
  export declare const RESOURCE_COMMANDS: {
417
- settle(options: import("./core/resource.ts").ResourceOptions<Resources>, env: Readonly<Record<string, string | undefined>>, configFile: string | null): import("@vercel/clinkr").Refusable<import("./core/command-slots.ts").ResourcesSettlement<Resources>, import("@vercel/clinkr").CommandError<"credential_rejected" | "github_fixture_repo_unavailable" | "github_token_missing" | "no_sandboxes" | "no_usable_sandboxes" | "pool_unavailable" | "pool_unreadable" | "token_request_failed">>;
667
+ settle(options: import("./core/resource.ts").ResourceOptions<Resources>, env: Readonly<Record<string, string | undefined>>, configFile: string | null): import("@vercel/clinkr").Refusable<import("./core/command-slots.ts").ResourcesSettlement<Resources>, import("@vercel/clinkr").CommandError<"credential_rejected"> | import("@vercel/clinkr").CommandError<"github_fixture_repo_unavailable"> | import("@vercel/clinkr").CommandError<"github_token_missing"> | import("@vercel/clinkr").CommandError<"no_sandboxes"> | import("@vercel/clinkr").CommandError<"no_usable_sandboxes"> | import("@vercel/clinkr").CommandError<"pool_unavailable"> | import("@vercel/clinkr").CommandError<"pool_unreadable"> | import("@vercel/clinkr").CommandError<"pr_build_expired"> | import("@vercel/clinkr").CommandError<"pr_build_not_ready"> | import("@vercel/clinkr").CommandError<"pr_builds_unlisted"> | import("@vercel/clinkr").CommandError<"pull_request_unreadable"> | import("@vercel/clinkr").CommandError<"token_request_failed">>;
418
668
  takesCredential(options: import("./core/resource.ts").ResourceOptions<Resources>): boolean;
419
669
  refusalFacts(outcome: ResourceRefusal<Resources>): import("./core/command-provider.ts").RefusalFact;
420
- unpreparedError(outcome: import("./core/resource.ts").ResourceUnprepared<Resources>): import("@vercel/clinkr").CommandError<"credential_rejected" | "github_fixture_repo_unavailable" | "github_token_missing" | "no_sandboxes" | "no_usable_sandboxes" | "pool_unavailable" | "pool_unreadable" | "token_request_failed">;
670
+ unpreparedError(outcome: import("./core/resource.ts").ResourceUnprepared<Resources>): import("@vercel/clinkr").CommandError<"credential_rejected"> | import("@vercel/clinkr").CommandError<"github_fixture_repo_unavailable"> | import("@vercel/clinkr").CommandError<"github_token_missing"> | import("@vercel/clinkr").CommandError<"no_sandboxes"> | import("@vercel/clinkr").CommandError<"no_usable_sandboxes"> | import("@vercel/clinkr").CommandError<"pool_unavailable"> | import("@vercel/clinkr").CommandError<"pool_unreadable"> | import("@vercel/clinkr").CommandError<"pr_build_expired"> | import("@vercel/clinkr").CommandError<"pr_build_not_ready"> | import("@vercel/clinkr").CommandError<"pr_builds_unlisted"> | import("@vercel/clinkr").CommandError<"pull_request_unreadable"> | import("@vercel/clinkr").CommandError<"token_request_failed">;
421
671
  canceledLines(resources: import("./core/resource.ts").ResourceCanceledFacts<Resources>, cleanup: ResourceCleanup<Resources>): readonly string[];
422
- refusedError: (outcome: ResourceRefusal<Resources>, cleanup: StormCleanupFacts) => import("@vercel/clinkr").CommandError<"credential_rejected" | "github_fixture_repo_unavailable" | "no_sandboxes" | "no_usable_sandboxes" | "pool_unreadable" | "token_request_failed">;
672
+ refusedError: (outcome: ResourceRefusal<Resources>, cleanup: StormCleanupFacts) => import("@vercel/clinkr").CommandError<"credential_rejected"> | import("@vercel/clinkr").CommandError<"github_fixture_repo_unavailable"> | import("@vercel/clinkr").CommandError<"no_sandboxes"> | import("@vercel/clinkr").CommandError<"no_usable_sandboxes"> | import("@vercel/clinkr").CommandError<"pool_unreadable"> | import("@vercel/clinkr").CommandError<"pr_build_expired"> | import("@vercel/clinkr").CommandError<"pr_build_not_ready"> | import("@vercel/clinkr").CommandError<"pr_builds_unlisted"> | import("@vercel/clinkr").CommandError<"pull_request_unreadable"> | import("@vercel/clinkr").CommandError<"token_request_failed">;
423
673
  };
424
674
  /** Every resource's command tree's mount, which `application.ts` mounts beside the host's own commands. */
425
675
  export declare const RESOURCE_MOUNTS: readonly CommandMount[];
@@ -32,7 +32,8 @@ export interface NotKeptSandbox {
32
32
  /**
33
33
  * What the runner reports, in order.
34
34
  *
35
- * - `snapshot-reused`: the run starts from cached runner snapshot `snapshotId`, of `base`.
35
+ * - `snapshot-reused`: the run starts from cached runner snapshot `snapshotId`, of `base`; for a branch snapshot,
36
+ * saved by a run on `branch` at HEAD commit `head`, each null for a base snapshot.
36
37
  * - `snapshot-build-started`: the run builds a runner snapshot of `base`, because no cached one qualified or
37
38
  * `--rebuild-snapshot` asked; `summary` says what the build does.
38
39
  * - `runner-sandbox-starting`: the runner sandbox is starting from runner snapshot `snapshotId`.
@@ -52,11 +53,19 @@ export interface NotKeptSandbox {
52
53
  * and releasing the run's resources.
53
54
  * - `waiting-for-snapshot`: closing waits up to `settleMs` for a runner snapshot still saving.
54
55
  * - `sandbox-kept`: closing kept runner sandbox `name` running until `stopsAt`, an ISO time.
56
+ * - `branch-snapshot-saving`: the run saves the runner sandbox as a branch snapshot of `branch`, once the command
57
+ * ended (`--save-snapshot`).
58
+ * - `branch-snapshot-saved`: it did, as runner snapshot `snapshotId` of `branch` at HEAD commit `head`, in `ms`.
59
+ * - `branch-snapshot-not-saved`: it didn't, and `save` says why.
60
+ * - `branch-snapshots-dropped`: `--rebuild-snapshot` removed `branch`'s branch snapshot entries from the cache.
61
+ * - `branch-snapshots-not-dropped`: it couldn't list the cache or remove one of them.
55
62
  */
56
63
  export type RunnerEvent = {
57
64
  readonly kind: "snapshot-reused";
58
65
  readonly snapshotId: string;
59
66
  readonly base: string;
67
+ readonly branch: string | null;
68
+ readonly head: string | null;
60
69
  } | {
61
70
  readonly kind: "snapshot-build-started";
62
71
  readonly base: string;
@@ -130,6 +139,29 @@ export type RunnerEvent = {
130
139
  readonly kind: "sandbox-kept";
131
140
  readonly name: string;
132
141
  readonly stopsAt: string;
142
+ } | {
143
+ readonly kind: "branch-snapshot-saving";
144
+ readonly branch: string;
145
+ } | {
146
+ readonly kind: "branch-snapshot-saved";
147
+ readonly snapshotId: string;
148
+ readonly branch: string;
149
+ readonly head: string;
150
+ readonly ms: number;
151
+ readonly sizeBytes: number;
152
+ } | {
153
+ readonly kind: "branch-snapshot-not-saved";
154
+ readonly save: Exclude<RunnerSave, {
155
+ readonly kind: "saved" | "skipped";
156
+ }>;
157
+ } | {
158
+ readonly kind: "branch-snapshots-dropped";
159
+ readonly branch: string;
160
+ readonly snapshotIds: readonly string[];
161
+ } | {
162
+ readonly kind: "branch-snapshots-not-dropped";
163
+ readonly branch: string;
164
+ readonly failure: RunnerSnapshotCacheFailure;
133
165
  };
134
166
  /** Hears the runner's events as they happen. */
135
167
  export interface RunnerProgress {
@@ -159,6 +191,37 @@ export type RunnerFailure = {
159
191
  readonly kind: "checkout-failed";
160
192
  readonly failure: CheckoutFailure;
161
193
  };
194
+ /**
195
+ * How saving the runner sandbox as a branch snapshot ended (`--save-snapshot`).
196
+ *
197
+ * - `saved`: it is runner snapshot `snapshotId` of `base`, for `branch` at HEAD commit `head`, saved in `ms` from the
198
+ * save's start; `entryWritten` says whether the cache recorded it.
199
+ * - `skipped`: HEAD was detached as the run started, so there is no branch to save it for (`prepareRunner`); the run
200
+ * keeps its runner sandbox as without the flag.
201
+ * - `failed`: the scrub or the save failed with `message`.
202
+ * - `stopped`: a signal stopped it before it saved, or before the cache recorded the snapshot.
203
+ *
204
+ * A run on a branch never keeps its runner sandbox, whether the save ran or how it ended (`RunnerSandboxPlan`).
205
+ */
206
+ export type RunnerSave = {
207
+ readonly kind: "saved";
208
+ readonly snapshotId: string;
209
+ readonly base: string;
210
+ readonly branch: string;
211
+ readonly head: string;
212
+ readonly ms: number;
213
+ readonly sizeBytes: number;
214
+ readonly entryWritten: boolean;
215
+ } | {
216
+ readonly kind: "skipped";
217
+ readonly reason: "detached-head";
218
+ } | {
219
+ readonly kind: "failed";
220
+ readonly step: "scrub" | "save-snapshot";
221
+ readonly message: string;
222
+ } | {
223
+ readonly kind: "stopped";
224
+ };
162
225
  /** How one stage of readying the runner ended: its value, a failure, or a stop because the run was aborted. */
163
226
  export type RunnerStage<T> = {
164
227
  readonly kind: "ok";
@@ -122,7 +122,8 @@ export interface CheckoutGateway {
122
122
  }
123
123
  /**
124
124
  * One runner snapshot the cache records: who it belongs to, what it was built from, and when it expires. Times
125
- * are ISO strings.
125
+ * are ISO strings. An entry with `branch` and `head` records a branch snapshot, saved from a run on that branch; one
126
+ * without them records a base snapshot, built from its base. An entry has both or neither.
126
127
  */
127
128
  export interface RunnerSnapshotEntry {
128
129
  readonly teamId: string;
@@ -132,8 +133,17 @@ export interface RunnerSnapshotEntry {
132
133
  readonly recipeName: string;
133
134
  /** The snapshot key at `base` (`snapshotKey`). */
134
135
  readonly snapshotKey: string;
135
- /** The base commit's full SHA. */
136
+ /** The base commit's full SHA, whose tracked files the snapshot's repository commits first, in either kind. */
136
137
  readonly base: string;
138
+ /** For a branch snapshot, the local branch of the run that saved it. */
139
+ readonly branch?: string;
140
+ /** For a branch snapshot, the full SHA of the HEAD commit of the run that saved it. */
141
+ readonly head?: string;
142
+ /**
143
+ * For a branch snapshot, the root of the checkout the run that saved it ran from. Only a run from that checkout
144
+ * starts from it, so a branch of the same name in another checkout never inherits what this run left.
145
+ */
146
+ readonly repoRoot?: string;
137
147
  readonly snapshotId: string;
138
148
  readonly createdAt: string;
139
149
  readonly expiresAt: string;
@@ -170,8 +180,9 @@ export type RunnerSnapshotCacheOperation = {
170
180
  };
171
181
  /**
172
182
  * The per-machine runner snapshot cache: one record per runner snapshot, keyed by the entry's identity (team,
173
- * project, region, runtime, recipe name, snapshot key and base). Every method returns its expected failures and
174
- * never rejects. Which entries a run may use, and when one has expired, is the caller's.
183
+ * project, region, runtime, recipe name, snapshot key, base and, for a branch snapshot, branch and checkout root).
184
+ * Every method returns its expected failures and never rejects. Which entries a run may use, and when one has
185
+ * expired, is the caller's.
175
186
  */
176
187
  export interface RunnerSnapshotCacheGateway {
177
188
  /** Every readable entry, and the files it couldn't read. A cache never written is empty. */
@@ -260,7 +271,7 @@ export interface StagedFile {
260
271
  readonly name: string;
261
272
  readonly content: Uint8Array;
262
273
  }
263
- /** A runner snapshot a build sandbox was saved as. */
274
+ /** A runner snapshot a build sandbox or a runner sandbox was saved as. */
264
275
  export interface SavedSnapshot {
265
276
  readonly snapshotId: string;
266
277
  /** When the Sandbox API says it expires, as an ISO string, when it says. */
@@ -319,7 +330,7 @@ export interface RunnerSandboxGateway {
319
330
  readonly path: string;
320
331
  readonly fromLine: number;
321
332
  }, onOutput: (chunk: RemoteOutputChunk) => void, signal?: AbortSignal): Promise<RunnerSandboxOperation>;
322
- /** Saves a build sandbox as a runner snapshot that expires after `expirationMs`; that stops the sandbox. */
333
+ /** Saves a build or runner sandbox as a runner snapshot that expires after `expirationMs`; that stops the sandbox. */
323
334
  saveSnapshot(sandbox: RunnerSandbox, request: {
324
335
  readonly expirationMs: number;
325
336
  }): Promise<RunnerSandboxResult<SavedSnapshot>>;