@cnc-tools/storm 0.7.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 (113) 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 +771 -1
  5. package/dist/commands/exec/command.js +1 -1
  6. package/dist/commands/exec/live-view.js +3 -2
  7. package/dist/commands/exec/metadata.d.ts +1 -1
  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 +476 -0
  11. package/dist/commands/exec/progress.js +3 -5
  12. package/dist/commands/exec/run-command.d.ts +2 -2
  13. package/dist/commands/exec/run-metadata.d.ts +1 -1
  14. package/dist/commands/exec/run-metadata.js +1 -1
  15. package/dist/commands/exec/tests-summary.d.ts +1 -1
  16. package/dist/commands/exec/tests-summary.js +1 -1
  17. package/dist/commands/runs/list/command.d.ts +129 -1
  18. package/dist/commands/runs/list/command.js +1 -1
  19. package/dist/commands/runs/list/outcomes.d.ts +16 -0
  20. package/dist/commands/runs/logs/command.d.ts +263 -1
  21. package/dist/commands/runs/logs/command.js +1 -1
  22. package/dist/commands/runs/logs/outcomes.d.ts +105 -0
  23. package/dist/commands/runs/show/command.d.ts +329 -1
  24. package/dist/commands/runs/show/command.js +1 -1
  25. package/dist/commands/runs/show/outcomes.d.ts +71 -0
  26. package/dist/commands/vitest/command.d.ts +886 -1
  27. package/dist/commands/vitest/command.js +1 -1
  28. package/dist/commands/vitest/metadata.d.ts +1 -1
  29. package/dist/commands/vitest/metadata.js +4 -0
  30. package/dist/commands/vitest/outcomes.d.ts +295 -0
  31. package/dist/config/errors.d.ts +73 -0
  32. package/dist/config/schema.d.ts +1 -1
  33. package/dist/config-file/define.d.ts +4 -3
  34. package/dist/config-file/define.js +1 -1
  35. package/dist/config-file/toolchain.js +1 -1
  36. package/dist/core/command-slots.d.ts +8 -2
  37. package/dist/core/command-slots.js +6 -2
  38. package/dist/core/index.d.ts +1 -1
  39. package/dist/credential/index.d.ts +1 -0
  40. package/dist/credential/index.js +1 -0
  41. package/dist/credential/settle.d.ts +20 -0
  42. package/dist/credential/target.d.ts +6 -0
  43. package/dist/credential/target.js +7 -0
  44. package/dist/resources/github/command.d.ts +54 -2
  45. package/dist/resources/github/config.js +1 -1
  46. package/dist/resources/github/index.js +1 -1
  47. package/dist/resources/github/resource.js +2 -2
  48. package/dist/resources/testserver/command.d.ts +208 -10
  49. package/dist/resources/testserver/command.js +7 -0
  50. package/dist/resources/testserver/commands/create/command.d.ts +808 -1
  51. package/dist/resources/testserver/commands/create/command.js +64 -23
  52. package/dist/resources/testserver/commands/create/metadata.js +6 -2
  53. package/dist/resources/testserver/commands/create/outcomes.d.ts +347 -0
  54. package/dist/resources/testserver/commands/create/outcomes.js +14 -1
  55. package/dist/resources/testserver/commands/list/command.d.ts +84 -1
  56. package/dist/resources/testserver/commands/list/command.js +1 -1
  57. package/dist/resources/testserver/commands/list/outcomes.d.ts +16 -0
  58. package/dist/resources/testserver/config.js +14 -4
  59. package/dist/resources/testserver/events.d.ts +9 -0
  60. package/dist/resources/testserver/index.js +8 -7
  61. package/dist/resources/testserver/lane.js +1 -0
  62. package/dist/resources/testserver/live/gateways.d.ts +2 -0
  63. package/dist/resources/testserver/live/gateways.js +16 -3
  64. package/dist/resources/testserver/pool/channels.d.ts +5 -2
  65. package/dist/resources/testserver/pool/channels.js +1 -1
  66. package/dist/resources/testserver/pool/create.d.ts +6 -2
  67. package/dist/resources/testserver/pool/create.js +6 -5
  68. package/dist/resources/testserver/pool/index.d.ts +1 -0
  69. package/dist/resources/testserver/pool/index.js +1 -0
  70. package/dist/resources/testserver/pool/pull-request.d.ts +89 -0
  71. package/dist/resources/testserver/pool/pull-request.js +85 -0
  72. package/dist/resources/testserver/pr-build-facts.d.ts +130 -0
  73. package/dist/resources/testserver/pr-build-facts.js +261 -0
  74. package/dist/resources/testserver/presentation.d.ts +2 -2
  75. package/dist/resources/testserver/presentation.js +12 -3
  76. package/dist/resources/testserver/provider.d.ts +16 -6
  77. package/dist/resources/testserver/provider.js +46 -15
  78. package/dist/resources/testserver/pull-request/gateways.d.ts +117 -0
  79. package/dist/resources/testserver/pull-request/gateways.js +5 -0
  80. package/dist/resources/testserver/pull-request/index.d.ts +5 -0
  81. package/dist/resources/testserver/pull-request/index.js +6 -0
  82. package/dist/resources/testserver/pull-request/live/github-rest.d.ts +28 -0
  83. package/dist/resources/testserver/pull-request/live/github-rest.js +114 -0
  84. package/dist/resources/testserver/pull-request/live/github-token-gateway.d.ts +12 -0
  85. package/dist/resources/testserver/pull-request/live/github-token-gateway.js +39 -0
  86. package/dist/resources/testserver/pull-request/live/pull-request-gateway.d.ts +10 -0
  87. package/dist/resources/testserver/pull-request/live/pull-request-gateway.js +27 -0
  88. package/dist/resources/testserver/pull-request/live/testserver-workflow-gateway.d.ts +21 -0
  89. package/dist/resources/testserver/pull-request/live/testserver-workflow-gateway.js +64 -0
  90. package/dist/resources/testserver/ran.d.ts +5 -0
  91. package/dist/resources/testserver/ran.js +19 -3
  92. package/dist/resources/testserver/resource.d.ts +5 -1
  93. package/dist/resources/testserver/resource.js +2 -2
  94. package/dist/resources/testserver/sandbox/build-reference.d.ts +38 -0
  95. package/dist/resources/testserver/sandbox/build-reference.js +79 -0
  96. package/dist/resources/testserver/sandbox/index.d.ts +1 -0
  97. package/dist/resources/testserver/sandbox/index.js +1 -0
  98. package/dist/resources.d.ts +265 -15
  99. package/dist/sdk/index.js +2 -2
  100. package/dist/story/command-line.d.ts +34 -0
  101. package/dist/story/command-line.js +100 -0
  102. package/dist/story/index.d.ts +1 -0
  103. package/dist/story/index.js +3 -2
  104. package/dist/vercel-cli/context.js +1 -1
  105. package/dist/vercel-cli/index.js +1 -1
  106. package/dist/vitest/config.js +2 -2
  107. package/dist/vitest/fixtures.d.ts +1 -1
  108. package/dist/vitest/fixtures.js +1 -1
  109. package/dist/vitest/index.js +3 -3
  110. package/dist/vitest/plan.js +1 -1
  111. package/package.json +3 -3
  112. package/skills/overview.md +2 -0
  113. package/skills/testserver-builds.md +80 -0
@@ -13,6 +13,32 @@ export declare const githubFixtureRepoSettleErrors: import("@vercel/clinkr").Sha
13
13
  set: "set";
14
14
  }>;
15
15
  }, z.core.$strip>;
16
+ }, {
17
+ readonly githubTokenMissing: {
18
+ readonly exitCode: 2;
19
+ 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.";
20
+ readonly schema: z.ZodObject<{
21
+ tokenEnv: z.ZodString;
22
+ repo: z.ZodString;
23
+ configFile: z.ZodNullable<z.ZodString>;
24
+ requiredBy: z.ZodEnum<{
25
+ config: "config";
26
+ set: "set";
27
+ }>;
28
+ }, z.core.$strip>;
29
+ readonly render: ({ tokenEnv, repo, requiredBy }: {
30
+ tokenEnv: string;
31
+ repo: string;
32
+ configFile: string | null;
33
+ requiredBy: "config" | "set";
34
+ }) => {
35
+ message: string;
36
+ next: {
37
+ type: "text";
38
+ text: string;
39
+ }[];
40
+ };
41
+ };
16
42
  }>;
17
43
  /** What deleting the branches under a canceled run's prefix did, for a person; nothing when it held no repository. */
18
44
  export declare function fixtureRepoCanceledLines(cleanup: FixtureRepoCleanup | undefined): string[];
@@ -25,7 +51,7 @@ export declare const githubFixtureRepoRefusalErrors: {
25
51
  repo: z.ZodString;
26
52
  status: z.ZodNullable<z.ZodNumber>;
27
53
  message: z.ZodString;
28
- }, z.core.$strip>>;
54
+ }, z.core.$strip>, readonly []>;
29
55
  };
30
56
  /**
31
57
  * The GitHub fixture repository resource's command half, `resources.githubFixtureRepo`, with its errors: its settle's,
@@ -42,13 +68,39 @@ export declare const githubFixtureRepoCommand: {
42
68
  set: "set";
43
69
  }>;
44
70
  }, z.core.$strip>;
71
+ }, {
72
+ readonly githubTokenMissing: {
73
+ readonly exitCode: 2;
74
+ 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.";
75
+ readonly schema: z.ZodObject<{
76
+ tokenEnv: z.ZodString;
77
+ repo: z.ZodString;
78
+ configFile: z.ZodNullable<z.ZodString>;
79
+ requiredBy: z.ZodEnum<{
80
+ config: "config";
81
+ set: "set";
82
+ }>;
83
+ }, z.core.$strip>;
84
+ readonly render: ({ tokenEnv, repo, requiredBy }: {
85
+ tokenEnv: string;
86
+ repo: string;
87
+ configFile: string | null;
88
+ requiredBy: "config" | "set";
89
+ }) => {
90
+ message: string;
91
+ next: {
92
+ type: "text";
93
+ text: string;
94
+ }[];
95
+ };
96
+ };
45
97
  }>;
46
98
  refusalErrors: {
47
99
  readonly githubFixtureRepoUnavailable: import("@vercel/clinkr").DataErrorDefinition<z.ZodObject<{
48
100
  repo: z.ZodString;
49
101
  status: z.ZodNullable<z.ZodNumber>;
50
102
  message: z.ZodString;
51
- }, z.core.$strip>>;
103
+ }, z.core.$strip>, readonly []>;
52
104
  };
53
105
  settle: ({ options, env, configFile }: import("../../core/command-provider.ts").ResourceSettleInput<GitHubFixtureRepoKind>) => {
54
106
  readonly ok: false;
@@ -24,7 +24,7 @@ const KIND = "githubFixtureRepo";
24
24
  */
25
25
  export const githubFixtureRepoConfig = {
26
26
  name: "githubFixtureRepo",
27
- factory: { kind: KIND, call: "githubFixtureRepo({ … })", subpath: "@cnc-tools/storm/github" },
27
+ factory: { kind: KIND, call: "githubFixtureRepo({ … })", subpath: "@vercel/storm/github" },
28
28
  options: {
29
29
  repo: { check: repoName, readText: readTextAsIs, required: true },
30
30
  tokenEnv: { check: envName, readText: readTextAsIs, required: true },
@@ -1,6 +1,6 @@
1
1
  // The GitHub fixture repository resource's folder: the repository the run opens before its command and cleans up after
2
2
  // it, its kind and run half, its resource config, its command half with its settle, its cleanup report, its gateway
3
- // and live gateways, and the `@cnc-tools/storm/github` config helper (`resource.ts`). Its provider value
3
+ // and live gateways, and the `@vercel/storm/github` config helper (`resource.ts`). Its provider value
4
4
  // (`resource-provider.ts`) carries them to the registry (`src/resources.ts`), the one place outside this folder that
5
5
  // takes it; `src/config-file/` imports its types through this file. The rest of what it exports is for tests.
6
6
  export { fixtureRepoCleanupFailureText, githubFixtureRepoCleanupReport, } from "./cleanup.js";
@@ -1,5 +1,5 @@
1
- // The GitHub fixture repository resource's published surface, `@cnc-tools/storm/github`. A user's
2
- // `storm.config.ts` imports it, so, like `@cnc-tools/storm/config`, it imports nothing at run time: loading a
1
+ // The GitHub fixture repository resource's published surface, `@vercel/storm/github`. A user's
2
+ // `storm.config.ts` imports it, so, like `@vercel/storm/config`, it imports nothing at run time: loading a
3
3
  // config file pulls in no Clinkr, zod or CLI code.
4
4
  /**
5
5
  * The GitHub fixture repository resource for `resources.githubFixtureRepo` in `storm.config.ts`. A run with it
@@ -14,16 +14,86 @@ export declare const testserverPoolPrepareErrors: import("@vercel/clinkr").Share
14
14
  path: z.ZodString;
15
15
  message: z.ZodString;
16
16
  }, z.core.$strip>;
17
+ }, {
18
+ readonly poolUnavailable: {
19
+ readonly exitCode: 1;
20
+ readonly description: "storm couldn't use the pool, so it minted no credential and didn't run the command.";
21
+ readonly schema: z.ZodObject<{
22
+ path: z.ZodString;
23
+ message: z.ZodString;
24
+ }, z.core.$strip>;
25
+ readonly render: ({ path, message }: {
26
+ path: string;
27
+ message: string;
28
+ }) => {
29
+ message: string;
30
+ rows: [string, string][];
31
+ next: {
32
+ type: "text";
33
+ text: string;
34
+ }[];
35
+ };
36
+ };
17
37
  }>;
18
38
  /**
19
39
  * The definitions of the errors a run the Testserver pool refused, while the run acquired it, ends with; the host
20
40
  * defines them with the run's cleanup beside their data.
21
41
  */
22
42
  export declare const testserverPoolRefusalErrors: {
43
+ readonly pullRequestUnreadable: import("@vercel/clinkr").DataErrorDefinition<z.ZodObject<{
44
+ pr: z.ZodNumber;
45
+ repo: z.ZodString;
46
+ kind: z.ZodEnum<{
47
+ "connect-failed": "connect-failed";
48
+ "http-error": "http-error";
49
+ malformed: "malformed";
50
+ "no-token": "no-token";
51
+ "not-found": "not-found";
52
+ rejected: "rejected";
53
+ timeout: "timeout";
54
+ }>;
55
+ status: z.ZodNullable<z.ZodNumber>;
56
+ message: z.ZodNullable<z.ZodString>;
57
+ tokenOrigin: z.ZodNullable<z.ZodEnum<{
58
+ GH_TOKEN: "GH_TOKEN";
59
+ GITHUB_TOKEN: "GITHUB_TOKEN";
60
+ "gh auth token": "gh auth token";
61
+ }>>;
62
+ }, z.core.$strip>, readonly []>;
63
+ readonly prBuildsUnlisted: import("@vercel/clinkr").DataErrorDefinition<z.ZodObject<{
64
+ pr: z.ZodNumber;
65
+ failure: z.ZodObject<{
66
+ kind: z.ZodEnum<{
67
+ "connect-failed": "connect-failed";
68
+ "http-error": "http-error";
69
+ malformed: "malformed";
70
+ "not-found": "not-found";
71
+ rejected: "rejected";
72
+ timeout: "timeout";
73
+ }>;
74
+ status: z.ZodNullable<z.ZodNumber>;
75
+ detail: z.ZodString;
76
+ }, z.core.$strip>;
77
+ }, z.core.$strip>, readonly []>;
78
+ readonly prBuildNotReady: import("@vercel/clinkr").DataErrorDefinition<z.ZodObject<{
79
+ pr: z.ZodNumber;
80
+ headSha: z.ZodString;
81
+ newest: z.ZodNullable<z.ZodObject<{
82
+ build: z.ZodString;
83
+ headSha: z.ZodString;
84
+ createdAt: z.ZodString;
85
+ }, z.core.$strip>>;
86
+ }, z.core.$strip>, readonly []>;
87
+ readonly prBuildExpired: import("@vercel/clinkr").DataErrorDefinition<z.ZodObject<{
88
+ pr: z.ZodNumber;
89
+ headSha: z.ZodString;
90
+ build: z.ZodString;
91
+ expiresAt: z.ZodString;
92
+ }, z.core.$strip>, readonly []>;
23
93
  readonly poolUnreadable: import("@vercel/clinkr").DataErrorDefinition<z.ZodObject<{
24
94
  path: z.ZodString;
25
95
  message: z.ZodString;
26
- }, z.core.$strip>>;
96
+ }, z.core.$strip>, readonly []>;
27
97
  readonly tokenRequestFailed: import("@vercel/clinkr").DataErrorDefinition<z.ZodObject<{
28
98
  cause: z.ZodEnum<{
29
99
  "request-failed": "request-failed";
@@ -51,7 +121,7 @@ export declare const testserverPoolRefusalErrors: {
51
121
  detail: z.ZodNullable<z.ZodString>;
52
122
  }, z.core.$strip>>;
53
123
  sandboxMayExist: z.ZodBoolean;
54
- }, z.core.$strip>>;
124
+ }, z.core.$strip>, readonly []>;
55
125
  readonly credentialRejected: import("@vercel/clinkr").DataErrorDefinition<z.ZodObject<{
56
126
  origin: z.ZodDiscriminatedUnion<[z.ZodObject<{
57
127
  source: z.ZodLiteral<"mint">;
@@ -86,7 +156,7 @@ export declare const testserverPoolRefusalErrors: {
86
156
  message: z.ZodString;
87
157
  }, z.core.$strip>>;
88
158
  sandboxMayExist: z.ZodBoolean;
89
- }, z.core.$strip>>;
159
+ }, z.core.$strip>, readonly []>;
90
160
  readonly noSandboxes: import("@vercel/clinkr").DataErrorDefinition<z.ZodObject<{
91
161
  requested: z.ZodNumber;
92
162
  ttlMinutes: z.ZodNumber;
@@ -103,11 +173,11 @@ export declare const testserverPoolRefusalErrors: {
103
173
  detail: z.ZodNullable<z.ZodString>;
104
174
  }, z.core.$strip>>;
105
175
  sandboxMayExist: z.ZodBoolean;
106
- }, z.core.$strip>>;
176
+ }, z.core.$strip>, readonly []>;
107
177
  readonly noUsableSandboxes: import("@vercel/clinkr").DataErrorDefinition<z.ZodObject<{
108
178
  requested: z.ZodNumber;
109
179
  build: z.ZodString;
110
- }, z.core.$strip>>;
180
+ }, z.core.$strip>, readonly []>;
111
181
  };
112
182
  /**
113
183
  * The Testserver pool resource's command half, `resources.testserverPool`, with its errors: its prepare's,
@@ -120,12 +190,82 @@ export declare const testserverPoolCommand: {
120
190
  path: z.ZodString;
121
191
  message: z.ZodString;
122
192
  }, z.core.$strip>;
193
+ }, {
194
+ readonly poolUnavailable: {
195
+ readonly exitCode: 1;
196
+ readonly description: "storm couldn't use the pool, so it minted no credential and didn't run the command.";
197
+ readonly schema: z.ZodObject<{
198
+ path: z.ZodString;
199
+ message: z.ZodString;
200
+ }, z.core.$strip>;
201
+ readonly render: ({ path, message }: {
202
+ path: string;
203
+ message: string;
204
+ }) => {
205
+ message: string;
206
+ rows: [string, string][];
207
+ next: {
208
+ type: "text";
209
+ text: string;
210
+ }[];
211
+ };
212
+ };
123
213
  }>;
124
214
  refusalErrors: {
215
+ readonly pullRequestUnreadable: import("@vercel/clinkr").DataErrorDefinition<z.ZodObject<{
216
+ pr: z.ZodNumber;
217
+ repo: z.ZodString;
218
+ kind: z.ZodEnum<{
219
+ "connect-failed": "connect-failed";
220
+ "http-error": "http-error";
221
+ malformed: "malformed";
222
+ "no-token": "no-token";
223
+ "not-found": "not-found";
224
+ rejected: "rejected";
225
+ timeout: "timeout";
226
+ }>;
227
+ status: z.ZodNullable<z.ZodNumber>;
228
+ message: z.ZodNullable<z.ZodString>;
229
+ tokenOrigin: z.ZodNullable<z.ZodEnum<{
230
+ GH_TOKEN: "GH_TOKEN";
231
+ GITHUB_TOKEN: "GITHUB_TOKEN";
232
+ "gh auth token": "gh auth token";
233
+ }>>;
234
+ }, z.core.$strip>, readonly []>;
235
+ readonly prBuildsUnlisted: import("@vercel/clinkr").DataErrorDefinition<z.ZodObject<{
236
+ pr: z.ZodNumber;
237
+ failure: z.ZodObject<{
238
+ kind: z.ZodEnum<{
239
+ "connect-failed": "connect-failed";
240
+ "http-error": "http-error";
241
+ malformed: "malformed";
242
+ "not-found": "not-found";
243
+ rejected: "rejected";
244
+ timeout: "timeout";
245
+ }>;
246
+ status: z.ZodNullable<z.ZodNumber>;
247
+ detail: z.ZodString;
248
+ }, z.core.$strip>;
249
+ }, z.core.$strip>, readonly []>;
250
+ readonly prBuildNotReady: import("@vercel/clinkr").DataErrorDefinition<z.ZodObject<{
251
+ pr: z.ZodNumber;
252
+ headSha: z.ZodString;
253
+ newest: z.ZodNullable<z.ZodObject<{
254
+ build: z.ZodString;
255
+ headSha: z.ZodString;
256
+ createdAt: z.ZodString;
257
+ }, z.core.$strip>>;
258
+ }, z.core.$strip>, readonly []>;
259
+ readonly prBuildExpired: import("@vercel/clinkr").DataErrorDefinition<z.ZodObject<{
260
+ pr: z.ZodNumber;
261
+ headSha: z.ZodString;
262
+ build: z.ZodString;
263
+ expiresAt: z.ZodString;
264
+ }, z.core.$strip>, readonly []>;
125
265
  readonly poolUnreadable: import("@vercel/clinkr").DataErrorDefinition<z.ZodObject<{
126
266
  path: z.ZodString;
127
267
  message: z.ZodString;
128
- }, z.core.$strip>>;
268
+ }, z.core.$strip>, readonly []>;
129
269
  readonly tokenRequestFailed: import("@vercel/clinkr").DataErrorDefinition<z.ZodObject<{
130
270
  cause: z.ZodEnum<{
131
271
  "request-failed": "request-failed";
@@ -153,7 +293,7 @@ export declare const testserverPoolCommand: {
153
293
  detail: z.ZodNullable<z.ZodString>;
154
294
  }, z.core.$strip>>;
155
295
  sandboxMayExist: z.ZodBoolean;
156
- }, z.core.$strip>>;
296
+ }, z.core.$strip>, readonly []>;
157
297
  readonly credentialRejected: import("@vercel/clinkr").DataErrorDefinition<z.ZodObject<{
158
298
  origin: z.ZodDiscriminatedUnion<[z.ZodObject<{
159
299
  source: z.ZodLiteral<"mint">;
@@ -188,7 +328,7 @@ export declare const testserverPoolCommand: {
188
328
  message: z.ZodString;
189
329
  }, z.core.$strip>>;
190
330
  sandboxMayExist: z.ZodBoolean;
191
- }, z.core.$strip>>;
331
+ }, z.core.$strip>, readonly []>;
192
332
  readonly noSandboxes: import("@vercel/clinkr").DataErrorDefinition<z.ZodObject<{
193
333
  requested: z.ZodNumber;
194
334
  ttlMinutes: z.ZodNumber;
@@ -205,11 +345,11 @@ export declare const testserverPoolCommand: {
205
345
  detail: z.ZodNullable<z.ZodString>;
206
346
  }, z.core.$strip>>;
207
347
  sandboxMayExist: z.ZodBoolean;
208
- }, z.core.$strip>>;
348
+ }, z.core.$strip>, readonly []>;
209
349
  readonly noUsableSandboxes: import("@vercel/clinkr").DataErrorDefinition<z.ZodObject<{
210
350
  requested: z.ZodNumber;
211
351
  build: z.ZodString;
212
- }, z.core.$strip>>;
352
+ }, z.core.$strip>, readonly []>;
213
353
  };
214
354
  settle: ({ options }: import("../../core/command-provider.ts").ResourceSettleInput<TestserverPoolKind>) => {
215
355
  ok: true;
@@ -222,6 +362,64 @@ export declare const testserverPoolCommand: {
222
362
  readonly failure: import("./pool/gateways.ts").PoolStoreFailure;
223
363
  }) => import("@vercel/clinkr").CommandError<"pool_unavailable">;
224
364
  refusalFacts: (refusal: import("./provider.ts").TestserverRefusal) => {
365
+ readonly key: "pullRequestUnreadable";
366
+ readonly data: z.input<z.ZodObject<{
367
+ pr: z.ZodNumber;
368
+ repo: z.ZodString;
369
+ kind: z.ZodEnum<{
370
+ "connect-failed": "connect-failed";
371
+ "http-error": "http-error";
372
+ malformed: "malformed";
373
+ "no-token": "no-token";
374
+ "not-found": "not-found";
375
+ rejected: "rejected";
376
+ timeout: "timeout";
377
+ }>;
378
+ status: z.ZodNullable<z.ZodNumber>;
379
+ message: z.ZodNullable<z.ZodString>;
380
+ tokenOrigin: z.ZodNullable<z.ZodEnum<{
381
+ GH_TOKEN: "GH_TOKEN";
382
+ GITHUB_TOKEN: "GITHUB_TOKEN";
383
+ "gh auth token": "gh auth token";
384
+ }>>;
385
+ }, z.core.$strip>>;
386
+ } | {
387
+ readonly key: "prBuildsUnlisted";
388
+ readonly data: z.input<z.ZodObject<{
389
+ pr: z.ZodNumber;
390
+ failure: z.ZodObject<{
391
+ kind: z.ZodEnum<{
392
+ "connect-failed": "connect-failed";
393
+ "http-error": "http-error";
394
+ malformed: "malformed";
395
+ "not-found": "not-found";
396
+ rejected: "rejected";
397
+ timeout: "timeout";
398
+ }>;
399
+ status: z.ZodNullable<z.ZodNumber>;
400
+ detail: z.ZodString;
401
+ }, z.core.$strip>;
402
+ }, z.core.$strip>>;
403
+ } | {
404
+ readonly key: "prBuildNotReady";
405
+ readonly data: z.input<z.ZodObject<{
406
+ pr: z.ZodNumber;
407
+ headSha: z.ZodString;
408
+ newest: z.ZodNullable<z.ZodObject<{
409
+ build: z.ZodString;
410
+ headSha: z.ZodString;
411
+ createdAt: z.ZodString;
412
+ }, z.core.$strip>>;
413
+ }, z.core.$strip>>;
414
+ } | {
415
+ readonly key: "prBuildExpired";
416
+ readonly data: z.input<z.ZodObject<{
417
+ pr: z.ZodNumber;
418
+ headSha: z.ZodString;
419
+ build: z.ZodString;
420
+ expiresAt: z.ZodString;
421
+ }, z.core.$strip>>;
422
+ } | {
225
423
  key: "poolUnreadable";
226
424
  data: {
227
425
  path: string;
@@ -8,6 +8,7 @@ import { optionKeyPath } from "../../config/index.js";
8
8
  import { defineRefusals } from "../../core/index.js";
9
9
  import { createFailureText, describeTtl, mayLeaveSandbox } from "./sandbox/index.js";
10
10
  import { credentialOriginRows, rejectedCredentialFacts, rejectedCredentialShape, rejectedCredentialText, tokenRequestFailureFacts, tokenRequestFailureShape, } from "./credential-facts.js";
11
+ import { prBuildRefusalErrors, prBuildRefusalFacts } from "./pr-build-facts.js";
11
12
  import { createFailureSchema, failedCreateFacts, unpooledFacts, unpooledSchema } from "./ran.js";
12
13
  /** A row listing the created Testserver sandboxes the run couldn't add to the pool, when there are any. */
13
14
  function unpooledRows(unpooled) {
@@ -181,6 +182,7 @@ export const testserverPoolRefusalErrors = defineRefusals({
181
182
  ],
182
183
  }),
183
184
  },
185
+ ...prBuildRefusalErrors("The command didn't run."),
184
186
  });
185
187
  /**
186
188
  * The Testserver pool resource's command half, `resources.testserverPool`, with its errors: its prepare's,
@@ -239,6 +241,11 @@ export const testserverPoolCommand = {
239
241
  build: "resolvedBuild" in refusal.match ? refusal.match.resolvedBuild : refusal.match.requestedBuild,
240
242
  },
241
243
  };
244
+ case "pull-request-unreadable":
245
+ case "pr-builds-unlisted":
246
+ case "pr-build-not-ready":
247
+ case "pr-build-expired":
248
+ return prBuildRefusalFacts(refusal);
242
249
  }
243
250
  },
244
251
  canceledLines: testserverPoolCanceledLines,