Skip to content

feat(agents): add Antigravity usage collector - #9028

Closed
agush22 wants to merge 2 commits into
omacom:quattrofrom
agush22:feat/agent-antigravity-usage
Closed

agush22 wants to merge 2 commits into
omacom:quattrofrom
agush22:feat/agent-antigravity-usage

Conversation

@agush22

@agush22 agush22 commented Aug 29, 2026

Copy link
Copy Markdown

Summary

Completes the Antigravity (agy) transition by adding a dedicated usage collector script for the top bar Agents panel and corresponding unit tests.

In upstream commit ed7bae4ac5, Omarchy replaced Gemini CLI with Antigravity (agy) for the default agent launcher and menu, but omitted the usage collector for the top bar Agents panel (which currently only supports Claude, Codex, and Fireworks). This PR fills that gap.


What This PR Provides

1. Collector Script (bin/omarchy-agent-usage-agy)

  • Path Discovery: Automatically discovers transcript logs across known paths (~/.gemini/antigravity-cli/brain/, ~/.antigravity/brain/, and custom data directories).
  • Metric Aggregation: Accurately parses and calculates:
    • Daily token volume (input, output, total)
    • Prompt counts & active days
    • Model breakdowns (e.g., gemini-3.7-flash, etc.)
  • Quickshell Integration: Outputs the exact JSON schema required by omarchy.agents to populate the top-bar dashboard and historical usage graphs.

2. Test Coverage (test/shell.d/agent-usage-agy-scanner-test.sh)

  • Adds unit tests verifying transcript discovery, JSON parsing, edge-case handling for missing/empty logs, and schema compliance.

Related Context

  • Follow-up to: ed7bae4ac5
  • Affects: Top-bar Agents widget / Quickshell status aggregator

Testing & Verification

  • Ran unit test suite: test/shell.d/agent-usage-agy-scanner-test.sh passes successfully.
  • Verified JSON output manually against Quickshell's expected schema.
  • Confirmed top-bar Agents widget updates and renders historical graph data correctly when agy is active.

- Add bin/omarchy-agent-usage-agy to aggregate token usage, prompts, and models from Antigravity session transcripts
- Add test/shell.d/agent-usage-agy-scanner-test.sh unit test
@agush22
agush22 force-pushed the feat/agent-antigravity-usage branch 2 times, most recently from d16a925 to 95ca723 Compare August 29, 2026 22:20
- Scan canonical transcript files per session to avoid reading both transcript.jsonl and transcript_full.jsonl
- Complete unit test assertions for transcript token extraction
@agush22
agush22 force-pushed the feat/agent-antigravity-usage branch from 95ca723 to 8fe8a2b Compare August 29, 2026 22:27
@agush22
agush22 marked this pull request as ready for review August 29, 2026 22:28
@GaleasAndres

GaleasAndres commented Aug 30, 2026 •

Copy link
Copy Markdown

Hi @agush22 - This looks like a duplicate of a PR I submitted yesterday 😄 #8911

@agush22

agush22 commented Sep 1, 2026

Copy link
Copy Markdown
Author

@GaleasAndres Good point yours looks more fully featured I'll close this one in favor of #8911

@agush22 agush22 closed this Sep 1, 2026
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.

2 participants