Repository navigation
XYZLCU 0.6.1: window-locked background mode
XYZLCU 0.6.1 — window-locked background mode: the agent works inside one app window while you keep using the Mac. The pointer never moves and the app is never activated.
Highlights (English): xyzlcu lock --app Safari [--window-title T | --window-id N] (or --background, XYZLCU_BACKGROUND=1, the MCP lock tool / background: true). After that, screenshot / ax / find / click / click-el / type / key / scroll act only on that window. Coordinates are window-relative and every result has a route field plus cursorMoved / frontmostChanged. Routes: window-only ScreenCaptureKit screenshots (covered windows too); clicks via Accessibility (focus / press / select / show menu), then posted to the process; typing via AX, then process keys; ⌘ combos via the matching menu item; Esc / Return via the dialog's Cancel / default button; scrolling via the scroll bar. drag / move / activate are refused (exit 6) unless --allow-foreground. Tested on TextEdit, Finder and Safari, with the honest limits documented: App Nap delays in background apps, document menu items disabled in the background, posted mouse events ignored by Safari web content, no drag, no minimized windows. Also: screenshot -o alias, content-first ax --compact, panel routing for key / type --app. Download xyzlcu-macos-universal.zip (Apple Silicon + Intel). Docs: Background / window-locked mode.
SHA-256 (xyzlcu-macos-universal.zip): 9fdf2f5eeefa9b4e4b21d84f89e797dbd19cea4a6f76676b34ecd3e5e2dfee9e
XYZLCU 0.6.1:锁定窗口的后台模式
xyzlcu lock --app Safari 之后,智能体只在这一个窗口里操作,你照常用电脑:鼠标不动、应用不被激活。
实测(目标窗口被别的应用挡住,鼠标和前台应用全程没变):
| 应用 | 操作 | 路线 | 耗时 |
|---|---|---|---|
| 文本编辑 | 点文本区 / 输入 / 回车 | ax-focus / ax-selected-text / pid-keys |
14 / 10 / 2–3 毫秒 |
| 文本编辑 | 打开面板里按 Esc | ax-press-cancel |
232 毫秒 |
| 访达 | 切换列表显示 / 点搜索 / 输入 | ax-press / ax-press / ax-selected-text |
131 / 104 / 33 毫秒 |
| Safari | 点地址栏 / 输入网址 / 回车 | ax-focus / ax-selected-text / pid-keys |
171 / 15 / 3 毫秒 |
| Safari | 点链接 / 滚动 / 截窗口 | ax-press / ax-scrollbar / sck-window |
7 / 5 / 约 68 毫秒 |
限制(如实写明)
- 后台应用会被 App Nap 节流:发给后台文本编辑的 ⌘S 有时几秒后才生效,请读回核对,或用
--allow-foreground。 - 作用于文稿的菜单项在后台时常常不可用(如 Safari「关闭标签页」)。
- Safari 网页不理直接投递的鼠标点击和滚轮,所以辅助功能路线优先;
ax-focus不会把光标放到点击位置。 - 悬停才出现的控件、拖放、最小化窗口、其他桌面上的窗口不支持。
其他
screenshot -o等同--out;以-开头的输出路径报错。key/type --app在有别的进程托管的打开 / 存储面板时发给面板进程。ax --compact先列内容区,跳过滚出可视范围的控件(访达 183 → 43 行)。- 修复:
record --duration/--no-moves被当成输出路径;按 id 找窗口时误报已关闭。