@feiyang666/dsh-mobile-remote 1.4.2 → 1.4.4

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 CHANGED
@@ -1,5 +1,18 @@
1
1
  # 更新日志 / Changelog
2
2
 
3
+ ## v1.4.4 (2026-08-22)
4
+
5
+ ### 修复 / Fixed
6
+ - **安装插件后 dsh 服务启动崩溃**(`cordis.patch.yml`):bundle 补丁层 `insert` 块的 `name` 写成了无 scope 的裸包名 `dsh-mobile-remote`,而实际 npm 包名是 `@feiyang666/dsh-mobile-remote`。Cordis loader 按 `name` 去 profile 的 `node_modules` 中 import 该包时找不到(`Cannot find package 'dsh-mobile-remote'`),导致整个插件树加载失败、dsh 服务 `code=1` 退出。本版改为完整包名 `@feiyang666/dsh-mobile-remote`,与 `dsh-vault`、`dsh-usage-plugin` 等官方插件的写法保持一致。
7
+
8
+ ## v1.4.3 (2026-08-22)
9
+
10
+ ### 修复 / Fixed
11
+ - **移动端设置页空白 + 无法上下滚动**(`lib/index.js` MOBILE_CSS):v1.4.2 虽把设置弹窗改为全屏单栏,但面板仍是横向 `flex`(row)布局,内容列被压成 0 宽度 → 内容区整块空白;且内容列 `min-height:auto` 无法收缩,`.options` 区拿不到受限高度 → 不能滑动。本版:
12
+ - 面板强制 `flex-direction: column !important`,导航栏成顶部横向标签、内容列独占剩余空间;
13
+ - 内容列 `min-height: 0` + `overflow: hidden`,让设置选项区在手机端可正常上下滚动。
14
+ - **内网(非安全上下文)远程连接失败**(`lib/index.js` GATE_JS):当前 DSH 客户端多处裸调用 `crypto.randomUUID()`(RPC ID / 消息 ID / 实例令牌等),而该 Web Crypto API 仅在 HTTPS 或 localhost 存在。内网 http 直连(非安全上下文)下缺失(或存在但调用抛 `NotSupportedError`),导致连接与所有 RPC 失败,模型设置页因此报 `settings are unavailable in this browser`。本版在插件注入 `<head>` 的脚本里,用 `crypto.getRandomValues`(非安全上下文也可用)补一个 RFC 4122 v4 `crypto.randomUUID` 兜底,覆盖应用内全部调用点,内网访问 / 扫码连接恢复正常;DSH 自行修复后该兜底自动失效,无副作用。
15
+
3
16
  ## v1.4.2 (2026-08-21)
4
17
 
5
18
  ### 修复 / Fixed
package/README.md CHANGED
@@ -150,7 +150,7 @@ So for users, **installing is one command** — no YAML editing, no manual file
150
150
  - **Device count**: mobile-injected JS heartbeats every 30s; the host keeps an active-device map (90s TTL). Each heartbeat now reports full device metadata (screen / viewport / DPR / network / current page / language / platform), shown in the expandable device rows of the settings panel.
151
151
  - **QR code**: `GET /__dsh_remote/qr?url=...` returns SVG.
152
152
  - **Mobile polish**: `tapIndex` injects mobile CSS/JS — composer toolbar wraps on narrow screens, selects get width-capped, iOS inputs get 16px to prevent focus zoom; **DSH's native rail + hamburger drawer interactions are untouched**;
153
- - **Mobile settings page** (v1.4.2+): the native settings dialog becomes a full-screen single column on phones — the nav rail turns into a horizontally scrollable tab bar and the content column fills the remaining space; persistent native tooltip bubbles (e.g. the "stop / start / close sidebar" hints that stick on touch) are suppressed. The dialog is detected structurally, **not via harness-internal hashed class names**, so the plugin keeps working after DeepSeek Harness updates without modification.
153
+ - **Mobile settings page** (v1.4.2+): the native settings dialog becomes a full-screen single column on phones — the nav rail turns into a horizontally scrollable tab bar and the content column fills the remaining space; persistent native tooltip bubbles (e.g. the "stop / start / close sidebar" hints that stick on touch) are suppressed. The dialog is detected structurally, **not via harness-internal hashed class names**, so the plugin keeps working after DeepSeek Harness updates without modification. **v1.4.3** fixes the single-column settings layout — the panel was still a row-flex, collapsing the content column to zero width (blank content) and blocking vertical scroll; it now forces `flex-direction: column` plus `min-height: 0` so the options area actually scrolls on phones. It also adds a **`crypto.randomUUID` fallback for insecure contexts (LAN `http://`)**: current DSH clients call `crypto.randomUUID()` on the wire, which is only defined on HTTPS or localhost, so LAN direct access failed with `crypto.randomUUID is not a function` / `settings are unavailable in this browser`; the injected head script now provides an RFC 4122 v4 shim backed by `getRandomValues`.
154
154
 
155
155
  ---
156
156
 
@@ -175,7 +175,7 @@ This command does three things automatically:
175
175
 
176
176
  The same works for other profiles — replace `web` with your profile name.
177
177
 
178
- > Local tarball testing: `dsh plugin --profile web add C:\path\to\feiyang666-dsh-mobile-remote-1.4.2.tgz`
178
+ > Local tarball testing: `dsh plugin --profile web add C:\path\to\feiyang666-dsh-mobile-remote-1.4.3.tgz`
179
179
 
180
180
  ### 2. Restart and verify
181
181
 
package/README.zh.md CHANGED
@@ -150,7 +150,7 @@ dsh --profile web --patch remote-control.patch.yml
150
150
  - **设备数**:移动端注入 JS 每 30s 心跳上报,host 维护活跃设备表(90s 过期)。每次心跳会上报完整设备元数据(屏幕 / 视口 / DPR / 网络 / 当前页面 / 语言 / 平台),设置面板的设备行可展开查看。
151
151
  - **二维码**:`GET /__dsh_remote/qr?url=...` 返回 SVG。
152
152
  - **移动端适配**:`tapIndex` 注入移动端 CSS/JS,composer 输入栏窄屏换行、选择器限宽、iOS 输入框 16px 防缩放;**不破坏 DSH 原生 rail + 汉堡抽屉交互**;
153
- - **移动端设置页适配**(v1.4.2+):原生设置弹窗在手机上自动变为全屏单栏——导航栏变顶部横向滚动标签、内容区占满剩余空间;同时抑制触屏上常驻的原生 Tooltip 气泡(如「停止 / 开始 / 关闭菜单栏」提示文字)。通过结构标记识别设置弹窗,**不依赖 harness 内部哈希类名**,harness 升级后无需修改插件即可直接适配。
153
+ - **移动端设置页适配**(v1.4.2+):原生设置弹窗在手机上自动变为全屏单栏——导航栏变顶部横向滚动标签、内容区占满剩余空间;同时抑制触屏上常驻的原生 Tooltip 气泡(如「停止 / 开始 / 关闭菜单栏」提示文字)。通过结构标记识别设置弹窗,**不依赖 harness 内部哈希类名**,harness 升级后无需修改插件即可直接适配。**v1.4.3** 修复该单栏布局——面板原本仍是横向 `flex`,内容列被压成 0 宽度(内容空白)且无法上下滚动;现强制 `flex-direction: column` + `min-height: 0`,设置选项区在手机上可正常滚动。并新增**内网(非安全上下文)`crypto.randomUUID` 兜底**:当前 DSH 客户端在连接时直接调用 `crypto.randomUUID()`,该 Web Crypto API 仅在 HTTPS / localhost 存在,内网 http 直连会报 `crypto.randomUUID is not a function` / `settings are unavailable in this browser`;插件注入的头部脚本用 `getRandomValues` 补一个 RFC 4122 v4 实现,内网访问 / 扫码连接恢复正常。
154
154
 
155
155
  ---
156
156
 
@@ -175,7 +175,7 @@ dsh plugin --profile web add @feiyang666/dsh-mobile-remote
175
175
 
176
176
  其它 profile 同理,把 `web` 换成你的 profile 名即可(如 `dsh plugin --profile headless add ...`)。
177
177
 
178
- > 想用本地 tarball 测试:`dsh plugin --profile web add C:\path\to\feiyang666-dsh-mobile-remote-1.4.2.tgz`
178
+ > 想用本地 tarball 测试:`dsh plugin --profile web add C:\path\to\feiyang666-dsh-mobile-remote-1.4.3.tgz`
179
179
 
180
180
  ### 2. 重启并验证
181
181
 
package/RELEASE_NOTES.md CHANGED
@@ -1,38 +1,36 @@
1
- # dsh-mobile-remote v1.4.2
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.4.2)
14
-
15
- ### 📱 修复「提示文字常驻屏幕」
16
-
17
- DSH 原生的按钮提示气泡(Tooltip)由 hover / focus 触发,在触屏设备上点击按钮后焦点会一直停留在按钮上,导致「停止」「开始」「关闭菜单栏」等按钮的提示文字一直显示在屏幕上。本版在移动端直接隐藏提示气泡(按钮仍保留无障碍 `aria-label`),界面干净清爽。
18
-
19
- ### 📲 设置页完整适配移动端
20
-
21
- 原生设置弹窗是 800px 双栏布局(188px 导航栏 + 内容列),手机上几乎无法使用。本版改为**全屏单栏**:
22
-
23
- - 导航栏变成顶部**横向滚动胶囊标签**,触控目标 ≥ 36px;
24
- - 内容列独占剩余空间、边距收紧,各设置区块(含「远程控制」面板)获得完整宽度;
25
- - 通过 `MutationObserver` 识别设置弹窗结构(`role=dialog` 且首个子元素为 `<nav>`)打标适配,**不依赖 harness 内部哈希类名** —— DeepSeek Harness 后续升级后,本插件无需修改即可直接适配。
26
-
27
- ### 📐 远程控制面板窄屏细节
28
-
29
- 设备详情 / 外网状态行的长文本在手机上允许换行,行内放不下时自动换行,不再溢出卡片。
30
-
31
- ## 已知事项
32
-
33
- - 开启后服务暴露到公网,**请务必设置远程访问密码**,并仅在可信网络上使用
34
- - 外网隧道需确保服务器 `.env` 的 `FRP_TOKEN` 与 `/www/server/frps/frps.toml` 的 `auth.token` 完全一致,否则面板会明确提示鉴权失败
35
-
36
- ## 变更日志
37
-
38
- 详见 [CHANGELOG.md](./CHANGELOG.md)。
1
+ # dsh-mobile-remote v1.4.4
2
+
3
+ **DeepSeek Harness 移动端远程控制插件** —— 在 Web UI 设置页内置「远程控制」:连接二维码、一键开关、在线设备数,让手机通过局域网访问并操控电脑上的 DeepSeek Harness。本版**修复安装插件后 dsh 服务启动崩溃**的问题。
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.4.4)
14
+
15
+ ### 🐛 修复安装插件后 dsh 服务启动崩溃(必须升级)
16
+
17
+ 安装本插件后 dsh web 服务启动即崩溃(退出码 1),日志报:
18
+
19
+ ```
20
+ Cannot find package 'dsh-mobile-remote' imported from C:\Users\Administrator\.dsh\profiles\web\
21
+ ```
22
+
23
+ **根因**:bundle 补丁层 `cordis.patch.yml` 中插件行的 `name` 写成了无 scope 的裸包名 `dsh-mobile-remote`,而实际 npm 包名是 `@feiyang666/dsh-mobile-remote`。Cordis loader 按 `name` 去 profile 的 `node_modules` 中 import 该包时找不到,导致整个插件树加载失败、dsh 进程退出。
24
+
25
+ **本版修复**:`cordis.patch.yml` 的 `name` 改为完整包名 `@feiyang666/dsh-mobile-remote`,与其它官方插件保持一致。
26
+
27
+ > 已安装 v1.4.3 及更早版本的用户:请先在桌面端「插件管理」中卸载本插件(或执行 `dsh plugin --profile web remove @feiyang666/dsh-mobile-remote`),服务即可恢复启动,再安装本修复版。
28
+
29
+ ## 已知事项
30
+
31
+ - 开启后服务暴露到公网,**请务必设置远程访问密码**,并仅在可信网络上使用
32
+ - 外网隧道需确保服务器 `.env` 的 `FRP_TOKEN` 与 `/www/server/frps/frps.toml` 的 `auth.token` 完全一致,否则面板会明确提示鉴权失败
33
+
34
+ ## 变更日志
35
+
36
+ 详见 [CHANGELOG.md](./CHANGELOG.md)。
package/cordis.patch.yml CHANGED
@@ -1,7 +1,11 @@
1
1
  # dsh-mobile-remote 插件 bundle 补丁层。
2
- # 通过 `dsh plugin --profile web add dsh-mobile-remote`(或桌面端「插件管理 → 自定义安装」)
2
+ # 通过 `dsh plugin --profile web add @feiyang666/dsh-mobile-remote`(或桌面端「插件管理 → 自定义安装」)
3
3
  # 安装后,本文件会在 dsh web 启动时被挂载,把下面的插件行插入到宿主组合中。
4
4
  #
5
+ # 注意:name 必须是完整的 npm 包名(含 scope)。Cordis loader 会按 name 去 profile 的
6
+ # node_modules 里 import 该包,若写成无 scope 的裸包名会导致整个插件树加载失败
7
+ # (Cannot find package 'dsh-mobile-remote'),dsh 服务启动即崩溃(code=1)。
8
+ #
5
9
  # 插件是 host + client 双面插件:
6
10
  # - host 侧(lib/index.js,inject [webServer]):
7
11
  # * 通过 ctx.webServer.tapIndex 注入移动端响应式 CSS / JS;
@@ -11,5 +15,5 @@
11
15
  # * 由 dsh-client-modules 扫描加载,注册「设置 → 远程控制」section。
12
16
  - insert:
13
17
  - id: dsh-mobile-remote
14
- name: 'dsh-mobile-remote'
18
+ name: '@feiyang666/dsh-mobile-remote'
15
19
  inject: [webServer]