fix: mark frontend UI peer dependencies as optional for DSH Desktop - #52
Merged
Mars-Sea merged 1 commit intoSep 18, 2026
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
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.