IM Adapters
IM Registry Pattern
All IM adapters implement the IMModule interface:
reply— Send text responsesendProgress— Stream progress updatessendBlocks— Send structured contentsendImage/sendFile— Media deliverystart/stop— Lifecycle managementgetCapabilities()— Declare supported features
Adding a New Adapter
registerIM("newplatform", newPlatformFactory);That’s it. No changes to the Bot constructor needed.
Supported Adapters
| Adapter | Connection | Capabilities |
|---|---|---|
| Feishu | WebSocket persistent | Text, cards, files, images, audio, buttons |
| Telegram | Long polling | Text, files, images, audio |
| WeCom | WebSocket + QR binding | Text, files, images |
| HTTP long-poll + QR auth | Text, images, files, voice (AES-128-ECB) |