From 2714d79bea77915f25b3c40b39bc033fe6d34dac Mon Sep 17 00:00:00 2001 From: jiangchen <1703935164@qq.com> Date: Tue, 1 Sep 2026 14:28:46 +0800 Subject: [PATCH] docs: note dual-mode plugin --- docs/DESIGN.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/DESIGN.md b/docs/DESIGN.md index d6d0e29..02883f5 100644 --- a/docs/DESIGN.md +++ b/docs/DESIGN.md @@ -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)