@feiyang666/dsh-mobile-remote 1.0.1 → 1.1.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.
@@ -0,0 +1,49 @@
1
+ # dsh-mobile-remote v1.1.0
2
+
3
+ **DeepSeek Harness 移动端远程控制插件** —— 在 Web UI 设置页内置「远程控制」:连接二维码、一键开关、在线设备数,让手机通过局域网访问并操控电脑上的 DeepSeek Harness。
4
+
5
+ ## 安装方式
6
+
7
+ ```bash
8
+ dsh plugin --profile web add @feiyang666/dsh-mobile-remote
9
+ ```
10
+
11
+ 安装完成后**重启 dsh web 服务**,打开 `http://127.0.0.1:3080` → **设置 → 远程控制** 即可使用。
12
+
13
+ ## 本版更新(v1.1.0)
14
+
15
+ > 本版本在 v1.0.0(移动端输入栏适配)基础上新增完整的**远程控制能力**,并从「纯前端注入」升级为「Host + Client 双面插件」。
16
+
17
+ ### 设置页「远程控制」面板(新增)
18
+
19
+ - **连接二维码**:自动生成 `http://<局域网IP>:<端口>` 的二维码,手机相机 / 浏览器扫码即连
20
+ - **开启 / 关闭开关**:一键切换 webserver 监听地址(`0.0.0.0` ↔ `127.0.0.1`),经 dsh 官方 HMR 热重载**无需重启服务**
21
+ - **当前连接的设备数量**:移动端心跳上报,实时统计在线设备数
22
+ - 局域网地址列表、手机访问地址、配置位置一目了然
23
+
24
+ ### 纯命令行启动支持(新增)
25
+
26
+ - 官方 CLI 出于安全拒绝 `--host 0.0.0.0`,但本插件通过 profile 的 `cordis.patch.yml`(或 `--patch <overlay>`)写入 `webserver.host: 0.0.0.0`——**命令行用户无需安装桌面端**
27
+ - 与桌面端「移动端远程控制」开关实现方式完全一致
28
+
29
+ ### Host API(新增)
30
+
31
+ - `/__dsh_remote/status`:监听地址 / 端口 / LAN IP / 开关状态 / 在线设备数 / 配置位置
32
+ - `/__dsh_remote/toggle`:写入 / 移除 profile patch(幂等,重复操作不产生重复块)
33
+ - `/__dsh_remote/heartbeat`:移动端设备心跳上报(90s 过期)
34
+ - `/__dsh_remote/qr`:连接二维码 SVG(内联 MIT QR 生成器,零运行时依赖)
35
+
36
+ ### 移动端输入栏适配(保留)
37
+
38
+ - composer 输入栏窄屏下自动换行分排,选择模型 / 选择安全模式不再粘连
39
+ - 选择器限宽防溢出,按钮触控目标 ≥ 40px
40
+ - iOS 输入框字号 ≥ 16px 防止聚焦自动缩放
41
+
42
+ ## 已知事项
43
+
44
+ - 开启后服务暴露到局域网,请仅在可信的家庭 / 办公网络使用,不要暴露到公网
45
+ - 设备数统计依赖手机端页面打开后心跳上报,首次打开需等待几秒
46
+
47
+ ## 变更日志
48
+
49
+ 详见 [CHANGELOG.md](./CHANGELOG.md)。
package/cordis.patch.yml CHANGED
@@ -1,19 +1,15 @@
1
- # dsh-mobile-remote bundle patch: 手机端远程控制插件。
2
- # 在 dsh-base / dsh-web-app 基础层之后挂载。
1
+ # dsh-mobile-remote 插件 bundle 补丁层。
2
+ # 通过 `dsh plugin --profile web add dsh-mobile-remote`(或桌面端「插件管理 → 自定义安装」)
3
+ # 安装后,本文件会在 dsh web 启动时被挂载,把下面的插件行插入到宿主组合中。
3
4
  #
4
- # `inject` 列表为必需项:让 Cordis loader 等待 webServer / tools /
5
- # sessionPersistence 服务就绪后再激活插件。否则 apply 可能早于服务
6
- # 创建就运行,/api/dsh-mobile-remote 路由注册不上,设置页会报 not found。
7
- #
8
- # Host 半提供 /api/dsh-mobile-remote JSON API(状态 / 心跳)与
9
- # mobile_remote_status 模型工具;浏览器半通过 exports["./client"] 与
10
- # package.json 的 dsh.client 声明被 dsh-client-modules 自动发现,注入
11
- # 「远程控制」设置页与移动端浮动控制条。
12
-
5
+ # 插件是 host + client 双面插件:
6
+ # - host 侧(lib/index.js,inject [webServer]):
7
+ # * 通过 ctx.webServer.tapIndex 注入移动端响应式 CSS / JS;
8
+ # * 通过 ctx.webServer.register 提供 /__dsh_remote/* API
9
+ # (status / toggle / heartbeat / qr),支持设置页远程控制开关、二维码、设备数。
10
+ # - client 侧(lib/client.js,package.json 的 dsh.client 声明):
11
+ # * 由 dsh-client-modules 扫描加载,注册「设置 → 远程控制」section。
13
12
  - insert:
14
13
  - id: dsh-mobile-remote
15
- name: '@feiyang666/dsh-mobile-remote'
16
- inject:
17
- - webServer
18
- - tools
19
- - sessionPersistence
14
+ name: 'dsh-mobile-remote'
15
+ inject: [webServer]