Repository navigation
fix(workbench): report the package version and ship workbench.json - #4
Merged
yaojin3616 merged 1 commit intoSep 22, 2026
Conversation
The Desktop registration hardcoded version 1.2.0 (the adapter's internal milestone), so the market showed v1.2.0 for the v0.1.1 package. Register the package version instead, and ship a workbench.json so Desktop learns the runtime ID `ming-life` at install time rather than guessing. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Merged
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.
问题
在 DSH Desktop 工作台市场里,玄学人生登记的是 v0.1.1,但安装后卡片显示 v1.2.0。原因是
lib/client.js注册工作台时写死了version: '1.2.0',这个值是适配器的内部里程碑号,不是包版本。另外,包里没有
workbench.json,Desktop 安装时拿不到工作台 ID(安装记录里是workbenchId: null),只能等重启后再靠标题去猜对应关系。修改
lib/client.js:注册时改用WORKBENCH_VERSION(0.1.1),和package.json保持一致。workbench.json,写明id: ming-life、标题、描述、版本、icon: ☯、入口,并加进package.json的files。tests/test-original-adapter.mjs新增断言:注册描述、package.json、workbench.json三处的 ID、版本、图标一致。scripts/check-distribution.mjs会检查打出的包里有workbench.json,且版本对得上。以后发新版本,需要同时改
package.json、workbench.json和WORKBENCH_VERSION。三处对不上时,测试会失败提醒。验证
npm run check:全部通过。npm run check:distribution:打包加 pnpm 安装的检查通过。要让市场上的版本也生效,合并后需要重新发一次 Release。
🤖 Generated with Claude Code