@agent-wechat/wechat 0.2.0 → 0.2.1

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.
Files changed (2) hide show
  1. package/README.md +64 -7
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -4,18 +4,75 @@ OpenClaw channel plugin for WeChat. Polls the agent-wechat REST API for inbound
4
4
 
5
5
  ## Prerequisites
6
6
 
7
- - **agent-wechat container** running and reachable (provides the REST API on port 6174). Install [`@agent-wechat/cli`](https://www.npmjs.com/package/@agent-wechat/cli) and run `wx up`, or use Docker Compose — see the [CLI docs](https://github.com/thisnick/agent-wechat/tree/main/packages/cli#running-the-container) for setup options.
8
- - **OpenClaw** installed and configured
7
+ - [Docker](https://docs.docker.com/get-docker/) installed and running
8
+ - OpenClaw installed and configured
9
9
 
10
- > **Note:** The agent-wechat container requires `SYS_PTRACE` and `seccomp=unconfined` (ptrace access to the WeChat desktop process). It cannot run in serverless or restricted container environments — use a VM or bare-metal Docker host.
10
+ > **Note:** The agent-wechat container requires `SYS_PTRACE` and `seccomp=unconfined` (ptrace access to the WeChat desktop process). It cannot run in serverless or restricted container environments (AWS Fargate, Cloud Run, etc.) — use a VM or bare-metal Docker host.
11
11
 
12
- ## Install
12
+ ## Setup
13
+
14
+ ### 1. Start the agent-wechat container
15
+
16
+ **Option A: CLI** (quickest for local use)
17
+
18
+ ```bash
19
+ npm install -g @agent-wechat/cli
20
+ wx up
21
+ ```
22
+
23
+ **Option B: Docker Compose** (production / networked)
24
+
25
+ ```yaml
26
+ services:
27
+ agent-wechat:
28
+ image: ghcr.io/thisnick/agent-wechat:latest
29
+ container_name: agent-wechat
30
+ security_opt:
31
+ - seccomp=unconfined
32
+ cap_add:
33
+ - SYS_PTRACE
34
+ ports:
35
+ - "6174:6174"
36
+ - "127.0.0.1:5900:5900"
37
+ volumes:
38
+ - agent-wechat-data:/data
39
+ - agent-wechat-home:/home/wechat
40
+ - ~/.config/agent-wechat/token:/data/auth-token:ro
41
+ restart: unless-stopped
42
+
43
+ volumes:
44
+ agent-wechat-data:
45
+ agent-wechat-home:
46
+ ```
47
+
48
+ Generate a token before starting:
49
+
50
+ ```bash
51
+ mkdir -p ~/.config/agent-wechat
52
+ openssl rand -hex 32 > ~/.config/agent-wechat/token
53
+ chmod 600 ~/.config/agent-wechat/token
54
+ docker compose up -d
55
+ ```
56
+
57
+ If running alongside OpenClaw on the same Docker network, set `serverUrl` to `http://agent-wechat:6174` in the channel config below.
58
+
59
+ ### 2. Install the extension
13
60
 
14
61
  ```bash
15
62
  openclaw plugins install @agent-wechat/wechat
16
63
  ```
17
64
 
18
- ## Configure
65
+ ### 3. Log in to WeChat
66
+
67
+ ```bash
68
+ openclaw channels login --channel wechat
69
+ ```
70
+
71
+ This displays a QR code in your terminal — scan it with WeChat on your phone. You only need to do this once (the session persists across container restarts).
72
+
73
+ If you installed the CLI, you can also use `wx auth login`.
74
+
75
+ ### 4. Configure the channel
19
76
 
20
77
  Run the setup wizard:
21
78
 
@@ -36,13 +93,13 @@ Or edit `~/.openclaw/openclaw.json` directly:
36
93
  }
37
94
  ```
38
95
 
39
- ## Run
96
+ ### 5. Run the gateway
40
97
 
41
98
  ```bash
42
99
  openclaw gateway run --verbose
43
100
  ```
44
101
 
45
- The WeChat monitor starts polling the agent-wechat server for new messages. Make sure the agent-wechat container is running (`wx up` / `wx status`).
102
+ The WeChat monitor starts polling the agent-wechat server for new messages. Make sure the agent-wechat container is running.
46
103
 
47
104
  ## Configuration Reference
48
105
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-wechat/wechat",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",