@cnc-tools/storm 0.5.0 → 0.7.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 (171) hide show
  1. package/dist/build-info.js +1 -1
  2. package/dist/combine-errors.js +2 -2
  3. package/dist/commands/dashboard.js +1 -1
  4. package/dist/commands/{run → exec}/cleanup.d.ts +1 -1
  5. package/dist/commands/{run → exec}/cleanup.js +1 -1
  6. package/dist/commands/{run/outcomes.d.ts → exec/command.d.ts} +103 -112
  7. package/dist/commands/exec/command.js +23 -0
  8. package/dist/commands/{run → exec}/job-summary.d.ts +5 -1
  9. package/dist/commands/{run → exec}/job-summary.js +5 -2
  10. package/dist/commands/{run → exec}/live-view.js +29 -13
  11. package/dist/commands/exec/metadata.d.ts +69 -0
  12. package/dist/commands/exec/metadata.js +55 -0
  13. package/dist/commands/{run → exec}/mint-failed.js +4 -4
  14. package/dist/commands/exec/outcomes.d.ts +664 -0
  15. package/dist/commands/exec/outcomes.js +347 -0
  16. package/dist/commands/{run → exec}/progress.d.ts +14 -2
  17. package/dist/commands/{run → exec}/progress.js +54 -9
  18. package/dist/commands/exec/run-command.d.ts +227 -0
  19. package/dist/commands/exec/run-command.js +696 -0
  20. package/dist/commands/exec/run-metadata.d.ts +59 -0
  21. package/dist/commands/exec/run-metadata.js +61 -0
  22. package/dist/commands/{run → exec}/run-record.d.ts +110 -5
  23. package/dist/commands/{run → exec}/run-record.js +57 -1
  24. package/dist/commands/exec/testserver-flags.d.ts +48 -0
  25. package/dist/commands/exec/testserver-flags.js +80 -0
  26. package/dist/commands/{run → exec}/view.js +36 -4
  27. package/dist/commands/runs/facts.d.ts +25 -0
  28. package/dist/commands/runs/facts.js +38 -5
  29. package/dist/commands/runs/list/command.d.ts +25 -0
  30. package/dist/commands/runs/list/outcomes.d.ts +25 -0
  31. package/dist/commands/runs/logs/metadata.js +1 -1
  32. package/dist/commands/runs/logs/outcomes.js +4 -1
  33. package/dist/commands/runs/past-run.d.ts +2 -2
  34. package/dist/commands/runs/past-run.js +2 -2
  35. package/dist/commands/runs/show/command.d.ts +25 -0
  36. package/dist/commands/runs/show/metadata.js +2 -2
  37. package/dist/commands/runs/show/outcomes.d.ts +25 -0
  38. package/dist/commands/runs/show/outcomes.js +37 -5
  39. package/dist/commands/vitest/command.d.ts +325 -0
  40. package/dist/commands/vitest/command.js +138 -0
  41. package/dist/commands/vitest/metadata.d.ts +69 -0
  42. package/dist/commands/vitest/metadata.js +35 -0
  43. package/dist/commands/vitest/outcomes.d.ts +298 -0
  44. package/dist/commands/vitest/outcomes.js +77 -0
  45. package/dist/config/index.d.ts +2 -1
  46. package/dist/config/index.js +1 -0
  47. package/dist/config/resolve.d.ts +3 -3
  48. package/dist/config/resolve.js +3 -3
  49. package/dist/config/resource-config.d.ts +2 -2
  50. package/dist/config/schema.d.ts +1 -1
  51. package/dist/config/set.d.ts +15 -4
  52. package/dist/config/set.js +28 -12
  53. package/dist/config-file/define.d.ts +8 -6
  54. package/dist/context.d.ts +6 -3
  55. package/dist/context.js +4 -2
  56. package/dist/core/command-provider.d.ts +1 -1
  57. package/dist/core/events.d.ts +9 -7
  58. package/dist/core/presentation.js +1 -1
  59. package/dist/core/presentations.js +1 -1
  60. package/dist/core/run-state.d.ts +30 -6
  61. package/dist/core/run-state.js +19 -4
  62. package/dist/core/run.d.ts +17 -4
  63. package/dist/core/run.js +61 -25
  64. package/dist/resources/testserver/command.d.ts +1 -1
  65. package/dist/resources/testserver/command.js +1 -1
  66. package/dist/resources/testserver/config.d.ts +1 -1
  67. package/dist/resources/testserver/config.js +3 -2
  68. package/dist/resources/testserver/credential-facts.js +1 -1
  69. package/dist/resources/testserver/resource.d.ts +2 -2
  70. package/dist/resources/testserver/sandbox/create.d.ts +2 -2
  71. package/dist/resources/testserver/sandbox/create.js +2 -2
  72. package/dist/resources.d.ts +9 -6
  73. package/dist/resources.js +3 -3
  74. package/dist/runner/events.d.ts +64 -1
  75. package/dist/runner/gateways.d.ts +17 -6
  76. package/dist/runner/index.d.ts +5 -4
  77. package/dist/runner/index.js +4 -3
  78. package/dist/runner/live/snapshot-records.js +18 -4
  79. package/dist/runner/prepare.d.ts +23 -4
  80. package/dist/runner/prepare.js +13 -3
  81. package/dist/runner/ready.d.ts +7 -3
  82. package/dist/runner/ready.js +11 -5
  83. package/dist/runner/scope.d.ts +17 -1
  84. package/dist/runner/scope.js +4 -0
  85. package/dist/runner/snapshot-build.d.ts +3 -1
  86. package/dist/runner/snapshot-build.js +12 -2
  87. package/dist/runner/snapshot-cache.d.ts +46 -8
  88. package/dist/runner/snapshot-cache.js +60 -11
  89. package/dist/runner/snapshot-key.d.ts +12 -1
  90. package/dist/runner/snapshot-key.js +17 -1
  91. package/dist/runner/snapshot-save.d.ts +53 -0
  92. package/dist/runner/snapshot-save.js +148 -0
  93. package/dist/sdk/index.js +1 -1
  94. package/dist/sdk/payload/payload.d.ts +2 -2
  95. package/dist/sdk/payload/payload.js +2 -2
  96. package/dist/story/align.d.ts +1 -1
  97. package/dist/story/align.js +1 -1
  98. package/dist/story/definition.d.ts +22 -15
  99. package/dist/story/definition.js +2 -2
  100. package/dist/story/errors.js +1 -1
  101. package/dist/story/gateways.d.ts +45 -25
  102. package/dist/story/gateways.js +2 -2
  103. package/dist/story/host.d.ts +11 -8
  104. package/dist/story/host.js +37 -37
  105. package/dist/story/index.d.ts +1 -1
  106. package/dist/story/index.js +4 -4
  107. package/dist/story/json.d.ts +1 -1
  108. package/dist/story/json.js +2 -2
  109. package/dist/story/live/recording-gateway.d.ts +2 -0
  110. package/dist/story/live/{artifact-gateway.js → recording-gateway.js} +33 -12
  111. package/dist/story/mode.d.ts +2 -2
  112. package/dist/story/mode.js +1 -1
  113. package/dist/story/orphans.d.ts +23 -5
  114. package/dist/story/orphans.js +44 -8
  115. package/dist/story/recording.d.ts +62 -0
  116. package/dist/story/{artifact.js → recording.js} +31 -27
  117. package/dist/story/report.d.ts +21 -9
  118. package/dist/story/report.js +37 -25
  119. package/dist/story/settle.d.ts +23 -21
  120. package/dist/story/settle.js +17 -16
  121. package/dist/story/{run.d.ts → start.d.ts} +18 -17
  122. package/dist/story/{run.js → start.js} +66 -43
  123. package/dist/vercel-cli/driver.d.ts +1 -1
  124. package/dist/vercel-cli/entry.d.ts +1 -1
  125. package/dist/vercel-cli/entry.js +1 -1
  126. package/dist/vercel-cli/verbose.d.ts +2 -2
  127. package/dist/vercel-cli/verbose.js +2 -2
  128. package/dist/vitest/config.d.ts +5 -5
  129. package/dist/vitest/config.js +5 -5
  130. package/dist/vitest/find-vitest.d.ts +7 -0
  131. package/dist/vitest/find-vitest.js +28 -0
  132. package/dist/vitest/fixtures.d.ts +2 -2
  133. package/dist/vitest/fixtures.js +3 -3
  134. package/dist/vitest/gateways.d.ts +37 -6
  135. package/dist/vitest/gateways.js +3 -2
  136. package/dist/vitest/live/list-gateway.d.ts +7 -3
  137. package/dist/vitest/live/list-gateway.js +55 -8
  138. package/dist/vitest/plan.d.ts +41 -8
  139. package/dist/vitest/plan.js +47 -16
  140. package/dist/vitest/sandbox.d.ts +1 -1
  141. package/dist/vitest/sandbox.js +1 -1
  142. package/dist/vitest/test-events.d.ts +2 -2
  143. package/dist/vitest/test-events.js +3 -3
  144. package/dist/vitest/test-results.d.ts +1 -1
  145. package/dist/vitest/test-results.js +1 -1
  146. package/dist/vitest/types.d.ts +1 -1
  147. package/package.json +2 -2
  148. package/skills/overview.md +5 -4
  149. package/skills/read-run-output.md +1 -1
  150. package/dist/commands/run/command.d.ts +0 -327
  151. package/dist/commands/run/command.js +0 -620
  152. package/dist/commands/run/metadata.d.ts +0 -47
  153. package/dist/commands/run/metadata.js +0 -83
  154. package/dist/commands/run/outcomes.js +0 -332
  155. package/dist/story/artifact.d.ts +0 -60
  156. package/dist/story/live/artifact-gateway.d.ts +0 -2
  157. /package/dist/commands/{run → exec}/live-view.d.ts +0 -0
  158. /package/dist/commands/{run → exec}/mint-failed.d.ts +0 -0
  159. /package/dist/commands/{run → exec}/redaction.d.ts +0 -0
  160. /package/dist/commands/{run → exec}/redaction.js +0 -0
  161. /package/dist/commands/{run → exec}/run-collector.d.ts +0 -0
  162. /package/dist/commands/{run → exec}/run-collector.js +0 -0
  163. /package/dist/commands/{run → exec}/tests-summary.d.ts +0 -0
  164. /package/dist/commands/{run → exec}/tests-summary.js +0 -0
  165. /package/dist/commands/{run → exec}/text.d.ts +0 -0
  166. /package/dist/commands/{run → exec}/text.js +0 -0
  167. /package/dist/commands/{run → exec}/view.d.ts +0 -0
  168. /package/dist/commands/{run → exec}/waterfall.d.ts +0 -0
  169. /package/dist/commands/{run → exec}/waterfall.js +0 -0
  170. /package/dist/commands/{run → exec}/worker-chart.d.ts +0 -0
  171. /package/dist/commands/{run → exec}/worker-chart.js +0 -0
@@ -0,0 +1,664 @@
1
+ import { z } from "zod";
2
+ /** A run's waterfall (`Timeline`), times in milliseconds since the run started, as `timeline.json` holds it too. */
3
+ export declare const timelineSchema: z.ZodObject<{
4
+ startedAt: z.ZodString;
5
+ totalMs: z.ZodNumber;
6
+ rows: z.ZodArray<z.ZodObject<{
7
+ name: z.ZodEnum<{
8
+ cleanup: "cleanup";
9
+ mint: "mint";
10
+ runner: "runner";
11
+ tests: "tests";
12
+ testserver: "testserver";
13
+ }>;
14
+ startMs: z.ZodNumber;
15
+ endMs: z.ZodNumber;
16
+ outcome: z.ZodEnum<{
17
+ done: "done";
18
+ failed: "failed";
19
+ stopped: "stopped";
20
+ unfinished: "unfinished";
21
+ }>;
22
+ steps: z.ZodArray<z.ZodObject<{
23
+ name: z.ZodEnum<{
24
+ [x: string]: string;
25
+ }>;
26
+ startMs: z.ZodNumber;
27
+ endMs: z.ZodNumber;
28
+ outcome: z.ZodEnum<{
29
+ done: "done";
30
+ failed: "failed";
31
+ stopped: "stopped";
32
+ unfinished: "unfinished";
33
+ }>;
34
+ }, z.core.$strip>>;
35
+ idleMs: z.ZodNumber;
36
+ snapshot: z.ZodOptional<z.ZodEnum<{
37
+ built: "built";
38
+ reused: "reused";
39
+ }>>;
40
+ sandboxes: z.ZodOptional<z.ZodObject<{
41
+ reused: z.ZodNumber;
42
+ created: z.ZodNumber;
43
+ }, z.core.$strip>>;
44
+ }, z.core.$strip>>;
45
+ criticalPath: z.ZodArray<z.ZodEnum<{
46
+ cleanup: "cleanup";
47
+ mint: "mint";
48
+ runner: "runner";
49
+ tests: "tests";
50
+ testserver: "testserver";
51
+ }>>;
52
+ }, z.core.$strip>;
53
+ /** What a `ran` outcome says of a run whose command ran and ended. No field carries the credential. */
54
+ export declare const ranSchema: z.ZodObject<{
55
+ version: z.ZodString;
56
+ commit: z.ZodNullable<z.ZodString>;
57
+ configFile: z.ZodNullable<z.ZodString>;
58
+ resources: z.ZodType<import("../../core/resource.ts").ResourceRanFacts<import("../../resources.ts").Resources>, import("../../core/resource.ts").ResourceRanFacts<import("../../resources.ts").Resources>, z.core.$ZodTypeInternals<import("../../core/resource.ts").ResourceRanFacts<import("../../resources.ts").Resources>, import("../../core/resource.ts").ResourceRanFacts<import("../../resources.ts").Resources>>>;
59
+ cleanup: z.ZodType<import("./cleanup.ts").StormCleanupFacts, import("./cleanup.ts").StormCleanupFacts, z.core.$ZodTypeInternals<import("./cleanup.ts").StormCleanupFacts, import("./cleanup.ts").StormCleanupFacts>>;
60
+ command: z.ZodObject<{
61
+ exitCode: z.ZodNullable<z.ZodNumber>;
62
+ signal: z.ZodNullable<z.ZodString>;
63
+ }, z.core.$strip>;
64
+ runner: z.ZodNullable<z.ZodObject<{
65
+ snapshotId: z.ZodString;
66
+ base: z.ZodString;
67
+ snapshotBranch: z.ZodNullable<z.ZodString>;
68
+ snapshotHead: z.ZodNullable<z.ZodString>;
69
+ built: z.ZodBoolean;
70
+ vcpus: z.ZodNumber;
71
+ region: z.ZodString;
72
+ runtime: z.ZodString;
73
+ buildMs: z.ZodNumber;
74
+ save: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
75
+ kind: z.ZodLiteral<"saved">;
76
+ snapshotId: z.ZodString;
77
+ base: z.ZodString;
78
+ branch: z.ZodString;
79
+ head: z.ZodString;
80
+ ms: z.ZodNumber;
81
+ sizeBytes: z.ZodNumber;
82
+ entryWritten: z.ZodBoolean;
83
+ }, z.core.$strip>, z.ZodObject<{
84
+ kind: z.ZodLiteral<"skipped">;
85
+ reason: z.ZodLiteral<"detached-head">;
86
+ }, z.core.$strip>, z.ZodObject<{
87
+ kind: z.ZodLiteral<"failed">;
88
+ step: z.ZodEnum<{
89
+ "save-snapshot": "save-snapshot";
90
+ scrub: "scrub";
91
+ }>;
92
+ message: z.ZodString;
93
+ }, z.core.$strip>, z.ZodObject<{
94
+ kind: z.ZodLiteral<"stopped">;
95
+ }, z.core.$strip>], "kind">>;
96
+ }, z.core.$strip>>;
97
+ timeline: z.ZodObject<{
98
+ startedAt: z.ZodString;
99
+ totalMs: z.ZodNumber;
100
+ rows: z.ZodArray<z.ZodObject<{
101
+ name: z.ZodEnum<{
102
+ cleanup: "cleanup";
103
+ mint: "mint";
104
+ runner: "runner";
105
+ tests: "tests";
106
+ testserver: "testserver";
107
+ }>;
108
+ startMs: z.ZodNumber;
109
+ endMs: z.ZodNumber;
110
+ outcome: z.ZodEnum<{
111
+ done: "done";
112
+ failed: "failed";
113
+ stopped: "stopped";
114
+ unfinished: "unfinished";
115
+ }>;
116
+ steps: z.ZodArray<z.ZodObject<{
117
+ name: z.ZodEnum<{
118
+ [x: string]: string;
119
+ }>;
120
+ startMs: z.ZodNumber;
121
+ endMs: z.ZodNumber;
122
+ outcome: z.ZodEnum<{
123
+ done: "done";
124
+ failed: "failed";
125
+ stopped: "stopped";
126
+ unfinished: "unfinished";
127
+ }>;
128
+ }, z.core.$strip>>;
129
+ idleMs: z.ZodNumber;
130
+ snapshot: z.ZodOptional<z.ZodEnum<{
131
+ built: "built";
132
+ reused: "reused";
133
+ }>>;
134
+ sandboxes: z.ZodOptional<z.ZodObject<{
135
+ reused: z.ZodNumber;
136
+ created: z.ZodNumber;
137
+ }, z.core.$strip>>;
138
+ }, z.core.$strip>>;
139
+ criticalPath: z.ZodArray<z.ZodEnum<{
140
+ cleanup: "cleanup";
141
+ mint: "mint";
142
+ runner: "runner";
143
+ tests: "tests";
144
+ testserver: "testserver";
145
+ }>>;
146
+ }, z.core.$strip>;
147
+ runId: z.ZodNullable<z.ZodString>;
148
+ }, z.core.$strip>;
149
+ /** What a `ran` outcome is, for its description. */
150
+ export declare const RAN_DESCRIPTION = "The command ran and ended. storm exits with its code, or 128 + n when signal n ended it, whatever this result's exit code.";
151
+ /** How a `ran` outcome renders: its warnings, and the runner sandbox the run kept running, if any. */
152
+ export declare function renderRan(ran: z.output<typeof ranSchema>): import("@vercel/clinkr").Rendered<{
153
+ message?: string;
154
+ warnings?: import("@vercel/clinkr").Warning[];
155
+ }>;
156
+ /** The errors only a run ends with, beside the config's, the credential's, the resources' and the mint's. */
157
+ export declare const runErrors: import("@vercel/clinkr").SharedErrors<{
158
+ credentialUnused: z.ZodObject<{
159
+ flags: z.ZodArray<z.ZodString>;
160
+ configFile: z.ZodNullable<z.ZodString>;
161
+ }, z.core.$strip>;
162
+ missingRunner: z.ZodObject<{
163
+ configFile: z.ZodNullable<z.ZodString>;
164
+ }, z.core.$strip>;
165
+ noBaseRef: z.ZodObject<{
166
+ refs: z.ZodArray<z.ZodObject<{
167
+ ref: z.ZodString;
168
+ reason: z.ZodEnum<{
169
+ missing: "missing";
170
+ unrelated: "unrelated";
171
+ }>;
172
+ }, z.core.$strip>>;
173
+ }, z.core.$strip>;
174
+ submodulesRefused: z.ZodObject<{
175
+ paths: z.ZodArray<z.ZodString>;
176
+ }, z.core.$strip>;
177
+ snapshotGone: z.ZodObject<{
178
+ snapshotId: z.ZodString;
179
+ base: z.ZodString;
180
+ removal: z.ZodNullable<z.ZodObject<{
181
+ path: z.ZodString;
182
+ message: z.ZodString;
183
+ }, z.core.$strip>>;
184
+ cleanup: z.ZodType<import("./cleanup.ts").StormCleanupFacts, import("./cleanup.ts").StormCleanupFacts, z.core.$ZodTypeInternals<import("./cleanup.ts").StormCleanupFacts, import("./cleanup.ts").StormCleanupFacts>>;
185
+ }, z.core.$strip>;
186
+ runnerFailed: z.ZodObject<{
187
+ failure: z.ZodUnion<readonly [z.ZodObject<{
188
+ kind: z.ZodEnum<{
189
+ "apply-failed": "apply-failed";
190
+ "build-failed": "build-failed";
191
+ "install-failed": "install-failed";
192
+ "snapshot-build-step-failed": "snapshot-build-step-failed";
193
+ }>;
194
+ label: z.ZodString;
195
+ exitCode: z.ZodNullable<z.ZodNumber>;
196
+ tail: z.ZodArray<z.ZodString>;
197
+ }, z.core.$strip>, z.ZodObject<{
198
+ kind: z.ZodLiteral<"sandbox-api-failed">;
199
+ operation: z.ZodString;
200
+ status: z.ZodNullable<z.ZodNumber>;
201
+ message: z.ZodString;
202
+ }, z.core.$strip>, z.ZodObject<{
203
+ kind: z.ZodLiteral<"checkout-failed">;
204
+ message: z.ZodString;
205
+ command: z.ZodNullable<z.ZodString>;
206
+ }, z.core.$strip>, z.ZodObject<{
207
+ kind: z.ZodLiteral<"credential-claims-missing">;
208
+ team: z.ZodString;
209
+ project: z.ZodString;
210
+ }, z.core.$strip>]>;
211
+ cleanup: z.ZodType<import("./cleanup.ts").StormCleanupFacts, import("./cleanup.ts").StormCleanupFacts, z.core.$ZodTypeInternals<import("./cleanup.ts").StormCleanupFacts, import("./cleanup.ts").StormCleanupFacts>>;
212
+ }, z.core.$strip>;
213
+ spawnFailed: z.ZodObject<{
214
+ executable: z.ZodString;
215
+ message: z.ZodString;
216
+ cleanup: z.ZodType<import("./cleanup.ts").StormCleanupFacts, import("./cleanup.ts").StormCleanupFacts, z.core.$ZodTypeInternals<import("./cleanup.ts").StormCleanupFacts, import("./cleanup.ts").StormCleanupFacts>>;
217
+ }, z.core.$strip>;
218
+ }>;
219
+ /** Every error a run ends with, in order: the config's, the credential's, each resource's, the mint's, the run's. */
220
+ export declare const RUN_ERRORS: {
221
+ credentialRejected: import("@vercel/clinkr").SharedError<"credential_rejected", [{
222
+ origin: {
223
+ source: "mint";
224
+ team: string;
225
+ project: string;
226
+ } | {
227
+ source: "github-actions";
228
+ claims: {
229
+ aud: string;
230
+ repository: string;
231
+ } | null;
232
+ };
233
+ fix: string;
234
+ status: number;
235
+ vercelId: string | null;
236
+ ttlMinutes: number;
237
+ failedCreates: {
238
+ kind: "connect-failed" | "dropped" | "http-error" | "malformed" | "stream-ended" | "stream-error" | "timeout";
239
+ detail: string | null;
240
+ }[];
241
+ unpooled: {
242
+ testserverUrl: string;
243
+ path: string;
244
+ message: string;
245
+ }[];
246
+ sandboxMayExist: boolean;
247
+ } & {
248
+ readonly cleanup: import("./cleanup.ts").StormCleanupFacts;
249
+ }]>;
250
+ credentialUnused: import("@vercel/clinkr").SharedError<"credential_unused", [data: {
251
+ flags: string[];
252
+ configFile: string | null;
253
+ }]>;
254
+ githubFixtureRepoUnavailable: import("@vercel/clinkr").SharedError<"github_fixture_repo_unavailable", [{
255
+ repo: string;
256
+ status: number | null;
257
+ message: string;
258
+ } & {
259
+ readonly cleanup: import("./cleanup.ts").StormCleanupFacts;
260
+ }]>;
261
+ githubTokenMissing: import("@vercel/clinkr").SharedError<"github_token_missing", [data: {
262
+ tokenEnv: string;
263
+ repo: string;
264
+ configFile: string | null;
265
+ requiredBy: "config" | "set";
266
+ }]>;
267
+ invalidConfig: import("@vercel/clinkr").SharedError<"invalid_config", [data: {
268
+ file: string;
269
+ problems: {
270
+ key: string | null;
271
+ location: {
272
+ line: number;
273
+ column: number | null;
274
+ } | null;
275
+ problem: string;
276
+ }[];
277
+ }]>;
278
+ invalidResourceOptions: import("@vercel/clinkr").SharedError<"invalid_resource_options", [data: {
279
+ configFile: string | null;
280
+ problems: {
281
+ key: string;
282
+ problem: string;
283
+ values: {
284
+ key: string;
285
+ value: string;
286
+ source: "default" | "file" | "flag";
287
+ }[];
288
+ }[];
289
+ }]>;
290
+ mintFailed: import("@vercel/clinkr").SharedError<"mint_failed", [data: {
291
+ team: string;
292
+ project: string;
293
+ cause: string;
294
+ fix: string;
295
+ runner: boolean;
296
+ cleanup: import("./cleanup.ts").StormCleanupFacts;
297
+ }]>;
298
+ missingRunner: import("@vercel/clinkr").SharedError<"missing_runner", [data: {
299
+ configFile: string | null;
300
+ }]>;
301
+ missingTarget: import("@vercel/clinkr").SharedError<"missing_target", [data: {
302
+ missing: ("project" | "scope")[];
303
+ }]>;
304
+ noBaseRef: import("@vercel/clinkr").SharedError<"no_base_ref", [data: {
305
+ refs: {
306
+ ref: string;
307
+ reason: "missing" | "unrelated";
308
+ }[];
309
+ }]>;
310
+ noSandboxes: import("@vercel/clinkr").SharedError<"no_sandboxes", [{
311
+ requested: number;
312
+ ttlMinutes: number;
313
+ failedCreates: {
314
+ kind: "connect-failed" | "dropped" | "http-error" | "malformed" | "stream-ended" | "stream-error" | "timeout";
315
+ detail: string | null;
316
+ }[];
317
+ sandboxMayExist: boolean;
318
+ } & {
319
+ readonly cleanup: import("./cleanup.ts").StormCleanupFacts;
320
+ }]>;
321
+ noUsableSandboxes: import("@vercel/clinkr").SharedError<"no_usable_sandboxes", [{
322
+ requested: number;
323
+ build: string;
324
+ } & {
325
+ readonly cleanup: import("./cleanup.ts").StormCleanupFacts;
326
+ }]>;
327
+ poolUnavailable: import("@vercel/clinkr").SharedError<"pool_unavailable", [data: {
328
+ path: string;
329
+ message: string;
330
+ }]>;
331
+ poolUnreadable: import("@vercel/clinkr").SharedError<"pool_unreadable", [{
332
+ path: string;
333
+ message: string;
334
+ } & {
335
+ readonly cleanup: import("./cleanup.ts").StormCleanupFacts;
336
+ }]>;
337
+ runnerFailed: import("@vercel/clinkr").SharedError<"runner_failed", [data: {
338
+ failure: {
339
+ kind: "apply-failed" | "build-failed" | "install-failed" | "snapshot-build-step-failed";
340
+ label: string;
341
+ exitCode: number | null;
342
+ tail: string[];
343
+ } | {
344
+ kind: "sandbox-api-failed";
345
+ operation: string;
346
+ status: number | null;
347
+ message: string;
348
+ } | {
349
+ kind: "checkout-failed";
350
+ message: string;
351
+ command: string | null;
352
+ } | {
353
+ kind: "credential-claims-missing";
354
+ team: string;
355
+ project: string;
356
+ };
357
+ cleanup: import("./cleanup.ts").StormCleanupFacts;
358
+ }]>;
359
+ snapshotGone: import("@vercel/clinkr").SharedError<"snapshot_gone", [data: {
360
+ snapshotId: string;
361
+ base: string;
362
+ removal: {
363
+ path: string;
364
+ message: string;
365
+ } | null;
366
+ cleanup: import("./cleanup.ts").StormCleanupFacts;
367
+ }]>;
368
+ spawnFailed: import("@vercel/clinkr").SharedError<"spawn_failed", [data: {
369
+ executable: string;
370
+ message: string;
371
+ cleanup: import("./cleanup.ts").StormCleanupFacts;
372
+ }]>;
373
+ submodulesRefused: import("@vercel/clinkr").SharedError<"submodules_refused", [data: {
374
+ paths: string[];
375
+ }]>;
376
+ tokenRequestFailed: import("@vercel/clinkr").SharedError<"token_request_failed", [{
377
+ cause: "request-failed" | "variables-missing";
378
+ missing: ("ACTIONS_ID_TOKEN_REQUEST_TOKEN" | "ACTIONS_ID_TOKEN_REQUEST_URL")[] | null;
379
+ status: number | null;
380
+ said: string | null;
381
+ detail: string;
382
+ fix: string;
383
+ ttlMinutes: number;
384
+ failedCreates: {
385
+ kind: "connect-failed" | "dropped" | "http-error" | "malformed" | "stream-ended" | "stream-error" | "timeout";
386
+ detail: string | null;
387
+ }[];
388
+ sandboxMayExist: boolean;
389
+ } & {
390
+ readonly cleanup: import("./cleanup.ts").StormCleanupFacts;
391
+ }]>;
392
+ };
393
+ /** How `exec` ends. No outcome carries the credential. */
394
+ export declare const outcomes: import("@vercel/clinkr").Outcomes<{
395
+ ran: z.ZodObject<{
396
+ version: z.ZodString;
397
+ commit: z.ZodNullable<z.ZodString>;
398
+ configFile: z.ZodNullable<z.ZodString>;
399
+ resources: z.ZodType<import("../../core/resource.ts").ResourceRanFacts<import("../../resources.ts").Resources>, import("../../core/resource.ts").ResourceRanFacts<import("../../resources.ts").Resources>, z.core.$ZodTypeInternals<import("../../core/resource.ts").ResourceRanFacts<import("../../resources.ts").Resources>, import("../../core/resource.ts").ResourceRanFacts<import("../../resources.ts").Resources>>>;
400
+ cleanup: z.ZodType<import("./cleanup.ts").StormCleanupFacts, import("./cleanup.ts").StormCleanupFacts, z.core.$ZodTypeInternals<import("./cleanup.ts").StormCleanupFacts, import("./cleanup.ts").StormCleanupFacts>>;
401
+ command: z.ZodObject<{
402
+ exitCode: z.ZodNullable<z.ZodNumber>;
403
+ signal: z.ZodNullable<z.ZodString>;
404
+ }, z.core.$strip>;
405
+ runner: z.ZodNullable<z.ZodObject<{
406
+ snapshotId: z.ZodString;
407
+ base: z.ZodString;
408
+ snapshotBranch: z.ZodNullable<z.ZodString>;
409
+ snapshotHead: z.ZodNullable<z.ZodString>;
410
+ built: z.ZodBoolean;
411
+ vcpus: z.ZodNumber;
412
+ region: z.ZodString;
413
+ runtime: z.ZodString;
414
+ buildMs: z.ZodNumber;
415
+ save: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
416
+ kind: z.ZodLiteral<"saved">;
417
+ snapshotId: z.ZodString;
418
+ base: z.ZodString;
419
+ branch: z.ZodString;
420
+ head: z.ZodString;
421
+ ms: z.ZodNumber;
422
+ sizeBytes: z.ZodNumber;
423
+ entryWritten: z.ZodBoolean;
424
+ }, z.core.$strip>, z.ZodObject<{
425
+ kind: z.ZodLiteral<"skipped">;
426
+ reason: z.ZodLiteral<"detached-head">;
427
+ }, z.core.$strip>, z.ZodObject<{
428
+ kind: z.ZodLiteral<"failed">;
429
+ step: z.ZodEnum<{
430
+ "save-snapshot": "save-snapshot";
431
+ scrub: "scrub";
432
+ }>;
433
+ message: z.ZodString;
434
+ }, z.core.$strip>, z.ZodObject<{
435
+ kind: z.ZodLiteral<"stopped">;
436
+ }, z.core.$strip>], "kind">>;
437
+ }, z.core.$strip>>;
438
+ timeline: z.ZodObject<{
439
+ startedAt: z.ZodString;
440
+ totalMs: z.ZodNumber;
441
+ rows: z.ZodArray<z.ZodObject<{
442
+ name: z.ZodEnum<{
443
+ cleanup: "cleanup";
444
+ mint: "mint";
445
+ runner: "runner";
446
+ tests: "tests";
447
+ testserver: "testserver";
448
+ }>;
449
+ startMs: z.ZodNumber;
450
+ endMs: z.ZodNumber;
451
+ outcome: z.ZodEnum<{
452
+ done: "done";
453
+ failed: "failed";
454
+ stopped: "stopped";
455
+ unfinished: "unfinished";
456
+ }>;
457
+ steps: z.ZodArray<z.ZodObject<{
458
+ name: z.ZodEnum<{
459
+ [x: string]: string;
460
+ }>;
461
+ startMs: z.ZodNumber;
462
+ endMs: z.ZodNumber;
463
+ outcome: z.ZodEnum<{
464
+ done: "done";
465
+ failed: "failed";
466
+ stopped: "stopped";
467
+ unfinished: "unfinished";
468
+ }>;
469
+ }, z.core.$strip>>;
470
+ idleMs: z.ZodNumber;
471
+ snapshot: z.ZodOptional<z.ZodEnum<{
472
+ built: "built";
473
+ reused: "reused";
474
+ }>>;
475
+ sandboxes: z.ZodOptional<z.ZodObject<{
476
+ reused: z.ZodNumber;
477
+ created: z.ZodNumber;
478
+ }, z.core.$strip>>;
479
+ }, z.core.$strip>>;
480
+ criticalPath: z.ZodArray<z.ZodEnum<{
481
+ cleanup: "cleanup";
482
+ mint: "mint";
483
+ runner: "runner";
484
+ tests: "tests";
485
+ testserver: "testserver";
486
+ }>>;
487
+ }, z.core.$strip>;
488
+ runId: z.ZodNullable<z.ZodString>;
489
+ }, z.core.$strip>;
490
+ }, {
491
+ ran: unknown;
492
+ }, {
493
+ credentialRejected: import("@vercel/clinkr").SharedError<"credential_rejected", [{
494
+ origin: {
495
+ source: "mint";
496
+ team: string;
497
+ project: string;
498
+ } | {
499
+ source: "github-actions";
500
+ claims: {
501
+ aud: string;
502
+ repository: string;
503
+ } | null;
504
+ };
505
+ fix: string;
506
+ status: number;
507
+ vercelId: string | null;
508
+ ttlMinutes: number;
509
+ failedCreates: {
510
+ kind: "connect-failed" | "dropped" | "http-error" | "malformed" | "stream-ended" | "stream-error" | "timeout";
511
+ detail: string | null;
512
+ }[];
513
+ unpooled: {
514
+ testserverUrl: string;
515
+ path: string;
516
+ message: string;
517
+ }[];
518
+ sandboxMayExist: boolean;
519
+ } & {
520
+ readonly cleanup: import("./cleanup.ts").StormCleanupFacts;
521
+ }]>;
522
+ credentialUnused: import("@vercel/clinkr").SharedError<"credential_unused", [data: {
523
+ flags: string[];
524
+ configFile: string | null;
525
+ }]>;
526
+ githubFixtureRepoUnavailable: import("@vercel/clinkr").SharedError<"github_fixture_repo_unavailable", [{
527
+ repo: string;
528
+ status: number | null;
529
+ message: string;
530
+ } & {
531
+ readonly cleanup: import("./cleanup.ts").StormCleanupFacts;
532
+ }]>;
533
+ githubTokenMissing: import("@vercel/clinkr").SharedError<"github_token_missing", [data: {
534
+ tokenEnv: string;
535
+ repo: string;
536
+ configFile: string | null;
537
+ requiredBy: "config" | "set";
538
+ }]>;
539
+ invalidConfig: import("@vercel/clinkr").SharedError<"invalid_config", [data: {
540
+ file: string;
541
+ problems: {
542
+ key: string | null;
543
+ location: {
544
+ line: number;
545
+ column: number | null;
546
+ } | null;
547
+ problem: string;
548
+ }[];
549
+ }]>;
550
+ invalidResourceOptions: import("@vercel/clinkr").SharedError<"invalid_resource_options", [data: {
551
+ configFile: string | null;
552
+ problems: {
553
+ key: string;
554
+ problem: string;
555
+ values: {
556
+ key: string;
557
+ value: string;
558
+ source: "default" | "file" | "flag";
559
+ }[];
560
+ }[];
561
+ }]>;
562
+ mintFailed: import("@vercel/clinkr").SharedError<"mint_failed", [data: {
563
+ team: string;
564
+ project: string;
565
+ cause: string;
566
+ fix: string;
567
+ runner: boolean;
568
+ cleanup: import("./cleanup.ts").StormCleanupFacts;
569
+ }]>;
570
+ missingRunner: import("@vercel/clinkr").SharedError<"missing_runner", [data: {
571
+ configFile: string | null;
572
+ }]>;
573
+ missingTarget: import("@vercel/clinkr").SharedError<"missing_target", [data: {
574
+ missing: ("project" | "scope")[];
575
+ }]>;
576
+ noBaseRef: import("@vercel/clinkr").SharedError<"no_base_ref", [data: {
577
+ refs: {
578
+ ref: string;
579
+ reason: "missing" | "unrelated";
580
+ }[];
581
+ }]>;
582
+ noSandboxes: import("@vercel/clinkr").SharedError<"no_sandboxes", [{
583
+ requested: number;
584
+ ttlMinutes: number;
585
+ failedCreates: {
586
+ kind: "connect-failed" | "dropped" | "http-error" | "malformed" | "stream-ended" | "stream-error" | "timeout";
587
+ detail: string | null;
588
+ }[];
589
+ sandboxMayExist: boolean;
590
+ } & {
591
+ readonly cleanup: import("./cleanup.ts").StormCleanupFacts;
592
+ }]>;
593
+ noUsableSandboxes: import("@vercel/clinkr").SharedError<"no_usable_sandboxes", [{
594
+ requested: number;
595
+ build: string;
596
+ } & {
597
+ readonly cleanup: import("./cleanup.ts").StormCleanupFacts;
598
+ }]>;
599
+ poolUnavailable: import("@vercel/clinkr").SharedError<"pool_unavailable", [data: {
600
+ path: string;
601
+ message: string;
602
+ }]>;
603
+ poolUnreadable: import("@vercel/clinkr").SharedError<"pool_unreadable", [{
604
+ path: string;
605
+ message: string;
606
+ } & {
607
+ readonly cleanup: import("./cleanup.ts").StormCleanupFacts;
608
+ }]>;
609
+ runnerFailed: import("@vercel/clinkr").SharedError<"runner_failed", [data: {
610
+ failure: {
611
+ kind: "apply-failed" | "build-failed" | "install-failed" | "snapshot-build-step-failed";
612
+ label: string;
613
+ exitCode: number | null;
614
+ tail: string[];
615
+ } | {
616
+ kind: "sandbox-api-failed";
617
+ operation: string;
618
+ status: number | null;
619
+ message: string;
620
+ } | {
621
+ kind: "checkout-failed";
622
+ message: string;
623
+ command: string | null;
624
+ } | {
625
+ kind: "credential-claims-missing";
626
+ team: string;
627
+ project: string;
628
+ };
629
+ cleanup: import("./cleanup.ts").StormCleanupFacts;
630
+ }]>;
631
+ snapshotGone: import("@vercel/clinkr").SharedError<"snapshot_gone", [data: {
632
+ snapshotId: string;
633
+ base: string;
634
+ removal: {
635
+ path: string;
636
+ message: string;
637
+ } | null;
638
+ cleanup: import("./cleanup.ts").StormCleanupFacts;
639
+ }]>;
640
+ spawnFailed: import("@vercel/clinkr").SharedError<"spawn_failed", [data: {
641
+ executable: string;
642
+ message: string;
643
+ cleanup: import("./cleanup.ts").StormCleanupFacts;
644
+ }]>;
645
+ submodulesRefused: import("@vercel/clinkr").SharedError<"submodules_refused", [data: {
646
+ paths: string[];
647
+ }]>;
648
+ tokenRequestFailed: import("@vercel/clinkr").SharedError<"token_request_failed", [{
649
+ cause: "request-failed" | "variables-missing";
650
+ missing: ("ACTIONS_ID_TOKEN_REQUEST_TOKEN" | "ACTIONS_ID_TOKEN_REQUEST_URL")[] | null;
651
+ status: number | null;
652
+ said: string | null;
653
+ detail: string;
654
+ fix: string;
655
+ ttlMinutes: number;
656
+ failedCreates: {
657
+ kind: "connect-failed" | "dropped" | "http-error" | "malformed" | "stream-ended" | "stream-error" | "timeout";
658
+ detail: string | null;
659
+ }[];
660
+ sandboxMayExist: boolean;
661
+ } & {
662
+ readonly cleanup: import("./cleanup.ts").StormCleanupFacts;
663
+ }]>;
664
+ }>;