Skip to content

fix(email): declare the sidecar bearer gate in the OpenAPI contract - #3002

Merged
itomek merged 5 commits into
mainfrom
issue-2993
Aug 19, 2026
Merged

itomek merged 5 commits into
mainfrom
issue-2993

Conversation

@itomek

@itomek itomek commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

Closes #2993

The email sidecar enforces a per-session bearer token at runtime, but its OpenAPI document didn't say so — every consumer (the npm client, native builds, anyone reading /openapi.json) saw 0 of 40 operations carrying a security requirement, even though /v1/email/init, /draft, /send, etc. reject an unauthenticated request with 401.

The document now declares a bearerAuth HTTP scheme and, per gated operation, the real conditional posture — security: [{"bearerAuth": []}, {}] (bearer OR none, since the check is skipped when the sidecar has no token configured for local dev) — with EXEMPT_PATHS routes (/health, /version, etc.) marked explicitly public. No runtime auth behavior changed.

Test plan

  • New tests in tests/test_rest_contract.py assert the securitySchemes block, the conditional security requirement on every gated operation, and an explicit empty requirement on every EXEMPT_PATHS route.
  • pytest tests/test_rest_contract.py tests/test_caller_auth.py — 138 passed (includes the byte-for-byte openapi.email.json up-to-date check, regenerated in this PR).
  • Full email package suite (pytest tests/) — 1981 passed, 3 pre-existing failures unrelated to this change (local Lemonade model unavailable; missing build package for a packaging test).
  • python util/lint.py --all --fix — clean (pre-existing mypy findings are in untouched files).
  • Manually started the sidecar with GAIA_EMAIL_SIDECAR_TOKEN set and confirmed live, on the real process:
$ init (no token):                          401
$ init (Authorization: Bearer <token>):     200
$ health (exempt path, no token):           200

$ GET /openapi.json → components.securitySchemes
{"bearerAuth": {"type": "http", "scheme": "bearer"}}
$ GET /openapi.json → paths["/v1/email/triage"]["post"]["security"]
[{"bearerAuth": []}, {}]
$ GET /openapi.json → paths["/v1/email/health"]["get"]["security"]
[]

The regenerated openapi.email.json (committed in this PR) matches the live process byte-for-byte on these fields.


@kovtcharov-amd — this changes the rationale in CONTRACT.md you authored (previously: auth is deliberately not encoded in the OpenAPI document). Would appreciate a sign-off that declaring the conditional bearer-or-none posture is the right call here.

itomek added 2 commits August 18, 2026 11:05
The email sidecar's per-session bearer token check is invisible to schema
generation because require_caller_token is a plain Request dependency, not a
fastapi.security class — every consumer of openapi.email.json (and the live
/openapi.json) saw 0 of 40 operations carrying a security requirement, even
though draft/send/archive/etc. 401 without a valid token.

Adds caller_auth.openapi_security_extension(), which overlays a bearerAuth
HTTP scheme and, per operation, the real conditional posture: bearer OR none
for every gated route (the check no-ops when the sidecar has no token
configured for local dev), and an explicit empty requirement for
EXEMPT_PATHS routes so they read as deliberately public. Wired into both the
sidecar's build_app() (server.py) and the export app (export_openapi.py) so
the live and frozen documents agree.
…ity scheme

CONTRACT.md previously said the bearer-token gate was deliberately not encoded
in the OpenAPI document. Now that it is, rewrite that rationale to describe the
declared bearerAuth scheme and its conditional (bearer-or-none) posture instead
of removing the paragraph. Mirrors the same note into the npm SPEC.md, both
package CHANGELOGs, and the integration guide's Authentication section.
@github-actions github-actions Bot added documentation Documentation changes agent::email Email agent changes labels Aug 18, 2026
@itomek

itomek commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator Author

Independently verified. The thing worth checking on an auth change is whether the document was made to look right by altering the gate — it wasn't. api_routes.py and test_caller_auth.py are both untouched, and the runtime behaviour is byte-identical to what I measured on unpatched 0.6.0 before the fix:

/health           no-credential -> 200
/version          no-credential -> 200
/v1/email/health  no-credential -> 200
/v1/email/init    no-credential -> 401
/v1/email/init    with bearer   -> 200

Audited every operation in both documents:

document gated public missing security
live /openapi.json 36 4 0
committed openapi.email.json 24 2 0

Gated operations declare [{"bearerAuth": []}, {}]; every EXEMPT_PATHS route declares []. No anomalies, and the static artifact is a strict subset of the live one — no operation appears in the frozen contract that the running server doesn't serve.

The bearer-or-none encoding is the right call and worth not "simplifying" later: the gate genuinely is skipped when no token is configured, so an unconditional security requirement would just be a differently-wrong contract.

@kovtcharov-amd — this changes the CONTRACT.md rationale you authored in b17194a5. The rewrite keeps your distinction that transport auth is separate from the request/response schema and revises only the conclusion, on the grounds that securitySchemes describes transport auth without touching payload shapes. Flagging for your sign-off rather than assuming it.

🔍 Technical details

Two independent causes, both addressed:

  1. require_caller_token is a plain Request-typed dependency, so FastAPI's generator never recognized it as SecurityBase and emitted nothing. Fixed by overlay rather than by converting it to a fastapi.security class — the right tradeoff, since converting it would put behaviour drift into the one path where that's least acceptable.
  2. export_openapi.py built the frozen contract from a gate-free app, so the artifact could never have described auth regardless of cause 1. Both build_app entry points now apply the same overlay, which is what keeps the two documents in agreement.

The _OPENAPI_METHODS guard in the overlay is load-bearing — iterating a path item's keys without it would write security onto non-operation members like parameters or $ref.

Verification reproduced with --print-openapi against the gated app plus a live server on 127.0.0.1:8132.

@itomek
itomek marked this pull request as ready for review August 18, 2026 15:24
@itomek
itomek requested a review from kovtcharov-amd as a code owner August 18, 2026 15:24
@github-actions

github-actions Bot commented Aug 18, 2026 •

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.

@github-actions

Copy link
Copy Markdown
Contributor

Verdict: Approve with suggestions

The email sidecar has always required a bearer token, but its published API contract said nothing about it — so anyone generating a client from openapi.email.json had no signal that calls need credentials. This PR makes the document say what the server already does, without touching a line of runtime auth behaviour. The choice to declare "bearer or none" rather than "bearer always" is the right one: it matches the gate actually being skipped when no token is configured, and it keeps the same document honest for the ungated product-server mount of the same routes.

One thing worth fixing before merge: the overlay is implemented twice — once for the sidecar that actually ships and once for the export tool — and only the export copy has a test. Someone editing the shipping copy later could drop the declaration and CI would stay green. Folding both into one helper (and asserting the sidecar's document, not just the exported one) closes that.

Real-world evidence

The evidence bundle is present and it does the job — a real sidecar was booted and driven with curl, not mocked:

$ curl -s http://127.0.0.1:8131/v1/email/init                                → HTTP 401
$ curl -s -H 'Authorization: Bearer not-the-token' .../v1/email/init         → HTTP 401
$ curl -s -H 'Authorization: Bearer evidence-token-2993' .../v1/email/init   → HTTP 503 (no Lemonade — gate cleared)
/v1/email/health  {"status":"ok","service":"gaia-agent-email"}   [HTTP 200]   (no header sent)
documented operations: 40   gated: 36   exempt: 4
mismatches: none
POST /v1/email/send   security -> [{"bearerAuth": []}, {}]
GET  /v1/email/health security -> []

The {} alternative was proven real, not decorative: a second sidecar started with no token accepted the same gated call unauthenticated. python -m gaia_agent_email.export_openapi --check exits 0, so the committed artifact is in sync, and the core gaia api document picked up no security overlay. Rendered screenshot is marked pending strix-halo lane — correctly N/A here, since no Agent UI file changed. This evidence is why the verdict is an approve: the declared posture was shown to match the running server on both the token-on and token-off paths.

🔍 Technical details

🟡 The shipping override is a second copy, and it's the untested one

server.py:199-214 and export_openapi.py:74-88 each hand-roll the same app.openapi override. The spec fixture in test_rest_contract.py:95 is export_openapi.build_spec(), so all three new tests exercise only the export app. The sidecar app — the one the frozen binary ships and the only one that actually enforces the gate — has no assertion on its document; test_server_cli.py:50 only compares the shim's output to server.build_app().openapi(), which stays equal even if both lose the overlay.

Both copies also call get_openapi(title=…, version=…, description=…, routes=…), a subset of what FastAPI.openapi() passes. Nothing is lost today (neither app sets servers, openapi_tags, contact, license_info, or webhooks — which is why the artifact diff is additions-only), but the day someone adds servers= to the sidecar it disappears from the published document with no test to catch it.

One helper in caller_auth.py fixes both — it delegates to FastAPI's own generator, so no metadata can be dropped, and the exported bytes are unchanged:

def install_openapi_security(app) -> None:
    """Make ``app.openapi()`` declare the bearer gate (#2993)."""
    base_openapi = app.openapi

    def _openapi() -> dict:
        if app.openapi_schema:
            return app.openapi_schema
        app.openapi_schema = openapi_security_extension(base_openapi())
        return app.openapi_schema

    app.openapi = _openapi

Both call sites then collapse to caller_auth.install_openapi_security(app) after the routers are mounted, and the local from fastapi.openapi.utils import get_openapi imports go away. Worth a --check re-run to confirm the artifact stays byte-identical (it should).

Paired with a cheap assertion on the real thing:

def test_sidecar_app_document_declares_the_gate():
    spec = server.build_app().openapi()
    assert spec["components"]["securitySchemes"]["bearerAuth"]["scheme"] == "bearer"
    assert spec["paths"]["/v1/email/send"]["post"]["security"] == [{"bearerAuth": []}, {}]
    assert spec["paths"]["/health"]["get"]["security"] == []

That last line matters: /health and /version are mounted on the app itself rather than a router, so they only appear in the sidecar's document — the export app can't cover them.

🟢 Nits

  1. Test doesn't share the production method guard (test_rest_contract.py:596). openapi_security_extension skips non-method path-item keys via _OPENAPI_METHODS, but test_gated_operations_require_bearer_or_none iterates every key. FastAPI never emits path-level parameters/summary today, so it passes — but the test would fail where the code is deliberately tolerant. if method not in _caller_auth._OPENAPI_METHODS: continue keeps the two in step (or promote the frozenset to a public name and use it in both).

  2. Mid-file import (test_rest_contract.py:580). from gaia_agent_email import caller_auth as _caller_auth can join the existing # noqa: E402 import block at line 34 rather than carrying its own noqa halfway down the file.

Strengths

  • The security model reasoning is the best part of this PR. [{"bearerAuth": []}, {}] is a deliberate, documented choice over an unconditional requirement, and the docstring at caller_auth.py:194 explains why the dependency is invisible to schema generation instead of just working around it. That same choice is what keeps the artifact valid for the product-server mount, where nothing is gated.
  • security: [] on the exempt routes is the right call — they now read as deliberately public rather than accidentally undocumented, and there's a test pinning that.
  • Doc sync is complete and matched to what changed: CONTRACT.md had the one stale claim ("not encoded in the frozen OpenAPI document") and it was corrected in the same change, with both CHANGELOGs, the npm SPEC.md, and the integration guide following. The spec_html.py Authentication section was checked and needed nothing — it never made the contradicted claim.
  • Evidence exercised the token-off path, not just the happy path. Proving the {} alternative is reachable is exactly what justifies the declared posture; a weaker bundle would have shown only the 401.

@itomek

itomek commented Aug 18, 2026 •

Copy link
Copy Markdown
Collaborator Author

Verified on two real test machines beyond the dev box, since the underlying issue was reported on Windows and everything prior had been checked on Linux only.

Linux (Ubuntu 24.04, Ryzen 9 9950X) Windows 11 (Ryzen AI)
Runtime auth unchanged ✅ ✅
bearerAuth scheme present ✅ ✅
Operations missing security 0 0
Artifact regenerates byte-identically ✅ ✅
test_rest_contract + test_caller_auth 138 passed 138 passed

Both machines were provisioned clean from this branch, not from an existing checkout.

The Windows result closes the risk I most wanted checked: openapi.email.json is byte-compared by CI, so a CRLF round-trip there would have failed the build for any Windows contributor while passing everywhere else. It doesn't — git's autocrlf and Python's universal-newline translation cancel out, and export_openapi --check exits 0 on Windows with the regenerated bytes identical to the committed ones.

🔍 Technical details

Live document: 36 gated / 4 public. Committed artifact: 24 gated / 2 public. The gap is by design rather than drift — export_openapi.py builds a minimal app mounting only email_router + connection_intake_router (the cross-implementation contract), deliberately excluding the sidecar's top-level /health and /version and the 11 agent_router operations that only the full server mounts.

/v1/email/spec and /v1/email/playground are in EXEMPT_PATHS but never appear as OpenAPI operations — both are include_in_schema=False (api_routes.py:3354,3381) because they serve static HTML, not JSON. Verified independently as live and unauthenticated on both machines.

Runtime auth confirmed identical to unpatched 0.6.0 on both platforms: /health, /version, /v1/email/health → 200 with no credential; /v1/email/init → 401 without a bearer and with a wrong bearer, 200 with the correct one.

@itomek itomek self-assigned this Aug 18, 2026
@itomek

itomek commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator Author

Both red checks are environmental and unrelated to this PR — recording the triage so a reviewer doesn't have to re-derive it.

Gemma consolidation eval — the RAG embedder never loads on the runner: llama-server failed to start for user.embeddinggemma-300m-GGUF, so no scorecard is produced and the downstream integrity check fails. That's #2826 (Application Control blocking executables on the self-hosted Windows runner), not a scoring regression. The same job failed the same day on several unrelated branches.

Email triage eval — the judge client got an Anthropic 529 Overloaded before any scoring happened. Transient; the same workflow passed on other PRs that day.

Neither is a score regression, and this PR changes only OpenAPI metadata — no prompts, tool schemas, model selection, or error classification, and api_routes.py is untouched.

Not re-running the Gemma eval. Its own preflight says so explicitly: "Do NOT re-run the eval until it passes — it costs 3.5h and measures nothing." While #2826 stands, a re-run burns three and a half hours of CI to reproduce a known failure. The email eval will re-run naturally on the next push.

🔍 Technical details

Gemma job, actual failure (the surface "no scorecard produced" message is the downstream check, not the cause):

gaia.llm.lemonade_client.LemonadeClientError: Request failed with status 500:
{"error":{"code":"model_load_error","message":"Failed to load model
'user.embeddinggemma-300m-GGUF': llama-server failed to start"}}

Email job:

anthropic.OverloadedError: Error code: 529 - {'type': 'error',
'error': {'type': 'overloaded_error', 'message': 'Overloaded'}}

Both workflows are pull_request-triggered only, so there are no main runs to compare against; the cross-branch comparison above is against other open PRs from the same day.

Branch protection on main currently lists no required status checks, so neither red check gates merge mechanically. strict: true is set, so the out-of-date branch does — that's being resolved separately.

… app

server.py and export_openapi.py each hand-rolled the same app.openapi
override to declare the bearer gate. Only the export app's document was
tested, so the sidecar binary that actually ships and enforces the gate
had no assertion on its own OpenAPI document — the declaration could be
dropped from the shipping copy without failing CI.

Both call sites now share caller_auth.install_openapi_security(app),
which wraps the app's own app.openapi (not a bare get_openapi() call),
so any metadata FastAPI already knows about the app can never silently
drop out of the published spec. Added a test asserting the sidecar's own
document declares the gate, including /health, which is mounted directly
on the sidecar app and never appears in the export app's document.

Also shares the _OPENAPI_METHODS guard between production and its test
so a spec key that isn't an HTTP method can't cause a false pass, and
folds a mid-file import into the existing noqa block.

The committed openapi.email.json is unchanged (export_openapi --check
still passes) — this is a pure internal refactor, not a contract change.
@itomek

itomek commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator Author

Addressed the review finding: the OpenAPI security overlay was hand-rolled twice (server.py and export_openapi.py), so only the export app's document was tested — the sidecar app that actually ships had no assertion on its own contract.

Both call sites now share one caller_auth.install_openapi_security(app) helper, which wraps the app's own app.openapi instead of calling get_openapi() directly, so future app-level metadata can't silently drop out of the published spec. Added a test that builds the real sidecar app and asserts its document declares the gate, including /health — that route is mounted directly on the sidecar and never appears in the export app's document, so it was previously unverifiable.

Also merged in origin/main (kept both CHANGELOG entries) and applied the two nits (shared the HTTP-method guard between production and its test, folded a mid-file import into the existing noqa block).

The committed openapi.email.json is byte-identical after the refactor — confirmed by diffing the regenerated artifact against main before touching the code, and export_openapi --check passes. This was a pure internal dedup, not a contract change.

Test/lint results
  • pytest test_rest_contract.py test_caller_auth.py: 139 passed
  • python util/lint.py --all --fix: clean
  • python -m gaia_agent_email.export_openapi --check: exits 0

@itomek

itomek commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator Author

Re-verified at 3286c54c — the conflict with main is resolved and the review finding is applied. Independently checked rather than taken on report, since a refactor of the overlay could quietly change the published contract, which is the exact failure this PR exists to prevent.

The published contract did not move. openapi.email.json is byte-identical between the merge commit and the post-refactor commit. The change is to how the overlay is installed, not to what the document says.

check result
openapi.email.json pre- vs post-refactor byte-identical
test_rest_contract + test_caller_auth 139 passed (138 + the new sidecar assertion)
api_routes.py in the branch diff absent — runtime auth untouched
mergeable CONFLICTING → MERGEABLE

The two red checks are the environmental eval failures triaged above; neither is a required check and neither is caused by this PR.

Remaining before merge: sign-off from @kovtcharov-amd on the CONTRACT.md rationale change, since it revises a decision he authored.

🔍 Technical details

Conflict was against 62e5611d, which touched the same two files: CHANGELOG.md (both entries kept) and openapi.email.json. The artifact was resolved by regeneration from the merged tree rather than a hand-merge — a generated file that merely looks right is the trap there.

The refactor collapses the two hand-rolled app.openapi overrides into one install_openapi_security helper that wraps the app's own generator. Beyond deduplication, this removes a latent defect: both previous copies called get_openapi(title=…, version=…, description=…, routes=…), a strict subset of what FastAPI.openapi() passes, so adding servers= or openapi_tags= later would have silently dropped them from the published document.

The new test_sidecar_app_document_declares_the_gate asserts against server.build_app().openapi() — the app the frozen binary actually ships. Its /health → security: [] assertion is the load-bearing one: /health and /version are mounted on the app rather than a router, so they appear only in the sidecar's document and the export app structurally cannot cover them.

@github-actions

Copy link
Copy Markdown
Contributor

Verdict: Approve

This documents the existing per-session bearer-token gate in the OpenAPI contract without touching any runtime auth behavior. The approach is well-reasoned: require_caller_token is a plain Request dependency (not a FastAPI SecurityBase class), so the schema generator ignores it. The post-generation overlay correctly models the real posture — bearer OR none — because the gate is conditional when no token is configured for local dev.

The install_openapi_security helper is shared by both server.py and export_openapi.py, so the live sidecar document and the committed artifact can never drift apart. Test coverage hits both apps' generated specs, and the byte-equality CI gate on openapi.email.json ensures the committed file stays in sync. All five doc surfaces (SPEC.md, CONTRACT.md, CHANGELOG × 2, integration guide) were updated consistently.

One minor test fragility worth a quick look when convenient:

🟢 test_exempt_paths_are_explicitly_public iterates spec["paths"][path].items() without the method in _OPENAPI_METHODS guard used in the implementation itself. If /v1/email/health or /v1/email/version ever gains a path-level parameters block, the assert op.get("security") == [] would fail spuriously on the parameters dict. Currently safe — both endpoints are simple GET-only routes — but adding the guard makes the test match the implementation's own iteration logic.

🔍 Technical details

test_rest_contract.py:605 — fix is one extra guard mirroring the implementation:

for method, op in spec["paths"][path].items():
    if method not in _caller_auth._OPENAPI_METHODS:
        continue
    assert op.get("security") == [], ...

Note: EXEMPT_PATHS has 6 entries (/health, /version, /v1/email/health, /v1/email/version, /v1/email/spec, /v1/email/playground), but the docs and tests mention only 4. The 2 omitted routes are include_in_schema=False (api_routes.py:3390, api_routes.py:3417), so they never appear in the generated spec — the omission is correct, just not explained. A one-line comment on EXEMPT_PATHS noting that the last two are schema-hidden would prevent a future reader from thinking the docs are incomplete.

test_exempt_paths_are_explicitly_public iterated every key under a path
item without filtering to HTTP methods, unlike its sibling test and the
production overlay. Also note why EXEMPT_PATHS lists two routes the docs
and tests never mention (spec/playground are schema-hidden).
@itomek

itomek commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator Author

Both review nits applied: the exempt-path test now filters to HTTP methods like its sibling test does, and EXEMPT_PATHS has a one-line comment explaining why two of its routes never show up in the docs (they're schema-hidden).

@itomek
itomek added this pull request to the merge queue Aug 19, 2026
Merged via the queue into main with commit c8987ca Aug 19, 2026
38 of 40 checks passed
@itomek
itomek deleted the issue-2993 branch August 19, 2026 14:19
AmirF194 pushed a commit to AmirF194/gaia that referenced this pull request Aug 26, 2026
…3076)

An integrator following these docs would have shipped an unauthenticated
integration and mis-scoped what the agent can do. Three of the four docs
stated the sidecar has **no** caller-auth token; it has an enforced one
— a per-session bearer, a loopback `Host` allowlist, and `Origin`
rejection — so anyone building against them sent no `Authorization`
header, hit a 401 with no explanation, and treated loopback binding as a
security boundary on an agent that has shell and file tools. The token
landed in amd#2932; the email agent's docs were corrected in amd#3002 and the
flagship's never were.

The same file also said the bundled skill library is empty while
`gaia-voice` ships always-on and is paid on every LLM call, and
undercounted both the registry (55 → 67) and the confirmation-gated
tools (3 → 6).

🔒 For @kovtcharov-amd: §5.4 now documents, accurately, that a sidecar
this package spawns comes up in dev mode because `spawnSidecar` mints no
token. That is existing shipped behaviour, not a change here — but it is
worth a decision on whether `gaia serve` should mint one by default.
Happy to follow up either way.

## Test plan

- [ ] `grep -rn "no caller-auth\|mints none\|library is empty\|55 tools"
hub/agents/gaia/npm/` returns nothing
- [ ] Tool counts match the registry: build the agent and intersect it
with the confirmation set — 67 registered, and exactly six gated
(`edit_file`, `execute_python_file`, `install_skill`, `remove_skill`,
`run_shell_command`, `write_file`).
`hub/agents/gaia/python/tests/test_gaia_agent.py` already guards the 67.
- [ ] `gaia-voice` body measures 676 cl100k tokens, matching
`gaia-agent.yaml` (the CHANGELOG's 692 is a past release's record and is
deliberately left alone)
- [ ] Relative links and anchors in the four files resolve

---------

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]>
kovtcharov-amd pushed a commit to huong8373tt-beep/gaia that referenced this pull request Nov 7, 2026
…tract (amd#6910)

## Summary

`openapi.email.json` listed only 200 and 422 for the three `/query`
routes, although they also return 400, 404, 409, 500 and 502. This PR
declares those statuses on the route decorators, regenerates
`openapi.email.json` and `specification.html`, and adds a test that
fails if a `/query` route raises a status the spec doesn't list.

## Why

`openapi.email.json` is the contract the npm client and generated
clients are built from. A client generated from it had no typed path for
a stale `needs_input` answer (409), a busy session (409), or an agent
that failed to start (502), even though `npm/SPEC.md` already documents
them in prose. This is the last item of amd#4429; the docs part landed in
amd#6879.

## Linked issue

Closes amd#4429

## Changes

- `query_routes.py`: `POST /v1/email/query` declares 400, 409, 500 and
502 next to its SSE 200; `/query/{run_id}/cancel` declares 404;
`/query/{run_id}/respond` declares 404 and 409. Each description says
when that status is returned. No handler logic changed.
- `openapi.email.json`: regenerated with `python -m
gaia_agent_email.export_openapi`.
- `spec_html.py` / `specification.html`: the `/query` block is
hand-written and listed no errors, so it gets one paragraph naming them
(cancel and respond already did); regenerated with `python -m
gaia_agent_email.spec_html`.
- `tests/test_rest_contract.py`:
`test_query_routes_document_every_status_they_raise` reads every
`HTTPException(status_code=...)` in each `/query` handler from the
source and asserts the spec lists it, so a new status added without a
`responses` entry fails CI.
- `CHANGELOG.md`: an Unreleased "Fixed" entry.
- No `SCHEMA_VERSION` bump: no request or response shape changed and no
operation was added. I followed amd#3002, which also only added to what the
OpenAPI document declares and did not bump. Happy to bump to 2.16 if
you'd rather treat this as a contract change.

## Test plan

- [x] `python -m gaia_agent_email.export_openapi --check` and `python -m
gaia_agent_email.spec_html --check` both report up to date after
regenerating (the OpenAPI check failed before).
- [x] `pytest hub/agents/email/python/tests
tests/test_email_openapi_conformance.py`: 2378 passed, 3 skipped (Python
3.12, `.[dev,api,publish]` + the email package, as in
`test_email_agent_unit.yml`).
- [x] Removed the 409 from `/respond`'s responses on purpose: the new
test failed with `POST /v1/email/query/{run_id}/respond raises ['409']
undocumented`, then passed again once restored.
- [x] `python util/lint.py --all`: everything passes except two Pylint
E1120 errors in `src/gaia/utils/awake_clock.py:47` and
`src/gaia/utils/terminal.py:109`, files this PR doesn't touch.

## Evidence

- [ ] **Agent exposed in the Agent UI**: N/A, no UI change.
- [ ] **MCP tools / servers**: N/A, no MCP change.
- [ ] **CLI**: N/A, no CLI change.
- [x] **HTTP API / REST**: real requests through the routers the sidecar
mounts (`export_openapi.build_app()` in a `TestClient`), next to what
the regenerated spec now lists:

```
$ POST /v1/email/query/{run_id}/cancel  -> 404 {'detail': "No in-flight run for run_id '0f5caf10-…'."}
  openapi.email.json lists: ['200', '404', '422']
$ POST /v1/email/query/{run_id}/respond  -> 404 {'detail': "No in-flight run for run_id '0f5caf10-…'. It has already finished or been cancelled, so there is nothing to answer."}
  openapi.email.json lists: ['200', '404', '409', '422']
$ POST /v1/email/query  (provider: "openai") -> 400 {'detail': "provider 'openai' is not supported: the email agent runs local inference only. Omit 'provider' or set it to 'lemonade'."}
  openapi.email.json lists: ['200', '400', '409', '422', '500', '502']
```

Before this PR, all three listed only `['200', '422']`.

## Checklist

- [x] I have linked a GitHub issue above (`Closes #N` / `Fixes #N` /
`Refs #N`).
- [x] I have described **why** this change is being made, not just what
changed.
- [ ] I have run linting and tests locally (`python util/lint.py --all`,
`pytest tests/unit/`).
- [x] I have attached **real-world evidence matched to the surface I
changed** (see Evidence above), or marked each surface N/A.
- [x] I have updated documentation if user-visible behavior changed (see
[CONTRIBUTING.md](../CONTRIBUTING.md)).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent::email Email agent changes documentation Documentation changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Email sidecar OpenAPI omits bearer authentication enforced by runtime routes

1 participant