From 2b7e10ca2b447094f9083eedc8629c4797051d27 Mon Sep 17 00:00:00 2001 From: drakezhang Date: Wed, 19 Aug 2026 11:20:07 +0800 Subject: [PATCH] fix(dsh-plugin-browserskill): identify the plugin by its published name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- packages/dsh-plugin-browserskill/README.md | 2 +- packages/dsh-plugin-browserskill/cordis.patch.yml | 4 +++- packages/dsh-plugin-browserskill/package.json | 2 +- packages/dsh-plugin-browserskill/tsdown.config.ts | 6 +++++- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/packages/dsh-plugin-browserskill/README.md b/packages/dsh-plugin-browserskill/README.md index 22e1273..d892631 100644 --- a/packages/dsh-plugin-browserskill/README.md +++ b/packages/dsh-plugin-browserskill/README.md @@ -77,7 +77,7 @@ All fields are optional and validated through the plugin's Schemastery `Config`: # cordis.patch.yml override example - insert: - id: browserskill - name: dsh-plugin-browserskill + name: "@wxg-prc-cpg/browser-skill-dsh-plugin" config: bskPath: bsk # path to the bsk binary (default: resolve from PATH) defaultTimeoutMs: 120000 diff --git a/packages/dsh-plugin-browserskill/cordis.patch.yml b/packages/dsh-plugin-browserskill/cordis.patch.yml index 8c04006..882eb62 100644 --- a/packages/dsh-plugin-browserskill/cordis.patch.yml +++ b/packages/dsh-plugin-browserskill/cordis.patch.yml @@ -1,3 +1,5 @@ - insert: - id: browserskill - name: dsh-plugin-browserskill + # Must be the published package name — the loader imports this specifier. + # Quoted because YAML reserves a leading '@' in plain scalars. + name: "@wxg-prc-cpg/browser-skill-dsh-plugin" diff --git a/packages/dsh-plugin-browserskill/package.json b/packages/dsh-plugin-browserskill/package.json index 8fd52b5..72191df 100644 --- a/packages/dsh-plugin-browserskill/package.json +++ b/packages/dsh-plugin-browserskill/package.json @@ -1,7 +1,7 @@ { "name": "@wxg-prc-cpg/browser-skill-dsh-plugin", "description": "DeepSeek Harness tool plugin that exposes BrowserSkill (bsk) browser automation to the model", - "version": "0.1.0", + "version": "0.1.1", "license": "MIT", "publishConfig": { "access": "public", diff --git a/packages/dsh-plugin-browserskill/tsdown.config.ts b/packages/dsh-plugin-browserskill/tsdown.config.ts index 9fcce3f..f5f1137 100644 --- a/packages/dsh-plugin-browserskill/tsdown.config.ts +++ b/packages/dsh-plugin-browserskill/tsdown.config.ts @@ -2,6 +2,7 @@ import { readFile } from "node:fs/promises"; import { basename, dirname, resolve as resolvePath } from "node:path"; import { transform } from "lightningcss"; import { defineConfig, type UserConfig } from "tsdown"; +import pkg from "./package.json" with { type: "json" }; /** * Two build faces of the dual-face package: @@ -33,7 +34,10 @@ const VENDORED_LIBRARY = /^@deepseek-ai\/(cosmokit|schemastery)(\/|$)/; const CSS_VIRTUAL_PREFIX = "\0bsk-css:"; const CSS_VIRTUAL_SUFFIX = ".mjs"; -const CLIENT_ID = "dsh-plugin-browserskill"; +// The web shell resolves client bundles from its module table by package name +// (dsh's own bundles register the same way), so this must never drift from +// package.json. +const CLIENT_ID = pkg.name; const client: UserConfig = { name: `${CLIENT_ID}/client`,