From d06bfe922245a5d721c0ddd3a532aad2dbd0cb78 Mon Sep 17 00:00:00 2001 From: Shawn Wang Date: Mon, 8 Sep 2025 11:39:08 +0800 Subject: [PATCH] chore: Bump xcap to 0.7.0 and update Cross.toml - bump `xcap` to 0.7.0 from 0.0.14 - improve some windows/wayland function - support android build - https://github.com/nashaofu/xcap/releases/tag/v0.7.0 - update Cross.toml - Added `pipewire-debian/pipewire-upstream` PPA - libegl1-mesa-dev, libgbm-dev, libpipewire-0.3-dev, libwayland-dev - updated w.title() calls to w.title().unwrap_or_default() Signed-off-by: Shawn Wang --- Cross.toml | 16 ++++++++++++++++ Dockerfile | 5 +++++ crates/goose-mcp/Cargo.toml | 2 +- crates/goose-mcp/src/developer/rmcp_developer.rs | 8 +++++--- 4 files changed, 27 insertions(+), 4 deletions(-) diff --git a/Cross.toml b/Cross.toml index eb9cc1906b7f..e7cd528775a0 100644 --- a/Cross.toml +++ b/Cross.toml @@ -8,12 +8,20 @@ pre-build = [ # Add the ARM64 architecture and install necessary dependencies "dpkg --add-architecture arm64", """\ + apt-get update && apt install -y software-properties-common && \ + add-apt-repository -y ppa:pipewire-debian/pipewire-upstream + """, + """\ apt-get update --fix-missing && apt-get install -y \ curl \ unzip \ pkg-config \ libssl-dev:arm64 \ libdbus-1-dev:arm64 \ + libegl1-mesa-dev:arm64 \ + libgbm-dev:arm64 \ + libpipewire-0.3-dev:arm64 \ + libwayland-dev:arm64 \ libxcb1-dev:arm64 \ gcc-10 """ @@ -22,6 +30,10 @@ pre-build = [ [target.x86_64-unknown-linux-gnu] xargo = false pre-build = [ + """\ + apt-get update && apt install -y software-properties-common && \ + add-apt-repository -y ppa:pipewire-debian/pipewire-upstream + """, """\ apt-get update && apt-get install -y \ curl \ @@ -29,6 +41,10 @@ pre-build = [ pkg-config \ libssl-dev \ libdbus-1-dev \ + libegl1-mesa-dev \ + libgbm-dev \ + libpipewire-0.3-dev \ + libwayland-dev \ libxcb1-dev \ gcc-10 """ diff --git a/Dockerfile b/Dockerfile index 5500caf03954..b93091878b77 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,6 +14,11 @@ RUN apt-get update && \ libdbus-1-dev \ protobuf-compiler \ libprotobuf-dev \ + clang libclang-dev \ + libegl1-mesa-dev \ + libgbm-dev \ + libpipewire-0.3-dev \ + libwayland-dev \ ca-certificates \ && rm -rf /var/lib/apt/lists/* diff --git a/crates/goose-mcp/Cargo.toml b/crates/goose-mcp/Cargo.toml index 2c42e53c2580..bda55d92db14 100644 --- a/crates/goose-mcp/Cargo.toml +++ b/crates/goose-mcp/Cargo.toml @@ -28,7 +28,7 @@ schemars = "1.0" lazy_static = "1.5" shellexpand = "3.1.0" indoc = "2.0.5" -xcap = "0.0.14" +xcap = "0.7.0" reqwest = { version = "0.11", features = [ "json", "rustls-tls-native-roots", diff --git a/crates/goose-mcp/src/developer/rmcp_developer.rs b/crates/goose-mcp/src/developer/rmcp_developer.rs index bbd91d96ae25..9a86886fb1bd 100644 --- a/crates/goose-mcp/src/developer/rmcp_developer.rs +++ b/crates/goose-mcp/src/developer/rmcp_developer.rs @@ -585,8 +585,10 @@ impl DeveloperServer { ) })?; - let window_titles: Vec = - windows.into_iter().map(|w| w.title().to_string()).collect(); + let window_titles: Vec = windows + .into_iter() + .map(|w| w.title().unwrap_or_default().to_string()) + .collect(); let content_text = format!("Available windows:\n{}", window_titles.join("\n")); @@ -626,7 +628,7 @@ impl DeveloperServer { let window = windows .into_iter() - .find(|w| w.title() == window_title) + .find(|w| w.title().unwrap_or_default().to_string() == *window_title) .ok_or_else(|| { ErrorData::new( ErrorCode::INTERNAL_ERROR,