@wenbin_wb/dsh-bridge 2.8.7 → 2.10.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/CHANGELOG.md +70 -0
- package/README.en.md +408 -572
- package/README.md +430 -570
- package/client/client.js +3983 -3657
- package/client/index.js +4244 -4809
- package/client/mobile-styles.js +802 -0
- package/client/unlock-manager.js +142 -0
- package/docs/fix-plan-202608.md +108 -0
- package/lib/auth/login-template.js +381 -381
- package/lib/auth/manager.js +97 -22
- package/lib/bridge-rpc.js +48 -104
- package/lib/cloudflared-manager.mjs +361 -345
- package/lib/compat.js +129 -0
- package/lib/feishu/index.js +225 -222
- package/lib/feishu/node.js +433 -409
- package/lib/index.js +271 -244
- package/lib/platform/base.js +147 -156
- package/lib/platform/commands.js +221 -0
- package/lib/platform/conversation-bridge.js +816 -1570
- package/lib/platform/dsh-storage.js +117 -0
- package/lib/platform/index.js +10 -10
- package/lib/platform/message-split.js +191 -0
- package/lib/platform/session-catalog.js +372 -0
- package/lib/platform/stream-slices.js +21 -0
- package/lib/qq/index.js +312 -309
- package/lib/qq/node.js +532 -533
- package/lib/telegram/index.js +215 -212
- package/lib/telegram/node.js +348 -350
- package/lib/tunnel-client.mjs +39 -15
- package/lib/wechat/gateway.js +973 -960
- package/lib/wechat/index.js +244 -241
- package/lib/wechat/media.js +285 -281
- package/lib/wechat/node.js +352 -350
- package/package.json +6 -2
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-
|
|
30
|
-
>
|
|
31
|
-
>
|
|
32
|
-
>
|
|
33
|
-
> Seamlessly
|
|
34
|
-
|
|
35
|
-
---
|
|
36
|
-
|
|
37
|
-
##
|
|
38
|
-
|
|
39
|
-
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
48
|
-
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
-
|
|
58
|
-
-
|
|
59
|
-
-
|
|
60
|
-
-
|
|
61
|
-
-
|
|
62
|
-
-
|
|
63
|
-
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
>
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
<
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
- **
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
<img src="docs/screenshots/
|
|
242
|
-
</p>
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
<
|
|
247
|
-
<
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
|
323
|
-
|
|
324
|
-
|
|
|
325
|
-
| `/
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
>
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
<details>
|
|
357
|
-
<summary
|
|
358
|
-
<br/>
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
</details>
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
---
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-

|
|
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
|
-

|
|
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
|
+
|
|
157
|
+
<img src="docs/screenshots/mobile-chat.jpg" width="23%" alt="Mobile Chat" />
|
|
158
|
+
|
|
159
|
+
<img src="docs/screenshots/mobile-drawer.jpg" width="23%" alt="Mobile Drawer" />
|
|
160
|
+
|
|
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
|
+
|
|
169
|
+
<img src="docs/screenshots/mobile-settings-tunnel.jpg" width="23%" alt="Tunnel Settings" />
|
|
170
|
+
|
|
171
|
+
<img src="docs/screenshots/mobile-settings-im.jpg" width="23%" alt="IM Bot Settings" />
|
|
172
|
+
|
|
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)
|