Skip to content

feat(lemonade): run a private, self-contained Lemonade Server - #3121

Merged
kovtcharov-amd merged 5 commits into
mainfrom
kalin/lemonade-embeddable-packaging
Aug 31, 2026
Merged

kovtcharov-amd merged 5 commits into
mainfrom
kalin/lemonade-embeddable-packaging

Conversation

@kovtcharov-amd

@kovtcharov-amd kovtcharov-amd commented Aug 28, 2026 •

Copy link
Copy Markdown
Collaborator

Running GAIA has meant first installing Lemonade Server machine-wide with an MSI — admin rights, a shared tray app, and one server every app on the box fights over. gaia lemonade embedded start now gives GAIA its own: it downloads the upstream embeddable build (~5 MB), verifies it against a pinned checksum, and runs it on a port picked at start behind a generated API key that locks everyone else out. No installer, no admin rights, nothing shared. The MSI path is untouched and still serves everything else.

Scoped to the module and its CLI — startup wiring, installer packaging, and R2 publish are deliberately not here, so this is reviewable and verifiable on its own.

Two findings worth knowing before review

ROCm settles the bundling question. Measured on Strix: llama.cpp CPU + Vulkan is 141 MB and covers GAIA's default Gemma-4 and embedding models. ROCm is 4.3 GB and ships per-GPU-architecture (28 targets in upstream's manifest), so it can never be bundled — it stays a per-machine fetch via install-backend.

The reported 10-minute cold start did not reproduce. Four cold starts, including one with no config file and the full stock 228-model catalogue: healthy in 1.6 s every time. So this does not trim the catalogue, and it deliberately leaves no_fetch_executables unset — setting it collapses the advertised catalogue from 204 models to 4 and would break gaia download.

🔍 Technical details
  • lemond takes two positional directories (<cache_dir> <config_dir>), not the single DIR the published docs describe. The lifecycle test exercises the real binary precisely because a mocked subprocess would prove only that we called it, never that the arguments are ones it accepts.
  • The API key is written to an owner-only env.sh/env.ps1 rather than printed — a printed key lands in scrollback, shell history and CI logs. Both that file and state.json are deleted on stop, since credentials naming a dead port would let whatever grabs that port next inherit the trust.
  • Model storage is not duplicated — the private instance reads the same Hugging Face cache, so already-downloaded models appear immediately (Cache built: 204 total, 4 downloaded on first run here).
  • cache/ and config/ are version-independent; only dist/<version>/ is versioned. A Lemonade bump re-downloads the 5 MB server, not gigabytes of backends.
  • Checksums are pinned in EMBEDDABLE_SHA256, with an integration test diffing them against the live release API. This already earned its keep: rebasing onto main's 11.8.1 bump failed the pinning test immediately instead of shipping unverifiable downloads.
  • status() never discards state for a daemon that is merely slow to answer — it distinguishes "gone" from "up but not responding", so a server loading a large backend can still be stopped instead of orphaned.

Test plan

  • pytest tests/unit/test_lemonade_embedded.py — 43 pass (2 POSIX-mode tests skip on Windows)
  • pytest tests/integration/test_lemonade_embedded_lifecycle.py tests/integration/test_lemonade_embeddable_assets.py — 10 pass; downloads and runs the real daemon, asserts unauthenticated and wrong-key requests get 401
  • Cold, from no ~/.gaia/lemonade at all: gaia lemonade embedded start → running in ~11 s including download; status; stop
  • Source the printed env.ps1/env.sh, then hit /api/v1/models — 200 with the key, 401 without
  • gaia lemonade embedded install-backend llamacpp:vulkan, then a real completion against Gemma-4-E4B-it-GGUF
  • install --force while running → refuses; gaia lemonade embedded with no subcommand → exit 1
  • Confirm stop removes the credentials file and leaves no lemond or llama-server behind

@github-actions github-actions Bot added documentation Documentation changes llm LLM backend changes cli CLI changes tests Test changes performance Performance-critical changes labels Aug 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Verdict: Approve with suggestions

GAIA can now download and run its own private Lemonade Server — no installer, no admin rights, no fighting with a machine-wide install — behind gaia lemonade embedded {start,stop,status,install,install-backend}. It's a well-built, self-contained addition: the download is checksum-pinned, the server is locked behind a generated key, and every failure message names the fix. Nothing here blocks merge.

The one thing worth fixing before merge is in the archive-safety check that guards the download. It correctly validates symlinks inside the downloaded archive, but validates hardlinks against the wrong starting directory, so a deeply-nested hardlink pointing outside the install directory could slip past. This is not reachable today — the download is verified against a pinned checksum before it is ever unpacked, and Python's own tar safety filter catches it on most versions — but on the oldest Python this project supports, that check is the only guard. It's a one-line fix.

Two smaller things: the new CLI layer has no automated test (the manual evidence below covers it, but nothing stops a future edit from breaking it), and a live private server isn't yet wired into gaia uninstall / gaia kill, so wiping ~/.gaia would strand a running daemon with no way to stop it.

Real-world evidence

The PR ships an evidence bundle, and it's the real thing — a genuine end-to-end run on a Linux runner against a throwaway GAIA_HOME starting empty (cold state, which is the state a new user is actually in). It downloaded the real 11.8.0 artifact, verified the pinned checksum, started a real detached daemon, and served real HTTP. It also documents what it couldn't prove, which is what makes the rest credible. This evidence is why the verdict is Approve rather than a request for proof.

Install, checksum, and cold-state error paths:

$ gaia lemonade embedded install
INFO | Downloading https://github.com/lemonade-sdk/lemonade/releases/download/v11.8.0/lemonade-embeddable-11.8.0-ubuntu-x64.tar.gz
INFO | Installed embedded Lemonade 11.8.0 to …/gaia-home/lemonade/dist/11.8.0
✅ Embedded Lemonade 11.8.0 installed at …/gaia-home/lemonade/dist/11.8.0
real	0m2.460s

$ gaia lemonade embedded start --no-install     # cold, nothing installed
❌ Embedded Lemonade 11.8.0 is not installed at …/gaia-home/lemonade/dist/11.8.0. Run `gaia lemonade embedded start` without --no-install to download it.
exit=1

All four pinned digests cross-checked against the live GitHub release API — MATCH on macos-arm64, ubuntu-arm64, ubuntu-x64, windows-x64.

The private instance really is private, and the key really is enforced:

$ curl -s -o /dev/null -w "%{http_code}" $BASE/models                                  → 401
$ curl -s -o /dev/null -w "%{http_code}" -H "Authorization: Bearer not-the-key" …      → 401
$ curl -s -o /dev/null -w "%{http_code}" -H "Authorization: Bearer $KEY" $BASE/models  → 200

$ curl -s -H "Authorization: Bearer $KEY" $BASE/health
{"status":"ok","version":"11.8.0","model_loaded":null,"telemetry":{"enabled":false}, …}
HTTP 200

$ stat -c "%a %n" …/lemonade/state.json
600 …/lemonade/state.json

Guard rails, backend install, and stop all behaved:

$ gaia lemonade embedded install --force        # while running
❌ Refusing to reinstall embedded Lemonade while it is running (pid 7804). Run `gaia lemonade embedded stop` first.
exit=1

$ gaia lemonade embedded install-backend llamacpp:cpu
✅ Backend llamacpp:cpu installed into …/lemonade/cache/bin      # 40 MB of real binaries landed

$ gaia lemonade embedded stop  → ✅ stopped   (lemond count: 0, state.json cleared)
$ gaia lemonade embedded stop  → Embedded Lemonade is not running    # no false success

Adjacent surfaces were spot-checked too — gaia --help, gaia mcp status, gaia config get device, and the system-wide lemonade_client/lemonade_launcher imports all still behave.

Marked N/A with a reason: MCP (no MCP surface changed) and the Agent UI screenshot (this PR adds no UI route) — both correct, no screenshot was owed here.

Explicitly deferred — the verdict rests on static review for these: real inference through the embedded server (pending strix-halo lane); the GPU/NPU backends llamacpp:vulkan / flm:npu / llamacpp:rocm (only the CPU backend was installed, so the install mechanism is proven but the hardware-specific backends are not); and the entire Windows and macOS code paths — the .zip branch, tasklist/taskkill process handling, and .exe suffixes never executed. The Windows process-handling code in particular has only unit-level coverage.

🔍 Technical details

Issues

🟡 Hardlink linkname is validated against the wrong base directory (src/gaia/llm/lemonade_embedded.py:260)

For a symlink, tar resolves linkname relative to the link's own directory, so joining with os.path.dirname(member.name) is right. For a hardlink, tar resolves linkname relative to the archive root (TarFile._extract_member sets tarinfo._link_target = os.path.join(path, tarinfo.linkname)), so the dirname prefix inflates the path and a sufficiently nested member can validate as in-tree while its real target is outside. E.g. name="a/b/c/d", linkname="../../etc/passwd" checks as dest/a/etc/passwd (passes) but links dest/../../etc/passwd.

Not exploitable as shipped: install() verifies the pinned SHA-256 before _extract, and tarfile's data filter independently rejects out-of-tree links wherever data_filter exists. But setup.py declares python_requires=">=3.10", and 3.10.0–3.10.11 lack data_filter, so on those interpreters this check is the only guard. Worth making correct since it's one line.

                if member.issym():
                    _safe_members_ok(
                        [os.path.join(os.path.dirname(member.name), member.linkname)],
                        dest,
                    )
                elif member.islnk():
                    # A hardlink's linkname is relative to the archive root.
                    _safe_members_ok([member.linkname], dest)

🟡 No automated test for the new CLI layer (src/gaia/cli.py:7160-7255)

handle_lemonade_command, handle_lemonade_embedded_command, and _print_embedded_status are ~100 lines of new user-facing logic with no test. tests/unit/test_lemonade_embedded.py is thorough on the module but stops at the class boundary; tests/unit/cli/ exists for exactly this shape of test (see test_cli_schedule.py), and test_remedy_commands_are_runnable.py sweeps remedy strings from lemonade_launcher but not from this module. The evidence bundle covers it manually — the gap is regression protection, not correctness. A parser-level test that every gaia lemonade embedded … remedy string in lemonade_embedded.py parses (the pattern in test_remedy_commands_are_runnable.py::_assert_parses) would be cheap and catch the real failure mode.

🟢 "install it with" points at start, not install (src/gaia/cli.py:7251) — start does auto-install, but there's a literal install subcommand and the label says "install it with".

            print("           install it with `gaia lemonade embedded install`")

🟢 Only EmbeddedLemonadeError is caught, so some failures print a traceback (src/gaia/cli.py:7221) — subprocess.Popen on a daemon lacking the exec bit (noexec mount, restrictive umask) raises PermissionError, and open(self.log_path, "ab") can raise OSError; both escape as raw tracebacks rather than the actionable message every other path in this module produces. Adding except OSError as e: with a message naming manager.log_path would close it.

🟢 A live instance isn't reachable from gaia uninstall or gaia kill --lemonade — everything lives under ~/.gaia, so gaia uninstall will happily delete dist/ and state.json out from under a running lemond, orphaning the daemon and the only record of its pid/port/key. gaia kill --lemonade shells out to lemonade-server stop, which the embedded daemon never registers with. Follow-up rather than blocking — the PR is explicitly staged ("Automatic preference is coming with the startup wiring") — but worth an issue so it doesn't get lost.

Pattern note (no action needed per-site): two small duplications worth one sweep — --timeout defaults to a literal 60.0 at cli.py:2576 while _START_TIMEOUT = 60.0 is the module's constant; and gaia_home() (lemonade_embedded.py:138) is now the third copy of $GAIA_HOME resolution, alongside _gaia_home() in installer/uninstall_command.py:86 and _gaia_state_dirs() in security.py:81 — with subtly different semantics (this one expandvars, uninstall's doesn't). A shared helper would stop them drifting.

Strengths

  • The integration test is written against the failure it actually had to catch. Its docstring names it: upstream's docs describe one positional DIR, but 11.8 takes two (lemond <cache_dir> <config_dir>), and a mocked subprocess would have proven only that GAIA called lemond, never that the arguments are ones lemond accepts. That's exactly the boundary-contract discipline CLAUDE.md asks for, and it's rare to see it stated so plainly.
  • Failure modes were designed, not discovered. A daemon that's alive but slow to answer gets unresponsive_pid and keeps its state file (losing it would orphan the process with no way to stop it); _daemon_alive checks the image name so a recycled pid is never signalled; the state file is os.open-ed 0600 rather than chmod-ed after, closing the window where the key is world-readable; _kill_tree takes the process group so llama-server children holding GPU memory don't leak. Each has a test.
  • The comments explain constraints, not code. "cache/ is deliberately not versioned — backends run 141 MB to 4.3 GB" and the note on why no_fetch_executables is absent (it would collapse the catalogue from 204 models to 4 and break gaia download) are the kind of WHY that stops a future contributor from "cleaning up" a load-bearing decision — and the second one has a test pinning it.
  • Every error names what failed, what to do, and where to look. No silent fallbacks anywhere in the module, and TestFailureMessages asserts the remedies are present rather than trusting them.

@kovtcharov-amd
kovtcharov-amd force-pushed the kalin/lemonade-embeddable branch from a23ef72 to 88790a5 Compare August 28, 2026 04:46
Base automatically changed from kalin/lemonade-embeddable to main August 28, 2026 15:44
@kovtcharov-amd
kovtcharov-amd force-pushed the kalin/lemonade-embeddable-packaging branch from e82e527 to 85f7ebd Compare August 28, 2026 16:39
Comment thread src/gaia/cli.py Fixed
@github-actions

Copy link
Copy Markdown
Contributor

Verdict: Approve with suggestions

One doc correction to make before merge; everything substantive is well-built.

The embedded Lemonade implementation handles the security surface thoughtfully: the state file (which holds the API key) is created at 0600 rather than chmod'd after the fact, SHA-256 is verified before extraction, both zip and tar members are checked for path traversal, the API key is rotated per-start so concurrent callers can't accidentally share state, and the alive check validates by process name rather than PID existence so a recycled PID can't be mistaken for the daemon. Tests are solid — unit tests cover every state-machine path without a live server, and the integration tests exercise the real lemond argument contract (catching the two-positional-arg change that a stub would have missed).

🟢 The sample start output in the CLI reference docs shows version 11.8.0, but LEMONADE_VERSION in src/gaia/version.py is 11.8.1. Users comparing their output to the docs will see a version mismatch.

🔍 Technical details

docs/reference/cli.mdx, the sample output block under "start prints the two variables you need":

✅ Embedded Lemonade 11.8.0 running on http://localhost:62232/api/v1

Should read 11.8.1 to match LEMONADE_VERSION.

Two non-blocking observations:

  • _extract in lemonade_embedded.py:553 validates symlink targets inside tar members but not inside zip members — zf.namelist() returns file names only, so a zip entry with a symlink pointing outside the destination would pass _safe_members_ok. The SHA-256 pre-check mitigates this in practice for the trusted upstream artifact.
  • stop() reads state twice: once inside self.status() and once in the explicit self._read_state() that follows. The second read is harmless — if status() cleared state because the process was dead, both state is None and not (current.running or current.unresponsive_pid) would be true anyway — but the double-read is redundant.

@github-actions

Copy link
Copy Markdown
Contributor

🟢 Approve with suggestions

This PR adds a private, self-contained Lemonade Server that GAIA manages independently of any system-wide install — a solid, well-scoped feature. The security story is good (SHA-256 verification before unpack, archive path-traversal checks, 0600 state file, secrets.token_urlsafe for the API key), the error messages are actionable, and the test suite covers unit, integration, and real-lifecycle paths. Two small doc gaps are worth a quick fix before or after merge.

Suggestions (nits only — no blockers):

🟢 The CLI reference example output shows 11.8.0 but LEMONADE_VERSION in src/gaia/version.py is 11.8.1 — users following the docs will see a different version string than the example shows.

🟢 install-backend requires the server to already be running (gaia lemonade embedded start first), but nothing in the command table or the "Inference backends" section says so. The error message is clear if you hit it, but a single parenthetical in the table description would save the round-trip.

🔍 Technical details

Version mismatch in doc example:

docs/reference/cli.mdx line ~29 shows:

✅ Embedded Lemonade 11.8.0 running on http://localhost:62232/api/v1

LEMONADE_VERSION in src/gaia/version.py is "11.8.1". Suggest updating the example string to match.

install-backend prerequisite missing from docs:

The command table in docs/reference/cli.mdx describes install-backend SPEC as:

Download an inference backend, e.g. llamacpp:vulkan

EmbeddedLemonade.install_backend() (lemonade_embedded.py:1275) raises if status.running is False. The error message is informative ("Start it first with gaia lemonade embedded start"), but a doc reader would naturally try:

gaia lemonade embedded install
gaia lemonade embedded install-backend llamacpp:vulkan   # ← fails, server not started

A short parenthetical like "(server must be running — start first)" in the table cell avoids this.

Archive security note (no action required):

Zip symlink targets are not checked against _safe_members_ok — only names are. This is fine because (a) the SHA-256 is verified before any extraction and (b) the .zip format is Windows-only where Python's zipfile does not extract symlinks as symlinks. Defense-in-depth is already sound.

@github-actions

Copy link
Copy Markdown
Contributor

Skill audit

Skill Verdict Claimed tier Cleared tiers Findings Rules
hub/agents/email/npm ✅ ALLOW experimental experimental, community 2 medium, 1 info code.suppression, supply.undeclared_dependency

✅ All audited skills cleared the tier they claim.

Per-finding detail is withheld here on purpose. Read it in the Security > Code scanning tab, or download the skill-audit-reports artifact from this run. Offending source text is withheld from CI everywhere — reproduce it locally with gaia skill audit <dir> --show-snippets.

Comment thread src/gaia/cli.py Fixed
Comment thread src/gaia/cli.py Fixed
@github-actions

Copy link
Copy Markdown
Contributor

Verdict: Approve with suggestions 🟢

Private embedded Lemonade works correctly and is well-secured. The state file gets 0600 permissions at creation (not chmod-after, which would leave a window), archive extraction validates symlinks, hard links, and device nodes, and the API key is generated with secrets.token_urlsafe. Three small nits below, nothing blocking.

🔍 Technical details

Nit 1 — test_the_model_catalogue_is_not_truncated assertion too weak (tests/integration/test_lemonade_embedded_lifecycle.py:1605)

The test asserts isinstance(body.get("data"), list) — but a server with no_fetch_executables=true would also return a list (just 4 models). The unit test test_does_not_set_no_fetch_executables is the real guard here, so this isn't a gap, but the integration assertion doesn't prove what the test name promises. Suggested fix:

assert isinstance(body.get("data"), list)
assert len(body["data"]) > 4, (
    "model catalogue looks truncated — check no_fetch_executables config"
)

Nit 2 — _github_reachable duplicated (tests/integration/test_lemonade_embeddable_assets.py:1415 and tests/integration/test_lemonade_embedded_lifecycle.py:1525)

Both integration test files define their own identical _github_reachable(). Worth extracting to tests/integration/conftest.py or a shared fixture so the logic drifts in sync.

Nit 3 — install-backend docs omit the running-server requirement (docs/reference/cli.mdx, commands table)

The command table entry just says "Download an inference backend into the private cache" with no hint that the server must be started first. The error message when it fails is clear, but users expect backend install to be a pre-start step (like apt-get install). Add a sentence: "The embedded server must be running (start first). Backends remain on disk across restarts."

Ovtcharov added 2 commits August 28, 2026 10:43
GAIA could only reach a Lemonade Server someone had installed machine-wide
via the MSI, which needs admin rights and is shared with every other app on
the box. `gaia lemonade embedded start` now downloads the upstream embeddable
build (~5 MB), verifies it against a pinned SHA-256, and runs it on a port
picked at start behind a generated API key, so nothing else can reach it.

The system-wide install is untouched and keeps serving everything else;
nothing prefers the embedded instance automatically yet.

Backends are not in the artifact and are fetched per-machine: llama.cpp CPU
plus Vulkan is 141 MB and covers GAIA's default Gemma-4 and embedding models,
which is why `install-backend` exists. ROCm was measured at 4.3 GB and ships
per-GPU-architecture, so bundling it is off the table.

Two upstream details cost real time to establish and are encoded here:
lemond takes two positional directories (`<cache_dir> <config_dir>`), not the
single DIR the published docs describe, and `no_fetch_executables` is left
unset because setting it collapses the advertised catalogue from 204 models
to 4 and would break `gaia download`.

Model storage is not duplicated: the private instance reads the same Hugging
Face cache as any other Lemonade, so already-downloaded models appear at once.
Backends live in a version-independent cache directory so a Lemonade bump
re-downloads the 5 MB server rather than gigabytes of backends.
Printing the generated key put a live credential into terminal scrollback,
shell history and any CI log that captured the run — CodeQL flagged it as
clear-text logging of sensitive information, correctly. `start` now writes
the URL and key to an owner-only file and prints the command to source it.
The file is removed on stop, because credentials naming a dead port are
worse than none: whatever grabs that port next inherits the trust.

Also refreshes the pinned embeddable checksums for Lemonade 11.8.1, which
main moved to after this branch was cut. The pinning guard caught the stale
digests on rebase, which is what it was built to do.
@kovtcharov-amd
kovtcharov-amd force-pushed the kalin/lemonade-embeddable-packaging branch from 763ceac to 75c27d8 Compare August 28, 2026 17:52
The embeddable artifact was unpacked with tarfile.extractall. Member names
were checked first, but that check ran against an empty directory: a symlink
member created during extraction becomes a path component the next member is
written through, so the write follows it out of the target even though the
member's own name resolved inside. The tar data filter caught this, but it
only exists from Python 3.10.12 on, and setup.py accepts >=3.10 -- so on a
3.10.0-3.10.11 interpreter the download could write anywhere the user could.

Extraction is now explicit. Every member is resolved and containment-checked,
regular files are written by hand with setuid/setgid/sticky masked off, and
symlinks and hard links are created only once every file is on disk, so no
write can follow one out of the tree. Device and special members are refused,
and the zip path fails loudly on a traversing name instead of letting zipfile
silently rewrite it. Behaviour no longer varies with the interpreter.

Also makes the two files holding the API key unconditionally owner-only. The
mode argument to open applies only when it creates the file, so a state.json
or env file left behind by an earlier build kept its old, possibly readable,
permissions.
@kovtcharov-amd

Copy link
Copy Markdown
Collaborator Author

🔒 SECURITY — cc @kovtcharov-amd

The embeddable artifact is now unpacked by validating each archive member and writing it out explicitly, rather than handing the whole archive to a bulk extract. Previously the safety of that step depended on an interpreter feature that does not exist across the whole Python range setup.py supports, so on the older end of that range a tampered download could write outside the install directory. There is no scanner suppression anywhere in the change — the extraction itself was fixed.

Two smaller things came with it: the files holding the instance's API key are now unconditionally owner-only (the previous code set that mode only when it created the file, so one left behind by an earlier build kept its old permissions), and the test suite gained a case that fails against the previous extraction path.

I also confirmed the checksum contract this PR claims: the digest is verified before anything is unpacked, and a mismatch aborts and discards the download rather than falling through — matching what the npm side does.

@github-actions

Copy link
Copy Markdown
Contributor

Verdict: Approve with suggestions

The embedded Lemonade implementation is solid — SHA-256 pinning before extraction, explicit archive-traversal validation that blocks symlinks and device nodes from tar archives, 0600-mode secret files created with O_EXCL to avoid a chmod race, process-group kill to clean up GPU-allocated backends, and tight error messages that name the remedy. The test suite is thorough. Two things worth fixing before merge.


🟡 The zip extraction path has no traversal safety test

TestArchiveSafety tests all six attack scenarios against .tar.gz but never against .zip. The zip path IS protected — _destination_for raises before handle.extract is called — but the test class's headline claim ("Downloaded archives must not be able to write outside the target") is incomplete without it. The Windows-only artifact ships as a zip, so this is the exact path Windows users exercise. Add at least one parametrized .zip case alongside the existing tar ones.

🟢 env_load_command() doesn't quote the path

If GAIA_HOME contains a space, the user-facing copy-paste command (source /path with spaces/env.sh or . C:\Some Path\env.ps1) fails in the shell before the key is ever loaded. Quoting costs nothing.

🔍 Technical details

Zip traversal test gap (tests/unit/test_lemonade_embedded.py)

Add a zip case alongside the existing parametrized ones in TestArchiveSafety.test_rejects_members_escaping_the_destination, or a separate test:

def test_zip_rejects_members_escaping_the_destination(self, tmp_path):
    archive = tmp_path / "evil.zip"
    with zipfile.ZipFile(archive, "w") as zf:
        zf.writestr("../escape.txt", "")
    with pytest.raises(EmbeddedLemonadeError) as exc:
        _extract(archive, tmp_path / "dest")
    assert "escapes" in str(exc.value)
    assert not (tmp_path / "escape.txt").exists()

zipfile.writestr("../escape.txt", ...) stores the name as-is, so namelist() returns "../escape.txt" and _destination_for sees it correctly.


env_load_command() path quoting (src/gaia/llm/lemonade_embedded.py:1152-1160)

# current
return f"source {self.env_path}"
return f". {self.env_path}"

# suggested
return f"source '{self.env_path}'"      # POSIX
return f'. "{self.env_path}"'            # PowerShell

The POSIX single-quote form also handles paths with $ or backticks that would otherwise be shell-expanded. The Windows double-quote form is the standard PowerShell dot-source convention.

…hecked

The tar member carrying the payload was added without setting TarInfo.size, so
it wrote as zero bytes. The containment assertion still held -- the escape is
what the test is for -- but the follow-up check that the file lands inside the
destination with its content intact compared against an empty string, and only
POSIX runs the case at all.
@kovtcharov-amd
kovtcharov-amd force-pushed the kalin/lemonade-embeddable-packaging branch from 07b485f to 4114ad1 Compare August 28, 2026 18:18
The `gaia lemonade embedded` commands had no tests. They now have them,
including a sweep that parses every `gaia ...` command the module tells users
to run — a remedy the parser rejects leaves a stuck user stuck. That sweep
immediately caught `status` telling users to install with `start` when there
is a literal `install` subcommand.

Failures that are not EmbeddedLemonadeError — a noexec mount or read-only
home surfacing as PermissionError out of Popen — printed a raw traceback
instead of a sentence. They now get the same actionable treatment as every
other failure in this module.
@github-actions

Copy link
Copy Markdown
Contributor

Verdict: Approve with suggestions

The embedded-Lemonade feature is well-built: SHA-256 pinning + member-by-member archive validation, API key never on stdout, 0600 permissions on both the state file and the env file, fail-loud error messages, and comprehensive test coverage including a dedicated test that every error-message remedy command is parseable by the real CLI. One test assertion needs tightening before it can do its job.


🟡 The catalogue-size test will pass even when the feature it guards is broken.

test_the_model_catalogue_is_not_truncated asserts only isinstance(body.get("data"), list). The comment above it explains that omitting no_fetch_executables keeps the catalogue at ~204 models; setting it collapses to 4. But an assertion that accepts an empty list or a 4-item list won't catch the regression it's here to prevent. Add a lower-bound count so the assertion actually fails when the flag is accidentally enabled.

🔍 Technical details

tests/integration/test_lemonade_embedded_lifecycle.py:1714

# Current
assert isinstance(body.get("data"), list)

# Suggested — threshold of 10 is well above 4 (truncated) and well below 204 (full)
data = body.get("data", [])
assert isinstance(data, list) and len(data) > 10, (
    f"Expected >10 models (catalogue not truncated); got {len(data)}. "
    "Check that no_fetch_executables is absent from _LEMOND_CONFIG."
)

Everything else reviewed:

  • _extract_tar member-by-member extraction with deferred links is correct; the symlink-redirect test (d/hop -> . + d/hop/../../pwned.txt) validates the two-phase write order.
  • _extract_zip pre-checks every name with _destination_for before calling handle.extract(). Absolute paths (/etc/passwd) are caught because Path(dest) / "/etc/passwd" resolves outside dest, so the check raises before extraction.
  • _write_state / _write_env_file both use O_CREAT | O_EXCL + 0o600, preventing a world-readable window. Stale files are unlink(missing_ok=True)-ed first so the mode applies on fresh creation.
  • _kill_tree sends SIGTERM to the whole process group (Linux killpg) / uses taskkill /T /F (Windows), so llama-server children holding GPU memory are cleaned up.
  • Remedy commands embedded in error messages are validated by test_every_gaia_command_in_the_module_parses, which extracts backtick-quoted gaia … strings from the source and feeds them through the real parser.

@kovtcharov-amd
kovtcharov-amd added this pull request to the merge queue Aug 31, 2026
Merged via the queue into main with commit d4666b8 Aug 31, 2026
48 checks passed
@kovtcharov-amd
kovtcharov-amd deleted the kalin/lemonade-embeddable-packaging branch August 31, 2026 16:02
kovtcharov-amd pushed a commit that referenced this pull request Sep 3, 2026
…LI list

CLAUDE.md taught every agent and contributor to start the backend with
`lemonade-server serve`. Lemonade 10.7/10.8 removed that CLI, so the binary
does not exist on a current install — five open issues (#3160, #3178, #3189,
#3204, #3208) report it. The block now leads with `gaia init`, which is the
only thing in the tree that auto-starts the server, and states plainly that
the runtime path only checks. Callers that need to print a start instruction
are pointed at `describe_start_hint()` rather than hard-coding a command.

The document also contradicted itself on GaiaAgent: line 689 said the #696
rename had "not yet landed" while the Agent Implementations table 100 lines
above already described the resolved outcome. #696 is closed and
`class GaiaAgent(ChatAgent, ...)` exists.

Remaining fixes, each verified against the tree rather than the old text:

- `gaia lemonade embedded` (#3121) was shipped but absent from the CLI list.
- The `gaia mcp`, `gaia config`, and `gaia agent` brace-lists each omitted
  real subcommands; corrected against the argparse subparsers.
- "EmailTriageAgent explicitly uses DEFAULT_MODEL_NAME" was wrong — it
  resolves `gemma4-it-e2b-FLM` on an NPU when that model is servable. The
  adjacent "exactly one (model, ctx_size) pair is ever resident" claim was
  reworded so the two bullets no longer contradict each other.
- The VLM bullet credited a deleted EMR agent; retargeted at the real
  code defaults, not `vlm_client.py`'s stale docstring.
- Six tracked `src/gaia/` packages (daemon, factory, hub, schedule, sidecar,
  skills) plus `hub/`, `tui/` and `util/` were missing from the structure
  tree, which the document leans on elsewhere.
- Two references to things that no longer exist: `DocumentQAAgent` /
  `FileIOAgent` in the eval-trigger list, and a `gaia_agent_chat/tools/`
  directory in the code-reuse checklist.

Scoped to CLAUDE.md. The same `lemonade-server serve` string appears 154
times across 97 other tracked files; that sweep is separate and the issues
above still track it.
pull Bot pushed a commit to bhardwajRahul/gaia that referenced this pull request Sep 8, 2026
…LI list (amd#3311)

CLAUDE.md is the file that teaches every agent and contributor how this
repo works, and it was teaching a command that no longer exists. The
"Running GAIA" block told you to start the backend with `lemonade-server
serve` — Lemonade 10.7/10.8 removed that CLI, so on a current install
the binary simply isn't there. Five open issues report it (amd#3160, amd#3178,
amd#3189, amd#3204, amd#3208). The same document also said the GaiaAgent rename
had "not yet landed" while its own Agent Implementations table 100 lines
above described the finished result, and it omitted `gaia lemonade
embedded` entirely despite that shipping in amd#3121. After this change the
start instructions match what the code actually does, the GaiaAgent
entry states the resolved outcome, and the CLI list covers what `gaia
-h` really offers.

Every claim was re-derived from the tree rather than from the old text,
which turned up more than the three known defects — most notably that
"EmailTriageAgent explicitly uses `DEFAULT_MODEL_NAME`" is false (it
picks the NPU FLM model when one is available), and that the bullet
directly below it asserted exactly one model is ever resident. Those two
contradicted each other and are now reconciled.

There is no single command to substitute for `lemonade-server serve`,
which is the interesting part: how the server starts depends on the
install. `gaia init` is the only thing in the tree that auto-starts it —
the normal runtime path only checks and errors out. So the doc now
points writers at `describe_start_hint()` instead of inviting the next
person to hard-code a fresh wrong command.

**This is scoped to CLAUDE.md only.** The `lemonade-server serve` string
still appears 154 times across 97 other tracked files, including
`docs/reference/dev.mdx:230`. That sweep is deliberately not done here
and the issues above still track it.

<details>
<summary>🔍 Technical details</summary>

Evidence for the replacement start instruction, per the request to cite
it:

```
$ gaia lemonade --help
usage: cli.py lemonade [-h] {embedded} ...
    embedded  Manage GAIA's private, self-contained Lemonade instance

$ gaia lemonade embedded --help
usage: cli.py lemonade embedded [-h] {start,stop,status,install,install-backend} ...
```

- `src/gaia/llm/lemonade_launcher.py:6` — "Modern Lemonade Server
(10.7/10.8) removed the `lemonade-server` CLI";
`_classify_kind_from_name` returns `"legacy"` for it and
`build_start_command` only emits `serve` for a resolved legacy install.
- `describe_start_hint()` (`:324`) is the platform-correct renderer; it
returns `command=None` rather than naming a binary the host lacks.
- Auto-start is `gaia init` only:
`src/gaia/installer/init_command.py:1439`/`:1443` →
`_auto_start_server`. The runtime path `LemonadeManager.ensure_ready`
returns `False` at `src/gaia/llm/lemonade_manager.py:692` when the
server is down. (`lemonade_manager.py:329` prints "GAIA will
automatically start Lemonade Server if installed" — that string is also
inaccurate, but it's a code fix, out of scope here.)
- `class GaiaAgent(ChatAgent, ...)` at
`hub/agents/gaia/python/gaia_agent/agent.py:211`; amd#696 is closed.
- EmailTriageAgent: `agent.py:913` → `resolve_default_email_model()`
(`model_select.py:132`), returning `gemma4-it-e2b-FLM` only when an NPU
is present *and* the model is servable.
- Brace-lists corrected by argparse introspection, not by reading
source: `gaia mcp` gained `tui`, `gaia config` gained `show`, `gaia
agent` was listed as `{export|import}` but has 13 subcommands.
- Structure tree: added six tracked `src/gaia/` packages (`daemon`,
`factory`, `hub`, `schedule`, `sidecar`, `skills`) plus `hub/`, `tui/`,
`util/`, all confirmed via `git ls-files` — `ls` is misleading here
because `src/gaia/agents/` still holds `__pycache__` for agents deleted
by amd#2995.
- Dropped references to `DocumentQAAgent` / `FileIOAgent` (zero hits in
the tree) and to `hub/agents/chat/python/gaia_agent_chat/tools/` (the
package is flat).

Findings deliberately **not** changed:
- `gaia eval` has `{agent,benchmark,sessions,code}` but the doc lists
only `gaia eval agent`. It presents no brace-list, so it is incomplete
rather than wrong; expanding it is curation, not correction.
- `src/gaia/llm/vlm_client.py:66`'s docstring claims a Qwen3-VL default
while the code at `:73` uses Gemma-4-E4B. A code bug, not a CLAUDE.md
one.
- `init_command.py:1451` hard-codes the Windows tray prose instead of
calling `describe_start_hint()`, so the "single source of truth" framing
was softened rather than asserted.
- Root dirs `cpp/`, `eval/`, `website/`, `workers/`, `installer/`,
`examples/`, `data/`, `tools/`, `skills/` are also absent from the
structure tree; adding all of them is a restructure, which this pass
avoids.
</details>

## Test plan

- [ ] `python util/check_doc_links.py` passes (2340 links, 0 broken; the
2 warnings are pre-existing external-URL timeouts unrelated to this
change).
- [ ] Every relative link, `#anchor`, and backticked
`src|hub|tests|docs|util/...` path in CLAUDE.md resolves against `git
ls-files` — verified, zero misses.
- [ ] `gaia lemonade --help` and `gaia lemonade embedded --help` match
the documented brace-list (output above).
- [ ] `python -m pytest tests/unit/test_no_stale_agent_paths.py
tests/unit/test_remedy_commands_are_runnable.py
tests/unit/test_amd_gaia_urls.py` passes.
- [ ] Confirm no hunk touches "How You Communicate", "Version Control
Guidelines", or the PR-description rules — hunks land only in
Development Standards, Testing Philosophy, Common Development Commands,
Project Structure, Architecture, CLI Commands, and Roadmap & Plans.

Co-authored-by: Ovtcharov <[email protected]>
@kovtcharov-amd kovtcharov-amd mentioned this pull request Sep 14, 2026
11 of 12 tasks
github-merge-queue Bot pushed a commit that referenced this pull request Sep 16, 2026
# GAIA v0.24.0 Release Notes

## Breaking Changes

- **Thirteen per-task agents were removed** — `analyst`, `blender`,
`browser`, `code`, `doc-search`, `docker`, `docqa`, `emr`, `fileio`,
`jira`, `routing`, `sd`, `summarize`; it's a `SKILL.md` in `hub/skills/`
on the flagship now. Installing one by id fails — use `gaia hub install
gaia --trust` and load the matching skill. (PR
[#2995](#2995))
- **The TUI control API dropped its hub-browser fields** — `view` is now
`splash | preflight | chat`; `hub_tab`, `hub_tab_index`,
`selected_agent_id`, `visible_agent_ids`, `filtering`,
`can_return_to_hub` are gone, replaced by `blocker`. Anyone driving the
TUI over this API needs to update. (PR
[#3120](#3120))
- **`@tool(name=..., description=...)` no longer works** — the decorator
rejects unrecognized keywords instead of silently discarding them. Use
`@tool()`; name and description come from the function. (PR
[#3252](#3252))
- **`gaia telegram start` now requires `--allowed-users`**, no opt-out —
it used to start (and reply to anyone) without one. (PR
[#3306](#3306))
- **`gaia api --host` beyond loopback with no key now refuses to
start**, and `GAIA_API_KEY` gates chat completions too. (PR
[#3612](#3612))

## What's New

- **`gaia hub install gaia --trust` actually installs and runs the
flagship agent** — the daemon had no sidecar entry for it, the
installers didn't ship its binary, and `gaia init` set up the wrong
agent. All three are fixed. (PRs
[#3031](#3031),
[#3146](#3146),
[#3330](#3330),
[#3125](#3125),
[#3120](#3120))

- **The agent draws pictures, summarizes meetings, and orients itself
first** — "draw me a red bicycle" reaches the image tools; `summarize
this meeting: standup.mp4` returns a transcript with action items; and
every task scans the project first. Skills load themselves, and
corrections are learned into memory, not hand-edited into `SKILL.md`.
(PRs [#3073](#3073),
[#3597](#3597),
[#3405](#3405),
[#3010](#3010),
[#3023](#3023))

- **Every answer states whether it was checked** — the agent names what
it ran and what passed, not just reporting success. `--trace` in the TUI
records every tool call so a wrong answer can be replayed. (PRs
[#3397](#3397),
[#3579](#3579))

- **The TUI takes the mouse, draws to full width, and can go cloud** —
wheel-scroll, clickable links, no more 80-column wrapping, and a local,
Fireworks, or AMD Gateway model via Lemonade. (PRs
[#3699](#3699),
[#3006](#3006),
[#3672](#3672))

- **Run Lemonade without the machine-wide installer** — `gaia lemonade
embedded start` runs your own Lemonade Server, no admin rights needed.
(PR [#3121](#3121))

- **Mine your own Claude Code sessions for usage stats** — a
deterministic, LLM-free pipeline turns your `~/.claude/projects/`
transcripts into tool-usage, failure, and cost reports. See the [Session
Analytics guide](https://amd-gaia.ai/docs/reference/session-analytics).
(PRs [#3111](#3111),
[#3782](#3782))

## Security

- **Any web page you visited could drive GAIA's local servers** — a
cross-origin request could start a tunnel, poison your RAG store, or
send mail; a document link could make the chat agent fetch cloud
metadata or the daemon's loopback API. Middleware now enforces
`Origin`/`Host` checks everywhere, and web tools refuse private/loopback
redirects. (PRs [#3366](#3366),
[#3612](#3612))
- **A Telegram bot with no allowlist replied to anyone on the platform**
(the documented default) — off-allowlist users are now refused before a
session or model call; the bot's tool surface is chat-only. (PR
[#3306](#3306))
- **Attaching a document could silently widen the agent's read scope to
its whole parent directory** — the grant is now the file itself; reads
gained a credential denylist, and writes refuse shell rc files,
PowerShell profiles, and git hooks. (PR
[#3594](#3594))
- **A chat turn could plant `system`/`permission` rows into every future
prompt** — only onboarding/admin paths can write them now. (PR
[#3614](#3614))

## Bug Fixes

A selection of the user-visible fixes this release — the full list is in
the changelog below.

- **The flagship agent's core model floor now matches what can actually
run it** (PR [#3055](#3055)) — installs
no longer point at a Lemonade version too old to serve the agent.
- **A one-shot `/query` run no longer leaks an agent process** (PR
[#3079](#3079)).
- **The npm sidecar no longer attaches to a foreign server** (PR
[#3078](#3078)) — it now verifies the
server it finds is actually its own before using it.
- **A turn parked on a confirmation prompt no longer hangs when stdin
closes** (PR [#3080](#3080)) — the agent
ends the turn instead of waiting forever.
- **Telegram's background polling survives** (PR
[#3272](#3272)) — the adapter no longer
silently stops receiving messages.
- **`gaia uninstall --purge` removes the embedded Lemonade runtime it
installed** (PR [#3277](#3277)) —
previously a full purge left `~/.gaia/lemonade` behind entirely; a live
embedded daemon must be stopped first.
- **Outlook and Gmail search operators translate correctly for the email
agent** (PRs [#3042](#3042),
[#3562](#3562),
[#3619](#3619)) — a query that used to
fail silently or match the wrong messages against Outlook's Graph API
now works or fails loudly.
- **RAG indexing honors a document's actual success flag** (PR
[#3678](#3678)) — a failed index no
longer gets reported as indexed at every call site that checked it.
- **Claude tool-call history survives across turns** (PR
[#3410](#3410)) — a multi-turn tool
conversation no longer loses earlier tool results.
- **An ambiguous edit is refused instead of silently changing the first
match** (PR [#3396](#3396)) —
`edit_file` asks for a more specific match rather than guessing which
occurrence you meant.
- **A port collision between the MCP bridge, Agent UI, TUI, and Telegram
is resolved** (PR [#3604](#3604)) — the
four no longer fight over the same default port.
- **Telegram reports unsupported media types instead of failing
silently** (PR [#3263](#3263)).
- **`GET /health` reports real component status** (PR
[#2601](#2601)) — it used to report `ok`
even with a dead Lemonade backend; it now reports LLM and RAG status
too.
- **A `.bak` backup file could be imported as the module it backed up**
(PR [#3748](#3748)) — `.bak` now goes
last in the filename, so pytest no longer tries to collect a test file's
own backup.
- **A PowerShell sink could execute untrusted text instead of just
displaying it** (PR [#3359](#3359)) — an
apostrophe in an indexed document name, or in a `notify_desktop`
message, ran as code; both now pass values out-of-band.
- **`--scopes` could request an OAuth scope outside a connector's
declared ceiling** (PR [#3247](#3247)) —
the CLI's verbatim-scopes path skipped the check the Agent UI already
had; both now enforce it.

## Contributors

Thanks to the community members who contributed to this release:

- [@mikemikimike](https://github.com/mikemikimike) — Telegram
background-polling and media-handling fixes, embedded-Lemonade uninstall
cleanup, and TUI init-process reaping (PRs
[#3272](#3272),
[#3277](#3277),
[#3271](#3271))
- [@itomek](https://github.com/itomek) — custom-agent guide fixes and CI
reliability work, including provisioning the dev install in Claude Code
cloud sessions (PRs [#3317](#3317),
[#3033](#3033))
- [@Hashim1999164](https://github.com/Hashim1999164) — hub agent pages
showing the GAIA install path alongside npm, structured JSON for
unexpected email API errors, and Outlook Graph query-escaping fixes (PRs
[#3151](#3151),
[#3046](#3046),
[#3021](#3021))
- [@AmirF194](https://github.com/AmirF194) — Outlook/Gmail
search-operator translation for the email agent (PRs
[#3042](#3042),
[#3562](#3562),
[#3619](#3619))
- [@sujikathir](https://github.com/sujikathir) — the `/health`
component-status endpoint and a Claude tool-history preservation fix
(PRs [#2601](#2601),
[#3410](#3410))
- [@SIBTAIN-ASAD](https://github.com/SIBTAIN-ASAD) — Telegram
unsupported-media-type reporting and test coverage (PR
[#3263](#3263))
- [@wangzhengzhuo05](https://github.com/wangzhengzhuo05) —
MCP/Telegram/TUI port-collision fix across the bridge, Agent UI, and
daemon (PR [#3604](#3604))
- [@amd-pworfolk](https://github.com/amd-pworfolk) — stopped a non-LLM
model's `ctx_size` from leaking into `get_status()` (PR
[#3595](#3595))

## Full Changelog

**230 commits** since v0.23.0:

<details>
<summary>Expand full changelog (230 commits)</summary>

- `40e0dd89d` — docs(reference): add a user guide for Claude Code
session analytics (#3782)
- `f90fa5aae` — fix(docs): stop misclassifying GitHub anti-abuse resets
as broken links (#3800)
- `87313af75` — fix(daemon): reject a repo-root --dev-src-dir with a
corrected path (#3796)
- `cad3363f7` — fix(agents): isolate log records from abandoned
tool-timeout workers (#3795)
- `43dbce921` — fix(connectors): forward_connection uses the shared
scope resolver (#3792)
- `0c301bae3` — fix(tui): abandon queued follow-up on second Esc, add
stall nudge (#3798)
- `99caeaaf7` — fix(email-agent): close draft/RSVP/event gap in
fabricated-success guard (#3797)
- `8eb53c6b7` — fix(tui): name the buckets behind email pre-scan's +N
more (#3794)
- `5597e6a57` — fix(connectors): turn on include_granted_scopes for
Google OAuth (#3786)
- `76a7cde29` — fix(webui): show agent version in Hub Details modal
(#3784)
- `1474b12e9` — fix(tests): assert no render card for pre_scan_inbox
(#3785)
- `70de05022` — fix(email-agent): assert SCHEMA_VERSION, not a hardcoded
literal (#3787)
- `ddfdcabea` — fix(tests): skip live release-asset test on transient
network drops (#3788)
- `4740ec97f` — fix(email): point README at gaia init instead of removed
CLI (#3783)
- `ff62b4d54` — fix(agent): strip whitespace from tool names before
dispatch (#3744)
- `f39ead7ad` — fix(agent_loop): stop spending hourly budget on idle
no-op ticks (#3745)
- `1a93f3e20` — fix: apply reviewed maintenance repairs for #3372
(#3713)
- `fe863b5d9` — fix: apply reviewed maintenance repairs for #3613
(#3717)
- `fa02dc063` — fix: apply reviewed maintenance repairs for #3375
(#3714)
- `3c32386ce` — fix(security): put .bak last so a backup stops looking
like a Python module (#3748)
- `c11e2bf85` — test(installer): expect the not-executed flag on a
refused MCP tool call (#3736)
- `2cbde094b` — fix(vlm): raise when vision extraction fails instead of
indexing the error (#3722)
- `8c4661c38` — fix(agent,memory): let a bare recall() browse instead of
erroring (#3705)
- `7bd576723` — fix(agent): stop the verification footer claiming a
rejected command ran (#3703)
- `5bb9e53f0` — fix(tools): keep a finished edit reported as finished
when the diff won't render (#3702)
- `044a741b3` — fix(tools): search the user's project, not the directory
the sidecar was spawned in (#3711)
- `9fc740074` — fix(tools): describe the edit and write tools by what
agents actually edit (#3712)
- `eefd33dde` — fix(rag): stop indexing a damaged PDF page as a blank
one (#3723)
- `3d0dfbee1` — fix(ui): let a document on a reconnected drive come back
(#3727)
- `cd3dbe6de` — fix(talk): say when the microphone fails instead of
printing "Listening…" (#3724)
- `7c733bb01` — fix(hub): stop recording a failed first install as
installed (#3726)
- `140619559` — feat(tui): scroll with the wheel, click links, and print
only measured ttft/tok-s (#3699)
- `8113fd043` — fix(code-index): let a session index more than one
repository (#3728)
- `d311ac39e` — fix(tools): describe tool arguments at the slot the
model fills (#3583)
- `62e52f8e5` — fix(ui): let the operator declare document roots beyond
$HOME (#3586)
- `c57db1f0d` — fix(tools): honor find_files scope on the index path and
stop doubling "error:" (#3671)
- `cb77a334f` — fix(agents): retry instead of answering with raw
tool-call JSON (#3598)
- `41cd64ec2` — fix(llm): keep tool calls on a truncated assistant turn
during overflow retry (#3582)
- `36b8aa55d` — feat(skills): make image generation reachable from the
flagship (#3073)
- `600831f9e` — ci(vscode): drop the base-branch filter that now fails
the lint gate (#3719)
- `1c23713bd` — fix(ci): run the full suite on stacked PRs, not just PRs
into main (#3372)
- `b8e0496b1` — fix(eval): capture stdout when a scenario subprocess
fails (#3375)
- `d5d4a815c` — fix(tui,webui): stop the real agent on cancel; keep
answer content (#3627)
- `24c0ee4fd` — fix(agent-gaia): name a core floor that can actually run
the agent (#3055)
- `eee4666cd` — fix(security): make the file boundary the file, and hold
it on reads (#3594)
- `46a41f9ec` — fix(chat): restore recent context in long sessions
(#3651)
- `0d82616a9` — fix(tui): reject unsupported daemon permission bypass
(#3654)
- `c3284b464` — fix(npm): resolve Windows shims before launching the TUI
(#3653)
- `a07b87e40` — feat(skills): let a gh write ask instead of fail (#3009)
- `1070ed226` — fix(api,mcp,web): refuse foreign origins and internal
fetch targets (#3612)
- `e373a19df` — chore(lemonade): remove the dead `lemonade-server serve`
CLI from the last surfaces (#3617)
- `305ae88e9` — fix(rag): preserve indexed documents when persistence
fails (#3652)
- `b76647e72` — fix(mcp): retrieve complete Agent UI transcripts (#3667)
- `b7884b46d` — fix(rag): honor index_document's success flag at every
truthy call site (#3678)
- `1d3b2b415` — feat(tools): tell the agent its edit tools exist (#3602)
- `86071110a` — fix(eval): make the agent eval gate's report mode
actually report (#3613)
- `404107919` — fix(memory): refuse chat-minted privileged rows and
distil before pruning (#3614)
- `2fc19e5ee` — feat(tui): choose local, Fireworks, or AMD Gateway via
Lemonade (#3672)
- `a5e16d0b9` — test(lemonade): assert four external contracts the mocks
were faking (#3615)
- `947d05225` — fix(schedule): honor day constraints in recurring timers
(#3655)
- `5155591ad` — fix(chat): retain admission slots for detached runs
(#3657)
- `13f61aebc` — fix(broker): wake queued requests at lease expiry
(#3660)
- `cb8c847a7` — fix(vscode): preserve split streaming tool calls (#3661)
- `65499dabf` — fix(chat): load complete transcripts across message
pages (#3664)
- `d84f98474` — ci(eval): give the persistent Lemonade task the same
launch env as every other start path (#3577)
- `42377da7a` — fix(llm): don't let a non-LLM model's ctx_size leak into
get_status() (#3595)
- `e6a9efcf5` — Error when a named find_files folder is missing (#3580)
- `4d47ae9a9` — feat(agent): transcribe and summarize meeting recordings
locally (#3597)
- `cfc3d2959` — fix(email): don't treat a colon word inside a quoted
phrase as an Outlook operator (#3619)
- `e8f5bc898` — fix(mcp,telegram): resolve port 8765 collision across
bridge, agent-ui, tui and telegram health (#3604)
- `a2df094e3` — fix(llm): preserve Claude tool history (#3410)
- `d9e381b9d` — fix(tui): reap cancelled init processes (#3271)
- `d7cadd3e0` — fix(telegram): keep background polling alive (#3272)
- `b81f9e1b0` — fix: uninstall embedded Lemonade runtime (#3277)
- `146dd63cc` — fix(tui): send caller checkout to daemon ensure (#3268)
- `4ce7c2662` — fix(email): allow move_to_label to restore inbox (#3267)
- `36cab66de` — fix(connectors): preserve grants in device login (#3266)
- `176faf8eb` — fix(email): report calendar listing truncation (#3264)
- `ca2a5086d` — fix(email): honor sender preference ordering (#3257)
- `659cb0cde` — fix(email): surface briefing cache age (#3256)
- `7304f5e86` — ci(release): let the backend test step fail the release
(#3573)
- `07a3749c0` — fix(ci): report runner outages in minutes, not as a
silent cancel a day later (#3411)
- `68f10a8fa` — fix(agents): reject unknown @tool keyword arguments
(#3252)
- `c45593aed` — fix(email-tests): prevent headless keyring hangs (#3249)
- `543b11ec6` — fix(skills): make skill tools work on the Claude
provider (#3143)
- `f83e96c14` — feat(agent): materialize a project map at task start
(#3405)
- `29e5d977c` — feat(tui): add --trace to record what the agent actually
did (#3579)
- `38bc3669b` — docs(troubleshooting): explain the audit-module
antivirus false positive (#3348)
- `f3d739485` — fix(email): fail loudly on Outlook operators Graph
cannot translate (#3562)
- `af7d492ed` — fix(eval): drive the agent eval with the OAuth token,
and probe it for real (#3403)
- `0c23e13a9` — fix(tools): refuse an ambiguous edit instead of changing
the first match (#3396)
- `4ccaa0738` — feat(agent): state whether an answer was verified, on
every exit path (#3397)
- `4c229d434` — fix(api,web): repair gaia api chat completions, HTTPS
SNI, and download overwrite (#3364)
- `456aef994` — chore(deps): bump anthropics/claude-code-action from
1.0.210 to 1.0.216 in the github-actions group across 1 directory
(#3409)
- `a87c3f631` — chore(deps-dev): bump the agent-ui-dependencies group in
/src/gaia/apps/webui with 5 updates (#3407)
- `7e7a2684d` — docs(plans): measure GAIA's agent-loop gaps against 345
real sessions (#3391)
- `d09a7a64e` — feat(skills): learn a skill's corrections into memory,
never into the file (#3023)
- `c53918b75` — docs(claude): correct stale commands, the GaiaAgent
status, and the CLI list (#3311)
- `e274986a1` — fix(skills,tools): stop two tools deleting data while
reporting success (#3358)
- `74916c5f5` — fix(cli): stop uninstall and kill --port destroying what
they do not own (#3361)
- `0ec6ee13e` — fix(connectors): make the per-agent grant check real and
bounded (#3363)
- `9bd6bbadd` — chore(deps-dev): bump the python-dependencies group with
2 updates (#3408)
- `a65bc4556` — chore(deps-dev): bump electron from 44.0.0 to 44.1.1 in
the root-npm-dependencies group (#3406)
- `b4f2c096f` — fix(telegram): scope the bot's tool surface and stop the
allowlist failing open (#3306)
- `d7470a8fc` — fix(ci): stop the Claude audits re-filing the same
finding every run (#3310)
- `dd98c0ff4` — fix(security): stop PowerShell sinks from executing
untrusted text (#3359)
- `833ca3d06` — fix(ui): stop any web page from driving the Agent UI
backend (#3366)
- `e9f28b311` — fix(release): make the v0.23.1 tag pass its own publish
gates (#3354)
- `abe87edc3` — Devlab/dispatch passing (#3344)
- `5b284b4da` — feat(init): make `gaia init` the one setup path for the
flagship (#3330)
- `1ae7dad84` — fix(connectors): enforce catalog scope ceiling for
authorization (#3247)
- `0525d5b0a` — fix(chat): surface unavailable memory at startup (#3153)
- `695e92c58` — docs(custom-agent): make the guide's agent examples
actually run (#3317)
- `a75904de1` — chore(deps-dev): bump the agent-ui-dependencies group in
/src/gaia/apps/webui with 2 updates (#3314)
- `a6a25f29c` — chore(deps): bump zod from 4.4.3 to 4.5.4 in the
root-npm-dependencies group (#3313)
- `ed32a2d4d` — fix(daemon): treat an unreaped sidecar as stopped, not
as a survivor (#3229)
- `211f08c5b` — Use the workspace root lockfile for the example Electron
app (#3301)
- `1886dd363` — test(conftest): stop the unit suite opening the
developer's real browser (#3305)
- `72241b2f2` — Release v0.23.1 (#3054)
- `9b26827ca` — fix: keep source-less agents compatible with skill
discovery (#3244)
- `0fb49f1d6` — fix: preserve forwards across transient mint failures
(#3245)
- `1dec2462f` — fix(connectors): record only granted agent scopes
(#3248)
- `3e90f15d5` — fix(agent): use device profile for context overflow
(#3253)
- `18a8bcb89` — fix: guide daemon version skew upgrades (#3246)
- `39af8ef9f` — fix(ui): report Lemonade probe failures accurately
(#3250)
- `0db152ebc` — fix(daemon): honor extended agent query timeouts (#3251)
- `2dedc7654` — fix(tui): preserve partial-success batch outcomes
(#3255)
- `c5b00e85b` — fix(telegram): report unsupported media types (#3263)
- `bc613dc85` — fix(hub): stop calling an app's npm package a frozen
agent sidecar (#3299)
- `821667c76` — fix(skills): normalize common plural stems (#3270)
- `8ad4ee469` — fix(email): parse grouped Outlook duration queries
(#3269)
- `30b8246ad` — test: cover registered Telegram handlers (#3273)
- `80cf9eb00` — test: verify embedded backend install contract (#3274)
- `9b40c3522` — ci: run embedded Lemonade checksum guard (#3275)
- `5b45a7c11` — fix: keep skill discovery loader available (#3276)
- `1ff94ae6c` — fix: report RAG indexing failures accurately (#3278)
- `0c4d725a0` — fix: report missing API server on stop (#3279)
- `811e0bc04` — fix(talk): honor restart voice command (#3280)
- `869f0bf41` — fix: fail Telegram startup when dependency is missing
(#3283)
- `31fcdd03c` — fix(mcp): expose TUI state wait matcher (#3284)
- `f2dfcd8cb` — fix(hub): stop offering a GAIA install a non-agent card
rules out (#3232)
- `6ffee9e02` — chore(deps-dev): bump the agent-ui-dependencies group in
/src/gaia/apps/webui with 5 updates (#3156)
- `671000d8e` — chore(deps): bump the root-npm-dependencies group with 3
updates (#3155)
- `438733605` — chore(deps): bump anthropics/claude-code-action from
1.0.206 to 1.0.210 in the github-actions group (#3157)
- `0c28442a9` — fix(tui): preserve seeded transport for wheel agents
(#3285)
- `41a00915b` — fix(tui): gate Claude launches on credentials (#3286)
- `25dd767da` — fix(ci): the eval gate skipped every category when the
embedder failed (#3158)
- `fdcdbff4c` — fix(website): Mac visitors on Safari got no install
button (#3144)
- `95f874817` — perf(gaia): send the flagship only the tools a turn
needs (#3008)
- `eb764bf5a` — feat(installer): the one-line install now brings the
agent with it (#3146)
- `ea0e5d924` — feat(cpp): skill sets and gaia-agent.yaml wiring (#2931)
- `5b37cb138` — Route the Strix Halo jobs to the Ryzen Dev Lab pool
(#3262)
- `0047af97d` — ci(claude): skip Claude PR review for Dependabot PRs
(#3259)
- `11039b64e` — test(daemon): stop the hub stray-process test orphaning
a sleep child (#3230)
- `a338b94f4` — test(telegram): cover media ingest paths (#3150)
- `a7bcf5e11` — Show GAIA install alongside npm on hub agent pages
(#3151)
- `ecae8f183` — test(telegram): pin the _allowed truth table including
the fail-open (#3051)
- `8e57b5197` — docs(readme): note the Email agent's CLI install path
(#3041)
- `b9330deba` — fix(email): translate Gmail-style operators for Outlook
Graph search (#3042)
- `3b23ac2b3` — feat(skills): load the right skill without the user
knowing its name (#3010)
- `d4666b8bd` — feat(lemonade): run a private, self-contained Lemonade
Server (#3121)
- `793fb4d42` — perf(ci): cut the C++ dependency cache from 407 MB to
~109 MB (#3142)
- `2cd894579` — fix(telegram): apply the allowlist to every handler, not
just messages (#3148)
- `c128b18f6` — fix(cpp): unblock the C++ gate — split the third-party
skill corpus from the conformance one (#3129)
- `55c977006` — feat(factory): harvest Claude Code sessions into usage
statistics (#3111)
- `6db50643d` — chore(deps): bump the github-actions group across 1
directory with 3 updates (#3049)
- `c7989b953` — fix(mcp): port servers to MCP SDK 2 (#3047)
- `ee61b74fe` — Return structured JSON for unexpected email API errors
(#3046)
- `f2d8291c3` — feat(installer): double-click installers for the
terminal hub (#3125)
- `f601621d1` — fix(agent-gaia): stop one-shot /query runs leaking an
agent each (#3079)
- `4a6561c86` — chore(lemonade): pin Lemonade 11.8.1 (#3117)
- `c51a1c520` — test(telegram): cover access and session isolation
(#3052)
- `98043fb56` — feat(tui): boot straight into the flagship agent, retire
the hub browser (#3120)
- `5bb64a6ba` — chore(deps-dev): bump the agent-ui-dependencies group
across 1 directory with 8 updates (#3048)
- `51c298e1a` — fix(tui): stop --use-claude from starting Lemonade, and
name the Claude model (#3005)
- `38423c84c` — fix(ci): unblock the walkthrough's wheel install, rein
in the authz lens's subagents (#3109)
- `abb8ddea8` — ci(release): require GAIA_HUB_PUBLISH_URL for hub
publish, drop dead fallback (#3032)
- `88299ea49` — feat(website): lead with the flagship agent, and say
what it actually does (#3093)
- `eda11b778` — fix(llm): suggest gaia init on macOS (#3027)
- `11f4da758` — Escape quotes inside Outlook Graph search queries
(#3021)
- `1a3d0f0bd` — fix(packaging): add realtime dependencies to talk extra
(#2954)
- `ae0b64e9f` — chore(deps-dev): bump electron from 43.2.0 to 43.4.1 in
the root-npm-dependencies group across 1 directory (#2871)
- `b95c66dff` — test(memory): assert the reconcile 503 branch in every
environment (#2868)
- `708f806a0` — docs(playbooks): simplify index page (#2957)
- `4ac8f1075` — fix(cli): drop non-constructor CLI flags before creating
GaiaCliClient (#2976)
- `191a317f2` — feat(api): report component health (#2601)
- `40ed1513b` — chore(deps-dev): bump electron from 43.2.0 to 43.4.1 in
/src/gaia/apps/example/webui in the example-app-dependencies group
across 1 directory (#2869)
- `dac81b60c` — docs(tui): tell people how to install the terminal hub
(#3039)
- `643f78432` — feat(tui): lay out to the real terminal width (#3006)
- `ba64ed1e3` — fix(installer): install the extras the daemon needs to
start (#3056)
- `25c137275` — fix(ci): make the Claude audits produce output, not just
run green (#3063)
- `ee64d5cd2` — docs(agent-gaia): correct the npm sidecar docs against
the code (#3076)
- `625478393` — fix(tui): don't run an unverified binary from the hub
install root (#3075)
- `a6c68c8a4` — fix(agent-email): fail closed when a request omits its
Host header (#3077)
- `4b4de3a89` — fix(agent-gaia): stop the npm sidecar attaching to a
foreign server (#3078)
- `6692361d6` — fix(agent-gaia): end a turn parked on a confirmation
when stdin closes (#3080)
- `3ec80f141` — fix(tui): run an installed hub agent over the daemon,
not stdio (#3062)
- `c7c4cff17` — fix(agent): bill tool-approval time to the human, not
the tool (#3007)
- `b388562cc` — ci(installers): add job timeouts (#3020)
- `c4a4fef42` — fix(ci): the README CI badge is permanently red and
reports (#3050)
- `e2ec50523` — docs(cli): remove duplicate terminal hub section (#3045)
- `215477ab6` — ci: fix stale triggers and timeout left by the agent
collapse (#3067)
- `90c3132db` — docs: remove the Blender workshop left dead by the agent
collapse (#3068)
- `a4b84fae7` — perf(claude): cache the fixed prefill, and report the
cache counters (#3026)
- `fdd9f18c3` — refactor(agents): collapse per-task agents into flagship
skills (#2995)
- `5b4f1381d` — fix(ci): scheduled Claude audits were green but never
ran (#3053)
- `78bbc3076` — feat(website): TUI-first redesign — download the
terminal hub, lead with the flagship agent (#3030)
- `6faec485e` — ci(release): make the TUI binaries reproducible, drop
the R2 probe (#3040)
- `02691245e` — fix(hub): strip R2 credentials, and diagnose why R2
refuses them (#3037)
- `aae4a50ce` — ci(hub): require component manifests to match the
release tag again (#3036)
- `8ca0f7d98` — fix(hub): give the website redeploy a repo to dispatch
against (#3038)
- `20e081909` — fix(hub): unblock large-artifact publishing, and version
components independently (#3035)
- `9ad1cee3e` — ci(cloud): provision the dev install in Claude Code
cloud sessions (#3033)
- `0befe27ce` — ci(linux): install Lemonade from the PPA, not deleted
PyPI package (#3034)
- `db170b8a2` — fix(agent-gaia): make the flagship agent releasable —
RAG in the binary, 0.1.1 on npm (#3031)
- `85ba09230` — fix(hub): stop boto3's default checksums breaking every
R2 upload (#3029)
- `5f3e7bbf1` — feat(hub): publish oversized artifacts direct to R2,
bypassing the Worker body cap (#3025)
- `b254708f1` — ci(hub): one approval per component release, not two
(#3018)
- `a0ecb0f68` — ci(eval): pin the agent eval to Strix Halo, and record
which box measured (#3017)
- `672cd1c5f` — fix(init): fail loudly when the Agent UI build can't
produce a usable frontend (#2887)
- `29a87fd87` — ci(eval): capture llama-server's error so the embedder
failure is diagnosable (#3015)
- `c8987ca67` — fix(email): declare the sidecar bearer gate in the
OpenAPI contract (#3002)
- `62e5611d9` — fix(email): "0 messages" for mail that exists —
unsupported newer_than: duration unit (#2981)
- `746468274` — fix(cli): exit non-zero from gaia agent status \<id>,
add --json (#3001)
- `9c89cb472` — ci(hub): deploy the Agent Hub Worker before publishing
to it (#2991)
- `47e6bc908` — fix(gaia): keep a loaded skill alive across turns; stop
a control resize from wrecking the screen (#2932)
- `9ed3c3523` — test(telegram): isolate HOME so the pid test can't
clobber a live adapter (#2895)
- `225c69377` — test(init): stop init tests overwriting the real
~/.gaia/config.json (#2891)
- `8ed5b783d` — fix(release): emit release notes as short bullets, not
prose (#2967)
- `1beb714f3` — release(agent-email): 0.6.0 (#2933)
</details>

Full Changelog:
[v0.23.0...v0.24.0](v0.23.0...v0.24.0)

## Release checklist
- [x] `util/validate_release_notes.py` passes
- [x] `docs && npx mintlify validate` — could not run `mintlify
validate` locally (npm TLS cert error in this environment), but
`util/check_doc_links.py` passes internal + external link checks now
that #3782 is merged
- [x] `src/gaia/version.py` → `0.24.0`; `LEMONADE_VERSION` unchanged at
`11.8.1`
- [x] webui `package.json` / `package-lock.json` → `0.24.0`
- [x] Navbar label → `v0.24.0 · Lemonade 11.8.1`
- [x] Hub component manifests (`terminal-hub`, `agent-ui`) → `0.24.0`;
`check_component_core_api.py --release-version 0.24.0` passes
- [x] `hub/agents/gaia/python/{gaia-agent.yaml,pyproject.toml}`
min-version floor bumped 0.23.1 → 0.24.0 (0.23.1 was never tagged)
- [x] `docs/releases/index.mdx` corrected: 3 files → 5 (was missing the
hub-manifest and webui-package files)
- [x] Rebased onto current `main`; changelog regenerated from the real
range — 230 commits, no phantom SHAs, no missing merges
- [x] Every PR citation and contributor handle verified against `gh pr
view` (33 PRs + 8 contributor logins)
- [x] Full commit range swept for security/breaking markers not caught
by title alone
- [ ] Review from @kovtcharov-amd addressed

---------

Co-authored-by: Ovtcharov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI changes documentation Documentation changes llm LLM backend changes performance Performance-critical changes tests Test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants