← VercelCONTENT HISTORY

Update to Vercel

Snapshot Sep 30, 2026 · 23:18 UTC · version 0.21.4

Collection source: not recorded for this historical snapshot. These snapshots do not have a confirmed matching collection source. Differences in file lists alone do not establish changes to the package.

WHAT CHANGED · RULE-BASED ANALYSIS

Supporting file metadata differs

Newly listed paths: agents/openai.yaml. This compares saved file lists, not package contents; a different collection source can change the list.

Observed in package metadata. These changes alone do not establish a new customer-facing feature.

Supporting files

Before

[]

After

[{"relative_path":"agents/openai.yaml","size_in_bytes":93}]

Compare saved observations

Download comparison JSON
Full technical diff · 1 changed fields

changed /included_files

BEFORE
[]
AFTER
[
  {
    "relative_path": "agents/openai.yaml",
    "size_in_bytes": 93
  }
]
Full snapshot data
{
  "name": "chat-sdk",
  "description": "Vercel Chat SDK expert guidance. Use when building multi-platform chat bots — Slack, Telegram, Microsoft Teams, Discord, Google Chat, GitHub, Linear — with a single codebase. Covers the Chat class, adapters, threads, messages, cards, modals, streaming, state management, and webhook setup.",
  "included_files": [
    {
      "relative_path": "agents/openai.yaml",
      "size_in_bytes": 93
    }
  ],
  "skill_md_contents": "---\nname: chat-sdk\ndescription: Vercel Chat SDK expert guidance. Use when building multi-platform chat bots — Slack, Telegram, Microsoft Teams, Discord, Google Chat, GitHub, Linear — with a single codebase. Covers the Chat class, adapters, threads, messages, cards, modals, streaming, state management, and webhook setup.\nmetadata:\n  priority: 8\n  docs:\n    - \"https://sdk.vercel.ai/docs/ai-sdk-ui/chatbot\"\n    - \"https://github.com/vercel/ai-chatbot\"\n  sitemap: \"https://sdk.vercel.ai/sitemap.xml\"\n  pathPatterns:\n    - \"app/api/chat/**\"\n    - \"app/api/chat-bot/**\"\n    - \"app/api/bot/**\"\n    - \"app/api/slack/**\"\n    - \"app/api/teams/**\"\n    - \"app/api/discord/**\"\n    - \"app/api/gchat/**\"\n    - \"app/api/telegram/**\"\n    - \"app/api/github-bot/**\"\n    - \"app/api/linear-bot/**\"\n    - \"app/api/webhooks/slack/**\"\n    - \"app/api/webhooks/teams/**\"\n    - \"app/api/webhooks/discord/**\"\n    - \"app/api/webhooks/gchat/**\"\n    - \"app/api/webhooks/telegram/**\"\n    - \"app/api/webhooks/github/**\"\n    - \"app/api/webhooks/linear/**\"\n    - \"src/app/api/chat/**\"\n    - \"src/app/api/chat-bot/**\"\n    - \"src/app/api/bot/**\"\n    - \"src/app/api/slack/**\"\n    - \"src/app/api/teams/**\"\n    - \"src/app/api/discord/**\"\n    - \"src/app/api/gchat/**\"\n    - \"src/app/api/telegram/**\"\n    - \"lib/bot.*\"\n    - \"lib/bot/**\"\n    - \"src/lib/bot.*\"\n    - \"src/lib/bot/**\"\n    - \"lib/chat-bot/**\"\n    - \"src/lib/chat-bot/**\"\n    - \"bot/**\"\n    - \"pages/api/bot.*\"\n    - \"pages/api/bot/**\"\n    - \"src/pages/api/bot.*\"\n    - \"src/pages/api/bot/**\"\n    - \"tests/**/bot*\"\n    - \"test/**/bot*\"\n    - \"fixtures/replay/**\"\n    - \"apps/*/app/api/bot/**\"\n    - \"apps/*/app/api/slack/**\"\n    - \"apps/*/app/api/teams/**\"\n    - \"apps/*/app/api/discord/**\"\n    - \"apps/*/lib/bot/**\"\n    - \"apps/*/src/lib/bot/**\"\n  importPatterns:\n    - \"chat\"\n    - \"@chat-adapter/*\"\n  bashPatterns:\n    - '\\bnpm\\s+(install|i|add)\\s+[^\\n]*\\bchat\\b'\n    - '\\bpnpm\\s+(install|i|add)\\s+[^\\n]*\\bchat\\b'\n    - '\\bbun\\s+(install|i|add)\\s+[^\\n]*\\bchat\\b'\n    - '\\byarn\\s+add\\s+[^\\n]*\\bchat\\b'\n    - '\\bnpm\\s+(install|i|add)\\s+[^\\n]*@chat-adapter/'\n    - '\\bpnpm\\s+(install|i|add)\\s+[^\\n]*@chat-adapter/'\n    - '\\bbun\\s+(install|i|add)\\s+[^\\n]*@chat-adapter/'\n    - '\\byarn\\s+add\\s+[^\\n]*@chat-adapter/'\n    - '\\bnpm\\s+(install|i|add)\\s+[^\\n]*@chat-adapter/telegram'\n    - '\\bpnpm\\s+(install|i|add)\\s+[^\\n]*@chat-adapter/telegram'\n    - '\\bbun\\s+(install|i|add)\\s+[^\\n]*@chat-adapter/telegram'\n    - '\\byarn\\s+add\\s+[^\\n]*@chat-adapter/telegram'\n  promptSignals:\n    phrases:\n      - \"chat sdk\"\n      - \"chat bot\"\n      - \"chatbot\"\n      - \"conversational interface\"\n      - \"slack bot\"\n      - \"telegram bot\"\n      - \"discord bot\"\n      - \"teams bot\"\n    allOf:\n      - [bot, platform]\n      - [bot, multi]\n    anyOf:\n      - \"onNewMention\"\n      - \"onSubscribedMessage\"\n      - \"chat adapter\"\n      - \"cross-platform bot\"\n    noneOf:\n      - \"useChat\"\n    minScore: 6\n---\n\n# Chat SDK\n\nUnified TypeScript SDK for building chat bots across Slack, Teams, Google Chat, Discord, Telegram, GitHub, Linear, and WhatsApp. Write bot logic once, deploy everywhere.\n\n## Start with published sources\n\nWhen Chat SDK is installed in a user project, inspect the published files that ship in `node_modules`:\n\n```\nnode_modules/chat/docs/                    # bundled docs\nnode_modules/chat/dist/index.d.ts          # core API types\nnode_modules/chat/dist/jsx-runtime.d.ts    # JSX runtime types\nnode_modules/chat/docs/contributing/       # adapter-authoring docs\nnode_modules/chat/docs/guides/             # framework/platform guides\n```\n\nIf one of the paths below does not exist, that package is not installed in the project yet.\n\nRead these before writing code:\n- `node_modules/chat/docs/getting-started.mdx` — install and setup\n- `node_modules/chat/docs/usage.mdx` — `Chat` config and lifecycle\n- `node_modules/chat/docs/handling-events.mdx` — event routing and handlers\n- `node_modules/chat/docs/threads-messages-channels.mdx` — thread/channel/message model\n- `node_modules/chat/docs/posting-messages.mdx` — post, edit, delete, schedule\n- `node_modules/chat/docs/streaming.mdx` — AI SDK integration and streaming semantics\n- `node_modules/chat/docs/cards.mdx` — JSX cards\n- `node_modules/chat/docs/actions.mdx` — button/select interactions\n- `node_modules/chat/docs/modals.mdx` — modal submit/close flows\n- `node_modules/chat/docs/slash-commands.mdx` — slash command routing\n- `node_modules/chat/docs/direct-messages.mdx` — DM behavior and `openDM()`\n- `node_modules/chat/docs/files.mdx` — attachments/uploads\n- `node_modules/chat/docs/state.mdx` — persistence, locking, dedupe\n- `node_modules/chat/docs/adapters.mdx` — cross-platform feature matrix\n- `node_modules/chat/docs/api/chat.mdx` — exact `Chat` API\n- `node_modules/chat/docs/api/thread.mdx` — exact `Thread` API\n- `node_modules/chat/docs/api/message.mdx` — exact `Message` API\n- `node_modules/chat/docs/api/modals.mdx` — modal element and event details\n\nFor the specific adapter or state package you are using, inspect that installed package's `dist/index.d.ts` export surface in `node_modules`.\n\n## Quick start\n\n```typescript\nimport { Chat } from \"chat\";\nimport { createSlackAdapter } from \"@chat-adapter/slack\";\nimport { createRedisState } from \"@chat-adapter/state-redis\";\n\nconst bot = new Chat({\n  userName: \"mybot\",\n  adapters: {\n    slack: createSlackAdapter(),\n  },\n  state: createRedisState(),\n  dedupeTtlMs: 600_000,\n});\n\nbot.onNewMention(async (thread) => {\n  await thread.subscribe();\n  await thread.post(\"Hello! I'm listening to this thread.\");\n});\n\nbot.onSubscribedMessage(async (thread, message) => {\n  await thread.post(`You said: ${message.text}`);\n});\n```\n\n## Core concepts\n\n- **Chat** — main entry point; coordinates adapters, routing, locks, and state\n- **Adapters** — platform-specific integrations for Slack, Teams, Google Chat, Discord, Telegram, GitHub, Linear, and WhatsApp\n- **State adapters** — persistence for subscriptions, locks, dedupe, and thread state\n- **Thread** — conversation context with `post()`, `stream()`, `subscribe()`, `setState()`, `startTyping()`\n- **Message** — normalized content with `text`, `formatted`, attachments, author info, and platform `raw`\n- **Channel** — container for threads and top-level posts\n\n## Event handlers\n\n| Handler | Trigger |\n|---------|---------|\n| `onNewMention` | Bot @-mentioned in an unsubscribed thread |\n| `onDirectMessage` | New DM in an unsubscribed DM thread |\n| `onSubscribedMessage` | Any message in a subscribed thread |\n| `onNewMessage(regex)` | Regex match in an unsubscribed thread |\n| `onReaction(emojis?)` | Emoji added or removed |\n| `onAction(actionIds?)` | Button clicks and select/radio interactions |\n| `onModalSubmit(callbackId?)` | Modal form submitted |\n| `onModalClose(callbackId?)` | Modal dismissed/cancelled |\n| `onSlashCommand(commands?)` | Slash command invocation |\n| `onAssistantThreadStarted` | Slack assistant thread opened |\n| `onAssistantContextChanged` | Slack assistant context changed |\n| `onAppHomeOpened` | Slack App Home opened |\n| `onMemberJoinedChannel` | Slack member joined channel event |\n\nRead `node_modules/chat/docs/handling-events.mdx`, `node_modules/chat/docs/actions.mdx`, `node_modules/chat/docs/modals.mdx`, and `node_modules/chat/docs/slash-commands.mdx` before wiring handlers. `onDirectMessage` behavior is documented in `node_modules/chat/docs/direct-messages.mdx`.\n\n## Streaming\n\nPass any `AsyncIterable<string>` to `thread.post()` or `thread.stream()`. For AI SDK, prefer `result.fullStream` over `result.textStream` when available so step boundaries are preserved.\n\n```typescript\nimport { ToolLoopAgent } from \"ai\";\n\nconst agent = new ToolLoopAgent({ model: \"anthropic/claude-4.5-sonnet\" });\n\nbot.onNewMention(async (thread, message) => {\n  const result = await agent.stream({ prompt: message.text });\n  await thread.post(result.fullStream);\n});\n```\n\nKey details:\n- `streamingUpdateIntervalMs` controls post+edit fallback cadence\n- `fallbackStreamingPlaceholderText` defaults to `\"...\"`; set `null` to disable\n- Structured `StreamChunk` support is Slack-only; other adapters ignore non-text chunks\n\n## Cards and modals (JSX)\n\nSet `jsxImportSource: \"chat\"` in `tsconfig.json`.\n\nCard components:\n- `Card`, `CardText`, `Section`, `Fields`, `Field`, `Button`, `CardLink`, `LinkButton`, `Actions`, `Select`, `SelectOption`, `RadioSelect`, `Table`, `Image`, `Divider`\n\nModal components:\n- `Modal`, `TextInput`, `Select`, `SelectOption`, `RadioSelect`\n\n```tsx\nawait thread.post(\n  <Card title=\"Order #1234\">\n    <CardText>Your order has been received.</CardText>\n    <Actions>\n      <Button id=\"approve\" style=\"primary\">Approve</Button>\n      <Button id=\"reject\" style=\"danger\">Reject</Button>\n    </Actions>\n  </Card>\n);\n```\n\n## Adapter inventory\n\n### Official platform adapters\n\n| Platform | Package | Factory |\n|---------|---------|---------|\n| Slack | `@chat-adapter/slack` | `createSlackAdapter` |\n| Microsoft Teams | `@chat-adapter/teams` | `createTeamsAdapter` |\n| Google Chat | `@chat-adapter/gchat` | `createGoogleChatAdapter` |\n| Discord | `@chat-adapter/discord` | `createDiscordAdapter` |\n| GitHub | `@chat-adapter/github` | `createGitHubAdapter` |\n| Linear | `@chat-adapter/linear` | `createLinearAdapter` |\n| Telegram | `@chat-adapter/telegram` | `createTelegramAdapter` |\n| WhatsApp Business Cloud | `@chat-adapter/whatsapp` | `createWhatsAppAdapter` |\n\n### Official state adapters\n\n| State backend | Package | Factory |\n|--------------|---------|---------|\n| Redis | `@chat-adapter/state-redis` | `createRedisState` |\n| ioredis | `@chat-adapter/state-ioredis` | `createIoRedisState` |\n| PostgreSQL | `@chat-adapter/state-pg` | `createPostgresState` |\n| Memory | `@chat-adapter/state-memory` | `createMemoryState` |\n\n### Community adapters\n\n- `chat-state-cloudflare-do`\n- `@beeper/chat-adapter-matrix`\n- `chat-adapter-imessage`\n- `@bitbasti/chat-adapter-webex`\n- `@resend/chat-sdk-adapter`\n- `chat-adapter-baileys`\n\n### Coming-soon platform entries\n\n- Instagram\n- Signal\n- X\n- Messenger\n\n## Building a custom adapter\n\nRead these published docs first:\n- `node_modules/chat/docs/contributing/building.mdx`\n- `node_modules/chat/docs/contributing/testing.mdx`\n- `node_modules/chat/docs/contributing/publishing.mdx`\n\nAlso inspect:\n- `node_modules/chat/dist/index.d.ts` — `Adapter` and related interfaces\n- `node_modules/@chat-adapter/shared/dist/index.d.ts` — shared errors and utilities\n- Installed official adapter `dist/index.d.ts` files — reference implementations for config and APIs\n\nA custom adapter needs request verification, webhook parsing, message/thread/channel operations, ID encoding/decoding, and a format converter. Use `BaseFormatConverter` from `chat` and shared utilities from `@chat-adapter/shared`.\n\n## Webhook setup\n\nEach registered adapter exposes `bot.webhooks.<name>`. Wire those directly to your HTTP framework routes. See `node_modules/chat/docs/guides/slack-nextjs.mdx` and `node_modules/chat/docs/guides/discord-nuxt.mdx` for framework-specific route patterns.\n"
}

SHA-256: fa872a8ce5032c4bd56a0e2fde6c0db5f27721656769bb708ed0c1f38301a68a