docs: note dual-mode plugin

This commit is contained in:
2026-09-01 14:28:46 +08:00
parent 3ea27d747f
commit 2714d79bea
+4 -2
View File
@@ -55,8 +55,10 @@
### 3.2 dsh-watch(DSH 插件)
- 运行在 Harness 内,apply(ctx, config)。
- 配置:userId / token / serverUrl / reconnectMs / timeoutMs。
- 主动外连服务器,注册 userId。
- 配置:mode(relay/direct)、token;relay 用 serverUrl/userId/reconnectMs/timeoutMs,direct 用 host/port。
- 支持两种模式:
- relay:插件主动外连 DSHWatch_Server 注册 userId,手机连同一服务器(公网/内网穿透均可)。
- direct:插件在本机起一个 WebSocket 服务(host/port/token),手机直接连进来(适合局域网或用户自行内网穿透)。
- 把 DSH apiProxy 的方法透传成远程 RPC:
- harness.status、harness.prompt
- session.*(list/create/history/prompt/cancel/rename/fork/models/selectModel/attachment)