dsh-config-sync-plugin 0.4.8 → 0.4.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-config-sync-plugin",
3
- "version": "0.4.08",
3
+ "version": "0.4.10",
4
4
  "type": "module",
5
5
  "description": "在 DSH 设置里查看 dsh-config 仓库与本机的同步状态,并生成退出后执行的 push/pull 脚本。同步动作本身不在应用内执行。面板与文案跟随客户端语言(中文/English)。",
6
6
  "main": "./index.js",
package/runtime/apply.ps1 CHANGED
@@ -808,14 +808,12 @@ $settingsMap = @(
808
808
  @{ Repo = 'settings\workspace-archives.json'; Src = (Join-Path $DshHome 'dsh-session-manager\workspace-archives.v1.json'); Label = 'DSH 工作区隐藏状态' }
809
809
  )
810
810
 
811
- # ---------- 0.5 宿主版本契约(一切动作之前先校验) ----------
812
- # 为什么要在最前面校验:
813
- # 仓库的 bundle 清单里有 @deepseek-ai/dsh-experimental-* 这类「宿主自带、按版本强绑定」的项
814
- # (例如 cot-translation 需要主进程同版本的 typert 服务)。它们不经过 pnpm、不在 dependencies 里,
815
- # 目标机的客户端构建只要不同,启动期就会在 entry loading 阶段抛错,整个应用起不来。
816
- # 旧脚本对此毫无校验:清单整表覆盖、自检只数数量,故障要等双击图标才暴露。
817
- # 现在的规则:版本对不上 → 直接拒绝(可显式 -AllowVersionDrift 放行,但实验性 bundle 一律剔除),
818
- # 拒绝发生在备份、还原、写文件之前。
811
+ # ---------- 0.5 宿主版本契约(只提示、不阻断拉取;0.4.10 起) ----------
812
+ # 0.4.09 及以前:版本对不上直接 Die,pull 必须加 -AllowVersionDrift 才能继续。
813
+ # 0.4.10 起:配置同步拉取不再校验「本机 app / 仓库契约」是否一致——版本不一致只写一条提示,
814
+ # 拉取照常进行(等价于自动带上 -AllowVersionDrift)。版本差异本身不该阻断配置/技能/资料同步。
815
+ # 实验性 bundle(@deepseek-ai/dsh-experimental-*,宿主自带、按版本强绑定)仍按下面的门控剔除,
816
+ # 避免把为别的客户端构建准备的 bundle 铺到本机、启动期 entry loading 崩溃。
819
817
  $contractPath = Join-Path $RepoRoot 'profile\host-contract.json'
820
818
  $hostAppVersion = Get-HostAppVersion $AppRoot
821
819
  $contractVersion = $null
@@ -824,17 +822,12 @@ if (Test-Path -LiteralPath $contractPath) {
824
822
  }
825
823
  $versionDrift = $false
826
824
  if (-not $hostAppVersion) {
827
- Warn "读不到客户端 app 版本($AppRoot\resources\app\package.json 与 resources\app.asar 都没读到)——无法做版本校验"
825
+ Warn "读不到客户端 app 版本($AppRoot\resources\app\package.json 与 resources\app.asar 都没读到)——跳过版本提示,拉取照常进行"
828
826
  } elseif (-not $contractVersion) {
829
- Warn "仓库缺少 profile\host-contract.json(或里面没有 appVersion)——跳过版本校验"
827
+ Warn "仓库缺少 profile\host-contract.json(或里面没有 appVersion)——跳过版本提示,拉取照常进行"
830
828
  } elseif ($hostAppVersion -ne $contractVersion) {
831
829
  $versionDrift = $true
832
- Warn "宿主版本不一致:本机 app = $hostAppVersion,仓库契约 = $contractVersion"
833
- if (-not $AllowVersionDrift) {
834
- Die ("两端客户端不是同一版,未改动任何文件。请先把两台升到同一版;" +
835
- "或加 -AllowVersionDrift 只同步配置/技能/资料(会剔除全部实验性 bundle,避免启动期崩溃)。")
836
- }
837
- Warn "已加 -AllowVersionDrift:继续同步,但剔除实验性 bundle"
830
+ Warn "宿主版本不一致:本机 app = $hostAppVersion,仓库契约 = $contractVersion —— 0.4.10 起不再阻断拉取,继续同步(实验性 bundle 会剔除)"
838
831
  } else {
839
832
  Ok "宿主版本一致(app = $hostAppVersion)"
840
833
  }