openclaw-weixin 3.1.4 → 3.1.6
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/CHANGELOG.md +21 -0
- package/CHANGELOG_EN.md +24 -0
- package/README.md +61 -72
- package/README_EN.md +74 -86
- package/dist/index.js +2 -3
- package/dist/index.js.map +1 -1
- package/dist/src/api/api.js +40 -35
- package/dist/src/api/api.js.map +1 -1
- package/dist/src/api/config-cache.js +3 -2
- package/dist/src/api/config-cache.js.map +1 -1
- package/dist/src/api/session-guard.js +3 -2
- package/dist/src/api/session-guard.js.map +1 -1
- package/dist/src/auth/accounts.js +2 -1
- package/dist/src/auth/accounts.js.map +1 -1
- package/dist/src/auth/login-qr.js +20 -21
- package/dist/src/auth/login-qr.js.map +1 -1
- package/dist/src/auth/pairing.js +2 -1
- package/dist/src/auth/pairing.js.map +1 -1
- package/dist/src/cdn/cdn-upload.js +17 -10
- package/dist/src/cdn/cdn-upload.js.map +1 -1
- package/dist/src/cdn/pic-decrypt.js +15 -7
- package/dist/src/cdn/pic-decrypt.js.map +1 -1
- package/dist/src/cdn/upload.js +7 -7
- package/dist/src/cdn/upload.js.map +1 -1
- package/dist/src/channel.js +33 -44
- package/dist/src/channel.js.map +1 -1
- package/dist/src/config/config-schema.js +43 -17
- package/dist/src/config/config-schema.js.map +1 -1
- package/dist/src/media/media-download.js +15 -14
- package/dist/src/media/media-download.js.map +1 -1
- package/dist/src/media/silk-transcode.js +2 -1
- package/dist/src/media/silk-transcode.js.map +1 -1
- package/dist/src/messaging/debug-mode.js +2 -1
- package/dist/src/messaging/debug-mode.js.map +1 -1
- package/dist/src/messaging/error-notice.js +3 -3
- package/dist/src/messaging/error-notice.js.map +1 -1
- package/dist/src/messaging/inbound-dedupe.js +2 -1
- package/dist/src/messaging/inbound-dedupe.js.map +1 -1
- package/dist/src/messaging/inbound.js +6 -5
- package/dist/src/messaging/inbound.js.map +1 -1
- package/dist/src/messaging/outbound-hooks.js +2 -1
- package/dist/src/messaging/outbound-hooks.js.map +1 -1
- package/dist/src/messaging/process-message.js +75 -49
- package/dist/src/messaging/process-message.js.map +1 -1
- package/dist/src/messaging/reply-progress-sender.js +3 -2
- package/dist/src/messaging/reply-progress-sender.js.map +1 -1
- package/dist/src/messaging/send-media.js +7 -6
- package/dist/src/messaging/send-media.js.map +1 -1
- package/dist/src/messaging/send.js +5 -5
- package/dist/src/messaging/send.js.map +1 -1
- package/dist/src/messaging/slash-commands.js +5 -3
- package/dist/src/messaging/slash-commands.js.map +1 -1
- package/dist/src/monitor/monitor.js +15 -15
- package/dist/src/monitor/monitor.js.map +1 -1
- package/dist/src/util/logger.js +3 -2
- package/dist/src/util/logger.js.map +1 -1
- package/dist/src/util/redact.js +64 -17
- package/dist/src/util/redact.js.map +1 -1
- package/docs/{architecture_EN.md → en/architecture.md} +2 -2
- package/docs/{backend-api_EN.md → en/backend-api.md} +24 -13
- package/docs/en/distributions.md +41 -0
- package/docs/{guide_EN.md → en/guide.md} +40 -0
- package/docs/{architecture.md → zh-CN/architecture.md} +1 -1
- package/docs/{backend-api.md → zh-CN/backend-api.md} +18 -10
- package/docs/zh-CN/distributions.md +27 -0
- package/docs/{guide.md → zh-CN/guide.md} +34 -0
- package/index.ts +2 -3
- package/openclaw.plugin.json +13 -2
- package/package.json +9 -3
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,27 @@
|
|
|
6
6
|
|
|
7
7
|
## [未发布]
|
|
8
8
|
|
|
9
|
+
## [3.1.6] - 2026-08-22
|
|
10
|
+
|
|
11
|
+
### 修复
|
|
12
|
+
|
|
13
|
+
- **诊断隐私:** 普通日志现在会完全遮盖标识符和令牌;显式启用的 DEBUG 日志最多显示脱敏
|
|
14
|
+
短前缀;诊断信息不再持久化消息正文、URL 查询参数、二维码 URL 或原始文件系统路径。
|
|
15
|
+
|
|
16
|
+
## [3.1.5] - 2026-08-16
|
|
17
|
+
|
|
18
|
+
### 变更
|
|
19
|
+
|
|
20
|
+
- **Node.js 兼容范围:** 发布包现在声明支持 Node.js `>=22.22.3`,包括 Node.js 24 和
|
|
21
|
+
26;CI 新增当前 Node.js 26 兼容性验证。
|
|
22
|
+
|
|
23
|
+
### 修复
|
|
24
|
+
|
|
25
|
+
- **OpenClaw beta 配置兼容:** 插件入口和 channel 注册现在共用宿主提供的 JSON Schema
|
|
26
|
+
边界,不再导入已移除的 `openclaw/plugin-sdk/zod`;该 schema 覆盖文档中的
|
|
27
|
+
`botAgent`、进度消息和字符串/数字路由标签,使插件可在新版宿主加载且不会携带第二份
|
|
28
|
+
Zod。
|
|
29
|
+
|
|
9
30
|
## [3.1.4] - 2026-08-12
|
|
10
31
|
|
|
11
32
|
### 修复
|
package/CHANGELOG_EN.md
CHANGED
|
@@ -6,6 +6,30 @@ This project follows the [Keep a Changelog](https://keepachangelog.com/) format.
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [3.1.6] - 2026-08-22
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- **Diagnostic privacy:** normal logs now fully mask identifiers and tokens,
|
|
14
|
+
opt-in DEBUG logs expose at most short redacted prefixes, and diagnostics no
|
|
15
|
+
longer persist message text, URL queries, QR URLs, or raw filesystem paths.
|
|
16
|
+
|
|
17
|
+
## [3.1.5] - 2026-08-16
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- **Node.js compatibility range:** the published package now declares support
|
|
22
|
+
for Node.js `>=22.22.3`, including Node.js 24 and 26; CI adds compatibility
|
|
23
|
+
coverage for the current Node.js 26 runtime.
|
|
24
|
+
|
|
25
|
+
### Fixed
|
|
26
|
+
|
|
27
|
+
- **OpenClaw beta config compatibility:** the plugin entry and channel
|
|
28
|
+
registration now share the host's JSON Schema boundary instead of the removed
|
|
29
|
+
`openclaw/plugin-sdk/zod` export. The schema covers the documented `botAgent`,
|
|
30
|
+
progress-message setting, and string or numeric route tags, allowing the plugin
|
|
31
|
+
to load on newer hosts without shipping a second Zod copy.
|
|
32
|
+
|
|
9
33
|
## [3.1.4] - 2026-08-12
|
|
10
34
|
|
|
11
35
|
### Fixed
|
package/README.md
CHANGED
|
@@ -4,46 +4,51 @@
|
|
|
4
4
|
[English](https://openclaw-weixin.newfuture.cc/en/) · [在线文档](https://openclaw-weixin.newfuture.cc/)
|
|
5
5
|
<!-- docs-site:repo-only:end -->
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
**把 OpenClaw 接入微信**
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
的社区维护发行版,提供 npm 与 ClawHub 两个发布入口。
|
|
12
|
-
</p>
|
|
9
|
+
社区维护的 OpenClaw 微信渠道插件,提供 npm 与 ClawHub 两个安装源。
|
|
10
|
+
本插件需要 OpenClaw `>=2026.6.1`。
|
|
13
11
|
|
|
14
|
-
<
|
|
12
|
+
<a id="connect-wechat"></a>
|
|
15
13
|
|
|
16
|
-
|
|
17
|
-
提示词让 OpenClaw 优先使用 npm、失败时回退 ClawHub,并完成安装与连接检查;直接命令只安装或替换插件。</p>
|
|
14
|
+
## 选择一种安装方式
|
|
18
15
|
|
|
19
|
-
|
|
20
|
-
<a href="#agent-install"><strong>复制提示词</strong><span>npm 优先,ClawHub 兜底</span></a>
|
|
21
|
-
<span class="choice-or" aria-hidden="true">或</span>
|
|
22
|
-
<a href="#direct-install"><strong>运行命令</strong><span>自己选择 npm 或 ClawHub</span></a>
|
|
23
|
-
</div>
|
|
16
|
+
[**复制提示词**](#agent-install) **或** [**运行命令**](#direct-install)
|
|
24
17
|
|
|
25
18
|
<!-- registry-prompt:start -->
|
|
26
|
-
<
|
|
19
|
+
<a id="agent-install"></a>
|
|
27
20
|
|
|
28
|
-
|
|
21
|
+
### 让 OpenClaw 自动完成安装
|
|
22
|
+
|
|
23
|
+
把下面这段话粘贴到 OpenClaw 聊天框并发送:
|
|
29
24
|
|
|
30
25
|
```text
|
|
31
26
|
请为当前 OpenClaw 安装或原位替换微信插件,并检查微信连接。优先安装 npm 的 `npm:openclaw-weixin`;仅当 npm 来源明确不可用时,改用 ClawHub 的 `clawhub:openclaw-wechat`,全程只安装一个。
|
|
32
|
-
|
|
33
27
|
请遵循 OpenClaw 的安装策略,对所用来源执行同一 `openclaw-weixin` 插件 ID 的原位替换(对应 `--force`),并保留现有配置和登录数据;请使用 OpenClaw 插件安装流程,而不是普通的 `npm install`。安装后确认插件已加载并探测微信 Channel;未登录时提示扫码。最后简要报告来源和结果;失败时说明原因。
|
|
34
28
|
```
|
|
35
29
|
<!-- registry-prompt:end -->
|
|
36
30
|
|
|
37
|
-
<
|
|
31
|
+
<a id="direct-install"></a>
|
|
32
|
+
|
|
33
|
+
### 直接运行命令
|
|
34
|
+
|
|
35
|
+
**替换腾讯版时不要先卸载。** 两个社区发布源都保留插件 ID、Channel ID、配置和
|
|
36
|
+
登录状态。`--force` 不会绕过 OpenClaw 的安装策略或内置依赖拒绝列表;OpenClaw
|
|
37
|
+
会自动轮换配置备份。
|
|
38
|
+
|
|
39
|
+
`--force` 允许覆盖相同插件 ID 的现有安装。
|
|
40
|
+
|
|
41
|
+
| 安装来源 | 包名 |
|
|
42
|
+
| --- | --- |
|
|
43
|
+
| npm | [`openclaw-weixin`](https://www.npmjs.com/package/openclaw-weixin) |
|
|
44
|
+
| ClawHub | [`openclaw-wechat`](https://clawhub.ai/newfuture/plugins/openclaw-wechat) |
|
|
38
45
|
|
|
39
46
|
<!-- registry-source:npm:start -->
|
|
40
|
-
<
|
|
47
|
+
<a id="npm-source"></a>
|
|
41
48
|
|
|
42
|
-
|
|
43
|
-
<code>--force</code> 表示你已审阅并明确选择该 npm 来源,同时允许覆盖相同插件 ID
|
|
44
|
-
的现有安装。</p>
|
|
49
|
+
#### npm:`openclaw-weixin`
|
|
45
50
|
|
|
46
|
-
<
|
|
51
|
+
<a id="npm-cli-install"></a>
|
|
47
52
|
|
|
48
53
|
```bash
|
|
49
54
|
openclaw plugins install npm:openclaw-weixin --force
|
|
@@ -51,51 +56,21 @@ openclaw plugins install npm:openclaw-weixin --force
|
|
|
51
56
|
<!-- registry-source:npm:end -->
|
|
52
57
|
|
|
53
58
|
<!-- registry-source:clawhub:start -->
|
|
54
|
-
<
|
|
59
|
+
<a id="clawhub-source"></a>
|
|
60
|
+
|
|
61
|
+
#### ClawHub:`openclaw-wechat`
|
|
55
62
|
|
|
56
|
-
|
|
57
|
-
页面顶部不带 <code>--force</code> 的命令适合没有现有微信插件的全新安装;下面保留
|
|
58
|
-
<code>--force</code>,使同一条命令也能原位替换占用 <code>openclaw-weixin</code>
|
|
59
|
-
插件 ID 的腾讯版或 npm 版。</p>
|
|
63
|
+
下面的命令也可原位替换占用 `openclaw-weixin` 插件 ID 的腾讯版或 npm 版。
|
|
60
64
|
|
|
61
|
-
<
|
|
65
|
+
<a id="clawhub-cli-install"></a>
|
|
62
66
|
|
|
63
67
|
```bash
|
|
64
68
|
openclaw plugins install clawhub:openclaw-wechat --force
|
|
65
69
|
```
|
|
66
70
|
<!-- registry-source:clawhub:end -->
|
|
67
71
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
<code>--force</code> 不会绕过 OpenClaw 的安装策略或内置依赖拒绝列表;OpenClaw
|
|
71
|
-
会自动轮换配置备份。</p>
|
|
72
|
-
|
|
73
|
-
## 两个社区入口
|
|
74
|
-
|
|
75
|
-
| 安装来源 | 包名 |
|
|
76
|
-
| --- | --- |
|
|
77
|
-
| npm | `openclaw-weixin` |
|
|
78
|
-
| ClawHub | `openclaw-wechat` |
|
|
79
|
-
|
|
80
|
-
本项目是 [Tencent/openclaw-weixin](https://github.com/Tencent/openclaw-weixin) 的
|
|
81
|
-
社区维护发行版;腾讯官方 npm 包是 `@tencent-weixin/openclaw-weixin`。社区版的包名和
|
|
82
|
-
发布渠道不同,但沿用 `openclaw-weixin` 插件、Channel 和状态 ID,因此可以原位替换并
|
|
83
|
-
保留现有配置与登录状态。
|
|
84
|
-
|
|
85
|
-
**两个社区入口任选一个即可,不要同时安装。**本插件需要 OpenClaw `>=2026.6.1`,并遵循
|
|
86
|
-
以下 Node.js 范围:`>=22.22.3 <23`、`>=24.15.0 <25` 或 `>=25.9.0`。
|
|
87
|
-
|
|
88
|
-
当前能力包括微信私聊、文本与媒体收发、扫码登录和多账号;插件没有声明群聊能力。
|
|
89
|
-
|
|
90
|
-
> **名称兼容:** `openclaw-wechat` 是 ClawHub 包名及 channel 兼容别名,
|
|
91
|
-
> `openclaw-weixin` 仍是规范 plugin/channel ID。在 OpenClaw 2026.7.1 及以上版本,
|
|
92
|
-
> 可以使用 `--channel openclaw-wechat` 选择同一 channel;较早的受支持宿主仍需使用
|
|
93
|
-
> `openclaw-weixin`。插件启停命令、配置和状态路径始终使用 `openclaw-weixin`,并且不要
|
|
94
|
-
> 同时安装两个发行包。
|
|
95
|
-
|
|
96
|
-
<p class="install-done"><strong>如果当前 OpenClaw 已有微信登录状态,安装后通常只需确认连接。</strong>
|
|
97
|
-
全新安装需要展开完整检查并扫码绑定;安装报错、未自动恢复连接或需要确认目标账号时,
|
|
98
|
-
也在此检查。</p>
|
|
72
|
+
**如果当前 OpenClaw 已有微信登录状态,安装后通常只需确认连接。** 全新安装需要
|
|
73
|
+
展开完整检查并扫码绑定;安装报错、未自动恢复连接或需要确认目标账号时,也在此检查。
|
|
99
74
|
|
|
100
75
|
<details id="verify-connection" class="full-check">
|
|
101
76
|
<summary>完整检查、扫码与恢复</summary>
|
|
@@ -106,11 +81,9 @@ openclaw plugins install clawhub:openclaw-wechat --force
|
|
|
106
81
|
|
|
107
82
|
```bash
|
|
108
83
|
openclaw --version
|
|
109
|
-
node --version
|
|
110
84
|
```
|
|
111
85
|
|
|
112
|
-
需要 OpenClaw `>=2026.6.1
|
|
113
|
-
安装,请不要卸载现有插件;按
|
|
86
|
+
需要 OpenClaw `>=2026.6.1`。若版本过低或 Nix 模式禁止安装,请不要卸载现有插件;按
|
|
114
87
|
[安装限制与故障排查](https://openclaw-weixin.newfuture.cc/guide.html#安装限制)处理。
|
|
115
88
|
|
|
116
89
|
### 安装后没有自动连接
|
|
@@ -123,14 +96,11 @@ openclaw plugins list
|
|
|
123
96
|
openclaw channels status --probe
|
|
124
97
|
```
|
|
125
98
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
<li>使用多账号时,探测结果对应你准备使用的别名或账号 ID。</li>
|
|
132
|
-
</ul>
|
|
133
|
-
</div>
|
|
99
|
+
**满足以下条件即表示连接成功:**
|
|
100
|
+
|
|
101
|
+
- `openclaw plugins list` 显示插件已启用,并且没有加载错误。
|
|
102
|
+
- `openclaw channels status --probe` 对目标微信账号探测成功。
|
|
103
|
+
- 使用多账号时,探测结果对应你准备使用的别名或账号 ID。
|
|
134
104
|
|
|
135
105
|
| 检查结果 | 下一步 |
|
|
136
106
|
| --- | --- |
|
|
@@ -139,7 +109,9 @@ openclaw channels status --probe
|
|
|
139
109
|
| 账号显示未登录 | 继续下面的扫码绑定 |
|
|
140
110
|
| Channel 显示 `OK` 但未连接 | 按[连接故障排查](https://openclaw-weixin.newfuture.cc/guide.html#channel-显示-ok-但未连接)重载实际运行单元 |
|
|
141
111
|
|
|
142
|
-
<
|
|
112
|
+
<a id="bind-account"></a>
|
|
113
|
+
|
|
114
|
+
### 状态显示未登录
|
|
143
115
|
|
|
144
116
|
仅在探测显示目标账号未登录时执行:
|
|
145
117
|
|
|
@@ -192,11 +164,28 @@ openclaw channels login --channel openclaw-weixin --account nezha
|
|
|
192
164
|
|
|
193
165
|
</details>
|
|
194
166
|
|
|
167
|
+
## 主动与定时发送
|
|
168
|
+
|
|
169
|
+
微信后端要求每条出站消息携带由该收件人入站消息下发的账号级 context token。插件收到
|
|
170
|
+
消息后会按账号保存该 token:
|
|
171
|
+
|
|
172
|
+
- 尚未收到该收件人的消息或 token 缺失时,插件会拒绝发送消息,不会返回本地“成功”
|
|
173
|
+
结果。
|
|
174
|
+
- 已保存的 token 仍可能失效;长时间无交互后发送失败时,请让收件人先向对应 bot
|
|
175
|
+
发送一条消息以刷新 token,再重试。
|
|
176
|
+
|
|
177
|
+
多账号部署的定时任务应同时显式设置 `delivery.to` 和 `delivery.accountId`。未指定
|
|
178
|
+
`accountId` 时,只有恰好能从账号级上下文选出一个账号才会发送;缺失或歧义都会失败。
|
|
179
|
+
context token 属于敏感数据,不要跨账号复制或写入任务配置。
|
|
180
|
+
|
|
195
181
|
## 文档与支持
|
|
196
182
|
|
|
197
|
-
- [详细指南](https://openclaw-weixin.newfuture.cc/guide.html)
|
|
183
|
+
- [详细指南](https://openclaw-weixin.newfuture.cc/guide.html):安装行为、可选配置、主动发送限制、卸载和故障排查
|
|
184
|
+
- [社区版与腾讯版](https://openclaw-weixin.newfuture.cc/distributions.html)
|
|
198
185
|
- [后端 API 协议](https://openclaw-weixin.newfuture.cc/backend-api.html)
|
|
199
186
|
- [架构说明](https://openclaw-weixin.newfuture.cc/architecture.html)
|
|
187
|
+
- [参与贡献与 Agent 工作流](https://openclaw-weixin.newfuture.cc/contributing.html):开 Issue、修复 Bug 和开发新功能
|
|
188
|
+
- [Coding Agent 指引](https://github.com/NewFuture/openclaw-weixin/blob/main/AGENTS.md)
|
|
200
189
|
- [变更日志](https://openclaw-weixin.newfuture.cc/changelog.html)
|
|
201
190
|
- [安全策略](https://openclaw-weixin.newfuture.cc/security.html)
|
|
202
191
|
- [问题反馈](https://github.com/NewFuture/openclaw-weixin/issues)
|
package/README_EN.md
CHANGED
|
@@ -4,49 +4,54 @@
|
|
|
4
4
|
[简体中文](https://openclaw-weixin.newfuture.cc/) · [Documentation site](https://openclaw-weixin.newfuture.cc/en/)
|
|
5
5
|
<!-- docs-site:repo-only:end -->
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
**Bring OpenClaw into WeChat**
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
is available from both npm and ClawHub.
|
|
13
|
-
</p>
|
|
9
|
+
A community-maintained OpenClaw WeChat channel plugin available from npm and
|
|
10
|
+
ClawHub.
|
|
11
|
+
This plugin requires OpenClaw `>=2026.6.1`.
|
|
14
12
|
|
|
15
|
-
<
|
|
13
|
+
<a id="connect-wechat"></a>
|
|
16
14
|
|
|
17
|
-
|
|
18
|
-
The prompt tries ClawHub first, falls back to npm, and completes installation
|
|
19
|
-
and connection checks; direct commands only install or replace the plugin.</p>
|
|
15
|
+
## Choose an installation method
|
|
20
16
|
|
|
21
|
-
|
|
22
|
-
<a href="#agent-install"><strong>Copy the prompt</strong><span>ClawHub first, npm fallback</span></a>
|
|
23
|
-
<span class="choice-or" aria-hidden="true">or</span>
|
|
24
|
-
<a href="#direct-install"><strong>Run a command</strong><span>Choose npm or ClawHub yourself</span></a>
|
|
25
|
-
</div>
|
|
17
|
+
[**Copy the prompt**](#agent-install) **or** [**Run a command**](#direct-install)
|
|
26
18
|
|
|
27
19
|
<!-- registry-prompt:start -->
|
|
28
|
-
<
|
|
20
|
+
<a id="agent-install"></a>
|
|
29
21
|
|
|
30
|
-
|
|
22
|
+
### Let OpenClaw complete the installation
|
|
23
|
+
|
|
24
|
+
Paste this prompt into an OpenClaw chat and send it:
|
|
31
25
|
|
|
32
26
|
```text
|
|
33
27
|
Install or replace the WeChat plugin in place for this OpenClaw instance and check its connection. Install from ClawHub `clawhub:openclaw-wechat` first; only if the ClawHub source is explicitly unavailable, fall back to npm `npm:openclaw-weixin`, and install only one.
|
|
34
|
-
|
|
35
28
|
Follow OpenClaw's install policy and use in-place replacement for an existing installation with the same `openclaw-weixin` plugin ID (the `--force` behavior), preserving configuration and login data. Use the OpenClaw plugin installation flow rather than plain `npm install`. After installation, verify that the plugin is loaded and probe the WeChat channel; prompt for QR login if needed. Briefly report the source and result, or explain the failure.
|
|
36
29
|
```
|
|
37
30
|
<!-- registry-prompt:end -->
|
|
38
31
|
|
|
39
|
-
<
|
|
32
|
+
<a id="direct-install"></a>
|
|
33
|
+
|
|
34
|
+
### Run a command directly
|
|
35
|
+
|
|
36
|
+
**Do not uninstall Tencent's package first when replacing it.** Both community
|
|
37
|
+
sources preserve the plugin id, channel id, configuration, and login state.
|
|
38
|
+
`--force` does not bypass OpenClaw's install policy or built-in dependency
|
|
39
|
+
denylist. OpenClaw rotates configuration backups automatically.
|
|
40
|
+
|
|
41
|
+
`--force` allows replacement of an existing installation with the same plugin
|
|
42
|
+
id.
|
|
43
|
+
|
|
44
|
+
| Source | Package name |
|
|
45
|
+
| --- | --- |
|
|
46
|
+
| npm | [`openclaw-weixin`](https://www.npmjs.com/package/openclaw-weixin) |
|
|
47
|
+
| ClawHub | [`openclaw-wechat`](https://clawhub.ai/newfuture/plugins/openclaw-wechat) |
|
|
40
48
|
|
|
41
49
|
<!-- registry-source:npm:start -->
|
|
42
|
-
<
|
|
50
|
+
<a id="npm-source"></a>
|
|
43
51
|
|
|
44
|
-
|
|
45
|
-
default to this source.</strong> <code>--force</code> confirms that you reviewed and
|
|
46
|
-
selected this npm source and allows replacement of an existing installation with
|
|
47
|
-
the same plugin id.</p>
|
|
52
|
+
#### npm: `openclaw-weixin`
|
|
48
53
|
|
|
49
|
-
<
|
|
54
|
+
<a id="npm-cli-install"></a>
|
|
50
55
|
|
|
51
56
|
```bash
|
|
52
57
|
openclaw plugins install npm:openclaw-weixin --force
|
|
@@ -54,61 +59,25 @@ openclaw plugins install npm:openclaw-weixin --force
|
|
|
54
59
|
<!-- registry-source:npm:end -->
|
|
55
60
|
|
|
56
61
|
<!-- registry-source:clawhub:start -->
|
|
57
|
-
<
|
|
62
|
+
<a id="clawhub-source"></a>
|
|
58
63
|
|
|
59
|
-
|
|
60
|
-
The banner command without <code>--force</code> is suitable for a fresh install
|
|
61
|
-
with no existing WeChat plugin. The command below keeps <code>--force</code> so it
|
|
62
|
-
can also replace a Tencent or npm installation that owns the
|
|
63
|
-
<code>openclaw-weixin</code> plugin id.</p>
|
|
64
|
+
#### ClawHub: `openclaw-wechat`
|
|
64
65
|
|
|
65
|
-
|
|
66
|
+
The command can also replace a Tencent or npm installation that owns the
|
|
67
|
+
`openclaw-weixin` plugin id.
|
|
68
|
+
|
|
69
|
+
<a id="clawhub-cli-install"></a>
|
|
66
70
|
|
|
67
71
|
```bash
|
|
68
72
|
openclaw plugins install clawhub:openclaw-wechat --force
|
|
69
73
|
```
|
|
70
74
|
<!-- registry-source:clawhub:end -->
|
|
71
75
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
## Community package sources
|
|
79
|
-
|
|
80
|
-
| Source | Package name |
|
|
81
|
-
| --- | --- |
|
|
82
|
-
| npm | `openclaw-weixin` |
|
|
83
|
-
| ClawHub | `openclaw-wechat` |
|
|
84
|
-
|
|
85
|
-
This project is a community-maintained distribution of
|
|
86
|
-
[Tencent/openclaw-weixin](https://github.com/Tencent/openclaw-weixin); Tencent's
|
|
87
|
-
official npm package is `@tencent-weixin/openclaw-weixin`. The community package
|
|
88
|
-
names and registries differ, but they keep the `openclaw-weixin` plugin, channel,
|
|
89
|
-
and state ID, allowing in-place replacement without losing existing configuration
|
|
90
|
-
or login state.
|
|
91
|
-
|
|
92
|
-
**Choose one community source; do not install both.** The plugin requires OpenClaw
|
|
93
|
-
`>=2026.6.1` and one of these Node.js ranges: `>=22.22.3 <23`,
|
|
94
|
-
`>=24.15.0 <25`, or `>=25.9.0`.
|
|
95
|
-
|
|
96
|
-
Current capabilities include direct chats, text and media transfer, QR login,
|
|
97
|
-
and multiple accounts. The plugin does not advertise group-chat support.
|
|
98
|
-
|
|
99
|
-
> **Name compatibility:** `openclaw-wechat` is the ClawHub package name and
|
|
100
|
-
> channel compatibility alias; `openclaw-weixin` remains the canonical
|
|
101
|
-
> plugin/channel ID. On OpenClaw 2026.7.1 and later,
|
|
102
|
-
> `--channel openclaw-wechat` selects the same channel; earlier supported hosts
|
|
103
|
-
> must continue to use `openclaw-weixin`. Plugin enable/disable commands, config,
|
|
104
|
-
> and state paths always use `openclaw-weixin`. Do not install both
|
|
105
|
-
> distributions at once.
|
|
106
|
-
|
|
107
|
-
<p class="install-done"><strong>If this OpenClaw instance already has a WeChat login,
|
|
108
|
-
you usually only need to confirm the connection after installation.</strong> For a
|
|
109
|
-
new installation, open the full check and scan the QR code. Use it as well when
|
|
110
|
-
installation fails, the connection does not return automatically, or you need to
|
|
111
|
-
confirm the intended account.</p>
|
|
76
|
+
**If this OpenClaw instance already has a WeChat login, you usually only need
|
|
77
|
+
to confirm the connection after installation.** For a new installation, open
|
|
78
|
+
the full check and scan the QR code. Use it as well when installation fails,
|
|
79
|
+
the connection does not return automatically, or you need to confirm the
|
|
80
|
+
intended account.
|
|
112
81
|
|
|
113
82
|
<details id="verify-connection" class="full-check">
|
|
114
83
|
<summary>Full check, QR login, and recovery</summary>
|
|
@@ -119,12 +88,10 @@ Check only when installation reports an incompatible version:
|
|
|
119
88
|
|
|
120
89
|
```bash
|
|
121
90
|
openclaw --version
|
|
122
|
-
node --version
|
|
123
91
|
```
|
|
124
92
|
|
|
125
|
-
The plugin requires OpenClaw `>=2026.6.1
|
|
126
|
-
|
|
127
|
-
uninstall the existing plugin. Follow the
|
|
93
|
+
The plugin requires OpenClaw `>=2026.6.1`. If the host is too old or Nix mode
|
|
94
|
+
disables installation, do not uninstall the existing plugin. Follow the
|
|
128
95
|
[installation limitations and troubleshooting](https://openclaw-weixin.newfuture.cc/en/guide.html#limitations).
|
|
129
96
|
|
|
130
97
|
### The connection does not return after installation
|
|
@@ -138,14 +105,12 @@ openclaw plugins list
|
|
|
138
105
|
openclaw channels status --probe
|
|
139
106
|
```
|
|
140
107
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
</ul>
|
|
148
|
-
</div>
|
|
108
|
+
**You are connected when all of these are true:**
|
|
109
|
+
|
|
110
|
+
- `openclaw plugins list` shows the plugin enabled with no load error.
|
|
111
|
+
- `openclaw channels status --probe` succeeds for the intended WeChat account.
|
|
112
|
+
- With multiple accounts, the result belongs to the alias or account ID you
|
|
113
|
+
intend to use.
|
|
149
114
|
|
|
150
115
|
| Result | Next action |
|
|
151
116
|
| --- | --- |
|
|
@@ -154,7 +119,9 @@ openclaw channels status --probe
|
|
|
154
119
|
| Account is not logged in | Continue to QR login below |
|
|
155
120
|
| Channel shows `OK` but does not connect | Follow [connection troubleshooting](https://openclaw-weixin.newfuture.cc/en/guide.html#channel-shows-ok-but-doesn-t-connect) to reload the actual runtime |
|
|
156
121
|
|
|
157
|
-
<
|
|
122
|
+
<a id="bind-account"></a>
|
|
123
|
+
|
|
124
|
+
### The status reports no login
|
|
158
125
|
|
|
159
126
|
Run this only when the probe reports that the intended account is not logged in:
|
|
160
127
|
|
|
@@ -212,11 +179,32 @@ files from `~/.openclaw/openclaw-weixin/`.
|
|
|
212
179
|
|
|
213
180
|
</details>
|
|
214
181
|
|
|
182
|
+
## Proactive and scheduled sends
|
|
183
|
+
|
|
184
|
+
The WeChat backend requires every outbound message to carry an account-scoped
|
|
185
|
+
context token issued by an inbound message from that recipient. The plugin
|
|
186
|
+
stores the token under the receiving account:
|
|
187
|
+
|
|
188
|
+
- If the recipient has not messaged the bot or the token is missing, the plugin
|
|
189
|
+
refuses delivery instead of returning a local success result.
|
|
190
|
+
- A stored token can still become stale. If a send fails after a long idle
|
|
191
|
+
period, ask the recipient to message the corresponding bot once to refresh
|
|
192
|
+
the token, then retry.
|
|
193
|
+
|
|
194
|
+
Scheduled jobs in multi-account deployments should explicitly set both
|
|
195
|
+
`delivery.to` and `delivery.accountId`. Without `accountId`, delivery proceeds
|
|
196
|
+
only when account-scoped context selects exactly one account; missing or
|
|
197
|
+
ambiguous context fails. Context tokens are sensitive: never copy them between
|
|
198
|
+
accounts or put them in job configuration.
|
|
199
|
+
|
|
215
200
|
## Documentation and support
|
|
216
201
|
|
|
217
|
-
- [Detailed guide](https://openclaw-weixin.newfuture.cc/en/guide.html): install behavior,
|
|
202
|
+
- [Detailed guide](https://openclaw-weixin.newfuture.cc/en/guide.html): install behavior, optional settings, proactive-send constraints, uninstall, and troubleshooting
|
|
203
|
+
- [Community and Tencent distributions](https://openclaw-weixin.newfuture.cc/en/distributions.html)
|
|
218
204
|
- [Backend API protocol](https://openclaw-weixin.newfuture.cc/en/backend-api.html)
|
|
219
205
|
- [Architecture](https://openclaw-weixin.newfuture.cc/en/architecture.html)
|
|
206
|
+
- [Contributing and agent workflows](https://openclaw-weixin.newfuture.cc/en/contributing.html): open issues, fix bugs, and develop features
|
|
207
|
+
- [Coding agent guide](https://github.com/NewFuture/openclaw-weixin/blob/main/AGENTS.md)
|
|
220
208
|
- [Changelog](https://openclaw-weixin.newfuture.cc/en/changelog.html)
|
|
221
209
|
- [Security policy](https://openclaw-weixin.newfuture.cc/en/security.html)
|
|
222
210
|
- [Issue tracker](https://github.com/NewFuture/openclaw-weixin/issues)
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { buildChannelConfigSchema } from "openclaw/plugin-sdk/channel-config-schema";
|
|
2
1
|
import { weixinPlugin } from "./src/channel.js";
|
|
3
2
|
import { assertHostCompatibility } from "./src/compat.js";
|
|
4
|
-
import {
|
|
3
|
+
import { WeixinChannelConfigSchema } from "./src/config/config-schema.js";
|
|
5
4
|
export default {
|
|
6
5
|
id: "openclaw-weixin",
|
|
7
6
|
name: "WeChat",
|
|
8
7
|
description: "Community-maintained WeChat (Weixin) channel plugin for OpenClaw using the iLink bot API.",
|
|
9
|
-
configSchema:
|
|
8
|
+
configSchema: WeixinChannelConfigSchema,
|
|
10
9
|
register(api) {
|
|
11
10
|
// Fail-fast: reject incompatible host versions before any side-effects.
|
|
12
11
|
assertHostCompatibility(api.runtime?.version);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAE1E,eAAe;IACb,EAAE,EAAE,iBAAiB;IACrB,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,2FAA2F;IACxG,YAAY,EAAE,yBAAyB;IACvC,QAAQ,CAAC,GAAsB;QAC7B,wEAAwE;QACxE,uBAAuB,CAAC,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAE9C,GAAG,CAAC,eAAe,CAAC,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC,CAAC;IAChD,CAAC;CACF,CAAC"}
|