Platform Adapters
Adapters connect external platforms to Zhin's common message and Endpoint model. Choose by deployment constraints first, then verify capabilities and support tier. A platform name alone is not enough.
Make the choice first
| Your constraint | Prefer | Representative adapters |
|---|---|---|
| Validate the product without a real account | Local Sandbox | Sandbox |
| The platform offers an official Bot or App API | Official connection | QQ Official, Discord, Telegram, Slack, DingTalk, Lark, WeChat MP |
| You already operate a protocol bridge | Gateway connection | OneBot v11; validate NapCat, Milky, and OneBot v12 yourself |
| Events originate in a collaboration system | Work-item connection | GitHub (Experimental) |
| The source is not instant chat | Non-chat source | Email (Experimental) |
Before choosing, confirm credential ownership, inbound delivery mode, required message or member operations, callback reachability, and whether the support tier meets your release bar.
Recommended connection flow
- Run
npx zhin setup --adaptersto select an adapter and generate configuration. - Run
pnpm installandpnpm dev; prove the Sandbox golden path first. - In Console, verify inbound traffic under Conversations and Channels, Endpoint operations under Runtime Capabilities, and failures under Logs.
- Add the real platform to the same business flow. Commands, components, and middleware should not read a private platform SDK.
Every @zhin.js/adapter-* package has its own page, synchronized with its package README.md. The tier and capability tables below are release facts, not rankings.
For framework-level concepts (multi-platform concurrency, message flow, endpoint lifecycle), see Core Concepts and Endpoint Lifecycle.
Tier SSOT:
scripts/adapter-meta.mjs(same source as docs/snippets/platform-tiers.md).
Tiers
| Tier | Meaning |
|---|---|
| Stable | Consistent with pnpm check:stable and minimal-bot |
| Platform Stable | Passes platform acceptance and remains in the check:stable Platform batch; see certified platforms below |
| Advanced | Commonly used by the test-bot maintainer kitchen sink (not a user template); has integration tests; graduation candidates enter Stable smoke before promotion |
| Experimental | Usability varies greatly by deployment; requires self-verification; does not mean untested, just no full CI / real-device guarantee |
Stable
| Adapter | Package | Endpoint Management Capabilities | Docs |
|---|---|---|---|
| Sandbox | @zhin.js/adapter-sandbox | — | Sandbox |
Platform Stable
(Currently none)
Advanced
| Adapter | Package | Endpoint Management Capabilities | Docs |
|---|---|---|---|
| DingTalk | @zhin.js/adapter-dingtalk | — | DingTalk |
| Lark | @zhin.js/adapter-lark | — | Lark |
| WeChat Official Account | @zhin.js/adapter-wechat-mp | — | WeChat Official Account |
| Discord | @zhin.js/adapter-discord | — | Discord |
| ICQQ (QQ) | @zhin.js/adapter-icqq | listFriends, listGroups, listChannels, listGroupMembers, approveRequest, rejectRequest, kickGroupMember, muteGroupMember, setGroupAdmin, deleteFriend | ICQQ (QQ) |
| KOOK | @zhin.js/adapter-kook | — | KOOK |
| OneBot v11 | @zhin.js/adapter-onebot11 | — | OneBot v11 |
| QQ Official | @zhin.js/adapter-qq | listChannels | QQ Official |
| Slack | @zhin.js/adapter-slack | — | Slack |
| Telegram | @zhin.js/adapter-telegram | — | Telegram |
Experimental
| Adapter | Package | Endpoint Management Capabilities | Docs |
|---|---|---|---|
| WeCom | @zhin.js/adapter-wecom | — | WeCom |
| WeChat iLink | @zhin.js/adapter-weixin-ilink | — | WeChat iLink |
@zhin.js/adapter-email | — | ||
| GitHub | @zhin.js/adapter-github | — | GitHub |
| LINE | @zhin.js/adapter-line | — | LINE |
| Milky | @zhin.js/adapter-milky | — | Milky |
| NapCat | @zhin.js/adapter-napcat | — | NapCat |
| OneBot v12 | @zhin.js/adapter-onebot12 | — | OneBot v12 |
| Satori | @zhin.js/adapter-satori | — | Satori |
Unified message operations
Every Endpoint declaring outbound supports sending. Additional message operations use the platform-neutral EndpointControl port and are declared precisely for each concrete Endpoint; Core never probes private platform SDK methods.
| Operation | Integrated platforms |
|---|---|
recall | Discord, ICQQ, KOOK, Lark, Milky, NapCat, OneBot 11/12, QQ Official, Satori, Slack, Telegram, WeCom |
edit | Slack |
reaction | Discord Gateway, ICQQ, Slack |
typing | Weixin iLink |
Connection modes of one adapter may expose different capabilities. For example, Discord Gateway supports reactions while Interactions mode declares recall only. Host and Console clients can read the concrete capability set from operations on each Endpoint row.
Maintenance Notes
- Single source of truth (tiers):
scripts/adapter-meta.mjs - Single source of truth (content):
plugins/adapters/<name>/README.md - Sync command: Run
pnpm sync:adapter-docsfrom the repository root - CI checks:
pnpm check:adapter-docs,pnpm check:platform-tiers-ssot
Source index: plugins/adapters/README.md