@fern-api/fern-api-dev 4.71.0 → 4.71.1-1-gb9108d42ae3

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 (2) hide show
  1. package/cli.cjs +56 -20
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -344978,15 +344978,37 @@ var require_parseCommitMessage = __commonJS({
344978
344978
  "use strict";
344979
344979
  Object.defineProperty(exports2, "__esModule", { value: true });
344980
344980
  exports2.parseCommitMessageForPR = parseCommitMessageForPR;
344981
- function parseCommitMessageForPR(commitMessage, changelogEntry, prDescription, versionBumpReason) {
344981
+ function parseCommitMessageForPR(commitMessage, changelogEntry, prDescription, versionBumpReason, previousVersion, newVersion, versionBump, changelogUrl) {
344982
344982
  const lines = commitMessage.split("\n");
344983
344983
  const prTitle = lines[0]?.trim() || "SDK Generation";
344984
344984
  const bodyFromCommit = lines.slice(1).join("\n").trim() || "Automated SDK generation by Fern";
344985
344985
  let prBody = prDescription?.trim() || changelogEntry?.trim() || bodyFromCommit;
344986
- if (versionBumpReason?.trim()) {
344987
- prBody = `**Version Bump:** ${versionBumpReason.trim()}
344986
+ const isBreaking = versionBump === "MAJOR";
344987
+ if (previousVersion?.trim() && newVersion?.trim()) {
344988
+ const emoji3 = isBreaking ? "\u26A0\uFE0F " : "";
344989
+ const header = `## ${emoji3}${previousVersion.trim()} \u2192 ${newVersion.trim()}`;
344990
+ if (isBreaking && versionBumpReason?.trim()) {
344991
+ prBody = `${header}
344992
+
344993
+ **Breaking:** ${versionBumpReason.trim()}
344994
+
344995
+ ${prBody}`;
344996
+ } else {
344997
+ prBody = `${header}
344998
+
344999
+ ${prBody}`;
345000
+ }
345001
+ } else if (isBreaking && versionBumpReason?.trim()) {
345002
+ prBody = `\u26A0\uFE0F **Breaking:** ${versionBumpReason.trim()}
344988
345003
 
344989
345004
  ${prBody}`;
345005
+ }
345006
+ if (changelogUrl?.trim()) {
345007
+ prBody += `
345008
+
345009
+ ---
345010
+
345011
+ [See full changelog](${changelogUrl.trim()})`;
344990
345012
  }
344991
345013
  return { prTitle, prBody };
344992
345014
  }
@@ -345278,7 +345300,8 @@ var require_GithubStep = __commonJS({
345278
345300
  }
345279
345301
  }
345280
345302
  const finalCommitMessage = this.config.commitMessage ?? "SDK Generation";
345281
- const { prTitle, prBody } = (0, parseCommitMessage_1.parseCommitMessageForPR)(finalCommitMessage, this.config.changelogEntry, this.config.prDescription, this.config.versionBumpReason);
345303
+ const changelogUrl = this.config.changelogEntry ? `https://github.com/${this.config.uri}/blob/${prBranch}/changelog.md` : void 0;
345304
+ const { prTitle, prBody } = (0, parseCommitMessage_1.parseCommitMessageForPR)(finalCommitMessage, this.config.changelogEntry, this.config.prDescription, this.config.versionBumpReason, this.config.previousVersion, this.config.newVersion, this.config.versionBump, changelogUrl);
345282
345305
  const replaySection = (0, replay_summary_1.formatReplayPrBody)(replayResult, { branchName: prBranch, repoUri: this.config.uri });
345283
345306
  let enrichedBody = replaySection != null ? prBody + "\n\n---\n\n" + replaySection : prBody;
345284
345307
  enrichedBody = enrichPrBodyForAutomation(enrichedBody, this.config);
@@ -621039,7 +621062,7 @@ var AccessTokenPosthogManager = class {
621039
621062
  properties: {
621040
621063
  ...event,
621041
621064
  ...event.properties,
621042
- version: "4.71.0",
621065
+ version: "4.71.1-1-gb9108d42ae3",
621043
621066
  usingAccessToken: true
621044
621067
  }
621045
621068
  });
@@ -621093,7 +621116,7 @@ var UserPosthogManager = class {
621093
621116
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
621094
621117
  event: "CLI",
621095
621118
  properties: {
621096
- version: "4.71.0",
621119
+ version: "4.71.1-1-gb9108d42ae3",
621097
621120
  ...event,
621098
621121
  ...event.properties,
621099
621122
  usingAccessToken: false,
@@ -811846,13 +811869,20 @@ function isSlugCoveredByRedirect(oldSlug, redirects, basePath) {
811846
811869
  });
811847
811870
  }
811848
811871
  function findRemovedSlugs(publishedEntries, localPageIdToSlug) {
811872
+ const activeSlugs = new Set(localPageIdToSlug.values());
811849
811873
  const removed = [];
811850
- for (const entry of publishedEntries) {
811851
- const newSlug = localPageIdToSlug.get(entry.pageId);
811874
+ for (const publishedEntry of publishedEntries) {
811875
+ const newSlug = localPageIdToSlug.get(publishedEntry.pageId);
811852
811876
  if (newSlug === void 0) {
811853
- removed.push({ pageId: entry.pageId, oldSlug: entry.slug, newSlug: void 0 });
811854
- } else if (newSlug !== entry.slug) {
811855
- removed.push({ pageId: entry.pageId, oldSlug: entry.slug, newSlug });
811877
+ if (activeSlugs.has(publishedEntry.slug)) {
811878
+ continue;
811879
+ }
811880
+ removed.push({ pageId: publishedEntry.pageId, oldSlug: publishedEntry.slug, newSlug: void 0 });
811881
+ } else if (newSlug !== publishedEntry.slug) {
811882
+ if (activeSlugs.has(publishedEntry.slug)) {
811883
+ continue;
811884
+ }
811885
+ removed.push({ pageId: publishedEntry.pageId, oldSlug: publishedEntry.slug, newSlug });
811856
811886
  }
811857
811887
  }
811858
811888
  return removed;
@@ -838185,7 +838215,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
838185
838215
  var LOGS_FOLDER_NAME = "logs";
838186
838216
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
838187
838217
  function getCliSource() {
838188
- const version7 = "4.71.0";
838218
+ const version7 = "4.71.1-1-gb9108d42ae3";
838189
838219
  return `cli@${version7}`;
838190
838220
  }
838191
838221
  var DebugLogger = class {
@@ -849432,7 +849462,7 @@ var LegacyDocsPublisher = class {
849432
849462
  previewId,
849433
849463
  disableTemplates: void 0,
849434
849464
  skipUpload,
849435
- cliVersion: "4.71.0"
849465
+ cliVersion: "4.71.1-1-gb9108d42ae3"
849436
849466
  });
849437
849467
  if (taskContext.getResult() === TaskResult.Failure) {
849438
849468
  return { success: false };
@@ -900972,7 +901002,7 @@ var import_baml3 = require("@boundaryml/baml");
900972
901002
 
900973
901003
  // ../ai/lib/baml_client/inlinedbaml.js
900974
901004
  var fileMap = {
900975
- "diff_analyzer.baml": '// SDK Diff Analyzer\n// Analyzes git diffs of SDK code and produces semantic commit messages and version bumps\n\nenum VersionBump {\n MAJOR\n MINOR\n PATCH\n NO_CHANGE\n}\n\nclass AnalyzeCommitDiffRequest {\n diff string @description("The git diff to analyze for generating a commit message")\n}\n\nclass AnalyzeCommitDiffResponse {\n message string\n @description("Developer-facing git commit message. Use conventional commit format. Reference specific code symbols (function names, class names). Keep summary under 72 chars.")\n\n changelog_entry string\n @description("User-facing release note for CHANGELOG.md and GitHub Releases. Describe the impact on SDK consumers, not implementation details. Include migration instructions for MAJOR. Use plain prose, not conventional commit format. Empty string for PATCH.")\n\n version_bump VersionBump\n @description("The recommended semantic version bump: MAJOR for breaking changes, MINOR for new features, PATCH for bug fixes and other changes, NO_CHANGE for empty diffs")\n\n version_bump_reason string\n @description("One sentence explaining WHY this version bump was chosen. For MAJOR: name the specific breaking symbol(s). For MINOR: name the new capability. For PATCH: describe the fix. For NO_CHANGE: \'No functional changes detected.\' Example: \'MAJOR because `parserCreateJob` InputStream overloads were removed from `RawLabReportClient`.\'")\n}\n\n// Main function that analyzes SDK diffs\nfunction AnalyzeSdkDiff(\n diff: string @description("The git diff to analyze"),\n language: string @description("The SDK programming language, e.g. \'typescript\', \'python\', \'java\'"),\n previous_version: string @description("The current published version before this change, e.g. \'1.2.3\'"),\n prior_changelog: string @description("The last 3 changelog entries for this SDK, empty string if none. Use this to match the existing commit message style and understand the versioning pattern."),\n spec_commit_message: string @description("The commit message from the API spec repository that triggered this SDK generation. Use as a hint for the intent of the change, but verify against the actual diff. Empty string if unavailable.")\n) -> AnalyzeCommitDiffResponse {\n client DefaultClient\n\n prompt #"\n You are an expert software engineer analyzing changes to generate semantic commit messages.\n\n Analyze the provided git diff and return a structured response with these fields:\n - message: A git commit message formatted like the example below\n - version_bump: One of: MAJOR, MINOR, PATCH, or NO_CHANGE\n\n Version Bump Guidelines:\n - MAJOR: Breaking changes (removed/renamed functions, changed signatures, removed parameters)\n - MINOR: New features that are backward compatible (new functions, new optional parameters).\n Also MINOR: behavioral changes invisible to the public API surface that still affect consumers:\n - Changed HTTP status code handling (e.g. 404 now throws instead of returning null)\n - Changed default parameter values (timeout, retry count, page size, base URL)\n - Changed serialization behavior (date formats, null handling, field ordering)\n - Changed error message text that consumers may depend on\n - Changed HTTP header names or values sent to the server\n - Changed retry or backoff behavior (different retry counts, delay strategies)\n - PATCH: Bug fixes, documentation, internal refactoring with no observable behavioral change\n - NO_CHANGE: The diff is empty\n\n --- Examples ---\n\n Examples of correct classifications:\n\n --- MAJOR: removed exported TypeScript function ---\n diff --git a/src/api/client.ts b/src/api/client.ts\n -export async function getUser(id: string): Promise<User> {\n - return this.request("GET", `/users/${id}`);\n -}\n version_bump: MAJOR\n reason: Existing callers of getUser() will get a compile error.\n\n --- MAJOR: removed Python public method ---\n diff --git a/vital/client.py b/vital/client.py\n - def get_user(self, user_id: str) -> User:\n - return self._request("GET", f"/users/{user_id}")\n version_bump: MAJOR\n reason: Existing callers crash with AttributeError.\n\n --- MINOR: new optional TypeScript parameter ---\n diff --git a/src/api/client.ts b/src/api/client.ts\n -async createUser(name: string): Promise<User>\n +async createUser(name: string, role?: UserRole): Promise<User>\n version_bump: MINOR\n reason: Existing callers unaffected \u2014 new parameter is optional.\n\n --- MINOR: new Java public method ---\n diff --git a/src/.../UsersClient.java b/src/.../UsersClient.java\n + public CompletableFuture<User> getUserAsync(String userId) {\n + return this.httpClient.sendAsync(...);\n + }\n version_bump: MINOR\n reason: New capability added, nothing removed or changed.\n\n --- MINOR: changed default retry count ---\n diff --git a/src/core/http_client.py b/src/core/http_client.py\n -MAX_RETRIES = 3\n +MAX_RETRIES = 5\n version_bump: MINOR\n reason: Changed default retry count \u2014 existing consumers will experience different retry behavior.\n\n --- PATCH: Go import reorganization ---\n diff --git a/client.go b/client.go\n -import "fmt"\n -import "net/http"\n +import (\n + "fmt"\n + "net/http"\n +)\n version_bump: PATCH\n reason: Formatting change only, no functional difference.\n\n --- End Examples ---\n\n {% if language == "typescript" %}\n Language-specific breaking change rules for TypeScript:\n\n MAJOR (breaking):\n - Removing a required response field is always MAJOR\n - Removing or renaming a public class, method, function, or exported symbol is MAJOR\n - Making a response field optional is MAJOR (type changes from T to T | undefined, breaking existing property access without null checks)\n - Changing a method return type (e.g. Promise<T> to Promise<T | undefined>, or T to T | null) is MAJOR\n - New enum values are MAJOR if the SDK generates exhaustive switch/if-else chains (callers get compile errors on unhandled cases)\n - Changing a union type (adding/removing variants) is MAJOR if callers use exhaustive type narrowing or discriminated unions\n - Adding a new required property to a request/input type is MAJOR (existing callers won\'t compile)\n - Removing or renaming an exported type, interface, or type alias is MAJOR\n - Changing the type of an existing property (e.g. string to number, or string to string[]) is MAJOR\n - Changing a generic type parameter constraint (e.g. <T extends Foo> to <T extends Bar>) is MAJOR\n - Converting a synchronous method to async (or vice versa) is MAJOR (changes return type to Promise<T>)\n - Removing a default export or switching between default and named exports is MAJOR\n - Changing the structure of a discriminated union (e.g. changing the discriminant field name) is MAJOR\n - Removing or renaming environment/server URL constants is MAJOR\n - Changing the constructor signature of a client class (adding required params) is MAJOR\n - Narrowing a parameter type (e.g. string | number to string) is MAJOR (callers passing number break)\n\n MINOR (backward-compatible additions):\n - Adding a new optional parameter to a function is MINOR\n - Adding new exported types, interfaces, or classes is MINOR\n - Adding new methods to an existing client class is MINOR\n - Adding new optional properties to request types is MINOR\n - Adding new enum values when NOT used in exhaustive checks is MINOR\n - Adding new environment/server URL constants is MINOR\n - Widening a parameter type (e.g. string to string | number) is MINOR\n - Adding new re-exports from index files is MINOR\n - Adding new error types or exception classes is MINOR\n - Adding new RequestOptions fields (e.g. timeout, retries) is MINOR\n - Deprecating (but not removing) a public API is MINOR\n\n PATCH (no API surface change):\n - Changes to internal/private modules (core/, _internal/, utils/) are PATCH\n - Reordering imports, formatting, or comment changes are PATCH\n - Updating SDK version headers (X-Fern-SDK-Version, User-Agent) is PATCH\n - Refactoring HTTP client internals without changing observable defaults or behavior is PATCH\n - Updating dependency versions in package.json is PATCH\n - Adding or modifying JSDoc/TSDoc comments is PATCH\n - Refactoring internal implementation without changing public signatures is PATCH\n - Changes to .npmignore, tsconfig.json, or build configuration are PATCH\n - Updating serialization/deserialization logic that preserves the same public types is PATCH\n\n {% elif language == "python" %}\n Language-specific breaking change rules for Python:\n\n MAJOR (breaking):\n - Removing a required response field is always MAJOR\n - Removing or renaming a public class, method, or function is always MAJOR\n - Adding a new required parameter to a public method is MAJOR (callers get TypeError)\n - Renaming a parameter in a public method is MAJOR if callers use keyword arguments\n - Removing a parameter from a public method signature is MAJOR\n - Changing the type of a parameter from one concrete type to an incompatible one is MAJOR\n - Changing exception types raised by a method (callers catching specific exceptions break) is MAJOR\n - Removing or renaming a public module or subpackage is MAJOR (import statements break)\n - Moving a public class/function to a different module without re-exporting from the original is MAJOR\n - Changing a class from inheriting one base to another when callers use isinstance() checks is MAJOR\n - Removing a public class attribute or property is MAJOR\n\n MINOR (backward-compatible additions):\n - Making a response field optional is usually MINOR (Python uses None propagation; callers rarely type-check strictly)\n - New enum values are MINOR (unknown values are handled gracefully with string fallbacks)\n - Changing a return type from a concrete type to Optional is MINOR (duck typing absorbs this)\n - Adding new public methods, classes, or modules is MINOR\n - Adding new optional parameters (with defaults) is MINOR\n - Adding new optional fields to Pydantic models is MINOR\n - Adding new exception/error classes is MINOR\n - Adding new class attributes or properties is MINOR\n - Adding new type overloads (@overload decorator) is MINOR\n - Adding new environment/server URL constants is MINOR\n - Adding new RequestOptions fields (e.g. timeout, max_retries) is MINOR\n - Deprecating (but not removing) a public API is MINOR\n - Widening a type annotation (e.g. str to Union[str, int]) is MINOR\n\n PATCH (no API surface change):\n - Changes to private methods (prefixed with _) are PATCH\n - Changes to type hints only (no runtime effect) are PATCH\n - Reformatting, docstring updates, or comment changes are PATCH\n - Updating SDK version headers (X-Fern-SDK-Version, User-Agent) are PATCH\n - Refactoring httpx/requests client internals without changing observable defaults or behavior is PATCH\n - Updating dependency versions in pyproject.toml/setup.py is PATCH\n - Updating serialization/deserialization logic that preserves the same public types is PATCH\n - Refactoring internal implementation without changing public signatures is PATCH\n - Changes to __init__.py that don\'t alter public re-exports are PATCH\n - Changes to conftest.py, test files, or CI configuration are PATCH\n\n {% elif language == "java" %}\n Language-specific breaking change rules for Java:\n\n MAJOR (breaking):\n - Removing a required response field is always MAJOR\n - Removing or renaming a public class, method, or interface is always MAJOR\n - Making a response field optional (e.g. T to Optional<T>) is MAJOR (callers must handle Optional unwrapping)\n - New enum values are MAJOR if the SDK generates exhaustive switch statements\n - Adding a new required parameter to a public method is MAJOR\n - Changing a method\'s return type is MAJOR (even if compatible at runtime, recompilation fails)\n - Removing or changing a public static final constant is MAJOR\n - Changing a class from concrete to abstract (or vice versa) is MAJOR\n - Changing the checked exceptions declared in a throws clause is MAJOR\n - Removing a public constructor or changing its parameter list is MAJOR\n - Removing an interface that a public class implements is MAJOR\n - Changing generic type parameters on a public class (e.g. Foo<T> to Foo<T, U>) is MAJOR\n - Moving a public class to a different package without re-exporting is MAJOR\n - Narrowing a parameter type (e.g. Object to String) is MAJOR\n - Making a non-final class final is MAJOR (breaks subclassing)\n - Changing the type of a builder method parameter is MAJOR\n\n MINOR (backward-compatible additions):\n - Adding new overloaded methods is MINOR\n - Adding new public classes or interfaces is MINOR\n - Adding new optional builder methods is MINOR\n - Adding new enum values when NOT used in exhaustive switch statements is MINOR\n - Adding new optional fields to request objects is MINOR\n - Adding new exception/error classes is MINOR\n - Adding new static utility methods is MINOR\n - Adding new environment/server URL constants is MINOR\n - Adding new RequestOptions fields (e.g. timeout, retries) is MINOR\n - Widening a parameter type (e.g. String to Object) is MINOR\n - Adding default methods to interfaces (Java 8+) is MINOR\n - Deprecating (but not removing) public APIs with @Deprecated is MINOR\n\n PATCH (no API surface change):\n - Changes to package-private or private methods are PATCH\n - Changes to annotations (other than public API annotations), Javadoc, or formatting are PATCH\n - Updating SDK version headers (X-Fern-SDK-Version, User-Agent) is PATCH\n - Refactoring OkHttp/HttpClient internals without changing observable defaults or behavior is PATCH\n - Updating dependency versions in build.gradle/pom.xml is PATCH\n - Refactoring internal implementation without changing public signatures is PATCH\n - Updating serialization/deserialization logic (Jackson/Gson config) that preserves public types is PATCH\n - Changes to test files, CI configuration, or build scripts are PATCH\n\n {% elif language == "go" %}\n Language-specific breaking change rules for Go:\n\n MAJOR (breaking):\n - Removing a required response field is always MAJOR\n - Removing or renaming an exported function, method, or type is always MAJOR\n - Making a response field a pointer type (e.g. string to *string) is MAJOR (callers must dereference)\n - Changing a function signature (adding/removing parameters or return values) is MAJOR (Go has no overloading)\n - Removing or renaming an exported struct field is MAJOR\n - Changing the type of an exported struct field is MAJOR\n - Removing or renaming an exported constant or variable is MAJOR\n - Changing an interface by adding methods is MAJOR (all implementations must add the method)\n - Removing a method from an interface is MAJOR (callers using that method break)\n - Changing a function\'s return type(s) is MAJOR (Go is strict about return types)\n - Changing a variadic parameter to non-variadic (or vice versa) is MAJOR\n - Moving a type/function to a different package without aliasing in the original is MAJOR\n - Changing the receiver type of a method (value receiver to pointer receiver changes method set) is MAJOR\n - Changing an exported error variable\'s type or value is MAJOR (callers using errors.Is break)\n\n MINOR (backward-compatible additions):\n - Adding new exported functions, methods, or types is MINOR\n - New enum-like constants are MINOR (Go enums are not exhaustive by default)\n - Adding new fields to a struct is MINOR (existing code still compiles, zero-value initialization)\n - Making a response field optional (pointer) is usually MINOR if the field was already a struct field\n - Adding new optional function parameters via functional options pattern is MINOR\n - Adding new interface types is MINOR\n - Adding new error types/variables is MINOR\n - Adding new environment/server URL constants is MINOR\n - Adding new RequestOption functions is MINOR\n - Widening a return type from a concrete type to an interface is MINOR (if interface is satisfied)\n - Adding new methods to a concrete type (does not break interface implementations) is MINOR\n\n PATCH (no API surface change):\n - Changes to unexported (lowercase) functions or types are PATCH\n - Changes to go.mod dependencies, import reordering, or formatting are PATCH\n - Updating SDK version headers (X-Fern-SDK-Version, User-Agent) is PATCH\n - Refactoring http.Client internals without changing observable defaults or behavior is PATCH\n - Updating serialization/deserialization logic (JSON tags, encoding) that preserves identical output is PATCH\n - Refactoring internal implementation without changing exported signatures is PATCH\n - Changes to *_test.go files, Makefile, or CI configuration are PATCH\n - Updating comments, godoc, or code formatting (gofmt) is PATCH\n\n {% elif language == "ruby" %}\n Language-specific breaking change rules for Ruby:\n\n MAJOR (breaking):\n - Removing a required response field is always MAJOR\n - Removing or renaming a public method is MAJOR (callers get NoMethodError)\n - Adding a new required positional parameter is MAJOR\n - Removing a method parameter is MAJOR (callers passing that argument get ArgumentError)\n - Changing the order of positional parameters is MAJOR\n - Removing or renaming a public class or module is MAJOR (callers get NameError)\n - Changing a method from instance to class method (or vice versa) is MAJOR\n - Changing the return type in a breaking way (e.g. returning nil where an object was expected and callers chain methods) is MAJOR\n - Removing a public constant is MAJOR\n - Changing exception types raised by a method is MAJOR (callers rescuing specific exceptions break)\n\n MINOR (backward-compatible additions):\n - Making a response field optional is usually MINOR (Ruby uses nil propagation; callers rarely type-check)\n - New enum values are MINOR (unknown values are handled gracefully)\n - Adding new optional keyword parameters (with defaults) is MINOR\n - Adding new public methods or classes is MINOR\n - Adding new optional fields to response/request objects is MINOR\n - Adding new exception/error classes is MINOR\n - Adding new environment/server URL constants is MINOR\n - Adding new RequestOptions fields (e.g. timeout, max_retries) is MINOR\n - Deprecating (but not removing) a public API is MINOR\n - Adding new modules or mixins is MINOR\n\n PATCH (no API surface change):\n - Changes to private methods are PATCH\n - Gemspec metadata, comment, or formatting changes are PATCH\n - Updating SDK version headers is PATCH\n - Refactoring Faraday/Net::HTTP internals without changing observable defaults or behavior is PATCH\n - Updating dependency versions in Gemfile/gemspec is PATCH\n - Refactoring internal implementation without changing public signatures is PATCH\n - Changes to test files, Rakefile, or CI configuration are PATCH\n\n {% elif language == "csharp" %}\n Language-specific breaking change rules for C#:\n\n MAJOR (breaking):\n - Removing a required response field is always MAJOR\n - Removing or renaming a public class, method, property, or interface is always MAJOR\n - Making a response field nullable (e.g. T to T?) is MAJOR (callers must handle null checks)\n - New enum values are MAJOR if the SDK generates exhaustive switch expressions\n - Adding a new required parameter to a public method is MAJOR\n - Changing a method\'s return type is MAJOR\n - Removing or changing a public constant or static readonly field is MAJOR\n - Changing a class from non-sealed to sealed (or abstract to concrete) is MAJOR\n - Changing the base class of a public class is MAJOR\n - Removing an interface implementation from a public class is MAJOR\n - Changing generic type constraints on a public class or method is MAJOR\n - Moving a public type to a different namespace without type forwarding is MAJOR\n - Changing property from read-write to read-only (removing setter) is MAJOR\n - Changing async method to sync (Task<T> to T) or vice versa is MAJOR\n\n MINOR (backward-compatible additions):\n - Adding new public classes, interfaces, or methods is MINOR\n - Adding new optional parameters (with default values) is MINOR\n - Adding new overloaded methods is MINOR\n - Adding new enum values when NOT used in exhaustive switch expressions is MINOR\n - Adding new optional properties to request objects is MINOR\n - Adding new exception types is MINOR\n - Adding new environment/server URL constants is MINOR\n - Adding new RequestOptions fields (e.g. Timeout, MaxRetries) is MINOR\n - Adding new extension methods is MINOR\n - Deprecating (but not removing) public APIs with [Obsolete] is MINOR\n\n PATCH (no API surface change):\n - Changes to internal or private members are PATCH\n - XML doc comments, formatting, or namespace reorganization are PATCH\n - Updating SDK version headers is PATCH\n - Refactoring HttpClient internals without changing observable defaults or behavior is PATCH\n - Updating dependency versions in .csproj is PATCH\n - Refactoring internal implementation without changing public signatures is PATCH\n - Updating serialization/deserialization (System.Text.Json/Newtonsoft) config that preserves public types is PATCH\n - Changes to test files, .sln, or CI configuration are PATCH\n\n {% elif language == "php" %}\n Language-specific breaking change rules for PHP:\n\n MAJOR (breaking):\n - Removing a required response field is always MAJOR\n - Removing or renaming a public method or class is always MAJOR\n - Changing a method signature (adding required parameters) is MAJOR\n - Removing a method parameter is MAJOR\n - Changing the type declaration of a parameter to an incompatible type is MAJOR\n - Removing or renaming a public constant is MAJOR\n - Changing a class from non-final to final is MAJOR (breaks extension)\n - Removing an interface implementation from a public class is MAJOR\n - Changing the return type declaration to an incompatible type is MAJOR\n - Moving a class to a different namespace without aliasing is MAJOR\n - Changing exception types thrown by a method is MAJOR\n\n MINOR (backward-compatible additions):\n - Making a response field nullable is MINOR in most cases (PHP is dynamically typed)\n - Adding new optional parameters (with defaults) is MINOR\n - Adding new public classes or methods is MINOR\n - New enum cases are usually MINOR (PHP enums are not typically used in exhaustive matches)\n - Adding new optional fields to request/response objects is MINOR\n - Adding new exception classes is MINOR\n - Adding new environment/server URL constants is MINOR\n - Adding new traits or interfaces is MINOR\n - Adding new RequestOptions fields is MINOR\n - Deprecating (but not removing) public APIs is MINOR\n\n PATCH (no API surface change):\n - Changes to private/protected methods are PATCH\n - PHPDoc, formatting, or composer.json metadata changes are PATCH\n - Updating SDK version headers is PATCH\n - Refactoring Guzzle/cURL internals without changing observable defaults or behavior is PATCH\n - Updating dependency versions in composer.json is PATCH\n - Refactoring internal implementation without changing public signatures is PATCH\n - Changes to test files, phpunit.xml, or CI configuration are PATCH\n\n {% elif language == "swift" %}\n Language-specific breaking change rules for Swift:\n\n MAJOR (breaking):\n - Removing a required response field is always MAJOR\n - Removing or renaming a public method, property, or type is always MAJOR\n - Making a response field optional (T to T?) is MAJOR (callers must unwrap with if-let/guard)\n - New enum cases are MAJOR (Swift switch statements must be exhaustive unless using default)\n - Adding a new required parameter to a public method is MAJOR\n - Changing the type of a public property is MAJOR\n - Removing or changing a public protocol requirement is MAJOR\n - Removing protocol conformance from a public type is MAJOR\n - Changing a struct to a class (or vice versa) is MAJOR (value vs reference semantics)\n - Making a public initializer failable (init to init?) or vice versa is MAJOR\n - Changing the associated values of an enum case is MAJOR\n - Removing a public typealias is MAJOR\n - Changing access level from public to internal/private is MAJOR\n\n MINOR (backward-compatible additions):\n - Adding new public types, methods, or properties is MINOR\n - Adding new optional parameters (with default values) is MINOR\n - Adding new enum cases when callers use default in switch is MINOR\n - Adding new protocol extensions with default implementations is MINOR\n - Adding new optional fields to request/response structs is MINOR\n - Adding new error types is MINOR\n - Adding new environment/server URL constants is MINOR\n - Adding new RequestOptions fields is MINOR\n - Adding new convenience initializers is MINOR\n - Deprecating (but not removing) public APIs with @available(*, deprecated) is MINOR\n\n PATCH (no API surface change):\n - Changes to internal or private members are PATCH\n - Formatting, comments, or documentation changes are PATCH\n - Updating SDK version headers is PATCH\n - Refactoring URLSession internals without changing observable defaults or behavior is PATCH\n - Updating dependency versions in Package.swift is PATCH\n - Refactoring internal implementation without changing public signatures is PATCH\n - Changes to test files, xcconfig, or CI configuration are PATCH\n\n {% elif language == "rust" %}\n Language-specific breaking change rules for Rust:\n\n MAJOR (breaking):\n - Removing a required response field is always MAJOR\n - Removing or renaming a public function, struct, enum, or trait is always MAJOR\n - Making a response field optional (T to Option<T>) is MAJOR (callers must handle the Option)\n - New enum variants are MAJOR (Rust match statements must be exhaustive unless using _ wildcard)\n - Adding a new required field to a public struct is MAJOR (unless #[non_exhaustive])\n - Removing a public trait implementation is MAJOR\n - Changing a function\'s return type is MAJOR\n - Adding a required method to a public trait is MAJOR (all implementations must add it)\n - Changing the type of a public struct field is MAJOR\n - Removing or renaming a public module is MAJOR\n - Making a public type private (pub to pub(crate) or removing pub) is MAJOR\n - Changing a struct from non-exhaustive to exhaustive construction (removing .. Default::default()) is MAJOR\n - Changing generic type parameters or their bounds on public types is MAJOR\n - Changing from Result<T, E1> to Result<T, E2> where E2 is a different error type is MAJOR\n - Removing a public constant or static is MAJOR\n\n MINOR (backward-compatible additions):\n - Adding new public functions, structs, or enums is MINOR\n - Adding new optional fields to #[non_exhaustive] structs is MINOR\n - Adding new enum variants to #[non_exhaustive] enums is MINOR\n - Adding new trait implementations for existing types is MINOR\n - Adding new public constants or statics is MINOR\n - Adding new methods to existing impl blocks is MINOR\n - Adding new error types is MINOR\n - Adding new environment/server URL constants is MINOR\n - Adding new RequestOptions fields is MINOR\n - Adding new optional builder methods is MINOR\n - Deprecating (but not removing) public APIs with #[deprecated] is MINOR\n\n PATCH (no API surface change):\n - Changes to pub(crate) or private items are PATCH\n - Cargo.toml metadata, formatting, or comment changes are PATCH\n - Updating SDK version headers is PATCH\n - Refactoring reqwest/hyper internals without changing observable defaults or behavior is PATCH\n - Updating dependency versions in Cargo.toml is PATCH\n - Refactoring internal implementation without changing public signatures is PATCH\n - Updating serialization/deserialization (serde) config that preserves public types is PATCH\n - Changes to test files, build.rs, or CI configuration are PATCH\n\n {% elif language == "kotlin" %}\n Language-specific breaking change rules for Kotlin:\n\n MAJOR (breaking):\n - Removing a required response field is always MAJOR\n - Removing or renaming a public function, class, or property is always MAJOR\n - Making a response field nullable (T to T?) is MAJOR (callers must handle null safety operators)\n - New enum values are MAJOR if used in when() expressions without else branch\n - Adding a new required parameter to a public function is MAJOR\n - Changing a method\'s return type is MAJOR\n - Removing or changing a public constant (const val / companion object val) is MAJOR\n - Changing a class from open to final (or data class to regular class) is MAJOR\n - Removing an interface implementation from a public class is MAJOR\n - Changing generic type parameters or their variance (in/out) on public types is MAJOR\n - Moving a public class to a different package without type aliasing is MAJOR\n - Changing a property from var to val (or removing a setter) is MAJOR\n - Changing a suspend function to non-suspend (or vice versa) is MAJOR\n - Changing sealed class/interface hierarchy (removing subclasses) is MAJOR\n\n MINOR (backward-compatible additions):\n - Adding new public classes, functions, or extension functions is MINOR\n - Adding new optional parameters (with default values) is MINOR\n - Adding new enum values when callers use else in when() is MINOR\n - Adding new optional properties to data classes is MINOR\n - Adding new exception types is MINOR\n - Adding new environment/server URL constants is MINOR\n - Adding new RequestOptions fields is MINOR\n - Adding new sealed class/interface subtypes is MINOR (if callers have else branch)\n - Deprecating (but not removing) public APIs with @Deprecated is MINOR\n - Adding new companion object functions is MINOR\n\n PATCH (no API surface change):\n - Changes to internal or private members are PATCH\n - KDoc, formatting, or build.gradle changes are PATCH\n - Updating SDK version headers is PATCH\n - Refactoring OkHttp internals without changing observable defaults or behavior is PATCH\n - Updating dependency versions in build.gradle.kts is PATCH\n - Refactoring internal implementation without changing public signatures is PATCH\n - Updating serialization/deserialization (kotlinx.serialization/Moshi) config that preserves public types is PATCH\n - Changes to test files or CI configuration are PATCH\n\n {% else %}\n Language-specific breaking change rules (language: {{ language }}):\n\n MAJOR (breaking):\n - Removing a required response field is always MAJOR\n - Removing or renaming a public class, method, or function is always MAJOR\n - Making a response field optional is MAJOR in statically-typed languages (TypeScript, Java, C#, Swift, Rust, Kotlin, Go), usually MINOR in dynamically-typed ones (Python, Ruby, PHP)\n - New enum values are MAJOR if the language enforces exhaustive matching (TypeScript, Java, C#, Swift, Rust), MINOR otherwise\n - Adding a new required parameter to a public method is MAJOR\n - Changing a method\'s return type is MAJOR\n - Changing the type of an existing field/property is MAJOR\n - Removing or changing public constants is MAJOR\n\n MINOR (backward-compatible additions):\n - Adding new public APIs (classes, methods, functions) is MINOR\n - Adding new optional parameters is MINOR\n - Adding new optional fields to request/response objects is MINOR\n - Adding new error/exception types is MINOR\n - Deprecating (but not removing) public APIs is MINOR\n\n PATCH (no API surface change):\n - Internal/private changes are PATCH\n - Formatting, documentation, or comment changes are PATCH\n - Dependency version updates are PATCH\n - SDK version header updates are PATCH\n - Refactoring retry/timeout internals without changing observable defaults or behavior is PATCH\n - Refactoring internals without changing public signatures is PATCH\n {% endif %}\n\n Apply these patterns to the diff below. When in doubt between MINOR and PATCH,\n prefer MINOR. When in doubt between MAJOR and MINOR, examine whether existing\n callers would break without any code changes on their side.\n\n Message Format (use this exact structure):\n ```\n <type>: <short summary>\n\n <detailed description of what changed and why it matters>\n\n Key changes:\n - <change 1>\n - <change 2>\n - <change 3>\n ```\n\n Message Guidelines:\n - The commit type MUST match the version bump:\n - MAJOR \u2192 use "feat!:" prefix (the "!" signals a breaking change per Conventional Commits)\n - MINOR \u2192 use "feat:" prefix\n - PATCH \u2192 use "fix:" or "chore:" prefix (whichever fits the change)\n - NO_CHANGE \u2192 use "chore:" prefix\n - Keep the summary line under 72 characters\n - Write in present tense imperative mood ("add" not "added" or "adds")\n - For MAJOR: the summary MUST name the breaking change (e.g., "feat!: remove parserCreateJob InputStream overloads")\n - For MINOR: the summary should name the new capability\n - For PATCH: describe the fix or improvement\n - Be specific \u2014 do not use generic summaries like "update SDK" or "regenerate SDK"\n - Do not use "Fern regeneration" in commit messages \u2014 use "SDK regeneration" instead\n - NEVER include the literal version "0.0.0-fern-placeholder" in the commit message \u2014 if you see this placeholder\n in the diff, describe changes generically (e.g., "added X-Fern-SDK-Version header")\n - The previous version is provided for context only. Do not include it literally in the summary line.\n\n {% if prior_changelog %}\n Prior changelog entries (for style reference):\n ---\n {{prior_changelog}}\n ---\n Match the tone and format of these entries in your commit message.\n {% endif %}\n\n {% if spec_commit_message %}\n The API spec change that triggered this SDK generation had the following commit message:\n "{{spec_commit_message}}"\n Use this as a hint for understanding the intent of the change, but always verify\n against the actual diff below. The commit message may be vague or inaccurate.\n {% endif %}\n\n Previous version: {{previous_version}}\n SDK language: {{language}}\n\n Git Diff:\n ---\n {{diff}}\n ---\n\n Changelog Entry Guidelines:\n - Write for SDK consumers, not engineers reading the source code\n - Prefix each entry with a category tag: [BREAKING], [ADDED], [CHANGED], or [FIXED]\n - MAJOR changes MUST use [BREAKING]\n - MINOR additions use [ADDED]\n - MINOR behavioral changes use [CHANGED]\n - PATCH fixes use [FIXED] (or empty string if trivial)\n - For [BREAKING]: name the exact symbol, explain what broke, and give a one-line migration\n Example: "[BREAKING] **`parserCreateJob`** now accepts `File[]` instead of `File`. Wrap single files in an array: `parserCreateJob([file], request)`."\n - For [ADDED]: name the new capability in one sentence\n Example: "[ADDED] **`LabAccountClient`** for managing team lab accounts."\n - Describe patterns once, not per-file. If the same method was added to 50 classes,\n write ONE entry: "[ADDED] **`additionalProperty()`** and **`additionalProperties()`** builder methods on all request types."\n Do NOT write 50 separate entries.\n - NEVER silently drop a category of change. If new enum values were added, new clients were introduced,\n or fields were removed, each *category* must appear \u2014 but you don\'t need to list every individual value.\n GOOD: "[ADDED] New enum values added across several types including `ProviderType` and `OrderStatus`."\n BAD: listing every enum value\n - PATCH: leave empty string \u2014 patch changes don\'t warrant changelog entries\n - Do not use conventional commit prefixes (no "feat:", "fix:", etc.)\n - Write in third person present tense\n - Prefer fewer, richer entries over many thin ones. Aim for 3-5 entries per chunk by grouping related changes.\n - IMPORTANT: Wrap type references containing angle brackets in backticks (e.g., `Optional<String>`)\n\n Remember again that YOU MUST return a structured JSON response with these four fields:\n - message: A git commit message formatted like the example previously provided\n - changelog_entry: A user-facing release note (empty string for PATCH)\n - version_bump: One of: MAJOR, MINOR, PATCH, or NO_CHANGE\n - version_bump_reason: One sentence explaining WHY this bump level was chosen.\n For MAJOR, name the specific breaking symbol(s) and explain why existing callers break.\n For MINOR, name the new capability added.\n For PATCH, describe what was fixed or improved.\n For NO_CHANGE, say "No functional changes detected."\n Example: "MAJOR because `parserCreateJob` InputStream overloads were removed from `RawLabReportClient`, breaking existing callers."\n "#\n}\n\nclass ConsolidateChangelogResponse {\n consolidated_changelog string\n @description("CHANGELOG.md entry in Keep a Changelog format. Group under ### Breaking Changes, ### Added, ### Changed, ### Fixed. Bold symbol names, one tight sentence per bullet. Prose only, no code fences. Append migration action inline for breaking changes.")\n\n pr_description string\n @description("PR description with ## Breaking Changes section (if any) containing ### per breaking change with Before/After code fences and Migration line, then ## What\'s New section summarizing features in prose paragraphs grouped by theme. Do NOT list every class individually \u2014 summarize repetitive changes as a single entry.")\n\n version_bump_reason string\n @description("One sentence explaining WHY the overall version bump was chosen. For MAJOR: name the specific breaking symbol(s). For MINOR: name the new capability. For PATCH: describe the fix. Example: \'MAJOR because `parserCreateJob` InputStream overloads were removed from `RawLabReportClient`.\'")\n}\n\nfunction ConsolidateChangelog(\n raw_entries: string @description("Newline-separated raw changelog entries from chunked diff analysis"),\n version_bump: string @description("The overall version bump: MAJOR, MINOR, or PATCH"),\n language: string @description("The SDK programming language, e.g. \'typescript\', \'python\', \'java\'"),\n previous_version: string @description("The previous SDK version before this change, e.g. \'1.2.3\'. Empty string if unknown."),\n new_version: string @description("The new SDK version after this change, e.g. \'1.3.0\'. Empty string if unknown.")\n) -> ConsolidateChangelogResponse {\n client DefaultClient\n\n prompt #"\n You are a technical writer producing release notes for a {{language}} SDK.\n\n ## Input\n\n Raw changelog entries from chunked diff analysis (noisy, repetitive):\n ---\n {{raw_entries}}\n ---\n\n Overall version bump: {{version_bump}}\n {% if previous_version %}Previous version: {{previous_version}}{% endif %}\n {% if new_version %}New version: {{new_version}}{% endif %}\n\n ## Deduplication Rules (CRITICAL)\n\n Before writing anything, apply these deduplication rules:\n\n 1. **Pattern collapse**: If the same method/field/type was added/changed/removed across\n multiple classes or files, write ONE bullet summarizing the pattern.\n BAD: "- `additionalProperty()` added to UserRequest" + "- `additionalProperty()` added to OrderRequest" + ... (x15)\n GOOD: "- **`additionalProperty()`** and **`additionalProperties()`** builder methods added to all request and response types"\n\n 2. **Semantic merge**: If multiple entries describe aspects of the same feature, merge them.\n BAD: "- New LabAccountClient" + "- New getTeamLabAccounts method" + "- Lab account management support"\n GOOD: "- **`LabAccountClient`** \u2014 new client for managing team lab accounts with `getTeamLabAccounts()` support"\n\n 3. **No silent drops**: Every *category* of change (new clients, new methods, removed methods,\n new enum values, field type changes, etc.) must be represented in at least one bullet.\n You don\'t need to list every individual value or class \u2014 just acknowledge the category.\n GOOD: "- **New enum values** added across several types including `ProviderType` and `OrderStatus`"\n BAD: Silently omitting that enum values changed at all\n ALSO BAD: Listing every value: `SamsungHealth`, `SonoraQuest`, `Cancelled`, `Processing`, ...\n\n 4. **Prefer concise output**: Aim for 5-15 bullets total. Prioritize breaking changes and new\n capabilities. Bulk additions (builder methods, enum values) get one summary bullet each.\n\n ## Output 1: consolidated_changelog (CHANGELOG.md entry)\n\n Structure it EXACTLY like this, omitting empty sections:\n\n ### Breaking Changes\n - **`symbolName`** \u2014 what broke and how to migrate. Example: replace `foo(file)` with `foo([file])`.\n\n ### Added\n - **`symbolName`** \u2014 what was added, one sentence.\n\n ### Changed\n - **`symbolName`** \u2014 what changed, one sentence.\n\n ### Fixed\n - **`symbolName`** \u2014 what was fixed, one sentence.\n\n Rules:\n - **Breaking Changes** section MUST come first when present\n - Bold the symbol name, then a dash, then one tight sentence\n - No code fences in the changelog \u2014 prose and backtick-wrapped symbols only\n - Aim for 5-15 total bullets. Every *category* of change must be represented, but individual\n values/classes within a category can be summarized (e.g., "new enum values across several types").\n - One line per change, no multi-line bullets\n\n ## Output 2: pr_description (PR body)\n\n {% if previous_version and new_version %}\n The PR description MUST start with a version summary block:\n\n ## {{previous_version}} \u2192 {{new_version}} ({{version_bump}})\n\n **Reason:** {version_bump_reason}\n\n Then the breaking changes / what\'s new sections follow.\n {% endif %}\n\n If version_bump is MAJOR, start with:\n\n ## Breaking Changes\n\n ### `symbolName` \u2014 short description\n **Before:**\n ```{{language}}\n // old usage\n ```\n **After:**\n ```{{language}}\n // new usage\n ```\n **Migration:** One sentence on how to update.\n\n (repeat for each breaking change)\n\n Then:\n\n ## What\'s New\n Brief prose paragraphs grouped by theme. Do NOT list every class \u2014 summarize patterns.\n\n If version_bump is MINOR or PATCH, just use:\n\n ## What\'s New\n Brief prose paragraphs grouped by theme. Do NOT list every class \u2014 summarize patterns.\n\n Rules:\n - Breaking changes section at top with Before/After code examples\n - What\'s New in prose paragraphs, not bullet lists \u2014 group by theme (e.g., "Lab account management", "Builder improvements")\n - Do NOT list every class that got the same method \u2014 summarize as one theme\n - Every *category* of change from the changelog must be mentioned somewhere in the PR description.\n Don\'t enumerate every value \u2014 summarize bulk changes in a sentence.\n\n ## Output 3: version_bump_reason\n\n One sentence explaining WHY the overall version bump ({{version_bump}}) was chosen.\n - For MAJOR: name the specific breaking symbol(s) and explain why existing callers break\n - For MINOR: name the new capability added\n - For PATCH: describe what was fixed or improved\n - Example: "MAJOR because `parserCreateJob` InputStream overloads were removed from `RawLabReportClient`, breaking existing callers that pass InputStream arguments."\n\n {{ ctx.output_format }}\n "#\n}\n',
901005
+ "diff_analyzer.baml": '// SDK Diff Analyzer\n// Analyzes git diffs of SDK code and produces semantic commit messages and version bumps\n\nenum VersionBump {\n MAJOR\n MINOR\n PATCH\n NO_CHANGE\n}\n\nclass AnalyzeCommitDiffRequest {\n diff string @description("The git diff to analyze for generating a commit message")\n}\n\nclass AnalyzeCommitDiffResponse {\n message string\n @description("Developer-facing git commit message. Use conventional commit format. Reference specific code symbols (function names, class names). Keep summary under 72 chars.")\n\n changelog_entry string\n @description("User-facing release note in Keep a Changelog format. Group under ### Breaking Changes, ### Added, ### Changed, ### Fixed section headers. Bold symbol names, one tight sentence per bullet. Prose only, no code fences. Append migration action inline for breaking changes. Empty string for PATCH.")\n\n version_bump VersionBump\n @description("The recommended semantic version bump: MAJOR for breaking changes, MINOR for new features, PATCH for bug fixes and other changes, NO_CHANGE for empty diffs")\n\n version_bump_reason string\n @description("One sentence explaining WHY this version bump was chosen. For MAJOR: name the specific breaking symbol(s). For MINOR: name the new capability. For PATCH: describe the fix. For NO_CHANGE: \'No functional changes detected.\' Example: \'MAJOR because `parserCreateJob` InputStream overloads were removed from `RawLabReportClient`.\'")\n}\n\n// Main function that analyzes SDK diffs\nfunction AnalyzeSdkDiff(\n diff: string @description("The git diff to analyze"),\n language: string @description("The SDK programming language, e.g. \'typescript\', \'python\', \'java\'"),\n previous_version: string @description("The current published version before this change, e.g. \'1.2.3\'"),\n prior_changelog: string @description("The last 3 changelog entries for this SDK, empty string if none. Use this to match the existing commit message style and understand the versioning pattern."),\n spec_commit_message: string @description("The commit message from the API spec repository that triggered this SDK generation. Use as a hint for the intent of the change, but verify against the actual diff. Empty string if unavailable.")\n) -> AnalyzeCommitDiffResponse {\n client DefaultClient\n\n prompt #"\n You are an expert software engineer analyzing changes to generate semantic commit messages.\n\n Analyze the provided git diff and return a structured response with these fields:\n - message: A git commit message formatted like the example below\n - version_bump: One of: MAJOR, MINOR, PATCH, or NO_CHANGE\n\n Version Bump Guidelines:\n - MAJOR: Breaking changes (removed/renamed functions, changed signatures, removed parameters)\n - MINOR: New features that are backward compatible (new functions, new optional parameters).\n Also MINOR: behavioral changes invisible to the public API surface that still affect consumers:\n - Changed HTTP status code handling (e.g. 404 now throws instead of returning null)\n - Changed default parameter values (timeout, retry count, page size, base URL)\n - Changed serialization behavior (date formats, null handling, field ordering)\n - Changed error message text that consumers may depend on\n - Changed HTTP header names or values sent to the server\n - Changed retry or backoff behavior (different retry counts, delay strategies)\n - PATCH: Bug fixes, documentation, internal refactoring with no observable behavioral change\n - NO_CHANGE: The diff is empty\n\n --- Examples ---\n\n Examples of correct classifications:\n\n --- MAJOR: removed exported TypeScript function ---\n diff --git a/src/api/client.ts b/src/api/client.ts\n -export async function getUser(id: string): Promise<User> {\n - return this.request("GET", `/users/${id}`);\n -}\n version_bump: MAJOR\n reason: Existing callers of getUser() will get a compile error.\n\n --- MAJOR: removed Python public method ---\n diff --git a/vital/client.py b/vital/client.py\n - def get_user(self, user_id: str) -> User:\n - return self._request("GET", f"/users/{user_id}")\n version_bump: MAJOR\n reason: Existing callers crash with AttributeError.\n\n --- MINOR: new optional TypeScript parameter ---\n diff --git a/src/api/client.ts b/src/api/client.ts\n -async createUser(name: string): Promise<User>\n +async createUser(name: string, role?: UserRole): Promise<User>\n version_bump: MINOR\n reason: Existing callers unaffected \u2014 new parameter is optional.\n\n --- MINOR: new Java public method ---\n diff --git a/src/.../UsersClient.java b/src/.../UsersClient.java\n + public CompletableFuture<User> getUserAsync(String userId) {\n + return this.httpClient.sendAsync(...);\n + }\n version_bump: MINOR\n reason: New capability added, nothing removed or changed.\n\n --- MINOR: changed default retry count ---\n diff --git a/src/core/http_client.py b/src/core/http_client.py\n -MAX_RETRIES = 3\n +MAX_RETRIES = 5\n version_bump: MINOR\n reason: Changed default retry count \u2014 existing consumers will experience different retry behavior.\n\n --- PATCH: Go import reorganization ---\n diff --git a/client.go b/client.go\n -import "fmt"\n -import "net/http"\n +import (\n + "fmt"\n + "net/http"\n +)\n version_bump: PATCH\n reason: Formatting change only, no functional difference.\n\n --- End Examples ---\n\n {% if language == "typescript" %}\n Language-specific breaking change rules for TypeScript:\n\n MAJOR (breaking):\n - Removing a required response field is always MAJOR\n - Removing or renaming a public class, method, function, or exported symbol is MAJOR\n - Making a response field optional is MAJOR (type changes from T to T | undefined, breaking existing property access without null checks)\n - Changing a method return type (e.g. Promise<T> to Promise<T | undefined>, or T to T | null) is MAJOR\n - New enum values are MAJOR if the SDK generates exhaustive switch/if-else chains (callers get compile errors on unhandled cases)\n - Changing a union type (adding/removing variants) is MAJOR if callers use exhaustive type narrowing or discriminated unions\n - Adding a new required property to a request/input type is MAJOR (existing callers won\'t compile)\n - Removing or renaming an exported type, interface, or type alias is MAJOR\n - Changing the type of an existing property (e.g. string to number, or string to string[]) is MAJOR\n - Changing a generic type parameter constraint (e.g. <T extends Foo> to <T extends Bar>) is MAJOR\n - Converting a synchronous method to async (or vice versa) is MAJOR (changes return type to Promise<T>)\n - Removing a default export or switching between default and named exports is MAJOR\n - Changing the structure of a discriminated union (e.g. changing the discriminant field name) is MAJOR\n - Removing or renaming environment/server URL constants is MAJOR\n - Changing the constructor signature of a client class (adding required params) is MAJOR\n - Narrowing a parameter type (e.g. string | number to string) is MAJOR (callers passing number break)\n\n MINOR (backward-compatible additions):\n - Adding a new optional parameter to a function is MINOR\n - Adding new exported types, interfaces, or classes is MINOR\n - Adding new methods to an existing client class is MINOR\n - Adding new optional properties to request types is MINOR\n - Adding new enum values when NOT used in exhaustive checks is MINOR\n - Adding new environment/server URL constants is MINOR\n - Widening a parameter type (e.g. string to string | number) is MINOR\n - Adding new re-exports from index files is MINOR\n - Adding new error types or exception classes is MINOR\n - Adding new RequestOptions fields (e.g. timeout, retries) is MINOR\n - Deprecating (but not removing) a public API is MINOR\n\n PATCH (no API surface change):\n - Changes to internal/private modules (core/, _internal/, utils/) are PATCH\n - Reordering imports, formatting, or comment changes are PATCH\n - Updating SDK version headers (X-Fern-SDK-Version, User-Agent) is PATCH\n - Refactoring HTTP client internals without changing observable defaults or behavior is PATCH\n - Updating dependency versions in package.json is PATCH\n - Adding or modifying JSDoc/TSDoc comments is PATCH\n - Refactoring internal implementation without changing public signatures is PATCH\n - Changes to .npmignore, tsconfig.json, or build configuration are PATCH\n - Updating serialization/deserialization logic that preserves the same public types is PATCH\n\n {% elif language == "python" %}\n Language-specific breaking change rules for Python:\n\n MAJOR (breaking):\n - Removing a required response field is always MAJOR\n - Removing or renaming a public class, method, or function is always MAJOR\n - Adding a new required parameter to a public method is MAJOR (callers get TypeError)\n - Renaming a parameter in a public method is MAJOR if callers use keyword arguments\n - Removing a parameter from a public method signature is MAJOR\n - Changing the type of a parameter from one concrete type to an incompatible one is MAJOR\n - Changing exception types raised by a method (callers catching specific exceptions break) is MAJOR\n - Removing or renaming a public module or subpackage is MAJOR (import statements break)\n - Moving a public class/function to a different module without re-exporting from the original is MAJOR\n - Changing a class from inheriting one base to another when callers use isinstance() checks is MAJOR\n - Removing a public class attribute or property is MAJOR\n\n MINOR (backward-compatible additions):\n - Making a response field optional is usually MINOR (Python uses None propagation; callers rarely type-check strictly)\n - New enum values are MINOR (unknown values are handled gracefully with string fallbacks)\n - Changing a return type from a concrete type to Optional is MINOR (duck typing absorbs this)\n - Adding new public methods, classes, or modules is MINOR\n - Adding new optional parameters (with defaults) is MINOR\n - Adding new optional fields to Pydantic models is MINOR\n - Adding new exception/error classes is MINOR\n - Adding new class attributes or properties is MINOR\n - Adding new type overloads (@overload decorator) is MINOR\n - Adding new environment/server URL constants is MINOR\n - Adding new RequestOptions fields (e.g. timeout, max_retries) is MINOR\n - Deprecating (but not removing) a public API is MINOR\n - Widening a type annotation (e.g. str to Union[str, int]) is MINOR\n\n PATCH (no API surface change):\n - Changes to private methods (prefixed with _) are PATCH\n - Changes to type hints only (no runtime effect) are PATCH\n - Reformatting, docstring updates, or comment changes are PATCH\n - Updating SDK version headers (X-Fern-SDK-Version, User-Agent) are PATCH\n - Refactoring httpx/requests client internals without changing observable defaults or behavior is PATCH\n - Updating dependency versions in pyproject.toml/setup.py is PATCH\n - Updating serialization/deserialization logic that preserves the same public types is PATCH\n - Refactoring internal implementation without changing public signatures is PATCH\n - Changes to __init__.py that don\'t alter public re-exports are PATCH\n - Changes to conftest.py, test files, or CI configuration are PATCH\n\n {% elif language == "java" %}\n Language-specific breaking change rules for Java:\n\n MAJOR (breaking):\n - Removing a required response field is always MAJOR\n - Removing or renaming a public class, method, or interface is always MAJOR\n - Making a response field optional (e.g. T to Optional<T>) is MAJOR (callers must handle Optional unwrapping)\n - New enum values are MAJOR if the SDK generates exhaustive switch statements\n - Adding a new required parameter to a public method is MAJOR\n - Changing a method\'s return type is MAJOR (even if compatible at runtime, recompilation fails)\n - Removing or changing a public static final constant is MAJOR\n - Changing a class from concrete to abstract (or vice versa) is MAJOR\n - Changing the checked exceptions declared in a throws clause is MAJOR\n - Removing a public constructor or changing its parameter list is MAJOR\n - Removing an interface that a public class implements is MAJOR\n - Changing generic type parameters on a public class (e.g. Foo<T> to Foo<T, U>) is MAJOR\n - Moving a public class to a different package without re-exporting is MAJOR\n - Narrowing a parameter type (e.g. Object to String) is MAJOR\n - Making a non-final class final is MAJOR (breaks subclassing)\n - Changing the type of a builder method parameter is MAJOR\n\n MINOR (backward-compatible additions):\n - Adding new overloaded methods is MINOR\n - Adding new public classes or interfaces is MINOR\n - Adding new optional builder methods is MINOR\n - Adding new enum values when NOT used in exhaustive switch statements is MINOR\n - Adding new optional fields to request objects is MINOR\n - Adding new exception/error classes is MINOR\n - Adding new static utility methods is MINOR\n - Adding new environment/server URL constants is MINOR\n - Adding new RequestOptions fields (e.g. timeout, retries) is MINOR\n - Widening a parameter type (e.g. String to Object) is MINOR\n - Adding default methods to interfaces (Java 8+) is MINOR\n - Deprecating (but not removing) public APIs with @Deprecated is MINOR\n\n PATCH (no API surface change):\n - Changes to package-private or private methods are PATCH\n - Changes to annotations (other than public API annotations), Javadoc, or formatting are PATCH\n - Updating SDK version headers (X-Fern-SDK-Version, User-Agent) is PATCH\n - Refactoring OkHttp/HttpClient internals without changing observable defaults or behavior is PATCH\n - Updating dependency versions in build.gradle/pom.xml is PATCH\n - Refactoring internal implementation without changing public signatures is PATCH\n - Updating serialization/deserialization logic (Jackson/Gson config) that preserves public types is PATCH\n - Changes to test files, CI configuration, or build scripts are PATCH\n\n {% elif language == "go" %}\n Language-specific breaking change rules for Go:\n\n MAJOR (breaking):\n - Removing a required response field is always MAJOR\n - Removing or renaming an exported function, method, or type is always MAJOR\n - Making a response field a pointer type (e.g. string to *string) is MAJOR (callers must dereference)\n - Changing a function signature (adding/removing parameters or return values) is MAJOR (Go has no overloading)\n - Removing or renaming an exported struct field is MAJOR\n - Changing the type of an exported struct field is MAJOR\n - Removing or renaming an exported constant or variable is MAJOR\n - Changing an interface by adding methods is MAJOR (all implementations must add the method)\n - Removing a method from an interface is MAJOR (callers using that method break)\n - Changing a function\'s return type(s) is MAJOR (Go is strict about return types)\n - Changing a variadic parameter to non-variadic (or vice versa) is MAJOR\n - Moving a type/function to a different package without aliasing in the original is MAJOR\n - Changing the receiver type of a method (value receiver to pointer receiver changes method set) is MAJOR\n - Changing an exported error variable\'s type or value is MAJOR (callers using errors.Is break)\n\n MINOR (backward-compatible additions):\n - Adding new exported functions, methods, or types is MINOR\n - New enum-like constants are MINOR (Go enums are not exhaustive by default)\n - Adding new fields to a struct is MINOR (existing code still compiles, zero-value initialization)\n - Making a response field optional (pointer) is usually MINOR if the field was already a struct field\n - Adding new optional function parameters via functional options pattern is MINOR\n - Adding new interface types is MINOR\n - Adding new error types/variables is MINOR\n - Adding new environment/server URL constants is MINOR\n - Adding new RequestOption functions is MINOR\n - Widening a return type from a concrete type to an interface is MINOR (if interface is satisfied)\n - Adding new methods to a concrete type (does not break interface implementations) is MINOR\n\n PATCH (no API surface change):\n - Changes to unexported (lowercase) functions or types are PATCH\n - Changes to go.mod dependencies, import reordering, or formatting are PATCH\n - Updating SDK version headers (X-Fern-SDK-Version, User-Agent) is PATCH\n - Refactoring http.Client internals without changing observable defaults or behavior is PATCH\n - Updating serialization/deserialization logic (JSON tags, encoding) that preserves identical output is PATCH\n - Refactoring internal implementation without changing exported signatures is PATCH\n - Changes to *_test.go files, Makefile, or CI configuration are PATCH\n - Updating comments, godoc, or code formatting (gofmt) is PATCH\n\n {% elif language == "ruby" %}\n Language-specific breaking change rules for Ruby:\n\n MAJOR (breaking):\n - Removing a required response field is always MAJOR\n - Removing or renaming a public method is MAJOR (callers get NoMethodError)\n - Adding a new required positional parameter is MAJOR\n - Removing a method parameter is MAJOR (callers passing that argument get ArgumentError)\n - Changing the order of positional parameters is MAJOR\n - Removing or renaming a public class or module is MAJOR (callers get NameError)\n - Changing a method from instance to class method (or vice versa) is MAJOR\n - Changing the return type in a breaking way (e.g. returning nil where an object was expected and callers chain methods) is MAJOR\n - Removing a public constant is MAJOR\n - Changing exception types raised by a method is MAJOR (callers rescuing specific exceptions break)\n\n MINOR (backward-compatible additions):\n - Making a response field optional is usually MINOR (Ruby uses nil propagation; callers rarely type-check)\n - New enum values are MINOR (unknown values are handled gracefully)\n - Adding new optional keyword parameters (with defaults) is MINOR\n - Adding new public methods or classes is MINOR\n - Adding new optional fields to response/request objects is MINOR\n - Adding new exception/error classes is MINOR\n - Adding new environment/server URL constants is MINOR\n - Adding new RequestOptions fields (e.g. timeout, max_retries) is MINOR\n - Deprecating (but not removing) a public API is MINOR\n - Adding new modules or mixins is MINOR\n\n PATCH (no API surface change):\n - Changes to private methods are PATCH\n - Gemspec metadata, comment, or formatting changes are PATCH\n - Updating SDK version headers is PATCH\n - Refactoring Faraday/Net::HTTP internals without changing observable defaults or behavior is PATCH\n - Updating dependency versions in Gemfile/gemspec is PATCH\n - Refactoring internal implementation without changing public signatures is PATCH\n - Changes to test files, Rakefile, or CI configuration are PATCH\n\n {% elif language == "csharp" %}\n Language-specific breaking change rules for C#:\n\n MAJOR (breaking):\n - Removing a required response field is always MAJOR\n - Removing or renaming a public class, method, property, or interface is always MAJOR\n - Making a response field nullable (e.g. T to T?) is MAJOR (callers must handle null checks)\n - New enum values are MAJOR if the SDK generates exhaustive switch expressions\n - Adding a new required parameter to a public method is MAJOR\n - Changing a method\'s return type is MAJOR\n - Removing or changing a public constant or static readonly field is MAJOR\n - Changing a class from non-sealed to sealed (or abstract to concrete) is MAJOR\n - Changing the base class of a public class is MAJOR\n - Removing an interface implementation from a public class is MAJOR\n - Changing generic type constraints on a public class or method is MAJOR\n - Moving a public type to a different namespace without type forwarding is MAJOR\n - Changing property from read-write to read-only (removing setter) is MAJOR\n - Changing async method to sync (Task<T> to T) or vice versa is MAJOR\n\n MINOR (backward-compatible additions):\n - Adding new public classes, interfaces, or methods is MINOR\n - Adding new optional parameters (with default values) is MINOR\n - Adding new overloaded methods is MINOR\n - Adding new enum values when NOT used in exhaustive switch expressions is MINOR\n - Adding new optional properties to request objects is MINOR\n - Adding new exception types is MINOR\n - Adding new environment/server URL constants is MINOR\n - Adding new RequestOptions fields (e.g. Timeout, MaxRetries) is MINOR\n - Adding new extension methods is MINOR\n - Deprecating (but not removing) public APIs with [Obsolete] is MINOR\n\n PATCH (no API surface change):\n - Changes to internal or private members are PATCH\n - XML doc comments, formatting, or namespace reorganization are PATCH\n - Updating SDK version headers is PATCH\n - Refactoring HttpClient internals without changing observable defaults or behavior is PATCH\n - Updating dependency versions in .csproj is PATCH\n - Refactoring internal implementation without changing public signatures is PATCH\n - Updating serialization/deserialization (System.Text.Json/Newtonsoft) config that preserves public types is PATCH\n - Changes to test files, .sln, or CI configuration are PATCH\n\n {% elif language == "php" %}\n Language-specific breaking change rules for PHP:\n\n MAJOR (breaking):\n - Removing a required response field is always MAJOR\n - Removing or renaming a public method or class is always MAJOR\n - Changing a method signature (adding required parameters) is MAJOR\n - Removing a method parameter is MAJOR\n - Changing the type declaration of a parameter to an incompatible type is MAJOR\n - Removing or renaming a public constant is MAJOR\n - Changing a class from non-final to final is MAJOR (breaks extension)\n - Removing an interface implementation from a public class is MAJOR\n - Changing the return type declaration to an incompatible type is MAJOR\n - Moving a class to a different namespace without aliasing is MAJOR\n - Changing exception types thrown by a method is MAJOR\n\n MINOR (backward-compatible additions):\n - Making a response field nullable is MINOR in most cases (PHP is dynamically typed)\n - Adding new optional parameters (with defaults) is MINOR\n - Adding new public classes or methods is MINOR\n - New enum cases are usually MINOR (PHP enums are not typically used in exhaustive matches)\n - Adding new optional fields to request/response objects is MINOR\n - Adding new exception classes is MINOR\n - Adding new environment/server URL constants is MINOR\n - Adding new traits or interfaces is MINOR\n - Adding new RequestOptions fields is MINOR\n - Deprecating (but not removing) public APIs is MINOR\n\n PATCH (no API surface change):\n - Changes to private/protected methods are PATCH\n - PHPDoc, formatting, or composer.json metadata changes are PATCH\n - Updating SDK version headers is PATCH\n - Refactoring Guzzle/cURL internals without changing observable defaults or behavior is PATCH\n - Updating dependency versions in composer.json is PATCH\n - Refactoring internal implementation without changing public signatures is PATCH\n - Changes to test files, phpunit.xml, or CI configuration are PATCH\n\n {% elif language == "swift" %}\n Language-specific breaking change rules for Swift:\n\n MAJOR (breaking):\n - Removing a required response field is always MAJOR\n - Removing or renaming a public method, property, or type is always MAJOR\n - Making a response field optional (T to T?) is MAJOR (callers must unwrap with if-let/guard)\n - New enum cases are MAJOR (Swift switch statements must be exhaustive unless using default)\n - Adding a new required parameter to a public method is MAJOR\n - Changing the type of a public property is MAJOR\n - Removing or changing a public protocol requirement is MAJOR\n - Removing protocol conformance from a public type is MAJOR\n - Changing a struct to a class (or vice versa) is MAJOR (value vs reference semantics)\n - Making a public initializer failable (init to init?) or vice versa is MAJOR\n - Changing the associated values of an enum case is MAJOR\n - Removing a public typealias is MAJOR\n - Changing access level from public to internal/private is MAJOR\n\n MINOR (backward-compatible additions):\n - Adding new public types, methods, or properties is MINOR\n - Adding new optional parameters (with default values) is MINOR\n - Adding new enum cases when callers use default in switch is MINOR\n - Adding new protocol extensions with default implementations is MINOR\n - Adding new optional fields to request/response structs is MINOR\n - Adding new error types is MINOR\n - Adding new environment/server URL constants is MINOR\n - Adding new RequestOptions fields is MINOR\n - Adding new convenience initializers is MINOR\n - Deprecating (but not removing) public APIs with @available(*, deprecated) is MINOR\n\n PATCH (no API surface change):\n - Changes to internal or private members are PATCH\n - Formatting, comments, or documentation changes are PATCH\n - Updating SDK version headers is PATCH\n - Refactoring URLSession internals without changing observable defaults or behavior is PATCH\n - Updating dependency versions in Package.swift is PATCH\n - Refactoring internal implementation without changing public signatures is PATCH\n - Changes to test files, xcconfig, or CI configuration are PATCH\n\n {% elif language == "rust" %}\n Language-specific breaking change rules for Rust:\n\n MAJOR (breaking):\n - Removing a required response field is always MAJOR\n - Removing or renaming a public function, struct, enum, or trait is always MAJOR\n - Making a response field optional (T to Option<T>) is MAJOR (callers must handle the Option)\n - New enum variants are MAJOR (Rust match statements must be exhaustive unless using _ wildcard)\n - Adding a new required field to a public struct is MAJOR (unless #[non_exhaustive])\n - Removing a public trait implementation is MAJOR\n - Changing a function\'s return type is MAJOR\n - Adding a required method to a public trait is MAJOR (all implementations must add it)\n - Changing the type of a public struct field is MAJOR\n - Removing or renaming a public module is MAJOR\n - Making a public type private (pub to pub(crate) or removing pub) is MAJOR\n - Changing a struct from non-exhaustive to exhaustive construction (removing .. Default::default()) is MAJOR\n - Changing generic type parameters or their bounds on public types is MAJOR\n - Changing from Result<T, E1> to Result<T, E2> where E2 is a different error type is MAJOR\n - Removing a public constant or static is MAJOR\n\n MINOR (backward-compatible additions):\n - Adding new public functions, structs, or enums is MINOR\n - Adding new optional fields to #[non_exhaustive] structs is MINOR\n - Adding new enum variants to #[non_exhaustive] enums is MINOR\n - Adding new trait implementations for existing types is MINOR\n - Adding new public constants or statics is MINOR\n - Adding new methods to existing impl blocks is MINOR\n - Adding new error types is MINOR\n - Adding new environment/server URL constants is MINOR\n - Adding new RequestOptions fields is MINOR\n - Adding new optional builder methods is MINOR\n - Deprecating (but not removing) public APIs with #[deprecated] is MINOR\n\n PATCH (no API surface change):\n - Changes to pub(crate) or private items are PATCH\n - Cargo.toml metadata, formatting, or comment changes are PATCH\n - Updating SDK version headers is PATCH\n - Refactoring reqwest/hyper internals without changing observable defaults or behavior is PATCH\n - Updating dependency versions in Cargo.toml is PATCH\n - Refactoring internal implementation without changing public signatures is PATCH\n - Updating serialization/deserialization (serde) config that preserves public types is PATCH\n - Changes to test files, build.rs, or CI configuration are PATCH\n\n {% elif language == "kotlin" %}\n Language-specific breaking change rules for Kotlin:\n\n MAJOR (breaking):\n - Removing a required response field is always MAJOR\n - Removing or renaming a public function, class, or property is always MAJOR\n - Making a response field nullable (T to T?) is MAJOR (callers must handle null safety operators)\n - New enum values are MAJOR if used in when() expressions without else branch\n - Adding a new required parameter to a public function is MAJOR\n - Changing a method\'s return type is MAJOR\n - Removing or changing a public constant (const val / companion object val) is MAJOR\n - Changing a class from open to final (or data class to regular class) is MAJOR\n - Removing an interface implementation from a public class is MAJOR\n - Changing generic type parameters or their variance (in/out) on public types is MAJOR\n - Moving a public class to a different package without type aliasing is MAJOR\n - Changing a property from var to val (or removing a setter) is MAJOR\n - Changing a suspend function to non-suspend (or vice versa) is MAJOR\n - Changing sealed class/interface hierarchy (removing subclasses) is MAJOR\n\n MINOR (backward-compatible additions):\n - Adding new public classes, functions, or extension functions is MINOR\n - Adding new optional parameters (with default values) is MINOR\n - Adding new enum values when callers use else in when() is MINOR\n - Adding new optional properties to data classes is MINOR\n - Adding new exception types is MINOR\n - Adding new environment/server URL constants is MINOR\n - Adding new RequestOptions fields is MINOR\n - Adding new sealed class/interface subtypes is MINOR (if callers have else branch)\n - Deprecating (but not removing) public APIs with @Deprecated is MINOR\n - Adding new companion object functions is MINOR\n\n PATCH (no API surface change):\n - Changes to internal or private members are PATCH\n - KDoc, formatting, or build.gradle changes are PATCH\n - Updating SDK version headers is PATCH\n - Refactoring OkHttp internals without changing observable defaults or behavior is PATCH\n - Updating dependency versions in build.gradle.kts is PATCH\n - Refactoring internal implementation without changing public signatures is PATCH\n - Updating serialization/deserialization (kotlinx.serialization/Moshi) config that preserves public types is PATCH\n - Changes to test files or CI configuration are PATCH\n\n {% else %}\n Language-specific breaking change rules (language: {{ language }}):\n\n MAJOR (breaking):\n - Removing a required response field is always MAJOR\n - Removing or renaming a public class, method, or function is always MAJOR\n - Making a response field optional is MAJOR in statically-typed languages (TypeScript, Java, C#, Swift, Rust, Kotlin, Go), usually MINOR in dynamically-typed ones (Python, Ruby, PHP)\n - New enum values are MAJOR if the language enforces exhaustive matching (TypeScript, Java, C#, Swift, Rust), MINOR otherwise\n - Adding a new required parameter to a public method is MAJOR\n - Changing a method\'s return type is MAJOR\n - Changing the type of an existing field/property is MAJOR\n - Removing or changing public constants is MAJOR\n\n MINOR (backward-compatible additions):\n - Adding new public APIs (classes, methods, functions) is MINOR\n - Adding new optional parameters is MINOR\n - Adding new optional fields to request/response objects is MINOR\n - Adding new error/exception types is MINOR\n - Deprecating (but not removing) public APIs is MINOR\n\n PATCH (no API surface change):\n - Internal/private changes are PATCH\n - Formatting, documentation, or comment changes are PATCH\n - Dependency version updates are PATCH\n - SDK version header updates are PATCH\n - Refactoring retry/timeout internals without changing observable defaults or behavior is PATCH\n - Refactoring internals without changing public signatures is PATCH\n {% endif %}\n\n Apply these patterns to the diff below. When in doubt between MINOR and PATCH,\n prefer MINOR. When in doubt between MAJOR and MINOR, examine whether existing\n callers would break without any code changes on their side.\n\n Message Format (use this exact structure):\n ```\n <type>: <short summary>\n\n <detailed description of what changed and why it matters>\n\n Key changes:\n - <change 1>\n - <change 2>\n - <change 3>\n ```\n\n Message Guidelines:\n - The commit type MUST match the version bump:\n - MAJOR \u2192 use "feat!:" prefix (the "!" signals a breaking change per Conventional Commits)\n - MINOR \u2192 use "feat:" prefix\n - PATCH \u2192 use "fix:" or "chore:" prefix (whichever fits the change)\n - NO_CHANGE \u2192 use "chore:" prefix\n - Keep the summary line under 72 characters\n - Write in present tense imperative mood ("add" not "added" or "adds")\n - For MAJOR: the summary MUST name the breaking change (e.g., "feat!: remove parserCreateJob InputStream overloads")\n - For MINOR: the summary should name the new capability\n - For PATCH: describe the fix or improvement\n - Be specific \u2014 do not use generic summaries like "update SDK" or "regenerate SDK"\n - Do not use "Fern regeneration" in commit messages \u2014 use "SDK regeneration" instead\n - NEVER include the literal version "0.0.0-fern-placeholder" in the commit message \u2014 if you see this placeholder\n in the diff, describe changes generically (e.g., "added X-Fern-SDK-Version header")\n - The previous version is provided for context only. Do not include it literally in the summary line.\n\n {% if prior_changelog %}\n Prior changelog entries (for style reference):\n ---\n {{prior_changelog}}\n ---\n Match the tone and format of these entries in your commit message.\n {% endif %}\n\n {% if spec_commit_message %}\n The API spec change that triggered this SDK generation had the following commit message:\n "{{spec_commit_message}}"\n Use this as a hint for understanding the intent of the change, but always verify\n against the actual diff below. The commit message may be vague or inaccurate.\n {% endif %}\n\n Previous version: {{previous_version}}\n SDK language: {{language}}\n\n Git Diff:\n ---\n {{diff}}\n ---\n\n Changelog Entry Guidelines:\n - Write for SDK consumers, not engineers reading the source code\n - Structure the changelog entry using Keep a Changelog section headers, omitting empty sections:\n\n ### Breaking Changes\n - **`symbolName`** \u2014 what broke and how to migrate.\n\n ### Added\n - **`symbolName`** \u2014 what was added, one sentence.\n\n ### Changed\n - **`symbolName`** \u2014 what changed, one sentence.\n\n ### Fixed\n - **`symbolName`** \u2014 what was fixed, one sentence.\n\n - Section mapping to version bumps:\n - MAJOR changes go under ### Breaking Changes\n - MINOR additions go under ### Added\n - MINOR behavioral changes go under ### Changed\n - PATCH fixes go under ### Fixed (or empty string if trivial)\n - **Breaking Changes** section MUST come first when present\n - Bold the symbol name, then a dash, then one tight sentence\n - No code fences in the changelog \u2014 prose and backtick-wrapped symbols only\n - One line per change, no multi-line bullets\n - For Breaking Changes: name the exact symbol, explain what broke, and give a one-line migration\n Example: "- **`parserCreateJob`** now accepts `File[]` instead of `File`. Wrap single files in an array: `parserCreateJob([file], request)`."\n - For Added: name the new capability in one sentence\n Example: "- **`LabAccountClient`** for managing team lab accounts."\n - Describe patterns once, not per-file. If the same method was added to 50 classes,\n write ONE entry: "- **`additionalProperty()`** and **`additionalProperties()`** builder methods on all request types."\n Do NOT write 50 separate entries.\n - NEVER silently drop a category of change. If new enum values were added, new clients were introduced,\n or fields were removed, each *category* must appear \u2014 but you don\'t need to list every individual value.\n GOOD: "- **New enum values** added across several types including `ProviderType` and `OrderStatus`."\n BAD: listing every enum value\n - PATCH: leave empty string \u2014 patch changes don\'t warrant changelog entries\n - Do not use conventional commit prefixes (no "feat:", "fix:", etc.)\n - Write in third person present tense\n - Prefer fewer, richer entries over many thin ones. Aim for 3-5 entries per chunk by grouping related changes.\n - IMPORTANT: Wrap type references containing angle brackets in backticks (e.g., `Optional<String>`)\n - **5-line limit per section**: Each section (### Breaking Changes, ### Added, ### Changed, ### Fixed)\n MUST have at most 5 bullet points. If a section would have more than 5 bullets, keep the 5 most\n important ones and add a final line: "- See full changelog for all changes"\n\n Remember again that YOU MUST return a structured JSON response with these four fields:\n - message: A git commit message formatted like the example previously provided\n - changelog_entry: A user-facing release note (empty string for PATCH)\n - version_bump: One of: MAJOR, MINOR, PATCH, or NO_CHANGE\n - version_bump_reason: One sentence explaining WHY this bump level was chosen.\n For MAJOR, name the specific breaking symbol(s) and explain why existing callers break.\n For MINOR, name the new capability added.\n For PATCH, describe what was fixed or improved.\n For NO_CHANGE, say "No functional changes detected."\n Example: "MAJOR because `parserCreateJob` InputStream overloads were removed from `RawLabReportClient`, breaking existing callers."\n "#\n}\n\nclass ConsolidateChangelogResponse {\n consolidated_changelog string\n @description("CHANGELOG.md entry in Keep a Changelog format. Group under ### Breaking Changes, ### Added, ### Changed, ### Fixed. Bold symbol names, one tight sentence per bullet. Prose only, no code fences. Append migration action inline for breaking changes.")\n\n pr_description string\n @description("PR description with ## Breaking Changes section (if any) containing ### per breaking change with Before/After code fences and Migration line, then ## What\'s New section summarizing features in prose paragraphs grouped by theme. Do NOT list every class individually \u2014 summarize repetitive changes as a single entry.")\n\n version_bump_reason string\n @description("One sentence explaining WHY the overall version bump was chosen. For MAJOR: name the specific breaking symbol(s). For MINOR: name the new capability. For PATCH: describe the fix. Example: \'MAJOR because `parserCreateJob` InputStream overloads were removed from `RawLabReportClient`.\'")\n}\n\nfunction ConsolidateChangelog(\n raw_entries: string @description("Newline-separated raw changelog entries from chunked diff analysis"),\n version_bump: string @description("The overall version bump: MAJOR, MINOR, or PATCH"),\n language: string @description("The SDK programming language, e.g. \'typescript\', \'python\', \'java\'"),\n previous_version: string @description("The previous SDK version before this change, e.g. \'1.2.3\'. Empty string if unknown."),\n new_version: string @description("The new SDK version after this change, e.g. \'1.3.0\'. Empty string if unknown.")\n) -> ConsolidateChangelogResponse {\n client DefaultClient\n\n prompt #"\n You are a technical writer producing release notes for a {{language}} SDK.\n\n ## Input\n\n Raw changelog entries from chunked diff analysis (noisy, repetitive):\n ---\n {{raw_entries}}\n ---\n\n Overall version bump: {{version_bump}}\n {% if previous_version %}Previous version: {{previous_version}}{% endif %}\n {% if new_version %}New version: {{new_version}}{% endif %}\n\n ## Deduplication Rules (CRITICAL)\n\n Before writing anything, apply these deduplication rules:\n\n 1. **Pattern collapse**: If the same method/field/type was added/changed/removed across\n multiple classes or files, write ONE bullet summarizing the pattern.\n BAD: "- `additionalProperty()` added to UserRequest" + "- `additionalProperty()` added to OrderRequest" + ... (x15)\n GOOD: "- **`additionalProperty()`** and **`additionalProperties()`** builder methods added to all request and response types"\n\n 2. **Semantic merge**: If multiple entries describe aspects of the same feature, merge them.\n BAD: "- New LabAccountClient" + "- New getTeamLabAccounts method" + "- Lab account management support"\n GOOD: "- **`LabAccountClient`** \u2014 new client for managing team lab accounts with `getTeamLabAccounts()` support"\n\n 3. **No silent drops**: Every *category* of change (new clients, new methods, removed methods,\n new enum values, field type changes, etc.) must be represented in at least one bullet.\n You don\'t need to list every individual value or class \u2014 just acknowledge the category.\n GOOD: "- **New enum values** added across several types including `ProviderType` and `OrderStatus`"\n BAD: Silently omitting that enum values changed at all\n ALSO BAD: Listing every value: `SamsungHealth`, `SonoraQuest`, `Cancelled`, `Processing`, ...\n\n 4. **Prefer concise output**: Aim for 5-15 bullets total. Prioritize breaking changes and new\n capabilities. Bulk additions (builder methods, enum values) get one summary bullet each.\n\n ## Output 1: consolidated_changelog (CHANGELOG.md entry)\n\n Structure it EXACTLY like this, omitting empty sections:\n\n ### Breaking Changes\n - **`symbolName`** \u2014 what broke and how to migrate. Example: replace `foo(file)` with `foo([file])`.\n\n ### Added\n - **`symbolName`** \u2014 what was added, one sentence.\n\n ### Changed\n - **`symbolName`** \u2014 what changed, one sentence.\n\n ### Fixed\n - **`symbolName`** \u2014 what was fixed, one sentence.\n\n Rules:\n - **Breaking Changes** section MUST come first when present\n - Bold the symbol name, then a dash, then one tight sentence\n - No code fences in the changelog \u2014 prose and backtick-wrapped symbols only\n - Aim for 5-15 total bullets. Every *category* of change must be represented, but individual\n values/classes within a category can be summarized (e.g., "new enum values across several types").\n - One line per change, no multi-line bullets\n - **5-line limit per section**: Each section (### Breaking Changes, ### Added, ### Changed, ### Fixed)\n MUST have at most 5 bullet points. If a section would have more than 5 bullets, keep the 5 most\n important ones and add a final line: "- See full changelog for all changes"\n\n ## Output 2: pr_description (PR body)\n\n Do NOT include a version header \u2014 the version header is added separately by the build system.\n\n If version_bump is MAJOR, start with:\n\n ## Breaking Changes\n\n ### `symbolName` \u2014 short description\n **Before:**\n ```{{language}}\n // old usage\n ```\n **After:**\n ```{{language}}\n // new usage\n ```\n **Migration:** One sentence on how to update.\n\n (repeat for each breaking change)\n\n Then:\n\n ## What\'s New\n Brief prose paragraphs grouped by theme. Do NOT list every class \u2014 summarize patterns.\n\n If version_bump is MINOR or PATCH, just use:\n\n ## What\'s New\n Brief prose paragraphs grouped by theme. Do NOT list every class \u2014 summarize patterns.\n\n Rules:\n - Breaking changes section at top with Before/After code examples\n - What\'s New in prose paragraphs, not bullet lists \u2014 group by theme (e.g., "Lab account management", "Builder improvements")\n - Do NOT list every class that got the same method \u2014 summarize as one theme\n - Every *category* of change from the changelog must be mentioned somewhere in the PR description.\n Don\'t enumerate every value \u2014 summarize bulk changes in a sentence.\n\n ## Output 3: version_bump_reason\n\n One sentence explaining WHY the overall version bump ({{version_bump}}) was chosen.\n - For MAJOR: name the specific breaking symbol(s) and explain why existing callers break\n - For MINOR: name the new capability added\n - For PATCH: describe what was fixed or improved\n - Example: "MAJOR because `parserCreateJob` InputStream overloads were removed from `RawLabReportClient`, breaking existing callers that pass InputStream arguments."\n\n {{ ctx.output_format }}\n "#\n}\n',
900976
901006
  "generators.baml": 'generator target {\n output_type "typescript"\n\n output_dir "../src/"\n\n version "0.219.0"\n\n default_client_mode async\n}\n',
900977
901007
  "main.baml": "// BAML client configuration for LLM providers\n\n// OpenAI client configuration\nclient<llm> OpenAI {\n provider openai\n options {\n model gpt-4o\n api_key env.OPENAI_API_KEY\n }\n}\n\n// Anthropic client configuration\nclient<llm> Anthropic {\n provider anthropic\n options {\n model claude-sonnet-4-5-20250929\n api_key env.ANTHROPIC_API_KEY\n }\n}\n\n// Bedrock client configuration\nclient<llm> Bedrock {\n provider aws-bedrock\n options {\n model anthropic.claude-3-5-sonnet-20240620-v1:0\n }\n}\n\n// Fallback client that tries multiple providers\n// TODO(tjb9dc): I wish we didn't have to specify this, we're only going to use one at runtime\nclient<llm> DefaultClient {\n provider fallback\n options {\n strategy [\n Anthropic\n OpenAI\n Bedrock\n ]\n }\n}\n"
900978
901008
  };
@@ -901378,7 +901408,9 @@ var LocalTaskHandler = class {
901378
901408
  autoVersioningChangelogEntry: autoVersionResult.changelogEntry,
901379
901409
  autoVersioningPrDescription: autoVersionResult.prDescription,
901380
901410
  autoVersioningVersionBumpReason: autoVersionResult.versionBumpReason,
901381
- autoVersioningVersionBump: autoVersionResult.versionBump
901411
+ autoVersioningVersionBump: autoVersionResult.versionBump,
901412
+ autoVersioningNewVersion: autoVersionResult.version,
901413
+ autoVersioningPreviousVersion: autoVersionResult.previousVersion
901382
901414
  };
901383
901415
  }
901384
901416
  return { shouldCommit: true, autoVersioningCommitMessage: void 0 };
@@ -901515,7 +901547,7 @@ var LocalTaskHandler = class {
901515
901547
  let prDescription2;
901516
901548
  let versionBumpReason2 = bestVersionBumpReason;
901517
901549
  if (allChangelogEntries.length > 1) {
901518
- const rawEntries = allChangelogEntries.map((e6) => e6.startsWith("- ") ? e6 : `- ${e6}`).join("\n");
901550
+ const rawEntries = allChangelogEntries.join("\n\n");
901519
901551
  try {
901520
901552
  this.context.logger.debug(`Consolidating ${allChangelogEntries.length} changelog entries via AI rollup`);
901521
901553
  const projectedVersion = this.incrementVersion(previousVersion, bestBump);
@@ -901573,7 +901605,8 @@ var LocalTaskHandler = class {
901573
901605
  changelogEntry,
901574
901606
  prDescription,
901575
901607
  versionBumpReason,
901576
- versionBump: finalBump
901608
+ versionBump: finalBump,
901609
+ previousVersion
901577
901610
  };
901578
901611
  } catch (error50) {
901579
901612
  if (error50 instanceof AutoVersioningException) {
@@ -902291,7 +902324,7 @@ generators:
902291
902324
  absolutePathToLocalSnippetJSON = AbsoluteFilePath2.of((await getWorkspaceTempDir()).path + "/snippet.json");
902292
902325
  }
902293
902326
  const workspaceTempDir = await getWorkspaceTempDir();
902294
- const { shouldCommit, autoVersioningCommitMessage, autoVersioningChangelogEntry, autoVersioningPrDescription, autoVersioningVersionBumpReason, autoVersioningVersionBump } = await writeFilesToDiskAndRunGenerator({
902327
+ const { shouldCommit, autoVersioningCommitMessage, autoVersioningChangelogEntry, autoVersioningPrDescription, autoVersioningVersionBumpReason, autoVersioningVersionBump, autoVersioningNewVersion, autoVersioningPreviousVersion } = await writeFilesToDiskAndRunGenerator({
902295
902328
  organization: projectConfig.organization,
902296
902329
  absolutePathToFernConfig: workspace.generatorsConfiguration?.absolutePathToConfiguration ?? projectConfig._absolutePath,
902297
902330
  workspace: fernWorkspace,
@@ -902344,6 +902377,9 @@ generators:
902344
902377
  changelogEntry: autoVersioningChangelogEntry,
902345
902378
  prDescription: autoVersioningPrDescription,
902346
902379
  versionBumpReason: autoVersioningVersionBumpReason,
902380
+ previousVersion: autoVersioningPreviousVersion,
902381
+ newVersion: autoVersioningNewVersion,
902382
+ versionBump: autoVersioningVersionBump,
902347
902383
  previewMode: selfhostedGithubConfig.previewMode,
902348
902384
  generatorName: generatorInvocation.name,
902349
902385
  automationMode,
@@ -923762,7 +923798,7 @@ var CliContext = class _CliContext {
923762
923798
  if (false) {
923763
923799
  this.logger.error("CLI_VERSION is not defined");
923764
923800
  }
923765
- return "4.71.0";
923801
+ return "4.71.1-1-gb9108d42ae3";
923766
923802
  }
923767
923803
  getCliName() {
923768
923804
  if (false) {
@@ -935742,7 +935778,7 @@ async function sdkDiffCommand({
935742
935778
  let changelogEntry;
935743
935779
  let versionBumpReason = bestVersionBumpReason;
935744
935780
  if (allChangelogEntries.length > 1) {
935745
- const rawEntries = allChangelogEntries.map((e6) => e6.startsWith("- ") ? e6 : `- ${e6}`).join("\n");
935781
+ const rawEntries = allChangelogEntries.join("\n\n");
935746
935782
  try {
935747
935783
  context3.logger.debug(`Consolidating ${allChangelogEntries.length} changelog entries via AI rollup`);
935748
935784
  const rollup = await bamlClient.ConsolidateChangelog(rawEntries, bestBump, "unknown", "", "");
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "4.71.0",
2
+ "version": "4.71.1-1-gb9108d42ae3",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",