dsh-go-plugin-sync 0.0.0-stage → 0.3.1

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 ADDED
@@ -0,0 +1,45 @@
1
+ # Changelog
2
+
3
+ ## 0.3.1 — 2026-12-04
4
+
5
+ - 包名改为 `dsh-go-plugin-sync`,发布到 npm
6
+ - 安装:`dsh plugin --profile web add dsh-go-plugin-sync`
7
+ - 其余功能与 0.3.0 相同
8
+
9
+ ## 0.3.0 — 2026-12-04
10
+
11
+ - 新增网页版同步页面:`http://<DSH 地址>:<端口>/local-plugin-sync/`
12
+ - 网页版支持勾选插件生成同步码、粘贴导入、安装选中
13
+ - 网页版显示任务状态和逐项结果,不需要 dsh-go 桥接
14
+ - 手机原生面板功能不变
15
+
16
+ ## 0.2.0 — 2026-12-04
17
+
18
+ 首个发布版本。
19
+
20
+ ### 同步
21
+ - 同步码(`DSHSYNC1:` 开头,压缩文本)复制与面板粘贴导入
22
+ - 扫描 dsh-go 原生插件和 Cordis bundle;官方 `@deepseek-ai/*` 包不参与同步
23
+ - 自动解析安装来源:同步码文件 → 本机/中转文件 → npm `包名@版本`
24
+ - 只增不删:只安装缺少的插件,不卸载、不覆盖
25
+ - 冲突、清单外、缺文件只做警告和标记
26
+ - 逐项成功/失败结果,失败清单带报错,可一键重试
27
+ - 导入后默认选中同步码里的插件,支持部分选择与全选
28
+ - 状态条显示待同步、同步失败、已同步
29
+
30
+ ### 高级通道
31
+ - Git 私有仓中转:推送 / 拉取
32
+ - SSH 直连:测试连接、拉远端清单、推送并安装、拉取并安装
33
+ - 长时间任务后台执行,面板读取状态和日志
34
+
35
+ ### 界面
36
+ - 输入框上方「插件同步」胶囊,打开原生面板
37
+ - v2 面板内「同步码」输入框 + 导入按钮
38
+ - 「同步引导」面板:复制 → 粘贴 → 选中 → 应用 → 重试 → 重启
39
+ - 只增不删的通俗说明
40
+
41
+ ### 安全与限制
42
+ - 同步码只含文本文件,不含密钥
43
+ - 不覆盖已有插件目录
44
+ - 不复用 DSH Remote 加密通道
45
+ - 首次两端都需要手动安装本插件
package/README.md CHANGED
@@ -1,3 +1,135 @@
1
- # Temporary Holding Version
1
+ # dsh-go 插件同步(dsh-go-plugin-sync)
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ 在 dsh-go 手机 App 里,把一台主机的插件清单打包成一串**同步码**,到另一台主机粘贴,就能自动安装缺少的插件。
4
+
5
+ 同步只增不删:不会卸载或覆盖你已经有的插件;版本对不上、缺少文件、本机多出来的插件只做标记提醒,不自动处理。
6
+
7
+ ## 功能
8
+
9
+ - **同步码**:面板里复制,另一台主机粘贴导入
10
+ - **自动解析安装来源**:优先用同步码里的文件,其次用本机/中转里的文件,最后按 `包名@版本` 从 npm 安装
11
+ - **部分选择 / 全选**:导入后默认选中同步码里的插件,可以手动取消或加选
12
+ - **逐项结果**:每个插件的成功/失败都会列出来,失败项带报错尾巴,可一键重试
13
+ - **状态条**:输入框上方显示「待同步 N 项 / 同步失败 N 项 / 插件已同步」
14
+ - **高级通道**:Git 私有仓中转、SSH 直连(推送 / 拉取 / 拉远端清单)
15
+ - **使用引导**:面板里的「使用引导」有完整步骤
16
+
17
+ ## 安装
18
+
19
+ 需要 dsh-go 手机 App(建议 1.6.1+)和本机 DSH 引擎。
20
+
21
+ ```sh
22
+ # 方式一:从 npm 安装
23
+ dsh plugin --profile web add dsh-go-plugin-sync
24
+
25
+ # 方式二:直接从 Gitee 安装
26
+ dsh plugin --profile web add git+https://gitee.com/o12354654/dshgochajiantongbucha.git
27
+
28
+ # 方式三:克隆到本地再安装
29
+ git clone https://gitee.com/o12354654/dshgochajiantongbucha.git
30
+ dsh plugin --profile web add ./dshgochajiantongbucha
31
+ ```
32
+
33
+ 装完在 App 的「引擎」页重启一次引擎。
34
+
35
+ ## 使用
36
+
37
+ 1. 在 A 主机打开「插件同步」,选中要同步的插件(或全选),点**复制同步码**
38
+ 2. 到 B 主机打开「插件同步」,把同步码粘进输入框,点**导入同步码**
39
+ 3. 列表会默认选中同步码里的插件;不需要的可以点掉
40
+ 4. 点确认框的**应用所选**,后台开始安装
41
+ 5. 面板会显示逐项结果;失败项点**重试失败项**
42
+ 6. 装完后重启一次引擎让新插件加载
43
+
44
+ 两端第一次都要手动装一次本插件,之后就能复制粘贴。
45
+
46
+ ## 网页版(电脑)
47
+
48
+ 电脑上的 DSH Web 可以直接打开内置同步页面,不需要 dsh-go 桥接:
49
+
50
+ ```text
51
+ http://<DSH 地址>:<端口>/local-plugin-sync/
52
+ ```
53
+
54
+ 页面提供和手机端一样的发送/接收:
55
+
56
+ 1. 勾选要同步的插件,点**复制同步码**
57
+ 2. 在另一台打开同一页面,把同步码粘进输入框,点**导入同步码**
58
+ 3. 默认选中同步码里的插件,可以取消;点**安装选中**
59
+ 4. 页面下方显示任务状态和逐项结果
60
+
61
+ 注意:电脑上装完插件后同样要重启一次 DSH。
62
+
63
+ ## 只增不删
64
+
65
+ - 只安装本机缺少的插件
66
+ - 不卸载、不覆盖已有插件
67
+ - 同名但版本或内容不同:标「冲突」并给出提示,不自动替换
68
+ - 本机有、清单没有:标「清单里没有」,只提示
69
+ - 缺少文件且没有安装来源:标「缺文件」,只提示
70
+
71
+ ## 高级配置
72
+
73
+ 在工作区新建 `plugin-sync-config.json`(面板的「生成配置模板」会写好路径):
74
+
75
+ ```json
76
+ {
77
+ "relay": {
78
+ "repo": "https://gitee.com/you/dsh-plugins.git",
79
+ "branch": "main",
80
+ "dir": "dsh-go-plugins"
81
+ },
82
+ "ssh": {
83
+ "host": "192.168.1.10",
84
+ "port": 22,
85
+ "user": "root",
86
+ "identity": "",
87
+ "remoteHome": "~/.dsh",
88
+ "dshPath": "dsh",
89
+ "nodePath": "node",
90
+ "profile": "web"
91
+ }
92
+ }
93
+ ```
94
+
95
+ - `relay`:两端都能读写的 Git 仓库,面板里可以「推送中转 / 拉取中转」
96
+ - `ssh`:本机引擎直连远端 DSH 主机;`identity` 填私钥路径,留空则用 ssh agent
97
+ - SSH 只支持密钥或 agent,不保存密码;Git 用系统凭据(HTTPS 令牌或 SSH 密钥)
98
+
99
+ ## 限制
100
+
101
+ - **不能复用 DSH Remote 的加密通道**:DSH Remote 下 App 只能开关插件,安装/卸载要到远端那台机器执行;插件同步走同步码、Git 中转或 SSH
102
+ - 同步码上限约 1900 字符;太长会自动退化成「只带清单」,再按 npm 版本安装
103
+ - Cordis 插件可能依赖 DSH 版本或平台,装不上会进失败清单
104
+ - 不同步插件的启用状态和插件配置
105
+ - 首次两端都要手动安装本插件
106
+
107
+ ## 安全
108
+
109
+ - 只粘贴可信来源的同步码:插件代码会在本机运行
110
+ - 同步码只包含插件的文本文件,不含密钥
111
+ - 写入插件目录时不会覆盖已经存在的目录
112
+
113
+ ## 兼容性
114
+
115
+ - dsh-go App:1.6.1+(面板输入框使用 v2 视图)
116
+ - DSH:0.2.2-rc.1
117
+ - dsh-go 桥接:0.4.0
118
+
119
+ ## 开发
120
+
121
+ ```sh
122
+ node "$DSH_HOME/skills/dsh-go-plugin/kit/bin/check.mjs" . --load
123
+ ```
124
+
125
+ ---
126
+
127
+ ## English
128
+
129
+ `dsh-go-plugin-sync` moves a dsh-go plugin set between hosts with a compact sync
130
+ code. Copy the code on one host, paste it into the Plugin sync panel on the
131
+ other, and missing plugins install automatically.
132
+
133
+ Add-only: it never uninstalls or overwrites existing plugins. Conflicts and
134
+ missing files are reported as warnings. Advanced transports: a private Git relay
135
+ or direct SSH.
@@ -0,0 +1,4 @@
1
+ # id: any unique id; name: must equal "name" in package.json.
2
+ - insert:
3
+ - id: dsh-go-plugin-sync
4
+ name: dsh-go-plugin-sync