Repository navigation
feat(integrations): connect the Antigravity app and agy CLI to the gateway - #8736
Closed
andrew05060414 wants to merge 9 commits into
Closed
andrew05060414 wants to merge 9 commits into
andrew05060414 wants to merge 9 commits into
Conversation
…nCodex gateway Adds src/integrations/gateway-clients with a connector per client. The app connector edits ~/.antigravity/settings.json behind a stash and restores it byte for byte (path-wise when the user edited since). The agy connector writes a marked shell function into bash, zsh and PowerShell profiles.
…and agy The Integrations page gets an Antigravity tab backed by /api/gateway-clients. Each client shows its state, the files it changes, override warnings from admin_settings.json or the environment, and the server's notes. Connect (with an optional default model for the desktop app) and Disconnect relay the server's message, including refusals, and reread status. The tab label is allowlisted as a product name in the zh-TW and French placeholder guards.
Drives the page against a fetch mock for status, a connect with a model, and a 409 refusal.
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Contributor
|
Contributor
⏳ DRAFT
What to do
Review readiness checklist
✅ 4/4 boxes ticked. This pull request was already a draft. Its draft status will be preserved after every issue above is resolved. Hygiene
|
… without a lint suppression
This was referenced Nov 14, 2026
Closed
Contributor
Author
|
Superseded by #8742, which carries this change together with the related Antigravity gateway PR as one commit each on current |
lidge-jun
added a commit
that referenced
this pull request
Nov 19, 2026
…and agy CLI connection (#8742) * feat(server): accept Gemini API requests (generateContent, streamGenerateContent, models) Original PR: #8732 * feat(integrations): connect the Antigravity app and agy CLI to the gateway Original PR: #8736 * refactor(server): dispatch /api/gateway-clients from the integration routes The connector routes were mounted from management-api.ts, a sponsored surface. integration-routes.ts already owns the client-integration namespace, so the lazy import moves there and management-api.ts is unchanged from dev. * fix(integrations): give gateway-client notes and overrides stable codes Status notes and override warnings were English sentences only, so the dashboard could not translate them. Each now carries a code beside its English text (one table in types.ts), and the Antigravity status reports the current models.defaultModelId. CLI output is unchanged. * fix(gui): translate the Antigravity tab and show the current default model Notes, warnings and action results were shown in the server's English under every locale, and the restart hint appeared twice after Connect. The tab now renders them from codes in all 11 locales, says the restart hint once, prefills the default model, names the state Connected / Not connected to match its buttons, and drops the untranslated file role. * fix(cli): describe offline status and disconnect accurately for gateway clients * fix(cli): refuse an offline gateway-client connect when the configured port is 0 * fix(integrations): keep gateway-client restores correct across edits, failed writes, UTF-16 profiles and unreadable admin settings * fix(gui): word an unconfirmed gateway-client action honestly and reset cards per target * fix(docs): state which gateway-client edits disconnect keeps * fix(gemini): keep text answers open in VALIDATED mode and carry images returned inside functionResponse.parts * docs(es): mirror the Antigravity app and agy CLI section * test(cli): map /api/gateway-clients to ocx connect/disconnect antigravity|agy in the GUI parity sweep * fix(gui): note why gateway client actions read refusal bodies (react-doctor) * fix(integrations): protect gateway client writes and uninstall recovery * test(gateway): verify Gemini admission and selected locale copy * fix(ci): keep test layout and Spanish docs within current gates * fix(gateway-clients): confine canonical client file destinations * fix(uninstall): retire empty gateway restore directories * fix(cli): scope gateway connect model selection to Antigravity * test(uninstall): exercise owned gateway cleanup on unelevated fixtures * Confine gateway client updates to exact profile paths * Recover agy profiles when untracked candidates cannot be read * Default the gateway context during uninstall teardown * Require explicit gateway context for injected uninstall teardown --------- Co-authored-by: JUN <jun@lidgeai.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Google's own Antigravity clients had no way to run through OpenCodex. Users with many Antigravity accounts in the OpenCodex pool still had to sign the desktop app and the
agyCLI into one Google account at a time. After this change, one click on the dashboard (orocx connect antigravity|agy) points either client at OpenCodex, so its requests get the same routing, account rotation, request log and redaction as every other client. Disconnect puts the user's own settings back.Both connectors use Google's documented enterprise-gateway configuration rather than replacing tokens or binaries:
gatewayblock (enabled,url,apiKey,wireProtocol: "openai") and, if given,models.defaultModelIdin~/.antigravity/settings.json. A usermodels.listis set aside while connected because it would hide OpenCodex models from the picker. The app then calls the existing/v1/modelsand/v1/chat/completions.agyshell function between# >>> opencodex agy >>>markers in the existing bash/zsh and PowerShell profiles. It setsAGY_LLM_GATEWAY_URL,AGY_LLM_GATEWAY_API_KEYandAGY_LLM_GATEWAY_WIRE_PROTOCOL=genaifor that one command. No agy settings file is changed. Thegenaiprotocol is the Gemini API, served by feat(server): accept Gemini API requests (generateContent, streamGenerateContent, models) #8732.GET /api/gateway-clientsandocx connect <client> statusreportconnected,disconnectedordrifted. They also warn when an organizationadmin_settings.jsonsets a gateway (it wins over the user file) or whenAGY_LLM_GATEWAY_URLis exported (it wins over the user file for agy).localInferenceDestination, and the key written is a fixed non-secret placeholder. If the bind requires a data-plane credential, connect refuses with the same adviceocx claudegives (enableunauthenticatedLoopbackListeneror bind to loopback).GET /api/gateway-clients,POST /api/gateway-clients/{id}/connect|disconnect(same session/origin checks as other management POSTs). CLIocx connect antigravity|agy [--model] [status]andocx disconnect antigravity|agy, branched before any hub logic. It uses the running proxy, or works locally when none is running. A new Antigravity tab on the Integrations page. Astructure/clients/antigravity-gateway.mddoc and a docs-site section.Scope: client configuration only. The provider-side
google-antigravityaccounts are untouched and separate. Gateway mode means the clients do not use their own Google sign-in, which the UI states.Verification
bun test, each file run on its own:tests/clients/gateway-clients.test.ts11,gateway-client-routes.test.ts4,gateway-client-command.test.ts4,management-route-registry.test.ts31 (+1 skip),skill-ocx.test.ts15,test-layout.test.ts2,file-size-ratchet.test.ts9, all pass. The GUI tests also pass:gateway-clients-page.test.tsx(new, 3),locale-parity,fr-localization,i18n-locales,integrations-tab-coverage,integration-marksandintegrations-surfaces.bun run typecheck, GUItsc -band lint,structure:check,skill:surface:check,privacy:scanpass.settings.json(with a user gateway,models.listand other keys), a.bashrcwithout a trailing newline and a CRLF PowerShell profile byte for byte. A second connect reported no change. The written functions parse in real PowerShell (0 parse errors) and Git Bash (bash -n,type -t agy= function). The dashboard Connect buttons wrote and reported both clients as shown above. An app-shaped/v1/chat/completionsrequest and a Gemini-shaped request (with feat(server): accept Gemini API requests (generateContent, streamGenerateContent, models) #8732) both reached the stub.test:changed. Several agents share the test machine, so only new and changed files ran, and full coverage is left to CI. Localtest-layout-tooling(4),structure-ssot(2) and one case ofintegrations-invariantsfail on this machine's git 2.56 rejectingGIT_CONFIG_GLOBAL=NUL. That matches the machine's known baseline and was not re-run on a clean checkout.Readiness (2026-11-13)
new_suppressionhygiene finding: the model-selector check no longer needseslint-disable-next-line no-control-regex; it tests the code points directly. The existing"a\nb"refusal case covers it; the connector, route and CLI tests pass (19 pass).dev(873ec9b), inside the gate's window; no rebase for review.bun run typecheck,structure:check,skill:surface:check,privacy:scan, the layout and file-size guards and this PR's focused tests; after the deploy one real request each through Claude, GPT, Gemini, DeepSeek and Grok returned 200 and the error rate did not rise.maintainer-sponsoredlabel: the hygiene gate flagssrc/server/management-api.ts. Everything else is ready for review.Checklist
Review readiness checklist
This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:
Required local validation passed; commands, results, and any full-suite exception are documented.
I pushed my PR to a recent dev commit (at most 10 behind; a maintainer may still ask for the exact tip before merge).
I resolved all correct Codex and CodeRabbit findings.
My PR is ready for review.