Skip to content

Fix/dsh plugin id and edge store - #112

Merged
BB-fat merged 3 commits into
mainfrom
fix/dsh-plugin-id-and-edge-store
Aug 19, 2026
Merged

Fix/dsh plugin id and edge store#112
BB-fat merged 3 commits into
mainfrom
fix/dsh-plugin-id-and-edge-store

Conversation

@iuyo5678

Copy link
Copy Markdown
Collaborator

本 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 直接起不来。
  • client bundle 通过 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 ,这个不合理。

image

解决方案

插件标识(fix(dsh-plugin-browserskill)cordis.patch.ymlname 改为已发布包名;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 --checkcargo clippy --workspace --all-targets -- -D warningscargo test --workspace 通过,其中 doctor 单测 9 个(含新增的 hint 保真测试)。
  • 扩展 vitest:57 个文件 / 681 个测试通过;tsc --noEmit 干净。
  • dsh 插件 vitest:11 个文件 / 130 个测试通过;pnpm lint(biome + stylelint + typecheck)退出码 0。
  • 构建产物核对:lib/client.cjs 现在注册为 id: "@wxg-prc-cpg/browser-skill-dsh-plugin"
  • 用 YAML parser 实测确认 cordis.patch.yml 解析出的 name 为已发布包名,且不加引号会报 Plain value cannot start with reserved character @

合并后需要的操作

  1. 打 tag dsh-plugin-v0.1.1 触发发布(npm-publish 环境需已配置 NPM_TOKEN)。
  2. 废弃有问题的 0.1.0,让已安装的用户看到升级提示: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"

TencentXiaowei and others added 3 commits August 19, 2026 11:19
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>
@iuyo5678
iuyo5678 requested a review from BB-fat August 19, 2026 03:27
@iuyo5678

Copy link
Copy Markdown
Collaborator Author

本来应该拆成3 个pr,但是互相有一点依赖,bug觉得比较严重,就合并成一个pr来提了。

@BB-fat BB-fat left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@BB-fat
BB-fat merged commit a284ffc into main Aug 19, 2026
4 checks passed
@BB-fat
BB-fat deleted the fix/dsh-plugin-id-and-edge-store branch August 19, 2026 03:43
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
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.

3 participants