nexus/packages
Sai Shankar 656b4659fc refactor(quota): move provider quota logic into adapter layer, add unit tests
- Extract all Anthropic credential/API logic into claude-local/src/server/quota.ts
- Extract all OpenAI/WHAM credential/API logic into codex-local/src/server/quota.ts
- Add optional getQuotaWindows() to ServerAdapterModule in adapter-utils
- Rewrite quota-windows.ts as a 29-line thin aggregator with zero provider knowledge
- Wire getQuotaWindows into adapter registry for claude-local and codex-local
- Add 47 unit tests covering toPercent, secondsToWindowLabel, WHAM normalization,
  readClaudeToken, readCodexToken, fetchClaudeQuota, fetchCodexQuota, fetchWithTimeout
- Add 8 unit tests covering parseDateRange validation and byProvider pro-rata math

Adding a third provider now requires only touching that provider's adapter.
2026-03-16 15:08:54 -05:00
..
adapter-utils refactor(quota): move provider quota logic into adapter layer, add unit tests 2026-03-16 15:08:54 -05:00
adapters refactor(quota): move provider quota logic into adapter layer, add unit tests 2026-03-16 15:08:54 -05:00
db Use asset-backed company logos 2026-03-16 09:25:39 -05:00
plugins fix: address review feedback — subscription cleanup, filter nullability, stale diagram 2026-03-16 02:25:03 +07:00
shared feat(costs): add agent model breakdown, harden date validation, sync CostByProject type, fix quota threshold and tab-gated queries 2026-03-16 15:08:54 -05:00