DeepSHPlugins
computer-user 專案預覽
GITHUB / COMMUNITY PROJECT

computer-user

工具與整合JavaScriptMIT

僅 Windows 的 DSH 電腦操作外掛:以 PowerShell + Win32 SendInput 實現 9 個工具,擷取虛擬螢幕並驅動滑鼠鍵盤;配合 picturereader 讓純文字模型在本地完成「截圖-分析-操作-驗證」閉環。

2 Starsjing-hy 更新時間 2026-08-27
訪問 GitHub 倉庫
computer-user 專案預覽

專案介紹

中文

僅 Windows 的 DSH 電腦操作外掛:以 PowerShell + Win32 SendInput 實現 9 個工具,擷取虛擬螢幕並驅動滑鼠鍵盤;配合 picturereader 讓純文字模型在本地完成「截圖-分析-操作-驗證」閉環。

English

Windows-only computer use for DeepSeek Harness: captures the virtual screen and drives mouse & keyboard through 9 tools built on PowerShell and Win32 SendInput; pairs with picturereader so text-only models can complete the screenshot-analyze-act-verify loop fully locally.

專案資訊與收錄訊號

快照 2026-09-11
作者 / 組織
jing-hy
倉庫
jing-hy/computer-user
GitHub Stars
2
Forks
1
開發語言
JavaScript
許可證
MIT
最近推送
2026-08-27
Manifest
資料中檢測到宣告

公開倉庫不自動等於可商用;許可證與當前相容性以原專案文件為準。Manifest 和資料評分不構成安裝安全認證。

資料評分

63/ 100
維護活躍
91
文件與實用資訊
85
生態關注度
23
安裝便捷訊號
100
專案宣告訊號
100

近 15 天仍在更新;README 含完整安裝與使用說明;關注度尚低(2)。

評分來自已有資料快照的五維模型,僅作瀏覽參考,不是實際使用評測或安全檢測結論。

安裝與使用

所有專案資料與許可均以對應 GitHub 倉庫為準。

dsh plugin --profile web add github:jing-hy/computer-user

複製命令不會自動執行。請先閱讀倉庫文件,確認環境要求與許可證。

專案截圖

倉庫 README

GitHub 原文

已儲存的倉庫文件快照;文件抓取時間未記錄,可能與上方目錄介紹處於不同版本。安裝前請核對當前倉庫說明。

儲存庫檔案保留原文,指令與授權文字不作自動改寫。

computer-user

Codex-style computer use for DeepSeek Harness (DSH): read the screen and drive the mouse & keyboard — screenshot → analyze with [picturereader] → click/type/keypress/scroll/ drag → verify. Windows only.

  • computer_screenshot captures the whole virtual screen (multi-monitor, DPI-aware) to a

PNG file and returns its path — feed it straight into picturereader's image_scan / image_ocr to "see" the screen with any text-only model.

  • 8 more computer_* tools operate the mouse & keyboard through bundled PowerShell +

Win32 SendInput (no native modules, no compilation, works in the DSH/EAC host process).

  • A settings card (「电脑操作 / Computer Use」) puts a mode dropdown up front —

disabled / read-only / manual approval (/computer) / automatic — with the rest collapsed under a default-closed 高级设置 / Advanced section.

  • Fully local — no external API calls: screenshot (PowerShell), analysis

(picturereader local scan/OCR), input (Win32 SendInput). Nothing leaves the machine. Read the workflow in skills/computer-use.md (locate the target window first, then OCR inside the window, then click once and verify).

  • Verified on DeepSeek Harness EAC desktop (same DSH host kernel as the web app).
中文说明见 README.zh.md。

Works with pure text-only models + picturereader

computer-user does not need a multimodal model or any external vision API. Any pure text-only LLM (e.g. DeepSeek V4 Flash) can drive the desktop end-to-end:

  • computer_screenshot dumps the screen to a local PNG (no vision needed to capture).
  • picturereader turns that PNG into structured text the text-only model can read:

image_scan (layout/colors/regions), image_ocr (real text), image_sample (texture), all local (Windows OCR / PaddleOCR / RapidOCR — no cloud).

  • The model "sees" via those descriptions, calls computer_click / computer_type /

… at the reported coordinates, then screenshots again to verify.

So the loop is: screenshot (computer-user) → understand (picturereader) → act (computer-user) → verify (both) — entirely with text tokens and zero external APIs. See skills/computer-use.md for the locate-window → in-window OCR → click-once workflow.

Tools

ToolWhat it does
computer_screenshotSave full virtual-screen PNG (region/scale optional) → {path,width,height,virtual_offset,scale}
computer_clickClick at [x,y] (click / right_click / double_click)
computer_typeType arbitrary UTF-16 text — CJK included — via SendInput Unicode
computer_keypressKey chord, e.g. ["ctrl","c"], ["alt","tab"]; letters/digits use virtual keys so shortcuts work
computer_scrollWheel scroll at [x,y]: up / down / left / right, clicks notches
computer_dragPress → interpolate → release, optional hold_keys
computer_move_mouseMove cursor without clicking
computer_waitSleep ms (let UI settle)
computer_get_cursor_positionRead current cursor [x,y]

Coordinates are pixels relative to the virtual-screen origin (all monitors combined; computer_screenshot returns it as virtual_offset). SetProcessDPIAware keeps coordinates aligned with physical pixels on scaled displays.

Install

npm install computer-user

or in the DSH profile:

dsh plugin --profile web add computer-user

Then restart DSH (or use the EAC settings → Plugins → Manage screen). The tools appear for any session; the settings card appears under Settings → Computer Use.

Pair with picturereader (recommended)

computer_screenshot → path
picturereader image_scan / image_ocr <path>   # look
computer_click / type / ...                   # act
computer_screenshot → image_compare           # verify

Settings card

The settings card (「电脑操作 / Computer Use」) uses the DSH settings-panel design language — bordered card groups, capsule buttons, 32px inputs, chevron selects, rotating-chevron disclosure — and guards scope.load() for hosts without a load surface (EAC desktop shells).

  • Mode dropdown at the top of the card:
  • disabled — every computer_* tool refuses.
  • readonly — only screenshot / cursor-read / wait are allowed.
  • manual — side-effecting tools need the session approved first via the /computer

slash command (one approval unlocks the session for later turns).

  • auto — the LLM freely calls all tools.
  • AI may change mode itself checkbox (below the dropdown, not in Advanced):

off by default; when on, the AI can switch modes via computer_set_mode — changes are written to the same settings namespace, so the dropdown stays in sync both ways.

  • 高级设置 / Advanced (collapsed by default): screenshot output dir, default scale,

typing interval, scroll units, Reject code-as-text output (output guard, default on), debug logging.

Output guard is a host-side filter on the LLM stream: if the model writes a fake tool-call / XML markup as *conversation text* (e.g. computer_click({…}) or <invoke …> typed out instead of a real call), that chunk is stripped and replaced with a one-time coaching note; outputting the exact same text a second time passes through unblocked. Turn it off in Advanced when you intentionally want code snippets in replies.

Safety

  • Locate the target window first (DPI-aware GetWindowRect — see

skills/computer-use.md); desktop icons/background confuse both OCR and clicks. Only work inside the target window.

  • Always computer_screenshot first and analyze it (picturereader) before acting.
  • Click once, screenshot to verify; never blind click repeatedly (many UIs toggle).
  • Use manual mode with the /computer command to keep a human in the loop.
  • If injected input is silently dropped, check security software (some AV suites filter

simulated input).

Verification & known limits

  • node --test unit suite: 39/39 green (tool registration, gates, arg validation,

output guard).

  • Real-machine safe-window smoke (throwaway window + cmd.exe, never the user's apps):

screenshot PNG correct; cursor read/move round-trip exact; typing hello 中文 123! read back verbatim; keypress Home/End navigation + insert verified (HEADzzzTAIL); double-click word selection, click-to-clear, drag selection all asserted via control state.

  • Headless integration: both computer_screenshot and computer_get_cursor_position

called successfully by the model inside a real dsh --profile headless session.

  • Headless real-scenario: model autonomously executed a 5-step task

(screenshot → image_scan → type "hello" → screenshot → image_ocr) inside dsh --profile headless, coordinating picturereader and computer-user tools. OCR confirmed the typed text appeared on screen.

  • Wheel verified: all 9 tools (screenshot / click / type / keypress / scroll / drag /

move_mouse / wait / get_cursor_position) fully end-to-end verified. Wheel scroll position changed and MouseWheel events fired correctly. Note: always-on-top IME toolbars (e.g. Sogou Input floating bar) or other overlay windows can absorb wheel events if the cursor lands on them — move the cursor to a clear area first (same as any cursor-based input).

  • EAC compatibility: loads side-by-side with picturereader in the same host; static scan of

all built-in plugins shows zero computer_* / computer-user namespace collisions.

Development

src/capture.ps1    DPI-aware multi-monitor screenshot (System.Drawing)
src/input.ps1      SendInput mouse/keyboard backend
src/ps.js          PowerShell runner (base64 JSON, timeout, abort)
src/tools.js       the 9 computer_* tool definitions + enabled/confirm gates
src/config.js      settings namespace schema
src/index.js       plugin entry (register tools + settings, hot reload)
client.js          Web settings card (ModuleLoader bundle, zh/en)
scripts/           real-machine smoke scripts (safe-window)
tests/             node:test unit tests

License

MIT

使用前核對

安裝步驟、相容版本與授權範圍以原專案當前文件為準。Stars 和評分是快照中的導航訊號。

安裝與排錯 · 專案問題反饋

同類專案