Skip to content

Update dependency @slack/bolt to v5#222

Open
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/slack-bolt-5.x
Open

Update dependency @slack/bolt to v5#222
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/slack-bolt-5.x

Conversation

@renovate

@renovate renovate Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

ℹ️ Note

This PR body was truncated due to platform limits.

This PR contains the following updates:

Package Change Age Confidence
@slack/bolt (source) ^3.12.1^5.0.0 age confidence

Release Notes

slackapi/bolt-js (@​slack/bolt)

v5.0.0

Compare Source

Major Changes
  • d284e69: Drop Node.js 18 support. The minimum required runtime is now Node.js 20 (npm >=9.6.4).

  • d284e69: Remove deprecated WorkflowStep class and all associated types, middleware, and utilities. Use CustomFunction and app.function() instead.

  • d284e69: Replace axios with native fetch for response_url calls. Remove agent and clientTls options from AppOptions — use clientOptions.fetch to provide a custom fetch implementation for proxy/TLS needs. Add a dispatcher option to SocketModeReceiver for proxy/TLS configuration in socket mode.

    respond() now throws a RespondError when the response_url request returns a non-2xx status (restoring the throw-on-failure behavior that axios provided) and resolves to a Response on success rather than an axios response object.

Minor Changes
  • d284e69: Improve error handling by leveraging @slack/web-api v8 error classes. Authorization errors are now properly wrapped in an AuthorizationError, preserving the original thrown value (non-Error rejections are retained via the cause of the wrapped original). Default error handlers log richer details for web-api errors (API error codes, rate limit durations, HTTP status codes) alongside the full error object, so stack traces and causes remain available. The @slack/web-api error classes (SlackError, WebAPIPlatformError, WebAPIRequestError, WebAPIHTTPError, WebAPIRateLimitedError) can be imported from @slack/web-api for instanceof checks.
Patch Changes
  • 9839a50: Pass the App's named bolt-app ConsoleLogger to the default receivers when no logger option is provided. Previously the App constructor built a named logger on this.logger but threaded the raw (potentially undefined) constructor argument into initReceiver, so HTTPReceiver / SocketModeReceiver each built their own anonymous logger and receiver-side log lines (e.g. unhandled HTTP requests on custom routes) appeared without the bolt-app prefix.

    Behaviour change for the no-logger case: the default receiver now shares the same Logger instance as app.logger, so a downstream app.logger.setLevel(...) after construction will affect receiver-side logging too. This is consistent with the existing behaviour that already mutates this.logger's level via the logLevel constructor option. Apps that supplied their own logger are unaffected; apps that relied on the receiver's logger being independent of app.logger will need to pass a separate logger into the receiver explicitly.

  • e1c21d7: Fix AwsLambdaReceiver.toHandler() so Bolt apps on the AWS Lambda Node.js 24+ runtime no longer fail at startup with Runtime.CallbackHandlerDeprecated. The returned handler is now a 2-arg promise-based function; the unused trailing callback parameter has been removed from the AwsHandler type. The legacy AwsCallback export is retained and marked @deprecated.

  • f2de079: Add context_team_id and context_enterprise_id as optional fields on the EnvelopedEvent type. Slack's Events API delivers these on the envelope for Slack Connect channels and Enterprise Grid org-wide apps, where team_id may refer to a workspace different from the one the bot is installed in. Without the typed fields, downstream code had to reach for @ts-expect-error or unsafe casts to route by the correct workspace.

v4.7.3

Compare Source

Patch Changes
  • 341b60e: Reject empty signingSecret at initialization to prevent accidental HMAC signature forgery.

v4.7.2

Compare Source

Patch Changes
  • 4545150: Require exact ssl_check=1 value to bypass signature verification, preventing truthy but incorrect values from skipping authentication checks.

v4.7.1

Compare Source

Patch Changes
  • a18c359: fix: correct InvalidCustomPropertyError code and MemoryStore promise handling

v4.7.0

Compare Source

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
🐛 Fixes
📚 Documentation
🧰 Maintenance
🎁 Dependencies
Core
CI
Dev
Examples

👋 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

v4.6.0

Compare Source

📚 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

v4.5.0

Compare Source

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

🍿 Preview
2025-10-06-loading-state-text-streaming-feedback.mov
📚 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
  • feat: add ai-enabled features text streaming methods, feedback blocks, and loading state in #​2674 - Thanks @​zimeg!
🐛 Bug fixes
  • Fix: allows Assistant say function to properly pass metadata in #​2569 - Thanks @​jamessimone!
  • refactor: check payload type before extracting assistant thread info in #​2603 - Thanks @​zimeg!
  • fix: better ES module support for App class in #​2632 - Thanks @​malewis5!
  • fix(typescript): accept empty list of suggested prompts for the assistant class in #​2650 - Thanks @​zimeg!
📚 Documentation
🤖 Dependencies

Note

PR body was truncated to here.


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants