dsh-desktop
DSH host plugin: OS-level desktop control tools (screen OCR with coordinates, mouse click/drag, Unicode typing, key combos) so the model can operate the whole browser including the address bar, and any other window.
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Hyna-hla/dsh-desktop说明文档
阅读完整 README ↗dsh-desktop
宿主插件:操作系统级桌面控制工具,让模型操作整个浏览器(含地址栏/搜索栏)和任意窗口。
工具
| 工具 | 作用 |
|---|---|
desktop_ocr | 截屏 + Windows OCR,返回每个词的坐标框(定位用) |
desktop_screen | 虚拟屏幕尺寸与原点 |
desktop_click(x, y, button?, double?) | 移动鼠标并点击(左/右/中,可双击) |
desktop_drag(x1,y1,x2,y2) | 按住拖动 |
desktop_type(text) | Unicode 文本输入(支持中文) |
desktop_press(combo) | 组合键:ctrl+l 地址栏、enter、alt+tab、f5、ctrl+t… |
desktop_cursor | 当前光标位置 |
desktop_screenshot(path?) | 截屏存 PNG |
典型流程(打开网址):desktop_press "ctrl+l" → desktop_type "https://..." → desktop_press "enter";任意界面点击:desktop_ocr 找坐标 → desktop_click。
原理与边界
- 工具在宿主进程里 spawn
powershell.exe跑lib/desktop.ps1(Win32 SetCursorPos / mouse_event / SendInput + Windows 自带 OCR),完全不受 DSH 沙盒限制; - 与 Edge 扩展互补:扩展管网页内容,桌面层管浏览器框架和所有程序;
- 高权限操作:模型只有在收到你的指令时才调用这些工具;屏幕上的一切它都能看(OCR)、能动。
构建安装
pnpm install
pnpm build
.\scripts\install-to-profile.ps1 -Name dsh-desktop -SourceDir .
# 重启 DeepSeek Harness