dsh-config-manager 0.1.65 → 0.1.66
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 +47 -6
- package/README.zh-CN.md +46 -5
- package/lib/adapters/plugins.js +3 -3
- package/lib/client.d.ts +4 -1
- package/lib/client.js +413 -384
- package/lib/core/plugin-cli.d.ts +34 -6
- package/lib/core/plugin-cli.js +90 -14
- package/lib/index.d.ts +1 -1
- package/lib/index.js +17 -6
- package/lib/ui/overview-view.d.ts +12 -0
- package/lib/ui/overview-view.js +10 -0
- package/package.json +15 -15
- package/src/adapters/plugins.ts +3 -3
- package/src/client/config-manager.module.css +5 -0
- package/src/client/locales.ts +8 -2
- package/src/client/overview/OverviewPanel.tsx +12 -1
- package/src/core/plugin-cli.test.ts +49 -8
- package/src/core/plugin-cli.ts +86 -12
- package/src/index.ts +16 -6
- package/src/ui/overview-view.test.ts +9 -0
- package/src/ui/overview-view.ts +16 -0
package/README.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# 🎒 DSH Config Manager
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/dsh-config-manager)
|
|
4
|
+
[](https://www.npmjs.com/package/dsh-config-manager)
|
|
5
|
+
[](https://github.com/xiajiajun516/dsh-config-manager/stargazers)
|
|
6
|
+
[](https://github.com/xiajiajun516/dsh-config-manager/blob/main/LICENSE)
|
|
7
|
+
[](https://github.com/deepseek-ai/deepseek-harness)
|
|
8
|
+
|
|
3
9
|
**DeepSeek Harness Backup, Restore & Migration Plugin.**
|
|
4
10
|
|
|
5
11
|
Backup, restore, export, import, migrate and sync your complete DeepSeek Harness (DSH) configuration — settings, model providers, plugins, MCP servers, skills, agent presets and workspaces — and restore your whole environment on a new machine with one click.
|
|
@@ -64,6 +70,21 @@ Browse the built-in official market for ready-made configurations (model provide
|
|
|
64
70
|
|
|
65
71
|
---
|
|
66
72
|
|
|
73
|
+
## 🆚 How it differs from the other DSH backup / sync plugins
|
|
74
|
+
|
|
75
|
+
Several DSH plugins live in this space and they solve different problems — pick the one that matches your situation; they can also coexist.
|
|
76
|
+
|
|
77
|
+
| Plugin | Strongest at | Where DSH Config Manager goes further |
|
|
78
|
+
|---|---|---|
|
|
79
|
+
| [xiaoyuyu6420/dsh-backup](https://github.com/xiaoyuyu6420/dsh-backup) | One-command `~/.dsh` snapshots from the CLI, plus session doctor / upgrade snapshots / rescue console | Review-before-write GUI flow (dry-run preview, per-item conflict decisions, automatic rollback), cross-machine path remapping, encrypted credential payload, configuration marketplace |
|
|
80
|
+
| [muyifc/dsh-config-sync](https://github.com/muyifc/dsh-config-sync) | Export / import DSH configuration to a portable, password-encrypted file, callable from tool calls | 13–14 sections incl. plugins / MCP / skills / profiles / workspaces, scheduled backups, Git + WebDAV sync per channel, session migration with path rebase |
|
|
81
|
+
| [dickpy/dsh-cloud-sync](https://github.com/dickpy/dsh-cloud-sync) · [weibaohui/dsh-sync](https://github.com/weibaohui/dsh-sync) | Keeping machines consistent through WebDAV / S3 or a private Git mirror | Sync is one of five capabilities here — alongside export/import, scheduling, marketplace and profile instance launch/stop |
|
|
82
|
+
| `cp -r ~/.dsh` (or Git on the home dir) | Free, zero setup, fine for a purely textual config | No secret handling, no path remapping, no capture of `link:` / `file:` plugin installs, no session-log work, no conflict handling or rollback |
|
|
83
|
+
|
|
84
|
+
**Short version**: for a one-command snapshot of everything, `dsh-backup` is excellent. If what you want is *move this working environment to another machine — and keep it in sync — with a review step before anything is written*, that is exactly what this plugin is for.
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
67
88
|
## ✨ Highlights
|
|
68
89
|
|
|
69
90
|
| Icon | Feature | In one line |
|
|
@@ -140,12 +161,32 @@ dsh plugin --profile web add dsh-config-manager@latest
|
|
|
140
161
|
|
|
141
162
|
> 💡 Just copy-paste the command: `@latest` ensures you get the newest build.
|
|
142
163
|
>
|
|
143
|
-
> 🐛
|
|
144
|
-
>
|
|
145
|
-
>
|
|
146
|
-
>
|
|
147
|
-
>
|
|
148
|
-
>
|
|
164
|
+
> 🐛 **If `@latest` installed an old version**: that's pnpm's `minimumReleaseAge` supply-chain policy (not a cache issue). The gate is evaluated **per version, at resolution time**: a release younger than the threshold (~30 days) stays invisible to `@latest` until it ages past it — and the clock restarts for every future release. Installing an exact version once fixes *that one version only*; the next release published is invisible to `@latest` again. It is **not** a one-time fix.
|
|
165
|
+
>
|
|
166
|
+
> **Permanent fix (recommended)** — exempt this single package from the age gate. Add to the profile's `pnpm-workspace.yaml` (`~/.dsh/profiles/web/pnpm-workspace.yaml`):
|
|
167
|
+
>
|
|
168
|
+
> ```yaml
|
|
169
|
+
> minimumReleaseAgeExclude:
|
|
170
|
+
> - dsh-config-manager
|
|
171
|
+
> ```
|
|
172
|
+
>
|
|
173
|
+
> After that `@latest` resolves the newest release normally — including every future release.
|
|
174
|
+
>
|
|
175
|
+
> **One-off fix** — ask npm which version is actually latest and install exactly that. Repeat it each time a newer version has been published:
|
|
176
|
+
>
|
|
177
|
+
> ```powershell
|
|
178
|
+
> # Windows (PowerShell)
|
|
179
|
+
> $v = (npm view dsh-config-manager version).Trim(); dsh plugin --profile web add "dsh-config-manager@$v"
|
|
180
|
+
> ```
|
|
181
|
+
>
|
|
182
|
+
> ```bash
|
|
183
|
+
> # macOS / Linux
|
|
184
|
+
> dsh plugin --profile web add "dsh-config-manager@$(npm view dsh-config-manager version)"
|
|
185
|
+
> ```
|
|
186
|
+
>
|
|
187
|
+
> After restarting DSH, **Settings → Backup & Migration → About** shows the version you are actually running (and pops up the release notes whenever it changes).
|
|
188
|
+
>
|
|
189
|
+
> - Or disable the age gate entirely with a one-liner (adds `minimumReleaseAge: 0` at the top of the profile's `pnpm-workspace.yaml`):
|
|
149
190
|
> ```powershell
|
|
150
191
|
> $f = "$env:USERPROFILE\.dsh\profiles\web\pnpm-workspace.yaml"
|
|
151
192
|
> $c = Get-Content $f -Raw
|
package/README.zh-CN.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# 🎒 DSH Config Manager
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/dsh-config-manager)
|
|
4
|
+
[](https://www.npmjs.com/package/dsh-config-manager)
|
|
5
|
+
[](https://github.com/xiajiajun516/dsh-config-manager/stargazers)
|
|
6
|
+
[](https://github.com/xiajiajun516/dsh-config-manager/blob/main/LICENSE)
|
|
7
|
+
[](https://github.com/deepseek-ai/deepseek-harness)
|
|
8
|
+
|
|
3
9
|
**DeepSeek Harness(DSH)配置备份、恢复与迁移插件。**
|
|
4
10
|
|
|
5
11
|
DSH Config Manager 是一个 DeepSeek Harness 配置备份与迁移插件:一键备份、恢复、导出、导入和迁移完整 DSH 配置,包括——
|
|
@@ -66,6 +72,21 @@ DSH 是你的 AI 助手工作台,里面存着你的各种设置:模型配置
|
|
|
66
72
|
|
|
67
73
|
---
|
|
68
74
|
|
|
75
|
+
## 🆚 与其它备份 / 同步插件的区别
|
|
76
|
+
|
|
77
|
+
DSH 生态里这个方向有几个插件,它们解决的问题并不相同——按自己的场景选一个即可,也可以共存。
|
|
78
|
+
|
|
79
|
+
| 插件 | 最擅长 | 本插件更进一步的地方 |
|
|
80
|
+
|---|---|---|
|
|
81
|
+
| [xiaoyuyu6420/dsh-backup](https://github.com/xiaoyuyu6420/dsh-backup) | 一条命令从 CLI 给整个 `~/.dsh` 打快照,另有会话体检 / 升级快照 / 救援控制台 | 写盘前可审阅的 GUI 流程(dry-run 预览、冲突逐项决策、失败自动回滚)、跨机路径重映射、加密凭据载荷、配置市场 |
|
|
82
|
+
| [muyifc/dsh-config-sync](https://github.com/muyifc/dsh-config-sync) | 把 DSH 配置导出/导入成可移植的密码加密文件,可被工具调用 | 13–14 个分区(含插件 / MCP / 技能 / 档案 / 工作区)、定时备份、Git + WebDAV 双通道同步、会话跨机迁移与路径重定基 |
|
|
83
|
+
| [dickpy/dsh-cloud-sync](https://github.com/dickpy/dsh-cloud-sync) · [weibaohui/dsh-sync](https://github.com/weibaohui/dsh-sync) | 通过 WebDAV / S3 或私有 Git 镜像让多台机器保持一致 | 同步只是本插件五项能力之一——另有导出/导入、定时备份、配置市场与档案实例启停 |
|
|
84
|
+
| `cp -r ~/.dsh`(或给 home 目录挂 Git) | 免费、零配置,纯文本配置够用 | 不处理密钥、不做路径重映射、抓不到 `link:` / `file:` 安装的本地插件、不动会话日志、没有冲突处理与回滚 |
|
|
85
|
+
|
|
86
|
+
**一句话**:想要「一条命令把一切打快照」,`dsh-backup` 很好用;想要「把一整套能用的环境搬到另一台电脑、并持续同步,而且写盘前一定先给你看」,那就是本插件。
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
69
90
|
## ✨ 核心亮点
|
|
70
91
|
|
|
71
92
|
| 图标 | 功能 | 一句话说明 |
|
|
@@ -143,11 +164,31 @@ dsh plugin --profile web add dsh-config-manager@latest
|
|
|
143
164
|
|
|
144
165
|
> 💡 照着复制就行:`@latest` 确保装到最新版。
|
|
145
166
|
>
|
|
146
|
-
> 🐛 **`@latest` 装到了旧版?** 这是 **pnpm
|
|
147
|
-
>
|
|
148
|
-
>
|
|
149
|
-
>
|
|
150
|
-
>
|
|
167
|
+
> 🐛 **`@latest` 装到了旧版?** 这是 **pnpm 的 `minimumReleaseAge` 供应链发布年龄策略**(不是缓存)。这个门槛**按版本、在解析时**判定:发布不足阈值(约 30 天)的版本对 `@latest` 不可见,直到它「变老」——而**每个新版本都会重新计一次**。所以「装一次精确版本就永久正常」是错的:它只解决当时那一个版本,之后作者一发新版,`@latest` 又会装到旧版,**不是一次性修复**。
|
|
168
|
+
>
|
|
169
|
+
> **永久解决(推荐)**——只把这一个包排除在年龄门槛之外。在 profile 的 `pnpm-workspace.yaml`(`~/.dsh/profiles/web/pnpm-workspace.yaml`)里加上:
|
|
170
|
+
>
|
|
171
|
+
> ```yaml
|
|
172
|
+
> minimumReleaseAgeExclude:
|
|
173
|
+
> - dsh-config-manager
|
|
174
|
+
> ```
|
|
175
|
+
>
|
|
176
|
+
> 之后 `@latest` 会一直解析到最新发布版,包括以后再发的新版本。
|
|
177
|
+
>
|
|
178
|
+
> **临时解决**——先问 npm「当前真正的最新版本是多少」,再按精确版本安装;每当有新版本发布都要重跑一次:
|
|
179
|
+
>
|
|
180
|
+
> ```powershell
|
|
181
|
+
> # Windows(PowerShell)
|
|
182
|
+
> $v = (npm view dsh-config-manager version).Trim(); dsh plugin --profile web add "dsh-config-manager@$v"
|
|
183
|
+
> ```
|
|
184
|
+
>
|
|
185
|
+
> ```bash
|
|
186
|
+
> # macOS / Linux
|
|
187
|
+
> dsh plugin --profile web add "dsh-config-manager@$(npm view dsh-config-manager version)"
|
|
188
|
+
> ```
|
|
189
|
+
>
|
|
190
|
+
> 重启 DSH 后,可在 **设置 → 备份与迁移 → 关于** 看到实际运行的版本(版本变化时也会自动弹出更新内容)。
|
|
191
|
+
>
|
|
151
192
|
> - 或一行命令彻底关闭年龄门槛(在 profile 的 `pnpm-workspace.yaml` 顶部加 `minimumReleaseAge: 0`):
|
|
152
193
|
> ```powershell
|
|
153
194
|
> $f = "$env:USERPROFILE\.dsh\profiles\web\pnpm-workspace.yaml"
|
package/lib/adapters/plugins.js
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
*/
|
|
13
13
|
import { isDeepStrictEqual } from 'node:util';
|
|
14
14
|
import { sha256Hex } from '../utils/hashing.js';
|
|
15
|
-
import { installSpecFor,
|
|
15
|
+
import { installSpecFor, resolveProcessProfileName } from '../core/plugin-cli.js';
|
|
16
16
|
import { LOCAL_PLUGIN_DIR } from '../core/local-plugin-pack.js';
|
|
17
17
|
import { msgOf, zhMsg } from '../core/messages.js';
|
|
18
18
|
import { isPathSafe, normalizePath } from '../utils/paths.js';
|
|
@@ -592,7 +592,7 @@ export class PluginsAdapter {
|
|
|
592
592
|
}
|
|
593
593
|
// 执行日志:记录实际将发起的子进程命令行(与宿主 DshPluginsFacade 的
|
|
594
594
|
// dsh plugin --profile <p> add <spec> 一致);仅非敏感文本,渲染前 UI 再 redact 兜底
|
|
595
|
-
ctx.onLog?.(`$ dsh plugin --profile ${ctx.target.profile ??
|
|
595
|
+
ctx.onLog?.(`$ dsh plugin --profile ${ctx.target.profile ?? resolveProcessProfileName()} add ${installSpecFor(name, spec)}`);
|
|
596
596
|
// 透传中止信号:用户「跳过当前插件」→ 宿主 kill 子进程 + 清半装状态 → 抛 ImportUserSkippedError
|
|
597
597
|
const result = await ctx.target.plugins.install(name, spec, ctx.signal);
|
|
598
598
|
const suffix = result.needsRestart ? msg('adapter.pluginRestartSuffix') : '';
|
|
@@ -614,7 +614,7 @@ export class PluginsAdapter {
|
|
|
614
614
|
warning: true,
|
|
615
615
|
// 保留 warning(§34.17 非致命):一个装不上的插件不得拖垮已成功导入的其余配置;
|
|
616
616
|
// message 附可复制的手动安装命令(profile 解析与 M1 宿主一致)。
|
|
617
|
-
message: (item.kind === 'Update' ? msg('adapter.pluginUpdateFailed', { name, msg: reason, profile:
|
|
617
|
+
message: (item.kind === 'Update' ? msg('adapter.pluginUpdateFailed', { name, msg: reason, profile: resolveProcessProfileName() }) : msg('adapter.pluginInstallFailed', { name, msg: reason, profile: resolveProcessProfileName() })),
|
|
618
618
|
};
|
|
619
619
|
}
|
|
620
620
|
}
|
package/lib/client.d.ts
CHANGED
|
@@ -2830,6 +2830,9 @@ declare const zh$3: {
|
|
|
2830
2830
|
readonly 'overview.activity.empty': '暂无操作记录(执行备份 / 导入 / 同步后在这里显示)';
|
|
2831
2831
|
readonly 'overview.empty.title': '开始保护你的配置';
|
|
2832
2832
|
readonly 'overview.empty.body': '创建第一个备份或快照后,这里会展示配置健康状态与最近活动。';
|
|
2833
|
+
readonly 'overview.empty.step1': '创建第一份备份';
|
|
2834
|
+
readonly 'overview.empty.step2': '导出 ZIP 带走';
|
|
2835
|
+
readonly 'overview.empty.step3': '新机器导入回来';
|
|
2833
2836
|
readonly 'overview.kind.import': '导入';
|
|
2834
2837
|
readonly 'overview.kind.restore': '恢复';
|
|
2835
2838
|
readonly 'overview.kind.rollback': '回滚';
|
|
@@ -3172,7 +3175,7 @@ declare const zh$3: {
|
|
|
3172
3175
|
readonly 'about.diag.profile': 'profile:{profile}';
|
|
3173
3176
|
readonly 'about.diag.pluginCount': '已识别插件:{count} 个';
|
|
3174
3177
|
readonly 'about.diag.manifestUnreadable': '该目录下读不到 package.json —— 插件清单必然为空;请确认 DSH 的 profile 与 DSH_HOME 是否与此处一致。';
|
|
3175
|
-
readonly 'about.diag.hint': '
|
|
3178
|
+
readonly 'about.diag.hint': '若与实际不符,请据此检查当前档案的启动方式(宿主 profileContext / 启动参数 --profile / 环境变量 DSH_PROFILE)与 DSH_HOME 环境变量。';
|
|
3176
3179
|
readonly 'about.releaseNotes.title': '版本更新内容';
|
|
3177
3180
|
readonly 'about.releaseNotes.loading': '正在获取更新内容…';
|
|
3178
3181
|
readonly 'about.releaseNotes.loadingMore': '正在加载更多版本…';
|