Commit activity
Last 12 weeks · 207 commits
Community health
5 of 6 standards met
Recent PRs & issues
Summary Adds to the Slack adapter, the same mention decision it uses for Documents as a contract any adapter can implement from its own webhook entry point, so routers get one name and one meaning across platforms Webhook routers built on can make that decision without loading the adapter or reimplementing it No behavior change for the adapter Problem Slack sends an event for the bot's `textmessage.isMentiontextapp_mentionprotectedapp_mentionisBotMentionSlackAdapter.detectSelfMention@chat-adapter/slack/webhook@chat-adapter/slack@chat-adapter/shared/mentionspayload.rawSlackEventbotUserIdauth.testuser_idsrc/index.tssrc/mention.tssrc/event.tsmaskCodeSpans@chat-adapter/shared/mentions@chat-adapter/sharedmentions.tsapp_mentionsample-messages.mdparseSlackWebhookBodyisBotMentionparseMessage(...).isMentionusersectionisBotMention(event, botUserId) => booleanparseMessageisMentionisBotMentionedsrc/index.tssrc/index.tssrc/event.tssrc/mention.tsexportisBotMentionsrc/mention.ts/webhook@chat-adapter/shared/mentionsisBotMentionSlackEventRecordpayload.rawSlackAppMentionPayload | SlackDirectMessagePayloadSlackEvent`.
Bug description If someone outside clicks Approve on a card, the real approver can't approve anymore. Their Approve click does nothing. They can still click Deny, or wait for the timeout. Non-approvers still can't approve, but one stray click from them is enough to block the approval. Steps to reproduce 1. Call . 2. clicks Approve. She gets the "isn't authorized" notice, as expected. 3. clicks Approve. Expected behavior Step 3 approves. Actual behavior Alice's click never reaches the workflow webhook, so the workflow keeps waiting. Deny still works because it has its own token. Cause The card's Approve and Deny buttons are buttons (approval-card.ts#L63-L69). Each button's token is single use: deletes it on the first click from anyone (callback-url.ts#L177). The check only runs later, inside , after that click has already been POSTed to the webhook (workflow/index.ts#L174). By the time Alice clicks, the Approve token is gone, returns , and nothing is forwarded (chat.ts#L1930). The existing test "ignores clicks from users outside approvers and posts a notice" (approval.test.ts#L234) misses this for two reasons. It emits clicks straight to the webhook, so never runs, and the approver clicks Deny rather than the button Mallory used. One possible fix: keep approval tokens alive until runs, or check the approver list before a token is consumed. Code sample I reproduced it with the real Slack adapter against a local fake of the Slack API, sending signed payloads. To isolate the token step, I used two plain buttons, the same buttons builds, instead of running inside a workflow runtime: Environment Chat SDK 4.43.0 ( at 7c351d2 has the same code), Node.js 24.21.0, Slack adapter, Linux.
What happens With native streaming and structured chunks (for example Mastra's , which streams /), the reply's text never shows up in the final Slack message. The message ends with and only the plan/task blocks, even though notifications briefly showed the text. Cause Once a stream has received through , Slack rejects later appends that use the parameter with . (4.42.0 and 4.43.0) always sends text deltas as in , including after has appended . No warning is logged on our side, and the text is lost. Reproduction (Slack Web API, bot token) 1. → ok 2. → ok 3. → **** 4. → ok; the message has only a block. Replacing step 3 with works: the final message has + . Suggested fix Once a segment has appended structured chunks, send text deltas as instead of the parameter (or always use chunk mode when structured chunks are enabled). Versions 4.42.0 (4.43.0 has the same ), 4.42.0, Node 26.
Repository: vercel/chat. Description: Universal chat layer for building bots and agents. Stars: 2415, Forks: 334. Primary language: TypeScript. Languages: TypeScript (88.9%), MDX (11%), CSS (0.1%), JavaScript (0%). License: MIT. Homepage: https://chat-sdk.dev/ Topics: ai, chat, discord, google-chat, slack, teams, vercel. Latest release: @chat-adapter/gitlab@4.43.0 (22h ago). Open PRs: 16, open issues: 19. Last activity: 1h ago. Community health: 87%. Top contributors: cramforce, haydenbleasel, bensabic, dancer, github-actions[bot], dependabot[bot], nandorojo, visyat, onmax, roboeve[bot] and others.