relizy 1.7.0 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.mjs CHANGED
@@ -4,8 +4,8 @@ import { dirname, join } from 'node:path';
4
4
  import process from 'node:process';
5
5
  import { fileURLToPath } from 'node:url';
6
6
  import { printBanner, logger } from '@maz-ui/node';
7
- import { Command } from 'commander';
8
- import { aC as isInCI, V as getCIName, h as bump, j as changelog, aT as publish, aR as providerRelease, ba as social, aQ as prComment, b0 as release } from './shared/relizy.uCxVVpbQ.mjs';
7
+ import { Command, Option } from 'commander';
8
+ import { aJ as isInCI, a0 as getCIName, m as bump, o as changelog, b1 as publish, a$ as providerRelease, bn as social, a_ as prComment, ba as release } from './shared/relizy.CN-7XcP7.mjs';
9
9
  import 'node:child_process';
10
10
  import '@maz-ui/utils/helpers/formatJson';
11
11
  import 'c12';
@@ -13,12 +13,15 @@ import 'changelogen';
13
13
  import 'defu';
14
14
  import '@inquirer/prompts';
15
15
  import 'micromatch';
16
+ import 'semver';
16
17
  import '@maz-ui/utils/helpers/getErrorMessage';
17
18
  import 'fast-glob';
18
- import 'semver';
19
19
  import '@maz-ui/utils/helpers/upperFirst';
20
20
  import 'convert-gitmoji';
21
21
  import 'node-fetch-native';
22
+ import 'mdast-util-from-markdown';
23
+ import 'mdast-util-gfm';
24
+ import 'micromark-extension-gfm';
22
25
 
23
26
  const hasSilentFlag = process.argv.includes("--log-level") && process.argv.includes("silent");
24
27
  const __filename$1 = fileURLToPath(import.meta.url);
@@ -68,6 +71,9 @@ function getReleaseType(options) {
68
71
  type = "prepatch";
69
72
  return type;
70
73
  }
74
+ function slackFormatOption() {
75
+ return new Option("--slack-format <format>", "Slack changelog format, overrides social.slack.changelogFormat").choices(["summary", "full"]);
76
+ }
71
77
  program.name("relizy").description("Release management tool for monorepos and standalone packages").version(version).option("--config <name>", "Config file name (without .config.ts - e.g. changelog-test)").option("--no-safety-check", "Skip safety check").option("--log-level <level>", "Set log level (silent, error, warning, normal, default, debug, trace, verbose)", "default").option("--dry-run", "Preview changes without writing files, creating tags, commits or publishing").option("--pr-number <number>", "Override PR/MR number for PR comment features", Number);
72
78
  program.command("bump").description("Bump package versions").option("--major", "Bump major version").option("--minor", "Bump minor version").option("--patch", "Bump patch version").option("--prerelease", "Bump prerelease version").option("--premajor", "Bump premajor version").option("--preminor", "Bump preminor version").option("--prepatch", "Bump prepatch version").option("--preid <id>", "Prerelease identifier (alpha, beta, rc, etc.)").option("--suffix <suffix>", "Custom suffix for prerelease versions - replace the last .X with .suffix (e.g. 1.0.0-beta.0 -> 1.0.0-beta.suffix)").option("--no-clean", "Skip check if the working directory is clean").option("--force", "Bump even if there are no commits").option("--yes", "Skip confirmation prompt about bumping packages").option("--canary", "Publish a canary release from the current commit").option("--include-private", "Include private packages in the bump").action(async (options) => {
73
79
  try {
@@ -146,7 +152,7 @@ program.command("provider-release").description("Publish release to git provider
146
152
  process.exit(1);
147
153
  }
148
154
  });
149
- program.command("social").description("Post release announcements to social media platforms").option("--from <ref>", "Start commit reference").option("--to <ref>", "End commit reference").option("--ai", "Force-enable AI for social posts").option("--no-ai", "Force-disable AI for social posts").action(async (options) => {
155
+ program.command("social").description("Post release announcements to social media platforms").option("--from <ref>", "Start commit reference").option("--to <ref>", "End commit reference").option("--ai", "Force-enable AI for social posts").option("--no-ai", "Force-disable AI for social posts").addOption(slackFormatOption()).action(async (options) => {
150
156
  try {
151
157
  await social({
152
158
  from: options.from,
@@ -155,7 +161,8 @@ program.command("social").description("Post release announcements to social medi
155
161
  logLevel: program.opts().logLevel,
156
162
  configName: program.opts().config,
157
163
  safetyCheck: hasCliFlag("--no-safety-check") ? false : void 0,
158
- ai: hasCliFlag("--ai") ? true : hasCliFlag("--no-ai") ? false : void 0
164
+ ai: hasCliFlag("--ai") ? true : hasCliFlag("--no-ai") ? false : void 0,
165
+ slackFormat: options.slackFormat
159
166
  });
160
167
  } catch {
161
168
  process.exit(1);
@@ -174,7 +181,7 @@ program.command("pr-comment").description("Post or re-post a PR comment with rel
174
181
  process.exit(1);
175
182
  }
176
183
  });
177
- program.command("release").description("Complete release workflow (bump + changelog + commit + tag + push to remote + publish release)").option("--major", "Bump major version").option("--minor", "Bump minor version").option("--patch", "Bump patch version").option("--prerelease", "Bump prerelease version").option("--premajor", "Bump premajor version").option("--preminor", "Bump preminor version").option("--prepatch", "Bump prepatch version").option("--preid <id>", "Prerelease identifier (alpha, beta, rc, etc.)").option("--suffix <suffix>", "Custom suffix for prerelease versions - replace the last .X with .suffix (e.g. 1.0.0-beta.0 -> 1.0.0-beta.suffix)").option("--from <ref>", "Start commit reference").option("--to <ref>", "End commit reference").option("--no-push", "Skip push changes and tags to remote").option("--no-provider-release", "Skip release creation (GitHub/GitLab)").option("--no-publish", "Skip npm publish").option("--registry <url>", "Custom npm registry URL").option("--tag <tag>", "Publish with specific tag (default: latest for stable, next for prerelease)").option("--access <type>", "Package access level (public or restricted)").option("--otp <code>", "One-time password for 2FA").option("--no-verify", "Skip git hooks during commit").option("--format-cmd <cmd>", 'Command to format CHANGELOG files after generation (e.g. "pnpm lint")').option("--build-cmd <cmd>", 'Command to build packages before publish (e.g. "pnpm build")').option("--no-root-changelog", "Skip generation of root changelog file").option("--token <token>", "Git token (github or gitlab)").option("--force", "Bump even if there are no commits").option("--no-clean", "Skip check if the working directory is clean").option("--no-commit", "Skip commit and tag").option("--no-git-tag", "Skip tag creation").option("--no-changelog", "Skip changelog generation files").option("--provider <provider>", "Git provider (github or gitlab)").option("--no-social", "Skip social media posting").option("--no-pr-comment", "Skip PR comment posting").option("--yes", "Skip confirmation prompt about bumping packages").option("--publish-token <token>", 'NPM token (e.g. "123456") - only supported for pnpm and npm').option("--skip-existing-versions", "Skip packages whose version already exists on the registry instead of failing").option("--canary", "Publish a canary release from the current commit").option("--include-private", "Include private packages in bump and changelog phases").option("--ai", "Force-enable AI for release notes and social posts").option("--no-ai", "Force-disable AI for release notes and social posts").action(async (options) => {
184
+ program.command("release").description("Complete release workflow (bump + changelog + commit + tag + push to remote + publish release)").option("--major", "Bump major version").option("--minor", "Bump minor version").option("--patch", "Bump patch version").option("--prerelease", "Bump prerelease version").option("--premajor", "Bump premajor version").option("--preminor", "Bump preminor version").option("--prepatch", "Bump prepatch version").option("--preid <id>", "Prerelease identifier (alpha, beta, rc, etc.)").option("--suffix <suffix>", "Custom suffix for prerelease versions - replace the last .X with .suffix (e.g. 1.0.0-beta.0 -> 1.0.0-beta.suffix)").option("--from <ref>", "Start commit reference").option("--to <ref>", "End commit reference").option("--no-push", "Skip push changes and tags to remote").option("--no-provider-release", "Skip release creation (GitHub/GitLab)").option("--no-publish", "Skip npm publish").option("--registry <url>", "Custom npm registry URL").option("--tag <tag>", "Publish with specific tag (default: latest for stable, next for prerelease)").option("--access <type>", "Package access level (public or restricted)").option("--otp <code>", "One-time password for 2FA").option("--no-verify", "Skip git hooks during commit").option("--format-cmd <cmd>", 'Command to format CHANGELOG files after generation (e.g. "pnpm lint")').option("--build-cmd <cmd>", 'Command to build packages before publish (e.g. "pnpm build")').option("--no-root-changelog", "Skip generation of root changelog file").option("--token <token>", "Git token (github or gitlab)").option("--force", "Bump even if there are no commits").option("--no-clean", "Skip check if the working directory is clean").option("--no-commit", "Skip commit and tag").option("--no-git-tag", "Skip tag creation").option("--no-changelog", "Skip changelog generation files").option("--provider <provider>", "Git provider (github or gitlab)").option("--no-social", "Skip social media posting").option("--no-pr-comment", "Skip PR comment posting").option("--yes", "Skip confirmation prompt about bumping packages").option("--publish-token <token>", 'NPM token (e.g. "123456") - only supported for pnpm and npm').option("--skip-existing-versions", "Skip packages whose version already exists on the registry instead of failing").option("--canary", "Publish a canary release from the current commit").option("--include-private", "Include private packages in bump and changelog phases").option("--ai", "Force-enable AI for release notes and social posts").option("--no-ai", "Force-disable AI for release notes and social posts").addOption(slackFormatOption()).action(async (options) => {
178
185
  try {
179
186
  await release({
180
187
  type: getReleaseType(options),
@@ -211,7 +218,8 @@ program.command("release").description("Complete release workflow (bump + change
211
218
  social: hasCliFlag("--no-social") ? false : void 0,
212
219
  prComment: hasCliFlag("--no-pr-comment") ? false : void 0,
213
220
  prNumber: program.opts().prNumber,
214
- ai: hasCliFlag("--ai") ? true : hasCliFlag("--no-ai") ? false : void 0
221
+ ai: hasCliFlag("--ai") ? true : hasCliFlag("--no-ai") ? false : void 0,
222
+ slackFormat: options.slackFormat
215
223
  });
216
224
  } catch (error) {
217
225
  logger.error("Failed to release -", error);
package/dist/index.d.mts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { LogLevel } from '@maz-ui/node';
2
+ import { LanguageModel, CallSettings } from 'ai';
2
3
  import { RawGitCommit, GitCommit, ChangelogConfig as ChangelogConfig$1, SemverBumpType } from 'changelogen';
3
4
  import { ReleaseType } from 'semver';
4
5
  import { DeepPartial } from '@maz-ui/utils/ts-helpers/DeepPartial';
@@ -61,7 +62,7 @@ declare function getDefaultConfig(): {
61
62
  slack: {
62
63
  enabled: boolean;
63
64
  onlyStable: boolean;
64
- postMaxLength: number;
65
+ changelogFormat: string;
65
66
  noAuthors: boolean;
66
67
  noPackages: boolean;
67
68
  };
@@ -283,6 +284,16 @@ declare function findReachableCommitBySubject(subject: string, to: string, cwd?:
283
284
  * Returns true when a tag with the given name exists locally.
284
285
  */
285
286
  declare function tagExists(tag: string, cwd?: string): Promise<boolean>;
287
+ /**
288
+ * Returns the local tags, most recent first (`--sort=-creatordate`). With
289
+ * `pattern` (a `git tag --list` glob, e.g. `v*`), only the tags matching it are
290
+ * listed. Any error returns an empty list.
291
+ */
292
+ declare function listTags({ pattern, cwd, logLevel, }?: {
293
+ pattern?: string;
294
+ cwd?: string;
295
+ logLevel?: LogLevel;
296
+ }): Promise<string[]>;
286
297
  /**
287
298
  * Move an annotated tag to a different commit locally (force). Never rewrites
288
299
  * any commit; only the tag pointer moves.
@@ -694,6 +705,17 @@ declare function getSlackToken(options: {
694
705
  declare function getSlackWebhookUrl(options: {
695
706
  socialWebhookUrl?: string;
696
707
  }): string | null;
708
+ /** Default changelog budget of the `summary` format. */
709
+ declare const SLACK_SUMMARY_MAX_LENGTH = 2500;
710
+ /**
711
+ * Resolve the changelog budget of a Slack post: `postMaxLength` when set,
712
+ * otherwise 2500 chars in `summary` format and no limit in `full` format
713
+ * (the message is then only bounded by Slack's 50 blocks).
714
+ */
715
+ declare function resolveSlackPostMaxLength({ changelogFormat, postMaxLength }: {
716
+ changelogFormat?: SlackChangelogFormat;
717
+ postMaxLength?: number;
718
+ }): number | undefined;
697
719
  /**
698
720
  * Format changelog for Slack (convert markdown to Slack's mrkdwn format)
699
721
  */
@@ -705,9 +727,14 @@ declare function formatChangelogForSlack(changelog: string, maxLength?: number):
705
727
  */
706
728
  declare function formatPackagesForSlack(packages: PackageBumpEntry[]): string;
707
729
  /**
708
- * Format the Slack message using blocks
730
+ * Format the Slack message using blocks.
731
+ * - `summary` format: the changelog is a single mrkdwn section (2500 chars by default).
732
+ * - `full` format: the changelog is rendered as rich_text blocks, commit bodies
733
+ * included, split per section. It is bounded by `postMaxLength` when set and
734
+ * always by Slack's limits (50 blocks, ~13,200 chars for rich text messages).
735
+ * Every block is kept within Slack's limits so the post is never rejected.
709
736
  */
710
- declare function formatSlackMessage({ projectName, version, changelog, releaseUrl, changelogUrl, template, contributors, packages, postMaxLength }: {
737
+ declare function formatSlackMessage({ projectName, version, changelog, releaseUrl, changelogUrl, template, contributors, packages, postMaxLength, changelogFormat }: {
711
738
  template?: string;
712
739
  projectName: string;
713
740
  version: string;
@@ -717,17 +744,112 @@ declare function formatSlackMessage({ projectName, version, changelog, releaseUr
717
744
  contributors?: string[];
718
745
  packages?: PackageBumpEntry[];
719
746
  postMaxLength?: number;
747
+ changelogFormat?: SlackChangelogFormat;
720
748
  }): any[];
721
749
  /**
722
750
  * Post a release announcement to Slack.
723
751
  * Dispatches to Incoming Webhook (if `webhookUrl` is set) or Web API (`token` + `channel`).
724
752
  * When both are provided, the webhook takes priority.
725
753
  */
726
- declare function postReleaseToSlack({ version, projectName, changelog, releaseUrl, changelogUrl, channel, token, webhookUrl, template, contributors, packages, postMaxLength, dryRun, }: SlackOptions): Promise<{
754
+ declare function postReleaseToSlack({ version, projectName, changelog, releaseUrl, changelogUrl, channel, token, webhookUrl, template, contributors, packages, postMaxLength, changelogFormat, dryRun, }: SlackOptions): Promise<{
727
755
  ok: true;
728
756
  transport: "webhook";
729
757
  } | _slack_web_api.ChatPostMessageResponse | undefined>;
730
758
 
759
+ /** Maximum number of blocks in a Slack message. */
760
+ declare const SLACK_MAX_BLOCKS = 50;
761
+ /** Maximum length of the text of a Slack section block. */
762
+ declare const SLACK_SECTION_MAX_LENGTH = 3000;
763
+ /**
764
+ * Soft cap of the text carried by a single rich_text block. Slack documents no
765
+ * limit for rich_text, so the section limit is reused as a conservative bound.
766
+ */
767
+ declare const SLACK_RICH_TEXT_BLOCK_MAX_LENGTH = 3000;
768
+ /**
769
+ * Budget of the JSON of all the blocks of a message containing rich_text blocks.
770
+ * Slack rejects such messages above ~13,200 characters with `msg_blocks_too_long`
771
+ * (https://github.com/slackapi/bolt-js/issues/2509): measuring the JSON, which is
772
+ * larger than the text Slack counts, keeps a safe margin.
773
+ */
774
+ declare const SLACK_RICH_TEXT_MESSAGE_MAX_LENGTH = 11000;
775
+ /** Maximum length of the text of a Slack header block. */
776
+ declare const SLACK_HEADER_MAX_LENGTH = 150;
777
+ interface SlackRichTextStyle {
778
+ bold?: boolean;
779
+ italic?: boolean;
780
+ strike?: boolean;
781
+ code?: boolean;
782
+ }
783
+ interface SlackRichTextText {
784
+ type: 'text';
785
+ text: string;
786
+ style?: SlackRichTextStyle;
787
+ }
788
+ interface SlackRichTextLink {
789
+ type: 'link';
790
+ url: string;
791
+ text?: string;
792
+ style?: SlackRichTextStyle;
793
+ }
794
+ type SlackRichTextInline = SlackRichTextText | SlackRichTextLink;
795
+ interface SlackRichTextSection {
796
+ type: 'rich_text_section';
797
+ elements: SlackRichTextInline[];
798
+ }
799
+ interface SlackRichTextList {
800
+ type: 'rich_text_list';
801
+ style: 'bullet' | 'ordered';
802
+ indent?: number;
803
+ offset?: number;
804
+ elements: SlackRichTextSection[];
805
+ }
806
+ interface SlackRichTextQuote {
807
+ type: 'rich_text_quote';
808
+ elements: SlackRichTextInline[];
809
+ }
810
+ interface SlackRichTextPreformatted {
811
+ type: 'rich_text_preformatted';
812
+ elements: SlackRichTextInline[];
813
+ }
814
+ type SlackRichTextElement = SlackRichTextSection | SlackRichTextList | SlackRichTextQuote | SlackRichTextPreformatted;
815
+ interface SlackRichTextBlock {
816
+ type: 'rich_text';
817
+ elements: SlackRichTextElement[];
818
+ }
819
+ /** Cut a text without splitting a UTF-16 surrogate pair (emoji), which Slack would render broken. */
820
+ declare function sliceSlackText(text: string, length: number): string;
821
+ /**
822
+ * Render a markdown changelog as Slack mrkdwn.
823
+ * When `maxLength` is exceeded, whole commits are dropped from the end and
824
+ * replaced with an "… and N more changes" line; a single block longer than
825
+ * the budget is cut instead.
826
+ */
827
+ declare function markdownToSlackMrkdwn(markdown: string, { maxLength, cutCommits }?: {
828
+ maxLength?: number;
829
+ /** Cut the first commit that does not fit where the limit is reached, instead of dropping it whole */
830
+ cutCommits?: boolean;
831
+ }): string;
832
+ /**
833
+ * Render a markdown changelog as Slack rich_text blocks.
834
+ * Commit bodies are rendered under their bullet: paragraphs as quotes, nested
835
+ * lists as indented lists, code as preformatted blocks.
836
+ * When `maxLength`, `maxBlocks` or `maxPayloadLength` is exceeded, the changelog
837
+ * is cut where the limit is reached, even inside a commit body, with an ellipsis,
838
+ * and the commits left out entirely are announced with an "… and N more changes" line.
839
+ */
840
+ declare function markdownToSlackRichText(markdown: string, { maxLength, maxBlocks, maxPayloadLength, blockMaxLength, }?: {
841
+ /** Maximum number of text characters of the changelog */
842
+ maxLength?: number;
843
+ /** Maximum number of returned blocks */
844
+ maxBlocks?: number;
845
+ /** Maximum length of the JSON of the returned blocks */
846
+ maxPayloadLength?: number;
847
+ /** Soft cap of the text characters of a single block */
848
+ blockMaxLength?: number;
849
+ }): SlackRichTextBlock[];
850
+ /** Plain-text rendering of a rich_text block, used for dry-run previews. */
851
+ declare function richTextToPlainText(block: SlackRichTextBlock): string;
852
+
731
853
  /**
732
854
  * Extract a summary from changelog content
733
855
  */
@@ -752,9 +874,20 @@ declare function getLastTag({ logLevel, cwd }: {
752
874
  logLevel?: LogLevel;
753
875
  cwd?: string;
754
876
  }): Promise<string>;
877
+ /**
878
+ * Returns the version of a repository tag built from `templates.tagBody` (e.g. `v{{newVersion}}`),
879
+ * or null when the tag does not follow the template. This keeps the tags of other packages
880
+ * (e.g. `@scope/pkg@1.2.3` or `vue-utils@1.2.3` from an independent release in the same
881
+ * repository) out of the repository range.
882
+ */
883
+ declare function extractVersionFromRepoTag(tag: string, tagBody: string): string | null;
755
884
  declare function getLastRepoTag(options?: {
756
885
  onlyStable?: boolean;
757
886
  pkg?: ReadPackage;
887
+ /** Template of the repository tags (`templates.tagBody`) */
888
+ tagBody?: string;
889
+ /** Version before the bump, when higher than `pkg.version` (e.g. the root version for a sub-package) */
890
+ currentVersion?: string;
758
891
  logLevel?: LogLevel;
759
892
  cwd?: string;
760
893
  }): Promise<string | null>;
@@ -1448,6 +1581,10 @@ interface SocialOptions {
1448
1581
  * true = force-enable AI, false = force-disable AI, undefined = use config
1449
1582
  */
1450
1583
  ai?: boolean;
1584
+ /**
1585
+ * Override `social.slack.changelogFormat` for this run
1586
+ */
1587
+ slackFormat?: SlackChangelogFormat;
1451
1588
  /**
1452
1589
  * Prerelease suffix, forwarded to package discovery in independent mode
1453
1590
  * when no bump result is available (standalone `social` runs).
@@ -1716,6 +1853,10 @@ interface ReleaseOptions extends ReleaseConfig, BumpConfig, ChangelogConfig, Pub
1716
1853
  * true = force-enable AI, false = force-disable AI, undefined = use config
1717
1854
  */
1718
1855
  ai?: boolean;
1856
+ /**
1857
+ * Override `social.slack.changelogFormat` for this run
1858
+ */
1859
+ slackFormat?: SlackChangelogFormat;
1719
1860
  }
1720
1861
  interface TwitterCredentials {
1721
1862
  /**
@@ -1772,6 +1913,12 @@ interface SlackCredentials {
1772
1913
  */
1773
1914
  token?: string;
1774
1915
  }
1916
+ /**
1917
+ * Slack changelog rendering:
1918
+ * - `summary`: short changelog (commit titles only) in a single mrkdwn section.
1919
+ * - `full`: complete changelog (commit bodies and PR/issue links) rendered as rich text blocks.
1920
+ */
1921
+ type SlackChangelogFormat = 'summary' | 'full';
1775
1922
  interface SlackSocialConfig {
1776
1923
  /**
1777
1924
  * Enable Slack posting
@@ -1805,10 +1952,22 @@ interface SlackSocialConfig {
1805
1952
  * Slack credentials (optional - falls back to environment variables)
1806
1953
  */
1807
1954
  credentials?: SlackCredentials;
1955
+ /**
1956
+ * Changelog rendering of the Slack message.
1957
+ * - `summary`: commit titles only, in a single section capped at `postMaxLength`.
1958
+ * - `full`: commit bodies and PR/issue links included, rendered as rich text blocks
1959
+ * (one per changelog section). Commit bodies follow `changelog.includeCommitBody`.
1960
+ * Can be overridden with the `--slack-format` CLI flag.
1961
+ * @default 'summary'
1962
+ */
1963
+ changelogFormat?: SlackChangelogFormat;
1808
1964
  /**
1809
1965
  * Maximum length (in characters) of the changelog rendered inside the Slack message.
1810
- * Slack's per-section-block limit is 3000; default 2500 leaves margin for emoji/formatting.
1811
- * @default 2500
1966
+ * When exceeded, `summary` drops the last commits, `full` cuts the changelog where the limit
1967
+ * is reached (even inside a commit body) with an ellipsis; the commits left out entirely are
1968
+ * announced with an "… and N more changes" line.
1969
+ * Defaults to 2500 in `summary` format (Slack's section limit is 3000) and to no limit
1970
+ * in `full` format, where the message is only bounded by Slack's 50 blocks.
1812
1971
  */
1813
1972
  postMaxLength?: number;
1814
1973
  /**
@@ -1823,7 +1982,7 @@ interface SlackSocialConfig {
1823
1982
  */
1824
1983
  noPackages?: boolean;
1825
1984
  }
1826
- type AIProviderName = 'claude-code';
1985
+ type AIProviderName = 'claude-code' | 'ai-sdk';
1827
1986
  interface ClaudeCodeProviderOptions {
1828
1987
  /**
1829
1988
  * Anthropic API key.
@@ -1841,8 +2000,27 @@ interface ClaudeCodeProviderOptions {
1841
2000
  */
1842
2001
  model?: string;
1843
2002
  }
2003
+ interface AiSdkProviderOptions {
2004
+ /**
2005
+ * Language model: an instance from a provider package (e.g. `openai('gpt-5-mini')`
2006
+ * from `@ai-sdk/openai`), or a model id of the Vercel AI Gateway (e.g. `'openai/gpt-5-mini'`).
2007
+ * @see https://ai-sdk.dev/providers/ai-sdk-providers
2008
+ */
2009
+ model: LanguageModel;
2010
+ /**
2011
+ * Reasoning effort, for the models that support it.
2012
+ * Not sent when unset: the default of the provider applies.
2013
+ */
2014
+ reasoning?: CallSettings['reasoning'];
2015
+ }
1844
2016
  type AIPromptTarget = 'providerRelease' | 'twitter' | 'slack';
1845
2017
  type AISystemPromptOverrides = Partial<Record<AIPromptTarget, string>>;
2018
+ interface AIExtraGuidelines extends Partial<Record<AIPromptTarget, string>> {
2019
+ /**
2020
+ * Directives appended to every target, before the target-specific ones
2021
+ */
2022
+ global?: string;
2023
+ }
1846
2024
  interface AITargetConfig {
1847
2025
  /**
1848
2026
  * Enable AI for this target
@@ -1871,6 +2049,7 @@ interface AIConfig {
1871
2049
  */
1872
2050
  providers?: {
1873
2051
  'claude-code'?: ClaudeCodeProviderOptions;
2052
+ 'ai-sdk'?: AiSdkProviderOptions;
1874
2053
  };
1875
2054
  /**
1876
2055
  * Output language (ISO 639-1 code or plain English name).
@@ -1885,10 +2064,13 @@ interface AIConfig {
1885
2064
  */
1886
2065
  fallback?: 'raw' | 'fail';
1887
2066
  /**
1888
- * Extra directives appended to every built-in system prompt.
2067
+ * Extra directives appended to the built-in system prompts.
2068
+ * A string applies to every target; an object adds directives per target,
2069
+ * appended after the `global` ones.
1889
2070
  * @example 'Always use emojis in the changelog'
2071
+ * @example { global: 'Keep package names in English.', slack: 'Mention the owning team.' }
1890
2072
  */
1891
- extraGuidelines?: string;
2073
+ extraGuidelines?: string | AIExtraGuidelines;
1892
2074
  /**
1893
2075
  * Full replacement of the built-in system prompts.
1894
2076
  * When set, the extraGuidelines and base prompts are ignored for that target.
@@ -2002,9 +2184,14 @@ interface SlackOptions {
2002
2184
  template?: string;
2003
2185
  /**
2004
2186
  * Maximum chars of the changelog rendered in the message.
2005
- * @default 2500
2187
+ * Defaults to 2500 in `summary` format and to no limit in `full` format.
2006
2188
  */
2007
2189
  postMaxLength?: number;
2190
+ /**
2191
+ * Changelog rendering of the message
2192
+ * @default 'summary'
2193
+ */
2194
+ changelogFormat?: SlackChangelogFormat;
2008
2195
  /**
2009
2196
  * Contributor names (plain strings, no email/handle). Empty array or undefined → no contributors block.
2010
2197
  */
@@ -2355,5 +2542,5 @@ declare function socialSafetyCheck({ config }: {
2355
2542
  }): Promise<void>;
2356
2543
  declare function social(options?: Partial<SocialOptions>): Promise<SocialResult>;
2357
2544
 
2358
- export { NEW_PACKAGE_MARKER, PR_COMMENT_MARKER, assertBranchUpToDateWithRemote, assertReleaseTagsAvailable, buildChangelogBody, buildCommentBody, buildCompareLink, buildContributors, buildReleaseSummary, bump, capReleaseTypeForZeroMajor, changelog, checkGitStatusIfDirty, collectContributorNames, collectPackageBumps, confirmBump, createCommitAndTags, createGitlabRelease, defineConfig, detectGitProvider, detectPackageManager, detectPullRequest, determinePublishTag, determineReleaseType, determineSemverChange, executeBuildCmd, executeFormatCmd, executeHook, expandPackagesToBumpWithDependents, extractChangelogSummary, extractVersionFromPackageTag, extractVersionFromTag, fetchGitTags, filterOutPrivatePackages, filterPrivatePackagesUnlessIncluded, findGitHubPR, findGitLabMR, findReachableCommitBySubject, formatChangelogForSlack, formatPackagesForSlack, formatSlackMessage, formatTweetMessage, generateChangelog, generateMarkDown, getAuthCommand, getBumpedIndependentPackages, getBumpedPackageIndependently, getCIName, getCanaryVersion, getCommitChangedFiles, getCommitSubject, getCurrentGitBranch, getCurrentGitRef, getDefaultConfig, getDependentsOf, getFirstCommit, getGitDiff, getGitStatus, getGitUpstream, getIndependentTag, getLastPackageTag, getLastRepoTag, getLastStableTag, getLastTag, getModifiedReleaseFilePatterns, getNewPackageCompareBase, getNpmRegistry, getPackageCommits, getPackageDependencies, getPackageNewVersion, getPackages, getPackagesOrBumpedPackages, getPackagesToPublishInIndependentMode, getPackagesToPublishInSelectiveMode, getPreid, getReleaseTagNames, getReleaseUrl, getRootPackage, getShortCommitSha, getSlackToken, getSlackWebhookUrl, getTwitterCredentials, github, gitlab, globDirsAbsolute, hasLernaJson, isAncestor, isBumpedPackage, isChangedPreid, isCommitOnlyInIgnoredPackages, isGraduating, isGraduatingToStableBetweenVersion, isInCI, isPrerelease, isPrereleaseReleaseType, isStableReleaseType, isTagVersionCompatibleWithCurrent, isVersionAlreadyPublishedError, isVersionPublished, loadRelizyConfig, mergeTypes, parseChangelogMarkdown, parseGitRemoteUrl, postPrComment, postReleaseToSlack, postReleaseToTwitter, prComment, providerRelease, providerReleaseSafetyCheck, publish, publishPackage, publishSafetyCheck, pushCommitAndTags, pushTagForce, readPackageJson, readPackages, reconcileFromTag, redactSecrets, release, resetRewrittenTagCache, resolveAllConfiguredRegistryTargets, resolveIgnoredPackagePaths, resolveRegistryTargetsForPackage, resolveRegistryTargetsForPackages, resolveTags, retagAnnotatedLocal, rollbackModifiedFiles, shouldFilterPrereleaseTags, social, socialSafetyCheck, tagExists, topologicalSort, tryPostPrComment, updateLernaVersion, withRegistryNpmrc, writeChangelogToFile, writeVersion };
2359
- export type { AIConfig, AIPromptTarget, AIProviderName, AISocialConfig, AISystemPromptOverrides, AITargetConfig, BumpConfig, BumpOptions, BumpResult, BumpResultFalsy, BumpResultTruthy, ChangelogConfig, ChangelogInclude, ChangelogOptions, ClaudeCodeProviderOptions, ConfigType, GitProvider, GitUpstream, GitlabRelease, GitlabReleaseResponse, HookConfig, HookStep, HookType, MonorepoConfig, OnRewrittenTag, PackageBase, PackageBumpEntry, PackageManager, PostedRelease, PrCommentConfig, PrCommentMode, PrCommentOptions, PrCommentStatus, ProviderReleaseOptions, ProviderReleaseResult, PublishConfig, PublishOptions, PublishResponse, PullRequestInfo, ReadPackage, Reference, RegistryTarget, ReleaseConfig, ReleaseContext, ReleaseOptions, RelizyConfig, RepoConfig, ResolvedConfig, ResolvedRelizyConfig, ResolvedTags, ResolvedTwitterCredentials, RootPackage, SlackCredentials, SlackOptions, SlackPackageEntry, SlackSocialConfig, SocialConfig, SocialNetworkResult, SocialOptions, SocialResult, Step, TemplatesConfig, TokensConfig, TwitterCredentials, TwitterOptions, TwitterSocialConfig, VersionMode };
2545
+ export { NEW_PACKAGE_MARKER, PR_COMMENT_MARKER, SLACK_HEADER_MAX_LENGTH, SLACK_MAX_BLOCKS, SLACK_RICH_TEXT_BLOCK_MAX_LENGTH, SLACK_RICH_TEXT_MESSAGE_MAX_LENGTH, SLACK_SECTION_MAX_LENGTH, SLACK_SUMMARY_MAX_LENGTH, assertBranchUpToDateWithRemote, assertReleaseTagsAvailable, buildChangelogBody, buildCommentBody, buildCompareLink, buildContributors, buildReleaseSummary, bump, capReleaseTypeForZeroMajor, changelog, checkGitStatusIfDirty, collectContributorNames, collectPackageBumps, confirmBump, createCommitAndTags, createGitlabRelease, defineConfig, detectGitProvider, detectPackageManager, detectPullRequest, determinePublishTag, determineReleaseType, determineSemverChange, executeBuildCmd, executeFormatCmd, executeHook, expandPackagesToBumpWithDependents, extractChangelogSummary, extractVersionFromPackageTag, extractVersionFromRepoTag, extractVersionFromTag, fetchGitTags, filterOutPrivatePackages, filterPrivatePackagesUnlessIncluded, findGitHubPR, findGitLabMR, findReachableCommitBySubject, formatChangelogForSlack, formatPackagesForSlack, formatSlackMessage, formatTweetMessage, generateChangelog, generateMarkDown, getAuthCommand, getBumpedIndependentPackages, getBumpedPackageIndependently, getCIName, getCanaryVersion, getCommitChangedFiles, getCommitSubject, getCurrentGitBranch, getCurrentGitRef, getDefaultConfig, getDependentsOf, getFirstCommit, getGitDiff, getGitStatus, getGitUpstream, getIndependentTag, getLastPackageTag, getLastRepoTag, getLastStableTag, getLastTag, getModifiedReleaseFilePatterns, getNewPackageCompareBase, getNpmRegistry, getPackageCommits, getPackageDependencies, getPackageNewVersion, getPackages, getPackagesOrBumpedPackages, getPackagesToPublishInIndependentMode, getPackagesToPublishInSelectiveMode, getPreid, getReleaseTagNames, getReleaseUrl, getRootPackage, getShortCommitSha, getSlackToken, getSlackWebhookUrl, getTwitterCredentials, github, gitlab, globDirsAbsolute, hasLernaJson, isAncestor, isBumpedPackage, isChangedPreid, isCommitOnlyInIgnoredPackages, isGraduating, isGraduatingToStableBetweenVersion, isInCI, isPrerelease, isPrereleaseReleaseType, isStableReleaseType, isTagVersionCompatibleWithCurrent, isVersionAlreadyPublishedError, isVersionPublished, listTags, loadRelizyConfig, markdownToSlackMrkdwn, markdownToSlackRichText, mergeTypes, parseChangelogMarkdown, parseGitRemoteUrl, postPrComment, postReleaseToSlack, postReleaseToTwitter, prComment, providerRelease, providerReleaseSafetyCheck, publish, publishPackage, publishSafetyCheck, pushCommitAndTags, pushTagForce, readPackageJson, readPackages, reconcileFromTag, redactSecrets, release, resetRewrittenTagCache, resolveAllConfiguredRegistryTargets, resolveIgnoredPackagePaths, resolveRegistryTargetsForPackage, resolveRegistryTargetsForPackages, resolveSlackPostMaxLength, resolveTags, retagAnnotatedLocal, richTextToPlainText, rollbackModifiedFiles, shouldFilterPrereleaseTags, sliceSlackText, social, socialSafetyCheck, tagExists, topologicalSort, tryPostPrComment, updateLernaVersion, withRegistryNpmrc, writeChangelogToFile, writeVersion };
2546
+ export type { AIConfig, AIExtraGuidelines, AIPromptTarget, AIProviderName, AISocialConfig, AISystemPromptOverrides, AITargetConfig, AiSdkProviderOptions, BumpConfig, BumpOptions, BumpResult, BumpResultFalsy, BumpResultTruthy, ChangelogConfig, ChangelogInclude, ChangelogOptions, ClaudeCodeProviderOptions, ConfigType, GitProvider, GitUpstream, GitlabRelease, GitlabReleaseResponse, HookConfig, HookStep, HookType, MonorepoConfig, OnRewrittenTag, PackageBase, PackageBumpEntry, PackageManager, PostedRelease, PrCommentConfig, PrCommentMode, PrCommentOptions, PrCommentStatus, ProviderReleaseOptions, ProviderReleaseResult, PublishConfig, PublishOptions, PublishResponse, PullRequestInfo, ReadPackage, Reference, RegistryTarget, ReleaseConfig, ReleaseContext, ReleaseOptions, RelizyConfig, RepoConfig, ResolvedConfig, ResolvedRelizyConfig, ResolvedTags, ResolvedTwitterCredentials, RootPackage, SlackChangelogFormat, SlackCredentials, SlackOptions, SlackPackageEntry, SlackRichTextBlock, SlackRichTextElement, SlackRichTextInline, SlackRichTextLink, SlackRichTextList, SlackRichTextPreformatted, SlackRichTextQuote, SlackRichTextSection, SlackRichTextStyle, SlackRichTextText, SlackSocialConfig, SocialConfig, SocialNetworkResult, SocialOptions, SocialResult, Step, TemplatesConfig, TokensConfig, TwitterCredentials, TwitterOptions, TwitterSocialConfig, VersionMode };