Skip to content

chore: upgrade Harness to 0.2.0-rc.2 - #627

Merged
yaojin3616 merged 10 commits into
mainfrom
claude/dsh-upgrade-2-0rc2-10422e
Sep 30, 2026
Merged

yaojin3616 merged 10 commits into
mainfrom
claude/dsh-upgrade-2-0rc2-10422e

Conversation

@yaojin3616

@yaojin3616 yaojin3616 commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

改动

  • 所有 @deepseek-ai/dsh-* 依赖从 0.1.7-rc.2 固定到 0.2.0-rc.2,锁文件已重新生成。上游依赖集只新增了 dsh-experimental-schedule-bundle,Cordis 版本不变。
  • 仓库内插件和 PPT 运行时的 dsh peer 区间追加 ^0.2.0-rc.1。
  • 补丁:
    • 13 个 dsh 补丁可直接套用,只改文件名(cordis-plugin-loader、undici 两个补丁不变)。
    • 11 个失效补丁以旧版原始包为基准做三方合并,再用 patch-package 重新生成。人工处理的冲突:预设设置页(上游移除了 useDeveloperTools)、聊天附件打开、模型设置提交时的 onSubmitCredential、workspace forkSession 新签名、dsh 依赖注入清单。
    • 删除 dsh-client-ui-model-selection 补丁及其测试,因为上游已原生提供模型搜索。行为变化:搜索不再匹配服务商名称;模型不超过 4 个时不显示搜索框。
  • 细节见 docs/harness-0.2.0-rc.2-upgrade.md。
  • 修复拖入文件夹时提示“只有桌面端支持”:preload 按上游官方桌面端的做法提供 __DSH_HOST_PATHS__.pathFor(基于 webUtils.getPathForFile)。拖入的有真实路径的文件和文件夹现在会插入 @路径 引用,粘贴的图片等内容照常上传。这个问题 0.1.7 就存在,不是升级引入的。
  • 合入 统一插件启停状态:以包级开关为唯一权威 #626(统一插件启停状态):它的 app-boot 补丁改动已重做到 0.2.0,导出 readDisabledProfileBundles;同时补回升级时丢失的 reportPluginCompatibility 类型声明(上游 .d.ts 末尾没有换行,重新生成补丁时被丢掉)。plugin-manager 补丁直接合并。
  • PPT 编译缓存:ppt:build 对所有输入算指纹,输入没变就跳过;只重装了 node_modules 时,把已构建的包放回去。dev/build/test 前这一步从约 7 秒降到 0.2 秒;DSH_PPT_FORCE_BUILD=1 强制重建。
  • 「启用工作台功能」改为默认关闭:只有用户在常规设置里打开过(dsh-workbench-enabled=true)才启用。行为变化:从没动过开关的老用户升级后工作台会关闭,侧栏的「工作台」入口会消失。

已验证

  • 全新 npm ci,26 个补丁全部套用成功
  • npm run typecheck、npm run build、git diff --check
  • npm run ppt:build 后完整 vitest:170 个文件、1539 个用例全部通过
  • node scripts/verify-harness-auth.mjs:真实启动 Harness,鉴权链路正常
  • 拖入修复:用临时 Profile 真机启动,通过 CDP 拖入文件夹和文件,都生成了引用,没有再出现提示;完整 vitest 171 个文件、1543 个用例通过
  • 合入 统一插件启停状态:以包级开关为唯一权威 #626 后:全新 npm ci 下 26 个补丁全部成功,typecheck 通过,vitest 172 个文件、1548 个用例全部通过
  • PPT 缓存:用真实构建验证了首次构建、跳过、只放回包、输入变化后重建、强制重建;模拟 npm ci 装成符号链接的情况,源码目录不会被写入
  • 工作台默认关闭:新增默认值测试(改回旧默认值时会失败);合并 main 后 vitest 174 个文件、1560 个用例全部通过;临时 Profile 真机确认侧栏没有工作台入口、开关为关闭
  • macOS 开发构建用临时 userData 启动:Harness 就绪,客户端挂载完成;Agent 预设页的导入、Awesome preset、搜索可用;模型选择器能打开

未验证

🤖 Generated with Claude Code

yaojin3616 and others added 10 commits September 29, 2026 09:00
Every surface now records enable/disable in .dsh-market/state.json, the
switch Harness boot, Safe Mode and dsh-market already honour, while
dsh.profile.bundles stays derived and may be re-listed by launch
reconciliation without re-enabling anything.

- Add dsh-desktop-market-installer/plugin-state as the single reader and
  writer of the switch; plugin-disable.ts uses it.
- Plugin Manager: listBundles reports switched-off bundles as disabled;
  setBundleEnabled and install-enable record the switch through the
  backend; removal forgets it; the backend may decline install/remove so
  pnpm handles the shared-tree market and Profile-owned packages.
- Generation backend: removing a non-generation plugin no longer fails,
  dshmarket is declined before staging, and replacing a Profile-owned
  directory defers the link switch to launch projection.
- Pending removals stay switched off and bundle healing no longer
  re-composes them; the switch is forgotten when removal commits.
- Drop the unused harness:reset-plugins IPC and resetPluginProfile.
- Restore the reportPluginCompatibility declaration the app-boot patch
  dropped on replay.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Workbench and dsh-market removals that bypass Plugin Manager now clear
the package switch too, so a reinstall starts enabled. The runPlugin
test uses an isolated home instead of the real ~/.dsh. Document the
single enable authority in the architecture notes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pin every @deepseek-ai/dsh-* dependency to 0.2.0-rc.2 and widen the
in-repo plugin and PPT runtime peer ranges with ^0.2.0-rc.1.

Rename the 13 patches that still apply verbatim. Migrate the 11 stale
patches with a three-way merge against the pristine 0.1.7-rc.2 and
0.2.0-rc.2 packages and regenerate them with patch-package; the dsh
patch keeps its package.json dependency injection.

Drop the model-selection search patch and its test: 0.2.0 ships a
native model search.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The stock composer reads globalThis.__DSH_HOST_PATHS__ to tell the
Desktop shell from a browser. Without it, dropping a folder was refused
as "desktop app only". Expose the same single pathFor method as upstream
Desktop (apps/desktop/src/preload-app.ts), backed by
webUtils.getPathForFile. Dropped files and folders with a host path now
become @path references; pasted bytes still upload.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Port the two Harness patch changes from 0.1.7-rc.2 onto the 0.2.0-rc.2
packages: plugin-manager merged as-is; app-boot now exports
readDisabledProfileBundles and keeps the reportPluginCompatibility
declaration, which the 0.2.0 regeneration had dropped because the
upstream .d.ts ends without a newline.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dev, build and test all run ppt:build first, which regenerated the
templates and previews every time (~6-7 s) although PPT sources rarely
change. Fingerprint every file the pipeline reads and skip it when the
recorded build matches. When only node_modules was reinstalled, project
the staged packages again instead of regenerating them.
DSH_PPT_FORCE_BUILD=1 forces a full rebuild.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Treat the feature as enabled only when the user stored
dsh-workbench-enabled=true from General settings; an unset or unreadable
preference now means off. Users who never touched the switch will find
it off after updating.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Carry #630 (keep the composer draft 12px from the card edge) onto the
0.2.0-rc.2 conversation patch; the InputBar CSS module hashes are
unchanged in 0.2.0, so its selectors apply as written.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@yaojin3616
yaojin3616 merged commit 4d10772 into main Sep 30, 2026
4 checks passed
@yaojin3616
yaojin3616 deleted the claude/dsh-upgrade-2-0rc2-10422e branch September 30, 2026 08:13
scpli pushed a commit to scpli/dsh-desktop that referenced this pull request Oct 2, 2026
…-ui-chat 0.2.0-rc.2

dataelement#640 edited the 0.1.7-rc.2 patch, which dataelement#627 replaced with 0.2.0-rc.2.
Its source delta (userMessageFooter slot, footer props through the user
bubble and ChatNodeSeat) was extracted by applying the old and new 0.1.7
patches to the pristine package, applied cleanly to the patched 0.2.0
package, and the patch regenerated with patch-package.

test/ppt-unbound-mode: anchor the catalog-effect comparison at
OfficePptChooser (the new opening-template card has its own effect earlier
in the file) and inject OfficePptOpeningTemplateCard into applyStandard,
asserting the new userMessageFooter registration.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant