huo15-wecom

火一五·企业微信(WeCom)OpenClaw 插件 v2.8.8 — 默认走 Bot WebSocket(响应快、配置简单),自带加密媒体解密 / Agent 主动发消息 / 微信客服三通道接入 / 多账号切换。v2.8.8 修了 WS BOT 三个图片相关缺陷:reply 用错 SDK 通道(sendMediaMessage→replyMedia 绑定 reqId)/ outbound fetch 加 desktop UA 防 COS-OSS 403 / 入向 mixed 与 quote.mixed 多图全提取。Use when: 接企业微信、给企微 Bot/自建应用接 OpenClaw、用微信客服收外部用户消息、需要图片/文件双向、跨账号切换。Do NOT use for 个人微信(不同协议)。

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "huo15-wecom" with this command: npx skills add zhaobod1/huo15-wecom

火一五企业微信插件

@huo15/wecom 是 OpenClaw 的企业微信通道插件,fork 自 yanhaidao/wecom 并持续合并上游。默认 Bot WebSocket 模式,配置简单、响应快;同时支持 Agent 自建应用主动推送和微信客服三方通道。

三条消息通道

通道用途配置入口
Bot WebSocket默认推荐,企业微信"智能机器人"WS 协议,免公网回调channels.wecom.accounts.<id>.bot.ws
Agent 自建应用走企微官方 API(CorpId/AgentId/Secret),支持主动推送给指定用户/群channels.wecom.accounts.<id>.agent
微信客服接管"客服会话",外部客户在微信/视频号里发给客服账号的消息channels.wecom.accounts.<id>.kefu

三条通道可以单独启用组合启用,多账号场景每个账号独立配置。

安装

# OpenClaw 内置安装(推荐)
openclaw plugins install @huo15/wecom

# 或者直接 npm
npm install @huo15/wecom

最小配置(Bot WS 模式)

# ~/.openclaw/openclaw.json 中
channels:
  wecom:
    enabled: true
    accounts:
      default:
        bot:
          ws:
            botId: "你的智能机器人 ID"
            secret: "WS 密钥"

启动后,Bot 收到的消息会自动路由到默认 Agent,回复也通过 WS 直接送回 — 不需要部署任何回调 endpoint。

关键能力

  • 加密媒体解密:图片/文件/语音 AES-256-CBC 解密直接拿 buffer,可让 Agent 直接读取(OCR / ASR / 文档解析)
  • Markdown V2:支持企微富文本(标题、表格、代码块、链接、引用),自动适配 chat 上下文
  • 图片回复![alt](url) 自动抽离 + uploadMedia + replyMedia,COS/OSS 预签名 URL 失败时降级为占位文本(不让"链接已过期"漏到客户端)
  • 多账号切换:单实例支持多个企业、多个智能体并存,按 conversation 路由
  • 流式回复:placeholder + partial replyStream(最多 8 次中间更新)+ ack timeout watchdog 自动重连

v2.8.8 关键修复(WS BOT 图片)

  1. Reply 通道纠错:reply 上下文从 sendMediaMessage(主动推送)改用 replyMedia(被动回复,绑定 reqId)
  2. 入向多图mixedquote.mixed 类型从只取首张改为全部提取;首张挂 ctx.MediaPath,其余落盘 + info 日志
  3. Outbound fetch UA:从裸 fetch 切到 plugin-sdk fetchRemoteMedia,显式带 desktop User-Agent,避免部分 Tencent COS / 阿里 OSS bucket 拒绝 Node 默认 UA
  4. 解析可观测性:媒体类型消息但无 attachments 时记 warn 日志(含 msgid + body keys),便于 SDK 字段漂移排查

详见 changelog/v2.8.8.md

安全实践

  • LLM 输出的 touser / chatidresolveWecomTarget sanitizer,拒绝 @all / @everyone / * 等广播字面量(v2.8.1 SECURITY 修复)
  • 跨企业上下游消息走 upstream-delivery 通道,不与本企业 Agent API 混用
  • 微信客服 corpSecret 可与 Agent corpSecret 独立配置,权限隔离

不变的设计原则

  • Bot WS 优先:能用 WS 就不用 Agent API(少配置、低延迟)
  • 失败降级:WS reply ack timeout 自动 fallback 到 Agent API(保留消息可达性),watchdog 连续 8 次后触发 WS 重连
  • 不修改 OpenClaw 核心:所有功能通过 channel plugin SDK 注册

仓库

License

ISC(继承自 yanhaidao/wecom 上游)。

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

ActivityClaw Plugin Usage

Monitors and reports agent activities including file operations, command executions, web actions, messages, and sub-agent sessions via dashboard and status c...

Registry SourceRecently Updated
6670Profile unavailable
Automation

Edicts — Ground Truth for AI Agents

Ground truth layer for AI agents — provide verified facts in every prompt and expose read/search tools for edict management. Write tools are opt-in. No more...

Registry Source
1380Profile unavailable
Automation

Message Injector

OpenClaw plugin that prepends custom text to every user message before it reaches the agent. Use for: enforcing memory_search before replies, injecting syste...

Registry Source
6290Profile unavailable
General

Lunara Voice

Bundle for Lunara Voice OpenClaw plugin with install and publish helpers

Registry SourceRecently Updated
6792Profile unavailable