Commit Graph

234 Commits

Author SHA1 Message Date
josh ef2542c5fd feat(x): add X (Twitter) adapter (#682)
## summary

new `@chat-adapter/x` adapter for X (Twitter), built on the X API v2 and
the X Activity API. write bot logic once and reply to mentions, hold DM
conversations, post from the account, and like posts, like the other
Chat SDK adapters

what it supports:
- reply to public mentions (`post.mention.create`) and top-level posts
via `channel.post`
- send and receive direct messages (`dm.received` / `dm.sent`)
- edit and delete owned posts, delete own DM events
- likes as the only reaction (`emoji.heart` or `"like"`)
- buffered streaming: accumulates an LLM stream and posts once instead
of post+edit churn on a public timeline
- OAuth 2.0 user context with managed token refresh (rotating refresh
token persisted in the state adapter, optional AES-256-GCM encryption)
- webhook CRC and `x-twitter-webhooks-signature` verification

key design decisions:
- DMs are threaded by the other participant's user id (`x:dm:{userId}`)
because X DM webhooks carry no conversation id, only participants
- OAuth 2.0 only at runtime: DM send and read are verified to work on
OAuth 2.0 user tokens, so no OAuth 1.0a in the adapter (subscription and
webhook setup is one-time and handled in the X developer console)
- parsers were written against real captured payloads: mentions use the
v2 shape (author hydrated in `includes.users`), DMs use the legacy
Account Activity shape (`direct_message_events`,
`message_create.message_data`, a `users` map, and no conversation id)

also includes the `chat/adapters` catalog entry, docs page, CLI scaffold
spec, and `sample-messages.md` with real captured payloads

<details><summary>usage</summary>

```typescript
import { Chat } from "chat";
import { createXAdapter } from "@chat-adapter/x";

const bot = new Chat({
  userName: "mybot",
  adapters: { x: createXAdapter() },
});

bot.onNewMention(async (thread, message) => {
  await thread.post(`hi @${message.author.userName}!`);
});

bot.onDirectMessage(async (thread) => {
  await thread.post("hello from X");
});
```
</details>

## test plan

- adapter unit tests pass against the real captured payload shapes, with
regression tests for author-from-`includes` (mentions) and the legacy
`direct_message_events` shape (DMs)
- real captured `post.mention.create` and `dm.received` payloads
verified end-to-end through `handleWebhook`: signature verification,
routing, author resolution, and participant threading, plus
bad-signature rejection returns 401
- every write and read path fired live against the X API through the
adapter: top-level post, reply to a mention, like and unlike, edit,
delete, DM send, DM read, DM delete
- OAuth 2.0 managed token refresh exercised live (access and refresh
token rotation)

---------

Signed-off-by: dancer <josh@afterima.ge>
2026-07-07 23:07:36 +01:00
zaadevofc eb466e526f docs: add chat-adapter-zaileys community adapter (#677)
## Summary

Adds **chat-adapter-zaileys** to the community adapters catalog — a
WhatsApp adapter powered by
[Zaileys](https://github.com/zeative/zaileys), a batteries-included
TypeScript wrapper around the unofficial WhatsApp Web API.

- npm: https://www.npmjs.com/package/chat-adapter-zaileys
- Repo: https://github.com/zeative/chat-adapter-zaileys
- Docs: https://zeative.github.io/chat-adapter-zaileys/

## What it adds vs the existing Baileys community adapter

- Real `thread.fetchMessages` history backed by a pluggable message
store (memory/SQLite/Postgres/Redis/Convex), with cursor pagination and
`rehydrateAttachment` for queue/debounce strategies
- Cards render as **native WhatsApp buttons** with `chat.onAction`
round-trips
- Poll votes decrypted natively — no `messageSecret` bookkeeping, works
across restarts
- `scheduleMessage` support (persisted scheduler)
- Opt-in slash-command routing to `chat.onSlashCommand`
- QR/pairing auth, reconnection, and session persistence handled by the
underlying client

## Files changed (per `.agents/skills/add-adapter`)

- `apps/docs/content/adapters/community/zaileys.mdx` — docs page with
feature matrix
- `apps/docs/content/adapters/community/meta.json` — slug added to
Platforms
- `apps/docs/adapters.json` — registry entry
- `packages/integration-tests/src/documentation-test-utils.ts` —
`chat-adapter-zaileys` + `zaileys` in `VALID_DOC_PACKAGES`

## Validation

- `pnpm --filter chat build` ✓
- `pnpm --filter @chat-adapter/integration-tests test` → 914/914 ✓
- `pnpm --filter chat typecheck` ✓
- `pnpm check` + `pnpm konsistent` ✓

Signed-off-by: zeative <zaadevofc@gmail.com>
2026-07-06 09:27:43 +10:00
OmriBenShoham 0c761f1bdd docs(adapters): add Dial as vendor-official adapter (#676)
Adds Dial as a vendor-official adapter — SMS, MMS, iMessage, and inbound
voice-call transcripts for Chat SDK.

- `vendor-official/dial.mdx` adapter page (following the Photon / Linq /
Sendblue format)
- catalog entry in `packages/chat/src/adapters/index.ts` with
`DIAL_API_KEY` / `DIAL_FROM_NUMBER_ID` / `DIAL_WEBHOOK_SECRET`
- `create-chat-sdk` scaffold spec entry
- registry entry in `adapters.json` + `dial` added to vendor-official
`meta.json`
- integration-test doc lists + changeset

Repo: https://github.com/GetDial-AI/chat-sdk-adapter · npm:
`@getdial/chat-sdk-adapter` · Dial docs:
https://docs.getdial.ai/integrations/agent-clients/vercel-chat-sdk

The adapter maps a phone conversation to a Chat SDK thread (identified
by the pair of phone numbers — Dial-owned and peer), an SMS/MMS/iMessage
to a message with optional media attachments, and a completed voice
call's transcript to a message on the caller's thread. Outbound sends
and transcript fetches go through the official `@getdial/sdk`; inbound
webhooks are HMAC-SHA256 verified against a per-subscription signing
secret with constant-time compare.

### Validation
- `pnpm --filter chat build` — clean
- `pnpm --filter chat typecheck` — clean
- `pnpm --filter create-chat-sdk typecheck` — clean
- `pnpm --filter @chat-adapter/integration-tests exec vitest run
src/docs-adapters.test.ts` — 361/361 passed
- `pnpm check` (ultracite) — clean
- `pnpm konsistent` — 34 files, no violations
2026-07-06 09:21:34 +10:00
Thomas Dietert 0b63791b66 fix(slack): process Socket Mode retry envelopes instead of dropping them (#667)
Fixes #666

## Summary

Both `slack_event` handlers (`startSocketMode` and
`runSocketModeListener`) ack and discard every envelope with `retry_num
> 0`. Slack retries an event (immediately, +1 min, +5 min) when a prior
delivery wasn't acked — including events that arrived while the app had
**no open socket** (restart, deploy, or Slack's routine connection
refreshes). For those, the retry is the only delivery the app ever sees,
so dropping it permanently loses the event (production incident details
in #666).

- **`@chat-adapter/slack`**: route retry envelopes through
`routeSocketEvent` like first deliveries (it acks per envelope type,
preserving the 3s ack window), and log them at info with `retry_num` /
`retry_reason` so redelivery is observable. Duplicate protection is
unchanged and sufficient: `Chat.processMessage` dedupes on `message.id`
(the Slack event `ts`, identical on a retry) via `state.setIfNotExists`.
- **`chat`**: raise the default `DEDUPE_TTL_MS` from 5 to 10 minutes.
Slack's final retry fires ~5 minutes after the original delivery —
exactly at the old TTL boundary, where the dedupe entry from the first
processing could expire just before the retry arrives and cause a
double-process. `dedupeTtlMs` config still overrides.

Behavior note for review: apps that relied on retries being invisible
will now see redelivered events flow through — deduped when already
handled, processed when not. That is the intended semantic:
at-least-once delivery from Slack, exactly-once handling via the SDK's
dedupe.

## Test plan

- Replaced the `"skips retries"` test with `"processes retries like
first deliveries (dedupe drops true duplicates)"` — asserts a
`retry_num: 1` envelope is acked and reaches `processMessage`.
- Updated the default-TTL test to 10 minutes; the custom-`dedupeTtlMs`
test is unchanged.
- `pnpm validate` passes end to end (knip, check, typecheck, test,
build); `pnpm --filter chat --filter @chat-adapter/slack test` = 1028 +
506 passing.


Signed-off-by: tdietert <thomasd@mercury.com>
2026-07-02 17:26:27 +01:00
Ben Sabic 3abdc69103 docs(adapters): add Cloudflare Agents as vendor-official state adapter (#669)
Adds Cloudflare Agents as a vendor-official **state** adapter —
`agents/chat-sdk`'s `createChatSdkState()`, a Chat SDK `StateAdapter`
that stores subscriptions, locks, queues, dedupe keys, thread/channel
state, transcripts, and history in Durable Object SQLite via
`ChatSdkStateAgent` sub-agents.

- `vendor-official/cloudflare-agents.mdx` state-adapter page (Agent
setup, wrangler DO migration, sharding, config, storage/cleanup)
- catalog entry in `packages/chat/src/adapters/index.ts` (`group:
vendor-official`, `type: state`)
- registry entry in `adapters.json` + `cloudflare-agents` in
vendor-official `meta.json`
- integration-test doc lists + changeset

Repo: https://github.com/cloudflare/agents · package `agents`
(`agents/chat-sdk`) ·
[docs](https://developers.cloudflare.com/agents/runtime/communication/chat-sdk/)

### Not wired into the create-chat-sdk CLI
This adapter runs inside a Cloudflare Worker with Durable Objects, not
the generated Next.js runtime, so it is intentionally kept out of the
scaffold:
- added to `CLI_INCOMPATIBLE_ADAPTERS` (rejected via `--adapter`, hidden
from the platform picker and e2e run, like `lark`/`matrix`)
- new `listCliStateAdapters()` filters the interactive **state** picker
and the `--help` adapter list (the state picker previously used raw
`listStateAdapters()` and would have offered it, then thrown on
selection)

### Tests
- `catalog/display.test.ts` — `listCliStateAdapters`: returns only state
adapters, includes `memory`/`redis`, and excludes `cloudflare-agents`
while asserting it *is* in the raw catalog
- `catalog/selection.test.ts` —
`resolveAdapterValue("cloudflare-agents")` throws "not supported"
- `cli/program.test.ts` — `buildAdapterList()` help text omits
`cloudflare-agents`
- existing `CLI_SCAFFOLD_SPEC covers every catalog adapter` +
docs-adapters/docs-content suites cover the catalog entry, registry
parity, and MDX imports

### Validation
- create-chat-sdk: **178 passed**, typecheck clean
- integration docs suites pass; Biome + knip clean

---------

Co-authored-by: Ben Sabic <bensabic@users.noreply.github.com>
2026-07-03 01:55:05 +10:00
Ben Sabic 24a04d5653 docs(adapters): add Photon as vendor-official adapter (#668)
Adds Photon as a vendor-official adapter — iMessage for Chat SDK.

- `vendor-official/photon.mdx` adapter page (following the Linq /
Sendblue / Kapso format)
- catalog entry in `packages/chat/src/adapters/index.ts` with
cloud/self-host credential modes
- `create-chat-sdk` scaffold spec entry
- registry entry in `adapters.json` + `photon` added to vendor-official
`meta.json`
- integration-test doc lists + changeset

Repo: https://github.com/photon-hq/vercel-chat-adapter-imessage · npm:
`@photon-ai/chat-adapter-imessage` · built on
[spectrum-ts](https://github.com/photon-hq/spectrum-ts)

The adapter runs in three modes — **Cloud** ([Spectrum
Cloud](https://app.photon.codes)), **self-hosted** (gRPC), and **local**
(on-device, macOS) — auto-detected from environment variables. Cloud
mode delivers inbound messages via HMAC-signed webhooks; DMs can be
replied to cold from a webhook delivery.

### Notes
- Catalog slug is `photon`; docs code examples use `imessage` as the
adapter key to match the upstream README.
- Feature flags encode the README's remote-only caveats (reactions /
editing / typing / modals as `partial`, mentions as DMs-only; no
history, thread info, or reaction removal).

### Validation
- `docs-adapters` integration tests — 1237 passed (catalog↔registry
parity, peerDeps↔PackageInstall alignment)
- `create-chat-sdk` e2e scaffold — 175 passed (scaffolds every catalog
adapter, incl. photon)
- `chat` + `create-chat-sdk` typecheck, Biome check, and konsistent —
clean

Co-authored-by: Ben Sabic <bensabic@users.noreply.github.com>
2026-07-03 01:40:06 +10:00
Ben Sabic ba375ce16c feat(create-chat-sdk): add Vercel Connect mode (#655)
Adds an opt-in Vercel Connect authentication mode to the scaffolder for
the Slack, GitHub, and Linear adapters, via a `--connect` flag and a new
interactive auth-mode prompt (shown only when a Connect-capable adapter
is selected).

When enabled, the generated project:

- spreads the matching helper from `@vercel/connect/chat` into the
adapter factory in `src/lib/bot.ts` (non-Connect adapters keep their
native factory calls)
- adds `@vercel/connect` to dependencies
- lists each connector UID (for example `SLACK_CONNECTOR`) plus the
recommended `GITHUB_BOT_USER_ID`, in place of native provider secrets,
in `.env.example`
- documents `vercel link` / `vercel env pull` and the deployed-URL
webhook caveat in the README and post-install next steps

Connect policy lives in the existing `scaffold-spec.ts` (per-adapter
`connect` field), so `chat/adapters` stays the single source of adapter
metadata.

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

## 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:40 +10:00
Ben Sabic 6750d59e72 feat(github): add Vercel Connect support (#650)
Adds Vercel Connect support to the GitHub adapter:

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

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

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

## Companion

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

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

---------

Signed-off-by: Ben Sabic <bensabic@users.noreply.github.com>
Co-authored-by: Ben Sabic <bensabic@users.noreply.github.com>
2026-07-03 01:38:51 +10:00
Ben Sabic 4115c9431e feat(linear): add Vercel Connect support (#649)
Adds Vercel Connect support to the Linear adapter:

- `accessToken` now accepts a `() => string | Promise<string>` resolver
in addition to a string, so tokens can be sourced from Vercel Connect at
runtime.
- A new optional `webhookVerifier` verifies inbound webhooks (Connect
trigger-forwarded requests via a Vercel OIDC token) in place of the
Linear webhook secret.
- Connect-mode outbound calls outside webhook handling are supported via
`withInstallation(organizationId, fn)`.

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

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

## Companion

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

<img width="929" height="664" alt="CleanShot 2026-06-30 at 12 35 30"
src="https://github.com/user-attachments/assets/c5861cb9-d66b-42c6-b838-5b4983f48646"
/>

---------

Signed-off-by: Ben Sabic <bensabic@users.noreply.github.com>
Co-authored-by: Ben Sabic <bensabic@users.noreply.github.com>
2026-07-03 01:23:21 +10:00
Ben Sabic ba687cb13c docs(slack): document Vercel Connect support (#648)
Documents authenticating the Slack adapter with Vercel Connect via
`connectSlackAdapter()` from `@vercel/connect/chat`. The Slack adapter
already supports a `botToken` resolver and a `webhookVerifier`, so this
is a documentation-only change (no changeset).

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

## Companion

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

<img width="824" height="527" alt="CleanShot 2026-06-30 at 12 03 26"
src="https://github.com/user-attachments/assets/cbced069-8913-4848-9cf1-df0e5f614353"
/>

---------

Signed-off-by: Ben Sabic <bensabic@users.noreply.github.com>
Co-authored-by: Ben Sabic <bensabic@users.noreply.github.com>
2026-07-03 01:01:51 +10:00
Ben Sabic ab0e1806c8 feat(chat): Vercel Connect (#647)
Adds a Vercel Connect guide to the docs under **Usage**
(`chat-sdk.dev/docs/vercel-connect`), covering connector setup, trigger
forwarding, the per-platform `connect*Adapter` helpers from
`@vercel/connect/chat`, custom OIDC webhook verification and its trust
boundary, and limitations. Also adds a "Vercel Connect Guide" card to
the docs homepage.

This is the base of a stack; the adapter, tests, and CLI PRs below build
on it. Docs-only, so no changeset.

## Stack

- #647 — feat(chat): Vercel Connect (this PR, base → `main`)
- #648 — docs(slack): document Vercel Connect support
- #649 — feat(linear): add Vercel Connect support
- #650 — feat(github): add Vercel Connect support
- #654 — feat(tests): add Vercel Connect webhook contract helper
- #655 — feat(create-chat-sdk): add Vercel Connect mode

All of the above are stacked on this branch (`vercel-connect/base`).

## Companion

The helpers this documents ship in the `@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:01:16 +10:00
Ben Sabic beae9bffdb chore(docs): update eve link (#664)
eve homepage is now live, change the link from the docs to the homepage
now, reflecting how the other OSS sites behave

Co-authored-by: Ben Sabic <bensabic@users.noreply.github.com>
2026-07-01 16:39:02 +01:00
dependabot[bot] df825b3a56 build(deps-dev): bump postcss from 8.5.15 to 8.5.16 (#658)
Bumps [postcss](https://github.com/postcss/postcss) from 8.5.15 to
8.5.16.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/postcss/postcss/releases">postcss's
releases</a>.</em></p>
<blockquote>
<h2>8.5.16</h2>
<ul>
<li>Fixed <code>Input#origin()</code> position (by <a
href="https://github.com/mizdra"><code>@​mizdra</code></a>).</li>
<li>Fixed <code>raws</code> after rehydrating a JSON AST (by <a
href="https://github.com/sarathfrancis90"><code>@​sarathfrancis90</code></a>).</li>
<li>Fixed putting parent-less node in <code>nodes</code> of new node (by
<a
href="https://github.com/MahinAnowar"><code>@​MahinAnowar</code></a>).</li>
<li>Fixed computing <code>offset</code> in <code>positionBy()</code> (by
<a
href="https://github.com/greymoth-jp"><code>@​greymoth-jp</code></a>).</li>
<li>Fixed <code>rangeBy()</code> on <code>index: 0</code> (by <a
href="https://github.com/sarathfrancis90"><code>@​sarathfrancis90</code></a>).</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/postcss/postcss/blob/main/CHANGELOG.md">postcss's
changelog</a>.</em></p>
<blockquote>
<h2>8.5.16</h2>
<ul>
<li>Fixed <code>Input#origin()</code> position (by <a
href="https://github.com/mizdra"><code>@​mizdra</code></a>).</li>
<li>Fixed <code>raws</code> after rehydrating a JSON AST (by <a
href="https://github.com/sarathfrancis90"><code>@​sarathfrancis90</code></a>).</li>
<li>Fixed putting parent-less node in <code>nodes</code> of new node (by
<a
href="https://github.com/MahinAnowar"><code>@​MahinAnowar</code></a>).</li>
<li>Fixed computing <code>offset</code> in <code>positionBy()</code> (by
<a
href="https://github.com/greymoth-jp"><code>@​greymoth-jp</code></a>).</li>
<li>Fixed <code>rangeBy()</code> on <code>index: 0</code> (by <a
href="https://github.com/sarathfrancis90"><code>@​sarathfrancis90</code></a>).</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/postcss/postcss/commit/92ccc93ff15bd193491d67fad9763e62d489dfad"><code>92ccc93</code></a>
Release 8.5.16 version</li>
<li><a
href="https://github.com/postcss/postcss/commit/818bdd6043359af773ccc3ca8663053d61a707c8"><code>818bdd6</code></a>
Update formatting</li>
<li><a
href="https://github.com/postcss/postcss/commit/46e451068ee6160b837865b715cf6972f28fabd5"><code>46e4510</code></a>
Fix <code>Input#origin()</code> returning incorrect position (<a
href="https://redirect.github.com/postcss/postcss/issues/2036">#2036</a>)</li>
<li><a
href="https://github.com/postcss/postcss/commit/34942ce76c0b0c9ee65b1421017ac71855e722c4"><code>34942ce</code></a>
Fix tests</li>
<li><a
href="https://github.com/postcss/postcss/commit/d4feed645314ee421edf80ee9ebe453cc75c997f"><code>d4feed6</code></a>
Don't clone root-less child nodes in container constructor (<a
href="https://redirect.github.com/postcss/postcss/issues/2097">#2097</a>)</li>
<li><a
href="https://github.com/postcss/postcss/commit/da323fc8d327a38199a21987dcbf7e27e3bc34f3"><code>da323fc</code></a>
Revert version update to fix old Node.js on CI</li>
<li><a
href="https://github.com/postcss/postcss/commit/886336919497516df8f140d0fb327bd125e35053"><code>8863369</code></a>
Update dependencies</li>
<li><a
href="https://github.com/postcss/postcss/commit/3828982213fec6bc13d0791b1adf40393be0935e"><code>3828982</code></a>
Preserve node raws when rehydrating a JSON AST (<a
href="https://redirect.github.com/postcss/postcss/issues/2100">#2100</a>)</li>
<li><a
href="https://github.com/postcss/postcss/commit/d1e80b830386b08dcd5b962fd466d1c51f28e82d"><code>d1e80b8</code></a>
Fix Node#rangeBy() ignoring index 0 (<a
href="https://redirect.github.com/postcss/postcss/issues/2091">#2091</a>)</li>
<li><a
href="https://github.com/postcss/postcss/commit/b91e4a63907325d98b75d11fda546bdd91acc608"><code>b91e4a6</code></a>
Fix Node.js 26 tests</li>
<li>Additional commits viewable in <a
href="https://github.com/postcss/postcss/compare/8.5.15...8.5.16">compare
view</a></li>
</ul>
</details>
<details>
<summary>Maintainer changes</summary>
<p>This version was pushed to npm by <a
href="https://www.npmjs.com/~GitHub%20Actions">GitHub Actions</a>, a new
releaser for postcss since your current version.</p>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=postcss&package-manager=npm_and_yarn&previous-version=8.5.15&new-version=8.5.16)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts page](https://github.com/vercel/chat/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-01 13:22:22 +01:00
Anudeep 2e4735118e fix: let Plan tasks run in parallel without implicit auto-completion (#632)
## Summary

Plan’s task list API always marked existing in-progress steps as
complete whenever a new step was added. That made sense for simple
sequential bots, but it blocked parallel work — even though the docs
already showed a parallel pattern and per-task updates by ID were added
earlier.

This PR adds an optional flag on task creation so callers can keep
multiple steps in progress at once, while leaving the old sequential
behavior as the default.


**Opt-out flag, default on**. We considered removing auto-completion
entirely. That would’ve been cleaner for parallel use but would’ve
broken existing sequential bots that rely on implicit “move to next
step” behavior. Defaulting to the current behavior keeps upgrades safe;
parallel callers pass the flag off.

**No broader API redesign**. Task completion stays explicit via status
updates and the existing “complete plan” flow. The change is scoped to
when a new task is appended.


closes #630
2026-07-01 04:26:48 +01:00
Dean Mauro 022a502726 feat(discord): add ephemeral slash command responses (#514)
## summary

resolves #515

adds Discord slash-command interaction response flags so selected
commands can defer as ephemeral

Discord locks ephemerality on the initial
`DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE` response, so the adapter now
exposes `interactionFlags` on `createDiscordAdapter` for that initial
acknowledgement

```ts
import {
  createDiscordAdapter,
  DiscordInteractionResponseFlag,
} from "@chat-adapter/discord";

const discord = createDiscordAdapter({
  interactionFlags: ({ command }) => {
    if (command === "/admin") {
      return DiscordInteractionResponseFlag.Ephemeral;
    }
  },
});
```

handlers still use the normal `event.channel.post(...)` flow, and
`event.channel.postEphemeral(...)` keeps the normal Chat SDK fallback
behavior outside Discord's slash-command interaction response path


Co-authored-by: dancer <josh@afterima.ge>
2026-07-01 04:16:52 +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
Pau Guirao dd3fa75ac4 docs(zernio): document 0.4.0 — interactive lists, WhatsApp rich messages, openDM (#643)
Updates the Zernio (vendor-official) adapter page to reflect
`@zernio/chat-sdk-adapter@0.4.0`.

## What changed
- **Feature support**: `selectMenus` → partial (card
`Select`/`RadioSelect` now map to a WhatsApp interactive **list**).
- **Platform matrix**: added Lists, Location/Contacts, Templates/Flows
rows (WhatsApp); corrected WhatsApp typing to ✓.
- **New sections**:
- *WhatsApp rich messages* — `sendInteractive`
(button/list/cta_url/flow/location-request/voice-call), `sendLocation`,
`sendContacts`, `sendTemplate`, `reply` via the exported
`ZernioApiClient`.
- *Inbound interactive replies* — reading button/list/flow responses, ad
referral, and quoted context off `message.raw.metadata`.
- *Opening conversations* — `openDM` and `openConversation` (cold-start
by phone).
- **API client**: added `createConversation`.

Scope follows the same split as other adapters: cross-platform concepts
live in the adapter; WhatsApp-only sends go through the alongside
client.
2026-06-26 18:37:06 +10:00
wong2 ba30885093 docs: remove QQ Bot community adapter entry (#642)
Removes the QQ Bot community adapter entry from
`apps/docs/adapters.json`.

The entry only provided a navigation listing without a corresponding
content page, so https://chat-sdk.dev/adapters/community/qq-bot resolved
to a 404.
2026-06-24 19:47:27 +10:00
christopherkindl 7d02ea32de [docs] use actual eve logo in OSS nav dropdown (#641)
- Swap the text-based eve placeholder in the OSS products dropdown for
the actual eve wordmark, hard-copied as an SVG from
`@vercel/geistcn-assets` and themed via `currentColor`.
- Put AI Elements last, drop Streamdown to address G feedback

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 14:03:09 -07:00
wong2 ef3f0f63bd docs: add Weixin community adapter (#638)
Adds the
[`chat-adapter-weixin`](https://github.com/wong2/weixin-chat-adapter)
community adapter (Weixin / WeChat iLink bot) to the docs.

### What's included
- `apps/docs/content/adapters/community/weixin.mdx` — hand-authored
adapter page following the existing community-adapter structure
(install, quick start, long-polling note, QR login, env vars, config
`TypeTable`, thread-ID format, capabilities/limitations, and
`<FeatureSupport />`).
- `apps/docs/adapters.json` — registry entry (`community: true`, author,
pinned README commit).
- `apps/docs/content/adapters/community/meta.json` — sidebar link under
**Platforms**.

### Notes
The adapter talks to Weixin's iLink bot HTTP JSON APIs directly. It uses
long polling for inbound messages (no webhook) and requires a Chat SDK
`StateAdapter` for cursor / context-token / dedupe / history. It's 1:1
only, so messages route through `onDirectMessage`.

### Verification
`docs-adapters` (322) and `docs-llms` (129) integration tests pass.

---------

Co-authored-by: Ben Sabic <bensabic@users.noreply.github.com>
2026-06-23 20:33:43 +10:00
Ben Sabic 63ac3e5988 docs: homepage nits (#628)
- Break hero title cleanly on desktop only so "for" doesn't strand on
mobile
- Keep OSS stat labels (e.g. "Weekly downloads") on one line
- Shrink feature box headings on mobile, full size from sm
- Span the third feature box full-width on mobile
- Enable horizontal scroll for long code lines in the code showcase
- Match "more adapters" link color to the "Supports" label

---------

Co-authored-by: Ben Sabic <bensabic@users.noreply.github.com>
2026-06-22 14:56:35 +10:00
Ben Sabic efa96108bd docs: sync KB resources and harden sync-resources script (#635)
Syncs the bundled Chat SDK KB resources from Edge Config and hardens the
`sync-resources` script that generates them.

- **New guides** (4): Vercel Connect, the Slack Vercel Connect bot, AI
Gateway + AI SDK, and the daily digest bot. Existing guide bodies
refreshed and `templates.json` regenerated.
- **Script hardening** (`scripts/sync-resources.ts`):
- Fetch + validate all guides into memory **before** wiping the
resources dir — a failed fetch now leaves the working tree untouched.
- Validate the `resources-edge-config.json` shape with a clear error
instead of a blind cast.
  - Reject duplicate guide slug collisions.
- Retry transient fetches (5xx / network) with exponential backoff; fail
fast on 4xx, bad content-type, and oversized bodies.
- Mirror `skills/chat/SKILL.md` to **all four** committed copies (docs
site `.well-known` + `AGENTS.md`, and the two `create-chat-sdk` scaffold
templates).
  - TSDoc on every function.
- **Tests**: new offline consistency test in
`packages/integration-tests` — every guide has a non-empty file with no
orphans, `templates.json` mirrors the config, no duplicate slugs, and
all four `SKILL.md` copies are byte-identical to the source.

---------

Co-authored-by: Ben Sabic <bensabic@users.noreply.github.com>
2026-06-22 14:56:17 +10:00
George McCain d034b8b575 docs(adapters): add Linq as vendor-official adapter (#625)
Adds Linq as a vendor-official adapter — iMessage and SMS for Chat SDK.

- `vendor-official/linq.mdx` adapter page (following the Velt /
AgentPhone format)
- catalog entry in `adapters.json`
- `linq` added to the vendor-official `meta.json`

Repo: https://github.com/linq-team/linq-chat-sdk · npm:
`@linqapp/chat-sdk-adapter` (Apache-2.0)

The adapter is built and tested end-to-end against the live Linq API and
the Chat SDK runtime (real iMessage round-trip, webhooks, reactions,
media). Confirmed with Benji that a repo link works and Apache-2.0 is
fine. Happy to adjust the page to match any conventions I missed.

---------

Co-authored-by: Ben Sabic <bensabic@users.noreply.github.com>
2026-06-20 11:47:57 +10:00
Ben Sabic a528a9f655 feat(docs): add eve to product switcher (#624)
Add an eve entry (text wordmark + Beta badge, linking to eve.dev/docs)
to the top of the OSS product switcher in the docs navbar.

<img width="352" height="328" alt="CleanShot 2026-06-20 at 01 09 35"
src="https://github.com/user-attachments/assets/cd2f03b0-8b40-477b-a8a2-ac4a9911f44d"
/>

Co-authored-by: Ben Sabic <bensabic@users.noreply.github.com>
2026-06-20 08:57:07 +10:00
Dima Grossman 06af3e12fd docs(adapters): add Novu as vendor-official adapter (#622)
## Summary

Adds Novu as a vendor official adapter to Chat SDK allowing
multi-channel notification delivery and quick channel setup for
multi-tenant apps.

Official change log entry:
https://novu.co/changelog/novu-chat-sdk-adapter/
Official social post: https://x.com/novuhq/status/2067870170320679158 

## Test plan

Manually tested with our team to ensure compatability with the create
chat sdk and template apps, also created an example repo:
https://github.com/novuhq/novu-chat-sdk-example

## Checklist

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

---------

Co-authored-by: Ben Sabic <bensabic@users.noreply.github.com>
2026-06-19 22:11:33 +10:00
Yoen Zhang d3cd9719c0 docs(adapters): sharpen Velt description + add live demo link (#578)
Follow-up to #572 (now merged). Improvements to the Velt vendor-official
entry:

- **Sharpen the description + tagline** to reflect what's distinctive:
comments are *anchored* to the exact element, across documents,
rich-text editors, canvases, PDFs, and video — with per-comment document
context and a streaming AI reply.
- **Add a Live demo link** to the Examples section: the [tiptap comments
demo](https://sample-apps-tiptap-comments-demo.vercel.app) where you
@-mention **Velt Bot** and get a streaming AI reply (runs the
`nextjs-velt-ai-bot` sample app).
- **Re-pin the `readme` SHA** to current `main` so the linked package
README reflects the latest content (now includes example + live-demo
links).

Touches only `apps/docs/adapters.json` and
`apps/docs/content/adapters/vendor-official/velt.mdx`
2026-06-18 12:29:56 +10:00
josh a1110dd6d0 fix(docs): restore Open Graph images (#620)
## summary

restores Open Graph and Twitter preview images across the homepage,
adapters, and resources pages

adds the canonical metadata base so social image URLs resolve against
chat-sdk.dev instead of localhost
2026-06-17 23:12:16 +01:00
OSS Polar Bear 8c7141174a feat(teams): add low-level primitives (#593)
Add Teams subpath exports for custom runtimes, including Bot Connector
API helpers, Graph reads, parse-only webhooks, format helpers, Adaptive
Cards, and Task Module primitives.

---------

Co-authored-by: Ben Sabic <bensabic@users.noreply.github.com>
2026-06-16 18:54:07 +10:00
Ben Sabic c2a26e7104 feat(docs): refresh homepage styling (#615)
Stacked on top of #603 (`create-chat-sdk`).

Refreshes the chat-sdk.dev homepage styling:

- Adds Geist typography utilities (`text-heading-*`, `text-copy-*`) and
applies them to the hero, section headings, and copy.
- Adds a grid-based layout (`home-grid.css`) with consistent guide lines
for the stats, supported-platforms, code, and integrations sections.
- Adds a tabbed code showcase for the Chat SDK Core section, with window
chrome, a Geist syntax theme, and
`bot.ts`/handlers/cards/streaming/tools/state/multi-platform snippets.
- Scopes inline-code styling and sets the dark-mode
`--ds-background-100`/`--ds-background-200` tokens so `background-100`
is the elevated surface.

---------

Co-authored-by: Ben Sabic <bensabic@users.noreply.github.com>
2026-06-16 18:04:30 +10:00
Ben Sabic 8f3af76565 feat: add create-chat-sdk CLI (#603)
Adds `create-chat-sdk`, a CLI that scaffolds a Next.js Chat SDK bot
project:

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

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

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

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

## also in this pr

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

---------

Co-authored-by: Ben Sabic <bensabic@users.noreply.github.com>
Co-authored-by: dancer <josh@afterima.ge>
2026-06-16 08:48:38 +01:00
josh 4662309fe3 feat(telegram): support native rich messages (#616)
## summary

adds native rich message support for Telegram Bot API 10.1

explicit markdown and AST messages now use `sendRichMessage`, edits use
rich message payloads, and private chat streams use
`sendRichMessageDraft` before persisting the completed response

preserves existing behavior for plain strings, raw messages, cards,
media captions, and older or custom Bot API servers through automatic
fallback

adds typed inbound rich message parsing, rich message limits, regression
coverage, and updated adapter documentation
2026-06-15 19:44:32 +01:00
aqt 8336a3e818 feat(slack): expose webClientOptions to configure the underlying WebClient (#602)
## summary

adds `webClientOptions` to `SlackAdapterConfig` so users can configure
the underlying Slack `WebClient` instances

the options apply to both the default client and per-token clients used
for multi-workspace requests, including settings such as `retryConfig`,
per-request `timeout`, custom headers, and `rejectRateLimitedCalls`

`slackApiUrl` is intentionally excluded from `webClientOptions` because
the existing `apiUrl` option remains the single configuration path for
overriding the Slack Web API base URL

custom headers are cloned for each client because the Slack SDK adds
authorization to the provided headers object, preventing credentials
from leaking between token-bound clients

---------

Co-authored-by: dancer <josh@afterima.ge>
2026-06-14 23:46:22 +01:00
Ben Sabic 5a59ae2aa3 fix(docs): allow product switcher logo to navigate home (#614)
Adds a safeguard in `NavigationMenuTrigger` to skip `preventDefault`
when the click is on a nested link, so the logo navigates home without
interfering with the chevron dropdown, matching the AI SDK website
interaction model.

Co-authored-by: Ben Sabic <bensabic@users.noreply.github.com>
2026-06-15 08:45:11 +10:00
ishaksebsib 9c936f8796 feat(telegram): support slash commands (#586)
## Summary

Adds Telegram bot command support for Chat SDK slash command handlers.

- Routes Telegram `/command` and `/command@botusername` messages to
`bot.onSlashCommand`
   - Ignores commands addressed to another bot
   - Keeps non-command messages on the existing normal message path

   ## Test plan

   - `pnpm validate`
   - Tested locally against a real Telegram bot

   ## Checklist

   - [x] All commits are signed and verified
   - [x] `pnpm validate` passes
   - [x] Changeset added
   - [x] Documentation updated

---------

Co-authored-by: dancer <josh@afterima.ge>
2026-06-09 22:36:36 +10:00
Ben Sabic 778ae69abc add zero-dependency chat/adapters for adapters catalog (#599)
Adapter Catalog:
- Adds a zero-dependency `chat/adapters` subpath for official and
vendor-official adapter metadata.
- Includes typed catalog entries, env specs, peer dependency metadata,
and helper APIs for setup and onboarding flows.
- Wires the subpath into the `chat` package export map and build config.

Code Coverage:
- Adds unit coverage for catalog integrity, registry sync, helper
behavior, official env declarations, and peer dependency derivation.
- Extends docs integration coverage for `chat/adapters` imports and
vendor-official package install metadata.

Documentation:
- Documents the new catalog on the adapter overview page.
- Splits platform-specific adapter guidance into a new
`/docs/platform-adapters` page.
- Renames `/docs/state` to `/docs/state-adapters` and adds a redirect
for the old slug.

Agent Guidance:
- Updates repo-local and public agent guidance so agents know when and
how to use `chat/adapters`.
- Adds focused `AGENTS.md` guidance inside `packages/chat/src/adapters`
for future catalog maintenance.

---------

Co-authored-by: Ben Sabic <bensabic@users.noreply.github.com>
2026-06-09 10:43:00 +10:00
Vishal Yathish 171657a019 [chat] adding stable id to link button action handlers (#598)
Enabling overriding the `link:<url>` action ID for `LinkButton` events.
2026-06-08 08:36:24 -07:00
Ben Sabic 7ecb9730e3 chore(docs): add missing Twilio logo and add official platform adapter OG images (#589)
Adds official platform adapter branding across the docs site, npm
READMEs, and social previews.

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

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

Co-authored-by: Ben Sabic <bensabic@users.noreply.github.com>
2026-06-06 14:51:30 +10:00
YougLin-dev a924960747 docs: list QQ Bot community adapter (#583)
## Summary

- Add the QQ Bot community platform adapter to `apps/docs/adapters.json`
- Point the listing at the published npm package
`@youglin/adapter-qq-bot`
- Pin the rendered README to the adapter repository commit
`46e76e8e6965d5dc1ee1446bbea76feb23cf7733`

## Verification

- Parsed `apps/docs/adapters.json` and checked unique `slug` /
`packageName` values
- Verified the `readme` field is pinned to a 40-character commit SHA
- Verified GitHub API can fetch `README.md` at the pinned adapter commit
2026-06-05 22:50:28 +10:00
Ben Sabic 9921dcd1c4 docs(seo): improve npm metadata, README discoverability, and structured data (#587)
Improves Chat SDK discoverability across npm, READMEs, and the docs site
for search engines and AI coding agents.

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

---------

Co-authored-by: Ben Sabic <bensabic@users.noreply.github.com>
2026-06-05 14:00:18 +10:00
Ben Sabic c290464634 docs(adapters): promote Sendblue to vendor-official adapter (#584)
Moves the Sendblue adapter from community to vendor-official in the docs
site now that Sendblue maintains `chat-adapter-sendblue`.

- package: `chat-adapter-sendblue`
- repo: https://github.com/sendblue-api/chat-adapter-sendblue
- docs: https://docs.sendblue.com/guides/chat-sdk-adapter/

Updates the adapter registry and hand-authored detail page (iMessage,
SMS, RCS, `sb-signing-secret` webhook verification, official Sendblue
guide links). Reorders vendor-official adapters so Liveblocks, Resend,
Sendblue, and Zernio appear first. Adds a permanent redirect from
`/adapters/community/sendblue`.

Co-authored-by: Ben Sabic <bensabic@users.noreply.github.com>
2026-06-05 13:59:46 +10:00
Rodrigo Gaona 2fb8ad29cf docs(adapters): add Kapso WhatsApp adapter (#577)
## Summary

Adds [Kapso WhatsApp](https://docs.kapso.ai/) as a vendor-official
adapter in `adapters.json`.

Kapso is a WhatsApp adapter for Chat SDK that receives signed Kapso
webhooks, replies through Chat SDK threads, and supports WhatsApp-native
messaging features:

- **Text messages** — send and receive WhatsApp messages via Kapso
- **Buttons/cards** — Chat SDK card buttons render as WhatsApp reply
buttons
- **Media** — send and receive images, video, audio, documents, and
stickers
- **Reactions** — add/remove reactions and handle inbound reaction
events
- **History** — fetch Kapso-backed message, contact, and conversation
metadata
- **Webhook verification** — validates Kapso `X-Webhook-Signature`
deliveries

| Feature | Support |
| --- | --- |
| Send/receive text | Yes |
| Reply buttons | Yes, up to 3 |
| CTA URL buttons | Yes |
| Media attachments | Yes |
| Reactions | Yes |
| Message history | Yes |

- **Docs**: [docs.kapso.ai](https://docs.kapso.ai/)
- **npm**:
[`@kapso/chat-adapter`](https://www.npmjs.com/package/@kapso/chat-adapter)
- **GitHub**:
[`gokapso/chat-sdk-adapter`](https://github.com/gokapso/chat-sdk-adapter)
- **Blog**: https://kapso.ai/blog/chat-sdk-adapter
2026-06-04 22:12:04 +10:00
josh f40c4d4840 docs(chat): clarify isMe semantics for adapter authors (#582)
## summary

clarifies that `author.isMe` means the message was sent by the current
bot runtime and should be filtered from handler dispatch

documents that adapters backed by user-owned accounts should not map
platform fields like `fromMe` directly to `isMe`

recommends tracking message ids returned by `postMessage` so webhook
echoes can be identified without filtering legitimate user-authored
messages
2026-06-03 13:40:58 -07:00
Ben Sabic bdb00ed6dc feat(docs): add JSON-LD structured data to adapter pages (#576)
Adds Schema.org JSON-LD to every adapter detail page (official,
community, vendor-official):

- `SoftwareSourceCode` describing the package — name (package),
description (tagline), repository, `programmingLanguage: TypeScript`,
`runtimePlatform: Node.js`, and author (Vercel for official adapters,
the vendor/community author otherwise). License is only emitted for
official adapters; no fabricated ratings/offers.
- `BreadcrumbList` for the `Chat SDK › Adapters › <name>` hierarchy.

Built from existing frontmatter + `adapters.json` via a shared
`getAdapterJsonLd` helper, injected with the same `<script
type="application/ld+json">` pattern already used on the home page.
Primarily a classic-SEO/rich-result and entity-linking improvement,
complementing the markdown/llms.txt AEO work.

---------

Co-authored-by: Ben Sabic <bensabic@users.noreply.github.com>
2026-06-02 12:06:44 +10:00
Yoen Zhang f41e2e554c docs(adapters): add Velt as vendor-official adapter (#572)
## summary

adds Velt as a vendor-official adapter in the docs directory

`@veltdev/chat-sdk-adapter` connects a Chat SDK bot to Velt comment
threads on documents, text editors, and canvases. it maps Velt documents
to channels, comment annotations to threads, and comments to messages so
the rest of the Chat SDK API works unchanged

- package: `@veltdev/chat-sdk-adapter`
- repo: https://github.com/velt-js/velt-chat-sdk-adapter
- docs: https://velt.dev/docs/ai/chat-sdk-adapter

this updates the adapter registry, adds the Velt vendor-official detail
page, and includes the `velt` slug in the vendor-official adapter
metadata
2026-06-01 17:35:42 -07:00
Ben Sabic 5a72259fbc feat(docs): improve LLM/search discoverability of docs (#566)
SEO/AEO improvements for the docs site:

- Append `| Chat SDK` to every page's `<title>` and `og:title` (home
stays `Chat SDK`).
- Expose a plain-markdown version of every docs and adapter page via an
`sr-only` AI/LLM hint link and a `text/markdown` alternate; adapter
pages get a new `/adapters/<group>/<slug>.md` endpoint.
- Turn `llms.txt` into a sitemap-style index linking to each page's
markdown, and move the full-text concatenation to `llms-full.txt`. A
`<link rel="llms-txt">` is added to every page.

---------

Co-authored-by: Ben Sabic <bensabic@users.noreply.github.com>
2026-06-01 12:35:34 -07:00
Aamir Jawaid 6750dda955 docs: use stable Teams CLI package (#568)
## Summary
- Updates Teams setup docs to install `@microsoft/teams.cli` instead of
the old `@preview` tag.

## Why
- Teams CLI is stable now, so the docs should point folks at the stable
package. Nice and tidy.

## Interesting bits
- This touches both the public docs page and the adapter README so they
don't disagree.

## Test plan
- Not run; docs-only change.
2026-06-01 12:10:16 -07:00
Edgar ffc43fcf1f feat(whatsapp-adapter): Add typing indicator support (#320)
## Summary

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

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

## Test plan

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

---------

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

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

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

## Changes

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

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

## Vendor Official tier

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

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

## A note on source visibility

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

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

## Test plan

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

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

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

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

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

- **npm**:
[`@agentphone/chat-sdk-adapter`](https://www.npmjs.com/package/@agentphone/chat-sdk-adapter)
- **GitHub**:
[`AgentPhone-AI/chat-sdk-adapter`](https://github.com/AgentPhone-AI/chat-sdk-adapter)
- **Docs**: [docs.agentphone.ai](https://docs.agentphone.ai)
2026-05-29 12:03:10 +10:00
Ben Sabic 9b8d8c4518 Discoverability lift: link KB guides, broaden npm keywords, mirror to AGENTS.md (#560)
Broad SEO/AEO pass across the docs site, adapter READMEs and AGENTS.md
files, and npm package metadata so Chat SDK content shows up better in
search engines, in LLM-driven package recommendations, and in
IDE/coding-agent context.

**Docs site**

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

**Adapter packages**

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

**Resources registry**

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

**Drive-by fixes**

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

**Tooling / CI**

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

---------

Co-authored-by: Ben Sabic <bensabic@users.noreply.github.com>
2026-05-29 11:41:23 +10:00