Compatibility and versioning
This page lists every Ha Tang SDK with its current version, the range that still gets fixes, the chat protocol version it speaks and the platforms it runs on. The table is generated from sdks/compat.json in the Ha Tang repository, the single source for these numbers; the "Current" column is read from each package's manifest when the docs are built.
Support matrix
Every SDK below speaks chat protocol version 1. The gateway ships monthly (YYYY.MM); "Min gateway" is the oldest gateway the listed SDK versions were tested against.
| SDK | Package | Status | Current | Supported | Protocol | Min gateway | Platforms |
|---|---|---|---|---|---|---|---|
| widget.js | chat.hatang.dev/widget.js | Stable | — | always current (served by the gateway) | 1 | 2026.10 | Browsers with ES2020 (Chrome 80+, Safari 14+, Firefox 78+, Edge 80+) |
| @hatang/chat-react | npm: @hatang/chat-react | Stable | 0.1.2 | 0.1.x | 1 | 2026.10 | React 18+; Next.js 14+ (App Router and Pages) |
| @hatang/sdk | npm: @hatang/sdk | Stable | 0.6.2 | 0.6.x | 1 | 2026.10 | Node 20+; Bun 1.1+; Edge runtimes with fetch (User-Agent reports node/unknown) |
| hatang (Python) | PyPI: hatang | Stable | 0.1.1 | 0.1.x | 1 | 2026.10 | Python 3.9+ (sync and asyncio, httpx) |
| hatang_chat (Flutter) | pub.dev: hatang_chat | Stable | 0.6.1 | 0.6.x | 1 | 2026.10 | Flutter 3.32+; Dart 3.8+; iOS 15+; Android 6.0 (API 23)+; macOS 11+; Web; Windows 10+; Linux (secure storage falls back to preferences) |
| @hatang/chat-react-native | npm: @hatang/chat-react-native | Stable | 0.4.2 | 0.4.x | 1 | 2026.10 | React Native 0.76+; Expo SDK 52+ |
| iOS (Swift) | GitHub: sota-labs/hatang-chat-ios | Stable | 0.4.1 | 0.4.x | 1 | 2026.10 | iOS 17+; Swift 6 / Xcode 16+; SwiftUI and UIKit (HatangChatViewController) |
| Android (Kotlin) | Maven Central: dev.hatang:chat | Stable | 0.4.1 | 0.4.x | 1 | 2026.10 | Android 8+ (API 26); Kotlin 1.9+ / 2.x; Jetpack Compose (BOM 2024.12+); View-based apps open the chat through HatangChat.open |
| WordPress plugin | WordPress.org: hatang-chat | Stable | 0.2.3 | 0.2.x | 1 | 2026.10 | WordPress 6.0+; PHP 7.4+ |
Versioning
- Each package has its own version. Every SDK follows semantic versioning and keeps its own changelog. Releases are tagged
<package>-v<version>:sdk-v*,chat-react-v*,chat-react-native-v*,flutter-v*,ios-v*,android-v*andwp-plugin-v*. - Before 1.0, a minor version can change the API. All SDKs are 0.x today. A new minor version (0.4 to 0.5, say) may contain breaking changes, and its changelog says what changed and how to migrate. The "Supported" column moves to the new minor when it ships.
- Conformance before release. Every chat SDK replays the same scenarios (C01–C12: bootstrap with an app key, auth, send and dedupe, resume and history, identify and merge, typing and read receipts, uploads, status and rating, reconnect, protocol outdated, cards, devices and app state) against a real gateway. A release needs a green run, and the suite also runs nightly.
- Security. Report vulnerabilities to [email protected]. No client SDK contains a secret: the identity secret only ever appears in server-side HMAC code.
Protocol versions
| Protocol | Introduced | Gateway | Notes |
|---|---|---|---|
| 1 | 2026-10 | 2026.10+ | First stable protocol: auth → ready, send → ack, resume by seq, identify and session merge, typing, read receipts, uploads, cards, device registration |
Clients should ignore what they do not know: unknown conversation event types are skipped, and a card with an unknown metadata.kind is shown as a plain message. When a gateway no longer serves a client's protocol, it closes the socket with code 4004 and every SDK reports an "update required" error (conformance scenario C10). Frame details are in Realtime protocol.
Platforms
| SDK | Minimum |
|---|---|
@hatang/sdk | Node 20, Bun 1.1, or an edge runtime with fetch |
@hatang/chat-react | React 18, Next.js 14 |
hatang_chat (Flutter) | Flutter 3.32 / Dart 3.8; apps on iOS 15 and Android 6.0 (API 23) |
@hatang/chat-react-native | React Native 0.76, Expo SDK 52 |
| iOS (Swift) | iOS 17, Swift 6 / Xcode 16 |
| Android (Kotlin) | Android 8.0 (API 26), Kotlin 1.9, Compose BOM 2024.12 |
| WordPress plugin | WordPress 6.0, PHP 7.4 |
Next steps
- SDK overview: what each SDK does.
- Realtime protocol: frames, close codes and limits.
- Push notifications: the setup every mobile SDK shares.