Skip to content

Commit c278cde

Browse files
committed
release: v0.4.1 — Hyprland targeted screenshot alignment and safe crop fallback
Targeted get_app_state screenshots crop to the resolved window and refuse the full-desktop fallback when bounds can't be resolved; Hyprland bounds are rebased against monitor origin and fractional scale so portal screenshot coordinates align on multi-monitor/scaled setups; Wayland is recognized via WAYLAND_DISPLAY when XDG_SESSION_TYPE is unset; focus verification allows up to 1s for workspace transitions. All from #48.
1 parent c99d9c7 commit c278cde

5 files changed

Lines changed: 21 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.4.1] - 2026-07-15
11+
12+
### Fixed
13+
- Targeted `get_app_state` screenshots now crop to the resolved target window,
14+
and refuse the full-desktop fallback when a target was requested but window
15+
bounds cannot be resolved or the window is entirely off-screen. (#48)
16+
- Hyprland window bounds are normalized against each window's monitor origin
17+
and fractional scale so portal screenshot coordinates align on
18+
multi-monitor and scaled (e.g. 1.8x/2.0x) setups. (#48)
19+
- Wayland sessions are recognized via `WAYLAND_DISPLAY` when
20+
`XDG_SESSION_TYPE` is unavailable, so the portal input fallback engages in
21+
environments that don't export the session type. (#48)
22+
- Window focus verification now allows up to one second for compositor
23+
workspace/focus transitions before reporting activation failure. (#48)
24+
1025
## [0.4.0] - 2026-07-15
1126

1227
### Added
@@ -327,7 +342,8 @@ pages; also bumps the MCP server's advertised version string to match.
327342
- Validated against GNOME 50.1 on Wayland (Ubuntu 25.10).
328343
- KDE / Sway / Hyprland untested — see README support matrix.
329344

330-
[Unreleased]: https://github.com/agent-sh/computer-use-linux/compare/v0.4.0...HEAD
345+
[Unreleased]: https://github.com/agent-sh/computer-use-linux/compare/v0.4.1...HEAD
346+
[0.4.1]: https://github.com/agent-sh/computer-use-linux/compare/v0.4.0...v0.4.1
331347
[0.4.0]: https://github.com/agent-sh/computer-use-linux/compare/v0.3.1...v0.4.0
332348
[0.3.1]: https://github.com/agent-sh/computer-use-linux/compare/v0.3.0...v0.3.1
333349
[0.3.0]: https://github.com/agent-sh/computer-use-linux/compare/v0.2.9...v0.3.0

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "computer-use-linux"
3-
version = "0.4.0"
3+
version = "0.4.1"
44
edition = "2021"
55
authors = ["Avi Fenesh <avifenesh@users.noreply.github.com>"]
66
license = "MIT"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@agent-sh/computer-use-linux",
3-
"version": "0.4.0",
3+
"version": "0.4.1",
44
"description": "Linux desktop-control MCP server: AT-SPI accessibility trees, Wayland/X11 input, screenshots, and compositor window targeting.",
55
"license": "MIT",
66
"type": "commonjs",

src/server.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1357,7 +1357,7 @@ impl ComputerUseLinux {
13571357
// The rmcp tool_handler macro only accepts a string literal here, so this
13581358
// can't be env!("CARGO_PKG_VERSION"); the MCP safety check (CI) fails the
13591359
// build if it drifts from the Cargo version.
1360-
version = "0.4.0",
1360+
version = "0.4.1",
13611361
instructions = "Begin every turn that uses Computer Use by calling get_app_state. If diagnostics report disabled GNOME accessibility, call setup_accessibility before asking the user to retry. Use list_windows/focused_window before targeted keyboard input. If diagnostics report windowing.can_list_windows=false on GNOME, call setup_window_targeting to install the optional GNOME Shell extension backend, then ask the user to log out and back in if the setup report says a shell reload is required. This Linux backend can capture size-bounded screenshots through GNOME Shell or XDG Desktop Portal, read AT-SPI trees with action/value metadata, invoke native AT-SPI actions, set AT-SPI values or editable text, list/focus compositor windows through registered Linux window backends when the session permits it, attach best-effort terminal tty/process metadata to terminal windows, send coordinate or element-targeted click/scroll/drag input through the Wayland remote desktop portal when available, and send layout-safe literal type_text through KDE clipboard integration on Plasma Wayland or through portal keysyms on other Wayland sessions before falling back to ydotool. Screenshot results include width/height for the returned image plus coordinate_width/coordinate_height and scale for desktop coordinate conversion; request more detail with max_width, max_height, max_bytes, format=jpeg, quality, or a smaller target/crop instead of relying on unbounded screenshots. Tools with readOnlyHint=false may mutate local desktop or application state; hosts should require approval for actions that can submit, delete, send, purchase, or overwrite data. For element-targeted actions, prefer element_index from the latest get_app_state result; click, perform_action, and set_value can also use semantic role/name/text/states selectors when the target is unique. type_text and press_key accept optional window_id, pid, app_id, wm_class, title, tty, terminal_pid, terminal_command, or terminal_cwd selectors and refuse targeted input if focus cannot be verified. After targeted keyboard input, results append focused-element feedback from AT-SPI (role, name, editable) and warn when no editable element holds focus — treat that warning as the input not landing. Screenshot, click, and input results warn when the target window or coordinate is partially or fully off-screen; use move_window/resize_window (GNOME Shell extension backend) to bring a window fully on-screen before retrying. scroll accepts the same window targeting and relative coordinates as click. get_app_state returns a compact readiness block by default; pass verbose=true for the full diagnostics dump. Electron apps expose no AT-SPI tree unless launched with --force-renderer-accessibility."
13621362
)]
13631363
impl ServerHandler for ComputerUseLinux {}

0 commit comments

Comments
 (0)