@postman/sdk-config 0.6.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/README.md +1 -3
  2. package/dist/index.cjs +916 -765
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.d.cts +1 -1
  5. package/dist/index.d.ts +1 -1
  6. package/dist/index.js +916 -765
  7. package/dist/index.js.map +1 -1
  8. package/dist/sdk-config/index.cjs +678 -562
  9. package/dist/sdk-config/index.cjs.map +1 -1
  10. package/dist/sdk-config/index.d.cts +1 -1
  11. package/dist/sdk-config/index.d.ts +1 -1
  12. package/dist/sdk-config/index.js +678 -562
  13. package/dist/sdk-config/index.js.map +1 -1
  14. package/dist/sdk-config/v1/index.cjs +678 -562
  15. package/dist/sdk-config/v1/index.cjs.map +1 -1
  16. package/dist/sdk-config/v1/index.d.cts +74 -934
  17. package/dist/sdk-config/v1/index.d.ts +74 -934
  18. package/dist/sdk-config/v1/index.js +678 -562
  19. package/dist/sdk-config/v1/index.js.map +1 -1
  20. package/dist/sdk-config-ir/index.cjs +607 -537
  21. package/dist/sdk-config-ir/index.cjs.map +1 -1
  22. package/dist/sdk-config-ir/index.d.cts +1 -1
  23. package/dist/sdk-config-ir/index.d.ts +1 -1
  24. package/dist/sdk-config-ir/index.js +607 -537
  25. package/dist/sdk-config-ir/index.js.map +1 -1
  26. package/dist/sdk-config-ir/v1/index.cjs +607 -537
  27. package/dist/sdk-config-ir/v1/index.cjs.map +1 -1
  28. package/dist/sdk-config-ir/v1/index.d.cts +25 -7
  29. package/dist/sdk-config-ir/v1/index.d.ts +25 -7
  30. package/dist/sdk-config-ir/v1/index.js +607 -537
  31. package/dist/sdk-config-ir/v1/index.js.map +1 -1
  32. package/dist/{typescript-BruxA5zG.d.cts → typescript-Chge0X4f.d.cts} +8 -1
  33. package/dist/{typescript-BruxA5zG.d.ts → typescript-Chge0X4f.d.ts} +8 -1
  34. package/package.json +1 -1
  35. package/src/sdk-config/v1/README.md +15 -14
  36. package/src/sdk-config-ir/v1/README.md +4 -2
@@ -32,140 +32,152 @@ var hashAlgorithmSchema = z.enum(["sha1", "sha256", "sha384", "sha512"]);
32
32
  var encodingSchema = z.enum(["base64", "hex"]);
33
33
  var payloadComponentSchema = z.enum(["body", "timestamp", "notification-url", "message-id"]);
34
34
  var payloadFormatSchema = z.strictObject({
35
- components: z.array(payloadComponentSchema).min(1),
36
- delimiter: z.string().optional(),
35
+ components: z.array(payloadComponentSchema).min(1).describe("Payload components concatenated in declaration order before signing."),
36
+ delimiter: z.string().optional().describe("The delimiter inserted between payload components."),
37
37
  /**
38
38
  * Set when the body is a form-encoded parameter map that must be canonicalized before signing:
39
39
  * keys sorted, each key's values deduped and sorted, concatenated as key-value pairs.
40
40
  */
41
- bodySort: z.literal("alphabetical").optional()
41
+ bodySort: z.literal("alphabetical").optional().describe("Canonicalizes form body keys and values alphabetically before signing.")
42
42
  });
43
43
  var timestampSchema = z.strictObject({
44
- header: nonEmptyStringSchema,
45
- format: z.enum(["unix-seconds", "unix-millis", "iso8601"]).optional(),
44
+ header: nonEmptyStringSchema.describe("The request header containing the signing timestamp."),
45
+ format: z.enum(["unix-seconds", "unix-millis", "iso8601"]).optional().describe("The timestamp format used in the signature payload."),
46
46
  /** Replay window in seconds. */
47
- tolerance: z.number().positive().optional()
47
+ tolerance: z.number().positive().optional().describe("The maximum accepted timestamp age, in seconds.")
48
48
  });
49
49
  var bodyHashLocationSchema = z.discriminatedUnion("type", [
50
50
  z.strictObject({
51
- type: z.literal("query-parameter"),
52
- name: nonEmptyStringSchema
51
+ type: z.literal("query-parameter").describe("Reads the body hash from a query parameter."),
52
+ name: nonEmptyStringSchema.describe("The query parameter containing the body hash.")
53
53
  })
54
54
  ]);
55
55
  var bodyHashBindingSchema = z.strictObject({
56
- algorithm: hashAlgorithmSchema,
57
- encoding: encodingSchema.optional(),
58
- location: bodyHashLocationSchema
56
+ algorithm: hashAlgorithmSchema.describe("The hash algorithm applied to the raw request body."),
57
+ encoding: encodingSchema.optional().describe("The encoding used for the body hash."),
58
+ location: bodyHashLocationSchema.describe("Where the expected body hash is read from.")
59
59
  });
60
60
  var urlNormalizationSchema = z.strictObject({
61
61
  /** Try the URL with and without an explicit default port. */
62
- portVariants: z.boolean().optional(),
62
+ portVariants: z.boolean().optional().describe("Whether verification tries URLs with and without an explicit default port."),
63
63
  /** Try the URL with the pre-RFC3986 query encoding (`+` for space, unescaped `*`). */
64
- legacyQueryEncoding: z.boolean().optional()
64
+ legacyQueryEncoding: z.boolean().optional().describe("Whether verification also tries legacy form-style query encoding.")
65
65
  }).refine(
66
66
  ({ portVariants, legacyQueryEncoding }) => portVariants === true || legacyQueryEncoding === true,
67
67
  { message: "url normalization must enable at least one variant" }
68
68
  );
69
69
  var webhookSignatureSchema = z.discriminatedUnion("type", [
70
70
  z.strictObject({
71
- type: z.literal("hmac"),
71
+ type: z.literal("hmac").describe("Identifies HMAC webhook signature verification."),
72
72
  /** Request header carrying the signature. */
73
- header: nonEmptyStringSchema,
74
- algorithm: hashAlgorithmSchema.optional(),
75
- encoding: encodingSchema.optional(),
73
+ header: nonEmptyStringSchema.describe("The request header containing the signature."),
74
+ algorithm: hashAlgorithmSchema.optional().describe("The HMAC hash algorithm."),
75
+ encoding: encodingSchema.optional().describe("The encoding used for the HMAC signature."),
76
76
  /** Stripped from the header value before comparison, e.g. `sha256=`. */
77
- signaturePrefix: z.string().optional(),
78
- payloadFormat: payloadFormatSchema.optional(),
79
- timestamp: timestampSchema.optional(),
80
- bodyHashBinding: bodyHashBindingSchema.optional(),
81
- urlNormalization: urlNormalizationSchema.optional()
77
+ signaturePrefix: z.string().optional().describe("A prefix removed from the signature header before comparison."),
78
+ payloadFormat: payloadFormatSchema.optional().describe("How the payload signed by the provider is assembled."),
79
+ timestamp: timestampSchema.optional().describe("Timestamp validation included in signature verification."),
80
+ bodyHashBinding: bodyHashBindingSchema.optional().describe("A separately transmitted hash that binds the raw body to the signed payload."),
81
+ urlNormalization: urlNormalizationSchema.optional().describe("Alternate notification URL forms accepted during verification.")
82
82
  })
83
83
  ]);
84
84
 
85
85
  // src/sdk-config-domain/v1/api.ts
86
86
  var authVariableSchema = z.strictObject({
87
- name: nonEmptyStringSchema.optional(),
88
- environmentVariable: nonEmptyStringSchema.optional(),
89
- description: z.string().optional(),
90
- omit: z.boolean().optional()
87
+ name: nonEmptyStringSchema.optional().describe("The parameter name exposed by the SDK."),
88
+ environmentVariable: nonEmptyStringSchema.optional().describe("The environment variable used to populate the parameter."),
89
+ description: z.string().optional().describe(
90
+ "A description of the authentication parameter included in generated SDK documentation."
91
+ ),
92
+ omit: z.boolean().optional().describe("Whether the parameter is omitted from the SDK surface.")
91
93
  });
92
94
  var apiKeyAuthSchema = z.strictObject({
93
- id: nonEmptyStringSchema,
94
- type: z.literal("api-key"),
95
- location: z.enum(["header", "query", "cookie"]),
96
- name: nonEmptyStringSchema,
97
- prefix: nonEmptyStringSchema.optional(),
98
- environmentVariable: nonEmptyStringSchema.optional(),
99
- description: z.string().optional()
95
+ id: nonEmptyStringSchema.describe("A unique identifier for this authentication scheme."),
96
+ type: z.literal("api-key").describe("Identifies an API key authentication scheme."),
97
+ location: z.enum(["header", "query", "cookie"]).describe("Where the API key is sent on requests."),
98
+ name: nonEmptyStringSchema.describe("The header, query parameter, or cookie name."),
99
+ prefix: nonEmptyStringSchema.optional().describe("A prefix added before the API key value."),
100
+ environmentVariable: nonEmptyStringSchema.optional().describe("The default environment variable for the API key."),
101
+ description: z.string().optional().describe(
102
+ "A description of the authentication scheme included in generated SDK documentation."
103
+ )
100
104
  });
101
105
  var bearerAuthSchema = z.strictObject({
102
- id: nonEmptyStringSchema,
103
- type: z.literal("bearer"),
104
- header: nonEmptyStringSchema.optional(),
105
- prefix: nonEmptyStringSchema.optional(),
106
- environmentVariable: nonEmptyStringSchema.optional(),
107
- description: z.string().optional()
106
+ id: nonEmptyStringSchema.describe("A unique identifier for this authentication scheme."),
107
+ type: z.literal("bearer").describe("Identifies a bearer token authentication scheme."),
108
+ header: nonEmptyStringSchema.optional().describe("The request header that carries the bearer token."),
109
+ prefix: nonEmptyStringSchema.optional().describe('The token prefix, such as "Bearer".'),
110
+ environmentVariable: nonEmptyStringSchema.optional().describe("The default environment variable for the bearer token."),
111
+ description: z.string().optional().describe(
112
+ "A description of the authentication scheme included in generated SDK documentation."
113
+ )
108
114
  });
109
115
  var basicAuthSchema = z.strictObject({
110
- id: nonEmptyStringSchema,
111
- type: z.literal("basic"),
112
- username: authVariableSchema.optional(),
113
- password: authVariableSchema.optional(),
114
- description: z.string().optional()
116
+ id: nonEmptyStringSchema.describe("A unique identifier for this authentication scheme."),
117
+ type: z.literal("basic").describe("Identifies an HTTP Basic authentication scheme."),
118
+ username: authVariableSchema.optional().describe("The username parameter exposed by the SDK."),
119
+ password: authVariableSchema.optional().describe("The password parameter exposed by the SDK."),
120
+ description: z.string().optional().describe(
121
+ "A description of the authentication scheme included in generated SDK documentation."
122
+ )
115
123
  });
116
124
  var oauthScopeSchema = z.strictObject({
117
- name: nonEmptyStringSchema,
118
- description: z.string().optional()
125
+ name: nonEmptyStringSchema.describe("The OAuth scope value requested from the provider."),
126
+ description: z.string().optional().describe("A description of the OAuth scope included in generated SDK documentation.")
119
127
  });
120
128
  var oauthFlowSchema = z.discriminatedUnion("type", [
121
129
  z.strictObject({
122
- type: z.literal("authorization-code"),
123
- authorizationUrl: nonEmptyStringSchema,
124
- tokenUrl: nonEmptyStringSchema,
125
- refreshUrl: nonEmptyStringSchema.optional(),
126
- scopes: z.array(oauthScopeSchema).optional()
130
+ type: z.literal("authorization-code").describe("Uses the OAuth authorization code flow."),
131
+ authorizationUrl: nonEmptyStringSchema.describe("The URL used to authorize the client."),
132
+ tokenUrl: nonEmptyStringSchema.describe("The URL used to exchange a code for tokens."),
133
+ refreshUrl: nonEmptyStringSchema.optional().describe("The URL used to refresh access tokens."),
134
+ scopes: z.array(oauthScopeSchema).optional().describe("The scopes supported by this flow.")
127
135
  }),
128
136
  z.strictObject({
129
- type: z.literal("client-credentials"),
130
- tokenUrl: nonEmptyStringSchema,
131
- refreshUrl: nonEmptyStringSchema.optional(),
132
- scopes: z.array(oauthScopeSchema).optional()
137
+ type: z.literal("client-credentials").describe("Uses the OAuth client credentials flow."),
138
+ tokenUrl: nonEmptyStringSchema.describe("The URL used to obtain access tokens."),
139
+ refreshUrl: nonEmptyStringSchema.optional().describe("The URL used to refresh access tokens."),
140
+ scopes: z.array(oauthScopeSchema).optional().describe("The scopes supported by this flow.")
133
141
  }),
134
142
  z.strictObject({
135
- type: z.literal("implicit"),
136
- authorizationUrl: nonEmptyStringSchema,
137
- refreshUrl: nonEmptyStringSchema.optional(),
138
- scopes: z.array(oauthScopeSchema).optional()
143
+ type: z.literal("implicit").describe("Uses the OAuth implicit flow."),
144
+ authorizationUrl: nonEmptyStringSchema.describe("The URL used to authorize the client."),
145
+ refreshUrl: nonEmptyStringSchema.optional().describe("The URL used to refresh access tokens."),
146
+ scopes: z.array(oauthScopeSchema).optional().describe("The scopes supported by this flow.")
139
147
  }),
140
148
  z.strictObject({
141
- type: z.literal("password"),
142
- tokenUrl: nonEmptyStringSchema,
143
- refreshUrl: nonEmptyStringSchema.optional(),
144
- scopes: z.array(oauthScopeSchema).optional()
149
+ type: z.literal("password").describe("Uses the OAuth resource owner password flow."),
150
+ tokenUrl: nonEmptyStringSchema.describe("The URL used to obtain access tokens."),
151
+ refreshUrl: nonEmptyStringSchema.optional().describe("The URL used to refresh access tokens."),
152
+ scopes: z.array(oauthScopeSchema).optional().describe("The scopes supported by this flow.")
145
153
  })
146
154
  ]);
147
155
  var oauth2AuthSchema = z.strictObject({
148
- id: nonEmptyStringSchema,
149
- type: z.literal("oauth2"),
150
- flows: z.array(oauthFlowSchema).min(1),
151
- clientId: authVariableSchema.optional(),
152
- clientSecret: authVariableSchema.optional(),
153
- tokenHeader: nonEmptyStringSchema.optional(),
154
- tokenPrefix: nonEmptyStringSchema.optional(),
155
- refreshBufferSeconds: z.number().nonnegative().optional(),
156
- description: z.string().optional()
156
+ id: nonEmptyStringSchema.describe("A unique identifier for this authentication scheme."),
157
+ type: z.literal("oauth2").describe("Identifies an OAuth 2.0 authentication scheme."),
158
+ flows: z.array(oauthFlowSchema).min(1).describe("The OAuth flows supported by the API."),
159
+ clientId: authVariableSchema.optional().describe("The OAuth client ID parameter exposed by the SDK."),
160
+ clientSecret: authVariableSchema.optional().describe("The OAuth client secret parameter exposed by the SDK."),
161
+ tokenHeader: nonEmptyStringSchema.optional().describe("The request header that carries the OAuth access token."),
162
+ tokenPrefix: nonEmptyStringSchema.optional().describe("The prefix added before the OAuth access token."),
163
+ refreshBufferSeconds: z.number().nonnegative().optional().describe("How early, in seconds, the client refreshes a token before it expires."),
164
+ description: z.string().optional().describe(
165
+ "A description of the authentication scheme included in generated SDK documentation."
166
+ )
157
167
  });
158
168
  var customAuthParameterSchema = z.strictObject({
159
- location: z.enum(["header", "query", "cookie"]),
160
- name: nonEmptyStringSchema,
161
- prefix: nonEmptyStringSchema.optional(),
162
- environmentVariable: nonEmptyStringSchema.optional()
169
+ location: z.enum(["header", "query", "cookie"]).describe("Where the custom authentication value is sent."),
170
+ name: nonEmptyStringSchema.describe("The header, query parameter, or cookie name."),
171
+ prefix: nonEmptyStringSchema.optional().describe("A prefix added before the parameter value."),
172
+ environmentVariable: nonEmptyStringSchema.optional().describe("The default environment variable for the parameter.")
163
173
  });
164
174
  var customAuthSchema = z.strictObject({
165
- id: nonEmptyStringSchema,
166
- type: z.literal("custom"),
167
- parameters: z.array(customAuthParameterSchema).min(1),
168
- description: z.string().optional()
175
+ id: nonEmptyStringSchema.describe("A unique identifier for this authentication scheme."),
176
+ type: z.literal("custom").describe("Identifies a custom authentication scheme."),
177
+ parameters: z.array(customAuthParameterSchema).min(1).describe("The request parameters that implement the custom scheme."),
178
+ description: z.string().optional().describe(
179
+ "A description of the authentication scheme included in generated SDK documentation."
180
+ )
169
181
  });
170
182
  var authSchemeSchema = z.discriminatedUnion("type", [
171
183
  apiKeyAuthSchema,
@@ -175,12 +187,12 @@ var authSchemeSchema = z.discriminatedUnion("type", [
175
187
  customAuthSchema
176
188
  ]);
177
189
  var authRequirementSchema = z.strictObject({
178
- schemes: z.array(nonEmptyStringSchema).min(1)
190
+ schemes: z.array(nonEmptyStringSchema).min(1).describe("Scheme identifiers that must be satisfied together.")
179
191
  });
180
192
  var authConfigSchema = z.strictObject({
181
- schemes: z.array(authSchemeSchema).min(1),
182
- requirements: z.array(authRequirementSchema).optional(),
183
- endpointSecurity: z.boolean().optional()
193
+ schemes: z.array(authSchemeSchema).min(1).describe("Authentication schemes offered by the API."),
194
+ requirements: z.array(authRequirementSchema).optional().describe("Valid combinations of authentication schemes."),
195
+ endpointSecurity: z.boolean().optional().describe("Whether generated endpoints expose their individual security requirements.")
184
196
  }).superRefine(({ requirements, schemes }, context) => {
185
197
  const schemeIds = /* @__PURE__ */ new Set();
186
198
  schemes.forEach(({ id }, index) => {
@@ -206,57 +218,57 @@ var authConfigSchema = z.strictObject({
206
218
  });
207
219
  });
208
220
  var environmentUrlSchema = z.strictObject({
209
- name: nonEmptyStringSchema,
210
- url: nonEmptyStringSchema,
211
- serverName: nonEmptyStringSchema.optional()
221
+ name: nonEmptyStringSchema.describe("The display name for this environment URL."),
222
+ url: nonEmptyStringSchema.describe("The base URL used for this environment entry."),
223
+ serverName: nonEmptyStringSchema.optional().describe("The source server represented by this URL.")
212
224
  });
213
225
  var environmentSchema = z.strictObject({
214
- name: nonEmptyStringSchema,
215
- urls: z.array(environmentUrlSchema).min(1),
216
- description: z.string().optional()
226
+ name: nonEmptyStringSchema.describe("The environment name exposed by the SDK."),
227
+ urls: z.array(environmentUrlSchema).min(1).describe("The base URLs available in this environment."),
228
+ description: z.string().optional().describe("A description of the environment included in generated SDK documentation.")
217
229
  });
218
230
  var headerSchema = z.strictObject({
219
- name: nonEmptyStringSchema,
220
- value: z.string().optional(),
221
- description: z.string().optional(),
222
- environmentVariable: nonEmptyStringSchema.optional()
231
+ name: nonEmptyStringSchema.describe("The HTTP header name."),
232
+ value: z.string().optional().describe("A fixed value for the generated header."),
233
+ description: z.string().optional().describe("A description of the header included in generated SDK documentation."),
234
+ environmentVariable: nonEmptyStringSchema.optional().describe("The environment variable used to populate the header.")
223
235
  });
224
236
  var environmentVariableSchema = z.strictObject({
225
- name: nonEmptyStringSchema,
226
- description: z.string().optional(),
227
- defaultValue: z.string().optional()
237
+ name: nonEmptyStringSchema.describe("The environment variable name exposed by the SDK."),
238
+ description: z.string().optional().describe("A description of the environment variable included in generated SDK documentation."),
239
+ defaultValue: z.string().optional().describe("The default value used when the variable is unset.")
228
240
  });
229
241
  var apiConfigSchema = z.strictObject({
230
- baseUrl: z.string().default(""),
231
- environments: z.array(environmentSchema).default([]),
232
- environmentVariables: z.array(environmentVariableSchema).default([]),
233
- defaultEnvironment: nonEmptyStringSchema.optional(),
234
- auth: authConfigSchema.optional(),
235
- headers: z.array(headerSchema).optional(),
242
+ baseUrl: z.string().default("").describe("The default base URL used by the generated client."),
243
+ environments: z.array(environmentSchema).default([]).describe("Named API environments and their base URLs."),
244
+ environmentVariables: z.array(environmentVariableSchema).default([]).describe("Environment variables exposed through generated client configuration."),
245
+ defaultEnvironment: nonEmptyStringSchema.optional().describe("The environment selected when a caller does not choose one."),
246
+ auth: authConfigSchema.optional().describe("Authentication supported by the API."),
247
+ headers: z.array(headerSchema).optional().describe("Headers added to generated API requests."),
236
248
  /**
237
249
  * Selects the named `x-fern-audiences`.
238
250
  *
239
251
  * Absent means all audiences. A present empty array selects no tagged audience: untagged nodes
240
252
  * remain included, while every audience-tagged node is excluded.
241
253
  */
242
- audiences: z.array(nonEmptyStringSchema).optional(),
254
+ audiences: z.array(nonEmptyStringSchema).optional().describe("Named API audiences included in the generated SDK."),
243
255
  /**
244
256
  * How the API signs the webhooks it sends, enabling a generated verification helper. API-wide, and
245
257
  * independent of whether any webhook is modeled — see {@link webhookSignatureSchema}.
246
258
  */
247
- webhookSignature: webhookSignatureSchema.optional()
259
+ webhookSignature: webhookSignatureSchema.optional().describe("How generated helpers verify webhook signatures from the API.")
248
260
  });
249
261
  var retryOverrideShape = {
250
- enabled: z.boolean().optional(),
251
- maxAttempts: z.number().int().min(1).optional(),
252
- retryDelayMs: z.number().nonnegative().optional(),
253
- maxDelayMs: z.number().nonnegative().optional(),
254
- jitterMs: z.number().nonnegative().optional(),
255
- backoffFactor: z.number().positive().optional(),
256
- statusCodes: z.array(z.number().int().min(100).max(599)).optional(),
257
- methods: z.array(nonEmptyStringSchema).optional(),
258
- statusCodeProfile: z.enum(["legacy", "recommended"]).optional(),
259
- maxRetryAfterDelayMs: z.number().nonnegative().optional()
262
+ enabled: z.boolean().optional().describe("Whether the generated client retries failed requests."),
263
+ maxAttempts: z.number().int().min(1).optional().describe("The maximum total request attempts, including the initial attempt."),
264
+ retryDelayMs: z.number().nonnegative().optional().describe("The initial delay between retry attempts, in milliseconds."),
265
+ maxDelayMs: z.number().nonnegative().optional().describe("The maximum backoff delay between attempts, in milliseconds."),
266
+ jitterMs: z.number().nonnegative().optional().describe("The maximum random jitter added to retry delays, in milliseconds."),
267
+ backoffFactor: z.number().positive().optional().describe("The multiplier applied to the delay after each failed attempt."),
268
+ statusCodes: z.array(z.number().int().min(100).max(599)).optional().describe("HTTP status codes that are eligible for retries."),
269
+ methods: z.array(nonEmptyStringSchema).optional().describe("HTTP methods that are eligible for retries."),
270
+ statusCodeProfile: z.enum(["legacy", "recommended"]).optional().describe("The built-in retryable status-code policy."),
271
+ maxRetryAfterDelayMs: z.number().nonnegative().optional().describe("The longest Retry-After delay the client will honor, in milliseconds.")
260
272
  };
261
273
  function validateRetryDelays({
262
274
  maxDelayMs,
@@ -273,27 +285,29 @@ function validateRetryDelays({
273
285
  var clientRetryOverrideSchema = z.strictObject(retryOverrideShape).superRefine(validateRetryDelays);
274
286
  var retryConfigSchema = z.strictObject({
275
287
  ...retryOverrideShape,
276
- enabled: z.boolean().default(true),
277
- maxAttempts: z.number().int().min(1).default(3),
278
- retryDelayMs: z.number().nonnegative().default(150),
279
- maxDelayMs: z.number().nonnegative().default(5e3),
280
- jitterMs: z.number().nonnegative().default(50),
281
- backoffFactor: z.number().positive().default(2),
282
- methods: z.array(nonEmptyStringSchema).default(["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"]),
283
- maxRetryAfterDelayMs: z.number().nonnegative().default(6e4)
288
+ enabled: z.boolean().default(true).describe("Whether the generated client retries failed requests."),
289
+ maxAttempts: z.number().int().min(1).default(3).describe("The maximum total request attempts, including the initial attempt."),
290
+ retryDelayMs: z.number().nonnegative().default(150).describe("The initial delay between retry attempts, in milliseconds."),
291
+ maxDelayMs: z.number().nonnegative().default(5e3).describe("The maximum backoff delay between attempts, in milliseconds."),
292
+ jitterMs: z.number().nonnegative().default(50).describe("The maximum random jitter added to retry delays, in milliseconds."),
293
+ backoffFactor: z.number().positive().default(2).describe("The multiplier applied to the delay after each failed attempt."),
294
+ methods: z.array(nonEmptyStringSchema).default(["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"]).describe("HTTP methods that are eligible for retries."),
295
+ maxRetryAfterDelayMs: z.number().nonnegative().default(6e4).describe("The longest Retry-After delay the client will honor, in milliseconds.")
284
296
  }).superRefine(validateRetryDelays);
285
297
  var constructorParameterSchema = z.strictObject({
286
- name: nonEmptyStringSchema,
287
- example: z.string().optional(),
288
- description: z.string().optional(),
289
- required: z.boolean().optional()
298
+ name: nonEmptyStringSchema.describe("The parameter name in the generated client constructor."),
299
+ example: z.string().optional().describe("An example value shown in generated documentation."),
300
+ description: z.string().optional().describe(
301
+ "A description of the constructor parameter included in generated SDK documentation."
302
+ ),
303
+ required: z.boolean().optional().describe("Whether callers must provide the parameter.")
290
304
  });
291
305
  var parameterStyleSchema = z.enum(["wrapped", "inline", "language-default"]);
292
306
  var tokenRefreshConfigSchema = z.strictObject({
293
- enabled: z.boolean(),
294
- endpoint: nonEmptyStringSchema.optional(),
295
- accessTokenField: nonEmptyStringSchema.optional(),
296
- refreshTokenField: nonEmptyStringSchema.optional()
307
+ enabled: z.boolean().describe("Whether the client can exchange refresh tokens."),
308
+ endpoint: nonEmptyStringSchema.optional().describe("The API endpoint used to refresh tokens."),
309
+ accessTokenField: nonEmptyStringSchema.optional().describe("The response field containing the refreshed access token."),
310
+ refreshTokenField: nonEmptyStringSchema.optional().describe("The response field containing the refreshed refresh token.")
297
311
  }).superRefine(({ enabled, endpoint }, context) => {
298
312
  if (enabled && endpoint === void 0) {
299
313
  context.addIssue({
@@ -304,53 +318,57 @@ var tokenRefreshConfigSchema = z.strictObject({
304
318
  }
305
319
  });
306
320
  var clientOverrideShape = {
307
- retry: clientRetryOverrideSchema.optional(),
308
- responseHeaders: z.boolean().optional(),
309
- responseValidation: z.boolean().optional(),
310
- multiTenant: z.boolean().optional(),
311
- additionalConstructorParameters: z.array(constructorParameterSchema).optional(),
312
- timeoutMs: z.union([z.number().nonnegative(), z.literal("infinity")]).optional(),
313
- requestParameterStyle: parameterStyleSchema.optional(),
314
- pathParameterStyle: parameterStyleSchema.optional(),
315
- filePropertyStyle: parameterStyleSchema.optional(),
316
- useDefaultRequestParameterValues: z.boolean().optional(),
317
- respectOptionalRequestBody: z.boolean().optional(),
318
- tokenRefresh: tokenRefreshConfigSchema.optional()
321
+ retry: clientRetryOverrideSchema.optional().describe("Retry behavior for generated API requests."),
322
+ responseHeaders: z.boolean().optional().describe("Whether generated operations expose HTTP response headers."),
323
+ responseValidation: z.boolean().optional().describe("Whether the client validates API responses against the schema."),
324
+ multiTenant: z.boolean().optional().describe("Whether the client exposes configuration for tenant-specific API access."),
325
+ additionalConstructorParameters: z.array(constructorParameterSchema).optional().describe("Additional parameters added to the generated client constructor."),
326
+ timeoutMs: z.union([z.number().nonnegative(), z.literal("infinity")]).optional().describe('The default request timeout in milliseconds, or "infinity" for no timeout.'),
327
+ requestParameterStyle: parameterStyleSchema.optional().describe("Whether generated operation parameters are wrapped or passed inline."),
328
+ pathParameterStyle: parameterStyleSchema.optional().describe("Whether generated path parameters are wrapped or passed inline."),
329
+ filePropertyStyle: parameterStyleSchema.optional().describe("Whether generated file properties are wrapped or passed inline."),
330
+ useDefaultRequestParameterValues: z.boolean().optional().describe("Whether schema defaults are applied to omitted request parameters."),
331
+ respectOptionalRequestBody: z.boolean().optional().describe("Whether an optional request body remains optional in generated methods."),
332
+ tokenRefresh: tokenRefreshConfigSchema.optional().describe("Refresh-token behavior for the generated client.")
319
333
  };
320
334
  var clientConfigOverrideSchema = z.strictObject(clientOverrideShape);
321
335
  var clientConfigSchema = z.strictObject({
322
336
  ...clientOverrideShape,
323
- retry: retryConfigSchema.prefault({}),
324
- responseHeaders: z.boolean().default(false),
325
- multiTenant: z.boolean().default(false),
326
- additionalConstructorParameters: z.array(constructorParameterSchema).default([])
337
+ retry: retryConfigSchema.prefault({}).describe("Retry behavior for generated API requests."),
338
+ responseHeaders: z.boolean().default(false).describe("Whether generated operations expose HTTP response headers."),
339
+ multiTenant: z.boolean().default(false).describe("Whether the client exposes configuration for tenant-specific API access."),
340
+ additionalConstructorParameters: z.array(constructorParameterSchema).default([]).describe("Additional parameters added to the generated client constructor.")
327
341
  });
328
342
  var unsupportedFieldSchema = z.strictObject({
329
- source: z.enum(["fern", "postman", "sdk-config-ir"]),
330
- path: z.array(z.union([nonEmptyStringSchema, z.number().int().nonnegative()])).min(1),
331
- code: nonEmptyStringSchema.optional(),
332
- reason: nonEmptyStringSchema,
333
- severity: z.enum(["error", "warning", "info"]),
334
- risk: z.enum(["high", "medium", "low"]),
335
- owner: nonEmptyStringSchema,
336
- suggestedAction: nonEmptyStringSchema
343
+ source: z.enum(["fern", "postman", "sdk-config-ir"]).describe("The configuration surface containing the unsupported field."),
344
+ path: z.array(z.union([nonEmptyStringSchema, z.number().int().nonnegative()])).min(1).describe("The property path to the unsupported field in its source configuration."),
345
+ code: nonEmptyStringSchema.optional().describe("A stable diagnostic code for the unsupported field."),
346
+ reason: nonEmptyStringSchema.describe(
347
+ "Why the field could not be represented in normalized configuration."
348
+ ),
349
+ severity: z.enum(["error", "warning", "info"]).describe("The diagnostic severity."),
350
+ risk: z.enum(["high", "medium", "low"]).describe("The migration risk of omitting this field."),
351
+ owner: nonEmptyStringSchema.describe("The component or team responsible for resolving the gap."),
352
+ suggestedAction: nonEmptyStringSchema.describe(
353
+ "Recommended action for preserving the intended behavior."
354
+ )
337
355
  });
338
356
  var postmanLegacyInputSchema = z.strictObject({
339
- kind: z.literal("postman-build-parameters"),
340
- value: jsonObjectSchema
357
+ kind: z.literal("postman-build-parameters").describe("Identifies legacy Postman build parameters."),
358
+ value: jsonObjectSchema.describe("A debugging copy of the original Postman build parameters.")
341
359
  });
342
360
  var fernLegacyInputSchema = z.strictObject({
343
- kind: z.literal("fern-generator-invocation"),
344
- value: jsonObjectSchema
361
+ kind: z.literal("fern-generator-invocation").describe("Identifies a legacy Fern generator invocation."),
362
+ value: jsonObjectSchema.describe("A debugging copy of the original Fern generator invocation.")
345
363
  });
346
364
  var legacyInputSchema = z.discriminatedUnion("kind", [
347
365
  postmanLegacyInputSchema,
348
366
  fernLegacyInputSchema
349
367
  ]);
350
368
  var compatibilityConfigSchema = z.strictObject({
351
- outputProfile: z.enum(["converged", "postman-legacy", "fern-legacy"]),
352
- legacyInput: legacyInputSchema.optional(),
353
- unsupportedFields: z.array(unsupportedFieldSchema).optional()
369
+ outputProfile: z.enum(["converged", "postman-legacy", "fern-legacy"]).describe("The output-default profile retained while legacy producers converge."),
370
+ legacyInput: legacyInputSchema.optional().describe("Original producer input retained only for migration debugging."),
371
+ unsupportedFields: z.array(unsupportedFieldSchema).optional().describe("Legacy fields that could not be represented in normalized configuration.")
354
372
  });
355
373
  var httpMethodSchema = z.enum([
356
374
  "GET",
@@ -364,116 +382,122 @@ var httpMethodSchema = z.enum([
364
382
  "CONNECT"
365
383
  ]);
366
384
  var readmeEndpointSchema = z.strictObject({
367
- method: httpMethodSchema,
368
- path: nonEmptyStringSchema,
369
- stream: z.boolean().optional()
385
+ method: httpMethodSchema.describe("The HTTP method of the documented endpoint."),
386
+ path: nonEmptyStringSchema.describe("The endpoint path used in generated examples."),
387
+ stream: z.boolean().optional().describe("Whether the example uses the streaming response API.")
370
388
  });
371
389
  var readmeCustomSectionSchema = z.strictObject({
372
- title: nonEmptyStringSchema,
373
- content: z.string()
390
+ title: nonEmptyStringSchema.describe("The heading displayed for this README section."),
391
+ content: z.string().describe("The Markdown content of this README section.")
374
392
  });
375
393
  var readmeConfigSchema = z.strictObject({
376
- apiName: nonEmptyStringSchema.optional(),
377
- introduction: z.string().optional(),
378
- apiReferenceLink: nonEmptyStringSchema.optional(),
379
- bannerLink: nonEmptyStringSchema.optional(),
380
- disabledSections: z.array(nonEmptyStringSchema).optional(),
381
- customSections: z.array(readmeCustomSectionSchema).optional(),
382
- defaultEndpoint: readmeEndpointSchema.optional(),
383
- features: z.record(z.string(), z.array(readmeEndpointSchema)).optional()
394
+ apiName: nonEmptyStringSchema.optional().describe("The API name displayed in the README."),
395
+ introduction: z.string().optional().describe("Custom introductory Markdown for the README."),
396
+ apiReferenceLink: nonEmptyStringSchema.optional().describe("The URL linked as the API reference."),
397
+ bannerLink: nonEmptyStringSchema.optional().describe("The destination URL for the README banner."),
398
+ disabledSections: z.array(nonEmptyStringSchema).optional().describe("Generated README sections to omit."),
399
+ customSections: z.array(readmeCustomSectionSchema).optional().describe("Additional sections inserted into the README."),
400
+ defaultEndpoint: readmeEndpointSchema.optional().describe("The endpoint used for the primary README example."),
401
+ features: z.record(z.string(), z.array(readmeEndpointSchema)).optional().describe("Named feature groups and the endpoints demonstrated by each group.")
384
402
  });
385
403
  var snippetsConfigSchema = z.strictObject({
386
- enabled: z.boolean(),
387
- format: z.enum(["md", "json"]).optional(),
388
- outputPath: nonEmptyStringSchema.optional()
404
+ enabled: z.boolean().describe("Whether standalone usage snippets are generated."),
405
+ format: z.enum(["md", "json"]).optional().describe("The output format for generated snippets."),
406
+ outputPath: nonEmptyStringSchema.optional().describe("The output path for generated snippet files.")
389
407
  });
390
408
  var docsConfigSchema = z.strictObject({
391
- readme: readmeConfigSchema.optional(),
392
- snippets: snippetsConfigSchema.optional(),
393
- referenceBaseUrl: nonEmptyStringSchema.optional(),
394
- includeApiReference: z.boolean().optional()
409
+ readme: readmeConfigSchema.optional().describe("README content and example configuration."),
410
+ snippets: snippetsConfigSchema.optional().describe("Standalone usage snippet generation."),
411
+ referenceBaseUrl: nonEmptyStringSchema.optional().describe("The base URL used for links to generated API reference files."),
412
+ includeApiReference: z.boolean().optional().describe("Whether API reference documentation is included in the SDK output.")
395
413
  });
396
414
  var namingConfigSchema = z.strictObject({
397
- clientName: nonEmptyStringSchema.optional(),
398
- exportedClientName: nonEmptyStringSchema.optional(),
399
- environmentTypeName: nonEmptyStringSchema.optional(),
400
- apiErrorName: nonEmptyStringSchema.optional(),
401
- baseErrorName: nonEmptyStringSchema.optional(),
402
- pagerName: nonEmptyStringSchema.optional(),
415
+ clientName: nonEmptyStringSchema.optional().describe("The generated client class name."),
416
+ exportedClientName: nonEmptyStringSchema.optional().describe("The client name exported from the generated package."),
417
+ environmentTypeName: nonEmptyStringSchema.optional().describe("The generated type name for API environments."),
418
+ apiErrorName: nonEmptyStringSchema.optional().describe("The generated API error class name."),
419
+ baseErrorName: nonEmptyStringSchema.optional().describe("The generated base error class name."),
420
+ pagerName: nonEmptyStringSchema.optional().describe("The generated pagination helper name."),
403
421
  /** Apply Fern's initialism-aware casing rules when deriving generated identifiers. */
404
- smartCasing: z.boolean().optional(),
422
+ smartCasing: z.boolean().optional().describe("Whether generated identifiers use initialism-aware casing."),
405
423
  /** Preserve a word boundary after digits when Fern smart casing is enabled. */
406
- smartCasingDigitWordBoundary: z.boolean().optional()
424
+ smartCasingDigitWordBoundary: z.boolean().optional().describe("Whether smart casing preserves a word boundary after digits.")
407
425
  });
408
426
  var cliGenerationConfigSchema = z.strictObject({
409
- paginationParameters: z.array(nonEmptyStringSchema).optional(),
410
- skills: z.boolean().optional()
427
+ paginationParameters: z.array(nonEmptyStringSchema).optional().describe("Request parameter names treated as pagination controls by the CLI."),
428
+ skills: z.boolean().optional().describe("Whether the generated CLI includes skills that teach AI agents to invoke commands.")
411
429
  });
412
430
  var csharpGenerationConfigSchema = z.strictObject({
413
- useOptionalWrapper: z.boolean().optional(),
414
- simplifyObjectDictionaries: z.boolean().optional(),
415
- explicitNamespaces: z.boolean().optional(),
416
- rootNamespaceForCoreClasses: z.boolean().optional(),
417
- includeExceptionHandler: z.boolean().optional(),
418
- experimentalExplicitNullableOptional: z.boolean().optional()
431
+ useOptionalWrapper: z.boolean().optional().describe("Whether optional values use an explicit Optional wrapper."),
432
+ simplifyObjectDictionaries: z.boolean().optional().describe("Whether object schemas with arbitrary values use simplified dictionary types."),
433
+ explicitNamespaces: z.boolean().optional().describe("Whether generated resource groups use explicit nested namespaces."),
434
+ rootNamespaceForCoreClasses: z.boolean().optional().describe("Whether shared client classes are emitted in the root namespace."),
435
+ includeExceptionHandler: z.boolean().optional().describe("Whether generated client operations use a configurable exception handler."),
436
+ experimentalExplicitNullableOptional: z.boolean().optional().describe(
437
+ "Whether optional nullable properties distinguish omitted values from explicit nulls."
438
+ )
419
439
  });
420
440
  var goGenerationConfigSchema = z.strictObject({
421
- legacyComplexModels: z.boolean().optional(),
441
+ legacyComplexModels: z.boolean().optional().describe("Whether complex models use the legacy Go representation."),
422
442
  /** Uppercase common initialisms in generated names (`UserID` rather than `UserId`). */
423
- smartCasing: z.boolean().optional(),
443
+ smartCasing: z.boolean().optional().describe("Whether generated Go names capitalize common initialisms."),
424
444
  /** Overrides the fern root-client constructor independently from the client type name. */
425
- clientConstructorName: nonEmptyStringSchema.optional(),
426
- unionVersion: z.enum(["v0", "v1"]).optional(),
427
- includeLegacyClientOptions: z.boolean().optional()
445
+ clientConstructorName: nonEmptyStringSchema.optional().describe("The generated root-client constructor name."),
446
+ unionVersion: z.enum(["v0", "v1"]).optional().describe("The representation used for generated Go unions."),
447
+ includeLegacyClientOptions: z.boolean().optional().describe("Whether the client retains legacy constructor option helpers.")
428
448
  });
429
449
  var jvmGenerationConfigSchema = z.strictObject({
430
- packageLayout: z.enum(["flat", "nested"]).optional(),
431
- useLocalDateForDates: z.boolean().optional(),
432
- collapseOptionalNullable: z.boolean().optional(),
433
- gradleDistributionUrl: z.string().min(1).optional(),
434
- gradlePluginManagement: z.string().optional(),
435
- gradleCentralDependencyManagement: z.boolean().optional(),
450
+ packageLayout: z.enum(["flat", "nested"]).optional().describe("Whether generated JVM packages use a flat or nested resource layout."),
451
+ useLocalDateForDates: z.boolean().optional().describe("Whether date-only values use LocalDate instead of OffsetDateTime."),
452
+ collapseOptionalNullable: z.boolean().optional().describe("Whether optional nullable values collapse into a single nullable representation."),
453
+ gradleDistributionUrl: z.string().min(1).optional().describe("The Gradle distribution URL written to the generated wrapper."),
454
+ gradlePluginManagement: z.string().optional().describe("Plugin management configuration added to the generated Gradle settings."),
455
+ gradleCentralDependencyManagement: z.boolean().optional().describe("Whether dependency versions are managed centrally in the Gradle project."),
436
456
  /** Selects co-located async methods or a separate async client surface. */
437
- asyncStyle: z.enum(["dedicated-client", "twin-methods"]).optional()
457
+ asyncStyle: z.enum(["dedicated-client", "twin-methods"]).optional().describe("Whether asynchronous operations use a separate client or co-located methods.")
438
458
  });
439
459
 
440
460
  // src/sdk-config-domain/v1/language/java.ts
441
461
  var javaGenerationConfigSchema = jvmGenerationConfigSchema.extend({
442
- includeKotlinSnippets: z.boolean().optional()
462
+ includeKotlinSnippets: z.boolean().optional().describe("Whether Java SDK documentation includes Kotlin usage snippets.")
443
463
  });
444
464
 
445
465
  // src/sdk-config-domain/v1/language/kotlin.ts
446
466
  var kotlinGenerationConfigSchema = jvmGenerationConfigSchema;
447
467
  var compilerOptionsSchema = z.strictObject({
448
- target: nonEmptyStringSchema.optional(),
449
- module: nonEmptyStringSchema.optional(),
450
- lib: z.array(nonEmptyStringSchema).optional()
468
+ target: nonEmptyStringSchema.optional().describe("The JavaScript language target passed to TypeScript."),
469
+ module: nonEmptyStringSchema.optional().describe("The module format passed to TypeScript."),
470
+ lib: z.array(nonEmptyStringSchema).optional().describe("The runtime library definitions passed to TypeScript.")
451
471
  });
452
472
  var packageScriptSchema = z.strictObject({
453
- name: nonEmptyStringSchema,
454
- command: nonEmptyStringSchema
473
+ name: nonEmptyStringSchema.describe("The package script name."),
474
+ command: nonEmptyStringSchema.describe("The command executed by the package script.")
455
475
  });
456
476
  var httpClientSchema = z.strictObject({
457
- name: z.enum(["axios", "fetch"])
477
+ name: z.enum(["axios", "fetch"]).describe("The HTTP client used by generated TypeScript code.")
458
478
  });
459
479
  var typescriptGenerationConfigSchema = z.strictObject({
460
- typescriptVersion: nonEmptyStringSchema.optional(),
461
- zodVersion: nonEmptyStringSchema.optional(),
462
- compilerOptions: compilerOptionsSchema.optional(),
463
- httpClient: httpClientSchema.optional(),
464
- packageManager: z.enum(["pnpm", "yarn"]).optional(),
465
- testFramework: z.enum(["jest", "vitest"]).optional(),
466
- namingStrategy: z.enum(["base", "originalPropertyNames"]).optional(),
467
- bundle: z.boolean().optional(),
468
- exportClassDefault: z.boolean().optional(),
480
+ typescriptVersion: nonEmptyStringSchema.optional().describe("The TypeScript version used by the generated project."),
481
+ zodVersion: nonEmptyStringSchema.optional().describe("The Zod version used by generated runtime schemas."),
482
+ compilerOptions: compilerOptionsSchema.optional().describe("TypeScript compiler options for the generated project."),
483
+ httpClient: httpClientSchema.optional().describe("The HTTP client used by generated TypeScript code."),
484
+ packageManager: z.enum(["pnpm", "yarn"]).optional().describe("The package manager used by the generated project."),
485
+ packageManagerVersion: nonEmptyStringSchema.optional().describe("The package manager version used by the generated project."),
486
+ testFramework: z.enum(["jest", "vitest"]).optional().describe("The test framework used by generated tests."),
487
+ namingStrategy: z.enum(["base", "originalPropertyNames"]).optional().describe("How schema property names are converted into TypeScript identifiers."),
488
+ bundle: z.boolean().optional().describe("Whether the generated package includes bundled output."),
489
+ exportClassDefault: z.boolean().optional().describe("Whether the client class is also exported as the default export."),
469
490
  /** Name of the top-level namespace export emitted by Fern-compatible TypeScript SDKs. */
470
- namespaceExportName: nonEmptyStringSchema.optional(),
471
- allowCustomFetcher: z.boolean().optional(),
472
- useBrandedStringAliases: z.boolean().optional(),
473
- useLegacyExports: z.boolean().optional(),
474
- useBigInt: z.boolean().optional(),
475
- serdeLayer: z.boolean().optional(),
476
- scripts: z.array(packageScriptSchema).optional()
491
+ namespaceExportName: nonEmptyStringSchema.optional().describe("The top-level namespace export name."),
492
+ consolidateTypeFiles: z.boolean().optional().describe("Whether generated types are consolidated into fewer source files."),
493
+ allowCustomFetcher: z.boolean().optional().describe("Whether callers can supply a custom fetch implementation."),
494
+ useBrandedStringAliases: z.boolean().optional().describe("Whether string aliases are emitted as distinct branded types."),
495
+ useLegacyExports: z.boolean().optional().describe("Whether the package emits the legacy export layout."),
496
+ useBigInt: z.boolean().optional().describe("Whether 64-bit integer values are represented with bigint."),
497
+ serdeLayer: z.boolean().optional().describe("Whether generated models use Fern serialization and deserialization helpers."),
498
+ /** Ship only the ESM build (drops CJS) to avoid the Node dual-package hazard. */
499
+ esmOnly: z.boolean().optional().describe("Whether the package emits only ECMAScript modules."),
500
+ scripts: z.array(packageScriptSchema).optional().describe("Additional scripts added to the generated package manifest.")
477
501
  });
478
502
 
479
503
  // src/sdk-config-domain/v1/language/mcp.ts
@@ -488,75 +512,75 @@ var mcpAvailabilityStatuses = [
488
512
  "LEGACY"
489
513
  ];
490
514
  var mcpToolFilterSchema = z.strictObject({
491
- include: z.array(nonEmptyStringSchema).optional(),
492
- exclude: z.array(nonEmptyStringSchema).optional()
515
+ include: z.array(nonEmptyStringSchema).optional().describe("Operations explicitly included as MCP tools."),
516
+ exclude: z.array(nonEmptyStringSchema).optional().describe("Operations explicitly excluded from MCP tools.")
493
517
  });
494
518
  var mcpToolsetNameSchema = nonEmptyStringSchema.refine(
495
519
  (name) => name !== "default" && /^[a-z0-9-]+$/.test(name),
496
520
  'toolset names must match [a-z0-9-]+ and cannot be "default"'
497
521
  );
498
522
  var mcpGenerationConfigSchema = typescriptGenerationConfigSchema.extend({
499
- serverName: nonEmptyStringSchema.optional(),
500
- serverDescription: nonEmptyStringSchema.optional(),
501
- excludeAvailability: z.array(z.enum(mcpAvailabilityStatuses)).optional(),
502
- tools: mcpToolFilterSchema.optional(),
503
- toolsets: z.record(mcpToolsetNameSchema, mcpToolFilterSchema).optional()
523
+ serverName: nonEmptyStringSchema.optional().describe("The name advertised by the generated MCP server."),
524
+ serverDescription: nonEmptyStringSchema.optional().describe("The description advertised by the generated MCP server."),
525
+ excludeAvailability: z.array(z.enum(mcpAvailabilityStatuses)).optional().describe("Operation availability statuses excluded from MCP tool generation."),
526
+ tools: mcpToolFilterSchema.optional().describe("Global operation filters for generated MCP tools."),
527
+ toolsets: z.record(mcpToolsetNameSchema, mcpToolFilterSchema).optional().describe("Named MCP toolsets and the operation filters for each toolset.")
504
528
  });
505
529
  var phpGenerationConfigSchema = z.strictObject({
506
- propertyAccess: z.enum(["public", "private"]).optional(),
507
- generateClientInterfaces: z.boolean().optional()
530
+ propertyAccess: z.enum(["public", "private"]).optional().describe("The visibility of generated PHP model properties."),
531
+ generateClientInterfaces: z.boolean().optional().describe("Whether interfaces are generated for PHP client classes.")
508
532
  });
509
533
  var pythonClientSchema = z.strictObject({
510
- fileName: nonEmptyStringSchema.optional(),
511
- exportedFileName: nonEmptyStringSchema.optional()
534
+ fileName: nonEmptyStringSchema.optional().describe("The source file name for the Python client."),
535
+ exportedFileName: nonEmptyStringSchema.optional().describe("The file name used when exporting the Python client.")
512
536
  });
513
537
  var pydanticConfigSchema = z.strictObject({
514
- versionCompatibility: z.enum(["v1", "v2", "both", "v1-on-v2"]).optional(),
515
- frozen: z.boolean().optional(),
516
- requireOptionalFields: z.boolean().optional(),
517
- unionNaming: z.enum(["v0", "v1"]).optional(),
518
- useFieldAliases: z.boolean().optional()
538
+ versionCompatibility: z.enum(["v1", "v2", "both", "v1-on-v2"]).optional().describe("The Pydantic major versions supported by generated models."),
539
+ frozen: z.boolean().optional().describe("Whether generated Pydantic models are immutable."),
540
+ requireOptionalFields: z.boolean().optional().describe("Whether Optional fields remain required unless they declare a default."),
541
+ unionNaming: z.enum(["v0", "v1"]).optional().describe("The naming strategy for generated union types."),
542
+ useFieldAliases: z.boolean().optional().describe("Whether Pydantic field aliases preserve wire names.")
519
543
  });
520
544
  var additionalInitExportSchema = z.strictObject({
521
- from: nonEmptyStringSchema,
522
- imports: z.array(nonEmptyStringSchema).min(1)
545
+ from: nonEmptyStringSchema.describe("The module from which names are re-exported."),
546
+ imports: z.array(nonEmptyStringSchema).min(1).describe("Names re-exported from the module.")
523
547
  });
524
548
  var pythonGenerationConfigSchema = z.strictObject({
525
- pythonVersion: nonEmptyStringSchema.optional(),
526
- pydanticVersion: nonEmptyStringSchema.optional(),
527
- pydantic: pydanticConfigSchema.optional(),
528
- client: pythonClientSchema.optional(),
549
+ pythonVersion: nonEmptyStringSchema.optional().describe("The Python version targeted by the generated project."),
550
+ pydanticVersion: nonEmptyStringSchema.optional().describe("The Pydantic dependency version requirement."),
551
+ pydantic: pydanticConfigSchema.optional().describe("Pydantic model-generation behavior."),
552
+ client: pythonClientSchema.optional().describe("Python client file naming."),
529
553
  /** Default followed by generated sync and async HTTP clients when the caller does not override it. */
530
- followRedirectsByDefault: z.boolean().optional(),
554
+ followRedirectsByDefault: z.boolean().optional().describe("Whether generated HTTP clients follow redirects by default."),
531
555
  /** Chunk size passed to Python byte-stream iterators. */
532
- defaultBytesStreamChunkSize: z.number().int().positive().optional(),
556
+ defaultBytesStreamChunkSize: z.number().int().positive().optional().describe("The default byte-stream iterator chunk size."),
533
557
  /** Python interpreter recursion limit installed by the generated package at import time. */
534
- recursionLimit: z.number().int().gt(1e3).optional(),
558
+ recursionLimit: z.number().int().gt(1e3).optional().describe("The Python recursion limit installed when the generated package is imported."),
535
559
  /** Published Python extras, keyed by extra name with package dependency names as values. */
536
- extras: z.record(nonEmptyStringSchema, z.array(nonEmptyStringSchema)).optional(),
537
- alwaysInitializeOptionals: z.boolean().optional(),
538
- useTypedDictRequests: z.boolean().optional(),
539
- additionalInitExports: z.array(additionalInitExportSchema).optional()
560
+ extras: z.record(nonEmptyStringSchema, z.array(nonEmptyStringSchema)).optional().describe("Published Python extras and their dependency names."),
561
+ alwaysInitializeOptionals: z.boolean().optional().describe("Whether optional model fields are initialized even when omitted."),
562
+ useTypedDictRequests: z.boolean().optional().describe("Whether request bodies are generated as TypedDict types."),
563
+ additionalInitExports: z.array(additionalInitExportSchema).optional().describe("Additional names re-exported from the package initializer.")
540
564
  });
541
565
  var rubyGenerationConfigSchema = z.strictObject({
542
- requirePaths: z.array(nonEmptyStringSchema).optional()
566
+ requirePaths: z.array(nonEmptyStringSchema).optional().describe("Ruby load paths included in the generated gem specification.")
543
567
  });
544
568
  var rustGenerationConfigSchema = z.strictObject({
545
569
  /**
546
570
  * Rust type for datetime primitives. `offset` maps to `DateTime<FixedOffset>` and preserves the
547
571
  * timezone the payload carried; `utc` maps to `DateTime<Utc>` and normalizes to UTC.
548
572
  */
549
- dateTimeType: z.enum(["offset", "utc"]).optional(),
573
+ dateTimeType: z.enum(["offset", "utc"]).optional().describe("Whether datetime values preserve their offset or normalize to UTC."),
550
574
  /** Uppercase common initialisms in generated names (`UserID` rather than `UserId`). */
551
- capitalizeInitialisms: z.boolean().optional(),
575
+ capitalizeInitialisms: z.boolean().optional().describe("Whether generated Rust names capitalize common initialisms."),
552
576
  /** Cargo features, mapping a feature name to the dependencies or features it enables. */
553
- features: z.record(z.string(), z.array(nonEmptyStringSchema)).optional(),
577
+ features: z.record(z.string(), z.array(nonEmptyStringSchema)).optional().describe("Cargo features and the dependencies or features each enables."),
554
578
  /** Overrides which features make up Cargo's `default` feature set. */
555
- defaultFeatures: z.array(nonEmptyStringSchema).optional()
579
+ defaultFeatures: z.array(nonEmptyStringSchema).optional().describe("Cargo features included in the crate default feature set.")
556
580
  });
557
581
  var swiftGenerationConfigSchema = z.strictObject({
558
- moduleName: nonEmptyStringSchema.optional(),
559
- nullableAsOptional: z.boolean().optional()
582
+ moduleName: nonEmptyStringSchema.optional().describe("The Swift module name for the generated package."),
583
+ nullableAsOptional: z.boolean().optional().describe("Whether nullable values are represented as Swift optionals.")
560
584
  });
561
585
  var goModulePathSchema = relativePathSchema.regex(
562
586
  /^(?!.*(?:^|\/)\.{1,2}(?:\/|$))[A-Za-z0-9._~-]+(?:\/[A-Za-z0-9._~-]+)*$/,
@@ -567,140 +591,166 @@ var composerPackageNameSchema = nonEmptyStringSchema.regex(
567
591
  'Composer package name must be a lowercase "vendor/package" name'
568
592
  );
569
593
  var authorSchema = z.strictObject({
570
- name: nonEmptyStringSchema,
571
- email: z.email().optional(),
572
- url: nonEmptyStringSchema.optional()
594
+ name: nonEmptyStringSchema.describe("The package author name."),
595
+ email: z.email().optional().describe("The package author email address."),
596
+ url: nonEmptyStringSchema.optional().describe("The package author website.")
573
597
  });
574
598
  var developerSchema = z.strictObject({
575
- name: nonEmptyStringSchema,
576
- email: z.email().optional(),
577
- organization: nonEmptyStringSchema.optional(),
578
- organizationUrl: nonEmptyStringSchema.optional()
599
+ name: nonEmptyStringSchema.describe("The package developer name."),
600
+ email: z.email().optional().describe("The package developer email address."),
601
+ organization: nonEmptyStringSchema.optional().describe("The developer organization name."),
602
+ organizationUrl: nonEmptyStringSchema.optional().describe("The developer organization website.")
579
603
  });
580
604
  var licenseSchema = z.strictObject({
581
- type: nonEmptyStringSchema,
582
- name: nonEmptyStringSchema.optional(),
583
- url: nonEmptyStringSchema.optional(),
584
- path: nonEmptyStringSchema.optional()
605
+ type: nonEmptyStringSchema.describe("The license identifier or license type."),
606
+ name: nonEmptyStringSchema.optional().describe("The human-readable license name."),
607
+ url: nonEmptyStringSchema.optional().describe("The URL containing the license text."),
608
+ path: nonEmptyStringSchema.optional().describe("The path to a custom license file.")
585
609
  });
586
610
  var dependencySourceSchema = z.discriminatedUnion("type", [
587
611
  z.strictObject({
588
- type: z.literal("registry"),
589
- registry: nonEmptyStringSchema.optional()
612
+ type: z.literal("registry").describe("Resolves the dependency from a package registry."),
613
+ registry: nonEmptyStringSchema.optional().describe("The registry used to resolve the dependency.")
590
614
  }),
591
615
  z.strictObject({
592
- type: z.literal("git"),
593
- url: nonEmptyStringSchema,
594
- ref: nonEmptyStringSchema.optional(),
595
- subdirectory: nonEmptyStringSchema.optional()
616
+ type: z.literal("git").describe("Resolves the dependency from a Git repository."),
617
+ url: nonEmptyStringSchema.describe("The Git repository URL."),
618
+ ref: nonEmptyStringSchema.optional().describe("The Git branch, tag, or commit to use."),
619
+ subdirectory: nonEmptyStringSchema.optional().describe("The package subdirectory within the Git repository.")
596
620
  }),
597
621
  z.strictObject({
598
- type: z.literal("path"),
599
- path: nonEmptyStringSchema
622
+ type: z.literal("path").describe("Resolves the dependency from a local path."),
623
+ path: nonEmptyStringSchema.describe("The local path containing the dependency.")
600
624
  })
601
625
  ]);
602
626
  var dependencySchema = z.strictObject({
603
- name: nonEmptyStringSchema,
604
- version: nonEmptyStringSchema.optional(),
605
- source: dependencySourceSchema.optional(),
606
- packageName: nonEmptyStringSchema.optional(),
607
- features: z.array(nonEmptyStringSchema).optional(),
608
- extras: z.array(nonEmptyStringSchema).optional(),
609
- optional: z.boolean().optional(),
610
- defaultFeatures: z.boolean().optional(),
611
- environmentMarker: nonEmptyStringSchema.optional()
627
+ name: nonEmptyStringSchema.describe("The dependency name used by the package manager."),
628
+ version: nonEmptyStringSchema.optional().describe("The dependency version requirement."),
629
+ source: dependencySourceSchema.optional().describe("A non-default source for the dependency."),
630
+ packageName: nonEmptyStringSchema.optional().describe("The source package name when it differs from the dependency alias."),
631
+ features: z.array(nonEmptyStringSchema).optional().describe("Cargo features enabled for this dependency."),
632
+ extras: z.array(nonEmptyStringSchema).optional().describe("Python extras enabled for this dependency."),
633
+ optional: z.boolean().optional().describe("Whether the dependency is optional."),
634
+ defaultFeatures: z.boolean().optional().describe("Whether the dependency enables its default Cargo features."),
635
+ environmentMarker: nonEmptyStringSchema.optional().describe("A Python environment marker that conditions this dependency.")
612
636
  }).refine(({ source, version }) => source !== void 0 || version !== void 0, {
613
637
  message: "dependency must define a version or a source"
614
638
  });
615
639
  var projectUrlSchema = z.strictObject({
616
- label: nonEmptyStringSchema,
617
- url: nonEmptyStringSchema
640
+ label: nonEmptyStringSchema.describe("The label displayed for the project link."),
641
+ url: nonEmptyStringSchema.describe("The project link URL.")
618
642
  });
619
643
  var packageConfigSchema = z.strictObject({
620
- packageName: nonEmptyStringSchema.optional(),
621
- moduleName: nonEmptyStringSchema.optional(),
622
- modulePath: goModulePathSchema.optional(),
623
- namespace: nonEmptyStringSchema.optional(),
624
- groupId: nonEmptyStringSchema.optional(),
625
- artifactId: nonEmptyStringSchema.optional(),
626
- description: z.string().optional(),
627
- repository: nonEmptyStringSchema.optional(),
628
- homepage: nonEmptyStringSchema.optional(),
629
- documentationUrl: nonEmptyStringSchema.optional(),
630
- authors: z.array(authorSchema).optional(),
631
- developers: z.array(developerSchema).optional(),
632
- license: licenseSchema.optional(),
633
- keywords: z.array(nonEmptyStringSchema).optional(),
634
- classifiers: z.array(nonEmptyStringSchema).optional(),
635
- projectUrls: z.array(projectUrlSchema).optional(),
636
- extraDependencies: z.array(dependencySchema).optional(),
637
- extraDevDependencies: z.array(dependencySchema).optional(),
638
- extraPeerDependencies: z.array(dependencySchema).optional()
644
+ packageName: nonEmptyStringSchema.optional().describe("The package name used by the target language registry."),
645
+ moduleName: nonEmptyStringSchema.optional().describe("The generated module or import name when it differs from the package name."),
646
+ modulePath: goModulePathSchema.optional().describe("The Go module path used for imports and publishing."),
647
+ namespace: nonEmptyStringSchema.optional().describe("The namespace or package prefix for generated code."),
648
+ groupId: nonEmptyStringSchema.optional().describe("The Maven group identifier."),
649
+ artifactId: nonEmptyStringSchema.optional().describe("The Maven artifact identifier."),
650
+ description: z.string().optional().describe("The package description used in generated metadata."),
651
+ repository: nonEmptyStringSchema.optional().describe("The source repository for the generated SDK."),
652
+ homepage: nonEmptyStringSchema.optional().describe("The package homepage URL."),
653
+ documentationUrl: nonEmptyStringSchema.optional().describe("The package documentation URL."),
654
+ authors: z.array(authorSchema).optional().describe("Authors credited in package metadata."),
655
+ developers: z.array(developerSchema).optional().describe("Developers credited in package metadata."),
656
+ license: licenseSchema.optional().describe("License metadata for the generated package."),
657
+ keywords: z.array(nonEmptyStringSchema).optional().describe("Search keywords for package metadata."),
658
+ classifiers: z.array(nonEmptyStringSchema).optional().describe("Package classifiers used by registries such as PyPI."),
659
+ projectUrls: z.array(projectUrlSchema).optional().describe("Labeled project links for package metadata."),
660
+ extraDependencies: z.array(dependencySchema).optional().describe("Additional runtime dependencies added to the generated package."),
661
+ extraDevDependencies: z.array(dependencySchema).optional().describe("Additional development dependencies added to the generated package."),
662
+ extraPeerDependencies: z.array(dependencySchema).optional().describe("Additional peer dependencies added to the generated package.")
639
663
  });
640
664
 
641
665
  // src/sdk-config-domain/v1/language/terraform.ts
642
666
  var planModifierSourceSchema = z.discriminatedUnion("enabled", [
643
- z.strictObject({ enabled: z.literal(true), sourceDir: nonEmptyStringSchema }),
644
- z.strictObject({ enabled: z.literal(false) })
667
+ z.strictObject({
668
+ enabled: z.literal(true).describe("Enables custom Terraform plan modifiers."),
669
+ sourceDir: nonEmptyStringSchema.describe(
670
+ "The directory containing custom plan modifier source files."
671
+ )
672
+ }),
673
+ z.strictObject({
674
+ enabled: z.literal(false).describe("Disables custom Terraform plan modifiers.")
675
+ })
645
676
  ]);
646
677
  var planModifiersSchema = z.strictObject({
647
- resources: planModifierSourceSchema,
648
- attributes: planModifierSourceSchema
678
+ resources: planModifierSourceSchema.describe("Custom plan modifiers for generated resources."),
679
+ attributes: planModifierSourceSchema.describe("Custom plan modifiers for generated attributes.")
649
680
  });
650
681
  var providerSchemaSchema = z.strictObject({
651
- addressKey: nonEmptyStringSchema,
652
- authTokenKey: nonEmptyStringSchema
682
+ addressKey: nonEmptyStringSchema.describe(
683
+ "The provider attribute used to configure the API address."
684
+ ),
685
+ authTokenKey: nonEmptyStringSchema.describe(
686
+ "The provider attribute used to configure the authentication token."
687
+ )
653
688
  });
654
689
  var terraformGenerationConfigSchema = z.strictObject({
655
- providerName: nonEmptyStringSchema.optional(),
656
- providerVersion: nonEmptyStringSchema.optional(),
657
- providerModulePath: goModulePathSchema.optional(),
658
- mockAcceptance: z.boolean().optional(),
659
- hideComputedDiff: z.boolean().optional(),
660
- providerSchema: providerSchemaSchema.optional(),
661
- planModifiers: planModifiersSchema.optional()
690
+ providerName: nonEmptyStringSchema.optional().describe("The Terraform provider name."),
691
+ providerVersion: nonEmptyStringSchema.optional().describe("The generated Terraform provider version."),
692
+ providerModulePath: goModulePathSchema.optional().describe("The Go module path for the generated provider."),
693
+ mockAcceptance: z.boolean().optional().describe("Whether acceptance tests use a mock API server."),
694
+ hideComputedDiff: z.boolean().optional().describe("Whether computed-only changes are hidden from Terraform plans."),
695
+ providerSchema: providerSchemaSchema.optional().describe("Names of provider-level configuration attributes."),
696
+ planModifiers: planModifiersSchema.optional().describe("Custom plan modifier source configuration.")
662
697
  });
663
698
 
664
699
  // src/sdk-config-ir/v1/generation.ts
665
700
  var generationAssetSchema = z.discriminatedUnion("type", [
666
- z.strictObject({ type: z.literal("path"), location: relativePathSchema }),
667
- z.strictObject({ type: z.literal("url"), location: nonEmptyStringSchema }),
668
- z.strictObject({ type: z.literal("artifact"), location: nonEmptyStringSchema })
701
+ z.strictObject({
702
+ type: z.literal("path").describe("Loads the generation asset from a relative path."),
703
+ location: relativePathSchema.describe("The relative path to the generation asset.")
704
+ }),
705
+ z.strictObject({
706
+ type: z.literal("url").describe("Loads the generation asset from a URL."),
707
+ location: nonEmptyStringSchema.describe("The URL of the generation asset.")
708
+ }),
709
+ z.strictObject({
710
+ type: z.literal("artifact").describe("Loads the generation asset from stored build output."),
711
+ location: nonEmptyStringSchema.describe("The artifact identifier or location.")
712
+ })
669
713
  ]);
670
714
  var hookDependencySchema = z.strictObject({
671
- name: nonEmptyStringSchema,
672
- version: nonEmptyStringSchema,
673
- groupId: nonEmptyStringSchema.optional()
715
+ name: nonEmptyStringSchema.describe("The hook dependency name."),
716
+ version: nonEmptyStringSchema.describe("The hook dependency version requirement."),
717
+ groupId: nonEmptyStringSchema.optional().describe("The Maven group identifier for the dependency.")
674
718
  });
675
719
  var hooksConfigSchema = z.strictObject({
676
- enabled: z.boolean(),
677
- source: generationAssetSchema.optional(),
678
- dependencies: z.array(hookDependencySchema).optional()
720
+ enabled: z.boolean().describe("Whether custom request and response hooks are generated."),
721
+ source: generationAssetSchema.optional().describe("The source containing custom hook implementations."),
722
+ dependencies: z.array(hookDependencySchema).optional().describe("Dependencies required by custom hooks.")
679
723
  });
680
724
  var customCodeConfigSchema = z.strictObject({
681
- enabled: z.boolean(),
682
- source: generationAssetSchema.optional(),
683
- conflictStrategy: z.enum(["mark", "ours", "theirs"]).optional(),
684
- trackChanges: z.boolean().optional(),
685
- previousBuildId: z.number().int().positive().optional(),
686
- protectedFiles: z.array(nonEmptyStringSchema).optional()
725
+ enabled: z.boolean().describe("Whether customer-authored code is merged into generated output."),
726
+ source: generationAssetSchema.optional().describe("The source containing customer-authored code."),
727
+ conflictStrategy: z.enum(["mark", "ours", "theirs"]).optional().describe("How merge conflicts between generated and custom code are handled."),
728
+ trackChanges: z.boolean().optional().describe("Whether custom-code changes are tracked between builds."),
729
+ previousBuildId: z.number().int().positive().optional().describe("The previous build used as the merge baseline."),
730
+ protectedFiles: z.array(nonEmptyStringSchema).optional().describe("Generated file paths that custom-code merging must not overwrite.")
687
731
  });
688
732
  var workflowConfigSchema = z.strictObject({
689
- path: relativePathSchema,
690
- outputName: nonEmptyStringSchema.optional()
733
+ path: relativePathSchema.describe("The relative path to the workflow definition."),
734
+ outputName: nonEmptyStringSchema.optional().describe("The file name used for the generated workflow.")
691
735
  });
692
736
  var analyticsHeaderSchema = z.union([
693
- z.strictObject({ name: nonEmptyStringSchema, value: z.string() }),
694
- z.strictObject({ name: nonEmptyStringSchema, valueRef: nonEmptyStringSchema })
737
+ z.strictObject({
738
+ name: nonEmptyStringSchema.describe("The exported telemetry header name."),
739
+ value: z.string().describe("The literal telemetry header value.")
740
+ }),
741
+ z.strictObject({
742
+ name: nonEmptyStringSchema.describe("The exported telemetry header name."),
743
+ valueRef: nonEmptyStringSchema.describe("A reference to the telemetry header value.")
744
+ })
695
745
  ]);
696
746
  var analyticsConfigSchema = z.strictObject({
697
- enabled: z.boolean(),
698
- endpoint: nonEmptyStringSchema.optional(),
699
- exporter: z.enum(["otlp-http", "console"]).optional(),
700
- headers: z.array(analyticsHeaderSchema).optional(),
701
- batchSize: z.number().int().positive().optional(),
702
- scheduledDelayMs: z.number().nonnegative().optional(),
703
- exportTimeoutMs: z.number().nonnegative().optional()
747
+ enabled: z.boolean().describe("Whether generated clients export usage telemetry."),
748
+ endpoint: nonEmptyStringSchema.optional().describe("The telemetry export endpoint."),
749
+ exporter: z.enum(["otlp-http", "console"]).optional().describe("The telemetry exporter implementation."),
750
+ headers: z.array(analyticsHeaderSchema).optional().describe("Headers sent by the telemetry exporter."),
751
+ batchSize: z.number().int().positive().optional().describe("The maximum spans in each export batch."),
752
+ scheduledDelayMs: z.number().nonnegative().optional().describe("The delay between scheduled exports, in milliseconds."),
753
+ exportTimeoutMs: z.number().nonnegative().optional().describe("The maximum time allowed for an export, in milliseconds.")
704
754
  }).superRefine(({ enabled, endpoint }, context) => {
705
755
  if (enabled && endpoint === void 0) {
706
756
  context.addIssue({
@@ -711,91 +761,93 @@ var analyticsConfigSchema = z.strictObject({
711
761
  }
712
762
  });
713
763
  var wireTestsSchema = z.strictObject({
714
- enabled: z.boolean(),
715
- exclusions: z.array(nonEmptyStringSchema).optional(),
716
- fallbackToGeneratedErrorExamples: z.boolean().optional(),
717
- fixtureSource: z.enum(["synthetic", "recorded", "auto"]).optional()
764
+ enabled: z.boolean().describe("Whether wire-level request and response tests are generated."),
765
+ exclusions: z.array(nonEmptyStringSchema).optional().describe("Operations excluded from wire tests."),
766
+ fallbackToGeneratedErrorExamples: z.boolean().optional().describe("Whether missing error fixtures are synthesized from generated examples."),
767
+ fixtureSource: z.enum(["synthetic", "recorded", "auto"]).optional().describe("Where wire-test fixtures are obtained.")
718
768
  });
719
769
  var unitTestsSchema = z.strictObject({
720
- enabled: z.boolean(),
721
- mode: z.enum(["core-runtime", "schema-driven", "both"]).optional(),
722
- exclusions: z.array(nonEmptyStringSchema).optional()
770
+ enabled: z.boolean().describe("Whether SDK unit tests are generated."),
771
+ mode: z.enum(["core-runtime", "schema-driven", "both"]).optional().describe("The unit-test generation strategy."),
772
+ exclusions: z.array(nonEmptyStringSchema).optional().describe("Operations excluded from unit tests.")
723
773
  });
724
774
  var fernDefinitionMetadataSchema = z.strictObject({
725
- definitionS3DownloadUrl: nonEmptyStringSchema,
726
- outputPath: nonEmptyStringSchema.optional(),
727
- cliVersion: nonEmptyStringSchema.optional()
775
+ definitionS3DownloadUrl: nonEmptyStringSchema.describe(
776
+ "The download URL for the materialized Fern definition archive."
777
+ ),
778
+ outputPath: nonEmptyStringSchema.optional().describe("The destination path for Fern definition support files."),
779
+ cliVersion: nonEmptyStringSchema.optional().describe("The Fern CLI version associated with the definition.")
728
780
  });
729
781
  var streamsSchema = z.strictObject({
730
- enabled: z.boolean(),
731
- responseType: z.enum(["wrapper", "native", "web"]).optional(),
732
- fileResponseType: z.enum(["stream", "binary-response"]).optional(),
733
- defaultChunkSizeBytes: z.number().int().positive().optional()
782
+ enabled: z.boolean().describe("Whether generated clients expose streaming response APIs."),
783
+ responseType: z.enum(["wrapper", "native", "web"]).optional().describe("The streaming response abstraction exposed by generated clients."),
784
+ fileResponseType: z.enum(["stream", "binary-response"]).optional().describe("The response type used for file downloads."),
785
+ defaultChunkSizeBytes: z.number().int().positive().optional().describe("The default number of bytes yielded by streaming iterators.")
734
786
  });
735
787
  var layoutConfigSchema = z.strictObject({
736
- outputDirectory: z.enum(["project-root", "source-root"]).optional(),
737
- packagePath: nonEmptyStringSchema.optional()
788
+ outputDirectory: z.enum(["project-root", "source-root"]).optional().describe("Whether generated source is rooted at the project or its source directory."),
789
+ packagePath: nonEmptyStringSchema.optional().describe("The package-relative path for generated source files.")
738
790
  });
739
791
  var serializationConfigSchema = z.strictObject({
740
- enumRepresentation: z.enum(["enum", "union", "literal", "forward-compatible-enum", "language-default"]).optional(),
741
- additionalProperties: z.enum(["allow", "forbid", "ignore", "language-default"]).optional(),
742
- inlineTypes: z.boolean().optional(),
743
- omitUndefined: z.boolean().optional()
792
+ enumRepresentation: z.enum(["enum", "union", "literal", "forward-compatible-enum", "language-default"]).optional().describe("How schema enums are represented in generated code."),
793
+ additionalProperties: z.enum(["allow", "forbid", "ignore", "language-default"]).optional().describe("How undeclared object properties are handled."),
794
+ inlineTypes: z.boolean().optional().describe("Whether inline schemas remain nested under their parent types."),
795
+ omitUndefined: z.boolean().optional().describe("Whether undefined properties are omitted during serialization.")
744
796
  });
745
797
  var languageGenerationConfigSchema = z.strictObject({
746
- typescript: typescriptGenerationConfigSchema.optional(),
747
- python: pythonGenerationConfigSchema.optional(),
748
- java: javaGenerationConfigSchema.optional(),
749
- kotlin: kotlinGenerationConfigSchema.optional(),
750
- go: goGenerationConfigSchema.optional(),
751
- csharp: csharpGenerationConfigSchema.optional(),
752
- php: phpGenerationConfigSchema.optional(),
753
- ruby: rubyGenerationConfigSchema.optional(),
754
- rust: rustGenerationConfigSchema.optional(),
755
- cli: cliGenerationConfigSchema.optional(),
756
- mcp: mcpGenerationConfigSchema.optional(),
757
- swift: swiftGenerationConfigSchema.optional(),
758
- terraform: terraformGenerationConfigSchema.optional()
798
+ typescript: typescriptGenerationConfigSchema.optional().describe("TypeScript-specific generation settings."),
799
+ python: pythonGenerationConfigSchema.optional().describe("Python-specific generation settings."),
800
+ java: javaGenerationConfigSchema.optional().describe("Java-specific generation settings."),
801
+ kotlin: kotlinGenerationConfigSchema.optional().describe("Kotlin-specific generation settings."),
802
+ go: goGenerationConfigSchema.optional().describe("Go-specific generation settings."),
803
+ csharp: csharpGenerationConfigSchema.optional().describe("C#-specific generation settings."),
804
+ php: phpGenerationConfigSchema.optional().describe("PHP-specific generation settings."),
805
+ ruby: rubyGenerationConfigSchema.optional().describe("Ruby-specific generation settings."),
806
+ rust: rustGenerationConfigSchema.optional().describe("Rust-specific generation settings."),
807
+ cli: cliGenerationConfigSchema.optional().describe("CLI-specific generation settings."),
808
+ mcp: mcpGenerationConfigSchema.optional().describe("MCP-specific generation settings."),
809
+ swift: swiftGenerationConfigSchema.optional().describe("Swift-specific generation settings."),
810
+ terraform: terraformGenerationConfigSchema.optional().describe("Terraform-specific generation settings.")
759
811
  });
760
812
  var generationConfigSchema = z.strictObject({
761
- includeWatermark: z.boolean().default(false),
813
+ includeWatermark: z.boolean().default(false).describe("Whether generated files include a generator watermark."),
762
814
  /** Emits an AI service into the generated SDK. Python, Java and TypeScript honour it. */
763
- ai: z.boolean().default(false),
764
- includeOptionalSnippetParameters: z.boolean().optional(),
765
- buildAllModels: z.boolean().default(false),
766
- inferServiceNames: z.boolean().default(false),
767
- includeDeprecatedOperations: z.boolean().default(true),
768
- multipleResponses: z.boolean().default(false),
815
+ ai: z.boolean().default(false).describe("Whether the SDK includes generated AI service helpers."),
816
+ includeOptionalSnippetParameters: z.boolean().optional().describe("Whether usage snippets include optional request parameters."),
817
+ buildAllModels: z.boolean().default(false).describe("Whether models not referenced by operations are also generated."),
818
+ inferServiceNames: z.boolean().default(false).describe("Whether service names are inferred from API structure."),
819
+ includeDeprecatedOperations: z.boolean().default(true).describe("Whether deprecated API operations are generated."),
820
+ multipleResponses: z.boolean().default(false).describe("Whether operations model multiple successful response types."),
769
821
  /** Generate the entire SDK project, including package manifests and publishable artifacts. */
770
- generateFullProject: z.boolean().default(false),
771
- devContainer: z.boolean().default(false),
772
- allowMockClient: z.boolean().default(false),
773
- ignoreFiles: z.array(nonEmptyStringSchema).optional(),
822
+ generateFullProject: z.boolean().default(false).describe("Whether generation emits a complete publishable project."),
823
+ devContainer: z.boolean().default(false).describe("Whether development-container configuration is generated."),
824
+ allowMockClient: z.boolean().default(false).describe("Whether a mock API client is included in the generated SDK."),
825
+ ignoreFiles: z.array(nonEmptyStringSchema).optional().describe("Generated paths excluded from the final output."),
774
826
  /**
775
827
  * Raw .fernignore file contents supplied to external publishers that need Fern ignore semantics.
776
828
  * This is separate from generation.ignoreFiles because raw contents preserve comments, ordering,
777
829
  * blank lines, and negation rules.
778
830
  */
779
- fernignoreContents: z.string().optional(),
831
+ fernignoreContents: z.string().optional().describe("The raw .fernignore contents retained for external publishers."),
780
832
  /**
781
833
  * Optional Fern definition metadata for publisher paths that need to write definition or
782
834
  * mock-server support files. This is not required for core GitHub artifact publishing.
783
835
  */
784
- fernDefinitionMetadata: fernDefinitionMetadataSchema.optional(),
785
- reservedKeywords: z.array(nonEmptyStringSchema).optional(),
786
- hooks: hooksConfigSchema.optional(),
787
- customCode: customCodeConfigSchema.optional(),
788
- workflows: z.array(workflowConfigSchema).optional(),
789
- customQueryPaths: z.array(relativePathSchema).optional(),
790
- analytics: analyticsConfigSchema.optional(),
791
- wireTests: wireTestsSchema.optional(),
792
- unitTests: unitTestsSchema.optional(),
793
- webSockets: z.boolean().optional(),
794
- streams: streamsSchema.optional(),
795
- naming: namingConfigSchema.optional(),
796
- layout: layoutConfigSchema.optional(),
797
- serialization: serializationConfigSchema.optional(),
798
- language: languageGenerationConfigSchema.optional()
836
+ fernDefinitionMetadata: fernDefinitionMetadataSchema.optional().describe("Materialized Fern definition metadata used by external publishers."),
837
+ reservedKeywords: z.array(nonEmptyStringSchema).optional().describe("Additional identifiers treated as reserved words."),
838
+ hooks: hooksConfigSchema.optional().describe("Custom SDK request and response hook configuration."),
839
+ customCode: customCodeConfigSchema.optional().describe("Customer-authored code merge configuration."),
840
+ workflows: z.array(workflowConfigSchema).optional().describe("Workflow definitions included in generated output."),
841
+ customQueryPaths: z.array(relativePathSchema).optional().describe("Relative paths to custom query definitions."),
842
+ analytics: analyticsConfigSchema.optional().describe("Generated client telemetry configuration."),
843
+ wireTests: wireTestsSchema.optional().describe("Wire-level request and response test generation."),
844
+ unitTests: unitTestsSchema.optional().describe("SDK unit-test generation."),
845
+ webSockets: z.boolean().optional().describe("Whether WebSocket clients are generated for supported channels."),
846
+ streams: streamsSchema.optional().describe("Streaming response generation behavior."),
847
+ naming: namingConfigSchema.optional().describe("Names and casing used by generated code."),
848
+ layout: layoutConfigSchema.optional().describe("Generated project and source layout."),
849
+ serialization: serializationConfigSchema.optional().describe("Generated model serialization behavior."),
850
+ language: languageGenerationConfigSchema.optional().describe("Settings specific to the selected target language.")
799
851
  });
800
852
  var publishRegistrySchema = z.enum([
801
853
  "npm",
@@ -813,154 +865,160 @@ var credentialResolutionSchema = z.enum([
813
865
  "resolved-by-fiddle"
814
866
  ]);
815
867
  var registryCredentialsSchema = z.strictObject({
816
- username: nonEmptyStringSchema.optional(),
817
- password: nonEmptyStringSchema.optional(),
818
- token: nonEmptyStringSchema.optional(),
819
- apiKey: nonEmptyStringSchema.optional()
868
+ username: nonEmptyStringSchema.optional().describe("The resolved credential username."),
869
+ password: nonEmptyStringSchema.optional().describe("The resolved credential password."),
870
+ token: nonEmptyStringSchema.optional().describe("The resolved credential token."),
871
+ apiKey: nonEmptyStringSchema.optional().describe("The resolved credential API key.")
820
872
  });
821
873
  var commonPublishShape = {
822
- url: nonEmptyStringSchema.optional(),
874
+ url: nonEmptyStringSchema.optional().describe("A custom package registry URL."),
823
875
  /** Reference to registry publishing credentials. */
824
- credentialsRef: nonEmptyStringSchema.optional(),
876
+ credentialsRef: nonEmptyStringSchema.optional().describe("A reference to registry publishing credentials."),
825
877
  /** Raw registry credentials. These values can be sensitive and must be handled as secrets. */
826
- credentials: registryCredentialsSchema.optional(),
878
+ credentials: registryCredentialsSchema.optional().describe("Resolved registry publishing credentials."),
827
879
  /**
828
880
  * Registry-specific package version override. If omitted, the external publisher/orchestrator may
829
881
  * fall back to target.sdkVersion.
830
882
  */
831
- version: nonEmptyStringSchema.optional(),
832
- releaseBranch: nonEmptyStringSchema.optional(),
833
- tolerateRepublish: z.boolean().optional(),
883
+ version: nonEmptyStringSchema.optional().describe("A registry-specific package version override."),
884
+ releaseBranch: nonEmptyStringSchema.optional().describe("The branch used by generated package release workflows."),
885
+ tolerateRepublish: z.boolean().optional().describe("Whether publishing succeeds when this package version already exists."),
834
886
  /** Generate registry publishing workflow files when publishing through GitHub delivery. */
835
- shouldGeneratePublishWorkflow: z.boolean().optional()
887
+ shouldGeneratePublishWorkflow: z.boolean().optional().describe("Whether GitHub delivery includes a registry publishing workflow.")
836
888
  };
837
889
  var trustedPublishingShape = {
838
890
  /** Use registry trusted publishing / OIDC instead of a static token secret. */
839
- trustedPublishing: z.boolean().optional()
891
+ trustedPublishing: z.boolean().optional().describe("Whether registry publication uses trusted publishing or OIDC.")
840
892
  };
841
893
  var mavenCoordinateSchema = nonEmptyStringSchema.regex(
842
894
  /^[A-Za-z0-9_.-]+:[A-Za-z0-9_.-]+$/,
843
895
  "Maven coordinate must be in groupId:artifactId form"
844
896
  );
845
897
  var mavenSignatureEnvironmentSchema = z.strictObject({
846
- keyIdEnvironmentVariable: nonEmptyStringSchema.optional(),
847
- passwordEnvironmentVariable: nonEmptyStringSchema.optional(),
848
- secretKeyEnvironmentVariable: nonEmptyStringSchema.optional()
898
+ keyIdEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the signing key ID."),
899
+ passwordEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the signing key password."),
900
+ secretKeyEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the armored secret key.")
849
901
  });
850
902
  var mavenSignatureSchema = z.strictObject({
851
- keyId: nonEmptyStringSchema,
852
- password: nonEmptyStringSchema,
853
- secretKey: nonEmptyStringSchema
903
+ keyId: nonEmptyStringSchema.describe("The resolved signing key identifier."),
904
+ password: nonEmptyStringSchema.describe("The resolved signing key password."),
905
+ secretKey: nonEmptyStringSchema.describe("The resolved armored secret key.")
854
906
  });
855
907
  var publishConfigSchema = z.discriminatedUnion("registry", [
856
908
  z.strictObject({
857
- registry: z.literal("npm"),
909
+ registry: z.literal("npm").describe("Publishes the package to an npm-compatible registry."),
858
910
  /** Environment variable name containing the npm registry token. */
859
- tokenEnvironmentVariable: nonEmptyStringSchema.optional(),
911
+ tokenEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the npm registry token."),
860
912
  /** Write npm package metadata as private when the publisher creates/updates package.json. */
861
- isPackagePrivate: z.boolean().optional(),
913
+ isPackagePrivate: z.boolean().optional().describe("Whether generated npm package metadata marks the package as private."),
862
914
  /** Also publish the TypeScript package to JSR from the npm publishing path. */
863
- publishToJsr: z.boolean().optional(),
915
+ publishToJsr: z.boolean().optional().describe("Whether the npm publishing flow also publishes the package to JSR."),
864
916
  ...trustedPublishingShape,
865
917
  ...commonPublishShape
866
918
  }),
867
919
  z.strictObject({
868
- registry: z.literal("pypi"),
869
- usernameEnvironmentVariable: nonEmptyStringSchema.optional(),
870
- passwordEnvironmentVariable: nonEmptyStringSchema.optional(),
920
+ registry: z.literal("pypi").describe("Publishes the package to a PyPI-compatible registry."),
921
+ usernameEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the PyPI username."),
922
+ passwordEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the PyPI password or token."),
871
923
  ...trustedPublishingShape,
872
924
  ...commonPublishShape
873
925
  }),
874
926
  z.strictObject({
875
- registry: z.literal("nuget"),
876
- apiKeyEnvironmentVariable: nonEmptyStringSchema.optional(),
927
+ registry: z.literal("nuget").describe("Publishes the package to a NuGet-compatible registry."),
928
+ apiKeyEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the NuGet API key."),
877
929
  ...trustedPublishingShape,
878
930
  ...commonPublishShape
879
931
  }),
880
932
  z.strictObject({
881
- registry: z.literal("rubygems"),
882
- apiKeyEnvironmentVariable: nonEmptyStringSchema.optional(),
933
+ registry: z.literal("rubygems").describe("Publishes the package to a RubyGems-compatible registry."),
934
+ apiKeyEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the RubyGems API key."),
935
+ ...commonPublishShape
936
+ }),
937
+ z.strictObject({
938
+ registry: z.literal("crates").describe("Publishes the crate to a Cargo-compatible registry."),
939
+ tokenEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the Cargo registry token."),
940
+ ...commonPublishShape
941
+ }),
942
+ z.strictObject({
943
+ registry: z.literal("go").describe("Publishes the SDK as a Go module."),
883
944
  ...commonPublishShape
884
945
  }),
885
946
  z.strictObject({
886
- registry: z.literal("crates"),
887
- tokenEnvironmentVariable: nonEmptyStringSchema.optional(),
947
+ registry: z.literal("composer").describe("Publishes the package to a Composer-compatible registry."),
888
948
  ...commonPublishShape
889
949
  }),
890
- z.strictObject({ registry: z.literal("go"), ...commonPublishShape }),
891
- z.strictObject({ registry: z.literal("composer"), ...commonPublishShape }),
892
950
  z.strictObject({
893
- registry: z.literal("maven"),
951
+ registry: z.literal("maven").describe("Publishes the package to a Maven-compatible repository."),
894
952
  /** Maven coordinate in groupId:artifactId form when consumers need the combined value. */
895
- coordinate: mavenCoordinateSchema.optional(),
896
- usernameEnvironmentVariable: nonEmptyStringSchema.optional(),
897
- passwordEnvironmentVariable: nonEmptyStringSchema.optional(),
898
- mavenUrlEnvironmentVariable: nonEmptyStringSchema.optional(),
899
- signatureEnvironmentVariables: mavenSignatureEnvironmentSchema.optional(),
953
+ coordinate: mavenCoordinateSchema.optional().describe("The Maven coordinate in groupId:artifactId form."),
954
+ usernameEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the Maven username."),
955
+ passwordEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the Maven password."),
956
+ mavenUrlEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the Maven repository URL."),
957
+ signatureEnvironmentVariables: mavenSignatureEnvironmentSchema.optional().describe("Environment variables containing Maven signing material."),
900
958
  /** Reference to Maven signing credentials. */
901
- signingCredentialsRef: nonEmptyStringSchema.optional(),
959
+ signingCredentialsRef: nonEmptyStringSchema.optional().describe("A reference to Maven signing credentials."),
902
960
  /** Raw Maven signing material. These values can be sensitive and must be handled as secrets. */
903
- signature: mavenSignatureSchema.optional(),
961
+ signature: mavenSignatureSchema.optional().describe("Resolved Maven signing material."),
904
962
  ...commonPublishShape
905
963
  })
906
964
  ]);
907
965
  var reviewersSchema = z.strictObject({
908
- teams: z.array(nonEmptyStringSchema).optional(),
909
- users: z.array(nonEmptyStringSchema).optional()
966
+ teams: z.array(nonEmptyStringSchema).optional().describe("GitHub teams requested as reviewers."),
967
+ users: z.array(nonEmptyStringSchema).optional().describe("GitHub users requested as reviewers.")
910
968
  });
911
969
  var replayControlSchema = z.strictObject({
912
- enabled: z.boolean()
970
+ enabled: z.boolean().describe("Whether regeneration reapplies customer-authored repository changes.")
913
971
  });
914
972
  var githubLicenseSchema = z.strictObject({
915
973
  /** SPDX identifier or license key for the repository license (for example, "MIT"). */
916
- type: nonEmptyStringSchema.optional(),
974
+ type: nonEmptyStringSchema.optional().describe("The SPDX identifier or license key for the repository license."),
917
975
  /** Path to a custom license file to be committed into the GitHub repository. */
918
- customPath: nonEmptyStringSchema.optional()
976
+ customPath: nonEmptyStringSchema.optional().describe("The path to a custom license file committed to the repository.")
919
977
  }).refine((value) => value.type !== void 0 || value.customPath !== void 0, {
920
978
  message: "GitHub license must set type or customPath"
921
979
  });
922
980
  var githubOutputSchema = z.strictObject({
923
- repository: nonEmptyStringSchema,
924
- host: nonEmptyStringSchema.optional(),
925
- branch: nonEmptyStringSchema.optional(),
926
- mode: z.enum(["release", "pull-request", "push", "commit", "commit-and-release"]).optional(),
927
- reviewers: reviewersSchema.optional(),
981
+ repository: nonEmptyStringSchema.describe("The GitHub repository that receives generated files."),
982
+ host: nonEmptyStringSchema.optional().describe("The GitHub host for enterprise installations."),
983
+ branch: nonEmptyStringSchema.optional().describe("The target branch for generated changes."),
984
+ mode: z.enum(["release", "pull-request", "push", "commit", "commit-and-release"]).optional().describe("How generated changes are delivered to the repository."),
985
+ reviewers: reviewersSchema.optional().describe("Reviewers requested for generated pull requests."),
928
986
  /** Reference to GitHub credentials. */
929
- credentialsRef: nonEmptyStringSchema.optional(),
987
+ credentialsRef: nonEmptyStringSchema.optional().describe("A reference to GitHub credentials."),
930
988
  /** Raw GitHub credentials. These values can be sensitive and must be handled as secrets. */
931
- credentials: registryCredentialsSchema.optional(),
932
- privateRepository: z.boolean().optional(),
989
+ credentials: registryCredentialsSchema.optional().describe("Resolved GitHub credentials."),
990
+ privateRepository: z.boolean().optional().describe("Whether the destination repository is private."),
933
991
  /** GitHub license block scoped to repository delivery. */
934
- license: githubLicenseSchema.optional(),
992
+ license: githubLicenseSchema.optional().describe("License configuration for the destination repository."),
935
993
  /** GitHub replay control. If omitted, the external publisher applies its default behavior. */
936
- replay: replayControlSchema.optional(),
994
+ replay: replayControlSchema.optional().describe("Replay behavior for the external GitHub publisher."),
937
995
  /** Run GitHub publishing verification. Defaults to false to match current Fiddle job behavior. */
938
- verify: z.boolean().default(false),
996
+ verify: z.boolean().default(false).describe("Whether the GitHub publisher verifies the generated result."),
939
997
  /** Skip creating/updating a GitHub PR when no files changed. Defaults to false. */
940
- skipIfNoDiff: z.boolean().default(false),
998
+ skipIfNoDiff: z.boolean().default(false).describe("Whether GitHub publication is skipped when no generated files changed."),
941
999
  /** Automatically merge the GitHub publishing PR. Defaults to false. */
942
- autoMerge: z.boolean().default(false)
1000
+ autoMerge: z.boolean().default(false).describe("Whether the GitHub publisher automatically merges its pull request.")
943
1001
  });
944
1002
  var credentialResolutionShape = {
945
1003
  /** Where output credential references are resolved. */
946
- credentialResolution: credentialResolutionSchema.default("refs-only")
1004
+ credentialResolution: credentialResolutionSchema.default("refs-only").describe("Where output credential references are resolved.")
947
1005
  };
948
1006
  var filesOutputSchema = z.strictObject({
949
- delivery: z.literal("files"),
950
- path: nonEmptyStringSchema.optional(),
951
- publish: publishConfigSchema.optional(),
1007
+ delivery: z.literal("files").describe("Writes the generated SDK to a directory."),
1008
+ path: nonEmptyStringSchema.optional().describe("The destination directory for generated files."),
1009
+ publish: publishConfigSchema.optional().describe("Optional package registry publication."),
952
1010
  ...credentialResolutionShape
953
1011
  });
954
1012
  var zipOutputSchema = z.strictObject({
955
- delivery: z.literal("zip"),
956
- fileName: nonEmptyStringSchema.optional(),
957
- publish: publishConfigSchema.optional(),
1013
+ delivery: z.literal("zip").describe("Packages the generated SDK as a ZIP archive."),
1014
+ fileName: nonEmptyStringSchema.optional().describe("The generated ZIP archive file name."),
1015
+ publish: publishConfigSchema.optional().describe("Optional package registry publication."),
958
1016
  ...credentialResolutionShape
959
1017
  });
960
1018
  var githubDeliverySchema = z.strictObject({
961
- delivery: z.literal("github"),
962
- github: githubOutputSchema,
963
- publish: publishConfigSchema.optional(),
1019
+ delivery: z.literal("github").describe("Delivers the generated SDK to GitHub."),
1020
+ github: githubOutputSchema.describe("GitHub repository delivery settings."),
1021
+ publish: publishConfigSchema.optional().describe("Optional package registry publication."),
964
1022
  ...credentialResolutionShape
965
1023
  });
966
1024
  var outputConfigSchema = z.discriminatedUnion(
@@ -971,29 +1029,33 @@ var outputConfigSchema = z.discriminatedUnion(
971
1029
  }
972
1030
  );
973
1031
  var replayConfigSchema = z.strictObject({
974
- enabled: z.boolean()
1032
+ enabled: z.boolean().describe("Whether regeneration reapplies customer-authored repository changes.")
975
1033
  });
976
1034
  var apiImportSettingsSchema = z.strictObject({
977
- respectNullableSchemas: z.boolean().optional(),
978
- titleAsSchemaName: z.boolean().optional(),
979
- coerceEnumsToLiterals: z.boolean().optional(),
980
- idiomaticRequestNames: z.boolean().optional(),
981
- wrapReferencesToNullableInOptional: z.boolean().optional(),
982
- coerceOptionalSchemasToNullable: z.boolean().optional(),
983
- pathParameterOrder: z.enum(["url-order", "spec-order"]).optional(),
984
- onlyIncludeReferencedSchemas: z.boolean().optional(),
985
- objectQueryParameters: z.boolean().optional(),
986
- typeDatesAsStrings: z.boolean().optional(),
987
- groupMultiApiEnvironments: z.boolean().optional(),
988
- ignoreTags: z.boolean().optional(),
989
- disambiguateRequestNames: z.boolean().optional(),
990
- respectReadonlySchemas: z.boolean().optional(),
991
- discriminatedUnionV2: z.boolean().optional(),
992
- undiscriminatedUnionsWithLiterals: z.boolean().optional(),
993
- inlineAllOfSchemas: z.boolean().optional(),
994
- resolveSchemaCollisions: z.boolean().optional(),
995
- asyncApiMessageNaming: z.enum(["v1", "v2"]).optional(),
996
- defaultIntegerFormat: z.enum(["int32", "int64", "uint32", "uint64"]).optional()
1035
+ respectNullableSchemas: z.boolean().optional().describe("Whether nullable schemas remain nullable in generated types."),
1036
+ titleAsSchemaName: z.boolean().optional().describe("Whether a schema title can determine the generated type name."),
1037
+ coerceEnumsToLiterals: z.boolean().optional().describe("Whether single-value enums are imported as literal values."),
1038
+ idiomaticRequestNames: z.boolean().optional().describe("Whether request types use concise, idiomatic generated names."),
1039
+ wrapReferencesToNullableInOptional: z.boolean().optional().describe("Whether nullable schema references are also treated as optional."),
1040
+ coerceOptionalSchemasToNullable: z.boolean().optional().describe("Whether optional properties are represented as nullable required properties."),
1041
+ pathParameterOrder: z.enum(["url-order", "spec-order"]).optional().describe("Whether path parameters follow their URL order or specification order."),
1042
+ onlyIncludeReferencedSchemas: z.boolean().optional().describe("Whether unreferenced schemas are omitted from the generated SDK."),
1043
+ objectQueryParameters: z.boolean().optional().describe("Whether object-valued query parameters are preserved as objects."),
1044
+ typeDatesAsStrings: z.boolean().optional().describe("Whether date and date-time schemas are generated as strings."),
1045
+ groupMultiApiEnvironments: z.boolean().optional().describe(
1046
+ "Whether environments from multiple API sources are merged into shared named groups."
1047
+ ),
1048
+ ignoreTags: z.boolean().optional().describe("Whether API tags are ignored when organizing generated resources."),
1049
+ disambiguateRequestNames: z.boolean().optional().describe("Whether colliding request type names are automatically disambiguated."),
1050
+ respectReadonlySchemas: z.boolean().optional().describe(
1051
+ "Whether read-only properties are modeled separately for request and response types."
1052
+ ),
1053
+ discriminatedUnionV2: z.boolean().optional().describe("Whether oneOf and anyOf schemas use the newer discriminator inference rules."),
1054
+ undiscriminatedUnionsWithLiterals: z.boolean().optional().describe("Whether literal-bearing unions remain undiscriminated during import."),
1055
+ inlineAllOfSchemas: z.boolean().optional().describe("Whether schemas composed with allOf are inlined when possible."),
1056
+ resolveSchemaCollisions: z.boolean().optional().describe("Whether colliding imported schema names are resolved automatically."),
1057
+ asyncApiMessageNaming: z.enum(["v1", "v2"]).optional().describe("The naming strategy used for messages imported from AsyncAPI."),
1058
+ defaultIntegerFormat: z.enum(["int32", "int64", "uint32", "uint64"]).optional().describe("The integer format used when a schema does not declare one.")
997
1059
  });
998
1060
  var sourceSpecTypeSchema = z.enum([
999
1061
  "openapi",
@@ -1005,18 +1067,20 @@ var sourceSpecTypeSchema = z.enum([
1005
1067
 
1006
1068
  // src/sdk-config-ir/v1/source.ts
1007
1069
  var sourceSpecConfigSchema = z.strictObject({
1008
- id: nonEmptyStringSchema.optional(),
1009
- name: nonEmptyStringSchema.optional(),
1010
- namespace: nonEmptyStringSchema.optional(),
1011
- specUrl: nonEmptyStringSchema,
1012
- specType: sourceSpecTypeSchema,
1013
- apiImportSettings: apiImportSettingsSchema.optional(),
1014
- overlays: z.array(nonEmptyStringSchema).optional(),
1015
- overrides: z.array(nonEmptyStringSchema).optional()
1070
+ id: nonEmptyStringSchema.optional().describe("A unique identifier for this API source."),
1071
+ name: nonEmptyStringSchema.optional().describe("A human-readable name for this API source."),
1072
+ namespace: nonEmptyStringSchema.optional().describe("A namespace used to isolate this source in a multi-source SDK."),
1073
+ specUrl: nonEmptyStringSchema.describe(
1074
+ "The materialized URL from which the generator retrieves the API source."
1075
+ ),
1076
+ specType: sourceSpecTypeSchema.describe("The API description format of this source."),
1077
+ apiImportSettings: apiImportSettingsSchema.optional().describe("Import behavior that overrides the source-level defaults for this spec."),
1078
+ overlays: z.array(nonEmptyStringSchema).optional().describe("Materialized overlays applied to this source in order."),
1079
+ overrides: z.array(nonEmptyStringSchema).optional().describe("Materialized source overrides applied in order.")
1016
1080
  });
1017
1081
  var sourceConfigSchema = z.strictObject({
1018
- specs: z.array(sourceSpecConfigSchema).min(1, "source.specs must contain at least one source spec"),
1019
- apiImportSettings: apiImportSettingsSchema.optional()
1082
+ specs: z.array(sourceSpecConfigSchema).min(1, "source.specs must contain at least one source spec").describe("Materialized API sources in authoritative processing order."),
1083
+ apiImportSettings: apiImportSettingsSchema.optional().describe("Default import behavior shared by every source spec.")
1020
1084
  }).superRefine(({ specs }, context) => {
1021
1085
  const seenIds = /* @__PURE__ */ new Set();
1022
1086
  specs.forEach(({ id }, index) => {
@@ -1048,25 +1112,27 @@ var targetLanguageSchema = z.enum([
1048
1112
  "terraform"
1049
1113
  ]);
1050
1114
  var targetConfigSchema = z.strictObject({
1051
- language: targetLanguageSchema,
1052
- generatorVersion: exactSemverSchema.optional(),
1053
- sourceOrigin: z.enum(["postman", "fern"]),
1054
- sdkName: nonEmptyStringSchema,
1115
+ language: targetLanguageSchema.describe(
1116
+ "The language or platform generated by this single-target request."
1117
+ ),
1118
+ generatorVersion: exactSemverSchema.optional().describe("The exact generator version requested for this target."),
1119
+ sourceOrigin: z.enum(["postman", "fern"]).describe("The configuration system from which this IR was normalized."),
1120
+ sdkName: nonEmptyStringSchema.describe("The name used for the generated SDK."),
1055
1121
  /**
1056
1122
  * Stable Fern/Fiddle API identity for external publishing.
1057
1123
  * Producers must set this explicitly for GitHub or registry publishing; it is not inferred from
1058
1124
  * target.sdkName because SDK display names and Fern API names are not equivalent.
1059
1125
  */
1060
- apiName: nonEmptyStringSchema.optional(),
1061
- organization: nonEmptyStringSchema.optional(),
1126
+ apiName: nonEmptyStringSchema.optional().describe("The stable API identity used for external publishing."),
1127
+ organization: nonEmptyStringSchema.optional().describe("Source organization metadata retained for generation."),
1062
1128
  /**
1063
1129
  * Stable Fern/Fiddle organization identity for external publishing.
1064
1130
  * Producers must set this explicitly for GitHub or registry publishing; it is not inferred from
1065
1131
  * target.organization because source organization metadata is optional and may not match Fern.
1066
1132
  */
1067
- organizationName: nonEmptyStringSchema.optional(),
1068
- sdkVersion: nonEmptyStringSchema.default("1.0.0"),
1069
- apiVersion: nonEmptyStringSchema.optional()
1133
+ organizationName: nonEmptyStringSchema.optional().describe("The stable organization identity used for external publishing."),
1134
+ sdkVersion: nonEmptyStringSchema.default("1.0.0").describe("The version of the generated SDK."),
1135
+ apiVersion: nonEmptyStringSchema.optional().describe("The version of the API represented by the SDK.")
1070
1136
  });
1071
1137
 
1072
1138
  // src/sdk-config-ir/v1/sdk-config-ir-v1.ts
@@ -1128,17 +1194,21 @@ function validatePublishingIdentity(packageConfig, registry, context) {
1128
1194
  }
1129
1195
  }
1130
1196
  var sdkConfigIrV1Schema = z.strictObject({
1131
- schemaVersion: z.literal(SDK_CONFIG_IR_V1_SCHEMA_VERSION),
1132
- source: sourceConfigSchema,
1133
- target: targetConfigSchema,
1134
- api: apiConfigSchema,
1135
- client: clientConfigSchema,
1136
- package: packageConfigSchema,
1137
- output: outputConfigSchema,
1138
- replay: replayConfigSchema.optional(),
1139
- docs: docsConfigSchema,
1140
- generation: generationConfigSchema,
1141
- compatibility: compatibilityConfigSchema.optional()
1197
+ schemaVersion: z.literal(SDK_CONFIG_IR_V1_SCHEMA_VERSION).describe("The version of the normalized SDK Config IR schema."),
1198
+ source: sourceConfigSchema.describe("Materialized API descriptions consumed by generation."),
1199
+ target: targetConfigSchema.describe(
1200
+ "Identity and provenance for this single generation target."
1201
+ ),
1202
+ api: apiConfigSchema.describe("API behavior exposed by the generated SDK."),
1203
+ client: clientConfigSchema.describe("Behavior of the generated API client."),
1204
+ package: packageConfigSchema.describe("Package identity and metadata for the generated SDK."),
1205
+ output: outputConfigSchema.describe("Artifact delivery and optional package publication."),
1206
+ replay: replayConfigSchema.optional().describe("Generation replay behavior."),
1207
+ docs: docsConfigSchema.describe("Generated documentation settings."),
1208
+ generation: generationConfigSchema.describe(
1209
+ "Shared and language-specific generation behavior."
1210
+ ),
1211
+ compatibility: compatibilityConfigSchema.optional().describe("Temporary provenance and diagnostics retained during legacy migration.")
1142
1212
  }).superRefine(({ compatibility, generation, output, package: packageConfig, target }, context) => {
1143
1213
  const configuredLanguages = Object.keys(generation.language ?? {});
1144
1214
  const requiresExternalPublishIdentity = output.delivery === "github" || output.publish !== void 0;