@feiyang666/dsh-mobile-remote 1.4.4 → 1.4.6
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 +10 -0
- package/RELEASE_NOTES.md +27 -9
- package/lib/client.js +5 -1
- package/lib/external.js +4 -0
- package/lib/index.js +4 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# 更新日志 / Changelog
|
|
2
2
|
|
|
3
|
+
## v1.4.6 (2026-08-22)
|
|
4
|
+
|
|
5
|
+
### 修复 / Fixed
|
|
6
|
+
- **启用远程控制后写坏 profile 的 `cordis.patch.yml`,服务启动即崩溃**(`lib/index.js` 的 `setPatchEnabled`、`lib/external.js` 的 `ensureTrustedHost`):官方模板生成的 profile patch 文件内容是 `# user patch layer for this profile\n[]`(空数组占位),插件往文件**末尾追加** `- id: webserver` 等列表块时未先移除该 `[]` 行,导致同一文件出现两个 YAML 文档且无 `---` 分隔符,js-yaml 解析报 `YAMLException: end of the stream or a document separator is expected`,dsh 服务启动即崩溃。本版在写入前过滤掉裸 `[]` 占位行,patch 文件始终是单一文档,已用官方 `entryListSchema` 验证可解析。
|
|
7
|
+
|
|
8
|
+
## v1.4.5 (2026-08-22)
|
|
9
|
+
|
|
10
|
+
### 修复 / Fixed
|
|
11
|
+
- **客户端插件加载失败**(`lib/client.js`):`window.__ModuleLoader__.load` 的 `id` 写成了无 scope 的裸包名 `dsh-mobile-remote`,而 client-modules 按 loader entry 的完整包名 `@feiyang666/dsh-mobile-remote` 校验注册,导致报 `loaded without registering "@feiyang666/dsh-mobile-remote"`、客户端插件无法加载。本版改为完整包名,与 `dsh-vault`、`dsh-usage-plugin` 的 client bundle 写法一致。
|
|
12
|
+
|
|
3
13
|
## v1.4.4 (2026-08-22)
|
|
4
14
|
|
|
5
15
|
### 修复 / Fixed
|
package/RELEASE_NOTES.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# dsh-mobile-remote v1.4.
|
|
1
|
+
# dsh-mobile-remote v1.4.6
|
|
2
2
|
|
|
3
|
-
**DeepSeek Harness 移动端远程控制插件** —— 在 Web UI 设置页内置「远程控制」:连接二维码、一键开关、在线设备数,让手机通过局域网访问并操控电脑上的 DeepSeek Harness
|
|
3
|
+
**DeepSeek Harness 移动端远程控制插件** —— 在 Web UI 设置页内置「远程控制」:连接二维码、一键开关、在线设备数,让手机通过局域网访问并操控电脑上的 DeepSeek Harness。本版**修复启用远程控制后写坏 profile 的 `cordis.patch.yml`(服务启动即崩溃)**,并继承 v1.4.5 / v1.4.4 的完整包名修复。
|
|
4
4
|
|
|
5
5
|
## 安装方式
|
|
6
6
|
|
|
@@ -10,21 +10,39 @@ dsh plugin --profile web add @feiyang666/dsh-mobile-remote
|
|
|
10
10
|
|
|
11
11
|
安装完成后**重启 dsh web 服务**,打开 `http://127.0.0.1:3080` → **设置 → 远程控制** 即可使用。
|
|
12
12
|
|
|
13
|
-
## 本版更新(v1.4.
|
|
13
|
+
## 本版更新(v1.4.6)
|
|
14
14
|
|
|
15
|
-
### 🐛
|
|
15
|
+
### 🐛 修复启用远程控制后写坏 profile 的 cordis.patch.yml(服务启动即崩溃)
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
在设置页开启「远程控制」并重启服务后,dsh 启动即崩溃,日志报:
|
|
18
18
|
|
|
19
19
|
```
|
|
20
|
-
|
|
20
|
+
Error: dsh: failed to parse overlay C:\Users\Administrator\.dsh\profiles\web\cordis.patch.yml:
|
|
21
|
+
YAMLException: end of the stream or a document separator is expected (7:1)
|
|
21
22
|
```
|
|
22
23
|
|
|
23
|
-
|
|
24
|
+
**根因**:官方模板生成的 profile patch 文件内容是 `# user patch layer for this profile\n[]`(空数组占位)。插件开启远程控制 / 外网隧道时,往文件**末尾追加** `- id: webserver` 列表块,但未先移除 `[]` 占位行,导致同一文件出现两个 YAML 文档且无 `---` 分隔符,js-yaml 无法解析。
|
|
24
25
|
|
|
25
|
-
|
|
26
|
+
**本版修复**:写入前过滤掉裸 `[]` 占位行(`setPatchEnabled` / `ensureTrustedHost`),patch 文件始终是单一 YAML 数组,已用官方 `entryListSchema` 验证可解析。
|
|
26
27
|
|
|
27
|
-
|
|
28
|
+
### 🐛 修复客户端插件加载失败(client-modules: loaded without registering)
|
|
29
|
+
|
|
30
|
+
安装本插件后 WebUI 报错:
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
Failed to load plugins
|
|
34
|
+
failed to import loader entry 374151e3 (@feiyang666/dsh-mobile-remote):
|
|
35
|
+
client-modules: bundle /plugins/@feiyang666/dsh-mobile-remote/client.js?rev=...
|
|
36
|
+
loaded without registering "@feiyang666/dsh-mobile-remote" via __ModuleLoader__.load
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
**根因**:client 侧 bundle(`lib/client.js`)中 `window.__ModuleLoader__.load` 的 `id` 写成了无 scope 的裸包名 `dsh-mobile-remote`,而 client-modules 按完整包名 `@feiyang666/dsh-mobile-remote` 校验注册结果,导致校验失败、客户端插件无法加载。
|
|
40
|
+
|
|
41
|
+
**本版修复**:`__ModuleLoader__.load` 的 `id` 改为完整包名 `@feiyang666/dsh-mobile-remote`,与 `dsh-vault`、`dsh-usage-plugin` 等官方插件的 client bundle 写法一致。
|
|
42
|
+
|
|
43
|
+
> 本版同时包含 v1.4.4 的修复:`cordis.patch.yml` 的 `name` 改为完整包名(修复 dsh 服务启动崩溃 `Cannot find package 'dsh-mobile-remote'`)。
|
|
44
|
+
|
|
45
|
+
> 已安装旧版本的用户:请先卸载本插件(桌面端「插件管理」或 `dsh plugin --profile web remove @feiyang666/dsh-mobile-remote`),再重新安装本修复版。
|
|
28
46
|
|
|
29
47
|
## 已知事项
|
|
30
48
|
|
package/lib/client.js
CHANGED
|
@@ -8,9 +8,13 @@
|
|
|
8
8
|
//
|
|
9
9
|
// 打包格式:浏览器 module loader(window.__ModuleLoader__.load)标准 bundle,
|
|
10
10
|
// 与官方 client 插件一致。纯 React.createElement,无 JSX 构建依赖。
|
|
11
|
+
//
|
|
12
|
+
// 注意:__ModuleLoader__.load 的 id 必须是完整的 npm 包名(含 scope)。client-modules
|
|
13
|
+
// 按 loader entry 的包名(@feiyang666/dsh-mobile-remote)校验注册,若写成裸包名会报
|
|
14
|
+
// "loaded without registering ..." 导致客户端插件加载失败。
|
|
11
15
|
|
|
12
16
|
window.__ModuleLoader__.load({
|
|
13
|
-
id: 'dsh-mobile-remote',
|
|
17
|
+
id: '@feiyang666/dsh-mobile-remote',
|
|
14
18
|
factory: (require) => {
|
|
15
19
|
var module = { exports: {} };
|
|
16
20
|
var exports = module.exports;
|
package/lib/external.js
CHANGED
|
@@ -202,6 +202,10 @@ async function downloadFrpc(base) {
|
|
|
202
202
|
*/
|
|
203
203
|
function ensureTrustedHost(patchFile, domain) {
|
|
204
204
|
let content = existsSync(patchFile) ? readFileSync(patchFile, 'utf8') : ''
|
|
205
|
+
// 移除官方模板的空数组占位行 `[]`(与 index.js setPatchEnabled 同理):
|
|
206
|
+
// 它单独构成一个 YAML 文档,与追加的列表块拼接会形成无分隔符的多文档流,
|
|
207
|
+
// js-yaml 解析报 "end of the stream or a document separator is expected"。
|
|
208
|
+
content = content.replace(/^\s*\[\s*\]\s*$/gm, '')
|
|
205
209
|
// 1) 清理旧的错误块(id: client-connection 或旧格式的纯数组),避免堆积/语法冲突
|
|
206
210
|
content = content.replace(/\n*(# --- dsh-mobile-remote external trusted-host ---)\n[\s\S]*?(# --- end dsh-mobile-remote external trusted-host ---)\n*/g, '\n')
|
|
207
211
|
content = content.replace(/\n{3,}/g, '\n\n').replace(/\s*$/, '\n')
|
package/lib/index.js
CHANGED
|
@@ -634,6 +634,10 @@ function setPatchEnabled(ctx, enabled) {
|
|
|
634
634
|
const { file, content, lines } = readPatchFile(ctx)
|
|
635
635
|
const block = findRemoteBlock(lines)
|
|
636
636
|
let out = lines.slice()
|
|
637
|
+
// 移除官方模板的空数组占位行 `[]`:它单独构成一个 YAML 文档,与追加的
|
|
638
|
+
// 列表块拼接会形成无 `---` 分隔符的多文档流,js-yaml 解析报
|
|
639
|
+
// "end of the stream or a document separator is expected",导致 dsh 服务启动即崩溃。
|
|
640
|
+
out = out.filter((l) => l.trim() !== '[]')
|
|
637
641
|
|
|
638
642
|
if (block) {
|
|
639
643
|
out.splice(block.start, block.end - block.start)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@feiyang666/dsh-mobile-remote",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.6",
|
|
4
4
|
"description": "DeepSeek Harness mobile remote-control plugin: LAN/external remote control (QR / on-off toggle / remote-access password gate), rich telemetry (expandable device details, system CPU/memory/load, DSH app state: version/sessions/workspaces/plugins/models), real external-tunnel status detection (frpc token / reconnect diagnostics), plus mobile-first UI polish and faster remote loading.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"deepseek",
|