Skip to content

Commit a284ffc

Browse files
authored
Merge pull request #112 from Tencent/fix/dsh-plugin-id-and-edge-store
Fix/dsh plugin id and edge store
2 parents c725252 + e720f1f commit a284ffc

11 files changed

Lines changed: 124 additions & 41 deletions

File tree

.github/workflows/release-dsh-plugin.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ jobs:
6666
publish:
6767
needs: [resolve, guard]
6868
runs-on: ubuntu-latest
69-
# Secret NPM_TOKEN is stored on the GitHub Environment also named NPM_TOKEN.
70-
environment: NPM_TOKEN
69+
# Secret NPM_TOKEN is stored on the "npm-publish" GitHub Environment.
70+
environment: npm-publish
7171
permissions:
7272
contents: read
7373
steps:

AGENT_INSTALL.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,17 @@ where only `extension connected` fails is expected; go to Step 3.
3434
## 3. Open the extension install page
3535

3636
If `extension connected` is `FAIL` (`0 browsers connected`), the user likely
37-
has not installed or enabled the browser extension yet. Open the
38-
[Chrome Web Store install page](https://chromewebstore.google.com/detail/hhcmgoofomhgciiibhipgmgkgnoenaoi)
39-
in the user's browser, then tell the user:
37+
has not installed or enabled the browser extension yet. Open the install page
38+
matching the user's browser —
39+
[Chrome Web Store](https://chromewebstore.google.com/detail/hhcmgoofomhgciiibhipgmgkgnoenaoi)
40+
for Chrome and other Chromium browsers,
41+
[Edge Add-ons](https://microsoftedge.microsoft.com/addons/detail/browserskill/emacgiaaaiojkkpkddmmdfhmokgmnikg)
42+
for Microsoft Edge — then tell the user:
4043

4144
> Install **BrowserSkill** from the
42-
> [Chrome Web Store](https://chromewebstore.google.com/detail/hhcmgoofomhgciiibhipgmgkgnoenaoi),
43-
> open the popup, and wait until it turns green. Reply when done.
45+
> [Chrome Web Store](https://chromewebstore.google.com/detail/hhcmgoofomhgciiibhipgmgkgnoenaoi)
46+
> (or [Edge Add-ons](https://microsoftedge.microsoft.com/addons/detail/browserskill/emacgiaaaiojkkpkddmmdfhmokgmnikg)
47+
> on Edge), open the popup, and wait until it turns green. Reply when done.
4448
4549
If opening the page fails, give the user the same link. Then run `bsk doctor`
4650
once more. All `ok`/`na` → tell the user it's ready.

README.md

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ Set up browser-skill on this machine by following https://raw.githubusercontent.
6767

6868
<br>
6969

70-
Install the CLI, then install the extension from the [Chrome Web Store](https://chromewebstore.google.com/detail/hhcmgoofomhgciiibhipgmgkgnoenaoi).
70+
Install the CLI, then install the extension from the [Chrome Web Store](https://chromewebstore.google.com/detail/hhcmgoofomhgciiibhipgmgkgnoenaoi)
71+
or [Edge Add-ons](https://microsoftedge.microsoft.com/addons/detail/browserskill/emacgiaaaiojkkpkddmmdfhmokgmnikg).
7172

7273
#### 1. Install the `bsk` CLI
7374

@@ -91,7 +92,14 @@ bsk --version
9192

9293
#### 2. Install the browser extension
9394

94-
Install BrowserSkill from the [Chrome Web Store](https://chromewebstore.google.com/detail/hhcmgoofomhgciiibhipgmgkgnoenaoi).
95+
Install BrowserSkill from your browser's store:
96+
97+
| Browser | Store listing |
98+
| --- | --- |
99+
| Chrome | [Chrome Web Store](https://chromewebstore.google.com/detail/hhcmgoofomhgciiibhipgmgkgnoenaoi) |
100+
| Microsoft Edge | [Edge Add-ons](https://microsoftedge.microsoft.com/addons/detail/browserskill/emacgiaaaiojkkpkddmmdfhmokgmnikg) |
101+
102+
On other Chromium-based browsers, install the Chrome Web Store build.
95103

96104
#### 3. Install the skill
97105

@@ -136,14 +144,24 @@ Start a new Agent session and write a prompt that needs the browser, for example
136144

137145
## DeepSeek Harness plugin
138146

139-
A [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) plugin that
140-
injects native `browser_*` tools (no shelling out to `bsk`) and a live Web UI
147+
Using [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (`dsh`)?
148+
BrowserSkill ships a first-class dsh plugin on npm as
149+
[`@wxg-prc-cpg/browser-skill-dsh-plugin`](https://www.npmjs.com/package/@wxg-prc-cpg/browser-skill-dsh-plugin).
150+
It injects native `browser_*` tools (no shelling out to `bsk`) and a live Web UI
141151
overlay of each Agent Window.
142152

153+
Add it to a dsh profile, then start that profile:
154+
143155
```sh
144156
dsh plugin --profile web add @wxg-prc-cpg/browser-skill-dsh-plugin
157+
dsh --profile web
145158
```
146159

160+
The plugin carries its own copy of the skill, so `bsk install-skill` is not needed
161+
for dsh — but the `bsk` CLI and the browser extension are still prerequisites. See
162+
the [plugin README](packages/dsh-plugin-browserskill/README.md) for the tool list,
163+
configuration, and the observation overlay.
164+
147165
## How It Works
148166

149167
BrowserSkill is a local bridge between your agent harness and your browser.

README.zh-CN.md

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ BrowserSkill 由两个本地运行组件组成:`bsk` CLI/daemon 和浏览器
5454

5555
<br>
5656

57-
先安装 CLI,再从 [Chrome Web Store](https://chromewebstore.google.com/detail/hhcmgoofomhgciiibhipgmgkgnoenaoi) 安装浏览器扩展。
57+
先安装 CLI,再从 [Chrome Web Store](https://chromewebstore.google.com/detail/hhcmgoofomhgciiibhipgmgkgnoenaoi)
58+
[Edge 加载项商店](https://microsoftedge.microsoft.com/addons/detail/browserskill/emacgiaaaiojkkpkddmmdfhmokgmnikg) 安装浏览器扩展。
5859

5960
#### 1. 安装 `bsk` CLI
6061

@@ -64,8 +65,11 @@ BrowserSkill 由两个本地运行组件组成:`bsk` CLI/daemon 和浏览器
6465
curl -fsSL https://raw.githubusercontent.com/Tencent/BrowserSkill/main/install.sh | sh
6566
```
6667

67-
**Windows**:从 [最新 CLI release](https://github.com/Tencent/BrowserSkill/releases/latest)
68-
下载 `bsk-v<version>-x86_64-pc-windows-msvc.zip`,解压后将 `bsk.exe` 加入 `PATH`
68+
**Windows**(PowerShell,安装到 `~/.local/bin`):
69+
70+
```powershell
71+
irm https://raw.githubusercontent.com/Tencent/BrowserSkill/main/install.ps1 | iex
72+
```
6973

7074
验证二进制:
7175

@@ -75,7 +79,14 @@ bsk --version
7579

7680
#### 2. 安装浏览器扩展
7781

78-
[Chrome Web Store](https://chromewebstore.google.com/detail/hhcmgoofomhgciiibhipgmgkgnoenaoi) 安装 BrowserSkill。
82+
在对应浏览器的商店安装 BrowserSkill:
83+
84+
| 浏览器 | 商店页面 |
85+
| --- | --- |
86+
| Chrome | [Chrome Web Store](https://chromewebstore.google.com/detail/hhcmgoofomhgciiibhipgmgkgnoenaoi) |
87+
| Microsoft Edge | [Edge 加载项商店](https://microsoftedge.microsoft.com/addons/detail/browserskill/emacgiaaaiojkkpkddmmdfhmokgmnikg) |
88+
89+
其他基于 Chromium 的浏览器,安装 Chrome Web Store 版本即可。
7990

8091
#### 3. 安装 skill
8192

@@ -114,12 +125,17 @@ bsk install-skill
114125

115126
## DeepSeek Harness 插件
116127

117-
[DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) 插件:注入原生 `browser_*` 工具(无需再通过 Shell 调用 `bsk`),并在 Web UI 中实时观察每个 Agent Window。
128+
在用 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)`dsh`)?BrowserSkill 提供了官方 dsh 插件,已发布到 npm:[`@wxg-prc-cpg/browser-skill-dsh-plugin`](https://www.npmjs.com/package/@wxg-prc-cpg/browser-skill-dsh-plugin)。它会注入原生 `browser_*` 工具(无需再通过 Shell 调用 `bsk`),并在 Web UI 中实时观察每个 Agent Window。
129+
130+
把它装进某个 dsh profile,然后启动该 profile:
118131

119132
```sh
120133
dsh plugin --profile web add @wxg-prc-cpg/browser-skill-dsh-plugin
134+
dsh --profile web
121135
```
122136

137+
插件自带 skill,所以在 dsh 下无需执行 `bsk install-skill`;但 `bsk` CLI 和浏览器扩展仍是前置条件。工具清单、配置项与观察浮层见[插件 README](packages/dsh-plugin-browserskill/README.md)
138+
123139
## 工作原理
124140

125141
BrowserSkill 是 Agent 运行时与浏览器之间的本地桥接层。

apps/extension/src/tools/__tests__/borrow-confirmation.test.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -612,4 +612,14 @@ describe("isInjectableContentScriptUrl", () => {
612612
).toBe(false);
613613
expect(isInjectableContentScriptUrl("https://chromewebstore.google.com/")).toBe(false);
614614
});
615+
616+
it("rejects the Edge Add-ons store", () => {
617+
expect(
618+
isInjectableContentScriptUrl(
619+
"https://microsoftedge.microsoft.com/addons/detail/browserskill/emacgiaaaiojkkpkddmmdfhmokgmnikg",
620+
),
621+
).toBe(false);
622+
// Non-store paths on the same host stay injectable.
623+
expect(isInjectableContentScriptUrl("https://microsoftedge.microsoft.com/")).toBe(true);
624+
});
615625
});

apps/extension/src/tools/borrow-confirmation.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,9 +250,10 @@ const DEFAULT_NOTIFICATION_COPY: BorrowNotificationCopy = {
250250
// URL injection-eligibility test
251251
// ---------------------------------------------------------------------------
252252

253-
const CHROME_WEB_STORE_RES = [
253+
const EXTENSION_STORE_RES = [
254254
/^https:\/\/chrome\.google\.com\/webstore/i,
255255
/^https:\/\/chromewebstore\.google\.com/i,
256+
/^https:\/\/microsoftedge\.microsoft\.com\/addons/i,
256257
];
257258

258259
/**
@@ -264,14 +265,15 @@ const CHROME_WEB_STORE_RES = [
264265
* - `ftp://` no longer hosts content scripts reliably in modern Chrome.
265266
* - `about:` / `chrome:` / `chrome-extension:` / `edge:` / `devtools:` /
266267
* `view-source:` / `data:` / `blob:` are blocked by the platform.
267-
* - The Chrome Web Store (both legacy and new domains) is also blocked.
268+
* - Extension storefronts are blocked by their own browser: the Chrome Web
269+
* Store (legacy and new domains) under Chrome, and Edge Add-ons under Edge.
268270
*
269271
* Mirrors the implicit scheme list documented in
270272
* https://developer.chrome.com/docs/extensions/develop/concepts/match-patterns.
271273
*/
272274
export function isInjectableContentScriptUrl(url: string | undefined): boolean {
273275
if (!url) return false;
274-
for (const re of CHROME_WEB_STORE_RES) {
276+
for (const re of EXTENSION_STORE_RES) {
275277
if (re.test(url)) return false;
276278
}
277279
return /^https?:\/\//i.test(url);

crates/bsk-cli/src/cli/doctor.rs

Lines changed: 38 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ use crate::daemon::state::PROTOCOL_VERSION;
1818
const EXTENSION_STORE_URL: &str =
1919
"https://chromewebstore.google.com/detail/hhcmgoofomhgciiibhipgmgkgnoenaoi";
2020

21+
/// Edge Add-ons listing for the browser-skill extension.
22+
const EXTENSION_STORE_URL_EDGE: &str = "https://microsoftedge.microsoft.com/addons/detail/browserskill/emacgiaaaiojkkpkddmmdfhmokgmnikg";
23+
24+
/// Store listings highlighted in repair hints, in the order they appear.
25+
const EXTENSION_STORE_URLS: [&str; 2] = [EXTENSION_STORE_URL, EXTENSION_STORE_URL_EDGE];
26+
2127
/// Status of a single doctor check. `Ok` / `Fail` are the legacy two
2228
/// states; `NotApplicable` (review M2) is reported as "N/A" in human
2329
/// output and as `"status": "na"` in `--json` output, so a check that
@@ -420,25 +426,25 @@ fn check_extension_connected(status: Option<&StatusResult>) -> CheckResult {
420426
CheckResult::fail(
421427
name,
422428
"0 browsers connected",
423-
format!("install the extension from {EXTENSION_STORE_URL} and load it in Chromium"),
429+
format!(
430+
"install the extension from {EXTENSION_STORE_URL} (Chrome) \
431+
or {EXTENSION_STORE_URL_EDGE} (Edge) and load it in the browser"
432+
),
424433
)
425434
}
426435
}
427436

428437
/// Highlight known URLs in repair hints for terminal output. Plain
429438
/// text is preserved in `--json` and in stored [`CheckResult::hint`].
430439
fn style_hint(hint: &str) -> String {
431-
if !hint.contains(EXTENSION_STORE_URL) {
432-
return hint.to_string();
433-
}
434-
hint.replace(
435-
EXTENSION_STORE_URL,
436-
&style(EXTENSION_STORE_URL)
437-
.cyan()
438-
.bold()
439-
.underlined()
440-
.to_string(),
441-
)
440+
let mut styled = hint.to_string();
441+
for url in EXTENSION_STORE_URLS {
442+
if !styled.contains(url) {
443+
continue;
444+
}
445+
styled = styled.replace(url, &style(url).cyan().bold().underlined().to_string());
446+
}
447+
styled
442448
}
443449

444450
fn render_human(checks: &[CheckResult]) {
@@ -504,6 +510,26 @@ mod m2_tests {
504510
hint.contains(EXTENSION_STORE_URL),
505511
"hint should include Chrome Web Store URL: {hint}"
506512
);
513+
assert!(
514+
hint.contains(EXTENSION_STORE_URL_EDGE),
515+
"hint should include Edge Add-ons URL: {hint}"
516+
);
517+
}
518+
519+
#[test]
520+
fn style_hint_preserves_every_store_url() {
521+
let hint = check_extension_connected(Some(&fake_status(Vec::new(), Vec::new())))
522+
.hint
523+
.expect("extension disconnected should include a hint");
524+
let styled = style_hint(&hint);
525+
// Whether or not the terminal accepts colors, styling must never drop or
526+
// mangle a URL the user has to click.
527+
for url in EXTENSION_STORE_URLS {
528+
assert!(
529+
styled.contains(url),
530+
"styled hint should still contain {url}: {styled}"
531+
);
532+
}
507533
}
508534

509535
#[test]

packages/dsh-plugin-browserskill/README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ A [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (dsh) tool
66
[BrowserSkill](https://github.com/Tencent/BrowserSkill) (`bsk`) browser automation to the model.
77

88
Each tool maps to one `bsk <cmd> --json` invocation: the plugin spawns the bsk CLI, parses its
9-
structured JSON output, and returns a canonical typed value. The bsk daemon, browser, and Chrome
9+
structured JSON output, and returns a canonical typed value. The bsk daemon, browser, and browser
1010
extension keep owning the actual browser control — this package is a thin, well-typed bridge.
1111

1212
## Tools
@@ -64,9 +64,10 @@ dsh plugin --profile <name> add @wxg-prc-cpg/browser-skill-dsh-plugin
6464
dsh --profile <name>
6565
```
6666

67-
Prerequisite: the `bsk` CLI must be installed and on `PATH`, and the BrowserSkill Chrome extension
68-
must be connected — see the [BrowserSkill README](https://github.com/Tencent/BrowserSkill). When bsk
69-
is missing, tool calls fail with install guidance instead of a bare spawn error.
67+
Prerequisite: the `bsk` CLI must be installed and on `PATH`, and the BrowserSkill browser extension
68+
(Chrome or Edge) must be connected — see the
69+
[BrowserSkill README](https://github.com/Tencent/BrowserSkill). When bsk is missing, tool calls fail
70+
with install guidance instead of a bare spawn error.
7071

7172
## Configuration
7273

@@ -76,7 +77,7 @@ All fields are optional and validated through the plugin's Schemastery `Config`:
7677
# cordis.patch.yml override example
7778
- insert:
7879
- id: browserskill
79-
name: dsh-plugin-browserskill
80+
name: "@wxg-prc-cpg/browser-skill-dsh-plugin"
8081
config:
8182
bskPath: bsk # path to the bsk binary (default: resolve from PATH)
8283
defaultTimeoutMs: 120000
@@ -186,8 +187,8 @@ git tag dsh-plugin-v0.1.0
186187
git push origin dsh-plugin-v0.1.0
187188
```
188189

189-
Or run the workflow from the Actions tab (`workflow_dispatch`). The job reads
190-
`NPM_TOKEN` from the GitHub Environment of the same name.
190+
Or run the workflow from the Actions tab (`workflow_dispatch`). The job reads the
191+
`NPM_TOKEN` secret from the `npm-publish` GitHub Environment.
191192

192193
## License
193194

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
- insert:
22
- id: browserskill
3-
name: dsh-plugin-browserskill
3+
# Must be the published package name — the loader imports this specifier.
4+
# Quoted because YAML reserves a leading '@' in plain scalars.
5+
name: "@wxg-prc-cpg/browser-skill-dsh-plugin"

packages/dsh-plugin-browserskill/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@wxg-prc-cpg/browser-skill-dsh-plugin",
33
"description": "DeepSeek Harness tool plugin that exposes BrowserSkill (bsk) browser automation to the model",
4-
"version": "0.1.0",
4+
"version": "0.1.1",
55
"license": "MIT",
66
"publishConfig": {
77
"access": "public",

0 commit comments

Comments
 (0)