Repository navigation
revert(antigravity): remove the Antigravity adapter until #1487 lands - #1569
Conversation
This reverts commit 50614f1. Temporary, so that v20.0.20 does not ship a half-finished adapter. The intent is to reapply Antigravity support, not to drop it — see #1488. #1544 landed while the contribution proposal in #1488 was still open, and it covers less ground than @sambitcreate's #1487: - It reads only `~/.gemini/antigravity-cli`, missing `antigravity`, `antigravity-ide` and `antigravity-backup`, so IDE users get nothing. - Opaque model ids stay as `antigravity-model-<id>` with no alias table, so they cannot be priced and cost is silently understated. - The offline pricing snapshot has no Gemini rates, so `--offline` reports no cost for Gemini models. - It was validated against three chat turns in one CLI conversation. - Retries, subagents and model comparison ship unexercised. The first three are already solved in #1487, which is the better base to build on. Reverting now keeps the release clean while that is sorted out, and costs nothing: the adapter has not been released, so no user has it. Nothing about the reverse engineering is lost. The recovered field numbers and the reasoning behind the dedupe are written up in #1488.
📝 WalkthroughWalkthroughChangesAntigravity support was removed from the Rust CLI, configuration schema, adapter registry, build metadata, generated schema, and documentation. The Antigravity adapter implementation and guide were deleted. Documentation now identifies Antigravity as unsupported. Antigravity support removal
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
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. Comment |
|
There was a problem hiding this comment.
Pull request overview
This PR reverts the previously-added Antigravity adapter so the Rust-first ccusage CLI (and its npm/docs surfaces) no longer exposes ccusage antigravity … commands, schema namespaces, or unified-report integration until a more complete Antigravity implementation is ready.
Changes:
- Removes the
ccusage-adapter-antigravitycrate and all wiring (CLI dispatch, parser/help, unified loader, config schema, nix artifacts, Cargo workspace deps/lockfile). - Regenerates/updates snapshots and JSON schema artifacts to drop the
antigravitynamespace/commands. - Updates docs/READMEs to remove Antigravity as a supported source and deletes the Antigravity guide page.
Reviewed changes
Copilot reviewed 36 out of 37 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| rust/crates/ccusage/src/main.rs | Removes Antigravity command dispatch and updates the adapter exposure test count. |
| rust/crates/ccusage/src/cli/last_window.rs | Drops Antigravity from --last window targeting logic. |
| rust/crates/ccusage/src/adapter/mod.rs | Removes the ccusage_adapter_antigravity re-export. |
| rust/crates/ccusage/Cargo.toml | Removes the ccusage-adapter-antigravity dependency. |
| rust/crates/ccusage-core/src/lib.rs | Removes antigravity from the built-in agent name list. |
| rust/crates/ccusage-config/src/snapshots/ccusage_config__config_schema__tests__snapshots_schema_agent_specific_option_edges.snap | Updates schema snapshot content/metadata after removing Antigravity config. |
| rust/crates/ccusage-config/src/config_schema.rs | Removes AntigravityConfig types and drops the antigravity root property from schema tests. |
| rust/crates/ccusage-cli/src/types.rs | Removes Command::Antigravity from the CLI command enum. |
| rust/crates/ccusage-cli-parser/src/tests.rs | Removes Antigravity from parser test routing and help agent lists. |
| rust/crates/ccusage-cli-parser/src/snapshots/ccusage_cli_parser__tests__root_help.snap | Updates root help snapshot to remove Antigravity command listing. |
| rust/crates/ccusage-cli-parser/src/parser.rs | Removes Antigravity parsing, command detection, display naming, and report support mapping. |
| rust/crates/ccusage-cli-parser/src/cli-commands.json | Removes Antigravity entries from generated CLI command metadata. |
| rust/crates/ccusage-adapter-all/src/report.rs | Removes Antigravity label mapping from unified report labeling. |
| rust/crates/ccusage-adapter-all/src/loader.rs | Removes the Antigravity load spec from unified loading. |
| rust/crates/ccusage-adapter-all/src/lib.rs | Removes the Antigravity adapter re-export. |
| rust/crates/ccusage-adapter-all/Cargo.toml | Removes ccusage-adapter-antigravity dependency. |
| rust/Cargo.toml | Removes ccusage-adapter-antigravity from workspace dependency map. |
| rust/Cargo.lock | Removes the Antigravity adapter package entry and dependencies. |
| rust/adapters/antigravity/src/report.rs | Deletes Antigravity adapter reporting implementation/tests. |
| rust/adapters/antigravity/src/proto.rs | Deletes Antigravity protobuf reader/encoder and tests. |
| rust/adapters/antigravity/src/paths.rs | Deletes Antigravity path discovery and env override logic/tests. |
| rust/adapters/antigravity/src/parser.rs | Deletes Antigravity usage mapping and pricing-candidate logic/tests. |
| rust/adapters/antigravity/src/loader.rs | Deletes Antigravity SQLite loader, dedupe logic, and tests. |
| rust/adapters/antigravity/src/lib.rs | Deletes Antigravity adapter public entrypoints (run, summarize/report/load). |
| rust/adapters/antigravity/README.md | Deletes adapter-specific documentation. |
| rust/adapters/antigravity/Cargo.toml | Deletes the adapter crate manifest. |
| nix/cargo-artifacts.nix | Removes antigravity from the Nix adapter artifact agent list. |
| docs/guide/source-support-qa.md | Adds Antigravity CLI to the “Unsupported Sources Investigated” Q&A content. |
| docs/guide/index.md | Removes Antigravity from the supported-sources narrative and tables; references Q&A for unsupported sources. |
| docs/guide/getting-started.md | Removes Antigravity from troubleshooting and env var examples. |
| docs/guide/environment-variables.md | Removes ANTIGRAVITY_DATA_DIR documentation and updates the grep example. |
| docs/guide/config-files.md | Removes antigravity from the list of supported config namespaces. |
| docs/guide/antigravity/index.md | Deletes the Antigravity guide page. |
| docs/guide/all-reports.md | Removes Antigravity from supported sources and examples. |
| docs/.vitepress/config.ts | Removes Antigravity from the VitePress sidebar. |
| apps/ccusage/README.md | Removes Antigravity from the npm package README support tables/examples. |
| apps/ccusage/config-schema.json | Removes the antigravity configuration namespace from the published JSON schema. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| The current local data has conversation files such as `conversations/<conversation-id>.pb`, plus lightweight history and cache JSON files. The `.pb` files are opaque binary payloads and do not expose readable token usage, model usage, or per-turn accounting without Antigravity's private schema and storage semantics. | ||
|
|
||
| The CLI log files include operational events such as conversation creation, streaming, prompt length, auth, and model configuration messages. They do not include input, output, cache, or reasoning token counts. Quota-oriented tools can inspect remaining Antigravity quota, but quota snapshots are not the same as historical per-session token usage. | ||
|
|
||
| Because the local files do not expose the token accounting needed for ccusage reports, Antigravity CLI is not supported right now. |
| @@ -1,5 +1,5 @@ | |||
| --- | |||
| source: crates/ccusage-cli-parser/src/tests.rs | |||
| source: crates/ccusage-cli/src/tests.rs | |||
| source: crates/ccusage/src/config_schema.rs | ||
| assertion_line: 1293 |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — a single-commit revert of the ccusage-adapter-antigravity crate (#1544).
- Antigravity adapter crate deleted entirely —
rust/adapters/antigravity/including all source, Cargo.toml, and README. - Integration points cleaned — workspace
Cargo.toml,Cargo.lock,ccusage-adapter-all(lib, loader, report, deps),ccusage-cli-parser(parser, commands JSON, tests, root-help snapshot),ccusage-cli(types, main dispatch, last_window),ccusage-core(BUILT_IN_AGENT_NAMES),ccusage-config(schema types, test list, schema snapshot),nix/cargo-artifacts.nix. - npm artifacts: README table and
config-schema.jsonantigravity section removed. - Docs: antigravity guide page deleted, sidebar link removed, agent list references scrubbed from all-reports, config-files, environment-variables, getting-started, and index; source-support-qa moved antigravity from "Previously Unsupported, Now Supported" to "Unsupported Sources Investigated" with updated rationale text.
- Test count updates:
BUILT_IN_AGENT_NAMESlength 16→15,agent_commands_are_exposed_by_independent_cratescount 15→14, snapshots regenerated.
No stray references — the docs now correctly represent Antigravity as unsupported pending #1487.
@v0 or keep the SHA fresh with Dependabot | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
ccusage
@ccusage/ccusage-darwin-arm64
@ccusage/ccusage-darwin-x64
@ccusage/ccusage-linux-arm64
@ccusage/ccusage-linux-x64
@ccusage/ccusage-win32-x64
commit: |
ccusage performance comparisonPR SHA: This compares the PR package against the configured base package on the same CI runner. Package runtime diagnosticsCompares the PR package wrapper, the installed native optional dependency binary, and the workspace release binary on the same large fixture. This identifies whether slow package results come from JavaScript wrapper overhead, the published native binary build, or the Rust core itself. Fixtures: Claude
Committed fixture performanceCommitted small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage. Fixtures: Claude
Large real-world-shaped fixture performanceGenerated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures. Fixtures: Claude
Artifact size
Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees. |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
rust/crates/ccusage-cli-parser/src/tests.rs (1)
609-610: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAssert that
antigravityis absent from root help.This test checks that supported agent names are present. It does not fail if a stale
antigravityentry remains inhelp_text(). Add a negative assertion for the removed namespace.Proposed test assertion
for agent in agents { assert!(help.contains(&format!("\n {agent} "))); assert!(!help.contains(&format!("\n {agent} daily"))); } + assert!(!help.contains("\n antigravity "));🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@rust/crates/ccusage-cli-parser/src/tests.rs` around lines 609 - 610, Update the root help test in tests.rs to explicitly assert that help_text() does not contain the removed "antigravity" namespace, while preserving the existing assertions for supported agent names.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@rust/crates/ccusage-cli-parser/src/tests.rs`:
- Around line 609-610: Update the root help test in tests.rs to explicitly
assert that help_text() does not contain the removed "antigravity" namespace,
while preserving the existing assertions for supported agent names.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 2d655c0e-0a82-4122-9c00-7c1d5bfa0a8f
⛔ Files ignored due to path filters (3)
rust/Cargo.lockis excluded by!**/*.lockrust/crates/ccusage-cli-parser/src/snapshots/ccusage_cli_parser__tests__root_help.snapis excluded by!**/*.snaprust/crates/ccusage-config/src/snapshots/ccusage_config__config_schema__tests__snapshots_schema_agent_specific_option_edges.snapis excluded by!**/*.snap
📒 Files selected for processing (34)
apps/ccusage/README.mdapps/ccusage/config-schema.jsondocs/.vitepress/config.tsdocs/guide/all-reports.mddocs/guide/antigravity/index.mddocs/guide/config-files.mddocs/guide/environment-variables.mddocs/guide/getting-started.mddocs/guide/index.mddocs/guide/source-support-qa.mdnix/cargo-artifacts.nixrust/Cargo.tomlrust/adapters/antigravity/Cargo.tomlrust/adapters/antigravity/README.mdrust/adapters/antigravity/src/lib.rsrust/adapters/antigravity/src/loader.rsrust/adapters/antigravity/src/parser.rsrust/adapters/antigravity/src/paths.rsrust/adapters/antigravity/src/proto.rsrust/adapters/antigravity/src/report.rsrust/crates/ccusage-adapter-all/Cargo.tomlrust/crates/ccusage-adapter-all/src/lib.rsrust/crates/ccusage-adapter-all/src/loader.rsrust/crates/ccusage-adapter-all/src/report.rsrust/crates/ccusage-cli-parser/src/cli-commands.jsonrust/crates/ccusage-cli-parser/src/parser.rsrust/crates/ccusage-cli-parser/src/tests.rsrust/crates/ccusage-cli/src/types.rsrust/crates/ccusage-config/src/config_schema.rsrust/crates/ccusage-core/src/lib.rsrust/crates/ccusage/Cargo.tomlrust/crates/ccusage/src/adapter/mod.rsrust/crates/ccusage/src/cli/last_window.rsrust/crates/ccusage/src/main.rs
💤 Files with no reviewable changes (21)
- docs/.vitepress/config.ts
- rust/Cargo.toml
- rust/crates/ccusage-adapter-all/Cargo.toml
- rust/crates/ccusage/Cargo.toml
- rust/adapters/antigravity/Cargo.toml
- rust/crates/ccusage-adapter-all/src/report.rs
- docs/guide/antigravity/index.md
- nix/cargo-artifacts.nix
- rust/adapters/antigravity/src/lib.rs
- rust/crates/ccusage/src/adapter/mod.rs
- rust/adapters/antigravity/src/loader.rs
- docs/guide/getting-started.md
- rust/adapters/antigravity/src/report.rs
- rust/crates/ccusage-cli-parser/src/cli-commands.json
- rust/adapters/antigravity/README.md
- rust/adapters/antigravity/src/parser.rs
- rust/crates/ccusage-adapter-all/src/lib.rs
- apps/ccusage/config-schema.json
- rust/adapters/antigravity/src/proto.rs
- rust/adapters/antigravity/src/paths.rs
- rust/crates/ccusage-cli/src/types.rs
ccusage performance comparisonPR SHA: This compares the Rust PR release binary against the configured base package on the same CI runner. Package runtime diagnosticsCompares the PR package wrapper, the installed native optional dependency binary, and the workspace release binary on the same large fixture. This identifies whether slow package results come from JavaScript wrapper overhead, the published native binary build, or the Rust core itself. Fixtures: Claude
Committed fixture performanceCommitted small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage. Fixtures: Claude
Large real-world-shaped fixture performanceGenerated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures. Fixtures: Claude
Artifact size
Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees. |
…usage-adapter Rebase onto current upstream main (24cbb82). Resolve conflicts so Grok stays wired while respecting the Antigravity revert (ccusage#1569).

Summary
Temporarily reverts #1544 so v20.0.20 does not ship a half-finished Antigravity
adapter. The intent is to reapply Antigravity support, not to drop it — see
#1488 for the full write-up and the open questions.
This costs nothing today: the adapter has not been released (latest is v20.0.19,
and the antigravity commit is only queued in the tagpr PR #1507), so no user has
it yet.
Why
#1544 landed while @sambitcreate's contribution proposal #1488 was still open,
which was the wrong order. It also covers less ground than their #1487:
antigravity-clionlyantigravity{,-cli,-ide,-backup}antigravity-model-<id>, unpriceable--offlineGemini ratesConcretely, what is on
mainright now:--offlinefor Gemini models;designed to be correct either way, but nothing has run through those paths.
The first three are already solved in #1487, which is the better base to build on.
What is not lost
None of the reverse engineering. The recovered
ModelUsageStats/CortexStepMetadata/ChatModelMetadatafield numbers, the evidence thatinput_tokensandcache_read_tokensare disjoint, and the reasoning behind theresponse_iddedupe are all written up in #1488, along with the questions westill need the Antigravity team to answer.
Testing
cargo testacross the workspace passes (48 suites; the two antigravity suitesare gone with the crate).
ccusage antigravity dailynow reportsUnknown command 'antigravity', and theunified report no longer includes an antigravity row.
mainafter feat(antigravity): add Antigravity CLI usage adapter #1544 touched thesefiles.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by cubic
Temporarily remove the Antigravity CLI usage adapter to avoid shipping incomplete support in v20.0.20. This disables
ccusage antigravity ...commands and excludes Antigravity from unified reports for now.Refactors
ccusage-adapter-antigravitycrate and related loader/parser/report code.BUILT_IN_AGENT_NAMES.ANTIGRAVITY_DATA_DIRand the guide.Migration
ccusage antigravity ..., temporarily remove those calls until support returns.Written for commit f124fe7. Summary will update on new commits.
Summary by CodeRabbit