GitShow/vercel/chat
vercel

chat

A unified TypeScript SDK for building chat bots across Slack, Microsoft Teams, Google Chat, Discord, and more.

by vercel
aichatdiscordgoogle-chatslackteamsvercel
Star on GitHubForkWebsitenpm

TypeScript

2.3k stars282 forks105 contributorsActive · 6h agoSince 2025@chat-adapter/tests@4.37.0MIT

Meet the team

See all 105 on GitHub →
cramforce
cramforce206 contributions
haydenbleasel
haydenbleasel138 contributions
bensabic
bensabic94 contributions
dancer
dancer60 contributions
github-actions[bot]Bot
github-actions[bot]52 contributions
dependabot[bot]Bot
dependabot[bot]45 contributions
nandorojo
nandorojo40 contributions
visyat
visyat36 contributions

Languages

View on GitHub →
TypeScript89%
MDX10.9%
CSS0.1%
JavaScript0%

Commit activity

Last 12 weeks · 203 commits

Full graph →

Community health

5 of 6 standards met

Community profile →
87
✓README✓License✓Contributing✓Code of Conduct○Issue Template✓PR Template

Recent PRs & issues

Active · Last activity 6h ago
See all on GitHub →
dancer
feat(x): add setup helpers and remove classic direct messagesOpenPR

summary remove classic direct message support from the base X adapter and direct users to the XChat adapter at add the subpath for one-time webhook registration and Activity API subscription management support OAuth 1.0a signing with query and form-encoded parameters, with OAuth 2.0 user-context fallback for subscription creation keep the adapter runtime on OAuth 2.0 and make the bot user ID optional until an operation such as liking requires it update package metadata, the adapter catalog, feature tables, setup guidance, and the historical DM payload note test plan build and run the X adapter test suite typecheck , , and run the adapter integration suite run Ultracite on affected source files and run Konsistent build the documentation site verify the package contains and exports verify captured JSON payloads in remain unchanged

dancer · 9h ago
hamchowderr
Discord: reactions on a thread's starter message 404 (mirror of #130)OpenIssue

Bug Description / 404 with (10008) when the target is a thread's starter message — the message a thread was created from. This is the mirror image of #130. That issue was about messages genuinely inside a thread being sent to the parent channel, and its fix () is correct for that case. But it is wrong for the starter message, which lives in the parent channel, not inside the thread. Discord gives a message-started thread an id equal to the starter message's id. The adapter already relies on this — returns when Discord reports 160004 ("thread already exists"). So for the starter message, , and the request becomes: Steps to Reproduce 1. Bot receives an @mention in a channel (not already in a thread). 2. The adapter creates a thread from that message ( → , unconditional when ). 3. Call to acknowledge the mention. 4. Discord returns 404 . Because step 2 is unconditional for channel mentions, any consumer that acknowledges a mention with a reaction hits this on the primary path. DMs are unaffected (no thread is created). Expected Behavior Reacting to a thread's starter message should target the parent channel, since that is where the message lives. Actual Behavior and always target , which for the starter message is the thread — a channel the message is not in. Suggested Fix The starter message is identifiable without an extra API call, because its id equals the thread id: A fallback would also work (retry against on a 10008), but the id comparison avoids the wasted round-trip. has the same shape and presumably the same issue, though I have not exercised that path. Versions Reproduced by inspection on ; is byte-identical in (current release), so it is still present. Notes Impact depends on the consumer. In our case (a Mastra ) the framework suppresses tool errors from its own channel tools, so the agent's reply still posts and the only visible effect is the missing reaction plus a logged 404. A consumer that awaits in its own reply path would see the throw propagate. Platform Adapter Discord

hamchowderr · 11h ago

Recent fixes

View closed PRs →
bensabic
docs: add cross-link card sections and page-level SEO metadataMergedPR

Many docs pages are orphaned: nothing links to them apart from the sidebar, so readers and crawlers rarely find them. This PR gives every docs page a Read more section with four cards at the bottom of the article, above the prev/next footer. Cards are picked deterministically in lib/read-more.ts: the page's related frontmatter first, then prerequisites, then siblings from the same sidebar section, then the rest of the page tree, so every page always fills all four slots. Card titles and descriptions come from the target page's own frontmatter, nothing is duplicated. The section is injected through the MDX wrapper slot in the docs route, so it applies to all pages without touching content. To make the links topical rather than positional, 26 pages get related frontmatter additions. The 20 pages that no other page referenced (all ten api/ pages among them) now each have at least one inbound link, generally pairing guides with their API reference and back. The bundled copy of create-chat-sdk.mdx is synced to keep the byte-match test green. Official adapter pages get the same treatment with a More adapters section: same-type adapters first (platform or state, using the catalog order), topped up from the other official group. Vendor-official and community adapters are never shown, and their pages don't render the section. It reuses AdapterCard, so logos and package names match the listing page. Two small SEO fixes ride along. JSON-LD was allowlisted to three docs pages; the allowlist is gone, so all 45 now emit HowTo or TechArticle plus a BreadcrumbList. Docs and adapter detail pages also emit canonical URLs now, resolved against the existing metadataBase. Verified against the production build: all 45 docs pages and all 19 official adapter pages render exactly four cards, no page is left unreferenced, canonicals and JSON-LD are present everywhere, and pnpm validate passes. Docs-only, so no changeset.

bensabic · 6h ago
bensabic
Add Vercel Connect support to DiscordMergedPR

Adds function-backed Discord bot token and application ID resolvers, plus custom webhook verification for Vercel Connect trigger-forwarded interactions. Native Discord Ed25519 verification remains the default when no custom verifier is configured. now recognizes Discord as Connect-capable, generates instead of native credential variables, and preserves for Gateway forwarding: Validated with the Discord adapter suite (284 tests), create-chat-sdk suite (206 tests), package type checks/builds, and repository lint/format checks.

bensabic · 6h ago
bryan-hunter
fix(workflow): isolate chat serializers from node runtimeMergedPR

Failure Workflow SDK produces an invalid workflow bundle when a Chat SDK serializable class such as , , or crosses a workflow step boundary. The Workflow compiler imports the emitted module containing each class to register its methods. In Chat SDK , tsup emits those classes in . The root entry also imports the conversation-scoping implementation added in #751, which uses from . Serializer registration therefore pulls Node-only code into the sandboxed workflow bundle before any workflow or step executes. Build warning: Deployed workflows then fail during module initialization: Minimal reproduction Running on emits the warning; deploying the output produces the runtime failure above. Fix Add a dedicated package entry for , , , , and their serialized DTO types. Make serializer code a second tsup entry and explicitly enable splitting. The serializer-bearing classes are now emitted into a shared chunk with no dependency on or its Node-only conversation context. Preserve the existing root exports and automatic behavior. Existing workflow code remains valid. Add a post-build module-graph assertion that fails if any emitted serializer registration can transitively import a Node.js builtin. Test against Workflow SDK , the compiler version that exposed the invalid bundle. Add a minor changeset for the fixed-version Chat SDK packages, producing the release line. After the change, the emitted serializer classes live in a sandbox-safe shared chunk while remains in a separate Node runtime chunk. The exact reproduction compiles successfully with and no Serde warning. Control cases The failure requires a serializable Chat class to cross a durable boundary. These cases were already safe and remain unchanged: used entirely inside a function. A Chat created and consumed within one step while returning plain data. Request handlers that convert Chat objects to plain workflow DTOs before starting a workflow. used entirely inside a step. Validation Committed beta.40 reproduction fixture: type-correct and compiled during every Chat package build with no Node builtin / Serde warning. Emitted serializer module graph: no transitive Node.js builtins. Chat package: 1,113 tests pass. Chat package typecheck passes. Repository formatting and lint checks pass. Package build passes. Full repository validation reaches the pre-existing baseline and reports unrelated unused dependencies and unlisted binaries in examples and adapter packages.

bryan-hunter · 14h ago
Structured data for AI agents

Repository: vercel/chat. Description: A unified TypeScript SDK for building chat bots across Slack, Microsoft Teams, Google Chat, Discord, and more. Stars: 2276, Forks: 282. Primary language: TypeScript. Languages: TypeScript (89%), MDX (10.9%), CSS (0.1%), JavaScript (0%). License: MIT. Homepage: https://chat-sdk.dev/ Topics: ai, chat, discord, google-chat, slack, teams, vercel. Latest release: @chat-adapter/tests@4.37.0 (3d ago). Open PRs: 12, open issues: 24. Last activity: 6h ago. Community health: 87%. Top contributors: cramforce, haydenbleasel, bensabic, dancer, github-actions[bot], dependabot[bot], nandorojo, visyat, JohnPhamous, onmax and others.

·@ofershap

Replace github.com with gitshow.dev