Skip to content

Releases

0.5.0

Choose a tag to compare

@xixi25937 xixi25937 released this 06 Nov 06:10

0.5.0

  • 思考强度 / Thinking effort: 思考, 思考 高, 思考 拉满, 3 思考 低, /effort high. OpenCode changes the session's model variant; Codex uses it from the next turn. /model keeps the level.
  • 模型, 模型 46 work like /model.
  • 发错图片 / Drop a wrong image before the text goes out: 不要 2, 上一张不要, 发错了. A message recalled in WeChat is ignored (based on delete_time_ms, not verified on a phone).
  • 发文件不卡 / 图, 文件, 3 文件 1 3 upload in the background; an upload with no progress for 15 s is retried (WECHAT_NOTIFY_STALL_MS).
  • 撤回 stops the running reply at once; the undo itself still waits for 撤回 确认.
  • 额度 / Quota: 咕咕嘎嘎 resets the quota and flushes the queue without a reply; 清空队列 drops the queue. Queued messages are sent one by one, not merged; a flush that stops early says how many are left.

v0.4.1: faster Codex replies, kept-warm app-server

Choose a tag to compare

@xixi25937 xixi25937 released this 31 Oct 02:46

Faster Codex replies from WeChat, especially after the PC wakes from sleep.

  • Codex background program kept running: the process that receives WeChat messages starts its own codex app-server right away and keeps it running (no 10-minute idle stop). /stop closes it (after a reply started from WeChat finishes), /start opens it again; it restarts itself with backoff if it crashes. Sending to a conversation that isn't open in the Codex window no longer waits 3 to 9 s for it to start.
  • No queueing behind slow commands: messages for different conversations are handled in parallel, in order within one conversation. 帮助, 列表 and 额度 answer at once.
  • N and N 历史 for Codex read the local history database (milliseconds) and fall back to the old path when it's incomplete.
  • After sleep: wake is detected and polling resumes immediately; reconnect waits are capped at 30 s (were up to 5 min).

Codex 从微信发消息更快了,电脑睡醒后尤其明显:

  • Codex 后台程序一直开着,不再空闲 10 分钟就关;「/stop」关掉它,「/start」重新打开。
  • 慢的命令不再挡着别的:「帮助」「列表」「额度」马上回。
  • 「N」「N 历史」直接读本地记录,几毫秒出结果。
  • 电脑睡醒后马上重新收消息,断网重连最多等 30 秒(原来最长 5 分钟)。

Install / update: npx agent-wechat-bridge@latest setup

v0.4.0: smarter quota use, /start and /stop

Choose a tag to compare

@xixi25937 xixi25937 released this 30 Oct 03:12

Use WeChat's send quota carefully, and pause the bridge from WeChat.

Quota (WeChat lets a bot send about 10 messages per message you send):

  • Bigger messages: up to 3500 characters per message (was 1800); the file offer is folded into the final reply.
  • Priority: the last 3 sends are kept for approvals, questions, errors, final replies and command replies. Live progress and file offers go first when quota runs low; live progress slows from every 15 s to every 60 s once half is used.
  • Nothing is lost: when the quota runs out, unsent messages wait in a queue (20 items, 24 h). One notice tells you how many are waiting; your next message flushes them in order.
  • 额度 / /quota shows usage and the queue size.

Pause / resume:

  • /stop (or 停止服务) pauses the whole bridge: no pushes from any process, WeChat commands ignored except /start, 帮助, 额度; Codex approvals stay on the computer. The paused state survives restarts.
  • /start resumes and sends anything queued before the pause.
  • Changed: plain /stop no longer stops a conversation's running reply. Use N /stop (e.g. 3 /stop) for that.

If long messages arrive truncated on your phone, set WECHAT_NOTIFY_CHUNK=1800.

额度:单条消息最多 3500 字,文件清单并进最终回复;最后 3 条留给批准、提问、出错、最终回复和命令回复;额度用完后没发出去的消息排队,回任意一句话就补发;发「额度」看用量。暂停:「/stop」暂停整个服务,「/start」恢复。注意:不带编号的「/stop」现在是暂停服务,停某个对话要写「3 /stop」。

Install / update: npx agent-wechat-bridge@latest setup

v0.3.0: send files to WeChat on request

Choose a tag to compare

@xixi25937 xixi25937 released this 30 Oct 02:14

Send files from your computer to WeChat, on request.

  • File offers after each turn (OpenCode and Codex): when a turn mentions or changes files, one extra message lists them with sizes. Reply N 文件 1 3 to receive the ones you pick, N 文件 全部 for all, or ignore it and nothing is sent. Offers expire after 24 h; N 文件 shows the current one again.
  • Send any file by path: 文件 路径 / /file 路径 (relative paths use the folder picked with 目录).
  • What gets listed: paths in the final reply plus files the turn created or edited (OpenCode write/edit tools and session diff; Codex fileChange items). Images still arrive automatically and are not listed. Likely secrets (.env*, *.pem, *.key, id_rsa*, auth.json, .ssh/, ~/.cli-bridge, …) are never offered.
  • Switch: 文件提示 关 / 文件提示 开 (/files off|on).
  • Limits: 50 MB per file; each file is one bot message and counts toward WeChat's ~10 messages per message you send.
  • CDN uploads retry on 5xx and dropped connections (images benefit too).

微信里也能收文件了:每轮跑完,产出或提到的文件会列成一条清单,回「N 文件 1 3」发你选的,「N 文件 全部」全发,不回复就不发,不会堆在聊天里。也可以用「文件 路径」直接发电脑上的任意文件。图片照旧直接发;像密钥的文件不会出现在清单里。单个文件最大 50 MB。

Install / update: npx agent-wechat-bridge@latest setup

v0.2.0: works without OpenCode (Codex-only)

Choose a tag to compare

@xixi25937 xixi25937 released this 29 Oct 17:02

Codex-only users can now use everything from WeChat.

  • Standalone daemon (agent-wechat-bridge daemon, daemon.js): receives WeChat messages and runs the commands without OpenCode. setup installs it at login automatically when OpenCode isn't installed (hidden launcher in the Windows Startup folder, LaunchAgent on macOS, systemd user unit on Linux). With OpenCode installed, add --daemon to also receive messages while OpenCode is closed. --no-daemon skips it; setup --uninstall-daemon removes and stops it.
  • One receiver at a time: the OpenCode plugin and the daemon share ~/.cli-bridge/poll.lock (heartbeat every 15 s, a dead holder is replaced within about a minute), so they can run side by side.
  • setup no longer writes an OpenCode config when OpenCode isn't installed.
  • Commands for OpenCode conversations reply "OpenCode isn't running" instead of failing when only the daemon runs.

只用 Codex 的用户现在也能在微信里完整使用:新增后台程序 daemon.js,没装 OpenCode 时 setup 会把它设成开机自动启动;装了 OpenCode 的可以加 --daemon,OpenCode 关着时也能收消息。插件和后台程序靠 ~/.cli-bridge/poll.lock 保证同一时间只有一个在收消息。

Install / update: npx agent-wechat-bridge@latest setup

v0.1.0

Choose a tag to compare

@xixi25937 xixi25937 released this 29 Oct 15:15

English

First public release. Drive OpenCode (V2 server plugin) and Codex (hooks) from WeChat through a ClawBot (iLink bot API). Node standard library only.

Features

  • Push each turn's final reply, merged live progress and errors to WeChat, with images mentioned in replies.
  • Approve permission requests by replying 3 y / 3 n (Codex desktop: answer on the PC or in WeChat, whichever comes first).
  • Answer the agent's questions from WeChat (option number, option text or free text).
  • Continue any OpenCode or Codex conversation with 3 your message, read history, /model, /stop, /compact, undo, start a new conversation in a chosen folder, send images and files.
  • setup.js registers the plugin and the three Codex hooks in one step (backs up first, idempotent, keeps JSONC comments; --dry-run, --opencode-only, --codex-only).

Install from source

git clone https://github.com/xixi25937/agent-wechat-bridge
cd agent-wechat-bridge
node setup.js

Log in the WeChat bot first with npx -p cli-chat-bridge wechat-setup. After setup, trust the hooks in codex → /hooks and restart OpenCode.

Known limitations

  • One WeChat bot, one account.
  • WeChat allows about 10 bot messages after each message you send; send the bot any message to reset it.
  • Codex desktop integration uses an undocumented local IPC (codex-ipc, checked on desktop 26.1023) and may break on Codex updates.
  • The Codex terminal UI (codex) cannot answer questions from WeChat; answer in the terminal.
  • Developed and used on Windows only; needs OpenCode 2.x and Node.js 20.3+.

中文

首个公开版本。通过微信 ClawBot(iLink bot API)在微信里控制 OpenCode(V2 服务端插件)和 Codex(hooks)。只用 Node 标准库,无依赖。

功能

  • 每轮最终回复、合并后的实时进度和错误推送到微信,回复里提到的图片一并发送。
  • 回复 3 y / 3 n 批准权限请求(Codex 桌面端:电脑上或微信里先答的算数)。
  • 在微信里回答 Agent 的提问(选项编号、选项文字或自由文本)。
  • 3 你的消息 继续任意 OpenCode / Codex 对话,查看历史,/model、/stop、/compact、撤回、在指定目录新建对话、发送图片和文件。
  • setup.js 一步配好插件和 Codex 的三个 hook(先备份、可重复运行、保留 JSONC 注释;支持 --dry-run、--opencode-only、--codex-only)。

从源码安装

git clone https://github.com/xixi25937/agent-wechat-bridge
cd agent-wechat-bridge
node setup.js

先用 npx -p cli-chat-bridge wechat-setup 登录微信机器人。setup 之后,在 codex 里 /hooks 信任 hook,并重启 OpenCode。

已知限制

  • 只支持一个微信机器人、一个账号。
  • 微信限制每发一条消息后机器人最多回约 10 条;给机器人发任意一条消息即可重置。
  • Codex 桌面端集成使用未公开的本地 IPC(codex-ipc,在桌面版 26.1023 上验证),Codex 更新后可能失效。
  • Codex 终端界面(codex)不能在微信里回答提问,请在终端里回答。
  • 只在 Windows 上开发和使用;需要 OpenCode 2.x 和 Node.js 20.3+。