Repository navigation
feat(insights): add Antigravity CLI usage support - #120
Merged
Merged
Conversation
Read local generation metadata from Antigravity conversation databases, with canonical compact transcripts as a fallback. Keep input, cached input, output and thinking accounting separate and deduplicate copies. Register Antigravity in collector and UI defaults. Migrate only untouched previous default source lists; preserve customized configurations. Keep DB and transcript replacements atomic on errors and interrupted reads. Reuse the existing indexer for budget-limited scans without changing other adapters' read behavior. Cover decoding, read-only access, privacy, WAL invalidation, fallback replacement, interrupted scans and source migration with synthetic tests.
Remove the unreachable varint fallback and duplicate length and metadata checks. The uint64 guard, remaining-buffer bound and checked metadata caller already cover these cases.
Owner
|
@greptile-apps review |
Owner
|
Thanks for the PR, merged! |
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.
Hi ~ Thanks for creating Insights. I use agy myself, so I added support for it.
It’s been working well for me, and I thought I’d share it in case others find it useful.
Happy to have this merged if you think it’s a good fit!
Summary
accounting, with compact transcript exports as a fallback.
What
core/antigravity.mjs, with schema/accounting notes alongside the code.deduplicate response IDs, and retain accepted history when replacement fails
or stops before completion.
untouched previous defaults. Update the README's source/privacy lines and the
rebuild recipe; keep implementation details out of the README.
additional dependencies, benchmark tooling or UI redesigns.
Why
Compact transcript exports alone omit generation model IDs and can omit system
input tokens. The conversation database contains generation-level usage and model
metadata. Reading it locally uses the existing collector/store contracts without
requiring authentication, a running agent service or network access.
Testing
Validated commit
c4bb8b0on macOS 26.6.1 (arm64). Package and tooling checks usedNode.js 24.22.2 and npm 12.0.0. No source, lockfile or test changes were needed.
Insights runtime matrix
Ran the underlying
test:insightsandcheck:insightscommands with each runtime:The three skips are conditional alternate-runtime tests: a runtime without zstd
and two installer/uninstaller checks requiring a discoverable older Node.
Package regression checks
The repository's change detector selects all five Pi packages for this PR.
For each package,
npm ci --ignore-scripts --no-audit --no-fund,lint,typecheck,test:unit,test:integrationandbuildcompleted successfully.Builds included tarball validation, clean-consumer installation and Pi
registration checks; nothing was published.
Slate's skipped test requires an operator host that is not installed in this
environment.
Compatibility
uses the existing Node runtime requirement and is opened read-only.
~/.gemini/antigravity-cli/conversationsand~/.gemini/antigravity-cli/brain; both appear under Antigravity in Settings.Customized/disabled/reordered/empty source lists remain unchanged; those users
can add the
antigravityadapter through the existing configuration editor..pbstores.Compact transcript fallback retains unknown metadata when it is absent.
Risk
reference links live in the scanner header. Malformed/oversized records are
skipped with diagnostics; schema changes can therefore reduce reported usage.
without measured usage are excluded. Provider denotes the model publisher,
not the billing gateway; this does not estimate charges or account limits.
attribution falls back to session creation time, then DB mtime, with a note.
SQLite takes precedence over exports; configured source/root order selects
among copies of the same kind. Divergent copies are not merged.
cancellation or deadline. Files exceeding a foreground slice use the existing
background indexer; this adds no worker or protobuf-row checkpoint.
Checklist