Fix/dsh plugin id and edge store - #112
Merged
Merged
Conversation
The extension is now published to Edge Add-ons, but every install path still pointed Edge users at the Chrome Web Store. Both READMEs and AGENT_INSTALL.md now name a store per browser, and `bsk doctor` offers both listings when no browser is connected. Two Edge-specific gaps went with it: Edge blocks content-script injection on its own storefront the same way Chrome does, so the borrow-confirmation overlay must treat microsoftedge.microsoft.com/addons as non-injectable; and the Chinese README still described the pre-install.ps1 manual Windows setup. Also give the DeepSeek Harness section its npm package link and the profile-start step, so plugin users have a complete path. Co-authored-by: Cursor <cursoragent@cursor.com>
Renaming the package to @wxg-prc-cpg/browser-skill-dsh-plugin left two identifiers behind on the old directory name, and both are resolved by name rather than by path. cordis.patch.yml is the specifier the loader imports, so dsh failed with ERR_MODULE_NOT_FOUND on startup and took the whole plugin tree down with it — installing the published package made dsh unusable. The client bundle registers itself under the same kind of key, which the web shell looks up by package name, so the screenshot toolview and the observation overlay were unreachable too. The bundle id now reads package.json instead of repeating the name, so it cannot drift again. Quoting is required in the YAML because a leading '@' is reserved in plain scalars. Co-authored-by: Cursor <cursoragent@cursor.com>
The publish job named its GitHub Environment NPM_TOKEN, which is the secret name rather than a deployment target, so the repository's Deployments list showed a bogus NPM_TOKEN entry next to chrome-web-store. The environment is now npm-publish; the secret it holds keeps its name. Co-authored-by: Cursor <cursoragent@cursor.com>
Collaborator
Author
|
本来应该拆成3 个pr,但是互相有一点依赖,bug觉得比较严重,就合并成一个pr来提了。 |
kaixinguo360
pushed a commit
to kaixinguo360/BrowserSkill-DSH-Remote
that referenced
this pull request
Aug 26, 2026
…e-store Fix/dsh plugin id and edge store
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.
本 PR 包含三块相互独立的改动,对应三个 commit。
现有问题
1. 已发布的 dsh 插件使用问题。 包名从
dsh-plugin-browserskill改成@wxg-prc-cpg/browser-skill-dsh-plugin时,有两个"按名字解析"的标识符没跟着改:cordis.patch.yml里的name是 loader 直接 import 的 specifier,所以 dsh 启动时报ERR_MODULE_NOT_FOUND,并且连带整个插件树加载失败、进程退出。也就是说 npm 上的 0.1.0 装了之后 dsh 直接起不来。window.__ModuleLoader__.load({ id })注册,而 Web shell 是按包名去 module table 取的(dsh 自己的 bundle 也是这么注册的,可对照@deepseek-ai/dsh-client-runtime的产物)。所以即使主体能加载,browser_screenshot的 toolview 和观察浮层也取不到。关联issue:#111
2. 扩展已上架 Edge 加载项商店,目前安装路径只指向 Chrome Web Store。 除文档外还有两处代码只认 Chrome:
bsk doctor在"0 browsers connected"时只给 Chrome 链接;借用标签页的确认浮层只把 Chrome Web Store 域名视为不可注入,而 Edge 同样禁止在自家商店页面注入 content script,导致 Edge 用户正停在商店页时确认浮层会静默失败。3. 之前发布用的 GitHub Environment 名字是 secret 名。 publish job 的
environment写成了NPM_TOKEN,,仓库的 Deployments 列表里因此多出一个名为NPM_TOKEN,这个不合理。解决方案
插件标识(
fix(dsh-plugin-browserskill)):cordis.patch.yml的name改为已发布包名;client bundle id 改为直接读package.json,不再重复书写包名,避免再次漂移;版本 bump 到0.1.1。YAML 里必须加引号,因为@是 plain scalar 的保留起始字符,不加引号会直接解析失败。Edge 上架配套(
docs):两个 README 和AGENT_INSTALL.md改为按浏览器列出商店;bsk doctor的修复提示同时给出两个商店链接(style_hint相应改为遍历链接列表,两个都会高亮);microsoftedge.microsoft.com/addons加入不可注入域名,并补了单测覆盖"商店页不可注入、同域非商店路径仍可注入"。顺带同步了中文 README 里仍在描述install.ps1之前的 Windows 手动安装步骤,并给 DeepSeek Harness 章节补上 npm 包链接和启动 profile 的步骤。发布流程(
ci(dsh-plugin)):environment 改为npm-publish,其中的 secret 仍叫NPM_TOKEN。验证
cargo fmt --check、cargo clippy --workspace --all-targets -- -D warnings、cargo test --workspace通过,其中 doctor 单测 9 个(含新增的 hint 保真测试)。vitest:57 个文件 / 681 个测试通过;tsc --noEmit干净。vitest:11 个文件 / 130 个测试通过;pnpm lint(biome + stylelint + typecheck)退出码 0。lib/client.cjs现在注册为id: "@wxg-prc-cpg/browser-skill-dsh-plugin"。cordis.patch.yml解析出的name为已发布包名,且不加引号会报Plain value cannot start with reserved character @。合并后需要的操作
dsh-plugin-v0.1.1触发发布(npm-publish环境需已配置NPM_TOKEN)。npm deprecate @wxg-prc-cpg/browser-skill-dsh-plugin@0.1.0 "Broken plugin id in cordis.patch.yml prevents dsh from starting; upgrade to 0.1.1"