Repository navigation
fix(hub): platform-aware artifact selection for binary hub agents - #2086
Conversation
…alls (#2084) The hub installer only reads the manifest's legacy singular artifact field (always the first-published macOS binary), so Windows/Linux hosts get fed a macOS executable into uv pip install. These tests pin the fix: platform-aware selection from versions[v].artifacts[], no wheel fallback for binary agents, and health/rollback/uninstall/router handling for the new binary artifact kind. All new tests fail against current code (missing install(platform_key=...), compatibility.current_platform_key(), and the sentinel artifact_kind field), confirming they exercise the not-yet-implemented fix rather than passing vacuously.
The installer only read the manifest's legacy singular artifact field, which is always the first-published macOS binary — so Windows and Linux hosts got fed a macOS executable into uv pip install and the install failed every time (#2084). installer.py now selects the matching entry from versions[v].artifacts[] by platform key (win32-x64/darwin-arm64/darwin-x64/linux-x64), writes it as a binary rather than routing it through pip, and never falls back to a wheel even if one happens to be present. compatibility.py gains current_platform_key() to resolve the host's key, mirroring the email sidecar's own mapping so both agree on the platform namespace.
…ts[] cases (#2084) The hub worker writes artifacts: [artifact] for every publish, so a modern wheel-only agent carries a single-element .whl artifacts[]. Presence of artifacts[] must not imply a binary install: a wheel/sdist-only list routes through pip regardless of platform_key, and a cpp manifest (classified first) extracts its singular zip exactly like the legacy route. Both new tests are red against the current increment, which over-eagerly treats any non-empty artifacts[] as platform-keyed binary selection.
The hub worker writes artifacts: [artifact] on every publish, so a modern wheel-only agent carries an artifacts[] list too — treating the list's mere presence as "binary agent" would loudly fail every wheel install the current worker publishes. Classify the set instead: cpp first (byte-identical legacy route), then platform-match among the binary-like entries only, and a wheel/sdist-only list takes the pip route regardless of platform. Also generalizes the .exe suffix match to any platform key (win32-arm64 binaries are planned, #1898) and names the version in the no-match error.
… mutating its dir A correct binary install of the email agent would read "broken" forever: health/status demanded a gaia.agent entry point, which binary agents don't ship by design. health_check now probes binary-kind installs by executable presence (+x on POSIX) via the executable name the sentinel records, leaving wheel agents' entry-point probe untouched. The email agent's install dir doubles as the sidecar's own binary cache, and the warm manager holds the exe open — so install/uninstall/ rollback of email now shut a running sidecar down first (router-level hook; gaia.hub still never imports gaia.ui). Absent or stopped manager is a no-op.
|
Verdict: Approve — clean, well-tested, scope-tight. This fixes the Email Triage agent failing to install from the hub on every platform: the installer read only the manifest's legacy singular 🔍 Technical detailsStrengths
Minor observations (non-blocking, no change requested)
No doc-sync obligation here: this is core installer internals, not a hub-agent package doc surface, and no |
|
Linux evidence added — the fix is now verified on all three OS targets, plus the earlier Windows CI failure is resolved. Ubuntu 24.04 (linux-x64), cold state — fresh POST /api/agents/install {"id":"email"} → {"id":"email","status":"queued"}
install-status → {"id":"email","status":"completed","phase":"completed","percent":100,"version":"0.4.0","error":null}Ran in a container because both physical Linux test boxes were unavailable at the time (one reserved by a long eval run, the other is the dual-boot machine currently booted into Windows); the install path is hardware-independent and the installed binary executes. Per-OS summary: Windows 11 (physical, Radeon — the reporter's environment class): before→after + locked-file + update-in-place, SHA-verified ✅ · macOS (darwin-arm64, physical): SHA + exec bit + health ✅ · Ubuntu 24.04 (linux-x64, container): SHA + exec bit + health ✅. CI: the "Test GAIA CLI on Windows (Full Integration)" failure was a runner loss (job killed at 11m mid-step, log blob never uploaded; workflow green on the last 5 main commits) — rerun passed, all checks green. |
…holder lock (amd#2100) Installing the email agent from the Agent Hub currently produces a binary the UI refuses to run: amd#2086 puts a checksum-verified `email-agent` exactly where `EmailSidecarManager` looks, but the user-mode spawn path gates on `binaries.lock.json`'s placeholder SHAs *before* checking what's installed, so the first email chat dies with a "placeholder sha256" error. Now `fetch_binary` short-circuits to the Hub-installed binary first — re-verified against the SHA-256 its install sentinel recorded from the hub manifest — so Hub install → email chat just works in user mode, no env overrides. With no installed binary, the placeholder lock still fails loudly naming the lock, and a sentinel/file mismatch raises `IntegrityError` with a reinstall remedy instead of silently falling back. Fixes amd#2095 ## Test plan - [ ] `python -m pytest tests/unit/test_email_sidecar_fetch.py tests/unit/test_email_sidecar_manager.py tests/unit/test_hub_installer.py -q` — includes new tests pinning the ordering (installed-binary short-circuit before the lock is consulted), the loud placeholder failure without an install, the tampered-install `IntegrityError`, and the manager-level spawn with the placeholder lock - [ ] `python util/lint.py --all` - [ ] Manual golden path: fresh `~/.gaia/agents/email`, install the email agent from the Agent Hub panel, open an email chat — the sidecar spawns the installed binary (log: `using hub-installed verified binary`)
… works on fresh install (amd#2411) Closes amd#2408 ## Why this matters On a fresh install, the Email agent could never get mailbox access. Triage failed with *"GAIA is missing required Google permissions… reconnect"*, and the Connectors panel showed **"No agents require access to this connector"** — and wiping `~/.gaia` never fixed it, because the state was structural, not cached. The Email agent ships as a frozen-binary **sidecar** (its install dir has no `agent.py`), so `AgentRegistry.discover()` skipped it entirely. The connector grant/consent flow reads only that registry, so it never saw the agent's required scopes → no `installed:email` grant could be created → the use-time gate rejected every triage. **After this change**, the installer registers hub-installed sidecar agents — together with the connectors/scopes they require — into the live registry, at **both** startup and the moment one is installed from the Hub (no restart needed). Connecting Google (or Outlook) now offers and records the grant, and the Connectors panel lists the Email agent under its per-agent grants. <details> <summary>How it works</summary> - `AgentSidecarSpec` gains a `required_connections` field; email's spec declares its google + microsoft `ConnectorRequirement`s (scope literals transcribed from `gaia_agent_email/scopes.py`, guarded against drift by a test). - `AgentRegistry.register_sidecar()` inserts a sidecar as a registry entry (`id` bare, `namespaced_agent_id="installed:email"`, `hidden=False`, a fail-loud `factory` that never imports the wheel — the agent still runs out-of-process via the daemon). - `gaia.hub.installer.register_installed_sidecars()` bridges installed sidecar specs into the registry; called from the UI-server lifespan **and** the binary-install path (gated on the install sentinel; skips any id a wheel already registered, so it never clobbers a real registration). - Single fan-in point: the grant flow, the `/api/agents` panel feed, and the forward-connection path all read the now-populated registry — no other edits. </details> ## Verified Unit + lint green, and validated live on real AMD hardware across **both platforms** and the **full connector lifecycle** — the fix fires on a real cold sidecar install, and the Connectors panel now offers the Email agent its grants where it previously said "No agents require access." **Linux (Strix Halo) — Agent UI, three connection states, all pass:**  *Brand-new install, Google unconnected — the panel offers "Grant access to these agents when you connect: ☑ Email". Pre-fix this said "No agents require access to this connector."*  *After removing the Microsoft connection via the UI — it reverts to "Not configured" but Email is still correctly offered (doesn't vanish, no orphaned grant); authorize still resolves.* - **Connection present** (Microsoft connected): Email appears under PER-AGENT GRANTS with its 3 scope toggles; granting them writes `installed:email` to the grant ledger; a token request passes **both** authorization gates (no `AGENT_NOT_GRANTED` / `missing_scopes`) — the exact gates the bug blocked. *(Screenshot withheld — it shows a test account address.)* - **Removed via UI** and **brand-new install**: the two screenshots above. **Windows (Ryzen AI — the originally-reported platform) — backend, fix fires on a real cold install:** ``` gaia agent install email → email-agent.exe (binary) + .installed sentinel # real Windows artifact; also re-validates amd#2086 registry: Registered sidecar agent: email (namespaced installed:email) server: Agent registry initialized with 2 agents: ['builder', 'email'] GET /api/agents → email with google(4) + microsoft(3) scopes POST /api/connectors/google/authorize → 500, NOT 404 unknown_agent ``` The authorize call gets *past* `_resolve_grant_scopes` (the check this PR fixes); the 500 is an unrelated Windows-over-SSH keyring limitation (Win32 1312), not the fix. ## Test plan - [x] `python -m pytest tests/unit/agents/test_registry.py tests/unit/connectors/ tests/unit/chat/ui/test_agents_router.py -q` → **679 passed** (incl. a real-lifespan authorize 404→200 test, a live-install-no-restart test, and a spec↔binary scope drift guard) - [x] `python util/lint.py --all` → clean - [x] Real-world, Agent UI on AMD hardware (Linux Strix Halo + Windows Ryzen AI): fix fires on a cold sidecar install; Connectors panel offers Email its grants across connection-present / removed-via-UI / brand-new states
Release notes had grown into long blocks of prose with a marketing-toned paragraph on top. They now generate as short bullets grouped by section, with a word cap on the narrative part. Nothing informational is lost — every PR link, contributor credit, and changelog entry is preserved; the prose around them is cut. Two generators write `docs/releases/<tag>.mdx` and they had drifted apart. The `gaia-release` skill told the model GAIA's notes "read dry" and to make them "engaging"; the `release-notes` job in `claude.yml` asked for "comprehensive" notes with an `## Overview` paragraph and emoji headings. Fixing one alone would have been overwritten by the other on the next tag, so both now share one spec. Closes amd#2961 ## What it looks like now Regenerated from the last two releases — same facts, same PR numbers, new template. Narrative words (the capped part, excluding bug-fix/contributor/changelog lists): | Release | Published | Regenerated | Cap | |---|---|---|---| | v0.22.0 (minor) | 1705 | **538** | 600 | | v0.23.0 (minor) | 1119 | **280** | 600 | <details> <summary>Example 1 — v0.23.0 regenerated</summary> ```markdown --- title: "v0.23.0" description: "Install and run agents from the terminal, add capabilities as skills, and connect a Microsoft account without a secret." --- # GAIA v0.23.0 Release Notes Agents are now installable from the terminal, and the confirmation gate that pauses an agent before a consequential action works everywhere, not just in the Agent UI. ## Breaking Changes - **`GAIA_MICROSOFT_TENANT` is gone** — the Microsoft connector split into Personal and Work/School, each with its own tenant. Drop the variable and pick the matching connector. (PR [amd#2729](amd#2729)) ## What's New - **Install and run agents from the terminal** — `gaia hub list`, `gaia hub install <agent> --trust`, `gaia hub uninstall <agent>`. `--trust` is required for an unverified agent. (PRs [amd#2484](amd#2484), [amd#2530](amd#2530), [amd#2708](amd#2708)) - **Every agent asks before it acts** — the confirmation gate for sending mail, writing files, and running commands now fires from the terminal, the local API, and MCP tool calls, not only the Agent UI. Set `GAIA_AUTO_APPROVE_TOOLS=1` to opt out. (PRs [amd#2475](amd#2475), [amd#2544](amd#2544), [amd#2846](amd#2846), [amd#2854](amd#2854)) - **Safer by default** — the MCP bridge binds to localhost and enforces `--auth-token`; the local API refuses credentialed cross-origin requests from non-allow-listed sites; MCP servers launch without a shell; agents cannot write to `~/.gaia` or pass crafted SQL to the database agent. (PRs [amd#2246](amd#2246), [amd#2238](amd#2238), [amd#2344](amd#2344), [amd#2844](amd#2844), [amd#2847](amd#2847), [amd#2860](amd#2860)) - **Add capabilities as skills** — `gaia skill create|import|list|info` gives an agent a new capability from a folder and a manifest. Skills are signed with trust tiers, audited before publish, and opt-in. (PRs [amd#2669](amd#2669), [amd#2692](amd#2692), [amd#2702](amd#2702), [amd#2693](amd#2693)) - **Connect a Microsoft account without a secret** — Personal and Work/School are separate connectors with device-code sign-in. (PRs [amd#2718](amd#2718), [amd#2364](amd#2364)) - **Lemonade Server 11.5.0.** ## Bug Fixes - **Triage paginates large inboxes and reports truncation** (PR [amd#2646](amd#2646)) — mail past a hidden limit is no longer dropped without saying so. - **Thread messages come back sorted and numbered** (PR [amd#2570](amd#2570)) — "reply to 3" hits the message shown at position 3. - **The inbox pre-scan reports uncertainty as uncertainty** (PR [amd#2587](amd#2587)). - **An email conversation survives its turns** (PR [amd#2837](amd#2837)) — a follow-up keeps session context. - **A bare reconnect keeps existing grants** (PR [amd#2733](amd#2733)). - **Restore from Trash anytime** (PR [amd#2542](amd#2542)) — no time window on undo. - **Sender priority no longer overrides content classification** (PR [amd#2774](amd#2774)). - **The agent survives an OpenMP double-init** (PR [amd#2508](amd#2508)). - **Large tool results truncate to valid JSON** (PR [amd#2645](amd#2645)). - **A missing model surfaces as a real 404** (PR [amd#2245](amd#2245)). - **GPU is detected on all platforms and `default_device` is honoured** (PR [amd#2244](amd#2244)). - **A sidecar that is alive but not serving is detected** (PR [amd#2707](amd#2707)). - **The model-slot lease is held across inference** (PR [amd#2394](amd#2394)) — a second agent can't evict the model mid-generation. - **A browser that never launched is surfaced** (PR [amd#2507](amd#2507)). - **Stop aborts in-flight streaming** (PR [amd#2166](amd#2166)). ## Known Issues - **The email agent is beta and CLI-first** — treat its output as a draft to review. - **A full inbox triage can time out on larger mailboxes.** - **Email autonomy is experimental** and not wired up in the packaged sidecar. ## Contributors - [@handle](https://github.com/handle) — <contribution> (PR [#NNN](https://github.com/amd/gaia/pull/NNN)) <!-- generated from the commit log; v0.23.0's list is unchanged from the published notes --> ## Full Changelog **N commits** since v0.22.0: - `<sha>` — <subject> Full Changelog: [v0.22.0...v0.23.0](amd/gaia@v0.22.0...v0.23.0) ``` </details> <details> <summary>Example 2 — v0.22.0 regenerated (the largest recent release)</summary> ```markdown --- title: "v0.22.0" description: "The email agent tracks follow-ups and action items, drafts in your voice, and runs as its own process. Plus a cron scheduler and Word document support in RAG." --- # GAIA v0.22.0 Release Notes A large release built around the email agent, which now tracks what you're waiting on instead of forgetting it after triage. ## Breaking Changes - **Triage returns a reply scaffold, not an empty draft** — `POST /v1/email/triage` and `/triage/batch` now return a `DraftScaffold` without `body`. Code reading `result.draft.body` gets a missing key instead of `""`; use `POST /v1/email/draft` for composed prose. (PR [amd#1984](amd#1984)) - **RoutingAgent and DocumentQAAgent moved to standalone packages** — install `gaia-agent-routing` and `gaia-agent-docqa`. The old imports fail; there is no deprecation shim. (PR [amd#1455](amd#1455)) ## What's New - **An inbox agent that keeps track** — `gaia email` scans Sent folders across every connected mailbox and flags threads still waiting on a reply past a window you set (default 3 days). Detection only; it never nudges anyone for you. (PRs [amd#1922](amd#1922), [amd#1917](amd#1917), [amd#1919](amd#1919), [amd#1918](amd#1918)) - **Drafts in your own voice** — the agent derives greeting, sign-off, length, and formality from your Sent history and composes against that. Only the derived characteristics are stored, never old mail content. (PR [amd#1925](amd#1925)) - **Attachments work end to end** — triage surfaces each attachment's name, type, and size, and drafting and sending accept real attachments as Gmail multipart MIME or Outlook Graph attachments. (PRs [amd#1921](amd#1921), [amd#1883](amd#1883)) - **Email runs as its own process in the Agent UI (beta)** — install it from the Agent Hub panel and the UI talks to it over HTTP, instead of loading the email stack into the UI process. (PRs [amd#1884](amd#1884), [amd#1910](amd#1910), [amd#2100](amd#2100), [amd#2101](amd#2101), [amd#2105](amd#2105)) - **Run prompts on a cron from the terminal** — `gaia schedule add --name digest --cron "0 9 * * *" --prompt "summarize my inbox" --sink stdout`, then `gaia schedule daemon`. Schedules live in a hand-editable `~/.gaia/schedules.toml`; sinks are `stdout`, `file:<path>`, `notification`, or `telegram`. (PR [amd#1371](amd#1371)) - **Agents learn from work they repeat** — after enough successes on the same shape of goal, an agent distills the tool sequence into a reusable procedure and recalls it next time. Runs inside the existing memory pass; nothing to install. (PR [amd#1794](amd#1794)) - **Pick your model once** — `gaia config set default_model <id>` persists across `gaia chat`, `gaia llm`, and `gaia prompt`. An explicit `--model` still wins for a one-off. (PR [amd#1863](amd#1863)) - **RAG reads Word documents** — `.docx` files index like PDF and PPTX, including table cells, nested tables, content controls, hyperlinks, and textboxes, so filled-in form values get indexed. (PR [amd#1866](amd#1866)) - **A new default embedder** — the previous default cannot be loaded by current llama.cpp builds, which broke indexing, code search, and memory embedding on an up-to-date Lemonade. The default is now EmbeddingGemma 300M at the same 768 dimensions. (PRs [amd#1952](amd#1952), [amd#1761](amd#1761), [amd#1748](amd#1748)) - **The Agent Hub shows what an agent is worth** — an agent's page now carries its eval scorecard with a score badge and a code-derived capability matrix. (PRs [amd#1985](amd#1985), [amd#2020](amd#2020), [amd#2066](amd#2066)) - **Lemonade Server 10.10.0** — adds an audio-generation endpoint, lets Windows reuse system ROCm, and inhibits suspend during inference. Two upstream breaking changes are Linux-specific. (PR [amd#1969](amd#1969)) ## Bug Fixes - **`gaia init` said a working Lemonade wasn't installed** (PR [amd#1940](amd#1940)) — modern Lemonade (10.7+) dropped the `lemonade-server` CLI that GAIA probed for. - **Installing the email agent from the Hub failed on every platform** (PR [amd#2086](amd#2086)). - **Bulk triage broke on any real inbox** (PR [amd#2088](amd#2088)) — 60 emails overflowed the 16K context window; the result envelope is now condensed. - **RAG silently indexed nothing** (PR [amd#1979](amd#1979)) — a failed `sentence-transformers` import made every indexing call a no-op. - **Email bodies were truncated at 4,000 characters with no override** (PR [amd#2036](amd#2036)) — MFA codes and precise replies lost content past the cutoff. - **Long threads overflowed the model's context** (PR [amd#2076](amd#2076)). - **A disabled device was treated as usable** (PR [amd#2081](amd#2081)) — a device reporting `available: false`, such as an unpowered NPU, was misread as ready. - **A newly connected mailbox was skipped** (PR [amd#1808](amd#1808)) — mailboxes connected mid-session were not picked up. - **JSON with a `}` inside a string was dropped** (PR [amd#1824](amd#1824)). - **Outlook users were told to reconnect Google** (PR [amd#1757](amd#1757)) — `AGENT_NOT_GRANTED` named the wrong provider. - **The Agent UI hard-crashed on a recoverable GPU crash** (PR [amd#1799](amd#1799)) — it now falls back to software rendering. - **A user-edited memory could be silently downgraded and then wiped** (PR [amd#1958](amd#1958)). - **The builder agent ignored an agent name you had already given** (PR [amd#1981](amd#1981)). - **The landing and hub pages scrolled sideways on phones** (PR [amd#1959](amd#1959)). ## Known Issues - **Inbox pre-scan needs a single mailbox for now** — with both Gmail and Outlook connected, an Agent UI pre-scan errors. Disconnect one in Settings → Connectors; triage itself still spans every mailbox. ([amd#2127](amd#2127)) - **Spam detection under-flags over the REST API** — `/v1/email/triage` uses a narrow sender check rather than the model's reading. The agent's own inbox scanning is unaffected. ([amd#2124](amd#2124)) - **The email agent is beta** — treat its output as a draft to review. It never sends without your confirmation. ## Contributors - [@alexey-tyurin](https://github.com/alexey-tyurin) — skill auto-synthesis / procedural memory (PR [amd#1794](amd#1794)) - [@TravisHaa](https://github.com/TravisHaa) — the `gaia schedule` CLI and cron-based dispatch (PR [amd#1371](amd#1371)) - [@Rohithmatham12](https://github.com/Rohithmatham12) — refresh resolved email backends before multi-mailbox triage (PR [amd#1808](amd#1808)) - [@Osamaali313](https://github.com/Osamaali313) — fix `extract_json_from_text` dropping JSON containing `}` (PR [amd#1824](amd#1824)) - [@eeee2345](https://github.com/eeee2345) — offline model-endpoint guard-proxy integration guide (PR [amd#1809](amd#1809)) - [@somo9909](https://github.com/somo9909) — prerequisites section for the memory guide (PR [amd#1665](amd#1665)) ## Full Changelog **N commits** since v0.21.2: - `<sha>` — <subject> Full Changelog: [v0.21.2...v0.22.0](amd/gaia@v0.21.2...v0.22.0) ``` </details> <details> <summary>What changed in the templates</summary> - The narrative overview paragraph and the `**Why upgrade:**` block are gone — the latter restated `What's New` verbatim. - `What's New` entries are bullets, not `###` prose blocks. - Tone guidance is no longer restated in the skill; it points at CLAUDE.md § How You Communicate. - The skill's embedded example now shows the old prose block as **bad** and the bullet form as **good**. - Emoji removed from the CI prompt (it asked for 🚀 / 🎯 / 🐛 headings against the skill's own no-emoji rule). - Both generators now emit the same sections in the same order, so the file's shape no longer depends on which one ran. - The cap excludes `Bug Fixes` / `Known Issues` / `Contributors` / `Full Changelog`. Those are reference lists sized by how many fixes shipped — capping them would hide work. This was caught by regenerating v0.22.0, which overflowed a whole-file cap purely on its 14 bug-fix bullets. **Follow-up, not in this PR:** the cap lives in prompt text, so it is advisory. Making it a hard check in `util/validate_release_notes.py` would enforce it in CI. </details> ## Test plan - [ ] `python util/validate_release_notes.py <regenerated sample> --tag v0.23.0` exits 0 — passes unmodified, no validator changes in this PR - [ ] `awk '/^## (Bug Fixes|Known Issues|Contributors|Full Changelog)/{exit} {print}' <file> | wc -w` is under 350 (patch) / 600 (minor-major) - [ ] `.github/workflows/claude.yml` parses as valid YAML and its release-notes prompt contains no emoji - [ ] `.claude/skills/gaia-release/SKILL.md` is under 500 lines (498) - [ ] Both generators list the same sections in the same order
Closes #2084
Installing the Email Triage agent from the Agent UI hub failed on every platform: the hub manifest's legacy singular
artifactfield always points at the first-published platform binary (email-agent-darwin-arm64), the installer read only that field, andlanguage: pythonrouted the macOS executable intouv pip install— the exit-2 error in #2084. The installer now selects the right entry fromversions[v].artifacts[]for the host platform and installs a binary as a binary (checksum-verified, atomic,chmod +x), so the only agent in the live hub catalog actually installs — verified end-to-end on a Windows 11 + Radeon machine (the reporter's environment class) and on macOS.Also in the change, because the email install dir doubles as the running sidecar's own binary cache: the UI shuts a running sidecar down before install/uninstall/rollback, a Windows locked-file failure becomes an actionable error instead of a stack trace, updates replace the binary in place (no dir-level backup that would yank a live process's directory), and health/status report a correct binary install as healthy instead of demanding the
gaia.agententry point binaries don't ship. Wheel- and C++-agent behavior is byte-identical (regression-tested). Deferred follow-ups (binary-agent trust gate, wheel-publishing hazards, small install hardening) are tracked in #2085 with the full analysis.Test plan
python -m pytest tests/unit/test_hub_installer.py tests/unit/test_hub_router.py tests/unit/test_hub_lifecycle.py tests/unit/test_hub_compatibility.py -q→ 121 passed (includes the new T1–T14 contract: platform selection, wheel/cpp regression guards, loud no-match errors, sentinel back-compat, locked-file/update paths, sidecar-shutdown hook, kind-aware health, platform-key parity with the sidecar's own mapping)tests/unit/test_hub_catalog.py tests/unit/test_agent_hub_api.py→ 21 passed, 4 skippedpython util/lint.py --all→ ALL QUALITY CHECKS PASSEDEvidence (real hub, cold state —
~/.gaia/agents/emaildeleted before each phase)Before — main (
a02ae714), Windows 11:POST /api/agents/install {"id":"email"}→ install-status:{"id":"email","status":"failed","error":"'uv pip install' failed (exit 2): error: Failed to parse: `...\\gaia-hub-k1pdt_rr\\email-agent-darwin-arm64` ... Expected path to end in a supported file extension: `.whl`, ..."}After — this branch (
924c8449), same box, cold: same request →{"id":"email","status":"completed","phase":"completed","percent":100,"version":"0.4.0","error":null}email-agent.exeSHA-256 =206a9c12…93f8— exact match with the live manifest'swin32-x64artifact;GET /api/agents/email/health→{"state":"healthy"}.🔍 More evidence: locked-file error, update-in-place, macOS
Windows, install while the agent binary is running (holds the exe open) — actionable error instead of a stack trace, and no
.backup/dir is created:{"status":"failed","error":"Could not write email-agent.exe to C:\\Users\\...\\agents\\email: [WinError 5] Access is denied ... The agent appears to be running — close it and retry."}After closing the process, the same request completes and replaces the binary in place (SHA re-verified).
macOS (darwin-arm64), cold: same install →
completed,~/.gaia/agents/email/email-agentwritten with-rwx--x--x, SHA-256 =26bcf05b…bf(exact manifest match), healthhealthy,./email-agent --helpruns.Tested by driving the real
POST /api/agents/install/install-status/healthendpoints ofgaia.ui.serveragainst the live hub on both machines.