dsh-computer-use: Implementing Codex-style Windows desktop manipulation on DeepSeek Harness

Introduction

In DeepSeek Harness (DSH), the common paths for building agents involve connecting to MCP, writing custom tools, or letting the model handle only text and APIs. If you want the model to click windows, read interfaces, and type on the keyboard like a human, you often need to set up a separate desktop automation runtime and define the “Observe—Action—Observe again” protocol yourself.

dsh-computer-use turns this into a pure DSH plugin: aimed at Windows 10/11 interactive sessions, it uses window-level UI Automation, screenshots that tolerate occlusion, and SendInput for input injection. It exposes five model tools and executes them via a built-in, long-running PowerShell helper. The interface references the tool surface of OpenAI Codex Windows Computer Use (listing apps, getting window state, clicking/keying/typing, etc.), but relies on no third-party runtime or MCP. It is maintained by GitHub user esch30636, categorized as “Workflow” in the SkillHub directory; the source code is hosted at esch30636/dsh-computer-use, and the license is MIT (the package version in the materials is 1.1.0).

What is this

In short: dsh-computer-use is a Windows-only (os: win32) DSH plugin that provides the computer_* toolchain within a Harness session, allowing the model to manipulate the local GUI following a “first observe window state, then execute a single action (or a limited-step sequence)” pattern.

Runtime requirements include: Windows 10/11, an interactive user session (not a service session), PowerShell 5.1 (powershell.exe, pwsh 7 not required); DSH 0.2.x, and the profile in use must mount tools, systemPrompt, and attachments (the official base includes all three by default). The plugin has no native modules, no npm business dependencies, and no MCP server.

Core Features

Five Model Tools

Tool Function
computer_list_windows Lists aimable top-level windows (including window_id, process, title, rectangle, foreground/minimized, and whether blocked by policy); optionally lists applications launchable from the Start Menu.
computer_observe Captures the state of a specific window: includes a screenshot by default, with optional UI Automation tree and element indices, focus, selection, and document text; returns a state_id and screenshot coordinate mapping.
computer_action Executes exactly one action on a specific state_id: click/double-click/right-click/middle-click/move/type/key/scroll/drag/set_value/wait/activate_window, etc.
computer_launch_app Launches an application by exe path, exe name, Start Menu display name, .lnk, or shell:AppsFolder\<AUMID>, and reports the opened windows.
computer_sequence Executes up to 100 sequential input steps (absolute screen pixel coordinates) on the same window without needing to re-observe in between, suitable for repetitive GUI operations; optionally returns a verification screenshot.

The design follows the “Observe again after one action” workflow; key names adopt the X11-keysym style, aligning with the conventions in Codex documentation.

Screen Overlay and ESC Termination

While Computer Use is active, a full-screen status layer that is click-throughable is displayed: a “liquid glass” edge with a transparent center and sapphire-colored faded edges, a thin cyan border around the monitor, and a Dynamic Island-style status bar at the top center. The default text is “DeepSeek Harness is controlling your computer | Press ESC to terminate”. Pressing ESC immediately stops computer use, closes the overlay, and sends a stop signal (USER_ESCAPE) to the agent.

The plugin also comes with a system prompt fragment (workflow, hard refusals, confirmation policies) and the computer-use skill, containing a complete playbook.

Installation and Enablement

Package Name Note: There is an unrelated package named dsh-computer-use on npm. Do not use dsh plugin add dsh-computer-use to install this plugin; you should use the GitHub spec or the release archive URL.

Web / CLI Manageable Profiles

For profiles manageable by the dsh CLI (such as web, tui, headless, etc.), run the following in the terminal:

dsh plugin --profile web add github:esch30636/dsh-computer-use

If direct connection to GitHub is inconvenient, you can use the release archive (no git fetch required):

dsh plugin --profile web add "https://github.com/esch30636/dsh-computer-use/releases/latest/download/dsh-computer-use.tgz"

After installation, the plugin will enter that profile and enable the bundle; after restarting the host or waiting for HMR to recompose, computer_* tools will appear in new sessions.

Desktop Profile

The Desktop app retains the desktop profile, and dsh plugin --profile desktop will refuse execution. Optional paths include: installing from “Settings → Plugin Market” with one click once the plugin is listed in awesome-dsh-plugin; or downloading from releases, extracting, and running:

powershell -NoProfile -ExecutionPolicy Bypass -File scripts\install-release.ps1

You can use -Version v1.1.0 to pin the version, -Profile web to specify the profile, and -Verify for offline composition verification.

Offline / Manual Installation

After downloading and extracting the release:

powershell -NoProfile -ExecutionPolicy Bypass -File scripts\install.ps1 -Profile desktop

The installer copies the package to ~/.dsh/profiles/<profile>/node_modules/dsh-computer-use, writes dsh-computer-use into dsh.profile.bundles, and installs the skill to %USERPROFILE%\.agents\skills\computer-use. Uninstall example:

powershell -NoProfile -ExecutionPolicy Bypass -File scripts\install.ps1 -Profile desktop -Uninstall

Configuration Points

In the profile’s cordis.patch.yml, the corresponding row id is computer-use. An example snippet is as follows (only fields appearing in the materials are listed):

- id: computer-use
  config:
    blockedProcesses: [msedge.exe]
    screenshotMaxWidth: 1600
    screenshotMaxHeight: 1200
    maxElements: 600
    maxTreeDepth: 12
    idleTimeoutMs: 600000
    startupTimeoutMs: 90000
    requestTimeoutMs: 30000
    confirmRiskyActions: true
    warnWhenApprovalUnavailable: true
    allowWindowsKey: false
    allowTerminalAutomation: false
    keepScreenshots: false
    overlayEnabled: true
    overlayMessage: "DeepSeek Harness is controlling your computer | Press ESC to terminate"
    overlayIdleTimeoutMs: 90000
    overlayEdgeOpacity: 55

Brief description of common meanings: blockedProcesses / allowedProcesses (when non-empty, acts as a whitelist mode) control the processes that can be automated; screenshots and UIA trees have limits like screenshotMaxWidth/Height, maxElements, maxTreeDepth; confirmRiskyActions will go through ctx.approval before destructive or external operations; overlayEnabled and overlayMessage control the full-screen prompt and ESC termination behavior. See the repository README configuration table for more options.

Typical Usage Flow

The design in the materials is an explicit workflow, not a single magic command:

  1. Use computer_list_windows (optionally combined with computer_launch_app) to determine the target window_id.
  2. Use computer_observe to get the current state_id, screenshot, and clickable element indices.
  3. Use computer_action to execute one step (e.g., click with element_index or coordinates, type, key, scroll, etc.).
  4. computer_observe again, and decide the next step based on the new state.

For repetitive operations with fixed coordinates (such as filling forms in a drawing app), you can use computer_sequence to send up to 100 steps in batches on the same window, then observe at the end or rely on the optional verification screenshot.

Applicable Scenarios and Notes

Suitable for: Teams already developing Windows-side agents on DSH 0.2.x, needing model-driven local GUI (office clients, drawing, settings wizards, etc.) and able to accept the “Observe—Single-step Action—Observe” rhythm.

Important Notes:

  • The plugin runs with the current DSH process permissions; the windows it can click and inputs it can send are consistent with the logged-in user; please review the source code and MIT license yourself before installation.
  • Windows only; Linux/macOS profiles are not applicable.
  • Built-in policies will reject some high-risk processes and operations; you can tighten the scope via blockedProcesses, allowedProcesses, etc. confirmRiskyActions: true by default; when no approval channel is available, it may only warn and continue (see warnWhenApprovalUnavailable).
  • Pay attention to the full-screen overlay during control; press ESC to immediately regain control.

Conclusion

dsh-computer-use converges Windows desktop automation into a DSH plugin form: five computer_* tools, a PowerShell helper, configurable process policies, and a full-screen prompt with ESC termination. This facilitates reusing the Codex-style computer use protocol within Harness without spinning up a separate runtime.

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

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

Xiaoye