Commit Graph

97 Commits

Author SHA1 Message Date
github-actions[bot] 7a1798bdfd chore(release): version packages (#841)
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @chat-adapter/shared@4.39.0

### Minor Changes

- 153bd96: guard Messenger attachment downloads against SSRF and
oversized responses

`downloadAttachment` in `@chat-adapter/shared` accepts an optional
`hosts` allowlist that restricts downloads, including redirect targets,
to the given hosts and their subdomains. The Messenger adapter uses it
to download attachment media only from Meta's `fbsbx.com` and
`fbcdn.net` hosts, with the shared SSRF guard, 25 MB size cap, and 30
second timeout. External fallback and link-share URLs are rejected
before any network request.

- bb92688: secure anonymous attachment downloads against SSRF and
oversized responses

`@chat-adapter/shared` gains `downloadAttachment`, a guarded downloader
that refuses private and internal addresses (as URL literals, through
DNS resolution, and after redirects), decodes compressed responses, caps
the body size at 25 MB, and bounds the whole download with a 30 second
timeout. All of these are configurable, including the transport for
proxied deployments.

The Teams adapter uses it for anonymous attachment downloads. HTTPS
attachments on any public host keep working, plain-HTTP URLs are
refused, and the Bot Framework Emulator's loopback connector now uses
bot authentication so local development keeps working.

- e71bfea: Add `normalizeCodeFences` to `@chat-adapter/shared`: a
code-fence normalizer for platforms whose triple-backtick fences treat
the text after the opening fence as code rather than a CommonMark info
string. Only paired fences become code blocks (unpaired fences, fences
inside inline code, and fences on quoted lines stay literal text), text
following a closing fence cannot be promoted to a block construct, and
per-segment callbacks keep text-level rewrites out of code content.

The WhatsApp adapter now uses it when parsing incoming messages: the
first line of a code block is preserved in message text and formatted
content, and bold/strikethrough rewriting no longer corrupts fenced
code.

- b6fa24c: guard attachment downloads across the remaining adapters

Slack, Discord, and WhatsApp attachment downloads now go through the
shared guarded downloader: private and internal addresses are refused
(as URL literals, through DNS resolution, and after redirects),
responses are capped at 25 MB, and downloads time out after 30 seconds.
Slack sends the bot token only on hops to trusted Slack origins, and
WhatsApp keeps its access token on Meta's media hosts and the configured
Graph origin. Telegram enforces the same size cap and timeout with the
Web Fetch API so downloads keep working in runtimes like Cloudflare
Workers.

`downloadAttachment` in `@chat-adapter/shared` now resolves `headers`
per hop (pass a function to control what each redirect target receives),
forwards the resolved headers to custom transports, and accepts an
`onResponse` hook to reject unexpected final responses before the body
is read.

### Patch Changes

- Updated dependencies [2ce2be0]
- Updated dependencies [16ea171]
- Updated dependencies [169788b]
- Updated dependencies [eddcd7e]
- Updated dependencies [5b538f6]
- Updated dependencies [929878b]
- Updated dependencies [500b7e6]
  - chat@4.39.0
## @chat-adapter/slack@4.39.0

### Minor Changes

- 2ce2be0: Add Slack Agent Sessions lifecycle support, native stop
cancellation through `thread.signal`, automatic session titles, and
session stop/title-change events while preserving the legacy
`assistant_view` compatibility path.

### Patch Changes

- 864d922: Keep alert attachment content on normalized Slack messages.
Attachments that aren't link unfurls now contribute their pretext, title
(linked to `title_link` when present, with the URL also surfaced in
`message.links`), text, and fields instead of being dropped; `fallback`
fills in when nothing else on the attachment carries content. Matching
how Slack renders these fields, they are treated as plain text unless
listed in the attachment's `mrkdwn_in` array, so literal `*`, `_`, and
backticks in alert text survive normalization. Tables inside attachment
blocks now stay adjacent to their attachment's text.

Because attachment content is part of `message.text`, mention detection
and `onMessage` pattern handlers see it too: an attachment that quotes
the bot's mention routes to `onNewMention`, and patterns match alert
text. Handlers that should ignore other integrations' alerts can check
`message.author.isBot`.

- 7c26965: prevent attachment downloads from sending credentials to
untrusted hosts
- e71bfea: Preserve the first line of incoming Slack code blocks when
extracting message text and formatted content.

Only paired triple-backtick fences become code blocks: an unpaired
fence, a fence inside inline code or a `<…>` token, and a fence on a
quoted line all stay literal text, matching how Slack renders them. Bold
and strikethrough rewriting no longer touches fenced code content, and
text following a closing fence can no longer turn into a blockquote,
heading, or list.

- b6fa24c: guard attachment downloads across the remaining adapters

Slack, Discord, and WhatsApp attachment downloads now go through the
shared guarded downloader: private and internal addresses are refused
(as URL literals, through DNS resolution, and after redirects),
responses are capped at 25 MB, and downloads time out after 30 seconds.
Slack sends the bot token only on hops to trusted Slack origins, and
WhatsApp keeps its access token on Meta's media hosts and the configured
Graph origin. Telegram enforces the same size cap and timeout with the
Web Fetch API so downloads keep working in runtimes like Cloudflare
Workers.

`downloadAttachment` in `@chat-adapter/shared` now resolves `headers`
per hop (pass a function to control what each redirect target receives),
forwards the resolved headers to custom transports, and accepts an
`onResponse` hook to reject unexpected final responses before the body
is read.

- Updated dependencies [2ce2be0]
- Updated dependencies [153bd96]
- Updated dependencies [16ea171]
- Updated dependencies [169788b]
- Updated dependencies [eddcd7e]
- Updated dependencies [bb92688]
- Updated dependencies [5b538f6]
- Updated dependencies [e71bfea]
- Updated dependencies [929878b]
- Updated dependencies [500b7e6]
- Updated dependencies [b6fa24c]
  - chat@4.39.0
  - @chat-adapter/shared@4.39.0
## @chat-adapter/telegram@4.39.0

### Minor Changes

- c4a359e: require webhook verification by default with an explicit
unverified opt-in
- 26a06ca: Add `mentionOnReply`: when enabled, a reply to one of the
bot's own messages reports `isMention`, so a bot in a group keeps the
conversation going without the handle being repeated. Off by default, so
existing mention-only bots are unaffected, and readable from
`TELEGRAM_MENTION_ON_REPLY`. Implicit forum-topic replies and the bot's
own echoed messages never count, and polling mode now retries the
startup `getMe` lazily so a transient outage cannot leave mention
detection disabled.
- d5ebec1: Implement `reply` in the Telegram adapter so `Thread.reply()`
threads the answer to its target instead of throwing
`NotImplementedError`. The reference travels as Bot API
`reply_parameters` and covers text, rich messages, documents,
attachments and media groups; `allow_sending_without_reply` keeps
delivery working when the target has been deleted. Malformed reply
target ids are rejected before anything is sent, and a rich-message
gateway that rejects `reply_parameters` falls back to a regular threaded
send.
- a18e792: Describe the message kinds Telegram sends with no text and no
file. A shared location, venue, contact, poll, dice, game, invoice or
story used to arrive as an empty message: the payload carried the
content, but a handler reading `text` saw nothing. Each now gets a short
literal description (`📍 55.75, 37.61`, `👤 Ada Lovelace +1555…`, `📊 Lunch
or dinner?`), and the structured payload stays on the raw message for
anyone who needs the numbers.
- a0ba986: Parse stickers and animations. A sticker used to arrive as an
empty message, since it carries no text, and an animation (Telegram GIF)
was dropped entirely. A sticker now reports the emoji it stands for as
its text (falling back to the sticker set name, then to "sticker") plus
an attachment matching its real format: an image for a still WebP
sticker, a video for a WebM one, a file for a Lottie (TGS) one. An
animation arrives as a single video attachment; the redundant `document`
field Telegram sets alongside it for backward compatibility is no longer
reported as a second attachment.

### Patch Changes

- eddcd7e: Return Telegram file downloads as portable ArrayBuffer data
while preserving Buffer support in the shared attachment contract.
- b6fa24c: guard attachment downloads across the remaining adapters

Slack, Discord, and WhatsApp attachment downloads now go through the
shared guarded downloader: private and internal addresses are refused
(as URL literals, through DNS resolution, and after redirects),
responses are capped at 25 MB, and downloads time out after 30 seconds.
Slack sends the bot token only on hops to trusted Slack origins, and
WhatsApp keeps its access token on Meta's media hosts and the configured
Graph origin. Telegram enforces the same size cap and timeout with the
Web Fetch API so downloads keep working in runtimes like Cloudflare
Workers.

`downloadAttachment` in `@chat-adapter/shared` now resolves `headers`
per hop (pass a function to control what each redirect target receives),
forwards the resolved headers to custom transports, and accepts an
`onResponse` hook to reject unexpected final responses before the body
is read.

- Updated dependencies [2ce2be0]
- Updated dependencies [153bd96]
- Updated dependencies [16ea171]
- Updated dependencies [169788b]
- Updated dependencies [eddcd7e]
- Updated dependencies [bb92688]
- Updated dependencies [5b538f6]
- Updated dependencies [e71bfea]
- Updated dependencies [929878b]
- Updated dependencies [500b7e6]
- Updated dependencies [b6fa24c]
  - chat@4.39.0
  - @chat-adapter/shared@4.39.0
## @chat-adapter/twilio@4.39.0

### Minor Changes

- 75cadbf: feat(twilio): add RCS support with rich cards, button
actions, and location sharing

Extends the Twilio adapter with full RCS support: inbound button tap
routing via `processAction`, location share parsing, Content API
integration for rich outbound cards with SMS fallback, and channel
metadata detection. Cards sent to RCS-capable senders (Messaging Service
or `rcs:` address) are automatically rendered as Twilio Content
templates with embedded SMS fallback variants.

Existing deployments keep their thread ids: plain SMS threads stay keyed
by phone number even when the number belongs to a Messaging Service, and
`openDM` still prefers `phoneNumber` over `messagingServiceSid`. Only
taps of buttons rendered by Chat SDK become actions; foreign button taps
that carry a body keep arriving as messages.

### Patch Changes

- 28bc776: isolate Twilio message processing locks by conversation
- Updated dependencies [2ce2be0]
- Updated dependencies [153bd96]
- Updated dependencies [16ea171]
- Updated dependencies [169788b]
- Updated dependencies [eddcd7e]
- Updated dependencies [bb92688]
- Updated dependencies [5b538f6]
- Updated dependencies [e71bfea]
- Updated dependencies [929878b]
- Updated dependencies [500b7e6]
- Updated dependencies [b6fa24c]
  - chat@4.39.0
  - @chat-adapter/shared@4.39.0
## chat@4.39.0

### Minor Changes

- 2ce2be0: Add Slack Agent Sessions lifecycle support, native stop
cancellation through `thread.signal`, automatic session titles, and
session stop/title-change events while preserving the legacy
`assistant_view` compatibility path.
- 169788b: Introduce the unified History API (`bot.history`) with user,
thread, and channel scopes.

`bot.history.user` replaces `bot.transcripts` for cross-platform
per-user message persistence. The API surface is identical — migrate by
changing the `transcripts` config key to `history.user` and updating
call sites from `bot.transcripts.*` to `bot.history.user.*`.
`bot.transcripts` remains available as a deprecated alias.

`bot.history.thread` and `bot.history.channel` expose promise-based
helpers for per-thread and per-channel message access, aligned with the
existing `thread.messages` and `channel.threads()` iterators. Reads
delegate to the adapter; adapters that persist history in the SDK-side
store (`persistThreadHistory: true`) are served from that cache. An
unregistered adapter prefix or an unsupported capability throws instead
of returning an empty result.

The new `toPromptEntries` helper converts `history.user.list()` entries
into `{ role, content }` messages ready for LLM prompts.

The `TranscriptEntry` type is deprecated in favour of `HistoryEntry`.
Both are exported from `chat`.

- 5b538f6: Keep thread locks alive while message handlers run so queue,
burst, and debounce strategies remain serialized beyond the lock TTL.
Renewal is capped by the new `concurrency.maxLockLifetimeMs` option
(default 10 minutes) so a hung handler cannot block a thread forever.
When the heartbeat detects that lock ownership was lost, the queue drain
and debounce loops stop instead of competing with the new lock holder,
and the debounce loop now keeps draining messages that arrive while a
handler is running instead of stranding them until the next webhook.

### Patch Changes

- 16ea171: preserve adapter-returned thread ids when editing channel
messages
- eddcd7e: Return Telegram file downloads as portable ArrayBuffer data
while preserving Buffer support in the shared attachment contract.
- 929878b: Allow JSX link buttons to include an explicit action ID.
- 500b7e6: enforce the conversation scope on write tools and stop
trusting client-supplied message history in the web adapter

`createChatTools` now runs the same scope guard on write tools that read
tools already used, so a thread or channel id the model supplies that
resolves outside the scoped conversation is rejected before the write
executes. `sendDirectMessage` targets a user id rather than a
conversation and stays gated by approval alone.

The web adapter no longer treats the request body's `messages` array as
a source of conversation state. Only the latest user message is
consumed, and tool parts are stripped from it so a browser cannot inject
forged tool-call or approval state. Text, file, and custom data parts
pass through unchanged; a message left with no parts after stripping is
rejected with HTTP 400. Prior turns come from the state adapter when
`persistMessageHistory` is enabled.
## @chat-adapter/discord@4.39.0

### Patch Changes

- c4f709f: fix edits, deletes, and reactions on Discord thread starter
messages

Operations on a thread's starter message now try the thread first and
fall back to the parent channel when Discord reports the message as
unknown. Threads on a text channel keep their starter message in the
parent channel, so those operations used to fail; forum and media posts
keep theirs in the thread and are unaffected.

Note that deleting a text-channel thread's starter message now deletes
the message, which Discord cascades into deleting the thread.

- b6fa24c: guard attachment downloads across the remaining adapters

Slack, Discord, and WhatsApp attachment downloads now go through the
shared guarded downloader: private and internal addresses are refused
(as URL literals, through DNS resolution, and after redirects),
responses are capped at 25 MB, and downloads time out after 30 seconds.
Slack sends the bot token only on hops to trusted Slack origins, and
WhatsApp keeps its access token on Meta's media hosts and the configured
Graph origin. Telegram enforces the same size cap and timeout with the
Web Fetch API so downloads keep working in runtimes like Cloudflare
Workers.

`downloadAttachment` in `@chat-adapter/shared` now resolves `headers`
per hop (pass a function to control what each redirect target receives),
forwards the resolved headers to custom transports, and accepts an
`onResponse` hook to reject unexpected final responses before the body
is read.

- Updated dependencies [2ce2be0]
- Updated dependencies [153bd96]
- Updated dependencies [16ea171]
- Updated dependencies [169788b]
- Updated dependencies [eddcd7e]
- Updated dependencies [bb92688]
- Updated dependencies [5b538f6]
- Updated dependencies [e71bfea]
- Updated dependencies [929878b]
- Updated dependencies [500b7e6]
- Updated dependencies [b6fa24c]
  - chat@4.39.0
  - @chat-adapter/shared@4.39.0
## @chat-adapter/gchat@4.39.0

### Patch Changes

- Updated dependencies [2ce2be0]
- Updated dependencies [153bd96]
- Updated dependencies [16ea171]
- Updated dependencies [169788b]
- Updated dependencies [eddcd7e]
- Updated dependencies [bb92688]
- Updated dependencies [5b538f6]
- Updated dependencies [e71bfea]
- Updated dependencies [929878b]
- Updated dependencies [500b7e6]
- Updated dependencies [b6fa24c]
  - chat@4.39.0
  - @chat-adapter/shared@4.39.0
## @chat-adapter/github@4.39.0

### Patch Changes

- Updated dependencies [2ce2be0]
- Updated dependencies [153bd96]
- Updated dependencies [16ea171]
- Updated dependencies [169788b]
- Updated dependencies [eddcd7e]
- Updated dependencies [bb92688]
- Updated dependencies [5b538f6]
- Updated dependencies [e71bfea]
- Updated dependencies [929878b]
- Updated dependencies [500b7e6]
- Updated dependencies [b6fa24c]
  - chat@4.39.0
  - @chat-adapter/shared@4.39.0
## @chat-adapter/instagram@4.39.0

### Patch Changes

- Updated dependencies [2ce2be0]
- Updated dependencies [153bd96]
- Updated dependencies [16ea171]
- Updated dependencies [169788b]
- Updated dependencies [eddcd7e]
- Updated dependencies [bb92688]
- Updated dependencies [5b538f6]
- Updated dependencies [e71bfea]
- Updated dependencies [929878b]
- Updated dependencies [500b7e6]
- Updated dependencies [b6fa24c]
  - chat@4.39.0
  - @chat-adapter/shared@4.39.0
## @chat-adapter/linear@4.39.0

### Patch Changes

- Updated dependencies [2ce2be0]
- Updated dependencies [153bd96]
- Updated dependencies [16ea171]
- Updated dependencies [169788b]
- Updated dependencies [eddcd7e]
- Updated dependencies [bb92688]
- Updated dependencies [5b538f6]
- Updated dependencies [e71bfea]
- Updated dependencies [929878b]
- Updated dependencies [500b7e6]
- Updated dependencies [b6fa24c]
  - chat@4.39.0
  - @chat-adapter/shared@4.39.0
## @chat-adapter/messenger@4.39.0

### Patch Changes

- 153bd96: guard Messenger attachment downloads against SSRF and
oversized responses

`downloadAttachment` in `@chat-adapter/shared` accepts an optional
`hosts` allowlist that restricts downloads, including redirect targets,
to the given hosts and their subdomains. The Messenger adapter uses it
to download attachment media only from Meta's `fbsbx.com` and
`fbcdn.net` hosts, with the shared SSRF guard, 25 MB size cap, and 30
second timeout. External fallback and link-share URLs are rejected
before any network request.

- Updated dependencies [2ce2be0]
- Updated dependencies [153bd96]
- Updated dependencies [16ea171]
- Updated dependencies [169788b]
- Updated dependencies [eddcd7e]
- Updated dependencies [bb92688]
- Updated dependencies [5b538f6]
- Updated dependencies [e71bfea]
- Updated dependencies [929878b]
- Updated dependencies [500b7e6]
- Updated dependencies [b6fa24c]
  - chat@4.39.0
  - @chat-adapter/shared@4.39.0
## @chat-adapter/notion@4.39.0

### Patch Changes

- Updated dependencies [2ce2be0]
- Updated dependencies [153bd96]
- Updated dependencies [16ea171]
- Updated dependencies [169788b]
- Updated dependencies [eddcd7e]
- Updated dependencies [bb92688]
- Updated dependencies [5b538f6]
- Updated dependencies [e71bfea]
- Updated dependencies [929878b]
- Updated dependencies [500b7e6]
- Updated dependencies [b6fa24c]
  - chat@4.39.0
  - @chat-adapter/shared@4.39.0
## @chat-adapter/teams@4.39.0

### Patch Changes

- 63997ac: hydrate live Teams sender email without requiring Microsoft
Graph permissions
- bb92688: secure anonymous attachment downloads against SSRF and
oversized responses

`@chat-adapter/shared` gains `downloadAttachment`, a guarded downloader
that refuses private and internal addresses (as URL literals, through
DNS resolution, and after redirects), decodes compressed responses, caps
the body size at 25 MB, and bounds the whole download with a 30 second
timeout. All of these are configurable, including the transport for
proxied deployments.

The Teams adapter uses it for anonymous attachment downloads. HTTPS
attachments on any public host keep working, plain-HTTP URLs are
refused, and the Bot Framework Emulator's loopback connector now uses
bot authentication so local development keeps working.

- Updated dependencies [2ce2be0]
- Updated dependencies [153bd96]
- Updated dependencies [16ea171]
- Updated dependencies [169788b]
- Updated dependencies [eddcd7e]
- Updated dependencies [bb92688]
- Updated dependencies [5b538f6]
- Updated dependencies [e71bfea]
- Updated dependencies [929878b]
- Updated dependencies [500b7e6]
- Updated dependencies [b6fa24c]
  - chat@4.39.0
  - @chat-adapter/shared@4.39.0
## @chat-adapter/web@4.39.0

### Patch Changes

- 500b7e6: enforce the conversation scope on write tools and stop
trusting client-supplied message history in the web adapter

`createChatTools` now runs the same scope guard on write tools that read
tools already used, so a thread or channel id the model supplies that
resolves outside the scoped conversation is rejected before the write
executes. `sendDirectMessage` targets a user id rather than a
conversation and stays gated by approval alone.

The web adapter no longer treats the request body's `messages` array as
a source of conversation state. Only the latest user message is
consumed, and tool parts are stripped from it so a browser cannot inject
forged tool-call or approval state. Text, file, and custom data parts
pass through unchanged; a message left with no parts after stripping is
rejected with HTTP 400. Prior turns come from the state adapter when
`persistMessageHistory` is enabled.

- Updated dependencies [2ce2be0]
- Updated dependencies [153bd96]
- Updated dependencies [16ea171]
- Updated dependencies [169788b]
- Updated dependencies [eddcd7e]
- Updated dependencies [bb92688]
- Updated dependencies [5b538f6]
- Updated dependencies [e71bfea]
- Updated dependencies [929878b]
- Updated dependencies [500b7e6]
- Updated dependencies [b6fa24c]
  - chat@4.39.0
  - @chat-adapter/shared@4.39.0
## @chat-adapter/whatsapp@4.39.0

### Patch Changes

- 3e6e866: support business-scoped user IDs for inbound and outbound
WhatsApp messages
- e71bfea: Add `normalizeCodeFences` to `@chat-adapter/shared`: a
code-fence normalizer for platforms whose triple-backtick fences treat
the text after the opening fence as code rather than a CommonMark info
string. Only paired fences become code blocks (unpaired fences, fences
inside inline code, and fences on quoted lines stay literal text), text
following a closing fence cannot be promoted to a block construct, and
per-segment callbacks keep text-level rewrites out of code content.

The WhatsApp adapter now uses it when parsing incoming messages: the
first line of a code block is preserved in message text and formatted
content, and bold/strikethrough rewriting no longer corrupts fenced
code.

- 7c26965: prevent attachment downloads from sending credentials to
untrusted hosts
- b6fa24c: guard attachment downloads across the remaining adapters

Slack, Discord, and WhatsApp attachment downloads now go through the
shared guarded downloader: private and internal addresses are refused
(as URL literals, through DNS resolution, and after redirects),
responses are capped at 25 MB, and downloads time out after 30 seconds.
Slack sends the bot token only on hops to trusted Slack origins, and
WhatsApp keeps its access token on Meta's media hosts and the configured
Graph origin. Telegram enforces the same size cap and timeout with the
Web Fetch API so downloads keep working in runtimes like Cloudflare
Workers.

`downloadAttachment` in `@chat-adapter/shared` now resolves `headers`
per hop (pass a function to control what each redirect target receives),
forwards the resolved headers to custom transports, and accepts an
`onResponse` hook to reject unexpected final responses before the body
is read.

- Updated dependencies [2ce2be0]
- Updated dependencies [153bd96]
- Updated dependencies [16ea171]
- Updated dependencies [169788b]
- Updated dependencies [eddcd7e]
- Updated dependencies [bb92688]
- Updated dependencies [5b538f6]
- Updated dependencies [e71bfea]
- Updated dependencies [929878b]
- Updated dependencies [500b7e6]
- Updated dependencies [b6fa24c]
  - chat@4.39.0
  - @chat-adapter/shared@4.39.0
## @chat-adapter/x@4.39.0

### Patch Changes

- Updated dependencies [2ce2be0]
- Updated dependencies [153bd96]
- Updated dependencies [16ea171]
- Updated dependencies [169788b]
- Updated dependencies [eddcd7e]
- Updated dependencies [bb92688]
- Updated dependencies [5b538f6]
- Updated dependencies [e71bfea]
- Updated dependencies [929878b]
- Updated dependencies [500b7e6]
- Updated dependencies [b6fa24c]
  - chat@4.39.0
  - @chat-adapter/shared@4.39.0
## @chat-adapter/state-ioredis@4.39.0

### Patch Changes

- Updated dependencies [2ce2be0]
- Updated dependencies [16ea171]
- Updated dependencies [169788b]
- Updated dependencies [eddcd7e]
- Updated dependencies [5b538f6]
- Updated dependencies [929878b]
- Updated dependencies [500b7e6]
  - chat@4.39.0
## @chat-adapter/state-memory@4.39.0

### Patch Changes

- Updated dependencies [2ce2be0]
- Updated dependencies [16ea171]
- Updated dependencies [169788b]
- Updated dependencies [eddcd7e]
- Updated dependencies [5b538f6]
- Updated dependencies [929878b]
- Updated dependencies [500b7e6]
  - chat@4.39.0
## @chat-adapter/state-pg@4.39.0

### Patch Changes

- Updated dependencies [2ce2be0]
- Updated dependencies [16ea171]
- Updated dependencies [169788b]
- Updated dependencies [eddcd7e]
- Updated dependencies [5b538f6]
- Updated dependencies [929878b]
- Updated dependencies [500b7e6]
  - chat@4.39.0
## @chat-adapter/state-redis@4.39.0

### Patch Changes

- Updated dependencies [2ce2be0]
- Updated dependencies [16ea171]
- Updated dependencies [169788b]
- Updated dependencies [eddcd7e]
- Updated dependencies [5b538f6]
- Updated dependencies [929878b]
- Updated dependencies [500b7e6]
  - chat@4.39.0
## @chat-adapter/tests@4.39.0

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-08-28 20:37:34 +10:00
github-actions[bot] aea4d753de chore(release): version packages (#829)
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @chat-adapter/discord@4.38.1

### Patch Changes

- Updated dependencies [6cb933e]
- Updated dependencies [764e475]
  - chat@4.38.1
  - @chat-adapter/shared@4.38.1
## @chat-adapter/gchat@4.38.1

### Patch Changes

- 3268703: download attachments through the Google Chat media API to
prevent credential exposure
- Updated dependencies [6cb933e]
- Updated dependencies [764e475]
  - chat@4.38.1
  - @chat-adapter/shared@4.38.1
## @chat-adapter/github@4.38.1

### Patch Changes

- Updated dependencies [6cb933e]
- Updated dependencies [764e475]
  - chat@4.38.1
  - @chat-adapter/shared@4.38.1
## @chat-adapter/instagram@4.38.1

### Patch Changes

- Updated dependencies [6cb933e]
- Updated dependencies [764e475]
  - chat@4.38.1
  - @chat-adapter/shared@4.38.1
## @chat-adapter/linear@4.38.1

### Patch Changes

- Updated dependencies [6cb933e]
- Updated dependencies [764e475]
  - chat@4.38.1
  - @chat-adapter/shared@4.38.1
## @chat-adapter/messenger@4.38.1

### Patch Changes

- Updated dependencies [6cb933e]
- Updated dependencies [764e475]
  - chat@4.38.1
  - @chat-adapter/shared@4.38.1
## @chat-adapter/notion@4.38.1

### Patch Changes

- Updated dependencies [6cb933e]
- Updated dependencies [764e475]
  - chat@4.38.1
  - @chat-adapter/shared@4.38.1
## @chat-adapter/shared@4.38.1

### Patch Changes

- Updated dependencies [6cb933e]
- Updated dependencies [764e475]
  - chat@4.38.1
## @chat-adapter/slack@4.38.1

### Patch Changes

- 764e475: preserve pasted Slack tables in parsed message content:
`table` and `data_table` blocks become structured table nodes in
`message.formatted` and tab-separated text in `message.text`. Table
cells render mentions, channels, and links through the same mrkdwn
converter as body text, unfurl and app attachments are excluded, date
cells without a fallback are formatted from their timestamp, and tables
pasted above the message text stay above it. Headerless pasted tables
get an empty header row so GFM re-serialization doesn't promote the
first data row to a header. `SlackEvent.blocks` is now typed with the
exported `SlackMessageBlock` interface.
- Updated dependencies [6cb933e]
- Updated dependencies [764e475]
  - chat@4.38.1
  - @chat-adapter/shared@4.38.1
## @chat-adapter/teams@4.38.1

### Patch Changes

- Updated dependencies [6cb933e]
- Updated dependencies [764e475]
  - chat@4.38.1
  - @chat-adapter/shared@4.38.1
## @chat-adapter/telegram@4.38.1

### Patch Changes

- Updated dependencies [6cb933e]
- Updated dependencies [764e475]
  - chat@4.38.1
  - @chat-adapter/shared@4.38.1
## @chat-adapter/twilio@4.38.1

### Patch Changes

- d8103a1: prevent credentials from being sent to untrusted media
origins
- Updated dependencies [6cb933e]
- Updated dependencies [764e475]
  - chat@4.38.1
  - @chat-adapter/shared@4.38.1
## @chat-adapter/web@4.38.1

### Patch Changes

- Updated dependencies [6cb933e]
- Updated dependencies [764e475]
  - chat@4.38.1
  - @chat-adapter/shared@4.38.1
## @chat-adapter/whatsapp@4.38.1

### Patch Changes

- Updated dependencies [6cb933e]
- Updated dependencies [764e475]
  - chat@4.38.1
  - @chat-adapter/shared@4.38.1
## @chat-adapter/x@4.38.1

### Patch Changes

- Updated dependencies [6cb933e]
- Updated dependencies [764e475]
  - chat@4.38.1
  - @chat-adapter/shared@4.38.1
## chat@4.38.1

### Patch Changes

- 6cb933e: isolate queued and debounced messages by thread when using
channel-scoped locks
- 764e475: `toPlainText` keeps empty table cells so tab-separated
columns stay aligned, and drops table rows with no content (such as
placeholder header rows)
## @chat-adapter/state-ioredis@4.38.1

### Patch Changes

- Updated dependencies [6cb933e]
- Updated dependencies [764e475]
  - chat@4.38.1
## @chat-adapter/state-memory@4.38.1

### Patch Changes

- Updated dependencies [6cb933e]
- Updated dependencies [764e475]
  - chat@4.38.1
## @chat-adapter/state-pg@4.38.1

### Patch Changes

- Updated dependencies [6cb933e]
- Updated dependencies [764e475]
  - chat@4.38.1
## @chat-adapter/state-redis@4.38.1

### Patch Changes

- Updated dependencies [6cb933e]
- Updated dependencies [764e475]
  - chat@4.38.1
## @chat-adapter/tests@4.38.1

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-08-17 22:04:34 +01:00
github-actions[bot] caab5c3843 chore(release): version packages (#805)
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @chat-adapter/discord@4.38.0

### Minor Changes

- a0cba02: Add Vercel Connect credential resolvers and custom webhook
verification to the Discord adapter, with `create-chat-sdk --connect`
scaffolding for Discord bots.

### Patch Changes

- a94995e: Restore attachment downloads across Discord inbound message
paths.
- 4bdf721: Preserve content and attachments from forwarded Discord
message snapshots.
- Updated dependencies [0f24cc3]
- Updated dependencies [bdeb2bf]
- Updated dependencies [a0cba02]
- Updated dependencies [83ede7e]
- Updated dependencies [18d4a23]
  - chat@4.38.0
  - @chat-adapter/shared@4.38.0
## @chat-adapter/messenger@4.38.0

### Minor Changes

- 18d4a23: Add a shared thread API for marking messages as read across
WhatsApp, Messenger, and XChat.

Note for anyone calling `XchatAdapter.markAsRead()` directly: it now
rejects when a receipt fails instead of logging a warning and resolving.
Automatic read receipts are unaffected, since the adapter still catches
and logs those internally. If you call the method yourself without
awaiting it, add a `.catch()` so a failed receipt does not surface as an
unhandled rejection.

### Patch Changes

- Updated dependencies [0f24cc3]
- Updated dependencies [bdeb2bf]
- Updated dependencies [a0cba02]
- Updated dependencies [83ede7e]
- Updated dependencies [18d4a23]
  - chat@4.38.0
  - @chat-adapter/shared@4.38.0
## @chat-adapter/notion@4.38.0

### Minor Changes

- 06b04ac: Add outbound-only Vercel Connect authentication for Notion
while retaining native webhook verification and scaffolding.

### Patch Changes

- Updated dependencies [0f24cc3]
- Updated dependencies [bdeb2bf]
- Updated dependencies [a0cba02]
- Updated dependencies [83ede7e]
- Updated dependencies [18d4a23]
  - chat@4.38.0
  - @chat-adapter/shared@4.38.0
## @chat-adapter/telegram@4.38.0

### Minor Changes

- 0f24cc3: Preserve normalized replied-to message context and populate
it from Telegram replies.
- 7a1150c: Add outbound-only Vercel Connect authentication for Telegram
while retaining native webhook verification or polling.
- 3bbf3ff: Use post-and-edit streaming by default and make native
Telegram drafts opt-in. Streams now render the same way in every chat
type; set the new `nativeStreaming: true` config option to restore draft
previews in private chats.

The adapter now owns the post-and-edit loop so edits stay under
Telegram's per-chat rate limit. Edits are throttled to a 1100ms floor,
configurable with the new `streamingEditIntervalMs` option, and a
rate-limited final edit is retried once instead of failing the post.

### Patch Changes

- 1d2b78d: Deduplicate repeated Telegram webhook updates by their update
ID using the configured state adapter.
- 745fdf5: respect Telegram streaming rate limits and target XChat read
receipts exactly
- Updated dependencies [0f24cc3]
- Updated dependencies [bdeb2bf]
- Updated dependencies [a0cba02]
- Updated dependencies [83ede7e]
- Updated dependencies [18d4a23]
  - chat@4.38.0
  - @chat-adapter/shared@4.38.0
## @chat-adapter/whatsapp@4.38.0

### Minor Changes

- 83ede7e: add native message replies with WhatsApp contextual reply
support
- 18d4a23: Add a shared thread API for marking messages as read across
WhatsApp, Messenger, and XChat.

Note for anyone calling `XchatAdapter.markAsRead()` directly: it now
rejects when a receipt fails instead of logging a warning and resolving.
Automatic read receipts are unaffected, since the adapter still catches
and logs those internally. If you call the method yourself without
awaiting it, add a `.catch()` so a failed receipt does not surface as an
unhandled rejection.

### Patch Changes

- Updated dependencies [0f24cc3]
- Updated dependencies [bdeb2bf]
- Updated dependencies [a0cba02]
- Updated dependencies [83ede7e]
- Updated dependencies [18d4a23]
  - chat@4.38.0
  - @chat-adapter/shared@4.38.0
## @chat-adapter/x@4.38.0

### Minor Changes

- 18d4a23: Add a shared thread API for marking messages as read across
WhatsApp, Messenger, and XChat.

Note for anyone calling `XchatAdapter.markAsRead()` directly: it now
rejects when a receipt fails instead of logging a warning and resolving.
Automatic read receipts are unaffected, since the adapter still catches
and logs those internally. If you call the method yourself without
awaiting it, add a `.catch()` so a failed receipt does not surface as an
unhandled rejection.

### Patch Changes

- 745fdf5: respect Telegram streaming rate limits and target XChat read
receipts exactly
- Updated dependencies [0f24cc3]
- Updated dependencies [bdeb2bf]
- Updated dependencies [a0cba02]
- Updated dependencies [83ede7e]
- Updated dependencies [18d4a23]
  - chat@4.38.0
  - @chat-adapter/shared@4.38.0
## chat@4.38.0

### Minor Changes

- 0f24cc3: Preserve normalized replied-to message context and populate
it from Telegram replies.
- bdeb2bf: Add a workflow-safe `chat/serialization` entrypoint and
isolate automatic Chat class serializers from Node-only runtime
dependencies.
- a0cba02: Add Vercel Connect credential resolvers and custom webhook
verification to the Discord adapter, with `create-chat-sdk --connect`
scaffolding for Discord bots.
- 83ede7e: add native message replies with WhatsApp contextual reply
support
- 18d4a23: Add a shared thread API for marking messages as read across
WhatsApp, Messenger, and XChat.

Note for anyone calling `XchatAdapter.markAsRead()` directly: it now
rejects when a receipt fails instead of logging a warning and resolving.
Automatic read receipts are unaffected, since the adapter still catches
and logs those internally. If you call the method yourself without
awaiting it, add a `.catch()` so a failed receipt does not surface as an
unhandled rejection.
## create-chat-sdk@0.4.0

### Minor Changes

- a0cba02: Add Vercel Connect credential resolvers and custom webhook
verification to the Discord adapter, with `create-chat-sdk --connect`
scaffolding for Discord bots.
- 06b04ac: Add outbound-only Vercel Connect authentication for Notion
while retaining native webhook verification and scaffolding.
- 7a1150c: Add outbound-only Vercel Connect authentication for Telegram
while retaining native webhook verification or polling.
## @chat-adapter/gchat@4.38.0

### Patch Changes

- 2f40a32: Fix attachment downloads failing with a 400 when
`attachmentDataRef` is present

`fetchAttachmentData` called the Chat media endpoint without
`alt=media`, so it
returned resource metadata rather than file bytes and rejected the
arraybuffer
request with a bare 400. Every download by `resourceName` failed, which
is the
  path taken for any file uploaded directly to Chat.

The download path is also hardened: when `media.download` fails and the
attachment carries a `downloadUri`, the adapter now falls back to
fetching that
URL instead of rejecting, and failures with no fallback are routed
through the
shared error handling so a 429 surfaces as `AdapterRateLimitError` like
every
  other Chat API call.

- Updated dependencies [0f24cc3]
- Updated dependencies [bdeb2bf]
- Updated dependencies [a0cba02]
- Updated dependencies [83ede7e]
- Updated dependencies [18d4a23]
  - chat@4.38.0
  - @chat-adapter/shared@4.38.0
## @chat-adapter/github@4.38.0

### Patch Changes

- Updated dependencies [0f24cc3]
- Updated dependencies [bdeb2bf]
- Updated dependencies [a0cba02]
- Updated dependencies [83ede7e]
- Updated dependencies [18d4a23]
  - chat@4.38.0
  - @chat-adapter/shared@4.38.0
## @chat-adapter/instagram@4.38.0

### Patch Changes

- Updated dependencies [0f24cc3]
- Updated dependencies [bdeb2bf]
- Updated dependencies [a0cba02]
- Updated dependencies [83ede7e]
- Updated dependencies [18d4a23]
  - chat@4.38.0
  - @chat-adapter/shared@4.38.0
## @chat-adapter/linear@4.38.0

### Patch Changes

- Updated dependencies [0f24cc3]
- Updated dependencies [bdeb2bf]
- Updated dependencies [a0cba02]
- Updated dependencies [83ede7e]
- Updated dependencies [18d4a23]
  - chat@4.38.0
  - @chat-adapter/shared@4.38.0
## @chat-adapter/shared@4.38.0

### Patch Changes

- Updated dependencies [0f24cc3]
- Updated dependencies [bdeb2bf]
- Updated dependencies [a0cba02]
- Updated dependencies [83ede7e]
- Updated dependencies [18d4a23]
  - chat@4.38.0
## @chat-adapter/slack@4.38.0

### Patch Changes

- Updated dependencies [0f24cc3]
- Updated dependencies [bdeb2bf]
- Updated dependencies [a0cba02]
- Updated dependencies [83ede7e]
- Updated dependencies [18d4a23]
  - chat@4.38.0
  - @chat-adapter/shared@4.38.0
## @chat-adapter/teams@4.38.0

### Patch Changes

- Updated dependencies [0f24cc3]
- Updated dependencies [bdeb2bf]
- Updated dependencies [a0cba02]
- Updated dependencies [83ede7e]
- Updated dependencies [18d4a23]
  - chat@4.38.0
  - @chat-adapter/shared@4.38.0
## @chat-adapter/twilio@4.38.0

### Patch Changes

- Updated dependencies [0f24cc3]
- Updated dependencies [bdeb2bf]
- Updated dependencies [a0cba02]
- Updated dependencies [83ede7e]
- Updated dependencies [18d4a23]
  - chat@4.38.0
  - @chat-adapter/shared@4.38.0
## @chat-adapter/web@4.38.0

### Patch Changes

- Updated dependencies [0f24cc3]
- Updated dependencies [bdeb2bf]
- Updated dependencies [a0cba02]
- Updated dependencies [83ede7e]
- Updated dependencies [18d4a23]
  - chat@4.38.0
  - @chat-adapter/shared@4.38.0
## @chat-adapter/state-ioredis@4.38.0

### Patch Changes

- Updated dependencies [0f24cc3]
- Updated dependencies [bdeb2bf]
- Updated dependencies [a0cba02]
- Updated dependencies [83ede7e]
- Updated dependencies [18d4a23]
  - chat@4.38.0
## @chat-adapter/state-memory@4.38.0

### Patch Changes

- Updated dependencies [0f24cc3]
- Updated dependencies [bdeb2bf]
- Updated dependencies [a0cba02]
- Updated dependencies [83ede7e]
- Updated dependencies [18d4a23]
  - chat@4.38.0
## @chat-adapter/state-pg@4.38.0

### Patch Changes

- Updated dependencies [0f24cc3]
- Updated dependencies [bdeb2bf]
- Updated dependencies [a0cba02]
- Updated dependencies [83ede7e]
- Updated dependencies [18d4a23]
  - chat@4.38.0
## @chat-adapter/state-redis@4.38.0

### Patch Changes

- Updated dependencies [0f24cc3]
- Updated dependencies [bdeb2bf]
- Updated dependencies [a0cba02]
- Updated dependencies [83ede7e]
- Updated dependencies [18d4a23]
  - chat@4.38.0
## @chat-adapter/tests@4.38.0

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-08-14 20:28:19 +01:00
github-actions[bot] 3468cdfe0b chore(release): version packages (#767)
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @chat-adapter/gchat@4.37.0

### Minor Changes

- c3b5a08: Bind Pub/Sub push verification to a specific identity with
the new pubsubServiceAccountEmail option, alongside the existing
audience check. Pushes are rejected unless the token email matches it.
Direct webhooks are unaffected.
- 7a19223: Bind Workspace Add-on webhook verification to a specific
identity with the new `workspaceAddOnServiceAccountEmail` option,
replacing a pattern match on the add-on service account email. Workspace
Add-on Chat apps must set it; standalone Chat apps are unaffected.

### Patch Changes

- Updated dependencies [2a2b2c5]
- Updated dependencies [4ac0455]
- Updated dependencies [0ec6a73]
- Updated dependencies [85e3d22]
  - chat@4.37.0
  - @chat-adapter/shared@4.37.0
## @chat-adapter/instagram@4.37.0

### Minor Changes

- 2a2b2c5: Add a native Instagram Direct Messages adapter with signed
webhooks, media, quick replies, story context, reactions, and typed Meta
API errors.

### Patch Changes

- Updated dependencies [2a2b2c5]
- Updated dependencies [4ac0455]
- Updated dependencies [0ec6a73]
- Updated dependencies [85e3d22]
  - chat@4.37.0
  - @chat-adapter/shared@4.37.0
## @chat-adapter/notion@4.37.0

### Minor Changes

- 0ec6a73: Add `@chat-adapter/notion` for Notion page and block comment
discussions: webhook HMAC verification, Post+Edit streaming,
conversation history, `message.subject` page metadata, plain-text
`@userName`/`@botUserId` mention detection, and File Uploads (up to 3
native attachments). Registers the adapter in the `chat/adapters`
catalog and `create-chat-sdk` CLI scaffold, and adds Notion emoji
platform support.

### Patch Changes

- Updated dependencies [2a2b2c5]
- Updated dependencies [4ac0455]
- Updated dependencies [0ec6a73]
- Updated dependencies [85e3d22]
  - chat@4.37.0
  - @chat-adapter/shared@4.37.0
## @chat-adapter/slack@4.37.0

### Minor Changes

- 4ac0455: Add message update and delete lifecycle callbacks, with Slack
message_changed and message_deleted dispatch support.

### Patch Changes

- 6f0d2f0: Resolve outgoing @name mentions on the Slack native streaming
path so streamed responses mention users consistently with the
post-and-edit fallback. Committed renderer text is resolved
incrementally, keeping fenced code literal and preserving the existing
ambiguity semantics.
- 4cc3445: Bound the length of bracketed URLs parsed from message text
in the link-unfurl fallback, avoiding a quadratic scan on adversarial
input. Valid links are unaffected.
- c311827: Preserve the Slack channel ID when converting labeled channel
tokens (`<#C123|general>` now becomes `#general (C123)`) so agents can
pass the ID to channel tools, and normalize the commonly hallucinated
`<label|url>` link order before Markdown conversion
- Updated dependencies [2a2b2c5]
- Updated dependencies [4ac0455]
- Updated dependencies [0ec6a73]
- Updated dependencies [85e3d22]
  - chat@4.37.0
  - @chat-adapter/shared@4.37.0
## @chat-adapter/whatsapp@4.37.0

### Minor Changes

- 6abf480: Add native WhatsApp LinkButton support

- A card whose only interactive element is a single `LinkButton` with a
non-empty label and an `http://` or `https://` URL is now sent as a
native `cta_url` interactive message, as long as the card has no header
image or image, table, chart, or inline link children and the post
carries no files or attachments.
- Link button URLs are now appended as `Label: url` lines to interactive
button message bodies and to media captions, instead of being dropped.
- Everything else is unchanged: non-matching cards keep the formatted
text fallback, and card + media posts keep the single captioned media
send.

- 16879fd: Fix the `WhatsAppInboundMessage.context` type to model all
documented webhook variants. The type previously declared `context?: {
from: string; id: string }`, but Meta's Cloud API sends mutually
exclusive context shapes: quoted replies carry `from`/`id`, forwarded
messages carry only `forwarded` or `frequently_forwarded` (no `id`), and
catalog product inquiries add `referred_product`. Code narrowed by the
old type could dereference `context.id` and crash at runtime on
forwarded messages. All context fields are now optional and the
forwarded/product-inquiry fields are included. Consumers that
dereference `context.from` or `context.id` without a guard will now see
a type error, surfacing what was already a latent crash on forwarded
messages.

### Patch Changes

- Updated dependencies [2a2b2c5]
- Updated dependencies [4ac0455]
- Updated dependencies [0ec6a73]
- Updated dependencies [85e3d22]
  - chat@4.37.0
  - @chat-adapter/shared@4.37.0
## chat@4.37.0

### Minor Changes

- 2a2b2c5: Add a native Instagram Direct Messages adapter with signed
webhooks, media, quick replies, story context, reactions, and typed Meta
API errors.
- 4ac0455: Add message update and delete lifecycle callbacks, with Slack
message_changed and message_deleted dispatch support.
- 0ec6a73: Add `@chat-adapter/notion` for Notion page and block comment
discussions: webhook HMAC verification, Post+Edit streaming,
conversation history, `message.subject` page metadata, plain-text
`@userName`/`@botUserId` mention detection, and File Uploads (up to 3
native attachments). Registers the adapter in the `chat/adapters`
catalog and `create-chat-sdk` CLI scaffold, and adds Notion emoji
platform support.
- 85e3d22: Close residual gaps in agent read-tool scoping.
`createChatTools`'s read guard now wraps modal, assistant-thread,
assistant-context, app-home, app-context, and member-joined dispatch so
tools built in those handlers inherit the active conversation, and it
logs a warning (instead of failing open silently) when a read runs with
no resolvable scope. Scoping stays channel-level by default, so a thread
scope still permits sibling threads in its channel. Pass the new
`strictScope: true` to confine a thread scope to that thread alone,
rejecting both sibling threads and the parent channel, which matters on
platforms where a channel is the widest read available (a GitHub channel
is an entire repo).

Note that reads inside those newly wrapped handlers were previously
unscoped. An agent built in an `onModalSubmit`, `onAppHomeOpened`, or
`onMemberJoinedChannel` handler that reads another channel will now be
rejected. Pass an explicit `scope`, or `scope: false` for intentionally
workspace-wide reads.
## create-chat-sdk@0.3.0

### Minor Changes

- 2a2b2c5: Add a native Instagram Direct Messages adapter with signed
webhooks, media, quick replies, story context, reactions, and typed Meta
API errors.
- 0ec6a73: Add `@chat-adapter/notion` for Notion page and block comment
discussions: webhook HMAC verification, Post+Edit streaming,
conversation history, `message.subject` page metadata, plain-text
`@userName`/`@botUserId` mention detection, and File Uploads (up to 3
native attachments). Registers the adapter in the `chat/adapters`
catalog and `create-chat-sdk` CLI scaffold, and adds Notion emoji
platform support.
## @chat-adapter/discord@4.37.0

### Patch Changes

- Updated dependencies [2a2b2c5]
- Updated dependencies [4ac0455]
- Updated dependencies [0ec6a73]
- Updated dependencies [85e3d22]
  - chat@4.37.0
  - @chat-adapter/shared@4.37.0
## @chat-adapter/github@4.37.0

### Patch Changes

- Updated dependencies [2a2b2c5]
- Updated dependencies [4ac0455]
- Updated dependencies [0ec6a73]
- Updated dependencies [85e3d22]
  - chat@4.37.0
  - @chat-adapter/shared@4.37.0
## @chat-adapter/linear@4.37.0

### Patch Changes

- Updated dependencies [2a2b2c5]
- Updated dependencies [4ac0455]
- Updated dependencies [0ec6a73]
- Updated dependencies [85e3d22]
  - chat@4.37.0
  - @chat-adapter/shared@4.37.0
## @chat-adapter/messenger@4.37.0

### Patch Changes

- Updated dependencies [2a2b2c5]
- Updated dependencies [4ac0455]
- Updated dependencies [0ec6a73]
- Updated dependencies [85e3d22]
  - chat@4.37.0
  - @chat-adapter/shared@4.37.0
## @chat-adapter/shared@4.37.0

### Patch Changes

- Updated dependencies [2a2b2c5]
- Updated dependencies [4ac0455]
- Updated dependencies [0ec6a73]
- Updated dependencies [85e3d22]
  - chat@4.37.0
## @chat-adapter/teams@4.37.0

### Patch Changes

- 4cc3445: Harden Teams HTML-to-text conversion to strip tags until the
output is stable, so nested or malformed markup can't leave a partial
tag behind. `stripHtmlTags` is now shared across the format and Graph
message converters.
- Updated dependencies [2a2b2c5]
- Updated dependencies [4ac0455]
- Updated dependencies [0ec6a73]
- Updated dependencies [85e3d22]
  - chat@4.37.0
  - @chat-adapter/shared@4.37.0
## @chat-adapter/telegram@4.37.0

### Patch Changes

- 629e655: Combine incoming Telegram media groups into one message with
ordered attachments and the shared caption.
- Updated dependencies [2a2b2c5]
- Updated dependencies [4ac0455]
- Updated dependencies [0ec6a73]
- Updated dependencies [85e3d22]
  - chat@4.37.0
  - @chat-adapter/shared@4.37.0
## @chat-adapter/twilio@4.37.0

### Patch Changes

- Updated dependencies [2a2b2c5]
- Updated dependencies [4ac0455]
- Updated dependencies [0ec6a73]
- Updated dependencies [85e3d22]
  - chat@4.37.0
  - @chat-adapter/shared@4.37.0
## @chat-adapter/web@4.37.0

### Patch Changes

- Updated dependencies [2a2b2c5]
- Updated dependencies [4ac0455]
- Updated dependencies [0ec6a73]
- Updated dependencies [85e3d22]
  - chat@4.37.0
  - @chat-adapter/shared@4.37.0
## @chat-adapter/x@4.37.0

### Patch Changes

- b674923: Restrict the X CRC challenge to the opaque token shape X
sends before signing it. The endpoint previously returned an HMAC over
any `crc_token`, which let a caller have an arbitrary webhook body
signed and replay that as `x-twitter-webhooks-signature` on a forged
POST. A webhook body is JSON and can no longer pass the token check, so
a CRC response can't double as a POST event signature.
- Updated dependencies [2a2b2c5]
- Updated dependencies [4ac0455]
- Updated dependencies [0ec6a73]
- Updated dependencies [85e3d22]
  - chat@4.37.0
  - @chat-adapter/shared@4.37.0
## @chat-adapter/state-ioredis@4.37.0

### Patch Changes

- Updated dependencies [2a2b2c5]
- Updated dependencies [4ac0455]
- Updated dependencies [0ec6a73]
- Updated dependencies [85e3d22]
  - chat@4.37.0
## @chat-adapter/state-memory@4.37.0

### Patch Changes

- Updated dependencies [2a2b2c5]
- Updated dependencies [4ac0455]
- Updated dependencies [0ec6a73]
- Updated dependencies [85e3d22]
  - chat@4.37.0
## @chat-adapter/state-pg@4.37.0

### Patch Changes

- Updated dependencies [2a2b2c5]
- Updated dependencies [4ac0455]
- Updated dependencies [0ec6a73]
- Updated dependencies [85e3d22]
  - chat@4.37.0
## @chat-adapter/state-redis@4.37.0

### Patch Changes

- Updated dependencies [2a2b2c5]
- Updated dependencies [4ac0455]
- Updated dependencies [0ec6a73]
- Updated dependencies [85e3d22]
  - chat@4.37.0
## @chat-adapter/tests@4.37.0

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-08-07 18:30:01 +01:00
github-actions[bot] 470b6af94b chore(release): version packages (#748)
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @chat-adapter/slack@4.36.0

### Minor Changes

- 0153a39: Add `DateInput` and `NumberInput` modal children. The Slack
adapter renders them as a `datepicker` and a `number_input`, the Teams
adapter as `Input.Date` and `Input.Number`, and both submitted values
arrive in `event.values` as strings.

Teams submit values that arrive as JSON numbers are now stringified into
`event.values` instead of being dropped. This fixes `Input.Number`, but
applies to any numeric value a Teams dialog submits — a key that was
previously absent from `event.values` will now be present as a string.

### Patch Changes

- Updated dependencies [257a32d]
- Updated dependencies [c5d86b1]
- Updated dependencies [0153a39]
- Updated dependencies [b547f45]
- Updated dependencies [caa6325]
  - chat@4.36.0
  - @chat-adapter/shared@4.36.0
## @chat-adapter/teams@4.36.0

### Minor Changes

- 0153a39: Add `DateInput` and `NumberInput` modal children. The Slack
adapter renders them as a `datepicker` and a `number_input`, the Teams
adapter as `Input.Date` and `Input.Number`, and both submitted values
arrive in `event.values` as strings.

Teams submit values that arrive as JSON numbers are now stringified into
`event.values` instead of being dropped. This fixes `Input.Number`, but
applies to any numeric value a Teams dialog submits — a key that was
previously absent from `event.values` will now be present as a string.

### Patch Changes

- 257a32d: Route Teams personal and group conversations using their
explicit conversation type so group chats use buffered fallback even
when their IDs resemble direct messages.
- 3c37cfb: Authenticate connector-hosted inline attachments and parse
Teams file download cards.
- Updated dependencies [257a32d]
- Updated dependencies [c5d86b1]
- Updated dependencies [0153a39]
- Updated dependencies [b547f45]
- Updated dependencies [caa6325]
  - chat@4.36.0
  - @chat-adapter/shared@4.36.0
## @chat-adapter/x@4.36.0

### Minor Changes

- caa6325: Add XChat support to `@chat-adapter/x`, shipped from the new
`@chat-adapter/x/chat` subpath so it sits alongside the existing X
adapter. The XChat crypto stack (`@xdevplatform/chat-xdk`,
`@xdevplatform/xdk`, `juicebox-sdk`) is an optional peer dependency, so
existing `@chat-adapter/x` users are unaffected. All cryptography is
handled inside the adapter via `@xdevplatform/chat-xdk` (wasm) and all
REST goes through the typed `@xdevplatform/xdk` client. Only a bot token
and a Juicebox PIN are required: the bot's identity (user id and
@handle) is resolved from `GET /2/users/me` at startup.

- Encrypted send/receive in DMs and groups (webhook push + polling),
signature verification on by default; undecryptable or unverified events
are dropped
- Webhook POSTs must carry a valid `x-twitter-webhooks-signature`, which
X sends on every delivery. Set `consumerSecret` (or `X_CONSUMER_SECRET`)
to receive webhooks, or `disableWebhookVerification` when an upstream
layer already verifies them. Polling deployments are unaffected
- Mention detection from structured mention entities, swipe-replies to
the bot, and a plain-text `@handle` fallback; group replies sent as
quoted replies
- `openDM(userId)` starts (or reuses) an encrypted 1:1, running a full
key exchange when needed so the bot can message first
- Media both ways: inbound attachments with lazy download+decrypt,
outbound encrypted uploads
- Edit and delete of the bot's own messages; the first edit of a fresh
message is age-gated by `editSafetyDelayMs` (default 5000ms) so
receiving clients have stored the original
- Reactions in and out, read receipts (`sendReadReceipts`, default on),
typing keep-alive, configurable group welcome message
- Cards degrade to text with tappable URL/mention entities plus a URL
preview attachment
- Requests carry a `chat-sdk-xchat/<version>` User-Agent product token
so Chat SDK traffic is identifiable in X API request logs (a User-Agent
set via `apiHeaders` takes precedence)
- Registered in the `chat/adapters` catalog and the `create-chat-sdk`
CLI scaffold, with a new optional `importPath` catalog field for
adapters that ship on a subpath

### Patch Changes

- Updated dependencies [257a32d]
- Updated dependencies [c5d86b1]
- Updated dependencies [0153a39]
- Updated dependencies [b547f45]
- Updated dependencies [caa6325]
  - chat@4.36.0
  - @chat-adapter/shared@4.36.0
## chat@4.36.0

### Minor Changes

- c5d86b1: confine built-in agent read tools to the conversation being
handled, with an optional scope override
- 0153a39: Add `DateInput` and `NumberInput` modal children. The Slack
adapter renders them as a `datepicker` and a `number_input`, the Teams
adapter as `Input.Date` and `Input.Number`, and both submitted values
arrive in `event.values` as strings.

Teams submit values that arrive as JSON numbers are now stringified into
`event.values` instead of being dropped. This fixes `Input.Number`, but
applies to any numeric value a Teams dialog submits — a key that was
previously absent from `event.values` will now be present as a string.

### Patch Changes

- 257a32d: Route Teams personal and group conversations using their
explicit conversation type so group chats use buffered fallback even
when their IDs resemble direct messages.
- b547f45: Stop treating email addresses as bot mentions. A message
containing `jane@acme.com` no longer triggers a bot named `acme`,
because the `@` in `detectMention` must not follow a word character.
Real mentions are unaffected, including at the start of a message, after
punctuation, and suffixed names such as GitHub's `mybot[bot]`.
- caa6325: Add XChat support to `@chat-adapter/x`, shipped from the new
`@chat-adapter/x/chat` subpath so it sits alongside the existing X
adapter. The XChat crypto stack (`@xdevplatform/chat-xdk`,
`@xdevplatform/xdk`, `juicebox-sdk`) is an optional peer dependency, so
existing `@chat-adapter/x` users are unaffected. All cryptography is
handled inside the adapter via `@xdevplatform/chat-xdk` (wasm) and all
REST goes through the typed `@xdevplatform/xdk` client. Only a bot token
and a Juicebox PIN are required: the bot's identity (user id and
@handle) is resolved from `GET /2/users/me` at startup.

- Encrypted send/receive in DMs and groups (webhook push + polling),
signature verification on by default; undecryptable or unverified events
are dropped
- Webhook POSTs must carry a valid `x-twitter-webhooks-signature`, which
X sends on every delivery. Set `consumerSecret` (or `X_CONSUMER_SECRET`)
to receive webhooks, or `disableWebhookVerification` when an upstream
layer already verifies them. Polling deployments are unaffected
- Mention detection from structured mention entities, swipe-replies to
the bot, and a plain-text `@handle` fallback; group replies sent as
quoted replies
- `openDM(userId)` starts (or reuses) an encrypted 1:1, running a full
key exchange when needed so the bot can message first
- Media both ways: inbound attachments with lazy download+decrypt,
outbound encrypted uploads
- Edit and delete of the bot's own messages; the first edit of a fresh
message is age-gated by `editSafetyDelayMs` (default 5000ms) so
receiving clients have stored the original
- Reactions in and out, read receipts (`sendReadReceipts`, default on),
typing keep-alive, configurable group welcome message
- Cards degrade to text with tappable URL/mention entities plus a URL
preview attachment
- Requests carry a `chat-sdk-xchat/<version>` User-Agent product token
so Chat SDK traffic is identifiable in X API request logs (a User-Agent
set via `apiHeaders` takes precedence)
- Registered in the `chat/adapters` catalog and the `create-chat-sdk`
CLI scaffold, with a new optional `importPath` catalog field for
adapters that ship on a subpath
## @chat-adapter/discord@4.36.0

### Patch Changes

- Updated dependencies [257a32d]
- Updated dependencies [c5d86b1]
- Updated dependencies [0153a39]
- Updated dependencies [b547f45]
- Updated dependencies [caa6325]
  - chat@4.36.0
  - @chat-adapter/shared@4.36.0
## @chat-adapter/gchat@4.36.0

### Patch Changes

- Updated dependencies [257a32d]
- Updated dependencies [c5d86b1]
- Updated dependencies [0153a39]
- Updated dependencies [b547f45]
- Updated dependencies [caa6325]
  - chat@4.36.0
  - @chat-adapter/shared@4.36.0
## @chat-adapter/github@4.36.0

### Patch Changes

- Updated dependencies [257a32d]
- Updated dependencies [c5d86b1]
- Updated dependencies [0153a39]
- Updated dependencies [b547f45]
- Updated dependencies [caa6325]
  - chat@4.36.0
  - @chat-adapter/shared@4.36.0
## @chat-adapter/linear@4.36.0

### Patch Changes

- Updated dependencies [257a32d]
- Updated dependencies [c5d86b1]
- Updated dependencies [0153a39]
- Updated dependencies [b547f45]
- Updated dependencies [caa6325]
  - chat@4.36.0
  - @chat-adapter/shared@4.36.0
## @chat-adapter/messenger@4.36.0

### Patch Changes

- Updated dependencies [257a32d]
- Updated dependencies [c5d86b1]
- Updated dependencies [0153a39]
- Updated dependencies [b547f45]
- Updated dependencies [caa6325]
  - chat@4.36.0
  - @chat-adapter/shared@4.36.0
## @chat-adapter/shared@4.36.0

### Patch Changes

- Updated dependencies [257a32d]
- Updated dependencies [c5d86b1]
- Updated dependencies [0153a39]
- Updated dependencies [b547f45]
- Updated dependencies [caa6325]
  - chat@4.36.0
## @chat-adapter/telegram@4.36.0

### Patch Changes

- 53bf73d: Preserve Telegram stable media identifiers in normalized
attachment metadata and report photo attachments as JPEG.
- Updated dependencies [257a32d]
- Updated dependencies [c5d86b1]
- Updated dependencies [0153a39]
- Updated dependencies [b547f45]
- Updated dependencies [caa6325]
  - chat@4.36.0
  - @chat-adapter/shared@4.36.0
## @chat-adapter/twilio@4.36.0

### Patch Changes

- Updated dependencies [257a32d]
- Updated dependencies [c5d86b1]
- Updated dependencies [0153a39]
- Updated dependencies [b547f45]
- Updated dependencies [caa6325]
  - chat@4.36.0
  - @chat-adapter/shared@4.36.0
## @chat-adapter/web@4.36.0

### Patch Changes

- Updated dependencies [257a32d]
- Updated dependencies [c5d86b1]
- Updated dependencies [0153a39]
- Updated dependencies [b547f45]
- Updated dependencies [caa6325]
  - chat@4.36.0
  - @chat-adapter/shared@4.36.0
## @chat-adapter/whatsapp@4.36.0

### Patch Changes

- Updated dependencies [257a32d]
- Updated dependencies [c5d86b1]
- Updated dependencies [0153a39]
- Updated dependencies [b547f45]
- Updated dependencies [caa6325]
  - chat@4.36.0
  - @chat-adapter/shared@4.36.0
## create-chat-sdk@0.2.1

### Patch Changes

- caa6325: Add XChat support to `@chat-adapter/x`, shipped from the new
`@chat-adapter/x/chat` subpath so it sits alongside the existing X
adapter. The XChat crypto stack (`@xdevplatform/chat-xdk`,
`@xdevplatform/xdk`, `juicebox-sdk`) is an optional peer dependency, so
existing `@chat-adapter/x` users are unaffected. All cryptography is
handled inside the adapter via `@xdevplatform/chat-xdk` (wasm) and all
REST goes through the typed `@xdevplatform/xdk` client. Only a bot token
and a Juicebox PIN are required: the bot's identity (user id and
@handle) is resolved from `GET /2/users/me` at startup.

- Encrypted send/receive in DMs and groups (webhook push + polling),
signature verification on by default; undecryptable or unverified events
are dropped
- Webhook POSTs must carry a valid `x-twitter-webhooks-signature`, which
X sends on every delivery. Set `consumerSecret` (or `X_CONSUMER_SECRET`)
to receive webhooks, or `disableWebhookVerification` when an upstream
layer already verifies them. Polling deployments are unaffected
- Mention detection from structured mention entities, swipe-replies to
the bot, and a plain-text `@handle` fallback; group replies sent as
quoted replies
- `openDM(userId)` starts (or reuses) an encrypted 1:1, running a full
key exchange when needed so the bot can message first
- Media both ways: inbound attachments with lazy download+decrypt,
outbound encrypted uploads
- Edit and delete of the bot's own messages; the first edit of a fresh
message is age-gated by `editSafetyDelayMs` (default 5000ms) so
receiving clients have stored the original
- Reactions in and out, read receipts (`sendReadReceipts`, default on),
typing keep-alive, configurable group welcome message
- Cards degrade to text with tappable URL/mention entities plus a URL
preview attachment
- Requests carry a `chat-sdk-xchat/<version>` User-Agent product token
so Chat SDK traffic is identifiable in X API request logs (a User-Agent
set via `apiHeaders` takes precedence)
- Registered in the `chat/adapters` catalog and the `create-chat-sdk`
CLI scaffold, with a new optional `importPath` catalog field for
adapters that ship on a subpath
## @chat-adapter/state-ioredis@4.36.0

### Patch Changes

- Updated dependencies [257a32d]
- Updated dependencies [c5d86b1]
- Updated dependencies [0153a39]
- Updated dependencies [b547f45]
- Updated dependencies [caa6325]
  - chat@4.36.0
## @chat-adapter/state-memory@4.36.0

### Patch Changes

- Updated dependencies [257a32d]
- Updated dependencies [c5d86b1]
- Updated dependencies [0153a39]
- Updated dependencies [b547f45]
- Updated dependencies [caa6325]
  - chat@4.36.0
## @chat-adapter/state-pg@4.36.0

### Patch Changes

- Updated dependencies [257a32d]
- Updated dependencies [c5d86b1]
- Updated dependencies [0153a39]
- Updated dependencies [b547f45]
- Updated dependencies [caa6325]
  - chat@4.36.0
## @chat-adapter/state-redis@4.36.0

### Patch Changes

- Updated dependencies [257a32d]
- Updated dependencies [c5d86b1]
- Updated dependencies [0153a39]
- Updated dependencies [b547f45]
- Updated dependencies [caa6325]
  - chat@4.36.0
## @chat-adapter/tests@4.36.0

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-08-01 01:19:44 +01:00
github-actions[bot] e3c136b6dc chore(release): version packages (#710)
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @chat-adapter/discord@4.35.0

### Minor Changes

- 26c0522: Add an opt-in channel allowlist for treating non-bot Discord
messages as directed to the bot without requiring a mention. Configure
via `respondToChannelIds` or the `DISCORD_RESPOND_TO_CHANNEL_IDS` env
var (comma-separated).

### Patch Changes

- b605cf6: Preserve Discord's angle-bracket syntax for suppressing link
previews when rendering markdown.
- Updated dependencies [80def3a]
- Updated dependencies [4cb7e5d]
- Updated dependencies [46681f5]
- Updated dependencies [93a58af]
- Updated dependencies [25f3099]
  - chat@4.35.0
  - @chat-adapter/shared@4.35.0
## @chat-adapter/slack@4.35.0

### Minor Changes

- bb7cd12: Expose sender email addresses on normalized incoming Slack
message authors. `message.author.email` is populated from the same
cached `users.info` lookup used for display names and requires the
`users:read.email` scope; without it the field stays undefined.
- 907450d: Enterprise Grid fixes:

- `handleOAuthCallback` now handles org-wide installs
(`is_enterprise_install`): Slack returns `team: null` for these, and the
installation is now keyed by the enterprise ID — the same key webhook
token resolution looks up — instead of failing. The result includes
`enterpriseId` and `isEnterpriseInstall`, and `SlackInstallation`
records both.
- Socket mode now resolves per-installation tokens for events, slash
commands, and interactive payloads in multi-workspace deployments
(matching the HTTP webhook path), and no longer drops `enterprise_id` /
`is_enterprise_install` / `is_ext_shared_channel` from event payloads.
- The user profile cache and display-name mention reverse index are now
scoped by installation in multi-workspace deployments, so profiles
fetched with one workspace's token no longer bleed into another and
mentions can no longer resolve to a same-named user from a different
workspace. Existing cache entries repopulate on first lookup
(single-workspace keys are unchanged). `withBotToken` accepts an
optional `{ installationId }` so proactive/cron posts outside webhook
handling scope these caches too.
- API calls made while handling an event from an org-wide install now
pass the event's `team_id` explicitly, as Slack requires for
workspace-scoped methods (`conversations.list`, `usergroups.*`, …) on
org tokens. When an event carries a `context_team_id` (shared channels
hosted on an "away" workspace), channel-addressed calls echo it back as
`client_context_team_id`.
- Retried event deliveries (`x-slack-retry-num`, socket `retry_num`) are
dropped when the original delivery was already dispatched, using an
`event_id` marker in the state adapter (24-hour TTL). Events whose first
delivery never arrived are still recovered via the retry.
- Bare `@W…` mentions in outgoing messages are now recognized as raw
Enterprise Grid user IDs (previously only `@U…` was), so they render as
real mentions instead of being treated as display names.
- Event token resolution now prefers the envelope's `authorizations[0]`
— Slack's documented location for the event's installation identity —
over the top-level `team_id`/`enterprise_id`, which can name a different
workspace for Slack Connect shared-channel events. Top-level fields
remain as a fallback.

### Patch Changes

- 80def3a: Add optional `isSystem` field to the normalized message
`Author` type to distinguish platform-generated messages from humans and
bots. The Slack adapter now sets `isSystem: true` for messages authored
by Slack's reserved `USLACK` user (e.g. "@user archived the channel"
notifications in DMs), so consumers no longer need to hard-code
Slack-specific user IDs.
- 92530dd: Return a replyable Slack thread ID from `channel.post()` by
using the posted top-level message's timestamp as the thread root.
- Updated dependencies [80def3a]
- Updated dependencies [4cb7e5d]
- Updated dependencies [46681f5]
- Updated dependencies [93a58af]
- Updated dependencies [25f3099]
  - chat@4.35.0
  - @chat-adapter/shared@4.35.0
## @chat-adapter/teams@4.35.0

### Minor Changes

- 5eb8b84: Add support for adding and removing reactions from Microsoft
Teams messages.
- 46681f5: Expose Microsoft Graph email addresses on normalized incoming
Teams message authors. Resolved user profiles are cached in the state
adapter (1 hour, failed lookups 5 minutes) so the lookup doesn't add a
Graph call per message.
- 160140e: Add native Microsoft Teams targeted message support via
`thread.postEphemeral()` and `channel.postEphemeral()`.
- e06b4b6: Add a `token` config option to `TeamsAdapterConfig` for
supplying a custom token factory, forwarded to the Teams SDK's
`AppOptions.token`. This lets bots authenticate on runtimes that can't
reach Azure IMDS (so `federated` managed identity isn't reachable) but
can still mint access tokens through an external mechanism, without
needing a static client secret.

### Patch Changes

- 3895ab3: Fall back to Microsoft Graph's user principal name when a
Teams user has no mail address.
- 93a58af: Show explicitly configured progress as a native Teams DM
status while preserving native streaming.
- Updated dependencies [80def3a]
- Updated dependencies [4cb7e5d]
- Updated dependencies [46681f5]
- Updated dependencies [93a58af]
- Updated dependencies [25f3099]
  - chat@4.35.0
  - @chat-adapter/shared@4.35.0
## @chat-adapter/telegram@4.35.0

### Minor Changes

- 54eea71: Add an optional Telegram user allowlist via `allowedUserIds`
or the comma-separated `TELEGRAM_ALLOWED_USER_IDS` environment variable.

### Patch Changes

- 0701679: Cache the compiled bot-mention regex in `isBotMentioned`
instead of recompiling it per message, and make the protected `sleep`
helper accept an optional `AbortSignal` so `stopPolling()` interrupts
the polling backoff delay immediately.
- Updated dependencies [80def3a]
- Updated dependencies [4cb7e5d]
- Updated dependencies [46681f5]
- Updated dependencies [93a58af]
- Updated dependencies [25f3099]
  - chat@4.35.0
  - @chat-adapter/shared@4.35.0
## chat@4.35.0

### Minor Changes

- 4cb7e5d: Add a `chat/workflow` subpath with `requestApproval()`:
durable human-in-the-loop approvals built on Workflow SDK. It posts an
approval card with Approve/Deny buttons, suspends the workflow until a
user decides (or an optional timeout elapses), validates approvers,
finalizes the card with the outcome, and returns `{ approved, timedOut,
user }`. Also exports the `buildApprovalCard` and `buildResolvedCard`
builders. Requires the new optional `workflow` peer dependency.
- 46681f5: Expose Microsoft Graph email addresses on normalized incoming
Teams message authors. Resolved user profiles are cached in the state
adapter (1 hour, failed lookups 5 minutes) so the lookup doesn't add a
Graph call per message.

### Patch Changes

- 80def3a: Add optional `isSystem` field to the normalized message
`Author` type to distinguish platform-generated messages from humans and
bots. The Slack adapter now sets `isSystem: true` for messages authored
by Slack's reserved `USLACK` user (e.g. "@user archived the channel"
notifications in DMs), so consumers no longer need to hard-code
Slack-specific user IDs.
- 93a58af: Show explicitly configured progress as a native Teams DM
status while preserving native streaming.
- 25f3099: `toAiMessages` no longer drops messages that have no text. A
message with an empty text body is now kept when it has links or
attachments the converter can include: images and text files (`text/*`,
JSON, XML, YAML, etc.) with a working `fetchData()`. Messages whose only
attachments are unsupported (video, audio, other file types, or
attachments without `fetchData()`) are still skipped, and
`onUnsupportedAttachment` now fires for video/audio attachments on these
previously filtered messages.

Note: multipart `content` no longer always starts with a text part. When
a kept message had no text, its `content` array contains only attachment
parts.
## @chat-adapter/gchat@4.35.0

### Patch Changes

- 270b1c2: fix(gchat): accept `endpointUrl` as a direct-webhook verifier
and verify each token type correctly

When a Google Chat app's connection setting **Authentication audience**
is set
to **HTTP endpoint URL** — Google's recommended option for HTTP-hosted
apps
not behind Cloud Run IAM, and the only mode available for Workspace
Add-on
Chat apps — incoming tokens are Google OIDC ID tokens whose `aud` is the
endpoint URL rather than the GCP project number. Previously the adapter
only
verified against `googleChatProjectNumber`, so URL-audience tokens
always
failed with 401 Unauthorized. The adapter now accepts `endpointUrl` as a
direct-webhook verifier (including in the constructor's fail-closed
check),
validating the OIDC token's audience plus the Google Chat issuer email
claims
  (`chat@system.gserviceaccount.com`, or the
`service-{projectNumber}@gcp-sa-gsuiteaddons.iam.gserviceaccount.com`
service
identity for Workspace Add-on Chat apps) with `email_verified: true` — a
public endpoint URL audience alone is not sufficient to forge a request.

  Project-number-audience tokens are now verified per Google's reference
  implementation: they are JWTs self-signed by
`chat@system.gserviceaccount.com`, so the adapter checks them against
that
  service account's X.509 certificates with issuer
`chat@system.gserviceaccount.com` (previously it used `verifyIdToken`,
which
only accepts Google OIDC issuers and certs and therefore rejected every
real
project-number token). When both verifiers are configured, either token
type
  is accepted.

  The adapter still infers an endpoint URL from incoming requests for
button-click action routing only — that inferred value is never used as
a
JWT verification audience, and inference now only happens after a
request
has passed verification (or verification was explicitly disabled),
because
  `request.url` derives from the attacker-controllable `Host` header in
  serverless runtimes.

- Updated dependencies [80def3a]
- Updated dependencies [4cb7e5d]
- Updated dependencies [46681f5]
- Updated dependencies [93a58af]
- Updated dependencies [25f3099]
  - chat@4.35.0
  - @chat-adapter/shared@4.35.0
## @chat-adapter/github@4.35.0

### Patch Changes

- Updated dependencies [80def3a]
- Updated dependencies [4cb7e5d]
- Updated dependencies [46681f5]
- Updated dependencies [93a58af]
- Updated dependencies [25f3099]
  - chat@4.35.0
  - @chat-adapter/shared@4.35.0
## @chat-adapter/linear@4.35.0

### Patch Changes

- Updated dependencies [80def3a]
- Updated dependencies [4cb7e5d]
- Updated dependencies [46681f5]
- Updated dependencies [93a58af]
- Updated dependencies [25f3099]
  - chat@4.35.0
  - @chat-adapter/shared@4.35.0
## @chat-adapter/messenger@4.35.0

### Patch Changes

- Updated dependencies [80def3a]
- Updated dependencies [4cb7e5d]
- Updated dependencies [46681f5]
- Updated dependencies [93a58af]
- Updated dependencies [25f3099]
  - chat@4.35.0
  - @chat-adapter/shared@4.35.0
## @chat-adapter/shared@4.35.0

### Patch Changes

- Updated dependencies [80def3a]
- Updated dependencies [4cb7e5d]
- Updated dependencies [46681f5]
- Updated dependencies [93a58af]
- Updated dependencies [25f3099]
  - chat@4.35.0
## @chat-adapter/twilio@4.35.0

### Patch Changes

- Updated dependencies [80def3a]
- Updated dependencies [4cb7e5d]
- Updated dependencies [46681f5]
- Updated dependencies [93a58af]
- Updated dependencies [25f3099]
  - chat@4.35.0
  - @chat-adapter/shared@4.35.0
## @chat-adapter/web@4.35.0

### Patch Changes

- Updated dependencies [80def3a]
- Updated dependencies [4cb7e5d]
- Updated dependencies [46681f5]
- Updated dependencies [93a58af]
- Updated dependencies [25f3099]
  - chat@4.35.0
  - @chat-adapter/shared@4.35.0
## @chat-adapter/whatsapp@4.35.0

### Patch Changes

- 09b72e9: fix whatsapp card media duplication

- Prevent card titles and body content from appearing twice when sending
cards with files on WhatsApp.
- Avoid adding the full card fallback text as an image caption when an
interactive message follows.
- Keep interactive WhatsApp messages responsible for rendering card
titles, bodies, and actions.

- Updated dependencies [80def3a]
- Updated dependencies [4cb7e5d]
- Updated dependencies [46681f5]
- Updated dependencies [93a58af]
- Updated dependencies [25f3099]
  - chat@4.35.0
  - @chat-adapter/shared@4.35.0
## @chat-adapter/x@4.35.0

### Patch Changes

- Updated dependencies [80def3a]
- Updated dependencies [4cb7e5d]
- Updated dependencies [46681f5]
- Updated dependencies [93a58af]
- Updated dependencies [25f3099]
  - chat@4.35.0
  - @chat-adapter/shared@4.35.0
## @chat-adapter/state-ioredis@4.35.0

### Patch Changes

- Updated dependencies [80def3a]
- Updated dependencies [4cb7e5d]
- Updated dependencies [46681f5]
- Updated dependencies [93a58af]
- Updated dependencies [25f3099]
  - chat@4.35.0
## @chat-adapter/state-memory@4.35.0

### Patch Changes

- Updated dependencies [80def3a]
- Updated dependencies [4cb7e5d]
- Updated dependencies [46681f5]
- Updated dependencies [93a58af]
- Updated dependencies [25f3099]
  - chat@4.35.0
## @chat-adapter/state-pg@4.35.0

### Patch Changes

- d88789c: Fix `setIfNotExists()` so it can claim a cache key whose
existing row has expired. Previously the query used `ON CONFLICT DO
NOTHING`, so an expired row in `chat_state_cache` still blocked
acquisition until opportunistic cleanup deleted it — diverging from the
memory and Redis adapters, which treat expired entries as absent. Keys
stored without a TTL remain permanent and are never overwritten.
- Updated dependencies [80def3a]
- Updated dependencies [4cb7e5d]
- Updated dependencies [46681f5]
- Updated dependencies [93a58af]
- Updated dependencies [25f3099]
  - chat@4.35.0
## @chat-adapter/state-redis@4.35.0

### Patch Changes

- Updated dependencies [80def3a]
- Updated dependencies [4cb7e5d]
- Updated dependencies [46681f5]
- Updated dependencies [93a58af]
- Updated dependencies [25f3099]
  - chat@4.35.0
## @chat-adapter/tests@4.35.0

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-07-24 22:21:13 +01:00
github-actions[bot] f84b5911e7 chore(release): version packages (#695)
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @chat-adapter/discord@4.34.0

### Minor Changes

- 0fdb902: Add opt-in Discord Components v2 rendering for Chat SDK cards
via `contentFormat: DiscordContentFormat.ComponentsV2`.
- 5341f90: Ignore `@everyone`/`@here` pings by default in gateway mode.
Previously the legacy gateway listener treated global pings as bot
mentions, so the bot responded to announcements. A new
`respondToGlobalMentions` config option (default `false`) restores the
old behavior when enabled, and also lets forwarded gateway messages opt
in via the `mention_everyone` field.
- 6c2a391: Add support for renaming native Discord thread channels.

### Patch Changes

- Updated dependencies [5c926f1]
- Updated dependencies [2531a42]
- Updated dependencies [1721fa0]
- Updated dependencies [4717a38]
- Updated dependencies [6714efc]
  - chat@4.34.0
  - @chat-adapter/shared@4.34.0
## @chat-adapter/slack@4.34.0

### Minor Changes

- 1721fa0: Add support for Slack's Agent messaging experience
(`agent_view`).

- New core event `onAppContextChanged` with a normalized
`AppContextEntity[]` describing the user's active view (channel / canvas
/ list / message / unknown).
- `AppHomeOpenedEvent` now carries the folded active-view context as
`entities` and the opened `tab` (Slack: `"home"` / `"messages"`), so
handlers can tell a Home-tab open from the DM-open signal under
`agent_view`.
- Slack adapter: new `agentView` config flag (under `agent_view`,
`app_home_opened` is the DM-open signal regardless of tab and folded
context is surfaced), routing for the `app_context_changed` event, and a
`getAppContext(message)` helper to read the folded context on DM
messages.
- `setSuggestedPrompts` now accepts an optional thread reference
(agent_view lets prompts sit at the top of the agent conversation).
- Under `agentView`, DM (Messages-tab) messages are threaded per new
Slack's model — each user message is a thread root (`thread_ts ?? ts`).
Conversation-scoped threads returned by `openDM()` keep working: when
that thread is subscribed, incoming top-level DM messages route to it.
- `createSlackAdapter` env auth fallback (`SLACK_BOT_TOKEN` /
`SLACK_CLIENT_ID` / `SLACK_CLIENT_SECRET`) is now disabled only when an
auth or verification field (`botToken`, `clientId`, `clientSecret`,
`installationProvider`, `signingSecret`, `webhookVerifier`) is passed
explicitly, instead of by any config object — so `createSlackAdapter({
agentView: true })` still picks up env credentials, while
explicit-secret configs stay immune to ambient env vars.
- Bumped `@slack/web-api` to `^7.18.0` (adds the optional `thread_ts`
typing for `setSuggestedPrompts`).

- 4717a38: Add chart support and richer table rendering, with native
Slack data table and data visualization blocks.

- New core `ChartElement` and `Chart()` builder (JSX supported) with
pie, bar, area, and line charts, mirroring Slack's data visualization
model: pie charts take `segments`, series charts take named `series`
plotted against shared `categories` with optional `xLabel`/`yLabel`.
- `TableElement` / `Table()` gain optional `caption` (accessible table
description) and `pageSize` (rows per page) fields.
- Charts degrade gracefully on platforms without native chart support:
the underlying data renders as a text table via the shared card fallback
(new `chartElementToFallbackText` helper).
- Slack adapter: card tables now render as [data table
blocks](https://docs.slack.dev/reference/block-kit/blocks/data-table-block)
by default — paginated and sortable — instead of plain table blocks.
Header-only tables keep the plain table block; tables exceeding Slack
limits (100 data rows, 20 columns, 10,000 characters) fall back to ASCII
as before.
- Slack adapter: card charts render as [data visualization
blocks](https://docs.slack.dev/reference/block-kit/blocks/data-visualization-block).
Charts violating Slack constraints (50-character title, 12
segments/series, 20 categories, 20-character labels, one data point per
category, max 2 charts per message) fall back to a text rendering
instead of being rejected by the API.
- The `@chat-adapter/slack/blocks` subpath gets the same treatment:
`SlackChartElement` types, `chart` card children, data table rendering,
and matching limits.
- `postMessage` now surfaces Slack's per-block validation details when
the API rejects blocks (`invalid_blocks`), instead of the bare "An API
error occurred" message.

- 0f743c9: Add declarative agent-experience config and harden native
streaming:

- `suggestedPrompts` — a static payload or per-thread resolver, applied
automatically when an assistant/agent thread opens
(`assistant_thread_started` in legacy `assistant_view`, or a
Messages-tab `app_home_opened` under `agentView`, where prompts pin at
the top of the agent conversation without a `thread_ts`). The resolver
receives the thread context (`channelId`, `userId`, legacy
`threadTs`/`teamId`/`enterpriseId`, and active-view `entities` under
`agentView`); returning `null`/`undefined` skips the thread. Prompts
beyond Slack's 4-prompt limit are dropped with a warning, and
resolver/API failures are logged without failing the webhook.
- `loadingMessages` — default rotating status strings for the assistant
thinking indicator, used by `startTyping` and `setAssistantStatus` when
no explicit status/messages are passed.
- `nativeStreaming` config (default `true`). Set `false` on Slack
flavours without the `chat.startStream` family (e.g. GovSlack) to always
stream via post-and-edit.
- If the workspace rejects the first native streaming call, `stream()`
now falls back to throttled post-and-edit mid-stream instead of failing
the reply; already-consumed text is preserved. Permanent platform errors
(`unknown_method`, `method_deprecated`, `feature_not_enabled`) latch
native streaming off for subsequent streams on the adapter instance.
Structured chunks (`task_update` / `plan_update`) are skipped in
fallback mode.

- `feedbackButtons` — append Slack's native thumbs up/down
(`context_actions` + `feedback_buttons` block) to every streamed reply.
Pass `true` for defaults or an options object (`actionId`, labels,
values); clicks dispatch through `bot.onAction` with a positive/negative
value. A `buildFeedbackButtonsBlock(options?)` helper is exported for
attaching the block to non-streamed messages.

New exported types: `SlackFeedbackButtonsOptions`,
`SlackSuggestedPrompt`, `SlackSuggestedPrompts`,
`SlackSuggestedPromptsContext`, `SlackSuggestedPromptsOptions`.

### Patch Changes

- Updated dependencies [5c926f1]
- Updated dependencies [2531a42]
- Updated dependencies [1721fa0]
- Updated dependencies [4717a38]
- Updated dependencies [6714efc]
  - chat@4.34.0
  - @chat-adapter/shared@4.34.0
## @chat-adapter/telegram@4.34.0

### Minor Changes

- 8d7ccdb: Add Telegram media group uploads for multiple files and
attachments.

### Patch Changes

- 2531a42: Fix `detectMention` (and the Telegram adapter's
`isBotMentioned`) falsely matching `@bot` when `@bot-dev` is mentioned.
`\b` (word boundary) matches between a word character and a hyphen, so
`/@bot\b/` incorrectly matches `@bot-dev`. Replaced with `(?![\w-])` to
exclude hyphens.
- Updated dependencies [5c926f1]
- Updated dependencies [2531a42]
- Updated dependencies [1721fa0]
- Updated dependencies [4717a38]
- Updated dependencies [6714efc]
  - chat@4.34.0
  - @chat-adapter/shared@4.34.0
## @chat-adapter/web@4.34.0

### Minor Changes

- 6714efc: Support AI SDK v7 as a peer dependency.

- `chat` now accepts `ai@^6.0.182 || ^7.0.0` (`chat/ai` tools work with
both majors).
- `@chat-adapter/web` now accepts `ai@^6 || ^7`, `@ai-sdk/react@^3 ||
^4`, `@ai-sdk/svelte@^4 || ^5`, and `@ai-sdk/vue@^3 || ^4`.
- The `chat/ai` tool factories now declare explicit `Tool<Input,
Output>` return types instead of relying on inference, so the published
declarations no longer depend on `ai` internals that changed in v7. The
public type surface is unchanged.

### Patch Changes

- Updated dependencies [5c926f1]
- Updated dependencies [2531a42]
- Updated dependencies [1721fa0]
- Updated dependencies [4717a38]
- Updated dependencies [6714efc]
  - chat@4.34.0
  - @chat-adapter/shared@4.34.0
## @chat-adapter/whatsapp@4.34.0

### Minor Changes

- 2338a66: Add `sendTemplate()` for sending pre-approved template
messages, enabling business-initiated conversations outside the 24-hour
customer service window
- 8bd8a57: Implement outbound file and attachment sending for the
WhatsApp adapter.

Supports binary `FileUpload` uploads, typed `Attachment` payloads
(binary or HTTPS link passthrough), multi-file sequential sends, smart
MIME-to-message-type mapping, caption placement with audio/long-text
fallbacks, and card+file sequencing.

### Patch Changes

- Updated dependencies [5c926f1]
- Updated dependencies [2531a42]
- Updated dependencies [1721fa0]
- Updated dependencies [4717a38]
- Updated dependencies [6714efc]
  - chat@4.34.0
  - @chat-adapter/shared@4.34.0
## @chat-adapter/x@4.34.0

### Minor Changes

- 4bca64f: add image upload support to X posts and DMs via the chunked
media upload endpoints

### Patch Changes

- Updated dependencies [5c926f1]
- Updated dependencies [2531a42]
- Updated dependencies [1721fa0]
- Updated dependencies [4717a38]
- Updated dependencies [6714efc]
  - chat@4.34.0
  - @chat-adapter/shared@4.34.0
## chat@4.34.0

### Minor Changes

- 1721fa0: Add support for Slack's Agent messaging experience
(`agent_view`).

- New core event `onAppContextChanged` with a normalized
`AppContextEntity[]` describing the user's active view (channel / canvas
/ list / message / unknown).
- `AppHomeOpenedEvent` now carries the folded active-view context as
`entities` and the opened `tab` (Slack: `"home"` / `"messages"`), so
handlers can tell a Home-tab open from the DM-open signal under
`agent_view`.
- Slack adapter: new `agentView` config flag (under `agent_view`,
`app_home_opened` is the DM-open signal regardless of tab and folded
context is surfaced), routing for the `app_context_changed` event, and a
`getAppContext(message)` helper to read the folded context on DM
messages.
- `setSuggestedPrompts` now accepts an optional thread reference
(agent_view lets prompts sit at the top of the agent conversation).
- Under `agentView`, DM (Messages-tab) messages are threaded per new
Slack's model — each user message is a thread root (`thread_ts ?? ts`).
Conversation-scoped threads returned by `openDM()` keep working: when
that thread is subscribed, incoming top-level DM messages route to it.
- `createSlackAdapter` env auth fallback (`SLACK_BOT_TOKEN` /
`SLACK_CLIENT_ID` / `SLACK_CLIENT_SECRET`) is now disabled only when an
auth or verification field (`botToken`, `clientId`, `clientSecret`,
`installationProvider`, `signingSecret`, `webhookVerifier`) is passed
explicitly, instead of by any config object — so `createSlackAdapter({
agentView: true })` still picks up env credentials, while
explicit-secret configs stay immune to ambient env vars.
- Bumped `@slack/web-api` to `^7.18.0` (adds the optional `thread_ts`
typing for `setSuggestedPrompts`).

- 4717a38: Add chart support and richer table rendering, with native
Slack data table and data visualization blocks.

- New core `ChartElement` and `Chart()` builder (JSX supported) with
pie, bar, area, and line charts, mirroring Slack's data visualization
model: pie charts take `segments`, series charts take named `series`
plotted against shared `categories` with optional `xLabel`/`yLabel`.
- `TableElement` / `Table()` gain optional `caption` (accessible table
description) and `pageSize` (rows per page) fields.
- Charts degrade gracefully on platforms without native chart support:
the underlying data renders as a text table via the shared card fallback
(new `chartElementToFallbackText` helper).
- Slack adapter: card tables now render as [data table
blocks](https://docs.slack.dev/reference/block-kit/blocks/data-table-block)
by default — paginated and sortable — instead of plain table blocks.
Header-only tables keep the plain table block; tables exceeding Slack
limits (100 data rows, 20 columns, 10,000 characters) fall back to ASCII
as before.
- Slack adapter: card charts render as [data visualization
blocks](https://docs.slack.dev/reference/block-kit/blocks/data-visualization-block).
Charts violating Slack constraints (50-character title, 12
segments/series, 20 categories, 20-character labels, one data point per
category, max 2 charts per message) fall back to a text rendering
instead of being rejected by the API.
- The `@chat-adapter/slack/blocks` subpath gets the same treatment:
`SlackChartElement` types, `chart` card children, data table rendering,
and matching limits.
- `postMessage` now surfaces Slack's per-block validation details when
the API rejects blocks (`invalid_blocks`), instead of the bare "An API
error occurred" message.

- 6714efc: Support AI SDK v7 as a peer dependency.

- `chat` now accepts `ai@^6.0.182 || ^7.0.0` (`chat/ai` tools work with
both majors).
- `@chat-adapter/web` now accepts `ai@^6 || ^7`, `@ai-sdk/react@^3 ||
^4`, `@ai-sdk/svelte@^4 || ^5`, and `@ai-sdk/vue@^3 || ^4`.
- The `chat/ai` tool factories now declare explicit `Tool<Input,
Output>` return types instead of relying on inference, so the published
declarations no longer depend on `ai` internals that changed in v7. The
public type surface is unchanged.

### Patch Changes

- 5c926f1: Preserve markdown structural whitespace when extracting
normalized message text.
- 2531a42: Fix `detectMention` (and the Telegram adapter's
`isBotMentioned`) falsely matching `@bot` when `@bot-dev` is mentioned.
`\b` (word boundary) matches between a word character and a hyphen, so
`/@bot\b/` incorrectly matches `@bot-dev`. Replaced with `(?![\w-])` to
exclude hyphens.
## @chat-adapter/gchat@4.34.0

### Patch Changes

- Updated dependencies [5c926f1]
- Updated dependencies [2531a42]
- Updated dependencies [1721fa0]
- Updated dependencies [4717a38]
- Updated dependencies [6714efc]
  - chat@4.34.0
  - @chat-adapter/shared@4.34.0
## @chat-adapter/github@4.34.0

### Patch Changes

- Updated dependencies [5c926f1]
- Updated dependencies [2531a42]
- Updated dependencies [1721fa0]
- Updated dependencies [4717a38]
- Updated dependencies [6714efc]
  - chat@4.34.0
  - @chat-adapter/shared@4.34.0
## @chat-adapter/linear@4.34.0

### Patch Changes

- Updated dependencies [5c926f1]
- Updated dependencies [2531a42]
- Updated dependencies [1721fa0]
- Updated dependencies [4717a38]
- Updated dependencies [6714efc]
  - chat@4.34.0
  - @chat-adapter/shared@4.34.0
## @chat-adapter/messenger@4.34.0

### Patch Changes

- Updated dependencies [5c926f1]
- Updated dependencies [2531a42]
- Updated dependencies [1721fa0]
- Updated dependencies [4717a38]
- Updated dependencies [6714efc]
  - chat@4.34.0
  - @chat-adapter/shared@4.34.0
## @chat-adapter/shared@4.34.0

### Patch Changes

- Updated dependencies [5c926f1]
- Updated dependencies [2531a42]
- Updated dependencies [1721fa0]
- Updated dependencies [4717a38]
- Updated dependencies [6714efc]
  - chat@4.34.0
## @chat-adapter/teams@4.34.0

### Patch Changes

- Updated dependencies [5c926f1]
- Updated dependencies [2531a42]
- Updated dependencies [1721fa0]
- Updated dependencies [4717a38]
- Updated dependencies [6714efc]
  - chat@4.34.0
  - @chat-adapter/shared@4.34.0
## @chat-adapter/twilio@4.34.0

### Patch Changes

- Updated dependencies [5c926f1]
- Updated dependencies [2531a42]
- Updated dependencies [1721fa0]
- Updated dependencies [4717a38]
- Updated dependencies [6714efc]
  - chat@4.34.0
  - @chat-adapter/shared@4.34.0
## @chat-adapter/state-ioredis@4.34.0

### Patch Changes

- Updated dependencies [5c926f1]
- Updated dependencies [2531a42]
- Updated dependencies [1721fa0]
- Updated dependencies [4717a38]
- Updated dependencies [6714efc]
  - chat@4.34.0
## @chat-adapter/state-memory@4.34.0

### Patch Changes

- Updated dependencies [5c926f1]
- Updated dependencies [2531a42]
- Updated dependencies [1721fa0]
- Updated dependencies [4717a38]
- Updated dependencies [6714efc]
  - chat@4.34.0
## @chat-adapter/state-pg@4.34.0

### Patch Changes

- Updated dependencies [5c926f1]
- Updated dependencies [2531a42]
- Updated dependencies [1721fa0]
- Updated dependencies [4717a38]
- Updated dependencies [6714efc]
  - chat@4.34.0
## @chat-adapter/state-redis@4.34.0

### Patch Changes

- Updated dependencies [5c926f1]
- Updated dependencies [2531a42]
- Updated dependencies [1721fa0]
- Updated dependencies [4717a38]
- Updated dependencies [6714efc]
  - chat@4.34.0
## @chat-adapter/tests@4.34.0

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-07-13 16:41:59 +01:00
Remon Oldenbeuving 5c926f1987 fix(chat): preserve markdown whitespace in plain text (#604)
## Problem
When I mention a Chat SDK-powered bot on GitHub like this:

```
@bot
hi there!
```

The mention doesn't trigger any handling, because the `mdastToString`
helper replaces all newlines with an empty string, so the logs look like
this:

```
[chat-sdk] Checking message patterns { patternCount: 0, patterns: [], messageText: '@bothi there' }
[chat-sdk] No handlers matched message {
  threadId: 'github:RSO/chat:issue:29',
  text: '@bothi there'
}
```

## Summary
- Preserve structural markdown whitespace when extracting normalized
plain text from mdast.
- Add regression coverage for newline-separated bot mentions in core
markdown extraction, GitHub issue/review comments, and Chat mention
routing.
- Add a patch changeset for the behavior fix.

## Testing
- `pnpm check`
- `pnpm knip`
- `pnpm test:workspace`
- `pnpm --filter chat test`
- `pnpm --filter @chat-adapter/github test`
- `pnpm --filter chat typecheck`
- `pnpm --filter @chat-adapter/github typecheck`

## Notes
- `pnpm validate` was attempted and reached the full Turbo test graph,
but failed on `packages/integration-tests/src/replay-discord.test.ts`
(`should skip bot's own messages in subscribed threads`). Rerunning
`pnpm --filter @chat-adapter/integration-tests test --
src/replay-discord.test.ts` passed, so this appears unrelated to the
markdown whitespace change.
- `.github/CONTRIBUTING.md` requires signed commits. This environment
has no `gpg` binary and no SSH signing identities loaded, so the commit
in this PR is currently unsigned and may need to be re-signed before
merge.

---------

Signed-off-by: dancer <josh@afterima.ge>
Co-authored-by: dancer <josh@afterima.ge>
2026-07-13 13:40:17 +01:00
github-actions[bot] b1940d2374 chore(release): version packages (#660)
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @chat-adapter/github@4.33.0

### Minor Changes

- 6750d59: Add Vercel Connect support to the GitHub adapter. A new
`installationToken` config option (string or resolver) supplies
installation access tokens directly, skipping the GitHub App private-key
JWT exchange, and an optional `webhookVerifier` verifies inbound
webhooks (e.g. Connect trigger-forwarded requests via a Vercel OIDC
token) in place of the GitHub webhook secret. Pair with
`connectGitHubAdapter()` from `@vercel/connect/chat`.

`botUserId` now also auto-detects from the `GITHUB_BOT_USER_ID` env var,
and the adapter learns its bot user id from the first comment it posts.
In Connect mode (where the bot user id can't be auto-detected from an
installation token) set `botUserId` / `GITHUB_BOT_USER_ID` to enable
self-message detection and avoid the adapter replying to its own
comments.

Note: the `connectGitHubAdapter()` helper ships in `@vercel/connect` —
release this adapter together with (or after) the `@vercel/connect`
version that adds the `@vercel/connect/chat` subpath so the documented
helper resolves.

### Patch Changes

- Updated dependencies [3abdc69]
- Updated dependencies [0b63791]
- Updated dependencies [0c761f1]
- Updated dependencies [ef2542c]
- Updated dependencies [24a04d5]
- Updated dependencies [d4c52ca]
- Updated dependencies [076fe5d]
  - chat@4.33.0
  - @chat-adapter/shared@4.33.0
## @chat-adapter/linear@4.33.0

### Minor Changes

- 4115c94: Add Vercel Connect support to the Linear adapter. The
`accessToken` config option now accepts a resolver (`() => string |
Promise<string>`) in addition to a string, so tokens can be sourced from
Vercel Connect at runtime, and a new optional `webhookVerifier` verifies
inbound webhooks (e.g. Connect trigger-forwarded requests via a Vercel
OIDC token) in place of the Linear webhook secret. Pair with
`connectLinearAdapter()` from `@vercel/connect/chat`. Connect-mode
outbound calls outside webhook handling are supported via
`withInstallation(organizationId, fn)`.

Note: the `connectLinearAdapter()` helper ships in `@vercel/connect` —
release this adapter together with (or after) the `@vercel/connect`
version that adds the `@vercel/connect/chat` subpath so the documented
helper resolves.

### Patch Changes

- Updated dependencies [3abdc69]
- Updated dependencies [0b63791]
- Updated dependencies [0c761f1]
- Updated dependencies [ef2542c]
- Updated dependencies [24a04d5]
- Updated dependencies [d4c52ca]
- Updated dependencies [076fe5d]
  - chat@4.33.0
  - @chat-adapter/shared@4.33.0
## @chat-adapter/shared@4.33.0

### Minor Changes

- d4c52ca: add `replaceBareMentions`, a context-aware bare-`@mention`
resolver that skips code spans, URLs, schemeless hosts, and existing
angle-bracket tokens before handing each real `@name` to a
platform-specific replacer

### Patch Changes

- Updated dependencies [3abdc69]
- Updated dependencies [0b63791]
- Updated dependencies [0c761f1]
- Updated dependencies [ef2542c]
- Updated dependencies [24a04d5]
- Updated dependencies [076fe5d]
  - chat@4.33.0
## @chat-adapter/x@4.33.0

### Minor Changes

- ef2542c: add X (Twitter) adapter: reply to public mentions, send and
receive direct messages, post and edit from the bot account, and like
posts, using the X API v2 with OAuth 2.0 and managed token refresh

### Patch Changes

- Updated dependencies [3abdc69]
- Updated dependencies [0b63791]
- Updated dependencies [0c761f1]
- Updated dependencies [ef2542c]
- Updated dependencies [24a04d5]
- Updated dependencies [d4c52ca]
- Updated dependencies [076fe5d]
  - chat@4.33.0
  - @chat-adapter/shared@4.33.0
## chat@4.33.0

### Minor Changes

- ef2542c: add X (Twitter) adapter: reply to public mentions, send and
receive direct messages, post and edit from the bot account, and like
posts, using the X API v2 with OAuth 2.0 and managed token refresh

### Patch Changes

- 3abdc69: docs(adapters): add Cloudflare Agents as a vendor-official
state adapter (`agents/chat-sdk`) to the catalog and docs listing. It is
hidden from the create-chat-sdk CLI (Worker/Durable Objects runtime),
and the interactive state picker now filters out CLI-incompatible state
adapters.
- 0b63791: Raise the default message dedupe TTL from 5 to 10 minutes so
it outlives the longest platform redelivery window. Slack's Events API
retries up to ~5 minutes after the original delivery — exactly at the
old TTL boundary, where a retried event could miss the expired dedupe
entry from its first processing and be handled twice. Configurable
behavior is unchanged (`dedupeTtlMs` still overrides).
- 0c761f1: docs(adapters): add Dial as a vendor-official adapter
(`@getdial/chat-sdk-adapter`) to the catalog, docs listing, and CLI
scaffold spec
- 24a04d5: docs(adapters): add Photon as a vendor-official adapter
(`@photon-ai/chat-adapter-imessage`) to the catalog, docs listing, and
CLI scaffold spec
- 076fe5d: preserve skipped mention routing for debounce and message
patterns
## create-chat-sdk@0.2.0

### Minor Changes

- ba375ce: Add Vercel Connect support to the scaffolder. Pass
`--connect` (or choose **Vercel Connect** at the new interactive
auth-mode prompt) to authenticate the Slack, GitHub, and Linear adapters
with a Vercel Connect connector instead of stored provider secrets. The
generated `src/lib/bot.ts` spreads the matching helper from
`@vercel/connect/chat` into the adapter factory, `@vercel/connect` is
added to dependencies, and `.env.example` lists each connector UID (for
example `SLACK_CONNECTOR`) plus the recommended `GITHUB_BOT_USER_ID` for
GitHub, in place of native secrets.
- ef2542c: add X (Twitter) adapter: reply to public mentions, send and
receive direct messages, post and edit from the bot account, and like
posts, using the X API v2 with OAuth 2.0 and managed token refresh

### Patch Changes

- 3abdc69: docs(adapters): add Cloudflare Agents as a vendor-official
state adapter (`agents/chat-sdk`) to the catalog and docs listing. It is
hidden from the create-chat-sdk CLI (Worker/Durable Objects runtime),
and the interactive state picker now filters out CLI-incompatible state
adapters.
- 0c761f1: docs(adapters): add Dial as a vendor-official adapter
(`@getdial/chat-sdk-adapter`) to the catalog, docs listing, and CLI
scaffold spec
- 24a04d5: docs(adapters): add Photon as a vendor-official adapter
(`@photon-ai/chat-adapter-imessage`) to the catalog, docs listing, and
CLI scaffold spec
## @chat-adapter/tests@4.33.0

### Minor Changes

- e7a396a: Add two shared behavioral test contracts for adapter authors:

- `threadIdContract` — verifies an adapter's thread-id codec round-trips
(`decode(encode(x))`), prefixes ids with the adapter name, matches any
pinned encoded strings, and (optionally) distinguishes DM from non-DM
threads.
- `selfMessageContract` — verifies an adapter dispatches inbound
messages from other users (to `processMessage` by default) but ignores
messages the bot authored itself, so it never replies to itself.
Requires the matchers to be registered via `setupFiles:
["@chat-adapter/tests/setup"]`.

- a7fb1bc: Add `connectWebhookContract`, a shared Vitest suite for
verifying an adapter's Vercel Connect webhook verification. Given a
small per-adapter descriptor (how to build the adapter in Connect mode
and craft an inbound webhook), it asserts the behavior every
Connect-capable adapter shares: a `webhookVerifier` replaces the native
signature/secret check and gates inbound requests — accept (`200`) on a
truthy result, reject (`401`) on a thrown error or falsy result — and is
invoked with the request and raw body. Connect-capable adapters can opt
in with ~10 lines.
## @chat-adapter/discord@4.33.0

### Patch Changes

- d4c52ca: use the shared `replaceBareMentions` scanner for `@mention`
conversion so email addresses, `@handles` inside URLs, and mentions
inside code spans are no longer mangled into Discord mentions, and
already-formatted `<@id>` tokens are not double-wrapped
- 6de4572: Implement `rehydrateAttachment` on the Discord adapter.
Serialization strips an attachment's `fetchData` closure (queue/debounce
strategies), and consumers rebuild it via `adapter.rehydrateAttachment`.
The Discord adapter did not implement the method, so downstream
consumers could not download inbound Discord attachments after
deserialization. The Discord CDN `url` survives serialization, so
`fetchData` is now rebuilt to fetch that url (preserving its signed
query params), matching how the other adapters implement the method.
- Updated dependencies [3abdc69]
- Updated dependencies [0b63791]
- Updated dependencies [0c761f1]
- Updated dependencies [ef2542c]
- Updated dependencies [24a04d5]
- Updated dependencies [d4c52ca]
- Updated dependencies [076fe5d]
  - chat@4.33.0
  - @chat-adapter/shared@4.33.0
## @chat-adapter/gchat@4.33.0

### Patch Changes

- Updated dependencies [3abdc69]
- Updated dependencies [0b63791]
- Updated dependencies [0c761f1]
- Updated dependencies [ef2542c]
- Updated dependencies [24a04d5]
- Updated dependencies [d4c52ca]
- Updated dependencies [076fe5d]
  - chat@4.33.0
  - @chat-adapter/shared@4.33.0
## @chat-adapter/messenger@4.33.0

### Patch Changes

- Updated dependencies [3abdc69]
- Updated dependencies [0b63791]
- Updated dependencies [0c761f1]
- Updated dependencies [ef2542c]
- Updated dependencies [24a04d5]
- Updated dependencies [d4c52ca]
- Updated dependencies [076fe5d]
  - chat@4.33.0
  - @chat-adapter/shared@4.33.0
## @chat-adapter/slack@4.33.0

### Patch Changes

- 0b63791: Process Slack Socket Mode retry envelopes instead of
discarding them. Slack redelivers an event (immediately, +1 min, +5 min)
when a prior delivery wasn't acknowledged — including events sent while
the app had no open socket, e.g. during a restart or a routine
connection refresh. The adapter previously acked and dropped every
envelope with `retry_num > 0`, so such events were permanently lost even
though Slack redelivered them. Retries are now routed like first
deliveries (logged at info with `retry_num`/`retry_reason`);
`Chat.processMessage`'s message-id dedupe drops true duplicates.
- Updated dependencies [3abdc69]
- Updated dependencies [0b63791]
- Updated dependencies [0c761f1]
- Updated dependencies [ef2542c]
- Updated dependencies [24a04d5]
- Updated dependencies [d4c52ca]
- Updated dependencies [076fe5d]
  - chat@4.33.0
  - @chat-adapter/shared@4.33.0
## @chat-adapter/teams@4.33.0

### Patch Changes

- d4c52ca: use the shared `replaceBareMentions` scanner for `@mention`
conversion so email addresses, `@handles` inside URLs, and mentions
inside code spans are no longer mangled into `<at>` mention tags
- Updated dependencies [3abdc69]
- Updated dependencies [0b63791]
- Updated dependencies [0c761f1]
- Updated dependencies [ef2542c]
- Updated dependencies [24a04d5]
- Updated dependencies [d4c52ca]
- Updated dependencies [076fe5d]
  - chat@4.33.0
  - @chat-adapter/shared@4.33.0
## @chat-adapter/telegram@4.33.0

### Patch Changes

- Updated dependencies [3abdc69]
- Updated dependencies [0b63791]
- Updated dependencies [0c761f1]
- Updated dependencies [ef2542c]
- Updated dependencies [24a04d5]
- Updated dependencies [d4c52ca]
- Updated dependencies [076fe5d]
  - chat@4.33.0
  - @chat-adapter/shared@4.33.0
## @chat-adapter/twilio@4.33.0

### Patch Changes

- Updated dependencies [3abdc69]
- Updated dependencies [0b63791]
- Updated dependencies [0c761f1]
- Updated dependencies [ef2542c]
- Updated dependencies [24a04d5]
- Updated dependencies [d4c52ca]
- Updated dependencies [076fe5d]
  - chat@4.33.0
  - @chat-adapter/shared@4.33.0
## @chat-adapter/web@4.33.0

### Patch Changes

- Updated dependencies [3abdc69]
- Updated dependencies [0b63791]
- Updated dependencies [0c761f1]
- Updated dependencies [ef2542c]
- Updated dependencies [24a04d5]
- Updated dependencies [d4c52ca]
- Updated dependencies [076fe5d]
  - chat@4.33.0
  - @chat-adapter/shared@4.33.0
## @chat-adapter/whatsapp@4.33.0

### Patch Changes

- Updated dependencies [3abdc69]
- Updated dependencies [0b63791]
- Updated dependencies [0c761f1]
- Updated dependencies [ef2542c]
- Updated dependencies [24a04d5]
- Updated dependencies [d4c52ca]
- Updated dependencies [076fe5d]
  - chat@4.33.0
  - @chat-adapter/shared@4.33.0
## @chat-adapter/state-ioredis@4.33.0

### Patch Changes

- Updated dependencies [3abdc69]
- Updated dependencies [0b63791]
- Updated dependencies [0c761f1]
- Updated dependencies [ef2542c]
- Updated dependencies [24a04d5]
- Updated dependencies [076fe5d]
  - chat@4.33.0
## @chat-adapter/state-memory@4.33.0

### Patch Changes

- Updated dependencies [3abdc69]
- Updated dependencies [0b63791]
- Updated dependencies [0c761f1]
- Updated dependencies [ef2542c]
- Updated dependencies [24a04d5]
- Updated dependencies [076fe5d]
  - chat@4.33.0
## @chat-adapter/state-pg@4.33.0

### Patch Changes

- Updated dependencies [3abdc69]
- Updated dependencies [0b63791]
- Updated dependencies [0c761f1]
- Updated dependencies [ef2542c]
- Updated dependencies [24a04d5]
- Updated dependencies [076fe5d]
  - chat@4.33.0
## @chat-adapter/state-redis@4.33.0

### Patch Changes

- Updated dependencies [3abdc69]
- Updated dependencies [0b63791]
- Updated dependencies [0c761f1]
- Updated dependencies [ef2542c]
- Updated dependencies [24a04d5]
- Updated dependencies [076fe5d]
  - chat@4.33.0

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-07-07 23:22:51 +01:00
Ben Sabic e7a396ae70 feat(tests): add threadId + self-message contracts and adopt across adapters (#675)
## @chat-adapter/tests

Adds two shared behavioral contracts (self-tested against fakes,
exported, with a minor changeset):

- `threadIdContract` — verifies a thread-id codec round-trips
(`decode(encode(x))`), prefixes ids with the adapter name, matches
pinned encoded strings, and optionally distinguishes DM from non-DM.
- `selfMessageContract` — verifies an adapter dispatches inbound
messages from other users but ignores messages the bot authored itself
(uses the shared matchers).

## Adoption

- `threadIdContract` adopted across 10 adapters (github, linear, gchat,
teams, discord, slack, telegram, whatsapp, twilio, messenger), replacing
bespoke encode/decode/round-trip/isDM blocks while keeping error/edge
cases.
- `selfMessageContract` adopted where it cleanly applies (github,
messenger). Deliberately skipped where adapters dispatch-then-flag
`isMe` (linear, slack, gchat) or lack a network-free webhook self test
(teams, whatsapp, etc.).

Net ~−290 more lines. Stacked on #674.

---------

Signed-off-by: Ben Sabic <bensabic@users.noreply.github.com>
Co-authored-by: Ben Sabic <bensabic@users.noreply.github.com>
2026-07-07 23:26:08 +10:00
Ben Sabic ac5a54ee1d test(adapters): adopt shared @chat-adapter/tests factories and matchers (#674)
Wires `@chat-adapter/tests` as a devDependency and registers its
matchers via `setupFiles: ["@chat-adapter/tests/setup"]` across all 11
platform adapters, then replaces bespoke local
`mockLogger`/`createMockState`/`createMockChatInstance` with the shared
factories and adopts `toHaveDispatched`/`not.toHaveDispatched` where
clean.

- 10 adapters migrated (gchat, messenger, teams, whatsapp, telegram,
discord, twilio, linear, github, slack). Positional
`createMockChatInstance(...)` call sites converted to the options API
(slack 100, linear 35).
- `web` left as-is — its suite uses the real `Chat`/`createMemoryState`
for e2e, so the shared factories don't apply.
- Platform SDK mocks (Octokit, WebClient, socket-mode, `@linear/sdk`,
`fetch`) and the Phase 1 `connectWebhookContract` descriptors are left
intact.

Net ~−540 lines of duplicated test scaffolding. Stacked on #673.
Tests-only, no changeset.

---------

Signed-off-by: Ben Sabic <bensabic@users.noreply.github.com>
Co-authored-by: Ben Sabic <bensabic@users.noreply.github.com>
2026-07-07 23:20:32 +10:00
Ben Sabic 840c0d16e9 test(adapters): migrate Vercel Connect webhook tests to connectWebhookContract (#673)
Adopts the shared `connectWebhookContract` from `@chat-adapter/tests` in
the Slack, GitHub, and Linear suites, replacing the bespoke
`webhookVerifier` blocks (verifier pass → 200, throw/falsy → 401,
invoked with request + raw body, precedence over a native secret).
Adapter-specific Connect tests are kept (token resolvers, GitHub bot-id
capture, type-level mutual exclusivity, 400-on-invalid-JSON, Linear
identity/`withInstallation`).

Each descriptor keeps `initialize()` network-free (GitHub `botUserId`,
Slack `_botUserId` to skip `auth.test`, Linear stubs
`resolveConnectIdentity`). Twilio is intentionally not included — it has
a single generic `webhookVerifier` usage with no 200/401 gating suite to
migrate.

First of three stacked test-generalization PRs. Tests-only, no
changeset.

Signed-off-by: Ben Sabic <bensabic@users.noreply.github.com>
Co-authored-by: Ben Sabic <bensabic@users.noreply.github.com>
2026-07-07 23:14:05 +10:00
Ben Sabic 6750d59e72 feat(github): add Vercel Connect support (#650)
Adds Vercel Connect support to the GitHub adapter:

- A new `installationToken` config option (string or resolver) supplies
installation access tokens directly, skipping the GitHub App private-key
JWT exchange.
- A new optional `webhookVerifier` verifies inbound webhooks (Connect
trigger-forwarded requests via a Vercel OIDC token) in place of the
GitHub webhook secret.

Pair with `connectGitHubAdapter()` from `@vercel/connect/chat`. Includes
a changeset (`@chat-adapter/github` minor).

Stacked on #647 (base `vercel-connect/base`).

## Companion

`@vercel/connect/chat` subpath: vercel/vercel#16826.

<img width="933" height="755" alt="CleanShot 2026-06-30 at 12 02 18"
src="https://github.com/user-attachments/assets/cc834560-0486-4f09-b8d5-8264be360544"
/>

---------

Signed-off-by: Ben Sabic <bensabic@users.noreply.github.com>
Co-authored-by: Ben Sabic <bensabic@users.noreply.github.com>
2026-07-03 01:38:51 +10:00
github-actions[bot] 6f18930cf3 chore(release): version packages (#623)
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @chat-adapter/discord@4.32.0

### Minor Changes

- 022a502: Add a Discord adapter interactionFlags callback for ephemeral
slash command responses.

### Patch Changes

- 0d4e3ee: fix: render bare URLs and autolinks as bare URLs instead of
`[url](url)` masked links, which Discord only renders inside embeds (in
normal messages they showed up as literal text)
- 490fa00: fix bare-mention conversion so it no longer mangles
surrounding text: email addresses and `word@word` handles are left
intact (the `@` must be at a word boundary), already-formatted mentions
like `<@123>` are no longer double-wrapped into `<<@123>>`, and a real
mention that follows a period (e.g. `docs.@everyone`) still converts
-   Updated dependencies [eccc6b9]
-   Updated dependencies [438f551]
-   Updated dependencies [d034b8b]
-   Updated dependencies [06af3e1]
-   Updated dependencies [2e47351]
-   Updated dependencies [efa9610]
    -   chat@4.32.0
    -   @chat-adapter/shared@4.32.0

## chat@4.32.0

### Minor Changes

- 2e47351: Add `autoCompletePrevious` option to `Plan.addTask()`.
Defaults to `true` so sequential workflows keep auto-completing existing
in-progress tasks; pass `false` to keep multiple tasks in progress for
parallel execution.

### Patch Changes

-   eccc6b9: detect bot mentions in skipped queue and burst messages
- 438f551: Fix lightweight thread handles so streaming posts without an
incoming message context no longer crash.
- d034b8b: docs(adapters): add Linq as a vendor-official adapter
(`@linqapp/chat-sdk-adapter`) to the catalog, docs listing, and CLI
scaffold spec
- 06af3e1: docs(adapters): add Novu as a vendor-official adapter
(`@novu/chat-sdk-adapter`) to the catalog, docs listing, and CLI
scaffold spec
- efa9610: Sync bundled KB resources from Edge Config: add four new
guides (Vercel Connect, the Slack Vercel Connect bot, AI Gateway + AI
SDK, and the daily digest bot), refresh existing guide bodies, and
regenerate `resources/templates.json`. The `sync-resources` script now
fetches and validates all guides before writing (so a failed fetch
leaves the tree untouched), validates the source config shape, rejects
duplicate slugs, retries transient fetches, and mirrors `SKILL.md` to
all four committed copies.

## @chat-adapter/gchat@4.32.0

### Patch Changes

-   Updated dependencies [eccc6b9]
-   Updated dependencies [438f551]
-   Updated dependencies [d034b8b]
-   Updated dependencies [06af3e1]
-   Updated dependencies [2e47351]
-   Updated dependencies [efa9610]
    -   chat@4.32.0
    -   @chat-adapter/shared@4.32.0

## @chat-adapter/github@4.32.0

### Patch Changes

- fc7df9c: Remove raw GitHub webhook payload previews from adapter logs.

Debug and error logs now report only request-shape metadata, such as
body size, event type, content type, and signature presence, instead of
copying provider payload content into logs.

-   Updated dependencies [eccc6b9]

-   Updated dependencies [438f551]

-   Updated dependencies [d034b8b]

-   Updated dependencies [06af3e1]

-   Updated dependencies [2e47351]

-   Updated dependencies [efa9610]
    -   chat@4.32.0
    -   @chat-adapter/shared@4.32.0

## @chat-adapter/linear@4.32.0

### Patch Changes

-   Updated dependencies [eccc6b9]
-   Updated dependencies [438f551]
-   Updated dependencies [d034b8b]
-   Updated dependencies [06af3e1]
-   Updated dependencies [2e47351]
-   Updated dependencies [efa9610]
    -   chat@4.32.0
    -   @chat-adapter/shared@4.32.0

## @chat-adapter/messenger@4.32.0

### Patch Changes

-   Updated dependencies [eccc6b9]
-   Updated dependencies [438f551]
-   Updated dependencies [d034b8b]
-   Updated dependencies [06af3e1]
-   Updated dependencies [2e47351]
-   Updated dependencies [efa9610]
    -   chat@4.32.0
    -   @chat-adapter/shared@4.32.0

## @chat-adapter/shared@4.32.0

### Patch Changes

-   Updated dependencies [eccc6b9]
-   Updated dependencies [438f551]
-   Updated dependencies [d034b8b]
-   Updated dependencies [06af3e1]
-   Updated dependencies [2e47351]
-   Updated dependencies [efa9610]
    -   chat@4.32.0

## @chat-adapter/slack@4.32.0

### Patch Changes

- a8c4af7: prevent cached slack display names inside urls from being
resolved as user mentions before payload formatting
- 07c1112: Fix `@mention` rewriting so handles inside inline code spans
(`` `@vercel/postgres` ``) and fenced code blocks (```` ``` ````) are no
longer turned into `<@USER_ID>` Slack mentions. Agents printing npm
package names or shell snippets previously had those handles corrupted
into bot user IDs. Mention linking now skips whole code spans and code
blocks; handles outside code (including the same name mentioned
elsewhere in the message) still resolve normally.
-   Updated dependencies [eccc6b9]
-   Updated dependencies [438f551]
-   Updated dependencies [d034b8b]
-   Updated dependencies [06af3e1]
-   Updated dependencies [2e47351]
-   Updated dependencies [efa9610]
    -   chat@4.32.0
    -   @chat-adapter/shared@4.32.0

## @chat-adapter/teams@4.32.0

### Patch Changes

-   Updated dependencies [eccc6b9]
-   Updated dependencies [438f551]
-   Updated dependencies [d034b8b]
-   Updated dependencies [06af3e1]
-   Updated dependencies [2e47351]
-   Updated dependencies [efa9610]
    -   chat@4.32.0
    -   @chat-adapter/shared@4.32.0

## @chat-adapter/telegram@4.32.0

### Patch Changes

- 937cac9: fix(telegram): stop `trimToMarkdownV2SafeBoundary` from
truncating valid messages at entity-marker characters (`_`, `*`, `~`)
inside link URLs. Per the MarkdownV2 spec, only `)` and `\` are special
inside the `(...)` part of an inline link, so URLs with raw underscores
in query parameters (e.g. `?a_b=1&c_d=2&e_f=3`) are now left intact
instead of being sliced mid-URL and degraded to plain text. Hard
truncation that cuts inside a link URL now trims back to before the
link's `[`.
- 4ee187a: Send Telegram typing actions immediately when private message
updates arrive.
-   Updated dependencies [eccc6b9]
-   Updated dependencies [438f551]
-   Updated dependencies [d034b8b]
-   Updated dependencies [06af3e1]
-   Updated dependencies [2e47351]
-   Updated dependencies [efa9610]
    -   chat@4.32.0
    -   @chat-adapter/shared@4.32.0

## @chat-adapter/twilio@4.32.0

### Patch Changes

-   Updated dependencies [eccc6b9]
-   Updated dependencies [438f551]
-   Updated dependencies [d034b8b]
-   Updated dependencies [06af3e1]
-   Updated dependencies [2e47351]
-   Updated dependencies [efa9610]
    -   chat@4.32.0
    -   @chat-adapter/shared@4.32.0

## @chat-adapter/web@4.32.0

### Patch Changes

-   Updated dependencies [eccc6b9]
-   Updated dependencies [438f551]
-   Updated dependencies [d034b8b]
-   Updated dependencies [06af3e1]
-   Updated dependencies [2e47351]
-   Updated dependencies [efa9610]
    -   chat@4.32.0
    -   @chat-adapter/shared@4.32.0

## @chat-adapter/whatsapp@4.32.0

### Patch Changes

-   Updated dependencies [eccc6b9]
-   Updated dependencies [438f551]
-   Updated dependencies [d034b8b]
-   Updated dependencies [06af3e1]
-   Updated dependencies [2e47351]
-   Updated dependencies [efa9610]
    -   chat@4.32.0
    -   @chat-adapter/shared@4.32.0

## create-chat-sdk@0.1.1

### Patch Changes

- d034b8b: docs(adapters): add Linq as a vendor-official adapter
(`@linqapp/chat-sdk-adapter`) to the catalog, docs listing, and CLI
scaffold spec
- 06af3e1: docs(adapters): add Novu as a vendor-official adapter
(`@novu/chat-sdk-adapter`) to the catalog, docs listing, and CLI
scaffold spec

## @chat-adapter/state-ioredis@4.32.0

### Patch Changes

-   Updated dependencies [eccc6b9]
-   Updated dependencies [438f551]
-   Updated dependencies [d034b8b]
-   Updated dependencies [06af3e1]
-   Updated dependencies [2e47351]
-   Updated dependencies [efa9610]
    -   chat@4.32.0

## @chat-adapter/state-memory@4.32.0

### Patch Changes

-   Updated dependencies [eccc6b9]
-   Updated dependencies [438f551]
-   Updated dependencies [d034b8b]
-   Updated dependencies [06af3e1]
-   Updated dependencies [2e47351]
-   Updated dependencies [efa9610]
    -   chat@4.32.0

## @chat-adapter/state-pg@4.32.0

### Patch Changes

-   Updated dependencies [eccc6b9]
-   Updated dependencies [438f551]
-   Updated dependencies [d034b8b]
-   Updated dependencies [06af3e1]
-   Updated dependencies [2e47351]
-   Updated dependencies [efa9610]
    -   chat@4.32.0

## @chat-adapter/state-redis@4.32.0

### Patch Changes

-   Updated dependencies [eccc6b9]
-   Updated dependencies [438f551]
-   Updated dependencies [d034b8b]
-   Updated dependencies [06af3e1]
-   Updated dependencies [2e47351]
-   Updated dependencies [efa9610]
    -   chat@4.32.0

## @chat-adapter/tests@4.32.0

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-07-01 04:59:43 +01:00
Hiroki Osame fc7df9c4cf fix(github): remove raw webhook payload logging (#500)
- Remove raw GitHub webhook body previews from adapter debug/error logs
- Prevents webhook payload content from being copied into application
logs when debug logging is enabled
- No webhook routing or response behavior change; only log fields change

## Context

The GitHub adapter logged a preview of incoming webhook request bodies
while handling webhooks.

Raw webhook payloads can contain repository metadata, user-authored
issue or pull request text, URLs, installation details, and other
provider-controlled content. Even at debug level, SDK logging should
avoid copying raw provider payloads into application logs by default.

## Problem

Debug logging should provide useful operational context without changing
the privacy boundary of webhook data.

The previous log emitted a raw body preview before signature
verification. That meant an application with debug logging enabled could
record payload content from both valid GitHub webhook events and invalid
requests that were later rejected.

This is unnecessary for normal webhook troubleshooting. Derived request
metadata is enough to understand routing and parsing failures without
retaining payload text.

## Changes

The GitHub adapter no longer logs raw webhook bodies or body previews.

Webhook logs now use bounded request-shape metadata:

- `bodyBytes`
- `contentType`
- `eventType`
- `signaturePresent`
- `jsonParseStatus` for invalid JSON

The change preserves signature verification, ping handling, JSON
parsing, and event routing behavior.

Regression tests cover invalid signature, invalid JSON, and valid
webhook paths with token-shaped and customer-slug sentinel strings in
the payload. The tests assert those sentinels, the full raw body, the
old raw-body log message, and `bodyPreview` do not appear in logger
calls.

A patch changeset is included for `@chat-adapter/github`.

## Verification

- `pnpm turbo build --filter @chat-adapter/github`
- `pnpm --filter @chat-adapter/github test`
- `pnpm --filter @chat-adapter/github typecheck`
- `pnpm check`
- `git diff --check`
2026-07-01 02:11:33 +01:00
Ben Sabic 99c598505f docs: refresh agent docs, README badges, and Chat SDK skill (#646)
- Replace npm version/download badges with Agent Stack and MIT badges on
the root README and all published package READMEs
- Streamline root `AGENTS.md`: fix title, add an accurate monorepo map,
trim duplicated CONTRIBUTING/Ultracite/env-var content, and link to
package-level `AGENTS.md` files
- Slim the Chat SDK agent skill (`skills/chat/SKILL.md` and published
copies) to defer to bundled docs, chat-sdk.dev, Vercel KB, and
`llms.txt` instead of inlining CLI flags, quick-start code, and API
tables
- Polish root README copy (install examples, adapter/build links, Vercel
Plugin URL, Vercel KB link, “Made by Vercel” badge)
- Minor `CONTRIBUTING.md` fixes: simplify DCO wording, correct
preview-branch proxy file references (`proxy.ts` vs middleware)

---------

Signed-off-by: Ben Sabic <bensabic@users.noreply.github.com>
Co-authored-by: Ben Sabic <bensabic@users.noreply.github.com>
2026-06-27 14:06:13 +10:00
github-actions[bot] 2a553aa948 chore(release): version packages (#600)
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @chat-adapter/slack@4.31.0

### Minor Changes

- 8336a3e: Add `webClientOptions` to `SlackAdapterConfig`, forwarded to
both the default and per-token `@slack/web-api` `WebClient` instances.
This exposes Web API settings such as `retryConfig`, per-request
`timeout`, and `rejectRateLimitedCalls`. Use the existing `apiUrl`
option to override the Slack Web API base URL.
- 171657a: Adding support for stable IDs to link button action handlers

### Patch Changes

- a8bf99a: Fix `@mention` rewriting so an `@handle` inside a URL is no
longer turned into a `<@handle>` Slack mention, which corrupted the
link. Mention linking now skips whole `http(s)://…` spans, so handles in
paths (`https://hackmd.io/@jkyang/abc`), query strings
(`?user=@george`), and fragments (`#@george`) are preserved; the
lookbehind also excludes a `/` immediately before `@` to cover
schemeless URLs (`mastodon.social/@user`). Whitespace- and
punctuation-led mentions (e.g. `(cc @george)`), emails, and `<mailto:…>`
links are unaffected.
-   Updated dependencies [778ae69]
-   Updated dependencies [171657a]
    -   chat@4.31.0
    -   @chat-adapter/shared@4.31.0

## @chat-adapter/teams@4.31.0

### Minor Changes

-   8c71411: Add low-level Teams primitive subpaths for custom runtimes.

### Patch Changes

-   Updated dependencies [778ae69]
-   Updated dependencies [171657a]
    -   chat@4.31.0
    -   @chat-adapter/shared@4.31.0

## @chat-adapter/telegram@4.31.0

### Minor Changes

- 4662309: add native rich message formatting and streaming for Telegram
Bot API 10.1
- 9c936f8: Add support for routing Telegram bot commands to Chat SDK
slash command handlers

### Patch Changes

-   Updated dependencies [778ae69]
-   Updated dependencies [171657a]
    -   chat@4.31.0
    -   @chat-adapter/shared@4.31.0

## chat@4.31.0

### Minor Changes

- 778ae69: Add a zero-dependency `chat/adapters` catalog subpath for
official and vendor-official adapter metadata, environment specs, and
setup helpers.
- 171657a: Adding support for stable IDs to link button action handlers

## create-chat-sdk@0.1.0

### Minor Changes

- 8f3af76: Add the `create-chat-sdk` CLI for scaffolding webhook-only
Next.js Chat SDK bot projects. Supports interactive prompts,
non-interactive `--adapter` selection from the `chat/adapters` catalog,
coding-agent detection with an `--interactive` escape hatch, and
generated `src/lib/bot.ts`, `.env.example`, `next.config.ts`, and README
output per selected adapter.

## @chat-adapter/state-ioredis@4.31.0

### Minor Changes

- 8f3af76: Make `logger` optional in `createIoRedisState`, defaulting to
a console logger, matching `@chat-adapter/state-redis`.

### Patch Changes

-   Updated dependencies [778ae69]
-   Updated dependencies [171657a]
    -   chat@4.31.0

## @chat-adapter/discord@4.31.0

### Patch Changes

-   Updated dependencies [778ae69]
-   Updated dependencies [171657a]
    -   chat@4.31.0
    -   @chat-adapter/shared@4.31.0

## @chat-adapter/gchat@4.31.0

### Patch Changes

-   Updated dependencies [778ae69]
-   Updated dependencies [171657a]
    -   chat@4.31.0
    -   @chat-adapter/shared@4.31.0

## @chat-adapter/github@4.31.0

### Patch Changes

-   Updated dependencies [778ae69]
-   Updated dependencies [171657a]
    -   chat@4.31.0
    -   @chat-adapter/shared@4.31.0

## @chat-adapter/linear@4.31.0

### Patch Changes

-   Updated dependencies [778ae69]
-   Updated dependencies [171657a]
    -   chat@4.31.0
    -   @chat-adapter/shared@4.31.0

## @chat-adapter/messenger@4.31.0

### Patch Changes

-   Updated dependencies [778ae69]
-   Updated dependencies [171657a]
    -   chat@4.31.0
    -   @chat-adapter/shared@4.31.0

## @chat-adapter/shared@4.31.0

### Patch Changes

-   Updated dependencies [778ae69]
-   Updated dependencies [171657a]
    -   chat@4.31.0

## @chat-adapter/twilio@4.31.0

### Patch Changes

-   Updated dependencies [778ae69]
-   Updated dependencies [171657a]
    -   chat@4.31.0
    -   @chat-adapter/shared@4.31.0

## @chat-adapter/web@4.31.0

### Patch Changes

-   Updated dependencies [778ae69]
-   Updated dependencies [171657a]
    -   chat@4.31.0
    -   @chat-adapter/shared@4.31.0

## @chat-adapter/whatsapp@4.31.0

### Patch Changes

-   Updated dependencies [778ae69]
-   Updated dependencies [171657a]
    -   chat@4.31.0
    -   @chat-adapter/shared@4.31.0

## @chat-adapter/state-memory@4.31.0

### Patch Changes

-   Updated dependencies [778ae69]
-   Updated dependencies [171657a]
    -   chat@4.31.0

## @chat-adapter/state-pg@4.31.0

### Patch Changes

-   Updated dependencies [778ae69]
-   Updated dependencies [171657a]
    -   chat@4.31.0

## @chat-adapter/state-redis@4.31.0

### Patch Changes

-   Updated dependencies [778ae69]
-   Updated dependencies [171657a]
    -   chat@4.31.0

## @chat-adapter/tests@4.31.0

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-16 11:00:02 +01:00
Ben Sabic 8f3af76565 feat: add create-chat-sdk CLI (#603)
Adds `create-chat-sdk`, a CLI that scaffolds a Next.js Chat SDK bot
project:

```bash
npm create chat-sdk@latest my-bot

# non-interactive
npm create chat-sdk@latest -- my-bot --adapter slack redis -y
```

The user picks platform and state adapters interactively or via
`--adapter`, and the CLI generates a webhook-only project with
`src/lib/bot.ts`, `.env.example`, `next.config.ts`, `package.json`, and
a README, then optionally runs `git init` and installs dependencies.
There are no pages or client UI in the template.

Adapter choices come straight from the `chat/adapters` catalog, so the
CLI has no adapter registry of its own. When a coding agent such as
Cursor or Claude Code runs the CLI, it uses non-interactive defaults and
requires an explicit platform adapter. `--interactive` forces prompts.

## also in this pr

- `google-chat` is renamed to `gchat` everywhere, including docs pages,
the OG image, and adapter catalog. Old URLs redirect permanently,
including language-prefixed and `/og` paths
- a new docs page is available at `chat-sdk.dev/docs/create-chat-sdk`,
and the CLI is promoted on the homepage, package READMEs, and agent
skill
- `create-chat-sdk` releases independently with a minor changeset for
its initial `0.1.0` release

---------

Co-authored-by: Ben Sabic <bensabic@users.noreply.github.com>
Co-authored-by: dancer <josh@afterima.ge>
2026-06-16 08:48:38 +01:00
Ben Sabic 7ecb9730e3 chore(docs): add missing Twilio logo and add official platform adapter OG images (#589)
Adds official platform adapter branding across the docs site, npm
READMEs, and social previews.

- **Homepage**: add Twilio to the supported-platforms logo grid
- **OG images**: add custom artwork for all 11 official platform
adapters under content/adapters/official/og/; serve static-first from
the existing /adapters/official/{slug}/og route with dynamic fallback
for state adapters
- **READMEs**: add linked hero banners to every official platform
adapter package README, using the live OG URL as the single image source
- **Tests**: integration-test guardrails for OG image coverage, README
banner discoverability, and knip-clean helpers
- **Changeset**: empty changeset for CI

<img width="2400" height="1256" alt="Chat SDK - Slack"
src="https://github.com/user-attachments/assets/4d186a1c-5651-44b8-8698-091ee23b44da"
/>

Co-authored-by: Ben Sabic <bensabic@users.noreply.github.com>
2026-06-06 14:51:30 +10:00
Ben Sabic 9921dcd1c4 docs(seo): improve npm metadata, README discoverability, and structured data (#587)
Improves Chat SDK discoverability across npm, READMEs, and the docs site
for search engines and AI coding agents.

- **npm metadata**: point every published package `homepage` at
chat-sdk.dev deep links; expand `chat` keywords/description; fix
`repository.directory` (`packages/chat-sdk` → `packages/chat`); align
state adapter keywords
- **READMEs**: add npm callouts, Documentation/Guides links, and AI
Coding Agents sections (skill install, optional Vercel Plugin,
`llms.txt` / `llms-full.txt`) across all published packages and the repo
root
- **docs JSON-LD**: `HowTo` / `TechArticle` on getting-started,
streaming, and cards; `CollectionPage` + official-only `ItemList` on
`/adapters` (with split human vs JSON-LD descriptions)
- **UTMs**: add `chat-sdk_site` / `chat-sdk_repo` tracking params to
Resources links in selected MDX pages and adapter READMEs (discord,
github, slack, liveblocks, getting-started, ai index)
- **contract tests**: integration-tests guardrails for npm metadata and
README discoverability so future package additions don't drift

---------

Co-authored-by: Ben Sabic <bensabic@users.noreply.github.com>
2026-06-05 14:00:18 +10:00
github-actions[bot] a5b118f1dc chore(release): version packages (#546)
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @chat-adapter/slack@4.30.0

### Minor Changes

-   4c46c26: add lightweight Slack formatting primitives subpath
- dbd8dc5: expose runtime-free Block Kit helpers for Slack card
conversion
-   aba6aa9: add lightweight Slack API primitives subpath
-   b332a03: add lightweight Slack webhook primitives subpath
- 6ed4a43: add low-level Slack helpers for files, thread replies, views,
interactions, and input blocks

### Patch Changes

- 9b8d8c4: expand npm `keywords` for adapter and state packages to
improve discoverability (adds `chat-sdk`, `chatbot`, `ai-agent`,
`ai-sdk`, `vercel`, plus platform-specific terms)

- 073ff92: surface Slack file upload confirmation ids in postMessage
results

-   b63c042: fix(slack): resolve reaction user display names

Slack reaction events now resolve the reacting user's display name and
real name
through the existing cached user lookup path. If lookup fails, the
adapter falls
    back to the Slack user ID.

-   1294490: reuse low-level Slack formatting helpers in the adapter

- 999d268: pass the Slack bot token through native stream append and
stop calls

-   Updated dependencies [5461ea9]
    -   chat@4.30.0
    -   @chat-adapter/shared@4.30.0

## @chat-adapter/telegram@4.30.0

### Minor Changes

- 5461ea9: Add native Telegram private chat draft streaming with
fallback streaming elsewhere.

### Patch Changes

- 9b8d8c4: expand npm `keywords` for adapter and state packages to
improve discoverability (adds `chat-sdk`, `chatbot`, `ai-agent`,
`ai-sdk`, `vercel`, plus platform-specific terms)
-   Updated dependencies [5461ea9]
    -   chat@4.30.0
    -   @chat-adapter/shared@4.30.0

## @chat-adapter/twilio@4.30.0

### Minor Changes

- 25ebc3b: add Twilio SMS, MMS, and voice helpers with webhook,
messaging, and formatting primitives

### Patch Changes

- 9b8d8c4: expand npm `keywords` for adapter and state packages to
improve discoverability (adds `chat-sdk`, `chatbot`, `ai-agent`,
`ai-sdk`, `vercel`, plus platform-specific terms)
-   Updated dependencies [5461ea9]
    -   chat@4.30.0
    -   @chat-adapter/shared@4.30.0

## @chat-adapter/whatsapp@4.30.0

### Minor Changes

- ffc43fc: Add WhatsApp typing indicator support by sending Meta's
read-plus-typing payload when a recent inbound message is available.
Update the default API version to v25.0.

### Patch Changes

- 9b8d8c4: expand npm `keywords` for adapter and state packages to
improve discoverability (adds `chat-sdk`, `chatbot`, `ai-agent`,
`ai-sdk`, `vercel`, plus platform-specific terms)
-   Updated dependencies [5461ea9]
    -   chat@4.30.0
    -   @chat-adapter/shared@4.30.0

## chat@4.30.0

### Minor Changes

- 5461ea9: Add native Telegram private chat draft streaming with
fallback streaming elsewhere.

## @chat-adapter/discord@4.30.0

### Patch Changes

- 9b8d8c4: expand npm `keywords` for adapter and state packages to
improve discoverability (adds `chat-sdk`, `chatbot`, `ai-agent`,
`ai-sdk`, `vercel`, plus platform-specific terms)
-   Updated dependencies [5461ea9]
    -   chat@4.30.0
    -   @chat-adapter/shared@4.30.0

## @chat-adapter/gchat@4.30.0

### Patch Changes

- 9b8d8c4: expand npm `keywords` for adapter and state packages to
improve discoverability (adds `chat-sdk`, `chatbot`, `ai-agent`,
`ai-sdk`, `vercel`, plus platform-specific terms)
- 177735a: - Fix redundant mailto link rendering in Google Chat adapter
- Google Chat adapter was emitting redundant `<mailto:...|...>` tokens
when rendering autolinked email addresses. This change collapses
`mailto:` URLs when the visible text equals the email address, ensuring
cleaner output consistent with plain text rendering in Google Chat.
-   Updated dependencies [5461ea9]
    -   chat@4.30.0
    -   @chat-adapter/shared@4.30.0

## @chat-adapter/github@4.30.0

### Patch Changes

- 9b8d8c4: expand npm `keywords` for adapter and state packages to
improve discoverability (adds `chat-sdk`, `chatbot`, `ai-agent`,
`ai-sdk`, `vercel`, plus platform-specific terms)
-   Updated dependencies [5461ea9]
    -   chat@4.30.0
    -   @chat-adapter/shared@4.30.0

## @chat-adapter/linear@4.30.0

### Patch Changes

- 9b8d8c4: expand npm `keywords` for adapter and state packages to
improve discoverability (adds `chat-sdk`, `chatbot`, `ai-agent`,
`ai-sdk`, `vercel`, plus platform-specific terms)
-   Updated dependencies [5461ea9]
    -   chat@4.30.0
    -   @chat-adapter/shared@4.30.0

## @chat-adapter/messenger@4.30.0

### Patch Changes

- 9b8d8c4: expand npm `keywords` for adapter and state packages to
improve discoverability (adds `chat-sdk`, `chatbot`, `ai-agent`,
`ai-sdk`, `vercel`, plus platform-specific terms)
-   Updated dependencies [5461ea9]
    -   chat@4.30.0
    -   @chat-adapter/shared@4.30.0

## @chat-adapter/shared@4.30.0

### Patch Changes

-   Updated dependencies [5461ea9]
    -   chat@4.30.0

## @chat-adapter/teams@4.30.0

### Patch Changes

- 9b8d8c4: expand npm `keywords` for adapter and state packages to
improve discoverability (adds `chat-sdk`, `chatbot`, `ai-agent`,
`ai-sdk`, `vercel`, plus platform-specific terms)
-   Updated dependencies [5461ea9]
    -   chat@4.30.0
    -   @chat-adapter/shared@4.30.0

## @chat-adapter/web@4.30.0

### Patch Changes

- 9b8d8c4: expand npm `keywords` for adapter and state packages to
improve discoverability (adds `chat-sdk`, `chatbot`, `ai-agent`,
`ai-sdk`, `vercel`, plus platform-specific terms)
-   Updated dependencies [5461ea9]
    -   chat@4.30.0
    -   @chat-adapter/shared@4.30.0

## @chat-adapter/state-ioredis@4.30.0

### Patch Changes

- 9b8d8c4: expand npm `keywords` for adapter and state packages to
improve discoverability (adds `chat-sdk`, `chatbot`, `ai-agent`,
`ai-sdk`, `vercel`, plus platform-specific terms)
-   Updated dependencies [5461ea9]
    -   chat@4.30.0

## @chat-adapter/state-memory@4.30.0

### Patch Changes

- 9b8d8c4: expand npm `keywords` for adapter and state packages to
improve discoverability (adds `chat-sdk`, `chatbot`, `ai-agent`,
`ai-sdk`, `vercel`, plus platform-specific terms)
-   Updated dependencies [5461ea9]
    -   chat@4.30.0

## @chat-adapter/state-pg@4.30.0

### Patch Changes

- 9b8d8c4: expand npm `keywords` for adapter and state packages to
improve discoverability (adds `chat-sdk`, `chatbot`, `ai-agent`,
`ai-sdk`, `vercel`, plus platform-specific terms)
-   Updated dependencies [5461ea9]
    -   chat@4.30.0

## @chat-adapter/state-redis@4.30.0

### Patch Changes

- 9b8d8c4: expand npm `keywords` for adapter and state packages to
improve discoverability (adds `chat-sdk`, `chatbot`, `ai-agent`,
`ai-sdk`, `vercel`, plus platform-specific terms)
-   Updated dependencies [5461ea9]
    -   chat@4.30.0

## @chat-adapter/tests@4.30.0

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-01 18:18:35 -07:00
Ben Sabic 9b8d8c4518 Discoverability lift: link KB guides, broaden npm keywords, mirror to AGENTS.md (#560)
Broad SEO/AEO pass across the docs site, adapter READMEs and AGENTS.md
files, and npm package metadata so Chat SDK content shows up better in
search engines, in LLM-driven package recommendations, and in
IDE/coding-agent context.

**Docs site**

- Adds a `## Resources` section to the Getting Started and AI overview
pages and to the Slack, Discord, GitHub, Liveblocks, and Sendblue
adapter pages, each linking to applicable guides/templates with
descriptions sourced from `resources-edge-config.json` and a cross-link
back to the central `/resources` hub.

**Adapter packages**

- Mirrors the same Resources sections into the Slack, Discord, and
GitHub READMEs (so they surface on npm) and into their AGENTS.md files
(so coding agents see them alongside the API notes).
- Expands `keywords` on every published adapter and state package — adds
`chat-sdk`, `chatbot`, `ai-agent`, `ai-sdk`, `vercel`, plus
platform-specific terms like `slack-bot`, `block-kit`, `slash-commands`,
`github-app`, `whatsapp-business`, `state-adapter`.

**Resources registry**

- Registers four new entries in `resources-edge-config.json`
(Human-in-the-Loop guide, Liveblocks AI agent guide, Slack + Vercel Blob
guide, Durable iMessage Agent template) and runs `pnpm sync-resources`
so the bundled `chat` package guides, `templates.json`, and
`skills/chat/SKILL.md` all pick them up.
- Fixes the synced Slack AI agent guide to import `toAiMessages` from
`chat/ai` instead of the deprecated `chat` re-export path (the upstream
KB source has also been updated, so future syncs will preserve this).

**Drive-by fixes**

- Resend adapter doc quick start: corrects `MemoryStateAdapter` class
import to the `createMemoryState()` factory (matching every other
adapter doc).
- Zalo adapter doc: drops the "community adapter" callout that
duplicated frontmatter.

**Tooling / CI**

- Adds `tsx` as a root devDependency so `pnpm sync-resources` works out
of the box (it previously relied on `npx tsx`, which hung when not
pre-cached).
- Loosens the CI changeset gate to also skip `packages/chat/resources/`
(generated data), matching the existing `*.md` carve-out.

---------

Co-authored-by: Ben Sabic <bensabic@users.noreply.github.com>
2026-05-29 11:41:23 +10:00
github-actions[bot] 6581d31507 chore(release): version packages (#469)
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @chat-adapter/discord@4.29.0

### Minor Changes

- 2ffed48: Adapter internals are now `protected` rather than `private`,
so consumers can subclass an adapter to override or extend its behavior
(e.g. handling additional Telegram update types by overriding
`processUpdate`).

### Patch Changes

-   e60bc8c: chore: set supported Node versions in engines
- b9b17cd: handle slash commands and button interactions in Discord
gateway-only mode
-   Updated dependencies [ac8a207]
-   Updated dependencies [e60bc8c]
-   Updated dependencies [add2730]
-   Updated dependencies [b75eedb]
    -   chat@4.29.0
    -   @chat-adapter/shared@4.29.0

## @chat-adapter/gchat@4.29.0

### Minor Changes

- 2ffed48: Adapter internals are now `protected` rather than `private`,
so consumers can subclass an adapter to override or extend its behavior
(e.g. handling additional Telegram update types by overriding
`processUpdate`).

### Patch Changes

-   e60bc8c: chore: set supported Node versions in engines

- 06fb8e5: Align package shapes with the new `konsistent` conventions.
All changes are
backwards-compatible — previous type names are kept as deprecated
aliases.

- `@chat-adapter/gchat`, `@chat-adapter/slack`: moved `*AdapterConfig`
(and
related sub-types) into a `./types` module; the public re-exports from
        `index.ts` are unchanged.
- `@chat-adapter/slack`: `createSlackAdapter` now accepts
`SlackAdapterConfig`
directly instead of `Partial<SlackAdapterConfig>`. Every field on the
config
        was already optional, so no call sites need to change.
- `@chat-adapter/messenger`: `MessengerAdapterConfig` fields are now
optional
(the factory still falls back to `FACEBOOK_*` env vars), and `logger` /
`userName` live on `MessengerAdapterConfig` directly. The factory
signature
is now `createMessengerAdapter(config?: MessengerAdapterConfig)`.
- `@chat-adapter/web`: renamed `WebAdapterOptions` to
`WebAdapterConfig`; the
        old name is exported as a deprecated alias.
- `@chat-adapter/whatsapp`: every field on `WhatsAppAdapterConfig` is
optional
(the factory still falls back to `WHATSAPP_*` env vars).
`createWhatsAppAdapter`
is now typed `(config?: WhatsAppAdapterConfig) => WhatsAppAdapter`.
- `@chat-adapter/state-memory`: added an empty
`MemoryStateAdapterOptions`
type so the package matches every other state adapter;
`createMemoryState`
        now accepts an optional argument of that type.
    -   `@chat-adapter/state-ioredis`, `@chat-adapter/state-redis`,
`@chat-adapter/state-pg`: the URL- and client-based option shapes were
split
        into named interfaces (`*StateAdapterUrlOptions` /
`*StateAdapterClientOptions`) and unified under `*StateAdapterOptions`.
The
factories now take the union type directly. Old names —
`RedisStateClientOptions`,
        `CreateRedisStateOptions`, `PostgresStateClientOptions`,
`CreatePostgresStateOptions`, `IoRedisStateClientOptions` — are kept as
        deprecated aliases.

-   Updated dependencies [ac8a207]

-   Updated dependencies [e60bc8c]

-   Updated dependencies [add2730]

-   Updated dependencies [b75eedb]
    -   chat@4.29.0
    -   @chat-adapter/shared@4.29.0

## @chat-adapter/github@4.29.0

### Minor Changes

- 2f108bd: Rename the typed native client getter on the Slack, GitHub,
and Linear adapters to match the underlying SDK class.

- `bot.getAdapter("slack").client` is now
`bot.getAdapter("slack").webClient` (returns `WebClient` from
`@slack/web-api`).
- `bot.getAdapter("github").client` is now
`bot.getAdapter("github").octokit` (returns `Octokit`).
- `bot.getAdapter("linear").client` is now
`bot.getAdapter("linear").linearClient` (returns `LinearClient`).

The previous `.client` getter is kept as a deprecated alias on all three
adapters, so existing code continues to work without changes.

- 2ffed48: Adapter internals are now `protected` rather than `private`,
so consumers can subclass an adapter to override or extend its behavior
(e.g. handling additional Telegram update types by overriding
`processUpdate`).

### Patch Changes

-   e60bc8c: chore: set supported Node versions in engines
-   Updated dependencies [ac8a207]
-   Updated dependencies [e60bc8c]
-   Updated dependencies [add2730]
-   Updated dependencies [b75eedb]
    -   chat@4.29.0
    -   @chat-adapter/shared@4.29.0

## @chat-adapter/linear@4.29.0

### Minor Changes

- 2f108bd: Rename the typed native client getter on the Slack, GitHub,
and Linear adapters to match the underlying SDK class.

- `bot.getAdapter("slack").client` is now
`bot.getAdapter("slack").webClient` (returns `WebClient` from
`@slack/web-api`).
- `bot.getAdapter("github").client` is now
`bot.getAdapter("github").octokit` (returns `Octokit`).
- `bot.getAdapter("linear").client` is now
`bot.getAdapter("linear").linearClient` (returns `LinearClient`).

The previous `.client` getter is kept as a deprecated alias on all three
adapters, so existing code continues to work without changes.

- 2ffed48: Adapter internals are now `protected` rather than `private`,
so consumers can subclass an adapter to override or extend its behavior
(e.g. handling additional Telegram update types by overriding
`processUpdate`).

### Patch Changes

-   e60bc8c: chore: set supported Node versions in engines
-   Updated dependencies [ac8a207]
-   Updated dependencies [e60bc8c]
-   Updated dependencies [add2730]
-   Updated dependencies [b75eedb]
    -   chat@4.29.0
    -   @chat-adapter/shared@4.29.0

## @chat-adapter/messenger@4.29.0

### Minor Changes

- 2ffed48: Adapter internals are now `protected` rather than `private`,
so consumers can subclass an adapter to override or extend its behavior
(e.g. handling additional Telegram update types by overriding
`processUpdate`).

### Patch Changes

-   e60bc8c: chore: set supported Node versions in engines

- 06fb8e5: Align package shapes with the new `konsistent` conventions.
All changes are
backwards-compatible — previous type names are kept as deprecated
aliases.

- `@chat-adapter/gchat`, `@chat-adapter/slack`: moved `*AdapterConfig`
(and
related sub-types) into a `./types` module; the public re-exports from
        `index.ts` are unchanged.
- `@chat-adapter/slack`: `createSlackAdapter` now accepts
`SlackAdapterConfig`
directly instead of `Partial<SlackAdapterConfig>`. Every field on the
config
        was already optional, so no call sites need to change.
- `@chat-adapter/messenger`: `MessengerAdapterConfig` fields are now
optional
(the factory still falls back to `FACEBOOK_*` env vars), and `logger` /
`userName` live on `MessengerAdapterConfig` directly. The factory
signature
is now `createMessengerAdapter(config?: MessengerAdapterConfig)`.
- `@chat-adapter/web`: renamed `WebAdapterOptions` to
`WebAdapterConfig`; the
        old name is exported as a deprecated alias.
- `@chat-adapter/whatsapp`: every field on `WhatsAppAdapterConfig` is
optional
(the factory still falls back to `WHATSAPP_*` env vars).
`createWhatsAppAdapter`
is now typed `(config?: WhatsAppAdapterConfig) => WhatsAppAdapter`.
- `@chat-adapter/state-memory`: added an empty
`MemoryStateAdapterOptions`
type so the package matches every other state adapter;
`createMemoryState`
        now accepts an optional argument of that type.
    -   `@chat-adapter/state-ioredis`, `@chat-adapter/state-redis`,
`@chat-adapter/state-pg`: the URL- and client-based option shapes were
split
        into named interfaces (`*StateAdapterUrlOptions` /
`*StateAdapterClientOptions`) and unified under `*StateAdapterOptions`.
The
factories now take the union type directly. Old names —
`RedisStateClientOptions`,
        `CreateRedisStateOptions`, `PostgresStateClientOptions`,
`CreatePostgresStateOptions`, `IoRedisStateClientOptions` — are kept as
        deprecated aliases.

-   Updated dependencies [ac8a207]

-   Updated dependencies [e60bc8c]

-   Updated dependencies [add2730]

-   Updated dependencies [b75eedb]
    -   chat@4.29.0
    -   @chat-adapter/shared@4.29.0

## @chat-adapter/shared@4.29.0

### Minor Changes

-   add2730: support typed Telegram attachment uploads

### Patch Changes

-   e60bc8c: chore: set supported Node versions in engines
-   Updated dependencies [ac8a207]
-   Updated dependencies [e60bc8c]
-   Updated dependencies [b75eedb]
    -   chat@4.29.0

## @chat-adapter/slack@4.29.0

### Minor Changes

- 2f108bd: Rename the typed native client getter on the Slack, GitHub,
and Linear adapters to match the underlying SDK class.

- `bot.getAdapter("slack").client` is now
`bot.getAdapter("slack").webClient` (returns `WebClient` from
`@slack/web-api`).
- `bot.getAdapter("github").client` is now
`bot.getAdapter("github").octokit` (returns `Octokit`).
- `bot.getAdapter("linear").client` is now
`bot.getAdapter("linear").linearClient` (returns `LinearClient`).

The previous `.client` getter is kept as a deprecated alias on all three
adapters, so existing code continues to work without changes.

- c46fdb6: Add support for external `installationProvider` and
Enterprise Grid org-wide installs.

- New optional `installationProvider` config: `{
getInstallation(installationId, isEnterpriseInstall) =>
Promise<SlackInstallation | null> }`. When set, the adapter resolves bot
tokens for incoming events, slash commands, and interactive payloads
through the provider instead of the internal `StateAdapter` — useful for
hosted token-management systems (e.g. Vercel Connect). The provider is
read-only; OAuth callback writes (`setInstallation`,
`handleOAuthCallback`) and the `getInstallation`/`deleteInstallation`
public methods continue to use internal state, so callers using a
provider should manage their own writes.
- Enterprise Grid org-wide installs (`is_enterprise_install: true`) are
now keyed on `enterprise_id` instead of `team_id` across event_callback,
slash command, and interactive payload paths. Multi-workspace
deployments using the internal `StateAdapter` for org-wide installs must
repopulate installations under the `enterprise_id` key — previously,
org-wide events would fall through to a `team_id` lookup that did not
match what the OAuth flow had stored.

- fdebde7: feat(slack): expose direct `WebClient` access via
`adapter.client`

`bot.getAdapter("slack").client` now returns a typed `WebClient` from
`@slack/web-api`, matching the existing pattern on the Linear and GitHub
adapters. The returned client is bound to the bot token for the current
    request context (multi-workspace) or the configured default token
(single-workspace). Use it for any Web API call not covered by the SDK's
    high-level methods, e.g. `adapter.client.pins.add(...)` or
    `adapter.client.usergroups.list(...)`.

    Resolution order:

    1.  The token from the current `requestContext` — set during webhook
        handling, or by `adapter.withBotToken(token, fn)`.
    2.  The default `botToken`, when configured as a static string or a
        synchronous resolver function.

Throws `AuthenticationError` outside of any context in multi-workspace
mode, or when `botToken` is configured as an async resolver function.
    For async tokens, await the token first and bind it explicitly with
    `adapter.withBotToken(token, () => adapter.client...)`.

    Also fixes `createSlackAdapter()` silently dropping the `apiUrl`
    config field.

- 2ffed48: Adapter internals are now `protected` rather than `private`,
so consumers can subclass an adapter to override or extend its behavior
(e.g. handling additional Telegram update types by overriding
`processUpdate`).

### Patch Changes

-   e60bc8c: chore: set supported Node versions in engines

- 06fb8e5: Align package shapes with the new `konsistent` conventions.
All changes are
backwards-compatible — previous type names are kept as deprecated
aliases.

- `@chat-adapter/gchat`, `@chat-adapter/slack`: moved `*AdapterConfig`
(and
related sub-types) into a `./types` module; the public re-exports from
        `index.ts` are unchanged.
- `@chat-adapter/slack`: `createSlackAdapter` now accepts
`SlackAdapterConfig`
directly instead of `Partial<SlackAdapterConfig>`. Every field on the
config
        was already optional, so no call sites need to change.
- `@chat-adapter/messenger`: `MessengerAdapterConfig` fields are now
optional
(the factory still falls back to `FACEBOOK_*` env vars), and `logger` /
`userName` live on `MessengerAdapterConfig` directly. The factory
signature
is now `createMessengerAdapter(config?: MessengerAdapterConfig)`.
- `@chat-adapter/web`: renamed `WebAdapterOptions` to
`WebAdapterConfig`; the
        old name is exported as a deprecated alias.
- `@chat-adapter/whatsapp`: every field on `WhatsAppAdapterConfig` is
optional
(the factory still falls back to `WHATSAPP_*` env vars).
`createWhatsAppAdapter`
is now typed `(config?: WhatsAppAdapterConfig) => WhatsAppAdapter`.
- `@chat-adapter/state-memory`: added an empty
`MemoryStateAdapterOptions`
type so the package matches every other state adapter;
`createMemoryState`
        now accepts an optional argument of that type.
    -   `@chat-adapter/state-ioredis`, `@chat-adapter/state-redis`,
`@chat-adapter/state-pg`: the URL- and client-based option shapes were
split
        into named interfaces (`*StateAdapterUrlOptions` /
`*StateAdapterClientOptions`) and unified under `*StateAdapterOptions`.
The
factories now take the union type directly. Old names —
`RedisStateClientOptions`,
        `CreateRedisStateOptions`, `PostgresStateClientOptions`,
`CreatePostgresStateOptions`, `IoRedisStateClientOptions` — are kept as
        deprecated aliases.

- 0f0c203: fix(slack): prefer `webhookVerifier` over `signingSecret` and
`SLACK_SIGNING_SECRET`

When a `webhookVerifier` is configured, it now takes precedence over
both the
`signingSecret` config field and the `SLACK_SIGNING_SECRET` env var.
Previously,
    a configured `signingSecret` (or env var) would shadow the verifier.

-   Updated dependencies [ac8a207]

-   Updated dependencies [e60bc8c]

-   Updated dependencies [add2730]

-   Updated dependencies [b75eedb]
    -   chat@4.29.0
    -   @chat-adapter/shared@4.29.0

## @chat-adapter/teams@4.29.0

### Minor Changes

- 2ffed48: Adapter internals are now `protected` rather than `private`,
so consumers can subclass an adapter to override or extend its behavior
(e.g. handling additional Telegram update types by overriding
`processUpdate`).

### Patch Changes

-   e60bc8c: chore: set supported Node versions in engines
-   Updated dependencies [ac8a207]
-   Updated dependencies [e60bc8c]
-   Updated dependencies [add2730]
-   Updated dependencies [b75eedb]
    -   chat@4.29.0
    -   @chat-adapter/shared@4.29.0

## @chat-adapter/telegram@4.29.0

### Minor Changes

-   add2730: support typed Telegram attachment uploads
- 2ffed48: Adapter internals are now `protected` rather than `private`,
so consumers can subclass an adapter to override or extend its behavior
(e.g. handling additional Telegram update types by overriding
`processUpdate`).

### Patch Changes

-   e60bc8c: chore: set supported Node versions in engines
- 711babe: Handle `video_note` (round video messages) in
`extractAttachments`. Previously these messages were silently dropped;
now they are returned as `video` attachments with `width`/`height` set
to the clip's `length`.
-   Updated dependencies [ac8a207]
-   Updated dependencies [e60bc8c]
-   Updated dependencies [add2730]
-   Updated dependencies [b75eedb]
    -   chat@4.29.0
    -   @chat-adapter/shared@4.29.0

## @chat-adapter/web@4.29.0

### Minor Changes

- 2ffed48: Adapter internals are now `protected` rather than `private`,
so consumers can subclass an adapter to override or extend its behavior
(e.g. handling additional Telegram update types by overriding
`processUpdate`).
- 716e934: Add first-class Vue and Svelte support via new subpath
exports `@chat-adapter/web/vue` and `@chat-adapter/web/svelte`. Each
exports a `useChat()` factory preconfigured with `DefaultChatTransport`,
returning a framework-reactive `Chat` instance from `@ai-sdk/vue` /
`@ai-sdk/svelte` respectively. Note: unlike the React subpath which
wraps `@ai-sdk/react`'s `useChat` hook and returns destructurable
helpers, the Vue and Svelte wrappers return a `Chat` class instance —
access `chat.messages`, `chat.sendMessage()`, `chat.status`, and
`chat.stop()` directly on the object.

### Patch Changes

-   e60bc8c: chore: set supported Node versions in engines

- 06fb8e5: Align package shapes with the new `konsistent` conventions.
All changes are
backwards-compatible — previous type names are kept as deprecated
aliases.

- `@chat-adapter/gchat`, `@chat-adapter/slack`: moved `*AdapterConfig`
(and
related sub-types) into a `./types` module; the public re-exports from
        `index.ts` are unchanged.
- `@chat-adapter/slack`: `createSlackAdapter` now accepts
`SlackAdapterConfig`
directly instead of `Partial<SlackAdapterConfig>`. Every field on the
config
        was already optional, so no call sites need to change.
- `@chat-adapter/messenger`: `MessengerAdapterConfig` fields are now
optional
(the factory still falls back to `FACEBOOK_*` env vars), and `logger` /
`userName` live on `MessengerAdapterConfig` directly. The factory
signature
is now `createMessengerAdapter(config?: MessengerAdapterConfig)`.
- `@chat-adapter/web`: renamed `WebAdapterOptions` to
`WebAdapterConfig`; the
        old name is exported as a deprecated alias.
- `@chat-adapter/whatsapp`: every field on `WhatsAppAdapterConfig` is
optional
(the factory still falls back to `WHATSAPP_*` env vars).
`createWhatsAppAdapter`
is now typed `(config?: WhatsAppAdapterConfig) => WhatsAppAdapter`.
- `@chat-adapter/state-memory`: added an empty
`MemoryStateAdapterOptions`
type so the package matches every other state adapter;
`createMemoryState`
        now accepts an optional argument of that type.
    -   `@chat-adapter/state-ioredis`, `@chat-adapter/state-redis`,
`@chat-adapter/state-pg`: the URL- and client-based option shapes were
split
        into named interfaces (`*StateAdapterUrlOptions` /
`*StateAdapterClientOptions`) and unified under `*StateAdapterOptions`.
The
factories now take the union type directly. Old names —
`RedisStateClientOptions`,
        `CreateRedisStateOptions`, `PostgresStateClientOptions`,
`CreatePostgresStateOptions`, `IoRedisStateClientOptions` — are kept as
        deprecated aliases.

-   Updated dependencies [ac8a207]

-   Updated dependencies [e60bc8c]

-   Updated dependencies [add2730]

-   Updated dependencies [b75eedb]
    -   chat@4.29.0
    -   @chat-adapter/shared@4.29.0

## @chat-adapter/whatsapp@4.29.0

### Minor Changes

- 2ffed48: Adapter internals are now `protected` rather than `private`,
so consumers can subclass an adapter to override or extend its behavior
(e.g. handling additional Telegram update types by overriding
`processUpdate`).

### Patch Changes

-   e60bc8c: chore: set supported Node versions in engines

- 06fb8e5: Align package shapes with the new `konsistent` conventions.
All changes are
backwards-compatible — previous type names are kept as deprecated
aliases.

- `@chat-adapter/gchat`, `@chat-adapter/slack`: moved `*AdapterConfig`
(and
related sub-types) into a `./types` module; the public re-exports from
        `index.ts` are unchanged.
- `@chat-adapter/slack`: `createSlackAdapter` now accepts
`SlackAdapterConfig`
directly instead of `Partial<SlackAdapterConfig>`. Every field on the
config
        was already optional, so no call sites need to change.
- `@chat-adapter/messenger`: `MessengerAdapterConfig` fields are now
optional
(the factory still falls back to `FACEBOOK_*` env vars), and `logger` /
`userName` live on `MessengerAdapterConfig` directly. The factory
signature
is now `createMessengerAdapter(config?: MessengerAdapterConfig)`.
- `@chat-adapter/web`: renamed `WebAdapterOptions` to
`WebAdapterConfig`; the
        old name is exported as a deprecated alias.
- `@chat-adapter/whatsapp`: every field on `WhatsAppAdapterConfig` is
optional
(the factory still falls back to `WHATSAPP_*` env vars).
`createWhatsAppAdapter`
is now typed `(config?: WhatsAppAdapterConfig) => WhatsAppAdapter`.
- `@chat-adapter/state-memory`: added an empty
`MemoryStateAdapterOptions`
type so the package matches every other state adapter;
`createMemoryState`
        now accepts an optional argument of that type.
    -   `@chat-adapter/state-ioredis`, `@chat-adapter/state-redis`,
`@chat-adapter/state-pg`: the URL- and client-based option shapes were
split
        into named interfaces (`*StateAdapterUrlOptions` /
`*StateAdapterClientOptions`) and unified under `*StateAdapterOptions`.
The
factories now take the union type directly. Old names —
`RedisStateClientOptions`,
        `CreateRedisStateOptions`, `PostgresStateClientOptions`,
`CreatePostgresStateOptions`, `IoRedisStateClientOptions` — are kept as
        deprecated aliases.

-   Updated dependencies [ac8a207]

-   Updated dependencies [e60bc8c]

-   Updated dependencies [add2730]

-   Updated dependencies [b75eedb]
    -   chat@4.29.0
    -   @chat-adapter/shared@4.29.0

## chat@4.29.0

### Minor Changes

- ac8a207: Add `chat/ai` subpath as the home for AI utilities, including
`createChatTools` for the Vercel AI SDK and `toAiMessages` for
converting chat history into AI SDK prompts.

`createChatTools` exposes Chat SDK operations as ready-to-use AI SDK
tools so an agent can read messages, post replies, send DMs, react,
edit, delete, and manage thread subscriptions across every adapter the
supplied `Chat` instance has registered. Write operations require user
approval by default and can be toggled globally or per-tool via
`requireApproval`. Three presets (`reader`, `messenger`, `moderator`)
scope the toolset, and tools can also be cherry-picked from the same
subpath.

`toAiMessages` (and the `AiMessage` / `AiMessagePart` /
`ToAiMessagesOptions` types) now ship from `chat/ai` alongside the tools
— keeping the optional `ai` and `zod` peer dependencies out of bundles
that don't use them. The previous `chat` re-exports continue to work,
but are marked `@deprecated` so editors surface a hint pointing at
`chat/ai`; existing code keeps compiling, and migrating is a single
import-path change.

-   b75eedb: add burst concurrency strategy

### Patch Changes

-   e60bc8c: chore: set supported Node versions in engines

## @chat-adapter/state-ioredis@4.29.0

### Patch Changes

-   e60bc8c: chore: set supported Node versions in engines

- 06fb8e5: Align package shapes with the new `konsistent` conventions.
All changes are
backwards-compatible — previous type names are kept as deprecated
aliases.

- `@chat-adapter/gchat`, `@chat-adapter/slack`: moved `*AdapterConfig`
(and
related sub-types) into a `./types` module; the public re-exports from
        `index.ts` are unchanged.
- `@chat-adapter/slack`: `createSlackAdapter` now accepts
`SlackAdapterConfig`
directly instead of `Partial<SlackAdapterConfig>`. Every field on the
config
        was already optional, so no call sites need to change.
- `@chat-adapter/messenger`: `MessengerAdapterConfig` fields are now
optional
(the factory still falls back to `FACEBOOK_*` env vars), and `logger` /
`userName` live on `MessengerAdapterConfig` directly. The factory
signature
is now `createMessengerAdapter(config?: MessengerAdapterConfig)`.
- `@chat-adapter/web`: renamed `WebAdapterOptions` to
`WebAdapterConfig`; the
        old name is exported as a deprecated alias.
- `@chat-adapter/whatsapp`: every field on `WhatsAppAdapterConfig` is
optional
(the factory still falls back to `WHATSAPP_*` env vars).
`createWhatsAppAdapter`
is now typed `(config?: WhatsAppAdapterConfig) => WhatsAppAdapter`.
- `@chat-adapter/state-memory`: added an empty
`MemoryStateAdapterOptions`
type so the package matches every other state adapter;
`createMemoryState`
        now accepts an optional argument of that type.
    -   `@chat-adapter/state-ioredis`, `@chat-adapter/state-redis`,
`@chat-adapter/state-pg`: the URL- and client-based option shapes were
split
        into named interfaces (`*StateAdapterUrlOptions` /
`*StateAdapterClientOptions`) and unified under `*StateAdapterOptions`.
The
factories now take the union type directly. Old names —
`RedisStateClientOptions`,
        `CreateRedisStateOptions`, `PostgresStateClientOptions`,
`CreatePostgresStateOptions`, `IoRedisStateClientOptions` — are kept as
        deprecated aliases.

-   Updated dependencies [ac8a207]

-   Updated dependencies [e60bc8c]

-   Updated dependencies [b75eedb]
    -   chat@4.29.0

## @chat-adapter/state-memory@4.29.0

### Patch Changes

-   e60bc8c: chore: set supported Node versions in engines

- 06fb8e5: Align package shapes with the new `konsistent` conventions.
All changes are
backwards-compatible — previous type names are kept as deprecated
aliases.

- `@chat-adapter/gchat`, `@chat-adapter/slack`: moved `*AdapterConfig`
(and
related sub-types) into a `./types` module; the public re-exports from
        `index.ts` are unchanged.
- `@chat-adapter/slack`: `createSlackAdapter` now accepts
`SlackAdapterConfig`
directly instead of `Partial<SlackAdapterConfig>`. Every field on the
config
        was already optional, so no call sites need to change.
- `@chat-adapter/messenger`: `MessengerAdapterConfig` fields are now
optional
(the factory still falls back to `FACEBOOK_*` env vars), and `logger` /
`userName` live on `MessengerAdapterConfig` directly. The factory
signature
is now `createMessengerAdapter(config?: MessengerAdapterConfig)`.
- `@chat-adapter/web`: renamed `WebAdapterOptions` to
`WebAdapterConfig`; the
        old name is exported as a deprecated alias.
- `@chat-adapter/whatsapp`: every field on `WhatsAppAdapterConfig` is
optional
(the factory still falls back to `WHATSAPP_*` env vars).
`createWhatsAppAdapter`
is now typed `(config?: WhatsAppAdapterConfig) => WhatsAppAdapter`.
- `@chat-adapter/state-memory`: added an empty
`MemoryStateAdapterOptions`
type so the package matches every other state adapter;
`createMemoryState`
        now accepts an optional argument of that type.
    -   `@chat-adapter/state-ioredis`, `@chat-adapter/state-redis`,
`@chat-adapter/state-pg`: the URL- and client-based option shapes were
split
        into named interfaces (`*StateAdapterUrlOptions` /
`*StateAdapterClientOptions`) and unified under `*StateAdapterOptions`.
The
factories now take the union type directly. Old names —
`RedisStateClientOptions`,
        `CreateRedisStateOptions`, `PostgresStateClientOptions`,
`CreatePostgresStateOptions`, `IoRedisStateClientOptions` — are kept as
        deprecated aliases.

-   Updated dependencies [ac8a207]

-   Updated dependencies [e60bc8c]

-   Updated dependencies [b75eedb]
    -   chat@4.29.0

## @chat-adapter/state-pg@4.29.0

### Patch Changes

-   e60bc8c: chore: set supported Node versions in engines

- 06fb8e5: Align package shapes with the new `konsistent` conventions.
All changes are
backwards-compatible — previous type names are kept as deprecated
aliases.

- `@chat-adapter/gchat`, `@chat-adapter/slack`: moved `*AdapterConfig`
(and
related sub-types) into a `./types` module; the public re-exports from
        `index.ts` are unchanged.
- `@chat-adapter/slack`: `createSlackAdapter` now accepts
`SlackAdapterConfig`
directly instead of `Partial<SlackAdapterConfig>`. Every field on the
config
        was already optional, so no call sites need to change.
- `@chat-adapter/messenger`: `MessengerAdapterConfig` fields are now
optional
(the factory still falls back to `FACEBOOK_*` env vars), and `logger` /
`userName` live on `MessengerAdapterConfig` directly. The factory
signature
is now `createMessengerAdapter(config?: MessengerAdapterConfig)`.
- `@chat-adapter/web`: renamed `WebAdapterOptions` to
`WebAdapterConfig`; the
        old name is exported as a deprecated alias.
- `@chat-adapter/whatsapp`: every field on `WhatsAppAdapterConfig` is
optional
(the factory still falls back to `WHATSAPP_*` env vars).
`createWhatsAppAdapter`
is now typed `(config?: WhatsAppAdapterConfig) => WhatsAppAdapter`.
- `@chat-adapter/state-memory`: added an empty
`MemoryStateAdapterOptions`
type so the package matches every other state adapter;
`createMemoryState`
        now accepts an optional argument of that type.
    -   `@chat-adapter/state-ioredis`, `@chat-adapter/state-redis`,
`@chat-adapter/state-pg`: the URL- and client-based option shapes were
split
        into named interfaces (`*StateAdapterUrlOptions` /
`*StateAdapterClientOptions`) and unified under `*StateAdapterOptions`.
The
factories now take the union type directly. Old names —
`RedisStateClientOptions`,
        `CreateRedisStateOptions`, `PostgresStateClientOptions`,
`CreatePostgresStateOptions`, `IoRedisStateClientOptions` — are kept as
        deprecated aliases.

-   Updated dependencies [ac8a207]

-   Updated dependencies [e60bc8c]

-   Updated dependencies [b75eedb]
    -   chat@4.29.0

## @chat-adapter/state-redis@4.29.0

### Patch Changes

-   e60bc8c: chore: set supported Node versions in engines

- 06fb8e5: Align package shapes with the new `konsistent` conventions.
All changes are
backwards-compatible — previous type names are kept as deprecated
aliases.

- `@chat-adapter/gchat`, `@chat-adapter/slack`: moved `*AdapterConfig`
(and
related sub-types) into a `./types` module; the public re-exports from
        `index.ts` are unchanged.
- `@chat-adapter/slack`: `createSlackAdapter` now accepts
`SlackAdapterConfig`
directly instead of `Partial<SlackAdapterConfig>`. Every field on the
config
        was already optional, so no call sites need to change.
- `@chat-adapter/messenger`: `MessengerAdapterConfig` fields are now
optional
(the factory still falls back to `FACEBOOK_*` env vars), and `logger` /
`userName` live on `MessengerAdapterConfig` directly. The factory
signature
is now `createMessengerAdapter(config?: MessengerAdapterConfig)`.
- `@chat-adapter/web`: renamed `WebAdapterOptions` to
`WebAdapterConfig`; the
        old name is exported as a deprecated alias.
- `@chat-adapter/whatsapp`: every field on `WhatsAppAdapterConfig` is
optional
(the factory still falls back to `WHATSAPP_*` env vars).
`createWhatsAppAdapter`
is now typed `(config?: WhatsAppAdapterConfig) => WhatsAppAdapter`.
- `@chat-adapter/state-memory`: added an empty
`MemoryStateAdapterOptions`
type so the package matches every other state adapter;
`createMemoryState`
        now accepts an optional argument of that type.
    -   `@chat-adapter/state-ioredis`, `@chat-adapter/state-redis`,
`@chat-adapter/state-pg`: the URL- and client-based option shapes were
split
        into named interfaces (`*StateAdapterUrlOptions` /
`*StateAdapterClientOptions`) and unified under `*StateAdapterOptions`.
The
factories now take the union type directly. Old names —
`RedisStateClientOptions`,
        `CreateRedisStateOptions`, `PostgresStateClientOptions`,
`CreatePostgresStateOptions`, `IoRedisStateClientOptions` — are kept as
        deprecated aliases.

-   Updated dependencies [ac8a207]

-   Updated dependencies [e60bc8c]

-   Updated dependencies [b75eedb]
    -   chat@4.29.0

## @chat-adapter/tests@4.29.0

### Patch Changes

- 0adf3ad: Add `@chat-adapter/tests` — Vitest factories, matchers, and
setup utilities for Chat SDK adapter and bot authors.

- **Factories**: `createMockAdapter`, `createMockChatInstance`,
`createMockState` (with working in-memory
subscriptions/locks/KV/queues), `createTestMessage`,
`mockLogger`/`createMockLogger`.
- **Matchers**: `toHavePosted(threadId, textPattern?)`,
`toHaveDispatched(handler)`, `toBeSubscribedTo(threadId)`.
- **Setup file**: `@chat-adapter/tests/setup` registers all matchers via
`expect.extend` — drop into `vitest.config.ts` `setupFiles`.

`chat` and `vitest` are peer dependencies. Adapter-specific helpers
(e.g. signed Slack webhook builders) belong in each adapter's own
`/testing` subpath, not in this kit.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-18 07:16:55 -07:00
Ben Sabic 2f108bd4b3 feat: rename adapter.client to adapter.octokit / adapter.linearClient / adapter.webClient (#478)
## Summary

Rename the public native client getter on the GitHub, Linear, and Slack
adapters so it matches the underlying SDK class instead of the generic
`.client`. The previous `.client` getter is preserved as a `@deprecated`
alias on all three adapters, so existing code keeps working without
changes.

- `bot.getAdapter("github").client` is now
`bot.getAdapter("github").octokit` (returns `Octokit`)
- `bot.getAdapter("linear").client` is now
`bot.getAdapter("linear").linearClient` (returns `LinearClient` from
`@linear/sdk`)
- `bot.getAdapter("slack").client` is now
`bot.getAdapter("slack").webClient` (returns `WebClient` from
`@slack/web-api`)

Each new getter has TSDoc covering single- vs multi-tenant resolution
rules and when calling outside a webhook handler throws. Focused unit
tests assert that the new getter returns the underlying SDK instance,
that single-tenant calls return the same instance, that the deprecated
`.client` alias points at the new getter, that multi-tenant mode without
webhook context throws on both getters, and that inside a webhook
context the getter resolves to the per-tenant client.

Commits are split for review:

1. `feat(adapter-github): rename adapter.client to adapter.octokit`
2. `feat(adapter-linear): rename adapter.client to adapter.linearClient`
3. `docs: use .octokit / .linearClient in chat-sdk.dev examples`
4. `chore: changeset for adapter native client getter rename`
5. `fix: hoist regex literals in new client-getter tests to module
scope`
6. `feat(adapter-slack): rename adapter.client to adapter.webClient`
7. `docs: include slack .webClient in chat-sdk.dev examples`
8. `chore: include adapter-slack in native client getter rename
changeset`
9. `test(adapter-github,adapter-linear): cover with-context resolution
on the new client getters`

---------

Co-authored-by: Ben Sabic <bensabic@users.noreply.github.com>
2026-05-13 08:35:31 +10:00
Ben Sabic 79227ae991 docs: refresh adapter pages with hand-authored MDX (#474)
## Summary

Refreshes the adapter docs end-to-end so every adapter — official,
vendor-official, and community — now ships hand-authored MDX, lives
under a clean URL structure, and renders on a polished
sidebar/right-rail layout dedicated to `/adapters` (the shared `/docs`
chrome is untouched).

```mermaid
flowchart LR
  subgraph Before
    direction TB
    OB[official] --> CB[community<br/>incl. 5 vendor pages]
  end
  subgraph After
    direction TB
    OA[official] --> VA[vendor-official<br/>5 pages] --> CA[community]
  end
  Before -.-> After
```

### Content & routing

- **New `/adapters/vendor-official/<slug>` route** for vendor-maintained
adapters (Beeper Matrix, Photon iMessage, Liveblocks, Resend, Zernio).
Sidebar gets a third labelled group ("Vendor-Official Adapters") between
Official and Community, with a top divider matching the existing
Community treatment.
- **All 13 vendor-official + community adapters migrated** from runtime
README fetching to hand-authored MDX with rich `features:` matrices and
full body content (install, quick start, configuration, auth,
gateway/streaming, troubleshooting). README fetch stays as a fallback
for any future community adapter that hasn't been migrated yet, gated by
a new `mdxBody: true` frontmatter flag.
- **Messenger filter pages removed** (`/adapters/for/<messenger>` + the
"Browse by messenger" chip row on `/adapters`). Existing URLs
308-redirect to `/adapters`.
- **Permanent redirects** from
`/adapters/community/{matrix,imessage,resend,zernio,liveblocks}` to
their new `/adapters/vendor-official/...` paths.
- **Fixed** `/docs/adapters` and `/docs/state` so the bare pages are
accessible again — the previous catch-all redirect (`:slug*`) was
swallowing them. Switched to `:slug+` so subpath URLs still 308 while
the bare pages render.

### Visual polish

- **Adapter-only sidebar variant** (`AdaptersDocsLayout` +
`AdaptersSidebar`) with uppercase eyebrow separators, tighter rows, and
a thin themed scrollbar utility class. The shared `/docs` sidebar is
untouched.
- **Restyled `AdapterHero`**: drops the badges row + packageName, sits
the title inline with the logo, larger 17 px tagline, horizontal divider
beneath the block.
- **Restyled `PackageInstall`** as a tabbed dark single-line snippet
with a `$` prompt prefix and a copy button — replaces the previous
multi-line `CodeBlock` layout.
- **New "Deploy your chat app on Vercel" upsell card** (`<Upsell />`)
replaces the old `EditSource / ScrollTop / Feedback / CopyPage` footer
cluster on every adapter detail page.
- **Listing & messenger pages**: align the H1 to a tighter `text-4xl
sm:text-[44px]`, and the section headers to `text-base font-medium
tracking-tight` with a one-line muted lede.

### Tooling & tests

- Added `mdxBody: true` opt-in to the adapter frontmatter schema
(`source.config.ts`), and updated both detail-page handlers
(`community/[slug]` and the new `vendor-official/[slug]`) to render the
MDX body when present, falling back to README fetch otherwise.
- Refactored both detail-page handlers to flatten the body-render
branches into a `renderBody()` helper, removing the nested ternaries
that were tripping `lint/style/noNestedTernary`.
- New test file
[`packages/integration-tests/src/docs-adapters.test.ts`](https://github.com/vercel/chat/blob/docs/refresh-adapters/packages/integration-tests/src/docs-adapters.test.ts)
— **220 new assertions** covering:
- Adapter MDX frontmatter completeness, slug ↔ filename consistency, and
`type ∈ {platform, state}`.
- Vendor-official invariants: exactly the expected slugs,
`vendorOfficial: true`, `community: true`, `author`, `mdxBody: true`,
`<FeatureSupport />` rendered.
- Community invariants: `community: true` (never vendor-official),
`mdxBody: true`, `<FeatureSupport />`.
- Official invariants: never flagged, `packageName` always under
`@chat-adapter/*`.
- `adapters.json` ↔ MDX sync on `packageName` / `type` / `community` /
`vendorOfficial`.
- Extended `VALID_DOC_PACKAGES` so `docs-content.test.ts` accepts the
new vendor-official + community packages, plus `@chat-adapter/web`,
`@chat-adapter/web/react`, and `@chat-adapter/messenger`.

### Per-package AGENTS.md

- Added `AGENTS.md` to every official adapter and state adapter (14
packages), each tailored to that adapter's surface — overview, directory
layout, build/test commands, public exports, thread ID format, webhook
flow, authentication, format conversion, cards/streaming, platform
quirks, testing approach, coding conventions, and release rules.
- Added a one-line `CLAUDE.md` (`@AGENTS.md`) beside each so Claude Code
picks up the same instructions through its built-in resolver — same
convention as the root.

### Web adapter copy

- Cleaned up the Web adapter tagline (removed inline backticks) and
dropped the now-redundant "v1 scope" section from the body.

---------

Co-authored-by: Ben Sabic <bensabic@users.noreply.github.com>
2026-05-12 16:01:19 +10:00
Felix Arntz e60bc8c408 chore: add .nvmrc file, formally specify Node version range support, and cover more versions in CI (#465)
* add .nvmrc file

* follow up

* make support of Node >= 20 explicit

* update default Node version for contributing to the repo to 24

* run build-and-test CI job for both Node 20 and 24

* add changeset for package.json change
2026-05-11 19:28:34 +10:00
Salman Shaikh 2ffed48bea feat: make adapter internals protected to enable subclassing (#475)
* chore: changed class function access to protected

* chore: format

* chore: added changeset

* chore(changeset): drop unchanged shared package, expand description

* refactor(adapters): keep internal state private, only protected for extension surface

Narrow scope of #475: caches, polling/runtime state, and one-shot warning
flags stay private. Methods and shared helpers (logger, formatConverter,
chat, config) remain protected as the documented extension surface.

Also fixes a typecheck failure where gchat's oauth2Client (now private)
no longer requires a portable type for the emitted .d.ts.

* test(adapters): add subclass extensibility tests

Each adapter now has a compile-time test that subclasses can access the
documented protected surface. If any of these members revert to private,
the test file fails to type-check.

* style: apply ultracite formatting to subclass tests

* style(slack): mark static cache TTL constants as readonly

These three protected static cache TTLs are configuration constants, not
mutable state. Marking them readonly prevents subclasses (the new extension
surface from this PR) from mutating values shared across every instance
in-process.

* test(adapters): document intent of subclass extensibility tests

Mirrors the inline comment from the Telegram subclass test across the other
nine adapter tests so future readers immediately understand these blocks are
type-only sentinels — they fail at typecheck (not vitest) if a member reverts
to private.

* docs(adapters): document subclassing for adapter customization

Adds a "Customizing an adapter via subclassing" section to the Adapters page
that walks through extending an official adapter to override a protected hook
(using the issue #433 Telegram processUpdate scenario as the canonical
example) and clarifies that private members are intentionally off-limits.

* refactor(linear): expose accessTokenExpiry to subclasses

The surrounding refreshClientCredentialsToken and ensureValidToken methods
are now protected, but accessTokenExpiry was kept private — meaning a
subclass overriding either method couldn't read or update the expiry without
calling super. Flipping it to protected lets subclasses fully reimplement
the token-refresh flow.

* chore(changeset): bump adapters from patch to minor

This PR adds a new, additive capability — subclassing official adapters to
override protected hooks. Per CONTRIBUTING.md, additive backward-compatible
features warrant a minor bump rather than a patch.

* docs(adapters): clarify subclassing surface stability

Correct the parenthetical describing what stays `private` (credentials are
now `protected`) and add a callout warning that the `protected` extension
surface is intentionally broader than the public API but not yet fully
stable, so subclass authors know to pin versions and prefer overriding
the smallest hook.

---------

Co-authored-by: Ben Sabic <bensabic@users.noreply.github.com>
2026-05-10 20:44:41 +10:00
github-actions[bot] 5edcbbf7ef chore(release): version packages (#464)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-08 04:09:48 -07:00
github-actions[bot] b3fc64d34e chore(release): version packages (#442)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-08 04:01:03 -07:00
josh 0cc3d06fd4 docs: fix stale API examples, adapter matrix, and broken links (#463)
* 1

* 2

* cs

* 3
2026-05-08 03:58:08 -07:00
josh eb5f94a8ee feat(chat): add message.subject and adapter client access (#459)
* 1

* w

* 3f

* x

* ln

* gh

* sl

* t1

* u

* t2

* t3

* t4

* t5

* d

* d2

* cs

* fx

* cl

* docs: clean up subject + .client docs and restructure nav

- subject.mdx: simplify prose, drop redundant platform lists, link to MessageSubject API and getAdapter
- api/message.mdx: add MessageSubject TypeTable
- api/chat.mdx: expand getAdapter with Direct client access content
- adapters.mdx: add Parent subject and Native client rows to feature matrix
- usage.mdx: mention .client under Accessing adapters
- adapter-github/-linear READMEs: add Direct API client section
- meta.json: split Features into Messaging + Interactivity, move error-handling to Usage
- title case across messaging-cluster page titles

---------

Co-authored-by: Ben Sabic <bensabic@users.noreply.github.com>
2026-05-08 10:51:53 +10:00
Malte Ubl 9824d3335e Adapter hardening pass (#441)
* Adapter hardening pass

* chore: remove redundant changeset

---------

Co-authored-by: dancer <josh@afterima.ge>
2026-05-02 08:37:45 -07:00
josh d9c2fcaf93 docs: update documentation for 4.27.0 release (#439)
* docs: update documentation for 4.27.0 release

* docs: fix broken apiUrl link in adapters feature matrix

* docs: fix error code thrown-by columns and add missing UNKNOWN_USER_ID_FORMAT
2026-05-01 07:12:42 -07:00
github-actions[bot] f55378a3d8 chore(release): version packages (#378)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-30 13:41:37 -07:00
Ben Sabic a520797922 feat: add chat.getUser() for cross-platform user lookups (#391)
* feat: add chat.getUser() for cross-platform user lookups

Add UserInfo type and optional getUser() method to the Adapter interface.
Implement on Slack (extends existing lookupUser with email/avatar),
Discord, Google Chat, GitHub, Linear, and Telegram adapters.

Add "Who Am I" button to the example app demonstrating the feature.
Update docs with getUser API reference and usage examples.

* fix(chat): improve getUser across slack and gchat adapters

- slack: return null from lookupUser on failure instead of fallback
  object, removing the isBot === undefined sentinel in getUser
- slack: use image_192 instead of image_72 for better avatar quality
- gchat: cache avatarUrl from webhook sender payload
- gchat: return avatarUrl in getUser response
- gchat: fix tests to use current cache format with isBot field
- docs: document null return, fix example to use message.author

* chore: fix lint

* docs(chat): include Microsoft Teams in getUser supported adapters list

* feat(adapter-teams): add getUser() support (#404)

* feat(adapter-teams): add getUser() via Microsoft Graph API

- Cache aadObjectId from activity.from during webhook handling
- Implement getUser() using Graph GET /users/{user-id} endpoint
- Requires User.Read.All application permission
- Returns null gracefully when user hasn't interacted or Graph call fails

* docs: add getUser() section to Teams adapter README

* chore: apply ultracite formatting to adapter-teams getUser

* fix(chat): cover all 7 adapters in getUser inference and document per-platform constraints

---------

Co-authored-by: dancer <josh@afterima.ge>
2026-04-29 07:58:33 -07:00
Ben Sabic 6b17c603fb feat: add apiUrl config option to all platform adapters (#377)
* feat: add apiUrl config option to all platform adapters

Add a consistent `apiUrl` option across all 8 adapters for custom API
endpoint configuration (e.g. GovSlack, GitHub Enterprise, GCC-High
Teams). Includes env var fallbacks and unit tests for each adapter.

* add changeset for adapter apiUrl feature

---------

Co-authored-by: Ben Sabic <bensabic@users.noreply.github.com>
2026-04-14 13:01:57 +10:00
github-actions[bot] 7f5bea3fe1 Version Packages (#368)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-13 22:08:02 -04:00
github-actions[bot] 63515f2286 Version Packages (#351)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-10 17:01:43 -07:00
Ben Sabic 21498a4a7f feat(github): add support for issue comment threads (#342)
* feat(github): add support for issue comment threads

Handle issue_comment webhooks on plain issues, not just PRs.
Issue threads use the format github:owner/repo:issue:42.

* fix(github): propagate threadType in GitHubRawMessage for issue threads

parseMessage and other methods now correctly produce issue-format thread
IDs when the raw message originated from a plain issue, not a PR.

---------

Co-authored-by: Ben Sabic <bensabic@users.noreply.github.com>
2026-04-09 00:15:13 +10:00
github-actions[bot] a8dc522c4c Version Packages (#310)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-06 20:21:57 -07:00
josh 8d8927411d fix: disable source maps in published packages (#337)
* fix: disable source maps in published packages

* chore: add changeset
2026-04-07 09:02:36 +10:00
josh cb1deebd67 fix(github): handle webhook events without repository in multi-tenant mode (#335) 2026-04-06 11:39:54 -07:00
Samy Pessé 90cfb6a98a feat(github-adapter): Add a method getInstallationId to get the installation id for a thread (#312)
* Implement getInstallationId

* Add tests

* Format

* Fix duplicate test to cover Thread object input path

---------

Co-authored-by: Ben Sabic <bensabic@users.noreply.github.com>
2026-03-31 13:02:56 +11:00
github-actions[bot] 91820173f4 Version Packages (#300) 2026-03-25 21:36:16 -04:00
github-actions[bot] 434421c82f Version Packages (#295)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-24 14:22:44 -07:00
github-actions[bot] 80a8a34a73 Version Packages (#290)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-23 08:04:36 -07:00
Malte Ubl d778f722af Make adapters depend on chat as a real dep (#289)
Without this, changeset will make any dep change a major change
2026-03-23 07:57:42 -07:00
Hayden Bleasel d2eac74d9a Change chat to peer dependency in all adapters (#258)
* refactor: move chat to peerDependencies for adapters

Update dependency to peerDependencies to avoid version conflicts.

Slack-Thread: https://vercel.slack.com/archives/C08077A6JDB/p1773694216309039?thread_ts=1773694216.309039&cid=C08077A6JDB
Co-authored-by: Hayden Bleasel <4142719+haydenbleasel@users.noreply.github.com>

* fix: use workspace:* for chat peerDependency in all adapters

Ensures adapters always require a compatible version of chat at publish time,
rather than the overly broad >=4.0.0 range.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: v0 <v0[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 11:07:35 -07:00
github-actions[bot] dcd7af3656 Version Packages (#251)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-16 03:57:36 -04:00
Matan Kushner 01bd059058 fix(github): correctly trigger removeReaction in multi-tenant mode (#250) 2026-03-16 03:49:32 -04:00