dsh-bridge-browser: Let DSH control your logged-in Chrome tabs

Introduction

When performing web browsing or automation tasks in DSH (DeepSeek Harness), the common approach is to launch a headless browser or perform remote scraping. While this allows pages to open, the login status, cookies, and the environment already configured in your daily-use Chrome often do not match. To allow the model to click buttons, fill forms, and switch tabs “like a human,” while keeping the session within the local browser, a bridge from DSH to real browser tabs is required.

@shallbay/dsh-bridge-browser is a browser bridge plugin for DSH. Through a bundled Chrome MV3 extension, it provides the model with the current tab as a plain-text snapshot and numbered elements. It supports clicking, input, navigation, and tab management while retaining your login status and session. Maintained by ShallBay, this repository is a repackaged version of the upstream project @yuxianglin/dsh-bridge-browser by Yuxiang Lin. It focuses on installation via npm and compatibility with DSH Desktop 0.2.x. The runtime logic originates from the upstream project; for changes, see the repository’s NOTICE.md. The plugin is categorized as a web tool in the SkillHub directory; for source code and documentation, see GitHub.

What is this

npm Package Name: @shallbay/dsh-bridge-browser (Version 1.0.4 in current materials, License MIT).

The plugin registers a set of browser_* tools on the DSH side and communicates with the browser extension via a WebSocket authenticated by a token. Instead of providing screenshots to the model, the page is presented as structured text containing the title, URL, body content, numbered interactive elements, and form fields. Passwords and payment card fields are always displayed as •••• in the snapshot, and their actual values never leave the page.

Core Capabilities

The tools listed in the README are as follows (the model locates elements via numbers):

Tool Function
browser_snapshot Structured text snapshot
browser_click Click links, buttons, checkboxes, etc. by number
browser_type Input text (compatible with React/Vue controlled components); replace clears and refills
browser_press Key presses (Enter / Tab / Escape, arrow keys, etc.)
browser_scroll Viewport scrolling (up / down / top / bottom)
browser_navigate / browser_open_tab / browser_back / browser_forward / browser_reload Navigation
browser_list_tabs / browser_follow_tab / browser_close_tab Tab enumeration and binding
browser_get_text Read local text / lazy-loaded content
browser_wait Wait for page loading and rendering to stabilize

Write operations (click, input, navigation, etc.) require confirmation in the browser sidebar by default; read operations can be performed as needed. The bridge accepts only one active extension connection at a time; the Desktop client and dsh web cannot occupy the bridge simultaneously.

Installation and Activation

Prerequisites: dsh is installed; if using the Desktop client, it must have been started at least once so that profiles/desktop is initialized.

Install via PowerShell:

# Desktop
dsh plugin --profile desktop add @shallbay/dsh-bridge-browser

# Or Web / CLI
dsh plugin --profile web add @shallbay/dsh-bridge-browser

Restart the Desktop client after installation (menu Restart App and Host).

Uninstallation example:

dsh plugin --profile desktop remove @shallbay/dsh-bridge-browser

After uninstallation, it is recommended to clean up ~/.dsh/profiles/<profile>/node_modules/@shallbay/dsh-bridge-browser, remove the loaded extension in chrome://extensions, and remove any previous manual port or compatibility configurations from cordis.patch.yml / compatibility.json as needed.

Loading the Chrome Extension (Mandatory Once)

The extension is located in the extension/ directory of the npm package. The package provides a script to copy the extension to a fixed directory and attempt to open the extension management page:

$pkg = Join-Path $HOME '.dsh\profiles\desktop\node_modules\@shallbay\dsh-bridge-browser'
powershell -ExecutionPolicy Bypass -File "$pkg\scripts\setup-extension.ps1"

The script copies the extension to %USERPROFILE%\.dsh\browser-extension (older versions will automatically back up). Then in Chrome: Developer mode → Load unpacked → Select that directory. Do not load directly from the node_modules path, otherwise the extension may appear corrupted after profile switching or dependency reinstallation.

Starting with DSH Desktop 0.2.1, the application can be started with --port 0, meaning the port is randomized each time, preventing the extension from auto-discovering it. Add the following to the cordis.patch.yml of the corresponding profile:

- id: webserver
  name: "@deepseek-ai/dsh-host-webserver"
  config:
    host: '127.0.0.1'
    port: 19387

This package’s extension has included 19387 in its auto-discovery, so the “Bridge Address” inside the extension can be left blank. If the “Disable third-party plugins” recovery flow is triggered and rewrites the patch, this configuration needs to be added again.

Typical Usage

The README does not provide specific conversation examples; the actual workflow involves the agent calling the aforementioned browser_* tools after the plugin is installed and the extension is loaded in DSH. The common sequence is:

  1. Bind the tab to be operated using browser_list_tabs or browser_follow_tab.
  2. Get the numbered page structure via browser_snapshot.
  3. Call browser_click, browser_type, browser_navigate, etc. according to the task; use browser_wait when stable rendering is required.
  4. Local content or lazy-loaded areas can be supplemented using browser_get_text.

Protected pages (Extension Store, chrome://, etc.) can only have tab metadata read; DOM manipulation is not allowed. Chrome requires version 116+; Firefox requires version 140+ and manual configuration of ~/.dsh/ext-bridge-token (the Firefox extension UUID differs with every installation, making zero-configuration impossible).

Use Cases and Notes

Suitable for DSH users who need to perform page reading, form filling, and multi-tab collaboration within a local logged-in environment, such as internal backends, logged-in SaaS, or automation assistance requiring manual confirmation for sensitive operations.

The plugin runs with the privileges of the current dsh process. Before installation, please read the GitHub source code and the MIT license, and be aware of the upstream attribution (Lum1104/dsh-browser, author Yuxiang Lin). The DSH ecosystem emphasizes “everything is a plugin”; SkillHub is a community directory site and has no official affiliation with DeepSeek or High-Flyer.

Conclusion

@shallbay/dsh-bridge-browser connects the DSH tool interface to the Chrome tabs you are currently using, driving operations via text snapshots and numbered elements, while striving to preserve existing logins and sessions. Installation, extension loading, and port pinning (on Desktop 0.2.1+) are the three steps to getting started; details are subject to the repository README.

  • Directory Page: https://www.skillhub.cn/plugins/ShallBay/dsh-bridge-browser
  • GitHub: https://github.com/ShallBay/dsh-bridge-browser
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye