DeepSeek Harness Chrome Browser Extension

Preface

The philosophy of DeepSeek Harness (DSH) is “Everything is a plugin.” When building models that require internet connectivity, two pain points are typically encountered: first, the invocation of Shell commands is strictly restricted; second, frequent permission approvals are required. The aurora-lucas/dsh-chrome-browser plugin provides a model-facing chrome tool. It directly drives Google Chrome installed on the machine via the Chrome DevTools Protocol (CDP), enabling the model to navigate, screenshot, inspect, and interact with real-rendered web pages without requiring shell or sandbox approval for every invocation.

Plugin Overview

Maintained by Aurora-Lucas and licensed under MIT, this plugin serves as a web connectivity tool. Essentially, it is a browser automation module within the DeepSeek Harness ecosystem. It runs within the Harness Host process, meaning it inherits the permission characteristics of the Host process.

Core Features

  1. Real Browser Driving: Directly operates the installed Google Chrome or Chromium, rather than a simulator.
  2. Real Rendering & Screenshots: Returns actual image screenshots and saves them as PNG files. The model sees the images in the streaming response, and humans can also open the saved files to view them.
  3. Content Acquisition: Supports fetching the outerHTML of DOM elements, the innerText of elements, and running JavaScript expressions.
  4. Debugging & Diagnostics: Allows viewing of console logs, uncaught exceptions, and network requests.
  5. Interaction Control: Supports simulating real input events such as mouse clicks and keyboard input.
  6. Permission & Sandbox Advantages: Runs inside the Host process, so invocations are treated as standard tool calls without requiring extra approvals; it is not restricted by shell sandboxes (e.g., it can bypass Landlock restrictions on Linux).

Installation and Activation

This plugin must be packaged via npm and installed into the Harness profile directory; it cannot be referenced directly as a link.

  1. Run the packaging command in the plugin directory:
    npm pack
  1. This generates a tarball file (e.g., local-dsh-chrome-browser-1.0.4.tgz).
  2. Use the Harness plugin manager (such as plugin_manager or action: install_bundle) to install the tarball, targeting the absolute path of the tarball.
  3. After installation, the Host will indicate restart-required. You must restart dsh web to load the new module.

Typical Usage

The tool defines a chrome action, distinguishing operation types via the action parameter. Page IDs (like p1) are generated by the open command. Subsequent operations can optionally specify a page; otherwise, the most recently opened page is used by default.

  • Open Page: chrome open url width height...
  • Page Navigation: chrome goto url page
  • Screenshot: chrome screenshot path... (saves PNG)
  • Get DOM: chrome dom selector (returns element outerHTML)
  • Get Text: chrome text selector (returns element innerText)
  • Run JS: chrome eval expression
  • Simulate Click: chrome click selector
  • Simulate Input: chrome type selector text
  • View Console: chrome console clear limit
  • View Network: chrome network clear limit

System Requirements & Configuration

  • Runtime Environment: Supports Linux, macOS, and Windows.
  • Dependencies: Requires Node.js 22+ and Google Chrome or Chromium (development is based on Chrome 155).
  • Fonts: If processing pages containing Chinese, CJK fonts (such as Noto CJK) must be installed; otherwise, Chinese characters will appear as empty boxes in screenshots.
  • Platform Differences:
    • Linux: Runs with --no-sandbox by default, as the Host process usually runs as root and restricted shells cannot launch Chrome.
    • Windows: --no-sandbox is disabled by default; console windows are closed, and taskkill is used to terminate the process tree.
    • macOS: Follows the Linux path, enabling --no-sandbox by default.

Use Cases & Notes

This plugin is suitable for scenarios where the model needs to directly manipulate real web pages, perform front-end debugging, or conduct automated testing. Since the plugin runs with the permissions of the current DSH process, the source code and license should be reviewed before installation. The plugin supports specifying the browser path via the environment variable DSH_CHROME_PATH or the configuration item chromePath; the auto-detection list includes mainstream installation paths.

Summary

This plugin introduces a real browser environment into DeepSeek Harness via the CDP protocol, allowing the model to operate web pages like a human while bypassing the sandbox restrictions of standard Shell calls. For more details, please refer to the GitHub Repository or the Plugin Directory Page.

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

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

Xiaoye