rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
tmxtml/dsh-pc-operator
DeepSeek Harness plugins for Windows desktop control: screen_viewer returns screenshots as images, mouse_controller drives the real pointer with human-like motion and a task-aware top-right overlay (Ctrl+D+S+H stops takeover).
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:tmxtml/dsh-pc-operator
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
面向 DeepSeek Harness 的 Windows 桌面操控插件集:让模型直接「看屏幕」并「动手操作鼠标」。
包含两个独立的 DSH bundle:
| 插件 | 工具 | 作用 |
|---|---|---|
screen-viewer |
screen_viewer |
截取当前显示器,把 PNG 作为图片内容直接返回给模型(可画出鼠标指针) |
mouse-controller |
mouse_controller |
以接近真人的轨迹移动/点击/拖拽/滚轮真实鼠标,并在屏幕右上角常驻任务状态浮窗 |
csc.exe;仓库已附带编译好的 exe本仓库的每个子目录都是一个可安装的 DSH bundle(package.json 里声明了 dsh.bundle.patch)。
D:\code\dsh-plugins。screen-viewer 和 mouse-controller 两个目录并启用;
或者让 agent 执行 plugin_manager 的 install_bundle,目标为这两个目录的绝对路径。screen_viewer 与 mouse_controller 工具(Profile 内所有会话共享)。两个 bundle 可以单独安装:只装 screen-viewer 就只能截图,只装 mouse-controller 就只能操作鼠标。
{ "display": "primary", "max_width": 1600, "include_cursor": true }
display:primary(默认)/ cursor(指针所在显示器)/ all(整个虚拟桌面)monitor:从 0 开始的显示器序号,优先于 displaymax_width:480–3840,默认 1600,超宽会等比缩小include_cursor:默认 true,把真实指针画进截图每次调用都会新截一张图(独立进程),可与鼠标操作真正并行。截图临时 PNG 写入当前工作区的 TMP/ 目录(不可用时退回系统临时目录),读取后立即删除。截图同时会登记为该 agent 的“坐标检查”记录,用来满足 mouse_controller 的操作前置检查。
任务协议(让浮窗显示当前任务与进度):
{ "action": "start", "instruction": "把聊天窗口移到左上角并截图确认", "step": "移动到窗口标题栏", "step_index": 1, "step_total": 3 }
{ "action": "move", "x": 400, "y": 120 }
{ "action": "step", "step": "按住标题栏拖到左上角", "step_index": 2, "step_total": 3 }
{ "action": "click", "x": 400, "y": 120, "button": "left", "count": 1 }
{ "action": "drag", "from_x": 400, "from_y": 120, "to_x": 30, "to_y": 30 }
{ "action": "scroll","delta": -120, "times": 2 }
{ "action": "done" }
start 开始任务,浮窗显示「dsh鼠标接管中」+ 总指令 + 当前步骤;step 更新步骤;done 任务完成。move/click/drag/scroll 都不会让浮窗变回未操控;只有 done(或中止 stop / 热键)才显示「未操控」。start 时直接操作鼠标会自动生成一个隐式任务。status 返回任务、接管、浮窗和指针状态;stop 中止任务。每次指针操作(move / click / drag / scroll)之前必须先用 screen_viewer 截图确认坐标,操作完成后必须再次截图确认效果。 同一 agent 的成功截图才算数;别的会话/子代理的截图不算。
操作前,以下情况会被拒绝:
操作成功后,在再次调用 screen_viewer 确认效果之前:
start、step、done、stop 会被拒绝;status 仍可用。因此正常流程被强制为:screen_viewer → 定坐标 → mouse_controller 操作 → screen_viewer 确认效果(同时作为下一次操作的坐标检查)→ 下一次操作 → … → screen_viewer → done/stop。
stop):必须先有一次 60 秒内的截图,即使任务中还没执行过指针操作,也会强制要求先截图,确保当时的屏幕状态被记录下来。done / stop 都会返回任务进度报告:总指令、当前步骤(N/M)、任务内已执行的指针操作次数、任务耗时(秒)。如果没安装 screen-viewer,鼠标操作将全部被拒绝。
任务进行中,按住 Ctrl + D + S + H 会立即停止接管:浮窗切回「未操控」、当前手势中止、键盘钩子释放,之后工具拒绝操作,冷却 10 秒内不允许重新 start。
.
├── screen-viewer/ # 截图插件 bundle
│ ├── index.js # Host plugin:注册 screen_viewer
│ ├── cordis.patch.yml
│ ├── package.json
│ ├── locale/{en,zh}.json
│ ├── icon.svg
│ ├── docs/DETAIL.md
│ └── native/ScreenCapture.cs + build.bat + ScreenCapture.exe
└── mouse-controller/ # 鼠标插件 bundle
├── index.js # Host plugin:注册 mouse_controller
├── cordis.patch.yml
├── package.json
├── locale/{en,zh}.json
├── icon.svg
├── docs/DETAIL.md
└── native/MouseControl.cs + build.bat + MouseControl.exe
index.js 是纯 ESM Host 插件,只依赖 Node 内置模块,通过 ctx.tools.register 注册工具。SendInput 拟人轨迹、置顶浮窗、低级键盘钩子。cd screen-viewer\native
build.bat
cd ..\..\mouse-controller\native
build.bat
脚本会使用系统自带的 .NET Framework 编译器(C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe),无需安装 SDK。
mouse_controller 操作的是真实鼠标;浮窗常驻右上角(空闲时显示「未操控」),点击穿透、不抢焦点。start。CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。