Skip to content

fix(connectors): enforce catalog scope ceiling for authorization - #3247

Merged
itomek merged 4 commits into
amd:mainfrom
mikemikimike:fix/2736-scope-ceiling
Sep 2, 2026
Merged

itomek merged 4 commits into
amd:mainfrom
mikemikimike:fix/2736-scope-ceiling

Conversation

@mikemikimike

Copy link
Copy Markdown
Contributor

Summary

  • enforce each OAuth authorization request against the connector catalog's available scope ceiling
  • cover explicit CLI and Agent UI authorization paths with actionable rejection responses
  • preserve agent-declaration validation and add regressions for the shared flow and both surfaces

Closes #2736

Validation

  • python -X utf8 -m pytest tests/unit/connectors/test_flow.py::TestScopeCatalogBoundary tests/unit/connectors/test_cli.py::TestConnectGrantAgent::test_explicit_scope_outside_catalog_is_rejected_by_the_flow tests/unit/connectors/test_router_connectors.py::TestAuthorizeGrantAgents::test_authorize_explicit_scope_outside_catalog_is_rejected -q --tb=short --timeout=60 (3 passed)
  • python util/lint.py --black --isort --flake8 (passed)
  • git diff --check (passed)

The broader connector resolver test file still has pre-existing Windows failures because the repository socket guard blocks asyncio's local socketpair() during CLI/TestClient setup; see test output for the exact failures.

@github-actions github-actions Bot added the tests Test changes label Sep 1, 2026
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Request changes

This closes the reported hole — an explicitly-requested OAuth scope outside a connector's catalog is now rejected before the consent screen, for both the CLI and the Agent UI. The check itself is in the right place (the shared authorization entry point), and the three new tests exercise the flow, the CLI and the HTTP route.

The one thing to fix before merge: the sibling device-code sign-in still has the same hole. Signing in with a short code instead of a browser (--device on the CLI, and the Agent UI's device sign-in for Microsoft accounts) takes a different entry point in the same file, and that one still passes user-supplied scopes straight through unchecked. Since the point of this fix is that no caller can slip past the catalog ceiling, the device path needs the same guard — it's a few lines, and worth one more test.

Two smaller things: the new guard quietly does nothing when a connector has no catalog entry (better to fail loudly — the project's no-silent-fallbacks rule), and the Agent UI test only checks the status code and that the scope name appears somewhere in the body, so it wouldn't catch a change to the structured error payload the UI reads.

Real-world evidence

N/A — no evidence bundle was produced for this run, so the verdict rests on static review plus the unit-test output in the PR description.

Worth adding to the description before merge: this change alters what a user sees on two live surfaces, and neither is shown. A pasted gaia connectors connect google --scopes <bogus> transcript and the actual 400 response body from the authorize endpoint would take a minute each and would also document the error contract the UI depends on.

🔍 Technical details

🟡 Important

1. start_device_flow bypasses the new ceiling (src/gaia/connectors/flow.py:652)

The guard was added to start_authorization only. start_device_flow resolves scopes the same way (resolve_or_reject_empty_scopes, flow.py:652-654) and then sends them straight to the provider's device-code endpoint. Two reachable callers pass user-controlled scopes:

  • gaia connectors connect microsoft --device --scopes <bogus> — cli.py:336-337 routes to _handle_connect_device before any resolve/validate logic, and cli.py:459 forwards args.scopes verbatim.
  • POST /api/connectors/{id}/authorize-device — ui/routers/connectors.py:917-921 passes body.scopes through _widen_empty_scopes only.

Both Microsoft specs set supports_device_code=True, so this is a live path, not theoretical. Suggested shape — extract the check and call it from both:

def _reject_scopes_outside_catalog(provider_id: str, scopes_list: list[str]) -> None:
    """Catalog ceiling at the shared OAuth boundary (#2736): every caller —
    browser loopback and device-code, CLI and Agent UI — is checked here so a
    request cannot reach the consent screen wider than the catalog allows."""
    # Local import: gaia.connectors.catalog -> oauth_pkce -> flow is circular.
    import gaia.connectors.catalog  # noqa: F401  # pylint: disable=unused-import
    from gaia.connectors.registry import REGISTRY

    allowed = set(REGISTRY.get(provider_id).available_scopes)
    disallowed = sorted(set(scopes_list) - allowed)
    if disallowed:
        raise ScopeNotAllowedError(None, provider_id, disallowed)

REGISTRY.get raising is safe here: get_provider(provider_id) runs first in both functions and already fails for any id without an oauth_pkce spec (providers/__init__.py:89-93), and its KeyError message lists the known ids.

Worth a TestScopeCatalogBoundary case for start_device_flow alongside the existing one.

🟢 Nits

2. Unknown connector silently skips the guard (src/gaia/connectors/flow.py:270-277) — except KeyError: connector_spec = None followed by if connector_spec is not None means a provider with no catalog entry gets no ceiling check at all. That is the silent-degradation pattern CLAUDE.md rules out, on a security guard. In production it's unreachable (see above), so the try/except can just go — covered by the suggestion in finding 1. Contrast providers/__init__.py:65-68, where the same spec = None idiom is used but always ends in a raise.

3. Router test doesn't pin the error contract (tests/unit/connectors/test_router_connectors.py:147-148) — assert bogus_scope in resp.text passes for any 400 whose body happens to echo the scope. The Agent UI keys off detail["error"]:

        assert resp.status_code == 400
        detail = resp.json()["detail"]
        assert detail["error"] == "scope_not_allowed"
        assert detail["connector_id"] == "google"
        assert detail["scopes"] == [bogus_scope]

4. Undocumented local import (src/gaia/connectors/flow.py:267-268) — the comment above explains why the check exists, not why these two imports are function-local (the catalog → oauth_pkce → flow cycle). Every other module imports the catalog at module scope, so the next reader will try to hoist it. One trailing clause fixes it, as in the suggestion in finding 1.

5. Positional None reads as a bug (src/gaia/connectors/flow.py:277) — ScopeNotAllowedError(None, provider_id, disallowed); agent_id=None at the call site makes the "no agent involved" case self-explaining.

Strengths

  • The guard runs after resolve_or_reject_empty_scopes, so it validates the final scope list — including the prior-state-restored and default_scopes cases, not just what the caller typed.
  • ScopeNotAllowedError was widened to agent_id: str | None with a branching message rather than being forked into a second exception type, so the router's existing 400 translation covers both origins with one payload shape.
  • Tests cover all three levels the issue names: the shared flow, the CLI's verbatim --scopes branch, and the UI router.

@mikemikimike

Copy link
Copy Markdown
Contributor Author

Addressed the review feedback in 7e6242f9: the scope catalog guard now covers both browser and device-code flows, unknown catalog entries fail loudly through the registry, the local-import rationale is documented, and the router test asserts the structured error payload. Focused tests and formatting passed; the remote head is confirmed on the fork.

@kovtcharov-amd

Copy link
Copy Markdown
Collaborator

CI has now actually run on this (it was queued behind workflow approval) and it's red.

Two connector tests fail because the new scope ceiling rejects gmail.readonly and userinfo.email — scopes the Google connector asks for by default. So the guard is firing on the connector's own behaviour.

That points at the catalog being incomplete rather than the requests being too wide. Please don't loosen the guard to make it pass; widening available_scopes to cover what the code already defaults to is the fix. A test pinning "every default scope is inside the catalog entry" would stop this drifting again.

Log

@kovtcharov-amd kovtcharov-amd left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI is red — see the comment above. Marking so this doesn't read as mergeable.

…iling

Connecting a Google account failed outright: the new catalog ceiling
rejected `userinfo.email`, which is the scope GAIA's own first-connect
fallback asks for. Both `gaia connectors connect google --grant-agent
installed:email` and every bare first-time connect hit it.

The catalog listed only the short OIDC spellings (`email`, `profile`)
while `GoogleOAuthProvider.default_scopes` requests the `userinfo.email`
URL form, so the ceiling rejected a request GAIA generates itself. The
error even told the user to file a bug rather than widen it — correct
advice, wrong side of the fence. Widening the catalog is the fix; the
guard is untouched and still rejects genuinely over-broad scopes.

`test_scope_ceiling_invariant.py` pins the class of drift that caused
this: both automatic scope sources (the catalog spec's `default_scopes`
and the raw provider's) must stay inside `available_scopes` for every
oauth_pkce connector, checked against the real rejection function.

Also closes the fourth `resolve_or_reject_empty_scopes` site the guard
missed. `poll_device_flow` is a public SDK export and its scopes are
what `save_connection` records, so an SDK caller reaching it directly
could persist a connection claiming scopes outside the ceiling.

`test_router.py` asked for a bare `gmail.readonly`, which is not a real
Google scope — Google's are full URLs. The ceiling was right to reject
it; the literal is now the URL form.
@github-actions github-actions Bot added the documentation Documentation changes label Sep 2, 2026
@kovtcharov-amd

Copy link
Copy Markdown
Collaborator

CI was red because the new ceiling rejected the one scope GAIA asks for on its own behalf. Connecting a Google account failed outright — both gaia connectors connect google --grant-agent installed:email and every bare first-time connect — because the Google catalog entry listed only the short OIDC spellings while the provider's first-connect fallback requests https://www.googleapis.com/auth/userinfo.email. The error text was right that widening the request is the wrong move; the catalog was the incomplete side. The guard itself is unchanged and still rejects genuinely over-broad scopes.

Pushed on top of your branch:

  • Added userinfo.email to the Google catalog entry and the Console scope table in the docs.
  • Added a drift guard so this can't recur: both automatic scope sources must stay inside available_scopes for every OAuth connector, checked against the real rejection function.
  • Closed the fourth entry point the ceiling missed.
  • Fixed a stale test that asked for a scope string Google doesn't actually accept.

One thing worth a separate look, not part of this PR: the grant-ledger write path doesn't enforce the same ceiling the OAuth request path now does, so the two enforcement points disagree. @kovtcharov-amd — flagging for triage rather than folding it in here.

🔍 Technical details

Root cause. GOOGLE_SPEC.available_scopes had ("openid", "email", "profile", ...) but GoogleOAuthProvider.default_scopes is ("openid", "https://www.googleapis.com/auth/userinfo.email"). That list is what prior_state.resolve_or_reject_empty_scopes falls back to on a genuine first connect, and cli.py:371 unions it into every --grant-agent request — so _reject_scopes_outside_catalog rejected a request GAIA generates itself. test_email_scope_drift.py already documented the two default_scopes lists as "legitimately differing in literal form (#2730 checkpoint-1 finding)"; the ceiling turned that latent inconsistency fatal.

Why widen rather than realign the provider. Setting GoogleOAuthProvider.default_scopes = ("openid", "email") also fixes the fresh-connect case and is arguably the cleaner end state, but it leaves existing installs broken: their stored connection already carries userinfo.email from the old fallback, and prior_state._current_scopes_and_agents replays those exact strings into the copy-pasteable reconnect command it prints. That command would then be rejected by the ceiling. The catalog needs the scope either way.

Why userinfo.profile is not added. Nothing requests it. flow._resolve_granted_scopes intersects Google's returned scope string with what was requested, so the URL form is dropped rather than persisted when only profile was asked for — there is no round-trip that would surface it. It also matters that available_scopes is not purely a ceiling: ConnectorsSection.tsx sends it verbatim as the authorization request, so every entry is a line on the user's consent screen.

poll_device_flow. Three of the four resolve_or_reject_empty_scopes call sites got the guard. This one is a public SDK export (api.__all__) and its scopes feed _resolve_granted_scopes → save_connection, so a caller reaching it without going through start_device_flow could persist a connection record claiming scopes outside the ceiling.

test_router.py. It passed a bare "gmail.readonly". Real Google scopes are full URLs apart from openid/email/profile; the literal appears nowhere in src/ or hub/. The ceiling was correct to reject it.

Verification. tests/unit/connectors/ goes from the two reported failures to zero new ones, checked against an origin/main baseline in a second worktree to separate them from pre-existing local-env noise. The invariant test was confirmed to fail on all three assertions with the catalog change reverted. Email Agent Unit Tests failed on the identical two tests, same root cause, no separate defect.

@itomek itomek left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving — every review item is addressed and CI is fully green.

The Windows red that prompted the change request was runner infrastructure, not this PR: the same Application Control policy blocked llama-server.exe on main at 19:11Z (run 33671808382), two and a half hours after this PR's run, failing the same five test_lemonade_client.py cases. This PR touches no LLM code. On the current head every check passes, including that job.

🔍 Verification of each review item against the current head

From the automated review (2026-09-01):

# Item Status
1 start_device_flow bypassed the ceiling ✅ shared _reject_scopes_outside_catalog (flow.py:217) called from all three entry points — start_authorization:280, start_device_flow:658, poll_device_flow:738. Those are every resolve_or_reject_empty_scopes call site in the module.
2 Unknown connector silently skipped the guard ✅ the except KeyError / spec = None idiom is gone; REGISTRY.get(provider_id) raises (flow.py:226).
3 Router test didn't pin the error contract ✅ asserts detail["error"], detail["connector_id"], detail["scopes"] (test_router_connectors.py:365-370), matching the 400 payload now built in ui/routers/connectors.py:257.
4 Undocumented function-local import ✅ docstring names the cycle (flow.py:220-221).
5 Positional None reads as a bug ❌ still ScopeNotAllowedError(None, provider_id, disallowed) at flow.py:229. Cosmetic only — ScopeNotAllowedError.__init__ now takes agent_id: str | None and branches its message on it (errors.py:386-394), so behaviour is correct. Not worth a CI cycle.

From the maintainer follow-up (2026-09-02):

# Item Status
1 userinfo.email in the Google catalog + docs ✅ catalog/google.py:38-41 and the Console scope table in docs/connectors/google.mdx:159.
2 Drift guard against recurrence ✅ test_scope_ceiling_invariant.py checks both automatic scope sources for all three OAuth connectors, runs the union through the real _reject_scopes_outside_catalog rather than a reimplementation (:86-94), and adds two meta-tests — one that fails if the connector list shrinks (:51), one that fails if the guard is neutered (:97).
3 Fourth entry point (poll_device_flow) ✅ flow.py:738.
4 Stale test scope string ✅ bare gmail.readonly → the full URL in test_router.py.

Issue #2736's acceptance criteria: both met — the ceiling is enforced inside start_authorization so every caller is covered, and the rejection is exercised through the CLI verbatim --scopes branch and the UI router.

Consent-screen check. available_scopes is not purely a ceiling — the Agent UI sends it verbatim as the authorization request — so widening it is worth checking. userinfo.email is Google's URL spelling of email, the same permission, and GoogleOAuthProvider.default_scopes already requests it today. The catalog now matches what the code has always asked for; no new permission reaches the user.

@itomek
itomek dismissed kovtcharov-amd’s stale review September 2, 2026 21:46

Dismissing: the stated reason was red CI, which is resolved. The two connector failures were fixed in 50ef1c9, and the remaining Windows red was runner infrastructure (an Application Control policy blocking llama-server.exe) that failed main the same way at 19:11Z. The branch has since been updated with main and every check passes.

@itomek
itomek added this pull request to the merge queue Sep 2, 2026
Merged via the queue into amd:main with commit 1ae7dad Sep 2, 2026
34 checks passed
@itomek

itomek commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Merged. The grant-ledger gap flagged above is now tracked separately as #3332 — the OAuth request path enforces the ceiling, the ledger write path (grant_agent, grants.py:158) still writes scopes verbatim, so the two enforcement points disagree until that lands.

pull Bot pushed a commit to bhardwajRahul/gaia that referenced this pull request Sep 7, 2026
…#3363)

## Summary

The per-agent connector permission has never actually run. Every tool
executed by the agent loop lost its agent identity before it reached the
credential layer, so every check was skipped — and the ledger those
checks read would accept any scope for any connector id. This makes the
check real and puts a ceiling on the ledger it reads.

## Why

If you toggle a scope off for an agent in Settings → Connections today,
nothing happens: the agent still gets the credential. Tool bodies run in
a worker thread, a new Python thread starts with an empty context, and
the agent identity bound for the turn never crosses that boundary — so
the credential layer sees "no agent" and takes the ungated CLI path.
Separately, `PUT /api/connectors/google/grants/installed:email` with
`{"scopes": ["https://mail.google.com/"]}` returned 200 and wrote it,
giving an agent full-mailbox authority Google never advertised for that
connector; a typo'd connector id also returned 200 and persisted a key
nothing reads.

Both halves have to land together. Enforcing the check while the ledger
still takes arbitrary scopes just turns a dead control into a forgeable
one.

After this, a scope you did not grant is a scope the agent cannot use,
and a scope the connector never advertised is a scope you cannot grant.

## Linked issue

Closes amd#3362

## Changes

- **Identity survives the tool thread** — `_call_tool_bounded` snapshots
the caller's context and runs the worker inside it. Copying inside the
worker (the intuitive spot) is a no-op; it would copy the worker's own
empty context.
- **Credential access fails closed** — a request made inside an agent
turn with no resolvable identity is refused instead of falling through
ungated. Outside a turn (CLI, scripts, SDK embedding) the documented
ungated escape hatch is unchanged.
- **A request that names no scopes is refused on both credential
doors**, not one. Naming nothing satisfies the check vacuously, so it
must not mean "nothing to check" — see the entry-point table below.
- **One scope ceiling for the ledger** — both gates live in
`grants.grant_agent`, so the Agent UI route, the CLI and the SDK cannot
drift. This is the ceiling amd#3247 added to the OAuth *authorize* path,
extended to the two direct ledger writes it left uncovered (`put_grant`
and the activation auto-grant), returning the same `scope_not_allowed`
400.
- **Revoking is never ceiling-gated.** Only widening is. A connector
dropped from the catalog must still be clearable, or removing it would
strand grants forever — a regression pointing the other way. Guarded by
its own test.
- **Unknown connector id is a typed error**, not a bare `KeyError` —
which reached HTTP as a 500 and the CLI as a traceback.
- **Tavily's key is gated** — it named neither an agent nor any scopes,
so the dispatcher had nothing to verify.
- Docs: the SDK connectors guide now covers the ceiling, the fail-closed
rule, and when an SDK author must pass `agent_id` explicitly (their own
threads, queued work, foreign callbacks); the security page gains the
two threat rows.

### Every door into the credential/token layer

Enumerated rather than assumed, after review found the first pass had
closed one and left its twin open:

| Entry point | Public? | Identity gate | Empty-scope gate | Grant check
|
|---|---|---|---|---|
| `api.get_access_token` | yes | ✅ | ✅ | ✅ |
| `api.get_access_token_with_expiry` | no | ✅ | ✅ | ✅ |
| `api.get_access_token_sync` | yes | ✅ delegates | ✅ | ✅ |
| `api.get_access_token_with_expiry_sync` | no | ✅ delegates | ✅ | ✅ |
| `handler.get_credential` | no (tool-facing) | ✅ | ✅ | ✅ |
| `handler.get_credential_sync` | no (tool-facing) | ✅ delegates | ✅ | ✅
|
| `oauth_pkce.…get_credential` | no | reached only via
`handler.get_credential` | " | " |
| `mcp_server.…get_credential` | no | reached only via
`handler.get_credential` | " | " |
| `tokens.get_or_refresh` / `…_sync` / `get_token_with_expiry` | **no**
| **deliberately exempt** | — | — |
| `store.load_connection` / keyring | **no** | **deliberately exempt** |
— | — |

The last two rows are the raw refresh and storage primitives. They are
not in `gaia.connectors.__all__` or its lazy `_API_NAMES`, so reaching
them means importing a private module — which is no different from
reading the keyring directly, and sits on the trusted-code side of the
threat model this repo already documents
(`docs/security/connections.mdx`: custom agents "run in the same process
as GAIA — they are trusted code you install yourself"). Guarding them
would be theatre, not defence. Every *sanctioned* way to obtain a
credential is in the guarded rows.

## Test plan

- [x] `python -m pytest tests/unit/ -q` — **full directory**, not the
subfolders. This is what the first round got wrong: I ran only the
folders I changed, and stale tests outside them slipped through. Result:
**100 failed, 10386 passed, 15 errors**. Re-running only those 20
failing files against unmodified `upstream/main` gives a
**byte-identical 114-line failure list** — every one is pre-existing
Windows breakage (installer / eval / lemonade / daemon / CLI), and
**none is in a module this PR touches**.
- [x] `python -m pytest tests/unit/connectors/ -q` — 792 passed
- [x] `python -m pytest tests/unit/test_proactive_hooks.py
tests/unit/test_turn_metrics_wire.py -q` — 40 passed (the two stale
tests review found)
- [x] `python util/check_doc_code.py --lang python` — 418 blocks OK;
`python util/check_doc_links.py --internal-only` — 958 links OK
- [x] `python -m pytest
tests/unit/connectors/test_agent_identity_boundary.py -q` — 19 passed
(new file)
- [x] Same file against the unpatched sources → **5 failed**, including
`assert None == 'builtin:grant-boundary-probe'` — the tests fail for the
right reason
- [x] `python util/lint.py --black --isort --flake8` — all pass
- [ ] `python util/lint.py --all` — red at `upstream/main` too: 29
pre-existing mypy errors in files this PR does not touch. Identical set
before and after.
- [ ] Agent eval — **not applicable**: no LLM-affecting surface changed
(no prompts, tool registration or docstrings, tool schema, error
classification, or default model).

<details>
<summary>🔍 How the local run was made trustworthy on Windows</summary>

`tests/unit/conftest.py`'s network guard breaks `socket.socketpair()` on
Windows, so every `TestClient`/asyncio test **errors in setup** rather
than running. My first round compared failure lists and got "identical
to baseline" — true, and meaningless, because ~240 of those tests never
executed. That is what let 16 real failures reach CI.

For this round I temporarily allowed loopback connects in that guard
locally so the tests actually run (`tests/unit/connectors/` went from
535 to 792 executed). **That change is not committed** —
`tests/unit/conftest.py` is untouched in this PR. Linux CI needs no such
patch.
</details>

## Evidence

**The bypass review found, closed.** The OAuth token path is the one the
Google connector uses:

```
grants ledger for google: {}
check_agent_grant(google, builtin:chat, []) -> True   <- vacuously True

get_access_token(provider='google', scopes=[], agent_id='builtin:chat'):
  refused: ConfigurationError
    get_access_token('google') named no scopes, so the per-agent grant for
    'builtin:chat' cannot be verified and no token will be issued. Pass the
    scopes the caller actually needs.
```

Before, that call returned a full-capability token with the ledger never
consulted.

**CLI** — `gaia connectors grants grant`, isolated `HOME`:

```
$ gaia connectors grants grant gooogle builtin:chat --scopes "openid"
gaia connectors grants grant: Unknown connector 'gooogle'. Known ids: google,
mcp-git, mcp-github, mcp-memory, mcp-tavily, microsoft, microsoft_work. Run
'gaia connectors list' to see the catalog, or check the id for a typo.
exit=1

$ gaia connectors grants grant google installed:email --scopes "https://mail.google.com/"
gaia connectors grants grant: Agent 'installed:email' declares scope(s)
https://mail.google.com/ for connector 'google' that are outside its
available_scopes catalog entry. File a bug rather than widening the request.
exit=1

$ gaia connectors grants grant google installed:email --scopes ".../gmail.readonly"
Granted google → installed:email: https://www.googleapis.com/auth/gmail.readonly
exit=0

$ gaia connectors grants revoke google installed:email     # never ceiling-gated
Revoked grant for google → installed:email.
exit=0
```

**HTTP API** — real server (`python -m gaia.ui.server --port 4207`),
real requests. Before this PR all three returned `200 OK` and wrote the
ledger:

```
PUT /api/connectors/google/grants/installed:email  {"scopes":["https://mail.google.com/"]}
→ 400  {"detail":{"error":"scope_not_allowed","agent_id":"installed:email",
        "connector_id":"google","scopes":["https://mail.google.com/"]}}

PUT /api/connectors/gooogle/grants/builtin:chat    {"scopes":["openid"]}
→ 404  {"detail":{"error":"unknown_connector","connector_id":"gooogle"}}

PUT /api/connectors/google/grants/installed:email  {"scopes":[".../gmail.readonly"]}
→ 200  {"connector_id":"google","agent_id":"installed:email","scopes":[".../gmail.readonly"]}

GET /api/connectors/google/grants
→ {"grants":{"installed:email":["https://www.googleapis.com/auth/gmail.readonly"]}}
```

**Agent identity across the tool thread** — the real `process_query` →
`_execute_tool` → worker-thread path:

```
before:  AssertionError: assert None == 'builtin:grant-boundary-probe'
after:   thread == "tool:probe", current_agent_id() == "builtin:grant-boundary-probe"
```

- **Agent exposed in the Agent UI** — N/A for screenshots: no UI
component or rendering changed. The route the Settings → Connections
toggles call is covered by the live HTTP transcript above.
- **MCP tools / servers** — N/A: no MCP tool, server, or bridge
behaviour changed. `mcp_server` connectors are affected only as a grant
*ceiling* (the implicit `use` scope).

## Checklist

- [x] I have linked a GitHub issue above (`Closes amd#3362`).
- [x] I have described **why** this change is being made, not just what
changed.
- [x] I have run linting and tests locally (see Test plan, including the
two caveats).
- [x] I have attached **real-world evidence matched to the surface I
changed**, or marked each surface N/A.
- [x] I have updated documentation
(`docs/sdk/infrastructure/connectors.mdx`,
`docs/security/connections.mdx`).

<details>
<summary>🔍 The three tests that changed behaviour — real contract, or
the bug written down?</summary>

**`test_put_activation_with_no_grant_and_scopes_auto_grants` — the bug
written down.** `put_activation` passed `body.scopes` from the HTTP
request straight into `grant_agent`, so activating an agent could mint a
grant for a scope the connector never advertised. The test asserted
`{"scopes": ["use", "read"]}` **landed in the ledger** for a connector
whose ceiling is `use`. That is the same hole as `put_grant`, reached
through the activation door. Kept as a passing case with an in-ceiling
scope, and a new test asserts the out-of-ceiling one is refused with
neither ledger touched.

**`test_agent_identity_context_returns_none_for_no_ns_id` — the bug
written down.** It asserted that an agent with no namespaced id gets
`None` instead of a context block, which meant `process_query` ran that
turn outside any context — precisely the state the connectors layer
reads as "no agent, take the ungated path". Rewritten to assert the new
contract (the turn is entered either way; a credential request inside it
with no identity is refused), with a docstring naming what it now guards
so it doesn't read as a regression.

**`test_turn_metrics_wire.py`'s identity stub — neither.** It replaced
`_agent_identity_context` with `lambda ns: None` because `None` used to
be a legal return; it asserts nothing about identity, only about
recorder sealing. A test double that went stale, fixed by returning
`contextlib.nullcontext()`.

**Test-fixture churn (no behaviour change).** Several tests seeded
grants with shorthand scope names (`gmail.readonly`, `Mail.ReadWrite`,
`scope_0`) that are not real catalog scopes — harmless before the
ceiling existed. They now use catalog-real scopes. Four disconnect tests
granted against `ConnectorSpec`s they built in-line and never published;
they now register them via a `register_ephemeral_spec` fixture, since
"an id nothing publishes" is exactly the phantom-key case the guard
rejects. No assertion was weakened.
</details>

---------

Co-authored-by: Ovtcharov <[email protected]>
@kovtcharov-amd kovtcharov-amd mentioned this pull request Sep 14, 2026
11 of 12 tasks
kovtcharov-amd pushed a commit that referenced this pull request Sep 14, 2026
- #3614: a chat turn could plant persistent system/permission memory
  rows reaching every future system prompt (memory-based privilege
  escalation) — Security.
- #3247: --scopes could request an OAuth scope outside a connector's
  declared ceiling via the CLI path — Bug Fixes.
Completes a full keyword sweep of all 216 commits in range for
security/breaking markers (fix(security) prefix, CWE/CVE mentions,
leak/expose/bypass/inject/escalat/auth/credential/secret/token/
sandbox/escape terms, and GitHub's breaking-change text search).
kovtcharov-amd pushed a commit that referenced this pull request Sep 14, 2026
- #3614: a chat turn could plant persistent system/permission memory
  rows reaching every future system prompt (memory-based privilege
  escalation) — Security.
- #3247: --scopes could request an OAuth scope outside a connector's
  declared ceiling via the CLI path — Bug Fixes.
Completes a full keyword sweep of all 216 commits in range for
security/breaking markers (fix(security) prefix, CWE/CVE mentions,
leak/expose/bypass/inject/escalat/auth/credential/secret/token/
sandbox/escape terms, and GitHub's breaking-change text search).
kovtcharov-amd pushed a commit that referenced this pull request Sep 15, 2026
- #3614: a chat turn could plant persistent system/permission memory
  rows reaching every future system prompt (memory-based privilege
  escalation) — Security.
- #3247: --scopes could request an OAuth scope outside a connector's
  declared ceiling via the CLI path — Bug Fixes.
Completes a full keyword sweep of all 216 commits in range for
security/breaking markers (fix(security) prefix, CWE/CVE mentions,
leak/expose/bypass/inject/escalat/auth/credential/secret/token/
sandbox/escape terms, and GitHub's breaking-change text search).
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

documentation Documentation changes tests Test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(connectors): the CLI's verbatim --scopes branch bypasses the available_scopes ceiling

3 participants