Commit Graph

14 Commits

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


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

### Minor Changes

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

### Patch Changes

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

### Minor Changes

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

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

### Patch Changes

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

### Minor Changes

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

### Patch Changes

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

### Minor Changes

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

### Patch Changes

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

### Minor Changes

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

### Patch Changes

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

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

### Patch Changes

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

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

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

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

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

### Patch Changes

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

### Patch Changes

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

### Patch Changes

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

### Patch Changes

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

### Patch Changes

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

### Patch Changes

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

### Patch Changes

- 09b72e9: fix whatsapp card media duplication

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

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

### Patch Changes

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

### Patch Changes

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

### Patch Changes

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

### Patch Changes

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

### Patch Changes

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

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


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

### Minor Changes

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

### Patch Changes

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

### Minor Changes

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

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

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

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

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

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

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

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

### Patch Changes

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

### Minor Changes

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

### Patch Changes

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

### Minor Changes

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

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

### Patch Changes

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

### Minor Changes

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

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

### Patch Changes

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

### Minor Changes

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

### Patch Changes

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

### Minor Changes

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

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

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

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

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

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

### Patch Changes

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

### Patch Changes

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

### Patch Changes

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

### Patch Changes

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

### Patch Changes

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

### Patch Changes

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

### Patch Changes

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

### Patch Changes

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

### Patch Changes

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

### Patch Changes

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

### Patch Changes

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

### Patch Changes

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

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-07-13 16:41:59 +01:00
damianborowy-nexos 1721fa01e7 feat(slack): add Slack Agent messaging experience (agent_view) support (#684)
## Summary

Add support for Slack's Agent messaging experience (`agent_view`), the
2026 replacement for `assistant_view`.

## Core (`chat`)

- New `onAppContextChanged` event carrying the active-view context as a
normalized `AppContextEntity[]` (`channel` / `canvas` / `list` /
`message` / `unknown`) describing what the user is currently viewing.
- `AppHomeOpenedEvent` now carries:
  - the same folded active-view context as optional `entities`
- the opened `tab` (`"home"` / `"messages"`), so handlers can
distinguish a Home-tab open from the DM-open signal under `agent_view`

## Slack adapter (`@chat-adapter/slack`)

- **`agentView` config flag.** Under `agent_view`:
- `app_home_opened` is the DM-open signal and fires regardless of tab
(branch on `event.tab` if you also publish a Home view)
- DM messages are threaded per Slack's new model — each user message is
a thread root (`thread_ts ?? ts`)
- conversation-scoped threads returned by `openDM()` keep working: when
that thread is subscribed, incoming top-level DM messages route to it,
so `onSubscribedMessage` and per-thread state behave the same as in
legacy mode
- **`app_context_changed` routing** with normalized entities. Malformed
payloads degrade gracefully: a missing `context` yields `entities: []`,
and entities with a null/malformed `value` normalize to `kind:
"unknown"` — never a webhook 500.
- **`getAppContext(message)`** helper to read the folded active-view
context off a DM message.
- **`setSuggestedPrompts`** accepts an optional thread reference
(`agent_view` lets prompts sit at the top of the agent conversation).
- **Env auth fallback now keys off auth fields**: `SLACK_BOT_TOKEN` /
`SLACK_CLIENT_ID` / `SLACK_CLIENT_SECRET` fallback is disabled only when
an auth-related field (`botToken`, `clientId`, `clientSecret`,
`installationProvider`) is passed explicitly, rather than by the
presence of any config object. This lets non-auth options compose with
env auth — e.g. `createSlackAdapter({ agentView: true })` picks up env
credentials — and matches the semantics documented in the adapter's
AGENTS.md. *(Behavior change for callers passing non-auth-only configs
while relying on env vars being ignored.)*
- Bumped `@slack/web-api` to `^7.18.0` (adds the optional `thread_ts`
typing for `setSuggestedPrompts`).

## Docs

- New "Agent messaging experience" section on the Slack adapter page
(config, manifest snippet, threading model, openDM bridge).
- "Handling active-view context" section in handling-events, plus
`tab`/`entities` rows on the app-home event table.
- Callout: under `agent_view`, bot replies are threaded per user
message, so `conversations.history` only returns the user's side of a DM
— build AI conversation history from transcripts instead of channel
history.

## Example app (`examples/nextjs-chat`)

- Plain `SLACK_BOT_TOKEN` adapter branch (previously Slack was only
wired via Vercel Connect).
- DM AI history built from transcripts instead of channel history (see
docs callout above); assistant turns persisted.
- The `dm me` trigger regex now matches mention text, which carries the
`@bot` prefix on Slack.

## Test plan

- `pnpm validate` and `pnpm konsistent` pass.
- Unit tests cover the new events, entity normalization (including
malformed payloads), `agent_view` DM threading, the openDM subscription
bridge, `tab` passthrough, `setSuggestedPrompts` thread handling, and
env-fallback behavior; an integration replay test exercises the full
webhook flow.
- Verified manually against a live `agent_view` workspace:
`onAppContextChanged` entities, folded context on `app_home_opened` and
DM messages, `tab` values for both tabs, per-message DM threading, the
openDM subscription bridge, and signed malformed-payload replays (all
return 200).
- Legacy regression pass with `agentView` off: conversation-scoped DM
threading, Home-tab-only `app_home_opened`, mention flow unchanged.

### Slack references

- Agent messaging experience:
https://docs.slack.dev/changelog/2026/06/30/agent-messages-tab/
- Active-view context:
https://docs.slack.dev/changelog/2026/07/02/app-context/

## Checklist

- [x] All commits are signed and verified
- [x] All commits are signed off for the DCO (`git commit -s`)
- [x] `pnpm validate` passes
- [x] Changeset added
- [x] Documentation updated

---------

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


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

### Minor Changes

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

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

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

### Patch Changes

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

### Minor Changes

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

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

### Patch Changes

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

### Minor Changes

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

### Patch Changes

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

### Minor Changes

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

### Patch Changes

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

### Minor Changes

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

### Patch Changes

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

### Minor Changes

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

### Patch Changes

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

### Minor Changes

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

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

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

### Patch Changes

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

### Patch Changes

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

### Patch Changes

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

### Patch Changes

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

### Patch Changes

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

### Patch Changes

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

### Patch Changes

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

### Patch Changes

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

### Patch Changes

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

### Patch Changes

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

### Patch Changes

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

### Patch Changes

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

### Patch Changes

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

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

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

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

## Adoption

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

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

---------

Signed-off-by: Ben Sabic <bensabic@users.noreply.github.com>
Co-authored-by: Ben Sabic <bensabic@users.noreply.github.com>
2026-07-07 23:26:08 +10:00
Ben Sabic a7fb1bcfa1 feat(tests): add Vercel Connect webhook contract helper (#654)
Adds `connectWebhookContract` to `@chat-adapter/tests`: a shared Vitest
suite that verifies a Connect-capable adapter's webhook verification.
Given a small per-adapter descriptor, it asserts the behavior every
Connect adapter shares — a `webhookVerifier` replaces the native
signature/secret check and gates inbound requests (`200` on a truthy
result, `401` on a thrown error or falsy result) and is invoked with the
request and raw body.

The helper depends only on `chat` types and is self-tested against a
fake adapter, so it lives entirely under `packages/tests`.

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

## Follow-up

The Slack, GitHub, and Linear adapters don't consume this helper yet —
they still have their own inline `webhookVerifier` tests. Migrating
those to `connectWebhookContract` will happen as part of the ongoing
effort to port adapter tests over to `@chat-adapter/tests`, which is
where the helper becomes real shared coverage.

## Companion

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

---------

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


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

### Minor Changes

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

### Patch Changes

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

## chat@4.32.0

### Minor Changes

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

### Patch Changes

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

## @chat-adapter/gchat@4.32.0

### Patch Changes

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

## @chat-adapter/github@4.32.0

### Patch Changes

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

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

-   Updated dependencies [eccc6b9]

-   Updated dependencies [438f551]

-   Updated dependencies [d034b8b]

-   Updated dependencies [06af3e1]

-   Updated dependencies [2e47351]

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

## @chat-adapter/linear@4.32.0

### Patch Changes

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

## @chat-adapter/messenger@4.32.0

### Patch Changes

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

## @chat-adapter/shared@4.32.0

### Patch Changes

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

## @chat-adapter/slack@4.32.0

### Patch Changes

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

## @chat-adapter/teams@4.32.0

### Patch Changes

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

## @chat-adapter/telegram@4.32.0

### Patch Changes

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

## @chat-adapter/twilio@4.32.0

### Patch Changes

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

## @chat-adapter/web@4.32.0

### Patch Changes

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

## @chat-adapter/whatsapp@4.32.0

### Patch Changes

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

## create-chat-sdk@0.1.1

### Patch Changes

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

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

### Patch Changes

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

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

### Patch Changes

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

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

### Patch Changes

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

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

### Patch Changes

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

## @chat-adapter/tests@4.32.0

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

---------

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


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

### Minor Changes

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

### Patch Changes

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

## @chat-adapter/teams@4.31.0

### Minor Changes

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

### Patch Changes

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

## @chat-adapter/telegram@4.31.0

### Minor Changes

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

### Patch Changes

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

## chat@4.31.0

### Minor Changes

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

## create-chat-sdk@0.1.0

### Minor Changes

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

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

### Minor Changes

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

### Patch Changes

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

## @chat-adapter/discord@4.31.0

### Patch Changes

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

## @chat-adapter/gchat@4.31.0

### Patch Changes

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

## @chat-adapter/github@4.31.0

### Patch Changes

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

## @chat-adapter/linear@4.31.0

### Patch Changes

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

## @chat-adapter/messenger@4.31.0

### Patch Changes

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

## @chat-adapter/shared@4.31.0

### Patch Changes

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

## @chat-adapter/twilio@4.31.0

### Patch Changes

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

## @chat-adapter/web@4.31.0

### Patch Changes

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

## @chat-adapter/whatsapp@4.31.0

### Patch Changes

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

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

### Patch Changes

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

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

### Patch Changes

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

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

### Patch Changes

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

## @chat-adapter/tests@4.31.0

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-16 11:00:02 +01:00
Ben Sabic 9921dcd1c4 docs(seo): improve npm metadata, README discoverability, and structured data (#587)
Improves Chat SDK discoverability across npm, READMEs, and the docs site
for search engines and AI coding agents.

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

---------

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


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

### Minor Changes

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

### Patch Changes

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

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

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

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

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

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

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

## @chat-adapter/telegram@4.30.0

### Minor Changes

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

### Patch Changes

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

## @chat-adapter/twilio@4.30.0

### Minor Changes

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

### Patch Changes

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

## @chat-adapter/whatsapp@4.30.0

### Minor Changes

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

### Patch Changes

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

## chat@4.30.0

### Minor Changes

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

## @chat-adapter/discord@4.30.0

### Patch Changes

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

## @chat-adapter/gchat@4.30.0

### Patch Changes

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

## @chat-adapter/github@4.30.0

### Patch Changes

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

## @chat-adapter/linear@4.30.0

### Patch Changes

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

## @chat-adapter/messenger@4.30.0

### Patch Changes

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

## @chat-adapter/shared@4.30.0

### Patch Changes

-   Updated dependencies [5461ea9]
    -   chat@4.30.0

## @chat-adapter/teams@4.30.0

### Patch Changes

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

## @chat-adapter/web@4.30.0

### Patch Changes

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

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

### Patch Changes

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

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

### Patch Changes

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

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

### Patch Changes

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

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

### Patch Changes

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

## @chat-adapter/tests@4.30.0

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-01 18:18:35 -07:00
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 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