中文EN

dsh-computer-use

tools已测通过npmMIT

跨平台 Computer Use 插件:虚拟鼠标真人操作(screen_observe / computer_click / type / key / scroll / drag 共 11 个工具),AX 语义树零视觉成本 + GLM-4V-Flash 免费视觉兜底,安全护栏(快照 TTL / 应用白名单 / 危险操作审批 / 密码框保护)。

下载量 / Downloads
5,596
依赖体积 / node_modules
8.3 MB
测试时间 / Tested
2026-11-06
DSH 版本 / Version
0.2.2-rc.1

安装

dsh plugin --profile web add dsh-computer-use

沙箱测试结果

阶段结果
1 安装✓
2 列装✓
3 挂载✓
4 启动—

四阶段在隔离沙箱里跑:安装(有网)→ 列装 → 挂载 → 启动(后三步断网)。

README

dsh-computer-use

让 DeepSeek Harness 像人一样操作桌面。 观察屏幕、定位界面元素、移动独立虚拟光标、点击、输入、滚动和拖拽。
Give DeepSeek Harness a safe, observable Computer Use layer. Observe desktop applications, locate UI elements, and act through an isolated virtual cursor.

![CI](https://github.com/988hj7tczd-oss/dsh-computer-use/actions/workflows/ci.yml)

![npm version](https://www.npmjs.com/package/dsh-computer-use)

![npm downloads](https://www.npmjs.com/package/dsh-computer-use)

![GitHub stars](https://github.com/988hj7tczd-oss/dsh-computer-use)

![License](LICENSE)

![Node.js](https://nodejs.org/)

![Platforms](#platform-support--平台支持)

真实演示 · Real demo: a local, non-sensitive page was observed, filled, clicked, and verified through the Computer Use action loop.

中文文档 · English documentation

  • [中文文档](#中文文档)
  • [English Documentation](#english-documentation)

生态入口 · Ecosystem

入口 · 作用 · Link

harness-desktop · 开箱即用的 DeepSeek Harness 桌面客户端 · Ready-to-use desktop client · 下载 / Download

AI House · 发现 AI 工具、模型和 Agent · Discover AI tools and agents · 工具中心 / Tools

npm · 安装和查看包信息 · Install and inspect the package · dsh-computer-use

awesome-dsh-plugin · 发现更多 DeepSeek Harness 插件 · Discover more plugins · Plugin list

Gitee 镜像 · 国内访问入口 · China mirror · Gitee


中文文档

这是什么?

dsh-computer-use 是 DeepSeek Harness 的跨平台 Computer Use 插件,为 AI Agent 增加一套可观察、可约束、可验证的桌面操作能力。

它不是传统的鼠标宏:Agent 必须先观察目标窗口,再基于新鲜快照执行动作。点击、双击和右键操作通过 cua-driver 的独立虚拟光标完成,用户可以看到操作过程,而不是让程序悄悄发送一串不可见事件。

适合用于:

  • 让 DeepSeek Harness 操作原生 macOS、Windows 和 Linux 桌面应用;
  • 操作 Electron、Canvas 或游戏等 Accessibility/AX 信息不完整的界面;
  • 构建“打开应用 → 观察 → 点击 → 输入 → 再观察验证”的 Agent 闭环;
  • 为桌面自动化、内部工具和个人工作流增加可审计的 Computer Use 执行层;
  • 研究 Computer Use、视觉定位和安全护栏。
本项目是开源社区插件,不是 DeepSeek 官方产品,也不代表 DeepSeek 的官方立场。

为什么需要它?

普通文本 Agent 可以生成答案,但无法直接完成很多桌面任务。dsh-computer-use 把桌面交互拆成三个阶段:

观察 Observation → 决策 Decision → 受约束执行 Guarded Action
flowchart LR
    A[DeepSeek Harness Agent] --> B[dsh-computer-use]
    B --> C[安全护栏 Guard]
    C --> D[AX / UIA 界面树]
    C --> E[虚拟光标与键盘]
    D --> F[cua-driver]
    E --> F
    F --> G[桌面应用 Desktop Apps]

核心原则:

1. 先观察,再操作:没有新鲜观察快照时,动作会被拒绝;

2. 模型所见即所点:元素编号和坐标来自同一窗口截图空间;

3. 语义优先:优先使用 element 编号,坐标模式保留视觉操作自由度;

4. 失败关闭:目标不明确、快照过期、应用不在白名单时不继续执行。

能力一览

能力 · 说明

屏幕观察 · 读取目标窗口元数据、Accessibility/AX/UIA 元素和坐标

三种观察模式 · ax 零视觉 Token、native 主模型直读图片、vision 视觉观察者

独立虚拟光标 · 点击、双击、右键会显示虚拟光标移动和操作过程,不抢用户真实鼠标

文本与快捷键 · 输入文本、发送 return、cmd+c、ctrl+shift+p 等按键

滚动与拖拽 · 支持上下左右滚动和窗口本地截图坐标拖拽

应用管理 · 列出运行中的应用,后台启动应用,按需前置窗口

安全护栏 · 快照 TTL、应用白名单、危险操作审批、密码框保护

跨平台 · macOS 已验证;Windows/Linux 需按真实环境完成平台验收

12 个模型工具

工具 · 作用 · 主要参数

screen_observe · 获取窗口、AX/UIA 元素、坐标或截图 · window, mode, query, maxElements

screen_zoom · 截取并放大窗口局部区域 · window_id, pid, x1, y1, x2, y2

computer_click · 点击元素或截图坐标 · element 或 x,y,可选 count

computer_double_click · 双击元素或坐标 · element 或 x,y

computer_right_click · 右键点击元素或坐标 · element 或 x,y

computer_type · 向焦点或指定元素输入文本 · text, 可选 element

computer_key · 发送按键或快捷键 · key,例如 return、cmd+c

computer_scroll · 在目标窗口滚动 · direction, amount, 可选 element

computer_drag · 拖拽窗口中的区域 · from_x, from_y, to_x, to_y

computer_wait · 等待界面加载或动画完成 · ms,最大 60000

app_list · 列出正在运行的应用 · 无

app_launch · 启动应用 · name 或 bundle_id,可选 bring_to_front

快速开始

方式一:使用 harness-desktop

普通桌面用户建议先下载 harness-desktop。它是一个开箱即用的 DeepSeek Harness 桌面客户端,支持 macOS、Windows 和 Linux。

1. 下载并启动 harness-desktop
2. 完成首启配置
3. 安装本插件
4. 重启 harness-desktop
5. 在对话中让 Agent 操作桌面

方式二:从 GitHub 源码安装

git clone https://github.com/988hj7tczd-oss/dsh-computer-use.git
cd dsh-computer-use

# 先预演,不写入配置
./install.sh --dry-run

# 安装到用户级 patch 层
./install.sh

# 安装后重启 harness-desktop

安装脚本只做两件事:

1. 将插件链接到 $DSH_HOME/profiles/web/node_modules/dsh-computer-use;

2. 在 $DSH_HOME/cordis.patch.yml 注册插件。

脚本使用用户级 patch 层,不修改项目代码,也不修改其他 profile 的配置。

Windows / Linux

install.sh 默认使用 macOS 的 DSH_HOME 路径。Windows 或 Linux 用户请先指定自己的 DSH home:

export DSH_HOME="/path/to/your/dsh-home"
./install.sh --dry-run
./install.sh

如果系统不支持符号链接,请使用宿主 DSH 的插件管理方式,或按照 docs/store-evidence.md 中的手动安装说明操作。

方式三:npm 包

npm install -g dsh-computer-use

安装后仍需要让 DSH profile 加载该 bundle,并确认 cua-driver 已经安装且在 PATH 中,或设置:

export CUA_DRIVER_BIN=/path/to/cua-driver

在 Windows 官方安装器布局中,插件还会自动探测

%USERPROFILE%\\.cua-driver\\packages\\current\\cua-driver.exe;GUI 宿主的 PATH 不完整时无需手工把目录加入 PATH。

安装完成后重启宿主,再通过 app_list 或 screen_observe 验证工具是否出现。

第一个完整任务

安装并授权后,可以让 Agent 执行下面的任务:

请完成以下桌面任务:

1. 使用 app_list 列出正在运行的应用;
2. 使用 app_launch 打开一个普通桌面应用;
3. 使用 screen_observe 观察目标窗口;
4. 找到目标按钮,优先使用 element 编号点击;
5. 使用 computer_type 输入一段非敏感测试文本;
6. 再次使用 screen_observe 验证文本已经出现;
7. 如果界面发生变化,请重新观察,不要使用旧元素编号继续操作;
8. 如果动作被安全护栏拒绝,请报告拒绝原因,不要绕过护栏。

推荐的操作循环

app_list / app_launch
        ↓
screen_observe
   

…(truncated)

以上内容来自 npm 上的 README,我们只做格式化,不改内容。

版本

npm 上共发布:3,最后更新 2026-09-10

链接

GitHub · Homepage · npm

同类插件