npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@openduo/channel-wechat

v0.1.3

Published

WeChat channel plugin for duoduo

Readme

@openduo/channel-wechat

WeChat channel plugin for duoduo — connects WeChat (via ilink bot API) to your duoduo agent.

How it works

  1. Clone this repo, install dependencies, and start the adapter
  2. If no valid session exists, the process outputs: QRCODE_READY:/path/to/qrcode.png
  3. A Feishu Agent (duoduo) reads this signal, fetches the PNG, and sends it to the user via Feishu
  4. The user scans the QR code with WeChat
  5. The process outputs: WECHAT_CONNECTED:<botId> — the channel is live
  6. All WeChat messages are forwarded to the openduo daemon and responses are sent back

The entire onboarding flow happens inside Feishu — no terminal access required.

Install

duoduo channel install @openduo/channel-wechat

For a local tarball:

npm pack
duoduo channel install ./openduo-channel-wechat-0.1.0.tgz

Quickstart

gh repo clone winfred5432/channel-wechat
cd channel-wechat
npm ci
npm run build:plugin
cp .env.example .env
# edit .env if needed
npm start

The agent monitors stdout for QRCODE_READY: and WECHAT_CONNECTED: signals.

For stdio or TTY workflows, render the current pending QR code as terminal characters without parsing logs:

duoduo-wechat qrcode-terminal --state-dir ~/.aladuo/channel-wechat

If you are running from a source checkout or package root:

node dist/plugin.js qrcode-terminal --state-dir ~/.aladuo/channel-wechat

Environment Variables

| Variable | Default | Description | |----------|---------|-------------| | ALADUO_DAEMON_URL | http://127.0.0.1:20233 | openduo daemon RPC URL | | WECHAT_API_BASE | https://ilinkai.weixin.qq.com | ilink bot API base URL | | WECHAT_DM_POLICY | open | open (all users) or allowlist | | WECHAT_ALLOW_FROM | — | Comma-separated WeChat userIds (allowlist mode only) | | WECHAT_STATE_DIR | ~/.aladuo/channel-wechat | Persisted token and sync cursor | | WECHAT_LOG_LEVEL | info | error | warn | info | debug | | WECHAT_BOT_AGENT | Duoduo/<package-version> | Self-declared UA-style bot agent sent as base_info.bot_agent for WeChat backend attribution |

Architecture

WeChat (ilink bot API)
       │
       ▼
  [channel-wechat]
  ┌─────────────────────────────────────┐
  │  auth.ts — QR login state machine   │
  │  wechat.ts — ilink HTTP client      │
  │  gateway.ts — ingress + pull loops  │
  │  daemon.ts — openduo RPC client     │
  └─────────────────────────────────────┘
       │
       ▼
  openduo daemon  ←→  Claude / Agent

State Directory

Default: ~/.aladuo/channel-wechat/

| File | Description | |------|-------------| | credentials.json | Auth token (chmod 600) | | sync-buf.txt | Message cursor for getupdates | | qrcode.png | Temporary — deleted after scan | | qrcode.txt | Temporary raw QR payload for qrcode-terminal |

Development

npm ci
npm run dev         # run with tsx (hot reload friendly)
npm test            # vitest unit tests
npm run test:coverage  # coverage report
npm run build       # bundle dist/plugin.js

License

MIT