Skip to content

Add Antigravity usage and quota support - #17

Merged
btsouth merged 1 commit into
mainfrom
antigravity-provider
Oct 7, 2026
Merged

btsouth merged 1 commit into
mainfrom
antigravity-provider

Conversation

@btsouth

@btsouth btsouth commented Oct 7, 2026 •

Copy link
Copy Markdown
Owner

Adds Antigravity as a first-class provider.

History. Each Antigravity conversation is a SQLite database with one protobuf gen_metadata row per model generation. The collector reads them read-only from ~/.gemini/antigravity-cli, the legacy ~/.gemini/antigravity, and T3 Code's Antigravity folders under ~/.t3/userdata/providers/antigravity. T3 records no home path for this driver, so those folders are found by globbing. Input excludes cache reads, output includes thinking, thinking is kept as reasoning, and there is no cache-write count. The duplicate usage copy in the row is ignored, request IDs deduplicate copied history, and generations are timed from their planner step.

Quota. agy -p /usage --output-format json is a zero-turn command that reports remaining fractions and reset times for the Gemini and Claude/GPT groups, each with a 5-hour and a weekly window. These become four used-percent meters. A mise install is run directly because the agy shim on PATH re-resolves the tool first and can stall. The check only runs when the source is enabled.

Pricing. No rate table. Served ids such as gemini-3.8-flash-n don't match catalog entries, so they stay unpriced.

Release 1.11.0.

Validation

  • python3 -m unittest discover -s tests: 246 tests pass, including new fixture tests for protobuf parsing, the duplicate usage field, thinking mapping, slash-only conversations, request ID dedup, T3 folder discovery, quota parsing, mise binary preference and disabled-source gating.
  • CI py_compile and bash -n commands pass.
  • Live scan with scratch state on a machine with real Antigravity CLI and T3 history: per-generation tokens and timestamps match the CLI transcripts line for line, two T3 conversations match an independent decode exactly, and the agent record shows all four quota meters.

Summary by CodeRabbit

  • New Features
    • Added Antigravity as a supported source for token history from CLI and T3 Code conversations.
    • Added Antigravity Gemini and Claude/GPT usage-limit reporting, including five-hour and weekly limits.
    • Added Antigravity account selection and enabled it by default in the bar widget.
  • Documentation
    • Updated provider coverage, account setup, pricing guidance, and installation examples for Antigravity and version 1.11.0.

Token history comes from Antigravity's per-conversation SQLite databases:
the CLI folder, the legacy IDE folder, and T3 Code's Antigravity folders,
found by globbing because T3 records no home path for that driver. Each
model generation is a protobuf row. Input excludes cache reads, output
already includes thinking, thinking is kept separately, and there is no
cache-write count. The duplicated usage copy is ignored, request IDs
deduplicate copied history, and generations are timed by their planner
step.

Quota comes from the zero-turn agy /usage report, mapping the Gemini and
Claude/GPT weekly and 5-hour windows to used-percent meters with reset
times. A mise install is run directly rather than through the PATH shim,
which can stall re-resolving the tool. The check runs only when the
source is enabled. Models stay unpriced unless the served id matches an
existing catalog entry.

Release 1.11.0.
@coderabbitai

coderabbitai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d671699c-01cf-4f94-9528-9964a6fc9e25
📥 Commits

Reviewing files that changed from the base of the PR and between 75acdd6 and a20b12c.

📒 Files selected for processing (14)
  • CHANGELOG.md
  • README.md
  • VERSION
  • collector.py
  • demo.py
  • docs/accounts.md
  • docs/installation.md
  • docs/pricing.md
  • docs/provider-coverage.md
  • plugin/Main.qml
  • plugin/manifest.json
  • tests/fixtures/antigravity-usage.sample.json
  • tests/test_collector.py
  • ui/shell.qml

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

This change adds Antigravity conversation history collection and quota reporting. It adds Antigravity to provider configuration, the UI, and demo data. The README and documentation describe its sources, account folders, pricing, and quota behavior. Release metadata changes to version 1.11.0.

Changes

Antigravity provider support

Layer / File(s) Summary
Conversation history collection
collector.py, tests/test_collector.py, docs/accounts.md, docs/provider-coverage.md, README.md, docs/pricing.md
The collector discovers Antigravity conversation databases, parses generation usage and metadata, and handles read or parse errors. Tests cover parsing, deduplication, and T3 Code discovery. Documentation describes supported locations, accounting, and pricing.
Quota collection and caching
collector.py, tests/test_collector.py, tests/fixtures/antigravity-usage.sample.json, docs/provider-coverage.md
The collector runs agy -p /usage, maps recognized quota windows, and retains cached data on errors. Tests cover parsing, executable selection, and disabled-provider behavior.
Provider enablement and presentation
plugin/Main.qml, plugin/manifest.json, ui/shell.qml, demo.py
The plugin recognizes Antigravity and enables it by default. The UI adds its home option and color. The demo adds an Antigravity event mapping.
Release and provider documentation
VERSION, plugin/manifest.json, README.md, docs/installation.md, CHANGELOG.md
Release metadata and pinned examples change to version 1.11.0. The README and documentation describe Antigravity support and quota reporting.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant Collector
  participant ConversationDB as Antigravity conversation database
  participant agyCLI as agy CLI
  participant UsageRecords as Antigravity usage records
  Collector->>ConversationDB: Read changed conversation database
  ConversationDB-->>Collector: Return generation usage and timestamps
  Collector->>agyCLI: Run -p /usage and request JSON output
  agyCLI-->>Collector: Return quota windows and remaining fractions
  Collector->>UsageRecords: Write history and quota records when enabled
Loading

Suggested reviewers: hilather

Merge Risk: ⚪ Minimal · up to a20b1

No actionable issue was established that should block merging. Normal validation remains appropriate.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 24.24% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 33 functions across 3 files. (11 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main changes: adding Antigravity usage history and quota support.
Full details: Docstring Coverage

Explanation

Docstring coverage is 24.24% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 33 functions across 3 files. (11 skipped: 11 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@btsouth
btsouth merged commit fedbc30 into main Oct 7, 2026
5 checks passed
@btsouth
btsouth deleted the antigravity-provider branch October 7, 2026 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant