@agent-sh/computer-use-linux 0.7.7 → 0.7.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -222,13 +222,45 @@ You will still need `ydotoold` running and AT-SPI enabled (run `computer-use-lin
|
|
|
222
222
|
|
|
223
223
|
The binary speaks the `rmcp` 2024-11-05 stdio protocol. Pass `mcp` as the only argument; everything else is configured through MCP tool calls.
|
|
224
224
|
|
|
225
|
+
### Claude Code and Codex plugin
|
|
226
|
+
|
|
227
|
+
This repo is a plugin marketplace for both Claude Code and Codex. The plugin
|
|
228
|
+
registers the MCP server and ships the `computer-use-linux` skill. On first
|
|
229
|
+
start it downloads the release binaries pinned to the plugin version, checks
|
|
230
|
+
each against its published `.sha256`, and caches them under
|
|
231
|
+
`~/.cache/computer-use-linux/plugin/`. It needs `curl` or `wget`, and nothing
|
|
232
|
+
else is installed.
|
|
233
|
+
|
|
234
|
+
Claude Code:
|
|
235
|
+
|
|
236
|
+
```bash
|
|
237
|
+
claude plugin marketplace add agent-sh/computer-use-linux
|
|
238
|
+
claude plugin install computer-use-linux@computer-use-linux
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
Codex CLI:
|
|
242
|
+
|
|
243
|
+
```bash
|
|
244
|
+
codex plugin marketplace add agent-sh/computer-use-linux
|
|
245
|
+
codex plugin add computer-use-linux@computer-use-linux
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
Start a new session afterwards. To run your own build instead of the pinned
|
|
249
|
+
release, set `COMPUTER_USE_LINUX_BIN` to its path in the host's environment.
|
|
250
|
+
System setup (`computer-use-linux setup`, `setup-window-targeting`, ydotoold)
|
|
251
|
+
still applies; ask the agent to run the `doctor` tool to see what is missing.
|
|
252
|
+
Codex passes only a short allowlist of environment variables to MCP servers,
|
|
253
|
+
so the Codex manifest forwards the desktop session variables and the
|
|
254
|
+
`COMPUTER_USE_LINUX_*` settings below explicitly. Codex Desktop's Linux build
|
|
255
|
+
already bundles Computer Use; do not install both there.
|
|
256
|
+
|
|
225
257
|
### Codex Desktop (Linux build)
|
|
226
258
|
|
|
227
259
|
The Linux build of Codex Desktop already bundles this binary as a plugin. You don't need to wire it up manually — the plugin definition lives in [`codex-desktop-linux`](https://github.com/avifenesh/codex-desktop-linux) under its `plugins/` directory and is enabled by default. To upgrade the plugin in place, replace the binary it ships with the one from this repo's release assets.
|
|
228
260
|
|
|
229
261
|
### Claude Code (CLI)
|
|
230
262
|
|
|
231
|
-
|
|
263
|
+
The plugin above is the simplest route. To wire a binary you installed yourself, use the `claude mcp add` command to register the binary as a stdio MCP server. Pick a scope:
|
|
232
264
|
|
|
233
265
|
- `--scope user` — available across all projects for your user.
|
|
234
266
|
- `--scope project` — written to `.mcp.json` at the project root for team sharing.
|
|
@@ -407,12 +439,13 @@ files.
|
|
|
407
439
|
|
|
408
440
|
## Architecture
|
|
409
441
|
|
|
410
|
-
- **Accessibility tree** — [`atspi`](https://crates.io/crates/atspi) crate (tokio backend) talks to the AT-SPI registry on the user session bus. The tree is flattened to `(role, name, text, states, bounds)` tuples and indexed; element indices are stable for the duration of a `get_app_state` snapshot.
|
|
442
|
+
- **Accessibility tree** — [`atspi`](https://crates.io/crates/atspi) crate (tokio backend) talks to the AT-SPI registry on the user session bus. The tree is flattened to `(role, name, text, states, bounds)` tuples and indexed; element indices are stable for the duration of a `get_app_state` snapshot. A new snapshot is published only between input operations. `click`, `scroll`, `perform_action`, and `set_value` hold the input lock while they check and resolve an index, so a checked element cannot turn into another app's node mid-action.
|
|
411
443
|
- **DBus where desktops expose it** — [`zbus`](https://crates.io/crates/zbus) for portal calls (`org.freedesktop.portal.Screenshot`, `…RemoteDesktop`, `…ScreenCast`), GNOME Shell screenshots (`org.gnome.Shell.Screenshot`), the bundled GNOME extension's `dev.avifenesh.ComputerUseLinux.WindowControl` service, and temporary KWin scripting.
|
|
412
444
|
- **MCP transport** — [`rmcp`](https://crates.io/crates/rmcp) with the `transport-io` feature; stdio framing, no network.
|
|
413
445
|
- **Input fallback** — on X11, keyboard input prefers `xdotool`/XTEST and falls back only when xdotool cannot launch. On Wayland, literal text uses `wtype` when installed and the remote-desktop portal is unavailable; `wtype` supports Unicode through the virtual-keyboard protocol on compatible compositors such as Hyprland/wlroots. If wtype is unavailable, the binary falls back to a compatible ydotool 1.0.3+ CLI and `ydotoold` socket. A launched wtype failure is returned without replaying the text. `install.sh` can configure `ydotoold`; the `setup` command only enables the GNOME AT-SPI bridge.
|
|
414
446
|
- **Native X11 coordinate clicks** — eligible native X11 sessions use one supervised `xdotool mousemove -- X Y click --repeat N BUTTON` command for left, middle, and right clicks; ydotool is used only when xdotool cannot launch, while a launched nonzero xdotool command is reported as an error without replay. `COMPUTER_USE_LINUX_FORCE_YDOTOOL_POINTER=1` skips this xdotool path.
|
|
415
447
|
- **Native X11 scroll.** The same sessions send one `xdotool` command, `mousemove -- X Y click --delay 12 --repeat N BUTTON` when a point is set, or `click` alone when it is not. Buttons are 4 up, 5 down, 6 left, and 7 right, and `N` is the same notch count ydotool would pass to `mousemove --wheel` (five per page). ydotool's absolute move warps through (0, 0); GTK 3 then drops the single following wheel event because re-entry resets its XI2 scroll valuators. XTEST has no scroll valuators, so GTK takes the button path. A missing xdotool falls back to ydotool; a launched nonzero xdotool command does not. `COMPUTER_USE_LINUX_FORCE_YDOTOOL_POINTER=1` skips this path. Wayland portal scroll is unchanged.
|
|
448
|
+
- **Native X11 transport.** Native X11 queries (window origins, root screenshots, `doctor`) connect and read replies under one shared 2-second deadline enforced in the transport itself, including the handshake and every reply. A stalled X server closes the query connection instead of leaving a blocked worker behind. Unix sockets, literal IP addresses, and `localhost` need no resolver. A remote hostname in `DISPLAY` needs `getent ahosts` for bounded name resolution; if it is missing or fails, the X11 route is reported as unavailable.
|
|
416
449
|
- **Window registry** — `list_windows`, `focused_window`, `activate_window`, `press_key`, and `type_text` share a backend registry. It tries GNOME extension, GNOME Introspect, COSMIC helper, KWin scripting, Hyprland `hyprctl`, the niri IPC socket, i3 IPC, and generic X11/EWMH in that order, skipping empty or failed backends so another compositor backend can answer.
|
|
417
450
|
- **niri backend** — prefers `niri msg`, falling back to direct JSON IPC over the same session socket. `is_minimized` maps to `hidden`. Bounds use `layout.window_size` (or `tile_size`) and, when available, the tile position plus the window's offset and the output's logical origin. Uniform output scaling converts these to device pixels; unknown or mixed scaling omits bounds. Missing window positions stay `null`, so listing and focusing still work without enabling coordinate targeting. An accepted focus action is verified by querying the focused window again.
|
|
418
451
|
- **GNOME extension fallback** — recent GNOME builds deny `org.gnome.Shell.Introspect.GetWindows` to non-blessed clients. The bundled Shell extension exposes window data and exact activation under `dev.avifenesh.ComputerUseLinux.WindowControl`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-sh/computer-use-linux",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.8",
|
|
4
4
|
"description": "Linux desktop-control MCP server: AT-SPI accessibility trees, Wayland/X11 input, screenshots, and compositor window targeting.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -7,7 +7,7 @@ export interface GeneratedMcpToolDefinition {
|
|
|
7
7
|
annotations: Record<string, unknown>;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
export const GENERATED_SERVER_VERSION = "0.7.
|
|
10
|
+
export const GENERATED_SERVER_VERSION = "0.7.8";
|
|
11
11
|
export const GENERATED_TOOL_CATALOG_HASH = "24c86d5a758f000674ea2a44d843779d7af28f75d57ce8c401bb01215a61d9fc";
|
|
12
12
|
export const GENERATED_SHELL_TOOL_CATALOG_HASH = "08ebd9d8ed7177921c880a99ca5ce13ab1fcad6c88bec61dff93019a84fabcd2";
|
|
13
13
|
export const GENERATED_MCP_TOOLS =
|
|
@@ -26,6 +26,21 @@ Do not use this for remote browsers, websites, or headless automation when a bro
|
|
|
26
26
|
|
|
27
27
|
Pick the install that matches how you will run this skill. You can use both.
|
|
28
28
|
|
|
29
|
+
### Claude Code or Codex plugin
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
claude plugin marketplace add agent-sh/computer-use-linux
|
|
33
|
+
claude plugin install computer-use-linux@computer-use-linux
|
|
34
|
+
# or, in Codex:
|
|
35
|
+
codex plugin marketplace add agent-sh/computer-use-linux
|
|
36
|
+
codex plugin add computer-use-linux@computer-use-linux
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
The plugin registers the MCP server and downloads the pinned, sha256-verified
|
|
40
|
+
release binaries on first start. It does not put `computer-use-linux` on
|
|
41
|
+
`PATH`; shell commands in this skill need the CLI install below. Set
|
|
42
|
+
`COMPUTER_USE_LINUX_BIN` to run a local build instead.
|
|
43
|
+
|
|
29
44
|
### Pi native tools
|
|
30
45
|
|
|
31
46
|
```bash
|