@spacefast/common 0.0.5 → 0.0.7

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 (183) hide show
  1. package/brand-assets/spacefast-favicon.svg +16 -0
  2. package/brand-assets/spacefast-sf-full-bleed.svg +13 -0
  3. package/brand-assets/spacefast-wordmark.svg +5 -0
  4. package/dist/agents/connect-targets.d.ts +138 -0
  5. package/dist/agents/connect-targets.js +243 -0
  6. package/dist/brand-assets-build.d.ts +26 -0
  7. package/dist/brand-assets-build.js +81 -0
  8. package/dist/brand-assets.d.ts +42 -0
  9. package/dist/brand-assets.js +30 -0
  10. package/dist/brand.d.ts +1 -0
  11. package/dist/brand.js +5 -0
  12. package/dist/config/domains.d.ts +12 -6
  13. package/dist/config/domains.js +30 -38
  14. package/dist/contracts/access.d.ts +967 -124
  15. package/dist/contracts/access.js +804 -148
  16. package/dist/contracts/activity.d.ts +1 -1
  17. package/dist/contracts/activity.js +28 -2
  18. package/dist/contracts/annotations.d.ts +2 -4
  19. package/dist/contracts/api-keys.d.ts +126 -4
  20. package/dist/contracts/api-keys.js +74 -6
  21. package/dist/contracts/archives.d.ts +8 -2
  22. package/dist/contracts/archives.js +11 -4
  23. package/dist/contracts/billing.d.ts +0 -9
  24. package/dist/contracts/builds.d.ts +65 -21
  25. package/dist/contracts/builds.js +29 -0
  26. package/dist/contracts/common.d.ts +2 -0
  27. package/dist/contracts/common.js +4 -0
  28. package/dist/contracts/continuation.d.ts +0 -3
  29. package/dist/contracts/countries.d.ts +2 -0
  30. package/dist/contracts/countries.js +261 -0
  31. package/dist/contracts/deployments.d.ts +34 -34
  32. package/dist/contracts/device-auth.d.ts +4 -11
  33. package/dist/contracts/device-auth.js +4 -0
  34. package/dist/contracts/docs.d.ts +119 -0
  35. package/dist/contracts/docs.js +51 -0
  36. package/dist/contracts/domains.d.ts +96 -54
  37. package/dist/contracts/domains.js +26 -4
  38. package/dist/contracts/enums.d.ts +15 -16
  39. package/dist/contracts/enums.js +26 -14
  40. package/dist/contracts/error-code-meta.d.ts +184 -0
  41. package/dist/contracts/error-code-meta.js +124 -10
  42. package/dist/contracts/error-codes.d.ts +1 -1
  43. package/dist/contracts/error-codes.js +42 -0
  44. package/dist/contracts/events.d.ts +1 -1
  45. package/dist/contracts/feature-lifecycle-core.d.ts +36 -0
  46. package/dist/contracts/feature-lifecycle-core.js +220 -0
  47. package/dist/contracts/feature-lifecycle.d.ts +7 -0
  48. package/dist/contracts/feature-lifecycle.js +31 -0
  49. package/dist/contracts/features.d.ts +76 -6
  50. package/dist/contracts/features.js +178 -13
  51. package/dist/contracts/generated-feature-launch-entries.d.ts +2 -0
  52. package/dist/contracts/generated-feature-launch-entries.js +518 -0
  53. package/dist/contracts/git.d.ts +2 -8
  54. package/dist/contracts/ids.d.ts +9 -0
  55. package/dist/contracts/ids.js +13 -0
  56. package/dist/contracts/mcp.d.ts +8 -10
  57. package/dist/contracts/me.js +1 -1
  58. package/dist/contracts/oauth-resources.d.ts +19 -8
  59. package/dist/contracts/oauth-resources.js +44 -13
  60. package/dist/contracts/operations.d.ts +161 -1
  61. package/dist/contracts/operations.js +49 -1
  62. package/dist/contracts/platform.d.ts +6 -102
  63. package/dist/contracts/platform.js +6 -50
  64. package/dist/contracts/publishes.d.ts +130 -0
  65. package/dist/contracts/publishes.js +145 -0
  66. package/dist/contracts/push-new.d.ts +4 -4
  67. package/dist/contracts/quotas.d.ts +2 -0
  68. package/dist/contracts/quotas.js +8 -0
  69. package/dist/contracts/repository-connections.d.ts +9 -8
  70. package/dist/contracts/repository-connections.js +13 -0
  71. package/dist/contracts/resources.d.ts +99 -13
  72. package/dist/contracts/resources.js +36 -4
  73. package/dist/contracts/routes.d.ts +0 -2
  74. package/dist/contracts/runtime-api.d.ts +363 -39
  75. package/dist/contracts/runtime-api.js +276 -6
  76. package/dist/contracts/sf-config-v1.d.ts +75 -0
  77. package/dist/contracts/sf-config-v1.js +6 -0
  78. package/dist/contracts/sites.d.ts +19 -2
  79. package/dist/contracts/sites.js +21 -0
  80. package/dist/contracts/space-config.d.ts +201 -2
  81. package/dist/contracts/space-config.js +135 -5
  82. package/dist/contracts/spaces.d.ts +376 -196
  83. package/dist/contracts/spaces.js +62 -10
  84. package/dist/contracts/superadmin-emails.d.ts +4 -2
  85. package/dist/contracts/superadmin-emails.js +8 -0
  86. package/dist/contracts/superadmin-queues.d.ts +26 -26
  87. package/dist/contracts/superadmin-spaces.d.ts +172 -42
  88. package/dist/contracts/superadmin-tenants.d.ts +6 -6
  89. package/dist/contracts/superadmin-tenants.js +6 -11
  90. package/dist/contracts/superadmin.d.ts +6 -93
  91. package/dist/contracts/superadmin.js +6 -14
  92. package/dist/contracts/tags.d.ts +10 -9
  93. package/dist/contracts/tags.js +2 -1
  94. package/dist/contracts/teams.d.ts +26 -30
  95. package/dist/contracts/teams.js +11 -17
  96. package/dist/contracts/theme-json.d.ts +30 -0
  97. package/dist/contracts/theme-json.js +48 -0
  98. package/dist/contracts/variables.d.ts +0 -2
  99. package/dist/contracts/variables.js +0 -5
  100. package/dist/contracts/webhooks.d.ts +2 -0
  101. package/dist/contracts/webhooks.js +1 -1
  102. package/dist/contracts/zero.d.ts +5 -10
  103. package/dist/docs/agent-prose.d.ts +43 -3
  104. package/dist/docs/agent-prose.js +146 -7
  105. package/dist/docs/agent-setup.d.ts +51 -0
  106. package/dist/docs/agent-setup.js +211 -14
  107. package/dist/docs/agent-solutions.d.ts +5 -5
  108. package/dist/docs/agent-solutions.js +2 -2
  109. package/dist/docs/catalog.d.ts +650 -0
  110. package/dist/docs/catalog.js +758 -0
  111. package/dist/docs/error-docs.d.ts +0 -2
  112. package/dist/docs/error-docs.js +189 -35
  113. package/dist/docs/index-build.d.ts +17 -0
  114. package/dist/docs/index-build.js +24 -0
  115. package/dist/docs/search.d.ts +54 -0
  116. package/dist/docs/search.js +96 -0
  117. package/dist/docs/skill-distribution.d.ts +5 -3
  118. package/dist/docs/skill-distribution.js +8 -8
  119. package/dist/slug-policy/blocklist.d.ts +4 -0
  120. package/dist/slug-policy/blocklist.js +122 -0
  121. package/dist/slug-policy/index.d.ts +17 -0
  122. package/dist/slug-policy/index.js +86 -0
  123. package/dist/utils/access-match.d.ts +39 -0
  124. package/dist/utils/access-match.js +296 -0
  125. package/dist/utils/auth-redirect.d.ts +3 -1
  126. package/dist/utils/auth-redirect.js +21 -1
  127. package/dist/utils/build-settings.d.ts +6 -0
  128. package/dist/utils/build-settings.js +429 -46
  129. package/dist/utils/claim-token.d.ts +8 -0
  130. package/dist/utils/claim-token.js +23 -2
  131. package/dist/utils/concurrency.d.ts +1 -0
  132. package/dist/utils/concurrency.js +22 -0
  133. package/dist/utils/content-type.d.ts +1 -0
  134. package/dist/utils/content-type.js +1 -1
  135. package/dist/utils/credential-policy.d.ts +54 -0
  136. package/dist/utils/{access-policy.js → credential-policy.js} +28 -2
  137. package/dist/utils/email.d.ts +1 -0
  138. package/dist/utils/email.js +3 -0
  139. package/dist/utils/gate-theme.d.ts +61 -0
  140. package/dist/utils/gate-theme.js +217 -0
  141. package/dist/utils/git-repository.d.ts +0 -1
  142. package/dist/utils/git-repository.js +0 -3
  143. package/dist/utils/id-hints.d.ts +8 -0
  144. package/dist/utils/id-hints.js +61 -0
  145. package/dist/utils/local-space-state.d.ts +91 -0
  146. package/dist/utils/local-space-state.js +251 -0
  147. package/dist/utils/oauth-signed-query.d.ts +8 -0
  148. package/dist/utils/oauth-signed-query.js +26 -0
  149. package/dist/utils/publish-detection.d.ts +0 -8
  150. package/dist/utils/publish-detection.js +0 -93
  151. package/dist/utils/publish-policy.d.ts +6 -5
  152. package/dist/utils/publish-policy.js +71 -7
  153. package/dist/utils/query-keys.d.ts +16 -4
  154. package/dist/utils/query-keys.js +31 -4
  155. package/dist/utils/runtime-paths.d.ts +0 -1
  156. package/dist/utils/runtime-paths.js +0 -1
  157. package/dist/utils/runtime-upload-batch.d.ts +18 -0
  158. package/dist/utils/runtime-upload-batch.js +90 -0
  159. package/dist/utils/runtime-upload.d.ts +2 -0
  160. package/dist/utils/runtime-upload.js +5 -0
  161. package/dist/utils/sf-config-v1.d.ts +2 -0
  162. package/dist/utils/sf-config-v1.js +542 -0
  163. package/dist/utils/space-config.d.ts +4 -0
  164. package/dist/utils/space-config.js +10 -1
  165. package/dist/utils/space-theme.d.ts +2 -0
  166. package/dist/utils/space-theme.js +9 -0
  167. package/dist/utils/static-runtime-policy.d.ts +0 -21
  168. package/dist/utils/static-runtime-policy.js +19 -103
  169. package/dist/utils/upload-session.d.ts +1 -1
  170. package/dist/utils/wpcom-auth-redirects.d.ts +32 -2
  171. package/dist/utils/wpcom-auth-redirects.js +26 -10
  172. package/dist/vocabulary.d.ts +130 -30
  173. package/dist/vocabulary.js +77 -36
  174. package/package.json +35 -1
  175. package/dist/contracts/account.d.ts +0 -28
  176. package/dist/contracts/account.js +0 -54
  177. package/dist/contracts/intercom.d.ts +0 -6
  178. package/dist/contracts/intercom.js +0 -5
  179. package/dist/contracts/telemetry.d.ts +0 -2
  180. package/dist/contracts/telemetry.js +0 -1
  181. package/dist/utils/access-policy.d.ts +0 -39
  182. package/dist/utils/error-display.d.ts +0 -7
  183. package/dist/utils/error-display.js +0 -42
@@ -86,24 +86,66 @@ export declare const BuildCreateInputSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
86
86
  branch: z.ZodOptional<z.ZodString>;
87
87
  pullRequestNumber: z.ZodOptional<z.ZodNumber>;
88
88
  }, z.core.$strip>], "kind">;
89
+ declare const buildExecutionLaunchSchema: z.ZodObject<{
90
+ state: z.ZodEnum<{
91
+ started: "started";
92
+ starting: "starting";
93
+ rejected: "rejected";
94
+ }>;
95
+ requestedAt: z.ZodString;
96
+ startedAt: z.ZodOptional<z.ZodString>;
97
+ pid: z.ZodOptional<z.ZodNumber>;
98
+ rejectedReason: z.ZodOptional<z.ZodString>;
99
+ }, z.core.$strip>;
100
+ declare const buildExecutionSupervisionSchema: z.ZodObject<{
101
+ generation: z.ZodNumber;
102
+ owner: z.ZodString;
103
+ leaseExpiresAt: z.ZodString;
104
+ }, z.core.$strip>;
89
105
  declare const InternalBuildExecutionSchema: z.ZodObject<{
90
106
  runner: z.ZodDefault<z.ZodNullable<z.ZodString>>;
91
107
  runnerJobId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
92
108
  sandboxId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
93
109
  region: z.ZodDefault<z.ZodNullable<z.ZodString>>;
110
+ logOffset: z.ZodOptional<z.ZodNumber>;
111
+ exitCode: z.ZodOptional<z.ZodNumber>;
112
+ terminationReason: z.ZodOptional<z.ZodEnum<{
113
+ command: "command";
114
+ timeout: "timeout";
115
+ }>>;
116
+ launch: z.ZodOptional<z.ZodObject<{
117
+ state: z.ZodEnum<{
118
+ started: "started";
119
+ starting: "starting";
120
+ rejected: "rejected";
121
+ }>;
122
+ requestedAt: z.ZodString;
123
+ startedAt: z.ZodOptional<z.ZodString>;
124
+ pid: z.ZodOptional<z.ZodNumber>;
125
+ rejectedReason: z.ZodOptional<z.ZodString>;
126
+ }, z.core.$strip>>;
127
+ supervision: z.ZodOptional<z.ZodObject<{
128
+ generation: z.ZodNumber;
129
+ owner: z.ZodString;
130
+ leaseExpiresAt: z.ZodString;
131
+ }, z.core.$strip>>;
94
132
  metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
133
+ phases: z.ZodOptional<z.ZodArray<z.ZodObject<{
134
+ phase: z.ZodString;
135
+ at: z.ZodString;
136
+ }, z.core.$strip>>>;
95
137
  }, z.core.$strip>;
96
138
  export declare const BuildSchema: z.ZodObject<{
97
139
  id: z.ZodString;
98
140
  spaceId: z.ZodString;
99
141
  status: z.ZodEnum<{
100
142
  failed: "failed";
101
- queued: "queued";
102
- running: "running";
103
- succeeded: "succeeded";
104
143
  canceled: "canceled";
105
144
  waiting_for_source: "waiting_for_source";
106
145
  uploading_source: "uploading_source";
146
+ queued: "queued";
147
+ running: "running";
148
+ succeeded: "succeeded";
107
149
  skipped: "skipped";
108
150
  }>;
109
151
  input: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -137,16 +179,16 @@ export declare const BuildSchema: z.ZodObject<{
137
179
  diagnostics: z.ZodDefault<z.ZodArray<z.ZodObject<{
138
180
  code: z.ZodString;
139
181
  severity: z.ZodEnum<{
182
+ info: "info";
140
183
  warning: "warning";
141
184
  error: "error";
142
- info: "info";
143
185
  }>;
144
186
  message: z.ZodString;
145
187
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
146
188
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
189
+ registrar: "registrar";
147
190
  wpcloud: "wpcloud";
148
191
  dns: "dns";
149
- registrar: "registrar";
150
192
  runtime: "runtime";
151
193
  }>>>;
152
194
  details: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
@@ -188,16 +230,16 @@ export declare const buildCreateRequestSchema: z.ZodObject<{
188
230
  diagnostics: z.ZodOptional<z.ZodArray<z.ZodObject<{
189
231
  code: z.ZodString;
190
232
  severity: z.ZodEnum<{
233
+ info: "info";
191
234
  warning: "warning";
192
235
  error: "error";
193
- info: "info";
194
236
  }>;
195
237
  message: z.ZodString;
196
238
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
197
239
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
240
+ registrar: "registrar";
198
241
  wpcloud: "wpcloud";
199
242
  dns: "dns";
200
- registrar: "registrar";
201
243
  runtime: "runtime";
202
244
  }>>>;
203
245
  details: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
@@ -251,16 +293,16 @@ export declare const buildSourceArchiveUploadSchema: z.ZodObject<{
251
293
  diagnostics: z.ZodOptional<z.ZodArray<z.ZodObject<{
252
294
  code: z.ZodString;
253
295
  severity: z.ZodEnum<{
296
+ info: "info";
254
297
  warning: "warning";
255
298
  error: "error";
256
- info: "info";
257
299
  }>;
258
300
  message: z.ZodString;
259
301
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
260
302
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
303
+ registrar: "registrar";
261
304
  wpcloud: "wpcloud";
262
305
  dns: "dns";
263
- registrar: "registrar";
264
306
  runtime: "runtime";
265
307
  }>>>;
266
308
  details: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
@@ -276,12 +318,12 @@ export declare const buildCreateResponseSchema: z.ZodObject<{
276
318
  spaceId: z.ZodString;
277
319
  status: z.ZodEnum<{
278
320
  failed: "failed";
279
- queued: "queued";
280
- running: "running";
281
- succeeded: "succeeded";
282
321
  canceled: "canceled";
283
322
  waiting_for_source: "waiting_for_source";
284
323
  uploading_source: "uploading_source";
324
+ queued: "queued";
325
+ running: "running";
326
+ succeeded: "succeeded";
285
327
  skipped: "skipped";
286
328
  }>;
287
329
  input: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -315,16 +357,16 @@ export declare const buildCreateResponseSchema: z.ZodObject<{
315
357
  diagnostics: z.ZodDefault<z.ZodArray<z.ZodObject<{
316
358
  code: z.ZodString;
317
359
  severity: z.ZodEnum<{
360
+ info: "info";
318
361
  warning: "warning";
319
362
  error: "error";
320
- info: "info";
321
363
  }>;
322
364
  message: z.ZodString;
323
365
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
324
366
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
367
+ registrar: "registrar";
325
368
  wpcloud: "wpcloud";
326
369
  dns: "dns";
327
- registrar: "registrar";
328
370
  runtime: "runtime";
329
371
  }>>>;
330
372
  details: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
@@ -380,16 +422,16 @@ export declare const buildCreateResponseSchema: z.ZodObject<{
380
422
  diagnostics: z.ZodOptional<z.ZodArray<z.ZodObject<{
381
423
  code: z.ZodString;
382
424
  severity: z.ZodEnum<{
425
+ info: "info";
383
426
  warning: "warning";
384
427
  error: "error";
385
- info: "info";
386
428
  }>;
387
429
  message: z.ZodString;
388
430
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
389
431
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
432
+ registrar: "registrar";
390
433
  wpcloud: "wpcloud";
391
434
  dns: "dns";
392
- registrar: "registrar";
393
435
  runtime: "runtime";
394
436
  }>>>;
395
437
  details: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
@@ -410,12 +452,12 @@ export declare const buildListResponseSchema: z.ZodObject<{
410
452
  spaceId: z.ZodString;
411
453
  status: z.ZodEnum<{
412
454
  failed: "failed";
413
- queued: "queued";
414
- running: "running";
415
- succeeded: "succeeded";
416
455
  canceled: "canceled";
417
456
  waiting_for_source: "waiting_for_source";
418
457
  uploading_source: "uploading_source";
458
+ queued: "queued";
459
+ running: "running";
460
+ succeeded: "succeeded";
419
461
  skipped: "skipped";
420
462
  }>;
421
463
  input: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -449,16 +491,16 @@ export declare const buildListResponseSchema: z.ZodObject<{
449
491
  diagnostics: z.ZodDefault<z.ZodArray<z.ZodObject<{
450
492
  code: z.ZodString;
451
493
  severity: z.ZodEnum<{
494
+ info: "info";
452
495
  warning: "warning";
453
496
  error: "error";
454
- info: "info";
455
497
  }>;
456
498
  message: z.ZodString;
457
499
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
458
500
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
501
+ registrar: "registrar";
459
502
  wpcloud: "wpcloud";
460
503
  dns: "dns";
461
- registrar: "registrar";
462
504
  runtime: "runtime";
463
505
  }>>>;
464
506
  details: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
@@ -499,6 +541,8 @@ export type InternalBuildSource = z.infer<typeof InternalBuildSourceSchema>;
499
541
  export type BuildSettings = z.infer<typeof BuildSettingsSchema>;
500
542
  export type BuildTarget = z.infer<typeof BuildTargetSchema>;
501
543
  export type InternalBuildExecution = z.infer<typeof InternalBuildExecutionSchema>;
544
+ export type InternalBuildExecutionLaunch = z.infer<typeof buildExecutionLaunchSchema>;
545
+ export type InternalBuildExecutionSupervision = z.infer<typeof buildExecutionSupervisionSchema>;
502
546
  export type BuildCreateRequest = z.infer<typeof buildCreateRequestSchema>;
503
547
  export type BuildCreateResponse = z.infer<typeof buildCreateResponseSchema>;
504
548
  export {};
@@ -168,13 +168,42 @@ export const BuildCreateInputSchema = z
168
168
  }),
169
169
  ])
170
170
  .describe("What a new build should run against.");
171
+ // One phase-timeline entry the build runner appends via recordBuildPhase
172
+ // (apps/control-plane/src/builds/runner.ts BUILD_PHASES); `phase` stays a
173
+ // plain string here since the runner's specific phase vocabulary is an
174
+ // app-level concern, not a shared contract.
175
+ const buildExecutionPhaseSchema = z.object({
176
+ phase: z.string().min(1).describe("Build phase name; see BUILD_PHASES in builds/runner.ts."),
177
+ at: z.string().datetime(),
178
+ });
179
+ const buildExecutionLaunchSchema = z.object({
180
+ state: z.enum(["starting", "started", "rejected"]),
181
+ requestedAt: z.string().datetime(),
182
+ startedAt: z.string().datetime().optional(),
183
+ pid: z.number().int().optional(),
184
+ rejectedReason: z.string().optional(),
185
+ });
186
+ const buildExecutionSupervisionSchema = z.object({
187
+ generation: z.number().int().positive(),
188
+ owner: z.string().min(1),
189
+ leaseExpiresAt: z.string().datetime(),
190
+ });
171
191
  const InternalBuildExecutionSchema = z
172
192
  .object({
173
193
  runner: z.string().nullable().default(null),
174
194
  runnerJobId: z.string().nullable().default(null),
175
195
  sandboxId: z.string().nullable().default(null),
176
196
  region: z.string().nullable().default(null),
197
+ logOffset: z.number().int().nonnegative().optional(),
198
+ exitCode: z.number().int().min(0).max(255).optional(),
199
+ terminationReason: z.enum(["command", "timeout"]).optional(),
200
+ launch: buildExecutionLaunchSchema.optional(),
201
+ supervision: buildExecutionSupervisionSchema.optional(),
177
202
  metadata: z.record(z.string(), z.unknown()).default({}),
203
+ phases: z
204
+ .array(buildExecutionPhaseSchema)
205
+ .optional()
206
+ .describe("Phase timeline the runner appends to via recordBuildPhase."),
178
207
  })
179
208
  .describe("Internal runner execution metadata surfaced only where appropriate.");
180
209
  export const BuildSchema = z.object({
@@ -110,9 +110,11 @@ export declare const ApiErrorResponseSchema: z.ZodObject<{
110
110
  docsUrl: z.ZodString;
111
111
  details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
112
112
  suggestions: z.ZodOptional<z.ZodArray<z.ZodString>>;
113
+ next: z.ZodOptional<z.ZodArray<z.ZodString>>;
113
114
  requestId: z.ZodOptional<z.ZodString>;
114
115
  }, z.core.$strip>;
115
116
  }, z.core.$strip>;
117
+ export type ApiErrorResponse = z.infer<typeof ApiErrorResponseSchema>;
116
118
  export declare function dataEnvelope<T extends z.ZodType>(data: T): z.ZodObject<{
117
119
  data: T;
118
120
  }, z.core.$strip>;
@@ -83,6 +83,10 @@ export const ApiErrorResponseSchema = z.object({
83
83
  .array(z.string())
84
84
  .optional()
85
85
  .describe("Actionable recovery steps safe to show in dashboards, SDKs, and CLI output."),
86
+ next: z
87
+ .array(z.string())
88
+ .optional()
89
+ .describe("Copy-pasteable commands or API requests an agent can run next."),
86
90
  requestId: z.string().optional().describe("Request id to quote when contacting support."),
87
91
  }),
88
92
  });
@@ -2,7 +2,6 @@ import { z } from "zod";
2
2
  export declare const RequiresActionTypeSchema: z.ZodEnum<{
3
3
  device_authorization: "device_authorization";
4
4
  }>;
5
- export type RequiresActionType = z.infer<typeof RequiresActionTypeSchema>;
6
5
  export declare const RequiresActionSchema: z.ZodObject<{
7
6
  actionType: z.ZodEnum<{
8
7
  device_authorization: "device_authorization";
@@ -27,11 +26,9 @@ export declare const RequiresActionEnvelopeSchema: z.ZodObject<{
27
26
  expiresAt: z.ZodString;
28
27
  }, z.core.$strict>;
29
28
  }, z.core.$strict>;
30
- export type RequiresActionEnvelope = z.infer<typeof RequiresActionEnvelopeSchema>;
31
29
  export declare const ActionResumeRequestSchema: z.ZodObject<{
32
30
  continuationToken: z.ZodString;
33
31
  }, z.core.$strict>;
34
- export type ActionResumeRequest = z.infer<typeof ActionResumeRequestSchema>;
35
32
  export declare const ActionResumeResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
36
33
  status: z.ZodLiteral<"pending">;
37
34
  requiresAction: z.ZodObject<{
@@ -0,0 +1,2 @@
1
+ export declare const ISO_COUNTRY_CODES: readonly ["AD", "AE", "AF", "AG", "AI", "AL", "AM", "AO", "AQ", "AR", "AS", "AT", "AU", "AW", "AX", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BL", "BM", "BN", "BO", "BQ", "BR", "BS", "BT", "BV", "BW", "BY", "BZ", "CA", "CC", "CD", "CF", "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", "CU", "CV", "CW", "CX", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE", "EG", "EH", "ER", "ES", "ET", "FI", "FJ", "FK", "FM", "FO", "FR", "GA", "GB", "GD", "GE", "GF", "GG", "GH", "GI", "GL", "GM", "GN", "GP", "GQ", "GR", "GS", "GT", "GU", "GW", "GY", "HK", "HM", "HN", "HR", "HT", "HU", "ID", "IE", "IL", "IM", "IN", "IO", "IQ", "IR", "IS", "IT", "JE", "JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM", "KN", "KP", "KR", "KW", "KY", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", "LS", "LT", "LU", "LV", "LY", "MA", "MC", "MD", "ME", "MF", "MG", "MH", "MK", "ML", "MM", "MN", "MO", "MP", "MQ", "MR", "MS", "MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA", "NC", "NE", "NF", "NG", "NI", "NL", "NO", "NP", "NR", "NU", "NZ", "OM", "PA", "PE", "PF", "PG", "PH", "PK", "PL", "PM", "PN", "PR", "PS", "PT", "PW", "PY", "QA", "RE", "RO", "RS", "RU", "RW", "SA", "SB", "SC", "SD", "SE", "SG", "SH", "SI", "SJ", "SK", "SL", "SM", "SN", "SO", "SR", "SS", "ST", "SV", "SX", "SY", "SZ", "TC", "TD", "TF", "TG", "TH", "TJ", "TK", "TL", "TM", "TN", "TO", "TR", "TT", "TV", "TW", "TZ", "UA", "UG", "UM", "US", "UY", "UZ", "VA", "VC", "VE", "VG", "VI", "VN", "VU", "WF", "WS", "YE", "YT", "ZA", "ZM", "ZW"];
2
+ export type IsoCountryCode = (typeof ISO_COUNTRY_CODES)[number];
@@ -0,0 +1,261 @@
1
+ // ISO 3166-1 alpha-2 country codes — the vocabulary of the firewall card's
2
+ // country section (contracts/access.ts `firewallCountriesSchema`, access-plan
3
+ // §5.6). The rule `match.country` is an exact-equality matcher against the
4
+ // edge-supplied country header, so "allow only these countries" compiles to
5
+ // one deny/challenge rule per code in the COMPLEMENT of this list — which is
6
+ // why the list itself is a contract: the compiler and the projection must
7
+ // agree on the universe.
8
+ //
9
+ // Officially assigned codes only (no exceptionally-reserved / user-assigned
10
+ // ranges). Display names are a UI concern (`Intl.DisplayNames`), never stored.
11
+ export const ISO_COUNTRY_CODES = [
12
+ "AD",
13
+ "AE",
14
+ "AF",
15
+ "AG",
16
+ "AI",
17
+ "AL",
18
+ "AM",
19
+ "AO",
20
+ "AQ",
21
+ "AR",
22
+ "AS",
23
+ "AT",
24
+ "AU",
25
+ "AW",
26
+ "AX",
27
+ "AZ",
28
+ "BA",
29
+ "BB",
30
+ "BD",
31
+ "BE",
32
+ "BF",
33
+ "BG",
34
+ "BH",
35
+ "BI",
36
+ "BJ",
37
+ "BL",
38
+ "BM",
39
+ "BN",
40
+ "BO",
41
+ "BQ",
42
+ "BR",
43
+ "BS",
44
+ "BT",
45
+ "BV",
46
+ "BW",
47
+ "BY",
48
+ "BZ",
49
+ "CA",
50
+ "CC",
51
+ "CD",
52
+ "CF",
53
+ "CG",
54
+ "CH",
55
+ "CI",
56
+ "CK",
57
+ "CL",
58
+ "CM",
59
+ "CN",
60
+ "CO",
61
+ "CR",
62
+ "CU",
63
+ "CV",
64
+ "CW",
65
+ "CX",
66
+ "CY",
67
+ "CZ",
68
+ "DE",
69
+ "DJ",
70
+ "DK",
71
+ "DM",
72
+ "DO",
73
+ "DZ",
74
+ "EC",
75
+ "EE",
76
+ "EG",
77
+ "EH",
78
+ "ER",
79
+ "ES",
80
+ "ET",
81
+ "FI",
82
+ "FJ",
83
+ "FK",
84
+ "FM",
85
+ "FO",
86
+ "FR",
87
+ "GA",
88
+ "GB",
89
+ "GD",
90
+ "GE",
91
+ "GF",
92
+ "GG",
93
+ "GH",
94
+ "GI",
95
+ "GL",
96
+ "GM",
97
+ "GN",
98
+ "GP",
99
+ "GQ",
100
+ "GR",
101
+ "GS",
102
+ "GT",
103
+ "GU",
104
+ "GW",
105
+ "GY",
106
+ "HK",
107
+ "HM",
108
+ "HN",
109
+ "HR",
110
+ "HT",
111
+ "HU",
112
+ "ID",
113
+ "IE",
114
+ "IL",
115
+ "IM",
116
+ "IN",
117
+ "IO",
118
+ "IQ",
119
+ "IR",
120
+ "IS",
121
+ "IT",
122
+ "JE",
123
+ "JM",
124
+ "JO",
125
+ "JP",
126
+ "KE",
127
+ "KG",
128
+ "KH",
129
+ "KI",
130
+ "KM",
131
+ "KN",
132
+ "KP",
133
+ "KR",
134
+ "KW",
135
+ "KY",
136
+ "KZ",
137
+ "LA",
138
+ "LB",
139
+ "LC",
140
+ "LI",
141
+ "LK",
142
+ "LR",
143
+ "LS",
144
+ "LT",
145
+ "LU",
146
+ "LV",
147
+ "LY",
148
+ "MA",
149
+ "MC",
150
+ "MD",
151
+ "ME",
152
+ "MF",
153
+ "MG",
154
+ "MH",
155
+ "MK",
156
+ "ML",
157
+ "MM",
158
+ "MN",
159
+ "MO",
160
+ "MP",
161
+ "MQ",
162
+ "MR",
163
+ "MS",
164
+ "MT",
165
+ "MU",
166
+ "MV",
167
+ "MW",
168
+ "MX",
169
+ "MY",
170
+ "MZ",
171
+ "NA",
172
+ "NC",
173
+ "NE",
174
+ "NF",
175
+ "NG",
176
+ "NI",
177
+ "NL",
178
+ "NO",
179
+ "NP",
180
+ "NR",
181
+ "NU",
182
+ "NZ",
183
+ "OM",
184
+ "PA",
185
+ "PE",
186
+ "PF",
187
+ "PG",
188
+ "PH",
189
+ "PK",
190
+ "PL",
191
+ "PM",
192
+ "PN",
193
+ "PR",
194
+ "PS",
195
+ "PT",
196
+ "PW",
197
+ "PY",
198
+ "QA",
199
+ "RE",
200
+ "RO",
201
+ "RS",
202
+ "RU",
203
+ "RW",
204
+ "SA",
205
+ "SB",
206
+ "SC",
207
+ "SD",
208
+ "SE",
209
+ "SG",
210
+ "SH",
211
+ "SI",
212
+ "SJ",
213
+ "SK",
214
+ "SL",
215
+ "SM",
216
+ "SN",
217
+ "SO",
218
+ "SR",
219
+ "SS",
220
+ "ST",
221
+ "SV",
222
+ "SX",
223
+ "SY",
224
+ "SZ",
225
+ "TC",
226
+ "TD",
227
+ "TF",
228
+ "TG",
229
+ "TH",
230
+ "TJ",
231
+ "TK",
232
+ "TL",
233
+ "TM",
234
+ "TN",
235
+ "TO",
236
+ "TR",
237
+ "TT",
238
+ "TV",
239
+ "TW",
240
+ "TZ",
241
+ "UA",
242
+ "UG",
243
+ "UM",
244
+ "US",
245
+ "UY",
246
+ "UZ",
247
+ "VA",
248
+ "VC",
249
+ "VE",
250
+ "VG",
251
+ "VI",
252
+ "VN",
253
+ "VU",
254
+ "WF",
255
+ "WS",
256
+ "YE",
257
+ "YT",
258
+ "ZA",
259
+ "ZM",
260
+ "ZW",
261
+ ];