Skip to content

v0.6.0 — faster daemon queries, ax --compact (macOS computer-use CLI & MCP server)

Choose a tag to compare

@brandy2015 brandy2015 released this 01 Nov 01:11
· 17 commits to main since this release

XYZLCU 0.6.0 — fast, zero-dependency macOS computer-use CLI & MCP server for AI agents (Claude, Codex, ChatGPT, Grok, DeepSeek).

Highlights (English): the daemon keeps its own app table (apps 9.5 → 3.2 ms, ax 26.9 → 5.3 ms, find 20.6 → 7.9 ms); uncovered windows are cropped from the always-on display stream (first window screenshot 114 → 25 ms); new ax --compact + click-el --ref N for token-efficient accessibility-tree automation (Finder menu tree 13.7 KB → 0.4 KB; also in the MCP ax / click_element tools); --window-id; a stale daemon restarts itself after upgrade. Download xyzlcu-macos-universal.zip (Apple Silicon + Intel). Full English docs: README.


XYZLCU 0.6.0:守护进程查询更快,控件列表更省 token

0.5.0 和 0.6.0 两个守护进程同时跑、交替调用,每项 21 次,中位数(毫秒):

操作 0.5.0 0.6.0
apps 9.5 3.2
ax 文本编辑(焦点窗口) 26.9 5.3
ax Finder --menu 52.1 23.0
find 找到 / 找不到 20.6 / 26.9 7.9 / 12.9
窗口截图(流已开) 14.7–17.2 6.2–6.4
第一次截没被挡住的窗口 113.6 25.3
windows / --fast 3.4 / 8.9 3.3 / 8.9(没变)

新功能

  • 应用表:守护进程自己维护运行中的应用(通知更新,最多 10 秒整体刷新),不再每次逐个问 LaunchServices(这是 apps / find / ax 慢的主因)。
  • 控件树批量读:每个控件一次 IPC 取全部属性。
  • ax --compact:只列可操作的控件,一行一个、带编号和中心点;配合 click-el --ref N 按编号点。ax Finder --menu 13.7 KB → 0.4 KB。MCP ax 加 compact/menu/text/max,click_element 加 ref。
  • 窗口截图从主屏流裁:窗口没被挡住时直接裁主屏常驻流(method: "display-stream-crop",XYZLCU_WINDOW_CROP=0 关闭);新增 --window-id N(MCP window_id)。
  • 旧守护进程自动重启:升级后发现守护进程更旧就自动重启(需要当前进程有辅助功能 + 录屏权限;XYZLCU_AUTO_RESTART=0 关闭)。

修复

  • 版本不一致退回进程内执行时,batch 从标准输入读的脚本会丢失。
  • run / batch 里第二张 --stdout 图会悄悄覆盖第一张,现在明确报错。

没改的(实话)

  • 不开守护进程时约 13 毫秒的固定开销是加载 Swift 运行时和系统框架,代码里省不掉;用守护进程 + C 客户端(约 3 毫秒)。
  • --fast 已经是 GPU 直接出小图,约 9 毫秒,没变。
  • 被别的窗口挡住的窗口,第一次截图仍约 80 毫秒(裁出来会带上前面的窗口,所以不裁)。
  • 预热流保持 60 fps(空闲约 1.9% 单核、9.6 MB,只在最后一次截图后 10 分钟内)。

安装

下载 xyzlcu-macos-universal.zip(Apple Silicon + Intel,两个文件 xyzlcu 和 xyzlcu-core 放同一个目录),或者 ./build.sh --install。已在跑旧守护进程的话,第一次调用会自动重启它。

SHA-256: ff7a2a4cbd5ffda443bd259d0a2152d7baa6afda13057f02ad16d3c5810c948e