@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
package/dist/index.cjs CHANGED
@@ -38,140 +38,152 @@ var hashAlgorithmSchema = zod.z.enum(["sha1", "sha256", "sha384", "sha512"]);
38
38
  var encodingSchema = zod.z.enum(["base64", "hex"]);
39
39
  var payloadComponentSchema = zod.z.enum(["body", "timestamp", "notification-url", "message-id"]);
40
40
  var payloadFormatSchema = zod.z.strictObject({
41
- components: zod.z.array(payloadComponentSchema).min(1),
42
- delimiter: zod.z.string().optional(),
41
+ components: zod.z.array(payloadComponentSchema).min(1).describe("Payload components concatenated in declaration order before signing."),
42
+ delimiter: zod.z.string().optional().describe("The delimiter inserted between payload components."),
43
43
  /**
44
44
  * Set when the body is a form-encoded parameter map that must be canonicalized before signing:
45
45
  * keys sorted, each key's values deduped and sorted, concatenated as key-value pairs.
46
46
  */
47
- bodySort: zod.z.literal("alphabetical").optional()
47
+ bodySort: zod.z.literal("alphabetical").optional().describe("Canonicalizes form body keys and values alphabetically before signing.")
48
48
  });
49
49
  var timestampSchema = zod.z.strictObject({
50
- header: nonEmptyStringSchema,
51
- format: zod.z.enum(["unix-seconds", "unix-millis", "iso8601"]).optional(),
50
+ header: nonEmptyStringSchema.describe("The request header containing the signing timestamp."),
51
+ format: zod.z.enum(["unix-seconds", "unix-millis", "iso8601"]).optional().describe("The timestamp format used in the signature payload."),
52
52
  /** Replay window in seconds. */
53
- tolerance: zod.z.number().positive().optional()
53
+ tolerance: zod.z.number().positive().optional().describe("The maximum accepted timestamp age, in seconds.")
54
54
  });
55
55
  var bodyHashLocationSchema = zod.z.discriminatedUnion("type", [
56
56
  zod.z.strictObject({
57
- type: zod.z.literal("query-parameter"),
58
- name: nonEmptyStringSchema
57
+ type: zod.z.literal("query-parameter").describe("Reads the body hash from a query parameter."),
58
+ name: nonEmptyStringSchema.describe("The query parameter containing the body hash.")
59
59
  })
60
60
  ]);
61
61
  var bodyHashBindingSchema = zod.z.strictObject({
62
- algorithm: hashAlgorithmSchema,
63
- encoding: encodingSchema.optional(),
64
- location: bodyHashLocationSchema
62
+ algorithm: hashAlgorithmSchema.describe("The hash algorithm applied to the raw request body."),
63
+ encoding: encodingSchema.optional().describe("The encoding used for the body hash."),
64
+ location: bodyHashLocationSchema.describe("Where the expected body hash is read from.")
65
65
  });
66
66
  var urlNormalizationSchema = zod.z.strictObject({
67
67
  /** Try the URL with and without an explicit default port. */
68
- portVariants: zod.z.boolean().optional(),
68
+ portVariants: zod.z.boolean().optional().describe("Whether verification tries URLs with and without an explicit default port."),
69
69
  /** Try the URL with the pre-RFC3986 query encoding (`+` for space, unescaped `*`). */
70
- legacyQueryEncoding: zod.z.boolean().optional()
70
+ legacyQueryEncoding: zod.z.boolean().optional().describe("Whether verification also tries legacy form-style query encoding.")
71
71
  }).refine(
72
72
  ({ portVariants, legacyQueryEncoding }) => portVariants === true || legacyQueryEncoding === true,
73
73
  { message: "url normalization must enable at least one variant" }
74
74
  );
75
75
  var webhookSignatureSchema = zod.z.discriminatedUnion("type", [
76
76
  zod.z.strictObject({
77
- type: zod.z.literal("hmac"),
77
+ type: zod.z.literal("hmac").describe("Identifies HMAC webhook signature verification."),
78
78
  /** Request header carrying the signature. */
79
- header: nonEmptyStringSchema,
80
- algorithm: hashAlgorithmSchema.optional(),
81
- encoding: encodingSchema.optional(),
79
+ header: nonEmptyStringSchema.describe("The request header containing the signature."),
80
+ algorithm: hashAlgorithmSchema.optional().describe("The HMAC hash algorithm."),
81
+ encoding: encodingSchema.optional().describe("The encoding used for the HMAC signature."),
82
82
  /** Stripped from the header value before comparison, e.g. `sha256=`. */
83
- signaturePrefix: zod.z.string().optional(),
84
- payloadFormat: payloadFormatSchema.optional(),
85
- timestamp: timestampSchema.optional(),
86
- bodyHashBinding: bodyHashBindingSchema.optional(),
87
- urlNormalization: urlNormalizationSchema.optional()
83
+ signaturePrefix: zod.z.string().optional().describe("A prefix removed from the signature header before comparison."),
84
+ payloadFormat: payloadFormatSchema.optional().describe("How the payload signed by the provider is assembled."),
85
+ timestamp: timestampSchema.optional().describe("Timestamp validation included in signature verification."),
86
+ bodyHashBinding: bodyHashBindingSchema.optional().describe("A separately transmitted hash that binds the raw body to the signed payload."),
87
+ urlNormalization: urlNormalizationSchema.optional().describe("Alternate notification URL forms accepted during verification.")
88
88
  })
89
89
  ]);
90
90
 
91
91
  // src/sdk-config-domain/v1/api.ts
92
92
  var authVariableSchema = zod.z.strictObject({
93
- name: nonEmptyStringSchema.optional(),
94
- environmentVariable: nonEmptyStringSchema.optional(),
95
- description: zod.z.string().optional(),
96
- omit: zod.z.boolean().optional()
93
+ name: nonEmptyStringSchema.optional().describe("The parameter name exposed by the SDK."),
94
+ environmentVariable: nonEmptyStringSchema.optional().describe("The environment variable used to populate the parameter."),
95
+ description: zod.z.string().optional().describe(
96
+ "A description of the authentication parameter included in generated SDK documentation."
97
+ ),
98
+ omit: zod.z.boolean().optional().describe("Whether the parameter is omitted from the SDK surface.")
97
99
  });
98
100
  var apiKeyAuthSchema = zod.z.strictObject({
99
- id: nonEmptyStringSchema,
100
- type: zod.z.literal("api-key"),
101
- location: zod.z.enum(["header", "query", "cookie"]),
102
- name: nonEmptyStringSchema,
103
- prefix: nonEmptyStringSchema.optional(),
104
- environmentVariable: nonEmptyStringSchema.optional(),
105
- description: zod.z.string().optional()
101
+ id: nonEmptyStringSchema.describe("A unique identifier for this authentication scheme."),
102
+ type: zod.z.literal("api-key").describe("Identifies an API key authentication scheme."),
103
+ location: zod.z.enum(["header", "query", "cookie"]).describe("Where the API key is sent on requests."),
104
+ name: nonEmptyStringSchema.describe("The header, query parameter, or cookie name."),
105
+ prefix: nonEmptyStringSchema.optional().describe("A prefix added before the API key value."),
106
+ environmentVariable: nonEmptyStringSchema.optional().describe("The default environment variable for the API key."),
107
+ description: zod.z.string().optional().describe(
108
+ "A description of the authentication scheme included in generated SDK documentation."
109
+ )
106
110
  });
107
111
  var bearerAuthSchema = zod.z.strictObject({
108
- id: nonEmptyStringSchema,
109
- type: zod.z.literal("bearer"),
110
- header: nonEmptyStringSchema.optional(),
111
- prefix: nonEmptyStringSchema.optional(),
112
- environmentVariable: nonEmptyStringSchema.optional(),
113
- description: zod.z.string().optional()
112
+ id: nonEmptyStringSchema.describe("A unique identifier for this authentication scheme."),
113
+ type: zod.z.literal("bearer").describe("Identifies a bearer token authentication scheme."),
114
+ header: nonEmptyStringSchema.optional().describe("The request header that carries the bearer token."),
115
+ prefix: nonEmptyStringSchema.optional().describe('The token prefix, such as "Bearer".'),
116
+ environmentVariable: nonEmptyStringSchema.optional().describe("The default environment variable for the bearer token."),
117
+ description: zod.z.string().optional().describe(
118
+ "A description of the authentication scheme included in generated SDK documentation."
119
+ )
114
120
  });
115
121
  var basicAuthSchema = zod.z.strictObject({
116
- id: nonEmptyStringSchema,
117
- type: zod.z.literal("basic"),
118
- username: authVariableSchema.optional(),
119
- password: authVariableSchema.optional(),
120
- description: zod.z.string().optional()
122
+ id: nonEmptyStringSchema.describe("A unique identifier for this authentication scheme."),
123
+ type: zod.z.literal("basic").describe("Identifies an HTTP Basic authentication scheme."),
124
+ username: authVariableSchema.optional().describe("The username parameter exposed by the SDK."),
125
+ password: authVariableSchema.optional().describe("The password parameter exposed by the SDK."),
126
+ description: zod.z.string().optional().describe(
127
+ "A description of the authentication scheme included in generated SDK documentation."
128
+ )
121
129
  });
122
130
  var oauthScopeSchema = zod.z.strictObject({
123
- name: nonEmptyStringSchema,
124
- description: zod.z.string().optional()
131
+ name: nonEmptyStringSchema.describe("The OAuth scope value requested from the provider."),
132
+ description: zod.z.string().optional().describe("A description of the OAuth scope included in generated SDK documentation.")
125
133
  });
126
134
  var oauthFlowSchema = zod.z.discriminatedUnion("type", [
127
135
  zod.z.strictObject({
128
- type: zod.z.literal("authorization-code"),
129
- authorizationUrl: nonEmptyStringSchema,
130
- tokenUrl: nonEmptyStringSchema,
131
- refreshUrl: nonEmptyStringSchema.optional(),
132
- scopes: zod.z.array(oauthScopeSchema).optional()
136
+ type: zod.z.literal("authorization-code").describe("Uses the OAuth authorization code flow."),
137
+ authorizationUrl: nonEmptyStringSchema.describe("The URL used to authorize the client."),
138
+ tokenUrl: nonEmptyStringSchema.describe("The URL used to exchange a code for tokens."),
139
+ refreshUrl: nonEmptyStringSchema.optional().describe("The URL used to refresh access tokens."),
140
+ scopes: zod.z.array(oauthScopeSchema).optional().describe("The scopes supported by this flow.")
133
141
  }),
134
142
  zod.z.strictObject({
135
- type: zod.z.literal("client-credentials"),
136
- tokenUrl: nonEmptyStringSchema,
137
- refreshUrl: nonEmptyStringSchema.optional(),
138
- scopes: zod.z.array(oauthScopeSchema).optional()
143
+ type: zod.z.literal("client-credentials").describe("Uses the OAuth client credentials flow."),
144
+ tokenUrl: nonEmptyStringSchema.describe("The URL used to obtain access tokens."),
145
+ refreshUrl: nonEmptyStringSchema.optional().describe("The URL used to refresh access tokens."),
146
+ scopes: zod.z.array(oauthScopeSchema).optional().describe("The scopes supported by this flow.")
139
147
  }),
140
148
  zod.z.strictObject({
141
- type: zod.z.literal("implicit"),
142
- authorizationUrl: nonEmptyStringSchema,
143
- refreshUrl: nonEmptyStringSchema.optional(),
144
- scopes: zod.z.array(oauthScopeSchema).optional()
149
+ type: zod.z.literal("implicit").describe("Uses the OAuth implicit flow."),
150
+ authorizationUrl: nonEmptyStringSchema.describe("The URL used to authorize the client."),
151
+ refreshUrl: nonEmptyStringSchema.optional().describe("The URL used to refresh access tokens."),
152
+ scopes: zod.z.array(oauthScopeSchema).optional().describe("The scopes supported by this flow.")
145
153
  }),
146
154
  zod.z.strictObject({
147
- type: zod.z.literal("password"),
148
- tokenUrl: nonEmptyStringSchema,
149
- refreshUrl: nonEmptyStringSchema.optional(),
150
- scopes: zod.z.array(oauthScopeSchema).optional()
155
+ type: zod.z.literal("password").describe("Uses the OAuth resource owner password flow."),
156
+ tokenUrl: nonEmptyStringSchema.describe("The URL used to obtain access tokens."),
157
+ refreshUrl: nonEmptyStringSchema.optional().describe("The URL used to refresh access tokens."),
158
+ scopes: zod.z.array(oauthScopeSchema).optional().describe("The scopes supported by this flow.")
151
159
  })
152
160
  ]);
153
161
  var oauth2AuthSchema = zod.z.strictObject({
154
- id: nonEmptyStringSchema,
155
- type: zod.z.literal("oauth2"),
156
- flows: zod.z.array(oauthFlowSchema).min(1),
157
- clientId: authVariableSchema.optional(),
158
- clientSecret: authVariableSchema.optional(),
159
- tokenHeader: nonEmptyStringSchema.optional(),
160
- tokenPrefix: nonEmptyStringSchema.optional(),
161
- refreshBufferSeconds: zod.z.number().nonnegative().optional(),
162
- description: zod.z.string().optional()
162
+ id: nonEmptyStringSchema.describe("A unique identifier for this authentication scheme."),
163
+ type: zod.z.literal("oauth2").describe("Identifies an OAuth 2.0 authentication scheme."),
164
+ flows: zod.z.array(oauthFlowSchema).min(1).describe("The OAuth flows supported by the API."),
165
+ clientId: authVariableSchema.optional().describe("The OAuth client ID parameter exposed by the SDK."),
166
+ clientSecret: authVariableSchema.optional().describe("The OAuth client secret parameter exposed by the SDK."),
167
+ tokenHeader: nonEmptyStringSchema.optional().describe("The request header that carries the OAuth access token."),
168
+ tokenPrefix: nonEmptyStringSchema.optional().describe("The prefix added before the OAuth access token."),
169
+ refreshBufferSeconds: zod.z.number().nonnegative().optional().describe("How early, in seconds, the client refreshes a token before it expires."),
170
+ description: zod.z.string().optional().describe(
171
+ "A description of the authentication scheme included in generated SDK documentation."
172
+ )
163
173
  });
164
174
  var customAuthParameterSchema = zod.z.strictObject({
165
- location: zod.z.enum(["header", "query", "cookie"]),
166
- name: nonEmptyStringSchema,
167
- prefix: nonEmptyStringSchema.optional(),
168
- environmentVariable: nonEmptyStringSchema.optional()
175
+ location: zod.z.enum(["header", "query", "cookie"]).describe("Where the custom authentication value is sent."),
176
+ name: nonEmptyStringSchema.describe("The header, query parameter, or cookie name."),
177
+ prefix: nonEmptyStringSchema.optional().describe("A prefix added before the parameter value."),
178
+ environmentVariable: nonEmptyStringSchema.optional().describe("The default environment variable for the parameter.")
169
179
  });
170
180
  var customAuthSchema = zod.z.strictObject({
171
- id: nonEmptyStringSchema,
172
- type: zod.z.literal("custom"),
173
- parameters: zod.z.array(customAuthParameterSchema).min(1),
174
- description: zod.z.string().optional()
181
+ id: nonEmptyStringSchema.describe("A unique identifier for this authentication scheme."),
182
+ type: zod.z.literal("custom").describe("Identifies a custom authentication scheme."),
183
+ parameters: zod.z.array(customAuthParameterSchema).min(1).describe("The request parameters that implement the custom scheme."),
184
+ description: zod.z.string().optional().describe(
185
+ "A description of the authentication scheme included in generated SDK documentation."
186
+ )
175
187
  });
176
188
  var authSchemeSchema = zod.z.discriminatedUnion("type", [
177
189
  apiKeyAuthSchema,
@@ -181,12 +193,12 @@ var authSchemeSchema = zod.z.discriminatedUnion("type", [
181
193
  customAuthSchema
182
194
  ]);
183
195
  var authRequirementSchema = zod.z.strictObject({
184
- schemes: zod.z.array(nonEmptyStringSchema).min(1)
196
+ schemes: zod.z.array(nonEmptyStringSchema).min(1).describe("Scheme identifiers that must be satisfied together.")
185
197
  });
186
198
  var authConfigSchema = zod.z.strictObject({
187
- schemes: zod.z.array(authSchemeSchema).min(1),
188
- requirements: zod.z.array(authRequirementSchema).optional(),
189
- endpointSecurity: zod.z.boolean().optional()
199
+ schemes: zod.z.array(authSchemeSchema).min(1).describe("Authentication schemes offered by the API."),
200
+ requirements: zod.z.array(authRequirementSchema).optional().describe("Valid combinations of authentication schemes."),
201
+ endpointSecurity: zod.z.boolean().optional().describe("Whether generated endpoints expose their individual security requirements.")
190
202
  }).superRefine(({ requirements, schemes }, context) => {
191
203
  const schemeIds = /* @__PURE__ */ new Set();
192
204
  schemes.forEach(({ id }, index) => {
@@ -212,45 +224,45 @@ var authConfigSchema = zod.z.strictObject({
212
224
  });
213
225
  });
214
226
  var environmentUrlSchema = zod.z.strictObject({
215
- name: nonEmptyStringSchema,
216
- url: nonEmptyStringSchema,
217
- serverName: nonEmptyStringSchema.optional()
227
+ name: nonEmptyStringSchema.describe("The display name for this environment URL."),
228
+ url: nonEmptyStringSchema.describe("The base URL used for this environment entry."),
229
+ serverName: nonEmptyStringSchema.optional().describe("The source server represented by this URL.")
218
230
  });
219
231
  var environmentSchema = zod.z.strictObject({
220
- name: nonEmptyStringSchema,
221
- urls: zod.z.array(environmentUrlSchema).min(1),
222
- description: zod.z.string().optional()
232
+ name: nonEmptyStringSchema.describe("The environment name exposed by the SDK."),
233
+ urls: zod.z.array(environmentUrlSchema).min(1).describe("The base URLs available in this environment."),
234
+ description: zod.z.string().optional().describe("A description of the environment included in generated SDK documentation.")
223
235
  });
224
236
  var headerSchema = zod.z.strictObject({
225
- name: nonEmptyStringSchema,
226
- value: zod.z.string().optional(),
227
- description: zod.z.string().optional(),
228
- environmentVariable: nonEmptyStringSchema.optional()
237
+ name: nonEmptyStringSchema.describe("The HTTP header name."),
238
+ value: zod.z.string().optional().describe("A fixed value for the generated header."),
239
+ description: zod.z.string().optional().describe("A description of the header included in generated SDK documentation."),
240
+ environmentVariable: nonEmptyStringSchema.optional().describe("The environment variable used to populate the header.")
229
241
  });
230
242
  var environmentVariableSchema = zod.z.strictObject({
231
- name: nonEmptyStringSchema,
232
- description: zod.z.string().optional(),
233
- defaultValue: zod.z.string().optional()
243
+ name: nonEmptyStringSchema.describe("The environment variable name exposed by the SDK."),
244
+ description: zod.z.string().optional().describe("A description of the environment variable included in generated SDK documentation."),
245
+ defaultValue: zod.z.string().optional().describe("The default value used when the variable is unset.")
234
246
  });
235
247
  var apiConfigSchema = zod.z.strictObject({
236
- baseUrl: zod.z.string().default(""),
237
- environments: zod.z.array(environmentSchema).default([]),
238
- environmentVariables: zod.z.array(environmentVariableSchema).default([]),
239
- defaultEnvironment: nonEmptyStringSchema.optional(),
240
- auth: authConfigSchema.optional(),
241
- headers: zod.z.array(headerSchema).optional(),
248
+ baseUrl: zod.z.string().default("").describe("The default base URL used by the generated client."),
249
+ environments: zod.z.array(environmentSchema).default([]).describe("Named API environments and their base URLs."),
250
+ environmentVariables: zod.z.array(environmentVariableSchema).default([]).describe("Environment variables exposed through generated client configuration."),
251
+ defaultEnvironment: nonEmptyStringSchema.optional().describe("The environment selected when a caller does not choose one."),
252
+ auth: authConfigSchema.optional().describe("Authentication supported by the API."),
253
+ headers: zod.z.array(headerSchema).optional().describe("Headers added to generated API requests."),
242
254
  /**
243
255
  * Selects the named `x-fern-audiences`.
244
256
  *
245
257
  * Absent means all audiences. A present empty array selects no tagged audience: untagged nodes
246
258
  * remain included, while every audience-tagged node is excluded.
247
259
  */
248
- audiences: zod.z.array(nonEmptyStringSchema).optional(),
260
+ audiences: zod.z.array(nonEmptyStringSchema).optional().describe("Named API audiences included in the generated SDK."),
249
261
  /**
250
262
  * How the API signs the webhooks it sends, enabling a generated verification helper. API-wide, and
251
263
  * independent of whether any webhook is modeled — see {@link webhookSignatureSchema}.
252
264
  */
253
- webhookSignature: webhookSignatureSchema.optional()
265
+ webhookSignature: webhookSignatureSchema.optional().describe("How generated helpers verify webhook signatures from the API.")
254
266
  });
255
267
 
256
268
  // src/sdk-config/v1/api.ts
@@ -259,16 +271,16 @@ var sdkConfigV1AuthConfigSchema = authConfigSchema;
259
271
  var sdkConfigV1ApiConfigSchema = apiConfigSchema;
260
272
  var sdkConfigV1WebhookSignatureSchema = webhookSignatureSchema;
261
273
  var retryOverrideShape = {
262
- enabled: zod.z.boolean().optional(),
263
- maxAttempts: zod.z.number().int().min(1).optional(),
264
- retryDelayMs: zod.z.number().nonnegative().optional(),
265
- maxDelayMs: zod.z.number().nonnegative().optional(),
266
- jitterMs: zod.z.number().nonnegative().optional(),
267
- backoffFactor: zod.z.number().positive().optional(),
268
- statusCodes: zod.z.array(zod.z.number().int().min(100).max(599)).optional(),
269
- methods: zod.z.array(nonEmptyStringSchema).optional(),
270
- statusCodeProfile: zod.z.enum(["legacy", "recommended"]).optional(),
271
- maxRetryAfterDelayMs: zod.z.number().nonnegative().optional()
274
+ enabled: zod.z.boolean().optional().describe("Whether the generated client retries failed requests."),
275
+ maxAttempts: zod.z.number().int().min(1).optional().describe("The maximum total request attempts, including the initial attempt."),
276
+ retryDelayMs: zod.z.number().nonnegative().optional().describe("The initial delay between retry attempts, in milliseconds."),
277
+ maxDelayMs: zod.z.number().nonnegative().optional().describe("The maximum backoff delay between attempts, in milliseconds."),
278
+ jitterMs: zod.z.number().nonnegative().optional().describe("The maximum random jitter added to retry delays, in milliseconds."),
279
+ backoffFactor: zod.z.number().positive().optional().describe("The multiplier applied to the delay after each failed attempt."),
280
+ statusCodes: zod.z.array(zod.z.number().int().min(100).max(599)).optional().describe("HTTP status codes that are eligible for retries."),
281
+ methods: zod.z.array(nonEmptyStringSchema).optional().describe("HTTP methods that are eligible for retries."),
282
+ statusCodeProfile: zod.z.enum(["legacy", "recommended"]).optional().describe("The built-in retryable status-code policy."),
283
+ maxRetryAfterDelayMs: zod.z.number().nonnegative().optional().describe("The longest Retry-After delay the client will honor, in milliseconds.")
272
284
  };
273
285
  function validateRetryDelays({
274
286
  maxDelayMs,
@@ -285,27 +297,29 @@ function validateRetryDelays({
285
297
  var clientRetryOverrideSchema = zod.z.strictObject(retryOverrideShape).superRefine(validateRetryDelays);
286
298
  var retryConfigSchema = zod.z.strictObject({
287
299
  ...retryOverrideShape,
288
- enabled: zod.z.boolean().default(true),
289
- maxAttempts: zod.z.number().int().min(1).default(3),
290
- retryDelayMs: zod.z.number().nonnegative().default(150),
291
- maxDelayMs: zod.z.number().nonnegative().default(5e3),
292
- jitterMs: zod.z.number().nonnegative().default(50),
293
- backoffFactor: zod.z.number().positive().default(2),
294
- methods: zod.z.array(nonEmptyStringSchema).default(["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"]),
295
- maxRetryAfterDelayMs: zod.z.number().nonnegative().default(6e4)
300
+ enabled: zod.z.boolean().default(true).describe("Whether the generated client retries failed requests."),
301
+ maxAttempts: zod.z.number().int().min(1).default(3).describe("The maximum total request attempts, including the initial attempt."),
302
+ retryDelayMs: zod.z.number().nonnegative().default(150).describe("The initial delay between retry attempts, in milliseconds."),
303
+ maxDelayMs: zod.z.number().nonnegative().default(5e3).describe("The maximum backoff delay between attempts, in milliseconds."),
304
+ jitterMs: zod.z.number().nonnegative().default(50).describe("The maximum random jitter added to retry delays, in milliseconds."),
305
+ backoffFactor: zod.z.number().positive().default(2).describe("The multiplier applied to the delay after each failed attempt."),
306
+ methods: zod.z.array(nonEmptyStringSchema).default(["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"]).describe("HTTP methods that are eligible for retries."),
307
+ maxRetryAfterDelayMs: zod.z.number().nonnegative().default(6e4).describe("The longest Retry-After delay the client will honor, in milliseconds.")
296
308
  }).superRefine(validateRetryDelays);
297
309
  var constructorParameterSchema = zod.z.strictObject({
298
- name: nonEmptyStringSchema,
299
- example: zod.z.string().optional(),
300
- description: zod.z.string().optional(),
301
- required: zod.z.boolean().optional()
310
+ name: nonEmptyStringSchema.describe("The parameter name in the generated client constructor."),
311
+ example: zod.z.string().optional().describe("An example value shown in generated documentation."),
312
+ description: zod.z.string().optional().describe(
313
+ "A description of the constructor parameter included in generated SDK documentation."
314
+ ),
315
+ required: zod.z.boolean().optional().describe("Whether callers must provide the parameter.")
302
316
  });
303
317
  var parameterStyleSchema = zod.z.enum(["wrapped", "inline", "language-default"]);
304
318
  var tokenRefreshConfigSchema = zod.z.strictObject({
305
- enabled: zod.z.boolean(),
306
- endpoint: nonEmptyStringSchema.optional(),
307
- accessTokenField: nonEmptyStringSchema.optional(),
308
- refreshTokenField: nonEmptyStringSchema.optional()
319
+ enabled: zod.z.boolean().describe("Whether the client can exchange refresh tokens."),
320
+ endpoint: nonEmptyStringSchema.optional().describe("The API endpoint used to refresh tokens."),
321
+ accessTokenField: nonEmptyStringSchema.optional().describe("The response field containing the refreshed access token."),
322
+ refreshTokenField: nonEmptyStringSchema.optional().describe("The response field containing the refreshed refresh token.")
309
323
  }).superRefine(({ enabled, endpoint }, context) => {
310
324
  if (enabled && endpoint === void 0) {
311
325
  context.addIssue({
@@ -316,26 +330,26 @@ var tokenRefreshConfigSchema = zod.z.strictObject({
316
330
  }
317
331
  });
318
332
  var clientOverrideShape = {
319
- retry: clientRetryOverrideSchema.optional(),
320
- responseHeaders: zod.z.boolean().optional(),
321
- responseValidation: zod.z.boolean().optional(),
322
- multiTenant: zod.z.boolean().optional(),
323
- additionalConstructorParameters: zod.z.array(constructorParameterSchema).optional(),
324
- timeoutMs: zod.z.union([zod.z.number().nonnegative(), zod.z.literal("infinity")]).optional(),
325
- requestParameterStyle: parameterStyleSchema.optional(),
326
- pathParameterStyle: parameterStyleSchema.optional(),
327
- filePropertyStyle: parameterStyleSchema.optional(),
328
- useDefaultRequestParameterValues: zod.z.boolean().optional(),
329
- respectOptionalRequestBody: zod.z.boolean().optional(),
330
- tokenRefresh: tokenRefreshConfigSchema.optional()
333
+ retry: clientRetryOverrideSchema.optional().describe("Retry behavior for generated API requests."),
334
+ responseHeaders: zod.z.boolean().optional().describe("Whether generated operations expose HTTP response headers."),
335
+ responseValidation: zod.z.boolean().optional().describe("Whether the client validates API responses against the schema."),
336
+ multiTenant: zod.z.boolean().optional().describe("Whether the client exposes configuration for tenant-specific API access."),
337
+ additionalConstructorParameters: zod.z.array(constructorParameterSchema).optional().describe("Additional parameters added to the generated client constructor."),
338
+ timeoutMs: zod.z.union([zod.z.number().nonnegative(), zod.z.literal("infinity")]).optional().describe('The default request timeout in milliseconds, or "infinity" for no timeout.'),
339
+ requestParameterStyle: parameterStyleSchema.optional().describe("Whether generated operation parameters are wrapped or passed inline."),
340
+ pathParameterStyle: parameterStyleSchema.optional().describe("Whether generated path parameters are wrapped or passed inline."),
341
+ filePropertyStyle: parameterStyleSchema.optional().describe("Whether generated file properties are wrapped or passed inline."),
342
+ useDefaultRequestParameterValues: zod.z.boolean().optional().describe("Whether schema defaults are applied to omitted request parameters."),
343
+ respectOptionalRequestBody: zod.z.boolean().optional().describe("Whether an optional request body remains optional in generated methods."),
344
+ tokenRefresh: tokenRefreshConfigSchema.optional().describe("Refresh-token behavior for the generated client.")
331
345
  };
332
346
  var clientConfigOverrideSchema = zod.z.strictObject(clientOverrideShape);
333
347
  var clientConfigSchema = zod.z.strictObject({
334
348
  ...clientOverrideShape,
335
- retry: retryConfigSchema.prefault({}),
336
- responseHeaders: zod.z.boolean().default(false),
337
- multiTenant: zod.z.boolean().default(false),
338
- additionalConstructorParameters: zod.z.array(constructorParameterSchema).default([])
349
+ retry: retryConfigSchema.prefault({}).describe("Retry behavior for generated API requests."),
350
+ responseHeaders: zod.z.boolean().default(false).describe("Whether generated operations expose HTTP response headers."),
351
+ multiTenant: zod.z.boolean().default(false).describe("Whether the client exposes configuration for tenant-specific API access."),
352
+ additionalConstructorParameters: zod.z.array(constructorParameterSchema).default([]).describe("Additional parameters added to the generated client constructor.")
339
353
  });
340
354
 
341
355
  // src/sdk-config/v1/client.ts
@@ -350,75 +364,75 @@ var composerPackageNameSchema = nonEmptyStringSchema.regex(
350
364
  'Composer package name must be a lowercase "vendor/package" name'
351
365
  );
352
366
  var authorSchema = zod.z.strictObject({
353
- name: nonEmptyStringSchema,
354
- email: zod.z.email().optional(),
355
- url: nonEmptyStringSchema.optional()
367
+ name: nonEmptyStringSchema.describe("The package author name."),
368
+ email: zod.z.email().optional().describe("The package author email address."),
369
+ url: nonEmptyStringSchema.optional().describe("The package author website.")
356
370
  });
357
371
  var developerSchema = zod.z.strictObject({
358
- name: nonEmptyStringSchema,
359
- email: zod.z.email().optional(),
360
- organization: nonEmptyStringSchema.optional(),
361
- organizationUrl: nonEmptyStringSchema.optional()
372
+ name: nonEmptyStringSchema.describe("The package developer name."),
373
+ email: zod.z.email().optional().describe("The package developer email address."),
374
+ organization: nonEmptyStringSchema.optional().describe("The developer organization name."),
375
+ organizationUrl: nonEmptyStringSchema.optional().describe("The developer organization website.")
362
376
  });
363
377
  var licenseSchema = zod.z.strictObject({
364
- type: nonEmptyStringSchema,
365
- name: nonEmptyStringSchema.optional(),
366
- url: nonEmptyStringSchema.optional(),
367
- path: nonEmptyStringSchema.optional()
378
+ type: nonEmptyStringSchema.describe("The license identifier or license type."),
379
+ name: nonEmptyStringSchema.optional().describe("The human-readable license name."),
380
+ url: nonEmptyStringSchema.optional().describe("The URL containing the license text."),
381
+ path: nonEmptyStringSchema.optional().describe("The path to a custom license file.")
368
382
  });
369
383
  var dependencySourceSchema = zod.z.discriminatedUnion("type", [
370
384
  zod.z.strictObject({
371
- type: zod.z.literal("registry"),
372
- registry: nonEmptyStringSchema.optional()
385
+ type: zod.z.literal("registry").describe("Resolves the dependency from a package registry."),
386
+ registry: nonEmptyStringSchema.optional().describe("The registry used to resolve the dependency.")
373
387
  }),
374
388
  zod.z.strictObject({
375
- type: zod.z.literal("git"),
376
- url: nonEmptyStringSchema,
377
- ref: nonEmptyStringSchema.optional(),
378
- subdirectory: nonEmptyStringSchema.optional()
389
+ type: zod.z.literal("git").describe("Resolves the dependency from a Git repository."),
390
+ url: nonEmptyStringSchema.describe("The Git repository URL."),
391
+ ref: nonEmptyStringSchema.optional().describe("The Git branch, tag, or commit to use."),
392
+ subdirectory: nonEmptyStringSchema.optional().describe("The package subdirectory within the Git repository.")
379
393
  }),
380
394
  zod.z.strictObject({
381
- type: zod.z.literal("path"),
382
- path: nonEmptyStringSchema
395
+ type: zod.z.literal("path").describe("Resolves the dependency from a local path."),
396
+ path: nonEmptyStringSchema.describe("The local path containing the dependency.")
383
397
  })
384
398
  ]);
385
399
  var dependencySchema = zod.z.strictObject({
386
- name: nonEmptyStringSchema,
387
- version: nonEmptyStringSchema.optional(),
388
- source: dependencySourceSchema.optional(),
389
- packageName: nonEmptyStringSchema.optional(),
390
- features: zod.z.array(nonEmptyStringSchema).optional(),
391
- extras: zod.z.array(nonEmptyStringSchema).optional(),
392
- optional: zod.z.boolean().optional(),
393
- defaultFeatures: zod.z.boolean().optional(),
394
- environmentMarker: nonEmptyStringSchema.optional()
400
+ name: nonEmptyStringSchema.describe("The dependency name used by the package manager."),
401
+ version: nonEmptyStringSchema.optional().describe("The dependency version requirement."),
402
+ source: dependencySourceSchema.optional().describe("A non-default source for the dependency."),
403
+ packageName: nonEmptyStringSchema.optional().describe("The source package name when it differs from the dependency alias."),
404
+ features: zod.z.array(nonEmptyStringSchema).optional().describe("Cargo features enabled for this dependency."),
405
+ extras: zod.z.array(nonEmptyStringSchema).optional().describe("Python extras enabled for this dependency."),
406
+ optional: zod.z.boolean().optional().describe("Whether the dependency is optional."),
407
+ defaultFeatures: zod.z.boolean().optional().describe("Whether the dependency enables its default Cargo features."),
408
+ environmentMarker: nonEmptyStringSchema.optional().describe("A Python environment marker that conditions this dependency.")
395
409
  }).refine(({ source, version }) => source !== void 0 || version !== void 0, {
396
410
  message: "dependency must define a version or a source"
397
411
  });
398
412
  var projectUrlSchema = zod.z.strictObject({
399
- label: nonEmptyStringSchema,
400
- url: nonEmptyStringSchema
413
+ label: nonEmptyStringSchema.describe("The label displayed for the project link."),
414
+ url: nonEmptyStringSchema.describe("The project link URL.")
401
415
  });
402
416
  var packageConfigSchema = zod.z.strictObject({
403
- packageName: nonEmptyStringSchema.optional(),
404
- moduleName: nonEmptyStringSchema.optional(),
405
- modulePath: goModulePathSchema.optional(),
406
- namespace: nonEmptyStringSchema.optional(),
407
- groupId: nonEmptyStringSchema.optional(),
408
- artifactId: nonEmptyStringSchema.optional(),
409
- description: zod.z.string().optional(),
410
- repository: nonEmptyStringSchema.optional(),
411
- homepage: nonEmptyStringSchema.optional(),
412
- documentationUrl: nonEmptyStringSchema.optional(),
413
- authors: zod.z.array(authorSchema).optional(),
414
- developers: zod.z.array(developerSchema).optional(),
415
- license: licenseSchema.optional(),
416
- keywords: zod.z.array(nonEmptyStringSchema).optional(),
417
- classifiers: zod.z.array(nonEmptyStringSchema).optional(),
418
- projectUrls: zod.z.array(projectUrlSchema).optional(),
419
- extraDependencies: zod.z.array(dependencySchema).optional(),
420
- extraDevDependencies: zod.z.array(dependencySchema).optional(),
421
- extraPeerDependencies: zod.z.array(dependencySchema).optional()
417
+ packageName: nonEmptyStringSchema.optional().describe("The package name used by the target language registry."),
418
+ moduleName: nonEmptyStringSchema.optional().describe("The generated module or import name when it differs from the package name."),
419
+ modulePath: goModulePathSchema.optional().describe("The Go module path used for imports and publishing."),
420
+ namespace: nonEmptyStringSchema.optional().describe("The namespace or package prefix for generated code."),
421
+ groupId: nonEmptyStringSchema.optional().describe("The Maven group identifier."),
422
+ artifactId: nonEmptyStringSchema.optional().describe("The Maven artifact identifier."),
423
+ description: zod.z.string().optional().describe("The package description used in generated metadata."),
424
+ repository: nonEmptyStringSchema.optional().describe("The source repository for the generated SDK."),
425
+ homepage: nonEmptyStringSchema.optional().describe("The package homepage URL."),
426
+ documentationUrl: nonEmptyStringSchema.optional().describe("The package documentation URL."),
427
+ authors: zod.z.array(authorSchema).optional().describe("Authors credited in package metadata."),
428
+ developers: zod.z.array(developerSchema).optional().describe("Developers credited in package metadata."),
429
+ license: licenseSchema.optional().describe("License metadata for the generated package."),
430
+ keywords: zod.z.array(nonEmptyStringSchema).optional().describe("Search keywords for package metadata."),
431
+ classifiers: zod.z.array(nonEmptyStringSchema).optional().describe("Package classifiers used by registries such as PyPI."),
432
+ projectUrls: zod.z.array(projectUrlSchema).optional().describe("Labeled project links for package metadata."),
433
+ extraDependencies: zod.z.array(dependencySchema).optional().describe("Additional runtime dependencies added to the generated package."),
434
+ extraDevDependencies: zod.z.array(dependencySchema).optional().describe("Additional development dependencies added to the generated package."),
435
+ extraPeerDependencies: zod.z.array(dependencySchema).optional().describe("Additional peer dependencies added to the generated package.")
422
436
  });
423
437
  var httpMethodSchema = zod.z.enum([
424
438
  "GET",
@@ -432,34 +446,34 @@ var httpMethodSchema = zod.z.enum([
432
446
  "CONNECT"
433
447
  ]);
434
448
  var readmeEndpointSchema = zod.z.strictObject({
435
- method: httpMethodSchema,
436
- path: nonEmptyStringSchema,
437
- stream: zod.z.boolean().optional()
449
+ method: httpMethodSchema.describe("The HTTP method of the documented endpoint."),
450
+ path: nonEmptyStringSchema.describe("The endpoint path used in generated examples."),
451
+ stream: zod.z.boolean().optional().describe("Whether the example uses the streaming response API.")
438
452
  });
439
453
  var readmeCustomSectionSchema = zod.z.strictObject({
440
- title: nonEmptyStringSchema,
441
- content: zod.z.string()
454
+ title: nonEmptyStringSchema.describe("The heading displayed for this README section."),
455
+ content: zod.z.string().describe("The Markdown content of this README section.")
442
456
  });
443
457
  var readmeConfigSchema = zod.z.strictObject({
444
- apiName: nonEmptyStringSchema.optional(),
445
- introduction: zod.z.string().optional(),
446
- apiReferenceLink: nonEmptyStringSchema.optional(),
447
- bannerLink: nonEmptyStringSchema.optional(),
448
- disabledSections: zod.z.array(nonEmptyStringSchema).optional(),
449
- customSections: zod.z.array(readmeCustomSectionSchema).optional(),
450
- defaultEndpoint: readmeEndpointSchema.optional(),
451
- features: zod.z.record(zod.z.string(), zod.z.array(readmeEndpointSchema)).optional()
458
+ apiName: nonEmptyStringSchema.optional().describe("The API name displayed in the README."),
459
+ introduction: zod.z.string().optional().describe("Custom introductory Markdown for the README."),
460
+ apiReferenceLink: nonEmptyStringSchema.optional().describe("The URL linked as the API reference."),
461
+ bannerLink: nonEmptyStringSchema.optional().describe("The destination URL for the README banner."),
462
+ disabledSections: zod.z.array(nonEmptyStringSchema).optional().describe("Generated README sections to omit."),
463
+ customSections: zod.z.array(readmeCustomSectionSchema).optional().describe("Additional sections inserted into the README."),
464
+ defaultEndpoint: readmeEndpointSchema.optional().describe("The endpoint used for the primary README example."),
465
+ features: zod.z.record(zod.z.string(), zod.z.array(readmeEndpointSchema)).optional().describe("Named feature groups and the endpoints demonstrated by each group.")
452
466
  });
453
467
  var snippetsConfigSchema = zod.z.strictObject({
454
- enabled: zod.z.boolean(),
455
- format: zod.z.enum(["md", "json"]).optional(),
456
- outputPath: nonEmptyStringSchema.optional()
468
+ enabled: zod.z.boolean().describe("Whether standalone usage snippets are generated."),
469
+ format: zod.z.enum(["md", "json"]).optional().describe("The output format for generated snippets."),
470
+ outputPath: nonEmptyStringSchema.optional().describe("The output path for generated snippet files.")
457
471
  });
458
472
  var docsConfigSchema = zod.z.strictObject({
459
- readme: readmeConfigSchema.optional(),
460
- snippets: snippetsConfigSchema.optional(),
461
- referenceBaseUrl: nonEmptyStringSchema.optional(),
462
- includeApiReference: zod.z.boolean().optional()
473
+ readme: readmeConfigSchema.optional().describe("README content and example configuration."),
474
+ snippets: snippetsConfigSchema.optional().describe("Standalone usage snippet generation."),
475
+ referenceBaseUrl: nonEmptyStringSchema.optional().describe("The base URL used for links to generated API reference files."),
476
+ includeApiReference: zod.z.boolean().optional().describe("Whether API reference documentation is included in the SDK output.")
463
477
  });
464
478
 
465
479
  // src/sdk-config/v1/docs.ts
@@ -790,6 +804,7 @@ function githubOutput(value, publishInfo, rawOutput, language, sourcePath, state
790
804
  consume(state, [...sourcePath, "repo"]);
791
805
  const publication = publishInfo ? mapPublication(publishInfo, rawOutput, language, [...sourcePath, "publishInfo"], state, index) : void 0;
792
806
  const type = stringValue(value.type);
807
+ const licensePackage = mapGithubLicense(value.license, [...sourcePath, "license"], state);
793
808
  const reviewers = mapReviewers(value.reviewers, [...sourcePath, "reviewers"], state);
794
809
  if (type) consume(state, [...sourcePath, "type"]);
795
810
  if (typeof value.makePr === "boolean") consume(state, [...sourcePath, "makePr"]);
@@ -816,9 +831,20 @@ function githubOutput(value, publishInfo, rawOutput, language, sourcePath, state
816
831
  },
817
832
  ...publication ? { publish: publication.publish } : {}
818
833
  },
819
- ...optional("package", publication?.package)
834
+ // The GitHub license wins over a publication-supplied one; `licensePackage` is `{}` or `{ license }`.
835
+ ...optionalObject("package", { ...publication?.package, ...licensePackage })
820
836
  };
821
837
  }
838
+ var basicLicenseTypes = { mit: "MIT", apache: "APACHE" };
839
+ function mapGithubLicense(value, sourcePath, state) {
840
+ if (!isObject(value) || stringValue(value.type) !== "basic") return {};
841
+ const id = stringValue(value.id);
842
+ const type = id ? basicLicenseTypes[id.toLowerCase()] : void 0;
843
+ if (!type) return {};
844
+ consume(state, [...sourcePath, "type"]);
845
+ consume(state, [...sourcePath, "id"]);
846
+ return { license: { type } };
847
+ }
822
848
  function consumeCredentialObject(value, sourcePath, state) {
823
849
  if (!isObject(value)) return;
824
850
  for (const field of ["username", "password", "token", "apiKey"]) {
@@ -1246,16 +1272,10 @@ function finishOutputMapping(mapping, outputMode, sourcePath, state, index) {
1246
1272
  for (const path of collectLeafPaths(outputMode, sourcePath)) {
1247
1273
  if (path[path.length - 1] === "_visit") consume(state, path);
1248
1274
  }
1249
- const legacyGenerateFullProject = isObject(outputMode) ? outputMode.generateFullProject : void 0;
1250
- const generationShape = typeof legacyGenerateFullProject === "boolean" ? { generation: { ...mapping.generation, generateFullProject: legacyGenerateFullProject } } : {};
1251
- if (typeof legacyGenerateFullProject === "boolean") {
1252
- consume(state, [...sourcePath, "generateFullProject"]);
1253
- }
1254
1275
  const unsupported = collectUnsupported(outputMode, sourcePath, state);
1255
1276
  const hasCredentials = unsupported.some((diagnostic) => isCredentialPath(diagnostic.path));
1256
1277
  return {
1257
1278
  ...mapping,
1258
- ...generationShape,
1259
1279
  unsupportedFields: [
1260
1280
  ...state.credentialDiagnostics ?? [],
1261
1281
  ...hasCredentials ? [
@@ -1326,6 +1346,9 @@ function outputDiagnostic(path, index) {
1326
1346
  homepageLink: {
1327
1347
  sdkConfigPath: ["targets", index, "package", "homepage"],
1328
1348
  suggestedAction: "Set target.package.homepage manually to a valid URL."
1349
+ },
1350
+ generateFullProject: {
1351
+ suggestedAction: "Preserve this packaging setting on the generation request; it is not customer-authored SDK configuration."
1329
1352
  }
1330
1353
  };
1331
1354
  const fieldGuidance = field ? guidance[field] : void 0;
@@ -1459,59 +1482,48 @@ function deepEqual(left, right) {
1459
1482
  return false;
1460
1483
  }
1461
1484
  var namingConfigSchema = zod.z.strictObject({
1462
- clientName: nonEmptyStringSchema.optional(),
1463
- exportedClientName: nonEmptyStringSchema.optional(),
1464
- environmentTypeName: nonEmptyStringSchema.optional(),
1465
- apiErrorName: nonEmptyStringSchema.optional(),
1466
- baseErrorName: nonEmptyStringSchema.optional(),
1467
- pagerName: nonEmptyStringSchema.optional(),
1485
+ clientName: nonEmptyStringSchema.optional().describe("The generated client class name."),
1486
+ exportedClientName: nonEmptyStringSchema.optional().describe("The client name exported from the generated package."),
1487
+ environmentTypeName: nonEmptyStringSchema.optional().describe("The generated type name for API environments."),
1488
+ apiErrorName: nonEmptyStringSchema.optional().describe("The generated API error class name."),
1489
+ baseErrorName: nonEmptyStringSchema.optional().describe("The generated base error class name."),
1490
+ pagerName: nonEmptyStringSchema.optional().describe("The generated pagination helper name."),
1468
1491
  /** Apply Fern's initialism-aware casing rules when deriving generated identifiers. */
1469
- smartCasing: zod.z.boolean().optional(),
1492
+ smartCasing: zod.z.boolean().optional().describe("Whether generated identifiers use initialism-aware casing."),
1470
1493
  /** Preserve a word boundary after digits when Fern smart casing is enabled. */
1471
- smartCasingDigitWordBoundary: zod.z.boolean().optional()
1494
+ smartCasingDigitWordBoundary: zod.z.boolean().optional().describe("Whether smart casing preserves a word boundary after digits.")
1472
1495
  });
1473
1496
 
1474
1497
  // src/sdk-config/v1/generation.ts
1475
1498
  var customerGenerationAssetSchema = zod.z.discriminatedUnion("type", [
1476
- zod.z.strictObject({ type: zod.z.literal("path"), location: relativePathSchema }),
1477
- zod.z.strictObject({ type: zod.z.literal("url"), location: nonEmptyStringSchema })
1499
+ zod.z.strictObject({
1500
+ type: zod.z.literal("path").describe("Loads the generation asset from a relative path."),
1501
+ location: relativePathSchema.describe("The relative path to the generation asset.")
1502
+ }),
1503
+ zod.z.strictObject({
1504
+ type: zod.z.literal("url").describe("Loads the generation asset from a URL."),
1505
+ location: nonEmptyStringSchema.describe("The URL of the generation asset.")
1506
+ })
1478
1507
  ]);
1479
- var hookDependencySchema = zod.z.strictObject({
1480
- name: nonEmptyStringSchema,
1481
- version: nonEmptyStringSchema,
1482
- groupId: nonEmptyStringSchema.optional()
1483
- });
1484
- var hooksConfigSchema = zod.z.strictObject({
1485
- enabled: zod.z.boolean(),
1486
- source: customerGenerationAssetSchema.optional(),
1487
- dependencies: zod.z.array(hookDependencySchema).optional()
1488
- });
1489
1508
  var customCodeConfigSchema = zod.z.strictObject({
1490
- enabled: zod.z.boolean(),
1491
- source: customerGenerationAssetSchema.optional(),
1492
- conflictStrategy: zod.z.enum(["mark", "ours", "theirs"]).optional(),
1493
- trackChanges: zod.z.boolean().optional(),
1494
- protectedFiles: zod.z.array(nonEmptyStringSchema).optional()
1509
+ enabled: zod.z.boolean().describe("Whether customer-authored code is merged into generated output."),
1510
+ source: customerGenerationAssetSchema.optional().describe("The source containing customer-authored code."),
1511
+ conflictStrategy: zod.z.enum(["mark", "ours", "theirs"]).optional().describe("How merge conflicts between generated and custom code are handled."),
1512
+ trackChanges: zod.z.boolean().optional().describe("Whether custom-code changes are tracked between builds."),
1513
+ protectedFiles: zod.z.array(nonEmptyStringSchema).optional().describe("Generated file paths that custom-code merging must not overwrite.")
1495
1514
  });
1496
- var workflowConfigSchema = zod.z.strictObject({
1497
- path: relativePathSchema,
1498
- outputName: nonEmptyStringSchema.optional()
1515
+ var analyticsHeaderSchema = zod.z.strictObject({
1516
+ name: nonEmptyStringSchema.describe("The exported telemetry header name."),
1517
+ value: zod.z.string().describe("The literal telemetry header value.")
1499
1518
  });
1500
- var analyticsHeaderSchema = zod.z.union([
1501
- zod.z.strictObject({ name: nonEmptyStringSchema, value: zod.z.string() }),
1502
- zod.z.strictObject({
1503
- name: nonEmptyStringSchema,
1504
- valueRef: nonEmptyStringSchema
1505
- })
1506
- ]);
1507
1519
  var analyticsConfigSchema = zod.z.strictObject({
1508
- enabled: zod.z.boolean(),
1509
- endpoint: nonEmptyStringSchema.optional(),
1510
- exporter: zod.z.enum(["otlp-http", "console"]).optional(),
1511
- headers: zod.z.array(analyticsHeaderSchema).optional(),
1512
- batchSize: zod.z.number().int().positive().optional(),
1513
- scheduledDelayMs: zod.z.number().nonnegative().optional(),
1514
- exportTimeoutMs: zod.z.number().nonnegative().optional()
1520
+ enabled: zod.z.boolean().describe("Whether generated clients export usage telemetry."),
1521
+ endpoint: nonEmptyStringSchema.optional().describe("The telemetry export endpoint."),
1522
+ exporter: zod.z.enum(["otlp-http", "console"]).optional().describe("The telemetry exporter implementation."),
1523
+ headers: zod.z.array(analyticsHeaderSchema).optional().describe("Headers sent by the telemetry exporter."),
1524
+ batchSize: zod.z.number().int().positive().optional().describe("The maximum spans in each export batch."),
1525
+ scheduledDelayMs: zod.z.number().nonnegative().optional().describe("The delay between scheduled exports, in milliseconds."),
1526
+ exportTimeoutMs: zod.z.number().nonnegative().optional().describe("The maximum time allowed for an export, in milliseconds.")
1515
1527
  }).superRefine(({ enabled, endpoint }, context) => {
1516
1528
  if (enabled && endpoint === void 0) {
1517
1529
  context.addIssue({
@@ -1522,73 +1534,63 @@ var analyticsConfigSchema = zod.z.strictObject({
1522
1534
  }
1523
1535
  });
1524
1536
  var wireTestsSchema = zod.z.strictObject({
1525
- enabled: zod.z.boolean(),
1526
- exclusions: zod.z.array(nonEmptyStringSchema).optional(),
1527
- fallbackToGeneratedErrorExamples: zod.z.boolean().optional(),
1528
- fixtureSource: zod.z.enum(["synthetic", "recorded", "auto"]).optional()
1537
+ enabled: zod.z.boolean().describe("Whether wire-level request and response tests are generated."),
1538
+ exclusions: zod.z.array(nonEmptyStringSchema).optional().describe("Operations excluded from wire tests."),
1539
+ fallbackToGeneratedErrorExamples: zod.z.boolean().optional().describe("Whether missing error fixtures are synthesized from generated examples."),
1540
+ fixtureSource: zod.z.enum(["synthetic", "recorded", "auto"]).optional().describe("Where wire-test fixtures are obtained.")
1529
1541
  });
1530
1542
  var unitTestsSchema = zod.z.strictObject({
1531
- enabled: zod.z.boolean(),
1532
- mode: zod.z.enum(["core-runtime", "schema-driven", "both"]).optional(),
1533
- exclusions: zod.z.array(nonEmptyStringSchema).optional()
1543
+ enabled: zod.z.boolean().describe("Whether SDK unit tests are generated."),
1544
+ exclusions: zod.z.array(nonEmptyStringSchema).optional().describe("Operations excluded from unit tests.")
1534
1545
  });
1535
1546
  var streamsSchema = zod.z.strictObject({
1536
- enabled: zod.z.boolean(),
1537
- responseType: zod.z.enum(["wrapper", "native", "web"]).optional(),
1538
- fileResponseType: zod.z.enum(["stream", "binary-response"]).optional(),
1539
- defaultChunkSizeBytes: zod.z.number().int().positive().optional()
1547
+ enabled: zod.z.boolean().describe("Whether generated clients expose streaming response APIs."),
1548
+ responseType: zod.z.enum(["wrapper", "native", "web"]).optional().describe("The streaming response abstraction exposed by generated clients."),
1549
+ fileResponseType: zod.z.enum(["stream", "binary-response"]).optional().describe("The response type used for file downloads."),
1550
+ defaultChunkSizeBytes: zod.z.number().int().positive().optional().describe("The default number of bytes yielded by streaming iterators.")
1540
1551
  });
1541
1552
  var layoutConfigSchema = zod.z.strictObject({
1542
- outputDirectory: zod.z.enum(["project-root", "source-root"]).optional(),
1543
- packagePath: nonEmptyStringSchema.optional()
1553
+ outputDirectory: zod.z.enum(["project-root", "source-root"]).optional().describe("Whether generated source is rooted at the project or its source directory."),
1554
+ packagePath: nonEmptyStringSchema.optional().describe("The package-relative path for generated source files.")
1544
1555
  });
1545
1556
  var serializationConfigSchema = zod.z.strictObject({
1546
- enumRepresentation: zod.z.enum(["enum", "union", "literal", "forward-compatible-enum", "language-default"]).optional(),
1547
- additionalProperties: zod.z.enum(["allow", "forbid", "ignore", "language-default"]).optional(),
1548
- inlineTypes: zod.z.boolean().optional(),
1549
- omitUndefined: zod.z.boolean().optional()
1557
+ enumRepresentation: zod.z.enum(["enum", "union", "literal", "forward-compatible-enum", "language-default"]).optional().describe("How schema enums are represented in generated code."),
1558
+ additionalProperties: zod.z.enum(["allow", "forbid", "ignore", "language-default"]).optional().describe("How undeclared object properties are handled."),
1559
+ inlineTypes: zod.z.boolean().optional().describe("Whether inline schemas remain nested under their parent types."),
1560
+ omitUndefined: zod.z.boolean().optional().describe("Whether undefined properties are omitted during serialization.")
1550
1561
  });
1551
1562
  var generationConfigOverrideShape = {
1552
- includeWatermark: zod.z.boolean().optional(),
1553
- ai: zod.z.boolean().optional(),
1554
- includeOptionalSnippetParameters: zod.z.boolean().optional(),
1555
- buildAllModels: zod.z.boolean().optional(),
1556
- inferServiceNames: zod.z.boolean().optional(),
1557
- includeDeprecatedOperations: zod.z.boolean().optional(),
1558
- multipleResponses: zod.z.boolean().optional(),
1559
- /** Generate the entire SDK project, including package manifests and publishable artifacts. */
1560
- generateFullProject: zod.z.boolean().optional(),
1561
- devContainer: zod.z.boolean().optional(),
1562
- allowMockClient: zod.z.boolean().optional(),
1563
- ignoreFiles: zod.z.array(nonEmptyStringSchema).optional(),
1564
- reservedKeywords: zod.z.array(nonEmptyStringSchema).optional(),
1565
- hooks: hooksConfigSchema.optional(),
1566
- customCode: customCodeConfigSchema.optional(),
1567
- workflows: zod.z.array(workflowConfigSchema).optional(),
1568
- customQueryPaths: zod.z.array(relativePathSchema).optional(),
1569
- analytics: analyticsConfigSchema.optional(),
1570
- wireTests: wireTestsSchema.optional(),
1571
- unitTests: unitTestsSchema.optional(),
1572
- webSockets: zod.z.boolean().optional(),
1573
- streams: streamsSchema.optional(),
1574
- naming: namingConfigSchema.optional(),
1575
- layout: layoutConfigSchema.optional(),
1576
- serialization: serializationConfigSchema.optional()
1563
+ includeOptionalSnippetParameters: zod.z.boolean().optional().describe("Whether usage snippets include optional request parameters."),
1564
+ buildAllModels: zod.z.boolean().optional().describe("Whether models not referenced by operations are also generated."),
1565
+ inferServiceNames: zod.z.boolean().optional().describe("Whether service names are inferred from API structure."),
1566
+ includeDeprecatedOperations: zod.z.boolean().optional().describe("Whether deprecated API operations are generated."),
1567
+ multipleResponses: zod.z.boolean().optional().describe("Whether operations model multiple successful response types."),
1568
+ devContainer: zod.z.boolean().optional().describe("Whether development-container configuration is generated."),
1569
+ allowMockClient: zod.z.boolean().optional().describe("Whether a mock API client is included in the generated SDK."),
1570
+ ignoreFiles: zod.z.array(nonEmptyStringSchema).optional().describe("Generated paths excluded from the final output."),
1571
+ reservedKeywords: zod.z.array(nonEmptyStringSchema).optional().describe("Additional identifiers treated as reserved words."),
1572
+ customCode: customCodeConfigSchema.optional().describe("Customer-authored code merge configuration."),
1573
+ customQueryPaths: zod.z.array(relativePathSchema).optional().describe("Relative paths to custom query definitions."),
1574
+ analytics: analyticsConfigSchema.optional().describe("Generated client telemetry configuration."),
1575
+ wireTests: wireTestsSchema.optional().describe("Wire-level request and response test generation."),
1576
+ unitTests: unitTestsSchema.optional().describe("SDK unit-test generation."),
1577
+ webSockets: zod.z.boolean().optional().describe("Whether WebSocket clients are generated for supported channels."),
1578
+ streams: streamsSchema.optional().describe("Streaming response generation behavior."),
1579
+ naming: namingConfigSchema.optional().describe("Names and casing used by generated code."),
1580
+ layout: layoutConfigSchema.optional().describe("Generated project and source layout."),
1581
+ serialization: serializationConfigSchema.optional().describe("Generated model serialization behavior.")
1577
1582
  };
1578
1583
  var sdkConfigV1GenerationConfigOverrideSchema = zod.z.strictObject(
1579
1584
  generationConfigOverrideShape
1580
1585
  );
1581
1586
  var sdkConfigV1GenerationConfigSchema = zod.z.strictObject({
1582
1587
  ...generationConfigOverrideShape,
1583
- includeWatermark: zod.z.boolean().default(false),
1584
- ai: zod.z.boolean().default(false),
1585
- buildAllModels: zod.z.boolean().default(false),
1586
- inferServiceNames: zod.z.boolean().default(false),
1587
- includeDeprecatedOperations: zod.z.boolean().default(true),
1588
- multipleResponses: zod.z.boolean().default(false),
1589
- generateFullProject: zod.z.boolean().default(false),
1590
- devContainer: zod.z.boolean().default(false),
1591
- allowMockClient: zod.z.boolean().default(false)
1588
+ buildAllModels: zod.z.boolean().default(false).describe("Whether models not referenced by operations are also generated."),
1589
+ inferServiceNames: zod.z.boolean().default(false).describe("Whether service names are inferred from API structure."),
1590
+ includeDeprecatedOperations: zod.z.boolean().default(true).describe("Whether deprecated API operations are generated."),
1591
+ multipleResponses: zod.z.boolean().default(false).describe("Whether operations model multiple successful response types."),
1592
+ devContainer: zod.z.boolean().default(false).describe("Whether development-container configuration is generated."),
1593
+ allowMockClient: zod.z.boolean().default(false).describe("Whether a mock API client is included in the generated SDK.")
1592
1594
  });
1593
1595
  var commonGenerationKeys = new Set(Object.keys(generationConfigOverrideShape));
1594
1596
  function splitSdkConfigV1TargetGeneration(generation) {
@@ -1610,78 +1612,97 @@ var sdkConfigV1PublishRegistrySchema = zod.z.enum([
1610
1612
  "composer"
1611
1613
  ]);
1612
1614
  var mavenSignatureSchema = zod.z.strictObject({
1613
- keyId: nonEmptyStringSchema,
1614
- password: nonEmptyStringSchema,
1615
- secretKey: nonEmptyStringSchema
1615
+ keyId: nonEmptyStringSchema.describe(
1616
+ "The signing key identifier, or an environment expression that resolves to it."
1617
+ ),
1618
+ password: nonEmptyStringSchema.describe(
1619
+ "The signing key password, or an environment expression that resolves to it."
1620
+ ),
1621
+ secretKey: nonEmptyStringSchema.describe(
1622
+ "The armored secret key, or an environment expression that resolves to it."
1623
+ )
1616
1624
  });
1617
1625
  var commonPublishShape = {
1618
- url: nonEmptyStringSchema.optional(),
1619
- releaseBranch: nonEmptyStringSchema.optional(),
1620
- tolerateRepublish: zod.z.boolean().optional()
1626
+ url: nonEmptyStringSchema.optional().describe("A custom package registry URL."),
1627
+ releaseBranch: nonEmptyStringSchema.optional().describe("The branch used by generated package release workflows."),
1628
+ tolerateRepublish: zod.z.boolean().optional().describe("Whether an already-published package version is treated as non-fatal.")
1621
1629
  };
1622
1630
  var sdkConfigV1PublishConfigSchema = zod.z.discriminatedUnion("registry", [
1623
1631
  zod.z.strictObject({
1624
- registry: zod.z.literal("npm"),
1625
- token: nonEmptyStringSchema.optional(),
1632
+ registry: zod.z.literal("npm").describe("Publishes the package to an npm-compatible registry."),
1633
+ token: nonEmptyStringSchema.optional().describe("The npm registry token, or an environment expression that resolves to it."),
1634
+ ...commonPublishShape
1635
+ }),
1636
+ zod.z.strictObject({
1637
+ registry: zod.z.literal("pypi").describe("Publishes the package to a PyPI-compatible registry."),
1638
+ username: nonEmptyStringSchema.optional().describe("The PyPI username, or an environment expression that resolves to it."),
1639
+ password: nonEmptyStringSchema.optional().describe("The PyPI password or token, or an environment expression that resolves to it."),
1640
+ ...commonPublishShape
1641
+ }),
1642
+ zod.z.strictObject({
1643
+ registry: zod.z.literal("maven").describe("Publishes the package to a Maven-compatible repository."),
1644
+ username: nonEmptyStringSchema.optional().describe("The Maven username, or an environment expression that resolves to it."),
1645
+ password: nonEmptyStringSchema.optional().describe("The Maven password, or an environment expression that resolves to it."),
1646
+ signature: mavenSignatureSchema.optional().describe("Credentials used to sign Maven artifacts."),
1647
+ ...commonPublishShape
1648
+ }),
1649
+ zod.z.strictObject({
1650
+ registry: zod.z.literal("nuget").describe("Publishes the package to a NuGet-compatible registry."),
1626
1651
  ...commonPublishShape
1627
1652
  }),
1628
1653
  zod.z.strictObject({
1629
- registry: zod.z.literal("pypi"),
1630
- username: nonEmptyStringSchema.optional(),
1631
- password: nonEmptyStringSchema.optional(),
1654
+ registry: zod.z.literal("rubygems").describe("Publishes the package to a RubyGems-compatible registry."),
1632
1655
  ...commonPublishShape
1633
1656
  }),
1634
1657
  zod.z.strictObject({
1635
- registry: zod.z.literal("maven"),
1636
- username: nonEmptyStringSchema.optional(),
1637
- password: nonEmptyStringSchema.optional(),
1638
- signature: mavenSignatureSchema.optional(),
1658
+ registry: zod.z.literal("crates").describe("Publishes the crate to a Cargo-compatible registry."),
1659
+ token: nonEmptyStringSchema.optional().describe("The Cargo registry token, or an environment expression that resolves to it."),
1639
1660
  ...commonPublishShape
1640
1661
  }),
1641
- zod.z.strictObject({ registry: zod.z.literal("nuget"), ...commonPublishShape }),
1642
- zod.z.strictObject({ registry: zod.z.literal("rubygems"), ...commonPublishShape }),
1643
1662
  zod.z.strictObject({
1644
- registry: zod.z.literal("crates"),
1645
- token: nonEmptyStringSchema.optional(),
1663
+ registry: zod.z.literal("go").describe("Publishes the SDK as a Go module."),
1646
1664
  ...commonPublishShape
1647
1665
  }),
1648
- zod.z.strictObject({ registry: zod.z.literal("go"), ...commonPublishShape }),
1649
- zod.z.strictObject({ registry: zod.z.literal("composer"), ...commonPublishShape })
1666
+ zod.z.strictObject({
1667
+ registry: zod.z.literal("composer").describe("Publishes the package to a Composer-compatible registry."),
1668
+ ...commonPublishShape
1669
+ })
1650
1670
  ]);
1651
1671
  var reviewersSchema = zod.z.strictObject({
1652
- teams: zod.z.array(nonEmptyStringSchema).optional(),
1653
- users: zod.z.array(nonEmptyStringSchema).optional()
1672
+ teams: zod.z.array(nonEmptyStringSchema).optional().describe("GitHub teams requested as reviewers."),
1673
+ users: zod.z.array(nonEmptyStringSchema).optional().describe("GitHub users requested as reviewers.")
1654
1674
  });
1655
1675
  var githubCredentialsSchema = zod.z.strictObject({
1656
- username: nonEmptyStringSchema.optional(),
1657
- password: nonEmptyStringSchema.optional(),
1658
- token: nonEmptyStringSchema.optional(),
1659
- apiKey: nonEmptyStringSchema.optional()
1676
+ username: nonEmptyStringSchema.optional().describe("The username used to authenticate with the GitHub host."),
1677
+ password: nonEmptyStringSchema.optional().describe("The password used to authenticate with the GitHub host."),
1678
+ token: nonEmptyStringSchema.optional().describe("A token used to authenticate with the GitHub host."),
1679
+ apiKey: nonEmptyStringSchema.optional().describe("An API key used to authenticate with the GitHub host.")
1660
1680
  });
1661
1681
  var githubOutputSchema = zod.z.strictObject({
1662
- repository: nonEmptyStringSchema,
1663
- host: nonEmptyStringSchema.optional(),
1664
- branch: nonEmptyStringSchema.optional(),
1665
- mode: zod.z.enum(["release", "pull-request", "push", "commit", "commit-and-release"]).optional(),
1666
- reviewers: reviewersSchema.optional(),
1667
- /** Raw GitHub credentials. These values can be sensitive and must be handled as secrets. */
1668
- credentials: githubCredentialsSchema.optional(),
1669
- privateRepository: zod.z.boolean().optional()
1682
+ repository: nonEmptyStringSchema.describe(
1683
+ "The GitHub repository that receives generated files."
1684
+ ),
1685
+ host: nonEmptyStringSchema.optional().describe("The GitHub host for enterprise installations."),
1686
+ branch: nonEmptyStringSchema.optional().describe("The target branch for generated changes."),
1687
+ mode: zod.z.enum(["release", "pull-request", "push", "commit", "commit-and-release"]).optional().describe("How generated changes are delivered to the repository."),
1688
+ reviewers: reviewersSchema.optional().describe("Reviewers requested for generated pull requests."),
1689
+ credentials: githubCredentialsSchema.optional().describe("Credentials used to authenticate GitHub delivery."),
1690
+ privateRepository: zod.z.boolean().optional().describe("Whether the destination repository is private.")
1670
1691
  });
1671
1692
  var filesOutputSchema = zod.z.strictObject({
1672
- delivery: zod.z.literal("files"),
1673
- path: nonEmptyStringSchema.optional(),
1674
- publish: sdkConfigV1PublishConfigSchema.optional()
1693
+ delivery: zod.z.literal("files").describe("Writes the generated SDK to a directory."),
1694
+ path: nonEmptyStringSchema.optional().describe("The destination directory for generated files."),
1695
+ publish: sdkConfigV1PublishConfigSchema.optional().describe("Optional package registry publication.")
1675
1696
  });
1676
1697
  var zipOutputSchema = zod.z.strictObject({
1677
- delivery: zod.z.literal("zip"),
1678
- fileName: nonEmptyStringSchema.optional(),
1679
- publish: sdkConfigV1PublishConfigSchema.optional()
1698
+ delivery: zod.z.literal("zip").describe("Packages the generated SDK as a ZIP archive."),
1699
+ fileName: nonEmptyStringSchema.optional().describe("The generated ZIP archive file name."),
1700
+ publish: sdkConfigV1PublishConfigSchema.optional().describe("Optional package registry publication.")
1680
1701
  });
1681
1702
  var githubDeliverySchema = zod.z.strictObject({
1682
- delivery: zod.z.literal("github"),
1683
- github: githubOutputSchema,
1684
- publish: sdkConfigV1PublishConfigSchema.optional()
1703
+ delivery: zod.z.literal("github").describe("Delivers the generated SDK to GitHub."),
1704
+ github: githubOutputSchema.describe("GitHub repository delivery settings."),
1705
+ publish: sdkConfigV1PublishConfigSchema.optional().describe("Optional package registry publication.")
1685
1706
  });
1686
1707
  var sdkConfigV1OutputConfigSchema = zod.z.discriminatedUnion(
1687
1708
  "delivery",
@@ -1693,29 +1714,33 @@ var sdkConfigV1OutputConfigSchema = zod.z.discriminatedUnion(
1693
1714
  var sdkConfigV1DependencySchema = dependencySchema;
1694
1715
  var sdkConfigV1PackageConfigSchema = packageConfigSchema;
1695
1716
  var sdkConfigV1ReplayConfigSchema = zod.z.strictObject({
1696
- enabled: zod.z.boolean()
1717
+ enabled: zod.z.boolean().describe("Whether regeneration reapplies customer-authored repository changes.")
1697
1718
  });
1698
1719
  var apiImportSettingsSchema = zod.z.strictObject({
1699
- respectNullableSchemas: zod.z.boolean().optional(),
1700
- titleAsSchemaName: zod.z.boolean().optional(),
1701
- coerceEnumsToLiterals: zod.z.boolean().optional(),
1702
- idiomaticRequestNames: zod.z.boolean().optional(),
1703
- wrapReferencesToNullableInOptional: zod.z.boolean().optional(),
1704
- coerceOptionalSchemasToNullable: zod.z.boolean().optional(),
1705
- pathParameterOrder: zod.z.enum(["url-order", "spec-order"]).optional(),
1706
- onlyIncludeReferencedSchemas: zod.z.boolean().optional(),
1707
- objectQueryParameters: zod.z.boolean().optional(),
1708
- typeDatesAsStrings: zod.z.boolean().optional(),
1709
- groupMultiApiEnvironments: zod.z.boolean().optional(),
1710
- ignoreTags: zod.z.boolean().optional(),
1711
- disambiguateRequestNames: zod.z.boolean().optional(),
1712
- respectReadonlySchemas: zod.z.boolean().optional(),
1713
- discriminatedUnionV2: zod.z.boolean().optional(),
1714
- undiscriminatedUnionsWithLiterals: zod.z.boolean().optional(),
1715
- inlineAllOfSchemas: zod.z.boolean().optional(),
1716
- resolveSchemaCollisions: zod.z.boolean().optional(),
1717
- asyncApiMessageNaming: zod.z.enum(["v1", "v2"]).optional(),
1718
- defaultIntegerFormat: zod.z.enum(["int32", "int64", "uint32", "uint64"]).optional()
1720
+ respectNullableSchemas: zod.z.boolean().optional().describe("Whether nullable schemas remain nullable in generated types."),
1721
+ titleAsSchemaName: zod.z.boolean().optional().describe("Whether a schema title can determine the generated type name."),
1722
+ coerceEnumsToLiterals: zod.z.boolean().optional().describe("Whether single-value enums are imported as literal values."),
1723
+ idiomaticRequestNames: zod.z.boolean().optional().describe("Whether request types use concise, idiomatic generated names."),
1724
+ wrapReferencesToNullableInOptional: zod.z.boolean().optional().describe("Whether nullable schema references are also treated as optional."),
1725
+ coerceOptionalSchemasToNullable: zod.z.boolean().optional().describe("Whether optional properties are represented as nullable required properties."),
1726
+ pathParameterOrder: zod.z.enum(["url-order", "spec-order"]).optional().describe("Whether path parameters follow their URL order or specification order."),
1727
+ onlyIncludeReferencedSchemas: zod.z.boolean().optional().describe("Whether unreferenced schemas are omitted from the generated SDK."),
1728
+ objectQueryParameters: zod.z.boolean().optional().describe("Whether object-valued query parameters are preserved as objects."),
1729
+ typeDatesAsStrings: zod.z.boolean().optional().describe("Whether date and date-time schemas are generated as strings."),
1730
+ groupMultiApiEnvironments: zod.z.boolean().optional().describe(
1731
+ "Whether environments from multiple API sources are merged into shared named groups."
1732
+ ),
1733
+ ignoreTags: zod.z.boolean().optional().describe("Whether API tags are ignored when organizing generated resources."),
1734
+ disambiguateRequestNames: zod.z.boolean().optional().describe("Whether colliding request type names are automatically disambiguated."),
1735
+ respectReadonlySchemas: zod.z.boolean().optional().describe(
1736
+ "Whether read-only properties are modeled separately for request and response types."
1737
+ ),
1738
+ discriminatedUnionV2: zod.z.boolean().optional().describe("Whether oneOf and anyOf schemas use the newer discriminator inference rules."),
1739
+ undiscriminatedUnionsWithLiterals: zod.z.boolean().optional().describe("Whether literal-bearing unions remain undiscriminated during import."),
1740
+ inlineAllOfSchemas: zod.z.boolean().optional().describe("Whether schemas composed with allOf are inlined when possible."),
1741
+ resolveSchemaCollisions: zod.z.boolean().optional().describe("Whether colliding imported schema names are resolved automatically."),
1742
+ asyncApiMessageNaming: zod.z.enum(["v1", "v2"]).optional().describe("The naming strategy used for messages imported from AsyncAPI."),
1743
+ defaultIntegerFormat: zod.z.enum(["int32", "int64", "uint32", "uint64"]).optional().describe("The integer format used when a schema does not declare one.")
1719
1744
  });
1720
1745
  var sourceSpecTypeSchema = zod.z.enum([
1721
1746
  "openapi",
@@ -1727,27 +1752,30 @@ var sourceSpecTypeSchema = zod.z.enum([
1727
1752
 
1728
1753
  // src/sdk-config/v1/source.ts
1729
1754
  var sourceSpecShape = {
1730
- id: nonEmptyStringSchema,
1731
- type: sourceSpecTypeSchema,
1732
- name: nonEmptyStringSchema.optional(),
1733
- namespace: nonEmptyStringSchema.optional(),
1734
- apiImportSettings: apiImportSettingsSchema.optional(),
1735
- overlays: zod.z.array(relativePathSchema).optional(),
1736
- overrides: zod.z.array(relativePathSchema).optional()
1755
+ id: nonEmptyStringSchema.describe("A unique identifier for this API source."),
1756
+ type: sourceSpecTypeSchema.describe("The API description format of this source."),
1757
+ name: nonEmptyStringSchema.optional().describe("A human-readable name for this API source."),
1758
+ namespace: nonEmptyStringSchema.optional().describe("A namespace used to isolate this source in a multi-source SDK."),
1759
+ apiImportSettings: apiImportSettingsSchema.optional().describe("Import behavior that overrides the source-level defaults for this spec."),
1760
+ overlays: zod.z.array(relativePathSchema).optional().describe("Relative paths to overlays applied to this source in order."),
1761
+ overrides: zod.z.array(relativePathSchema).optional().describe("Relative paths to source override files applied in order.")
1737
1762
  };
1738
1763
  var sdkConfigV1SourceSpecSchema = zod.z.union(
1739
1764
  [
1740
- zod.z.strictObject({ ...sourceSpecShape, path: relativePathSchema }),
1741
1765
  zod.z.strictObject({
1742
1766
  ...sourceSpecShape,
1743
- url: zod.z.url({ protocol: /^https?$/ })
1767
+ path: relativePathSchema.describe("The relative path to the API source file.")
1768
+ }),
1769
+ zod.z.strictObject({
1770
+ ...sourceSpecShape,
1771
+ url: zod.z.url({ protocol: /^https?$/ }).describe("The HTTP or HTTPS URL of the API source file.")
1744
1772
  })
1745
1773
  ],
1746
1774
  { error: "source spec must contain exactly one locator: path or HTTP(S) url" }
1747
1775
  );
1748
1776
  var sdkConfigV1SourceConfigSchema = zod.z.strictObject({
1749
- specs: zod.z.array(sdkConfigV1SourceSpecSchema).min(1, "source.specs must contain at least one source spec"),
1750
- apiImportSettings: apiImportSettingsSchema.optional()
1777
+ specs: zod.z.array(sdkConfigV1SourceSpecSchema).min(1, "source.specs must contain at least one source spec").describe("API source files in authoritative processing order."),
1778
+ apiImportSettings: apiImportSettingsSchema.optional().describe("Default import behavior shared by every source spec.")
1751
1779
  }).superRefine(({ specs }, context) => {
1752
1780
  const seenIds = /* @__PURE__ */ new Set();
1753
1781
  specs.forEach(({ id }, index) => {
@@ -1762,74 +1790,80 @@ var sdkConfigV1SourceConfigSchema = zod.z.strictObject({
1762
1790
  });
1763
1791
  });
1764
1792
  var cliGenerationConfigSchema = zod.z.strictObject({
1765
- paginationParameters: zod.z.array(nonEmptyStringSchema).optional(),
1766
- skills: zod.z.boolean().optional()
1793
+ paginationParameters: zod.z.array(nonEmptyStringSchema).optional().describe("Request parameter names treated as pagination controls by the CLI."),
1794
+ skills: zod.z.boolean().optional().describe("Whether the generated CLI includes skills that teach AI agents to invoke commands.")
1767
1795
  });
1768
1796
  var csharpGenerationConfigSchema = zod.z.strictObject({
1769
- useOptionalWrapper: zod.z.boolean().optional(),
1770
- simplifyObjectDictionaries: zod.z.boolean().optional(),
1771
- explicitNamespaces: zod.z.boolean().optional(),
1772
- rootNamespaceForCoreClasses: zod.z.boolean().optional(),
1773
- includeExceptionHandler: zod.z.boolean().optional(),
1774
- experimentalExplicitNullableOptional: zod.z.boolean().optional()
1797
+ useOptionalWrapper: zod.z.boolean().optional().describe("Whether optional values use an explicit Optional wrapper."),
1798
+ simplifyObjectDictionaries: zod.z.boolean().optional().describe("Whether object schemas with arbitrary values use simplified dictionary types."),
1799
+ explicitNamespaces: zod.z.boolean().optional().describe("Whether generated resource groups use explicit nested namespaces."),
1800
+ rootNamespaceForCoreClasses: zod.z.boolean().optional().describe("Whether shared client classes are emitted in the root namespace."),
1801
+ includeExceptionHandler: zod.z.boolean().optional().describe("Whether generated client operations use a configurable exception handler."),
1802
+ experimentalExplicitNullableOptional: zod.z.boolean().optional().describe(
1803
+ "Whether optional nullable properties distinguish omitted values from explicit nulls."
1804
+ )
1775
1805
  });
1776
1806
  var goGenerationConfigSchema = zod.z.strictObject({
1777
- legacyComplexModels: zod.z.boolean().optional(),
1807
+ legacyComplexModels: zod.z.boolean().optional().describe("Whether complex models use the legacy Go representation."),
1778
1808
  /** Uppercase common initialisms in generated names (`UserID` rather than `UserId`). */
1779
- smartCasing: zod.z.boolean().optional(),
1809
+ smartCasing: zod.z.boolean().optional().describe("Whether generated Go names capitalize common initialisms."),
1780
1810
  /** Overrides the fern root-client constructor independently from the client type name. */
1781
- clientConstructorName: nonEmptyStringSchema.optional(),
1782
- unionVersion: zod.z.enum(["v0", "v1"]).optional(),
1783
- includeLegacyClientOptions: zod.z.boolean().optional()
1811
+ clientConstructorName: nonEmptyStringSchema.optional().describe("The generated root-client constructor name."),
1812
+ unionVersion: zod.z.enum(["v0", "v1"]).optional().describe("The representation used for generated Go unions."),
1813
+ includeLegacyClientOptions: zod.z.boolean().optional().describe("Whether the client retains legacy constructor option helpers.")
1784
1814
  });
1785
1815
  var jvmGenerationConfigSchema = zod.z.strictObject({
1786
- packageLayout: zod.z.enum(["flat", "nested"]).optional(),
1787
- useLocalDateForDates: zod.z.boolean().optional(),
1788
- collapseOptionalNullable: zod.z.boolean().optional(),
1789
- gradleDistributionUrl: zod.z.string().min(1).optional(),
1790
- gradlePluginManagement: zod.z.string().optional(),
1791
- gradleCentralDependencyManagement: zod.z.boolean().optional(),
1816
+ packageLayout: zod.z.enum(["flat", "nested"]).optional().describe("Whether generated JVM packages use a flat or nested resource layout."),
1817
+ useLocalDateForDates: zod.z.boolean().optional().describe("Whether date-only values use LocalDate instead of OffsetDateTime."),
1818
+ collapseOptionalNullable: zod.z.boolean().optional().describe("Whether optional nullable values collapse into a single nullable representation."),
1819
+ gradleDistributionUrl: zod.z.string().min(1).optional().describe("The Gradle distribution URL written to the generated wrapper."),
1820
+ gradlePluginManagement: zod.z.string().optional().describe("Plugin management configuration added to the generated Gradle settings."),
1821
+ gradleCentralDependencyManagement: zod.z.boolean().optional().describe("Whether dependency versions are managed centrally in the Gradle project."),
1792
1822
  /** Selects co-located async methods or a separate async client surface. */
1793
- asyncStyle: zod.z.enum(["dedicated-client", "twin-methods"]).optional()
1823
+ asyncStyle: zod.z.enum(["dedicated-client", "twin-methods"]).optional().describe("Whether asynchronous operations use a separate client or co-located methods.")
1794
1824
  });
1795
1825
 
1796
1826
  // src/sdk-config-domain/v1/language/java.ts
1797
1827
  var javaGenerationConfigSchema = jvmGenerationConfigSchema.extend({
1798
- includeKotlinSnippets: zod.z.boolean().optional()
1828
+ includeKotlinSnippets: zod.z.boolean().optional().describe("Whether Java SDK documentation includes Kotlin usage snippets.")
1799
1829
  });
1800
1830
 
1801
1831
  // src/sdk-config-domain/v1/language/kotlin.ts
1802
1832
  var kotlinGenerationConfigSchema = jvmGenerationConfigSchema;
1803
1833
  var compilerOptionsSchema = zod.z.strictObject({
1804
- target: nonEmptyStringSchema.optional(),
1805
- module: nonEmptyStringSchema.optional(),
1806
- lib: zod.z.array(nonEmptyStringSchema).optional()
1834
+ target: nonEmptyStringSchema.optional().describe("The JavaScript language target passed to TypeScript."),
1835
+ module: nonEmptyStringSchema.optional().describe("The module format passed to TypeScript."),
1836
+ lib: zod.z.array(nonEmptyStringSchema).optional().describe("The runtime library definitions passed to TypeScript.")
1807
1837
  });
1808
1838
  var packageScriptSchema = zod.z.strictObject({
1809
- name: nonEmptyStringSchema,
1810
- command: nonEmptyStringSchema
1839
+ name: nonEmptyStringSchema.describe("The package script name."),
1840
+ command: nonEmptyStringSchema.describe("The command executed by the package script.")
1811
1841
  });
1812
1842
  var httpClientSchema = zod.z.strictObject({
1813
- name: zod.z.enum(["axios", "fetch"])
1843
+ name: zod.z.enum(["axios", "fetch"]).describe("The HTTP client used by generated TypeScript code.")
1814
1844
  });
1815
1845
  var typescriptGenerationConfigSchema = zod.z.strictObject({
1816
- typescriptVersion: nonEmptyStringSchema.optional(),
1817
- zodVersion: nonEmptyStringSchema.optional(),
1818
- compilerOptions: compilerOptionsSchema.optional(),
1819
- httpClient: httpClientSchema.optional(),
1820
- packageManager: zod.z.enum(["pnpm", "yarn"]).optional(),
1821
- testFramework: zod.z.enum(["jest", "vitest"]).optional(),
1822
- namingStrategy: zod.z.enum(["base", "originalPropertyNames"]).optional(),
1823
- bundle: zod.z.boolean().optional(),
1824
- exportClassDefault: zod.z.boolean().optional(),
1846
+ typescriptVersion: nonEmptyStringSchema.optional().describe("The TypeScript version used by the generated project."),
1847
+ zodVersion: nonEmptyStringSchema.optional().describe("The Zod version used by generated runtime schemas."),
1848
+ compilerOptions: compilerOptionsSchema.optional().describe("TypeScript compiler options for the generated project."),
1849
+ httpClient: httpClientSchema.optional().describe("The HTTP client used by generated TypeScript code."),
1850
+ packageManager: zod.z.enum(["pnpm", "yarn"]).optional().describe("The package manager used by the generated project."),
1851
+ packageManagerVersion: nonEmptyStringSchema.optional().describe("The package manager version used by the generated project."),
1852
+ testFramework: zod.z.enum(["jest", "vitest"]).optional().describe("The test framework used by generated tests."),
1853
+ namingStrategy: zod.z.enum(["base", "originalPropertyNames"]).optional().describe("How schema property names are converted into TypeScript identifiers."),
1854
+ bundle: zod.z.boolean().optional().describe("Whether the generated package includes bundled output."),
1855
+ exportClassDefault: zod.z.boolean().optional().describe("Whether the client class is also exported as the default export."),
1825
1856
  /** Name of the top-level namespace export emitted by Fern-compatible TypeScript SDKs. */
1826
- namespaceExportName: nonEmptyStringSchema.optional(),
1827
- allowCustomFetcher: zod.z.boolean().optional(),
1828
- useBrandedStringAliases: zod.z.boolean().optional(),
1829
- useLegacyExports: zod.z.boolean().optional(),
1830
- useBigInt: zod.z.boolean().optional(),
1831
- serdeLayer: zod.z.boolean().optional(),
1832
- scripts: zod.z.array(packageScriptSchema).optional()
1857
+ namespaceExportName: nonEmptyStringSchema.optional().describe("The top-level namespace export name."),
1858
+ consolidateTypeFiles: zod.z.boolean().optional().describe("Whether generated types are consolidated into fewer source files."),
1859
+ allowCustomFetcher: zod.z.boolean().optional().describe("Whether callers can supply a custom fetch implementation."),
1860
+ useBrandedStringAliases: zod.z.boolean().optional().describe("Whether string aliases are emitted as distinct branded types."),
1861
+ useLegacyExports: zod.z.boolean().optional().describe("Whether the package emits the legacy export layout."),
1862
+ useBigInt: zod.z.boolean().optional().describe("Whether 64-bit integer values are represented with bigint."),
1863
+ serdeLayer: zod.z.boolean().optional().describe("Whether generated models use Fern serialization and deserialization helpers."),
1864
+ /** Ship only the ESM build (drops CJS) to avoid the Node dual-package hazard. */
1865
+ esmOnly: zod.z.boolean().optional().describe("Whether the package emits only ECMAScript modules."),
1866
+ scripts: zod.z.array(packageScriptSchema).optional().describe("Additional scripts added to the generated package manifest.")
1833
1867
  });
1834
1868
 
1835
1869
  // src/sdk-config-domain/v1/language/mcp.ts
@@ -1844,172 +1878,183 @@ var mcpAvailabilityStatuses = [
1844
1878
  "LEGACY"
1845
1879
  ];
1846
1880
  var mcpToolFilterSchema = zod.z.strictObject({
1847
- include: zod.z.array(nonEmptyStringSchema).optional(),
1848
- exclude: zod.z.array(nonEmptyStringSchema).optional()
1881
+ include: zod.z.array(nonEmptyStringSchema).optional().describe("Operations explicitly included as MCP tools."),
1882
+ exclude: zod.z.array(nonEmptyStringSchema).optional().describe("Operations explicitly excluded from MCP tools.")
1849
1883
  });
1850
1884
  var mcpToolsetNameSchema = nonEmptyStringSchema.refine(
1851
1885
  (name) => name !== "default" && /^[a-z0-9-]+$/.test(name),
1852
1886
  'toolset names must match [a-z0-9-]+ and cannot be "default"'
1853
1887
  );
1854
1888
  var mcpGenerationConfigSchema = typescriptGenerationConfigSchema.extend({
1855
- serverName: nonEmptyStringSchema.optional(),
1856
- serverDescription: nonEmptyStringSchema.optional(),
1857
- excludeAvailability: zod.z.array(zod.z.enum(mcpAvailabilityStatuses)).optional(),
1858
- tools: mcpToolFilterSchema.optional(),
1859
- toolsets: zod.z.record(mcpToolsetNameSchema, mcpToolFilterSchema).optional()
1889
+ serverName: nonEmptyStringSchema.optional().describe("The name advertised by the generated MCP server."),
1890
+ serverDescription: nonEmptyStringSchema.optional().describe("The description advertised by the generated MCP server."),
1891
+ excludeAvailability: zod.z.array(zod.z.enum(mcpAvailabilityStatuses)).optional().describe("Operation availability statuses excluded from MCP tool generation."),
1892
+ tools: mcpToolFilterSchema.optional().describe("Global operation filters for generated MCP tools."),
1893
+ toolsets: zod.z.record(mcpToolsetNameSchema, mcpToolFilterSchema).optional().describe("Named MCP toolsets and the operation filters for each toolset.")
1860
1894
  });
1861
1895
  var phpGenerationConfigSchema = zod.z.strictObject({
1862
- propertyAccess: zod.z.enum(["public", "private"]).optional(),
1863
- generateClientInterfaces: zod.z.boolean().optional()
1896
+ propertyAccess: zod.z.enum(["public", "private"]).optional().describe("The visibility of generated PHP model properties."),
1897
+ generateClientInterfaces: zod.z.boolean().optional().describe("Whether interfaces are generated for PHP client classes.")
1864
1898
  });
1865
1899
  var pythonClientSchema = zod.z.strictObject({
1866
- fileName: nonEmptyStringSchema.optional(),
1867
- exportedFileName: nonEmptyStringSchema.optional()
1900
+ fileName: nonEmptyStringSchema.optional().describe("The source file name for the Python client."),
1901
+ exportedFileName: nonEmptyStringSchema.optional().describe("The file name used when exporting the Python client.")
1868
1902
  });
1869
1903
  var pydanticConfigSchema = zod.z.strictObject({
1870
- versionCompatibility: zod.z.enum(["v1", "v2", "both", "v1-on-v2"]).optional(),
1871
- frozen: zod.z.boolean().optional(),
1872
- requireOptionalFields: zod.z.boolean().optional(),
1873
- unionNaming: zod.z.enum(["v0", "v1"]).optional(),
1874
- useFieldAliases: zod.z.boolean().optional()
1904
+ versionCompatibility: zod.z.enum(["v1", "v2", "both", "v1-on-v2"]).optional().describe("The Pydantic major versions supported by generated models."),
1905
+ frozen: zod.z.boolean().optional().describe("Whether generated Pydantic models are immutable."),
1906
+ requireOptionalFields: zod.z.boolean().optional().describe("Whether Optional fields remain required unless they declare a default."),
1907
+ unionNaming: zod.z.enum(["v0", "v1"]).optional().describe("The naming strategy for generated union types."),
1908
+ useFieldAliases: zod.z.boolean().optional().describe("Whether Pydantic field aliases preserve wire names.")
1875
1909
  });
1876
1910
  var additionalInitExportSchema = zod.z.strictObject({
1877
- from: nonEmptyStringSchema,
1878
- imports: zod.z.array(nonEmptyStringSchema).min(1)
1911
+ from: nonEmptyStringSchema.describe("The module from which names are re-exported."),
1912
+ imports: zod.z.array(nonEmptyStringSchema).min(1).describe("Names re-exported from the module.")
1879
1913
  });
1880
1914
  var pythonGenerationConfigSchema = zod.z.strictObject({
1881
- pythonVersion: nonEmptyStringSchema.optional(),
1882
- pydanticVersion: nonEmptyStringSchema.optional(),
1883
- pydantic: pydanticConfigSchema.optional(),
1884
- client: pythonClientSchema.optional(),
1915
+ pythonVersion: nonEmptyStringSchema.optional().describe("The Python version targeted by the generated project."),
1916
+ pydanticVersion: nonEmptyStringSchema.optional().describe("The Pydantic dependency version requirement."),
1917
+ pydantic: pydanticConfigSchema.optional().describe("Pydantic model-generation behavior."),
1918
+ client: pythonClientSchema.optional().describe("Python client file naming."),
1885
1919
  /** Default followed by generated sync and async HTTP clients when the caller does not override it. */
1886
- followRedirectsByDefault: zod.z.boolean().optional(),
1920
+ followRedirectsByDefault: zod.z.boolean().optional().describe("Whether generated HTTP clients follow redirects by default."),
1887
1921
  /** Chunk size passed to Python byte-stream iterators. */
1888
- defaultBytesStreamChunkSize: zod.z.number().int().positive().optional(),
1922
+ defaultBytesStreamChunkSize: zod.z.number().int().positive().optional().describe("The default byte-stream iterator chunk size."),
1889
1923
  /** Python interpreter recursion limit installed by the generated package at import time. */
1890
- recursionLimit: zod.z.number().int().gt(1e3).optional(),
1924
+ recursionLimit: zod.z.number().int().gt(1e3).optional().describe("The Python recursion limit installed when the generated package is imported."),
1891
1925
  /** Published Python extras, keyed by extra name with package dependency names as values. */
1892
- extras: zod.z.record(nonEmptyStringSchema, zod.z.array(nonEmptyStringSchema)).optional(),
1893
- alwaysInitializeOptionals: zod.z.boolean().optional(),
1894
- useTypedDictRequests: zod.z.boolean().optional(),
1895
- additionalInitExports: zod.z.array(additionalInitExportSchema).optional()
1926
+ extras: zod.z.record(nonEmptyStringSchema, zod.z.array(nonEmptyStringSchema)).optional().describe("Published Python extras and their dependency names."),
1927
+ alwaysInitializeOptionals: zod.z.boolean().optional().describe("Whether optional model fields are initialized even when omitted."),
1928
+ useTypedDictRequests: zod.z.boolean().optional().describe("Whether request bodies are generated as TypedDict types."),
1929
+ additionalInitExports: zod.z.array(additionalInitExportSchema).optional().describe("Additional names re-exported from the package initializer.")
1896
1930
  });
1897
1931
  var rubyGenerationConfigSchema = zod.z.strictObject({
1898
- requirePaths: zod.z.array(nonEmptyStringSchema).optional()
1932
+ requirePaths: zod.z.array(nonEmptyStringSchema).optional().describe("Ruby load paths included in the generated gem specification.")
1899
1933
  });
1900
1934
  var rustGenerationConfigSchema = zod.z.strictObject({
1901
1935
  /**
1902
1936
  * Rust type for datetime primitives. `offset` maps to `DateTime<FixedOffset>` and preserves the
1903
1937
  * timezone the payload carried; `utc` maps to `DateTime<Utc>` and normalizes to UTC.
1904
1938
  */
1905
- dateTimeType: zod.z.enum(["offset", "utc"]).optional(),
1939
+ dateTimeType: zod.z.enum(["offset", "utc"]).optional().describe("Whether datetime values preserve their offset or normalize to UTC."),
1906
1940
  /** Uppercase common initialisms in generated names (`UserID` rather than `UserId`). */
1907
- capitalizeInitialisms: zod.z.boolean().optional(),
1941
+ capitalizeInitialisms: zod.z.boolean().optional().describe("Whether generated Rust names capitalize common initialisms."),
1908
1942
  /** Cargo features, mapping a feature name to the dependencies or features it enables. */
1909
- features: zod.z.record(zod.z.string(), zod.z.array(nonEmptyStringSchema)).optional(),
1943
+ features: zod.z.record(zod.z.string(), zod.z.array(nonEmptyStringSchema)).optional().describe("Cargo features and the dependencies or features each enables."),
1910
1944
  /** Overrides which features make up Cargo's `default` feature set. */
1911
- defaultFeatures: zod.z.array(nonEmptyStringSchema).optional()
1945
+ defaultFeatures: zod.z.array(nonEmptyStringSchema).optional().describe("Cargo features included in the crate default feature set.")
1912
1946
  });
1913
1947
  var swiftGenerationConfigSchema = zod.z.strictObject({
1914
- moduleName: nonEmptyStringSchema.optional(),
1915
- nullableAsOptional: zod.z.boolean().optional()
1948
+ moduleName: nonEmptyStringSchema.optional().describe("The Swift module name for the generated package."),
1949
+ nullableAsOptional: zod.z.boolean().optional().describe("Whether nullable values are represented as Swift optionals.")
1916
1950
  });
1917
1951
  var planModifierSourceSchema = zod.z.discriminatedUnion("enabled", [
1918
- zod.z.strictObject({ enabled: zod.z.literal(true), sourceDir: nonEmptyStringSchema }),
1919
- zod.z.strictObject({ enabled: zod.z.literal(false) })
1952
+ zod.z.strictObject({
1953
+ enabled: zod.z.literal(true).describe("Enables custom Terraform plan modifiers."),
1954
+ sourceDir: nonEmptyStringSchema.describe(
1955
+ "The directory containing custom plan modifier source files."
1956
+ )
1957
+ }),
1958
+ zod.z.strictObject({
1959
+ enabled: zod.z.literal(false).describe("Disables custom Terraform plan modifiers.")
1960
+ })
1920
1961
  ]);
1921
1962
  var planModifiersSchema = zod.z.strictObject({
1922
- resources: planModifierSourceSchema,
1923
- attributes: planModifierSourceSchema
1963
+ resources: planModifierSourceSchema.describe("Custom plan modifiers for generated resources."),
1964
+ attributes: planModifierSourceSchema.describe("Custom plan modifiers for generated attributes.")
1924
1965
  });
1925
1966
  var providerSchemaSchema = zod.z.strictObject({
1926
- addressKey: nonEmptyStringSchema,
1927
- authTokenKey: nonEmptyStringSchema
1967
+ addressKey: nonEmptyStringSchema.describe(
1968
+ "The provider attribute used to configure the API address."
1969
+ ),
1970
+ authTokenKey: nonEmptyStringSchema.describe(
1971
+ "The provider attribute used to configure the authentication token."
1972
+ )
1928
1973
  });
1929
1974
  var terraformGenerationConfigSchema = zod.z.strictObject({
1930
- providerName: nonEmptyStringSchema.optional(),
1931
- providerVersion: nonEmptyStringSchema.optional(),
1932
- providerModulePath: goModulePathSchema.optional(),
1933
- mockAcceptance: zod.z.boolean().optional(),
1934
- hideComputedDiff: zod.z.boolean().optional(),
1935
- providerSchema: providerSchemaSchema.optional(),
1936
- planModifiers: planModifiersSchema.optional()
1975
+ providerName: nonEmptyStringSchema.optional().describe("The Terraform provider name."),
1976
+ providerVersion: nonEmptyStringSchema.optional().describe("The generated Terraform provider version."),
1977
+ providerModulePath: goModulePathSchema.optional().describe("The Go module path for the generated provider."),
1978
+ mockAcceptance: zod.z.boolean().optional().describe("Whether acceptance tests use a mock API server."),
1979
+ hideComputedDiff: zod.z.boolean().optional().describe("Whether computed-only changes are hidden from Terraform plans."),
1980
+ providerSchema: providerSchemaSchema.optional().describe("Names of provider-level configuration attributes."),
1981
+ planModifiers: planModifiersSchema.optional().describe("Custom plan modifier source configuration.")
1937
1982
  });
1938
1983
 
1939
1984
  // src/sdk-config/v1/target.ts
1940
1985
  var targetOverrideShape = {
1941
- generatorVersion: exactSemverSchema.optional(),
1942
- sdkName: nonEmptyStringSchema.optional(),
1943
- sdkVersion: nonEmptyStringSchema.optional(),
1944
- client: sdkConfigV1ClientConfigOverrideSchema.optional(),
1945
- docs: sdkConfigV1DocsConfigSchema.optional(),
1946
- package: sdkConfigV1PackageConfigSchema.optional(),
1947
- output: sdkConfigV1OutputConfigSchema.optional()
1986
+ generatorVersion: exactSemverSchema.optional().describe("The exact generator version used for this target."),
1987
+ sdkName: nonEmptyStringSchema.optional().describe("An SDK name that overrides the root value for this target."),
1988
+ sdkVersion: nonEmptyStringSchema.optional().describe("An SDK version that overrides the root value for this target."),
1989
+ client: sdkConfigV1ClientConfigOverrideSchema.optional().describe("Client settings that override root client configuration for this target."),
1990
+ docs: sdkConfigV1DocsConfigSchema.optional().describe("Documentation settings that override root documentation for this target."),
1991
+ package: sdkConfigV1PackageConfigSchema.optional().describe("Package metadata that overrides root package configuration for this target."),
1992
+ output: sdkConfigV1OutputConfigSchema.optional().describe("Output configuration that replaces the root output for this target.")
1948
1993
  };
1949
1994
  var sdkConfigV1TargetSchema = zod.z.discriminatedUnion("language", [
1950
1995
  zod.z.strictObject({
1951
- language: zod.z.literal("typescript"),
1952
- generation: sdkConfigV1GenerationConfigOverrideSchema.extend(typescriptGenerationConfigSchema.shape).optional(),
1996
+ language: zod.z.literal("typescript").describe("Generates a TypeScript SDK."),
1997
+ generation: sdkConfigV1GenerationConfigOverrideSchema.extend(typescriptGenerationConfigSchema.shape).optional().describe("Common and TypeScript-specific generation settings for this target."),
1953
1998
  ...targetOverrideShape
1954
1999
  }),
1955
2000
  zod.z.strictObject({
1956
- language: zod.z.literal("python"),
1957
- generation: sdkConfigV1GenerationConfigOverrideSchema.extend(pythonGenerationConfigSchema.shape).optional(),
2001
+ language: zod.z.literal("python").describe("Generates a Python SDK."),
2002
+ generation: sdkConfigV1GenerationConfigOverrideSchema.extend(pythonGenerationConfigSchema.shape).optional().describe("Common and Python-specific generation settings for this target."),
1958
2003
  ...targetOverrideShape
1959
2004
  }),
1960
2005
  zod.z.strictObject({
1961
- language: zod.z.literal("java"),
1962
- generation: sdkConfigV1GenerationConfigOverrideSchema.extend(javaGenerationConfigSchema.shape).optional(),
2006
+ language: zod.z.literal("java").describe("Generates a Java SDK."),
2007
+ generation: sdkConfigV1GenerationConfigOverrideSchema.extend(javaGenerationConfigSchema.shape).optional().describe("Common and Java-specific generation settings for this target."),
1963
2008
  ...targetOverrideShape
1964
2009
  }),
1965
2010
  zod.z.strictObject({
1966
- language: zod.z.literal("kotlin"),
1967
- generation: sdkConfigV1GenerationConfigOverrideSchema.extend(kotlinGenerationConfigSchema.shape).optional(),
2011
+ language: zod.z.literal("kotlin").describe("Generates a Kotlin SDK."),
2012
+ generation: sdkConfigV1GenerationConfigOverrideSchema.extend(kotlinGenerationConfigSchema.shape).optional().describe("Common and Kotlin-specific generation settings for this target."),
1968
2013
  ...targetOverrideShape
1969
2014
  }),
1970
2015
  zod.z.strictObject({
1971
- language: zod.z.literal("go"),
1972
- generation: sdkConfigV1GenerationConfigOverrideSchema.extend(goGenerationConfigSchema.shape).optional(),
2016
+ language: zod.z.literal("go").describe("Generates a Go SDK."),
2017
+ generation: sdkConfigV1GenerationConfigOverrideSchema.extend(goGenerationConfigSchema.shape).optional().describe("Common and Go-specific generation settings for this target."),
1973
2018
  ...targetOverrideShape
1974
2019
  }),
1975
2020
  zod.z.strictObject({
1976
- language: zod.z.literal("csharp"),
1977
- generation: sdkConfigV1GenerationConfigOverrideSchema.extend(csharpGenerationConfigSchema.shape).optional(),
2021
+ language: zod.z.literal("csharp").describe("Generates a C# SDK."),
2022
+ generation: sdkConfigV1GenerationConfigOverrideSchema.extend(csharpGenerationConfigSchema.shape).optional().describe("Common and C#-specific generation settings for this target."),
1978
2023
  ...targetOverrideShape
1979
2024
  }),
1980
2025
  zod.z.strictObject({
1981
- language: zod.z.literal("php"),
1982
- generation: sdkConfigV1GenerationConfigOverrideSchema.extend(phpGenerationConfigSchema.shape).optional(),
2026
+ language: zod.z.literal("php").describe("Generates a PHP SDK."),
2027
+ generation: sdkConfigV1GenerationConfigOverrideSchema.extend(phpGenerationConfigSchema.shape).optional().describe("Common and PHP-specific generation settings for this target."),
1983
2028
  ...targetOverrideShape
1984
2029
  }),
1985
2030
  zod.z.strictObject({
1986
- language: zod.z.literal("ruby"),
1987
- generation: sdkConfigV1GenerationConfigOverrideSchema.extend(rubyGenerationConfigSchema.shape).optional(),
2031
+ language: zod.z.literal("ruby").describe("Generates a Ruby SDK."),
2032
+ generation: sdkConfigV1GenerationConfigOverrideSchema.extend(rubyGenerationConfigSchema.shape).optional().describe("Common and Ruby-specific generation settings for this target."),
1988
2033
  ...targetOverrideShape
1989
2034
  }),
1990
2035
  zod.z.strictObject({
1991
- language: zod.z.literal("rust"),
1992
- generation: sdkConfigV1GenerationConfigOverrideSchema.extend(rustGenerationConfigSchema.shape).optional(),
2036
+ language: zod.z.literal("rust").describe("Generates a Rust SDK."),
2037
+ generation: sdkConfigV1GenerationConfigOverrideSchema.extend(rustGenerationConfigSchema.shape).optional().describe("Common and Rust-specific generation settings for this target."),
1993
2038
  ...targetOverrideShape
1994
2039
  }),
1995
2040
  zod.z.strictObject({
1996
- language: zod.z.literal("swift"),
1997
- generation: sdkConfigV1GenerationConfigOverrideSchema.extend(swiftGenerationConfigSchema.shape).optional(),
2041
+ language: zod.z.literal("swift").describe("Generates a Swift SDK."),
2042
+ generation: sdkConfigV1GenerationConfigOverrideSchema.extend(swiftGenerationConfigSchema.shape).optional().describe("Common and Swift-specific generation settings for this target."),
1998
2043
  ...targetOverrideShape
1999
2044
  }),
2000
2045
  zod.z.strictObject({
2001
- language: zod.z.literal("cli"),
2002
- generation: sdkConfigV1GenerationConfigOverrideSchema.extend(cliGenerationConfigSchema.shape).optional(),
2046
+ language: zod.z.literal("cli").describe("Generates a command-line interface."),
2047
+ generation: sdkConfigV1GenerationConfigOverrideSchema.extend(cliGenerationConfigSchema.shape).optional().describe("Common and CLI-specific generation settings for this target."),
2003
2048
  ...targetOverrideShape
2004
2049
  }),
2005
2050
  zod.z.strictObject({
2006
- language: zod.z.literal("mcp"),
2007
- generation: sdkConfigV1GenerationConfigOverrideSchema.extend(mcpGenerationConfigSchema.shape).optional(),
2051
+ language: zod.z.literal("mcp").describe("Generates an MCP server."),
2052
+ generation: sdkConfigV1GenerationConfigOverrideSchema.extend(mcpGenerationConfigSchema.shape).optional().describe("Common and MCP-specific generation settings for this target."),
2008
2053
  ...targetOverrideShape
2009
2054
  }),
2010
2055
  zod.z.strictObject({
2011
- language: zod.z.literal("terraform"),
2012
- generation: sdkConfigV1GenerationConfigOverrideSchema.extend(terraformGenerationConfigSchema.shape).optional(),
2056
+ language: zod.z.literal("terraform").describe("Generates a Terraform provider."),
2057
+ generation: sdkConfigV1GenerationConfigOverrideSchema.extend(terraformGenerationConfigSchema.shape).optional().describe("Common and Terraform-specific generation settings for this target."),
2013
2058
  ...targetOverrideShape
2014
2059
  })
2015
2060
  ]);
@@ -2102,19 +2147,21 @@ function validateTargetPublishing(target, targetIndex, globalPackage, globalOutp
2102
2147
  );
2103
2148
  }
2104
2149
  var sdkConfigV1Schema = zod.z.strictObject({
2105
- schemaVersion: zod.z.literal(SDK_CONFIG_V1_SCHEMA_VERSION),
2106
- sdkName: nonEmptyStringSchema,
2107
- sdkVersion: nonEmptyStringSchema.default("1.0.0"),
2108
- apiVersion: nonEmptyStringSchema.optional(),
2109
- source: sdkConfigV1SourceConfigSchema,
2110
- api: sdkConfigV1ApiConfigSchema.prefault({}),
2111
- client: sdkConfigV1ClientConfigSchema.prefault({}),
2112
- package: sdkConfigV1PackageConfigSchema.prefault({}),
2113
- output: sdkConfigV1OutputConfigSchema.optional(),
2114
- replay: sdkConfigV1ReplayConfigSchema.optional(),
2115
- docs: sdkConfigV1DocsConfigSchema.prefault({}),
2116
- generation: sdkConfigV1GenerationConfigSchema.prefault({}),
2117
- targets: zod.z.array(sdkConfigV1TargetSchema).min(1)
2150
+ schemaVersion: zod.z.literal(SDK_CONFIG_V1_SCHEMA_VERSION).describe("The version of the customer-facing SDK Config schema."),
2151
+ sdkName: nonEmptyStringSchema.describe("The default name used for generated SDKs."),
2152
+ sdkVersion: nonEmptyStringSchema.default("1.0.0").describe("The default version assigned to generated SDKs."),
2153
+ apiVersion: nonEmptyStringSchema.optional().describe("The version of the API represented by the generated SDKs."),
2154
+ source: sdkConfigV1SourceConfigSchema.describe(
2155
+ "The API descriptions used to generate the SDKs."
2156
+ ),
2157
+ api: sdkConfigV1ApiConfigSchema.prefault({}).describe("Shared API behavior for every target."),
2158
+ client: sdkConfigV1ClientConfigSchema.prefault({}).describe("Shared generated-client behavior for every target."),
2159
+ package: sdkConfigV1PackageConfigSchema.prefault({}).describe("Package metadata inherited by every target."),
2160
+ output: sdkConfigV1OutputConfigSchema.optional().describe("The default output delivery and publication configuration."),
2161
+ replay: sdkConfigV1ReplayConfigSchema.optional().describe("Generation replay behavior shared by every target."),
2162
+ docs: sdkConfigV1DocsConfigSchema.prefault({}).describe("Documentation settings inherited by every target."),
2163
+ generation: sdkConfigV1GenerationConfigSchema.prefault({}).describe("Generation settings inherited by every target."),
2164
+ targets: zod.z.array(sdkConfigV1TargetSchema).min(1).describe("Language targets to generate; each language may appear once.")
2118
2165
  }).superRefine(({ output, package: globalPackage, targets }, context) => {
2119
2166
  const configuredLanguages = /* @__PURE__ */ new Set();
2120
2167
  targets.forEach((target, targetIndex) => {
@@ -2394,9 +2441,6 @@ function mapInvocation(generator, language, activeLanguages, index) {
2394
2441
  if (generator.keywords?.length) {
2395
2442
  generation.reservedKeywords = [...generator.keywords];
2396
2443
  }
2397
- if (generator.generateFullProject !== void 0) {
2398
- generation.generateFullProject = generator.generateFullProject;
2399
- }
2400
2444
  const settings = isObject(generator.settings) ? generator.settings : void 0;
2401
2445
  if (settings) {
2402
2446
  const inlinePathParameters = takeBoolean(settings, ["inlinePathParameters"], state, [
@@ -2427,6 +2471,7 @@ function unsupportedResolvedFields(generator, index) {
2427
2471
  "disableExamples",
2428
2472
  generator.disableExamples === false ? void 0 : generator.disableExamples
2429
2473
  ],
2474
+ ["generateFullProject", generator.generateFullProject],
2430
2475
  ["apiOverride", generator.apiOverride]
2431
2476
  ];
2432
2477
  return values.flatMap(([field, value]) => {
@@ -2456,6 +2501,11 @@ function resolvedFieldGuidance(field) {
2456
2501
  suggestedAction: "Preserve this orchestration setting outside SDK Config; public v1 has no idempotency-generation field."
2457
2502
  };
2458
2503
  }
2504
+ if (field === "generateFullProject") {
2505
+ return {
2506
+ suggestedAction: "Preserve this packaging setting on the generation request; it is not customer-authored SDK configuration."
2507
+ };
2508
+ }
2459
2509
  return {
2460
2510
  suggestedAction: "Review this Fern setting and preserve it outside SDK Config, or set an equivalent SDK Config field manually if one is introduced."
2461
2511
  };
@@ -2502,15 +2552,23 @@ function mapCommonConfig(language, config, state, client, generation, packageCon
2502
2552
  };
2503
2553
  }
2504
2554
  const pythonClient = language === "python" ? takeObject(config, ["client"], state, basePath) : void 0;
2555
+ const typescriptNaming = language === "typescript" || language === "mcp" ? takeObject(config, ["naming"], state, basePath) : void 0;
2505
2556
  const directClientName = takeString(config, ["clientName", "clientClassName"], state, basePath);
2506
- const nestedClientName = pythonClient ? takeString(pythonClient.value, ["className"], state, pythonClient.path) : void 0;
2557
+ const nestedClientName = pythonClient ? takeString(pythonClient.value, ["className"], state, pythonClient.path) : typescriptNaming ? takeString(typescriptNaming.value, ["client"], state, typescriptNaming.path) : void 0;
2507
2558
  const directExportedClientName = takeString(
2508
2559
  config,
2509
2560
  ["exportedClientName", "exportedClientClassName"],
2510
2561
  state,
2511
2562
  basePath
2512
2563
  );
2513
- const nestedExportedClientName = pythonClient ? takeString(pythonClient.value, ["exportedClassName"], state, pythonClient.path) : void 0;
2564
+ const nestedExportedClientName = pythonClient ? takeString(pythonClient.value, ["exportedClassName"], state, pythonClient.path) : typescriptNaming ? (
2565
+ // TypeScript's `naming.namespace` is the base every other naming.* field defaults from
2566
+ // (Fern's docs: `client` defaults to `${PascalCase(namespace)}Client`, same for
2567
+ // `environment`/`error`/etc.) — the same role `exportedClientName` already plays for every
2568
+ // other language's `clientPrefix` derivation.
2569
+ takeString(typescriptNaming.value, ["namespace"], state, typescriptNaming.path)
2570
+ ) : void 0;
2571
+ const nestedEnvironmentTypeName = typescriptNaming ? takeString(typescriptNaming.value, ["environment"], state, typescriptNaming.path) : void 0;
2514
2572
  const naming = compact({
2515
2573
  pagerName: takeString(
2516
2574
  config,
@@ -2520,12 +2578,7 @@ function mapCommonConfig(language, config, state, client, generation, packageCon
2520
2578
  ),
2521
2579
  clientName: directClientName ?? nestedClientName,
2522
2580
  exportedClientName: directExportedClientName ?? nestedExportedClientName,
2523
- environmentTypeName: takeString(
2524
- config,
2525
- ["environmentClassName", "environmentEnumName"],
2526
- state,
2527
- basePath
2528
- ),
2581
+ environmentTypeName: takeString(config, ["environmentClassName", "environmentEnumName"], state, basePath) ?? nestedEnvironmentTypeName,
2529
2582
  apiErrorName: takeString(config, ["baseApiExceptionClassName"], state, basePath),
2530
2583
  baseErrorName: takeString(config, ["baseExceptionClassName"], state, basePath)
2531
2584
  });
@@ -2539,8 +2592,10 @@ function mapCommonConfig(language, config, state, client, generation, packageCon
2539
2592
  basePath
2540
2593
  );
2541
2594
  if (webSockets !== void 0) generation.webSockets = webSockets;
2542
- const generateFullProject = takeBoolean(config, ["generateFullProject"], state, basePath);
2543
- if (generateFullProject !== void 0) generation.generateFullProject = generateFullProject;
2595
+ if (language === "typescript") {
2596
+ const streams = mapTypescriptStreams(config, state, basePath);
2597
+ if (streams) generation.streams = streams;
2598
+ }
2544
2599
  const inlineTypes = takeBoolean(config, ["enableInlineTypes"], state, basePath);
2545
2600
  const omitUndefined = takeBoolean(config, ["omitUndefined"], state, basePath);
2546
2601
  const forwardEnums = takeBoolean(config, ["enableForwardCompatibleEnums"], state, basePath);
@@ -2556,6 +2611,18 @@ function mapCommonConfig(language, config, state, client, generation, packageCon
2556
2611
  if (packagePath !== void 0) generation.layout = { packagePath };
2557
2612
  mapDependencies(config, state, packageConfig, basePath);
2558
2613
  }
2614
+ function mapTypescriptStreams(config, state, basePath) {
2615
+ const responseType = takeEnum(config, ["streamType"], ["wrapper", "web"], state, basePath);
2616
+ const fileResponseType = takeEnum(
2617
+ config,
2618
+ ["fileResponseType"],
2619
+ ["stream", "binary-response"],
2620
+ state,
2621
+ basePath
2622
+ );
2623
+ if (responseType === void 0 && fileResponseType === void 0) return void 0;
2624
+ return { enabled: true, ...compact({ responseType, fileResponseType }) };
2625
+ }
2559
2626
  function mapLanguageConfig(language, config, state, packageConfig, basePath) {
2560
2627
  switch (language) {
2561
2628
  case "typescript":
@@ -2589,29 +2656,39 @@ function mapLanguageConfig(language, config, state, packageConfig, basePath) {
2589
2656
  }
2590
2657
  }
2591
2658
  function mapTypescript(config, state, packageConfig, basePath) {
2592
- mapPackageManifest(config, ["packageJson"], state, packageConfig, basePath);
2659
+ const packageJsonManifest = mapPackageManifest(
2660
+ config,
2661
+ ["packageJson"],
2662
+ state,
2663
+ packageConfig,
2664
+ basePath
2665
+ );
2666
+ const packageJsonPackageManager = packageJsonManifest ? takeString(packageJsonManifest.value, ["packageManager"], state, packageJsonManifest.path) : void 0;
2667
+ const packageManagerAtIndex = packageJsonPackageManager ? packageJsonPackageManager.indexOf("@", packageJsonPackageManager.startsWith("@") ? 1 : 0) : -1;
2668
+ const packageManagerVersionPart = packageManagerAtIndex >= 0 ? packageJsonPackageManager?.slice(packageManagerAtIndex + 1).split("+")[0] : void 0;
2669
+ const packageManagerVersion = packageManagerVersionPart || void 0;
2593
2670
  const serdeLayer = takeBoolean(config, ["serdeLayer"], state, basePath);
2594
2671
  const noSerdeLayer = takeBoolean(config, ["noSerdeLayer"], state, basePath);
2595
2672
  const fetchSupport = takeEnum(config, ["fetchSupport"], ["native"], state, basePath);
2673
+ const namingObject = takeObject(config, ["naming"], state, basePath);
2674
+ const nestedNamespace = namingObject ? takeString(namingObject.value, ["namespace"], state, namingObject.path) : void 0;
2596
2675
  return compact({
2597
2676
  typescriptVersion: takeString(config, ["typescriptVersion"], state, basePath),
2598
2677
  zodVersion: takeString(config, ["zodVersion"], state, basePath),
2599
2678
  packageManager: takeEnum(config, ["packageManager"], ["pnpm", "yarn"], state, basePath),
2679
+ packageManagerVersion,
2600
2680
  testFramework: takeEnum(config, ["testFramework"], ["jest", "vitest"], state, basePath),
2601
2681
  httpClient: fetchSupport === "native" ? { name: "fetch" } : void 0,
2602
2682
  bundle: takeBoolean(config, ["bundle"], state, basePath),
2603
2683
  exportClassDefault: takeBoolean(config, ["exportClassDefault"], state, basePath),
2604
- namespaceExportName: takeString(
2605
- config,
2606
- ["namespaceExportName", "namespaceExport"],
2607
- state,
2608
- basePath
2609
- ),
2684
+ namespaceExportName: takeString(config, ["namespaceExportName", "namespaceExport"], state, basePath) ?? nestedNamespace,
2685
+ consolidateTypeFiles: takeBoolean(config, ["consolidateTypeFiles"], state, basePath),
2610
2686
  allowCustomFetcher: takeBoolean(config, ["allowCustomFetcher"], state, basePath),
2611
2687
  useBrandedStringAliases: takeBoolean(config, ["useBrandedStringAliases"], state, basePath),
2612
2688
  useLegacyExports: takeBoolean(config, ["useLegacyExports"], state, basePath),
2613
2689
  useBigInt: takeBoolean(config, ["useBigInt"], state, basePath),
2614
- serdeLayer: serdeLayer ?? (noSerdeLayer === void 0 ? void 0 : !noSerdeLayer)
2690
+ serdeLayer: serdeLayer ?? (noSerdeLayer === void 0 ? void 0 : !noSerdeLayer),
2691
+ esmOnly: takeBoolean(config, ["esmOnly"], state, basePath)
2615
2692
  });
2616
2693
  }
2617
2694
  function mapPython(config, state, packageConfig, basePath) {
@@ -2722,7 +2799,8 @@ function mapCsharp(config, state, packageConfig, basePath) {
2722
2799
  });
2723
2800
  }
2724
2801
  function mapPhp(config, state, packageConfig, basePath) {
2725
- mapPackageManifest(config, ["composerJson"], state, packageConfig, basePath);
2802
+ const manifest = mapPackageManifest(config, ["composerJson"], state, packageConfig, basePath);
2803
+ if (manifest) mapComposerRequirements(manifest, state, packageConfig);
2726
2804
  const packageName = takeString(config, ["packageName"], state, basePath);
2727
2805
  if (packageName !== void 0) packageConfig.packageName = packageName;
2728
2806
  return compact({
@@ -2730,6 +2808,20 @@ function mapPhp(config, state, packageConfig, basePath) {
2730
2808
  generateClientInterfaces: takeBoolean(config, ["generateClientInterfaces"], state, basePath)
2731
2809
  });
2732
2810
  }
2811
+ function mapComposerRequirements(manifest, state, packageConfig) {
2812
+ const fields = [
2813
+ ["require", "extraDependencies"],
2814
+ ["require-dev", "extraDevDependencies"]
2815
+ ];
2816
+ for (const [composerField, packageField] of fields) {
2817
+ const located = takeObject(manifest.value, [composerField], state, manifest.path);
2818
+ if (!located) continue;
2819
+ const dependencies = Object.entries(located.value).flatMap(
2820
+ ([name, dependency]) => mapDependency(name, dependency, state, [...located.path, name])
2821
+ );
2822
+ if (dependencies.length) packageConfig[packageField] = dependencies;
2823
+ }
2824
+ }
2733
2825
  function mapRuby(config, state, packageConfig, basePath) {
2734
2826
  const moduleName = takeString(config, ["moduleName"], state, basePath);
2735
2827
  if (moduleName !== void 0) packageConfig.moduleName = moduleName;
@@ -2899,28 +2991,52 @@ function takeCustomSections(value, language, activeLanguages, state, basePath) {
2899
2991
  }
2900
2992
  function mapPackageManifest(config, aliases, state, packageConfig, basePath) {
2901
2993
  const manifest = takeObject(config, aliases, state, basePath);
2902
- if (!manifest) return;
2994
+ if (!manifest) return void 0;
2903
2995
  const packageName = takeString(manifest.value, ["name"], state, manifest.path);
2904
2996
  const description = takeString(manifest.value, ["description"], state, manifest.path);
2997
+ const keywords = takeStringArray(manifest.value, ["keywords"], state, manifest.path);
2905
2998
  const license = takeString(manifest.value, ["license"], state, manifest.path);
2906
2999
  const author = takeObject(manifest.value, ["author"], state, manifest.path);
2907
3000
  const authorName = author ? takeString(author.value, ["name"], state, author.path) : void 0;
2908
- const authors = authorName && author ? [
2909
- compact({
2910
- name: authorName,
2911
- email: takeString(author.value, ["email"], state, author.path),
2912
- url: takeString(author.value, ["url"], state, author.path)
2913
- })
2914
- ] : void 0;
3001
+ const authors = [
3002
+ ...authorName && author ? [
3003
+ compact({
3004
+ name: authorName,
3005
+ email: takeString(author.value, ["email"], state, author.path),
3006
+ url: takeString(author.value, ["url"], state, author.path)
3007
+ })
3008
+ ] : [],
3009
+ ...takeManifestAuthors(manifest, state)
3010
+ ];
2915
3011
  Object.assign(
2916
3012
  packageConfig,
2917
3013
  compact({
2918
3014
  packageName,
2919
3015
  description,
2920
- authors,
3016
+ homepage: takeString(manifest.value, ["homepage"], state, manifest.path),
3017
+ keywords,
3018
+ authors: authors.length ? authors : void 0,
2921
3019
  license: license ? { type: license } : void 0
2922
3020
  })
2923
3021
  );
3022
+ return manifest;
3023
+ }
3024
+ function takeManifestAuthors(manifest, state) {
3025
+ const located = locate(manifest.value, ["authors"], manifest.path);
3026
+ if (!located || !Array.isArray(located.value)) return [];
3027
+ return located.value.flatMap((entry, index) => {
3028
+ if (!isObject(entry)) return [];
3029
+ const path = [...located.path, index];
3030
+ const name = takeString(entry, ["name"], state, path);
3031
+ if (!name) return [];
3032
+ return [
3033
+ compact({
3034
+ name,
3035
+ email: takeString(entry, ["email"], state, path),
3036
+ url: takeString(entry, ["url"], state, path)
3037
+ })
3038
+ ];
3039
+ });
2924
3040
  }
2925
3041
  function takePythonAdditionalInitExports(config, state, basePath) {
2926
3042
  const located = locate(config, ["additionalInitExports"], basePath);
@@ -3015,71 +3131,90 @@ function takeToolsets(value, aliases, state, basePath) {
3015
3131
  return Object.fromEntries(entries.filter((entry) => entry !== void 0));
3016
3132
  }
3017
3133
  var unsupportedFieldSchema = zod.z.strictObject({
3018
- source: zod.z.enum(["fern", "postman", "sdk-config-ir"]),
3019
- path: zod.z.array(zod.z.union([nonEmptyStringSchema, zod.z.number().int().nonnegative()])).min(1),
3020
- code: nonEmptyStringSchema.optional(),
3021
- reason: nonEmptyStringSchema,
3022
- severity: zod.z.enum(["error", "warning", "info"]),
3023
- risk: zod.z.enum(["high", "medium", "low"]),
3024
- owner: nonEmptyStringSchema,
3025
- suggestedAction: nonEmptyStringSchema
3134
+ source: zod.z.enum(["fern", "postman", "sdk-config-ir"]).describe("The configuration surface containing the unsupported field."),
3135
+ path: zod.z.array(zod.z.union([nonEmptyStringSchema, zod.z.number().int().nonnegative()])).min(1).describe("The property path to the unsupported field in its source configuration."),
3136
+ code: nonEmptyStringSchema.optional().describe("A stable diagnostic code for the unsupported field."),
3137
+ reason: nonEmptyStringSchema.describe(
3138
+ "Why the field could not be represented in normalized configuration."
3139
+ ),
3140
+ severity: zod.z.enum(["error", "warning", "info"]).describe("The diagnostic severity."),
3141
+ risk: zod.z.enum(["high", "medium", "low"]).describe("The migration risk of omitting this field."),
3142
+ owner: nonEmptyStringSchema.describe("The component or team responsible for resolving the gap."),
3143
+ suggestedAction: nonEmptyStringSchema.describe(
3144
+ "Recommended action for preserving the intended behavior."
3145
+ )
3026
3146
  });
3027
3147
  var postmanLegacyInputSchema = zod.z.strictObject({
3028
- kind: zod.z.literal("postman-build-parameters"),
3029
- value: jsonObjectSchema
3148
+ kind: zod.z.literal("postman-build-parameters").describe("Identifies legacy Postman build parameters."),
3149
+ value: jsonObjectSchema.describe("A debugging copy of the original Postman build parameters.")
3030
3150
  });
3031
3151
  var fernLegacyInputSchema = zod.z.strictObject({
3032
- kind: zod.z.literal("fern-generator-invocation"),
3033
- value: jsonObjectSchema
3152
+ kind: zod.z.literal("fern-generator-invocation").describe("Identifies a legacy Fern generator invocation."),
3153
+ value: jsonObjectSchema.describe("A debugging copy of the original Fern generator invocation.")
3034
3154
  });
3035
3155
  var legacyInputSchema = zod.z.discriminatedUnion("kind", [
3036
3156
  postmanLegacyInputSchema,
3037
3157
  fernLegacyInputSchema
3038
3158
  ]);
3039
3159
  var compatibilityConfigSchema = zod.z.strictObject({
3040
- outputProfile: zod.z.enum(["converged", "postman-legacy", "fern-legacy"]),
3041
- legacyInput: legacyInputSchema.optional(),
3042
- unsupportedFields: zod.z.array(unsupportedFieldSchema).optional()
3160
+ outputProfile: zod.z.enum(["converged", "postman-legacy", "fern-legacy"]).describe("The output-default profile retained while legacy producers converge."),
3161
+ legacyInput: legacyInputSchema.optional().describe("Original producer input retained only for migration debugging."),
3162
+ unsupportedFields: zod.z.array(unsupportedFieldSchema).optional().describe("Legacy fields that could not be represented in normalized configuration.")
3043
3163
  });
3044
3164
  var generationAssetSchema = zod.z.discriminatedUnion("type", [
3045
- zod.z.strictObject({ type: zod.z.literal("path"), location: relativePathSchema }),
3046
- zod.z.strictObject({ type: zod.z.literal("url"), location: nonEmptyStringSchema }),
3047
- zod.z.strictObject({ type: zod.z.literal("artifact"), location: nonEmptyStringSchema })
3165
+ zod.z.strictObject({
3166
+ type: zod.z.literal("path").describe("Loads the generation asset from a relative path."),
3167
+ location: relativePathSchema.describe("The relative path to the generation asset.")
3168
+ }),
3169
+ zod.z.strictObject({
3170
+ type: zod.z.literal("url").describe("Loads the generation asset from a URL."),
3171
+ location: nonEmptyStringSchema.describe("The URL of the generation asset.")
3172
+ }),
3173
+ zod.z.strictObject({
3174
+ type: zod.z.literal("artifact").describe("Loads the generation asset from stored build output."),
3175
+ location: nonEmptyStringSchema.describe("The artifact identifier or location.")
3176
+ })
3048
3177
  ]);
3049
- var hookDependencySchema2 = zod.z.strictObject({
3050
- name: nonEmptyStringSchema,
3051
- version: nonEmptyStringSchema,
3052
- groupId: nonEmptyStringSchema.optional()
3178
+ var hookDependencySchema = zod.z.strictObject({
3179
+ name: nonEmptyStringSchema.describe("The hook dependency name."),
3180
+ version: nonEmptyStringSchema.describe("The hook dependency version requirement."),
3181
+ groupId: nonEmptyStringSchema.optional().describe("The Maven group identifier for the dependency.")
3053
3182
  });
3054
- var hooksConfigSchema2 = zod.z.strictObject({
3055
- enabled: zod.z.boolean(),
3056
- source: generationAssetSchema.optional(),
3057
- dependencies: zod.z.array(hookDependencySchema2).optional()
3183
+ var hooksConfigSchema = zod.z.strictObject({
3184
+ enabled: zod.z.boolean().describe("Whether custom request and response hooks are generated."),
3185
+ source: generationAssetSchema.optional().describe("The source containing custom hook implementations."),
3186
+ dependencies: zod.z.array(hookDependencySchema).optional().describe("Dependencies required by custom hooks.")
3058
3187
  });
3059
3188
  var customCodeConfigSchema2 = zod.z.strictObject({
3060
- enabled: zod.z.boolean(),
3061
- source: generationAssetSchema.optional(),
3062
- conflictStrategy: zod.z.enum(["mark", "ours", "theirs"]).optional(),
3063
- trackChanges: zod.z.boolean().optional(),
3064
- previousBuildId: zod.z.number().int().positive().optional(),
3065
- protectedFiles: zod.z.array(nonEmptyStringSchema).optional()
3189
+ enabled: zod.z.boolean().describe("Whether customer-authored code is merged into generated output."),
3190
+ source: generationAssetSchema.optional().describe("The source containing customer-authored code."),
3191
+ conflictStrategy: zod.z.enum(["mark", "ours", "theirs"]).optional().describe("How merge conflicts between generated and custom code are handled."),
3192
+ trackChanges: zod.z.boolean().optional().describe("Whether custom-code changes are tracked between builds."),
3193
+ previousBuildId: zod.z.number().int().positive().optional().describe("The previous build used as the merge baseline."),
3194
+ protectedFiles: zod.z.array(nonEmptyStringSchema).optional().describe("Generated file paths that custom-code merging must not overwrite.")
3066
3195
  });
3067
- var workflowConfigSchema2 = zod.z.strictObject({
3068
- path: relativePathSchema,
3069
- outputName: nonEmptyStringSchema.optional()
3196
+ var workflowConfigSchema = zod.z.strictObject({
3197
+ path: relativePathSchema.describe("The relative path to the workflow definition."),
3198
+ outputName: nonEmptyStringSchema.optional().describe("The file name used for the generated workflow.")
3070
3199
  });
3071
3200
  var analyticsHeaderSchema2 = zod.z.union([
3072
- zod.z.strictObject({ name: nonEmptyStringSchema, value: zod.z.string() }),
3073
- zod.z.strictObject({ name: nonEmptyStringSchema, valueRef: nonEmptyStringSchema })
3201
+ zod.z.strictObject({
3202
+ name: nonEmptyStringSchema.describe("The exported telemetry header name."),
3203
+ value: zod.z.string().describe("The literal telemetry header value.")
3204
+ }),
3205
+ zod.z.strictObject({
3206
+ name: nonEmptyStringSchema.describe("The exported telemetry header name."),
3207
+ valueRef: nonEmptyStringSchema.describe("A reference to the telemetry header value.")
3208
+ })
3074
3209
  ]);
3075
3210
  var analyticsConfigSchema2 = zod.z.strictObject({
3076
- enabled: zod.z.boolean(),
3077
- endpoint: nonEmptyStringSchema.optional(),
3078
- exporter: zod.z.enum(["otlp-http", "console"]).optional(),
3079
- headers: zod.z.array(analyticsHeaderSchema2).optional(),
3080
- batchSize: zod.z.number().int().positive().optional(),
3081
- scheduledDelayMs: zod.z.number().nonnegative().optional(),
3082
- exportTimeoutMs: zod.z.number().nonnegative().optional()
3211
+ enabled: zod.z.boolean().describe("Whether generated clients export usage telemetry."),
3212
+ endpoint: nonEmptyStringSchema.optional().describe("The telemetry export endpoint."),
3213
+ exporter: zod.z.enum(["otlp-http", "console"]).optional().describe("The telemetry exporter implementation."),
3214
+ headers: zod.z.array(analyticsHeaderSchema2).optional().describe("Headers sent by the telemetry exporter."),
3215
+ batchSize: zod.z.number().int().positive().optional().describe("The maximum spans in each export batch."),
3216
+ scheduledDelayMs: zod.z.number().nonnegative().optional().describe("The delay between scheduled exports, in milliseconds."),
3217
+ exportTimeoutMs: zod.z.number().nonnegative().optional().describe("The maximum time allowed for an export, in milliseconds.")
3083
3218
  }).superRefine(({ enabled, endpoint }, context) => {
3084
3219
  if (enabled && endpoint === void 0) {
3085
3220
  context.addIssue({
@@ -3090,91 +3225,93 @@ var analyticsConfigSchema2 = zod.z.strictObject({
3090
3225
  }
3091
3226
  });
3092
3227
  var wireTestsSchema2 = zod.z.strictObject({
3093
- enabled: zod.z.boolean(),
3094
- exclusions: zod.z.array(nonEmptyStringSchema).optional(),
3095
- fallbackToGeneratedErrorExamples: zod.z.boolean().optional(),
3096
- fixtureSource: zod.z.enum(["synthetic", "recorded", "auto"]).optional()
3228
+ enabled: zod.z.boolean().describe("Whether wire-level request and response tests are generated."),
3229
+ exclusions: zod.z.array(nonEmptyStringSchema).optional().describe("Operations excluded from wire tests."),
3230
+ fallbackToGeneratedErrorExamples: zod.z.boolean().optional().describe("Whether missing error fixtures are synthesized from generated examples."),
3231
+ fixtureSource: zod.z.enum(["synthetic", "recorded", "auto"]).optional().describe("Where wire-test fixtures are obtained.")
3097
3232
  });
3098
3233
  var unitTestsSchema2 = zod.z.strictObject({
3099
- enabled: zod.z.boolean(),
3100
- mode: zod.z.enum(["core-runtime", "schema-driven", "both"]).optional(),
3101
- exclusions: zod.z.array(nonEmptyStringSchema).optional()
3234
+ enabled: zod.z.boolean().describe("Whether SDK unit tests are generated."),
3235
+ mode: zod.z.enum(["core-runtime", "schema-driven", "both"]).optional().describe("The unit-test generation strategy."),
3236
+ exclusions: zod.z.array(nonEmptyStringSchema).optional().describe("Operations excluded from unit tests.")
3102
3237
  });
3103
3238
  var fernDefinitionMetadataSchema = zod.z.strictObject({
3104
- definitionS3DownloadUrl: nonEmptyStringSchema,
3105
- outputPath: nonEmptyStringSchema.optional(),
3106
- cliVersion: nonEmptyStringSchema.optional()
3239
+ definitionS3DownloadUrl: nonEmptyStringSchema.describe(
3240
+ "The download URL for the materialized Fern definition archive."
3241
+ ),
3242
+ outputPath: nonEmptyStringSchema.optional().describe("The destination path for Fern definition support files."),
3243
+ cliVersion: nonEmptyStringSchema.optional().describe("The Fern CLI version associated with the definition.")
3107
3244
  });
3108
3245
  var streamsSchema2 = zod.z.strictObject({
3109
- enabled: zod.z.boolean(),
3110
- responseType: zod.z.enum(["wrapper", "native", "web"]).optional(),
3111
- fileResponseType: zod.z.enum(["stream", "binary-response"]).optional(),
3112
- defaultChunkSizeBytes: zod.z.number().int().positive().optional()
3246
+ enabled: zod.z.boolean().describe("Whether generated clients expose streaming response APIs."),
3247
+ responseType: zod.z.enum(["wrapper", "native", "web"]).optional().describe("The streaming response abstraction exposed by generated clients."),
3248
+ fileResponseType: zod.z.enum(["stream", "binary-response"]).optional().describe("The response type used for file downloads."),
3249
+ defaultChunkSizeBytes: zod.z.number().int().positive().optional().describe("The default number of bytes yielded by streaming iterators.")
3113
3250
  });
3114
3251
  var layoutConfigSchema2 = zod.z.strictObject({
3115
- outputDirectory: zod.z.enum(["project-root", "source-root"]).optional(),
3116
- packagePath: nonEmptyStringSchema.optional()
3252
+ outputDirectory: zod.z.enum(["project-root", "source-root"]).optional().describe("Whether generated source is rooted at the project or its source directory."),
3253
+ packagePath: nonEmptyStringSchema.optional().describe("The package-relative path for generated source files.")
3117
3254
  });
3118
3255
  var serializationConfigSchema2 = zod.z.strictObject({
3119
- enumRepresentation: zod.z.enum(["enum", "union", "literal", "forward-compatible-enum", "language-default"]).optional(),
3120
- additionalProperties: zod.z.enum(["allow", "forbid", "ignore", "language-default"]).optional(),
3121
- inlineTypes: zod.z.boolean().optional(),
3122
- omitUndefined: zod.z.boolean().optional()
3256
+ enumRepresentation: zod.z.enum(["enum", "union", "literal", "forward-compatible-enum", "language-default"]).optional().describe("How schema enums are represented in generated code."),
3257
+ additionalProperties: zod.z.enum(["allow", "forbid", "ignore", "language-default"]).optional().describe("How undeclared object properties are handled."),
3258
+ inlineTypes: zod.z.boolean().optional().describe("Whether inline schemas remain nested under their parent types."),
3259
+ omitUndefined: zod.z.boolean().optional().describe("Whether undefined properties are omitted during serialization.")
3123
3260
  });
3124
3261
  var languageGenerationConfigSchema = zod.z.strictObject({
3125
- typescript: typescriptGenerationConfigSchema.optional(),
3126
- python: pythonGenerationConfigSchema.optional(),
3127
- java: javaGenerationConfigSchema.optional(),
3128
- kotlin: kotlinGenerationConfigSchema.optional(),
3129
- go: goGenerationConfigSchema.optional(),
3130
- csharp: csharpGenerationConfigSchema.optional(),
3131
- php: phpGenerationConfigSchema.optional(),
3132
- ruby: rubyGenerationConfigSchema.optional(),
3133
- rust: rustGenerationConfigSchema.optional(),
3134
- cli: cliGenerationConfigSchema.optional(),
3135
- mcp: mcpGenerationConfigSchema.optional(),
3136
- swift: swiftGenerationConfigSchema.optional(),
3137
- terraform: terraformGenerationConfigSchema.optional()
3262
+ typescript: typescriptGenerationConfigSchema.optional().describe("TypeScript-specific generation settings."),
3263
+ python: pythonGenerationConfigSchema.optional().describe("Python-specific generation settings."),
3264
+ java: javaGenerationConfigSchema.optional().describe("Java-specific generation settings."),
3265
+ kotlin: kotlinGenerationConfigSchema.optional().describe("Kotlin-specific generation settings."),
3266
+ go: goGenerationConfigSchema.optional().describe("Go-specific generation settings."),
3267
+ csharp: csharpGenerationConfigSchema.optional().describe("C#-specific generation settings."),
3268
+ php: phpGenerationConfigSchema.optional().describe("PHP-specific generation settings."),
3269
+ ruby: rubyGenerationConfigSchema.optional().describe("Ruby-specific generation settings."),
3270
+ rust: rustGenerationConfigSchema.optional().describe("Rust-specific generation settings."),
3271
+ cli: cliGenerationConfigSchema.optional().describe("CLI-specific generation settings."),
3272
+ mcp: mcpGenerationConfigSchema.optional().describe("MCP-specific generation settings."),
3273
+ swift: swiftGenerationConfigSchema.optional().describe("Swift-specific generation settings."),
3274
+ terraform: terraformGenerationConfigSchema.optional().describe("Terraform-specific generation settings.")
3138
3275
  });
3139
3276
  var generationConfigSchema = zod.z.strictObject({
3140
- includeWatermark: zod.z.boolean().default(false),
3277
+ includeWatermark: zod.z.boolean().default(false).describe("Whether generated files include a generator watermark."),
3141
3278
  /** Emits an AI service into the generated SDK. Python, Java and TypeScript honour it. */
3142
- ai: zod.z.boolean().default(false),
3143
- includeOptionalSnippetParameters: zod.z.boolean().optional(),
3144
- buildAllModels: zod.z.boolean().default(false),
3145
- inferServiceNames: zod.z.boolean().default(false),
3146
- includeDeprecatedOperations: zod.z.boolean().default(true),
3147
- multipleResponses: zod.z.boolean().default(false),
3279
+ ai: zod.z.boolean().default(false).describe("Whether the SDK includes generated AI service helpers."),
3280
+ includeOptionalSnippetParameters: zod.z.boolean().optional().describe("Whether usage snippets include optional request parameters."),
3281
+ buildAllModels: zod.z.boolean().default(false).describe("Whether models not referenced by operations are also generated."),
3282
+ inferServiceNames: zod.z.boolean().default(false).describe("Whether service names are inferred from API structure."),
3283
+ includeDeprecatedOperations: zod.z.boolean().default(true).describe("Whether deprecated API operations are generated."),
3284
+ multipleResponses: zod.z.boolean().default(false).describe("Whether operations model multiple successful response types."),
3148
3285
  /** Generate the entire SDK project, including package manifests and publishable artifacts. */
3149
- generateFullProject: zod.z.boolean().default(false),
3150
- devContainer: zod.z.boolean().default(false),
3151
- allowMockClient: zod.z.boolean().default(false),
3152
- ignoreFiles: zod.z.array(nonEmptyStringSchema).optional(),
3286
+ generateFullProject: zod.z.boolean().default(false).describe("Whether generation emits a complete publishable project."),
3287
+ devContainer: zod.z.boolean().default(false).describe("Whether development-container configuration is generated."),
3288
+ allowMockClient: zod.z.boolean().default(false).describe("Whether a mock API client is included in the generated SDK."),
3289
+ ignoreFiles: zod.z.array(nonEmptyStringSchema).optional().describe("Generated paths excluded from the final output."),
3153
3290
  /**
3154
3291
  * Raw .fernignore file contents supplied to external publishers that need Fern ignore semantics.
3155
3292
  * This is separate from generation.ignoreFiles because raw contents preserve comments, ordering,
3156
3293
  * blank lines, and negation rules.
3157
3294
  */
3158
- fernignoreContents: zod.z.string().optional(),
3295
+ fernignoreContents: zod.z.string().optional().describe("The raw .fernignore contents retained for external publishers."),
3159
3296
  /**
3160
3297
  * Optional Fern definition metadata for publisher paths that need to write definition or
3161
3298
  * mock-server support files. This is not required for core GitHub artifact publishing.
3162
3299
  */
3163
- fernDefinitionMetadata: fernDefinitionMetadataSchema.optional(),
3164
- reservedKeywords: zod.z.array(nonEmptyStringSchema).optional(),
3165
- hooks: hooksConfigSchema2.optional(),
3166
- customCode: customCodeConfigSchema2.optional(),
3167
- workflows: zod.z.array(workflowConfigSchema2).optional(),
3168
- customQueryPaths: zod.z.array(relativePathSchema).optional(),
3169
- analytics: analyticsConfigSchema2.optional(),
3170
- wireTests: wireTestsSchema2.optional(),
3171
- unitTests: unitTestsSchema2.optional(),
3172
- webSockets: zod.z.boolean().optional(),
3173
- streams: streamsSchema2.optional(),
3174
- naming: namingConfigSchema.optional(),
3175
- layout: layoutConfigSchema2.optional(),
3176
- serialization: serializationConfigSchema2.optional(),
3177
- language: languageGenerationConfigSchema.optional()
3300
+ fernDefinitionMetadata: fernDefinitionMetadataSchema.optional().describe("Materialized Fern definition metadata used by external publishers."),
3301
+ reservedKeywords: zod.z.array(nonEmptyStringSchema).optional().describe("Additional identifiers treated as reserved words."),
3302
+ hooks: hooksConfigSchema.optional().describe("Custom SDK request and response hook configuration."),
3303
+ customCode: customCodeConfigSchema2.optional().describe("Customer-authored code merge configuration."),
3304
+ workflows: zod.z.array(workflowConfigSchema).optional().describe("Workflow definitions included in generated output."),
3305
+ customQueryPaths: zod.z.array(relativePathSchema).optional().describe("Relative paths to custom query definitions."),
3306
+ analytics: analyticsConfigSchema2.optional().describe("Generated client telemetry configuration."),
3307
+ wireTests: wireTestsSchema2.optional().describe("Wire-level request and response test generation."),
3308
+ unitTests: unitTestsSchema2.optional().describe("SDK unit-test generation."),
3309
+ webSockets: zod.z.boolean().optional().describe("Whether WebSocket clients are generated for supported channels."),
3310
+ streams: streamsSchema2.optional().describe("Streaming response generation behavior."),
3311
+ naming: namingConfigSchema.optional().describe("Names and casing used by generated code."),
3312
+ layout: layoutConfigSchema2.optional().describe("Generated project and source layout."),
3313
+ serialization: serializationConfigSchema2.optional().describe("Generated model serialization behavior."),
3314
+ language: languageGenerationConfigSchema.optional().describe("Settings specific to the selected target language.")
3178
3315
  });
3179
3316
  var publishRegistrySchema = zod.z.enum([
3180
3317
  "npm",
@@ -3192,154 +3329,160 @@ var credentialResolutionSchema = zod.z.enum([
3192
3329
  "resolved-by-fiddle"
3193
3330
  ]);
3194
3331
  var registryCredentialsSchema = zod.z.strictObject({
3195
- username: nonEmptyStringSchema.optional(),
3196
- password: nonEmptyStringSchema.optional(),
3197
- token: nonEmptyStringSchema.optional(),
3198
- apiKey: nonEmptyStringSchema.optional()
3332
+ username: nonEmptyStringSchema.optional().describe("The resolved credential username."),
3333
+ password: nonEmptyStringSchema.optional().describe("The resolved credential password."),
3334
+ token: nonEmptyStringSchema.optional().describe("The resolved credential token."),
3335
+ apiKey: nonEmptyStringSchema.optional().describe("The resolved credential API key.")
3199
3336
  });
3200
3337
  var commonPublishShape2 = {
3201
- url: nonEmptyStringSchema.optional(),
3338
+ url: nonEmptyStringSchema.optional().describe("A custom package registry URL."),
3202
3339
  /** Reference to registry publishing credentials. */
3203
- credentialsRef: nonEmptyStringSchema.optional(),
3340
+ credentialsRef: nonEmptyStringSchema.optional().describe("A reference to registry publishing credentials."),
3204
3341
  /** Raw registry credentials. These values can be sensitive and must be handled as secrets. */
3205
- credentials: registryCredentialsSchema.optional(),
3342
+ credentials: registryCredentialsSchema.optional().describe("Resolved registry publishing credentials."),
3206
3343
  /**
3207
3344
  * Registry-specific package version override. If omitted, the external publisher/orchestrator may
3208
3345
  * fall back to target.sdkVersion.
3209
3346
  */
3210
- version: nonEmptyStringSchema.optional(),
3211
- releaseBranch: nonEmptyStringSchema.optional(),
3212
- tolerateRepublish: zod.z.boolean().optional(),
3347
+ version: nonEmptyStringSchema.optional().describe("A registry-specific package version override."),
3348
+ releaseBranch: nonEmptyStringSchema.optional().describe("The branch used by generated package release workflows."),
3349
+ tolerateRepublish: zod.z.boolean().optional().describe("Whether publishing succeeds when this package version already exists."),
3213
3350
  /** Generate registry publishing workflow files when publishing through GitHub delivery. */
3214
- shouldGeneratePublishWorkflow: zod.z.boolean().optional()
3351
+ shouldGeneratePublishWorkflow: zod.z.boolean().optional().describe("Whether GitHub delivery includes a registry publishing workflow.")
3215
3352
  };
3216
3353
  var trustedPublishingShape = {
3217
3354
  /** Use registry trusted publishing / OIDC instead of a static token secret. */
3218
- trustedPublishing: zod.z.boolean().optional()
3355
+ trustedPublishing: zod.z.boolean().optional().describe("Whether registry publication uses trusted publishing or OIDC.")
3219
3356
  };
3220
3357
  var mavenCoordinateSchema = nonEmptyStringSchema.regex(
3221
3358
  /^[A-Za-z0-9_.-]+:[A-Za-z0-9_.-]+$/,
3222
3359
  "Maven coordinate must be in groupId:artifactId form"
3223
3360
  );
3224
3361
  var mavenSignatureEnvironmentSchema = zod.z.strictObject({
3225
- keyIdEnvironmentVariable: nonEmptyStringSchema.optional(),
3226
- passwordEnvironmentVariable: nonEmptyStringSchema.optional(),
3227
- secretKeyEnvironmentVariable: nonEmptyStringSchema.optional()
3362
+ keyIdEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the signing key ID."),
3363
+ passwordEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the signing key password."),
3364
+ secretKeyEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the armored secret key.")
3228
3365
  });
3229
3366
  var mavenSignatureSchema2 = zod.z.strictObject({
3230
- keyId: nonEmptyStringSchema,
3231
- password: nonEmptyStringSchema,
3232
- secretKey: nonEmptyStringSchema
3367
+ keyId: nonEmptyStringSchema.describe("The resolved signing key identifier."),
3368
+ password: nonEmptyStringSchema.describe("The resolved signing key password."),
3369
+ secretKey: nonEmptyStringSchema.describe("The resolved armored secret key.")
3233
3370
  });
3234
3371
  var publishConfigSchema = zod.z.discriminatedUnion("registry", [
3235
3372
  zod.z.strictObject({
3236
- registry: zod.z.literal("npm"),
3373
+ registry: zod.z.literal("npm").describe("Publishes the package to an npm-compatible registry."),
3237
3374
  /** Environment variable name containing the npm registry token. */
3238
- tokenEnvironmentVariable: nonEmptyStringSchema.optional(),
3375
+ tokenEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the npm registry token."),
3239
3376
  /** Write npm package metadata as private when the publisher creates/updates package.json. */
3240
- isPackagePrivate: zod.z.boolean().optional(),
3377
+ isPackagePrivate: zod.z.boolean().optional().describe("Whether generated npm package metadata marks the package as private."),
3241
3378
  /** Also publish the TypeScript package to JSR from the npm publishing path. */
3242
- publishToJsr: zod.z.boolean().optional(),
3379
+ publishToJsr: zod.z.boolean().optional().describe("Whether the npm publishing flow also publishes the package to JSR."),
3243
3380
  ...trustedPublishingShape,
3244
3381
  ...commonPublishShape2
3245
3382
  }),
3246
3383
  zod.z.strictObject({
3247
- registry: zod.z.literal("pypi"),
3248
- usernameEnvironmentVariable: nonEmptyStringSchema.optional(),
3249
- passwordEnvironmentVariable: nonEmptyStringSchema.optional(),
3384
+ registry: zod.z.literal("pypi").describe("Publishes the package to a PyPI-compatible registry."),
3385
+ usernameEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the PyPI username."),
3386
+ passwordEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the PyPI password or token."),
3250
3387
  ...trustedPublishingShape,
3251
3388
  ...commonPublishShape2
3252
3389
  }),
3253
3390
  zod.z.strictObject({
3254
- registry: zod.z.literal("nuget"),
3255
- apiKeyEnvironmentVariable: nonEmptyStringSchema.optional(),
3391
+ registry: zod.z.literal("nuget").describe("Publishes the package to a NuGet-compatible registry."),
3392
+ apiKeyEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the NuGet API key."),
3256
3393
  ...trustedPublishingShape,
3257
3394
  ...commonPublishShape2
3258
3395
  }),
3259
3396
  zod.z.strictObject({
3260
- registry: zod.z.literal("rubygems"),
3261
- apiKeyEnvironmentVariable: nonEmptyStringSchema.optional(),
3397
+ registry: zod.z.literal("rubygems").describe("Publishes the package to a RubyGems-compatible registry."),
3398
+ apiKeyEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the RubyGems API key."),
3399
+ ...commonPublishShape2
3400
+ }),
3401
+ zod.z.strictObject({
3402
+ registry: zod.z.literal("crates").describe("Publishes the crate to a Cargo-compatible registry."),
3403
+ tokenEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the Cargo registry token."),
3404
+ ...commonPublishShape2
3405
+ }),
3406
+ zod.z.strictObject({
3407
+ registry: zod.z.literal("go").describe("Publishes the SDK as a Go module."),
3262
3408
  ...commonPublishShape2
3263
3409
  }),
3264
3410
  zod.z.strictObject({
3265
- registry: zod.z.literal("crates"),
3266
- tokenEnvironmentVariable: nonEmptyStringSchema.optional(),
3411
+ registry: zod.z.literal("composer").describe("Publishes the package to a Composer-compatible registry."),
3267
3412
  ...commonPublishShape2
3268
3413
  }),
3269
- zod.z.strictObject({ registry: zod.z.literal("go"), ...commonPublishShape2 }),
3270
- zod.z.strictObject({ registry: zod.z.literal("composer"), ...commonPublishShape2 }),
3271
3414
  zod.z.strictObject({
3272
- registry: zod.z.literal("maven"),
3415
+ registry: zod.z.literal("maven").describe("Publishes the package to a Maven-compatible repository."),
3273
3416
  /** Maven coordinate in groupId:artifactId form when consumers need the combined value. */
3274
- coordinate: mavenCoordinateSchema.optional(),
3275
- usernameEnvironmentVariable: nonEmptyStringSchema.optional(),
3276
- passwordEnvironmentVariable: nonEmptyStringSchema.optional(),
3277
- mavenUrlEnvironmentVariable: nonEmptyStringSchema.optional(),
3278
- signatureEnvironmentVariables: mavenSignatureEnvironmentSchema.optional(),
3417
+ coordinate: mavenCoordinateSchema.optional().describe("The Maven coordinate in groupId:artifactId form."),
3418
+ usernameEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the Maven username."),
3419
+ passwordEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the Maven password."),
3420
+ mavenUrlEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the Maven repository URL."),
3421
+ signatureEnvironmentVariables: mavenSignatureEnvironmentSchema.optional().describe("Environment variables containing Maven signing material."),
3279
3422
  /** Reference to Maven signing credentials. */
3280
- signingCredentialsRef: nonEmptyStringSchema.optional(),
3423
+ signingCredentialsRef: nonEmptyStringSchema.optional().describe("A reference to Maven signing credentials."),
3281
3424
  /** Raw Maven signing material. These values can be sensitive and must be handled as secrets. */
3282
- signature: mavenSignatureSchema2.optional(),
3425
+ signature: mavenSignatureSchema2.optional().describe("Resolved Maven signing material."),
3283
3426
  ...commonPublishShape2
3284
3427
  })
3285
3428
  ]);
3286
3429
  var reviewersSchema2 = zod.z.strictObject({
3287
- teams: zod.z.array(nonEmptyStringSchema).optional(),
3288
- users: zod.z.array(nonEmptyStringSchema).optional()
3430
+ teams: zod.z.array(nonEmptyStringSchema).optional().describe("GitHub teams requested as reviewers."),
3431
+ users: zod.z.array(nonEmptyStringSchema).optional().describe("GitHub users requested as reviewers.")
3289
3432
  });
3290
3433
  var replayControlSchema = zod.z.strictObject({
3291
- enabled: zod.z.boolean()
3434
+ enabled: zod.z.boolean().describe("Whether regeneration reapplies customer-authored repository changes.")
3292
3435
  });
3293
3436
  var githubLicenseSchema = zod.z.strictObject({
3294
3437
  /** SPDX identifier or license key for the repository license (for example, "MIT"). */
3295
- type: nonEmptyStringSchema.optional(),
3438
+ type: nonEmptyStringSchema.optional().describe("The SPDX identifier or license key for the repository license."),
3296
3439
  /** Path to a custom license file to be committed into the GitHub repository. */
3297
- customPath: nonEmptyStringSchema.optional()
3440
+ customPath: nonEmptyStringSchema.optional().describe("The path to a custom license file committed to the repository.")
3298
3441
  }).refine((value) => value.type !== void 0 || value.customPath !== void 0, {
3299
3442
  message: "GitHub license must set type or customPath"
3300
3443
  });
3301
3444
  var githubOutputSchema2 = zod.z.strictObject({
3302
- repository: nonEmptyStringSchema,
3303
- host: nonEmptyStringSchema.optional(),
3304
- branch: nonEmptyStringSchema.optional(),
3305
- mode: zod.z.enum(["release", "pull-request", "push", "commit", "commit-and-release"]).optional(),
3306
- reviewers: reviewersSchema2.optional(),
3445
+ repository: nonEmptyStringSchema.describe("The GitHub repository that receives generated files."),
3446
+ host: nonEmptyStringSchema.optional().describe("The GitHub host for enterprise installations."),
3447
+ branch: nonEmptyStringSchema.optional().describe("The target branch for generated changes."),
3448
+ mode: zod.z.enum(["release", "pull-request", "push", "commit", "commit-and-release"]).optional().describe("How generated changes are delivered to the repository."),
3449
+ reviewers: reviewersSchema2.optional().describe("Reviewers requested for generated pull requests."),
3307
3450
  /** Reference to GitHub credentials. */
3308
- credentialsRef: nonEmptyStringSchema.optional(),
3451
+ credentialsRef: nonEmptyStringSchema.optional().describe("A reference to GitHub credentials."),
3309
3452
  /** Raw GitHub credentials. These values can be sensitive and must be handled as secrets. */
3310
- credentials: registryCredentialsSchema.optional(),
3311
- privateRepository: zod.z.boolean().optional(),
3453
+ credentials: registryCredentialsSchema.optional().describe("Resolved GitHub credentials."),
3454
+ privateRepository: zod.z.boolean().optional().describe("Whether the destination repository is private."),
3312
3455
  /** GitHub license block scoped to repository delivery. */
3313
- license: githubLicenseSchema.optional(),
3456
+ license: githubLicenseSchema.optional().describe("License configuration for the destination repository."),
3314
3457
  /** GitHub replay control. If omitted, the external publisher applies its default behavior. */
3315
- replay: replayControlSchema.optional(),
3458
+ replay: replayControlSchema.optional().describe("Replay behavior for the external GitHub publisher."),
3316
3459
  /** Run GitHub publishing verification. Defaults to false to match current Fiddle job behavior. */
3317
- verify: zod.z.boolean().default(false),
3460
+ verify: zod.z.boolean().default(false).describe("Whether the GitHub publisher verifies the generated result."),
3318
3461
  /** Skip creating/updating a GitHub PR when no files changed. Defaults to false. */
3319
- skipIfNoDiff: zod.z.boolean().default(false),
3462
+ skipIfNoDiff: zod.z.boolean().default(false).describe("Whether GitHub publication is skipped when no generated files changed."),
3320
3463
  /** Automatically merge the GitHub publishing PR. Defaults to false. */
3321
- autoMerge: zod.z.boolean().default(false)
3464
+ autoMerge: zod.z.boolean().default(false).describe("Whether the GitHub publisher automatically merges its pull request.")
3322
3465
  });
3323
3466
  var credentialResolutionShape = {
3324
3467
  /** Where output credential references are resolved. */
3325
- credentialResolution: credentialResolutionSchema.default("refs-only")
3468
+ credentialResolution: credentialResolutionSchema.default("refs-only").describe("Where output credential references are resolved.")
3326
3469
  };
3327
3470
  var filesOutputSchema2 = zod.z.strictObject({
3328
- delivery: zod.z.literal("files"),
3329
- path: nonEmptyStringSchema.optional(),
3330
- publish: publishConfigSchema.optional(),
3471
+ delivery: zod.z.literal("files").describe("Writes the generated SDK to a directory."),
3472
+ path: nonEmptyStringSchema.optional().describe("The destination directory for generated files."),
3473
+ publish: publishConfigSchema.optional().describe("Optional package registry publication."),
3331
3474
  ...credentialResolutionShape
3332
3475
  });
3333
3476
  var zipOutputSchema2 = zod.z.strictObject({
3334
- delivery: zod.z.literal("zip"),
3335
- fileName: nonEmptyStringSchema.optional(),
3336
- publish: publishConfigSchema.optional(),
3477
+ delivery: zod.z.literal("zip").describe("Packages the generated SDK as a ZIP archive."),
3478
+ fileName: nonEmptyStringSchema.optional().describe("The generated ZIP archive file name."),
3479
+ publish: publishConfigSchema.optional().describe("Optional package registry publication."),
3337
3480
  ...credentialResolutionShape
3338
3481
  });
3339
3482
  var githubDeliverySchema2 = zod.z.strictObject({
3340
- delivery: zod.z.literal("github"),
3341
- github: githubOutputSchema2,
3342
- publish: publishConfigSchema.optional(),
3483
+ delivery: zod.z.literal("github").describe("Delivers the generated SDK to GitHub."),
3484
+ github: githubOutputSchema2.describe("GitHub repository delivery settings."),
3485
+ publish: publishConfigSchema.optional().describe("Optional package registry publication."),
3343
3486
  ...credentialResolutionShape
3344
3487
  });
3345
3488
  var outputConfigSchema = zod.z.discriminatedUnion(
@@ -3350,21 +3493,23 @@ var outputConfigSchema = zod.z.discriminatedUnion(
3350
3493
  }
3351
3494
  );
3352
3495
  var replayConfigSchema = zod.z.strictObject({
3353
- enabled: zod.z.boolean()
3496
+ enabled: zod.z.boolean().describe("Whether regeneration reapplies customer-authored repository changes.")
3354
3497
  });
3355
3498
  var sourceSpecConfigSchema = zod.z.strictObject({
3356
- id: nonEmptyStringSchema.optional(),
3357
- name: nonEmptyStringSchema.optional(),
3358
- namespace: nonEmptyStringSchema.optional(),
3359
- specUrl: nonEmptyStringSchema,
3360
- specType: sourceSpecTypeSchema,
3361
- apiImportSettings: apiImportSettingsSchema.optional(),
3362
- overlays: zod.z.array(nonEmptyStringSchema).optional(),
3363
- overrides: zod.z.array(nonEmptyStringSchema).optional()
3499
+ id: nonEmptyStringSchema.optional().describe("A unique identifier for this API source."),
3500
+ name: nonEmptyStringSchema.optional().describe("A human-readable name for this API source."),
3501
+ namespace: nonEmptyStringSchema.optional().describe("A namespace used to isolate this source in a multi-source SDK."),
3502
+ specUrl: nonEmptyStringSchema.describe(
3503
+ "The materialized URL from which the generator retrieves the API source."
3504
+ ),
3505
+ specType: sourceSpecTypeSchema.describe("The API description format of this source."),
3506
+ apiImportSettings: apiImportSettingsSchema.optional().describe("Import behavior that overrides the source-level defaults for this spec."),
3507
+ overlays: zod.z.array(nonEmptyStringSchema).optional().describe("Materialized overlays applied to this source in order."),
3508
+ overrides: zod.z.array(nonEmptyStringSchema).optional().describe("Materialized source overrides applied in order.")
3364
3509
  });
3365
3510
  var sourceConfigSchema = zod.z.strictObject({
3366
- specs: zod.z.array(sourceSpecConfigSchema).min(1, "source.specs must contain at least one source spec"),
3367
- apiImportSettings: apiImportSettingsSchema.optional()
3511
+ specs: zod.z.array(sourceSpecConfigSchema).min(1, "source.specs must contain at least one source spec").describe("Materialized API sources in authoritative processing order."),
3512
+ apiImportSettings: apiImportSettingsSchema.optional().describe("Default import behavior shared by every source spec.")
3368
3513
  }).superRefine(({ specs }, context) => {
3369
3514
  const seenIds = /* @__PURE__ */ new Set();
3370
3515
  specs.forEach(({ id }, index) => {
@@ -3396,25 +3541,27 @@ var targetLanguageSchema = zod.z.enum([
3396
3541
  "terraform"
3397
3542
  ]);
3398
3543
  var targetConfigSchema = zod.z.strictObject({
3399
- language: targetLanguageSchema,
3400
- generatorVersion: exactSemverSchema.optional(),
3401
- sourceOrigin: zod.z.enum(["postman", "fern"]),
3402
- sdkName: nonEmptyStringSchema,
3544
+ language: targetLanguageSchema.describe(
3545
+ "The language or platform generated by this single-target request."
3546
+ ),
3547
+ generatorVersion: exactSemverSchema.optional().describe("The exact generator version requested for this target."),
3548
+ sourceOrigin: zod.z.enum(["postman", "fern"]).describe("The configuration system from which this IR was normalized."),
3549
+ sdkName: nonEmptyStringSchema.describe("The name used for the generated SDK."),
3403
3550
  /**
3404
3551
  * Stable Fern/Fiddle API identity for external publishing.
3405
3552
  * Producers must set this explicitly for GitHub or registry publishing; it is not inferred from
3406
3553
  * target.sdkName because SDK display names and Fern API names are not equivalent.
3407
3554
  */
3408
- apiName: nonEmptyStringSchema.optional(),
3409
- organization: nonEmptyStringSchema.optional(),
3555
+ apiName: nonEmptyStringSchema.optional().describe("The stable API identity used for external publishing."),
3556
+ organization: nonEmptyStringSchema.optional().describe("Source organization metadata retained for generation."),
3410
3557
  /**
3411
3558
  * Stable Fern/Fiddle organization identity for external publishing.
3412
3559
  * Producers must set this explicitly for GitHub or registry publishing; it is not inferred from
3413
3560
  * target.organization because source organization metadata is optional and may not match Fern.
3414
3561
  */
3415
- organizationName: nonEmptyStringSchema.optional(),
3416
- sdkVersion: nonEmptyStringSchema.default("1.0.0"),
3417
- apiVersion: nonEmptyStringSchema.optional()
3562
+ organizationName: nonEmptyStringSchema.optional().describe("The stable organization identity used for external publishing."),
3563
+ sdkVersion: nonEmptyStringSchema.default("1.0.0").describe("The version of the generated SDK."),
3564
+ apiVersion: nonEmptyStringSchema.optional().describe("The version of the API represented by the SDK.")
3418
3565
  });
3419
3566
 
3420
3567
  // src/sdk-config-ir/v1/sdk-config-ir-v1.ts
@@ -3476,17 +3623,21 @@ function validatePublishingIdentity2(packageConfig, registry, context) {
3476
3623
  }
3477
3624
  }
3478
3625
  var sdkConfigIrV1Schema = zod.z.strictObject({
3479
- schemaVersion: zod.z.literal(SDK_CONFIG_IR_V1_SCHEMA_VERSION),
3480
- source: sourceConfigSchema,
3481
- target: targetConfigSchema,
3482
- api: apiConfigSchema,
3483
- client: clientConfigSchema,
3484
- package: packageConfigSchema,
3485
- output: outputConfigSchema,
3486
- replay: replayConfigSchema.optional(),
3487
- docs: docsConfigSchema,
3488
- generation: generationConfigSchema,
3489
- compatibility: compatibilityConfigSchema.optional()
3626
+ schemaVersion: zod.z.literal(SDK_CONFIG_IR_V1_SCHEMA_VERSION).describe("The version of the normalized SDK Config IR schema."),
3627
+ source: sourceConfigSchema.describe("Materialized API descriptions consumed by generation."),
3628
+ target: targetConfigSchema.describe(
3629
+ "Identity and provenance for this single generation target."
3630
+ ),
3631
+ api: apiConfigSchema.describe("API behavior exposed by the generated SDK."),
3632
+ client: clientConfigSchema.describe("Behavior of the generated API client."),
3633
+ package: packageConfigSchema.describe("Package identity and metadata for the generated SDK."),
3634
+ output: outputConfigSchema.describe("Artifact delivery and optional package publication."),
3635
+ replay: replayConfigSchema.optional().describe("Generation replay behavior."),
3636
+ docs: docsConfigSchema.describe("Generated documentation settings."),
3637
+ generation: generationConfigSchema.describe(
3638
+ "Shared and language-specific generation behavior."
3639
+ ),
3640
+ compatibility: compatibilityConfigSchema.optional().describe("Temporary provenance and diagnostics retained during legacy migration.")
3490
3641
  }).superRefine(({ compatibility, generation, output, package: packageConfig, target }, context) => {
3491
3642
  const configuredLanguages = Object.keys(generation.language ?? {});
3492
3643
  const requiresExternalPublishIdentity = output.delivery === "github" || output.publish !== void 0;