@tavora/sdk / AiUsageReading
Interface: AiUsageReading
Defined in: packages/sdk/src/protocol.ts:230
One reading of an account's usage through the ai-usage connector. Tavora reads the login itself and hands over only the provider's answer, never the token. An account is read at most once a minute (LIMITS.aiUsageMinReadMs); asking sooner gives the last reading again.
Properties
answer
answer:
JsonValue
Defined in: packages/sdk/src/protocol.ts:244
The provider's answer as it came, for status ok: Claude's usage answer (undocumented, may change) or the Codex app-server's account/rateLimits/read result. Null otherwise.
email
email:
string|null
Defined in: packages/sdk/src/protocol.ts:246
The signed-in email the provider reports, or null.
plan
plan:
string|null
Defined in: packages/sdk/src/protocol.ts:247
readAt
readAt:
string
Defined in: packages/sdk/src/protocol.ts:249
When Tavora took this reading (ISO 8601).
retryAfterMs
retryAfterMs:
number|null
Defined in: packages/sdk/src/protocol.ts:239
For rate-limited: how long to wait at least, in milliseconds; otherwise null.
status
status:
"ok"|"sign-in"|"rate-limited"|"api-key"|"cli-missing"|"unavailable"
Defined in: packages/sdk/src/protocol.ts:237
ok: answer holds the provider's answer. sign-in: the profile has no usable subscription login. rate-limited: the provider asked to wait (retryAfterMs). api-key: the login is an API key, which has no subscription allowance. cli-missing: the Codex command line is not installed. unavailable: anything else.