Yu-tao-Li/dsh-computer-use-win

Yu-tao-Li★ 2PowerShellLast synced: 2026-08-18

Open on GitHub

Windows computer use for DeepSeek Harness (dsh): MCP stdio server + PowerShell UIA backend, 22 desktop tools

README excerpt

English dsh-computer-use-win 给 DeepSeek Harness 装上 Windows 电脑操控能力 ——MCP stdio 服务器 + PowerShell/UIA 桌面引擎,22 个工具让 agent 能 看 (UIA 无障碍树、窗口裁剪截图、OCR 词框)也能 做 (鼠标、键盘、UIA 语义动作、窗口管理)真实的 Windows 桌面应用。 通过 DSH 内置的 @deepseek-ai/dsh-mcp-client 桥接, 不改 DSH 本体 ,零运行时依赖。 ① 文件资源管理器: find 定位 + 语义 invoke 选中文件(状态栏"选中 1 个项目") ② type text 写入真实文档(剪贴板路径, verifyValue 回读) ③ UWP 计算器: find 定位按钮 + 语义 Invoke 点击(25×4=100) 特性 - 文本优先的观察 ——UIA 无障碍树三视图( control / content / raw );按 name/automationId/类名/值找控件,不靠猜像素。元素 id 用 UIA RuntimeId(UI 刷新后仍稳定,过期报 stale 而非点错地方)。 - 三级截图链 —— PrintWindow (非前台窗口也能抓)→ WGC ( Windows.Graphics.Capture ,DirectComposition/被遮挡窗口)→ 屏幕区域兜底(带 occludedPossible 标记)。窗口裁剪 + 降采样 + imageScale/origin 坐标映射,PNG 30 分钟自动清理。 - 三条输入路径,诚实上报 ——语义(UIA pattern,不碰鼠标)/ 前台( SetCursorPos + SendInput + 剪贴板 / KEYEVENTF UNICODE )/ 后台(PostMessage 直进窗口消息队列,不抢前台;投递未验证,如实 verified:false ——Chromium/Electron/WinUI 会静默丢合成消息,工具会明说)。 - UIA 盲区 OCR 回退 —— Windows.Media.Ocr (csc 编译的 C WinRT 助手);返回文字 + 逐词屏幕坐标词框, query 命中后自动回查匹配词下的控件( ControlFromPoint )。 - 内置安全机制 - 坐标 homing ——观察后窗口被移动,点击自动补偿并回报 homed:{dx,dy} - 急停 failsafe ——物理鼠标停屏幕角落 500ms,所有输入被拒( EMERGENCY STOP ),只有人把鼠标移开才恢复 - identity guard ——按 windowTitle 操作时窗口 HWND/PID 变了就拒绝( identit…

View full README on GitHub →
Tools / Devcomputer-usedesktop-automationdsh-pluginmcpuiawindows

Category