Add Antigravity as a usage source - #21
Conversation
bb-plugin-antigravity-acp bridges BB to the local `agy` CLI, but agy has no session log of its own in a stable, parseable shape - the bridge is the source of truth, writing one JSONL line per turn to ~/.antigravity-acp/usage.jsonl in the same generation-fact shape this plugin already reads for FX, so the new source reuses that parsing path rather than inventing a second file format. Verified against a real log line produced by a live provider-bridge turn, not just synthetic fixtures.
|
hey @nuchareviews-beep, thanks for raising the PR, will take a look and get it merged today! |
Thanks for this — the approach of reusing the existing FX One thing needs fixing before this can merge: Please add a |
|
@nuchareviews-beep i don't use antigravity so couldn't verify the usage stats...please ensure you have tested on your end and if possible please attach a screenshot in PR |
Summary
bb-plugin-antigravity-acp) that shells out to the localagyCLI per turn.agyhas no session log of its own in a stable, parseable shape, so that bridge writes one JSONL line per turn to~/.antigravity-acp/usage.jsonl, in the samekind: "generation"/factshape this plugin already reads for FX — so this change reuses that existing parsing path (matches(), the inline host-scan branch,parseHostUsageAggregates) rather than introducing a new file format or a new top-level collector function.AgentId,HostJsonAgentId,jsonAgentRoots, theAGENTSlist, and the host-json-collector's file matcher + inline parser.Why not push data in directly from a plugin?
I looked for an ingestion API (RPC/HTTP route) this plugin exposes for other plugins to report usage into, and didn't find one — it's read-only, parsing local logs itself. Adding a new local-log source felt more in keeping with the existing architecture than adding a new ingestion surface, so that's the shape this PR takes. Happy to go a different direction if you'd rather have an ingestion API instead.
Test plan
npm test— all 67 tests pass (64 pre-existing + 3 new: acollectors.test.tscase, ahost-json-collector.test.tscase, and ajsonAgentRootscase inserver.test.ts)npx tsc --noEmit— cleanbb-plugin-antigravity-acpturn (not just synthetic fixtures) — confirmed it parses into a correct usage row before opening this PR🤖 Generated with Claude Code