dsh-chrome: Drive Local Chrome with DSH

Preface

The plugin architecture of DeepSeek Harness (DSH) enables “everything is orchestrable.” When developing agents, you frequently encounter scenarios that require direct browser control, reading page content, or simulating user interactions. Writing scripts or using UI automation tools for each case is costly to develop, tedious to debug, and creates a disconnect from DSH’s orchestration flow. The dsh-chrome plugin bridges this gap by letting DSH directly operate your already-logged-in Chrome instance, turning browser capabilities into tool calls within DSH.

What Is This

dsh-chrome is a local Chrome control plugin developed by maintainer chendaleiQ, categorized as a “Network Tool.” It communicates with a Chrome extension via a local bridge process, encapsulating browser capabilities into 11 tool functions: check status, list tabs, accessibility snapshot, navigate, screenshot, fill forms, activate tabs, open/close tabs, and execute JS to read values. By default, the plugin only listens on 127.0.0.1, is not exposed externally, and write operations require DSH approval.

Core Features

The plugin provides the following 11 tools (all prefixed with chrome_*):

Tool Description
chrome_onboard Called when the extension is not connected; opens the folder to locate the extension directory and returns installation steps
chrome_status Checks bridge connectivity; recommended to call this first if other tools throw errors
chrome_tabs_list Retrieves the current tab list (bounded)
chrome_snapshot Accessibility snapshot; preferred over screenshots
chrome_screenshot Takes a screenshot and saves it to a file, returning the file path
chrome_fill Discovers selectors first, then fills values or clicks buttons (no eval, works on CSP pages)
chrome_tab_select Activates a tab by tab ID
chrome_tab_new Opens a new tab in the background, marked as owned
chrome_tab_close Closes a tab by tab ID
chrome_navigate Navigates; synchronously hard-rejects localhost/private IP ranges/non-http(s)
chrome_evaluate Read-only value retrieval within the page; oversized results are truncated

All outputs are bounded: snapshots and evaluations are truncated, and screenshots only return a file path.

Installation & Setup

Install via npm

dsh plugin --profile web add @chendaleiq/dsh-chrome

(Replace web with your DSH profile name, or simply run npm i @chendaleiq/dsh-chrome)

Install via GitHub

dsh plugin add github:chendaleiQ/dsh-chrome

Install from a Local Directory

Plugin page → Add plugin → Select the projects/dsh-chrome directory

Load the Chrome Extension

  1. Open chrome://extensions
  2. Enable Developer mode
  3. Click “Load unpacked extension”
  4. Select projects/dsh-chrome/extension/
  5. Look for DSH Chrome Connector

Verify Installation

cd projects/dsh-chrome
node scripts/setup.mjs          # Check environment + run unit tests + print config path
npm run verify                  # Wait for extension to come online, run tab.version + tab.list verification

Typical Usage

After installation, new DSH sessions will have 11 chrome_* tools available. Here are a few common scenarios:

Check Bridge Connectivity

chrome_status()

List Tabs

chrome_tabs_list()

Accessibility Snapshot

chrome_snapshot()

Screenshot and Save

chrome_screenshot()

The return value is a file path, saved by default to ~/.dsh/chrome/<session>/.

chrome_navigate({ url: 'https://example.com' })

The plugin synchronously hard-rejects non-http(s) schemes to prevent accidental access to sensitive addresses.

Fill a Form

chrome_fill({ selector: '#username', value: 'user' })

The plugin discovers selectors first, then fills values or clicks buttons. It does not rely on eval and works on CSP-protected pages.

Use Cases & Notes

This plugin is ideal for agent development scenarios that require direct browser control, page content reading, or user interaction simulation. It is read-only by default; write operations (such as navigate, fill, and tab operations) require DSH approval. Navigation to localhost/private IP ranges/non-http(s) is synchronously hard-rejected, providing a high level of security.

Before installing, it is recommended to review the source code and license. The plugin is open-sourced under MIT, with code hosted on GitHub: https://github.com/chendaleiQ/dsh-chrome.

Conclusion

dsh-chrome turns local Chrome capabilities into tools within DSH, enabling more direct browser interaction in agent development. For more details, see the plugin’s directory page and GitHub repository.

羽毛球分组比赛记分
小程序二维码

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

Xiaoye