Repository navigation
feat(collector): read Codex and OpenCode usage in the single collector - #59
Merged
Merged
Conversation
- Codex sessions (including compressed .jsonl.zst) and OpenCode messages are read by the main collector into one state store and one upload path. - Accounts are routed by source and channel through channelAccounts; built-in defaults send Codex/openai to Codex and Go channels to OpenCode Go, and skip everything else. - OpenCode Go quotas no longer use fixed per-model monthly limits; seven-day and monthly windows extrapolate from upstream percentages. - Price book 2026-10-30.1 adds GLM-5.3 Flash, GPT-6.1 Sol/Terra and prices codex-auto-review as gpt-6-luna. - The standalone Codex collector is removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…oversized archives - Quota samples and plan observations are committed in the same transaction as the file progress, so an interrupted round no longer loses them. - The newest sample wins by sample time across files, independent of file modification order; the latest plan persists across rounds. - A session that only carries quota still creates its account. - A compressed file that does not fit the remaining budget waits for the next round unless it is the first file of the round. - Clarify that OpenCode message content is parsed in memory but never stored or uploaded. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude Code writes 1-hour cache by default and the 1-hour rate is the higher one, so an unsplit record is valued instead of left unpriced. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…plans - A file deferred for budget is read first in the next round, so a newer file that never finishes cannot starve it. - A plan stored as a bare name stays until a newer observation replaces it. - An unsplit cache write keeps the known 5-minute part at its own rate and prices only the remainder at the 1-hour rate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
问题
结果
.jsonl.zst压缩会话)和 OpenCode 本地数据库,共用一个状态库和上传路径;独立 Codex 采集器及其文档删除。channelAccounts配置。内置默认把 Codex 的openai通道记到Codex账户(套餐与五小时、七天额度来自会话记录),Codexgo通道和 OpenCodeopencode-go通道记到OpenCode Go;其他通道(如经网关的bo、OpenCode 免费通道)跳过并计数。默认规则沿用modelAccounts中同一账户的资料。/api/accounts/archive的模拟,原先在没有本地后端时必然失败(main 上同样失败)。验证
bun run typecheck通过;bun test tests586 pass / 0 fail;bun run build、bun run build:collector通过;bun run test:browser在 1440×1000 与 390×844 全部检查通过。openai用量入队到codex(套餐 plus,五小时与七天额度各一条),opencode-go收到 OpenCode 与 Codexgo两处用量,免费通道被跳过,最早记录不早于 2026-09-20。🤖 Generated with Claude Code