@postman/sdk-config 0.16.0 → 0.18.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 (35) hide show
  1. package/dist/index.cjs +139 -23
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +3 -3
  4. package/dist/index.d.ts +3 -3
  5. package/dist/index.js +133 -24
  6. package/dist/index.js.map +1 -1
  7. package/dist/sdk-config/index.cjs +127 -23
  8. package/dist/sdk-config/index.cjs.map +1 -1
  9. package/dist/sdk-config/index.d.cts +2 -2
  10. package/dist/sdk-config/index.d.ts +2 -2
  11. package/dist/sdk-config/index.js +123 -24
  12. package/dist/sdk-config/index.js.map +1 -1
  13. package/dist/sdk-config/v1/index.cjs +127 -23
  14. package/dist/sdk-config/v1/index.cjs.map +1 -1
  15. package/dist/sdk-config/v1/index.d.cts +922 -504
  16. package/dist/sdk-config/v1/index.d.ts +922 -504
  17. package/dist/sdk-config/v1/index.js +123 -24
  18. package/dist/sdk-config/v1/index.js.map +1 -1
  19. package/dist/sdk-config-ir/index.cjs +18 -1
  20. package/dist/sdk-config-ir/index.cjs.map +1 -1
  21. package/dist/sdk-config-ir/index.d.cts +2 -2
  22. package/dist/sdk-config-ir/index.d.ts +2 -2
  23. package/dist/sdk-config-ir/index.js +17 -2
  24. package/dist/sdk-config-ir/index.js.map +1 -1
  25. package/dist/sdk-config-ir/v1/index.cjs +18 -1
  26. package/dist/sdk-config-ir/v1/index.cjs.map +1 -1
  27. package/dist/sdk-config-ir/v1/index.d.cts +22 -3
  28. package/dist/sdk-config-ir/v1/index.d.ts +22 -3
  29. package/dist/sdk-config-ir/v1/index.js +17 -2
  30. package/dist/sdk-config-ir/v1/index.js.map +1 -1
  31. package/dist/{typescript-Cc50beVo.d.cts → typescript-D0YeGxxS.d.cts} +6 -1
  32. package/dist/{typescript-Cc50beVo.d.ts → typescript-D0YeGxxS.d.ts} +6 -1
  33. package/package.json +1 -1
  34. package/src/sdk-config/v1/README.md +53 -0
  35. package/src/sdk-config-ir/v1/README.md +7 -0
@@ -2,6 +2,11 @@ import { z } from 'zod';
2
2
 
3
3
  declare const nonEmptyStringSchema: z.ZodString;
4
4
  declare const relativePathSchema: z.ZodString;
5
+ /**
6
+ * A path relative to the directory that holds the config. Unlike `relativePathSchema` it may climb
7
+ * out of that directory with `..`, matching how Fern resolves protobuf roots against its workspace.
8
+ */
9
+ declare const parentRelativePathSchema: z.ZodString;
5
10
  declare const exactSemverSchema: z.ZodString;
6
11
  type JsonValue = null | boolean | number | string | JsonValue[] | JsonObject;
7
12
  type JsonObject = {
@@ -598,4 +603,4 @@ declare const typescriptGenerationConfigSchema: z.ZodObject<{
598
603
  }, z.core.$strict>;
599
604
  type TypescriptGenerationConfig = z.infer<typeof typescriptGenerationConfigSchema>;
600
605
 
601
- 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 };
606
+ export { rustGenerationConfigSchema 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, parentRelativePathSchema as W, phpGenerationConfigSchema as X, pythonGenerationConfigSchema as Y, relativePathSchema as Z, rubyGenerationConfigSchema as _, type CliDistributionConfig as a, swiftGenerationConfigSchema as a0, terraformGenerationConfigSchema as a1, typescriptGenerationConfigSchema as a2, 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 };
@@ -2,6 +2,11 @@ import { z } from 'zod';
2
2
 
3
3
  declare const nonEmptyStringSchema: z.ZodString;
4
4
  declare const relativePathSchema: z.ZodString;
5
+ /**
6
+ * A path relative to the directory that holds the config. Unlike `relativePathSchema` it may climb
7
+ * out of that directory with `..`, matching how Fern resolves protobuf roots against its workspace.
8
+ */
9
+ declare const parentRelativePathSchema: z.ZodString;
5
10
  declare const exactSemverSchema: z.ZodString;
6
11
  type JsonValue = null | boolean | number | string | JsonValue[] | JsonObject;
7
12
  type JsonObject = {
@@ -598,4 +603,4 @@ declare const typescriptGenerationConfigSchema: z.ZodObject<{
598
603
  }, z.core.$strict>;
599
604
  type TypescriptGenerationConfig = z.infer<typeof typescriptGenerationConfigSchema>;
600
605
 
601
- 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 };
606
+ export { rustGenerationConfigSchema 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, parentRelativePathSchema as W, phpGenerationConfigSchema as X, pythonGenerationConfigSchema as Y, relativePathSchema as Z, rubyGenerationConfigSchema as _, type CliDistributionConfig as a, swiftGenerationConfigSchema as a0, terraformGenerationConfigSchema as a1, typescriptGenerationConfigSchema as a2, 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.16.0",
3
+ "version": "0.18.0",
4
4
  "description": "Shared SDK configuration contracts and transformations for Postman SDK generation",
5
5
  "license": "UNLICENSED",
6
6
  "sideEffects": false,
@@ -118,6 +118,37 @@ their operational extensions remain separate explicit allowlists.
118
118
  Source `path`, `overlays`, and `overrides` values must be relative paths without parent-directory
119
119
  segments. Absolute paths and `..` traversal are rejected at validation time.
120
120
 
121
+ ### Protobuf sources
122
+
123
+ A spec can name protobuf definitions with a `proto` locator instead of `path` or `url`. The fields
124
+ mirror Fern's `generators.yml` `proto` spec, in camelCase:
125
+
126
+ ```yaml
127
+ source:
128
+ specs:
129
+ - id: lattice
130
+ proto:
131
+ root: protos # or { git: { repo, ref?, path } }
132
+ target: anduril/v1/api.proto # optional single .proto file
133
+ overrides: [overrides.yml] # optional, applied in order to the converted API
134
+ dependencies: [buf.build/googleapis/googleapis] # optional Buf Schema Registry modules
135
+ localGeneration: false # optional
136
+ fromOpenApi: true # optional; resolves to false when omitted
137
+ ```
138
+
139
+ A protobuf spec accepts `id`, `name`, `namespace`, and `apiImportSettings` beside `proto`. It has no
140
+ `type`, `overlays`, or spec-level `overrides`; proto overrides live inside `proto`. Local `root`,
141
+ `target`, and `overrides` must be relative, but unlike other source paths they may use `..` to reach
142
+ definitions outside the config directory, matching how Fern resolves proto roots against its
143
+ workspace. The git `path` follows the stricter rules above. A git `root` names the
144
+ repository with `repo`, an optional branch, tag, or commit with `ref`, and the directory with
145
+ `path`. `parseSdkConfigV1` resolves an omitted `fromOpenApi` to `false`; `validateSdkConfigV1`
146
+ leaves it absent.
147
+
148
+ The schema only describes the definitions. The generation client converts them to OpenAPI before
149
+ submission, so SDK Config IR receives an `openapi` spec labelled `origin: protobuf` and never a
150
+ protobuf spec type.
151
+
121
152
  ### OAuth client identity
122
153
 
123
154
  An OAuth 2.0 scheme distinguishes two kinds of client identity:
@@ -210,6 +241,28 @@ target must have an effective output either from that baseline or from its own `
210
241
  migration writes output directly on each target because repositories and publication registries are
211
242
  properties of the generated language artifact.
212
243
 
244
+ ## Hosted MCP servers and the MCP base URL
245
+
246
+ A `language: mcp` target's own `output` block accepts `delivery: hosted` with a `slug`, which deploys
247
+ the generated MCP server to Fern-hosted infrastructure. It is the equivalent of `output.location:
248
+ fern-hosted` in `generators.yml`. It exists only on the `mcp` target; root `output` and other
249
+ languages reject it. The generation service still builds a download for a hosted target; the CLI
250
+ makes the deployment from that build, so `hosted` is never part of the request sent to the service.
251
+ The slug may be an environment expression that the CLI resolves.
252
+
253
+ ```yaml
254
+ targets:
255
+ - language: mcp
256
+ output:
257
+ delivery: hosted
258
+ slug: petstore
259
+ ```
260
+
261
+ Fern migration maps `output.location: fern-hosted` and its `slug` to this output. An MCP generator's
262
+ `baseUrl`, the base URL of the API its tools call, moves to `api.baseUrl`, which is shared by every
263
+ target, so it is migrated only when MCP is the only language in the generator group. Otherwise it
264
+ is reported in `unsupportedFields`.
265
+
213
266
  ## CLI distribution and npm publication
214
267
 
215
268
  A `language: cli` target's own `output` block accepts `distribution`, which publishes the generated
@@ -117,6 +117,11 @@ For Python Fern configs, `skip_validation` is read from the nested `pydantic_con
117
117
  repeat. The combination layer must reject unresolved path and component collisions.
118
118
  - Source formats are limited to formats sdk-gen-core can consume. Other Fern inputs must be lowered
119
119
  before submission.
120
+ - Protobuf definitions are converted to OpenAPI by the generation client. The converted spec is
121
+ submitted as `specType: openapi` with `origin: protobuf`; `origin` is rejected on every other
122
+ spec type, and protobuf is never an IR spec type. Producers set
123
+ `apiImportSettings.respectByteFormat: true` on converted specs so `format: byte` strings become
124
+ base64-encoded bytes, matching Fern.
120
125
  - A Kotlin target currently uses the Java/JVM generator with Kotlin-facing documentation, snippets,
121
126
  and examples. Its retained JVM options share the Java implementation.
122
127
  - `target.language` is the generator identity; `generatorName` is not normalized.
@@ -221,6 +226,7 @@ audited on 2026-07-17. Counts guide the initial contract; they are not a permane
221
226
  | `api.specs[].namespace` | `source.specs[].namespace` | 1 |
222
227
  | `api.specs[].overlays` | `source.specs[].overlays` | 2 |
223
228
  | `api.specs[].overrides` | `source.specs[].overrides` | 39 |
229
+ | `api.specs[].proto` | `source.specs[]` with `specType: openapi`, `origin: protobuf` after client-side conversion | Not in the project snapshot |
224
230
  | `api.default-url` | `api.baseUrl` | 21 |
225
231
  | `api.default-environment` | `api.defaultEnvironment` | 22 |
226
232
  | `api.environments` | `api.environments` | 20+ |
@@ -351,6 +357,7 @@ than generated-language presentation.
351
357
 
352
358
  | Fern setting | Normalized field | Observed projects |
353
359
  | ----------------------------------------------------------- | --------------------------------------- | --------------------------------------: |
360
+ | None; Fern sets it internally for converted protobuf specs | `respectByteFormat` | Not in the project snapshot |
354
361
  | `respect-nullable-schemas` | `respectNullableSchemas` | 10 |
355
362
  | `title-as-schema-name` | `titleAsSchemaName` | 16 |
356
363
  | `ignore-tags` | `ignoreTags` | Not in the project snapshot; see below. |