← 返回 Skills 市场
Weixin Runtime Fix
作者
johnsonxuan
· GitHub ↗
· v2.4.2
· MIT-0
30
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install weixin-runtime-fix
功能描述
修复 @tencent-weixin/[email protected] 在 OpenClaw 2026.5.4+ 上的两个关键 bug: 1. Runtime 模块隔离导致 waitForWeixinRuntime 超时 2. undici 8.2.0 拒绝手动设置的 Content-Length 头...
使用说明 (SKILL.md)
openclaw-weixin-fix
修复 @tencent-weixin/[email protected] 在 OpenClaw 2026.5.4+ 上的关键 bug。
问题
- Runtime 模块隔离:
runtime.ts被加载两次,waitForWeixinRuntime()读取的实例与setWeixinRuntime()写入的实例不同,导致超时 - Content-Length 拒绝:undici 8.2.0 不允许手动设置
Content-Length头
修复内容
改动1:channel.js — 传递 channelRuntime
return monitorWeixinProvider({
...
setStatus: ctx.setStatus,
+ channelRuntime: ctx.channelRuntime,
});
改动2:monitor.js — 优先使用传入的 channelRuntime
let channelRuntime;
- try {
- const pluginRuntime = await waitForWeixinRuntime();
- channelRuntime = pluginRuntime.channel;
- }
+ if (opts.channelRuntime) {
+ channelRuntime = opts.channelRuntime;
+ } else {
+ try {
+ const pluginRuntime = await waitForWeixinRuntime();
+ channelRuntime = pluginRuntime.channel;
+ }
+ catch (err) { ... }
+ }
改动3:api.js — 删除 Content-Length 头
删除 buildHeaders() 中手动设置 Content-Length 的代码。
验证结果
- ✅ 微信消息接收正常
- ✅ 微信回复发送成功
- ✅ 文件上传正常
- ✅
openclaw health --json显示lastError: null
注意事项
- 每次
openclaw plugins install重装插件后,需要重新运行此修复 - 备份文件:
channel.js.bak和monitor.js.bak
相关链接
安全使用建议
Install only if you use the affected @tencent-weixin/openclaw-weixin version and want to patch it locally. Review install.sh, confirm the target files are correct, preserve the .bak backups, and be prepared to reinstall or restore the plugin if the patch does not work.
功能分析
Type: OpenClaw Skill
Name: weixin-runtime-fix
Version: 2.4.2
The skill is a specialized patch designed to fix compatibility issues between the OpenClaw gateway and the WeChat plugin. It uses an installation script (install.sh) to modify local JavaScript files within the plugin's directory, specifically addressing module isolation and HTTP header restrictions. The operations are transparent, include file backups, and are strictly scoped to the plugin's path (~/.openclaw/npm/node_modules/@tencent-weixin/openclaw-weixin) as defined in SKILL.md.
能力评估
Purpose & Capability
The stated purpose and included script align: the skill patches @tencent-weixin/openclaw-weixin files to fix runtime and Content-Length issues. The capability is sensitive because it changes installed OpenClaw plugin code.
Instruction Scope
The SKILL.md and README describe the intended file changes, backup behavior, and affected plugin path. No hidden network calls, credential use, or unrelated tasks are shown.
Install Mechanism
There is no declarative install spec, but README instructs users to run bash install.sh. The script uses local shell, sed, and python3 to patch files, so users should review and run it intentionally.
Credentials
Requested write access is limited to ~/.openclaw/npm/node_modules/@tencent-weixin/openclaw-weixin/**, matching the repair purpose. This is still a persistent change to the local OpenClaw runtime environment.
Persistence & Privilege
The patch persists until restored, overwritten, or the plugin is reinstalled. The artifacts disclose .bak backups and do not show background processes, credential access, or autonomous persistence.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install weixin-runtime-fix - 安装完成后,直接呼叫该 Skill 的名称或使用
/weixin-runtime-fix触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v2.4.2
- Fixes two major bugs affecting @tencent-weixin/[email protected] on OpenClaw 2026.5.4+:
- Resolves runtime module isolation causing waitForWeixinRuntime timeout.
- Removes manual Content-Length header that undici 8.2.0 rejects.
- Ensures Weixin channel can send and receive messages normally.
- Simple installation: patches plugin files directly and backs up originals with .bak extension.
- No additional configuration required.
元数据
常见问题
Weixin Runtime Fix 是什么?
修复 @tencent-weixin/[email protected] 在 OpenClaw 2026.5.4+ 上的两个关键 bug: 1. Runtime 模块隔离导致 waitForWeixinRuntime 超时 2. undici 8.2.0 拒绝手动设置的 Content-Length 头... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 30 次。
如何安装 Weixin Runtime Fix?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install weixin-runtime-fix」即可一键安装,无需额外配置。
Weixin Runtime Fix 是免费的吗?
是的,Weixin Runtime Fix 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Weixin Runtime Fix 支持哪些平台?
Weixin Runtime Fix 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Weixin Runtime Fix?
由 johnsonxuan(@johnsonxuan)开发并维护,当前版本 v2.4.2。
推荐 Skills