Skip to content

fix: mark frontend UI peer dependencies as optional for DSH Desktop - #52

Merged
Mars-Sea merged 1 commit into
Mars-Sea:mainfrom
zhangxaochen:fix/desktop-optional-ui-peers
Sep 18, 2026
Merged

Mars-Sea merged 1 commit into
Mars-Sea:mainfrom
zhangxaochen:fix/desktop-optional-ui-peers

Conversation

@zhangxaochen

Copy link
Copy Markdown
Contributor

Summary

When running inside DeepSeek Harness Desktop (the Electron app), the Desktop runtime strictly validates plugin peer dependencies at the Node host layer (\�pps/desktop/src/profile-packages.ts).

Since @deepseek-ai/dsh-client-ui-primitives, @deepseek-ai/dsh-client-ui-slots, and
eact\ are client-only modules bundled directly into DSH's frontend webview bundle, they are not provided as standalone Node modules by the Desktop host. Without \peerDependenciesMeta: { optional: true }, Desktop startup fails with:

\`ndesktop profile: @mars-sea/dsh-commandcode-provider requires missing @deepseek-ai/dsh-client-ui-primitives@...
\`n

Changes

Added \peerDependenciesMeta\ in \package.json\ declaring:

  • @deepseek-ai/dsh-client-ui-primitives\ as optional
  • @deepseek-ai/dsh-client-ui-slots\ as optional

  • eact\ as optional

This follows DSH's peer dependency verification contract and allows the plugin to boot smoothly in Desktop without affecting Web or TUI profiles.

@Mars-Sea
Mars-Sea merged commit e2e8bb0 into Mars-Sea:main Sep 18, 2026
5 checks passed
Mars-Sea added a commit that referenced this pull request Sep 19, 2026
… peers are optional (#52)

#52 marked the three peers whose modules the Web frontend already hands to every
client bundle — react, @deepseek-ai/dsh-client-ui-primitives and
@deepseek-ai/dsh-client-ui-slots — as optional, so an older DSH Desktop release
stops rejecting the plugin's peer closure. npm and pnpm auto-install only
NON-optional peers, so an optional peer has to be a devDependency as well or the
authortime tree loses it: `tests/client-boot.test.ts` imports the React
component tree at runtime, and the committed lock still carries react only
because @deepseek-ai/dsh-client-ui-primitives@0.1.2-rc.1 depends on it — the
0.1.6-alpha.2 line declares no dependencies, so the next `npm install` (which is
also what a peer-range update does) would have dropped it and turned `npm test`
red for a reason that looks unrelated to this plugin.

`tests/package.test.ts` now pins the exact optional set, that every optional
name is a declared peer (an entry for anything else is inert) and that each one
stays a development package.

Verified on this content: npm test (591/591, five of them new), npm run
typecheck, npm run test:install with pnpm 10.34.5 (the invariants peer still
resolves), and a pnpm 10.34.5 / npm control run proving both package managers
install only the non-optional peer.
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.

2 participants