dsh-builtin-browser 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +16 -1
- package/README.md +16 -1
- package/lib/browser-electron/provider.js +7 -1
- package/package.json +1 -1
package/README.en.md
CHANGED
|
@@ -16,7 +16,22 @@ This plugin provides the **host-side capability** (browser seam, Electron CDP pr
|
|
|
16
16
|
## Requirements
|
|
17
17
|
|
|
18
18
|
- DeepSeek Harness (dsh) with the `web` profile
|
|
19
|
-
-
|
|
19
|
+
- **Electron runtime** (optional peer dependency): the desktop shell carries it; on plain `dsh web` the plugin must be able to locate an Electron binary (see below)
|
|
20
|
+
- With a desktop shell (`ctx.electronViewHost`) the shell's embedded view is used; without one the plugin **self-hosts**: it spawns its own Electron window and the `browser_*` tools still work
|
|
21
|
+
|
|
22
|
+
**Electron lookup order**: ① `require('electron')` (peer installed) → ② DSH install anchors → ③ `node_modules/.pnpm` virtual store → ④ `ELECTRON_PATH` env var. A clear error tells you when none is found.
|
|
23
|
+
|
|
24
|
+
### Verified versions
|
|
25
|
+
|
|
26
|
+
| Component | Version |
|
|
27
|
+
|---|---|
|
|
28
|
+
| DeepSeek Harness (dsh) | `0.1.0-rc.5` |
|
|
29
|
+
| Electron | `43.4.0` |
|
|
30
|
+
| Node.js | `22.20.0` |
|
|
31
|
+
| dsh-builtin-browser | `0.1.3` |
|
|
32
|
+
| OS | Windows 10 (10.0.26200) |
|
|
33
|
+
|
|
34
|
+
> The plugin declares `electron >= 30`; other platforms (macOS/Linux) run the same protocol but were only verified on the Windows environment above.
|
|
20
35
|
|
|
21
36
|
## Install
|
|
22
37
|
|
package/README.md
CHANGED
|
@@ -16,7 +16,22 @@
|
|
|
16
16
|
## 环境要求
|
|
17
17
|
|
|
18
18
|
- DeepSeek Harness(dsh)且安装了 `web` profile
|
|
19
|
-
-
|
|
19
|
+
- **Electron 运行时**(可选 peer 依赖):桌面外壳自带;纯 `dsh web` 下需要能定位到 Electron 二进制(见下)
|
|
20
|
+
- 有桌面外壳(`ctx.electronViewHost`)时用外壳嵌入视图;没有时插件**自托管**:自己拉起一个 Electron 窗口,`browser_*` 工具照常可用
|
|
21
|
+
|
|
22
|
+
**Electron 定位顺序**:① `require('electron')`(peer 依赖已装)→ ② DSH 安装锚点 → ③ `node_modules/.pnpm` 虚拟仓库 → ④ `ELECTRON_PATH` 环境变量。找不到时工具会报清晰的错误提示。
|
|
23
|
+
|
|
24
|
+
### 验证过的版本
|
|
25
|
+
|
|
26
|
+
| 组件 | 版本 |
|
|
27
|
+
|---|---|
|
|
28
|
+
| DeepSeek Harness(dsh) | `0.1.0-rc.5` |
|
|
29
|
+
| Electron | `43.4.0` |
|
|
30
|
+
| Node.js | `22.20.0` |
|
|
31
|
+
| dsh-builtin-browser | `0.1.3` |
|
|
32
|
+
| 操作系统 | Windows 10 (10.0.26200) |
|
|
33
|
+
|
|
34
|
+
> 插件声明 `electron >= 30`;其他平台(如 macOS/Linux)按同一协议运行,但仅在上表 Windows 环境实测。
|
|
20
35
|
|
|
21
36
|
## 安装
|
|
22
37
|
|
|
@@ -149,7 +149,13 @@ export class ElectronBrowserProvider {
|
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
signal?.throwIfAborted();
|
|
152
|
-
await handle.sendCommand(CDP_PAGE_NAVIGATE, { url });
|
|
152
|
+
const result = await handle.sendCommand(CDP_PAGE_NAVIGATE, { url });
|
|
153
|
+
// Page.navigate resolves even when the navigation fails; surface the
|
|
154
|
+
// failure instead of leaving a silent white screen.
|
|
155
|
+
const errorText = result.errorText;
|
|
156
|
+
if (typeof errorText === 'string' && errorText !== '') {
|
|
157
|
+
throw new BrowserError(`browser: navigation to "${url}" failed: ${errorText}`, 'BROWSER_NAVIGATION_FAILED');
|
|
158
|
+
}
|
|
153
159
|
}
|
|
154
160
|
/** Execute JS in the active tab's page context. */
|
|
155
161
|
async execute(session, request, signal) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-builtin-browser",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "Shared real browser capability for DeepSeek Harness: a visible browser the human watches and can take over, driven by the agent over CDP (snapshot/execute/content/tab management); host-side seam, provider, and browser_* tools",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|