dsh-browser-bridge
by egnmosk
DeepSeek Harness 插件 + 浏览器扩展桥:browser_* agent 工具(导航、点击、输入、截图等)
DeepSeek Harness plugin + browser extension bridge: browser_* agent tools (navigate, click, type, screenshot,
安装
dsh plugin --profile web add github:egnmosk/dsh-browser-bridgeGitHub 源码安装:首次需按提示配置 allowBuilds 构建授权后重试
安装与环境配置指引、插件开发教程见 DSH 中文社区文档 ↗
安装即在你的机器上以你的权限运行第三方代码——它可读写文件、使用凭据、访问网络,DSH 的工具审批不会为插件代码加沙箱。「检测到 manifest」仅代表发现 dsh.bundle / dsh.plugin 清单,不构成兼容性或安全审查;安装前请审阅源码,不熟悉的插件先在不含密钥的环境试用。
README
目录
A DeepSeek Harness plugin + browser extension pair that lets DSH agents read and control your browser - the equivalent of Kimi's WebBridge extension or Claude's browser extension, but for your own local harness.
+-----------------------------+ WebSocket +--------------------------+
| DeepSeek Harness (dsh) | ws://127.0.0.1:3080/ | Your browser |
| | bridge | (Chrome / Edge / Yandex)|
| browser_* tools | <------------------------> | DSH Browser Bridge |
| (this plugin) | commands / responses | extension (MV3) |
+-----------------------------+ +--------------------------+
The DSH side exposes 13 model-facing tools; the extension side executes them in the browser (tabs, DOM, clicks, typing, scrolling, screenshots, eval).
Agent tools
| Tool | What it does |
|---|---|
browser_status |
Is the extension connected? Bridge URL, pending commands. |
browser_list_tabs |
List open tabs (id, title, url, active). |
browser_activate_tab |
Bring a tab to the foreground. |
browser_navigate |
Open a URL, or reload / back / forward; optional new tab. |
browser_snapshot |
Interactive elements (buttons, links, inputs...) with stable CSS selectors. |
browser_read_page |
Visible page text (or a subtree), capped in characters. |
browser_click |
Click an element by CSS selector. |
browser_type |
Fill an input / textarea / contenteditable (native events). |
browser_press |
Send a key (Enter, Tab, Escape, arrows...). |
browser_scroll |
Scroll the page or a scrollable element. |
browser_wait |
Wait for a selector to appear/disappear, or just let the page settle. |
browser_screenshot |
Save a PNG/JPEG of the current tab to disk (~/.dsh/browser-bridge/). |
browser_eval |
Evaluate a JS expression in the page (content-script world). |
When the extension is not connected, every tool fails with a clear message telling the model (and the user) how to connect it.
Layout
dsh-browser-bridge/
|-- lib/ # the DSH plugin (node side)
| |-- index.js # plugin entry: tools + WS upgrade route + /bridge/info
| |-- ws.js # minimal RFC 6455 WebSocket server (no dependencies)
| |-- bridge.js # connection registry, request/response correlation, timeouts
| `-- tools.js # the 13 browser_* tool definitions
|-- extension/ # the browser extension (Manifest V3)
| |-- manifest.json
| |-- background.js # WebSocket client + chrome.tabs / messaging dispatch
| |-- content.js # DOM actions in pages (top frame only)
| |-- popup.html/js # connection status, read-this-page preview
| |-- options.html/js # server URL, auto-connect, "Test connection"
| `-- icons/
`-- test/run-test.mjs # standalone protocol test (no harness boot required)
Install
- The package lives in the web profile's node_modules
(
~/.dsh/profiles/node_modules/dsh-browser-bridge). - Registered in
~/.dsh/profiles/web/cordis.patch.ymlas rowbrowser-bridge(name: dsh-browser-bridge). - Recorded in
~/.dsh/profiles/web/package.jsondependencies.
Verify the composition at any time:
dsh --profile web --dump-config | grep -A 3 browser-bridge
Activate
The plugin is loaded at boot, so restart dsh web once after installing
(restarting drops the GUI for a few seconds; it comes back on the same URL).
After the restart, the server
prints [browser-bridge] bridge ready - point the DSH Browser Bridge extension at ws://127.0.0.1:3080/bridge, and http://127.0.0.1:3080/bridge/info
answers JSON. Verify with:
dsh --profile web --dump-config | grep -A 3 browser-bridge
curl http://127.0.0.1:3080/bridge/info # -> {"name":"dsh-browser-bridge",...}
Load the extension
- Open your browser: Chrome, Edge, or Yandex (all Chromium).
- Go to
chrome://extensions(Edge:edge://extensions, Yandex:browser://extensions). - Enable Developer mode (top-right toggle).
- Click Load unpacked and select the
extensionfolder of this package. - Click the extension icon - the popup should show Connected to DeepSeek Harness.
The default server URL is ws://127.0.0.1:3080/bridge, which matches dsh web
running on its default port. If your harness listens on another port, open the
extension's Options page, set the URL, and use Test connection.
Then just ask an agent, for example:
Use the browser to open example.com, read the page, and click the first link.
Configuration (cordis.patch.yml)
| Key | Default | Meaning |
|---|---|---|
path |
/bridge |
WebSocket endpoint path on the web server. |
commandTimeoutMs |
60000 |
How long a tool waits for the extension to answer. |
screenshotDir |
~/.dsh/browser-bridge |
Where screenshots are saved. |
maxMessageBytes |
8 MiB |
Max WS message size (screenshots travel over WS). |
Development
node test/run-test.mjs- boots a real server + fake extension client and exercises every tool, timeouts, disconnect, and the/bridge/inforoute (40 assertions, no harness boot required).- Protocol: JSON text frames. Server -> client
request/ping/welcome; client -> serverhello/response/pong. Commands are camelCase in the extension protocol (listTabs,snapshot,click, ...) and snake_case in the model-facing tools.
Security notes
- The bridge binds only to the web server's loopback host (
127.0.0.1by default) and has no authentication: any local process could connect to/bridgeand drive the browser. Treat it like shell access. browser_evalexecutes JavaScript in pages - powerful by design; only grant it to trusted agents.- The extension has
<all_urls>host permissions (required to read tab URLs and act in any page). It talks only to the configured localhost URL.
原始 README: https://github.com/egnmosk/dsh-browser-bridge/blob/main/README.md ↗
同类插件
查看全部 →
modlens
为纯文本模型架起视觉桥梁:粘贴图片,输出结构化 JSON 证据(OCR、版面、语义)。

dsh-vision-toolkit
让纯文本模型更好地做视觉任务:带意图的图片问答、长截图 OCR、UI 还原等。

dsh-vision-router
为纯文本 Agent 提供视觉能力:内置免 Key 视觉链 + 像素级视觉工具(看图问答、定位、裁剪、像素对比、取色、OCR、矢量化、抠图、截图);粘贴图片即可用。

dsh-vision-complete
给 DeepSeek 补上「眼睛和耳朵」的多模态视觉插件:看图 / OCR / 物体检测 / 视频理解 / 语音转写 / 截图直读,一键安装(DSH 插件)。

dsh-media-skills
面向纯文本模型的免费视觉桥与生图:粘贴读图、GLM-4V-Flash 与 Gemini 引擎故障转移、modlens 同款结构化证据输出,并自动播种免费视觉模型路由。

dsh-vision-opencode
给纯文本主模型加可配置识图模型:vision_read_image 工具、输入框识图模型选择器,以及纯文本路由的图片自动转文字。