Ben Sabic 1bdbc31039 chore: integrate commitlint to enforce Conventional Commits
- Add @commitlint/cli and @commitlint/config-conventional (pinned to 21.0.0)
  and husky as root devDependencies.
- commitlint.config.js extends config-conventional, allows free-form scopes,
  and ignores auto-generated Merge / Revert commits.
- .husky/commit-msg runs commitlint on every local commit; husky installs
  automatically via the `prepare` script on `pnpm install`.
- New `commitlint` CI job in .github/workflows/ci.yml lints PR commits
  (--from base.sha --to head.sha) and the most recent commit on direct
  pushes to main (--last). SHAs are passed via `env:` rather than direct
  `${{ … }}` interpolation to avoid the script-injection class of bug.
- CI uses `pnpm install --frozen-lockfile`, so the commitlint binary that
  runs is exactly the version pinned in pnpm-lock.yaml.
- .github/CONTRIBUTING.md documents the local hook + CI enforcement.
2026-05-12 21:56:44 +10:00
2026-05-02 08:37:45 -07:00
2026-03-02 13:10:22 -08:00
2026-01-02 14:20:41 -08:00
2026-02-16 16:41:46 -08:00
2025-12-21 20:48:14 -08:00

Chat SDK

npm version npm downloads License: MIT

A unified TypeScript SDK for building chat bots across Slack, Microsoft Teams, Google Chat, Discord, Telegram, GitHub, Linear, and WhatsApp. Write your bot logic once, deploy everywhere.

Installation

npm install chat

Install adapters for your platforms:

npm install @chat-adapter/slack @chat-adapter/teams @chat-adapter/gchat @chat-adapter/discord @chat-adapter/telegram

Usage

import { Chat } from "chat";
import { createSlackAdapter } from "@chat-adapter/slack";
import { createRedisState } from "@chat-adapter/state-redis";

const bot = new Chat({
  userName: "mybot",
  adapters: {
    slack: createSlackAdapter(),
  },
  state: createRedisState(),
});

bot.onNewMention(async (thread) => {
  await thread.subscribe();
  await thread.post("Hello! I'm listening to this thread.");
});

bot.onSubscribedMessage(async (thread, message) => {
  await thread.post(`You said: ${message.text}`);
});

See the Getting Started guide for a full walkthrough.

Adapters

Browse official, vendor-official, and community adapters on chat-sdk.dev/adapters. A cross-platform feature matrix is available at chat-sdk.dev/docs/adapters.

Features

  • Event handlers — mentions, messages, reactions, button clicks, slash commands, modals
  • AI streaming — stream LLM responses with native Slack streaming and post+edit fallback
  • Cards — JSX-based interactive cards (Block Kit, Adaptive Cards, Google Chat Cards)
  • Actions — handle button clicks and dropdown selections
  • Modals — form dialogs with text inputs, dropdowns, and validation
  • Slash commands — handle /command invocations
  • Emoji — type-safe, cross-platform emoji with custom emoji support
  • File uploads — send and receive file attachments
  • Direct messages — initiate DMs programmatically
  • Ephemeral messages — user-only visible messages with DM fallback
  • Overlapping messages — queue, debounce, drop, or process concurrent messages on the same thread

AI coding agent support

If you use an AI coding agent like Claude Code, you can teach it about Chat SDK:

npx skills add vercel/chat

Documentation

Full documentation is available at chat-sdk.dev/docs.

Contributing

See CONTRIBUTING.md for development setup and the release process.

Support

For help or questions, see SUPPORT.md. To report a security vulnerability, see SECURITY.md.

License

MIT

S
Description
Build multi-platform chat bots with Chat SDK (chat npm package). Use when developers want to scaffold a bot with create-chat-sdk, build a Slack, Teams,…
Readme MIT 23 MiB
Languages
TypeScript 89%
MDX 10.9%