@liangrk/claude-code-wechatbot 0.3.0 → 0.3.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 (3) hide show
  1. package/README.md +22 -8
  2. package/cli.mjs +2 -2
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -24,7 +24,7 @@ Claude Code ← MCP Channel Protocol ← wechat_reply tool
24
24
  ### 1. 微信扫码登录
25
25
 
26
26
  ```bash
27
- npx claude-code-wechat-channel setup
27
+ npx @liangrk/claude-code-wechatbot setup
28
28
  ```
29
29
 
30
30
  终端会显示二维码,用微信扫描并确认。凭据保存到 `~/.claude/channels/wechat/account.json`。
@@ -32,15 +32,17 @@ npx claude-code-wechat-channel setup
32
32
  ### 2. 生成 MCP 配置
33
33
 
34
34
  ```bash
35
- npx claude-code-wechat-channel install
35
+ npx @liangrk/claude-code-wechatbot install
36
36
  ```
37
37
 
38
38
  这会在当前目录生成(或更新) `.mcp.json`,指向本插件。
39
39
 
40
40
  ### 3. 启动 Claude Code + WeChat 通道
41
41
 
42
+ 在包含 `.mcp.json` 的目录下启动 Claude Code,MCP server 会自动加载:
43
+
42
44
  ```bash
43
- claude --dangerously-load-development-channels server:wechat
45
+ claude --dangerously-skip-permissions
44
46
  ```
45
47
 
46
48
  ### 4. 在微信中发消息
@@ -51,10 +53,18 @@ claude --dangerously-load-development-channels server:wechat
51
53
 
52
54
  | 命令 | 说明 |
53
55
  |------|------|
54
- | `npx claude-code-wechat-channel setup` | 微信扫码登录 |
55
- | `npx claude-code-wechat-channel install` | 生成 .mcp.json 配置 |
56
- | `npx claude-code-wechat-channel start` | 启动 MCP Channel 服务器 |
57
- | `npx claude-code-wechat-channel help` | 显示帮助 |
56
+ | `npx @liangrk/claude-code-wechatbot setup` | 微信扫码登录 |
57
+ | `npx @liangrk/claude-code-wechatbot install` | 生成 .mcp.json 配置 |
58
+ | `npx @liangrk/claude-code-wechatbot start` | 启动 MCP Channel 服务器 |
59
+ | `npx @liangrk/claude-code-wechatbot help` | 显示帮助 |
60
+
61
+ ## 安装
62
+
63
+ ```bash
64
+ npm install -g @liangrk/claude-code-wechatbot
65
+ ```
66
+
67
+ 全局安装后可直接使用 `claude-code-wechat-channel` 命令,无需每次 `npx`。
58
68
 
59
69
  ## 技术细节
60
70
 
@@ -62,13 +72,17 @@ claude --dangerously-load-development-channels server:wechat
62
72
  - **消息发送**: 通过 `ilink/bot/sendmessage` 发送回复
63
73
  - **认证**: 使用 `ilink/bot/get_bot_qrcode` QR 码登录获取 Bearer Token
64
74
  - **协议**: 基于 MCP (Model Context Protocol) 的 Channel 扩展
75
+ - **支持消息类型**: 文本消息、语音消息(自动转文字)
76
+ - **错误恢复**: 连续失败 3 次后指数退避,最大 60s
77
+ - **实例锁**: 防止多个实例同时运行
65
78
 
66
79
  ## 注意事项
67
80
 
68
- - 当前为 research preview 阶段,需要使用 `--dangerously-load-development-channels` 标志
81
+ - Claude Code 会自动加载 `.mcp.json` 中的 MCP server 配置
69
82
  - Claude Code 会话关闭后通道也会断开
70
83
  - 微信 ClawBot 目前仅支持 iOS 最新版
71
84
  - 每个 ClawBot 只能连接一个 agent 实例
85
+ - 微信不支持 Markdown 渲染,回复会自动转为纯文本
72
86
 
73
87
  ## License
74
88
 
package/cli.mjs CHANGED
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env node
1
+ #!/usr/bin/env node
2
2
 
3
3
  /**
4
4
  * Claude Code WeChat Channel — CLI entry point
@@ -84,7 +84,7 @@ function install() {
84
84
  console.log(`
85
85
  Next steps:
86
86
  1. Run: npx claude-code-wechat-channel setup
87
- 2. Then: claude --dangerously-load-development-channels server:wechat
87
+ 2. Then: claude --dangerously-skip-permissions
88
88
  `);
89
89
  }
90
90
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@liangrk/claude-code-wechatbot",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Claude Code Channel plugin for WeChat — bridge WeChat messages into Claude Code sessions via the official ilink API",
5
5
  "type": "module",
6
6
  "bin": {