npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@a9i5k4/dsh-cua-pre

v0.4.2

Published

DSH 电脑控制插件(对齐 zcode-cua):无障碍树观察优先的桌面自动化 + 对话卡片/侧栏面板/设置页 + 分块裁切视觉识图,Python sidecar 执行原语。默认关闭,需在 ~/.dsh/cua-pre.json 显式启用。

Readme

dsh-cua-pre — Computer Use plugin for DeepSeek Harness / DSH 电脑控制插件

One command install / 一条命令安装(Windows PowerShell):

irm https://raw.githubusercontent.com/Aik358/dsh-cua-pre/main/install.ps1 | iex

Manual install / 手动安装:

cd ~\.dsh\profiles\web
pnpm add @a9i5k4/dsh-cua-pre
# append to dsh.profile.bundles in package.json / 在 package.json 的 dsh.profile.bundles 数组追加 "@a9i5k4/dsh-cua-pre"
# restart dsh web / 重启 dsh web(3080 由用户手动重启)

Enable / 启用(默认关闭,安全设计):write ~/.dsh/cua-pre.json / 写入 ~/.dsh/cua-pre.json

{ "enabled": true, "pythonExecutable": "C:/path/to/python.exe" }

Optional vision / 可选识图:"visionEnabled": true, "visionModel": "<your-vlm>",并安装 worker 依赖 / 并安装依赖:

git clone https://github.com/Aik358/dsh-cua-pre && cd dsh-cua-pre
python -m venv .venv && .venv\Scripts\pip install -r python\requirements.txt   # uiautomation + pillow

这是什么(中文)

把 ZCode Computer Use 的完整电脑控制面移植到 DeepSeek Harness 的自研插件。与内置 MCP 连接器逐层对齐:

  • 30 个同名工具get_app_state / left_click / type / key / screenshot / zoom / clipboard … 元素目标 {type:"element",state_id,index} 优先,坐标 {type:"coordinate",x,y} 兜底; strategy 路由 auto(无障碍命中优先) / a11y(fail-closed) / event(强制裸输入)
  • 安全语义:写后旧观察作废(superseded)+refresh 锁;timeout=可能已发生禁重放;stop_computer_control 持久 kill switch;UIA RuntimeId 漂移找回 + 矩形漂移校验防点错;TextPattern 精确选区
  • 呈现端:对话卡片(presentCall/presentResult,截图直接嵌卡片);侧栏「桌面」面板(实况操作流 + 画面帧墙 + vision 描述);独立设置页
  • 识图(vision):截图自动网格分块(≤768px/块),低分辨率模型(DeepSeek flash 类)也能读清屏幕; 全帧/分块两级缓存,增量只送变化块;经 attachments 服务持久化,子代理 VLM 多图提问
  • 治理:审计 JSONL 落盘可回放;pid 白名单(strict/宽松两档)即时生效

架构四层:client.js(浏览器半边) ← /api/dsh-cua-pre/* ← index.js(工具+状态机+路由) ← stdio sidecar → python/worker_cua_v2.py(UIA/SendInput/Pillow)

仅 Windows 10+。详细设计取舍见 docs/PROTOTYPE-NOTES.md

What it is (English)

A self-built computer-use plugin for DeepSeek Harness that mirrors the built-in zcode-cua MCP connector:

  • 30 same-named tools, element targets first (element/coordinate dual forms), auto/a11y/event strategy routing
  • Safety semantics: superseded observations after mutations, refresh locks, no-replay on timeout ("may have happened"), persistent kill switch, RuntimeId recovery + rect-drift checks, TextPattern selection
  • Presentation layer: chat cards (screenshots embedded), sidebar panel (live op feed + frame wall + vision descriptions), dedicated settings page
  • Vision: auto grid tiling (≤768px/tile) so low-res models read screens clearly; full-frame + per-tile caches with incremental describe; durable attachment refs; subagent VLM calls
  • Governance: JSONL audit trail, pid allowlist (strict/relaxed) with instant effect

Windows only. See docs/PROTOTYPE-NOTES.md for design trade-offs.

Tests / 测试

node scripts/test-v2-gate.mjs                          # unit: gate/session/frame/tiles
node scripts/test-v2-live.mjs .venv\Scripts\python.exe # live read-only chain, 22 asserts
node scripts/test-vision.mjs .venv\Scripts\python.exe  # vision pipeline w/ fake host services
node scripts/test-m4.mjs .venv\Scripts\python.exe      # card-image/cache/audit/allowlist, 17 asserts

All tests are strictly read-only on the desktop — no input injection is ever executed by tests.

License: MIT