qingying012/dsh-desktop-control ↗★ 0

dsh-desktop-control

DeepSeek Harness plugin: a desktop tool that screenshots the Windows screen and drives the mouse and keyboard. 仅限Windows用户,适合需要授权智能体操作本地桌面和执行自动化任务。

パッケージ
dsh-desktop-control
互換性
未検証
バージョン
0.1.0
ライセンス
MIT
最終更新
2026/10/22

同名パッケージの別リポジトリ

インストール

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:qingying012/dsh-desktop-control

ドキュメント

README 全文を読む ↗

dsh-desktop-control

A DeepSeek Harness plugin that gives the model a native desktop tool: screenshot the Windows screen, move/click the mouse, type text and key combos.

It wraps the battle-tested gui.ps1 script (screenshot + Win32 input) as a DSH plugin, so the model calls a typed tool instead of assembling PowerShell commands every time.

Windows only. The package ships its own assets/gui.ps1 (UTF-8 with BOM); it does not depend on a workspace script.

Actions

actionWhat it doesMain args
screenshotSave a PNG and return its absolute pathwindow / region / print
windowsList visible windows (HWND, PID, rect, title)—
clickMove and clickx y button count
moveMove the cursorx y
dragPress, move, releasex y x2 y2
scrollWheelx y amount
typePaste text via the clipboardtext
keyKey combo, e.g. ctrl+s, alt+f4key
activateBring a window to the frontwindow
posCursor position—
waitSleepwaitMs

All coordinates are physical pixels, matching the saved screenshot one-to-one (the script enables per-monitor DPI awareness v2).

Typical loop:

screenshot -> read_image -> click / type -> screenshot again

Install

Client (Electron): Plugins → + Add plugin, paste dsh-desktop-control, install, then Enable now.

CLI profile:

dsh plugin --profile web add dsh-desktop-control

Configure

- id: dsh-desktop-control
  name: dsh-desktop-control
  config:
    enabled: true
    powershellPath: powershell.exe
    timeoutMs: 30000
    screenshotDir: ''   # empty = $DSH_HOME/desktop-control
OptionDefaultMeaning
enabledtruefalse registers no tool
powershellPathpowershell.exePowerShell executable
timeoutMs30000Per-call timeout
screenshotDir$DSH_HOME/desktop-controlWhere screenshots are saved

Why a plugin instead of the pwsh tool

The DSH pwsh tool runs children at Low integrity, so SetCursorPos / SendInput are often refused and the old script needed danger-full-access per approval. This plugin spawns PowerShell from the host process, outside that sandbox, so input usually works without switching the permission preset.

Safety

  • Full desktop control: it can click anything and type anything, and screenshots enter the model context once you open them with read_image.
  • Do not enable it on an unattended machine.
  • UAC secure desktop, the lock screen, and some games/anti-cheat/terminal apps cannot be driven.

Self-test

npm run selftest

Pure argument-construction tests: no screenshot, no mouse movement.

Limitations

  • Windows only.
  • One action per call; each call spawns PowerShell (~300–600 ms).
  • Static screenshots; the cursor marker is not exposed by the tool.

License

MIT