@wenbin_wb/dsh-bridge 1.0.8 → 1.2.0
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.
- package/README.md +53 -5
- package/README.zh-CN.md +53 -5
- package/client/client.js +501 -42
- package/client/index.js +458 -44
- package/docs/banner.jpg +0 -0
- package/docs/custom-tunnel.md +220 -0
- package/docs/wechat-usage.md +101 -0
- package/lib/bridge-rpc-constants.js +21 -0
- package/lib/bridge-rpc.js +89 -13
- package/lib/index.js +45 -2
- package/lib/wechat/gateway.js +807 -0
- package/lib/wechat/index.js +189 -0
- package/lib/wechat/media.js +275 -0
- package/lib/wechat/node.js +1040 -0
- package/package.json +9 -4
package/README.md
CHANGED
|
@@ -6,16 +6,19 @@
|
|
|
6
6
|
|
|
7
7
|
> Multi-channel remote access plugin for DeepSeek Harness
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Keep using your DeepSeek Harness on the go. Scan a QR code with your phone and keep working from your sofa, another room, or across the world — no need to sit at your desk, no need to be on the same network, and no need to set up your own public server.
|
|
10
|
+
|
|
11
|
+
Seamlessly extend your local DeepSeek Harness to mobile phones, tablets, public networks, and even WeChat. Access your AI assistant anytime, anywhere via QR code scanning, web browsers, or the WeChat Bot.
|
|
10
12
|
|
|
11
13
|
---
|
|
12
14
|
|
|
13
15
|
## Features
|
|
14
16
|
|
|
15
|
-
- **LAN Access**: Scan QR code with your smartphone/tablet, direct access on the same Wi-Fi
|
|
16
|
-
- **Cloudflare Tunnel**: One-click public internet exposure, connect from anywhere
|
|
17
|
+
- **LAN Access**: Scan QR code with your smartphone/tablet, direct access on the same Wi-Fi — keep the conversation going from your phone
|
|
18
|
+
- **Cloudflare Tunnel**: One-click public internet exposure, connect from anywhere without a public server of your own — keep working even when you're away from home
|
|
17
19
|
- **Custom Tunnel**: Connect to your own tunnel server with a fixed domain ([Setup Guide](docs/custom-tunnel.md))
|
|
18
|
-
- **
|
|
20
|
+
- **WeChat Bot (ClawBot / iLink)**: Scan a QR code to log in a WeChat personal account, then chat with, control, and approve your DeepSeek Harness agents right inside WeChat. **Multi-workspace selection, restart-persistent sessions, grouped session listing with titles, media (image/file/voice) transfer, and permission approvals** — over Tencent's official iLink Bot API, no public server or tunnel required ([Usage Guide](docs/wechat-usage.md))
|
|
21
|
+
- **IM Integration (More Planned)**: WeChat / QQ / Feishu / OpenClaw direct chat integration
|
|
19
22
|
- **Security Alerts**: URLs and QR codes with access warnings to prevent accidental sharing
|
|
20
23
|
- **Auto Version Check**: Automatic update detection when entering the panel
|
|
21
24
|
|
|
@@ -30,7 +33,7 @@ Seamlessly extend your local DeepSeek Harness to mobile phones, tablets, public
|
|
|
30
33
|
|
|
31
34
|
| Target | Description | Status |
|
|
32
35
|
|--------|-------------|--------|
|
|
33
|
-
| **WeChat** | Chat with your Agent directly in WeChat |
|
|
36
|
+
| **WeChat** | Chat with your Agent directly in WeChat | Supported (workspaces / persisted sessions / media / approvals) |
|
|
34
37
|
| **QQ Bot** | QQ bot integration for group/private chat | Planned |
|
|
35
38
|
| **Feishu** | Feishu message/bot integration for workplace scenarios | Planned |
|
|
36
39
|
| **OpenClaw** | Integration with OpenClaw ecosystem | Planned |
|
|
@@ -108,6 +111,51 @@ Requires a server with public IP. See [Custom Tunnel Guide](docs/custom-tunnel.m
|
|
|
108
111
|
|
|
109
112
|
Config is auto-persisted to `~/.dsh/dsh-bridge/config.json`, no need to re-enter after restart.
|
|
110
113
|
|
|
114
|
+
### WeChat Bot (ClawBot / iLink)
|
|
115
|
+
|
|
116
|
+
Built on Tencent's official WeChat ClawBot feature (iLink Bot API). Scan a QR code to log in a WeChat personal account, then chat with, control, and approve your DeepSeek Harness agents directly in WeChat — all through Tencent's official servers, no public server or tunnel required.
|
|
117
|
+
|
|
118
|
+
**Highlights**
|
|
119
|
+
|
|
120
|
+
- 🗂️ **Multi-workspace**: `/workspaces` to list workspaces; `@N` or `@path` to create sessions in a specific project directory
|
|
121
|
+
- 💾 **Persistent sessions**: sessions survive DSH restarts — just keep chatting
|
|
122
|
+
- 🏷️ **Session titles**: `/sessions` shows sessions grouped by workspace, each with an auto-generated title
|
|
123
|
+
- 🖼️ **Media**: send/receive images, files, and voice (auto-transcribed)
|
|
124
|
+
- 📝 **Approvals**: sensitive operations approved in WeChat, auto-denied on timeout
|
|
125
|
+
- 🔔 **Live status**: heartbeat progress + "typing" indicator, long replies auto-chunked
|
|
126
|
+
|
|
127
|
+
**Usage**
|
|
128
|
+
|
|
129
|
+
1. Open Settings → "Remote Access" → "IM Bots" tab → select "WeChat"
|
|
130
|
+
2. Click "Scan Login" and scan the QR code with WeChat, then confirm
|
|
131
|
+
3. After login, **send the bot your first message to auto-complete allowlist authorization** (one step)
|
|
132
|
+
4. Start issuing commands in WeChat
|
|
133
|
+
|
|
134
|
+
**Commands in WeChat** (full details in [WeChat Bot Guide](docs/wechat-usage.md))
|
|
135
|
+
|
|
136
|
+
| Command | What it does |
|
|
137
|
+
|---------|--------------|
|
|
138
|
+
| *(plain text)* | Routes to the active agent |
|
|
139
|
+
| `/sessions` | List sessions (grouped by workspace, with titles) |
|
|
140
|
+
| `/use N` | Switch to session N |
|
|
141
|
+
| `/workspaces` | List available workspaces |
|
|
142
|
+
| `/new <prompt>` | Create a fresh session and start (current workspace) |
|
|
143
|
+
| `/new <prompt> @N` (or `@path`) | Create a session in a specific workspace |
|
|
144
|
+
| `/stop` | Cancel the active turn |
|
|
145
|
+
| `/status` | Agent status + session summary |
|
|
146
|
+
| `/yes` `/no` (or `1`/`2`) | Answer a permission request |
|
|
147
|
+
| `/start` | Auto-start a session after first scan |
|
|
148
|
+
| `/help` | Command list |
|
|
149
|
+
|
|
150
|
+
**Security**
|
|
151
|
+
|
|
152
|
+
- Hard allowlist: only allowlisted WeChat users can drive the agent; everyone else is ignored and never fed to the model
|
|
153
|
+
- Approvals default to deny: a permission request not answered with `/yes` within the timeout (default 10 min) is auto-rejected
|
|
154
|
+
- Credentials are stored via the DSH credential service, never in plain config
|
|
155
|
+
- iLink allows exactly **one poller per account** (exclusive lock); coexisting with hermes-agent / OpenClaw causes HTTP 403 drops. **Use a dedicated WeChat account** for the bot
|
|
156
|
+
|
|
157
|
+
> Disclaimer: iLink is Tencent's official open channel but still subject to the WeChat ClawBot Terms of Use, including content filtering and rate limits. Not recommended for mission-critical use.
|
|
158
|
+
|
|
111
159
|
---
|
|
112
160
|
|
|
113
161
|
## Optional Configuration
|
package/README.zh-CN.md
CHANGED
|
@@ -6,16 +6,19 @@
|
|
|
6
6
|
|
|
7
7
|
> DeepSeek Harness 多通道远程访问插件
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
手机扫个码,人不在电脑前也能继续用 DeepSeek Harness。躺在沙发上、出差在外、跨网访问——都不用守着电脑,也不用自己搭公网服务器,扫码就能在手机/平板或任意设备上接着干。
|
|
10
|
+
|
|
11
|
+
把你本地的 DeepSeek Harness 无缝延伸到手机、平板、公网、甚至微信。无论你在哪,都能通过扫码、网页或微信 Bot,随时调用你的 AI 助手。
|
|
10
12
|
|
|
11
13
|
---
|
|
12
14
|
|
|
13
15
|
## 功能特性
|
|
14
16
|
|
|
15
|
-
- **局域网访问**:手机/平板扫码,同一 Wi-Fi
|
|
16
|
-
- **Cloudflare
|
|
17
|
+
- **局域网访问**:手机/平板扫码,同一 Wi-Fi 直接访问,躺着也能在手机上接着聊
|
|
18
|
+
- **Cloudflare 隧道**:一键暴露公网地址,随时随地连接,出差在外、不在家也能接着干,无需自建公网服务器
|
|
17
19
|
- **自建隧道**:连接自己的隧道服务器,获得固定域名([搭建教程](docs/custom-tunnel.md))
|
|
18
|
-
-
|
|
20
|
+
- **微信 Bot(ClawBot / iLink)**:扫码登录微信个人号后,直接在微信里对话、控制 DeepSeek Harness 的 agent。**支持多工作区选择、会话跨重启持久化、按工作区分组查看、媒体(图片/文件/语音)收发、权限审批**——走腾讯官方 iLink Bot API,无需公网([使用说明](docs/wechat-usage.md))
|
|
21
|
+
- **IM 集成(更多平台规划中)**:QQ / 飞书 / OpenClaw,直接在聊天软件里呼唤你的 Agent
|
|
19
22
|
- **安全提示**:URL 和二维码带访问警告,防止误分享
|
|
20
23
|
- **版本检查**:进入面板自动检测是否有新版本
|
|
21
24
|
|
|
@@ -30,7 +33,7 @@
|
|
|
30
33
|
|
|
31
34
|
| 目标 | 说明 | 状态 |
|
|
32
35
|
|------|------|------|
|
|
33
|
-
| **微信** | 在微信里直接与你的 Agent 对话 |
|
|
36
|
+
| **微信** | 在微信里直接与你的 Agent 对话 | 已支持(多工作区 / 会话持久化 / 媒体 / 审批) |
|
|
34
37
|
| **QQ Bot** | 接入 QQ 机器人,群聊/私聊唤起 Agent | 规划中 |
|
|
35
38
|
| **飞书** | 飞书消息/机器人集成,办公场景直接调用 | 规划中 |
|
|
36
39
|
| **OpenClaw** | 与 OpenClaw 生态打通 | 规划中 |
|
|
@@ -108,6 +111,51 @@ dsh plugin --profile web add ./dsh-bridge
|
|
|
108
111
|
|
|
109
112
|
配置自动持久化,重启后无需重新填写。
|
|
110
113
|
|
|
114
|
+
### 微信 Bot(ClawBot / iLink)
|
|
115
|
+
|
|
116
|
+
基于腾讯官方开放的微信 ClawBot 插件功能(底层 iLink Bot API),扫码登录微信个人号后,即可在微信里直接与你的 DeepSeek Harness agent 对话、控制和审批,全程走腾讯官方服务器,无需公网与隧道。
|
|
117
|
+
|
|
118
|
+
**功能亮点**
|
|
119
|
+
|
|
120
|
+
- 🗂️ **多工作区**:`/workspaces` 查看工作区,`@N` 或 `@路径` 指定项目目录新建会话
|
|
121
|
+
- 💾 **会话持久化**:重启 DSH 后会话不丢失,直接续聊
|
|
122
|
+
- 🏷️ **会话标题**:`/sessions` 按工作区分组、显示每个会话的标题,一眼可辨
|
|
123
|
+
- 🖼️ **媒体收发**:支持图片/文件/语音(自动转文字)双向传输
|
|
124
|
+
- 📝 **审批问答**:敏感操作在微信里审批,超时自动拒绝
|
|
125
|
+
- 🔔 **状态推送**:任务进行中心跳进度 + "正在输入"指示,长回复自动分条
|
|
126
|
+
|
|
127
|
+
**使用步骤**
|
|
128
|
+
|
|
129
|
+
1. 打开设置页「远程访问」→「IM 机器人」→ 选中「微信」
|
|
130
|
+
2. 点「扫码登录」,用微信扫二维码并按提示确认
|
|
131
|
+
3. 登录成功后,**向该微信 Bot 发送第一条消息即自动完成白名单授权**(一步到位)
|
|
132
|
+
4. 之后就可以在微信里下命令了
|
|
133
|
+
|
|
134
|
+
**微信里的命令**(完整说明见 [微信 Bot 使用说明](docs/wechat-usage.md))
|
|
135
|
+
|
|
136
|
+
| 命令 | 说明 |
|
|
137
|
+
|------|------|
|
|
138
|
+
| *(普通文本)* | 发给当前活动 agent |
|
|
139
|
+
| `/sessions` | 列出会话(按工作区分组,带标题) |
|
|
140
|
+
| `/use N` | 切换到会话 N |
|
|
141
|
+
| `/workspaces` | 列出可用工作区 |
|
|
142
|
+
| `/new <提示词>` | 新建会话并开始(当前工作区) |
|
|
143
|
+
| `/new <提示词> @N`(或 `@路径`) | 在指定工作区新建会话 |
|
|
144
|
+
| `/stop` | 停止当前任务 |
|
|
145
|
+
| `/status` | 查看 agent 状态与会话摘要 |
|
|
146
|
+
| `/yes` `/no`(或 `1`/`2`) | 回应权限审批请求 |
|
|
147
|
+
| `/start` | 首次扫码后自动开始一个会话 |
|
|
148
|
+
| `/help` | 查看全部命令 |
|
|
149
|
+
|
|
150
|
+
**安全说明**
|
|
151
|
+
|
|
152
|
+
- 强制白名单:仅白名单内的微信用户能驱动 agent,其他人发的消息会被忽略、绝不喂给模型
|
|
153
|
+
- 审批默认拒绝:权限请求在规定时间(默认 10 分钟)内未回复 `/yes` 则自动拒绝
|
|
154
|
+
- 凭证存于 DSH 凭证服务,不落配置明文
|
|
155
|
+
- 同一微信账号同一时间只允许一个 Bot 轮询(iLink 独占锁);若同时使用 hermes-agent / OpenClaw 会互相 403。**请使用专用微信账号**承载 Bot
|
|
156
|
+
|
|
157
|
+
> 声明:iLink 为腾讯官方开放通道,仍需遵守《微信 ClawBot 功能使用条款》,腾讯保留内容过滤和限速的权利。不建议用于核心业务。
|
|
158
|
+
|
|
111
159
|
---
|
|
112
160
|
|
|
113
161
|
## 可选配置
|