dsh-profile-config-sync 0.6.40 → 0.6.41

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.en.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  > **dsh-profile-config-sync** — multi-device configuration **backup / sync / restore** for the DeepSeek Harness desktop client.
4
4
 
5
+ [![npm](https://img.shields.io/npm/v/dsh-profile-config-sync?style=flat-square&logo=npm&logoColor=white&label=npm&color=cb3837)](https://www.npmjs.com/package/dsh-profile-config-sync)
6
+ [![release](https://img.shields.io/github/v/release/huanyu-a/dsh-profile-config-sync?style=flat-square&label=release&color=2f81f7)](https://github.com/huanyu-a/dsh-profile-config-sync/releases/latest)
7
+ [![license](https://img.shields.io/github/license/huanyu-a/dsh-profile-config-sync?style=flat-square&color=3fb950)](LICENSE)
8
+ [![platform](https://img.shields.io/badge/platform-Windows%20%7C%20macOS%20%7C%20Linux-8957e5?style=flat-square)](#sync-scope)
9
+ [![groups](https://img.shields.io/badge/sync%20scope-12%20groups-1f6feb?style=flat-square)](#sync-scope)
10
+ [![tests](https://img.shields.io/badge/self--check-64%20suites%20%C2%B7%201065%20asserts-3fb950?style=flat-square)](https://github.com/huanyu-a/dsh-profile-config-sync/blob/main/docs/CHANGELOG.md)
11
+
5
12
  [中文](README.md) | English
6
13
 
7
14
  DSH keeps its configuration in a dozen places under `~/.dsh`: the profile, the global prompt, skills, agent presets, plugin settings, plugin data, workspaces and session logs.
@@ -39,9 +46,9 @@ Package name **`dsh-profile-config-sync`** (the npm package `dsh-config-sync` is
39
46
  |---|---|
40
47
  | npm | `npm i dsh-profile-config-sync` — **npm only has `0.4.1`**, without the 0.6.x safety fixes |
41
48
  | Plugin market | Search “Config Backup & Sync” in the client's plugin market (via the git commit registered in `market-index.json`) |
42
- | Offline tgz | `pnpm add ./dsh-profile-config-sync-0.6.40.tgz` |
49
+ | Offline tgz | `pnpm add ./dsh-profile-config-sync-0.6.41.tgz` |
43
50
 
44
- **Release status**: the latest release is [`v0.6.40`](https://github.com/huanyu-a/dsh-profile-config-sync/releases/tag/v0.6.40) (2026-11-26) and the repository is public; the npm package is awaiting publish approval.
51
+ **Release status**: the latest release is [`v0.6.41`](https://github.com/huanyu-a/dsh-profile-config-sync/releases/tag/v0.6.41) (2026-11-26); the repository is public and the npm package publishes alongside (`npm i dsh-profile-config-sync`).
45
52
 
46
53
  ## Known limits
47
54
 
package/README.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  > **dsh-profile-config-sync** —— DeepSeek Harness 客户端的**多端配置备份 / 同步 / 还原**插件。
4
4
 
5
+ [![npm](https://img.shields.io/npm/v/dsh-profile-config-sync?style=flat-square&logo=npm&logoColor=white&label=npm&color=cb3837)](https://www.npmjs.com/package/dsh-profile-config-sync)
6
+ [![release](https://img.shields.io/github/v/release/huanyu-a/dsh-profile-config-sync?style=flat-square&label=release&color=2f81f7)](https://github.com/huanyu-a/dsh-profile-config-sync/releases/latest)
7
+ [![license](https://img.shields.io/github/license/huanyu-a/dsh-profile-config-sync?style=flat-square&color=3fb950)](LICENSE)
8
+ [![platform](https://img.shields.io/badge/platform-Windows%20%7C%20macOS%20%7C%20Linux-8957e5?style=flat-square)](#同步内容勾选)
9
+ [![groups](https://img.shields.io/badge/%E5%90%8C%E6%AD%A5%E5%86%85%E5%AE%B9-12%20%E7%BB%84-1f6feb?style=flat-square)](#同步内容勾选)
10
+ [![tests](https://img.shields.io/badge/%E8%87%AA%E6%A3%80-64%20%E5%A5%97%20%C2%B7%201065%20%E6%9D%A1-3fb950?style=flat-square)](#自检)
11
+
5
12
  中文 | [English](README.en.md)
6
13
 
7
14
  DSH 的配置散在 `~/.dsh` 的十几处:profile、全局提示、Skills、Agent 预设、插件设置、插件数据、工作区、会话记录。
@@ -56,14 +63,14 @@ DSH 的配置散在 `~/.dsh` 的十几处:profile、全局提示、Skills、Ag
56
63
  |---|---|
57
64
  | npm | `npm i dsh-profile-config-sync`(**npm 上只到 `0.4.1`**,不含 0.6.x 的安全修复与多端能力) |
58
65
  | 插件市场 | 客户端「插件市场 → 发现」搜「配置备份与同步」(走 `market-index.json` 登记的 git 提交) |
59
- | 离线 tgz | `pnpm add ./dsh-profile-config-sync-0.6.40.tgz`(内网机器用这个) |
66
+ | 离线 tgz | `pnpm add ./dsh-profile-config-sync-0.6.41.tgz`(内网机器用这个) |
60
67
 
61
- **发布状态**:最新 Release 是 [`v0.6.40`](https://github.com/huanyu-a/dsh-profile-config-sync/releases/tag/v0.6.40)(2026-11-26),仓库已公开;npm 上的同名包仍在等发布审批。
68
+ **发布状态**:最新 Release 是 [`v0.6.41`](https://github.com/huanyu-a/dsh-profile-config-sync/releases/tag/v0.6.41)(2026-11-26),仓库已公开;npm 上的同名包同步发布(`npm i dsh-profile-config-sync`)。
62
69
 
63
70
  要正式发布时(需要有权限的账号,我不会擅自 push):
64
71
 
65
72
  ```bash
66
- gh release create v0.6.39 dsh-profile-config-sync-0.6.40.tgz \
73
+ gh release create v0.6.39 dsh-profile-config-sync-0.6.41.tgz \
67
74
  --repo huanyu-a/dsh-profile-config-sync --title v0.6.39 --notes-file <(sed -n '/0.6.39/p' README.md)
68
75
  # 发布后把 version.json 推到仓库根(面板的更新检查读它)
69
76
  ```
@@ -362,6 +369,7 @@ push 失败时会**按真实远端地址归因**:https 走 `ls-remote` 检查
362
369
 
363
370
  | 日期 | 版本 | 要点 |
364
371
  |---|---|---|
372
+ | 2026-11-26 | 0.6.41 | WebDAV 模式下面板不再显示「? @ ?」与「落后 ? · 领先 ?」:仓库目录只是普通文件夹(无 .git)时,两行改成「WebDAV 模式:这个目录不是 git 仓库,没有分支」/「WebDAV 模式不比提交前后」,未提交数量照常显示;元信息行的 `branch @ head` 尾巴只在真有分支时追加。顺带把市场索引图标从 1240×1696 整屏长图换成 180×180 图标、撤掉三张旧版截图、README 加六枚徽章。验收:63 套隔离夹具共 1043 条断言全绿(不含检查这份 README 的文档对账套件本身;另有 1 条权限断言在 Windows 上标 SKIP,不会假装通过) |
365
373
  | 2026-11-26 | 0.6.40 | 只修工具链,插件行为与 0.6.39 完全一致。① `tools/clientcheck.mjs` 里一条按实现细节写的断言(查 `missing ? null :`),0.6.36 合并「云端仓库」与「同步方式(WebDAV)」两张卡后代码形状变了、行为没变,断言失效让 CI 的 publish 门禁变红;现在盯实际那道门(`(!wdConfigured && !gitConfigured) ? null :` 取消按钮)并补一条 `forced ? null` 断言。② `selftest.mjs` 的留窗断言还钉着字面量 `Start-Sleep -Seconds 360`,而 0.6.37 起停留时长可配(`-HoldSeconds`,默认仍是 360),改成盯默认值与变量。③ `tools/fix-session-cwd.mjs` 镜像副本自 0.6.34 起与 `runtime/tools/` 漂移(9989B vs 10636B),已按正本覆盖,并把提示里不存在的 `sync-plugin-mirror.ps1` 改成真实做法。验收:63 套隔离夹具共 1043 条断言全绿(不含检查这份 README 的文档对账套件本身;另有 1 条权限断言在 Windows 上标 SKIP,不会假装通过) |
366
374
  | 2026-11-26 | 0.6.39 | 更名与文档:面板 / 侧栏 / 设置摘要行统一改成「**配置备份与同步**」(Config Backup & Sync),副标题改成「多端配置备份、同步与还原:本机 → 仓库 → 云端 → 另一台机器」,退出后同步窗口标题一起改名(`== DSH 配置同步 / x ==` 这类日志 banner 不动——面板靠它解析结果)。README 重排:定位段 + **主要功能** 10 条 + 四个关键词 + 目录锚点 + 发布状态压成一张表 + 新增**「来源与版权」**(上游 QcWyGm/dsh-config-sync-plugin,MIT,LICENSE 同步列出两行版权);**实测记录改版本倒叙**。**正文从 921 行压到 392 行**:历史细节 → `docs/HISTORY.md`,完整记录 → `docs/CHANGELOG.md`,字段/接口/进程细节 → `docs/REFERENCE.md`(三份随包发布);README 只留当前行为。验收:63 套隔离夹具共 1043 条断言全绿(不含检查这份 README 的文档对账套件本身;另有 1 条权限断言在 Windows 上标 SKIP,不会假装通过) |
367
375
  | 2026-11-26 | 0.6.38 | 安全必需项在 JS 侧补齐:`config-sync-extra.json` 的 exclude/skipDirs 是「整份替换」语义,本机存的是 50 条旧快照,0.6.12 加的 `browser-profiles` 拦不到待推送扫描 → 读时补 + 保存前补 + 面板明示 + PS↔JS 名单对拍 |
package/client.js CHANGED
@@ -1062,6 +1062,10 @@ window.__ModuleLoader__.load({
1062
1062
  */
1063
1063
  function RepoCard(props) {
1064
1064
  const repo = (props.data && props.data.repo) || {}
1065
+ // WebDAV 模式下仓库目录只是普通文件夹(没有 .git),分支/HEAD 与提交前后比较都不存在;
1066
+ // 以前这里一律回落到 '?',面板上就显示成「? @ ?」「落后 ? · 领先 ?」,看着像坏了
1067
+ const wdOn = Boolean(props.data && props.data.webdav && props.data.webdav.active)
1068
+ const hasGitRef = Boolean(repo.branch || repo.head)
1065
1069
  // 空目录不算「没配好」:它是新机器还没拉取的状态,不该把人按在编辑态
1066
1070
  const missing = Boolean(props.data) && !repo.exists && !repo.empty
1067
1071
  const [editing, setEditing] = react.useState(false)
@@ -1128,16 +1132,27 @@ window.__ModuleLoader__.load({
1128
1132
  }),
1129
1133
  h(Kv, {
1130
1134
  k: M('分支 / HEAD', 'Branch / HEAD'),
1131
- v: repo.exists ? `${repo.branch || '?'} @ ${repo.head || '?'}` : (repo.empty ? M('(待首次拉取)', '(after the first pull)') : M('(不可用)', '(unavailable)')),
1135
+ v: !repo.exists
1136
+ ? (repo.empty ? M('(待首次拉取)', '(after the first pull)') : M('(不可用)', '(unavailable)'))
1137
+ : (hasGitRef
1138
+ ? `${repo.branch || '?'} @ ${repo.head || '?'}`
1139
+ : (wdOn
1140
+ ? M('(WebDAV 模式:这个目录不是 git 仓库,没有分支)', '(WebDAV mode: this folder is not a git repository, so there is no branch)')
1141
+ : M('(这个目录还没有 git 提交)', '(this folder has no git commits yet)'))),
1132
1142
  }),
1133
1143
  h(Kv, {
1134
1144
  k: M('远端', 'Remote'),
1135
- v: repo.exists
1136
- ? M(
1137
- `落后 ${repo.behind ?? '?'} · 领先 ${repo.ahead ?? '?'} · 未提交 ${repo.uncommitted ?? repo.dirty ?? '?'}` + (repo.pending ? `(本机待同步 ${repo.pending})` : ''),
1138
- `behind ${repo.behind ?? '?'} · ahead ${repo.ahead ?? '?'} · uncommitted ${repo.uncommitted ?? repo.dirty ?? '?'}` + (repo.pending ? ` (${repo.pending} pending on this machine)` : ''),
1139
- )
1140
- : (repo.empty ? M('(拉取之后才有得比)', '(available after the first pull)') : M('(不可用)', '(unavailable)')),
1145
+ v: !repo.exists
1146
+ ? (repo.empty ? M('(拉取之后才有得比)', '(available after the first pull)') : M('(不可用)', '(unavailable)'))
1147
+ : (repo.behind === null || repo.ahead === null
1148
+ ? (wdOn
1149
+ ? M('(WebDAV 模式不比提交前后)', '(WebDAV mode: no commit comparison)')
1150
+ : M('(还没有上游分支,无法比较前后)', '(no upstream branch to compare)'))
1151
+ + ` · ${M('未提交', 'uncommitted')} ${repo.uncommitted ?? repo.dirty ?? '?'}` + (repo.pending ? `(${M('本机待同步', 'pending on this machine')} ${repo.pending})` : '')
1152
+ : M(
1153
+ `落后 ${repo.behind} · 领先 ${repo.ahead} · 未提交 ${repo.uncommitted ?? repo.dirty ?? '?'}` + (repo.pending ? `(本机待同步 ${repo.pending})` : ''),
1154
+ `behind ${repo.behind} · ahead ${repo.ahead} · uncommitted ${repo.uncommitted ?? repo.dirty ?? '?'}` + (repo.pending ? ` (${repo.pending} pending on this machine)` : ''),
1155
+ )),
1141
1156
  }),
1142
1157
  (repo.empty || repo.phase === 'missing')
1143
1158
  ? h('div', { style: { ...S.hint, color: 'var(--dsw-alias-state-warn-primary)' } },
@@ -3444,15 +3459,24 @@ window.__ModuleLoader__.load({
3444
3459
  ),
3445
3460
  ),
3446
3461
  // 一行元信息:版本与仓库位置。状态说明交给上面的徽标和下面的指标条,这里不再重复。
3462
+ // 仓库位置只在真有 git 分支时才写 branch @ head;WebDAV 模式退化成写传输方式,
3463
+ // 免得出现「app x / Electron y · ? @ ?」这种看着像坏掉的尾巴。
3447
3464
  h('div', { style: S.meta },
3448
3465
  data ? [
3449
3466
  h('span', { key: 'app' }, `app ${data.version.local || '?'} / Electron ${data.version.electron || '?'}`),
3450
- data.repo && data.repo.exists
3451
- ? [
3452
- h('span', { key: 's2', style: S.metaSep }, '·'),
3453
- h('span', { key: 'repo' }, `${data.repo.branch || '?'} @ ${(data.repo.head || '').split(' ')[0] || '?'}`),
3454
- ]
3455
- : null,
3467
+ (() => {
3468
+ const label = data.repo && data.repo.exists
3469
+ ? (data.repo.branch || data.repo.head
3470
+ ? `${data.repo.branch || '?'} @ ${(data.repo.head || '').split(' ')[0] || '?'}`
3471
+ : (data.webdav && data.webdav.active ? 'WebDAV' : ''))
3472
+ : ''
3473
+ return label
3474
+ ? [
3475
+ h('span', { key: 's2', style: S.metaSep }, '·'),
3476
+ h('span', { key: 'repo' }, label),
3477
+ ]
3478
+ : null
3479
+ })(),
3456
3480
  ] : h('span', null, summary.text),
3457
3481
  ),
3458
3482
  h('div', { style: S.pageLead },
@@ -4228,7 +4252,9 @@ window.__ModuleLoader__.load({
4228
4252
  data ? h(Kv, {
4229
4253
  k: M('仓库', 'Repo'),
4230
4254
  v: data.repo.exists
4231
- ? `${data.repo.path} (${data.repo.branch || '?'} @ ${data.repo.head || '?'})`
4255
+ ? (data.repo.branch || data.repo.head
4256
+ ? `${data.repo.path} (${data.repo.branch || '?'} @ ${data.repo.head || '?'})`
4257
+ : `${data.repo.path}${data.webdav && data.webdav.active ? M('(WebDAV 模式,无 git 分支)', ' (WebDAV mode, no git branch)') : ''}`)
4232
4258
  : M('还没配置(请到面板里设置)', 'Not configured (set it in the panel)'),
4233
4259
  }) : null,
4234
4260
  data ? h(Kv, {
package/docs/CHANGELOG.md CHANGED
@@ -1,9 +1,10 @@
1
- # 实测记录(按版本倒叙,共 74 条)
1
+ # 实测记录(按版本倒叙,共 75 条)
2
2
 
3
3
  > README 只留最新 8 条;这里是完整记录。每条都是真跑出来的数字,不是估算;标 `—` 的是早期还没有版本号时的验证。
4
4
 
5
5
  | 日期 | 版本 | 要点 |
6
6
  |---|---|---|
7
+ | 2026-11-26 | 0.6.41 | WebDAV 模式下不再渲染 `? @ ?`:无 .git 的仓库目录改为「WebDAV 模式:这个目录不是 git 仓库,没有分支」/「不比提交前后」,未提交数照常;元信息尾巴只在有分支时追加。市场图标换 180×180、撤 3 张旧截图、README 加 6 枚徽章。 |
7
8
  | 2026-11-26 | 0.6.40 | 只修工具链:clientcheck 里一条按实现细节写的断言(`missing ? null :`)在 0.6.36 合并云端卡后失效,使 CI publish 门禁变红;改为盯实际那道门。插件行为与 0.6.39 一致。 |
8
9
  | 2026-11-26 | 0.6.39 | 更名与文档:面板 / 侧栏 / 设置摘要行统一改成「**配置备份与同步**」(Config Backup & Sync),副标题改成「多端配置备份、同步与还原:本机 → 仓库 → 云端 → 另一台机器」,包描述改成多端备份/同步/还原口径并补 `backup` / `restore` / `webdav` / `multi-device` 关键词,退出后同步窗口标题一起改名(`== DSH 配置同步 / x ==` 这类日志 banner 不动——面板靠它解析结果;历史小标题保留当时的叫法)。README 重写头部:定位段、四件事表(配置 / 备份 / 同步 / 还原)、一张流程线、目录锚点、发布状态压成一张表、「已知限制」单独列;新增「来源与版权」(上游 QcWyGm/dsh-config-sync-plugin,MIT,LICENSE 同步列出两行版权);**实测记录改成版本倒叙**(同日期按版本号数值倒序);并修掉头部停在 0.6.14 的陈旧数字。验收:63 套隔离夹具共 1043 条断言全绿(不含检查这份 README 的文档对账套件本身;另有 1 条权限断言在 Windows 上标 SKIP,不会假装通过) |
9
10
  | 2026-11-26 | 0.6.38 | 安全必需项在 JS 侧补齐:`config-sync-extra.json` 的 exclude/skipDirs 是「整份替换」语义,本机存的是 50 条旧快照,0.6.12 新增的 browser-profiles 规则因此在面板与待推送里整条失效——capture 有 `Test-BlockedProfilePath` 硬拦(3,696 个文件 / 268MB 含密码库照样不进仓库),但待推送会把浏览器剖面里几千次 mtime 变动数成「待推送」,面板永远消不掉、退出自动推送每次白跑。现在 JS 也补同一份必需项(读时补、保存前再补一次,否则用户点一次保存又删掉),补齐会在插件数据卡片里明说,并加 PS↔JS 名单对拍。另外「会话记录」组在 capture 里是四块(sessions / attachments / projcache / policies),待推送以前只数 sessions:往附件里丢张图、某个会话的 projcache 更新,面板照样说「仓库与本机一致」,现已补齐(跳过名单里那条 `attachments` 一并去掉)。非 Windows 的待推送口径也改了:macOS/Linux 走 `runtime\sync-engine.mjs`,它只抓 profile / 提示 / Skills / 预设,面板以前却把会话记录、插件数据、额外路径也算成「待推送」(永远不会被推送的东西)。现在按执行体实际能力统计,并在状态里带上 `engineGroups` 让面板写明「这台机器只同步这四组」。剔除被拦的剖面与被排除文件后,本机 `status` 从 470ms 降到 220ms。验收:63 套隔离夹具共 1043 条断言全绿(不含检查这份 README 的文档对账套件本身;另有 1 条权限断言在 Windows 上标 SKIP,不会假装通过) |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-profile-config-sync",
3
- "version": "0.6.40",
3
+ "version": "0.6.41",
4
4
  "type": "module",
5
5
  "description": "DeepSeek Harness 客户端的多端配置备份、同步与还原插件:把本机配置按 12 组内容抓取成 Git 仓库快照(profile、全局提示、Skills、Agent 预设、插件设置与工作流、插件数据、工作区、会话记录等),可推送到 GitHub / Gitee / GitLab 或上传 WebDAV;换机重装后一条命令拉回并铺开,误改可选档回滚。同步动作在客户端退出后执行(PowerShell on Windows,Node 引擎 on macOS / Linux),面板与文案跟随客户端语言。",
6
6
  "main": "./index.js",