Introduction¶
The Agent in DeepSeek Harness (DSH) runs by default in a local process. It can perform text-based reasoning but cannot operate the desktop or a browser. Developers often need to combine it with external scripts, resulting in fragmented workflows that are hard to reuse.
dsh-control is a DSH plugin that provides two layers of capability within the DSH process: a desktop layer and a browser layer. The desktop layer uses PowerShell + Win32 to implement screenshots, mouse and keyboard input, and window management. The browser layer launches a standalone Edge/Chrome instance via the Chrome DevTools Protocol (CDP) and drives page elements using CSS selectors. The Agent can call these tools directly without switching to external programs.
What Is This¶
- Name: dsh-control
- Maintainer: Jinquan-Leung
- Category: Web tool
- Stars: 0
- Description: Desktop and CDP browser control for DeepSeek Harness agents: screenshots, mouse, keyboard, windows, plus selector-based page driving.
- Problem Solved: Gives the Agent “eyes and hands” in a local environment to perform screenshots, clicks, typing, window operations, and page automation.
Core Features¶
The plugin provides two categories of tools:
Desktop Layer (PowerShell + Win32)¶
screenshot: Captures the entire virtual screen or a specified region and returns a PNG path.mouse: Absolute-coordinate movement, click, double-click, right-click, and scroll.keyboard:typeuses clipboard paste (safe for Chinese text);pressuses SendKeys (supports hotkeys such as^c,%{F4},{ENTER}).list_windows: Enumerates visible top-level windows, returning hwnd, PID, coordinates/dimensions, minimized state, and title.focus_window: Restores and brings a window to the front by hwnd (the system may deny focus switching).open: Opens a URL / file / directory with the Windows default handler.
Browser Layer (CDP)¶
browser_open: Launches the browser (if not already running) and navigates to a URL, waiting forreadyState === complete. Returns the final URL and title.browser_text: Reads theinnerTextof the entire page or a specified selector.browser_click: Dispatches real mouse events after centering the element, located byselector+index.browser_type: Focuses the element and usesInput.insertText(safe for Chinese text), with an optional Enter key submission.browser_wait: Polls until the selector matches, avoiding clicks on unrendered elements.browser_eval: Executes any expression within the page (supports iframe / shadow DOM fallback).browser_screenshot: Protocol-level screenshot (full page supported), returns a PNG path.browser_close: Closes the browser and session launched by this plugin.
Installation & Enablement¶
- Clone or download the repository into your DSH workspace:
git clone https://github.com/Jinquan-Leung/dsh-control.git
- In DSH, go to Settings → Plugins → Add Plugin and select that directory.
- Desktop control appears in the plugin list once it is active (refresh the page if necessary).
You can also install the same directory via plugin_manager’s install_bundle.
Typical Usage¶
Using the browser layer as an example: open a page, then read content via selectors, click elements, and type/submit.
- Open a page:
browser_open("https://example.com")
- Read text:
browser_text("#title")
- Click an element:
browser_click("#submit")
- Type content into an input field and submit:
browser_type("#input", "value")
browser_type("#input", "\n")
- Take a screenshot and save it:
browser_screenshot("page.png")
- Close the browser:
browser_close()
The desktop layer works similarly: first use screenshot to capture the current screen, then perform mouse and keyboard operations based on the coordinates.
Use Cases & Notes¶
- Suitable for: Scenarios where the Agent needs to perform screenshots, clicks, typing, window operations, or browser automation locally.
- Caution: All operations execute on the local machine with the Harness user’s permissions. It is recommended to review the source code and license (MIT) before installation.
- Security boundaries:
- Desktop tools produce real input events; a click at a given coordinate will deliver the event to whatever window happens to be at that coordinate at the time. It is recommended to use
screenshotfirst to read coordinates before acting. keyboardsends input only to the currently focused window. Usefocus_windowbefore typing.- The plugin does not access the network, does not report data, and does not write to the registry. Screenshots and temporary profiles are stored in
%TEMP%\dsh-control\and can be deleted at any time. - Windows only (the desktop layer depends on PowerShell + Win32; the browser layer requires a local Edge or Chrome). Verified environment: Windows 11 + DSH
0.2.2-rc.5.
Summary¶
dsh-control integrates desktop operations and browser CDP control into the DSH plugin system, enabling the Agent to perform screenshots, clicks, typing, window management, and page automation in a local environment. For Agents that need to run multimodal or browser-automation tasks on Windows, this is a ready-to-use toolkit.
- Plugin homepage: https://www.skillhub.cn/plugins/Jinquan-Leung/dsh-control
- Source repository: https://github.com/Jinquan-Leung/dsh-control