Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
de769d5
feat(channels): add WeCom smart bot channel
qqqys Jul 3, 2026
f32f098
fix(channels): harden wecom review suggestions
qqqys Jul 3, 2026
b2dbd5e
fix(channels): address wecom critical review
qqqys Jul 3, 2026
6100fd1
fix(channels): include wecom mixed voice text
qqqys Jul 3, 2026
1f86d11
fix(channels): tighten wecom outbound media
qqqys Jul 3, 2026
30076d4
fix(channels): harden wecom outbound sends
qqqys Jul 3, 2026
067d74c
fix(channels): address wecom review blockers
qqqys Jul 3, 2026
74563a1
fix(channels): address wecom review followups
qqqys Jul 3, 2026
3c14ef9
fix(channels): harden wecom inbound handling
qqqys Jul 3, 2026
ccd4f33
fix(channels): address wecom auth and media review
qqqys Jul 3, 2026
4588045
fix(channels): tighten wecom inbound cleanup
qqqys Jul 3, 2026
5a2abaf
fix(channels): harden wecom media safety
qqqys Jul 3, 2026
547f67f
fix(channels): address wecom review typecheck
qqqys Jul 3, 2026
46a2efc
fix(channels): harden wecom media review gaps
qqqys Jul 3, 2026
6c66094
fix(channels): address wecom review blockers
qqqys Jul 3, 2026
9ccf0c9
fix(channels): tighten wecom media edge cases
qqqys Jul 3, 2026
006023d
fix(channels): address wecom review blockers
qqqys Jul 3, 2026
645406b
fix(channels): address wecom media review blockers
qqqys Jul 4, 2026
e6a0e3a
fix(channels): address wecom review follow-ups
qqqys Jul 4, 2026
36ea9f9
fix(channels): address wecom review blockers
qqqys Jul 4, 2026
3e923e1
fix(channels): close wecom review blockers
qqqys Jul 4, 2026
bc95cb9
fix(channels): close wecom preflight dedup race
qqqys Jul 4, 2026
92d129c
fix(channels): close wecom review gaps
qqqys Jul 4, 2026
7016ea5
fix(channels): harden wecom kick reconnect
qqqys Jul 4, 2026
5ad0c9c
fix(channels): defer wecom session resolution
qqqys Jul 4, 2026
643555d
fix(channels): clean wecom session attachments
qqqys Jul 4, 2026
5a9c9b0
fix(channels): harden wecom reconnect and media cleanup
qqqys Jul 4, 2026
7947aff
fix(channels): address wecom review diagnostics
qqqys Jul 4, 2026
7dea3a7
fix(channels): improve wecom diagnostics
qqqys Jul 4, 2026
9ba9cc9
fix(channels): reset wecom kick retries
qqqys Jul 4, 2026
8ab3343
fix(channels): improve wecom diagnostics
qqqys Jul 4, 2026
05936c1
fix(channels): preserve sync cancel preflight
qqqys Jul 4, 2026
d9a9b84
fix(channels): close wecom connection and ssrf gaps
qqqys Jul 4, 2026
6e25684
fix(channels): clean coalesced wecom attachments
qqqys Jul 4, 2026
c3350a1
fix(channels): bound wecom sdk connect wait
qqqys Jul 4, 2026
f49032b
Merge branch 'main' into codex/issue-6208-wecom-channel
wenshao Jul 4, 2026
40ca360
fix(channels): scope wecom untracked attachment cleanup
qqqys Jul 5, 2026
ebb6e63
fix(channels): block wecom nat64 local-use ssrf
qqqys Jul 5, 2026
08dbc93
fix(channels): harden wecom media handling
qqqys Jul 5, 2026
f58a17d
fix(channels): harden wecom group gates
qqqys Jul 5, 2026
d9bb953
fix(channels): bound wecom kick reconnect cycles
qqqys Jul 5, 2026
f091c36
fix(channels): drain loop collect prompts directly
qqqys Jul 5, 2026
907c232
fix(channels): align wecom buffer hooks
qqqys Jul 5, 2026
8bc756d
fix(channels): harden wecom delivery failures
qqqys Jul 5, 2026
003c985
fix(channels): recover from wecom attachment write failures
qqqys Jul 5, 2026
3ba8e95
fix(channels): surface wecom media send failures
qqqys Jul 5, 2026
f03c008
fix(channels): harden wecom replay and reconnect
qqqys Jul 5, 2026
f1998d1
fix(channels): clarify wecom partial delivery cleanup
qqqys Jul 5, 2026
8a4b6bd
fix(channels): close wecom rejected downloads
qqqys Jul 5, 2026
2bfe8b3
fix(channels): retain wecom dedup after processing starts
qqqys Jul 5, 2026
dcd4170
fix(channels): harden wecom reconnect and media errors
qqqys Jul 5, 2026
8f56b3f
fix(channels): add wecom media error context
qqqys Jul 5, 2026
81d6d1c
fix(channels): improve wecom dns diagnostics
qqqys Jul 5, 2026
c988e15
fix(channels): keep wecom kick retry alive
qqqys Jul 5, 2026
951c1b5
fix(channels): allow wecom quoted bot replies
qqqys Jul 5, 2026
bfaf08f
fix(channels): preserve wecom code fences across chunks
qqqys Jul 5, 2026
3dbcc91
fix(channels): harden wecom reconnect lifecycle
qqqys Jul 5, 2026
0249240
fix(channels): report wecom media dir setup failures
qqqys Jul 5, 2026
60d191b
fix(channels): harden wecom reconnect recovery
qqqys Jul 5, 2026
6e7fab1
fix(channels): align wecom review fixes
qqqys Jul 6, 2026
7661af0
fix(channels): harden wecom marker parsing
qqqys Jul 6, 2026
2380b64
fix(channels): keep wecom reconnect timers alive
qqqys Jul 6, 2026
e2da90a
fix(channels): handle wecom tilde fences
qqqys Jul 6, 2026
0fa9f03
fix(channels): preserve wecom fence state
qqqys Jul 6, 2026
e0ae776
fix(channels): clean up wecom attachment races
qqqys Jul 6, 2026
b650c4c
fix(channels): bind wecom media reads to file handles
qqqys Jul 6, 2026
0fda2a8
fix(channels): prevent wecom symlink media opens
qqqys Jul 6, 2026
4ada37e
fix(channels): address wecom review blockers
qqqys Jul 6, 2026
7d634af
fix(wecom): remove media URL from error messages to prevent credentia…
qqqys Jul 6, 2026
9b5a3cd
fix(wecom): address review feedback — tests, security, correctness
qqqys Jul 6, 2026
5f4b2ab
fix(wecom): wrap client.disconnect() in catch block to preserve conne…
qqqys Jul 6, 2026
8d7c1b6
fix(channels): address wecom reconnect review blockers
qqqys Jul 7, 2026
75bf5b9
fix(channels): harden wecom reconnect review fixes
qqqys Jul 7, 2026
71fc860
fix(channels): harden wecom review blockers
qqqys Jul 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/users/features/channels/_meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export default {
telegram: 'Telegram',
weixin: 'WeChat',
dingtalk: 'DingTalk',
wecom: 'WeCom',
feishu: 'Feishu',
qqbot: 'QQ Bot',
plugins: 'Plugins',
Expand Down
111 changes: 111 additions & 0 deletions docs/users/features/channels/wecom.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
# WeCom (Enterprise WeChat)

This guide covers setting up Qwen Code with a WeCom intelligent robot (企业微信智能机器人).

## Prerequisites

- A WeCom organization account
- A WeCom intelligent robot created in API mode
- The robot's Bot ID and Secret

## Creating the Robot

1. Open the WeCom admin console and create an intelligent robot.
2. Choose API mode.
3. Copy the Bot ID and Secret.
4. Add the robot to the direct chats or groups where it should be available.

The intelligent robot uses a WebSocket connection from Qwen Code to WeCom. You do not need a public callback URL, Token, EncodingAESKey, Corp ID, or Agent ID.

## Configuration

Add the channel to `~/.qwen/settings.json`:

```json
{
"channels": {
"my-wecom": {
"type": "wecom",
"botId": "$WECOM_BOT_ID",
"secret": "$WECOM_SECRET",
"senderPolicy": "allowlist",
"allowedUsers": ["zhangsan"],
"sessionScope": "user",
"cwd": "/path/to/your/project",
"instructions": "You are a concise coding assistant responding via WeCom.",
"groupPolicy": "open",
"groups": {
"*": { "requireMention": true }
}
}
}
}
```

Set the credentials as environment variables:

```bash
export WECOM_BOT_ID=<your-bot-id>
export WECOM_SECRET=<your-secret>
```

Or define them in the `env` section of `settings.json`:

```json
{
"env": {
"WECOM_BOT_ID": "your-bot-id",
"WECOM_SECRET": "your-secret"
}
}
```

## Running

```bash
qwen channel start my-wecom
```

Open WeCom and send a message to the intelligent robot.

## Access Control

`senderPolicy` works the same way as other IM channels:

- `allowlist`: only users in `allowedUsers` can use the bot. This is the recommended enterprise default.
- `pairing`: users must pair before using the bot.
- `open`: anyone who can message the robot can use it.

For groups, set `groupPolicy` to `"allowlist"` or `"open"`. By default, group messages require a mention through `"requireMention": true`.

When the WeCom SDK includes explicit mention metadata, Qwen Code uses it for this gate. If no mention metadata is present, the channel treats delivered group messages as unmentioned. Set `"requireMention": false` only if you want to rely on WeCom-side delivery scoping instead.

## Images and Files

Users can send text, voice messages with transcription, images, mixed text plus images, files, and videos. Images are passed to the agent as image attachments. Files and videos are downloaded to temporary local paths so the agent can read them with file tools.

Assistant responses are sent as WeCom markdown. To send a local image generated by the agent, include one marker outside code blocks:

```text
[IMAGE: /absolute/path/to/image.png]
```

For safety, local image paths must be inside the channel file directory under the system temporary directory, such as `/tmp/channel-files/...` on Linux. Generic file, video, and voice upload markers are ignored because model-produced file paths could otherwise upload arbitrary workspace files.

## Troubleshooting

### Bot does not connect

- Verify the Bot ID and Secret.
- Make sure the robot is created in API mode.
- Check that the environment variables are available in the shell running `qwen channel start`.

### Bot does not respond in groups

- Check `groupPolicy`.
- Mention the bot unless the group config sets `"requireMention": false`.
- Confirm the robot has been added to the group.

### Self-built application credentials do not work

This channel is for WeCom intelligent robots. Self-built application callback credentials such as Corp ID, Agent ID, Token, and EncodingAESKey are not used by this channel.
29 changes: 28 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"packages/channels/telegram",
"packages/channels/weixin",
"packages/channels/dingtalk",
"packages/channels/wecom",
"packages/channels/feishu",
"packages/channels/qqbot",
"packages/channels/plugin-example",
Expand Down
Loading
Loading