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
ci(spaces): ship the Electron app for Windows and Linux on stable releases (#5146)
Francesco Bonaccide5105306750
diff --git a/.github/scripts/tests/test_cua_sdk_release_repository.py b/.github/scripts/tests/test_cua_sdk_release_repository.pyindex df8726899e..54d1013f67 100644--- a/.github/scripts/tests/test_cua_sdk_release_repository.py+++ b/.github/scripts/tests/test_cua_sdk_release_repository.py@@ -111,7 +111,7 @@ def test_spaces_releases_macos_only_for_now() -> None:assert "startsWith(github.ref, 'refs/tags/cua-spaces-v')" in gate# latest.json (the Tauri feed) only when Linux/Windows artifacts exist.sign = step("cd-cua-spaces.yml", "installer-manifest", "Sign, checksum and build release-artifacts.json")["run"]- assert 'compgen -G "assets/cua-spaces-$VERSION-linux-*"' in sign+ assert 'if [ "$TAURI" = success ]; then' in signassert "updater_feed.py" in signassert "cosign sign-blob" in sign and "checksums.txt" in signfeeds = step("cd-cua-spaces.yml", "installer-manifest", "Update the rolling feeds")["run"]@@ -131,9 +131,13 @@ def test_spaces_electron_builds_only_for_prereleases_and_dry_runs() -> None:plan = step("cd-cua-spaces.yml", "electron-plan", "Plan")["run"]assert 'beta=false; [[ "$VERSION" == *-* ]] && beta=true' in planassert '[ "$DRY_RUN" != true ]' in plan and "refs/tags/cua-spaces-v*" in plan- for name in ("electron-native", "electron-mac", "electron-windows", "electron-linux"):- assert jobs[name]["if"] == "needs.electron-plan.outputs.build == 'true'", name- assert jobs["electron-publish"]["if"] == "needs.electron-plan.outputs.publish == 'true'"+ assert jobs["electron-mac"]["if"] == "needs.electron-plan.outputs.build == 'true'"+ # Windows and Linux build for every release tag, stable included.+ for name in ("electron-native", "electron-windows", "electron-linux"):+ assert jobs[name]["if"] == "needs.electron-plan.outputs.desktop == 'true'", name+ publish_gate = jobs["electron-publish"]["if"]+ assert "needs.electron-plan.outputs.publish == 'true'" in publish_gate+ assert "needs.electron-windows.result == 'success' && needs.electron-linux.result == 'success'" in publish_gate# Each build runs the native and notch interfaces before electron-builder.mac = "\n".join(s.get("run", "") for s in steps("cd-cua-spaces.yml", "electron-mac"))assert "pnpm native -- --target aarch64-apple-darwin" in macdiff --git a/.github/workflows/cd-cua-spaces.yml b/.github/workflows/cd-cua-spaces.ymlindex 13cd3ac77b..a666a4a0ee 100644--- a/.github/workflows/cd-cua-spaces.yml+++ b/.github/workflows/cd-cua-spaces.yml@@ -2,16 +2,12 @@ name: "CD: Cua Spaces"# Cua Spaces desktop releases, published to a GitHub Release.#-# MACOS ONLY FOR NOW: a release builds and publishes only the macOS SwiftUI-# app (build-macos). The Linux and Windows Tauri app (build-linux-windows) is-# kept below but disabled by its `if:`; installer-manifest runs without it,-# and the Tauri updater feed (latest.json) is skipped while no Linux/Windows-# updater artifact is on the release. install.sh / install.ps1 skip the Cua-# Spaces app on Linux and Windows with a note. To bring Linux and Windows-# back, drop build-linux-windows's `if:` (latest.json is then built and-# required again for every Tauri platform) and re-enable the app in the-# installers (spaces_supported in install.sh, $script:SpacesSupported in-# install.ps1).+# Stable releases ship the SwiftUI app for macOS (build-macos) and the+# Electron app (apps/cua-spaces-desktop) for Windows and Linux. The Linux and+# Windows Tauri app (build-linux-windows) is kept below but disabled by its+# `if:`; installer-manifest builds the Tauri updater feed (latest.json) only+# when that job ran. install.sh / install.ps1 install the Electron app on+# Linux and Windows (see scripts/install/README.md).## macOS: the SwiftUI app (apps/cua-spaces-macos), universal (arm64 + x86_64),# built by apps/cua-spaces-macos/scripts/build-release.sh: the Cua Spaces app@@ -43,7 +39,7 @@ name: "CD: Cua Spaces"# disk images, the apps, the Windows installers, the Sparkle appcast and the# Electron feeds.#-# Linux and Windows (disabled for now, see above): the Tauri app+# Linux and Windows Tauri app (disabled, see above): the Tauri app# (apps/cua-spaces), with Tauri auto-updater# artifacts (.sig) and a `latest.json` update feed that lists only those# platforms. Every Tauri bundle carries the Cua Spaces build of the `cua` CLI@@ -99,9 +95,10 @@ name: "CD: Cua Spaces"# CFBundleShortVersionString X.Y.Z, CFBundleVersion X.Y.Z.<run number>, and# the full version (with any -suffix) as CuaVersion.#-# Electron app (apps/cua-spaces-desktop), PRERELEASES ONLY for now: a-# prerelease version (X.Y.Z-suffix, e.g. cua-spaces-v0.8.0-beta.1) also-# builds the Electron app for macOS (arm64 + universal dmg and zip,+# Electron app (apps/cua-spaces-desktop). Every release tag, stable or not,+# builds and publishes it for Windows and Linux (electron-plan `desktop`).+# macOS stays the SwiftUI app: a prerelease version (X.Y.Z-suffix, e.g.+# cua-spaces-v0.8.0-beta.1) also builds the Electron app for macOS (arm64 + universal dmg and zip,# bundle id com.trycua.spaces.macos, Developer ID signed and notarized by# electron-builder from the same secrets as the SwiftUI app), Windows (one# NSIS installer for x64 and arm64, plus per-arch ones, Authenticode signed@@ -109,14 +106,18 @@ name: "CD: Cua Spaces"# deb, x64 and arm64). Each runs `pnpm native -- --target <triple>` (the# cua-spaces-ffi library and its Node bindings; arm64 Windows and Linux are# built on arm64 runners) and, on macOS, `pnpm notch` before electron-builder.-# electron-publish uploads the installers to the same prerelease, and once it-# is published the last job uploads the electron-updater feed (beta.yml,-# beta-mac.yml, beta-linux*.yml, installer URLs made absolute by+# electron-publish uploads the installers to the same release (the Windows and+# Linux ones also under the installer names cua-spaces-<v>-windows-<arch>-setup.exe+# and cua-spaces-<v>-linux-<arch>.AppImage / .deb, so they get Sigstore+# bundles, checksums and release-artifacts.json entries), and once it+# is published the last job uploads the electron-updater feed (beta*.yml for a+# prerelease, latest.yml and latest-linux*.yml for a stable release, plus the+# -mac one when electron-mac ran; installer URLs made absolute by# scripts/feed-urls.mjs) to the rolling `cua-spaces-latest` release, which is# the feed URL electron-builder bakes in from github.repository. The Electron-# updater is opt-in and reads only the beta channel. The SwiftUI app,-# installers and Sparkle beta item of a prerelease are unchanged; stable-# releases build no Electron app. A manual run with `electron_dry_run` builds+# updater is opt-in; it serves the beta channel everywhere and the stable+# channel on Windows and Linux (macOS: only after the Sparkle cutover). The+# SwiftUI app, installers and Sparkle beta item of a release are unchanged. A manual run with `electron_dry_run` builds# and signs only the Electron app and keeps it as workflow artifacts# (electron-darwin, electron-windows, electron-linux), publishing nothing.#@@ -788,6 +789,7 @@ jobs:outputs:version: ${{ steps.plan.outputs.version }}build: ${{ steps.plan.outputs.build }}+ desktop: ${{ steps.plan.outputs.desktop }}publish: ${{ steps.plan.outputs.publish }}cutover: ${{ steps.plan.outputs.cutover }}steps:@@ -816,24 +818,28 @@ jobs:fifibuild=false; { [ "$beta" = true ] || [ "$cutover" = true ] || [ "$DRY_RUN" = true ]; } && build=true- # A beta or the cutover from a release tag publishes; a dry run never does.+ # Windows and Linux Electron: every release tag (stable too), the+ # cutover and a dry run. `build` above is the macOS Electron app only.+ desktop=false+ { [ "$build" = true ] || [[ "$GITHUB_REF" == refs/tags/cua-spaces-v* ]]; } && desktop=true+ # Any release tag publishes; a dry run never does.publish=false- if { [ "$beta" = true ] || [ "$cutover" = true ]; } && [ "$DRY_RUN" != true ] \- && [[ "$GITHUB_REF" == refs/tags/cua-spaces-v* ]]; then publish=true; fi+ if [ "$DRY_RUN" != true ] && [[ "$GITHUB_REF" == refs/tags/cua-spaces-v* ]]; then publish=true; fi{echo "version=$VERSION"echo "build=$build"+ echo "desktop=$desktop"echo "publish=$publish"echo "cutover=$cutover"} >> "$GITHUB_OUTPUT"- echo "Electron: version $VERSION, build=$build, publish=$publish, Sparkle cutover=$cutover"+ echo "Electron: version $VERSION, build(mac)=$build, desktop(win+linux)=$desktop, publish=$publish, Sparkle cutover=$cutover"# The arm64 Windows and Linux native libraries, built on arm64 runners;# electron-windows and electron-linux package both architectures.electron-native:name: Electron native (${{ matrix.label }})needs: electron-plan- if: needs.electron-plan.outputs.build == 'true'+ if: needs.electron-plan.outputs.desktop == 'true'runs-on: ${{ matrix.runner }}timeout-minutes: 120strategy:@@ -1129,7 +1135,7 @@ jobs:electron-windows:name: Electron windows (x64, arm64)needs: [electron-plan, electron-native]- if: needs.electron-plan.outputs.build == 'true'+ if: needs.electron-plan.outputs.desktop == 'true'runs-on: windows-latesttimeout-minutes: 120# Holds the Azure Artifact Signing identity (Windows Authenticode).@@ -1249,7 +1255,7 @@ jobs:electron-linux:name: Electron linux (x64, arm64)needs: [electron-plan, electron-native]- if: needs.electron-plan.outputs.build == 'true'+ if: needs.electron-plan.outputs.desktop == 'true'runs-on: ubuntu-22.04timeout-minutes: 120defaults:@@ -1318,7 +1324,11 @@ jobs:electron-publish:name: Electron publishneeds: [electron-plan, electron-mac, electron-windows, electron-linux]- if: needs.electron-plan.outputs.publish == 'true'+ # electron-mac is skipped on a stable release (macOS stays the SwiftUI app).+ if: >-+ !cancelled() && needs.electron-plan.outputs.publish == 'true'+ && needs.electron-windows.result == 'success' && needs.electron-linux.result == 'success'+ && (needs.electron-mac.result == 'success' || needs.electron-mac.result == 'skipped')runs-on: ubuntu-latesttimeout-minutes: 30defaults:@@ -1329,7 +1339,8 @@ jobs:- uses: actions/setup-node@v4with:node-version: 22- - uses: actions/download-artifact@v4+ - if: needs.electron-mac.result == 'success'+ uses: actions/download-artifact@v4with:name: electron-darwinpath: electron@@ -1345,6 +1356,7 @@ jobs:env:GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}VERSION: ${{ needs.electron-plan.outputs.version }}+ MAC: ${{ needs.electron-mac.result }}run: |set -euo pipefailtag="cua-spaces-v${VERSION}"@@ -1361,9 +1373,25 @@ jobs:--base "https://github.com/$GITHUB_REPOSITORY/releases/download/$tag/" feed/*.yml# beta*.yml for a prerelease, latest*.yml for the cutover's stable one.channel=latest; [[ "$VERSION" == *-* ]] && channel=beta- for want in "$channel.yml" "$channel-mac.yml" "$channel-linux.yml" "$channel-linux-arm64.yml"; do+ wants=("$channel.yml" "$channel-linux.yml" "$channel-linux-arm64.yml")+ # macOS Electron only when electron-mac ran (beta, cutover).+ [ "$MAC" = success ] && wants+=("$channel-mac.yml")+ for want in "${wants[@]}"; dotest -f "feed/$want" || { echo "::error::no $want"; exit 1; }done+ # The installer names release_manifest.py, install.sh and install.ps1+ # use, next to the electron-builder names the feed URLs reference.+ # The copies get Sigstore bundles, checksums and manifest entries.+ copy_as() { # copy_as SOURCE-NAME INSTALLER-NAME+ test -f "electron/$1" || { echo "::error::no electron/$1"; exit 1; }+ cp "electron/$1" "electron/$2"+ }+ copy_as "Cua-Spaces-Setup-${VERSION}-x64.exe" "cua-spaces-${VERSION}-windows-x64-setup.exe"+ copy_as "Cua-Spaces-Setup-${VERSION}-arm64.exe" "cua-spaces-${VERSION}-windows-arm64-setup.exe"+ copy_as "Cua-Spaces-${VERSION}-x86_64.AppImage" "cua-spaces-${VERSION}-linux-x64.AppImage"+ copy_as "Cua-Spaces-${VERSION}-arm64.AppImage" "cua-spaces-${VERSION}-linux-arm64.AppImage"+ copy_as "cua-spaces_${VERSION}_amd64.deb" "cua-spaces-${VERSION}-linux-x64.deb"+ copy_as "cua-spaces_${VERSION}_arm64.deb" "cua-spaces-${VERSION}-linux-arm64.deb"ls -la electron feedgh release upload "$tag" electron/* --clobber --repo "$GITHUB_REPOSITORY"- uses: actions/upload-artifact@v4@@ -1393,8 +1421,9 @@ jobs:needs: [build-macos, electron-plan, electron-mac, electron-windows, electron-publish]if: >-!cancelled() && needs.build-macos.result == 'success'- && (needs.electron-plan.outputs.build != 'true'- || (needs.electron-mac.result == 'success' && needs.electron-windows.result == 'success'))+ && (needs.electron-plan.outputs.desktop != 'true'+ || (needs.electron-windows.result == 'success'+ && (needs.electron-plan.outputs.build != 'true' || needs.electron-mac.result == 'success')))&& (needs.electron-plan.outputs.publish != 'true' || needs.electron-publish.result == 'success')runs-on: macos-26timeout-minutes: 60@@ -1405,7 +1434,8 @@ jobs:contents: readenv:VERSION: ${{ needs.build-macos.outputs.version }}- ELECTRON: ${{ needs.electron-plan.outputs.build }}+ ELECTRON: ${{ needs.electron-plan.outputs.desktop }}+ ELECTRON_MAC: ${{ needs.electron-plan.outputs.build }}SWIFT_SIGNED: ${{ needs.build-macos.outputs.signed }}ELECTRON_MAC_SIGNED: ${{ needs.electron-mac.outputs.signed }}ELECTRON_WINDOWS_SIGNED: ${{ needs.electron-windows.outputs.signed }}@@ -1421,7 +1451,7 @@ jobs:with:name: electron-darwinpath: release- - if: needs.electron-plan.outputs.build == 'true'+ - if: needs.electron-plan.outputs.desktop == 'true'uses: actions/download-artifact@v4with:name: electron-windows@@ -1438,7 +1468,7 @@ jobs:name: sparkle-appcastpath: release- name: Install osslsigncode (Windows Authenticode)- if: needs.electron-plan.outputs.build == 'true' && env.ELECTRON_WINDOWS_SIGNED == 'true'+ if: needs.electron-plan.outputs.desktop == 'true' && env.ELECTRON_WINDOWS_SIGNED == 'true'run: brew install osslsigncode- name: verify-release.shrun: |@@ -1452,7 +1482,9 @@ jobs:fiif [ "$ELECTRON" = true ]; thenexpect+=(feed)- if [ "$ELECTRON_MAC_SIGNED" = true ]; then expect+=(electron); else+ # No Electron macOS build on a stable release (macOS stays SwiftUI).+ if [ "$ELECTRON_MAC" != true ]; then :+ elif [ "$ELECTRON_MAC_SIGNED" = true ]; then expect+=(electron); elseecho "::warning::the Electron macOS build is unsigned: not verified"rm -f release/Cua-Spaces-*.dmgfi@@ -1477,8 +1509,9 @@ jobs:# Only a release tag publishes: the Sigstore identity the installers and# the updater feed trust is cd-cua-spaces.yml at refs/tags/cua-spaces-v*.# A manual run from a tag re-publishes; from a branch it only builds.- # build-linux-windows may be skipped (disabled: macOS only), never failed.- # A prerelease waits for its Electron installers (electron-publish).+ # build-linux-windows (Tauri) may be skipped, never failed; electron-mac is+ # skipped on a stable release. A release tag waits for its Electron+ # installers (electron-publish).# Nothing is published unless verify-release passed.if: >-!cancelled() && startsWith(github.ref, 'refs/tags/cua-spaces-v')@@ -1514,12 +1547,14 @@ jobs:GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}VERSION: ${{ steps.version.outputs.version }}TAG: ${{ steps.version.outputs.tag }}+ TAURI: ${{ needs.build-linux-windows.result }}run: |set -euo pipefailBASE="https://github.com/$GITHUB_REPOSITORY/releases/download/$TAG"mkdir -p assets previous- # Every asset: the SwiftUI app's, and a prerelease's Electron- # installers for macOS, Windows and Linux (electron-publish).+ # Every asset: the SwiftUI app's, and the Electron installers+ # (Windows and Linux always, macOS for a prerelease) with their+ # installer-named copies (electron-publish).gh release download "$TAG" --dir assets --repo "$GITHUB_REPOSITORY"rm -f assets/checksums.txt assets/release-artifacts.json assets/latest.json assets/*.sigstore.json# Keyless Sigstore bundles next to each installer (install.sh and@@ -1540,19 +1575,16 @@ jobs:# Every published artifact is listed, with its checksum (CUA-1507).python3 scripts/install/check_release_manifest.py --dir assets --component app \--version "$VERSION" --base-url "$BASE"- # The Tauri updater feed: Linux and Windows only (the macOS app is- # the SwiftUI app, which updates through the Sparkle appcast). With- # any Linux/Windows artifact on the release it fails when one of- # those platforms is missing or unsigned; with none (macOS only for- # now) there is no feed.+ # The Tauri updater feed (latest.json) only when the Tauri app+ # (build-linux-windows) ran and built its updater artifacts. The+ # Electron app for Windows and Linux updates from latest*.yml.upload=(assets/*.sigstore.json assets/checksums.txt assets/release-artifacts.json)- if compgen -G "assets/cua-spaces-$VERSION-linux-*" >/dev/null \- || compgen -G "assets/cua-spaces-$VERSION-windows-*" >/dev/null; then+ if [ "$TAURI" = success ]; thenpython3 scripts/install/updater_feed.py --version "$VERSION" --dir assets \--base-url "$BASE" --out assets/latest.jsonupload+=(assets/latest.json)else- echo "::notice::macOS-only release: no Linux/Windows Tauri app, so no latest.json"+ echo "::notice::no Tauri build in this release, so no latest.json"figh release upload "$TAG" "${upload[@]}" --clobber --repo "$GITHUB_REPOSITORY"- name: Publish the release@@ -1583,10 +1615,11 @@ jobs:flags+=(--title "Cua Spaces v$VERSION ($label)" --notes-file notes.md)figh release edit "$TAG" "${flags[@]}" --repo "$GITHUB_REPOSITORY"- # The Electron feed (beta*.yml), once the release it names is- # published. Stable apps never read beta*.yml, so a trycua/cua- # prerelease updates it too (like the Sparkle beta items below). The- # cutover release writes latest*.yml.+ # The Electron feed, once the release it names is published: beta*.yml+ # for a prerelease (stable apps never read it, so a trycua/cua+ # prerelease updates it too, like the Sparkle beta items below),+ # latest*.yml for a stable release (Windows and Linux; macOS only at the+ # cutover). A trycua/cua prerelease never moves the stable feed.- name: Fetch the Electron feedif: needs.electron-publish.result == 'success'uses: actions/download-artifact@v4@@ -1594,7 +1627,10 @@ jobs:name: electron-feedpath: electron-feed- name: Upload the Electron feed to cua-spaces-latest- if: needs.electron-publish.result == 'success'+ if: >-+ needs.electron-publish.result == 'success'+ && (contains(needs.build-macos.outputs.version, '-')+ || needs.build-macos.outputs.prerelease != 'true' || github.repository != 'trycua/cua')env:GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}run: |diff --git a/.github/workflows/ci-installers.yml b/.github/workflows/ci-installers.ymlindex f14ef56087..dba9d0540e 100644--- a/.github/workflows/ci-installers.yml+++ b/.github/workflows/ci-installers.yml@@ -84,8 +84,8 @@ jobs:sleep 1CUA_INSTALL_BASE_URL=http://127.0.0.1:8765 sh /w/install.sh --yes --no-onboarding --mode client/usr/local/bin/cua --version- # Cua Spaces is macOS-only for now: Linux skips the app.- test ! -e /usr/local/bin/cua-spaces+ # Linux installs the Spaces AppImage next to the CLI.+ test -x /usr/local/bin/cua-spaces# --pair installs the CLI and adds the machine with the code.CUA_INSTALL_BASE_URL=http://127.0.0.1:8765 sh /w/install.sh --dry-run --pair K7QM-4XPB-2RHD | grep -q "host setup --pair K7QM-4XPB-2RHD"'diff --git a/apps/cua-spaces-desktop/src/updater.ts b/apps/cua-spaces-desktop/src/updater.tsindex 93fb01d04f..d023aa98cc 100644--- a/apps/cua-spaces-desktop/src/updater.ts+++ b/apps/cua-spaces-desktop/src/updater.ts@@ -8,16 +8,14 @@// checks, automatic installs, the channel, Check Now with its own windows// for what it found, and the last check.//-// Beta only, and opt-in: Electron builds ship as Cua Spaces prereleases-// (X.Y.Z-suffix, cd-cua-spaces.yml), which publish `beta*.yml`. Nothing-// checks on its own unless the user turns automatic checks on (Settings →-// About, `"autoUpdate": true` in settings.json, or CUA_SPACES_AUTO_UPDATE=1),-// and only the beta channel is served. Stable releases still ship the Swift-// app, updated by Sparkle; Check Now on Stable says so.-//-// At the Sparkle cutover (docs/sparkle-cutover.md) stable releases start-// publishing `latest*.yml` and STABLE_FEED turns on; until then a build on-// the stable channel never checks.+// Opt-in: nothing checks on its own unless the user turns automatic checks+// on (Settings → About, `"autoUpdate": true` in settings.json, or+// CUA_SPACES_AUTO_UPDATE=1). The beta channel (prereleases, `beta*.yml`) is+// served everywhere. The stable channel (`latest*.yml`) is served on Windows+// and Linux, where stable releases ship the Electron app. On macOS stable+// releases still ship the Swift app, updated by Sparkle; Check Now on Stable+// says so until the Sparkle cutover (docs/sparkle-cutover.md) publishes+// `latest-mac.yml` and STABLE_FEED turns on.import { app, BrowserWindow, dialog } from "electron";import { existsSync } from "node:fs";import * as path from "node:path";@@ -28,7 +26,7 @@ import { readSettings, writeSettings } from "./settings";const POLL_MS = 4 * 60 * 60 * 1000;-/** Off until stable releases publish an Electron feed (the cutover). */+/** macOS only: off until stable releases publish the Electron macOS feed (the cutover). */export const STABLE_FEED = false;export type UpdateChannel = "stable" | "beta";@@ -41,7 +39,12 @@ export const updateChannel = (): UpdateChannel => readSettings().updateChannel ?/** The feed file electron-updater reads: `beta*.yml` or `latest*.yml`. */export const feedChannel = (channel: UpdateChannel) => (channel === "beta" ? "beta" : "latest");-export const channelServed = (channel: UpdateChannel, stableFeed = STABLE_FEED) => channel === "beta" || stableFeed;+/** Stable Electron builds exist for Windows and Linux; macOS waits for STABLE_FEED. */+export const channelServed = (+ channel: UpdateChannel,+ stableFeed = STABLE_FEED,+ platform: NodeJS.Platform = process.platform,+) => channel === "beta" || stableFeed || platform === "win32" || platform === "linux";/** A packaged build with a feed (electron-builder's app-update.yml); a development run has no updater. */export const hasFeed = () => app.isPackaged && existsSync(path.join(process.resourcesPath, "app-update.yml"));diff --git a/apps/cua-spaces-desktop/test/release.test.ts b/apps/cua-spaces-desktop/test/release.test.tsindex 11e4a8f2f5..43784a9eb0 100644--- a/apps/cua-spaces-desktop/test/release.test.ts+++ b/apps/cua-spaces-desktop/test/release.test.ts@@ -93,11 +93,13 @@ describe("updater channels", () => {expect(feedChannel("stable")).toBe("latest");});- it("serves only the beta channel until the cutover", () => {+ it("serves stable on Windows and Linux, and on macOS only after the cutover", () => {expect(STABLE_FEED).toBe(false);- expect(channelServed("beta")).toBe(true);- expect(channelServed("stable")).toBe(false);- expect(channelServed("stable", true)).toBe(true);+ for (const platform of ["darwin", "win32", "linux"] as const) expect(channelServed("beta", false, platform)).toBe(true);+ expect(channelServed("stable", false, "darwin")).toBe(false);+ expect(channelServed("stable", true, "darwin")).toBe(true);+ expect(channelServed("stable", false, "win32")).toBe(true);+ expect(channelServed("stable", false, "linux")).toBe(true);});});diff --git a/scripts/install/README.md b/scripts/install/README.mdindex baf7d7b0af..10dc33d2db 100644--- a/scripts/install/README.md+++ b/scripts/install/README.md@@ -19,7 +19,7 @@ In a terminal, install.sh shows a checklist (arrow or number keys to move and to| Item | What it does | Default ||---|---|---|| `cli` | The `cua` CLI | Always (not with `--app-only`) |-| `spaces` | The Cua Spaces app | On for macOS. macOS only for now: on Linux and Windows it is hidden, and selecting it (`--select`/`--only spaces`, `--app-only`, `--mode`) skips the app with a note. `--app-only` and `--mode` imply it |+| `spaces` | The Cua Spaces app | On for macOS (the SwiftUI app) and Linux (the Electron app). On Windows (the Electron app) it is off by default: pick it in the checklist or use `-Select spaces`. `--app-only` and `--mode` imply it || `cua-driver` | Installs cua-driver with its own release installer (`cua.ai/driver/install.sh` / `install.ps1`, which verify SHA256SUMS and the Sigstore bundle), then `cua agents setup --cua-driver --agents all --yes` registers its skill and MCP server for your agents | Off || `host` | Runs `cua host setup` after sign-in so others on your account can reach this machine | Off |@@ -46,7 +46,7 @@ For cua-driver, `--prefix DIR` becomes `--bin-dir DIR/bin`, `--require-signature| `--require-signature` | `-RequireSignature` | Fail unless minisign or cosign verifies || `--dry-run` | `-DryRun` | Print the plan, change nothing || `--yes` | `-Yes` | Accept the current selection and every prompt |-| | `-Installer msi\|nsis` | Windows app installer (default msi) |+| | `-Installer msi\|nsis` | Windows app installer (default nsis, the Electron app; msi only when a release has one) |Pass install.sh options through the pipe with `sh -s --`, for example `curl -fsSL https://cua.ai/install.sh | sh -s -- --cli-only --yes`. `--only` and `--select` cannot be combined, nor can `--cli-only` with other items. Set `CUA_INSTALL_NONINTERACTIVE=1` to never prompt.@@ -55,14 +55,14 @@ Pass install.sh options through the pipe with `sh -s --`, for example `curl -fsS| | CLI | App ||---|---|---|| macOS | `~/.local/bin/cua` (`/usr/local/bin` as root) | `/Applications` if writable, else `~/Applications` (from the .dmg; the SwiftUI app, macOS 26 or later, skipped on older macOS) |-| Linux | same as macOS | Not offered for now (macOS only). When re-enabled: AppImage at `~/.local/bin/cua-spaces` plus a desktop entry; the .deb via apt-get when run as root |-| Windows | `%LOCALAPPDATA%\Programs\cua\bin\cua.exe` | Not offered for now (macOS only). When re-enabled: silent MSI (`CUA_SPACES_MODE=`) or NSIS (`/S /MODE=`) |+| Linux | same as macOS | The Electron app: on Debian/Ubuntu (x64, arm64) the .deb via apt-get when run as root or with passwordless sudo; otherwise the AppImage at `~/.local/bin/cua-spaces` plus a desktop entry |+| Windows | `%LOCALAPPDATA%\Programs\cua\bin\cua.exe` | The Electron app's NSIS `setup.exe` for the machine's architecture (sha256 and cosign checked), run silently (`/S /MODE=`); a silent MSI (`CUA_SPACES_MODE=`) only if a release has one |cua-driver lands where its own installer puts it: `~/.local/bin/cua-driver` (or `DIR/bin` with `--prefix`), `%LOCALAPPDATA%\Programs\Cua\cua-driver\bin` on Windows.The scripts never edit shell profiles unless you pass `--modify-path`. `--mode` writes `~/.cua/spaces-install-mode`, which the app reads on first launch.-MDM on macOS: `apps/cua-spaces/scripts/build-pkg.sh` builds a `.pkg` (signed with `--sign`, install mode baked with `--mode`) that installs the app and links `/usr/local/bin/cua` to the CLI bundled inside it. The macOS app is the SwiftUI app (`apps/cua-spaces-macos`, `scripts/build-release.sh`), which carries the CLI as `Contents/MacOS/cua`; the Linux and Windows (Tauri) bundles, not released for now, carry it as a sidecar (`apps/cua-spaces/scripts/prepare-cli-sidecar.sh` + `src-tauri/tauri.sidecar.conf.json`).+MDM on macOS: `apps/cua-spaces/scripts/build-pkg.sh` builds a `.pkg` (signed with `--sign`, install mode baked with `--mode`) that installs the app and links `/usr/local/bin/cua` to the CLI bundled inside it. The macOS app is the SwiftUI app (`apps/cua-spaces-macos`, `scripts/build-release.sh`), which carries the CLI as `Contents/MacOS/cua`; the Linux and Windows Electron app (`apps/cua-spaces-desktop`) bundles it itself, and the Tauri bundles (disabled) carry it as a sidecar (`apps/cua-spaces/scripts/prepare-cli-sidecar.sh` + `src-tauri/tauri.sidecar.conf.json`).## Release manifest@@ -78,7 +78,7 @@ The copies of `install.sh` / `install.ps1` on a repository's `cua-install-latest| Component | File ||---|---|| CLI | `cua-cli-<ver>-<platform>.tar.gz` (macOS, Linux), `cua-cli-<ver>-windows-<arch>.zip` |-| App | `cua-spaces-<ver>-darwin-universal.dmg` / `.pkg`, `cua-spaces-<ver>-linux-<arch>.AppImage` / `.deb`, `cua-spaces-<ver>-windows-<arch>.msi` / `-setup.exe` |+| App | `cua-spaces-<ver>-darwin-universal.dmg` / `.pkg`, `cua-spaces-<ver>-linux-<arch>.AppImage` / `.deb`, `cua-spaces-<ver>-windows-<arch>.msi` / `-setup.exe`. A stable release's Linux and Windows files are copies of the Electron installers (`Cua-Spaces-<ver>-x86_64.AppImage`, `cua-spaces_<ver>_amd64.deb`, `Cua-Spaces-Setup-<ver>-x64.exe`, ...) under these names; the electron-builder names stay on the release too, because the updater feed (`latest*.yml`) references them, and are listed with kinds `electron-*` |`<platform>` is `darwin-arm64`, `darwin-x64`, `linux-x64`, `linux-arm64`, `windows-x64` or `windows-arm64`. Each entry carries `url`, `sha256` and, when present next to the file, `minisig` and `cosign_bundle` URLs. Every artifact sits on one line so install.sh can read it without jq.diff --git a/scripts/install/install.ps1 b/scripts/install/install.ps1index b1dd8148d5..6bfedd79c8 100644--- a/scripts/install/install.ps1+++ b/scripts/install/install.ps1@@ -10,7 +10,7 @@ Cua installer for Windows: the `cua` CLI, the Cua Spaces app and agent extras.At a console it first shows a numbered checklist of what to install. Items:cli the cua CLI (always installed, except with -AppOnly)- spaces the Cua Spaces app (macOS only for now; skipped here with a note)+ spaces the Cua Spaces app (the Electron app's setup.exe; off by default here, pick it or use -Select spaces)cua-driver cua-driver MCP and skill for your agents (off by default)host host this machine: `cua host setup` (off by default)Set CUA_INSTALL_NONINTERACTIVE=1 to never prompt.@@ -19,8 +19,9 @@ Reads release-artifacts.json (see scripts/install/README.md), downloads theartifacts for this machine, verifies their sha256 (and a minisign or cosignsignature when available), installs `cua` to %LOCALAPPDATA%\Programs\cua\bin(or -Prefix\bin), then runs `cua auth login` when a user is at the console.-Cua Spaces is macOS-only for now, so -AppOnly, -Mode and the `spaces` item-install nothing here (the installer says so and goes on).+-AppOnly, -Mode and the `spaces` item install the Cua Spaces app: its signed+setup.exe for this machine's architecture, run silently (/S) after the sha256+(and cosign, when available) check..PARAMETER SelectPreselect items (comma list: spaces, cua-driver, host); the checklist still shows.@@ -49,7 +50,7 @@ Do not run `cua auth login` afterwards..PARAMETER RequireSignatureFail unless a signature verifies..PARAMETER Installer-App installer to use: msi (default) or nsis.+App installer to use: nsis (default, the Electron app's setup.exe) or msi (used only when a release has one)..PARAMETER DryRunPrint what would happen; change nothing..PARAMETER Yes@@ -69,7 +70,7 @@ param([switch]$ModifyPath,[switch]$NoOnboarding,[switch]$RequireSignature,- [ValidateSet('msi', 'nsis')][string]$Installer = 'msi',+ [ValidateSet('msi', 'nsis')][string]$Installer = 'nsis',[switch]$DryRun,[switch]$Yes)@@ -95,10 +96,9 @@ $LatestTag = 'cua-install-latest'$MinisignPubkey = $env:CUA_INSTALL_MINISIGN_PUBKEY$CuaItems = @('spaces', 'cua-driver', 'host')$script:Picked = $false-# Cua Spaces ships for macOS only for now (cd-cua-spaces.yml builds no Windows-# app): a selected `spaces` is skipped with a note. Set this to $true to bring-# the Windows app back (Install-App is kept).-$script:SpacesSupported = $false+# Cua Spaces ships for Windows as the Electron app's NSIS setup.exe+# (cd-cua-spaces.yml). Set this to $false to skip a selected `spaces` with a note.+$script:SpacesSupported = $truefunction Get-Sha256Hex([string]$Path) {# .NET directly: Get-FileHash is missing when the Utility module is not@@ -487,7 +487,7 @@ function Invoke-CuaInstall {Test-PairArgs$sel = Get-CuaSelectionif ($sel.spaces -and -not $script:SpacesSupported) {- Write-Info 'Cua Spaces is macOS-only for now; skipping the app on Windows'+ Write-Info 'Cua Spaces is not available on this platform; skipping the app'$sel.spaces = $false}if ($Version -and $Version.TrimStart('v') -notmatch '^\d+\.\d+\.\d+') { Stop-Install "-Version must look like 1.2.3, not '$Version'" }diff --git a/scripts/install/install.sh b/scripts/install/install.shindex bb48af8797..37d44e2570 100755--- a/scripts/install/install.sh+++ b/scripts/install/install.sh@@ -8,7 +8,7 @@## In a terminal it shows a checklist of what to install. Items:# cli the cua CLI (always installed, except with --app-only)-# spaces the Cua Spaces app (macOS only for now; default on macOS)+# spaces the Cua Spaces app (macOS and Linux; default on both)# cua-driver cua-driver MCP and skill for your agents (default off)# host host this machine: `cua host setup` (default off)#@@ -306,7 +306,7 @@ init_selection() {list="$only_list"elselist="$select_list"- # The app is a default on macOS.+ # The app is a default on macOS and Linux.if spaces_supported; then sel_spaces=1; fififor item in $(items_in "$list"); do item_set "$item" 1; done@@ -315,16 +315,15 @@ init_selection() {sel_spaces=1fiif [ "$sel_spaces" = 1 ] && ! spaces_supported; then- info "Cua Spaces is macOS-only for now; skipping the app on Linux"+ info "Cua Spaces is not available for $os; skipping the app"sel_spaces=0fi}-# Cua Spaces ships for macOS only for now (cd-cua-spaces.yml builds no Linux-# app). To bring Linux back, return 0 for linux too (install_app_linux is-# kept).+# Cua Spaces ships for macOS (the SwiftUI app) and Linux (the Electron app,+# .deb or AppImage).spaces_supported() {- [ "$os" = darwin ]+ [ "$os" = darwin ] || [ "$os" = linux ]}# Show the checklist only when a human can answer it.@@ -358,7 +357,7 @@ draw_rows() { # cursor row, or 0 for the numbered list# checklist: pick items with arrows/numbers + space, Enter to install.checklist() {rows="cli"- # Spaces is offered only where it ships (macOS).+ # Spaces is offered only where it ships (macOS, Linux).if spaces_supported; then rows="$rows spaces"; firows="$rows cua-driver host"n=0@@ -762,10 +761,17 @@ install_app_darwin() {install_app_linux() {deb_entry="$(manifest_entry app deb)"- if [ -z "$prefix" ] && [ "$(id -u)" = 0 ] && has apt-get && [ -n "$deb_entry" ]; then- if confirm "Install the Cua Spaces .deb with apt-get?" y; then+ # Debian and Ubuntu: the .deb (apt resolves its dependencies), as root or+ # with passwordless sudo. Anything else, or no privileges: the AppImage.+ if [ -z "$prefix" ] && has apt-get && [ -n "$deb_entry" ]; then+ sudo_cmd=""+ if [ "$(id -u)" != 0 ]; then+ if has sudo && sudo -n true 2>/dev/null; then sudo_cmd="sudo"; else sudo_cmd="none"; fi+ fi+ if [ "$sudo_cmd" != none ] && confirm "Install the Cua Spaces .deb with apt-get?" y; thendownload app deb- run apt-get install -y "$artifact"+ # shellcheck disable=SC2086+ run $sudo_cmd apt-get install -y "$artifact"app_path="cua-spaces"returnfidiff --git a/scripts/install/release_manifest.py b/scripts/install/release_manifest.pyindex 813cb22c40..22bc63d75e 100644--- a/scripts/install/release_manifest.py+++ b/scripts/install/release_manifest.py@@ -45,8 +45,10 @@ from pathlib import PathSCHEMA = 1PLATFORMS = ("darwin-arm64", "darwin-x64", "linux-x64", "linux-arm64", "windows-x64", "windows-arm64")VERSION = r"(?P<version>\d+\.\d+\.\d+(?:[-+][0-9A-Za-z.-]+)?)"-# Lazy: electron-builder puts an optional architecture after the version.-EVERSION = r"(?P<version>\d+\.\d+\.\d+(?:[-+][0-9A-Za-z.-]+?)?)"+# Lazy, and the suffix itself lazily optional (`??`): electron-builder puts an+# optional architecture after the version, so a stable 1.2.3-x64.exe is+# version 1.2.3 and arch x64, not a "1.2.3-x64" prerelease.+EVERSION = r"(?P<version>\d+\.\d+\.\d+(?:[-+][0-9A-Za-z.-]+?)??)"PATTERNS = [("cli", "tar.gz", re.compile(rf"^cua-cli-{VERSION}-(?P<platform>(?:darwin|linux)-(?:x64|arm64))\.tar\.gz$")),diff --git a/scripts/install/tests/install.Tests.ps1 b/scripts/install/tests/install.Tests.ps1index ba74741567..f1bed908cb 100644--- a/scripts/install/tests/install.Tests.ps1+++ b/scripts/install/tests/install.Tests.ps1@@ -178,21 +178,20 @@ Describe 'install.ps1' {$out | Should -Match 'is not on your PATH'}- # Cua Spaces is macOS-only for now: Windows skips the app with a note.- It 'dry run: plans the CLI, skips the app (macOS only) and changes nothing' {+ # Cua Spaces for Windows is the Electron app's NSIS setup.exe.+ It 'dry run: -Mode plans the CLI and the silent setup.exe, and changes nothing' {$prefix = Join-Path $env:CUA_TEST_ROOT 'p2'$out = Invoke-Installer @{ DryRun = $true; Yes = $true; Prefix = $prefix; Mode = 'host' } @{ CUA_INSTALL_ARCH = 'ARM64' }$out | Should -Match 'cua-cli-1.2.3-windows-arm64.zip'- $out | Should -Match 'Cua Spaces is macOS-only for now'+ $out | Should -Match 'cua-spaces-1.2.3-windows-arm64-setup.exe'+ $out | Should -Match '/S'$out | Should -Not -Match 'msiexec'- $out | Should -Not -Match 'cua-spaces-1.2.3-windows'$prefix | Should -Not -Exist}- It 'dry run: -AppOnly skips the app with a note and installs nothing' {- $out = Invoke-Installer @{ DryRun = $true; Yes = $true; AppOnly = $true; Installer = 'nsis'; Mode = 'client' }- $out | Should -Match 'Cua Spaces is macOS-only for now'- $out | Should -Not -Match 'setup.exe'+ It 'dry run: -AppOnly plans only the silent setup.exe' {+ $out = Invoke-Installer @{ DryRun = $true; Yes = $true; AppOnly = $true; Mode = 'client' }+ $out | Should -Match 'cua-spaces-1.2.3-windows-x64-setup.exe'$out | Should -Not -Match 'cua-cli-1.2.3'}@@ -268,10 +267,10 @@ Describe 'install.ps1' {$out | Should -Not -Match 'cua-driver'}- It 'dry run: -Only spaces installs the CLI and skips the app' {+ It 'dry run: -Only spaces installs the CLI and the setup.exe' {$out = Invoke-Installer @{ DryRun = $true; Only = 'spaces' }$out | Should -Match 'cua-cli-1.2.3-windows-x64.zip'- $out | Should -Match 'Cua Spaces is macOS-only for now'+ $out | Should -Match 'cua-spaces-1.2.3-windows-x64-setup.exe'$out | Should -Not -Match 'msiexec'}@@ -290,8 +289,8 @@ Describe 'install.ps1' {{ Invoke-Installer @{ DryRun = $true; CliOnly = $true; Select = 'spaces' } } | Should -Throw '*use -Only spaces*'}- It 'dry run: -Mode writes no install-mode file while the app is skipped' {+ It 'dry run: -Mode writes the install-mode file when the app is installed' {$out = Invoke-Installer @{ DryRun = $true; Yes = $true; AppOnly = $true; Mode = 'host' }- $out | Should -Not -Match 'spaces-install-mode'+ $out | Should -Match 'spaces-install-mode'}}diff --git a/scripts/install/tests/run.sh b/scripts/install/tests/run.shindex ff470cec6c..26e9eb7e44 100755--- a/scripts/install/tests/run.sh+++ b/scripts/install/tests/run.sh@@ -155,8 +155,8 @@ inst -- --yes --no-onboarding --prefix "$work/p1"check "linux x64: exits 0" [ "$status" = 0 ]check "linux x64: installs cua under --prefix/bin" exists "$work/p1/bin/cua"check "linux x64: installed cua runs and is the x64 build" sh -c "'$work/p1/bin/cua' --version | grep -q linux-x64"-check "linux default: no AppImage" absent "$work/p1/bin/cua-spaces"-check "linux default: no desktop entry" absent "$work/p1/share/applications/cua-spaces.desktop"+check "linux default: installs the Electron AppImage" sh -c "[ -x '$work/p1/bin/cua-spaces' ] && '$work/p1/bin/cua-spaces' | grep -q 'cua-spaces x64'"+check "linux default: writes the desktop entry" exists "$work/p1/share/applications/cua-spaces.desktop"check "linux default: no cua-driver" absent "$home/driver.log"check "linux x64: uses the rolling latest manifest" has_out "cua-install-latest/release-artifacts.json"check "non-interactive: prints next steps, no login" sh -c "grep -q 'cua auth login' '$work/out' && [ ! -e '$home/cua.log' ]"@@ -165,19 +165,20 @@ check "no --modify-path: profile untouched" absent "$home/.profile"# ------------------------------------------------------------ selection-# Cua Spaces ships for macOS only for now: Linux skips it with a note (the-# manifest still lists Linux app artifacts; they are never downloaded).+# Cua Spaces ships for macOS and Linux; the manifest also lists Windows.inst -- --yes --no-onboarding --select spaces --prefix "$work/s1"-check "--select spaces (Linux): skips the app with a note" sh -c "[ $status = 0 ] && grep -q 'Cua Spaces is macOS-only for now' '$work/out' && ! grep -q 'cua-spaces-$version-linux' '$work/out'"-check "--select spaces (Linux): no AppImage" absent "$work/s1/bin/cua-spaces"-check "--select spaces (Linux): no desktop entry" absent "$work/s1/share/applications/cua-spaces.desktop"+check "--select spaces (Linux): installs the AppImage" sh -c "[ $status = 0 ] && [ -x '$work/s1/bin/cua-spaces' ] && grep -q 'cua-spaces-$version-linux-x64.AppImage' '$work/out'"+check "--select spaces (Linux): desktop entry" exists "$work/s1/share/applications/cua-spaces.desktop"check "--select spaces (Linux): still installs the CLI" exists "$work/s1/bin/cua"inst -- --no-onboarding --only spaces --prefix "$work/s2"-check "--only spaces (Linux): installs the CLI, skips the app" sh -c "[ $status = 0 ] && [ -e '$work/s2/bin/cua' ] && [ ! -e '$work/s2/bin/cua-spaces' ] && grep -q 'Cua Spaces is macOS-only for now' '$work/out'"+check "--only spaces (Linux): installs the CLI and the app" sh -c "[ $status = 0 ] && [ -x '$work/s2/bin/cua-spaces' ] && [ -e '$work/s2/bin/cua' ]"++inst CUA_INSTALL_ARCH=aarch64 -- --yes --no-onboarding --select spaces --prefix "$work/s2b"+check "--select spaces (Linux arm64): installs the arm64 AppImage" sh -c "[ $status = 0 ] && grep -q 'cua-spaces-$version-linux-arm64.AppImage' '$work/out' && '$work/s2b/bin/cua-spaces' | grep -q 'cua-spaces arm64'"inst -- --no-onboarding --prefix "$work/s3"-check "no tty, no --yes (Linux): CLI only, no hang" sh -c "[ $status = 0 ] && [ -e '$work/s3/bin/cua' ] && [ ! -e '$work/s3/bin/cua-spaces' ]"+check "no tty, no --yes (Linux): installs with the defaults, no hang" sh -c "[ $status = 0 ] && [ -e '$work/s3/bin/cua' ] && [ -x '$work/s3/bin/cua-spaces' ]"inst CUA_INSTALL_OS=Darwin -- --dry-run --no-onboarding --prefix "$work/s4"check "no tty (macOS dry run): plans the CLI and the app" sh -c "grep -q 'cua-cli-$version-darwin-x64.tar.gz' '$work/out' && grep -q 'cua-spaces-$version-darwin-universal.dmg' '$work/out'"@@ -260,13 +261,13 @@ check "darwin x86_64 maps to darwin-x64" has_out "cua-cli-$version-darwin-x64.tacheck "--dry-run installs nothing" absent "$work/p4"inst -- --yes --app-only --mode host --prefix "$work/p5"-check "--app-only (Linux): exits 0 with a note" sh -c "[ $status = 0 ] && grep -q 'Cua Spaces is macOS-only for now' '$work/out'"+check "--app-only (Linux): exits 0" [ "$status" = 0 ]check "--app-only skips the CLI" absent "$work/p5/bin/cua"-check "--app-only (Linux): no app" absent "$work/p5/bin/cua-spaces"-check "--mode host (Linux): no install-mode file" absent "$home/.cua/spaces-install-mode"+check "--app-only (Linux): installs the app" sh -c "[ -x '$work/p5/bin/cua-spaces' ]"+check "--mode host (Linux): writes the install-mode file" sh -c "grep -q host '$home/.cua/spaces-install-mode'"inst -- --yes --no-onboarding --mode client --prefix "$work/p5b"-check "--mode client (Linux): installs the CLI, skips the app" sh -c "[ $status = 0 ] && [ -e '$work/p5b/bin/cua' ] && [ ! -e '$work/p5b/bin/cua-spaces' ] && [ ! -e '$home/.cua/spaces-install-mode' ]"+check "--mode client (Linux): installs the CLI and the app" sh -c "[ $status = 0 ] && [ -e '$work/p5b/bin/cua' ] && [ -x '$work/p5b/bin/cua-spaces' ] && grep -q client '$home/.cua/spaces-install-mode'"inst CUA_INSTALL_OS=Darwin -- --yes --dry-run --app-only --mode host --prefix "$work/p5c"check "--mode host (macOS dry run): plans the app and the install-mode file" sh -c "[ $status = 0 ] && grep -q 'cua-spaces-$version-darwin-universal.dmg' '$work/out' && grep -q 'spaces-install-mode (host)' '$work/out'"@@ -387,7 +388,7 @@ fi# Root with apt-get and no --prefix: the .deb path (dry run only).if [ "$(id -u)" = 0 ] && command -v apt-get >/dev/null 2>&1; theninst -- --yes --app-only --dry-run- check "root + apt: the app is skipped, no .deb" sh -c "[ $status = 0 ] && ! grep -q 'apt-get install' '$work/out' && grep -q 'Cua Spaces is macOS-only for now' '$work/out'"+ check "root + apt: the app is the .deb" sh -c "[ $status = 0 ] && grep -q 'apt-get install' '$work/out' && grep -q 'cua-spaces-$version-linux-x64.deb' '$work/out'"fiinst -- --help@@ -427,21 +428,21 @@ if script --version 2>/dev/null | grep -q util-linux; thenlogged() { grep -q -- "$1" "$home/cua.log" 2>/dev/null; }if command -v bash >/dev/null 2>&1 && command -v timeout >/dev/null 2>&1; thentty_inst '\r' --prefix "$work/t1"- check "checklist: shows the rows, Linux hides Spaces" sh -c "grep -q 'Choose what to install' '$work/out' && grep -q 'cua CLI (required)' '$work/out' && grep -q 'cua-driver MCP and skill for your agents' '$work/out' && ! grep -q 'Cua Spaces app' '$work/out'"- check "checklist: Enter accepts the defaults (CLI only)" sh -c "[ $status = 0 ] && [ -e '$work/t1/bin/cua' ] && [ ! -e '$work/t1/bin/cua-driver' ] && [ ! -e '$work/t1/bin/cua-spaces' ]"+ check "checklist: shows the rows, Linux includes Spaces" sh -c "grep -q 'Choose what to install' '$work/out' && grep -q 'cua CLI (required)' '$work/out' && grep -q 'Cua Spaces app' '$work/out' && grep -q 'cua-driver MCP and skill for your agents' '$work/out'"+ check "checklist: Enter accepts the defaults (CLI and the app)" sh -c "[ $status = 0 ] && [ -e '$work/t1/bin/cua' ] && [ ! -e '$work/t1/bin/cua-driver' ] && [ -x '$work/t1/bin/cua-spaces' ]"check "checklist: no per-item prompt afterwards" sh -c "! grep -q 'Install the cua CLI to' '$work/out'"- tty_inst '2\r' --prefix "$work/t2"+ tty_inst '3\r' --prefix "$work/t2"check "checklist: number key toggles cua-driver on" sh -c "[ $status = 0 ] && [ -e '$work/t2/bin/cua-driver' ] && grep -q 'agents setup --cua-driver' '$home/cua.log'"- tty_inst '\033[B\033[B \r' --prefix "$work/t3"+ tty_inst '\033[B\033[B\033[B \r' --prefix "$work/t3"check "checklist: arrows + space select host" sh -c "[ $status = 0 ] && grep -qx 'host setup' '$home/cua.log' && [ ! -e '$work/t3/bin/cua-driver' ]"tty_inst '1 \033[A\r' --prefix "$work/t4"check "checklist: the CLI row is locked" sh -c "[ $status = 0 ] && [ -e '$work/t4/bin/cua' ] && [ ! -e '$work/t4/bin/cua-driver' ]"tty_inst '\r' --select cua-driver --prefix "$work/t5"check "checklist: --select cua-driver is preselected" sh -c "[ $status = 0 ] && [ -e '$work/t5/bin/cua-driver' ] && grep -q '\\[x\\] cua-driver' '$work/out'"- tty_inst '2\r' --select cua-driver --prefix "$work/t6"+ tty_inst '3\r' --select cua-driver --prefix "$work/t6"check "checklist: a preselected item can be turned off" sh -c "[ $status = 0 ] && [ -e '$work/t6/bin/cua' ] && [ ! -e '$work/t6/bin/cua-driver' ]"tty_inst '\r' --select spaces --prefix "$work/t7"- check "checklist: --select spaces on Linux: no Spaces row, not installed" sh -c "[ $status = 0 ] && ! grep -q 'Cua Spaces app' '$work/out' && [ ! -e '$work/t7/bin/cua-spaces' ] && [ -e '$work/t7/bin/cua' ]"+ check "checklist: --select spaces on Linux: installed" sh -c "[ $status = 0 ] && grep -q 'Cua Spaces app' '$work/out' && [ -x '$work/t7/bin/cua-spaces' ] && [ -e '$work/t7/bin/cua' ]"tty_inst '' --prefix "$work/t8"check "checklist: no input (EOF) accepts defaults, no hang" sh -c "[ $status = 0 ] && [ -e '$work/t8/bin/cua' ]"tty_inst '\r' --yes --select host --prefix "$work/t9"@@ -449,10 +450,10 @@ if script --version 2>/dev/null | grep -q util-linux; thentty_inst '\r' --only cua-driver --prefix "$work/t10"check "checklist: --only skips it" sh -c "[ $status = 0 ] && ! grep -q 'Choose what to install' '$work/out' && [ -e '$work/t10/bin/cua-driver' ]"tty_term=dumb- tty_inst '3\n\n' --prefix "$work/t11"+ tty_inst '4\n\n' --prefix "$work/t11"tty_term=""check "checklist (TERM=dumb): numbered prompt toggles host" sh -c "[ $status = 0 ] && grep -q 'Toggle numbers' '$work/out' && grep -qx 'host setup' '$home/cua.log'"- [ -n "${CUA_INSTALL_TRANSCRIPT:-}" ] && tty_inst '\033[B \033[B \r' --prefix "$work/t12" && cp "$work/out" "$CUA_INSTALL_TRANSCRIPT"+ [ -n "${CUA_INSTALL_TRANSCRIPT:-}" ] && tty_inst '\033[B \033[B \033[B \r' --prefix "$work/t12" && cp "$work/out" "$CUA_INSTALL_TRANSCRIPT"elseprintf 'skip interactive checklist (needs bash and timeout)\n'fidiff --git a/scripts/install/tests/test_release_manifest.py b/scripts/install/tests/test_release_manifest.pyindex 3e8f615c0b..bd33d512af 100644--- a/scripts/install/tests/test_release_manifest.py+++ b/scripts/install/tests/test_release_manifest.py@@ -92,6 +92,29 @@ class ReleaseManifestTest(unittest.TestCase):kinds = [(p, k) for rows in got.values() for p, k in rows]self.assertEqual(len(kinds), len(set(kinds)))+ def test_installer_named_copies_of_the_electron_app_list_beside_the_electron_names(self):+ # A stable release: Windows and Linux Electron installers also under the+ # installer names, so install.sh / install.ps1 pick them (kinds nsis,+ # appimage, deb) while the electron-builder names stay (electron-*).+ v = "1.2.3"+ files = {+ f"Cua-Spaces-Setup-{v}-x64.exe": ("windows-x64", "electron-nsis"),+ f"cua-spaces-{v}-windows-x64-setup.exe": ("windows-x64", "nsis"),+ f"cua-spaces-{v}-windows-arm64-setup.exe": ("windows-arm64", "nsis"),+ f"Cua-Spaces-{v}-x86_64.AppImage": ("linux-x64", "electron-appimage"),+ f"cua-spaces-{v}-linux-x64.AppImage": ("linux-x64", "appimage"),+ f"cua-spaces_{v}_amd64.deb": ("linux-x64", "electron-deb"),+ f"cua-spaces-{v}-linux-x64.deb": ("linux-x64", "deb"),+ f"cua-spaces-{v}-linux-arm64.deb": ("linux-arm64", "deb"),+ }+ for name in files:+ self.touch(name, name.encode())+ out = self.dir / "m.json"+ proc = run("--component", "app", "--version", v, "--dir", str(self.dir), "--out", str(out))+ self.assertEqual(proc.returncode, 0, proc.stderr)+ got = {(a["name"], a["platform"], a["kind"]) for a in json.loads(out.read_text())["artifacts"]}+ self.assertEqual(got, {(n, *pk) for n, pk in files.items()})+def test_version_mismatch_and_empty_dir_fail(self):self.touch("cua-cli-1.0.0-linux-x64.tar.gz")self.assertNotEqual(run("--component", "cli", "--version", "1.0.1", "--dir", str(self.dir)).returncode, 0)