dsh-agent-browser: DSH Model-Driven Browser Control Plugin

Preface

DeepSeek Harness (DSH) adopts a plugin-based architecture that allows capabilities to be enhanced through extensions. dsh-agent-browser is a plugin designed to let models directly control the browser panel in the right sidebar of DSH via tool calls. It provides capabilities to read page content, manipulate elements, navigate, switch viewport sizes, and capture viewport screenshots, enabling models to interact with web pages like humans.

Core Features

The plugin provides the following tools for browser control:

  • browser_tabs: List the browser tabs in the current session. Information includes id, title, url, loading status, failed status, verification status, mount status, and carrier information.
  • browser_read: Read the tab content. Supports mode: 'text' (default, reads visible text), mode: 'elements' (reads interactive elements), mode: 'html' (reads page HTML). Before reading, the failed status should be checked; failed pages return empty read results.
  • browser_act: Execute page actions. Supports click, type, press, scroll, select, reload, wait. The action target can be specified via ref (from elements mode) or a CSS selector. wait supports fixed delay or selector state waiting (visible, attached, hidden).
  • browser_screenshot: Capture the current viewport. Supports preset phone, tablet, desktop sizes, as well as custom sizes.
  • browser_navigate: Open a new tab or navigate to a specified URL.
  • browser_viewport: Switch the tab’s viewport size. Presets include auto, phone (390×844), tablet (834×1112), desktop (1280×800), and custom.
  • browser_close: Close the specified tab.
  • browser_eval: Run JavaScript in the page. This feature is disabled by default and requires enableEval: true to be configured for use.

Installation

The plugin can be obtained via:
- SkillHub directory: https://www.skillhub.cn/plugins/guanhaisen/dsh-agent-browser
- GitHub repository: https://github.com/guanhaisen/dsh-agent-browser

Typical Usage

The following is a typical tool call flow for automated browsing by the model:

browser_navigate { url: "https://example.com" }
browser_read { mode: "elements" }  // Get references to interactive elements
browser_act { action: "type", ref: "e1", text: "hello" }
browser_act { action: "click", ref: "e2" }
browser_read { mode: "text" }      // Confirm the changes
browser_screenshot { preset: "desktop" }
browser_viewport { preset: "phone" }
browser_close { tabId: "tab4" }

Notes

  • Platform Limitations: Only supported on desktop (using Electron <webview>). In the web configuration file, the sidebar browser uses <iframe>, which cannot read the DOM; related operations will return an explicit reason.
  • Configuration Requirements: The browser_eval feature is disabled by default and requires enableEval: true to be enabled in the configuration for use.
  • Status Fields: Tabs have four key status fields. mounted indicates the DOM is mounted and can be driven; loading indicates navigation is in progress; failed indicates loading failed (shows an error page); unverified indicates the renderer is unresponsive or the document is unreachable.
  • Screenshot Limitations: Screenshot operations will be rejected when the page is in failed or unverified status.
  • Wait Behavior: wait supports fixed delay or waiting based on selector state (visible/attached/hidden).
羽毛球分组比赛记分
小程序二维码

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

Xiaoye