@postman/sdk-config 0.10.1 → 0.11.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 +6 -0
  2. package/dist/index.cjs +697 -34
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.d.cts +3 -3
  5. package/dist/index.d.ts +3 -3
  6. package/dist/index.js +683 -35
  7. package/dist/index.js.map +1 -1
  8. package/dist/sdk-config/index.cjs +649 -34
  9. package/dist/sdk-config/index.cjs.map +1 -1
  10. package/dist/sdk-config/index.d.cts +2 -2
  11. package/dist/sdk-config/index.d.ts +2 -2
  12. package/dist/sdk-config/index.js +642 -35
  13. package/dist/sdk-config/index.js.map +1 -1
  14. package/dist/sdk-config/v1/index.cjs +649 -34
  15. package/dist/sdk-config/v1/index.cjs.map +1 -1
  16. package/dist/sdk-config/v1/index.d.cts +2858 -2377
  17. package/dist/sdk-config/v1/index.d.ts +2858 -2377
  18. package/dist/sdk-config/v1/index.js +642 -35
  19. package/dist/sdk-config/v1/index.js.map +1 -1
  20. package/dist/sdk-config-ir/index.cjs +247 -4
  21. package/dist/sdk-config-ir/index.cjs.map +1 -1
  22. package/dist/sdk-config-ir/index.d.cts +2 -2
  23. package/dist/sdk-config-ir/index.d.ts +2 -2
  24. package/dist/sdk-config-ir/index.js +241 -5
  25. package/dist/sdk-config-ir/index.js.map +1 -1
  26. package/dist/sdk-config-ir/v1/index.cjs +247 -4
  27. package/dist/sdk-config-ir/v1/index.cjs.map +1 -1
  28. package/dist/sdk-config-ir/v1/index.d.cts +3109 -2960
  29. package/dist/sdk-config-ir/v1/index.d.ts +3109 -2960
  30. package/dist/sdk-config-ir/v1/index.js +241 -5
  31. package/dist/sdk-config-ir/v1/index.js.map +1 -1
  32. package/dist/{typescript-Chge0X4f.d.cts → typescript-CsAa1VSy.d.cts} +81 -1
  33. package/dist/{typescript-Chge0X4f.d.ts → typescript-CsAa1VSy.d.ts} +81 -1
  34. package/package.json +1 -1
  35. package/src/sdk-config/v1/README.md +183 -1
  36. package/src/sdk-config-ir/v1/README.md +29 -1
@@ -134,14 +134,94 @@ declare const packageConfigSchema: z.ZodObject<{
134
134
  defaultFeatures: z.ZodOptional<z.ZodBoolean>;
135
135
  environmentMarker: z.ZodOptional<z.ZodString>;
136
136
  }, z.core.$strict>>>;
137
+ extraPeerDependenciesMeta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<JsonObject, unknown, z.core.$ZodTypeInternals<JsonObject, unknown>>>>;
137
138
  }, z.core.$strict>;
138
139
  type Dependency = z.infer<typeof dependencySchema>;
139
140
  type PackageConfig = z.infer<typeof packageConfigSchema>;
140
141
 
142
+ declare const githubActionsSecretNameSchema: z.ZodString;
143
+ declare const cliDistributionGithubAppSchema: z.ZodObject<{
144
+ appIdSecretName: z.ZodString;
145
+ privateKeySecretName: z.ZodString;
146
+ }, z.core.$strict>;
147
+ declare const cliDistributionHomebrewSchema: z.ZodObject<{
148
+ tap: z.ZodString;
149
+ formula: z.ZodOptional<z.ZodString>;
150
+ tokenSecretName: z.ZodOptional<z.ZodString>;
151
+ }, z.core.$strict>;
152
+ declare const cliDistributionScoopSchema: z.ZodObject<{
153
+ bucket: z.ZodString;
154
+ tokenSecretName: z.ZodOptional<z.ZodString>;
155
+ }, z.core.$strict>;
156
+ declare const cliDistributionConfigSchema: z.ZodObject<{
157
+ githubApp: z.ZodOptional<z.ZodObject<{
158
+ appIdSecretName: z.ZodString;
159
+ privateKeySecretName: z.ZodString;
160
+ }, z.core.$strict>>;
161
+ homebrew: z.ZodOptional<z.ZodObject<{
162
+ tap: z.ZodString;
163
+ formula: z.ZodOptional<z.ZodString>;
164
+ tokenSecretName: z.ZodOptional<z.ZodString>;
165
+ }, z.core.$strict>>;
166
+ scoop: z.ZodOptional<z.ZodObject<{
167
+ bucket: z.ZodString;
168
+ tokenSecretName: z.ZodOptional<z.ZodString>;
169
+ }, z.core.$strict>>;
170
+ }, z.core.$strict>;
171
+ declare const CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE = "CLI_DISTRIBUTION_NON_RELEASE_MODE";
172
+ interface SdkConfigDiagnostic {
173
+ code: string;
174
+ severity: 'warning';
175
+ path: (string | number)[];
176
+ reason: string;
177
+ suggestedAction: string;
178
+ }
179
+ type CliDistributionGithubAppConfig = z.infer<typeof cliDistributionGithubAppSchema>;
180
+ type CliDistributionHomebrewConfig = z.infer<typeof cliDistributionHomebrewSchema>;
181
+ type CliDistributionScoopConfig = z.infer<typeof cliDistributionScoopSchema>;
182
+ type CliDistributionConfig = z.infer<typeof cliDistributionConfigSchema>;
183
+
184
+ declare const profilesProvisionOperationSchema: z.ZodObject<{
185
+ operation: z.ZodString;
186
+ credential: z.ZodType<Record<string, string>, unknown, z.core.$ZodTypeInternals<Record<string, string>, unknown>>;
187
+ revokeParameters: z.ZodOptional<z.ZodType<Record<string, string>, unknown, z.core.$ZodTypeInternals<Record<string, string>, unknown>>>;
188
+ }, z.core.$strict>;
189
+ declare const profilesConfigSchema: z.ZodObject<{
190
+ enabled: z.ZodBoolean;
191
+ commandName: z.ZodOptional<z.ZodString>;
192
+ revokeOperation: z.ZodOptional<z.ZodString>;
193
+ provisionOperation: z.ZodOptional<z.ZodObject<{
194
+ operation: z.ZodString;
195
+ credential: z.ZodType<Record<string, string>, unknown, z.core.$ZodTypeInternals<Record<string, string>, unknown>>;
196
+ revokeParameters: z.ZodOptional<z.ZodType<Record<string, string>, unknown, z.core.$ZodTypeInternals<Record<string, string>, unknown>>>;
197
+ }, z.core.$strict>>;
198
+ }, z.core.$strict>;
199
+ /**
200
+ * Omitted fields are left undefined; the CLI generator applies its own defaults: a binary name
201
+ * derived from the API display name, custom commands on, no root group, profiles off, a single
202
+ * types crate, and a `user-agent-suffix` flag.
203
+ */
141
204
  declare const cliGenerationConfigSchema: z.ZodObject<{
142
205
  paginationParameters: z.ZodOptional<z.ZodArray<z.ZodString>>;
143
206
  skills: z.ZodOptional<z.ZodBoolean>;
207
+ binaryName: z.ZodOptional<z.ZodString>;
208
+ customCommands: z.ZodOptional<z.ZodBoolean>;
209
+ rootGroup: z.ZodOptional<z.ZodString>;
210
+ profiles: z.ZodOptional<z.ZodObject<{
211
+ enabled: z.ZodBoolean;
212
+ commandName: z.ZodOptional<z.ZodString>;
213
+ revokeOperation: z.ZodOptional<z.ZodString>;
214
+ provisionOperation: z.ZodOptional<z.ZodObject<{
215
+ operation: z.ZodString;
216
+ credential: z.ZodType<Record<string, string>, unknown, z.core.$ZodTypeInternals<Record<string, string>, unknown>>;
217
+ revokeParameters: z.ZodOptional<z.ZodType<Record<string, string>, unknown, z.core.$ZodTypeInternals<Record<string, string>, unknown>>>;
218
+ }, z.core.$strict>>;
219
+ }, z.core.$strict>>;
220
+ splitTypeCrates: z.ZodOptional<z.ZodBoolean>;
221
+ userAgentSuffixFlag: z.ZodOptional<z.ZodString>;
144
222
  }, z.core.$strict>;
223
+ type CliProfilesProvisionOperation = z.infer<typeof profilesProvisionOperationSchema>;
224
+ type CliProfilesConfig = z.infer<typeof profilesConfigSchema>;
145
225
  type CliGenerationConfig = z.infer<typeof cliGenerationConfigSchema>;
146
226
 
147
227
  declare const csharpGenerationConfigSchema: z.ZodObject<{
@@ -447,4 +527,4 @@ declare const typescriptGenerationConfigSchema: z.ZodObject<{
447
527
  }, z.core.$strict>;
448
528
  type TypescriptGenerationConfig = z.infer<typeof typescriptGenerationConfigSchema>;
449
529
 
450
- export { pythonGenerationConfigSchema as A, relativePathSchema as B, type CliGenerationConfig as C, type Dependency as D, rubyGenerationConfigSchema as E, rustGenerationConfigSchema as F, type GoGenerationConfig as G, swiftGenerationConfigSchema as H, terraformGenerationConfigSchema as I, type JavaGenerationConfig as J, type KotlinGenerationConfig as K, typescriptGenerationConfigSchema as L, type McpAvailabilityStatus as M, type PackageConfig as P, type RubyGenerationConfig as R, type SwiftGenerationConfig as S, type TerraformGenerationConfig as T, type CsharpGenerationConfig as a, type JsonObject as b, type JsonValue as c, type McpGenerationConfig as d, type McpToolFilter as e, type PhpGenerationConfig as f, type PlanModifiers as g, type PythonGenerationConfig as h, type RustGenerationConfig as i, type TypescriptGenerationConfig as j, cliGenerationConfigSchema as k, composerPackageNameSchema as l, csharpGenerationConfigSchema as m, dependencySchema as n, exactSemverSchema as o, goGenerationConfigSchema as p, goModulePathSchema as q, javaGenerationConfigSchema as r, jsonObjectSchema as s, jsonValueSchema as t, kotlinGenerationConfigSchema as u, mcpAvailabilityStatuses as v, mcpGenerationConfigSchema as w, nonEmptyStringSchema as x, packageConfigSchema as y, phpGenerationConfigSchema as z };
530
+ export { swiftGenerationConfigSchema as $, exactSemverSchema as A, githubActionsSecretNameSchema as B, CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE as C, type Dependency as D, goGenerationConfigSchema as E, goModulePathSchema as F, type GoGenerationConfig as G, javaGenerationConfigSchema as H, jsonObjectSchema as I, type JavaGenerationConfig as J, type KotlinGenerationConfig as K, jsonValueSchema as L, type McpAvailabilityStatus as M, kotlinGenerationConfigSchema as N, mcpAvailabilityStatuses as O, type PackageConfig as P, mcpGenerationConfigSchema as Q, type RubyGenerationConfig as R, type SdkConfigDiagnostic as S, type TerraformGenerationConfig as T, nonEmptyStringSchema as U, packageConfigSchema as V, phpGenerationConfigSchema as W, pythonGenerationConfigSchema as X, relativePathSchema as Y, rubyGenerationConfigSchema as Z, rustGenerationConfigSchema as _, type CliDistributionConfig as a, terraformGenerationConfigSchema as a0, typescriptGenerationConfigSchema as a1, type CliDistributionGithubAppConfig as b, type CliDistributionHomebrewConfig as c, type CliDistributionScoopConfig as d, type CliGenerationConfig as e, type CliProfilesConfig as f, type CliProfilesProvisionOperation as g, type CsharpGenerationConfig as h, type JsonObject as i, type JsonValue as j, type McpGenerationConfig as k, type McpToolFilter as l, type PhpGenerationConfig as m, type PlanModifiers as n, type PythonGenerationConfig as o, type RustGenerationConfig as p, type SwiftGenerationConfig as q, type TypescriptGenerationConfig as r, cliDistributionConfigSchema as s, cliDistributionGithubAppSchema as t, cliDistributionHomebrewSchema as u, cliDistributionScoopSchema as v, cliGenerationConfigSchema as w, composerPackageNameSchema as x, csharpGenerationConfigSchema as y, dependencySchema as z };
@@ -134,14 +134,94 @@ declare const packageConfigSchema: z.ZodObject<{
134
134
  defaultFeatures: z.ZodOptional<z.ZodBoolean>;
135
135
  environmentMarker: z.ZodOptional<z.ZodString>;
136
136
  }, z.core.$strict>>>;
137
+ extraPeerDependenciesMeta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<JsonObject, unknown, z.core.$ZodTypeInternals<JsonObject, unknown>>>>;
137
138
  }, z.core.$strict>;
138
139
  type Dependency = z.infer<typeof dependencySchema>;
139
140
  type PackageConfig = z.infer<typeof packageConfigSchema>;
140
141
 
142
+ declare const githubActionsSecretNameSchema: z.ZodString;
143
+ declare const cliDistributionGithubAppSchema: z.ZodObject<{
144
+ appIdSecretName: z.ZodString;
145
+ privateKeySecretName: z.ZodString;
146
+ }, z.core.$strict>;
147
+ declare const cliDistributionHomebrewSchema: z.ZodObject<{
148
+ tap: z.ZodString;
149
+ formula: z.ZodOptional<z.ZodString>;
150
+ tokenSecretName: z.ZodOptional<z.ZodString>;
151
+ }, z.core.$strict>;
152
+ declare const cliDistributionScoopSchema: z.ZodObject<{
153
+ bucket: z.ZodString;
154
+ tokenSecretName: z.ZodOptional<z.ZodString>;
155
+ }, z.core.$strict>;
156
+ declare const cliDistributionConfigSchema: z.ZodObject<{
157
+ githubApp: z.ZodOptional<z.ZodObject<{
158
+ appIdSecretName: z.ZodString;
159
+ privateKeySecretName: z.ZodString;
160
+ }, z.core.$strict>>;
161
+ homebrew: z.ZodOptional<z.ZodObject<{
162
+ tap: z.ZodString;
163
+ formula: z.ZodOptional<z.ZodString>;
164
+ tokenSecretName: z.ZodOptional<z.ZodString>;
165
+ }, z.core.$strict>>;
166
+ scoop: z.ZodOptional<z.ZodObject<{
167
+ bucket: z.ZodString;
168
+ tokenSecretName: z.ZodOptional<z.ZodString>;
169
+ }, z.core.$strict>>;
170
+ }, z.core.$strict>;
171
+ declare const CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE = "CLI_DISTRIBUTION_NON_RELEASE_MODE";
172
+ interface SdkConfigDiagnostic {
173
+ code: string;
174
+ severity: 'warning';
175
+ path: (string | number)[];
176
+ reason: string;
177
+ suggestedAction: string;
178
+ }
179
+ type CliDistributionGithubAppConfig = z.infer<typeof cliDistributionGithubAppSchema>;
180
+ type CliDistributionHomebrewConfig = z.infer<typeof cliDistributionHomebrewSchema>;
181
+ type CliDistributionScoopConfig = z.infer<typeof cliDistributionScoopSchema>;
182
+ type CliDistributionConfig = z.infer<typeof cliDistributionConfigSchema>;
183
+
184
+ declare const profilesProvisionOperationSchema: z.ZodObject<{
185
+ operation: z.ZodString;
186
+ credential: z.ZodType<Record<string, string>, unknown, z.core.$ZodTypeInternals<Record<string, string>, unknown>>;
187
+ revokeParameters: z.ZodOptional<z.ZodType<Record<string, string>, unknown, z.core.$ZodTypeInternals<Record<string, string>, unknown>>>;
188
+ }, z.core.$strict>;
189
+ declare const profilesConfigSchema: z.ZodObject<{
190
+ enabled: z.ZodBoolean;
191
+ commandName: z.ZodOptional<z.ZodString>;
192
+ revokeOperation: z.ZodOptional<z.ZodString>;
193
+ provisionOperation: z.ZodOptional<z.ZodObject<{
194
+ operation: z.ZodString;
195
+ credential: z.ZodType<Record<string, string>, unknown, z.core.$ZodTypeInternals<Record<string, string>, unknown>>;
196
+ revokeParameters: z.ZodOptional<z.ZodType<Record<string, string>, unknown, z.core.$ZodTypeInternals<Record<string, string>, unknown>>>;
197
+ }, z.core.$strict>>;
198
+ }, z.core.$strict>;
199
+ /**
200
+ * Omitted fields are left undefined; the CLI generator applies its own defaults: a binary name
201
+ * derived from the API display name, custom commands on, no root group, profiles off, a single
202
+ * types crate, and a `user-agent-suffix` flag.
203
+ */
141
204
  declare const cliGenerationConfigSchema: z.ZodObject<{
142
205
  paginationParameters: z.ZodOptional<z.ZodArray<z.ZodString>>;
143
206
  skills: z.ZodOptional<z.ZodBoolean>;
207
+ binaryName: z.ZodOptional<z.ZodString>;
208
+ customCommands: z.ZodOptional<z.ZodBoolean>;
209
+ rootGroup: z.ZodOptional<z.ZodString>;
210
+ profiles: z.ZodOptional<z.ZodObject<{
211
+ enabled: z.ZodBoolean;
212
+ commandName: z.ZodOptional<z.ZodString>;
213
+ revokeOperation: z.ZodOptional<z.ZodString>;
214
+ provisionOperation: z.ZodOptional<z.ZodObject<{
215
+ operation: z.ZodString;
216
+ credential: z.ZodType<Record<string, string>, unknown, z.core.$ZodTypeInternals<Record<string, string>, unknown>>;
217
+ revokeParameters: z.ZodOptional<z.ZodType<Record<string, string>, unknown, z.core.$ZodTypeInternals<Record<string, string>, unknown>>>;
218
+ }, z.core.$strict>>;
219
+ }, z.core.$strict>>;
220
+ splitTypeCrates: z.ZodOptional<z.ZodBoolean>;
221
+ userAgentSuffixFlag: z.ZodOptional<z.ZodString>;
144
222
  }, z.core.$strict>;
223
+ type CliProfilesProvisionOperation = z.infer<typeof profilesProvisionOperationSchema>;
224
+ type CliProfilesConfig = z.infer<typeof profilesConfigSchema>;
145
225
  type CliGenerationConfig = z.infer<typeof cliGenerationConfigSchema>;
146
226
 
147
227
  declare const csharpGenerationConfigSchema: z.ZodObject<{
@@ -447,4 +527,4 @@ declare const typescriptGenerationConfigSchema: z.ZodObject<{
447
527
  }, z.core.$strict>;
448
528
  type TypescriptGenerationConfig = z.infer<typeof typescriptGenerationConfigSchema>;
449
529
 
450
- export { pythonGenerationConfigSchema as A, relativePathSchema as B, type CliGenerationConfig as C, type Dependency as D, rubyGenerationConfigSchema as E, rustGenerationConfigSchema as F, type GoGenerationConfig as G, swiftGenerationConfigSchema as H, terraformGenerationConfigSchema as I, type JavaGenerationConfig as J, type KotlinGenerationConfig as K, typescriptGenerationConfigSchema as L, type McpAvailabilityStatus as M, type PackageConfig as P, type RubyGenerationConfig as R, type SwiftGenerationConfig as S, type TerraformGenerationConfig as T, type CsharpGenerationConfig as a, type JsonObject as b, type JsonValue as c, type McpGenerationConfig as d, type McpToolFilter as e, type PhpGenerationConfig as f, type PlanModifiers as g, type PythonGenerationConfig as h, type RustGenerationConfig as i, type TypescriptGenerationConfig as j, cliGenerationConfigSchema as k, composerPackageNameSchema as l, csharpGenerationConfigSchema as m, dependencySchema as n, exactSemverSchema as o, goGenerationConfigSchema as p, goModulePathSchema as q, javaGenerationConfigSchema as r, jsonObjectSchema as s, jsonValueSchema as t, kotlinGenerationConfigSchema as u, mcpAvailabilityStatuses as v, mcpGenerationConfigSchema as w, nonEmptyStringSchema as x, packageConfigSchema as y, phpGenerationConfigSchema as z };
530
+ export { swiftGenerationConfigSchema as $, exactSemverSchema as A, githubActionsSecretNameSchema as B, CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE as C, type Dependency as D, goGenerationConfigSchema as E, goModulePathSchema as F, type GoGenerationConfig as G, javaGenerationConfigSchema as H, jsonObjectSchema as I, type JavaGenerationConfig as J, type KotlinGenerationConfig as K, jsonValueSchema as L, type McpAvailabilityStatus as M, kotlinGenerationConfigSchema as N, mcpAvailabilityStatuses as O, type PackageConfig as P, mcpGenerationConfigSchema as Q, type RubyGenerationConfig as R, type SdkConfigDiagnostic as S, type TerraformGenerationConfig as T, nonEmptyStringSchema as U, packageConfigSchema as V, phpGenerationConfigSchema as W, pythonGenerationConfigSchema as X, relativePathSchema as Y, rubyGenerationConfigSchema as Z, rustGenerationConfigSchema as _, type CliDistributionConfig as a, terraformGenerationConfigSchema as a0, typescriptGenerationConfigSchema as a1, type CliDistributionGithubAppConfig as b, type CliDistributionHomebrewConfig as c, type CliDistributionScoopConfig as d, type CliGenerationConfig as e, type CliProfilesConfig as f, type CliProfilesProvisionOperation as g, type CsharpGenerationConfig as h, type JsonObject as i, type JsonValue as j, type McpGenerationConfig as k, type McpToolFilter as l, type PhpGenerationConfig as m, type PlanModifiers as n, type PythonGenerationConfig as o, type RustGenerationConfig as p, type SwiftGenerationConfig as q, type TypescriptGenerationConfig as r, cliDistributionConfigSchema as s, cliDistributionGithubAppSchema as t, cliDistributionHomebrewSchema as u, cliDistributionScoopSchema as v, cliGenerationConfigSchema as w, composerPackageNameSchema as x, csharpGenerationConfigSchema as y, dependencySchema as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@postman/sdk-config",
3
- "version": "0.10.1",
3
+ "version": "0.11.0",
4
4
  "description": "Shared SDK configuration contracts and transformations for Postman SDK generation",
5
5
  "license": "UNLICENSED",
6
6
  "sideEffects": false,
@@ -67,6 +67,19 @@ lowered into the public API shape. Supported registry credentials, signing mater
67
67
  credentials are preserved in SDK Config when present; callers must treat these fields as sensitive
68
68
  secrets.
69
69
 
70
+ Legacy package metadata fills `target.package` only where the mapped package has no value yet:
71
+ the CLI generator's `packageIdentity.homepage`, `keywords`, `authors`, and `license`, the Rust
72
+ generator's `packageLicense`, and `metadata.license` for outputs other than GitHub (a GitHub output
73
+ already carries it as its license). A value mapped from another source, such as the GitHub license
74
+ or `publishMetadata` authors, is kept; a differing legacy value is reported as
75
+ `FERN_PACKAGE_VALUE_CONFLICT`. Cargo `authors` entries are `Name` or `Name <email>`; a bracketed
76
+ suffix that is not a valid email stays part of the name (`Acme <Team>`). If any entry has no name
77
+ before its brackets (`<ada@acme.test>`), no authors are written and each such entry is reported as
78
+ `FERN_CONFIG_VALUE_INVALID`. Licenses `MIT`, `Apache-2.0`, `GPL-3.0`, `GPL-3.0-only`, and
79
+ `UNLICENSED` become `MIT`, `APACHE`, `GPL3`, `GPL3`, and `UNLICENSED`; other identifiers are kept
80
+ verbatim. A custom `metadata.license` file is reported rather than migrated. Cargo dependency
81
+ `rev` and `branch` map to `source.ref`, and `registry` maps to a registry source.
82
+
70
83
  ## Contract boundaries
71
84
 
72
85
  `SdkConfigV1` is distinct from both existing configuration contracts:
@@ -103,6 +116,34 @@ their operational extensions remain separate explicit allowlists.
103
116
  Source `path`, `overlays`, and `overrides` values must be relative paths without parent-directory
104
117
  segments. Absolute paths and `..` traversal are rejected at validation time.
105
118
 
119
+ ### OAuth client identity
120
+
121
+ An OAuth 2.0 scheme distinguishes two kinds of client identity:
122
+
123
+ - `api.auth.schemes[].clientId` and `clientSecret` describe SDK parameters that the caller supplies
124
+ at runtime, optionally from an environment variable. They carry confidential-client credentials
125
+ and never contain literal values.
126
+ - `api.auth.schemes[].flows[].clientId` is accepted only on `authorization-code` flows. It is the
127
+ literal, public (RFC 6749 §2.2) identifier of an installed application, such as a CLI that runs
128
+ browser login with PKCE. Generators embed it verbatim, so environment expressions are rejected and
129
+ it must never hold a client secret.
130
+
131
+ The flow-level `clientId` is optional so existing documents keep parsing. A generator that needs it
132
+ for an interactive login reports an error when it is absent.
133
+
134
+ ```yaml
135
+ api:
136
+ auth:
137
+ schemes:
138
+ - id: login
139
+ type: oauth2
140
+ flows:
141
+ - type: authorization-code
142
+ authorizationUrl: https://auth.example.com/authorize
143
+ tokenUrl: https://auth.example.com/token
144
+ clientId: acme-cli
145
+ ```
146
+
106
147
  ## Shape
107
148
 
108
149
  ```json
@@ -167,6 +208,105 @@ target must have an effective output either from that baseline or from its own `
167
208
  migration writes output directly on each target because repositories and publication registries are
168
209
  properties of the generated language artifact.
169
210
 
211
+ ## CLI distribution and npm publication
212
+
213
+ A `language: cli` target's own `output` block accepts `distribution`, which publishes the generated
214
+ CLI to Homebrew and Scoop from the generated `release.yml` on each tagged release. It exists only on
215
+ the `cli` target; root `output` and other languages reject it as an unknown key. A CLI target may
216
+ also publish to npm, which the CLI generator uses for its npm launcher packages.
217
+
218
+ ```yaml
219
+ targets:
220
+ - language: cli
221
+ package:
222
+ packageName: '@acme/cli'
223
+ output:
224
+ delivery: github
225
+ github:
226
+ repository: acme/acme-cli
227
+ mode: release
228
+ publish:
229
+ registry: npm
230
+ trustedPublishing: true # or token: ${NPM_TOKEN}
231
+ distribution:
232
+ githubApp:
233
+ appIdSecretName: PUBLISH_APP_ID
234
+ privateKeySecretName: PUBLISH_APP_PRIVATE_KEY
235
+ homebrew:
236
+ tap: acme/homebrew-tap
237
+ formula: acme # optional; the generator defaults it to the binary name
238
+ scoop:
239
+ bucket: acme/scoop-bucket
240
+ tokenSecretName: SCOOP_BUCKET_PAT # optional; overrides githubApp for Scoop
241
+ ```
242
+
243
+ ### Secret names, not secret values
244
+
245
+ Every `*SecretName` field (`tokenSecretName`, `appIdSecretName`, `privateKeySecretName`) is the
246
+ **name of a GitHub Actions secret in the generated CLI repository**. The generated workflow reads
247
+ `${{ secrets.<NAME> }}` and, for `githubApp`, mints a short-lived installation token at release time.
248
+ Secret values never pass through SDK Config, SDK Config IR, the Fern CLI, or SDK Generation API:
249
+
250
+ - Names are not `${ENV}` expressions. Clients must not resolve them and must not send them through
251
+ the KMS-encrypted publish-credential channel; that channel is for `output.publish` credentials only.
252
+ - Names must match `^[A-Z][A-Z0-9_]*$` and must not be `GITHUB_TOKEN`, so lowercase tokens, PEM keys,
253
+ and `${...}` expressions are rejected. Validation messages never include the rejected value.
254
+ - Defaults are not written into configuration. A channel without `tokenSecretName` uses `githubApp`
255
+ when present and otherwise the generator's default secret (`HOMEBREW_TAP_TOKEN` or
256
+ `SCOOP_BUCKET_TOKEN`). Writing a default name explicitly would override `githubApp` for that channel.
257
+
258
+ The field names differ from the Fern generator's `tokenEnvironmentVariable`, `appIdSecret`, and
259
+ `privateKeySecret` so they cannot be mistaken for environment variables resolved by the client.
260
+
261
+ ### Validation
262
+
263
+ | Rule | Result |
264
+ | ---------------------------------------------------------------------- | ---------------------------------------- |
265
+ | `distribution` with `files` or `zip` delivery | Error with a fix instruction |
266
+ | `distribution` on root `output` or a non-`cli` target | Unknown-key error |
267
+ | `distribution: {}` or `githubApp` without `homebrew`/`scoop` | Error |
268
+ | `githubApp` missing either secret name | Error |
269
+ | `tap`/`bucket` not `<owner>/<repo>`; `formula` not `^[a-z][a-z0-9-]*$` | Error |
270
+ | npm publication on a `cli` target without `github` delivery | Error |
271
+ | `trustedPublishing: true` with `token` | Error |
272
+ | `distribution` with GitHub mode `pull-request`, `push`, or `commit` | Warning from `getSdkConfigV1Diagnostics` |
273
+
274
+ Non-release modes are allowed because a customer may push a version tag themselves, but nothing is
275
+ published until they do. Zod has no non-fatal issue channel, so warnings come from
276
+ `getSdkConfigV1Diagnostics(document)` (and `getSdkConfigIrV1Diagnostics` for IR), which returns the
277
+ same `code`/`severity`/`path`/`reason`/`suggestedAction` shape as Fern migration diagnostics.
278
+
279
+ `trustedPublishing` is shared by every npm target. It replaces Fern's `token: OIDC` marker
280
+ (`<USE_OIDC>` in the generator) with a typed flag. For CLI npm, omitting `publish` is equivalent to
281
+ the generator's `shouldGeneratePublishWorkflow: false`.
282
+
283
+ ### Fern migration
284
+
285
+ `mapFernConfigToSdkConfigV1` maps the CLI generator's `config.distribution` onto the target's
286
+ `output.distribution` when the Fern output is a GitHub repository. Keys are matched by exact name:
287
+ `appIdSecret` and `privateKeySecret` become `appIdSecretName` and `privateKeySecretName`, and each
288
+ channel's `tokenEnvironmentVariable` becomes `tokenSecretName`. Secret names are copied verbatim and
289
+ generator defaults are not written. Other keys are reported as `FERN_CONFIG_FIELD_UNSUPPORTED`.
290
+
291
+ - A distribution this schema rejects, including the legacy no-ops above, is left out and reported
292
+ as `FERN_CONFIG_VALUE_INVALID` at the legacy path, without the rejected value.
293
+ - Distribution on a non-GitHub Fern output, which the generator ignores, is reported as
294
+ `FERN_CLI_DISTRIBUTION_REQUIRES_GITHUB_OUTPUT` instead of being written.
295
+ - CLI npm publication migrates from the GitHub output's `publishInfo` like any other registry.
296
+
297
+ ### Deferred and rejected scope
298
+
299
+ - **Native SDK Generation API expansion.** The native SDK Config expander forces zip output and
300
+ drops output settings, so only the Fern adapter route can deliver distribution today.
301
+ - **Rejected legacy behavior.** The Fern generator accepts an empty `distribution` and a `githubApp`
302
+ without a channel as no-ops, and ignores distribution outside GitHub output. SDK Config rejects
303
+ all three.
304
+ - **Follow-ups.** Fern adapter mapping to `generators.yml`; credential-guard and leak verification,
305
+ including the pre-existing gap where `output.github.credentials` is not stripped from the uploaded
306
+ document.
307
+ - **Not modeled.** Every legacy `config.distribution` field and CLI npm publish field has an SDK
308
+ Config equivalent. Hosted (Postman-operated) tap or bucket publication is out of scope.
309
+
170
310
  ## Supported languages
171
311
 
172
312
  SdkConfig v1 is language-agnostic across every sdk-gen-core target available when this contract was
@@ -184,13 +324,55 @@ defined. Each language has an explicitly allowlisted `generation` shape:
184
324
  | Ruby | `ruby` | `requirePaths` |
185
325
  | Rust | `rust` | `dateTimeType` |
186
326
  | Swift | `swift` | `moduleName` |
187
- | CLI | `cli` | `skills` |
327
+ | CLI | `cli` | `skills`, `binaryName`, `profiles` |
188
328
  | MCP | `mcp` | `serverName` |
189
329
  | Terraform | `terraform` | `providerName` |
190
330
 
191
331
  Adding an internal language setting to `SdkConfigIrV1` does not add it here. Portable settings are
192
332
  added to the shared domain deliberately; IR-only settings remain explicit internal extensions.
193
333
 
334
+ ### CLI generation settings
335
+
336
+ These settings are accepted only in the `generation` block of a `language: cli` target. Root
337
+ `generation` and every other target language reject them. Each one maps to
338
+ `generation.language.cli` in SDK Config IR with the same name and shape.
339
+
340
+ ```yaml
341
+ targets:
342
+ - language: cli
343
+ generation:
344
+ binaryName: acme
345
+ customCommands: false
346
+ rootGroup: api
347
+ profiles:
348
+ enabled: true
349
+ commandName: accounts
350
+ revokeOperation: iam.keys.remove
351
+ provisionOperation:
352
+ operation: iam.keys.create
353
+ credential: { username: sid, password: secret }
354
+ revokeParameters: { Sid: sid }
355
+ splitTypeCrates: true
356
+ userAgentSuffixFlag: via
357
+ ```
358
+
359
+ Omitted settings stay omitted in both SDK Config and IR. The CLI generator then applies the
360
+ default shown below. Fern migration copies these keys verbatim from the CLI generator's `config`.
361
+ A legacy `profiles` block without `enabled` migrates as `enabled: false`. A legacy value this schema
362
+ rejects is left out and reported as `FERN_CONFIG_VALUE_INVALID`.
363
+
364
+ | Setting | Behavior | Validation | Generator default when omitted |
365
+ | ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
366
+ | `binaryName` | Executable name. The generator kebab-cases it (`Acme CLI` becomes `acme-cli`) and uses the result for the Cargo binary, the CLI source directory, the runtime app name, and the fallback environment-variable prefix. | Non-empty string with at least one ASCII letter or digit, since the generator rejects names that kebab-case to empty. | Kebab-cased API display name |
367
+ | `customCommands` | Generates hand-written command support: the model and SDK crates, `sdk.rs`, and `custom.rs`. | Boolean | `true` |
368
+ | `rootGroup` | Nests every spec-derived command under one group, so `acme users list` becomes `acme api users list`. | `^[a-z][a-z0-9_-]*$` | No group |
369
+ | `profiles.enabled` | Emits the profile command group and the global `--profile` / `-p` flag. Profiles store per-profile credentials and request defaults. | Required boolean when `profiles` is present, following the SDK Config convention for feature objects. The generator itself treats a missing `enabled` as `false`. | Profiles off |
370
+ | `profiles.commandName` | Name of the profile command group. | `^[a-z][a-z0-9-]*$`, excluding `auth`, `completion`, `man`, `errors`, `generate-skills`, and `help` | `profiles` |
371
+ | `profiles.revokeOperation` | Operation that `profiles remove --revoke` calls. | Dotted command path, such as `iam.keys.remove` | No `--revoke` flag |
372
+ | `profiles.provisionOperation` | Operation that `profiles create --provision` calls, and how its response fills the stored credential. | `operation` is a required dotted path. `credential` maps at least one field. Map keys and values match `^[A-Za-z0-9_.-]+$`. | No `--provision` flag |
373
+ | `splitTypeCrates` | Splits generated types into one crate per API behind a facade crate. | Boolean | `false` |
374
+ | `userAgentSuffixFlag` | Long flag that appends a product token to the User-Agent. The environment variable is `<BINARY>_<FLAG>`, with hyphens changed to underscores. | `^[a-z][a-z0-9-]*$` without the leading `--`. Built-in global flag names such as `help` and `base-url` are rejected. | `user-agent-suffix` |
375
+
194
376
  ## Precedence
195
377
 
196
378
  When a server expands the public config into single-target IR documents, it applies these rules:
@@ -47,6 +47,14 @@ messages. Valid IR requests route only to the IR bridge and never fall through t
47
47
  - Credentials may be references to externally managed secrets or raw credential/signing values when
48
48
  an integration must carry the material through the normalized config. Raw values are sensitive and
49
49
  must be handled as secrets.
50
+ - `output.distribution` (CLI Homebrew/Scoop channels) is valid only when `target.language` is `cli`
51
+ and `output.delivery` is `github`. It is accepted on every delivery variant so files/zip produce an
52
+ actionable error. Its `*SecretName` fields hold GitHub Actions secret names that the generated
53
+ release workflow resolves; they are never credentials, references, or values to resolve, and
54
+ `credentialResolution` does not apply to them. `getSdkConfigIrV1Diagnostics` warns when
55
+ distribution is combined with a non-release GitHub mode. See the
56
+ [SDK Config v1 reference](../../sdk-config/v1/README.md#cli-distribution-and-npm-publication).
57
+ - npm publication is valid for `cli` targets with GitHub delivery only.
50
58
 
51
59
  ## Configuration design rules
52
60
 
@@ -92,6 +100,7 @@ Legacy aliases below intentionally converge on one normalized behavior.
92
100
  | Package namespace | npm organization and generator conventions | namespace, package-prefix, and root-namespace aliases | `package.namespace` |
93
101
  | Package identity | per-language package IDs | registry output and package-name aliases | `package.packageName`, `moduleName`, `modulePath`, `groupId`, or `artifactId` |
94
102
  | Extra dependencies | language `hookDependencies` and package metadata | dependency and dev-dependency aliases | `package.extraDependencies`, `extraDevDependencies`, or `extraPeerDependencies` |
103
+ | Peer dependency metadata | npm `peerDependenciesMeta` | `extraPeerDependenciesMeta` | `package.extraPeerDependenciesMeta` |
95
104
  | Constructor parameters | language `additionalConstructorParameters` / `additionalVariables` | generator-specific constructor options | `client.additionalConstructorParameters` |
96
105
  | Repository delivery | `deliveryMethods`, `githubRepoName`, `githubRef`, `privateRepo` | GitHub output owner/repository settings | `output.delivery` and `output.github` |
97
106
  | Registry publication | per-language package identity plus publishing settings | registry output settings | `package` identity plus `output.publish` mechanics |
@@ -361,9 +370,28 @@ Only options that remain language-specific stay in `generation.language`.
361
370
  | Ruby | Require paths (2) | Gem identity, client name, dependencies, pager, wire tests |
362
371
  | Rust | Datetime representation, initialism casing, and Cargo features/default-features | Crate identity, client name, and package metadata use shared fields. |
363
372
  | Swift | Module name and the nullable-as-optional collapse | Client, environment and error naming use shared fields. |
364
- | CLI | Pagination parameter names and the `skills` boolean | Go module and package identity use `package`. |
373
+ | CLI | Pagination parameter names, the `skills` boolean, and the typed CLI settings below | Go module and package identity use `package`. |
365
374
  | MCP | Server identity, availability exclusions, tool filters and named toolsets, plus the TypeScript options | npm package identity, client and serialization behavior |
366
375
 
376
+ `generation.language.cli` also accepts the typed CLI settings `binaryName`, `customCommands`,
377
+ `rootGroup`, `profiles`, `splitTypeCrates`, and `userAgentSuffixFlag`. Their shapes, validation,
378
+ and generator defaults are listed in the
379
+ [SDK Config v1 reference](../../sdk-config/v1/README.md#cli-generation-settings). IR leaves omitted
380
+ settings undefined so the CLI generator applies its own defaults.
381
+
382
+ The Fern mapper copies these six keys from a CLI generator's `config` into the target's
383
+ `generation` unchanged. It matches only the exact key names the CLI generator reads, so spellings
384
+ such as `binary-name` are still reported as unsupported. Two rules need care:
385
+
386
+ - A legacy `profiles` block without `enabled` migrates as `enabled: false`. The generator turns
387
+ profiles on only when `profiles.enabled === true`, so this keeps the same behavior. Profile keys
388
+ the generator does not read are reported as unsupported, and the known keys are still copied.
389
+ - A value SDK Config rejects is left out of the output and reported as
390
+ `FERN_CONFIG_VALUE_INVALID`. The diagnostic points at the exact legacy path and the matching
391
+ `targets[].generation` path. The mapper does not rewrite the value, for example by
392
+ kebab-casing it or dropping an invalid `profiles` entry. A rejected `profiles` block is left out
393
+ as a whole.
394
+
367
395
  ## Removed and deferred legacy configuration
368
396
 
369
397
  Removed fields are not copied into another open-ended normalized bag. Translators report them in