dsh-syn-config 0.8.1 → 0.8.2

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 CHANGED
@@ -18,6 +18,8 @@
18
18
  > 点它打开面板:顶部是体检结论(阻塞/警告数),下面四个动作——**体检 / 拉取计划 / 推送计划 / 密钥扫描**——都是对只读路由的 `GET`,面板只能看、不能写;每个结果旁边有「复制命令」,真正的写操作仍要 `/syn-dsh … now`。
19
19
  > `syn-dsh` 技能由插件自带(`assets/syn-dsh.md`,rank 600),不再放在配置仓库里。
20
20
  >
21
+ > **升级插件后要 push 清单。** 配置仓库 `profiles/<profile>/package.json` 是 `apply.sh` 的来源;只改本机不改仓库,下次 `apply.sh --yes` 会把本机清单覆盖回仓库版本(曾因此把 `dsh-syn-config` 回滚成旧的 `dsh-config-sync`,状态灯随之变红)。`verify.mjs` 现在会比对这两份清单,不一致直接失败并给出修复路径。想彻底不漂移:`/syn-dsh push now`(或 `apply.sh` 之后手工提交该文件)。
22
+ >
21
23
  > **密钥只由人注入。** 工具与斜杠命令都拒绝写 `inject`/`refresh`:`/syn-dsh secrets` 只放 `scan`/`fingerprint`,`dsh_sync_secrets` 在 `dry_run:false` 时直接拒绝,并提示自己执行 `bash ~/dsh-config/scripts/apply.sh --yes`。确需让工具代写,本机在插件行加 `allowSecretInject: true`(默认关闭)。
22
24
  >
23
25
  > 设计理由与后续阶段见主仓库的调研文档:`../research/syn-dsh-plugin/PLAN.md`。
package/assets/syn-dsh.md CHANGED
@@ -231,3 +231,10 @@ bash ~/dsh-config/scripts/apply.sh --yes # 从 ~/.dsh/secrets.env 注入
231
231
  ```
232
232
 
233
233
  要让模型工具代写,需在本机插件行显式加 `allowSecretInject: true`(默认关闭)。
234
+
235
+ ## 升级插件后必须同步清单
236
+
237
+ 配置仓库里的 `profiles/<profile>/package.json` 与 `cordis.patch.yml` 是 `apply.sh` 的**来源**。只在本机改插件、不推仓库,下一次 `apply.sh --yes` 会把本机清单覆盖回仓库版本(真发生过:`dsh-syn-config` 被回滚成旧的 `dsh-config-sync`,状态灯变红)。
238
+
239
+ - 升级后:`/syn-dsh push now`(或手动提交该文件)
240
+ - 自检:`node scripts/verify.mjs` 会比对「本机清单」与「仓库清单」,不一致直接失败
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-syn-config",
3
- "version": "0.8.1",
3
+ "version": "0.8.2",
4
4
  "private": false,
5
5
  "description": "Cross-platform (macOS + Windows) DeepSeek Harness plugin that syncs DSH config — skills, profile settings, AGENTS.md — with a private dsh-config repository.",
6
6
  "type": "module",
@@ -136,6 +136,22 @@ async function main() {
136
136
  for (const note of status.notes) console.log(` note: ${note}`)
137
137
  }
138
138
 
139
+ // The repo copy of the profile manifest is what `apply.sh` restores from.
140
+ // If it still names another package, the next apply rolls this machine back
141
+ // to it — which is exactly how a working install "became unavailable" once.
142
+ const repoManifestPath = join(repoPath, 'profiles', profileName, 'package.json')
143
+ if (existsSync(repoManifestPath)) {
144
+ const repoManifest = JSON.parse(readFileSync(repoManifestPath, 'utf8'))
145
+ const liveSync = Object.keys(manifest.dependencies ?? {}).filter((dep) => dep.includes('syn-config') || dep.includes('config-sync'))
146
+ const repoSync = Object.keys(repoManifest.dependencies ?? {}).filter((dep) => dep.includes('syn-config') || dep.includes('config-sync'))
147
+ const agree = liveSync.length === 1 && repoSync.length === 1 && liveSync[0] === repoSync[0]
148
+ record(step(agree, 'repo copy agrees with this install', agree ? liveSync[0] : `live=${liveSync.join(',') || 'none'} repo=${repoSync.join(',') || 'none'}`))
149
+ if (!agree) {
150
+ console.log(' the next `apply.sh --yes` would overwrite this profile from the repo:')
151
+ console.log(` fix: update ${repoManifestPath} (dependencies + dsh.profile.bundles), then push`)
152
+ }
153
+ }
154
+
139
155
  console.log('')
140
156
  if (failures.length > 0) {
141
157
  console.error(`[verify] FAILED — ${failures.length} check(s) did not pass.`)