jev-desktop
它能做什么
让助手驱动桌面程序完成一个目标,例如打开文件夹或输入文字,同时让大部分屏幕数据不占用其上下文。适合自动化桌面应用的人。
适用场景
- ✓当你希望给桌面应用一个单一目标,并让助手朝这个目标努力时。
- ✓当完整的无障碍树会占用助手上下文中过多的空间时。
- ✓当你希望逐步批准,而不是批准整个计划时。
技能链接
https://github.com/NanmiCoder/cc-haha/blob/main/native/agent-desktop/skills/jev-desktop/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请在访达中为我打开“应用程序”文件夹。”
每周 5 个新技能,1 分钟读完。
工作原理
一个脚本会读取屏幕、选择一项操作及其目标,执行该操作,然后再次读取屏幕。它会重复这一过程,直到达成目标或停止,并为每一步输出一行结果。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
jev-desktop
This skill requires a clone of the agent-desktop repository (the scripts live in scripts/jev/ and ship in no installed package) and a TYPESAFE_API_KEY.
Two entry points over the same screen reading. run.mjs takes a goal and drives
until it is met. act.mjs takes one step and hands the plan back to you. Neither
puts the tree in your context.
The loop
node scripts/jev/run.mjs --app Finder "open the Applications folder"
node scripts/jev/run.mjs --app TextEdit --cursor --text "A line to write." "write the supplied sentence into the document"
Each turn reads the screen, asks for one operation and a target for that operation in the same request, carries it out, and reads again. It prints one JSON line per turn and one when it stops (shown trimmed).
{"turn":{"step":1,"operation":"CLICK","target":"treeitem \"Applications\"",
"confidence":1,"ok":true,"delivery":"delivered_verified","changed":true}}
{"stop":"done","confidence":0.96}
The operations are CLICK, TYPE_TEXT, CHECK, UNCHECK, EXPAND,
COLLAPSE, SCROLL, DRILL, WIDEN, WAIT, DONE and BLOCKED. Only the
ones something on screen can receive are offered: DRILL for a region that
reports it holds more, WIDEN only after a DRILL. SCROLL always scrolls
down. delivery is waited for WAIT and looked for DRILL and WIDEN.
The target is asked once per operation. click_target is chosen from the
elements that advertise Click, type_text_target from those that advertise
SetValue, and so on. Only the head matching the chosen operation is read, so a
target can never be incompatible with the verb that acts on it.
Looking is an operation. A window is read with --skeleton first, so a dense
document costs the same first look as a small panel. A region that was cut off
reports how much it holds, and DRILL pins it as the root for later turns.
WIDEN gives the whole window back.
CHECK and UNCHECK instead of a toggle. Both are idempotent: a box already
in the wanted state stays there.
You supply the text. Nothing here writes a value, so a run never puts a
string on screen that you did not choose. Pass --text once per value and they
are consumed in order, or pass a function as the text option and it is asked
for each field with that field's description. When there is no value left to
give, TYPE_TEXT is not offered at all, so the run stops rather than inventing
one.
Text goes in by whichever route the application accepts. A direct value
write (set-value) is one verified call. Only when the application refuses it
and the refusal says a retry is safe does the value go through the clipboard and
a cmd+v paste (macOS only). The clipboard is put back when the run ends, or
emptied if it held anything but text. One key press per character is never used:
it drops characters and loses capitals.
What leaves the machine. Every turn posts a description of the screen to the
decision endpoint (TypeSafe's api.typesafe.ai by default, or whatever
TYPESAFE_BASE_URL points at): each element's role, its accessible name or description, up
to sixty characters of the value it holds, its state, the window title, and the
recent actions, excluding supplied text and detailed execution evidence. That is enough to send the contents of a private document or a
filled form to the configured remote service. Secure text fields are already
withheld by agent-desktop and never reach the request. Pass --no-values to
either script to withhold what every other field holds as well; targeting gets
harder, because a value is often the only thing that tells two unnamed rows
apart. The default is to include values. run.mjs redacts explicit supplied
strings from action turns and later recent-action history, including when later
target names or execution evidence repeat them. Live screen descriptions remain
separate: if the application displays that text, its accessible name or field
value may still reach the remote service under the settings above. act.mjs
preserves its exact executable argv in stdout, so that field can include a
value supplied with --text; stdout may also contain accessible names and
element paths. Choose the endpoint and output destination with that exposure in
mind.
A step that is hard to undo is not taken quietly. An ordinary step needs 0.70 confidence in its target, one rated destructive (0.50 or more) needs 0.90, and below 0.55 nothing runs. When
常见问题
运行它需要什么?
需要克隆 agent-desktop 仓库,并设置 TYPESAFE_API_KEY,因为这些脚本不包含在已安装的软件包中。
我可以自己控制每一步吗?
可以。一个单独的脚本每次只执行一步,因此你可以自己掌握计划。
它能执行哪些操作?
操作包括点击、输入、勾选复选框、滚动、等待,以及在受阻时完成或停止。
详情
作者的原始描述
Drive a desktop application from one plain-language goal, or resolve one intent at a time, without ever reading the accessibility tree. Use when automating a desktop app and you want to keep a 150-element JSON tree out of your context. Hand `run.mjs` a whole goal and it observes, decides and acts until the goal is met; hand `act.mjs` a single step when you want to keep the plan yourself. Covers which element, which operation, when to look deeper, and when to stop. Needs a clone of the agent-desktop repository and a TYPESAFE_API_KEY.
repo: NanmiCoder/cc-haha
热度
- GitHub 星标
- 15k
- 排名
- #10918
- 许可证
- —
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
agent-desktop-ffi
15k帮助开发者直接从 Python、Swift、Node、Go 或 C++ 调用 agent-desktop 自动化库,无需为每个操作都启动命令行工具。
agent-desktop-linux
15k教你的智能体如何使用 agent-desktop 控制 Linux 桌面应用,包括在 X11 和 Wayland 上哪些功能可用,以及常见的首次运行问题修复方法。
agent-desktop-macos
15k教你的智能体如何自动化 Mac 应用,包括授予所需权限,以及处理菜单、对话框和 Chromium 或 Electron 应用。
agent-desktop-windows
15k教你的智能体如何自动化 Windows 应用,涵盖哪些功能可用、PowerShell 引号的用法、最小化窗口以及提权应用的限制。