Preface¶
DSH Browser Client is a tool that enables web page automation through a browser floating window. It addresses the same-origin policy restrictions commonly encountered when directly manipulating browser pages within the DSH environment. The tool runs in the user’s authenticated real browser and can directly leverage existing Cookies and SSO permissions.
Core Capabilities¶
The plugin provides a set of page operation tools and an exploration mode workflow. Page tools are used for single or batch operations on the current page, while exploration mode is used for complex tasks, generating workflows by learning through actions.
Page Operation Tools¶
| Tool Name | Function |
|---|---|
page_snapshot |
Get a structured snapshot of the page, including URL, title, visible text, and interactive element coordinates |
page_eval |
Execute arbitrary JavaScript code in the page MAIN world |
page_act |
Execute click, input, scroll, keyboard operations, or clear content |
page_navigate |
Jump, go back, go forward, or refresh the page |
page_wait |
Wait for a specific element to appear, the network to become idle, or a delay |
page_screenshot |
Capture the viewport, a specific element, or the full page |
page_network |
Read details of fetch/XHR requests made by the page (URL, method, status, response preview) |
Webpage Workflows and Exploration Mode¶
Designed for non-development users, it supports converting conversations into workflows that can be saved and re-run.
* Webpage Workflows: Generates workflows via the workflow_generate tool, supports page_record / page_highlight for demo recording, and the executor supports logic such as loops, branches, and approvals.
* Exploration Mode: Starts with explore_start, repeatedly uses explore_act to iterate, then validates with explore_check, and distills the successful path into a workflow.
Installation and Enablement¶
The installation process consists of DSH Host configuration and loading the browser extension.
1. Configure the DSH Host¶
Insert the cordis.patch.yml plugin into the DSH profile and restart DSH. After startup, the logs print the token and register the page tools listed above.
2. Load the Browser Extension¶
Open Chrome or a compatible browser, go to chrome://extensions, enable Developer Mode, select Load unpacked extension, and choose the browser-ext/extension directory.
Configuration and Usage¶
In the browser extension’s settings panel, fill in the Host address and Token. The Token location is usually $DSH_HOME/browser-client-token.
When using it, start a conversation in the floating window at the bottom right corner of any web page. For example, ask, “What does this page currently display?”, and DSH will call page_snapshot to retrieve the page data and answer.
Notes¶
- Tool Naming Convention: Tool names use underscores (e.g.,
page_snapshot) and do not contain dot characters (e.g.,page.snapshot). The Tencent intranet gateway rejects tool names containing dot characters. - Browser Compatibility: Chrome 151+ on macOS disables the
--load-extensioncommand-line loading method. The current plugin has been tested and works in 360Chrome (Chromium 132). Chrome users need to load the extension manually. - Validation Environment: Do not start or stop production instances (e.g., 3080). All validation should be performed through independently created instances on new ports.
- Permission Scope: The plugin runs with the permissions of the current DSH process. Check the source code and license before installation.
Ecosystem and Links¶
This plugin is maintained by flymysql and follows the MIT license. See the GitHub repository for details.