@wenbin_wb/dsh-bridge 2.8.6 → 2.9.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.en.md CHANGED
@@ -1,572 +1,408 @@
1
- # dsh-bridge
2
-
3
- <p align="center">
4
- <img src="docs/banner.jpg" alt="dsh-bridge banner" width="100%" />
5
- </p>
6
-
7
- <p align="center">
8
- <a href="https://www.npmjs.com/package/@wenbin_wb/dsh-bridge"><img src="https://img.shields.io/npm/v/@wenbin_wb/dsh-bridge.svg?style=flat-square&color=38bdf8&logo=npm" alt="npm version" /></a>
9
- <a href="https://www.npmjs.com/package/@wenbin_wb/dsh-bridge"><img src="https://img.shields.io/npm/dt/@wenbin_wb/dsh-bridge.svg?style=flat-square&color=fbbf24&logo=npm" alt="npm downloads" /></a>
10
- <a href="https://github.com/wenbin-wb/dsh-bridge/releases"><img src="https://img.shields.io/github/v/release/wenbin-wb/dsh-bridge?style=flat-square&color=10b981&logo=github" alt="GitHub release" /></a>
11
- <a href="https://github.com/wenbin-wb/dsh-bridge/stargazers"><img src="https://img.shields.io/github/stars/wenbin-wb/dsh-bridge?style=flat-square&color=f43f5e&logo=github" alt="GitHub stars" /></a>
12
- <a href="https://nodejs.org/"><img src="https://img.shields.io/badge/Node.js-%E2%89%A522.19%20%7C%20%E2%89%A524-339933?style=flat-square&logo=node.js" alt="Node.js version" /></a>
13
- <a href="LICENSE"><img src="https://img.shields.io/npm/l/@wenbin_wb/dsh-bridge?style=flat-square&color=a855f7" alt="license" /></a>
14
- </p>
15
-
16
- <p align="center">
17
- <img src="https://img.shields.io/badge/Security-Access%20Auth%20%2B%20PBKDF2-6366f1?style=flat-square&logo=security" alt="Security" />
18
- <img src="https://img.shields.io/badge/WeChat-ClawBot%20%7C%20iLink-07C160?style=flat-square&logo=wechat" alt="WeChat" />
19
- <img src="https://img.shields.io/badge/QQ%20Bot-OpenAPI%20v2-12B7F5?style=flat-square&logo=tencentqq" alt="QQ" />
20
- <img src="https://img.shields.io/badge/Feishu-WebSocket%202.0-00D6B9?style=flat-square&logo=lark" alt="Feishu" />
21
- <img src="https://img.shields.io/badge/Telegram-Bot%20API-24A1DE?style=flat-square&logo=telegram" alt="Telegram" />
22
- <img src="https://img.shields.io/badge/Cloudflare-Tunnel-F38020?style=flat-square&logo=cloudflare" alt="Cloudflare" />
23
- </p>
24
-
25
- <p align="center">
26
- <a href="README.md">简体中文</a> | <b>English</b>
27
- </p>
28
-
29
- > **Multi-channel remote access & enterprise security guard plugin for DeepSeek Harness**
30
- >
31
- > 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.
32
- >
33
- > Seamlessly extend your local DeepSeek Harness to mobile phones, tablets, public networks, and WeChat / QQ / Feishu / Telegram. Access your AI assistant anytime, anywhere via QR code scanning, web browsers, or IM bots.
34
-
35
- ---
36
-
37
- ## Features
38
-
39
- - **🗂️ Web-based Remote Workspace Browser & Multi-Platform Management (v2.8.0 Major)**:
40
- - **Remote Web Directory Picker**: Resolves the desktop silent popup issue on mobile/remote access; opens a responsive bottom-sheet/modal directory tree browser with drive letters (`C:\`, `D:\`), quick roots (Desktop / Projects), real-time search filtering, and manual path navigation;
41
- - **Seamless Local Host Fallback**: On local host (`localhost` / `127.0.0.1` / Electron desktop), standard system native folder dialogs are preserved automatically without extra clicks;
42
- - **IM `/addworkspace <absolute_path>` Command**: Add and immediately switch project workspaces on WeChat, QQ, Feishu, and Telegram with a single command.
43
- - **📱 Native-grade Mobile UX & Layout Redesign (v2.8.0)**:
44
- - **Top Centered Dynamic Title**: Prominently centers the active conversation title in the fixed top app bar, eliminating awkward top whitespace;
45
- - **Spacious 2nd Header Row**: Mode / subagent badge and a 28px circular download icon button neatly aligned on opposite ends;
46
- - **Adaptive Composer Bottom Bar**: Eliminates button collision and overlapping between permission preset and model selectors on mobile/narrow screens.
47
- - **🔐 Comprehensive Security Hardening & Audit (v2.8.0)**:
48
- - **1st Line of Defense (Visitor Access Guard)**: Auto-injected 256-bit security Token in QR codes for 1-click passwordless login; manual IP/domain visits enforce password verification; granular channel scoping (All / Public Tunnels Only / LAN Only);
49
- - **2nd Line of Defense (Admin Console Guard)**: Separated administrator password and visitor password; global console lockout for remote devices to prevent unauthorized configuration changes (Password Unlock / Local Host Only / Open);
50
- - **File System & RPC Hardening**: Enforces `checkAdminAuth` on all workspace inspection and registration RPC endpoints; system directory blacklist (`C:\Windows\System32`, `/etc/shadow`, `/root/.ssh`); symlink escape detection; sliding-window rate limiting;
51
- - **Fail-safe Recovery System (Triple Protection)**: Host machine (`127.0.0.1`) enjoys permanent physical privileges (never locked out) + terminal command `touch ~/.dsh/dsh-bridge/reset-auth` for instant emergency recovery + built-in "Forgot Password" guides;
52
- - **Financial-grade Security Engine**: PBKDF2 + SHA-256 salted password hashing, 30-day HttpOnly SameSite session protection, IP brute-force rate limiter (5 failed attempts trigger 60s cooldown).
53
- - **📱 PWA Standalone Full-Screen App & Touch Adaptation**: Add to mobile home screen for a 100% standalone native app experience (no browser address bar or bottom navigation); clean header, drawer gestures, and responsive settings cards
54
- - **🔍 Real-Time Network Diagnostic Tool**: 1-click diagnosis of local proxy port, LAN IPv4, Cloudflare Anycast edge latency, and npmmirror registry reachability
55
- - **🗄️ 1-Click Configuration Backup & Restore**: Export/import complete settings `.json` backup including tokens, allowlists, and tunnel configurations in the Security tab
56
- - **📊 Host System Resource Monitor**: Real-time overview of CPU model/cores, system memory usage percentage, Node process memory (Heap/RSS), and DSH process uptime
57
- - **🏷️ Session Renaming Command `/rename <new title>`**: Rename active sessions anytime via WeChat, QQ, Feishu, or Telegram, updating the Web drawer in real time
58
- - **LAN Access**: Scan QR code with your smartphone/tablet, direct access on the same Wi-Fi keep the conversation going from your phone
59
- - **Cloudflare Tunnel**: One-click public internet exposure with Named Tunnel token mode for fixed custom domain and auto-start on DSH boot
60
- - **Custom Tunnel**: Connect to your own tunnel server with a fixed domain ([Setup Guide](docs/custom-tunnel.md))
61
- - **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))
62
- - **QQ Bot (OpenAPI v2)**: Connect your QQ Bot to receive private/group messages, send Markdown, button keyboards, and rich media. **Full event coverage (C2C / GROUP_AT_MESSAGE_CREATE), auto token refresh, reconnection with backoff, message deduplication** over Tencent's official QQ Bot OpenAPI v2 ([Usage Guide](docs/qq-usage.md))
63
- - **Feishu / Lark Bot (Official WebSocket)**: Connect enterprise self-built apps via Feishu's official WebSocket protocol. **No public IP / no Webhook required, Markdown table formatting, native interactive card permission approvals with 1-click button actions** ([Usage Guide](docs/feishu-usage.md))
64
- - **Telegram Bot (Official Bot API + Proxy Support)**: Connect official Telegram bots for private and group interactions. **No public IP required (Long Polling getUpdates), built-in zero-dependency HTTP/HTTPS proxy tunnel, smooth typewriter streaming output, native command menu (Menu button), and Inline Keyboard interactive approval cards** ([Usage Guide](docs/telegram-usage.md))
65
- - **Official Brand SVG Icons**: Authentic vector brand icons for WeChat, QQ, Feishu, Telegram with real-time status indicators
66
- - **Fast Version Check, 1-Click Upgrade & 1-Click Restart**: Dual-channel registry check (npmmirror + npmjs fallback in ~200ms) with seamless **1-click in-app upgrade and graceful DSH restart with automatic reconnect polling**
67
- - **Native Dark Mode Support**: Deep integration with DeepSeek Harness Design Tokens (`--dsw-alias-*`), QR code background protection for safe dark mode scanning
68
-
69
- ---
70
-
71
- ## Roadmap
72
-
73
- | Target | Description | Status |
74
- |--------|-------------|--------|
75
- | **Remote Workspace Picker & Smart Routing** | Web-based directory browser + local native dialog routing + IM `/addworkspace` | ✅ **Completed** (v2.8.0) |
76
- | **Mobile Layout Redesign & Anti-Collision** | Top centered title + 28px circular download icon + composer adaptive layout | ✅ **Completed** (v2.8.0) |
77
- | **Comprehensive Security Hardening** | RPC auth + sensitive directory blacklist + symlink escape prevention + rate limiter | ✅ **Completed** (v2.8.0) |
78
- | **Mobile & DevOps** | PWA Standalone App + Network Diagnostics + Config Backup/Restore + System Resource Monitor | ✅ **Completed** |
79
- | **Session Renaming** | Support `/rename <new title>` across WeChat, QQ, Feishu, Telegram | ✅ **Completed** |
80
- | **Tunnel AutoStart & Fixed Domain** | Cloudflare Named Tunnel token mode + autoStart persistence | ✅ **Completed** |
81
- | **Access Security** | Visitor Access Auth Guard + Admin Console Anti-Tamper + Fail-safe Recovery | ✅ **Completed** (v2.5.0) |
82
- | **Telegram** | IM channel suited for self-hosting and overseas (Long Polling / Proxy / Native Menu / Inline Cards / Streaming) | ✅ **Completed** (v2.4.0) |
83
- | **Feishu** | Feishu / Lark official persistent WebSocket bot (No-public-IP WS / Card Approvals) | ✅ **Completed** (v2.3.0) |
84
- | **QQ Bot** | QQ bot integration for group/private chat (Markdown / buttons / rich media) | ✅ **Completed** (v2.1.0) |
85
- | **WeChat** | Chat with your Agent directly in WeChat (workspaces / persisted sessions / media / approvals) | ✅ **Completed** (v1.0.0) |
86
- | **Platform Abstraction** | Platform-agnostic core (sessions / approvals / commands / digest) shared across IM channels | ✅ **Completed** (v2.0.0) |
87
-
88
- ---
89
-
90
- ## Prerequisites
91
-
92
- Before installing the plugin, make sure:
93
-
94
- 1. **Node.js ≥ 22** (DSH requires `^22.19.0` or `≥ 24.0.0`)
95
- 2. **dsh CLI available** — you can run the `dsh` command in your terminal
96
-
97
- ```bash
98
- # Check Node version
99
- node -v # should show v22.19+ or v24+
100
-
101
- # Check if dsh is available
102
- dsh --version
103
- ```
104
-
105
- If `dsh` is not found, install DSH first:
106
-
107
- ```bash
108
- npm install -g @deepseek-ai/dsh
109
- ```
110
-
111
- > If you do not have permission for global installation, you can use `npx`:
112
- > ```bash
113
- > npx --yes @deepseek-ai/dsh plugin --profile web add @wenbin_wb/dsh-bridge
114
- > ```
115
-
116
- ---
117
-
118
- ## Installation
119
-
120
- ### From npm (Recommended)
121
-
122
- ```bash
123
- # Install the latest version
124
- dsh plugin --profile web add @wenbin_wb/dsh-bridge
125
-
126
- # Or install a specific version (e.g. 2.6.1)
127
- dsh plugin --profile web add @wenbin_wb/dsh-bridge@2.6.1
128
- ```
129
-
130
- > 💡 **No global install permission?** Use `npx`:
131
- > ```bash
132
- > npx --yes @deepseek-ai/dsh plugin --profile web add @wenbin_wb/dsh-bridge
133
- > ```
134
-
135
- ### From Source
136
-
137
- ```bash
138
- git clone https://github.com/wenbin-wb/dsh-bridge.git
139
- dsh plugin --profile web add ./dsh-bridge
140
- ```
141
-
142
- After installation, restart DSH and find "Remote Access" in the Settings page.
143
-
144
- ### Upgrading to the Latest Version
145
-
146
- ```bash
147
- # Method 1: Click "🚀 Upgrade to vX.X.X" directly in Settings -> Remote Access (Recommended, 1-Click)
148
-
149
- # Method 2: Force install via terminal
150
- dsh plugin --profile web add @wenbin_wb/dsh-bridge@latest
151
- ```
152
-
153
- > **Note**: `update --latest` may fail to upgrade to the latest version due to version constraints in installed dependencies. Use the `add @latest` command above to force installing the latest version.
154
-
155
- #### Still seeing the old version after upgrading? (pnpm 11 minimumReleaseAge)
156
-
157
- If you upgrade immediately after a new version is released, `add @latest` might still install the old version. This is caused by **pnpm 11's supply chain security mechanism `minimumReleaseAge`** (which filters releases less than 24 hours old by default), not a bug in the plugin.
158
-
159
- **Solutions** (choose any):
160
-
161
- 1. **Click "1-Click Upgrade" in the DSH Web Settings page** (installs with explicit version tag, takes effect immediately)
162
- 2. **Add `minimumReleaseAge: 0` to your profile's `pnpm-workspace.yaml`**, then run `pnpm install`
163
- 3. **Wait 24 hours**: Protection lifts automatically after 1 day
164
-
165
- After upgrading, restart DSH, perform a **hard refresh** in your browser (Windows: `Ctrl+Shift+R`, macOS: `Cmd+Shift+R`) to clear cache, and verify the latest version is displayed.
166
-
167
- ---
168
-
169
- ## Usage
170
-
171
- ### 🔐 Access Security & Admin Guard (v2.5.0 Major Release)
172
-
173
- Go to Settings -> "Remote Access" -> "**Security**" tab to enable enterprise-grade protection with a single click.
174
-
175
- #### 1. 🛡️ 1st Line of Defense: Visitor Access Guard (Protects Web UI Entry)
176
- - **Flexible Scope Control**:
177
- - `Protect All Channels`: LAN and all public tunnels require authentication;
178
- - `Protect Public Tunnels Only (Recommended)`: LAN keeps zero-friction passwordless access, while public internet exposure requires authentication;
179
- - `Protect LAN Only`: Enforces guard exclusively on local network.
180
- - **Three Verification Modes**:
181
- - 🟢 **Scan QR Code Passwordless + Password Verification (Recommended)**: Console-generated QR codes automatically inject a 256-bit secure Token for instant 1-second passwordless access. Visitors manually typing IP/domain must enter the visitor access password;
182
- - 🔑 **Password / PIN Only**: All external devices must manually enter the password;
183
- - 🎫 **Secure Token Only**: Only devices with valid QR codes or Token links can enter.
184
- - **1-Click Token Rotation**: Click "🔄 Reset Security Token" to immediately invalidate all previously shared QR codes and URLs.
185
-
186
- <details>
187
- <summary>📱 Click to expand visitor access login page screenshot</summary>
188
- <br/>
189
- <p align="center">
190
- <img src="docs/screenshots/remote-auth-login.jpg" width="600" alt="Visitor Access Login Page" />
191
- </p>
192
- </details>
193
-
194
- #### 2. 🔒 2nd Line of Defense: Admin Console Anti-Tamper Guard (Protects Plugin Settings)
195
- - **Separated Admin Password**: Independent administrator password decoupled from visitor password; guests with access passwords cannot tamper with tunnels, bots, or tokens;
196
- - **Three Admin Policies**:
197
- - 🔑 **Password Unlock (Recommended)**: Remote devices see a full-screen lock until the admin password is entered for a temporary session;
198
- - 🛡️ **Host Computer Only (Highest Security)**: Remote devices are strictly blocked from viewing or changing network/bot/security settings — management is only allowed from the physical host (`127.0.0.1`);
199
- - 🌐 **Open Mode**: Remote authenticated users can directly manage settings.
200
-
201
- <details>
202
- <summary>🖥️ Click to expand remote admin console anti-tamper lock screenshot</summary>
203
- <br/>
204
- <p align="center">
205
- <img src="docs/screenshots/admin-lock-screen.jpg" width="600" alt="Admin Console Anti-Tamper Lock" />
206
- </p>
207
- </details>
208
-
209
- #### 3. 🛟 Fail-safe Recovery System (Never Locked Out)
210
- - **Physical Host Privileges**: Host computer running DSH (`127.0.0.1` / `localhost`) has permanent physical privileges — **never requires access password, settings panel is never locked**;
211
- - **Emergency Terminal Command**: On headless Linux servers or in case of forgotten passwords, run a single command in your terminal:
212
- ```bash
213
- touch ~/.dsh/dsh-bridge/reset-auth
214
- ```
215
- The plugin instantly detects the marker, wipes all passwords and locks, deletes the marker, and restores default passwordless access;
216
- - **Built-in Recovery Guides**: Both visitor login pages and admin lock screens provide expandable `❓ Forgot Password?` help cards.
217
-
218
- ![Access Auth Security Settings](docs/screenshots/security-auth-config.jpg)
219
-
220
- ---
221
-
222
- ### 📱 Mobile Browser & Touch Adaptation
223
-
224
- Deeply tailored for smartphone screens and touch gestures, providing a clean and intuitive mobile experience via LAN or public tunnels without installing extra client apps:
225
-
226
- - **Minimalist Top Navigation**: Left drawer toggle and right `(+)` quick-new session button, keeping the screen clean and content-focused;
227
- - **Native Sidebar Drawer**: Full access to DSH session history, workspace folders, search, view options, and session actions;
228
- - **Remote Workspace Picker**: Tap "Add Workspace" on mobile / remote web to pop up a bottom-sheet directory browser with disk drive switching, breadcrumbs, and one-click workspace switching;
229
- - **Fluid Responsive Settings**: Redesigned settings layout with vertical flow, auto-scaling QR codes, and tag badges without cramped word wrapping;
230
- - **Touch Gesture Support**: Swipe right from the left edge (<=35px) to open the drawer, swipe left to dismiss, and **long-press on any session item to bring up context actions** (Rename/Fork/Archive).
231
-
232
- #### Chat & Session Experience
233
-
234
- <p align="center">
235
- <img src="docs/screenshots/remote-web-mobile.jpg" width="22%" alt="Mobile New Session Home" />
236
- &nbsp;&nbsp;
237
- <img src="docs/screenshots/mobile-chat.jpg" width="22%" alt="Mobile Active Chat View" />
238
- &nbsp;&nbsp;
239
- <img src="docs/screenshots/mobile-drawer.jpg" width="22%" alt="Mobile Native Sidebar Drawer" />
240
- &nbsp;&nbsp;
241
- <img src="docs/screenshots/mobile-workspace-picker.jpg" width="22%" alt="Mobile Remote Workspace Picker" />
242
- </p>
243
-
244
- #### Remote Access & Plugin Settings Console
245
-
246
- <p align="center">
247
- <img src="docs/screenshots/mobile-settings-lan.jpg" width="22%" alt="LAN Access Console" />
248
- &nbsp;&nbsp;
249
- <img src="docs/screenshots/mobile-settings-tunnel.jpg" width="22%" alt="Public Tunnel Settings" />
250
- &nbsp;&nbsp;
251
- <img src="docs/screenshots/mobile-settings-im.jpg" width="22%" alt="IM Bot Platforms" />
252
- &nbsp;&nbsp;
253
- <img src="docs/screenshots/mobile-settings-security.jpg" width="22%" alt="Global Access Security" />
254
- </p>
255
-
256
- ---
257
-
258
- ### LAN Access
259
-
260
- Automatically active when the plugin starts, zero configuration needed. Open Settings -> "Remote Access", and scan the QR code with your phone.
261
-
262
- ![LAN Access QR Scan](docs/screenshots/lan-access.jpg)
263
-
264
- ### Cloudflare Tunnel
265
-
266
- Supports both **Quick Tunnel (zero config)** and **Cloudflare Token Named Tunnel (fixed domain)**, with optional automatic start on DSH boot:
267
-
268
- - **Mode 1: Instant Quick Tunnel (Default)**
269
- 1. Click the "Start" button in the "Cloudflare Tunnel" card;
270
- 2. On first use, cloudflared (~30MB) will be automatically downloaded from GitHub;
271
- 3. Displays a public URL and QR code within seconds (changes on restart or click "Reset URL").
272
-
273
- - **Mode 2: Cloudflare Token Named Tunnel (Permanent Fixed Domain · 100% Free)**
274
- 1. Create a free tunnel on the [Cloudflare Zero Trust Console](https://one.dash.cloudflare.com/) and bind your custom domain (e.g. `dsh.yourdomain.com`);
275
- 2. Expand the **"⚙️ Advanced: Fixed Domain (Cloudflare Token)"** form at the bottom of the card, enter your domain and Tunnel Token, then save;
276
- 3. Check **"Auto-start with DSH"** — the tunnel will automatically recover on DSH restarts with a **permanently fixed URL**!
277
-
278
- ![Public Tunnel Settings](docs/screenshots/tunnel-access.jpg)
279
-
280
- ### Custom Tunnel
281
-
282
- Requires a server with a public IP (server environment requires Node.js >= 18, recommended Node.js 22 LTS). See the [Custom Tunnel Setup Guide](docs/custom-tunnel.md) for detailed steps.
283
-
284
- 1. Deploy the tunnel server on your server following the guide
285
- 2. Enter the WebSocket URL (`wss://...`) and access token in the "Custom Tunnel" card
286
- 3. Click "Save Config", then click "Start"
287
-
288
- Configurations persist across restarts.
289
-
290
- ### WeChat Bot (ClawBot / iLink)
291
-
292
- Powered by Tencent's official WeChat ClawBot feature (iLink Bot API). Log in with your personal WeChat account by scanning a QR code, then chat with, control, and approve your DeepSeek Harness agents directly in WeChat — fully routed through Tencent's official servers, no public server or tunnel needed.
293
-
294
- ![WeChat Bot Configuration](docs/screenshots/wechat-bot-config.jpg)
295
-
296
- <details>
297
- <summary>📱 Click to expand mobile WeChat chat screenshot</summary>
298
- <br/>
299
- <p align="center">
300
- <img src="docs/screenshots/wechat-chat.jpg" width="380" alt="WeChat Chat Example" />
301
- </p>
302
- </details>
303
-
304
- **Key Highlights**
305
-
306
- - 🗂️ **Multi-Workspace**: `/workspaces` to list workspaces, `@N` or `@path` to start sessions in specific directories
307
- - 💾 **Session Persistence**: Sessions survive DSH restarts — keep chatting seamlessly
308
- - 🏷️ **Session Titles**: `/sessions` groups by workspace and displays clean session titles
309
- - 🖼️ **Media Transfer**: Two-way transfer for images, files, and voice (auto-transcribed to text)
310
- - 📝 **Approval Prompts**: Approve sensitive operations directly in WeChat; auto-rejects on timeout
311
- - 🔔 **Real-Time Status**: Heartbeat progress + "typing..." indicators, auto-chunked long replies
312
-
313
- **Quick Start**
314
-
315
- 1. Open Settings -> "Remote Access" -> "IM Bot" -> Select "WeChat"
316
- 2. Click "Scan QR to Login", scan with WeChat and confirm
317
- 3. Once logged in, **send the first message to the bot to automatically grant allowlist access**
318
- 4. You can now send commands directly in WeChat
319
-
320
- **WeChat Commands** (Full documentation in [WeChat Bot Usage Guide](docs/wechat-usage.md))
321
-
322
- | Command | Description |
323
- |---------|-------------|
324
- | *(Plain text)* | Send to the currently active agent |
325
- | `/sessions` (or `/list`) | List sessions (grouped by workspace with titles) |
326
- | `/use N` (or `/resume N`) | Switch to / resume session N |
327
- | `/rename <title>` | Rename the currently active session |
328
- | `/workspaces` | List available workspaces |
329
- | `/addworkspace <path>` | Register a new host directory as workspace |
330
- | `/new <prompt>` | Start a new session in the current workspace |
331
- | `/new <prompt> @N` (or `@path`) | Start a new session in the specified workspace |
332
- | `/stop` | Stop the current task |
333
- | `/end` | End the current session |
334
- | `/status` | View agent status and session summary |
335
- | `/yes` `/no` (or `1`/`2`) | Respond to permission approval requests |
336
- | `/start` | Automatically initialize a session after first login |
337
- | `/help` | Display all available commands |
338
-
339
- **Security Notes**
340
-
341
- - Strict Allowlist: Only approved WeChat users can interact with the agent; unauthorized messages are dropped and never fed to the model
342
- - Default Deny on Approval: Requests auto-reject if `/yes` is not sent within the timeout period (default 10 mins)
343
- - Credentials stored in DSH Credentials service, never in plaintext configuration
344
- - Only one bot polling instance per WeChat account at a time. **Please use a dedicated WeChat account** for the bot
345
-
346
- > Notice: iLink is Tencent's official channel; usage must comply with WeChat terms of service. Tencent reserves content filtering and rate limiting rights. Not recommended for critical production workloads.
347
-
348
- ---
349
-
350
- ### QQ Bot (OpenAPI v2)
351
-
352
- Integrates Tencent's official QQ Bot platform. Supports private chat, group chat (@bot trigger), streaming output, Markdown rendering, message buttons, and rich media (images/files). Driven by Tencent's official QQ Bot OpenAPI v2 with real-time WebSocket push, automatic token refresh, and auto-reconnection.
353
-
354
- ![QQ Bot Configuration](docs/screenshots/qq-bot-config.jpg)
355
-
356
- <details>
357
- <summary>📱 Click to expand mobile QQ private and group chat screenshots</summary>
358
- <br/>
359
- <p align="center">
360
- <img src="docs/screenshots/qq-chat.jpg" width="48%" alt="QQ Private Chat" />
361
- <img src="docs/screenshots/qq-group.jpg" width="48%" alt="QQ Group Chat" />
362
- </p>
363
- </details>
364
-
365
- **Key Highlights**
366
-
367
- - 💬 **Private + Group Chat**: Direct private messaging, @bot in groups (first @ auto-approves group)
368
- - 📝 **Streaming Markdown**: Real-time streaming output with full syntax highlighting, tables, and lists
369
- - 🎯 **Message Buttons**: Commands like `/end` trigger inline quick-action buttons (New Session, List, Help)
370
- - 🖼️ **Rich Media**: Bi-directional image and file sending
371
- - 🔄 **Session Management**: Multi-session switching, persistence across restarts, workspace grouping
372
- - ✅ **Auto Authorization**: First private message or first group @bot automatically adds to allowlist
373
-
374
- **Quick Start**
375
-
376
- 1. Go to [QQ Open Platform](https://q.qq.com), create a bot application, and obtain `AppID` and `ClientSecret`
377
- 2. Open Settings -> "Remote Access" -> "IM Bot" -> Select "QQ"
378
- 3. Enter AppID and ClientSecret, click "Save Config" to automatically connect
379
- 4. **Private Chat**: Add the bot as a friend and send the first message to authorize
380
- 5. **Group Chat**: Add the bot to a group and send a message with `@bot` to authorize the group
381
-
382
- **QQ Commands** (Full documentation in [QQ Bot Usage Guide](docs/qq-usage.md))
383
-
384
- | Command | Description |
385
- |---------|-------------|
386
- | *(Plain text)* | Send to the currently active agent |
387
- | `/new <prompt>` | Start a new session |
388
- | `/sessions` (or `/list`) | List sessions (grouped by workspace) |
389
- | `/use N` (or `/resume N`) | Switch to / resume session N |
390
- | `/rename <title>` | Rename the active session |
391
- | `/end` | End current session (triggers quick-action buttons) |
392
- | `/stop` | Stop the current task |
393
- | `/status` | View agent status |
394
- | `/workspaces` | List available workspaces |
395
- | `/addworkspace <path>` | Register a new host directory as workspace |
396
- | `/help` | Display all available commands |
397
-
398
- **Important Notice**
399
-
400
- - **Custom menus, command panels, and interactive buttons require the latest QQ client**
401
- - If API configuration succeeds but buttons don't appear, update your QQ client to the latest version
402
- - Plain text commands (e.g. `/new`, `/sessions`, `/help`) work on all client versions
403
-
404
- ---
405
-
406
- ### Feishu / Lark Bot (Official WebSocket)
407
-
408
- Connect your enterprise self-built app via Feishu's official WebSocket protocol. Supports private chat and group mentions without public IP, domain name, or webhook configuration.
409
-
410
- ![Feishu Bot Configuration](docs/screenshots/feishu-bot-config.jpg)
411
-
412
- <details>
413
- <summary>📱 Click to expand mobile Feishu chat & card approval screenshot</summary>
414
- <br/>
415
- <p align="center">
416
- <img src="docs/screenshots/feishu-chat.jpg" width="380" alt="Feishu Chat & Card Approval" />
417
- </p>
418
- </details>
419
-
420
- **Key Highlights**
421
-
422
- - ⚡ **100% No Public IP Required**: Direct duplex WebSocket connection to Feishu Open Platform
423
- - 📜 **Card JSON 2.0 Streaming**: In-place single-card incremental streaming updates, eliminating message bubble fragmentation
424
- - 🛡️ **Card 2.0 Interactive Approvals**: Native orange approval card with `[✓ Approve]` / `[✕ Reject]` action buttons for 1-click execution
425
- - 📝 **Full Markdown Rendering**: Native support for headings, tables, syntax highlighting, blockquotes, and lists
426
- - 🔄 **Workspace & Session Management**: Table-formatted `/sessions`, `/use N` switching, `/rename` title updating, and `/workspaces` & `/addworkspace` management
427
-
428
- **Setup Steps**
429
-
430
- 1. Go to [Feishu Open Platform](https://open.feishu.cn/app) to create a self-built app, enable "Bot" capability, and publish a version ([Detailed Guide](docs/feishu-usage.md))
431
- 2. Under "Events & Callbacks", select "Use WebSocket to receive events", and add `im.message.receive_v1` & `card.action.trigger`
432
- 3. Open DSH Settings → "Remote Access" → "IM Bots" → select "Feishu"
433
- 4. Fill in App ID and App Secret, then click "Save & Connect"
434
-
435
- **Feishu Bot Commands** (Full guide in [Feishu Bot Usage Guide](docs/feishu-usage.md))
436
-
437
- | Command | Description |
438
- |---------|-------------|
439
- | *(plain text)* | Send to current active agent |
440
- | `/new <prompt>` | Create and start a new session in current workspace |
441
- | `/new <prompt> @N` | Create a new session in workspace N |
442
- | `/sessions` (or `/list`) | List all sessions in a structured Markdown table |
443
- | `/use N` (or `/resume N`) | Switch to/resume session N |
444
- | `/rename <title>` | Rename currently active session |
445
- | `/workspaces` | List all available workspaces |
446
- | `/addworkspace <path>` | Register a new host directory as workspace |
447
- | `/end` | End current session |
448
- | `/stop` | Stop currently executing task |
449
- | `/status` | View agent status dashboard |
450
- | `/yes` `/no` (or `1`/`2`) | Respond to permission approval requests (or click card buttons) |
451
- | `/help` | Display full command help |
452
-
453
- ---
454
-
455
- ### Telegram Bot (Official Bot API + Proxy Support)
456
-
457
- Connect official Telegram Bot API for real-time private and group interactions. Powered by official Long Polling (`getUpdates`), **no public IP / no Webhook required**, built-in **zero-dependency HTTP/HTTPS CONNECT proxy tunnel**, ready to use in any network environment.
458
-
459
- ![Telegram Bot Configuration](docs/screenshots/telegram-bot-config.jpg)
460
-
461
- **Key Features**
462
-
463
- - ⚡ **100% No Public IP Needed**: Official Long Polling mechanism allows local machines or private servers to connect directly
464
- - 🌐 **Built-in HTTP/HTTPS Proxy Support**: Easily configure local proxies like Clash / v2ray (`http://127.0.0.1:7890`) with zero external dependencies
465
- - 📜 **Typewriter Streaming Output**: Integrated turn lifecycle updates existing message in-place with `editMessageText`, eliminating message fragmentation
466
- - 🎯 **Native Command Menu (`Menu` Button)**: Automatically registered with `setMyCommands` & `setChatMenuButton`, type `/` or tap `[Menu]` for 1-click command navigation
467
- - 🛡️ **Inline Keyboard Interactive Cards**: Permission approvals send `[✓ Approve]` / `[✕ Reject]` buttons for 1-second approval actions
468
- - 🖼️ **Multimodal & File Transfers**: Inbound images/files automatically saved and sent to Agent; generated artifacts sent back to Telegram
469
- - 🔄 **Session & Workspace Management**: Manage multiple sessions with `/sessions`, switch with `/use N`, `/rename` title, and manage workspaces with `/workspaces` & `/addworkspace`
470
-
471
- **Quick Start**
472
-
473
- 1. Send `/newbot` to [@BotFather](https://t.me/BotFather) on Telegram to create your bot and obtain the **Bot Token**
474
- 2. Open DSH Settings → "Remote Access" → "IM Bots" → select "**Telegram**"
475
- 3. Enter your **Bot Token** (and optional proxy address like `http://127.0.0.1:7890`), click "Save and Connect"
476
- 4. Scan the QR code with Telegram on your phone, send the first message (e.g. `/help`) to **automatically authorize your account into the allowlist**
477
-
478
- **Commands in Telegram** (Full guide in [Telegram Bot Guide](docs/telegram-usage.md))
479
-
480
- | Command | Description | Interactive Card |
481
- |---------|-------------|------------------|
482
- | *(plain text)* | Send to current active agent | Real-time typewriter stream |
483
- | `/new <prompt>` | Create and start a new session in current workspace | Start fresh turn |
484
- | `/new <prompt> @N` | Create a new session in workspace N | Multi-workspace routing |
485
- | `/sessions` (or `/list`) | List all sessions | 1-click switch buttons |
486
- | `/use N` (or `/resume N`) | Switch to/resume session N | Instant context switch |
487
- | `/rename <title>` | Rename the currently active session | Real-time title update |
488
- | `/workspaces` | List all available workspaces | View workspace paths |
489
- | `/addworkspace <path>` | Register a new host directory as workspace | Auto-bind and assign index |
490
- | `/status` | View agent status dashboard | Refresh/Stop/End buttons |
491
- | `/stop` | Stop currently executing task | Immediate abort |
492
- | `/end` | End current active session | Quick-start button attached |
493
- | `/yes` `/no` (or `1`/`2`) | Respond to permission approvals | Click inline buttons directly |
494
- | `/help` | Display quick buttons and help | Full navigation buttons |
495
-
496
- ---
497
-
498
- ## Optional Configuration
499
-
500
- The plugin is ready to use out of the box. To customize the proxy port, add to `cordis.yml`:
501
-
502
- ```yaml
503
- - name: '@wenbin_wb/dsh-bridge'
504
- config:
505
- port: 3082 # default 3082
506
- ```
507
-
508
- ---
509
-
510
- ## Development
511
-
512
- ```bash
513
- git clone https://github.com/wenbin-wb/dsh-bridge.git
514
- cd dsh-bridge
515
- npm install
516
-
517
- # Rebuild client bundle after editing client/index.js
518
- npm run build:client
519
-
520
- # Install to web profile and restart DSH
521
- dsh plugin --profile web add .
522
- ```
523
-
524
- ---
525
-
526
- ## FAQ (Frequently Asked Questions)
527
-
528
- <details>
529
- <summary><b>Q1: How can I prevent unauthorized external access after connecting via QR code or public tunnel?</b></summary>
530
- <br/>
531
-
532
- - **Answer**:
533
- 1. Navigate to the **"Security"** tab in the console and enable Global Access Password or Secret Token gatekeeper;
534
- 2. Once enabled, visitors accessing through LAN IP or public tunnels must authenticate with the password or token before accessing any interface;
535
- 3. Host computer loopback (`127.0.0.1`) enjoys physical loopback privileges with automatic passwordless direct access.
536
- </details>
537
-
538
- <details>
539
- <summary><b>Q2: How is message security handled for WeChat / QQ / Feishu / Telegram bots? Can unauthorized senders trigger agents?</b></summary>
540
- <br/>
541
-
542
- - **Answer**:
543
- 1. **Strict Allowlist Mechanism**: The plugin incorporates an automatic and manual sender allowlist. Only messages from allowlisted users can drive the Agent;
544
- 2. **First Sender Auto-Approval**: Upon first login or setup, the first message sent by the admin automatically binds their ID to the allowlist;
545
- 3. **Silent Drop for Unknown Senders**: All messages from non-allowlisted individuals or unauthorized group members are silently dropped at the lowest layer (never fed to LLM), consuming zero tokens and executing zero commands.
546
- </details>
547
-
548
- <details>
549
- <summary><b>Q3: What is the difference between Cloudflare Temporary URL and Fixed Domain (Token Mode)?</b></summary>
550
- <br/>
551
-
552
- - **Answer**:
553
- 1. **Temporary Quick Tunnel (Default)**: Zero setup, no Cloudflare account needed. Generates a random `https://*.trycloudflare.com` URL with 1 click;
554
- 2. **Fixed Named Tunnel (Token Mode)**: Create a Named Tunnel in Cloudflare Zero Trust and configure your custom domain (e.g. `dsh.yourdomain.com`). With "Auto-start with DSH" checked, the URL remains permanently fixed across reboots.
555
- </details>
556
-
557
- <details>
558
- <summary><b>Q4: Will chat sessions and bot configurations be lost after plugin upgrade or DSH restart?</b></summary>
559
- <br/>
560
-
561
- - **Answer**:
562
- 1. **Persistent Configuration**: All IM credentials, allowlists, auto-start preferences, and security settings are saved to `~/.dsh/dsh-bridge/`;
563
- 2. **Seamless Session Re-attach**: Conversation history is managed natively by DSH persistence. After restart, sending a message or typing `/resume` instantly reconnects to the existing session;
564
- 3. **1-Click Backup & Restore**: The "Ops & Monitoring" tab supports exporting/importing `.json` backup files for effortless migration between machines.
565
- </details>
566
-
567
- ---
568
-
569
- ## License
570
-
571
- MIT © [wenbin-wb](https://github.com/wenbin-wb)
572
-
1
+ # dsh-bridge
2
+
3
+ <p align="center">
4
+ <img src="docs/banner.jpg" alt="dsh-bridge banner" width="100%" />
5
+ </p>
6
+
7
+ <p align="center">
8
+ <a href="https://www.npmjs.com/package/@wenbin_wb/dsh-bridge"><img src="https://img.shields.io/npm/v/@wenbin_wb/dsh-bridge.svg?style=flat-square&color=38bdf8&logo=npm" alt="npm version" /></a>
9
+ <a href="https://www.npmjs.com/package/@wenbin_wb/dsh-bridge"><img src="https://img.shields.io/npm/dt/@wenbin_wb/dsh-bridge.svg?style=flat-square&color=fbbf24&logo=npm" alt="npm downloads" /></a>
10
+ <a href="https://github.com/wenbin-wb/dsh-bridge/releases"><img src="https://img.shields.io/github/v/release/wenbin-wb/dsh-bridge?style=flat-square&color=10b981&logo=github" alt="GitHub release" /></a>
11
+ <a href="https://github.com/wenbin-wb/dsh-bridge/stargazers"><img src="https://img.shields.io/github/stars/wenbin-wb/dsh-bridge?style=flat-square&color=f43f5e&logo=github" alt="GitHub stars" /></a>
12
+ <a href="https://nodejs.org/"><img src="https://img.shields.io/badge/Node.js-%E2%89%A522.19%20%7C%20%E2%89%A524-339933?style=flat-square&logo=node.js" alt="Node.js version" /></a>
13
+ <a href="LICENSE"><img src="https://img.shields.io/npm/l/@wenbin_wb/dsh-bridge?style=flat-square&color=a855f7" alt="license" /></a>
14
+ </p>
15
+
16
+ <p align="center">
17
+ <img src="https://img.shields.io/badge/Security-Access%20Auth%20%2B%20PBKDF2-6366f1?style=flat-square&logo=security" alt="Security" />
18
+ <img src="https://img.shields.io/badge/WeChat-ClawBot%20%7C%20iLink-07C160?style=flat-square&logo=wechat" alt="WeChat" />
19
+ <img src="https://img.shields.io/badge/QQ%20Bot-OpenAPI%20v2-12B7F5?style=flat-square&logo=tencentqq" alt="QQ" />
20
+ <img src="https://img.shields.io/badge/Feishu-WebSocket%202.0-00D6B9?style=flat-square&logo=lark" alt="Feishu" />
21
+ <img src="https://img.shields.io/badge/Telegram-Bot%20API-24A1DE?style=flat-square&logo=telegram" alt="Telegram" />
22
+ <img src="https://img.shields.io/badge/Cloudflare-Tunnel-F38020?style=flat-square&logo=cloudflare" alt="Cloudflare" />
23
+ </p>
24
+
25
+ <p align="center">
26
+ <a href="README.md">简体中文</a> | <b>English</b>
27
+ </p>
28
+
29
+ > **Multi-Channel Remote Access & Comprehensive Security Gateway Plugin for DeepSeek Harness**
30
+ >
31
+ > Scan a QR code on your phone to continue using DeepSeek Harness anywhere. Whether relaxing on the sofa, commuting, or working across networks—no need to stay at your PC or set up complex servers.
32
+ >
33
+ > Seamlessly extends your local DeepSeek Harness instance to mobile web, standalone PWA app, secure public tunnels, and **WeChat / QQ / Feishu / Telegram** bot matrix. Drive AI coding, run tasks, approve operations, and manage workspaces anytime, anywhere.
34
+
35
+ ---
36
+
37
+ ## Table of Contents
38
+
39
+ - [✨ Key Features](#-key-features)
40
+ - [📦 Requirements & Installation](#-requirements--installation)
41
+ - [🚀 Core Features & Usage Guide](#-core-features--usage-guide)
42
+ - [1. 🛜 LAN Access & Multi-NIC Smart Selection](#1-🛜-lan-access--multi-nic-smart-selection)
43
+ - [2. 🌐 Public Tunnels (Cloudflare & Custom)](#2-🌐-public-tunnels-cloudflare--custom)
44
+ - [3. 📱 Mobile Experience & Standalone PWA](#3-📱-mobile-experience--standalone-pwa)
45
+ - [4. 🗂️ Web Remote Workspace Directory Picker](#4-🗂️-web-remote-workspace-directory-picker)
46
+ - [5. 🔐 Comprehensive Access Security & Admin Lock](#5-🔐-comprehensive-access-security--admin-lock)
47
+ - [6. 🤖 All-in-One IM Bot Matrix (WeChat / QQ / Feishu / Telegram)](#6-🤖-all-in-one-im-bot-matrix-wechat--qq--feishu--telegram)
48
+ - [7. 📊 Maintenance Dashboard & Graceful Restart](#7-📊-maintenance-dashboard--graceful-restart)
49
+ - [💬 FAQ](#-faq)
50
+ - [🛠️ Development & Contribution](#️-development--contribution)
51
+ - [📄 License](#-license)
52
+
53
+ ---
54
+
55
+ ## Key Features
56
+
57
+ - **🛜 Multi-NIC Smart Detection & Switching**: Automatically detects physical Wi-Fi, Ethernet, and virtual NICs (WSL/VMware/Docker); provides visual switching with persistent memory;
58
+ - **🌐 Dual-Mode Cloudflare Public Tunnels**: Zero-login 1-click random temporary domains or Cloudflare Named Tunnel Token with auto-start on boot;
59
+ - **📱 Native-Grade Mobile UI & PWA**: Centered session header, native drawer sidebar with `[|` fold icon, anti-overlap responsive layout, PWA install support;
60
+ - **🗂️ Web Remote Workspace Directory Picker**: Mobile/remote visits pop up responsive tree directory browser; localhost visits route to OS native dialogs; supports `/addworkspace` IM command;
61
+ - **🔐 Comprehensive Access Security & Dual Defenses**: QR code secret Token login, visitor password gate, independent admin anti-tamper lock; host physical privilege (`127.0.0.1`) & emergency terminal reset (`reset-auth`);
62
+ - **🤖 All-in-One IM Bot Matrix (WeChat / QQ / Feishu / Telegram)**: Multi-workspace dispatching, cross-restart session persistence, streaming Markdown typewriter, Card 2.0 interactive approvals, and bidirectional file sharing;
63
+ - **📊 Maintenance & Smooth Upgrades**: Host CPU / RAM / Uptime metrics, 1-click network diagnosis, JSON configuration backup & restore, npmmirror fast check & graceful restart.
64
+
65
+ ---
66
+
67
+ ## 📦 Requirements & Installation
68
+
69
+ ### Requirements
70
+
71
+ 1. **Node.js ≥ 22** (DSH requires `^22.19.0` or `≥ 24.0.0`)
72
+ 2. **dsh CLI available** (runnable directly in terminal)
73
+
74
+ ```bash
75
+ # Verify environment
76
+ node -v # v22.19+ or v24+
77
+ dsh --version
78
+ ```
79
+
80
+ ### Installation
81
+
82
+ ```bash
83
+ # Method 1: Install from npm (Recommended)
84
+ dsh plugin --profile web add @wenbin_wb/dsh-bridge
85
+
86
+ # Method 2: Global-permission-free npx installation
87
+ npx --yes @deepseek-ai/dsh plugin --profile web add @wenbin_wb/dsh-bridge
88
+
89
+ # Method 3: Install from source
90
+ git clone https://github.com/wenbin-wb/dsh-bridge.git
91
+ dsh plugin --profile web add ./dsh-bridge
92
+ ```
93
+
94
+ ### Upgrade
95
+
96
+ ```bash
97
+ # Recommended: Click "🚀 1-Click Upgrade & Restart" in Web Settings > Remote Access
98
+
99
+ # Or force install latest version via CLI:
100
+ dsh plugin --profile web add @wenbin_wb/dsh-bridge@latest
101
+ ```
102
+
103
+ ---
104
+
105
+ ## 🚀 Core Features & Usage Guide
106
+
107
+ Launch DeepSeek Harness, open Settings in the left sidebar, and click **"Remote Access"**:
108
+
109
+ ---
110
+
111
+ ### 1. 🛜 LAN Access & Multi-NIC Smart Selection
112
+
113
+ Starts **automatically with DSH service**, zero configuration required.
114
+
115
+ <p align="center">
116
+ <img src="docs/screenshots/lan-access.jpg" width="600" alt="LAN Access Console" />
117
+ </p>
118
+
119
+ * **Instant QR Code Scan**: Connect phone and PC to the same Wi-Fi, scan the QR code with phone camera to access mobile web UI;
120
+ * **Multi-NIC Detection & Switching**: Automatically detects multiple network interfaces (physical Wi-Fi, Ethernet, WSL, VMware, Docker) and presents **"🛜 Network Interface / IP Selection"** dropdown; instantly regenerates QR codes upon selection and **persists choice across restarts**.
121
+
122
+ ---
123
+
124
+ ### 2. 🌐 Public Tunnels (Cloudflare & Custom)
125
+
126
+ Access DeepSeek Harness from anywhere outside your home network without public IP or router port forwarding:
127
+
128
+ <p align="center">
129
+ <img src="docs/screenshots/tunnel-access.jpg" width="600" alt="Tunnel Access Configuration" />
130
+ </p>
131
+
132
+ - **Mode 1: Zero-Login Temporary Tunnel (Default)**:
133
+ - Click "Start"; automatically prepares `cloudflared` binary with permission self-healing;
134
+ - Instantly generates `https://*.trycloudflare.com` URL and QR code.
135
+ - **Mode 2: Cloudflare Token Fixed Domain (Permanent · Free)**:
136
+ - Create a Tunnel in [Cloudflare Zero Trust Console](https://one.dash.cloudflare.com/) and bind your custom domain;
137
+ - Enter Tunnel Token & hostname in Advanced Settings, enable **"Auto-start with DSH"** for permanent fixed URL!
138
+ - **Mode 3: Custom WebSocket Tunnel**:
139
+ - Connect to your personal VPS reverse proxy server ([View Setup Guide](docs/custom-tunnel.md)), equipped with per-message gzip and SSE optimization.
140
+
141
+ ---
142
+
143
+ ### 3. 📱 Mobile Experience & Standalone PWA
144
+
145
+ Deeply optimized for mobile screens and touch interactions:
146
+
147
+ - **Clean Top Header**: Retains left drawer and right new session button, with centered dynamic session title;
148
+ - **Native Sidebar Drawer**: Full DSH history & workspace grouping with native `[|` fold icon and swipe gestures;
149
+ - **Standalone PWA Support**: Click "Add to Home Screen" in mobile browser to run as a 100% standalone fullscreen app;
150
+ - **Anti-Overlap Responsive Layout**: Bottom toolbar adapts to screen width, preventing button collision.
151
+
152
+ #### Mobile Chat & Workspace Experience
153
+
154
+ <p align="center">
155
+ <img src="docs/screenshots/remote-web-mobile.jpg" width="23%" alt="Mobile Home" />
156
+ &nbsp;
157
+ <img src="docs/screenshots/mobile-chat.jpg" width="23%" alt="Mobile Chat" />
158
+ &nbsp;
159
+ <img src="docs/screenshots/mobile-drawer.jpg" width="23%" alt="Mobile Drawer" />
160
+ &nbsp;
161
+ <img src="docs/screenshots/mobile-workspace-picker.jpg" width="23%" alt="Mobile Workspace Picker" />
162
+ </p>
163
+
164
+ #### Remote Settings Center on Mobile
165
+
166
+ <p align="center">
167
+ <img src="docs/screenshots/mobile-settings-lan.jpg" width="23%" alt="LAN Settings" />
168
+ &nbsp;
169
+ <img src="docs/screenshots/mobile-settings-tunnel.jpg" width="23%" alt="Tunnel Settings" />
170
+ &nbsp;
171
+ <img src="docs/screenshots/mobile-settings-im.jpg" width="23%" alt="IM Bot Settings" />
172
+ &nbsp;
173
+ <img src="docs/screenshots/mobile-settings-security.jpg" width="23%" alt="Security Settings" />
174
+ </p>
175
+
176
+ ---
177
+
178
+ ### 4. 🗂️ Web Remote Workspace Directory Picker
179
+
180
+ Solves the pain point of mobile browsers being unable to trigger PC native folder dialogs:
181
+
182
+ <p align="center">
183
+ <img src="docs/screenshots/mobile-workspace-picker.jpg" width="380" alt="Mobile Workspace Picker" />
184
+ </p>
185
+
186
+ * **Smart Routing**: PC localhost visits (`127.0.0.1`) invoke OS native file dialogs; mobile/remote visits pop up responsive bottom directory browser;
187
+ * **Quick Access**: 1-click access to Windows drives (C:, D:) and standard system folders (Desktop, Documents, Downloads, Projects).
188
+
189
+ ---
190
+
191
+ ### 5. 🔐 Comprehensive Access Security & Admin Lock
192
+
193
+ Open **"Security"** tab to establish bank-grade protection for your local development environment:
194
+
195
+ <p align="center">
196
+ <img src="docs/screenshots/security-auth-config.jpg" width="600" alt="Security Config" />
197
+ </p>
198
+
199
+ #### 1. 🛡️ Line 1: External Access Gateway
200
+ - **QR Token Passwordless + Password Verification**: QR codes carry 256-bit encrypted Token for instant access; manual IP/domain visits require password;
201
+ - **Channel Isolation**: Choose between "All Channels / Public Tunnels Only (LAN Passwordless) / LAN Only".
202
+
203
+ <details>
204
+ <summary>📱 Click to view Remote Access Login Page</summary>
205
+ <br/>
206
+ <p align="center">
207
+ <img src="docs/screenshots/remote-auth-login.jpg" width="500" alt="Remote Access Login Page" />
208
+ </p>
209
+ </details>
210
+
211
+ #### 2. 🔒 Line 2: Admin Console Anti-Tamper Lock
212
+ - **Independent Admin Password**: Remote devices enter locked console, requiring admin password to view or modify tokens and bot configs;
213
+ - **Strict Host Policy**: Option to restrict management solely to host machine (`127.0.0.1`).
214
+
215
+ <details>
216
+ <summary>🖥️ Click to view Admin Console Lock Screen</summary>
217
+ <br/>
218
+ <p align="center">
219
+ <img src="docs/screenshots/admin-lock-screen.jpg" width="500" alt="Admin Console Lock Screen" />
220
+ </p>
221
+ </details>
222
+
223
+ #### 3. 🛟 Triple Disaster Recovery (Never Locked Out)
224
+ - **Host Physical Privilege**: PC localhost (`127.0.0.1`) enjoys permanent highest privilege, never locked;
225
+ - **Terminal Emergency Reset**: Run `touch ~/.dsh/dsh-bridge/reset-auth` in terminal to reset passwords instantly;
226
+ - **Interactive Guidance**: Built-in interactive recovery guides on all auth pages.
227
+
228
+ ---
229
+
230
+ ### 6. 🤖 All-in-One IM Bot Matrix (WeChat / QQ / Feishu / Telegram)
231
+
232
+ Interact with local AI agents directly inside your favorite messaging apps without opening a browser:
233
+
234
+ ---
235
+
236
+ #### 🟢 WeChat Bot (ClawBot / iLink)
237
+
238
+ Scan QR code with personal WeChat account to chat, manage sessions, and approve permissions via official Tencent servers without public IP.
239
+
240
+ <p align="center">
241
+ <img src="docs/screenshots/wechat-bot-config.jpg" width="600" alt="WeChat Bot Config" />
242
+ </p>
243
+
244
+ <details>
245
+ <summary>📱 Click to view WeChat Chat & Approval</summary>
246
+ <br/>
247
+ <p align="center">
248
+ <img src="docs/screenshots/wechat-chat.jpg" width="380" alt="WeChat Chat" />
249
+ </p>
250
+ </details>
251
+
252
+ * **Quick Setup**: Remote Access > IM Bot > WeChat > Scan QR code > Send first message to auto-authorize. See [WeChat Guide](docs/wechat-usage.md).
253
+
254
+ ---
255
+
256
+ #### 🐧 QQ Bot (OpenAPI v2)
257
+
258
+ Official QQ Bot with direct/group @chat, Markdown rendering, interactive button keyboards, and rich media transfers.
259
+
260
+ <p align="center">
261
+ <img src="docs/screenshots/qq-bot-config.jpg" width="600" alt="QQ Bot Config" />
262
+ </p>
263
+
264
+ <details>
265
+ <summary>📱 Click to view QQ Direct & Group Chat</summary>
266
+ <br/>
267
+ <p align="center">
268
+ <img src="docs/screenshots/qq-chat.jpg" width="48%" alt="QQ Direct Chat" />
269
+ <img src="docs/screenshots/qq-group.jpg" width="48%" alt="QQ Group Chat" />
270
+ </p>
271
+ </details>
272
+
273
+ * **Quick Setup**: Create bot on [QQ Open Platform](https://q.qq.com), fill AppID & Secret > Send first message to auto-authorize. See [QQ Guide](docs/qq-usage.md).
274
+
275
+ ---
276
+
277
+ #### 🐦 Feishu (Lark) Bot (WebSocket 2.0)
278
+
279
+ Enterprise self-built app via official full-duplex WebSocket long connection—**100% No Public IP / No Webhook required**.
280
+
281
+ <p align="center">
282
+ <img src="docs/screenshots/feishu-bot-config.jpg" width="600" alt="Feishu Bot Config" />
283
+ </p>
284
+
285
+ <details>
286
+ <summary>📱 Click to view Feishu Chat & Card Approval</summary>
287
+ <br/>
288
+ <p align="center">
289
+ <img src="docs/screenshots/feishu-chat.jpg" width="380" alt="Feishu Chat" />
290
+ </p>
291
+ </details>
292
+
293
+ * **Quick Setup**: Create self-built app on [Feishu Open Platform](https://open.feishu.cn/app), enable long connection > Fill App ID & Secret. See [Feishu Guide](docs/feishu-usage.md).
294
+
295
+ ---
296
+
297
+ #### ✈️ Telegram Bot (Bot API + Proxy Support)
298
+
299
+ Official Telegram Bot API with Long Polling and **built-in zero-dependency HTTP/HTTPS proxy tunnel**.
300
+
301
+ <p align="center">
302
+ <img src="docs/screenshots/telegram-bot-config.jpg" width="600" alt="Telegram Bot Config" />
303
+ </p>
304
+
305
+ * **Quick Setup**: Create bot with [@BotFather](https://t.me/BotFather) > Fill Bot Token (and optional proxy) > Send first message to auto-authorize. See [Telegram Guide](docs/telegram-usage.md).
306
+
307
+ ---
308
+
309
+ #### Standardized IM Commands
310
+
311
+ | Command | Description |
312
+ | :--- | :--- |
313
+ | *(Direct Text)* | Drives current active agent to think and code |
314
+ | `/sessions` (or `/list`) | List all sessions grouped by workspace |
315
+ | `/use N` (or `/resume N`) | Switch context to session number N |
316
+ | `/rename <new title>` | Rename active session title |
317
+ | `/workspaces` | List all registered workspaces in DSH |
318
+ | `/addworkspace <path>` | Remotely register a local project folder |
319
+ | `/new <prompt>` | Start a new session in current workspace |
320
+ | `/new <prompt> @N` | Start a new session in workspace N |
321
+ | `/stop` | Immediately abort current running task |
322
+ | `/end` | End and suspend active session |
323
+ | `/yes` / `/no` (or `1`/`2`) | Respond to sensitive operation permission approvals |
324
+ | `/status` | View agent status and system summary |
325
+ | `/help` | View full command and shortcut button help |
326
+
327
+ ---
328
+
329
+ ### 7. 📊 Maintenance Dashboard & Graceful Restart
330
+
331
+ Open **"Maintenance"** tab to monitor health and manage operations:
332
+
333
+ <p align="center">
334
+ <img src="docs/screenshots/mobile-remote-settings.jpg" width="380" alt="Maintenance Dashboard" />
335
+ </p>
336
+
337
+ * **📊 Host System Metrics Dashboard**: Real-time CPU model, total/used RAM, Node heap memory, and DSH uptime;
338
+ * **🔍 1-Click Network Diagnostics**: Diagnoses reverse proxy port, LAN IPv4, Cloudflare Anycast edge, and npm mirror latency;
339
+ * **🗄️ Configuration Backup & Migration**: 1-click export/import of `.json` configuration files;
340
+ * **🔄 Graceful Smooth Restart**: 1-click DSH service restart with automatic reconnect and page reload.
341
+
342
+ ---
343
+
344
+ ## 💬 FAQ
345
+
346
+ <details>
347
+ <summary><b>Q1: Phone cannot connect after scanning QR code?</b></summary>
348
+ <br/>
349
+
350
+ 1. **Wi-Fi Check**: Ensure phone and PC are on the same Wi-Fi network with AP isolation disabled;
351
+ 2. **Multi-NIC Switching**: If WSL/VMware/VPN is enabled, switch to physical Wi-Fi/Ethernet IP in the **"🛜 Network Interface / IP Selection"** dropdown;
352
+ 3. **Firewall**: Ensure firewall allows Node.js on port `3082`;
353
+ 4. **Use Public Tunnel**: Enable Cloudflare Tunnel if crossing network segments.
354
+ </details>
355
+
356
+ <details>
357
+ <summary><b>Q2: How is IM Bot security ensured? Can strangers trigger my agent?</b></summary>
358
+ <br/>
359
+
360
+ 1. **Strict Allowlist**: Built-in sender allowlist; only authorized users can drive the Agent;
361
+ 2. **Auto First Authorization**: Admin sending the first message after login automatically binds to allowlist;
362
+ 3. **Silent Drop**: Unauthorized messages are dropped at the lowest layer (Never fed to LLM).
363
+ </details>
364
+
365
+ <details>
366
+ <summary><b>Q3: What is the difference between Temporary and Fixed Cloudflare Tunnels?</b></summary>
367
+ <br/>
368
+
369
+ 1. **Temporary (Default)**: Zero-login random `*.trycloudflare.com` domain, ideal for quick outdoor access;
370
+ 2. **Fixed (Token Mode)**: Uses Cloudflare Zero Trust Named Tunnel Token to bind your own domain with auto-start on boot.
371
+ </details>
372
+
373
+ <details>
374
+ <summary><b>Q4: Will chat sessions and configurations be lost after upgrading or restarting DSH?</b></summary>
375
+ <br/>
376
+
377
+ 1. **Persistent Configuration**: All credentials, allowlists, and passwords persist in `~/.dsh-bridge/`;
378
+ 2. **Session Context Recovery**: Session history is persisted by DSH core engine; resume conversations with `/resume` anytime;
379
+ 3. **Backup & Migration**: 1-click `.json` export/import in Maintenance tab.
380
+ </details>
381
+
382
+ ---
383
+
384
+ ## 🛠️ Development & Contribution
385
+
386
+ Contributions are welcome! Feel free to submit an Issue or Pull Request.
387
+
388
+ ```bash
389
+ # 1. Clone repo
390
+ git clone https://github.com/wenbin-wb/dsh-bridge.git
391
+ cd dsh-bridge
392
+
393
+ # 2. Install dependencies & build
394
+ npm install
395
+ npm run build:client
396
+
397
+ # 3. Run unit tests
398
+ npm test
399
+
400
+ # 4. Link to local DSH Web Profile
401
+ dsh plugin --profile web add .
402
+ ```
403
+
404
+ ---
405
+
406
+ ## 📄 License
407
+
408
+ MIT © [wenbin-wb](https://github.com/wenbin-wb)