8000 feat(collector): collect Antigravity CLI quota and usage by InfinityPacer · Pull Request #62 · InfinityPacer/meterleaf · GitHub
[go: up one dir, main page]

Skip to content

feat(collector): collect Antigravity CLI quota and usage - #62

Merged
InfinityPacer merged 3 commits into
mainfrom
feat/agy-collector
Oct 30, 2026
Merged

InfinityPacer merged 3 commits into
mainfrom
feat/agy-collector

Conversation

@InfinityPacer
Copy link
Copy Markdown
Owner

问题

Meterleaf 只能采集 Claude Code 与 Codex 的本机记录,Antigravity CLI(agy,Google AI Ultra 订阅)的额度和用量看不到,价格表也只覆盖了其中的 Claude Opus 5.5。

结果

  • 采集器新增 agy 来源。
    • 读取状态栏和 Stop hook 写入的按账户额度缓存,每个 Google 账号显示为 Gemini 池和 Claude/GPT 池两个额度账户。已过重置时间的窗口不沿用旧值。
    • 只读解析 ~/.gemini/antigravity-cli/conversations/*.db 中每次生成的 token 用量,四个计量桶互斥,思考 token 作为输出子集,缺失字段保留未知。按文件游标增量读取,重复同步不重复入账。
  • 价格表升级到 2026-10-30.2,新增以下型号:
    • gemini-4-argon 与 gemini-3.8-flash,含促销期及促销结束后的价格分段。
    • claude-sonnet-5-5。
    • gpt-oss-120b,按 Vertex AI Model Garden 托管价。
    • claude-opus-4-6。agy 的 claude-opus-4-6-thinking 归一到该型号,思考 token 按输出计价。
  • 每条费率对应官方价格页。Gemini 的缓存写入和 GPT-OSS 的缓存读写官方未公布按 token 计的单价,保留未计价。
  • docs/collector.md 与 docs/pricing.md 已同步。

验证

  • bun run typecheck 通过,bun test tests 593 个全部通过。
  • 维护者核对了价格表与 Gemini API、Vertex AI、Anthropic、Model Garden 官方价格页原文。按本机真实用量手算了两组估值,与系统结果一致:
    • Argon 估值 $18.04。
    • Flash 估值 $1.91。
  • 用 bun run build:collector 构建的采集器,对本机真实缓存和 40 个会话库做了 scan 和两次 sync,推送到隔离的本地服务:
    • 首次同步:用量 797 条、账户 2 个、额度 4 条。
    • 第二次同步:用量 0 条。
  • 数据库结构版本未变。

🤖 Generated with Claude Code

InfinityPacer and others added 3 commits October 30, 2026 22:33
The thinking route has no separate rate, so normalize it to the legacy
Opus 4.6 model and add its official rates. Drop the long-context
surcharge claim from the pricing guide, since neither Google pricing
page lists a 200K tier for Gemini 4 Argon or Gemini 3.8 Flash.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@InfinityPacer
InfinityPacer merged commit a363112 into main Oct 30, 2026
2 checks passed
@InfinityPacer
InfinityPacer deleted the feat/agy-collector branch October 30, 2026 14:48
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

0