Skip to content

feat(clients): register Antigravity CLI during setup - #3249

Closed
IvenKooLab wants to merge 3 commits into
morluto:mainfrom
IvenKooLab:feat/antigravity-cli-client
Closed

IvenKooLab wants to merge 3 commits into
morluto:mainfrom
IvenKooLab:feat/antigravity-cli-client

Conversation

@IvenKooLab

@IvenKooLab IvenKooLab commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Register the Antigravity CLI (antigravity_cli) so CLI users get REA's workflow skill where the CLI loads it, instead of an MCP registration with no skill.

Problem and expected behavior

The Antigravity CLI reads the same global ~/.gemini/config/mcp_config.json registration file as the IDE (docs), so the existing antigravity client already registers MCP for both surfaces. But per the official skills documentation and the Gemini CLI migration guide, the CLI discovers global skills from ~/.gemini/antigravity-cli/skills/, not the IDE's ~/.gemini/config/skills/. Setup therefore registered the CLI's MCP server while the workflow skill never landed in the CLI's skills root — the same surface-specific skill-root gap the Trae and Qoder reviews fixed.

The new definition:

  • shares ~/.gemini/config/mcp_config.json as its configuration file, so selecting either Antigravity surface registers the same entry and a second selection is unchanged;
  • carries its own marker (~/.gemini/antigravity-cli) so detection reflects a CLI installation, not just the IDE;
  • installs the bundled skill copy under ~/.gemini/antigravity-cli/skills while antigravity keeps ~/.gemini/config/skills;
  • uninstalls idempotently across the shared file: the second surface reports skipped ("REA registration is absent") and unrelated servers survive.

Validation

Local verification on macOS arm64, Node 24.18.0/npm 11.16.0, with a fresh locked install. The tested tree was an actual three-way merge of main ca7ee018b and PR head 1677c06be in an isolated checkout. The merge had no conflicts; the installation table row was retained without manual edits.

  • Six focused files: 106/106 passed — Antigravity configuration 7, client lifecycle 56, product catalog 10, registration status 22, cleanup ownership 6, and public CLI profiles 5.
  • Additional compiled REA CLI checks: setup, scoped doctor (aligned), repeated setup (no actions and identical config bytes), uninstall, then scoped doctor (missing). Unrelated shared-file settings and user-owned skill notes survived. The CLI skill root stayed separate from the IDE's. An IDE-only --all-detected --dry-run did not select the CLI.
  • npm run verify:package — passed, including isolated install/update, CLI/MCP startup, setup/uninstall, backup recovery, symlink handling, and cleanup. The first attempt hit this host's Swift 6.3.3/default SDK 27 mismatch; the successful retry selected the installed SDK 26.5 and compiler through command-scoped environment settings.
  • npm pack --dry-run --json — passed (1,714 entries).
  • npm run docs:check — passed, including 5 README consistency tests.
  • npm run check — failed on the existing formatting of src/adb/AdbProvider.ts, which is byte-for-byte identical to main ca7ee018b. Separate typecheck, lint, knip, metadata, and architecture checks passed; lint reported 0 errors. git diff --cached --check passed. The full gate is not claimed as passing.
Focused test command
npm run test:focused -- \
  tests/boundary/filesystem/antigravityCliClientConfiguration.test.ts \
  tests/boundary/filesystem/clientLifecycle.test.ts \
  tests/boundary/filesystem/productCatalog.test.ts \
  tests/boundary/filesystem/clientRegistrationStatus.test.ts \
  tests/boundary/filesystem/setupClientConfigCleanupOwnership.test.ts \
  tests/boundary/cli/clientProfileLifecycle.test.ts

The closed-source Antigravity client was not installed or run, so its actual discovery and skill loading remain unverified. This run exercised REA's public CLI and filesystem/package boundaries on macOS; no additional Windows/Linux host verification is claimed.

The Antigravity CLI reads the same global ~/.gemini/config/mcp_config.json
registration file as the IDE but discovers global skills in its own
~/.gemini/antigravity-cli/skills root, so CLI users got REA's MCP server
without the workflow skill. Register antigravity_cli with the shared
configuration file, its own marker directory and skill destination, and
cover the shared-registration uninstall path (the second surface skips the
already-absent entry).
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@greptile-apps

greptile-apps Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues remain.

Summary

Adds antigravity_cli with a shared MCP registration and its own workflow skill directory.

  • Antigravity CLI setup installs REA’s workflow skill where the CLI loads skills.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  IDE["antigravity"] --> MCP["~/.gemini/config/mcp_config.json"]
  CLI["antigravity_cli"] --> MCP
  IDE --> IS["~/.gemini/config/skills"]
  CLI --> CS["~/.gemini/antigravity-cli/skills"]
Loading

Reviews (3) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." · Reviewed by Greptile

Comment thread src/application/SupportedClients.ts Resolved
The CLI shared the IDE's configuration file as detection evidence, so an
IDE-only home reported an Antigravity CLI installation and all-detected
setup installed a CLI skill copy without the CLI. Pin the CLI's evidence
to its own marker through an evidencePath override honored by doctor and
setup detection.
@IvenKooLab

Copy link
Copy Markdown
Contributor Author

Addressed in f879216.

The definition now pins the CLI's installation evidence to its own marker through an evidencePath override that clientEvidencePaths honors: on an IDE-only home with the shared mcp_config.json, doctor and setup no longer report antigravity_cli, so --all-detected does not install a CLI skill copy without the CLI. Two new detection tests cover the IDE-only home (no CLI row, IDE row intact) and the CLI-only home (CLI row present).

Validation: antigravityCliClientConfiguration.test.ts 7/7, lifecycle and status suites green, tsc --noEmit clean, repo check:fast (typecheck + lint) passes.

@kaoru0822-kitauji kaoru0822-kitauji added the ci-fix-wip Claimed by the CI-fix track label Oct 14, 2026
@kaoru0822-kitauji

Copy link
Copy Markdown
Collaborator

CI-fix track: both failures, evmoleInterfaceProvider diagnostic truncation and malformed-reply cleanup, came from main during that run, and 07540cb fixed them on main. I merged current main (no conflicts) so CI re-runs. On the merged tree with regenerated docs outputs, antigravityCliClientConfiguration, clientLifecycle and productCatalog pass (71), and docs:check and check:fast are clean.

@kaoru0822-kitauji kaoru0822-kitauji removed the ci-fix-wip Claimed by the CI-fix track label Oct 14, 2026
@IvenKooLab

Copy link
Copy Markdown
Contributor Author

Thanks for the CI-fix merge and the verification pass. Confirming on my side: head 1677c06 shows all 30 checks green, and the PR remains review-clean from the earlier f879216 evidence-path fix. Happy to make any further changes if needed.

@morluto morluto added enhancement New feature or request area: cli CLI adapter and one-shot commands labels Oct 14, 2026

@baron baron 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.

HOLD — verification incomplete at 1677c06be455507b2cd50efc3ffecb2f226dfd45; no additional confirmed source defect.

Source review covered the definition owner, both clientEvidencePaths consumers (setup detection and doctor), the configuration transaction/backup boundary, skill destinations, shared-file uninstall ownership, and the new tests. The current evidence override addresses the prior IDE-only detection comment without duplicating that finding. Existing approval-before-write, additive/idempotent transaction, backup, and owned-removal paths remain in use; this change does not introduce a new analysis provider or target-execution authority.

The documented shared MCP file and separate CLI skill root agree with Google's MCP guide and skills guide. This is documentation corroboration, not an installed Antigravity client run.

Light validation: evaluated the exact definition/evidence-path source with pinned Node and built-in assertions. IDE-only presence selected only the IDE, CLI-only presence selected only the CLI, and the skill roots were distinct. PR-diff git diff --check passed. No filesystem-boundary, public setup/doctor/uninstall, or real-client behavior is claimed by that probe.

Fresh pre-post snapshot (2026-10-15T06:59:01.094Z): head unchanged; mergeability MERGEABLE/CLEAN. All repository checks were inspected, not just Greptile or required checks: 15 succeeded, 17 skipped; none failed, pending, or cancelled. CI required is successful. Skipped lanes, including Full PR qualification, are not successful execution evidence.

Validation was restricted to isolated temporary checkouts and pinned Node 24.18.0. The shared checkout and the two PR lockfiles differ, so no dependency reuse was allowed. The initial isolated npm ci attempt failed at the sandbox-denied ambient npm cache; no completed install was reused, and installation was stopped/deferred when the overseer requested no heavy work. No builds or local Vitest/package runs completed. This is a HOLD, not approval; the light probes below do not replace public CLI/filesystem or installed-client verification.

Remaining local verification: the focused Antigravity configuration, client lifecycle, and registration-status suites; applicable verify:package and npm pack --dry-run. CI's Linux package result is useful existing evidence, but local package/native-host and actual Antigravity CLI discovery remain unverified.

@CassieFox23

Copy link
Copy Markdown
Contributor

TL;DR: I ran the two files this PR changes, plus six more, on Node 24.18.0. With this PR on current main, the two files pass. Five of the six more pass. The sixth, productCatalog, fails until the docs table is rebased. That docs hunk does not apply to main.

Thanks, IvenKooLab, for the work. I tested head 1677c06 on top of main 89faa86 (#3050).

Results

Check Main plus only this PR's tests Main plus this PR (docs/installation.md left out)
New test file, 7 tests 6 failed, 1 passed 7 passed
Client lifecycle file, 56 tests 1 failed, 55 passed 56 passed
Five related client test files not run 93 passed
productCatalog.test.ts not run 9 passed, 1 failed (see below)
  • The one lifecycle failure on main is the expected one. The list of supported clients now has one more name. Main's own copy of that file passes 56 of 56.
  • The one test that passes on main is the "IDE-only home" case. It checks that the new client is not detected, so it holds on main too.
  • The five related files cover how setup reads and writes client files. Their names are in the Commands fold.
  • The docs hunk for docs/installation.md fails a strict patch check on main. Main's client table has grown since this branch started. GitHub still reports the PR as mergeable, so a merge may work where a strict patch does not. I did not test a real merge.
  • With the docs file left out, productCatalog fails with one message. It says docs/installation.md is missing the new client. I then added the one table row by hand, and productCatalog passed 10 of 10. That row is my edit, not the author's, so the branch needs the same row after a rebase.
  • CI: GitHub shows all checks green on this head, including Source tests, five test shards and CI required. I did not run CI and I only read that status.
  • The box was shared with other test agents, so timings are rough.

Not run

  • The new client in a real install. The PR adds a setup entry for a closed-source command-line client from Google. I did not install or run that client, so skill loading is not checked.
  • Four test files run the doctor command. Their names are in the Commands fold. The command reads agent files in the home folder. So I skip any file that runs it.
  • The full test suite, npm run check, docs:check and the prettier check.
  • Windows and macOS. Node 22 and 26.
Commands
git -C ~/code/rea-mirror/rea.git fetch origin
git -C ~/code/rea-mirror/rea.git archive 89faa863ed472d8a13a826014331d3b81cfc5de3 | tar -x -C /tmp/t8-1015/main
npm ci   # Node 24.18.0, exit 0
# before: main plus only this PR's test changes
F=tests/boundary/filesystem
npm run test:focused -- $F/antigravityCliClientConfiguration.test.ts $F/clientLifecycle.test.ts   # exit 1, 7 failed 56 passed
# after: main plus this PR, docs/installation.md excluded
git apply --exclude=docs/installation.md 3249.diff
npm run test:focused -- $F/antigravityCliClientConfiguration.test.ts $F/clientLifecycle.test.ts \
  $F/clientConfigurationBom.test.ts $F/clientConfigurationDialects.test.ts \
  $F/clientConfigurationEnvironment.test.ts $F/clientConfigurationLayeredEnvironment.test.ts \
  $F/clientRegistrationStatus.test.ts $F/productCatalog.test.ts   # exit 1, 165 passed 1 failed
# productCatalog again, with one table row added by hand to docs/installation.md
npm run test:focused -- $F/productCatalog.test.ts   # exit 0, 10 passed

The files I skipped because they run doctor:

src/application/Doctor.test.ts
tests/boundary/cli/clientProfileLifecycle.test.ts
tests/boundary/filesystem/setupClientConfigCleanupOwnership.test.ts
tests/boundary/filesystem/setupUnavailableProvider.test.ts

The patch came from git diff 89faa863e...1677c06be in the mirror. I ran grep -i doctor on each named file first.

Test setup
  • Box: Nobara 44 (Fedora 44 base), Linux 7.2.9
  • CPU: AMD Ryzen 9 5900X, 12 cores / 24 threads
  • RAM: 32 GB DDR4-3600
  • Node: 24.18.0
  • Head: 1677c06
  • Base: 89faa86
  • Other: vitest 5.0.3. Base is main at test time.

🤖 Generated with Claude Code (Sonnet 5.5, verified by Opus 5.5) 🦊

@IvenKooLab

Copy link
Copy Markdown
Contributor Author

I checked the actual three-way merge of main ca7ee018b and PR head 1677c06be in an isolated macOS checkout. It merged without conflicts and retained the Antigravity CLI row in docs/installation.md; no table row was added by hand. productCatalog passed 10/10, and all six focused files passed 106/106. This confirms the documentation is present in the normal merge result, despite the strict patch-application failure reported above.

I also ran the compiled REA CLI through setup, scoped doctor, idempotent setup, uninstall, and doctor again. Registration changed from aligned to missing; unrelated configuration and user-owned notes survived. An IDE-only dry run did not select the CLI.

verify:package, npm pack --dry-run, and docs:check passed. Package verification needed this host's installed SDK 26.5 instead of its incompatible default SDK 27. The complete npm run check stopped on main's unchanged src/adb/AdbProvider.ts formatting; separate typecheck, lint, knip, metadata, and architecture checks passed. The PR body records these results and the test command.

@baron, this adds the local CLI/filesystem and package evidence missing from the earlier review. Actual Antigravity client discovery and skill loading remain unverified; the client is not installed here.

@IvenKooLab

Copy link
Copy Markdown
Contributor Author

Closing in favor of #5145. The replacement retains this implementation and review fixes on current main, and adds a committed public CLI regression for independent CLI detection, shared registration, repeated setup and cleanup of both skill roots while preserving user notes. This discussion remains the record of the earlier review and package validation. Actual Google client loading remains unverified; the replacement is a draft.

@morluto morluto added the area: setup Setup, packaging, upgrade, install, Doctor, and client registration label Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: cli CLI adapter and one-shot commands area: setup Setup, packaging, upgrade, install, Doctor, and client registration enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants