Skip to content

feat(antigravity-ide): added support for antigravity IDE #418

Open
KirDE wants to merge 1 commit into
getagentseal:mainfrom
KirDE:antigravity-ide
Open

feat(antigravity-ide): added support for antigravity IDE #418
KirDE wants to merge 1 commit into
getagentseal:mainfrom
KirDE:antigravity-ide

Conversation

@KirDE
Copy link
Copy Markdown

@KirDE KirDE commented May 30, 2026

PR Description - Antigravity IDE Usage Capture and Dynamic Model Resolution

colses #411

Summary

  • Antigravity IDE & Windows Capture Support: Added native support for auto-discovering .pb/.db sessions from Antigravity IDE (%USERPROFILE%\.gemini\antigravity-ide\conversations and implicit) on Windows.
  • Windows Ephemeral Port Probing: Implemented Windows-specific process querying (Get-CimInstance Win32_Process) and TCP listening-port extraction (Get-NetTCPConnection via PowerShell) combined with fast local HTTPS handshake probes to discover the active language server's actual RPC endpoint.
  • Dynamic Model Generation Resolution: Added dynamic model canonicalization in the provider. Rather than hardcoding fragile static overrides, CodeBurn reads the official displayName returned by the server (e.g. "Gemini 3.5 Flash (High)" or "Gemini 3.5 Flash (Medium)") to automatically map arbitrary/legacy server keys like gemini-3-flash-agent to their correct canonical generations (e.g. gemini-3-flash-high and gemini-3-flash-medium). This automatically fixes both the model display name ("Gemini 3.5 Flash") and accurate token pricing.
  • Cache Invalidation & Project Grouping: Extended the parser cache version system (PROVIDER_PARSE_VERSIONS) with antigravity: 'worktree-project-grouping-v3'. This automatically invalidates legacy reports in session-cache.json and reparses them to correctly group older monthly sessions under their workspace repository names instead of a single fallback block.

Testing

  • I have tested this locally against real data (not just unit tests)
  • npm test passes (Focused tests/providers/antigravity.test.ts suite passes 100% cleanly)
  • npm run build succeeds

Verification Terminal Output (Real Data)

Below is the verified monthly report (npx tsx src/cli.ts month --provider antigravity --format json) showing the rebuilt session database. Notice that today's active session resolves under the correct workspace project name and is accurately classified under Gemini 3.5 Flash (including pricing), while older monthly sessions correctly maintain their original Gemini 3 Flash names:

{
  "generated": "2026-05-30T09:39:39.511Z",
  "currency": "USD",
  "period": "May 2026",
  "periodKey": "month",
  "overview": {
    "cost": 111.72962200000003,
    "calls": 4407,
    "sessions": 25,
    "cacheHitPercent": 0,
    "tokens": {
      "input": 51511021,
      "output": 1423800,
      "cacheRead": 0,
      "cacheWrite": 0
    }
  },
  "projects": [
    {
      "name": "antigravity",
      "path": "antigravity",
      "cost": 60.97398350000002,
      "avgCostPerSession": 4.690306423076924,
      "calls": 999,
      "sessions": 13
    },
    {
      "name": "project-alpha",
      "path": "c:\\projects\\project-alpha",
      "cost": 40.8282755,
      "avgCostPerSession": 5.8326107857142855,
      "calls": 2925,
      "sessions": 7
    },
    {
      "name": "codeburn",
      "path": "c:\\projects\\codeburn",
      "cost": 5.515234500000001,
      "avgCostPerSession": 5.515234500000001,
      "calls": 249,
      "sessions": 1
    },
    {
      "name": "project-beta",
      "path": "c:\\projects\\project-beta",
      "cost": 2.1796400000000005,
      "avgCostPerSession": 2.1796400000000005,
      "calls": 29,
      "sessions": 1
    },
    {
      "name": "project-gamma",
      "path": "c:\\projects\\project-gamma",
      "cost": 1.2163025,
      "avgCostPerSession": 1.2163025,
      "calls": 97,
      "sessions": 1
    },
    {
      "name": "project-delta",
      "path": "c:\\projects\\project-delta",
      "cost": 1.0161860000000003,
      "avgCostPerSession": 0.5080930000000001,
      "calls": 108,
      "sessions": 2
    }
  ],
  "models": [
    {
      "name": "Opus 4.6",
      "calls": 1153,
      "inputTokens": 13513047,
      "outputTokens": 587001,
      "cost": 82.24026000000003
    },
    {
      "name": "Gemini 3 Flash",
      "calls": 3005,
      "inputTokens": 35308019,
      "outputTokens": 764047,
      "cost": 23.974127499999987
    },
    {
      "name": "Gemini 3.5 Flash",
      "calls": 249,
      "inputTokens": 2689955,
      "outputTokens": 72752,
      "cost": 5.515234500000001
    }
  ]
}

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