Introduction

In the DeepSeek Harness (DSH) plugin ecosystem, extended capabilities are usually achieved by adding plugins with specific functions. For agents or scripts that need to run in a WSL (Windows Subsystem for Linux) environment, directly controlling Windows desktop applications is a common requirement. The dsh-wsl-wininput plugin addresses this pain point by allowing processes in WSL to manipulate the Windows UI through the UI Automation protocol.

Plugin Overview

dsh-wsl-wininput is a DeepSeek Harness plugin focused on sending input signals from a WSL environment to Windows windows. It mainly provides three operational capabilities: invoking UI Automation elements, sending key presses to a specified window, and clicking at specified coordinates. The plugin runs inside WSL and interacts with Windows by calling local PowerShell, without stealing focus from the current window.

Installation and Enablement

Installing the plugin requires using DSH’s plugin management command. To complete the installation, run the following command in a WSL terminal:

dsh plugin --profile web add github:173787247/dsh-wsl-wininput

After installation, you can invoke the win_invoke command provided by this plugin in DSH configurations or scripts.

Core Features

The plugin provides the following four core capabilities:

  1. Invoke UI Automation elements: Directly activate specific UI elements.
  2. Send keys to the selected window: Send text input to the target window.
  3. Send clicks to the selected window: Send mouse clicks to the target window.
  4. Target a specific window by PID: Precisely identify the target window using the process ID (PID).

Typical Usage

When using the win_invoke command, specify the concrete behavior with the action parameter and the target window’s process ID with the pid parameter.

1. Invoke a UI Element
When you need to click or activate a button, you must specify the element’s name and type. expectName is required.

win_invoke action=invoke pid=1234 expectName="Save" expectType=Button

2. Type Text into a Window
Type the specified string into the target window.

win_invoke action=type pid=1234 text="hello"

3. Click at Specified Coordinates in a Window
Use the x and y parameters to specify the click location.

win_invoke action=click pid=1234 x=100 y=40

Cautions

When using this plugin, note the following points to ensure operation accuracy:

  • Uniqueness of element matching: Elements are located by name, and the matching result must be unique. If no matching element is found (usually meaning the element has disappeared) or multiple matches are found (usually meaning the name is too broad), the operation will be rejected instead of attempting a best match.
  • Parameter dependencies: When using the invoke operation, expectName is required.
  • Stability of window traversal: Earlier versions attempted to locate elements using indices in the UI Automation tree, but testing found that during multiple traversals of live windows, index positions could change, causing incorrect operations. The current version removes dependence on indices and uses a more stable name-based matching approach.

Environment Requirements

The plugin has certain runtime environment requirements:

  • Operating system: Windows with WSL installed.
  • Runtime environment: DeepSeek Harness must run inside WSL.
  • Dependency path: PowerShell must be located under a standard path; the plugin will automatically locate PowerShell.

Conclusion

The dsh-wsl-wininput plugin provides basic Windows UI control capabilities for agents developed in WSL. By locating windows via PID and invoking UI Automation elements, developers can build more complex automation scripts. For more details, refer to the plugin catalog page or GitHub repository.