@labelbox/horizon-cli 0.0.0-stage → 0.0.1

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.
@@ -0,0 +1,531 @@
1
+ import { z } from 'zod';
2
+ export { DEFAULT_BASE_URL } from './default-base-url.generated.js';
3
+ export { hasJsonRequestRepresentation, isJsonOperationCallable, isMultipartRequestOperation, JSON_REQUEST_MEDIA_TYPE, MULTIPART_REQUEST_MEDIA_TYPE, } from './json-operation-callability.js';
4
+ /**
5
+ * Join a hand-written support-endpoint path onto the base URL, under the API
6
+ * version segment. `path` is version-relative and must start with `/`.
7
+ */
8
+ export declare function supportUrl(baseUrl: string, path: string): string;
9
+ /**
10
+ * The manifest format the engine understands. Bumped only on a *breaking* schema
11
+ * change (a renamed/removed required field, a changed enum) — additive fields are
12
+ * backward-compatible because the schema strips unknown keys rather than rejecting
13
+ * them, so a newer server never breaks an older CLI by adding data. A mismatch is
14
+ * surfaced with an actionable upgrade message at the validation boundary.
15
+ */
16
+ export declare const MANIFEST_FORMAT_VERSION = 2;
17
+ export declare const JsonSchemaTypeSchema: z.ZodEnum<{
18
+ array: "array";
19
+ boolean: "boolean";
20
+ integer: "integer";
21
+ null: "null";
22
+ number: "number";
23
+ object: "object";
24
+ string: "string";
25
+ }>;
26
+ export type JsonSchemaType = z.infer<typeof JsonSchemaTypeSchema>;
27
+ export interface ShapeNode {
28
+ name?: string | undefined;
29
+ type: string;
30
+ jsonTypes?: JsonSchemaType[] | undefined;
31
+ required?: boolean | undefined;
32
+ description?: string | undefined;
33
+ enum?: string[] | undefined;
34
+ itemEnum?: string[] | undefined;
35
+ default?: string | number | boolean | undefined;
36
+ format?: string | undefined;
37
+ example?: string | number | boolean | undefined;
38
+ nullable?: boolean | undefined;
39
+ minimum?: number | undefined;
40
+ maximum?: number | undefined;
41
+ exclusiveMinimum?: number | undefined;
42
+ exclusiveMaximum?: number | undefined;
43
+ minLength?: number | undefined;
44
+ maxLength?: number | undefined;
45
+ minItems?: number | undefined;
46
+ maxItems?: number | undefined;
47
+ maxProperties?: number | undefined;
48
+ uniqueItems?: boolean | undefined;
49
+ pattern?: string | undefined;
50
+ fields?: ShapeNode[] | undefined;
51
+ items?: ShapeNode | undefined;
52
+ additionalProperties?: boolean | ShapeNode | undefined;
53
+ variants?: ShapeNode[] | undefined;
54
+ }
55
+ export declare const ShapeNodeSchema: z.ZodType<ShapeNode>;
56
+ /** The metadata / constraint keys a `ShapeNode` carries beyond its structure. */
57
+ export type ShapeMetaKey = Exclude<keyof ShapeNode, 'name' | 'type' | 'jsonTypes' | 'required' | 'description' | 'fields' | 'items' | 'additionalProperties' | 'variants'>;
58
+ /** A node's present metadata as ordered `[key, value]` pairs (drives the CLI tags). */
59
+ export declare function shapeMetaEntries(node: ShapeNode): Array<readonly [ShapeMetaKey, string | number | boolean | readonly string[]]>;
60
+ /** A request param: a named shape node plus its HTTP location (for generic dispatch). */
61
+ export declare const ManifestParamSchema: z.ZodObject<{
62
+ type: z.ZodString;
63
+ jsonTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
64
+ array: "array";
65
+ boolean: "boolean";
66
+ integer: "integer";
67
+ null: "null";
68
+ number: "number";
69
+ object: "object";
70
+ string: "string";
71
+ }>>>;
72
+ description: z.ZodOptional<z.ZodString>;
73
+ enum: z.ZodOptional<z.ZodArray<z.ZodString>>;
74
+ itemEnum: z.ZodOptional<z.ZodArray<z.ZodString>>;
75
+ default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
76
+ format: z.ZodOptional<z.ZodString>;
77
+ example: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
78
+ nullable: z.ZodOptional<z.ZodBoolean>;
79
+ minimum: z.ZodOptional<z.ZodNumber>;
80
+ maximum: z.ZodOptional<z.ZodNumber>;
81
+ exclusiveMinimum: z.ZodOptional<z.ZodNumber>;
82
+ exclusiveMaximum: z.ZodOptional<z.ZodNumber>;
83
+ minLength: z.ZodOptional<z.ZodNumber>;
84
+ maxLength: z.ZodOptional<z.ZodNumber>;
85
+ minItems: z.ZodOptional<z.ZodNumber>;
86
+ maxItems: z.ZodOptional<z.ZodNumber>;
87
+ maxProperties: z.ZodOptional<z.ZodNumber>;
88
+ uniqueItems: z.ZodOptional<z.ZodBoolean>;
89
+ pattern: z.ZodOptional<z.ZodString>;
90
+ fields: z.ZodOptional<z.ZodArray<z.ZodLazy<z.ZodType<ShapeNode, unknown, z.core.$ZodTypeInternals<ShapeNode, unknown>>>>>;
91
+ items: z.ZodOptional<z.ZodLazy<z.ZodType<ShapeNode, unknown, z.core.$ZodTypeInternals<ShapeNode, unknown>>>>;
92
+ additionalProperties: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLazy<z.ZodType<ShapeNode, unknown, z.core.$ZodTypeInternals<ShapeNode, unknown>>>]>>;
93
+ variants: z.ZodOptional<z.ZodArray<z.ZodLazy<z.ZodType<ShapeNode, unknown, z.core.$ZodTypeInternals<ShapeNode, unknown>>>>>;
94
+ name: z.ZodString;
95
+ required: z.ZodBoolean;
96
+ in: z.ZodEnum<{
97
+ body: "body";
98
+ header: "header";
99
+ path: "path";
100
+ query: "query";
101
+ }>;
102
+ }, z.core.$strip>;
103
+ export type ManifestParam = z.infer<typeof ManifestParamSchema>;
104
+ export declare const RequestBodyProjectionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
105
+ kind: z.ZodLiteral<"fields">;
106
+ shape: z.ZodType<ShapeNode, unknown, z.core.$ZodTypeInternals<ShapeNode, unknown>>;
107
+ }, z.core.$strip>, z.ZodObject<{
108
+ kind: z.ZodLiteral<"whole">;
109
+ shape: z.ZodType<ShapeNode, unknown, z.core.$ZodTypeInternals<ShapeNode, unknown>>;
110
+ }, z.core.$strip>], "kind">;
111
+ export type RequestBodyProjection = z.infer<typeof RequestBodyProjectionSchema>;
112
+ export declare const SuccessResponseSchema: z.ZodObject<{
113
+ status: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<304>]>;
114
+ mediaTypes: z.ZodArray<z.ZodString>;
115
+ headers: z.ZodArray<z.ZodString>;
116
+ }, z.core.$strip>;
117
+ export type SuccessResponse = z.infer<typeof SuccessResponseSchema>;
118
+ export declare const InvocationExamplesSchema: z.ZodObject<{
119
+ typescript: z.ZodString;
120
+ cli: z.ZodString;
121
+ curl: z.ZodString;
122
+ }, z.core.$strip>;
123
+ export type InvocationExamples = z.infer<typeof InvocationExamplesSchema>;
124
+ /**
125
+ * One operation, carrying everything the CLI needs to build its command and
126
+ * dispatch generically: the `callPath` (command tree), the `httpMethod` + `path`
127
+ * template + `params[].in` + `bodyKey` (dispatch), and the recursive request/response
128
+ * shapes (`--help`). Mirrors the relevant subset of horizon-sdk's `SdkReferenceEntry`.
129
+ */
130
+ export declare const ManifestOperationSchema: z.ZodObject<{
131
+ operationId: z.ZodString;
132
+ callPath: z.ZodArray<z.ZodString>;
133
+ summary: z.ZodString;
134
+ description: z.ZodOptional<z.ZodString>;
135
+ httpMethod: z.ZodEnum<{
136
+ delete: "delete";
137
+ get: "get";
138
+ patch: "patch";
139
+ post: "post";
140
+ put: "put";
141
+ }>;
142
+ path: z.ZodString;
143
+ bodyKey: z.ZodOptional<z.ZodString>;
144
+ requestBodyRequired: z.ZodOptional<z.ZodBoolean>;
145
+ requestMediaTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
146
+ requestBody: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
147
+ kind: z.ZodLiteral<"fields">;
148
+ shape: z.ZodType<ShapeNode, unknown, z.core.$ZodTypeInternals<ShapeNode, unknown>>;
149
+ }, z.core.$strip>, z.ZodObject<{
150
+ kind: z.ZodLiteral<"whole">;
151
+ shape: z.ZodType<ShapeNode, unknown, z.core.$ZodTypeInternals<ShapeNode, unknown>>;
152
+ }, z.core.$strip>], "kind">>;
153
+ examples: z.ZodOptional<z.ZodObject<{
154
+ typescript: z.ZodString;
155
+ cli: z.ZodString;
156
+ curl: z.ZodString;
157
+ }, z.core.$strip>>;
158
+ requiredPermissions: z.ZodOptional<z.ZodArray<z.ZodString>>;
159
+ cliOutputField: z.ZodOptional<z.ZodString>;
160
+ successResponses: z.ZodArray<z.ZodObject<{
161
+ status: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<304>]>;
162
+ mediaTypes: z.ZodArray<z.ZodString>;
163
+ headers: z.ZodArray<z.ZodString>;
164
+ }, z.core.$strip>>;
165
+ params: z.ZodArray<z.ZodObject<{
166
+ type: z.ZodString;
167
+ jsonTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
168
+ array: "array";
169
+ boolean: "boolean";
170
+ integer: "integer";
171
+ null: "null";
172
+ number: "number";
173
+ object: "object";
174
+ string: "string";
175
+ }>>>;
176
+ description: z.ZodOptional<z.ZodString>;
177
+ enum: z.ZodOptional<z.ZodArray<z.ZodString>>;
178
+ itemEnum: z.ZodOptional<z.ZodArray<z.ZodString>>;
179
+ default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
180
+ format: z.ZodOptional<z.ZodString>;
181
+ example: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
182
+ nullable: z.ZodOptional<z.ZodBoolean>;
183
+ minimum: z.ZodOptional<z.ZodNumber>;
184
+ maximum: z.ZodOptional<z.ZodNumber>;
185
+ exclusiveMinimum: z.ZodOptional<z.ZodNumber>;
186
+ exclusiveMaximum: z.ZodOptional<z.ZodNumber>;
187
+ minLength: z.ZodOptional<z.ZodNumber>;
188
+ maxLength: z.ZodOptional<z.ZodNumber>;
189
+ minItems: z.ZodOptional<z.ZodNumber>;
190
+ maxItems: z.ZodOptional<z.ZodNumber>;
191
+ maxProperties: z.ZodOptional<z.ZodNumber>;
192
+ uniqueItems: z.ZodOptional<z.ZodBoolean>;
193
+ pattern: z.ZodOptional<z.ZodString>;
194
+ fields: z.ZodOptional<z.ZodArray<z.ZodLazy<z.ZodType<ShapeNode, unknown, z.core.$ZodTypeInternals<ShapeNode, unknown>>>>>;
195
+ items: z.ZodOptional<z.ZodLazy<z.ZodType<ShapeNode, unknown, z.core.$ZodTypeInternals<ShapeNode, unknown>>>>;
196
+ additionalProperties: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLazy<z.ZodType<ShapeNode, unknown, z.core.$ZodTypeInternals<ShapeNode, unknown>>>]>>;
197
+ variants: z.ZodOptional<z.ZodArray<z.ZodLazy<z.ZodType<ShapeNode, unknown, z.core.$ZodTypeInternals<ShapeNode, unknown>>>>>;
198
+ name: z.ZodString;
199
+ required: z.ZodBoolean;
200
+ in: z.ZodEnum<{
201
+ body: "body";
202
+ header: "header";
203
+ path: "path";
204
+ query: "query";
205
+ }>;
206
+ }, z.core.$strip>>;
207
+ response: z.ZodOptional<z.ZodType<ShapeNode, unknown, z.core.$ZodTypeInternals<ShapeNode, unknown>>>;
208
+ }, z.core.$strip>;
209
+ export type ManifestOperation = z.infer<typeof ManifestOperationSchema>;
210
+ export declare const ManifestResourceSchema: z.ZodObject<{
211
+ id: z.ZodString;
212
+ title: z.ZodString;
213
+ parent: z.ZodOptional<z.ZodString>;
214
+ order: z.ZodNumber;
215
+ domain: z.ZodOptional<z.ZodString>;
216
+ summary: z.ZodOptional<z.ZodString>;
217
+ description: z.ZodOptional<z.ZodString>;
218
+ object: z.ZodOptional<z.ZodObject<{
219
+ name: z.ZodString;
220
+ fields: z.ZodArray<z.ZodType<ShapeNode, unknown, z.core.$ZodTypeInternals<ShapeNode, unknown>>>;
221
+ }, z.core.$strip>>;
222
+ operationIds: z.ZodArray<z.ZodString>;
223
+ }, z.core.$strip>;
224
+ export type ManifestResource = z.infer<typeof ManifestResourceSchema>;
225
+ export declare const ManifestRelatedSchema: z.ZodObject<{
226
+ requires: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
227
+ type: z.ZodLiteral<"recipe">;
228
+ id: z.ZodString;
229
+ }, z.core.$strip>, z.ZodObject<{
230
+ type: z.ZodLiteral<"state">;
231
+ explanation: z.ZodString;
232
+ predicate: z.ZodOptional<z.ZodString>;
233
+ via: z.ZodOptional<z.ZodObject<{
234
+ type: z.ZodEnum<{
235
+ concept: "concept";
236
+ recipe: "recipe";
237
+ resource: "resource";
238
+ tutorial: "tutorial";
239
+ }>;
240
+ id: z.ZodString;
241
+ }, z.core.$strip>>;
242
+ }, z.core.$strip>]>>>;
243
+ variationOf: z.ZodOptional<z.ZodString>;
244
+ learnMore: z.ZodOptional<z.ZodArray<z.ZodObject<{
245
+ type: z.ZodEnum<{
246
+ concept: "concept";
247
+ recipe: "recipe";
248
+ resource: "resource";
249
+ tutorial: "tutorial";
250
+ }>;
251
+ id: z.ZodString;
252
+ }, z.core.$strip>>>;
253
+ }, z.core.$strip>;
254
+ export type ManifestRelated = z.infer<typeof ManifestRelatedSchema>;
255
+ export declare const ManifestRecipeSchema: z.ZodObject<{
256
+ id: z.ZodString;
257
+ title: z.ZodString;
258
+ goal: z.ZodString;
259
+ category: z.ZodString;
260
+ steps: z.ZodArray<z.ZodObject<{
261
+ operationId: z.ZodOptional<z.ZodString>;
262
+ }, z.core.$strip>>;
263
+ sdk: z.ZodObject<{
264
+ setup: z.ZodString;
265
+ main: z.ZodString;
266
+ }, z.core.$strip>;
267
+ cli: z.ZodObject<{
268
+ setup: z.ZodString;
269
+ main: z.ZodString;
270
+ }, z.core.$strip>;
271
+ curl: z.ZodObject<{
272
+ setup: z.ZodString;
273
+ main: z.ZodString;
274
+ }, z.core.$strip>;
275
+ related: z.ZodOptional<z.ZodObject<{
276
+ requires: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
277
+ type: z.ZodLiteral<"recipe">;
278
+ id: z.ZodString;
279
+ }, z.core.$strip>, z.ZodObject<{
280
+ type: z.ZodLiteral<"state">;
281
+ explanation: z.ZodString;
282
+ predicate: z.ZodOptional<z.ZodString>;
283
+ via: z.ZodOptional<z.ZodObject<{
284
+ type: z.ZodEnum<{
285
+ concept: "concept";
286
+ recipe: "recipe";
287
+ resource: "resource";
288
+ tutorial: "tutorial";
289
+ }>;
290
+ id: z.ZodString;
291
+ }, z.core.$strip>>;
292
+ }, z.core.$strip>]>>>;
293
+ variationOf: z.ZodOptional<z.ZodString>;
294
+ learnMore: z.ZodOptional<z.ZodArray<z.ZodObject<{
295
+ type: z.ZodEnum<{
296
+ concept: "concept";
297
+ recipe: "recipe";
298
+ resource: "resource";
299
+ tutorial: "tutorial";
300
+ }>;
301
+ id: z.ZodString;
302
+ }, z.core.$strip>>>;
303
+ }, z.core.$strip>>;
304
+ }, z.core.$strip>;
305
+ export type ManifestRecipe = z.infer<typeof ManifestRecipeSchema>;
306
+ export declare const ManifestConceptSchema: z.ZodObject<{
307
+ id: z.ZodString;
308
+ title: z.ZodString;
309
+ domain: z.ZodString;
310
+ related: z.ZodArray<z.ZodString>;
311
+ body: z.ZodString;
312
+ }, z.core.$strip>;
313
+ export type ManifestConcept = z.infer<typeof ManifestConceptSchema>;
314
+ export declare const ManifestTutorialSchema: z.ZodObject<{
315
+ id: z.ZodString;
316
+ title: z.ZodString;
317
+ body: z.ZodNullable<z.ZodString>;
318
+ }, z.core.$strip>;
319
+ export type ManifestTutorial = z.infer<typeof ManifestTutorialSchema>;
320
+ export declare const ManifestGuideSchema: z.ZodObject<{
321
+ id: z.ZodString;
322
+ title: z.ZodString;
323
+ description: z.ZodString;
324
+ path: z.ZodString;
325
+ body: z.ZodString;
326
+ }, z.core.$strip>;
327
+ export type ManifestGuide = z.infer<typeof ManifestGuideSchema>;
328
+ export declare const ManifestDomainSchema: z.ZodObject<{
329
+ id: z.ZodString;
330
+ title: z.ZodString;
331
+ order: z.ZodNumber;
332
+ }, z.core.$strip>;
333
+ export type ManifestDomain = z.infer<typeof ManifestDomainSchema>;
334
+ export declare const ManifestSchema: z.ZodObject<{
335
+ formatVersion: z.ZodNumber;
336
+ hash: z.ZodString;
337
+ operations: z.ZodRecord<z.ZodString, z.ZodObject<{
338
+ operationId: z.ZodString;
339
+ callPath: z.ZodArray<z.ZodString>;
340
+ summary: z.ZodString;
341
+ description: z.ZodOptional<z.ZodString>;
342
+ httpMethod: z.ZodEnum<{
343
+ delete: "delete";
344
+ get: "get";
345
+ patch: "patch";
346
+ post: "post";
347
+ put: "put";
348
+ }>;
349
+ path: z.ZodString;
350
+ bodyKey: z.ZodOptional<z.ZodString>;
351
+ requestBodyRequired: z.ZodOptional<z.ZodBoolean>;
352
+ requestMediaTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
353
+ requestBody: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
354
+ kind: z.ZodLiteral<"fields">;
355
+ shape: z.ZodType<ShapeNode, unknown, z.core.$ZodTypeInternals<ShapeNode, unknown>>;
356
+ }, z.core.$strip>, z.ZodObject<{
357
+ kind: z.ZodLiteral<"whole">;
358
+ shape: z.ZodType<ShapeNode, unknown, z.core.$ZodTypeInternals<ShapeNode, unknown>>;
359
+ }, z.core.$strip>], "kind">>;
360
+ examples: z.ZodOptional<z.ZodObject<{
361
+ typescript: z.ZodString;
362
+ cli: z.ZodString;
363
+ curl: z.ZodString;
364
+ }, z.core.$strip>>;
365
+ requiredPermissions: z.ZodOptional<z.ZodArray<z.ZodString>>;
366
+ cliOutputField: z.ZodOptional<z.ZodString>;
367
+ successResponses: z.ZodArray<z.ZodObject<{
368
+ status: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<304>]>;
369
+ mediaTypes: z.ZodArray<z.ZodString>;
370
+ headers: z.ZodArray<z.ZodString>;
371
+ }, z.core.$strip>>;
372
+ params: z.ZodArray<z.ZodObject<{
373
+ type: z.ZodString;
374
+ jsonTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
375
+ array: "array";
376
+ boolean: "boolean";
377
+ integer: "integer";
378
+ null: "null";
379
+ number: "number";
380
+ object: "object";
381
+ string: "string";
382
+ }>>>;
383
+ description: z.ZodOptional<z.ZodString>;
384
+ enum: z.ZodOptional<z.ZodArray<z.ZodString>>;
385
+ itemEnum: z.ZodOptional<z.ZodArray<z.ZodString>>;
386
+ default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
387
+ format: z.ZodOptional<z.ZodString>;
388
+ example: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
389
+ nullable: z.ZodOptional<z.ZodBoolean>;
390
+ minimum: z.ZodOptional<z.ZodNumber>;
391
+ maximum: z.ZodOptional<z.ZodNumber>;
392
+ exclusiveMinimum: z.ZodOptional<z.ZodNumber>;
393
+ exclusiveMaximum: z.ZodOptional<z.ZodNumber>;
394
+ minLength: z.ZodOptional<z.ZodNumber>;
395
+ maxLength: z.ZodOptional<z.ZodNumber>;
396
+ minItems: z.ZodOptional<z.ZodNumber>;
397
+ maxItems: z.ZodOptional<z.ZodNumber>;
398
+ maxProperties: z.ZodOptional<z.ZodNumber>;
399
+ uniqueItems: z.ZodOptional<z.ZodBoolean>;
400
+ pattern: z.ZodOptional<z.ZodString>;
401
+ fields: z.ZodOptional<z.ZodArray<z.ZodLazy<z.ZodType<ShapeNode, unknown, z.core.$ZodTypeInternals<ShapeNode, unknown>>>>>;
402
+ items: z.ZodOptional<z.ZodLazy<z.ZodType<ShapeNode, unknown, z.core.$ZodTypeInternals<ShapeNode, unknown>>>>;
403
+ additionalProperties: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLazy<z.ZodType<ShapeNode, unknown, z.core.$ZodTypeInternals<ShapeNode, unknown>>>]>>;
404
+ variants: z.ZodOptional<z.ZodArray<z.ZodLazy<z.ZodType<ShapeNode, unknown, z.core.$ZodTypeInternals<ShapeNode, unknown>>>>>;
405
+ name: z.ZodString;
406
+ required: z.ZodBoolean;
407
+ in: z.ZodEnum<{
408
+ body: "body";
409
+ header: "header";
410
+ path: "path";
411
+ query: "query";
412
+ }>;
413
+ }, z.core.$strip>>;
414
+ response: z.ZodOptional<z.ZodType<ShapeNode, unknown, z.core.$ZodTypeInternals<ShapeNode, unknown>>>;
415
+ }, z.core.$strip>>;
416
+ resources: z.ZodRecord<z.ZodString, z.ZodObject<{
417
+ id: z.ZodString;
418
+ title: z.ZodString;
419
+ parent: z.ZodOptional<z.ZodString>;
420
+ order: z.ZodNumber;
421
+ domain: z.ZodOptional<z.ZodString>;
422
+ summary: z.ZodOptional<z.ZodString>;
423
+ description: z.ZodOptional<z.ZodString>;
424
+ object: z.ZodOptional<z.ZodObject<{
425
+ name: z.ZodString;
426
+ fields: z.ZodArray<z.ZodType<ShapeNode, unknown, z.core.$ZodTypeInternals<ShapeNode, unknown>>>;
427
+ }, z.core.$strip>>;
428
+ operationIds: z.ZodArray<z.ZodString>;
429
+ }, z.core.$strip>>;
430
+ recipes: z.ZodRecord<z.ZodString, z.ZodObject<{
431
+ id: z.ZodString;
432
+ title: z.ZodString;
433
+ goal: z.ZodString;
434
+ category: z.ZodString;
435
+ steps: z.ZodArray<z.ZodObject<{
436
+ operationId: z.ZodOptional<z.ZodString>;
437
+ }, z.core.$strip>>;
438
+ sdk: z.ZodObject<{
439
+ setup: z.ZodString;
440
+ main: z.ZodString;
441
+ }, z.core.$strip>;
442
+ cli: z.ZodObject<{
443
+ setup: z.ZodString;
444
+ main: z.ZodString;
445
+ }, z.core.$strip>;
446
+ curl: z.ZodObject<{
447
+ setup: z.ZodString;
448
+ main: z.ZodString;
449
+ }, z.core.$strip>;
450
+ related: z.ZodOptional<z.ZodObject<{
451
+ requires: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
452
+ type: z.ZodLiteral<"recipe">;
453
+ id: z.ZodString;
454
+ }, z.core.$strip>, z.ZodObject<{
455
+ type: z.ZodLiteral<"state">;
456
+ explanation: z.ZodString;
457
+ predicate: z.ZodOptional<z.ZodString>;
458
+ via: z.ZodOptional<z.ZodObject<{
459
+ type: z.ZodEnum<{
460
+ concept: "concept";
461
+ recipe: "recipe";
462
+ resource: "resource";
463
+ tutorial: "tutorial";
464
+ }>;
465
+ id: z.ZodString;
466
+ }, z.core.$strip>>;
467
+ }, z.core.$strip>]>>>;
468
+ variationOf: z.ZodOptional<z.ZodString>;
469
+ learnMore: z.ZodOptional<z.ZodArray<z.ZodObject<{
470
+ type: z.ZodEnum<{
471
+ concept: "concept";
472
+ recipe: "recipe";
473
+ resource: "resource";
474
+ tutorial: "tutorial";
475
+ }>;
476
+ id: z.ZodString;
477
+ }, z.core.$strip>>>;
478
+ }, z.core.$strip>>;
479
+ }, z.core.$strip>>;
480
+ concepts: z.ZodRecord<z.ZodString, z.ZodObject<{
481
+ id: z.ZodString;
482
+ title: z.ZodString;
483
+ domain: z.ZodString;
484
+ related: z.ZodArray<z.ZodString>;
485
+ body: z.ZodString;
486
+ }, z.core.$strip>>;
487
+ tutorials: z.ZodArray<z.ZodObject<{
488
+ id: z.ZodString;
489
+ title: z.ZodString;
490
+ body: z.ZodNullable<z.ZodString>;
491
+ }, z.core.$strip>>;
492
+ guides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
493
+ id: z.ZodString;
494
+ title: z.ZodString;
495
+ description: z.ZodString;
496
+ path: z.ZodString;
497
+ body: z.ZodString;
498
+ }, z.core.$strip>>>;
499
+ domains: z.ZodArray<z.ZodObject<{
500
+ id: z.ZodString;
501
+ title: z.ZodString;
502
+ order: z.ZodNumber;
503
+ }, z.core.$strip>>;
504
+ }, z.core.$strip>;
505
+ export type Manifest = z.infer<typeof ManifestSchema>;
506
+ /**
507
+ * Validate a fetched/cached manifest at the I/O boundary and check engine↔manifest
508
+ * format compatibility. A version mismatch is the one case worth an actionable
509
+ * message: the schema itself stays lenient (so additive server changes are safe),
510
+ * and only a deliberate format bump trips this.
511
+ */
512
+ export declare function parseManifest(value: unknown, source: string): Manifest;
513
+ /**
514
+ * A filesystem-safe, collision-free slug for a base URL, so each server caches
515
+ * independently. The readable part is the sanitized URL (handy when eyeballing the
516
+ * cache dir); a short hash of the *full* URL is appended so two URLs that sanitize
517
+ * to the same string (e.g. `https://x.com:8080` vs `https://x-com-8080`) still get
518
+ * distinct cache files rather than silently sharing — and poisoning — one.
519
+ */
520
+ export declare function hostSlug(baseUrl: string): string;
521
+ /**
522
+ * Fetch the command manifest, revalidating the cache on every run:
523
+ * - send `If-None-Match` with the cached ETag → `304` means the cache is provably
524
+ * current (use it); `200` means the surface changed (validate + replace cache).
525
+ * - a network error (incl. a timeout) falls back to the cached copy with a warning;
526
+ * with no cache it errors clearly.
527
+ * When the server is reachable, the cache is revalidated and a backend redeploy is
528
+ * picked up automatically. Offline, the last locally validated copy may be older
529
+ * than the server but keeps the CLI usable.
530
+ */
531
+ export declare function fetchManifest(baseUrl: string, apiKey: string): Promise<Manifest>;