Expand description
Provider usage limits as the provider itself reports them. Honest sources only: nothing is estimated, a provider with no source reports nothing.
- claude: its own
/usage(and/status) screens as rendered in a node PTY session — “Current session” = 5h window, “Current week” = 7d window, the plan from “Claude Max/Pro/Team/Enterprise”. The node never types/usageinto a session; it only reads screens the session already shows. Credential files are never opened. - codex:
rate_limitsin its own rollout logs (~/.codex/sessions/**/rollout-*.jsonl): primary/secondary windows withused_percent,window_minutesand reset time,plan_type. - others: implement
LimitSource.
Structs§
- Codex
Rollouts - Codex: newest rollout file, last line with
rate_limits. - Provider
Limits - Window
Traits§
- Limit
Source - A provider-specific reader.
readmust only use data the provider produced itself.
Functions§
- collect
- Everything known now: screen-derived entries plus every file source.
- default_
sources - now_ms
- observe_
screen - Called from the frame publisher with every scanned screen.
- parse_
claude_ screen - Parse a claude
/usage(or/status) screen.Nonewhen it shows neither. - parse_
codex_ line - Parse one codex rollout line carrying
rate_limits.