dsh-playwright
Use one shared Playwright browser together with your DeepSeek Harness AI.
jeremyguo
@jeremyguo
⬇ 2
★ 0
main
安装
dsh plugin --profile web add github:jeremyguo/dsh-playwright
需要可复现安装时,可在仓库后追加 #commit 固定提交。
Use one shared Playwright browser together with your DeepSeek Harness AI.
该插件未提供要点说明,请参考仓库 README。
ai-agentbrowser-usedeepseek-harnessdshdsh-pluginplaywright
- 安装并启动 DeepSeek Harness:
npx @deepseek-ai/dsh web - 在终端执行上面的安装命令(CLI 会解析插件并核验来源)
- 用 dsh plugins list 确认已安装,必要时重启 Harness 生效
插件以当前 dsh 进程的权限运行,安装时可能执行代码。请先通读仓库源码与许可证,确认无破坏性命令与越权访问;本站只做索引,不对第三方插件安全性作担保。
| 代码仓库 | github.com/jeremyguo/dsh-playwright |
| 许可证 | MIT |
| 主要语言 | main |
| 下载量 | 2 |
| GitHub 星标 | 0 |
| 最近推送 | 2026-08-15 |
| 收录日期 | 2026-09-19 |
| 分类 | 工具与能力 |
事实信息来自公开插件目录快照(2026-10-01),介绍文案由本站再加工。
以下为插件仓库 README 全文(原始内容,由公开目录抓取整理)。
# dsh-playwright
English | [中文](README.zh.md)
Use a real browser together with your DeepSeek Harness AI. You and the model share one isolated Playwright page per DSH session: you watch and interact in the Browser Use panel while the model reads, sees, clicks, types, and navigates the same live page.

## What you and the AI can do
The Browser Use panel and the model tools operate on the same page state.
- **Watch together:** Chrome CDP pushes repaint frames through a loopback-only binary WebSocket into a stable canvas. The panel shares width with the conversation and has a draggable percentage divider.
- **Navigate:** open HTTP(S) URLs and reload the current page.
- **Read pages:** get the URL, title, visible text, and temporary ids for visible links, buttons, inputs, and other interactive elements.
- **Use the pointer:** target a visible element id or screenshot coordinates; move the pointer; click, press, and release the left, right, or middle button.
- **Drag:** send `down`, one or more `move` actions, then `up` with the same mouse button.
- **Use the keyboard:** type text; press keys and chords such as `Enter`, `ArrowUp`, `Control+A`, or `Meta+K`; hold a game key with `down` and release it with `up`.
- **See screenshots:** return a durable PNG image block to an image-capable model.
- **Confirm clicks:** optionally draw a post-processed RGB square at the last successful click. The user has an independent **显示上次点击** switch in the panel.
- **Work by session:** every DSH session owns a separate BrowserContext and Page. The plugin restores the last top-level URL after an unexpected Chrome exit.
## Model tools
### `browser_navigate`
Open a URL and return a semantic snapshot.
```json
{"url":"https://example.com"}
```
### `browser_snapshot`
Return bounded page text plus ids such as `e1`. Ids are valid only for that snapshot; take another snapshot after navigation or dynamic UI changes.
### `browser_click`
The default is a left click. Target either `element_id` or both `x` and `y`.
```json
{"element_id":"e1"}
```
```json
{"action":"click","button":"right","x":640,"y":400}
```
Move without clicking:
```json
{"action":"move","x":640,"y":400,"steps":20}
```
Drag:
```json
{"action":"down","button":"left","x":200,"y":200}
{"action":"move","x":600,"y":400,"steps":30}
{"action":"up","button":"left","x":600,"y":400}
```
Supported buttons: `left`, `right`, `middle`. Supported actions: `click`, `down`, `move`, `up`.
### `browser_type`
Replace the value of a visible editable element and optionally submit with Enter.
```json
{"element_id":"e3","text":"DeepSeek Harness","submit":true}
```
### `browser_keyboard`
Simulate keyboard events on the current focus or focus one element first.
```json
{"action":"type","value":"hello","element_id":"e3","delay_ms":50}
```
```json
{"action":"press","value":"Control+A"}
```
```json
{"action":"down","value":"ArrowRight"}
{"action":"up","value":"ArrowRight"}
```
Supported actions: `type`, `press`, `down`, `up`.
### `browser_screenshot`
Return a PNG through DSH's native attachment and image-block pipeline. A model route must declare image input.
Optionally mark the last click without modifying the page DOM:
```json
{
"show_last_click": true,
"marker_r": 0,
"marker_g": 255,
"marker_b": 0,
"marker_size": 60
}
```
RGB channels are integers from 0 to 255. `show_last_click` is optional and defaults to `false`.
## Requirements
- DeepSeek Harness `0.1.0-rc.6`.
- Node.js `^22.19.0` or `>=24.0.0`.
- Google Chrome or Chromium installed on the Host.
- An image-capable model route for `browser_screenshot`.
## Install
After publication:
```sh
dsh plugin --profile web add dsh-playwright
dsh web --port 3081
```
For local development:
```sh
pnpm install
pnpm run verify
dsh plugin --profile web add link:/absolute/path/to/dsh-playwright
dsh web --port 3081
```
Use the **Browser Use** button on the right edge to open or close the panel. Drag its left divider to change the Browser Use share from 10% to 80%. Above 55%, the plugin collapses DSH's left Workspace/session selector while preserving the conversation; below 48%, it restores only a selector it collapsed itself.
## Multimodal model configuration
For a configured `llm-pi-ai` route, declare image input:
```yaml
llm-pi-ai:
providers:
my-provider:
models:
- id: my-vision-model
name: My Vision Model
input:
- text
- image
```
Declaring image input is a claim about the endpoint. The provider rejects the request if the endpoint does not actually accept images.
## Configuration
- `browserExecutablePath`: explicit Chrome/Chromium executable; omitted uses common macOS/Linux locations.
- `viewportWidth` / `viewportHeight`: shared page viewport.
- `navigationTimeoutMs`: Playwright operation timeout.
- `actionSettleMs`: delay before returning post-action state.
- `screencastQuality`: CDP screencast JPEG quality from 30 to 90; default 60.
- `maxSnapshotChars` / `maxSnapshotElements`: semantic snapshot bounds.
- `allowPrivateHosts`: permits localhost/private-network targets when `true`; default `false`.
## Security and lifecycle
The RPC and screencast endpoints accept loopback same-origin clients only. HTTP(S) requests to localhost, literal private addresses, and hostnames resolving to private addresses are blocked by default, including subresources. Enable `allowPrivateHosts` only for trusted tasks.
The plugin launches Chrome lazily. Each DSH session receives a separate BrowserContext and Page. On teardown, queued actions settle before Chrome closes. If Chrome exits unexpectedly, the next operation launches a replacement browser and restores affected sessions to their last top-level URL.
Browser sessions do not reuse the user's Chrome profile, cookies, or login state. Popups and downloads are not exposed. Private-host blocking is a network guard, not a complete sandbox for untrusted websites.
## Model Experience
Semantic tools return bounded text into durable tool results. `browser_screenshot` stores its PNG through DSH attachments and returns a native image block, so it is available only to a route that declares image input. The prompt contribution teaches the model to refresh stale element ids, use screenshot coordinates for canvas pages, release held mouse/keyboard inputs, and request a marked screenshot when it needs to verify a click.
## License
[MIT](LICENSE)
数据来源:公开的 DeepSeek Harness 插件目录与各插件 GitHub 仓库。本站为独立第三方目录,与 DeepSeek、幻方(High-Flyer)及插件作者均无隶属或背书关系。