releases.shpreview
Slack/Bolt JS

Bolt JS

$npx -y @buildinternet/releases show slack-bolt-js
Mon
Wed
Fri
AprMayJunJulAugSepOctNovDecJanFebMarApr
Less
More
Releases0Avg0/wk
Apr 6, 2026

What's Changed

Bring magic to a conversation with sayStream for streaming messages and show loading status with setStatus. Now available for app.event and app.message listeners:

app.event('app_mention', async ({ sayStream, setStatus }) => {
  setStatus({
    status: 'Thinking...',
    loading_messages: ['Waking up...', 'Loading a witty response...'],
  });
  const stream = sayStream({ buffer_size: 100 });
  await stream.append({ markdown_text: 'Thinking... :thinking_face:\n\n' });
  await stream.append({ markdown_text: 'Here is my response!' });
  await stream.stop();
});

The respond function now accepts thread_ts to publish responses in a thread:

app.action('my_action', async ({ ack, respond }) => {
  await ack();
  await respond({ text: 'Replying in thread!', thread_ts: '1234567890.123456' });
});

Configure ping timeouts, reconnect behavior, and other Socket Mode settings directly through App options:

const app = new App({
  socketMode: true,
  appToken: process.env.SLACK_APP_TOKEN,
  token: process.env.SLACK_BOT_TOKEN,
  clientPingTimeout: 15000,
  serverPingTimeout: 60000,
  pingPongLoggingEnabled: true,
});

👾 Enhancements

  • feat: add support for sayStream listener argument in #2841 - Thanks @WilliamBergamin!
  • feat: surface the setStatus argument to listeners if required event details are available in #2843 - Thanks @WilliamBergamin!
  • Add thread_ts to RespondFn type in #2732 - Thanks @misscoded!
  • feat(SocketModeReceiver): expose Socket Mode timeout and reconnect options in #2786 - Thanks @shivasymbl!
  • Enable esModuleInterop in tsconfig in #2719 - Thanks @misscoded!

🐛 Fixes

  • fix: Improve ESM compatibility for named exports in #2724 - Thanks @grantjoy!
  • Fixed edge case when there was error during authorize in #2753 - Thanks @shlomisas!

📚 Documentation

  • docs: add "random fact generator" custom step workshop to tutorials in #2694 - Thanks @haleychaas!
  • docs: rework ai tutorial to use openai provider and starter template in #2731 - Thanks @haleychaas!
  • docs: Deploy with Vercel in #2767 - Thanks @haleychaas!
  • docs: Add Vercel note about AI Gateway token needed only locally in #2781 - Thanks @haleychaas!
  • Docs: Add headings so copy as markdown button shows up in #2796 - Thanks @haleychaas!
  • docs: update links to tools reference pages to avoid redirects in #2722 - Thanks @zimeg!
  • docs: updates outmoded links in #2737 - Thanks @lukegalbraithrussell!
  • docs: updates outmoded steps from apps links in #2738 - Thanks @lukegalbraithrussell!

🧰 Maintenance

  • refactor: consolidate event channel and thread extraction in #2830 - Thanks @WilliamBergamin!
  • chore: consolidate context utility creators in #2828 - Thanks @WilliamBergamin!
  • build: use pinned minimum supported node18 version for type checks in #2801 - Thanks @zimeg!
  • build: include the package lockfile for custom receiver example in #2744 - Thanks @zimeg!
  • ci: support node 24 in #2831 - Thanks @zimeg!
  • ci: perform sample and example app tests on regression schedules in #2743 - Thanks @zimeg!
  • ci(deps): auto-approve / auto-merge dependencies from dependabot in #2780 - Thanks @mwbrooks!
  • chore: Add .github/CODEOWNERS file in #2718 - Thanks @mwbrooks!
  • chore: add AGENTS.md in #2826 - Thanks @WilliamBergamin!
  • chore(release): version @slack/bolt@4.7.0 in #2848 - Thanks @zimeg!

🎁 Dependencies

Core

  • chore(deps): update @slack/types requirement from ^2.18.0 to ^2.19.0 in #2727 - Thanks @dependabot[bot]!
  • chore(deps): update @slack/types requirement from ^2.19.0 to ^2.20.0 in #2790 - Thanks @dependabot[bot]!
  • chore(deps): update @slack/types requirement from ^2.20.0 to ^2.20.1 in #2820 - Thanks @dependabot[bot]!
  • chore(deps): update @slack/web-api requirement from ^7.12.0 to ^7.13.0 in #2730 - Thanks @dependabot[bot]!
  • chore(deps): update @slack/web-api requirement from ^7.13.0 to ^7.14.1 in #2791 - Thanks @dependabot[bot]!
  • chore(deps): update @slack/web-api requirement from ^7.14.1 to ^7.15.0 in #2817 - Thanks @dependabot[bot]!
  • chore(deps): update @slack/socket-mode requirement from ^2.0.5 to ^2.0.6 in #2816 - Thanks @dependabot[bot]!
  • chore(deps): update @slack/logger requirement from ^4.0.0 to ^4.0.1 in #2818 - Thanks @dependabot[bot]!
  • chore(deps): update @slack/oauth requirement from ^3.0.4 to ^3.0.5 in #2819 - Thanks @dependabot[bot]!
<details> <summary>CI</summary>
  • chore(deps): bump actions/stale from 10.0.0 to 10.1.0 in #2706 - Thanks @dependabot[bot]!
  • chore(deps): bump actions/stale from 10.1.0 to 10.1.1 in #2756 - Thanks @dependabot[bot]!
  • chore(deps): bump actions/stale from 10.1.1 to 10.2.0 in #2804 - Thanks @dependabot[bot]!
  • chore(deps): bump actions/setup-node from 5.0.0 to 6.0.0 in #2707 - Thanks @dependabot[bot]!
  • chore(deps): bump actions/setup-node from 6.0.0 to 6.1.0 in #2757 - Thanks @dependabot[bot]!
  • chore(deps): bump actions/setup-node from 6.1.0 to 6.2.0 in #2775 - Thanks @dependabot[bot]!
  • chore(deps): bump actions/setup-node from 6.2.0 to 6.3.0 in #2833 - Thanks @dependabot[bot]!
  • chore(deps): bump actions/checkout from 5.0.0 to 6.0.0 in #2729 - Thanks @dependabot[bot]!
  • chore(deps): bump actions/checkout from 6.0.0 to 6.0.1 in #2758 - Thanks @dependabot[bot]!
  • chore(deps): bump actions/checkout from 6.0.1 to 6.0.2 in #2774 - Thanks @dependabot[bot]!
  • chore(deps): bump codecov/codecov-action from 5.5.1 to 5.5.2 in #2755 - Thanks @dependabot[bot]!
  • chore(deps): bump codecov/codecov-action from 5.5.2 to 6.0.0 in #2834 - Thanks @dependabot[bot]!
  • chore(deps): bump dependabot/fetch-metadata from 2.5.0 to 3.0.0 in #2835 - Thanks @dependabot[bot]!
  • chore(deps): bump slackapi/slack-github-action from 2.1.1 to 3.0.1 in #2832 - Thanks @dependabot[bot]!
</details> <details> <summary>Dev</summary>
  • chore(deps-dev): bump @types/node from 24.9.1 to 24.10.0 in #2708 - Thanks @dependabot[bot]!
  • chore(deps-dev): bump @types/node from 24.10.0 to 24.10.1 in #2720 - Thanks @dependabot[bot]!
  • chore(deps-dev): bump @types/node from 24.10.1 to 25.0.3 in #2746 - Thanks @dependabot[bot]!
  • chore(deps-dev): bump @types/node from 25.0.6 to 25.0.9 in #2762 - Thanks @dependabot[bot]!
  • chore(deps-dev): bump @types/node from 25.0.9 to 25.0.10 in #2769 - Thanks @dependabot[bot]!
  • chore(deps-dev): bump @types/node from 25.0.10 to 25.2.0 in #2776 - Thanks @dependabot[bot]!
  • chore(deps-dev): bump @types/node from 25.2.0 to 25.2.2 in #2782 - Thanks @dependabot[bot]!
  • chore(deps-dev): bump @types/node from 25.2.2 to 25.2.3 in #2792 - Thanks @dependabot[bot]!
  • chore(deps-dev): bump @types/node from 25.2.3 to 25.3.0 in #2798 - Thanks @dependabot[bot]!
  • chore(deps-dev): bump @types/node from 25.3.0 to 25.3.3 in #2805 - Thanks @dependabot[bot]!
</details> <details> <summary>Examples</summary>
  • chore(deps): update @slack/bolt requirement from ^4.5.0 to ^4.6.0 in /examples/socket-mode-oauth in #2716 - Thanks @dependabot[bot]!
  • chore(deps): update @slack/bolt requirement from ^4.5.0 to ^4.6.0 in /examples/deploy-aws-lambda in #2709 - Thanks @dependabot[bot]!
  • chore(deps): update @slack/bolt requirement from ^4.5.0 to ^4.6.0 in /examples/deploy-heroku in #2710 - Thanks @dependabot[bot]!
  • chore(deps): update @slack/bolt requirement from ^4.5.0 to ^4.6.0 in /examples/getting-started-typescript in #2711 - Thanks @dependabot[bot]!
  • chore(deps): update @slack/bolt requirement from ^4.5.0 to ^4.6.0 in /examples/message-metadata in #2712 - Thanks @dependabot[bot]!
  • chore(deps): update @slack/bolt requirement from ^4.5.0 to ^4.6.0 in /examples/oauth in #2713 - Thanks @dependabot[bot]!
  • chore(deps): update @slack/bolt requirement from ^4.5.0 to ^4.6.0 in /examples/oauth-express-receiver in #2714 - Thanks @dependabot[bot]!
  • chore(deps): update @slack/bolt requirement from ^4.5.0 to ^4.6.0 in /examples/socket-mode in #2715 - Thanks @dependabot[bot]!
  • chore(deps): bump @koa/router from 14.0.0 to 15.0.0 in /examples/custom-receiver in #2733 - Thanks @dependabot[bot]!
  • chore(deps): bump @koa/router from 15.0.0 to 15.3.1 in /examples/custom-receiver in #2812 - Thanks @dependabot[bot]!
  • chore(deps): bump @koa/router from 15.3.1 to 15.4.0 in /examples/custom-receiver in #2824 - Thanks @dependabot[bot]!
  • chore(deps): bump @slack/oauth from 3.0.4 to 3.0.5 in /examples/custom-receiver in #2823 - Thanks @dependabot[bot]!
  • chore(deps): bump ajv from 8.17.1 to 8.18.0 in /examples/custom-receiver in #2797 - Thanks @dependabot[bot]!
  • chore(deps): bump axios from 1.13.2 to 1.13.5 in /examples/custom-receiver in #2785 - Thanks @dependabot[bot]!
  • chore(deps): bump dotenv from 17.2.3 to 17.2.4 in /examples/custom-receiver in #2784 - Thanks @dependabot[bot]!
  • chore(deps): bump dotenv from 17.2.4 to 17.3.1 in /examples/custom-receiver in #2793 - Thanks @dependabot[bot]!
  • chore(deps): bump dotenv from 17.3.1 to 17.4.0 in /examples/custom-receiver in #2845 - Thanks @dependabot[bot]!
  • chore(deps): bump fastify from 5.6.2 to 5.7.1 in /examples/custom-receiver in #2764 - Thanks @dependabot[bot]!
  • chore(deps): bump fastify from 5.7.1 to 5.7.2 in /examples/custom-receiver in #2770 - Thanks @dependabot[bot]!
  • chore(deps): bump fastify from 5.7.2 to 5.7.4 in /examples/custom-receiver in #2777 - Thanks @dependabot[bot]!
  • chore(deps): bump fastify from 5.7.4 to 5.8.1 in /examples/custom-receiver in #2810 - Thanks @dependabot[bot]!
  • chore(deps): bump fastify from 5.8.1 to 5.8.2 in /examples/custom-receiver in #2821 - Thanks @dependabot[bot]!
  • chore(deps): bump fastify from 5.8.2 to 5.8.3 in /examples/custom-receiver in #2829 - Thanks @dependabot[bot]!
  • chore(deps): bump fastify from 5.8.3 to 5.8.4 in /examples/custom-receiver in #2837 - Thanks @dependabot[bot]!
  • chore(deps): bump koa from 3.1.1 to 3.1.2 in /examples/custom-receiver in #2803 - Thanks @dependabot[bot]!
  • chore(deps): bump koa from 3.1.1 to 3.1.2 in /examples/custom-receiver in #2809 - Thanks @dependabot[bot]!
  • chore(deps): bump koa from 3.1.2 to 3.2.0 in /examples/custom-receiver in #2846 - Thanks @dependabot[bot]!
  • chore(deps): bump path-to-regexp from 8.3.0 to 8.4.0 in /examples/custom-receiver in #2842 - Thanks @dependabot[bot]!
  • chore(deps): bump qs from 6.14.0 to 6.14.1 in /examples/custom-receiver in #2759 - Thanks @dependabot[bot]!
  • chore(deps): bump qs from 6.14.1 to 6.14.2 in /examples/custom-receiver in #2787 - Thanks @dependabot[bot]!
  • chore(deps-dev): bump @types/node from 24.10.4 to 25.0.3 in /examples/custom-receiver in #2748 - Thanks @dependabot[bot]!
  • chore(deps-dev): bump @types/node from 25.0.6 to 25.0.9 in /examples/custom-receiver in #2763 - Thanks @dependabot[bot]!
  • chore(deps-dev): bump @types/node from 25.0.9 to 25.0.10 in /examples/custom-receiver in #2771 - Thanks @dependabot[bot]!
  • chore(deps-dev): bump @types/node from 25.0.10 to 25.2.0 in /examples/custom-receiver in #2778 - Thanks @dependabot[bot]!
  • chore(deps-dev): bump @types/node from 25.2.0 to 25.2.2 in /examples/custom-receiver in #2783 - Thanks @dependabot[bot]!
  • chore(deps-dev): bump @types/node from 25.2.2 to 25.2.3 in /examples/custom-receiver in #2794 - Thanks @dependabot[bot]!
  • chore(deps-dev): bump @types/node from 25.2.3 to 25.3.0 in /examples/custom-receiver in #2799 - Thanks @dependabot[bot]!
  • chore(deps-dev): bump @types/node from 25.3.2 to 25.3.3 in /examples/custom-receiver in #2806 - Thanks @dependabot[bot]!
  • chore(deps-dev): bump @types/node from 22.19.11 to 22.19.13 in /examples/custom-receiver in #2808 - Thanks @dependabot[bot]!
  • chore(deps-dev): bump @types/node from 22.19.13 to 22.19.15 in /examples/custom-receiver in #2811 - Thanks @dependabot[bot]!
  • chore(deps-dev): bump @types/node from 22.19.15 to 24.12.0 in /examples/custom-receiver in #2836 - Thanks @dependabot[bot]!
  • chore(deps-dev): bump @types/node from 24.12.0 to 24.12.2 in /examples/custom-receiver in #2844 - Thanks @dependabot[bot]!
  • chore(deps-dev): bump @types/koa from 3.0.1 to 3.0.2 in /examples/custom-receiver in #2825 - Thanks @dependabot[bot]!
  • chore(deps-dev): bump @types/node from 24.10.4 to 25.0.3 in /examples/getting-started-typescript in #2750 - Thanks @dependabot[bot]!
  • chore(deps-dev): bump typescript from 5.9.3 to 6.0.2 in /examples/getting-started-typescript in #2839 - Thanks @dependabot[bot]!
  • chore(deps-dev): bump typescript from 5.9.3 to 6.0.2 in /examples/custom-receiver in #2838 - Thanks @dependabot[bot]!
  • chore(deps-dev): update @tsconfig/node18 requirement from ^18.2.4 to ^18.2.5 in /examples/getting-started-typescript in #2721 - Thanks @dependabot[bot]!
  • chore(deps-dev): update @tsconfig/node18 requirement from ^18.2.5 to ^18.2.6 in /examples/getting-started-typescript in #2726 - Thanks @dependabot[bot]!
  • chore(deps-dev): update serverless requirement from ^4.22.0 to ^4.23.0 in /examples/deploy-aws-lambda in #2717 - Thanks @dependabot[bot]!
  • chore(deps-dev): update serverless requirement from ^4.23.0 to ^4.25.0 in /examples/deploy-aws-lambda in #2725 - Thanks @dependabot[bot]!
  • chore(deps-dev): update serverless requirement from ^4.25.0 to ^4.27.0 in /examples/deploy-aws-lambda in #2734 - Thanks @dependabot[bot]!
  • chore(deps-dev): update serverless requirement from ^4.27.0 to ^4.28.0 in /examples/deploy-aws-lambda in #2741 - Thanks @dependabot[bot]!
  • chore(deps-dev): update serverless requirement from ^4.28.0 to ^4.29.0 in /examples/deploy-aws-lambda in #2749 - Thanks @dependabot[bot]!
  • chore(deps-dev): update serverless requirement from ^4.30.0 to ^4.31.0 in /examples/deploy-aws-lambda in #2765 - Thanks @dependabot[bot]!
  • chore(deps-dev): update serverless requirement from ^4.31.0 to ^4.31.2 in /examples/deploy-aws-lambda in #2779 - Thanks @dependabot[bot]!
  • chore(deps-dev): update serverless requirement from ^4.31.2 to ^4.32.0 in /examples/deploy-aws-lambda in #2795 - Thanks @dependabot[bot]!
  • chore(deps-dev): update serverless requirement from ^4.32.0 to ^4.33.0 in /examples/deploy-aws-lambda in #2800 - Thanks @dependabot[bot]!
  • chore(deps-dev): update serverless requirement from ^4.33.0 to ^4.33.3 in /examples/deploy-aws-lambda in #2847 - Thanks @dependabot[bot]!
  • chore(deps-dev): update serverless-offline requirement from ^14.4.0 to ^14.5.0 in /examples/deploy-aws-lambda in #2807 - Thanks @dependabot[bot]!
</details>

👋 New Contributors 🎉

Full Changelog: https://github.com/slackapi/bolt-js/compare/@slack/bolt@4.6.0...@slack/bolt@4.7.0 Milestone: https://github.com/slackapi/bolt-js/milestone/61 Package: https://www.npmjs.com/package/@slack/bolt/v/4.7.0

Oct 28, 2025

📚 Changelog

What's Changed

👾 Enhancements

🐛 Bug fixes

📚 Documentation

🤖 Dependencies

🧰 Maintenance

Milestone: https://github.com/slackapi/bolt-js/milestone/60?closed=1 Full Changelog: https://github.com/slackapi/bolt-js/compare/@slack/bolt@4.5.0...@slack/bolt@4.6.0 Package: https://www.npmjs.com/package/@slack/bolt/v/4.6.0

Oct 7, 2025

AI-Enabled Features: Loading States, Text Streaming, and Feedback Buttons

🍿 Preview

https://github.com/user-attachments/assets/bc16597b-1632-46bb-b7aa-fe22330daf84

📚 Changelog

⚡ Getting Started

Try the AI Agent Sample app to explore the AI-enabled features and existing Assistant helper:

# Create a new AI Agent app
$ slack create slack-ai-agent-app --template slack-samples/bolt-js-assistant-template
$ cd slack-ai-agent-app/

# Add your OPENAI_API_KEY
$ export OPENAI_API_KEY=sk-proj-ahM...

# Run the local dev server
$ slack run

After the app starts, send a message to the "slack-ai-agent-app" bot for a unique response.

⌛ Loading States

Loading states allows you to not only set the status (e.g. "My app is typing...") but also sprinkle some personality by cycling through a collection of loading messages:

Web Client SDK:

app.event('message', async ({ client, context, event, logger }) => {
    // ...
    await client.assistant.threads.setStatus({
        channel_id: channelId,
        thread_ts: threadTs,
        status: 'thinking...',
        loading_messages: [
            'Teaching the hamsters to type faster…',
            'Untangling the internet cables…',
            'Consulting the office goldfish…',
            'Polishing up the response just for you…',
            'Convincing the AI to stop overthinking…',
        ],
    });

    // Start a new message stream
});

Assistant Class:

const assistant = new Assistant({
    threadStarted: assistantThreadStarted,
    threadContextChanged: assistantThreadContextChanged,
    userMessage: async ({ client, context, logger, message, getThreadContext, say, setTitle, setStatus }) => {
        await setStatus({
            status: 'thinking...',
            loading_messages: [
                'Teaching the hamsters to type faster…',
                'Untangling the internet cables…',
                'Consulting the office goldfish…',
                'Polishing up the response just for you…',
                'Convincing the AI to stop overthinking…',
            ],
        });
    },
});

🔮 Text Streaming Helper

The client.chatStream() helper utility can be used to streamline calling the 3 text streaming methods:

app.event('message', async ({ client, context, event, logger }) => {
    // ...

    // Start a new message stream
    const streamer = client.chatStream({
        channel: channelId,
        recipient_team_id: teamId,
        recipient_user_id: userId,
        thread_ts: threadTs,
    });

    // Loop over OpenAI response stream
    // https://platform.openai.com/docs/api-reference/responses/create
    for await (const chunk of llmResponse) {
        if (chunk.type === 'response.output_text.delta') {
            await streamer.append({
                markdown_text: chunk.delta,
            });
        }
    }

    // Stop the stream and attach feedback buttons
    await streamer.stop({ blocks: [feedbackBlock] });
});

🔠 Text Streaming Methods

Alternative to the Text Streaming Helper is to call the individual methods.

1) client.chat.startStream

First, start a chat text stream to stream a response to any message:

app.event('message', async ({ client, context, event, logger }) => {
    // ...
    const streamResponse = await client.chat.startStream({
        channel: channelId,
        recipient_team_id: teamId,
        recipient_user_id: userId,
        thread_ts: threadTs,
    });

    const streamTs = streamResponse.ts

2) client.chat.appendStream

After starting a chat text stream, you can then append text to it in chunks (often from your favourite LLM SDK) to convey a streaming effect:

for await (const chunk of llmResponse) {
    if (chunk.type === 'response.output_text.delta') {
        await client.chat.appendSteam({
            channel: channelId,
            markdown_text: chunk.delta,
            ts: streamTs,
        });
    }
}

3) client.chat.stopStream

Lastly, you can stop the chat text stream to finalize your message:

await client.chat.stopStream({
    blocks: [feedbackBlock],
    channel: channelId,
    ts: streamTs,
});

👍🏻 Feedback Buttons

Add feedback buttons to the bottom of a message, after stopping a text stream, to gather user feedback:

const feedbackBlock = {
    type: 'context_actions',
    elements: [{
        type: 'feedback_buttons',
        action_id: 'feedback',
        positive_button: {
            text: { type: 'plain_text', text: 'Good Response' },
            accessibility_label: 'Submit positive feedback on this response',
            value: 'good-feedback',
        },
        negative_button: {
            text: { type: 'plain_text', text: 'Bad Response' },
            accessibility_label: 'Submit negative feedback on this response',
            value: 'bad-feedback',
        },
    }],
};

// Using the Text Streaming Helper
await streamer.stop({ blocks: [feedbackBlock] });
// Or, using the Text Streaming Method
await client.chat.stopStream({
    blocks: [feedbackBlock],
    channel: channelId,
    ts: streamTs,
});

What's Changed

👾 Enhancements

🐛 Bug fixes

📚 Documentation

🤖 Dependencies

🧰 Maintaince

New Contributors 🎉

Milestone: https://github.com/slackapi/bolt-js/milestone/59?closed=1 Full Changelog: https://github.com/slackapi/bolt-js/compare/@slack/bolt@4.4.0...@slack/bolt@4.5.0 Package: https://www.npmjs.com/package/@slack/bolt/v/4.5.0

May 20, 2025

What's Changed

🚀 Features

🐛 Fixes

🧰 Maintenance

🤖 Dependencies

Full Changelog: https://github.com/slackapi/bolt-js/compare/@slack/bolt@4.3.0...@slack/bolt@4.4.0 Milstone: https://github.com/slackapi/bolt-js/milestone/58?closed=1

May 7, 2025

What's Changed

🐛 Fixes

📚 Documentation

🧰 Maintenance

🤖 Dependencies

Thank you to all our lovely contributors ✨

Full Changelog: https://github.com/slackapi/bolt-js/compare/@slack/bolt@4.2.1...@slack/bolt@4.3.0

Feb 28, 2025

What's Changed

🐛 Fixes

📚 Documentation

🧰 Maintenance

🤖 Dependencies

docs

examples

New Contributors

Full Changelog: https://github.com/slackapi/bolt-js/compare/@slack/bolt@4.2.0...@slack/bolt@4.2.1

Dec 17, 2024

What's Changed

Hello! 👋 This release updates dependencies to keep packages secure and makes the logger of your app public for use outside of event listeners when using TypeScript! 🔐 🌲

const app = new App({ ... });

(async () => {
  await app.start(process.env.PORT || 3000);
  app.logger.info('⚡️ Bolt app is running!'); // The app logger can now be used here!
})();

🎁 Enhancements

🔐 Security

📚 Documentation

🧰 Maintenance

🤖 Dependencies

Full Changelog: https://github.com/slackapi/bolt-js/compare/@slack/bolt@4.1.1...@slack/bolt@4.2.0

Nov 26, 2024

What's Changed

This pre-release contains the proposed socket-mode library fix addressing runaway connection spawning spiral behaviour observed in https://github.com/slackapi/node-slack-sdk/issues/2094 and fixed in https://github.com/slackapi/node-slack-sdk/issues/2099.

Developers wishing to evaluate the fix for their app may try out this pre-release.

Full Changelog: https://github.com/slackapi/bolt-js/compare/@slack/bolt@4.1.1...@slack/bolt@4.1.2-rc.1

What's Changed

  • 🏭 A fix related to the TypeScript types for the Assistant handler utilities. Fixes #2319 in #2325, thanks @misscoded!
  • 📚 Our bolt-js online documentation at https://tools.slack.dev/bolt-js/ received many updates. Thanks to @lukegalbraithrussell, @haleychaas and @kuredev!

Changelog

New Contributors

Full Changelog: https://github.com/slackapi/bolt-js/compare/@slack/bolt@4.1.0...@slack/bolt@4.1.1

Nov 1, 2024

What's Changed

Full Changelog: https://github.com/slackapi/bolt-js/compare/@slack/bolt@4.0.1...@slack/bolt@4.1.0

Oct 22, 2024

What's Changed

Full Changelog: https://github.com/slackapi/bolt-js/compare/@slack/bolt@4.0.0...@slack/bolt@4.0.1

Oct 17, 2024

Bolt v4

What's Changed

New Features

Support for Agents & Assistants is now available!

Bolt now offers a simple and intuitive way to create an Agent/Assistant using the new Assistant class. Simply include the required callbacks and add the assistant to your App instance. Get up and running even quicker with a working, out-of-the-box example that utilizes OpenAI here.

Breaking Changes

We have prepared a migration guide to help BoltJS consumers migrate their Bolt v3 apps to v4.

While a few breaking changes were introduced, we don't expect a majority of bolt v3 users to require changing their apps to upgrade to v4. More complex apps may need a few tweaks. TL;DR is: if your bolt v3 app is built with TypeScript, or uses the ExpressReceiver or the AwsLambdaReceiver, or your app used previously-deprecated types or functions, best to read the migration guide.

Middleware Type Changes

In bolt we have a set of Slack*MiddlewareArgs types: for events, shortcuts, commands, and so on. They 'wrap' the underlying event payloads with additional middleware-relevant bits like a next() method, a context object for devs to augment, and so on.

Many of these types, for example the SlackEventMiddlewareArgs type, previously used a conditional to sometimes define particular additional helper utilities on the middleware arguments. For example, the say utility, or tacking on a convenience message property for message-event-related payloads. This was problematic in practice in TypeScript situations, not just internally (this change fixes https://github.com/slackapi/bolt-js/issues/2135) within the bolt codebase but for developers as well: when the payload was not of a type that required the extra utility, these properties would be required to exist on the middleware arguments but have a value of undefined. Those of us trying to build generic middleware utilities would have to deal with TS compilation errors and needing to liberally type-cast to avoid these conditional mismatches with undefined.

Instead, these MiddlewareArgs types now conditionally create a type intersection when appropriate in order to provide this conditional-utility-extension mechanism. In practice that looks something like:

type SomeMiddlewareArgs<EventType extends string = string> = {
  // some type in here
} & (EventType extends 'message'
  // If this is a message event, add a `message` property
  ? { message: EventFromType<EventType> }
  : unknown
)

With the above, now when a message payload is wrapped up into middleware arguments, it will contain an appropriate message property, whereas a non-message payload will be intersected with unknown - effectively a type "noop." No more e.g. say: undefined or message: undefined to deal with!

Other Breaking Changes

  • drops node v14 and v16 (are now EOL'ed)
  • express to v4->v5; ExpressReceiver users will be exposed to express v4 -> v5 breaking changes - fixes #2242
  • upgrades to @slack/socket-mode v2; SocketModeReceiver users who have attached custom event listeners to the public socketModeClient directly should read the v1 -> v2 migration guide in case the major upgrade could affect them - fixes #2225
  • upgrades @slack/web-api v7; all users should read the web-api v6->v7 migration guide to see what the scope of breaking changes the client within listeners is affected by
  • removed exported type: KnownKeys
  • @slack/types now exist under a named export types.
  • removed the SocketModeFunctions class that had a single static method on it and instead directly exposed the defaultProcessEventErrorHandler method from it.
  • the built-in middleware functions ignoreSelf and directMention now no longer must be invoked as a method in order to return middleware; instead they are middleware to be used directly. this lines up the API for these built-in middlewares to match the other builtins.
  • AWSReceiver's AwsEvent interface now models event payloads a bit differently; we now properly model AWS API Gateway v1 and v2 payloads separately - fixes #2272
  • remove deprecated methods/modules/properties:
    • OptionsRequest interface
    • authed_users and authed_teams from event payload envelope
    • render-html-for-install-path module
    • verify and VerifyOptions from the verify-request module
    • src/receivers/http-utils.ts module

Non-breaking Changes

  • expose the bundled @slack/web-api dependency under the webApi named export
  • fixed an issue in AwsLambdaReceiver where apps with no registered handlers that processed an incoming event would still log out an error related to not acknowledging the request in time - fixes #2284
  • dependency updates:
    • upgrades raw-body to v3
    • upgrades @slack/oauth to v3
    • removes promise.allsettled since that is natively supported in node since v14
    • moves @types/tsscmp to dev dependencies since that is not exposed to developers

Changelog

Full Changelog: https://github.com/slackapi/bolt-js/compare/@slack/bolt@3.22.0...@slack/bolt@4.0.0

Oct 9, 2024

Bolt v4 Release Candidate 4

A lot! We have prepared a migration guide to help bolt-js consumers migrate their bolt v3 apps to v4.

What's Changed

Breaking Changes

Middleware Type Changes

In bolt we have a set of Slack*MiddlewareArgs types: for events, shortcuts, commands, and so on. They 'wrap' the underlying event payloads with additional middleware-relevant bits like a next() method, a context object for devs to augment, and so on.

Many of these types, for example the SlackEventMiddlewareArgs type, previously used a conditional to sometimes define particular additional helper utilities on the middleware arguments. For example, the say utility, or tacking on a convenience message property for message-event-related payloads. This was problematic in practice in TypeScript situations, not just internally (this change fixes https://github.com/slackapi/bolt-js/issues/2135) within the bolt codebase but for developers as well: when the payload was not of a type that required the extra utility, these properties would be required to exist on the middleware arguments but have a value of undefined. Those of us trying to build generic middleware utilities would have to deal with TS compilation errors and needing to liberally type-cast to avoid these conditional mismatches with undefined.

Instead, these MiddlewareArgs types now conditionally create a type intersection when appropriate in order to provide this conditional-utility-extension mechanism. In practice that looks something like:

type SomeMiddlewareArgs<EventType extends string = string> = {
  // some type in here
} & (EventType extends 'message'
  // If this is a message event, add a `message` property
  ? { message: EventFromType<EventType> }
  : unknown
)

With the above, now when a message payload is wrapped up into middleware arguments, it will contain an appropriate message property, whereas a non-message payload will be intersected with unknown - effectively a type "noop." No more e.g. say: undefined or message: undefined to deal with!

Other Breaking Changes

  • drops node v14 and v16 (are now EOL'ed)
  • express to v4->v5; ExpressReceiver users will be exposed to express v4 -> v5 breaking changes
    • fixes #2242
  • upgrades to @slack/socket-mode v2; SocketModeReceiver users who have attached custom event listeners to the public socketModeClient directly should read the v1 -> v2 migration guide in case the major upgrade could affect them
    • fixes #2225
  • upgrades @slack/web-api v7; all users should read the web-api v6->v7 migration guide to see what the scope of breaking changes the client within listeners is affected by
  • removed exported type: KnownKeys
  • @slack/types now exist under a named export types.
  • removed the SocketModeFunctions class that had a single static method on it and instead directly exposed the defaultProcessEventErrorHandler method from it.
  • the built-in middleware functions ignoreSelf and directMention now no longer must be invoked as a method in order to return middleware; instead they are middleware to be used directly. this lines up the API for these built-in middlewares to match the other builtins.
  • AWSReceiver's AwsEvent interface now models event payloads a bit differently; we now properly model AWS API Gateway v1 and v2 payloads separately.
    • This resolves #2272
  • remove deprecated methods/modules/properties:
    • OptionsRequest interface
    • authed_users and authed_teams from event payload envelope
    • render-html-for-install-path module
    • verify and VerifyOptions from the verify-request module
    • src/receivers/http-utils.ts module

Non-breaking Changes

  • expose the bundled @slack/web-api dependency under the webApi named export
  • fixed an issue in AwsLambdaReceiver where apps with no registered handlers that processed an incoming event would still log out an error related to not acknowledging the request in time. Resolves #2284
  • dependency updates:
    • upgrades raw-body to v3
    • upgrades @slack/oauth to v3
    • removes promise.allsettled since that is natively supported in node since v14
    • moves @types/tsscmp to dev dependencies since that is not exposed to developers
Oct 8, 2024

Bolt v4 Release Candidate 3

A lot! We have prepared a migration guide to help bolt-js consumers migrate their bolt v3 apps to v4.

What's Changed

Breaking Changes

Middleware Type Changes

In bolt we have a set of Slack*MiddlewareArgs types: for events, shortcuts, commands, and so on. They 'wrap' the underlying event payloads with additional middleware-relevant bits like a next() method, a context object for devs to augment, and so on.

Many of these types, for example the SlackEventMiddlewareArgs type, previously used a conditional to sometimes define particular additional helper utilities on the middleware arguments. For example, the say utility, or tacking on a convenience message property for message-event-related payloads. This was problematic in practice in TypeScript situations, not just internally (this change fixes https://github.com/slackapi/bolt-js/issues/2135) within the bolt codebase but for developers as well: when the payload was not of a type that required the extra utility, these properties would be required to exist on the middleware arguments but have a value of undefined. Those of us trying to build generic middleware utilities would have to deal with TS compilation errors and needing to liberally type-cast to avoid these conditional mismatches with undefined.

Instead, these MiddlewareArgs types now conditionally create a type intersection when appropriate in order to provide this conditional-utility-extension mechanism. In practice that looks something like:

type SomeMiddlewareArgs<EventType extends string = string> = {
  // some type in here
} & (EventType extends 'message'
  // If this is a message event, add a `message` property
  ? { message: EventFromType<EventType> }
  : unknown
)

With the above, now when a message payload is wrapped up into middleware arguments, it will contain an appropriate message property, whereas a non-message payload will be intersected with unknown - effectively a type "noop." No more e.g. say: undefined or message: undefined to deal with!

Other Breaking Changes

  • drops node v14 and v16 (are now EOL'ed)
  • express to v4->v5; ExpressReceiver users will be exposed to express v4 -> v5 breaking changes
    • fixes #2242
  • upgrades to @slack/socket-mode v2; SocketModeReceiver users who have attached custom event listeners to the public socketModeClient directly should read the v1 -> v2 migration guide in case the major upgrade could affect them
    • fixes #2225
  • upgrades @slack/web-api v7; all users should read the web-api v6->v7 migration guide to see what the scope of breaking changes the client within listeners is affected by
  • removed exported type: KnownKeys
  • @slack/types now exist under a named export types.
  • removed the SocketModeFunctions class that had a single static method on it and instead directly exposed the defaultProcessEventErrorHandler method from it.
  • the built-in middleware functions ignoreSelf and directMention now no longer must be invoked as a method in order to return middleware; instead they are middleware to be used directly. this lines up the API for these built-in middlewares to match the other builtins.
  • AWSReceiver's AwsEvent interface now models event payloads a bit differently; we now properly model AWS API Gateway v1 and v2 payloads separately.
    • This resolves #2272
  • remove deprecated methods/modules/properties:
    • OptionsRequest interface
    • authed_users and authed_teams from event payload envelope
    • render-html-for-install-path module
    • verify and VerifyOptions from the verify-request module
    • src/receivers/http-utils.ts module

Non-breaking Changes

  • expose the bundled @slack/web-api dependency under the webApi named export
  • dependency updates:
    • upgrades raw-body to v3
    • upgrades @slack/oauth to v3
    • removes promise.allsettled since that is natively supported in node since v14
    • moves @types/tsscmp to dev dependencies since that is not exposed to developers
Sep 27, 2024

What's new

This release adds support for the assistant.threads.* API methods introduced in @slack/web-api@6.13.0 🤖 as well as improvements to documentation at the new https://tools.slack.dev/bolt-js site and patches to dependencies 🔒

Example usage

More details about these endpoints can be discovered in the documentation, and listeners can be added to code to respond to incoming events like so:


app.event('assistant_thread_started', async ({ client, event, logger }) => {
  logger.info('A new thread started');
  logger.debug(event);
  const now = new Date();
  const title = await client.assistant.threads.setTitle({
    title: `Chats from ${now.toISOString()}`,
    channel_id: event.assistant_thread.channel_id,
    thread_ts: event.assistant_thread.thread_ts,
  });
  logger.debug(title);
  const suggestions = await client.assistant.threads.setSuggestedPrompts({
    channel_id: event.assistant_thread.channel_id,
    thread_ts: event.assistant_thread.thread_ts,
    title: 'Ask the computer for answers',
    prompts: [
      {
        title: 'Find the time',
        message: `What happens at ${Math.floor(now.getTime() / 1000)}`,
      },
    ],
  });
  logger.debug(suggestions);
});

app.event('assistant_thread_context_changed', async ({ client, event, logger }) => {
  logger.info('The channel of focus changed');
  logger.debug(event);
  const response = client.chat.postMessage({
    thread_ts: event.assistant_thread.thread_ts,
    channel: event.assistant_thread.channel_id,
    text: `Now visiting <#${event.assistant_thread.context.channel_id}>`,
  });
  logger.debug(response);
});

app.message(async ({ client, message, logger }) => {
  logger.info('A new message was received');
  logger.debug(message);
  if (message.subtype === 'message_changed' || message.subtype === 'message_deleted') {
    return;
  }
  const status = await client.assistant.threads.setStatus({
    channel_id: message.channel,
    thread_ts: message.thread_ts,
    status: 'is thinking...',
  });
  logger.debug(status);
  /**
    * Actual response generation could happen here!
    */
  setTimeout(async () => {
    const response = await client.chat.postMessage({
      channel: message.channel,
      thread_ts: message.thread_ts,
      text: 'How insightful!',
    });
    logger.debug(response);
  }, 3000);
});

Changes

📚 Documentation

📦 Dependencies

🎉 New contributors

Full Changelog: https://github.com/slackapi/bolt-js/compare/@slack/bolt@3.21.4...@slack/bolt@3.22.0

Sep 11, 2024

What's Changed

Full Changelog: https://github.com/slackapi/bolt-js/compare/@slack/bolt@3.21.3...@slack/bolt@3.21.4

What's Changed

Woops! We (coughfilmajcough) removed the EnvelopedEvent export in a recent change. We are adding it back in in this patch release. Please accept our sincere apologies for this temporary breaking change in bolt 3.21.2.

Changelog

New Contributors

Full Changelog: https://github.com/slackapi/bolt-js/compare/@slack/bolt@3.21.2...@slack/bolt@3.21.3

Sep 6, 2024

What's Changed

The main change in this patch release is creating an npm release for the change in #2223, where exported event payload types were moved from bolt-js to @slack/types. If you see errors compiling your TypeScript-based application that look like:

Module './types' has already exported a member

.. then upgrading to this release should address the issue (see #2233 and #2234 for issue details).

Full Changelog: https://github.com/slackapi/bolt-js/compare/@slack/bolt@3.21.1...@slack/bolt@3.21.2

Aug 16, 2024

What's Changed

This patch release brings improvements to documentation and sureness in our CI, as well as security updates to certain @slack packages - see CVE-2024-39338 and axios@1.7.4 for more details!

Changes

📚 Documentation

🔒 Security

🧰 Maintenance

Full Changelog: https://github.com/slackapi/bolt-js/compare/@slack/bolt@3.21.0...@slack/bolt@3.21.1

Aug 14, 2024

What's Changed

Bolt-JS now supports Custom Steps! That's right, your trusty Bolt app now let's you expose Custom Steps in Bolt, allowing you to provide steps for use in Workflow Builder.

You can now use the new function() method to register handlers for the function_executed event. Check out our API docs on the topic to get started.

Changelog

New Contributors

Full Changelog: https://github.com/slackapi/bolt-js/compare/@slack/bolt@3.20.0...@slack/bolt@3.21.0

Previous123Next
Latest
@slack/bolt@4.7.0
Tracking Since
Apr 24, 2019
Last fetched Apr 19, 2026