Commit Graph

209 Commits

Author SHA1 Message Date
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
Akazawa Daisuke b63c042ca1 fix(slack): resolve reaction user display names (#523)
## Summary

Fixes Slack reaction events so `event.user.userName` and
`event.user.fullName` are resolved from Slack user profile data instead
of always being the raw Slack user ID.

This reuses the Slack adapter's existing cached `lookupUser()` path and
falls back to the user ID when lookup fails.

Fixes #521
2026-06-01 15:49:35 -07:00
josh 073ff920a1 fix(slack): return uploaded file ids from postMessage (#574)
## summary

fixes #564

preserves Slack `files.uploadV2` confirmation IDs on `postMessage`
results when a message includes uploaded files

file-only Slack posts now keep the existing synthetic raw payload and
add `uploadedFileIds`, while text/card posts with files augment the
normal `chat.postMessage` raw response with the same IDs

this lets callers confirm which files Slack accepted without replacing
existing `raw` data
2026-06-01 15:38:11 -07:00
josh 999d268de1 fix(slack): pass token through native stream stop (#573)
## summary

fixes #570

fixes Slack native streaming when the stream reaches `stop()` before a
token-bearing append has flushed

`SlackAdapter.stream()` now passes the resolved bot token on every
`streamer.append()` and on `streamer.stop()`, matching Slack's auth
requirements and avoiding `not_authed` responses from `chat.startStream`
/ `chat.stopStream`

adds regression coverage for buffered markdown streams and repeated
structured chunk appends
2026-06-01 14:05:53 -07:00
Edgar ffc43fcf1f feat(whatsapp-adapter): Add typing indicator support (#320)
## Summary

Adds typing indicator support for WhatsApp and also bumps the API
version to the latest v25.0.

> Good to know: There is a limitation with typing indicator API: it has
a 25-second cooldown and rqeuires a recent incoming message. This means
if you try to display the typing indicator before the cooldown period
has passed, it won’t show up, but the message will still be marked with
a red check mark.

## Test plan

Verified end-to-end on a real WhatsApp Business profile

---------

Co-authored-by: dancer <josh@afterima.ge>
2026-05-29 14:33:01 -07:00
mazhe-nerd 293356525d feat: docs: add Lark / Feishu adapter (#517)
## Summary

Adds
[`@larksuite/vercel-chat-adapter`](https://www.npmjs.com/package/@larksuite/vercel-chat-adapter),
the Lark / Feishu adapter for Chat SDK, as a **vendor-official community
adapter**.

- **Package**: `@larksuite/vercel-chat-adapter` — published on npm under
the official `larksuite` scope
- **Built on**:
[`@larksuiteoapi/node-sdk`](https://www.npmjs.com/package/@larksuiteoapi/node-sdk)'s
`LarkChannel`, the official Lark Node SDK
- **Docs source**: external README referenced by `adapters.json` lives
in
[`larksuite/node-sdk`](https://github.com/larksuite/node-sdk/tree/cbc4adf13cbcb93b389db01faf428e3b3cef053c/docs/vercel-chat-adapter)
(the official Lark vendor-owned GitHub org, pinned at commit
`cbc4adf1`); the in-tree MDX in this PR is the rendered detail page
(`mdxBody: true`)
- **Capabilities**: native cardkit typewriter streaming, interactive
cards, reactions, edit / delete, message history (via SDK
`normalize()`), DM detection, mention handling, and scan-to-create app
onboarding through `registerLarkApp`

## Changes

| File | Change |
|---|---|
| `apps/docs/adapters.json` | Add Lark / Feishu entry (`community:
true`, `vendorOfficial: true`) |
| `apps/docs/content/adapters/vendor-official/lark.mdx` | New
hand-authored MDX detail page (frontmatter with full features matrix,
install / quick start / configuration / transport / streaming / ID
encoding / history / safety / limitations / FeatureSupport) |
| `apps/docs/content/adapters/vendor-official/meta.json` | Append
`"lark"` to the sidebar `pages` array |
| `packages/integration-tests/src/docs-adapters.test.ts` | Append
`"lark"` to the hardcoded vendor-official slug list asserted by
`Vendor-Official adapter MDX › contains exactly the expected adapters` |

No icon registered in `adapters.json` / `iconMap` / `adapterLogos` —
matches the existing pattern for vendor-official adapters (Beeper,
Resend, Liveblocks, Zernio, Photon).

## Vendor Official tier

Per `docs/contributing/building.mdx` (Qualifications for vendor official
tier):

- ✅ **Commitment for continued maintenance** — owned by the Lark /
Feishu team
- ✅ **GitHub hosting in official vendor-owned org** — adapter README
lives in [`larksuite/node-sdk`](https://github.com/larksuite/node-sdk),
the official Lark org
- ✅ **Documentation in primary vendor docs** — will be cross-linked from
the official Lark Open Platform developer documentation
- ✅ **Announcement** — will be announced through Lark developer
changelog / channels

## A note on source visibility

The adapter source is not currently open-sourced due to internal
release-process requirements. What is public:

- The npm package itself (consumable by any user)
- The README, hosted in `larksuite/node-sdk` (official Lark org)
- The underlying
[`@larksuiteoapi/node-sdk`](https://github.com/larksuite/node-sdk) on
which it is built — this *is* fully open-source

## Test plan

- [x] `pnpm --filter docs build` — docs app builds cleanly;
`/en/adapters/vendor-official/lark` and
`/en/adapters/vendor-official/lark/og` routes are generated
- [x] `pnpm typecheck` — passes (33 tasks)
- [x] `pnpm check` (Ultracite / Biome) — 438 files, no fixes
- [x] `pnpm --filter @chat-adapter/integration-tests test docs-adapters`
— 232 tests pass (frontmatter, vendor-official roster, adapters.json ↔
MDX sync)
- [x] Manual: `/adapters` lists the Lark / Feishu card in the **Vendor
Official** section; `/adapters/vendor-official/lark` renders the MDX
detail page with the FeatureSupport matrix
2026-05-29 12:40:43 +10:00
Meet Modi bd38498b60 docs(adapters): add AgentPhone as vendor-official adapter (#562)
## Summary

Adds [AgentPhone](https://agentphone.to) as a vendor-official adapter in
`adapters.json`.

AgentPhone is the first Chat SDK adapter with unified support for **SMS,
MMS, iMessage, and voice calls** in a single package:

- **SMS/MMS** — send and receive via `agent.message` webhooks
- **iMessage** — full support including tapback reactions (love, like,
laugh, etc.) and expressive send styles
- **Voice** — inbound/outbound call transcripts and summaries via
`agent.call_ended` webhooks
- **HMAC-SHA256** webhook verification with replay protection

| | SMS | MMS | iMessage | Voice |
|---|---|---|---|---|
| Send messages | ✓ | ✓ | ✓ | — |
| Receive messages | ✓ | ✓ | ✓ | — |
| Media attachments | — | ✓ | ✓ | — |
| Reactions | — | — | ✓ | — |
| Call transcripts | — | — | — | ✓ |

- **npm**:
[`@agentphone/chat-sdk-adapter`](https://www.npmjs.com/package/@agentphone/chat-sdk-adapter)
- **GitHub**:
[`AgentPhone-AI/chat-sdk-adapter`](https://github.com/AgentPhone-AI/chat-sdk-adapter)
- **Docs**: [docs.agentphone.ai](https://docs.agentphone.ai)
2026-05-29 12:03:10 +10: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
luren 5461ea982b feat(telegram): add native DM draft streaming with segmented stream results (#340)
## Summary

Add native Telegram DM streaming via `sendMessageDraft` while preserving
Chat SDK's existing post+edit fallback for non-DM threads.

This PR:
- adds native private-chat draft streaming to the Telegram adapter
- splits long streamed markdown into Telegram-safe persisted segments
- retries without `parse_mode` when Telegram rejects markdown entity
parsing
- exposes segmented native stream results in the chat core
- updates docs and feature matrices to reflect Telegram DM draft
streaming

---------

Co-authored-by: dancer <josh@afterima.ge>
2026-05-28 15:17:10 -07:00
josh 6ed4a43897 feat(slack): add low-level interaction helpers (#559)
## summary

adds lower-level Slack helpers for custom runtimes that already own
routing, state, sessions, or workflow execution

this expands the existing Slack subpaths with typed inbound files,
richer interaction payload fields, thread reply fetching, modal opening,
and generic input request Block Kit helpers

it keeps the helpers on the existing `@chat-adapter/slack` package and
preserves the runtime-light import boundary for `webhook`, `api`, and
`blocks`
2026-05-27 20:21:12 -07:00
Aradhya C P 177735a60f fix(gchat): collapse redundant autolink formatting for email links (#553)
## Description

Fix redundant autolink rendering for email addresses in the Google Chat
adapter.

Previously, autolinked email addresses were rendered as
`<mailto:...|...>` even when the visible text already matched the email
address. This resulted in unnecessary verbose output. This change
collapses such cases to plain text for cleaner and more consistent
rendering.

While testing, it was observed that `tel:` links are not currently
generated from plain phone number inputs in the existing parsing
pipeline. However, support for `tel:` handling has still been added in
the implementation for future compatibility as referenced in the issue.

<img width="757" height="107" alt="image"
src="https://github.com/user-attachments/assets/a8ccfd6c-6669-4535-b733-5f2c185d9e2f"
/>


Additionally, new test cases have been added to cover email autolinks,
labeled mailto links, and general markdown link behavior.

## Type of Change

- [x] Bug fix (non-breaking change which fixes an issue)

## Related Issues

Fixes #516

## Changes Made

- Collapsed redundant `mailto:` autolinks when visible text matches the
email address
- Added support for `tel:` scheme handling for future compatibility  
- Updated link rendering logic in Google Chat adapter markdown converter
- Added and updated unit tests for email and link conversion cases  

## Testing

- [x] All existing tests pass
- [x] Added new tests for the changes
- [x] Manually tested the changes

### Test Coverage

- Email autolink collapsing verified
- Custom labeled mailto links verified
- HTTP link formatting verified
- Edge cases for link conversion verified via unit tests

## Screenshots/Demos

N/A

## Checklist

- [x] My code follows the project's code style
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings or errors
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [x] I have created a changeset (`pnpm changeset`)

## Changeset

- [x] I have created a changeset for these changes

## Additional Notes

During testing, `tel:` links were not observed in the current markdown
parsing pipeline for plain phone numbers. However, support for `tel:`
has been included to align with the issue description and for
future-proofing the adapter behavior.

---------

Co-authored-by: dancer <josh@afterima.ge>
2026-05-27 20:20:15 -07:00
josh 25ebc3b925 feat(twilio): add sms, mms, and voice helpers (#558)
## summary

adds a first-class Twilio adapter for SMS and MMS bots, plus low-level
voice helpers for custom Twilio voice routes

this includes webhook parsing and signature verification, outbound
Messages API helpers, phone-number and Messaging Service sending,
inbound MMS attachments with authenticated `fetchData`, plain text card
fallback rendering, markdown conversion, and runtime-light `api`,
`webhook`, `voice`, and `format` subpaths

the adapter intentionally avoids the `twilio` npm runtime dependency so
apps can use the low-level helpers without pulling in the full SDK
2026-05-27 15:39:23 -07:00
josh 1294490755 refactor(slack): share provider helpers (#556)
## summary

reuses the low-level Slack formatting helpers inside the high-level
Slack adapter without changing adapter behavior

this removes duplicated mrkdwn-to-markdown and markdown-bold conversion
logic by sharing `slackMrkdwnToMarkdown`, `linkBareSlackMentions`, and
`markdownBoldToSlackMrkdwn` across the format converter, card converter,
and blocks subpath

the low-level mention helper remains ID-based to match Slack docs, while
the high-level adapter keeps its existing bare-name mention
compatibility privately
2026-05-26 12:31:19 -07:00
josh dbd8dc5b7c feat(slack): expose block kit helpers (#555)
## summary

exposes a runtime-free `@chat-adapter/slack/blocks` subpath for
converting Chat SDK-style card objects into Slack Block Kit blocks

the new subpath includes typed card input shapes, fallback text helpers,
Slack emoji placeholder conversion, and docs-backed Slack limits for
headers, images, actions, select options, fields, and tables

this keeps lower-level Slack rendering reusable without importing the
full Slack adapter, `chat`, `@chat-adapter/shared`, or Slack SDK runtime
packages
2026-05-26 12:07:13 -07:00
josh aba6aa94fe feat(slack): add api primitives subpath (#548)
## summary

adds `@chat-adapter/slack/api` for lightweight Slack Web API helpers

the new subpath exposes fetch-based primitives for calling Slack Web API
methods, posting and updating messages, sending response URL payloads,
uploading files through Slack's external upload flow, and fetching
private Slack file URLs with bearer auth

it stays independent of the full Slack adapter runtime, Chat SDK
runtime, Slack WebClient, Socket Mode, and shared adapter package, so
lower-level runtimes can reuse Slack API correctness without adopting
`createSlackAdapter`
2026-05-21 17:58:40 -07:00
josh 4c46c26c75 feat(slack): add format primitives subpath (#547)
## summary

adds `@chat-adapter/slack/format` for lightweight Slack formatting
helpers

the new subpath exposes runtime-free primitives for Slack text objects,
mrkdwn escaping, mentions, links, dates, and basic mrkdwn normalization
without importing the full Slack adapter, Chat SDK runtime, Slack SDK,
Socket Mode, or shared adapter package

this keeps the normal `@chat-adapter/slack` adapter path unchanged while
giving lower-level runtimes a small typed API for Slack formatting
correctness
2026-05-21 17:43:23 -07:00
josh b332a03d59 feat(slack): add webhook primitives subpath (#538)
## summary

adds a lightweight `@chat-adapter/slack/webhook` subpath for lower-level
Slack webhook handling without pulling in the full Slack adapter runtime

this exposes primitives for verifying Slack requests, reading signed
webhook bodies, parsing Events API callbacks, slash commands, and
interactive payloads, and returning provider-native continuation data
for message-like payloads

this gives framework and infrastructure integrations a small Slack-owned
surface they can use directly while keeping `chat`, Slack SDK clients,
adapter state, dedupe, locks, and subscriptions out of the primitive
path
2026-05-21 17:04:54 -07: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
josh 9d7891b2f5 fix(release): prevent accidental major bumps (#520)
## summary

fixes the release plan so peer-dependent packages only trigger major
bumps when the next dependency version falls outside their supported
range

this keeps the current release on `4.29.0` instead of accidentally
bumping the fixed `chat` and `@chat-adapter/*` group to `5.0.0`

also changes `@chat-adapter/tests` to use a real `chat` peer range while
keeping `workspace:*` for local development
2026-05-18 07:07:25 -07:00
Ben Sabic ac8a20779c feat(chat): add chat/ai subpath for AI SDK utilities (#492)
## Summary

Introduces a dedicated `chat/ai` subpath as the home for every Vercel AI
SDK helper that ships with Chat SDK. Importing from this subpath keeps
the optional `ai` and `zod` peer dependencies out of bundles that don't
use them.

### What's new

- **`createChatTools`** — exposes Chat SDK operations as ready-to-use AI
SDK tools so an agent can read, post, react, edit, delete, and manage
thread subscriptions across every adapter the supplied `Chat` instance
has registered.
- Write operations require user approval by default (`requireApproval:
true`); toggle globally or per-tool.
- Three presets — `reader`, `messenger`, `moderator` — scope the
toolset.
- Individual tools can also be cherry-picked (`import { postMessage,
addReaction } from "chat/ai"`).
- **`toAiMessages`** (and the `Ai*` / `ToAiMessagesOptions` types) now
live alongside the tools at `chat/ai`. The previous `chat` re-exports
continue to work, but are flagged `@deprecated` with an editor hint
pointing to the new home — migration is a one-line import change.
- **Docs** — new `/docs/ai` section between Usage and Adapters in the
sidebar:
  - `/docs/ai` — Overview
  - `/docs/ai/ai-sdk-tools` — `createChatTools` guide
  - `/docs/ai/to-ai-messages` — `toAiMessages` reference
  - `/docs/ai/types` — Reference for every type exported from `chat/ai`
- **Example app** — `examples/nextjs-chat` now demos the new surface via
a "Run Agent Demo" button on the welcome card and a free-form `/agent
<prompt>` slash command (streaming, with a placeholder so users get
immediate feedback in channel contexts where Slack's typing-status API
is a no-op).

### Future plans

`createChatTools` currently exposes the cross-adapter Chat SDK surface
only. A natural follow-up is to also support **platform-specific tools**
— e.g. expose Slack-only `pin`/`unpin`, Discord-only thread archiving,
GitHub-only issue commenting, etc., so users can further extend what
their agent can do without dropping back to raw adapter calls. The shape
would likely be additional opt-in factories under `chat/ai` (or
per-adapter subpaths like `@chat-adapter/slack/ai`) that return tools
layered on top of the platform-specific adapter clients, while keeping
the cross-platform `createChatTools` API as the lowest common
denominator.

### Coverage

- `createChatTools` orchestrator: 100% statements / 94.7% branches.
- Every tool factory's `execute()` is exercised end-to-end (29 tests in
`index.test.ts`).
- `toAiMessages` keeps its existing 35-test suite covering role mapping,
attachment handling, links, transforms, and unsupported-attachment
fallbacks.
- Tools folder overall: 99.0% statements / 86.1% branches / 97.4%
functions / 98.9% lines.

---------

Co-authored-by: Ben Sabic <bensabic@users.noreply.github.com>
Co-authored-by: dancer <josh@afterima.ge>
2026-05-14 20:13:42 -07:00
josh b75eedbb5f feat(chat): add queue-debounce concurrency strategy (#495)
## summary

adds an opt-in `burst` concurrency strategy for #414

when a thread is idle, the first message waits for `debounceMs`,
messages that arrive during that window are queued, and the handler runs
once with the latest message plus earlier burst messages in
`context.skipped`

after the handler finishes, messages that arrived while it was running
are drained like `queue`, so the latest queued message is processed with
earlier queued messages in `context.skipped`

keeps existing `drop`, `queue`, `debounce`, and `concurrent` behavior
unchanged

updates docs to cover `burst`, explain when to choose it over
`debounce`, and document the related `MessageContext` behavior
2026-05-14 19:18:40 -07:00
Hugo 716e934aa2 feat(web-adapter): first class support for Vue and Svelte (#498)
## Summary

<!-- What does this PR do? -->

## Test plan

<!-- How did you verify the changes? -->

## Checklist

- [ ] All commits are signed and verified
- [ ] `pnpm validate` passes
- [ ] Changeset added (or N/A — see
[CONTRIBUTING.md](./CONTRIBUTING.md))
- [ ] Documentation updated (or N/A)

---------

Co-authored-by: dancer <josh@afterima.ge>
2026-05-14 19:18:24 -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
josh b9b17cd37d fix(discord): handle interactions in gateway-only mode (#490)
## summary

fixes #343

fix Discord gateway-only mode so `InteractionCreate` events are handled
directly when no interactions endpoint is configured

slash commands now defer the gateway interaction and route through the
existing slash command handler path, and button interactions defer
updates before routing through the existing action handler path

also clarifies in the Discord README that Discord sends interactions
through either the Gateway or an Interactions Endpoint URL, not both
2026-05-11 22:17:51 -07:00
josh add27309fb feat(telegram): support typed attachment uploads (#485) 2026-05-11 18:56:42 -07:00
Ben Sabic fdebde7988 Reapply "feat(slack): expose direct WebClient access via adapter.client" (#472) (#476)
This reverts commit 2279f1db70.

Co-authored-by: Ben Sabic <bensabic@users.noreply.github.com>
2026-05-12 08:32:54 +10:00
Ilya 711babe06d fix(adapter-telegram): handle video_note (round video messages) in extractAttachments (#457)
* fix(adapter-telegram): handle video_note in extractAttachments

Round video messages (video_note) were silently dropped because
extractAttachments had no branch for them. Adds the video_note field
to TelegramMessage and extracts it as a "video" attachment with
width/height set to the clip's length.

Fixes #456

* test(adapter-telegram): add video_note attachment extraction test
2026-05-11 09:15:01 -07:00
Felix Arntz 06fb8e59ef chore: set up konsistent with basic initial config for package, adapter, and state adapter conventions (#466)
* set up konsistent with basic initial config

* add konsistent to CI

* fix konsistent.json formatting

* fix(gchat): move GoogleChatAdapterConfig to ./types for konsistent

* fix(slack): move SlackAdapterConfig to ./types and drop Partial wrapper from createSlackAdapter

* fix(messenger): name createMessengerAdapter parameter MessengerAdapterConfig

* fix(web): rename WebAdapterOptions to WebAdapterConfig and import Adapter type in index.ts

* fix(whatsapp): align WhatsAppAdapterConfig and creator with konsistent + map kebab to PascalCase

* fix(state-memory): add MemoryStateAdapterOptions type for konsistent

* fix(state-ioredis): unify URL and client options under IoRedisStateAdapterOptions

* fix(state-redis): unify URL and client options under RedisStateAdapterOptions

* fix(state-pg): unify URL and client options under PostgresStateAdapterOptions

* chore: changeset for konsistent convention alignment

* chore: drop CHANGELOG.md from konsistent's required files list

CHANGELOG.md is generated automatically by changesets on each release —
it's never hand-authored and doesn't exist for a package until its first
release lands. Requiring it as a convention check makes CI fail
indefinitely for any newly added package, with no honest fix available
(an empty placeholder is just noise that gets overwritten on first
release).

* docs: document konsistent and package shape conventions

* fix(web): use WebAdapterConfig in WebAdapter field types after main merge

The merge of main into konsistent brought in PR #475's `protected`
field modifiers on top of the WebAdapterOptions → WebAdapterConfig
rename, leaving two stale references to the (un-imported) old name.
Switch them to WebAdapterConfig and update a stale JSDoc reference
in als.ts to match.

---------

Co-authored-by: Ben Sabic <bensabic@users.noreply.github.com>
Co-authored-by: Ben Sabic <27636870+bensabic@users.noreply.github.com>
2026-05-11 19:29:05 +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
Ben Sabic 3347bfbcda chore: remove .vercel.approvers files (#483)
Code ownership is already governed by .github/CODEOWNERS.

Co-authored-by: Ben Sabic <bensabic@users.noreply.github.com>
2026-05-11 12:36:36 +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
Vishal Yathish 2279f1db70 Revert "feat(slack): expose direct WebClient access via adapter.client" (#472)
* Revert "feat(slack): expose direct WebClient access via adapter.client (#471)"

This reverts commit 8366b8b0fb.

* Fix: The `createSlackAdapter()` helper function silently drops the `apiUrl` config field, so custom Slack API URLs (e.g., for GovSlack) are ignored when using the helper.

This commit fixes the issue reported at packages/adapter-slack/src/index.ts:5055

**Bug explanation:**

The `SlackAdapterConfig` interface defines an `apiUrl` field (line 166) that allows users to override the Slack Web API base URL — useful for GovSlack or self-hosted gateways. The `SlackAdapter` constructor reads this field at line 622:

```typescript
const slackApiUrl = config.apiUrl ?? process.env.SLACK_API_URL;
```

However, the `createSlackAdapter()` helper function (around line 5055) constructs a `resolved` config object that includes many fields from the user's config but omits `apiUrl`. This means when a user writes:

```typescript
createSlackAdapter({ apiUrl: "https://slack-gov.com/api/" })
```

The `apiUrl` is silently dropped and the `WebClient` is created without the custom URL. The `SLACK_API_URL` environment variable fallback still works (since it's checked in the constructor), but explicit config via the helper is lost.

This is clearly a bug — all other config fields are forwarded through the `resolved` object, and `apiUrl` was simply forgotten.

**Fix explanation:**

Added `apiUrl: config?.apiUrl,` to the `resolved` config object in `createSlackAdapter()`. This ensures the `apiUrl` value from user config is properly forwarded to the `SlackAdapter` constructor, matching the pattern used for all other optional config fields.

Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
Co-authored-by: visyat <vishal.yathish@gmail.com>

---------

Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
2026-05-09 02:21:33 -07:00
Ben Sabic 8366b8b0fb feat(slack): expose direct WebClient access via adapter.client (#471)
* feat(slack): expose direct WebClient access via adapter.client

Mirror the Linear and GitHub adapter pattern by exposing the underlying
@slack/web-api WebClient as `adapter.client` for any Web API call not
covered by the SDK's high-level methods.

Resolution order:
1. Token from the current request context (multi-workspace webhooks,
   `withBotToken()`).
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. For both,
bind the token explicitly with `adapter.withBotToken(token, () => ...)`.

Internally, the existing private `client` field is renamed to `_client`
so the public getter can return per-token cached `WebClient` instances.
All internal API calls continue to route through `_client.foo(await
this.withToken(...))` unchanged. Also fixes `createSlackAdapter()`
silently dropping the `apiUrl` config field, surfaced by the new
apiUrl-propagation test.

* docs(slack): document direct WebClient access

Add Slack to the "Direct client access" section of the chat-sdk.dev
docs (api/chat.mdx, usage.mdx) alongside Linear and GitHub. Update the
multi-tenant Callout to spell out both Slack constraints — request
context required in multi-workspace mode, and `withBotToken()` required
when `botToken` is an async resolver.

Add a parallel "Direct WebClient access" section to the Slack adapter
README with a usage example, the token resolution order, and the
async-resolver workaround.

* feat(example): add Channel Info button using slack.client

Demonstrate the new direct WebClient access pattern in the nextjs-chat
demo with a "Channel Info (Slack)" button. The handler resolves the
Slack adapter from the action event, reaches into
`adapter.client.conversations.info` (channels:read scope, already in
the example manifest), and renders the result as a Card with channel
name, member count, topic, purpose, and the standard flags. Falls back
to a friendly message on non-Slack platforms.

* feat(example): add Pin Message button using slack.client.pins.add

Pin the welcome card itself via `adapter.client.pins.add({ channel,
timestamp: event.messageId })` to demonstrate calling a Slack Web API
endpoint not wrapped by the SDK. Adds the required `pins:write` scope
to the example Slack manifest.

* chore(example): render channel info as a table and include num_members

Replace the Fields/Section layout in the Channel Info card with a
two-column Table for a tidier presentation, and pass
`include_num_members: true` so the Members row is actually populated
(Slack's `conversations.info` omits it by default).

* test(slack): expand coverage for adapter.client

Adds three tests:

- Cache differentiation: distinct tokens produce distinct WebClient
  instances so per-workspace credentials never bleed across calls.
- apiUrl env var resolution: SLACK_API_URL is honored by the WebClient
  the new getter returns (covers GovSlack-style deployments).
- End-to-end multi-workspace token routing: a real block_actions
  webhook drives `processAction`, and the handler-side
  `event.adapter.client.token` matches the installation's bot token —
  proving the request-context-bound client works inside webhook
  dispatch.

---------

Co-authored-by: Ben Sabic <bensabic@users.noreply.github.com>
2026-05-09 18:59:39 +10:00
Ben Sabic 0adf3adef6 feat(tests): add @chat-adapter/tests test kit (#470)
* feat(tests): add @chat-adapter/tests test kit

New package providing Vitest factories, custom matchers, and a setup file for
people building Chat SDK adapters and bots.

Factories: createMockAdapter, createMockChatInstance, createMockState (with
working in-memory subscriptions/locks/KV/queues), createTestMessage,
mockLogger / createMockLogger.

Matchers: toHavePosted(threadId, textPattern?), toHaveDispatched(handler),
toBeSubscribedTo(threadId). Auto-register via the
'@chat-adapter/tests/setup' subpath in vitest 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.

* test(integration-tests): allow @chat-adapter/tests imports in README check

* docs: add Testing page covering @chat-adapter/tests

New content/docs/testing.mdx walks bot authors and custom-adapter authors
through the kit's factories, custom matchers, and setup file. Added under
the Usage section in the sidebar, after error-handling.

Cross-link from contributing/testing.mdx clarifying that the hand-rolled
patterns there are for repo contributors building first-party adapters,
while consumers of Chat SDK should use @chat-adapter/tests.

* test(integration-tests): allow @chat-adapter/tests imports in docs check

* fix(tests): match real Adapter.postMessage signature in toHavePosted

Adapter.postMessage is (threadId: string, message: AdapterPostableMessage)
— previously the matcher read args[0] as { id: string } and args[1] as
{ text: string }, neither of which match the actual SDK shape. The matcher's
own tests fed the same wrong shape into the mock so they passed locally
while the matcher silently failed against any real bot or adapter.

Now compares args[0] as a string threadId, and extracts a comparable string
from AdapterPostableMessage's union — strings directly, PostableMarkdown
.markdown, PostableRaw.raw, and PostableCard.fallbackText. PostableAst and
fallback-less cards aren't text-matchable; documented in the JSDoc.

Tests updated to call postMessage with the real signature and to cover
each comparable AdapterPostableMessage shape.

* test(tests): add smoke tests driving matchers against a real Chat

Construct a real `Chat` with a `createMockAdapter` + `createMockState` and
exercise `Chat.thread().post()` and `.subscribe()` end-to-end. The matchers
(toHavePosted, toBeSubscribedTo) then assert against the actual call shape
the SDK uses, so a future signature drift breaks here instead of silently
agreeing with whatever wrong shape lives in the unit tests.

This is the regression guard for the postMessage-shape bug fixed in the
prior commit: each new matcher in subsequent PRs should be paired with a
smoke case here.

* feat(tests): round out adapter mutation matchers

Adds toHaveEdited, toHaveDeleted, toHaveReactedWith, toHaveStartedTyping,
and toHavePostedToChannel — covering the common Adapter mutation surface
that bot authors assert on. Each matcher's signature was checked against
packages/chat/src/types.ts, and each is paired with a smoke case that
drives a real Chat through the corresponding Thread/Channel API so
signature drift breaks the smoke test instead of silently agreeing with
the unit tests.

Emoji matching accepts both plain strings and EmojiValue ({ name }).
Text matching reuses the same extraction rules as toHavePosted —
strings, PostableMarkdown.markdown, PostableRaw.raw, and
PostableCard.fallbackText. Documented in matcher JSDoc, README, and
the Testing docs page.

---------

Co-authored-by: Ben Sabic <bensabic@users.noreply.github.com>
2026-05-09 14:17:36 +10:00
Vishal Yathish c46fdb6b34 [slack] add support for external installation providers for bot token management (#467)
* [slack] add support for external installation providers for bot token management

* changeset

* fix(slack): correct stale 'Connex' comment to 'Vercel Connect'

* docs(slack): expand changeset with provider details and Enterprise Grid notes

* docs(slack): document installationProvider and Enterprise Grid lookup keys

* test(slack): cover installationProvider for interactive payloads on both install types

* fix(slack): route rehydrateAttachment through installationProvider

---------

Co-authored-by: Ben Sabic <bensabic@users.noreply.github.com>
2026-05-09 11:11:06 +10:00
Dima Voytenko 0f0c203165 fix(slack): prefer webhookVerifier over signingSecret (#468)
* fix(slack): prefer webhookVerifier over signingSecret and SLACK_SIGNING_SECRET

When `webhookVerifier` is configured, ignore both `config.signingSecret`
and the `SLACK_SIGNING_SECRET` env var. Previously a configured
`signingSecret` (or env var) would shadow the verifier the caller wired
up, which is the opposite of the intended override behavior.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* docs(slack): update README to match new webhookVerifier precedence

Mirror the JSDoc/changeset wording: webhookVerifier wins over both
signingSecret and SLACK_SIGNING_SECRET. The previous note still claimed
signingSecret won, contradicting the behavior fixed in e77359b.

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Co-authored-by: Ben Sabic <bensabic@users.noreply.github.com>
2026-05-09 10:34:24 +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 c1cd9b5da1 feat(chat): add callbackUrl to buttons and modals (#454)
* 1

* wfw

* 4224

* dfe

* wip

* f

* 22

* tsts

* more

* ch

* dc

* t

* tm

* docs

* ex

* k

* cs

* lock

* test(chat): expand callbackUrl coverage

* docs: document callbackUrl handling for adapter authors

* docs: expand changeset for callbackUrl feature

* docs(skill): mention callbackUrl on Button and Modal

* feat(example): add modal callbackUrl workflow demo

* test(integration): add replay tests for callbackUrl flows

---------

Co-authored-by: Ben Sabic <bensabic@users.noreply.github.com>
2026-05-08 17:26:18 +10:00
Vishal Yathish 68025ca965 [messenger] add messenger (meta) platform adapter to chat sdk (#461)
* [messenger] add messenger (meta) platform adapter to chat sdk

- Webhook handling with HMAC-SHA256 signature verification
- Generic and Button template support for cards
- Postback, reaction, delivery/read confirmation handling
- Message caching for fetchMessages (Messenger has no history API)
- Replay tests and ~98% code coverage

Co-authored-by: Dimitar K. Nikolov <mitkodkn@users.noreply.github.com>
Co-authored-by: Ben Sabic <27636870+bensabic@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

* Fix: The `@chat-adapter/messenger` package version is `4.15.0` while all other packages in the Changesets fixed version group are at `4.27.0`, breaking the fixed versioning contract.

This commit fixes the issue reported at packages/adapter-messenger/package.json:3

**Bug explanation:**

The repository uses Changesets with a `"fixed"` configuration: `[["chat", "@chat-adapter/*"]]`. This means all packages matching these patterns must always share the same version number. Every package in the group (`chat`, `@chat-adapter/discord`, `@chat-adapter/gchat`, `@chat-adapter/github`, `@chat-adapter/linear`, `@chat-adapter/shared`, `@chat-adapter/slack`, `@chat-adapter/teams`, `@chat-adapter/telegram`, `@chat-adapter/web`, `@chat-adapter/whatsapp`, and the state packages) is at version `4.27.0`, except `@chat-adapter/messenger` which is at `4.15.0`.

This is likely because the messenger adapter was newly added to the monorepo (copied from a template or created fresh) and its version was never aligned with the rest of the fixed group. This mismatch will cause problems with the Changesets release workflow — when Changesets tries to bump versions for the fixed group, it may produce inconsistent or errored releases because one package is 12 minor versions behind the others.

**Fix explanation:**

Changed `"version": "4.15.0"` to `"version": "4.27.0"` in `packages/adapter-messenger/package.json` to align it with all other packages in the fixed version group.

Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
Co-authored-by: visyat <vishal.yathish@gmail.com>

* Fix: Messenger adapter env var guard only checks `FACEBOOK_APP_SECRET` but `createMessengerAdapter` requires all three env vars, causing a `ValidationError` crash at Next.js build time when only `FACEBOOK_APP_SECRET` is set.

This commit fixes the issue reported at examples/nextjs-chat/src/lib/adapters.ts:154

**Bug Analysis:**

The build failure is confirmed in the Vercel build log with:
```
Error [ValidationError]: pageAccessToken is required. Set FACEBOOK_PAGE_ACCESS_TOKEN or provide it in config.
```

The root cause is in `examples/nextjs-chat/src/lib/adapters.ts` at line ~154. The messenger adapter guard only checks for `FACEBOOK_APP_SECRET`:
```typescript
if (process.env.FACEBOOK_APP_SECRET) {
```

However, `createMessengerAdapter` (in `packages/adapter-messenger/src/index.ts`) validates and throws `ValidationError` for each of three required env vars: `FACEBOOK_APP_SECRET`, `FACEBOOK_PAGE_ACCESS_TOKEN`, and `FACEBOOK_VERIFY_TOKEN`. When only `FACEBOOK_APP_SECRET` is set in the Vercel project environment, the guard passes, `createMessengerAdapter` is called, and it throws a `ValidationError` for the missing `FACEBOOK_PAGE_ACCESS_TOKEN`. Since this code runs at module evaluation time during the Next.js build's "Collecting page data" phase, the uncaught error crashes the entire build.

This is inconsistent with other adapters in the same file. For example, the WhatsApp adapter checks both `WHATSAPP_ACCESS_TOKEN` and `WHATSAPP_PHONE_NUMBER_ID`, and the gchat/github/linear/whatsapp adapters all wrap creation in try-catch blocks.

**Fix:**

1. Updated the env var guard to check all three required environment variables (`FACEBOOK_APP_SECRET`, `FACEBOOK_PAGE_ACCESS_TOKEN`, and `FACEBOOK_VERIFY_TOKEN`) before attempting to create the adapter.
2. Wrapped the `createMessengerAdapter` call in a try-catch block (matching the pattern used by gchat, github, linear, and whatsapp adapters) so that any unexpected validation errors are caught and logged as warnings instead of crashing the build.

Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
Co-authored-by: visyat <vishal.yathish@gmail.com>

---------

Co-authored-by: Dimitar K. Nikolov <mitkodkn@users.noreply.github.com>
Co-authored-by: Ben Sabic <27636870+bensabic@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
2026-05-08 17:25:54 +10: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
Ben Sabic 3490a8c84c feat: add @chat-adapter/web — browser chat UI for chat-sdk bots (#444)
* feat(chat): expose awaitable Promise from processMessage

Return the inner task as Promise<void> instead of void so streaming
adapters can await full handler completion and surface user-handler
rejections at the wire level. waitUntil semantics for existing webhook
adapters are unchanged — the SDK still tracks the work with errors
swallowed (and logged) so platforms don't retry on handler bugs.

Required by @chat-adapter/web, whose response body is the user
handler's stream.

* feat(adapter-web): add @chat-adapter/web package

A new platform adapter that lets a chat-sdk bot serve a browser chat
UI alongside Slack/Teams/Discord/etc. without writing any client-side
glue. Speaks the AI SDK UI message stream protocol, so @ai-sdk/react's
useChat and the ai-elements component library work out of the box.

- `@chat-adapter/web` — server: createWebAdapter({ userName, getUser })
- `@chat-adapter/web/react` — client: useChat() preconfigured with
  DefaultChatTransport against /api/chat (override via `api`)

Defaults that matter for v1:
- `isDM: true` — every web message routes through onDirectMessage
- `persistMessageHistory: true` — chat-sdk caches each turn in the
  configured state adapter so handlers can read prior context via
  thread.messages / channel.messages (no platform history API exists)
- channelId === threadId — web has no separate channel concept; this
  prevents cross-conversation bleed when a single user has multiple
  useChat sessions
- Native `adapter.stream` implementation pumps text-deltas straight
  onto the SSE response — no post+edit fallback

Out of scope for v1: cards/JSX rendering, reactions, modals, file
uploads, edit/delete, multi-tab proactive push.

* feat(example-nextjs-chat): wire up web adapter and add /chat page

- Register the web adapter in lib/adapters.ts with a demo getUser
  (single shared identity — replace with NextAuth/Clerk/cookie auth
  in production)
- Expose POST /api/chat backed by bot.webhooks.web (using next/after
  for waitUntil)
- Add a minimal /chat page using @chat-adapter/web/react's useChat —
  same bot.onDirectMessage handler that powers Slack now powers the
  browser too

Bumps `ai` to ^6.0.174 to align with @ai-sdk/react@^3 (avoids dual
provider-utils versions in the workspace).

* docs: list @chat-adapter/web in registry

- Add an entry to adapters.json so the package shows up on /adapters
- Add a globe SVG to lib/logos.tsx and wire it into the icon map
- Mention the new adapter in docs/adapters.mdx

* feat(adapter-web): tighten request handling and message construction

- Reject user ids containing ':' with HTTP 400 — the character would
  corrupt the thread-id round-trip through decodeThreadId
- Skip emitting text-start/text-end in postMessage when the resolved
  text is empty so useChat doesn't render blank assistant bubbles
- Derive the parseMessage author from raw.role so rehydrated assistant
  messages report the bot identity instead of "unknown"
- Drop the duplicate handler-error log; chat.processMessage already
  logs at ERROR level
- Document the actual persistMessageHistory default (true) and the
  state-cache rationale; promote the fetchMessages no-op rationale
  into its JSDoc

* test(adapter-web): add direct coverage for stream()

- Aborting request.signal mid-stream short-circuits the iterator and
  still writes text-end via the finally block
- Non-text StreamChunks (task_update, plan_update) are dropped without
  emitting any delta
- The SentMessage returned from thread.post matches the id used in
  text-start / text-end events

* docs(adapter-web): expand README into the full adapter docs page

The docs site renders each adapter's README, so flesh out
@chat-adapter/web to match the depth of @chat-adapter/slack:
authentication boundary, threading semantics, streaming,
persistence, React hook reference, configuration table,
feature matrix, and troubleshooting.

* docs(adapter-web): drop unsupported provider import from streaming example

* fix(adapter-web): validate conversationId for reserved colon character

* fix(example): show error state in web chat demo

* fix(example): add thinking indicator to web chat demo

* feat(example): redesign web chat demo with tailwind

* chore: remove redundant changeset

---------

Co-authored-by: Ben Sabic <bensabic@users.noreply.github.com>
Co-authored-by: dancer <josh@afterima.ge>
2026-05-05 15:55:40 -07:00
Ben Sabic d7999aba26 chore: add Vercel Code Approvers files mirroring CODEOWNERS (#450)
Co-authored-by: Ben Sabic <bensabic@users.noreply.github.com>
2026-05-05 15:47:48 -07:00
Ben Sabic 46d183bdab feat(chat): add Transcripts API + rename per-thread cache to threadHistory (#448)
* feat(chat): add Transcripts API and rename per-thread cache to threadHistory

Introduce `bot.transcripts` for cross-platform per-user message persistence.
When `ChatConfig.transcripts` and `ChatConfig.identity` are configured, every
inbound message has its `userKey` resolved during dispatch and the API exposes
`append` / `list` / `count` / `delete` keyed by that user. Backed by the
existing `StateAdapter.appendToList` primitive — every built-in state adapter
supports it with no contract changes.

Rename the existing per-thread history cache from `messageHistory` to
`threadHistory` (with backwards compat for `ChatConfig.messageHistory` and
`Adapter.persistMessageHistory`) so the two persistence layers don't share a
"messages" name. The state-adapter storage key prefix is unchanged so existing
data isn't orphaned.

`delete()` writes a tombstone via `appendToList(key, _, { maxLength: 1 })`
rather than `state.delete(key)`, because `state.delete` only addresses the
k/v namespace on every non-memory state adapter — `list()` and `count()`
filter the tombstone out so the API contract is preserved.

* docs(chat): cover Transcripts API and Conversation history

Add a Features-style "Conversation history" guide (`/docs/conversation-history`)
walking through identity resolution, the LLM-context append/list pattern,
filtering, and per-user deletion for DSR flows.

Add an API reference page at `/docs/api/transcripts` with `<TypeTable>` blocks
for `ChatConfig.transcripts`, `ChatConfig.identity`, every method on
`bot.transcripts`, and the `TranscriptEntry` shape.

Wire both into the corresponding `meta.json` files.

* example(nextjs-chat): wire Transcripts API into the AI mode handler

Replace the brittle `threadState.history` shim with `bot.transcripts.list({ ..., threadId, limit })` as the fallback context source for platforms without
`fetchMessages` (Telegram, WhatsApp). Drop the `history` field from
`ThreadState` accordingly.

Add a hardcoded `TEST_USER_KEY = "test-user"` so the API can be exercised
without juggling real user identities, plus "Show Transcripts" and
"Clear Transcripts" buttons in the welcome card so the store can be
inspected and reset from chat.

* fix(chat): tighten Transcripts API public surface and wiring

Polish on top of the Transcripts API + threadHistory rename, addressing
review concerns before merge.

Public surface (`types.ts`, `index.ts`):
- Expose `transcripts` on the `ChatInstance` interface so callers typed
  against the public interface can reach `bot.transcripts`.
- Promote the `count` argument to a named `CountQuery` interface,
  matching `DeleteTarget` / `ListQuery`. Exported from `index.ts`.
- Document on `TranscriptsApi.list()` that pagination is intentionally
  out-of-scope — the store keeps at most `maxPerUser` entries per user.
- Reconcile the `TranscriptEntry.id` JSDoc with the implementation:
  UUID assigned at append time, returned in append order, not
  lexicographically sortable; use `timestamp` for cross-store ordering.

Wiring (`chat.ts`):
- Include `threadId` in the identity-resolver failure log context so
  operators can correlate failures with the source thread.

Stale-reference sweep:
- Replace lingering "Messages API" / `chat.messages` /
  `messages.storeFormatted` strings in shipped JSDoc with the new
  `transcripts` names (these ride into `.d.ts` and are user-visible).
- Fix the dead `[Messages API](./messages.ts)` link in the existing
  thread-history-rename changeset.

* test(chat): cover dual-read precedence, resolver edges, concurrent ops

Fill gaps in the Transcripts API + threadHistory rename test suite:

`chat.test.ts` (persistThreadHistory block):
- top-level `config.messageHistory` (deprecated alias) flows through
  to the per-thread cache when `threadHistory` is unset
- `threadHistory` takes precedence over `messageHistory` when both are
  set — pinned by asserting `appendToList` receives the new config's
  `maxLength` / `ttlMs`
- both `persistThreadHistory` and `persistMessageHistory` set on the
  adapter still triggers persistence

`transcripts-wiring.test.ts`:
- sync resolver returning a plain string populates `message.userKey`
- resolver returning `""` is treated as no userKey (truthy check at
  the dispatch hook would silently flip if a future change moved to
  `!== undefined`)

`transcripts.test.ts`:
- concurrent append/delete/append interleave preserves invariants:
  `count()` and `list()` agree (no tombstone leak), no pre-delete
  entry survives, and the post-delete result is bounded by the two
  concurrent appends

* docs(chat): use named types in Transcripts API reference

- `formatted` rows in the AppendInput / TranscriptEntry TypeTables
  now render `FormattedContent | undefined` (the alias actually
  exported from `chat`), instead of `Root | undefined` which would
  force readers to pull the type from `mdast` directly.
- `count` signature uses the new `CountQuery` named type, with a
  one-liner describing its single field.

* example(nextjs-chat): fix stale comment on transcripts demo handler

The action handler was relabelled to `transcripts` when it was wired
to `bot.transcripts.list`, but the leading comment still read
"Demonstrate fetchMessages and allMessages" from the previous
iteration. Update it to describe the transcripts demo.

---------

Co-authored-by: Ben Sabic <bensabic@users.noreply.github.com>
2026-05-05 15:25:37 -07:00
Raimond Lume 3546b3fddb feat(slack): use native markdown_text for outgoing messages (#440)
* feat(slack): use native markdown_text field for outgoing messages

Slack now natively renders markdown via the `markdown_text` parameter on
chat.postMessage / postEphemeral / update / scheduleMessage and via
response_url payloads. The adapter passes markdown through directly instead
of converting to mrkdwn.

- Tables, headings, code fences, blockquotes, and nested lists render
  natively in Slack instead of falling back to ASCII / mrkdwn.
- `string` and `{ raw }` messages still go to `text` (preserves literal `*`).
- `{ markdown }` and `{ ast }` messages go to `markdown_text` (12k char limit).
- `renderWithTableBlocks`, `toBlocksWithTable`, `mdastTableToSlackBlock`,
  and the AST→mrkdwn renderer (`fromAst` / `nodeToMrkdwn`) are removed.
- `SlackMarkdownConverter` alias is removed; use `SlackFormatConverter`.
- `renderFormatted(ast)` now returns standard markdown (was mrkdwn).
- Incoming `message` events still arrive as mrkdwn and are parsed unchanged.

Net -473 lines across markdown.ts and the five sender call sites.

* fix(slack): use mrkdwn fallback for response_url edits
2026-05-05 14:12:22 -07:00
josh f46a6fb0bc fix(telegram): apply MarkdownV2 entity safety trim to streaming chunks (#446) 2026-05-04 14:00:28 -07: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
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
josh ded6f78088 fix(slack): enrich link previews with unfurl metadata from attachments (#395)
* fix(slack): enrich link previews with unfurl metadata from attachments

* fix(slack): add trailing slash normalization for unfurl URL matching

* fix(slack): store unfurl metadata from message_changed and enrich subsequent messages

* fix(slack): poll for unfurls so link metadata survives the message_changed race
2026-04-30 13:19:22 -07:00