适用于 Windows 的 DeepSeek Harness Computer Use 插件,支持 UIA、cua-driver 和可选 GLM 视觉。
安装
# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)
dsh plugin --profile web add github:qphotoai/dsh-computer-use-windows
装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本——pnpm 默认拦截,所以安装可能停在 ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED 或 ERR_PNPM_IGNORED_BUILDS;dsh 会打印出需要添加的确切键名,把它加进该 profile 的 pnpm-workspace.yaml 的 allowBuilds 下,重跑一次即可装上。放行构建本身就是一次信任判断:请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。
README
适用于 Windows 的 DeepSeek Harness Computer Use 插件。项目基于 988hj7tczd-oss/dsh-computer-use,使用 cua-driver 提供 UI Automation、独立 Agent 光标和窗口操作,并可选使用智谱 GLM 进行截图视觉识别。
环境要求
- Windows 11(当前实测系统:10.0.22000.2538,x86_64)
- DeepSeek Harness Web Profile
- Node.js 24.14.0(当前实测版本)
- cua-driver 0.21.0(当前实测版本)
本仓库仅适用于 Windows。
功能
| 工具 | 功能 |
|---|---|
screen_observe |
读取 Windows UIA 控件树和坐标;可选截图视觉识别 |
computer_click |
单击编号元素或窗口坐标 |
computer_double_click |
双击 |
computer_right_click |
右键 |
computer_type |
向最近观察的窗口输入文本 |
computer_key |
发送按键或快捷键 |
computer_scroll |
滚动 |
computer_drag |
拖拽 |
computer_wait |
等待界面变化 |
app_list |
列出运行中的应用 |
app_launch |
启动应用 |
安装
1. 安装并启动 cua-driver
按照 cua-driver 官方说明 安装。确认命令可用:
cua-driver --version
cua-driver doctor --json
如果程序不在 PATH,可设置:
$env:CUA_DRIVER_BIN = "C:\path\to\cua-driver.exe"
插件也会探测当前 Windows 安装器常用路径:
%LOCALAPPDATA%\Programs\Cua\cua-driver\bin\cua-driver.exe
启动守护进程:
cua-driver serve --socket "\.\pipe\cua-driver"
2. 加入 DSH Web Profile
仓库提供 Windows 原生安装脚本(推荐):
.\tools\install-windows.ps1
脚本会将插件链接到 Web Profile、写入 Profile 的 package.json,并验证 dsh-tools 只解析到 DSH 宿主的同一实例。完成后重启现有的 dsh web 宿主。
也可以手动接入。先将仓库克隆到本地:
git clone https://github.com/qphotoai/dsh-computer-use-windows.git
cd dsh-computer-use-windows
把插件链接到 Web Profile,并在 Profile 的 package.json 中加入:
{
"dependencies": {
"dsh-computer-use": "link:C:/你的路径/dsh-computer-use-windows"
},
"dsh": {
"profile": {
"bundles": ["dsh-computer-use"]
}
}
}
不要在 Profile 中单独安装 @deepseek-ai/dsh-tools。插件必须使用 DSH 宿主的同一模块实例,否则工具可能因调度器身份不同出现 undefined.prepare。
安装后验证:
$env:DSH_PROFILE_ROOT = "$HOME/.dsh/profiles/web"
node tools/verify-host-modules.mjs
输出中的 pluginPath 和 hostPath 必须相同。然后重启现有的 dsh web 宿主。
卸载:
.\tools\uninstall-windows.ps1
使用
先观察,再操作:
screen_observe(window="计算器", mode="ax")
computer_click(element=26)
window可传窗口标题子串或 PID。- 编号来自最近一次
screen_observe。 - 快照默认约 15 秒有效;过期后需要重新观察。
- 原生 Windows 应用优先使用
mode="ax"。 - Canvas、图片或 UIA 信息不足时使用
mode="vision"。
智谱视觉(可选)
申请智谱 API Key 后,通过环境变量配置:
$env:ZHIPU_API_KEY = "你的 Key"
也可以把 Key 单独保存到:
%USERPROFILE%\.zhipu-key
文件只放一行 Key,并限制为当前用户可读。不要将 Key 写入仓库。
调用:
screen_observe(window="目标窗口", mode="vision")
当前视觉实现调用智谱 GLM,不会自动调用聊天模型自身的视觉能力。视觉结果可能存在文字或坐标误识别,操作后应重新观察确认。
配置
cordis.patch.yml 默认配置:
- insert:
- id: dsh-computer-use
name: dsh-computer-use
config:
ttlMs: 15000
maxElements: 500
可配置:
config:
ttlMs: 15000
maxElements: 500
allowedApps: []
cursorTheme: com.dsh.computeruse.rainbow
allowedApps:允许操作的应用白名单;空数组表示不限制。cursorTheme:cua-driver 中已安装的 Agent 光标主题 ID;主题不存在时使用驱动默认光标。
仓库包含上游的 theme.lottie 和 tools/make_theme.py。光标主题的编译与安装方式以 cua-driver 官方文档为准。
开发
node --check index.js
Get-ChildItem lib -Filter *.js | ForEach-Object { node --check $_.FullName }
node --test test/*.test.js
$env:DSH_PROFILE_ROOT = "$HOME/.dsh/profiles/web"
node tools/verify-host-modules.mjs
来源与许可
- 上游项目:988hj7tczd-oss/dsh-computer-use
- Windows 版本:qphotoai/dsh-computer-use-windows
- License:MIT
链接
同类插件
Tencent/WeKnora#dsh-weknora★ 32683
把 WeKnora 知识库接入 dsh 的四个只读工具:列出知识库、混合检索原文片段、按顺序还原单篇文档,以及直接取用 WeKnora 自己带引用的 RAG 或 ReAct agent 回答(含可续聊的 session id)。
superdesigndev/treg★ 4865
给 Agent 的工具目录:按「要做的事」检索约 2,600 个外部接口(SEO 与 SERP、外链、社交、人物与公司信息补全、广告库、抓取),查看参数与单次调用价格后直接调用,凭据由服务端注入。附带技能,MCP 行在未设置 TREG_TOKEN 前保持禁用。
TencentCloudBase/CloudBase-AI-Toolkit#dsh-plugin★ 1134
把腾讯云 CloudBase 后端接入 DeepSeek Harness——在对话里搭好并部署全栈应用,查询结果渲染为表格卡片(分页、排序、导出 CSV),部署后可预览真实域名,并提供 CloudBase MCP 工具集(`mcp__cloudbase__*`),登录走 device-code 流程。
gitroomhq/postiz-agent#dsh-postiz★ 508
通过 MCP 将 DeepSeek Harness 连接到 Postiz:列出已连接的社交媒体渠道、获取各平台发帖规则,并向 X、LinkedIn、Instagram、Facebook、Threads、TikTok、YouTube、Reddit、Bluesky、Mastodon、Discord、Slack、Telegram 等平台排期、存草稿或发布帖子;附带 postiz 工作流技能。
EthanYoQ/Invoice-Downloader#dsh-invoice-downloader★ 502
面向 DeepSeek Harness 的本地 IMAP 发票下载、OCR 识别、归档与 Excel 报销汇总。
anysearch-team/anysearch-dsh★ 452
基于 AnySearch 的实时网页与垂直搜索插件,为 DeepSeek Harness 提供搜索工具。
社区评论
评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。