@mrrisega/dsh-remote 0.3.1 → 0.3.3
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/README.md +14 -3
- package/dsh-setup.mjs +19 -2
- package/package.json +17 -2
package/README.md
CHANGED
|
@@ -1,6 +1,17 @@
|
|
|
1
|
-
# dsh-remote
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
# dsh-remote — 手机远程控制 DeepSeek Harness(全功能 · App 级体验)
|
|
2
|
+
|
|
3
|
+
<p align="left">
|
|
4
|
+
<a href="https://github.com/mrRisega/dsh-remote/stargazers"><img alt="GitHub stars" src="https://img.shields.io/github/stars/mrRisega/dsh-remote?style=flat-square&label=Stars"></a>
|
|
5
|
+
<img alt="npm downloads" src="https://img.shields.io/npm/dt/@mrrisega/dsh-remote?style=flat-square&label=npm%20downloads">
|
|
6
|
+
<img alt="DeepSeek Harness" src="https://img.shields.io/badge/DeepSeek%20Harness-plugin-4f8cff?style=flat-square">
|
|
7
|
+
<img alt="dsh-plugin" src="https://img.shields.io/badge/topic-dsh--plugin-blueviolet?style=flat-square">
|
|
8
|
+
<img alt="Node" src="https://img.shields.io/badge/Node.js-%3E%3D20-339933?style=flat-square&logo=node.js&logoColor=white">
|
|
9
|
+
<img alt="License" src="https://img.shields.io/badge/License-PolyForm%20Noncommercial-2ea44f?style=flat-square">
|
|
10
|
+
</p>
|
|
11
|
+
|
|
12
|
+
> **离开电脑也能用手机 100% 全功能接管电脑上的 DeepSeek Harness(`dsh web`)**——发消息、看工具执行、审批权限、改设置、管凭据(含特权操作),操作体验与坐在电脑前完全一致。免内网穿透,局域网即连。
|
|
13
|
+
>
|
|
14
|
+
> **一条命令安装**:`npx @mrrisega/dsh-remote`
|
|
4
15
|
|
|
5
16
|
dsh-remote 是一个轻量的**隧道模式**远程控制方案:电脑端运行一个守护进程(bridge),
|
|
6
17
|
主动连接中继服务器(relay-router)注册为在线设备;手机浏览器打开 PWA 页面,
|
package/dsh-setup.mjs
CHANGED
|
@@ -512,6 +512,21 @@ function stripPluginEntries(patch) {
|
|
|
512
512
|
return out.join("\n").replace(/\n{3,}/g, "\n\n").trimEnd() + "\n";
|
|
513
513
|
}
|
|
514
514
|
|
|
515
|
+
/**
|
|
516
|
+
* 归一化 patch 基座:去掉 dsh 新 profile 默认的空文档占位行 `[]`。
|
|
517
|
+
* 默认 cordis.patch.yml 是「顶部注释 + []」,若保留 [] 再往下拼 `- insert:`,
|
|
518
|
+
* YAML 会报 “end of the stream or a document separator is expected”(dsh web 启动即崩)。
|
|
519
|
+
* 返回内容不含结尾换行;[] 行只在独立成行时视为占位,不影响真正的条目。
|
|
520
|
+
*/
|
|
521
|
+
function normalizePatchBase(patch) {
|
|
522
|
+
return String(patch ?? "")
|
|
523
|
+
.split("\n")
|
|
524
|
+
.filter((l) => !/^\[\s*\]\s*$/.test(l))
|
|
525
|
+
.join("\n")
|
|
526
|
+
.replace(/\n{3,}/g, "\n\n")
|
|
527
|
+
.trimEnd();
|
|
528
|
+
}
|
|
529
|
+
|
|
515
530
|
/** 在 profile 目录执行依赖安装(pnpm 优先)。 */
|
|
516
531
|
function installProfileDeps(profileDir) {
|
|
517
532
|
const pm = sh("command -v pnpm >/dev/null 2>&1 && echo pnpm || echo npm").stdout.trim() || "npm";
|
|
@@ -568,10 +583,12 @@ async function pluginCmd(argv) {
|
|
|
568
583
|
pkg.dependencies["dsh-remote-ui"] = `link:${pluginDir}`;
|
|
569
584
|
fs.writeFileSync(pkgFile, JSON.stringify(pkg, null, 2) + "\n");
|
|
570
585
|
|
|
571
|
-
//
|
|
586
|
+
// 先清掉旧条目(含旧版无标记条目),再写入带标记的新块,保证不重复。
|
|
587
|
+
// 关键:先清除默认的 [] 空文档占位行,否则拼接出的 YAML 非法,dsh web 启动即崩。
|
|
572
588
|
const stripped = stripPluginEntries(patch);
|
|
589
|
+
const base = normalizePatchBase(stripped);
|
|
573
590
|
const block = pluginBlock(CONFIG_DIR);
|
|
574
|
-
fs.writeFileSync(patchFile,
|
|
591
|
+
fs.writeFileSync(patchFile, (base ? base + "\n" : "") + block + "\n");
|
|
575
592
|
console.log(`✅ 已写入 ${patchFile}`);
|
|
576
593
|
console.log(" 执行依赖更新(pnpm install)...");
|
|
577
594
|
const r = installProfileDeps(profileDir);
|
package/package.json
CHANGED
|
@@ -1,7 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mrrisega/dsh-remote",
|
|
3
|
-
"version": "0.3.
|
|
4
|
-
"description": "Remote control
|
|
3
|
+
"version": "0.3.3",
|
|
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
|
+
"keywords": [
|
|
6
|
+
"deepseek-harness",
|
|
7
|
+
"dsh",
|
|
8
|
+
"dsh-plugin",
|
|
9
|
+
"remote-control",
|
|
10
|
+
"mobile",
|
|
11
|
+
"手机远程控制",
|
|
12
|
+
"远程控制",
|
|
13
|
+
"反向代理",
|
|
14
|
+
"pwa",
|
|
15
|
+
"reverse-proxy",
|
|
16
|
+
"self-hosted",
|
|
17
|
+
"phone",
|
|
18
|
+
"web-remote"
|
|
19
|
+
],
|
|
5
20
|
"type": "module",
|
|
6
21
|
"license": "PolyForm-Noncommercial-1.0.0",
|
|
7
22
|
"private": false,
|