Expand description
On-demand subscription usage for managed provider accounts.
Answers “how much of this account’s plan is left” by asking the provider
directly: Claude through its OAuth usage endpoint (refreshing the stored
token when it has expired), Codex through a one-shot codex app-server
JSON-RPC exchange against the account’s home. Results are persisted to
provider_account_limits so lf usage reads instantly and only polls
windows that have gone stale.
Structs§
- Subscription
Usage - The freshly observed subscription state of one account.
Enums§
- Subscription
Error - Why an account’s subscription state could not be read.
NeedsLoginis an answer, not a failure: the account exists but its credential was revoked or expired beyond refresh, and onlylf auth connectfixes that.
Functions§
- account_
home - Where each managed account’s credential home lives, for
poll_accountcallers that only have the store row. - poll_
account - Poll one managed account’s provider for its live subscription state.