8000 feat(agy): show both Antigravity quota pools on one account by InfinityPacer · Pull Request #65 · InfinityPacer/meterleaf · GitHub
[go: up one dir, main page]

Skip to content

feat(agy): show both Antigravity quota pools on one account - #65

Merged
InfinityPacer merged 3 commits into
mainfrom
feat/agy-merged-account
Oct 31, 2026
Merged

InfinityPacer merged 3 commits into
mainfrom
feat/agy-merged-account

Conversation

@InfinityPacer
Copy link
Copy Markdown
Owner

问题

Antigravity 的每个 Google 账号有 Gemini 和 Claude/GPT 两套独立额度池。之前采集器把它们拆成两个账户(agy-<label>-gemini 与 agy-<label>-3p),总览里同一个登录占两张卡片,套餐也要分别设置。

结果

  • 采集器为每个 Google 登录只上报一个账户 agy-<label>。Gemini 池用 five-hour / seven-day 窗口,Claude/GPT 池用新增的 five-hour-3p / seven-day-3p 窗口。
  • 服务端按窗口分别计算本期花费,Gemini 窗口只计 gemini- 开头的模型,-3p 窗口只计其他模型。
  • 旧的两个分池账户仍随每轮同步上报,带新增的可选字段 parentExternalId 指向新账户,旧账户名下的历史用量和额度在报表里归入新账户。
  • 界面上同一张卡片按池列出 Gemini 5h、Gemini 7d、Claude 5h、Claude 7d。一个池的周额度用尽只收起这个池的 5h,两个池都用尽才算账户不可用。账户详情按池给出重置时间、本期费用和预估。
  • 新增 DESIGN.md,记录界面方向和令牌用途,frontend-worker 等界面改动先读它。

部署顺序

接收端的账户结构是严格校验的,服务端必须先于采集器部署,否则新采集器上报的 parentExternalId 会被拒收。新账户上需要重新选一次套餐(Ultra 5x)。

验证

  • bun test:597 通过,0 失败。新增 tests/agy-merged-account.test.ts,先导入旧版分池批次再导入新版合并批次,确认实时与索引两种快照都只得到一个 Google 账户,两个池的读数与请求数正确。
  • bun run typecheck、bun run build 通过。
  • bun run test:browser(主冒烟脚本)通过,新增断言检查 Antigravity 卡片依次显示四个窗口。演示数据加入一个双额度池账户,相应更新了依赖演示数据条数的断言。
  • 演示界面在桌面 1440 宽与手机 390 宽、浅色与深色下人工查看过卡片和账户详情。
  • 已知:quota-pwa-layout、mobile-app、overview-account-usage、quota-estimate 四个专项浏览器脚本在未改动的 main 上就以相同错误失败,与本改动无关,未在此 PR 处理。

🤖 Generated with Claude Code

InfinityPacer and others added 3 commits October 31, 2026 19:26
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The collector now reports one account per Google login, with the Claude/GPT
pool on five-hour-3p and seven-day-3p windows. The legacy per-pool accounts are
sent with parentExternalId so their history resolves to the merged account.
The server must deploy before the collector because the ingest schema is strict.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@InfinityPacer
InfinityPacer merged commit 8733588 into main Oct 31, 2026
2 checks passed
@InfinityPacer
InfinityPacer deleted the feat/agy-merged-account branch October 31, 2026 12:04
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