dshbase

插件目录 / Automation / dsh-browser-bridge

dsh-browser-bridge

已验证 · 实测可装 egnmosk

✓ 持续维护 基于 1 个官方 DSH 包

查看 GitHub ↗ ← 返回插件目录

0Stars
0Forks
0未关闭 issue
JavaScript语言
2026-08-15最近推送
跨平台平台

功能简介

dsh-browser-bridge — DSH 插件(编排)

✅
我们的评价
可用 — 实测通过,早期项目

dsh-browser-bridge — DSH 插件(编排) 实测能干净安装、正常启动。早期项目,但功能可用。

「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。

README

dsh-browser-bridge

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

  1. The package lives in the web profile's node_modules
    (~/.dsh/profiles/node_modules/dsh-browser-bridge).
  2. Registered in ~/.dsh/profiles/web/cordis.patch.yml as row
    browser-bridge (name: dsh-browser-bridge).
  3. Recorded in ~/.dsh/profiles/web/package.json dependencies.

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

  1. Open your browser: Chrome, Edge, or Yandex (all Chromium).
  2. Go to chrome://extensions (Edge: edge://extensions, Yandex:
    browser://extensions).
  3. Enable Developer mode (top-right toggle).
  4. Click Load unpacked and select the extension folder of this package.
  5. 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/info route
    (40 assertions, no harness boot required).
  • Protocol: JSON text frames. Server -> client request/ping/welcome;
    client -> server hello/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.1 by
    default) and has no authentication: any local process could connect to
    /bridge and drive the browser. Treat it like shell access.
  • browser_eval executes 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.

安装

🧩 让 Agent 自动装(推荐)

装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:

dsh plugin add dshbase-catalog

然后对 agent 说「帮我装 dsh-browser-bridge」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。

该插件是 GitHub 源码(未发 npm)——直接从仓库装:

Web profile:

dsh plugin --profile web add github:egnmosk/dsh-browser-bridge

Headless(CLI)profile:

dsh plugin --profile headless add github:egnmosk/dsh-browser-bridge

实测报告

验证通过:从 GitHub 源码完成 L1 安装 + L2 加载 + L3 运行(dsh 0.1.0-rc.6)。

使用场景

自动化一项重复工作——调度、串联任务或响应事件——不用你亲手启动。

适合谁

有周期性工作、想 cron 式无人值守而非手动触发的人。

二次开发建议

触发器和任务模板是缝——加事件驱动或文件监听触发,以及更丰富的流程编排。

安全:尚未扫描——我们的每日静态扫描将很快覆盖它。

分享徽章

Automation 里更多

浏览全部 7797 个插件 →