Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.
Rust agentai-agentapplecomputer-usecomputer-use-agentcontainerizationcuadesktop-automationhacktoberfestlumemacosmanusoperatorswiftvirtualizationvirtualization-frameworkwindowswindows-sandbox
fix(cua-driver): select latest release by semver (#1398)
Francesco Bonacci4f5ddf6e22ba
diff --git a/libs/cua-driver/Sources/CuaDriverCLI/VersionCheck.swift b/libs/cua-driver/Sources/CuaDriverCLI/VersionCheck.swiftindex 79ba9a4877..9bd326ac64 100644--- a/libs/cua-driver/Sources/CuaDriverCLI/VersionCheck.swift+++ b/libs/cua-driver/Sources/CuaDriverCLI/VersionCheck.swift@@ -20,15 +20,14 @@ enum VersionCheck {let releases = try? JSONSerialization.jsonObject(with: data) as? [[String: Any]]else { return nil }- for release in releases {+ return releases.compactMap { release -> String? inguard let tag = release["tag_name"] as? String,tag.hasPrefix(tagPrefix),release["draft"] as? Bool != true,release["prerelease"] as? Bool != true- else { continue }+ else { return nil }return String(tag.dropFirst(tagPrefix.count))- }- return nil+ }.max(by: { isNewer($1, than: $0) })}/// True when `candidate` is strictly newer than `current` (semver compare).diff --git a/libs/cua-driver/scripts/install.sh b/libs/cua-driver/scripts/install.shindex 09cd674ff9..1b8ba9b12b 100755--- a/libs/cua-driver/scripts/install.sh+++ b/libs/cua-driver/scripts/install.sh@@ -70,8 +70,10 @@ elselog "resolving latest $TAG_PREFIX* release via GitHub API"TAG=$(curl -fsSL "https://api.github.com/repos/$REPO/releases?per_page=40" \| grep -Eo '"tag_name":[[:space:]]*"'"${TAG_PREFIX}"'[^"]+"' \+ | sed -E 's/.*"'"${TAG_PREFIX}"'([0-9]+[.][0-9]+[.][0-9]+)"/\1/' \+ | sort -t. -k1,1nr -k2,2nr -k3,3nr \| head -n 1 \- | sed -E 's/.*"'"${TAG_PREFIX}"'([^"]+)"/'"${TAG_PREFIX}"'\1/')+ | sed -E 's/^/'"${TAG_PREFIX}"'/')if [[ -z "$TAG" ]]; thenerr "no release matching ${TAG_PREFIX}* found on $REPO"exit 1