YUCONG-28/dsh-skills-plugins--plugins-dsh-computer-use ↗★ 0
dsh-computer-use
DSH Computer Use 插件:为 Agent 提供类似 Codex Computer Use 的 macOS 桌面操控能力——先观察再动作、动作后新鲜状态验证,含 TCC 权限检测、按应用授权、敏感动作一次性确认与陈旧状态拒绝。
AI Analysis
核心用途是赋能 Agent 进行自动化桌面操作。适合需要 AI 协助执行 macOS 系统级任务或跨软件交互的用户。
Install
This plugin has no verified bundle, or compatibility checks failed. Read the repository notes first. Read the full README ↗
README
Read the full README ↗配置(cordis.patch.yml 的 computer-use: config)
| 字段 | 默认 | 说明 |
|---|---|---|
enabled | true | 总开关 |
announceToAgent | true | 是否向模型通告本插件 |
observationTtlMs | 0 | observation 允许复用的生命周期(0=不过期,上限 24h) |
confirmationTtlMs | 60000 | 一次性确认 token 生命周期 |
actionTimeoutMs | 30000 | helper 单次调用硬超时 |
settleMs | 250 | 动作后重观察前的延迟 |
maxNodes / maxDepth | 300 / 24 | Accessibility 树遍历上限 |
screenshot.artifactRoot | computer-use | workspace 内截图目录 |
interaction.focusPolicy | preserve | preserve(默认不激活目标)| activate |
interaction.keyboardPolicy | preserve | 键盘是否先激活目标应用 |
interaction.pointerInputPolicy | targeted | targeted(定向指针)| deny(禁用坐标/滚动/拖拽) |
helper.path | '' | 显式外部 helper 可执行路径 |
allowAllApps | false | 向所有应用授予 read/control |
grants | [] | 精确 bundle-id 授权:[{bundleId, read, control}] |
使用示例
- 加载 Skill:
/computer-use - 列出应用:
computer_list_apps - 观察:
computer_observe({ pid: 42128, screenshot: true }) - 点击:
computer_click({ observationId: "obs-...", handle: "0.3.7" }) - 输入(敏感):
computer_confirm({ observationId, handle, action: "computer_type_text", reason: "在搜索框输入关键词" })→ 用返回的 token 执行computer_type_text - 验证:读动作返回的 diff 与新 observation;必要时截图交给视觉模型
配置补充说明
interaction.keyboardPolicy:preserve(默认):不激活目标应用,键盘事件定向投递(postToPid)——不干扰用户,但后台应用可能丢字符,适合只读/低交互场景;activate:键盘输入前激活目标应用,确认其为前台后用全局键盘(CGEventPost,逐字符 12ms 间隔)——可靠但会短暂抢焦点,适合真实输入任务。
- 语义输入优先:文本类输入建议优先
computer_set_value(AX value 整值写入,不受输入法/焦点影响,可写中文);键盘输入(computer_type_text)用于需要真实按键语义的场景,且应提供handle让插件先点击聚焦目标控件,并确保系统输入法为 ASCII(ABC/English)。