Repository navigation
feat(install): ship a frozen gaia everywhere instead of PyPI - #6783
Conversation
…om PyPI The desktop app's first launch no longer downloads uv and Python or builds ~/.gaia/venv from PyPI. Each installer now carries a one-dir PyInstaller build of the GAIA core, frozen from the same commit, and the app runs it from <resources>/core. On a clean profile with no Python or uv on PATH, the backend answered /api/health 6 s after launch. - installer/core freezes gaia.cli with every gaia module and the UI extras, and leaves out the hub agents and the ML stack. smoke_test.py checks it in a throwaway home. build_core.yml builds it per platform; the Linux build runs on the Rocky 9 glibc floor. build-installers.yml packs it in place of the bundled uv. - gaia.frozen runs GAIA's own `-m`/`-c` self-relaunches (the daemon, MCP server, attempts), since sys.executable is the app itself. - A packaged app with no core fails with a reinstall message rather than falling back to PyPI. An AppImage runs a copy under ~/.gaia/core, because its mount goes away while the daemon keeps running. - Updates stop the daemon before replacing the files it runs from: the NSIS and .deb hooks, and the app's own update quit, which is the only step macOS has. The frozen app also replaces a daemon from any other release, such as the old venv's. Each app version refreshes the agent once. - In the frozen build, gaia init skips pip extras, and a wheel-type hub agent is refused before download.
…taller A terminal-only install had gaia-tui and gaia-agent but no gaia, so setup, starting the daemon, model links and Slack setup all failed unless the user also ran the one-line installer, which built a venv from PyPI. The macOS .pkg, the .deb/.rpm and the Windows setup's terminal component now carry the frozen core, and the terminal UI runs the gaia beside itself before any other on PATH. - build_core.yml takes a platform list and adds a best-effort darwin-x64 leg. Each installer workflow freezes only what it packs, under its own artifact prefix. - macOS: a third component installs the core to /usr/local/lib/gaia, linked as /usr/local/bin/gaia. Linux: /usr/lib/gaia, linked as /usr/bin/gaia, with a pre-remove script that stops a daemon running it. Windows: gaia.exe and _internal sit beside gaia-tui.exe. The setup stops the daemon before it replaces the files, and again on uninstall. - The package smoke tests run the installed gaia --version and check the core is gone after removal.
install.sh and install.ps1 downloaded uv and Python 3.12, then built ~/.gaia/venv from PyPI. They now download the release's frozen gaia (gaia-core-<platform>.tar.gz), check it against gaia-core-SHA256SUMS.txt, and use it to read the agent manifest, so neither needs Python at all. - install.sh unpacks it into ~/.gaia/core and links gaia, gaia-cli and gaia-mcp from ~/.gaia/bin. install.ps1 puts gaia.exe and _internal in ~\.gaia\bin, with gaia-cli and gaia-mcp as copies. The frozen entry runs as gaia-mcp when called by that name. Both stop the running daemon first. - publish.yml attaches the core and its checksums to every release, and check_release_assets.py refuses a release without them. darwin-x64 and a new linux-arm64 freeze are best-effort. - The .rpm now owns /usr/lib/gaia, so removing it leaves no empty tree. - gaia uninstall --purge removes ~/.gaia/core.
The one-line installers give the same executable the gaia-mcp name, and the entry picks the MCP bridge from it.
|
Verdict: Request changes Replacing the PyPI venv with one frozen
Real-world evidenceN/A: no evidence bundle was produced for this run, so this job ran none of the changed installers or the frozen app. The description reports the author's own runs: per-platform smoke tests of the frozen core, a packaged Windows app reaching healthy in about 6 s, and 🔍 Technical details🔴 Critical🔴 AppImage cleanup deletes the one-line installer's core (
Scenario: a Linux user runs Fix: give the AppImage its own root and add it to (Also update the 🔴 Docs give commands that now fail, or describe the removed venv
🟡 Important🟡 Frozen builds of different releases evict each other's daemon ( In a frozen client,
🟡 A failed Fix: check before deleting anything. If the stop failed, or any process image lives under 🟢 Minor
Strengths
|
Where the agent ships as its own binary (every app install now), gaia -p and gaia chat failed with "install the gaia-agent-gaia package", goal ticks were refused (amd#5840), and saving a skill preference returned 503. Each now uses the agent binary through the daemon, as Agent UI chat does, and the hints the apps show no longer tell users to pip-install. - gaia -p and gaia chat relay through run_query, which passes the caller's folder as working_directory. Flags only an in-process agent can honour (--dangerously-skip-permissions, --full-access, --base-url, --index) are refused with the reason. - A goal tick relays like a scheduled prompt. The relay now hands a relayed set_loop_state call to the tick's handler, so the loop still reads its directive. - Skill preference schemas come from disk for user skills. A test pins that no bundled skill ships one. - In a frozen build, the "core too old" advice says to update GAIA, not to pip install. The TUI's missing-gaia and outdated-service remedies name the one-line installers, not pip.
|
Verdict: Request changes The latest push makes
🔍 Technical details
|
The agent reports a model failure as a final answer marked failed. run_query ignored the mark, so a relayed gaia -p printed the failure text and exited 0 with is_error false. It now records the mark and exits 1, and gaia -p reports the failure as the error. The relayed path also stops starting the model server in-process; the daemon brings it up for its agent, as it does for the Agent UI.
|
Verdict: Request changes This push makes a failed model call count as a failed run for
🔍 Technical details
|
… packages The installer journeys and the rebuilt-package jobs still assumed a venv and a package with no core, so they failed against this branch. - install.sh / install.ps1 rows check the core and that no venv was built, and skip for a release that ships no gaia-core files. - build-packages.sh and build-pkg.sh take --without-core, used only to rebuild a release that predates the core, so the upgrade row starts from the package users really had. - The skew test and the publish step list expect the new wording and steps.
|
Verdict: Request changes This push updates the install journey tests to check the frozen
🔍 Technical details
|
An AppImage no longer deletes the gaia the one-line installer put on Linux, and two installs of different releases no longer restart each other's daemon. - The AppImage keeps its copy of the core in ~/.gaia/app-core, apart from install.sh's ~/.gaia/core; --purge removes both. - A frozen gaia replaces only a daemon from an older release (or one that records no version), never a newer one. - install.ps1 stops when it can't stop the daemon, and moves the old files aside instead of deleting them, restoring them if the swap fails. - Docs: the Windows uninstall and quickstart steps, the Agent UI and RAG dependency notes and the antivirus entry describe the frozen gaia, and the desktop app's Windows folder is gaia-desktop.
…gent-ui # Conflicts: # src/gaia/ui/email_sidecar/relay.py
Two tests still described behavior this branch changed on purpose. - `gaia chat` without the flagship in-process now relays to the agent's binary; the test checks the hand-off and that ChatAgent never runs. - The .deb's purge message names no command, since the app's own gaia is already removed when it prints.
The flag test still expected an import error where gaia chat now relays to the agent's own binary; it checks that relay, and that the registry runner is never used.
Brings in amd#6898's argv-array process calls. The installer keeps main's execFileSync import and drops the now-unused crypto import, since the frozen-core path no longer downloads or verifies a bundled uv; the bundled-core Jest mock now stubs execFileSync instead of execSync.
…md#6916) Updating a GAIA backend on a PC with too little free disk space marked the working install as **failed**, so the next launch treated GAIA as broken and re-ran setup. Now the update stops before touching anything, says how many MB more to free, and leaves the installed version recorded as working. A launch with nothing to update starts however full the disk is, and running out of space halfway through an install shows the free-space hint instead of a raw pip error. Since amd#6783, the packaged desktop app ships its own frozen backend and skips this path entirely. The fix now covers the `~/.gaia/venv` install that runs when the app is started from source or via `gaia-ui`. The issue's other two symptoms were already fixed on main: the installer no longer runs `gaia init`, and an install failure shows in the app window instead of a modal that blocked Quit. ## Test plan - [x] `npx jest` in `tests/electron`: all 60 suites pass, including the low-disk tests in `backend-installer-resume.test.cjs`, which failed before the fix. - [ ] Run from source with a ready venv at an older version and under 2 GB free. The setup screen shows the disk error with "Your installed GAIA X was not changed." and `~/.gaia/electron-install-state.json` still says `ready`. Closes amd#5697 <details> <summary>🔍 Technical details</summary> - `ensureBackend` checks disk only after the version fast path, right before `installBackend`. When a finished install is in place (and not already `failed`), the refusal throws an `InstallError` with `keepState`, which skips `setState(FAILED)`. - A first install, or one already recorded as failed, is still recorded as `failed` on a disk refusal. - `failureReason` maps `No space left on device`, `not enough space on the disk` and `os error 28/112` to `FAILURE_REASONS.DISK`. That install was modified, so it stays `failed`. </details>
… gaia (amd#6946) Since v0.26.0-rc6 (amd#6783), a terminal-only install refuses to chat when the user's models are already on Lemonade. The TUI now asks the bundled frozen `gaia` whether setup is done. That check only looked for the agent in `~/.gaia/bin` or the hub install, so it said "the GAIA agent needs installing" even though `gaia-agent` ships right beside `gaia-tui`. This is what turned the `win-setup-tui`, `win-setup-both`, `*-tui-deb`, `fedora-tui-rpm` and `mac-*-tui-pkg` journey rows red on rc6 and rc7. The check now also counts the agent beside the frozen `gaia` and, for a frozen `gaia` only, on PATH. The `install-sh` journey rows were also failing at uninstall because the harness still called `~/.gaia/venv/bin/gaia`, which the frozen install no longer creates. ## Test plan - [x] `pytest tests/unit/test_init_command.py`: 198 passed. The two new "ready" tests fail without the fix. The adversarial cases still report the agent missing: an agent on a pip install's PATH, beside a source interpreter, a directory named `gaia-agent`, or a non-executable file. - [x] Readiness-related suites (setup runner, init profiles and model choices, hub installer, daemon Lemonade): 605 passed. One failure is pre-existing and fails the same way on `main` when `gaia-tui` is on the dev machine's PATH. - [ ] Installer journeys on this PR: the `win-setup-tui`/`win-setup-both`, `*-tui-deb`, `fedora-tui-rpm` and `mac-*-tui-pkg` rows pass health, and the `*-install-sh` rows pass uninstall and leftovers.
Main gave the terminal packages and the Windows setup a frozen-core build (#6783, #7103) that installs the run's own flagship on an RC, so the split's explicit !cancelled() gates now also require needs.core to succeed; without that clause a failed core would no longer stop the packages or the setup. The #6612 leftovers (contributor-triage skill, verified-run skip, the dry run's ui-rc waiting on the sidecar) take main's side.
GAIA no longer installs Python or a PyPI package on a user's PC. The desktop app built
~/.gaia/venvfrom PyPI on first launch. The terminal UI's installers shipped nogaia, so setup and the daemon failed until the user also ran the one-line installer, which built the same venv. Now one frozengaia, built from the same commit, ships everywhere: inside the desktop app, besidegaia-tuiin every terminal installer, and as a checksummed release file thatinstall.sh/install.ps1download. On a clean profile on a Strix Halo PC, with no Python or uv on PATH, the desktop app's backend was healthy 6 s after launch, compared with a 44 s install plus 76 s to healthy on a CI runner before. This covers steps 1–10 of the binaries-only plan (#6495). Step 1 (no pip extras) holds for both apps: the frozen build skips pip extras, and both apps pass--skip-pip-extras.pip install amd-gaiausers still get them.<resources>/core/gaia. If that file is missing, it says to reinstall rather than fall back to PyPI. An AppImage runs a copy under~/.gaia/core, because its mount goes away while the daemon keeps running. The bundled uv is gone..pkg,.deb/.rpmand the Windows setup's terminal component carry the core and putgaiaon PATH. The terminal UI runs thegaiabeside itself before any other.gaia-core-<platform>.tar.gz, check it againstgaia-core-SHA256SUMS.txt, and use it to read the agent manifest, so they need no Python at all.publish.ymlattaches the core to every release, and the release check refuses one without it..deb/.rpmpre-remove hooks and the desktop app's update quit (the only hook macOS has) all do this. The frozen app also replaces a daemon still running an older release's venv. After an app update, the agent is refreshed once.gaia -p,gaia chat, background goals (fix(ui): background goals never run in the desktop app, and each failure burns the hourly tick budget #5840) and skill-preference saves now run it through the daemon, as Agent UI chat does. Before, they failed or returned 503. A failed model call is a failed run (exit 1), and the apps' hints no longer tell users to pip-install.gaia initskips pip extras, a wheel-type hub agent is refused before download, and GAIA's own-m/-crelaunches run throughgaia.frozen.Still source-only:
gaia eval agent, which runs the flagship in-process. The npmgaia-uipackage and running the app from source still use a venv, as developer routes.Closes #5840.
Test plan
installer/core/smoke_test.pypasses on win32-x64, darwin-arm64, darwin-x64 and linux-x64 (Rocky 9) in CI, and on a local Windows build. It checks:--version; bundled modules import;gaia_agent, torch and PyInstaller are absent; the-m/-crelaunches; running asgaia-mcp;gaia init --check --json; daemon start, status and stop;gaia chat --uianswering/api/health.~/.gaia/venv, and the setup screen shows "All 5 checks passed". Through the frozen core,gaia init --agent-onlyinstalled the flagship in 13 s and its sidecar started..deband.rpmbuilt with the real Linux core in a container: both install, rungaia --versionand remove cleanly (Debian bookworm, Fedora).gaia -pandgaia chatin a throwaway home: the daemon started the agent binary and relayed the turn. With the model server unreachable, both reported the agent's error and exited 1.pytest: installer, hub, daemon, relay, agent-loop, skills, release-asset and frozen-relaunch suites (Windows), plus the POSIX-shell installer tests in a Linux container. Electron Jest suite passes; Gogaiainittests pass.installer/install_time_thresholds.json, andinstall.sh/install.ps1pinned to that RC install with no Python on the PC.gaia, from an empty home with no Python or uv on PATH:gaia init --agent-onlyinstalled the flagship in 8.6 s, andgaia -p --model Qwen3.5-4B-GGUFanswered and exited 0.