Windows desktop computer-use tools (click, type, key, screenshot) with freshness checks, approval gating, process-identity verification around every action, and a sanitized audit trail.
Install
# from npm (prebuilt)
dsh plugin --profile web add dsh-click
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:PerryLink/dsh-click
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
dsh-click
Current version 0.3.34.
See the screen, then act — every mutating click is gated, every observation and action is audited.
Native desktop control for DeepSeek Harness (Windows first): an accessibility tree plus pixel hints let text-only models “see”, window-scoped click and input let them “act”, and approval, freshness, and process-identity checks sit in between.
Last verified on DeepSeek Harness dsh-v0.2.3-alpha.1 (2026-11-22).
Install · Configuration · FAQ · 简体中文 · English · Español · Português · हिन्दी
dsh plugin --profile <name> add dsh-click
Community plugin, not affiliated with DeepSeek. Canonical repository: https://github.com/PerryLink/dsh-click (Gitee is a mirror).
What it is
dsh-click gives the model a complete observe → act loop: screen_read returns a window’s accessibility tree (element ids, types, names, rectangles, supported patterns) plus pixel-location hints, or screen_shot captures an image; then click / type / scroll / key act on that same window by element id or coordinates. Every mutating action must cite a fresh observation (basedOn) — a changed screen or an expired observation is refused with a model-readable reason — and crosses ctx.approval by default, with the target process identity verified before and after. It does not steal foreground focus by default (focusFallback: never), and every observation and action lands as a sanitized dsh-click/observed / dsh-click/action audit event.
Three-step setup
Install (pick one channel):
# git channel (latest main; equivalent to git+https://github.com/PerryLink/dsh-click.git) dsh plugin --profile web add github:PerryLink/dsh-click # npm channel (published releases) dsh plugin --profile web add dsh-click # tarball channel: pnpm pack in this repo, then dsh plugin --profile web add ./dsh-click-<version>.tgzThe git channel’s
preparescript builds with production dependencies only.Minimal config (sane defaults; touch
autoApproveWindowsonly to exempt specific windows):- insert: - id: dsh-click name: dsh-click config: requireApproval: true autoApproveWindows: ['^Notepad'] focusFallback: neverVerify it mounts (after a restart):
dsh --profile web --dump-config | grep -A3 'id: dsh-click'Then ask the agent to look at a window and act — the approval prompt appears for every mutating action:
> Open Notepad, type "hello", then read back what is on screen.
Uninstall: dsh plugin --profile web remove dsh-click (or remove the row from the profile patch).
If pnpm reports
ERR_PNPM_IGNORED_BUILDSfor this package (esbuild’s harmless platform-binary validation), addallowBuilds: { esbuild: true }to yourpnpm-workspace.yaml— thedshCLI prints the exact snippet.
Every PerryLink plugin is listed in the built-in DSH Desktop market: Market → Sources → Add source → paste https://perrylink-dsh-catalog.perrylink.workers.dev/catalog-source.json → select. Installation still requires the market’s npm identity check and your confirmation.
Core capabilities
dsh-click splits the native desktop into an auditable observation face and action face:
screen_shot— captures a window (or the primary screen) and downscales it tomaxScreenshotSide. Window captures takePrintWindow(PW_RENDERFULLCONTENT)first, so they do not depend on other windows stacked on top;captureMethodreports the path that actually produced the pixels. With a vision-capable model the result carries the image; text-only models get a text description and keep working.screen_read— the structured observation: the accessibility tree (element ids, types, names, rectangles, supported patterns) plus pixel-location hints with colors — plain text, no image model required.screen_find— for applications that expose no accessibility tree, finds clickable text or a described visual target via optional OCR (ocr.*, tesseract probed at mount) or visual grounding, returning screen coordinates plus anobservationId; read-only, never needs approval.click/type/scroll/key— window-scoped actions addressed by element id or coordinates. Delivery prefers UIA invoke, falls back to posted window messages, and never steals foreground focus by default;typetakes the UIAValuePatternfast path and otherwise injects real keystrokes throughSendInput(CJK-safe);keyreports honestly when an app ignores posted input.app_list/app_launch— enumerate running applications and their visible windows (minimized windows carryminimized: trueand norect); launch one by name or executable path.
Every mutating action crosses one shared safety boundary:
- Freshness — the action must cite a
basedOnobservation; the window is re-captured right before acting, and the action is refused when the pixel hash (staleCheckPixels) or the accessibility tree (staleCheckTree) changed, or when the observation is older thanmaxObservationAgeMs. - Approval —
ctx.approvalgates every action by default;autoApproveWindowstitle/executable regexes can exempt specific windows (still freshness-checked, process-verified, and audited). - Process identity — the owning process’s pid and executable path are verified before and after the act; a mid-act swap refuses loudly (
PROCESS_CHANGED). - Audit — observations and actions land in the session log as
dsh-click/observed/dsh-click/actionevents (sanitized, log-only).
model harness
│ screen_read ──▶ observationId (+ elements, pixels) ← structured text
│ click {basedOn, target} ──▶ freshness check ──▶ approval ──▶ helper (UIA)
│ pixel hash changed? ── refuse + re-observe
│ pid/exe changed after act? ── PROCESS_CHANGED
│ ◀── canonical JSON + audit events (dsh-click/action)
Tool surface
| Tool | Read-only | Needs approval | Notes |
|---|---|---|---|
screen_shot |
✅ | — | Returns an observationId later actions cite in basedOn; image attachment when the model accepts images |
screen_read |
✅ | — | Accessibility tree + pixel hints; element ids are what actions address |
screen_find |
✅ | — | OCR/visual grounding when there is no UIA tree; returns coordinate targets + an observationId |
click |
✅ | Exactly one of elementId or (x, y); UIA invoke preferred, posted messages fallback |
|
type |
✅ | Value-pattern elements only; backs up and restores control text on failure | |
scroll |
✅ | Element (scroll pattern) or window (posted wheel) | |
key |
✅ | Posted key combinations ("Ctrl+S"); apps that ignore posted input refuse loudly |
|
app_list |
✅ | — | Running applications and their visible windows |
app_launch |
✅ | By name or executable path, with optional arguments |
Screenshots and coordinate space
- A target means a window capture; no target means the primary screen (
snapshot.windowId = 0,title = "primary screen"), not the foreground window. For the whole virtual desktop (multiple monitors, negative origins) passscope: "virtual"; that mode is marked experimental and its multi-monitor geometry is not fully verified yet. - Window captures try
PrintWindow(hwnd, hdc, PW_RENDERFULLCONTENT)first: the window paints itself, so the image does not depend on what is stacked on top. On failure or a blank frame the helper falls back toPrintWindow(0)and then toCopyFromScreen.captureMethod(printwindow-fullcontent/printwindow/copyfromscreen) says which path produced the image. width/heightare the bitmap size, not the window size: they are already downscaled tomaxScreenshotSide, whilesnapshot.rectis always the physical window (or screen) rectangle. Map withbitmapX = (screenX - rect.x) * width / rect.width.- Every rectangle is in physical pixels: DPI awareness is set when the helper starts (Per-Monitor V2), and
app_list,screen_read,screen_shot, andclickshare one coordinate space. - Minimized windows:
app_listmarks themminimized: trueand returns norect(Windows reports the-32000placeholder rect while iconified);screen_shot/screen_readfail withWINDOW_MINIMIZED, so restore the window first.
Examples

Animated replay of a real run recorded in this repository.
These are the plugin’s real entry points; install once, then call one.
Detailed example — command app_list, input:
{}
Output:
1 running application(s) with windows:
- Demo (pid 4242, C:\Apps\demo.exe)
- [windowId 1122867] "Demo App" at (10, 20) 800x600
Observed from plugins/dsh-click/tests/tools.spec.ts:159-185; renderer at src/tools.ts:933-942
Failure branch — input:
{}
Output:
Error: dsh-click backend unavailable on linux: Linux backend is reserved but not implemented yet (Windows-first); only Windows can act today
Observed from plugins/dsh-click/src/platform/selection.ts:61-62,81; plugins/dsh-click/src/tools.ts:133-136; plugins/dsh-click/tests/tools.spec.ts:226-245
Brief examples: screen_read · app_list
Configuration
All tunables are Schemastery Config fields (changeable from cordis.yml). An id-targeted override replaces the whole row — restate every key you need. cordis.patch.yml documents each key inline.
Most-used keys:
| Key | Default | Meaning |
|---|---|---|
requireApproval |
true |
Gate every mutating action behind approval; observers never ask |
autoApproveWindows |
[] |
Window-title/executable regexes that skip the approval ask (still freshness-checked, process-verified, and audited) |
focusFallback |
never |
Whether an action may bring the target window to the foreground as a last resort (never / allow) |
imageMode |
auto |
screen_shot rendering: auto (image when the model accepts images, text otherwise) or text |
staleCheckPixels |
true |
Compare a fresh pixel hash before every action and refuse on change |
staleCheckTree |
target |
Accessibility-tree freshness: target verifies the addressed element (default), strict refuses any changed node, off skips the tree hash (identity/age/pixel checks still apply) |
maxObservationAgeMs |
30000 |
Maximum age in ms of an observation an action may cite (1000..600000) |
auditSessionEvents |
true |
Whether to append dsh-click/observed / dsh-click/action audit events; set false to stop audit appends entirely |
| Key | Default | Meaning |
|---|---|---|
requireApproval |
true |
Gate every mutating action behind approval; observers never ask |
autoApproveWindows |
[] |
Window-title/executable regexes that skip the approval ask (still freshness-checked, process-verified, and audited) |
auditSessionEvents |
true |
Append dsh-click/observed / dsh-click/action session audit events. The adaptive gate already skips the append on envelope-less hosts (rc.6–rc.8, 0.1.1-rc.2, and 0.1.2-rc.1, which fails closed on unknown types at read); set false to stop audit appends entirely. 0.1.2-rc.1 (adapted 2026-09-02): the session envelope keeps its ignorable field for stored-log read compatibility only — Session.append still cannot stamp it, so audit-gate behavior is unchanged |
focusFallback |
never |
Whether an action may bring the target window to the foreground as a last resort (never / allow) |
imageMode |
auto |
screen_shot rendering: auto (image when the model accepts images, text otherwise) or text |
helperTimeoutMs |
30000 |
Per-helper-call timeout in ms (1..300000) |
maxHelperOutputBytes |
25165824 |
Cap on one helper response in bytes (1024..67108864) |
maxScreenshotSide |
2560 |
Longest screenshot side in pixels (320..7680); larger captures are downscaled |
staleCheckPixels |
true |
Compare a fresh pixel hash before every action and refuse on change |
staleCheckTree |
target |
Accessibility-tree freshness: target verifies the addressed element (default), strict refuses any changed node, off skips the whole-tree hash for windows with a ticking clock/cursor (identity/age/pixel checks still apply) |
maxObservationAgeMs |
30000 |
Maximum age in ms of an observation an action may cite (1000..600000) |
maxCachedObservations |
8 |
LRU cap on cached observations (1..64) |
maxElements |
500 |
Cap on accessibility elements per screen_read (1..2000) |
maxTreeDepth |
32 |
Maximum accessibility tree-walk depth (1..64) |
maxTextLength |
200 |
Truncation length for sanitized model-visible strings (16..10000) |
rollbackEnabled |
true |
Back up and restore control text when type fails |
ocr.enabled / command / language |
true / tesseract / eng |
Optional OCR for the screen_find path (probed at mount; degrades to unavailable when tesseract is absent) |
Example override in your profile patch:
- insert:
- id: dsh-click
name: dsh-click
config:
requireApproval: true
autoApproveWindows: ['^Notepad']
focusFallback: never
FAQ
A screen_shot image goes into the harness attachment store (content-addressed, under the host’s own attachment policy) and is provided to the model only through that tool result. Observations themselves stay in memory (bounded LRU, maxCachedObservations, lost on restart); beyond that the plugin writes nothing to disk, makes no network requests, and stores no credentials. The only session-log content is the dsh-click/* audit events, and window titles, executable paths, and free text are sanitized and length-capped before they are written or shown.
Nothing is silent. Both backends are reserved but unimplemented, so every call fails closed with a model-readable reason (dsh-click backend unavailable on linux: ...), and the profile still boots everywhere. On Windows, a missing subprocess service or an unavailable helper refuses the call loudly instead of pretending success.
It provides no service key and consumes only two optional seams (dsh-click/backend, dsh-click/grounding, for tests/embeddings); it registers no client slot, no webServer route, and no waterfall listener; every audit event sits in the dsh-click/* namespace. Each tool registration is wrapped in ctx.effect, so stop/hot-reload removes exactly the tools it registered.
Observations are produced on demand: screen_read only walks the accessibility tree (plain text), while screen_shot encodes a PNG. Every mutating action re-captures the target window once for the freshness comparison (pixel hash plus tree by default) — that is part of the safety boundary. Helper calls are bounded by helperTimeoutMs / maxHelperOutputBytes, and the observation cache keeps 8 entries by default.
Security boundaries
- Observe before act, every time. Actions must cite a fresh observation; a changed screen (pixel hash) or an expired observation is refused with a model-readable reason demanding re-observation.
- Approval is the default.
requireApproval: trueunless you explicitly exempt specific windows; every action — allowed or not — is audit-logged. - No foreground stealing. The helper never brings a target window to the foreground (
focusFallback: 'never'by default); input is delivered through UIA or posted messages so background windows are not disturbed.focusFallback: 'allow'is the only sanctioned exception. - Process identity is re-verified immediately before and after each action; a mid-act process swap fails the outcome (
PROCESS_CHANGED). - Sanitized output. Control characters are stripped, tabs collapse, credential-shaped values (keys, tokens, JWTs, bearer headers) are redacted before anything reaches the model or the log.
- Fail closed. Unsupported platforms, a missing subprocess service, or an unavailable helper refuse every call loudly — profiles keep booting everywhere.
Permissions & data
- Permissions: mutating actions cross the official
ctx.approvalseam — the plugin never re-implements or bypasses it.autoApproveWindowsonly ever skips the ask for specific windows; it cannot disable the freshness or process-identity checks. ThedshWorkshopmanifest declaresfs:read,subprocess:spawn,session:append,network:none,native-code:none. - Data: the plugin stores nothing on disk except the screenshots the attachment store keeps (content-addressed, under the harness’s own attachment policy). Observations are cached in memory (LRU, bounded). No network requests, no credential storage.
- Session log:
dsh-click/observedanddsh-click/actionare log-only audit events carrying sanitized window/process facts — titles, paths, and free text are redacted and length-capped before they are written or shown.
Known limitations
- Windows first. macOS and Linux backends are reserved; on those platforms every call fails closed with a clear reason.
- Text-only fidelity.
screen_readdepends on the application exposing UIAutomation; apps without an accessible tree yield pixel hints only, plus thescreen_findOCR/grounding path. Coordinate clicks remain available. - Posted-input apps. Some applications ignore posted window messages (games, some Electron surfaces);
keyreports this honestly instead of pretending success. Since 0.3.24 thetypeSendInputfallback covers real keyboard input and CJK text, but it is still bounded by the target app’s own input model. - Session audit on envelope-less harness builds. The audit events ride an adaptive gate: hosts that know the vocabulary append plainly, hosts with the
ignorableenvelope append with the marker, and envelope-less hosts —0.1.0-rc.6–0.1.0-rc.8,0.1.1-rc.2, and0.1.2-rc.1(which cannot stamp the ignorable marker — the envelope field is retained for stored-log read compatibility only — and fails closed on unknown types at read) — get no audit append; the tool results remain the reconstructable audit trail. SetauditSessionEvents: falseto stop audit appends entirely.
Interoperability with other DSH plugins
dsh-click exposes a tool surface only and does not join other plugins’ seams:
- Two hard services only.
inject = ['tools', 'subprocess']; it provides no service key, so it cannot collide on one. - No client or HTTP resources. It registers no client slot, no
webServerroute, and noagent/pre-step/tools/post-executewaterfall listener, and mutates no globals. - Namespaced audit. It writes only
dsh-click/observedanddsh-click/action; when a host does not know the vocabulary the adaptive gate skips them, and the tool results remain the reconstructable audit trail. - Optional seams degrade.
dsh-click/backendanddsh-click/groundingexist for tests/embeddings only; real deployments fall through to platform selection and require no other plugin. - Registrations are effects. Every
ctx.tools.registeris wrapped inctx.effect, so stop/hot-reload removes exactly the tools it registered.
Compatibility
| Surface | Status |
|---|---|
| Harness | DeepSeek Harness dsh-v0.2.2-rc.4 (GitHub tag, verified 2026-11-18). Verified 2026-11-18 against the dsh-v0.1.7-alpha.1 master checkout (full gate chain + profile install smoke). engines.dsh: >=0.2.1-0 <0.3.0 || >=0.2.2-0 <0.3.0 |
| Node | ^22.19.0 || >=24.9.0 |
| Platforms | Windows first (UIAutomation + Win32 input, via a bundled PowerShell helper); macOS/Linux backends are reserved and fail closed with a clear reason |
| Model | Text-only models fully supported (screen_read returns structured text); vision models additionally get screen_shot images |
Ecosystem & quality
- Gitee mirror (sync mirror; GitHub is canonical)
- dshfind plugin page (installs and ranking)
- OpenSSF Scorecard report (driven by .github/workflows/scorecard.yml)
- dsh-plugin-doctor verification report (K10–K13 all
pass) - DSH Market (listed)
- 1024 store channel:
npm i -g dsh1024once, thendsh1024 plugin --profile web add dsh-click(counts toward the deepseek1024.com install ranking) - Ecosystem knowledge base — measured data, not marketing: plugin development guide · plugin-selection data · maintenance criteria
Development
pnpm install # node ^22.19 || >=24
pnpm run typecheck # tsc: src + tests against the local harness checkout
pnpm run typecheck:ci # tsc against the published host types (no paths)
pnpm test # vitest: 79 tests, 13 files (helper smoke runs on Windows)
pnpm run build # tsdown bundle + tsc declarations (lib/)
pnpm run verify:self-contained # dependency specs resolve from the registry
pnpm run verify:artifacts # built ESM face + native helper present
pnpm run check:readmes # five-language README consistency
pnpm pack # the published tarball
The README images are generated programmatically by scripts/gen-readme-assets.py (Python + Pillow) and are safe to re-run: python scripts/gen-readme-assets.py.
Topics: dsh, dsh-plugin, deepseek-harness, deepseek, cordis, computer-use, windows-automation, uiautomation, desktop-control, screen-reader
Family & thanks
This project is part of the DeepSeek Harness plugin family from PerryLink (all Apache-2.0). If it is useful, a star helps the next person find it — nothing is gated behind it.
- Windows helper smoke checklist — real input/focus verification for 0.3.24+.
- @LIU12312-Source — real
SendInput/foreground-focus fallback for the Windows helper (PR #21). - @Mchsd — added the
auditSessionEventsopt-out for harnesses whose session reader rejects thedsh-clickaudit events (#2). - @PerryLink — creator and maintainer: tool surface, action safety boundary, Windows native helper, sanitizers, and the five-language docs.
License
LICENSE (Apache License 2.0) © 2026 dsh-click contributors
Links
More in this category
Tencent/WeKnora#dsh-weknora★ 38705
Four read-only tools over a WeKnora knowledge base: list knowledge bases, hybrid passage search, reassemble one document's chunks in order, and WeKnora's own cited RAG or ReAct-agent answer with a resumable session id.
DayuanJiang/next-ai-draw-io#dsh-plugin★ 37321
Draws draw.io diagrams in DeepSeek Harness through the next-ai-drawio MCP server: the link in the reply opens a live preview in the right sidebar, you can edit the diagram by hand, and each AI change is a version you can restore. Node.js 18+; npx downloads the MCP server on first use.
yikart/AiToEarn#dsh-plugin-aitoearn★ 28986
Generate copy, images and short videos, and publish with one click to Douyin, Kuaishou, Xiaohongshu, WeChat Official, Bilibili, Facebook, TikTok and more, covering the full content lifecycle from creation to publishing and monetization.
superdesigndev/treg★ 10137
Tool catalog for agents: search ~2,600 external endpoints (SEO and SERP, backlinks, social, people and company enrichment, ad libraries, scraping) by the task you want done, read each one's parameters and per-call price, then call it with the credential injected server-side. Ships the skill plus an MCP row that stays disabled until TREG_TOKEN is set.
T-Auto/dsh-ops★ 6125
Provides bash, PowerShell 7, and high-performance Rust tools for DSH on Windows to reduce token usage.
Hithink-Tech-Org/Financial-API#hithink-finance★ 4781
Query Hithink Finance data in DeepSeek Harness, view charts in chat, and save refreshable dashboards.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.