@wu529778790/open-im 1.9.4-beta.9 → 1.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,24 +1,25 @@
1
1
  # open-im
2
2
 
3
- [中文](./README.zh-CN.md)
3
+ [中文文档](./README.zh-CN.md)
4
4
 
5
- Multi-platform IM bridge for AI CLI tools. Connect Telegram, Feishu, WeCom, DingTalk, QQ, and WeChat to Claude Code, Codex, and CodeBuddy so you can use your coding assistant remotely from a phone or chat window.
5
+ Multi-platform IM bridge for AI CLI tools. Connect Telegram, Feishu, WeCom, DingTalk, QQ, and WeChat to Claude Code, Codex, and CodeBuddy use your AI coding assistant from any phone or chat window.
6
6
 
7
7
  ## Features
8
8
 
9
- - Multi-platform support: Telegram, Feishu, WeCom, DingTalk, QQ, and WeChat (WorkBuddy), with multiple platforms enabled at the same time
10
- - Multiple AI tools: Claude, Codex, and CodeBuddy
11
- - Per-platform AI routing: each IM platform can use a different AI tool, with `aiCommand` as the global default and `platforms.<name>.aiCommand` as the override
12
- - Streaming replies: relay AI output and tool execution progress in real time (DingTalk streaming is not fully supported yet)
13
- - Graphical configuration page and CLI setup flow
14
- - Isolated sessions: each user gets an independent local session, and `/new` resets it
15
- - Built-in commands: `/help`, `/new`, `/cd`, `/pwd`, `/status`
9
+ - **6 IM platforms** — Telegram, Feishu, WeCom, DingTalk, QQ, WeChat (WorkBuddy), all can run simultaneously
10
+ - **3 AI backends** Claude (Agent SDK), Codex, CodeBuddy
11
+ - **Per-platform AI routing** each IM can use a different AI tool
12
+ - **Streaming replies** real-time AI output and tool progress (platform-dependent)
13
+ - **Media support** send images, files, voice, video for AI analysis
14
+ - **Session isolation** independent sessions per user, `/new` to reset
15
+ - **Web config UI** graphical dashboard for setup and management
16
+ - **Built-in commands** — `/help`, `/new`, `/cd`, `/pwd`, `/status`, `/allow`, `/deny`
16
17
 
17
18
  ## Requirements
18
19
 
19
20
  - Node.js >= 20
20
21
  - At least one IM platform configured
21
- - Authentication completed for the AI tool you want to use
22
+ - Authentication for the AI tool you want to use
22
23
 
23
24
  ## Quick Start
24
25
 
@@ -33,114 +34,95 @@ npm install -g @wu529778790/open-im
33
34
  open-im start
34
35
  ```
35
36
 
36
- The config file is stored at `~/.open-im/config.json` by default.
37
+ Config file: `~/.open-im/config.json`
37
38
 
38
39
  ## CLI Commands
39
40
 
40
- | Command | Description |
41
- | ----------------- | ---------------------------------------------------------------- |
42
- | `open-im init` | Initialize or append configuration without starting the service |
43
- | `open-im start` | Run the service in the background |
44
- | `open-im stop` | Stop the background service |
45
- | `open-im dev` | Run in the foreground for development/debugging |
46
- | `open-im dashboard` | Run only the config web UI (no bridge) |
41
+ | Command | Description |
42
+ | ------------------- | -------------------------------------- |
43
+ | `open-im init` | Configure without starting the service |
44
+ | `open-im start` | Run as background service |
45
+ | `open-im stop` | Stop background service |
46
+ | `open-im dev` | Run in foreground (debugging) |
47
+ | `open-im dashboard` | Web config UI only (no bridge) |
47
48
 
48
- ## Server Deployment & Config Page
49
+ ## Web Configuration
49
50
 
50
- ### Local (with browser)
51
+ ### Local
51
52
 
52
- Open the config page at [`http://127.0.0.1:39282`](http://127.0.0.1:39282) (or the URL shown after `open-im start`). The page includes:
53
+ Open [`http://127.0.0.1:39282`](http://127.0.0.1:39282) after starting. The dashboard includes:
53
54
 
54
- - **Dashboard** Configured / Enabled platform count and service status (Idle or Running)
55
- - **Platforms** Enable and configure Telegram, Feishu, QQ, WeCom, and DingTalk (credentials, proxy, per-platform AI tool, allowed user IDs). Each platform has a “Test Configuration” button.
56
- - **AI Tooling** **General**: default AI tool (Claude / Codex / CodeBuddy), work directory, hook port, log level. **Per-tool tabs**: Claude (CLI path, timeout, proxy, config path, ANTHROPIC\_\* fields), Codex (CLI path, timeout, proxy), CodeBuddy (CLI path, timeout).
57
- - **Service control** Validate config, Save, Start bridge, Stop bridge.
55
+ - **Overview** platform count, service status
56
+ - **Platforms** enable and configure each IM (credentials, proxy, AI tool, allowed users)
57
+ - **AI Tooling** default tool, work directory, per-tool settings (CLI path, timeout, proxy, API keys)
58
+ - **Service control** validate, save, start/stop bridge
58
59
 
59
- WorkBuddy (WeChat) is not in the web UI; configure it in `~/.open-im/config.json` or via `open-im init`.
60
+ > WorkBuddy (WeChat) is configured via `open-im init` or directly in `~/.open-im/config.json`.
60
61
 
61
- - `open-im start` serves both the config page and the bridge on your local machine.
62
- - `open-im dev` opens the page automatically only when setup is incomplete.
63
- - To open the page when config already exists, you can also run `open-im dashboard` to launch the config UI only (without starting the bridge).
62
+ ### Remote Server
64
63
 
65
- ### Recommended server workflow
66
-
67
- On a remote server, the simplest and safest pattern is:
68
-
69
- 1. **Use `dashboard` to configure via browser**
70
-
71
- On the server:
72
-
73
- ```bash
74
- export OPEN_IM_NO_BROWSER=1
75
- # Optional: bind to all interfaces if you want to open from another device
76
- # export OPEN_IM_WEB_HOST=0.0.0.0
77
- open-im dashboard
78
- ```
79
-
80
- - This starts only the config web UI (no bridge yet).
81
- - If `OPEN_IM_WEB_HOST` is `0.0.0.0`, the server will print a one-time login URL like:
64
+ ```bash
65
+ export OPEN_IM_NO_BROWSER=1
66
+ # Optional: allow access from other devices
67
+ # export OPEN_IM_WEB_HOST=0.0.0.0
68
+ open-im dashboard
69
+ ```
82
70
 
83
- ```text
84
- http://your-server-ip:39282/?login_token=xxxx
85
- ```
71
+ If `OPEN_IM_WEB_HOST=0.0.0.0`, the server prints a one-time login URL:
86
72
 
87
- - Open this URL in your browser, complete all platform/AI settings, then click **Start bridge** in the web UI.
73
+ ```
74
+ http://your-server-ip:39282/?login_token=xxxx
75
+ ```
88
76
 
89
- 2. **Run the bridge as a background service**
77
+ Complete setup in the browser, then start the bridge:
90
78
 
91
- After configuration is saved, you have two options:
92
- - Start from the web UI: use the **Start bridge** button on the Service panel.
93
- - Or start from the CLI:
79
+ ```bash
80
+ open-im start
81
+ ```
94
82
 
95
- ```bash
96
- open-im start
97
- ```
83
+ ## IM Commands
98
84
 
99
- This runs the full bridge in the background using the saved config.
85
+ | Command | Description |
86
+ | ------------- | ------------------------------------ |
87
+ | `/help` | Show help |
88
+ | `/new` | Start a new AI session |
89
+ | `/status` | Show AI tool, version, session info |
90
+ | `/cd <path>` | Change session working directory |
91
+ | `/pwd` | Show current working directory |
92
+ | `/allow` `/y` | Approve a permission request |
93
+ | `/deny` `/n` | Reject a permission request |
100
94
 
101
95
  ## Session Behavior
102
96
 
103
- Session context is stored locally in `~/.open-im/data/sessions.json` and is separate from the IM chat history itself. Each user has an independent session directory and session metadata. Sending `/new` resets the current AI session.
97
+ Sessions are stored locally in `~/.open-im/data/sessions.json`, separate from IM chat history. Each user gets an independent session directory. `/new` resets the AI session.
104
98
 
105
99
  ## Configuration
106
100
 
107
- The root-level `aiCommand` is the default AI tool for all platforms. If you want a specific IM platform to use a different tool, set `platforms.<platform>.aiCommand`.
101
+ ### Per-Platform AI Routing
108
102
 
109
- Example:
103
+ The root-level `aiCommand` is the default AI tool. Override per-platform with `platforms.<name>.aiCommand`:
110
104
 
111
105
  ```json
112
106
  {
113
107
  "aiCommand": "claude",
114
108
  "platforms": {
115
- "telegram": {
116
- "enabled": true,
117
- "aiCommand": "codex"
118
- },
119
- "feishu": {
120
- "enabled": true,
121
- "aiCommand": "codex"
122
- },
123
- "qq": {
124
- "enabled": true,
125
- "aiCommand": "codebuddy"
126
- }
109
+ "telegram": { "enabled": true, "aiCommand": "codex" },
110
+ "feishu": { "enabled": true, "aiCommand": "codex" },
111
+ "qq": { "enabled": true, "aiCommand": "codebuddy" }
127
112
  }
128
113
  }
129
114
  ```
130
115
 
131
- In that setup, Telegram uses Codex, Feishu uses Codex, QQ uses CodeBuddy, and any platform without its own `aiCommand` continues using Claude.
132
-
133
- ### Claude
116
+ ### Claude (Agent SDK)
134
117
 
135
- Claude uses the Agent SDK by default and does not depend on a local `claude` executable. In most cases you only need to provide API credentials.
136
-
137
- Load order:
118
+ Claude uses the Agent SDK by default no local `claude` executable needed. Provide API credentials:
138
119
 
120
+ Credential load order:
139
121
  1. Environment variables
140
122
  2. `env` in `~/.open-im/config.json`
141
123
  3. `~/.claude/settings.json` or `~/.claude.json`
142
124
 
143
- Both the official API and compatible third-party endpoints are supported:
125
+ Compatible with third-party endpoints:
144
126
 
145
127
  ```json
146
128
  {
@@ -152,47 +134,41 @@ Both the official API and compatible third-party endpoints are supported:
152
134
  }
153
135
  ```
154
136
 
137
+ Claude automatically inherits plugins and settings from your local `~/.claude/settings.json`.
138
+
155
139
  ### CodeBuddy
156
140
 
157
- CodeBuddy uses the local CLI. Install it first, then either log in interactively or provide credentials through `env`.
141
+ Install the CLI and log in:
158
142
 
159
143
  ```bash
160
144
  npm install -g @tencent-ai/codebuddy-code
161
- codebuddy --version
162
145
  codebuddy login
163
146
  ```
164
147
 
165
- Common config keys:
148
+ Config keys:
149
+ - `tools.codebuddy.cliPath` — CLI path (default: `codebuddy`)
150
+ - `tools.codebuddy.skipPermissions` — skip permission prompts (default: `true`)
151
+ - `tools.codebuddy.timeoutMs` — execution timeout (default: `600000`)
166
152
 
167
- - `tools.codebuddy.cliPath`: CLI path, defaults to `codebuddy`
168
- - `tools.codebuddy.skipPermissions`: whether to skip permission confirmation, defaults to `true`
169
- - `tools.codebuddy.timeoutMs`: total execution timeout, defaults to `600000`
170
- - `platforms.<platform>.aiCommand`: set to `codebuddy` if that IM platform should use CodeBuddy
153
+ On Windows, if `cliPath` is `codebuddy`, open-im also checks `AppData\Roaming\npm\codebuddy.cmd`.
171
154
 
172
- On Windows, if `cliPath` is still `codebuddy`, open-im also tries common npm global locations such as `AppData\\Roaming\\npm\\codebuddy.cmd`.
173
-
174
- ### Example Config File
175
-
176
- The following is valid JSON and can be saved directly as `~/.open-im/config.json`:
155
+ ### Example Config
177
156
 
178
157
  ```json
179
158
  {
180
159
  "aiCommand": "claude",
181
160
  "tools": {
182
161
  "claude": {
183
- "cliPath": "claude",
184
- "workDir": "D:/coding/open-im",
162
+ "workDir": "/path/to/project",
185
163
  "skipPermissions": true,
186
164
  "timeoutMs": 600000
187
165
  },
188
166
  "codex": {
189
- "cliPath": "codex",
190
- "workDir": "D:/coding/open-im",
167
+ "workDir": "/path/to/project",
191
168
  "skipPermissions": true,
192
169
  "proxy": "http://127.0.0.1:7890"
193
170
  },
194
171
  "codebuddy": {
195
- "cliPath": "codebuddy",
196
172
  "skipPermissions": true,
197
173
  "timeoutMs": 600000
198
174
  }
@@ -200,44 +176,31 @@ The following is valid JSON and can be saved directly as `~/.open-im/config.json
200
176
  "platforms": {
201
177
  "telegram": {
202
178
  "enabled": true,
203
- "aiCommand": "codex",
204
- "proxy": "http://127.0.0.1:7890",
205
- "allowedUserIds": [],
206
179
  "botToken": "YOUR_TELEGRAM_BOT_TOKEN"
207
180
  },
208
181
  "feishu": {
209
182
  "enabled": false,
210
- "aiCommand": "codex",
211
- "allowedUserIds": [],
212
183
  "appId": "YOUR_FEISHU_APP_ID",
213
184
  "appSecret": "YOUR_FEISHU_APP_SECRET"
214
185
  },
215
186
  "qq": {
216
187
  "enabled": false,
217
- "aiCommand": "codebuddy",
218
- "allowedUserIds": [],
219
188
  "appId": "YOUR_QQ_APP_ID",
220
189
  "secret": "YOUR_QQ_APP_SECRET"
221
190
  },
222
191
  "wework": {
223
192
  "enabled": false,
224
- "aiCommand": "claude",
225
- "allowedUserIds": [],
226
193
  "corpId": "YOUR_WEWORK_CORP_ID",
227
194
  "secret": "YOUR_WEWORK_SECRET"
228
195
  },
229
196
  "dingtalk": {
230
197
  "enabled": false,
231
- "aiCommand": "claude",
232
- "allowedUserIds": [],
233
198
  "clientId": "YOUR_DINGTALK_CLIENT_ID",
234
199
  "clientSecret": "YOUR_DINGTALK_CLIENT_SECRET",
235
200
  "cardTemplateId": "YOUR_DINGTALK_AI_CARD_TEMPLATE_ID"
236
201
  },
237
202
  "workbuddy": {
238
203
  "enabled": false,
239
- "aiCommand": "claude",
240
- "allowedUserIds": [],
241
204
  "accessToken": "",
242
205
  "refreshToken": "",
243
206
  "userId": ""
@@ -246,101 +209,93 @@ The following is valid JSON and can be saved directly as `~/.open-im/config.json
246
209
  }
247
210
  ```
248
211
 
249
- ### Common Environment Variables
250
-
251
- | Variable | Description |
252
- | ---------------------------- | ---------------------------------------------------------------------- |
253
- | `AI_COMMAND` | Select `claude`, `codex`, or `codebuddy` |
254
- | `CLAUDE_WORK_DIR` | Default session working directory |
255
- | `LOG_DIR` | Log directory |
256
- | `LOG_LEVEL` | Log level |
257
- | `HOOK_PORT` | Permission service port |
258
- | `CODEX_PROXY` | Proxy used by Codex to access `chatgpt.com` |
259
- | `OPENAI_API_KEY` | Codex API key, can replace `codex login` |
260
- | `CODEBUDDY_CLI_PATH` | Override CodeBuddy CLI path |
261
- | `CODEBUDDY_TIMEOUT_MS` | Override CodeBuddy timeout |
262
- | `CODEBUDDY_SKIP_PERMISSIONS` | Override CodeBuddy skip-permissions behavior |
263
- | `CODEBUDDY_IDLE_TIMEOUT_MS` | Abort CodeBuddy when it stays silent for too long |
264
- | `CODEBUDDY_API_KEY` | CodeBuddy API key, can replace `codebuddy login` |
265
- | `CODEBUDDY_AUTH_TOKEN` | CodeBuddy auth token, can replace `codebuddy login` |
266
- | `TELEGRAM_BOT_TOKEN` | Telegram bot token |
267
- | `TELEGRAM_PROXY` | Telegram proxy URL |
268
- | `TELEGRAM_ALLOWED_USER_IDS` | Telegram allowlist |
269
- | `FEISHU_APP_ID` | Feishu app ID |
270
- | `FEISHU_APP_SECRET` | Feishu app secret |
271
- | `FEISHU_ALLOWED_USER_IDS` | Feishu allowlist |
272
- | `QQ_BOT_APPID` | QQ bot app ID |
273
- | `QQ_BOT_SECRET` | QQ bot app secret |
274
- | `QQ_BOT_SANDBOX` | QQ bot sandbox mode (`1` / `true` to enable, disabled by default) |
275
- | `QQ_ALLOWED_USER_IDS` | QQ allowlist |
276
- | `DINGTALK_CLIENT_ID` | DingTalk client ID / AppKey |
277
- | `DINGTALK_CLIENT_SECRET` | DingTalk client secret / AppSecret |
278
- | `DINGTALK_CARD_TEMPLATE_ID` | DingTalk AI card template ID; enables single-message streaming replies |
279
- | `DINGTALK_ALLOWED_USER_IDS` | DingTalk allowlist |
280
- | `WEWORK_CORP_ID` | WeCom bot ID |
281
- | `WEWORK_SECRET` | WeCom secret |
282
- | `WEWORK_WS_URL` | WeCom WebSocket URL |
283
- | `WEWORK_ALLOWED_USER_IDS` | WeCom allowlist |
284
- | `WORKBUDDY_ACCESS_TOKEN` | WorkBuddy OAuth access token (auto-generated by `open-im init`) |
285
- | `WORKBUDDY_REFRESH_TOKEN` | WorkBuddy OAuth refresh token (auto-generated by `open-im init`) |
286
- | `WORKBUDDY_USER_ID` | WorkBuddy user ID |
287
- | `WORKBUDDY_BASE_URL` | WorkBuddy API base URL, defaults to `https://copilot.tencent.com` |
288
- | `WORKBUDDY_GUID` | WorkBuddy connection GUID (optional) |
289
- | `WORKBUDDY_WORKSPACE_PATH` | WorkBuddy workspace path (optional) |
290
- | `WORKBUDDY_ALLOWED_USER_IDS` | WorkBuddy allowlist |
291
-
292
- ### Platform Setup Sources
293
-
294
- - Telegram: get the bot token from [@BotFather](https://t.me/BotFather)
295
- - Feishu: create an app and enable the bot in the [Feishu Open Platform](https://open.feishu.cn/)
296
- - QQ: create a bot in the [QQ Open Platform](https://bot.q.qq.com/) and get the `App ID` and `App Secret`
297
- - DingTalk: create an internal enterprise app in DingTalk Open Platform, enable bot Stream Mode, and get the `Client ID` and `Client Secret`
298
- - WeCom: get the bot ID and secret from the [WeCom admin console](https://work.weixin.qq.com/)
299
- - WeChat (WorkBuddy): connects via CodeBuddy (copilot.tencent.com) Centrifuge WebSocket; run `open-im init` and select "WorkBuddy 微信客服 (WeChat KF)" to complete OAuth login and WeChat KF binding
300
-
301
- Notes on DingTalk: the current implementation uses a hybrid model of "Stream Mode for receiving messages + OpenAPI for sending messages".
302
-
303
- - Plain text replies in a session are sent through `sessionWebhook`
304
- - If `cardTemplateId` is configured, the app will try AI assistant `prepare/update/finish` streaming cards; if that fails, it falls back to plain text. In custom bot or regular group scenarios, the interactive card API may return `param.error`, so single-message streaming updates are not available there yet
305
- - Startup and shutdown notifications are not sent to DingTalk (the OpenAPI robot API does not support proactive messages in the same way). Other platforms (e.g. Telegram, Feishu, WeCom) still receive lifecycle notifications when configured
306
-
307
- DingTalk AI card templates are already compatible with the official "Search Result Card" template and use the variables `lastMessage`, `content`, `resources`, `users`, and `flowStatus`. If you use that template, no template changes are required for streaming updates.
308
-
309
- ## IM Commands
310
-
311
- | Command | Description |
312
- | ------------- | -------------------------------------------------------- |
313
- | `/help` | Show help |
314
- | `/new` | Start a new session |
315
- | `/status` | Show AI tool, version, session directory, and session ID |
316
- | `/cd <path>` | Change the session working directory |
317
- | `/pwd` | Show the current session working directory |
318
- | `/allow` `/y` | Approve a permission request |
319
- | `/deny` `/n` | Reject a permission request |
212
+ ### Environment Variables
213
+
214
+ #### General
215
+
216
+ | Variable | Description |
217
+ | ------------------- | ---------------------------------------------- |
218
+ | `AI_COMMAND` | Default AI tool (`claude` / `codex` / `codebuddy`) |
219
+ | `CLAUDE_WORK_DIR` | Default session working directory |
220
+ | `LOG_DIR` | Log directory |
221
+ | `LOG_LEVEL` | Log level |
222
+ | `HOOK_PORT` | Permission service port |
223
+
224
+ #### AI Tool Credentials
225
+
226
+ | Variable | Description |
227
+ | ---------------------------- | ------------------------------------------ |
228
+ | `ANTHROPIC_API_KEY` | Claude API key |
229
+ | `ANTHROPIC_AUTH_TOKEN` | Claude OAuth token |
230
+ | `ANTHROPIC_BASE_URL` | Claude API base URL |
231
+ | `ANTHROPIC_MODEL` | Claude model name |
232
+ | `OPENAI_API_KEY` | Codex API key |
233
+ | `CODEX_PROXY` | Codex proxy for `chatgpt.com` |
234
+ | `CODEBUDDY_CLI_PATH` | CodeBuddy CLI path |
235
+ | `CODEBUDDY_TIMEOUT_MS` | CodeBuddy timeout |
236
+ | `CODEBUDDY_API_KEY` | CodeBuddy API key |
237
+ | `CODEBUDDY_AUTH_TOKEN` | CodeBuddy auth token |
238
+
239
+ #### Platform Credentials
240
+
241
+ | Variable | Description |
242
+ | ---------------------------- | ------------------------------------------ |
243
+ | `TELEGRAM_BOT_TOKEN` | Telegram bot token |
244
+ | `TELEGRAM_PROXY` | Telegram proxy URL |
245
+ | `TELEGRAM_ALLOWED_USER_IDS` | Telegram allowed user IDs |
246
+ | `FEISHU_APP_ID` | Feishu app ID |
247
+ | `FEISHU_APP_SECRET` | Feishu app secret |
248
+ | `FEISHU_ALLOWED_USER_IDS` | Feishu allowed user IDs |
249
+ | `QQ_BOT_APPID` | QQ bot app ID |
250
+ | `QQ_BOT_SECRET` | QQ bot app secret |
251
+ | `QQ_BOT_SANDBOX` | QQ sandbox mode (`1` / `true`) |
252
+ | `QQ_ALLOWED_USER_IDS` | QQ allowed user IDs |
253
+ | `DINGTALK_CLIENT_ID` | DingTalk client ID / AppKey |
254
+ | `DINGTALK_CLIENT_SECRET` | DingTalk client secret / AppSecret |
255
+ | `DINGTALK_CARD_TEMPLATE_ID` | DingTalk AI card template ID |
256
+ | `DINGTALK_ALLOWED_USER_IDS` | DingTalk allowed user IDs |
257
+ | `WEWORK_CORP_ID` | WeCom bot ID |
258
+ | `WEWORK_SECRET` | WeCom secret |
259
+ | `WEWORK_WS_URL` | WeCom WebSocket URL |
260
+ | `WEWORK_ALLOWED_USER_IDS` | WeCom allowed user IDs |
261
+ | `WORKBUDDY_ACCESS_TOKEN` | WorkBuddy OAuth access token |
262
+ | `WORKBUDDY_REFRESH_TOKEN` | WorkBuddy OAuth refresh token |
263
+ | `WORKBUDDY_USER_ID` | WorkBuddy user ID |
264
+ | `WORKBUDDY_BASE_URL` | WorkBuddy API base URL |
265
+ | `WORKBUDDY_ALLOWED_USER_IDS` | WorkBuddy allowed user IDs |
266
+
267
+ ### Platform Setup
268
+
269
+ | Platform | Setup source |
270
+ | --------- | --------------------------------------------------------------- |
271
+ | Telegram | [@BotFather](https://t.me/BotFather) |
272
+ | Feishu | [Feishu Open Platform](https://open.feishu.cn/) |
273
+ | QQ | [QQ Open Platform](https://bot.q.qq.com/) |
274
+ | DingTalk | DingTalk Open Platform — enable bot Stream Mode |
275
+ | WeCom | [WeCom admin console](https://work.weixin.qq.com/) |
276
+ | WeChat | Run `open-im init` and select "WorkBuddy" for OAuth + binding |
277
+
278
+ **DingTalk notes:**
279
+ - Uses Stream Mode (receive) + OpenAPI (send)
280
+ - With `cardTemplateId`: AI assistant streaming cards; falls back to plain text on failure
281
+ - Custom bots and regular groups only support single text replies
282
+ - Startup/shutdown notifications are not sent to DingTalk
320
283
 
321
284
  ## Troubleshooting
322
285
 
323
- **Telegram does not respond**: check network access. If needed, add `"proxy": "http://127.0.0.1:7890"` to the Telegram platform config or set `TELEGRAM_PROXY`.
324
-
325
- **QQ cannot connect**: make sure the bot has been created and enabled in QQ Open Platform, then verify `QQ_BOT_APPID`, `QQ_BOT_SECRET`, or `platforms.qq`.
326
-
327
- **QQ sends duplicate replies**: update to the latest version. This issue was fixed recently.
328
-
329
- **Feishu card errors**: if card callbacks are not configured, you can use `/mode ask` or `/mode yolo` directly.
330
-
331
- **WeCom notifications are not received**: the bot must receive at least one message first before it can send proactive notifications.
332
-
333
- **DingTalk cannot reply**: make sure bot Stream Mode is enabled for the app, then verify `DINGTALK_CLIENT_ID`, `DINGTALK_CLIENT_SECRET`, or `platforms.dingtalk`.
334
-
335
- **DingTalk has no streaming updates**: when `prepare` fails, the app falls back to plain text replies. In custom bot or regular group scenarios, neither the AI assistant API nor the interactive card API is available, so only single plain text replies are supported.
336
-
337
- **Codex shows `stream disconnected` or `error sending request`**: `chatgpt.com` is not reachable. Configure `tools.codex.proxy` or set `CODEX_PROXY`.
338
-
339
- **CodeBuddy prompts for login**: run `codebuddy login` first. `open-im` does not read CodeBuddy login state from `~/.open-im/config.json`.
340
-
341
- **WorkBuddy cannot connect**: run `open-im init` to re-authenticate. Tokens may expire — the client will attempt auto-reconnect, but if the refresh token is invalid, a fresh login is required.
342
-
343
- **WorkBuddy WeChat KF not receiving messages**: ensure the WeChat KF binding was completed during `open-im init`. You can re-run init to generate a new binding link.
286
+ | Issue | Solution |
287
+ | ----- | -------- |
288
+ | Telegram not responding | Check network, add `proxy` or set `TELEGRAM_PROXY` |
289
+ | QQ cannot connect | Verify bot is created and `QQ_BOT_APPID` / `QQ_BOT_SECRET` are correct |
290
+ | QQ duplicate replies | Update to latest version |
291
+ | Feishu card errors | Use `/mode ask` or `/mode yolo` without card callbacks |
292
+ | WeCom no notifications | Send at least one message to the bot first |
293
+ | DingTalk cannot reply | Verify Stream Mode is enabled and credentials are correct |
294
+ | DingTalk no streaming | Custom bots only support plain text; configure `cardTemplateId` for AI assistant streaming |
295
+ | Codex `stream disconnected` | Configure `tools.codex.proxy` or `CODEX_PROXY` for `chatgpt.com` access |
296
+ | CodeBuddy asks for login | Run `codebuddy login` first |
297
+ | WorkBuddy cannot connect | Run `open-im init` to re-authenticate; tokens may expire |
298
+ | WorkBuddy WeChat not receiving | Re-run `open-im init` to generate new WeChat KF binding link |
344
299
 
345
300
  ## License
346
301