quota-axi 0.1.49 → 0.1.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -28
- package/dist/src/args.d.ts +7 -0
- package/dist/src/args.js +10 -0
- package/dist/src/args.js.map +1 -1
- package/dist/src/cli.js +4 -3
- package/dist/src/cli.js.map +1 -1
- package/dist/src/commands.js +38 -9
- package/dist/src/commands.js.map +1 -1
- package/dist/src/interpretation.js +7 -0
- package/dist/src/interpretation.js.map +1 -1
- package/dist/src/lib/fs.js +4 -2
- package/dist/src/lib/fs.js.map +1 -1
- package/dist/src/lib/http.d.ts +9 -1
- package/dist/src/lib/http.js +56 -6
- package/dist/src/lib/http.js.map +1 -1
- package/dist/src/lib/process.d.ts +5 -1
- package/dist/src/lib/process.js +13 -6
- package/dist/src/lib/process.js.map +1 -1
- package/dist/src/lib/source-attempts.d.ts +30 -1
- package/dist/src/lib/source-attempts.js +36 -0
- package/dist/src/lib/source-attempts.js.map +1 -1
- package/dist/src/providers/agy.d.ts +10 -1
- package/dist/src/providers/agy.js +58 -5
- package/dist/src/providers/agy.js.map +1 -1
- package/dist/src/providers/copilot-cli-credential.d.ts +9 -0
- package/dist/src/providers/copilot-cli-credential.js +15 -6
- package/dist/src/providers/copilot-cli-credential.js.map +1 -1
- package/dist/src/providers/copilot.js +10 -1
- package/dist/src/providers/copilot.js.map +1 -1
- package/dist/src/providers/kimi.d.ts +15 -0
- package/dist/src/providers/kimi.js +117 -21
- package/dist/src/providers/kimi.js.map +1 -1
- package/dist/src/providers/opencode-go.js +33 -3
- package/dist/src/providers/opencode-go.js.map +1 -1
- package/dist/src/providers/zai.js +4 -2
- package/dist/src/providers/zai.js.map +1 -1
- package/dist/src/tui-live.d.ts +10 -2
- package/dist/src/tui-live.js +20 -6
- package/dist/src/tui-live.js.map +1 -1
- package/dist/src/tui-viewport.d.ts +3 -2
- package/dist/src/tui-viewport.js +4 -3
- package/dist/src/tui-viewport.js.map +1 -1
- package/dist/src/tui.d.ts +16 -1
- package/dist/src/tui.js +117 -23
- package/dist/src/tui.js.map +1 -1
- package/dist/src/types.d.ts +17 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -303,7 +303,7 @@ It is generated from `src/skill.ts`; update it with `pnpm run build:skill` and v
|
|
|
303
303
|
```
|
|
304
304
|
|
|
305
305
|
- **Live first** - provider HTTP calls and Antigravity's structured print command use 15 second timeouts, Codex JSON-RPC and Antigravity loopback reads use shorter per-call timeouts, and stale cache fallback is per provider.
|
|
306
|
-
- **Host network policy** - Claude, Codex, Copilot, Cursor, Grok, Command Code, MiniMax, DeepSeek, OpenRouter, and ElevenLabs' outbound HTTP calls honor standard `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY` environment variables (including lowercase forms). This only follows the user's configured egress path; quota-axi does not expose a proxy service or print proxy URLs.
|
|
306
|
+
- **Host network policy** - Claude, Codex, Copilot, Cursor, Grok, Z.AI, Command Code, MiniMax, DeepSeek, OpenRouter, and ElevenLabs' outbound HTTP calls honor standard `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY` environment variables (including lowercase forms). This only follows the user's configured egress path; quota-axi does not expose a proxy service or print proxy URLs.
|
|
307
307
|
- **Opt-in secure-store access** - macOS Claude, Cursor CLI, and Copilot CLI Keychain value reads, plus Windows Copilot Credential Manager reads, are skipped on plain calls until `--allow-keychain-prompt` succeeds once for that source, then future quota calls reuse the corresponding grant.
|
|
308
308
|
- **Delegated refresh, never minted** - when the same stored access token is expired, carries a refresh token, and is definitively rejected, quota-axi may run that vendor CLI's own smallest non-interactive refresh command and re-read the store the CLI rewrote. quota-axi never performs a refresh-token exchange itself. See [Delegated credential refresh](#delegated-credential-refresh).
|
|
309
309
|
- **Partial success is success** - one provider can fail while another returns fresh or stale data, and the process still exits 0. Exit code 1 means every provider failed, and 2 means a usage error.
|
|
@@ -329,6 +329,7 @@ It is generated from `src/skill.ts`; update it with `pnpm run build:skill` and v
|
|
|
329
329
|
| `--tui` | Render the live human terminal report instead of TOON (quota only) |
|
|
330
330
|
| `--refresh 30s\|5m\|1h` | Live `--tui` refresh interval, default 5m (30s-24h) |
|
|
331
331
|
| `--once` | Render one `--tui` frame and exit instead of staying live |
|
|
332
|
+
| `--all` | Draw not-set-up providers as full `--tui` cards |
|
|
332
333
|
| `--allow-keychain-prompt` | Permit native secure-store access that could prompt (macOS or Windows) |
|
|
333
334
|
| `--allow-claude-inference` | Spend one bounded native Claude inference to read env-token quota headers |
|
|
334
335
|
| `--no-credential-refresh` | Never run a vendor CLI's own non-interactive credential refresh |
|
|
@@ -363,9 +364,10 @@ CODEX_HOME=/path/to/codex-profile quota-axi --provider codex --profile-only --fu
|
|
|
363
364
|
- The bar fill is current headroom; the `┃` marker sits at the binding window's `pace.timeRemainingPercent`, the fill position of exactly linear burn. The headline marker therefore matches the corresponding `limitingWindowIds` sub-bar even when another window supplies the finite-runway `empty in` verdict. Fill ending left of the marker means burning faster than the reset clock. The marker is omitted when that window's pace is unknown.
|
|
364
365
|
- Pace is shown by the bar and marker alone, never as a numeric burn multiple. The runway verdict on the headline reads `on pace ✓` for `through_reset` and `empty in 7h 21m` for `projected_exhaustion`. Two-up rows keep both card bottoms aligned by padding the shorter card inside its border. The TUI does not display the per-scope selection signal; that signal remains on the JSON and TOON machine surfaces. Those surfaces also keep the `through_reset` vocabulary, while `--full --json` exposes the complete `pace` object. The TUI renders from the complete in-memory model, so `--json` tiering never removes anything it draws.
|
|
365
366
|
- A provider whose window relationships are wholly unknown (Copilot or Antigravity, with every window unresolved) has no combined effective percentage, pace, or runway to show, so its card replaces the headline block with a single `per-window usage · no combined bound` line and leads straight into its real per-window rows. Partially understood providers keep the effective-unknown headline. No combined headroom, pace, or runway number is invented.
|
|
366
|
-
-
|
|
367
|
+
- Providers are grouped by what quota-axi found on this machine, and the header always counts all three groups in that order, for example `4 live · 2 need attention · 10 not set up`, including the ones that are empty. Every count is kept even in the narrowest supported terminal: a header that would not fit gives up its timestamp - the time zone first, then the date, then the clock - never a count. A provider with a reading, fresh or stale, is live. A provider without one whose sources found something (a credential that is expired, rejected, or waiting on a Keychain prompt, an installed tool that failed, or a request that failed) needs attention: it stays a dimmed full card right after the live cards, with its remedy, and is excluded from the live total. A provider is not set up only when every credential source it checks was skipped as absent (no file, environment variable, CLI, or running app). A provider that recorded no sources at all still needs attention, so absence is never assumed, and so does one whose skip could not establish absence either way, such as a Copilot CLI account whose Keychain value still awaits `--allow-keychain-prompt` or a configuration that names no account quota-axi can confirm, a Kimi Code configuration quota-axi could not read to the environment it names, or an Antigravity CLI that is installed but timed out. A GitHub CLI login alone, or one Copilot refused, is not evidence of Copilot access and leaves Copilot not set up rather than broken; a `gh` store that could not be read, or a request through it that failed transiently, keeps Copilot in view.
|
|
368
|
+
- Providers that are not set up fold into one dim footer line that names each of them and points at `quota-axi auth` for where each one is read. Press `a` in the live report to draw them as dimmed full cards under a `○ not set up · N` label, and press it again to fold them; while any are folded or expanded the closing line names the key, including when the report scrolls. `--all` starts the report expanded and is how a `--once` frame shows them. A provider named with `--provider` is never folded.
|
|
367
369
|
- Width comes from the terminal, clamped to 80-120 columns; below the two-up width the grid reflows to one column. Color honors `NO_COLOR`, `TERM=dumb`, and non-TTY stdout (the glyph skeleton is kept), re-enables with `FORCE_COLOR`, and uses truecolor when `COLORTERM` advertises it, falling back to 256-color then ANSI-16.
|
|
368
|
-
- `--tui` composes with `--provider` scoping and `--full` (account identity and source-attempt footers). It is mutually exclusive with `--json` and only supported by the `quota` command
|
|
370
|
+
- `--tui` composes with `--provider` scoping, `--all`, and `--full` (account identity and source-attempt footers, including for folded providers). It is mutually exclusive with `--json` and only supported by the `quota` command; `--all` is only supported with `--tui`.
|
|
369
371
|
|
|
370
372
|
## Multiple accounts
|
|
371
373
|
|
|
@@ -679,26 +681,26 @@ Source attempts can include `credentialPresent` when a source is not genuinely a
|
|
|
679
681
|
|
|
680
682
|
### Provider windows
|
|
681
683
|
|
|
682
|
-
| Provider | Windows and capabilities
|
|
683
|
-
| ---------------------- |
|
|
684
|
-
| Claude | Can report `five_hour`, `seven_day`, optional `seven_day_opus`, and optional `extra_usage` windows. Trusted session/weekly/model windows emit fixed `windowSeconds` (18,000 or 604,800) for pace; `extra_usage` does not invent a monthly duration.
|
|
685
|
-
| Claude scoped `limits` | When the account's usage response includes a scoped `limits` list, quota-axi surfaces every active window it describes instead, including model-scoped ones (e.g. Fable) as a `model:<slug>` window with the same trusted weekly duration.
|
|
686
|
-
| Codex | Identifies exact 18,000-second and 604,800-second periods as `five_hour` and `weekly`, regardless of source slot; periods without a duration retain their positional identity. Additional model- or feature-scoped limits use `model:<id>:5h` / `model:<id>:7d`, and code-review limits use `code_review_five_hour` / `code_review_weekly`. Unfamiliar durations remain honest `<hours>h` windows instead of being classified as known periods. Duplicate derived IDs are preserved with `_2`, `_3`, and later suffixes. Optional credit balance data can also appear.
|
|
687
|
-
| Cursor | Can report `included_usage`, `auto_usage`, `api_usage`, and optional `spend_limit` windows from `GetCurrentPeriodUsage`, plus an optional `grok_bot` weekly window from the same dashboard service's `GetSandUsageStatus` RPC. Their effective-availability interpretation is documented in [Quota windows](#quota-windows). Monthly labels alone are not trusted cycle evidence, but the billing cycle is: the monthly windows take `startsAt` from a reported `billingCycleStart`, or - with only `billingCycleEnd` - from the previous renewal date one calendar month earlier (clamped to the last day of that month), so pace uses `starts_at_resets_at`. With neither field the cycle stays unresolved; no fixed 30-day duration is invented. The Grok Bot window uses the sand payload's own `currentPeriodStart` / `nextResetTimestampUtc` pair when present, and is omitted when that RPC is missing, non-finite, or a pooled enterprise allowance.
|
|
688
|
-
| GitHub Copilot | Can report quota snapshot windows such as `chat`, `completions`, and `premium_interactions`; when the first-party endpoint exposes entitlement but no numeric quota windows, quota-axi reports a fresh provider state with an empty `windows` list rather than inventing percentages. Pace stays `unknown` without trusted cycle boundaries.
|
|
689
|
-
| Grok | With a consumer-compatible Grok session or Pi `xai` OAuth bearer, can report the shared `credits`-identified current-period window (kind `weekly`/`monthly` from the decoded period type, otherwise `credits`; labeled `week`/`month` accordingly), optional product-scoped `product:<slug>` windows with the same kind, the current-period `startsAt` and reset, and optional prepaid credit balance from the consumer Usage-page operation. Official Grok Build OAuth and Pi OAuth can remain valid for their model catalogs while that separate operation rejects their audience; in that case quota-axi reports usable auth with no windows rather than inventing a SuperGrok percentage. A Pi `xai` API key likewise establishes model usability only. Top-level `credits.remaining` is prepaid/on-demand balance only; it is not subscription remaining and does not bound the period windows used for effective availability. Pace prefers the startsAt/resetsAt pair.
|
|
690
|
-
| Grok proto3 zero | For the exact consumer operation only, an omitted usage float is the official proto3 zero when a valid weekly or monthly current period proves the config is present; quota-axi reports `0` used and `100` remaining rather than deriving usage from money.
|
|
691
|
-
| Kimi | Reports every window the `/usages` payload actually supplies: the current `usages` map (`five_hour`, `weekly`, `month_total`, `month_code` from `limit_5h` / `limit_7d` / `limit_month_total` / `limit_month_code`) or the legacy principal `weekly` object plus every valid self-described `limits[]` entry in wire order. Trusted 5h/weekly durations are 18,000s and 604,800s; monthly windows do not invent a duration. Only a legacy limit whose normalized duration is exactly 18,000 seconds is identified as `five_hour`; future limits remain `limit:<index>` unknown windows. The map's ratio is read from `used_ratio` only. Absent map entries stay absent, a declared map entry with no usable ratio is named `usages:<key>` in `state.untrustedWindowIds` rather than dropped, and an unrecognized map key is not a window. `month_code` stays a distinct window but carries only `percentUsed` plus `shareOf: month_total`, because it is a share of `month_total` rather than its own budget. |
|
|
692
|
-
| Z.AI | Can report the Coding Plan `five_hour` and `weekly` usage windows (with trusted 18,000s and 604,800s durations) plus the `mcp_month` tool window, whose duration is not invented. Token and credit limits are both identified by the endpoint's own `unit`/`number` magic values (`3`/`5` and `6`/`1`) rather than array position; any other limit, or a repeat of an already reported one, degrades to an untrusted `limit:<index>` unknown window named in `state.untrustedWindowIds`.
|
|
693
|
-
| Antigravity (`agy`) | On macOS and Linux, can report `gemini_5h`, `gemini_weekly`, `claude_gpt_5h`, and `claude_gpt_weekly` from the installed CLI's structured `agy -p "/quota" --output-format json` response (a bounded read, not an agent session), falling back to an already-running Antigravity app or `agy` loopback quota summary when the CLI is unavailable. If only model config quota is exposed, quota-axi reports model-scoped `model:<slug>` windows instead of inventing grouped windows. Antigravity v1 snapshots do not expose enough history for honest burn-rate pace, so pace stays `unknown`.
|
|
694
|
-
| Alibaba | Reads the local `bl` CLI's Alibaba Coding Plan Token Plan usage; reports the plan name and weekly remaining percentage and reset time from the CLI's JSON output, plus any named model limits as separate `model:<name>` windows. Repeated limits for the same model remain separate with suffixed IDs such as `model:<name>:2`.
|
|
695
|
-
| OpenCode Go | Using the credential sources documented in [Security Posture](#provider-credential-sources), reports the provider's rolling, weekly, and monthly usage windows as stacked plan caps that jointly bound Go-plan usage at `all_models` scope. It
|
|
696
|
-
| Command Code | Reads local Command Code API keys and reports the exact aggregate credit balance (`monthlyCredits` + `purchasedCredits` + `freeCredits`, unit `credits`) plus `five_hour` and `weekly` rolling windows from Command Code's undocumented first-party `GET /alpha/whoami?limits=1` and `GET /alpha/billing/credits` endpoints. Those windows use trusted 18,000s and 604,800s durations and jointly bound the `included_credits` scope, not `all_models`, only when both are present and trusted. `limited:false` omits leftover rolling fields so the report stays credit-only with empty `windows`. No monthly percentage or 30-day reset is invented. Pay-as-you-go/Enterprise-style responses with no rolling windows stay fresh and auth-usable with empty `windows`, and their balance is surfaced as a `credits` attention row rather than `no_quota`. The `/alpha` account endpoints are not a documented public API; unrecognized limits fail closed as untrusted/partial.
|
|
697
|
-
| MiniMax | Reports Token Plan `model_remains` windows, or a balance in `credits.remaining` with unit `usd` on the global `api.minimax.io` host and `cny` on the China `api.minimaxi.com` host. Model-window IDs are `model:<slug>:5h` or `model:<slug>:7d` for the trusted 18,000-second and 604,800-second durations, and `model:<slug>:window:<label>` for any other or undetermined duration; all share the `model:<slug>` scope. Absent numeric observations remain absent, and no account-wide bound is inferred. A `model_remains` row with no recognized window fields degrades to an untrusted `limit:<index>` unknown window named in `state.untrustedWindowIds`.
|
|
698
|
-
| MiMo | Reads only the local `MIMO_API_KEY` used by Pi. No first-party read-only quota endpoint is established, so a usable credential reports an empty fresh window set rather than fabricated model headroom.
|
|
699
|
-
| DeepSeek | Reports `credits.remaining` from the USD total with unit `usd`, or, when no representable USD total exists, from the CNY total with unit `credits`; quota-axi does not infer model headroom or effective remaining from those amounts.
|
|
700
|
-
| OpenRouter | Reads a local OpenRouter/Pi API key and the first-party key endpoint. A finite key cap is reported as a raw `key-limit` credit amount; unlimited keys are reported without an invented cap, and no model headroom is inferred.
|
|
701
|
-
| ElevenLabs | Reads the deliberately exported `ELEVENLABS_API_KEY` and reports one `characters` window from the subscription plan's included allowance (`character_count` / `character_limit`) via the documented first-party `GET /v1/user/subscription`. `resetsAt` comes from `next_character_count_reset_unix`; the cycle start is that reset stepped back by the vendor's declared `character_refresh_period`, and an unrecognized period leaves the cycle - and therefore pace, runway, and selection - unknown rather than assuming one. Only `monthly_period` maps onto the `monthly` window kind; the longer declared periods stay `unknown`. A zero or absent `character_limit` reports no window instead of a percentage, and so does a response whose reported reset has already passed: those counters describe a finished cycle, so the live reading fails closed the same way the stale-cache path does. The window bounds `included_characters`, never `all_models`.
|
|
684
|
+
| Provider | Windows and capabilities |
|
|
685
|
+
| ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
686
|
+
| Claude | Can report `five_hour`, `seven_day`, optional `seven_day_opus`, and optional `extra_usage` windows. Claude's OAuth usage `utilization` values, and scoped-limit `percent` values, are percent used; quota-axi stores them as `percentUsed` (while `extra_usage.utilization` remains its vendor-defined used-credit percentage). Trusted session/weekly/model windows emit fixed `windowSeconds` (18,000 or 604,800) for pace; `extra_usage` does not invent a monthly duration. |
|
|
687
|
+
| Claude scoped `limits` | When the account's usage response includes a scoped `limits` list, quota-axi surfaces every active window it describes instead, including model-scoped ones (e.g. Fable) as a `model:<slug>` window with the same trusted weekly duration. |
|
|
688
|
+
| Codex | Identifies exact 18,000-second and 604,800-second periods as `five_hour` and `weekly`, regardless of source slot; periods without a duration retain their positional identity. Additional model- or feature-scoped limits use `model:<id>:5h` / `model:<id>:7d`, and code-review limits use `code_review_five_hour` / `code_review_weekly`. Unfamiliar durations remain honest `<hours>h` windows instead of being classified as known periods. Duplicate derived IDs are preserved with `_2`, `_3`, and later suffixes. Optional credit balance data can also appear. |
|
|
689
|
+
| Cursor | Can report `included_usage`, `auto_usage`, `api_usage`, and optional `spend_limit` windows from `GetCurrentPeriodUsage`, plus an optional `grok_bot` weekly window from the same dashboard service's `GetSandUsageStatus` RPC. Their effective-availability interpretation is documented in [Quota windows](#quota-windows). Monthly labels alone are not trusted cycle evidence, but the billing cycle is: the monthly windows take `startsAt` from a reported `billingCycleStart`, or - with only `billingCycleEnd` - from the previous renewal date one calendar month earlier (clamped to the last day of that month), so pace uses `starts_at_resets_at`. With neither field the cycle stays unresolved; no fixed 30-day duration is invented. The Grok Bot window uses the sand payload's own `currentPeriodStart` / `nextResetTimestampUtc` pair when present, and is omitted when that RPC is missing, non-finite, or a pooled enterprise allowance. |
|
|
690
|
+
| GitHub Copilot | Can report quota snapshot windows such as `chat`, `completions`, and `premium_interactions`; when the first-party endpoint exposes entitlement but no numeric quota windows, quota-axi reports a fresh provider state with an empty `windows` list rather than inventing percentages. Pace stays `unknown` without trusted cycle boundaries. |
|
|
691
|
+
| Grok | With a consumer-compatible Grok session or Pi `xai` OAuth bearer, can report the shared `credits`-identified current-period window (kind `weekly`/`monthly` from the decoded period type, otherwise `credits`; labeled `week`/`month` accordingly), optional product-scoped `product:<slug>` windows with the same kind, the current-period `startsAt` and reset, and optional prepaid credit balance from the consumer Usage-page operation. Official Grok Build OAuth and Pi OAuth can remain valid for their model catalogs while that separate operation rejects their audience; in that case quota-axi reports usable auth with no windows rather than inventing a SuperGrok percentage. A Pi `xai` API key likewise establishes model usability only. Top-level `credits.remaining` is prepaid/on-demand balance only; it is not subscription remaining and does not bound the period windows used for effective availability. Pace prefers the startsAt/resetsAt pair. |
|
|
692
|
+
| Grok proto3 zero | For the exact consumer operation only, an omitted usage float is the official proto3 zero when a valid weekly or monthly current period proves the config is present; quota-axi reports `0` used and `100` remaining rather than deriving usage from money. |
|
|
693
|
+
| Kimi | Reports every window the `/usages` payload actually supplies: the current `usages` map (`five_hour`, `weekly`, `month_total`, `month_code` from `limit_5h` / `limit_7d` / `limit_month_total` / `limit_month_code`) or the legacy principal `weekly` object plus every valid self-described `limits[]` entry in wire order. Trusted 5h/weekly durations are 18,000s and 604,800s; monthly windows do not invent a duration. Only a legacy limit whose normalized duration is exactly 18,000 seconds is identified as `five_hour`; future limits remain `limit:<index>` unknown windows. The map's ratio is read from `used_ratio` only. Absent map entries stay absent, a declared map entry with no usable ratio is named `usages:<key>` in `state.untrustedWindowIds` rather than dropped, and an unrecognized map key is not a window. `month_code` stays a distinct window but carries only `percentUsed` plus `shareOf: month_total`, because it is a share of `month_total` rather than its own budget. An authenticated `/usages` body that declares no quota-bearing field at all (`usages` absent/null/`{}`, `usage` absent/null, `limits` absent/null/`[]`, no key besides the vendor's own `goods_version`/`boosterWallet`) is a Free-tier account's established-empty reading, not `schema_invalid`: it still consults the sibling Kimi Code CLI source, and if nothing yields windows, quota-axi reports fresh with no windows and a usable auth status instead of an error. A body that declares a quota field this reader cannot parse still fails as `schema_invalid`. |
|
|
694
|
+
| Z.AI | Can report the Coding Plan `five_hour` and `weekly` usage windows (with trusted 18,000s and 604,800s durations) plus the `mcp_month` tool window, whose duration is not invented. Token and credit limits are both identified by the endpoint's own `unit`/`number` magic values (`3`/`5` and `6`/`1`) rather than array position; any other limit, or a repeat of an already reported one, degrades to an untrusted `limit:<index>` unknown window named in `state.untrustedWindowIds`. |
|
|
695
|
+
| Antigravity (`agy`) | On macOS and Linux, can report `gemini_5h`, `gemini_weekly`, `claude_gpt_5h`, and `claude_gpt_weekly` from the installed CLI's structured `agy -p "/quota" --output-format json` response (a bounded read, not an agent session), falling back to an already-running Antigravity app or `agy` loopback quota summary when the CLI is unavailable. If only model config quota is exposed, quota-axi reports model-scoped `model:<slug>` windows instead of inventing grouped windows. Antigravity v1 snapshots do not expose enough history for honest burn-rate pace, so pace stays `unknown`. |
|
|
696
|
+
| Alibaba | Reads the local `bl` CLI's Alibaba Coding Plan Token Plan usage; reports the plan name and weekly remaining percentage and reset time from the CLI's JSON output, plus any named model limits as separate `model:<name>` windows. Repeated limits for the same model remain separate with suffixed IDs such as `model:<name>:2`. |
|
|
697
|
+
| OpenCode Go | Using the credential sources documented in [Security Posture](#provider-credential-sources), reports the provider's rolling, weekly, and monthly usage windows as stacked plan caps that jointly bound Go-plan usage at `all_models` scope. It applies the plan's declared cycle lengths ($12 per rolling 5 hours, $30 per week, $60 per calendar month) when the payload carries no duration of its own: rolling and weekly windows gain trusted 18,000s and 604,800s durations, and the monthly window derives a start one calendar month before its reported reset (day-of-month clamped); a payload-supplied duration still wins, so pace, runway, and selection are measurable. A zeroed plan window blocks Go-plan requests, but the vendor's free-model fallback or an opted-in Zen balance may still serve past it. |
|
|
698
|
+
| Command Code | Reads local Command Code API keys and reports the exact aggregate credit balance (`monthlyCredits` + `purchasedCredits` + `freeCredits`, unit `credits`) plus `five_hour` and `weekly` rolling windows from Command Code's undocumented first-party `GET /alpha/whoami?limits=1` and `GET /alpha/billing/credits` endpoints. Those windows use trusted 18,000s and 604,800s durations and jointly bound the `included_credits` scope, not `all_models`, only when both are present and trusted. `limited:false` omits leftover rolling fields so the report stays credit-only with empty `windows`. No monthly percentage or 30-day reset is invented. Pay-as-you-go/Enterprise-style responses with no rolling windows stay fresh and auth-usable with empty `windows`, and their balance is surfaced as a `credits` attention row rather than `no_quota`. The `/alpha` account endpoints are not a documented public API; unrecognized limits fail closed as untrusted/partial. |
|
|
699
|
+
| MiniMax | Reports Token Plan `model_remains` windows, or a balance in `credits.remaining` with unit `usd` on the global `api.minimax.io` host and `cny` on the China `api.minimaxi.com` host. Model-window IDs are `model:<slug>:5h` or `model:<slug>:7d` for the trusted 18,000-second and 604,800-second durations, and `model:<slug>:window:<label>` for any other or undetermined duration; all share the `model:<slug>` scope. Absent numeric observations remain absent, and no account-wide bound is inferred. A `model_remains` row with no recognized window fields degrades to an untrusted `limit:<index>` unknown window named in `state.untrustedWindowIds`. |
|
|
700
|
+
| MiMo | Reads only the local `MIMO_API_KEY` used by Pi. No first-party read-only quota endpoint is established, so a usable credential reports an empty fresh window set rather than fabricated model headroom. |
|
|
701
|
+
| DeepSeek | Reports `credits.remaining` from the USD total with unit `usd`, or, when no representable USD total exists, from the CNY total with unit `credits`; quota-axi does not infer model headroom or effective remaining from those amounts. |
|
|
702
|
+
| OpenRouter | Reads a local OpenRouter/Pi API key and the first-party key endpoint. A finite key cap is reported as a raw `key-limit` credit amount; unlimited keys are reported without an invented cap, and no model headroom is inferred. |
|
|
703
|
+
| ElevenLabs | Reads the deliberately exported `ELEVENLABS_API_KEY` and reports one `characters` window from the subscription plan's included allowance (`character_count` / `character_limit`) via the documented first-party `GET /v1/user/subscription`. `resetsAt` comes from `next_character_count_reset_unix`; the cycle start is that reset stepped back by the vendor's declared `character_refresh_period`, and an unrecognized period leaves the cycle - and therefore pace, runway, and selection - unknown rather than assuming one. Only `monthly_period` maps onto the `monthly` window kind; the longer declared periods stay `unknown`. A zero or absent `character_limit` reports no window instead of a percentage, and so does a response whose reported reset has already passed: those counters describe a finished cycle, so the live reading fails closed the same way the stale-cache path does. The window bounds `included_characters`, never `all_models`. |
|
|
702
704
|
|
|
703
705
|
### Model catalog and `models`
|
|
704
706
|
|
|
@@ -841,11 +843,11 @@ The Claude and Codex rows describe default discovery; [`--profile-only`](#profil
|
|
|
841
843
|
**Kimi**
|
|
842
844
|
|
|
843
845
|
- It opens Pi's `$PI_CODING_AGENT_DIR/auth.json` (default `~/.pi/agent/auth.json`) read-only with a strict 64 KiB cap and guaranteed descriptor cleanup. It accepts only the exact `kimi-coding` entry, either `type: "api_key"` with a nonempty, control-byte-free literal string `key`, or `type: "oauth"` with such an `access` token and an optional numeric `expires`. A stored-expired OAuth token remains eligible for the bounded read-only liveness probe in Pi's first declared source position; only the endpoint's rejection marks one dead, and a rejected expired record that still carries its `refresh` property reports `authStatus: expired_refreshable` with `status: unavailable`, not sign-out. A missing file or `kimi-coding` entry is `missing`; malformed or oversized stores, invalid entry shapes, and unsafe environment, template, or command references are `invalid`; unknown credential types are `unsupported`; and expired OAuth is `expired` with refresh-path presence preserved. None of these states resolves references, exposes values, or mutates Pi auth state.
|
|
844
|
-
-
|
|
846
|
+
- The second source reads the official Kimi Code CLI credential from the environment `$KIMI_CODE_HOME/config.toml` describes, defaulting to `$HOME/.kimi-code/`. Kimi Code keeps one credential per environment and records which one is current, so quota-axi reads `[providers."managed:kimi-code".oauth]` for that pointer rather than scanning or guessing: it takes only `storage`, `key`, and `oauth_host` from that table and `base_url` from its parent (accepting either the snake_case or the camelCase spelling of the two URL keys), applies Kimi Code's own key-to-file-name rule plus its containment check, and opens `credentials/<name>.json`. It accepts only a non-empty `access_token` with a Unix-seconds `expires_at` (a JSON number or numeric string). A token within 60 seconds of expiry is classified `expired`, refreshably so when the record also carries a `refresh_token`; either way it is still tested by the bounded read-only probe in the CLI source's declared position. A successful probe returns fresh quota, a rejected refreshable record reports the soft `expired_refreshable` verdict, and a rejected non-refreshable record remains a hard `auth_required` failure that retires its cache.
|
|
845
847
|
- When `config.toml` names no OAuth reference, quota-axi assumes only what Kimi Code itself guarantees: the unsuffixed slot `credentials/kimi-code.json` on `https://api.kimi.com/coding/v1`, the pair a mainland-China login persists, so that reading is unchanged. A file that is absent, unopenable, past the 256 KiB cap, or unparseable before its reference is reached names no reference either, and those states deliberately share the one verdict because they share their evidence - in each, quota-axi does not know what the file says. Should such a file still have recorded a non-default `base_url`, the default slot cannot pair with it, so the result is `kimi_code_cli_region_unrecognized` and no request is sent. A suffixed slot is never given an assumed deployment: with no endpoint left to place it, it is `kimi_code_cli_config_invalid`.
|
|
846
848
|
- Those two states are not equally confident, and only the confident one produces a reading. No `config.toml` at all means the only slot Kimi Code could have written is the default one, so an absent file keeps the full default reading. A file that exists and could not be walked to its reference may name any slot, so quota-axi opens none: it reports `kimi_code_cli_credential_unconfirmed`, sends no request, and hands over to the Pi source. Nothing at a slot nobody named is read either way - not its emptiness or expiry as a sign-out, and not its contents as the current account's quota, which is what a credential left behind by a deployment the user has since left would otherwise be reported as.
|
|
847
849
|
- A credential quota-axi cannot reach is never reported as one the user does not have: a `keyring` slot is `kimi_code_cli_credential_storage_unsupported`, endpoints that are not one of Kimi Code's own deployments are `kimi_code_cli_region_unrecognized`, and configuration naming an unusable slot, or a suffixed slot with no deployment left to place it, is `kimi_code_cli_config_invalid`.
|
|
848
|
-
- The Pi source always has priority. Ambient API-key environment variables are not a credential source. The CLI source is consulted whenever Pi cannot
|
|
850
|
+
- The Pi source always has priority. Ambient API-key environment variables are not a credential source. The CLI source is consulted whenever Pi cannot yield quota windows - no supported credential, an unreadable store, a Pi credential the provider definitively rejected, or an authenticated established-empty response as described under [Provider windows](#provider-windows) - so a broken or quota-empty Pi source does not hide a working Kimi Code CLI session. Transport, decoding, timeout, cancellation, and server failures do not trigger credential switching.
|
|
849
851
|
- It sends one redirect-disabled `GET` to `<base URL>/usages` with a 15 second total deadline and a 262,144-byte decoded-body cap. That deadline also bounds how long quota-axi waits for the one reading of `config.toml` taken before the request, so a configuration file that never answers cannot outlast the operation; a run that cannot read it in time reports through the Pi source with no Kimi Code cache identity to reuse or stamp. The base URL travels with the credential: a Kimi Code CLI token is sent only to the deployment its own environment names, and a Pi-brokered credential, which records no deployment, keeps `https://api.kimi.com/coding/v1`. A configured environment is accepted only when the endpoints it records - its OAuth host, its base URL, or whichever of the two it names - identify one of Kimi Code's two published deployments (`.com` mainland China, `.ai` global). Slot and deployment must then agree in both directions, because Kimi Code derives the unsuffixed `kimi-code` slot for the default deployment and a suffixed slot for every other: neither may appear with the other's counterpart. Configuration therefore cannot redirect the bearer to an arbitrary origin or pair one deployment's token with another's host, and an unrecognized environment sends no request at all.
|
|
850
852
|
- It checks `refresh_token` presence only and never reads, renders, or exchanges its value. It never accepts an arbitrary Kimi origin, launches Pi or Kimi, makes a model request, refreshes or writes credentials, creates a device ID, imports cookies, sends device identity, retains raw responses, or exposes account, plan, token, or fingerprint data. Kimi has no delegated refresh: no non-interactive Pi or Kimi Code CLI command was established as renewing either store, so an expired record stays read-only with honest advice.
|
|
851
853
|
- Definitive credential absence or rejection retires Kimi cache data, but only when it is the verdict that speaks for the provider: a sibling source that failed transiently outranks it, so the cache survives, and a refreshable soft-expired verdict (`expired_refreshable`) is never definitive, so it also survives. Transient fallback drops reset-expired windows and applies five-hour or seven-day age bounds to windows without resets.
|
|
@@ -856,7 +858,7 @@ The Claude and Codex rows describe default discovery; [`--profile-only`](#profil
|
|
|
856
858
|
- It checks two independent stores for a literal Coding Plan API key: Pi's `$PI_CODING_AGENT_DIR/auth.json` (default `~/.pi/agent/auth.json`) first, then opencode's `auth.json` (`$XDG_DATA_HOME/opencode/auth.json` when set, otherwise `~/.local/share/opencode/auth.json`; `%LOCALAPPDATA%\opencode\auth.json` on Windows). Z.AI is locally usable when either source is usable. A successful Pi-backed probe reports source `pi:zai`; a successful opencode probe reports `opencode:auth.json`.
|
|
857
859
|
- Each store accepts only a nonempty, control-byte-free literal string key under a known Coding Plan provider id. In opencode's store it is taken from `key`, `apiKey`, `api_key`, `token`, `accessToken`, or `auth_token`, or from a bare string entry. In Pi's store it must be the `key` of Pi's `zai` `api_key` entry, which resolves to `api.z.ai`, and a present Pi `zai` entry of any other shape is reported as `invalid` rather than missing. Environment, template, and command references are not resolved or executed, so a key that holds one is never sent as a header value. quota-axi never writes or manages Pi or opencode state.
|
|
858
860
|
- In opencode's store, the `zai-coding-plan`, `zai`, `z-ai`, and `z.ai` ids resolve to `api.z.ai`, and `zhipu` / `zhipuai` resolve to `open.bigmodel.cn`; ambient API-key environment variables are not a credential source.
|
|
859
|
-
- It sends one redirect-disabled `GET` to that host's `/api/monitor/usage/quota/limit` with the key in a
|
|
861
|
+
- It sends one redirect-disabled `GET` to that host's `/api/monitor/usage/quota/limit` with the key in a Bearer `Authorization` header, a 15 second total deadline, and a 262,144-byte decoded-body cap. Direct requests take the host's default dual-stack path first and retry once over IPv4 only when that attempt fails to connect, because the vendor advertises IPv6 addresses that an IPv4-only host cannot reach. A configured HTTP(S) proxy still takes precedence. The endpoint is undocumented, so normalization is deliberately schema-tolerant rather than positional. A definitive rejection for one store, either HTTP 401/403 or the vendor's HTTP 200 `{"code":1000,"success":false}` authentication-failed body, falls through to the next store; transport, timeout, rate-limit, and server failures stop without credential switching.
|
|
860
862
|
- Z.AI cache data is retired only when every store ends in a definitive credential failure: absence, an unparseable file or invalid entry, or a definitive rejection. The report names the highest-priority store's real failure, so a rejected or invalid Pi key is never relabeled as absence by a missing opencode entry. An auth file that exists but cannot be read is an indeterminate local failure rather than a sign-out, so it reports `state.status: error` and stays cache-eligible. Timeout, network, 408, 429, 5xx, oversized-response, and unreadable-auth-file failures may reuse a formerly fresh snapshot with reset-expired windows removed and, for windows without a reset, five-hour, seven-day, or thirty-day age bounds by window kind; a resetless untrusted unknown window has no age bound of its own and is dropped.
|
|
861
863
|
- It never launches Pi or opencode, refreshes or writes credentials, sends cookies, retains raw responses, or exposes the account's key or plan identity beyond the plan label the endpoint reports. The Coding Plan key does not expire, so there is nothing to renew and Z.AI has no delegated refresh.
|
|
862
864
|
|
|
@@ -885,7 +887,7 @@ The Claude and Codex rows describe default discovery; [`--profile-only`](#profil
|
|
|
885
887
|
|
|
886
888
|
**Antigravity**
|
|
887
889
|
|
|
888
|
-
- It never restarts, signs in to, configures, or mutates Antigravity or `agy`. It reads no credential store, so it has no delegated refresh. It prefers running `agy -p "/quota" --output-format json` once with a 15 second bound; this is the vendor's noninteractive read-only usage command (a bounded read, not an agent session or credential operation). When the CLI is unavailable or fails, it falls back to existing loopback access. Loopback HTTP 401 carrying `missing CSRF token` is treated as `unavailable` (not signed-out) and retains the cached record. Any reading whose `resetsAt` is in the past is marked stale.
|
|
890
|
+
- It never restarts, signs in to, configures, or mutates Antigravity or `agy`. It reads no credential store, so it has no delegated refresh. It prefers running `agy -p "/quota" --output-format json` once with a 15 second bound; this is the vendor's noninteractive read-only usage command (a bounded read, not an agent session or credential operation). quota-axi resolves the CLI executable first, then prepends controlled denials for the desktop openers (`xdg-open` and `open`) plus the current Node runtime to that invocation's otherwise unchanged command search path: authenticated `/quota` launchers still resolve Node even under a restricted inherited path, while the signed-out CLI's PATH-based desktop-opener attempt is denied before it can launch an interactive sign-in browser. When the CLI is unavailable or fails, it falls back to existing loopback access. Loopback HTTP 401 carrying `missing CSRF token` is treated as `unavailable` (not signed-out) and retains the cached record. Any reading whose `resetsAt` is in the past is marked stale.
|
|
889
891
|
- On macOS and Linux, it discovers only the current user's processes and their owned listening ports, then sends read-only POST requests with operation-specific bodies to local endpoints on `127.0.0.1`. On macOS, an app language server qualifies only when the executable path itself is inside an `.app` bundle whose name contains `Antigravity`, including bundle names with spaces; wrapper or prompt text that merely mentions such a path does not qualify. An app-advertised extension port is eligible only when the same process owns its listener.
|
|
890
892
|
- For loopback access, it uses `RetrieveUserQuotaSummary` with the vendor's read-only `request: {}` / `forceRefresh: false` envelope, forwards a runtime CSRF token only when an app process advertises one, uses `GetUserStatus` for plan identity and account identity exposed only behind `--full`, and can fall back to model quota data from `GetUserStatus` / `GetCommandModelConfigs` when grouped quota summary is unavailable. Conversation text, token counters, and subprocess error output are discarded.
|
|
891
893
|
- Percent remaining and reset times come only from vendor `remainingFraction`/`resetTime` fields. It does not invent windows, resets, or percentages.
|
|
@@ -974,7 +976,7 @@ Providers with no established non-interactive rotation command stay read-only on
|
|
|
974
976
|
| Cached reports | Only fresh provider snapshots with windows are cached. Cache schema 3 slots one snapshot per `provider` plus `accountKey`; a snapshot with no key holds that provider's `default` slot, and the filler `default` key an expanded report stamps on single-account providers is never written, so a stale reading can never expand a report in which nothing expanded. Each lane reads only its own slot, and a slot name alone cannot say which account signed in there, so a provider whose slot can be rebound stamps the snapshot with its own account identity (see Codex cache identities below). Schema 1 and 2 files without `accountKey` remain readable. A context-scoped snapshot for Claude, Kimi, Command Code, MiniMax, or ElevenLabs is written only when the current reading supplies its context identity. |
|
|
975
977
|
| Fresh provider reports with no windows | Clear any cached snapshot for that provider/account lane, so entitlement-only reports do not leave stale quota windows behind. Claude, Kimi, Command Code, MiniMax, and ElevenLabs skip both cache write and clear when the current reading has no context identity. |
|
|
976
978
|
| Reports and details not cached | Failed providers, stale providers, account identity, and source attempts are not cached. Claude native inference readings and Copilot native secure-store readings (`source: cli`) are excluded from both cache writes and clears, leaving existing stored-session snapshots untouched. |
|
|
977
|
-
| Claude cache fallback | Follows the [Claude provider rules](#provider-notes), including the denied-Keychain exception. Eligible fallback uses a formerly fresh snapshot from the same selected Claude configuration context, with a seven-day provider bound plus reset and resetless-window pruning. Its opaque SHA-256 context identifier includes the configuration directory and the selected Keychain service, which already encodes any secure-storage selector. Legacy context-less records
|
|
979
|
+
| Claude cache fallback | Follows the [Claude provider rules](#provider-notes), including the denied-Keychain exception. Eligible fallback uses a formerly fresh snapshot from the same selected Claude configuration context, with a seven-day provider bound plus reset and resetless-window pruning. Its opaque SHA-256 context identifier includes the configuration directory and the selected Keychain service, which already encodes any secure-storage selector. Legacy context-less records, snapshots from the earlier broad suffix-discovery context, and Claude snapshots written by 0.1.50 with inverted usage percentages are withheld without deleting them. |
|
|
978
980
|
| Codex cache identities | Cached Codex windows are accepted only when ID, label, kind, duration, and duplicate suffix order agree; stale snapshots with mismatched identities are rejected. A snapshot also records an opaque SHA-256 identifier of the ChatGPT account id the credential that produced it stored, and is withheld when the credentials a failed reading actually tried store only other accounts' ids, because a slot name alone cannot say whose windows it holds: a credential that reading never tried does not vouch for the snapshot, and a probe that fails transiently is vouched for only by its own credential. The vendor's response id is not the stamp: it can differ from the store while the same token is live, and a failed probe only has the store. A snapshot without that identifier, or a run whose credentials name no account, proves nothing either way and is still reused. |
|
|
979
981
|
| Grok cache provenance | Only snapshots produced by the current `web` consumer operation can be used as Grok stale fallback; legacy `api` billing-proxy snapshots are rejected. |
|
|
980
982
|
| Kimi cache provenance | Follows the [Kimi provider rules](#provider-notes): a snapshot is reused only when its opaque SHA-256 identifier still matches the source that produced it - the selected Kimi Code environment, or the Pi source and its default endpoint - and legacy context-less Kimi records are not reused. A reusable snapshot written before `shareOf` existed stores `month_code` with `percentUsed` alone, so reading it restores the `shareOf: month_total` marker; a stale fallback after upgrading therefore still presents that window as a used share rather than as missing data. |
|
package/dist/src/args.d.ts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { type IntelligenceBucket, type ModelSortKey, type ProviderId } from "./types.js";
|
|
2
2
|
export type QuotaFlags = {
|
|
3
3
|
providers: ProviderId[];
|
|
4
|
+
/**
|
|
5
|
+
* True when `--provider` named the providers. The human report then draws
|
|
6
|
+
* every named provider as a full card, even one that is not set up.
|
|
7
|
+
*/
|
|
8
|
+
explicitProviders: boolean;
|
|
4
9
|
json: boolean;
|
|
5
10
|
full: boolean;
|
|
6
11
|
tui: boolean;
|
|
@@ -19,6 +24,8 @@ export type QuotaFlags = {
|
|
|
19
24
|
refreshSeconds?: number;
|
|
20
25
|
/** Render one `--tui` frame and exit instead of staying live. */
|
|
21
26
|
once: boolean;
|
|
27
|
+
/** Start `--tui` with providers that are not set up drawn as full cards. */
|
|
28
|
+
all: boolean;
|
|
22
29
|
};
|
|
23
30
|
/** Refresh bounds: fast enough to feel live, slow enough to stay polite. */
|
|
24
31
|
export declare const MIN_REFRESH_SECONDS = 30;
|
package/dist/src/args.js
CHANGED
|
@@ -43,6 +43,7 @@ function parseCommonFlags(args, defaultProviders) {
|
|
|
43
43
|
let full = false;
|
|
44
44
|
let tui = false;
|
|
45
45
|
let once = false;
|
|
46
|
+
let all = false;
|
|
46
47
|
let refreshSeconds;
|
|
47
48
|
let allowKeychainPrompt = false;
|
|
48
49
|
let allowClaudeInference = false;
|
|
@@ -71,6 +72,10 @@ function parseCommonFlags(args, defaultProviders) {
|
|
|
71
72
|
once = true;
|
|
72
73
|
continue;
|
|
73
74
|
}
|
|
75
|
+
if (arg === "--all") {
|
|
76
|
+
all = true;
|
|
77
|
+
continue;
|
|
78
|
+
}
|
|
74
79
|
if (arg === "--refresh") {
|
|
75
80
|
refreshSeconds = parseRefreshValue(args[index + 1]);
|
|
76
81
|
index++;
|
|
@@ -140,14 +145,19 @@ function parseCommonFlags(args, defaultProviders) {
|
|
|
140
145
|
if (liveOnlyFlag && !tui) {
|
|
141
146
|
throw new AxiError(`${liveOnlyFlag} is only supported with --tui`, "VALIDATION_ERROR", ["Run `quota-axi --tui --refresh 5m` for the live human report"]);
|
|
142
147
|
}
|
|
148
|
+
if (all && !tui) {
|
|
149
|
+
throw new AxiError("--all is only supported with --tui", "VALIDATION_ERROR", ["Run `quota-axi --tui --all` to draw every provider as a full card"]);
|
|
150
|
+
}
|
|
143
151
|
return {
|
|
144
152
|
providers: providerValue === undefined && defaultProviders
|
|
145
153
|
? [...defaultProviders]
|
|
146
154
|
: parseProviderScope(providerValue),
|
|
155
|
+
explicitProviders: providerValue !== undefined,
|
|
147
156
|
json,
|
|
148
157
|
full,
|
|
149
158
|
tui,
|
|
150
159
|
once,
|
|
160
|
+
all,
|
|
151
161
|
allowKeychainPrompt,
|
|
152
162
|
allowClaudeInference,
|
|
153
163
|
noCredentialRefresh,
|
package/dist/src/args.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"args.js","sourceRoot":"","sources":["../../src/args.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAA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KAAK,CAAC;IACrC,MAAM,IAAI,QAAQ,CAChB,wCAAwC,EACxC,kBAAkB,EAClB,CAAC,6BAA6B,CAAC,CAChC,CAAC;AACJ,CAAC;AAED,SAAS,kBAAkB,CAAC,KAAyB;IACnD,IAAI,CAAC;QACH,OAAO,cAAc,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAI,QAAQ,CAChB,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,sBAAsB,EAC/D,kBAAkB,EAClB,CAAC,wBAAwB,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CACpD,CAAC;IACJ,CAAC;AACH,CAAC"}
|
package/dist/src/cli.js
CHANGED
|
@@ -7,12 +7,12 @@ export const TOP_HELP = `usage: quota-axi [quota|auth|models] [flags]
|
|
|
7
7
|
commands[3]:
|
|
8
8
|
(none)=quota, auth, models
|
|
9
9
|
output:
|
|
10
|
-
Default TOON reports local quota evidence. models is a deterministic data join; --sort runway is explicit opt-in ordering. --tui renders a live human terminal report instead (q quits).
|
|
10
|
+
Default TOON reports local quota evidence. models is a deterministic data join; --sort runway is explicit opt-in ordering. --tui renders a live human terminal report instead (q quits); providers that are not set up fold into one line that a or --all expands.
|
|
11
11
|
notes:
|
|
12
12
|
Every quota read, including each --tui refresh, may delegate an expired session's renewal to the vendor CLI that owns it. --no-credential-refresh disables delegated credential refresh; auth is always read-only.
|
|
13
13
|
--profile-only requires explicit CLAUDE_CONFIG_DIR or CODEX_HOME plus exactly one matching provider. It reads only that credential file: no Keychain, Pi, CLI RPC, fallback, refresh, or cache. With --full --json, non-secret account identity, source, and attempts remain visible; tokens and file contents remain excluded, and ordinary output remains redacted.
|
|
14
|
-
flags[
|
|
15
|
-
--provider <${PROVIDER_IDS.join(",")}>, --json, --full, --tui, --refresh <30s-24h>, --once, --allow-keychain-prompt, --allow-claude-inference, --no-credential-refresh, --profile-only, --intelligence <high|medium|low>, --sort <runway>, --help, -v/--version
|
|
14
|
+
flags[15]:
|
|
15
|
+
--provider <${PROVIDER_IDS.join(",")}>, --json, --full, --tui, --refresh <30s-24h>, --once, --all, --allow-keychain-prompt, --allow-claude-inference, --no-credential-refresh, --profile-only, --intelligence <high|medium|low>, --sort <runway>, --help, -v/--version
|
|
16
16
|
examples:
|
|
17
17
|
quota-axi
|
|
18
18
|
quota-axi --provider claude
|
|
@@ -25,6 +25,7 @@ examples:
|
|
|
25
25
|
quota-axi --tui
|
|
26
26
|
quota-axi --tui --refresh 1m
|
|
27
27
|
quota-axi --tui --once
|
|
28
|
+
quota-axi --tui --all
|
|
28
29
|
quota-axi --no-credential-refresh
|
|
29
30
|
quota-axi --tui --no-credential-refresh
|
|
30
31
|
quota-axi auth
|
package/dist/src/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EACL,WAAW,EACX,aAAa,EACb,YAAY,GAEb,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,MAAM,CAAC,MAAM,WAAW,GACtB,qEAAqE,CAAC;AAExE,MAAM,CAAC,MAAM,QAAQ,GAAG;;;;;;;;;gBASR,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EACL,WAAW,EACX,aAAa,EACb,YAAY,GAEb,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OA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
4
4
|
import { writeCachedProviders } from "./cache.js";
|
|
5
5
|
import { withQuotaSemantics } from "./interpretation.js";
|
|
6
6
|
import { createModelsResponse, MODEL_CATALOG_PROVIDER_IDS } from "./models.js";
|
|
7
|
+
import { providerPresence } from "./lib/source-attempts.js";
|
|
7
8
|
import { nowIso } from "./lib/time.js";
|
|
8
9
|
import { fetchAccountQuotas, inspectAccountAuth, } from "./providers/accounts.js";
|
|
9
10
|
import { PROVIDERS } from "./providers/index.js";
|
|
@@ -42,19 +43,44 @@ async function quotaTuiReport(flags, options) {
|
|
|
42
43
|
: { columns: process.stdout.columns }),
|
|
43
44
|
colorDepth: detectTuiColorDepth(process.env, process.stdout.isTTY === true),
|
|
44
45
|
});
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
// A provider named with --provider is always drawn in full; otherwise the
|
|
47
|
+
// providers that are not set up fold into one line until `a` or --all.
|
|
48
|
+
let showNotSetUp = flags.all || flags.explicitProviders;
|
|
49
|
+
let notSetUp = 0;
|
|
50
|
+
const frame = (response) => {
|
|
51
|
+
// Presence reads the source attempts, which redaction removes, so it is
|
|
52
|
+
// derived from the complete model before the renderer sees the report.
|
|
53
|
+
const presence = response.providers.map((provider) => providerPresence(provider, PROVIDERS[provider.provider]));
|
|
54
|
+
notSetUp = presence.filter((entry) => entry === "absent").length;
|
|
55
|
+
return renderQuotaTui(redactedResponse(response, flags.full), {
|
|
56
|
+
...terminal(),
|
|
57
|
+
full: flags.full,
|
|
58
|
+
presence,
|
|
59
|
+
showNotSetUp,
|
|
60
|
+
});
|
|
61
|
+
};
|
|
49
62
|
if (flags.once || !isInteractiveTerminal()) {
|
|
50
63
|
return frame(await loadQuota(flags.providers, options, false));
|
|
51
64
|
}
|
|
52
65
|
const refreshSeconds = flags.refreshSeconds ?? DEFAULT_REFRESH_SECONDS;
|
|
53
|
-
const
|
|
66
|
+
const refreshing = `refreshing every ${formatInterval(refreshSeconds)}`;
|
|
67
|
+
const keyHints = () => flags.explicitProviders || notSetUp === 0
|
|
68
|
+
? []
|
|
69
|
+
: [`a ${showNotSetUp ? "hide" : "show"} not set up`];
|
|
54
70
|
const last = await runLiveTui({
|
|
55
71
|
load: () => loadQuota(flags.providers, options, true),
|
|
56
72
|
render: frame,
|
|
57
|
-
status: (scroll) => renderTuiHintLine(scrollHint(scroll,
|
|
73
|
+
status: (scroll) => renderTuiHintLine(scrollHint(scroll, ["Press q to quit", ...keyHints(), refreshing].join(" · "), keyHints()), terminal()),
|
|
74
|
+
keys: flags.explicitProviders
|
|
75
|
+
? {}
|
|
76
|
+
: {
|
|
77
|
+
// Only while something is folded or expanded, so the state never
|
|
78
|
+
// flips silently behind a hint that is not shown.
|
|
79
|
+
a: () => {
|
|
80
|
+
if (notSetUp > 0)
|
|
81
|
+
showNotSetUp = !showNotSetUp;
|
|
82
|
+
},
|
|
83
|
+
},
|
|
58
84
|
intervalMillis: refreshSeconds * 1000,
|
|
59
85
|
io: processLiveTuiIo(),
|
|
60
86
|
});
|
|
@@ -170,10 +196,13 @@ function validateClaudeInference(flags) {
|
|
|
170
196
|
}
|
|
171
197
|
}
|
|
172
198
|
export async function fetchQuota(providers, options) {
|
|
199
|
+
const fetched = (await Promise.all(providers.map((provider) => fetchAccountQuotas(PROVIDERS[provider], options)))).flat();
|
|
200
|
+
// Stamp after every fetch returns: a vendor that computes a reset at
|
|
201
|
+
// response time implies a cycle start no earlier than that instant, so a
|
|
202
|
+
// stamp taken before the request would read an unopened window as
|
|
203
|
+
// `future_cycle_start` by the request latency.
|
|
173
204
|
const generatedAt = nowIso();
|
|
174
|
-
const results =
|
|
175
|
-
.flat()
|
|
176
|
-
.map((provider) => withQuotaSemantics(provider, generatedAt));
|
|
205
|
+
const results = fetched.map((provider) => withQuotaSemantics(provider, generatedAt));
|
|
177
206
|
return annotateQuotaAdvice({
|
|
178
207
|
generatedAt,
|
|
179
208
|
providers: results,
|
package/dist/src/commands.js.map
CHANGED
|
@@ -1 +1 @@
|
|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AAQ,CAChB,kCAAkC,QAAQ,sBAAsB,QAAQ,EAAE,EAC1E,kBAAkB,EAClB,CAAC,OAAO,QAAQ,mCAAmC,CAAC,CACrD,CAAC;IACJ,CAAC;AACH,CAAC;AAED,SAAS,8BAA8B,CAAC,SAA0B;IAChE,IAAI,CAAC;QACH,oBAAoB,CAAC,SAAS,CAAC,CAAC;IAClC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO;IACT,CAAC;AACH,CAAC"}
|
|
@@ -153,6 +153,13 @@ function elevenLabsSemantics(windows, generatedAt) {
|
|
|
153
153
|
* so the three windows jointly bound Go-plan usage at `all_models` scope.
|
|
154
154
|
*/
|
|
155
155
|
function opencodeGoSemantics(windows, generatedAt) {
|
|
156
|
+
// No windows at all means the provider was never set up (or is signed
|
|
157
|
+
// out), not that a subset of the plan's stacked caps is missing - that
|
|
158
|
+
// distinction is handled below. Fall through to the standard no-window
|
|
159
|
+
// reading instead of naming all three caps as unresolved.
|
|
160
|
+
if (windows.length === 0) {
|
|
161
|
+
return unknownSemantics(windows, "OpenCode Go reported no quota windows.");
|
|
162
|
+
}
|
|
156
163
|
const plan = windows.filter(({ id }) => ["rolling", "five_hour", "weekly", "monthly"].includes(id));
|
|
157
164
|
const recognized = new Set(plan);
|
|
158
165
|
// The endpoint always reports all three stacked caps; a missing cap is a
|