@mrrisega/dsh-remote 0.6.4-beta.4 → 0.6.4-beta.5
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/dsh-setup.mjs
CHANGED
|
@@ -467,10 +467,13 @@ async function setup(argv) {
|
|
|
467
467
|
|
|
468
468
|
const pub = await fetchPublicConfig(cfg.api_url || DEFAULT_API);
|
|
469
469
|
const webUp = await isDshWebUp();
|
|
470
|
-
// 服务状态字符串是给插件面板解析的稳定契约(running / 未运行)
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
470
|
+
// 服务状态字符串是给插件面板解析的稳定契约(running / 未运行),不要改口径。
|
|
471
|
+
// 三分支:running / 未运行(有原因) / 未安装(跳过或平台不支持)——最后一种既不能显示"运行中",
|
|
472
|
+
// 也不能显示"未运行(原因)",它压根没装(此前会打出自相矛盾的"(当前平台不支持) — ✅ 运行中")。
|
|
473
|
+
const svcSkipped = st.status === "skipped" || st.status === "unsupported" || !svc.path;
|
|
474
|
+
const svcState = svcSkipped
|
|
475
|
+
? (st.status === "skipped" ? "未安装(本次显式跳过)" : "未安装(当前平台不支持自启动)")
|
|
476
|
+
: (st.ok ? `✅ 运行中${st.pid ? ` (pid=${st.pid})` : ""}` : `未运行 (${st.detail || st.status})`);
|
|
474
477
|
const L = [];
|
|
475
478
|
L.push("✅ 安装完成");
|
|
476
479
|
if (selfHosted) {
|
|
@@ -479,9 +482,15 @@ async function setup(argv) {
|
|
|
479
482
|
} else {
|
|
480
483
|
L.push(` 远程控制地址: ${pub.app_url || DEFAULT_APP_URL}`);
|
|
481
484
|
}
|
|
482
|
-
L.push(
|
|
485
|
+
L.push(svcSkipped
|
|
486
|
+
? ` 自启动服务: ${svcState},可用 \`dsh-remote run\` 手动运行 bridge`
|
|
487
|
+
: ` 自启动服务: ${svc.path} — ${svcState}`);
|
|
483
488
|
// 唯一一处"下一步"引导(上面各阶段不再重复打印同样的话)
|
|
484
|
-
if (
|
|
489
|
+
if (svcSkipped) {
|
|
490
|
+
// 没装自启动服务,就没有"服务状态"可谈,更不该给出"打开 dsh web 就会自动启动"的承诺
|
|
491
|
+
L.push("");
|
|
492
|
+
L.push("ℹ 未安装自启动服务:需要时执行 `dsh-remote run`(前台运行 bridge),或重新安装以启用自启动。");
|
|
493
|
+
} else if (!st.ok && !webUp) {
|
|
485
494
|
// dsh web 没开时 bridge 起来即退,这是正常状态;要说清"什么时候会自己好",而不是甩一句"启动失败"
|
|
486
495
|
L.push("");
|
|
487
496
|
L.push("ℹ 检测到 dsh web 当前没有运行,所以 bridge 还没接上(正常,不是安装出错)。");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mrrisega/dsh-remote",
|
|
3
|
-
"version": "0.6.4-beta.
|
|
3
|
+
"version": "0.6.4-beta.5",
|
|
4
4
|
"description": "手机远程控制 DeepSeek Harness · Remote control DeepSeek Harness (dsh web) from any phone browser — 100% 全功能 App 级体验:发消息、看工具执行、审批权限、改设置、管凭据,含特权操作,免内网穿透。一条命令安装 npx @mrrisega/dsh-remote。Mobile remote control for DSH, self-host or SaaS, no server needed on LAN.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"deepseek-harness",
|
|
@@ -1739,7 +1739,7 @@ const PLUGIN_ID = "dsh-remote-web";
|
|
|
1739
1739
|
const PLUGIN_LEGACY_IDS = ["dsh-remote-ui"];
|
|
1740
1740
|
const PLUGIN_ALL_IDS = [PLUGIN_ID, ...PLUGIN_LEGACY_IDS];
|
|
1741
1741
|
/** 插件自身发布版本(与 dsh-remote 根包同步递增)。 */
|
|
1742
|
-
const PLUGIN_VERSION = "0.6.4-beta.
|
|
1742
|
+
const PLUGIN_VERSION = "0.6.4-beta.5";
|
|
1743
1743
|
const UPDATE_LOG = ".dsh-update.log";
|
|
1744
1744
|
const UPDATE_MARKER = ".dsh-update-running";
|
|
1745
1745
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-remote-web",
|
|
3
|
-
"version": "0.6.4-beta.
|
|
3
|
+
"version": "0.6.4-beta.5",
|
|
4
4
|
"description": "公网远程控制 DeepSeek Harness(dsh web):安装即得专属加密地址,人在外面也能用手机访问电脑上的 dsh——无需同一局域网/WiFi、无需公网 IP 与内网穿透,全程加密;手机端 100% 还原电脑体验(对话/工具/审批/设置)。技术用户可选自建服务,流量走自己的服务器。Remote control DeepSeek Harness (dsh web) from anywhere over the public internet — install, get an encrypted URL, use it from your phone on any network (dual-half cordis plugin: Settings panel + same-origin /dsh-remote routes). (2026-09 由 dsh-remote-ui 更名 / renamed from dsh-remote-ui; dsh-remote 的 dsh web 插件半,不是纯 UI/皮肤插件)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -65,6 +65,20 @@ test("安装输出:真失败(dsh web 在运行但 bridge 没起来)必须给原
|
|
|
65
65
|
assert.ok(/\.dsh-bridge\.log/.test(failBranch), "真失败分支要给出日志路径供排查");
|
|
66
66
|
});
|
|
67
67
|
|
|
68
|
+
test("安装输出:跳过/不支持自启动时不得自相矛盾地显示「运行中」", () => {
|
|
69
|
+
const block = src.slice(src.indexOf("const webUp = await isDshWebUp();"));
|
|
70
|
+
// 三态判定必须存在:未安装 与 运行中/未运行 分开
|
|
71
|
+
assert.ok(/const svcSkipped = st\.status === "skipped"/.test(block), "应识别 skipped/unsupported/无路径三态");
|
|
72
|
+
assert.ok(/未安装(本次显式跳过)/.test(block), "显式跳过要说清是跳过");
|
|
73
|
+
assert.ok(/未安装(当前平台不支持自启动)/.test(block), "平台不支持要说清原因");
|
|
74
|
+
// 跳过分支的文案里不能出现「运行中」
|
|
75
|
+
const skippedBranch = block.slice(block.indexOf("if (svcSkipped) {"), block.indexOf("} else if (!st.ok && !webUp) {"));
|
|
76
|
+
const texts = (skippedBranch.match(/L\.push\((`[^`]*`|"[^"]*")/g) || []).join("\n");
|
|
77
|
+
assert.ok(!/运行中/.test(texts), `未安装自启动服务时不得声称「运行中」:\n${texts}`);
|
|
78
|
+
// 未安装时也不该承诺「打开 dsh web 就会自动启动」(那是自启动服务在管)
|
|
79
|
+
assert.ok(!/自动启动/.test(texts), "未安装自启动服务时不得承诺自动启动");
|
|
80
|
+
});
|
|
81
|
+
|
|
68
82
|
test("安装输出:服务状态字符串仍是插件面板可解析的稳定契约", () => {
|
|
69
83
|
// 插件半按 running / 未运行 解析,不能因为排版调整改口径
|
|
70
84
|
assert.ok(/\? `✅ 运行中/.test(src), "running 口径保留(带 pid)");
|