Repository navigation
feat(collector): book omp Antigravity usage per Google account and read live quota after a 429 - #68
Merged
Merged
Conversation
…ad live quota after a 429 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
current-account上。用agy切换账号后,omp 的用量会整体记错账号。agy -p /usage,只能读到agy当前登录的那个账号。改动
credentialId归属。采集器只读打开 omp 的agent.db,只查编号和identity_key(登录邮箱),不读令牌列,用邮箱本地部分得到与状态栏相同的标签。没有编号或查不到的编号仍退回current-account。omp usage --json --provider=google-antigravity的额度刷新,一次读回 omp 登录的所有 Google 账号,分别合并进各自的quota-<label>.tsv,不改current-account。omp 有新的 Antigravity 用量时最多每 5 分钟一次,用的是 omp 自己的几分钟缓存。omp usage invalidate再读实时额度,最多每分钟一次,用满的读数因此及时上报。agy -p /usage只在agy自己的会话有新用量,或 omp 请求找不到账号时运行,omp 的日常用量不再拉起agy。omp,不再读到本机真实账号。docs/collector.md的 Antigravity 与 omp 段落,版本升到 0.16.1。验证
bun run typecheck、bun run build通过,bun test tests619 项全过。新测试覆盖按编号分账、回退到活跃账号、429 只计数不入账、omp 多账号额度写入、平时读缓存与 429 后实时读取的两种间隔,以及 omp 返回不可用时保留原缓存。🤖 Generated with Claude Code