quota-axi 0.1.61 → 0.1.63
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 +27 -7
- package/dist/src/cli.js +2 -2
- package/dist/src/commands.js +11 -4
- package/dist/src/commands.js.map +1 -1
- package/dist/src/lib/reuse-context.d.ts +1 -1
- package/dist/src/lib/reuse-context.js +1 -0
- package/dist/src/lib/reuse-context.js.map +1 -1
- package/dist/src/lib/user-config.d.ts +11 -0
- package/dist/src/lib/user-config.js +38 -1
- package/dist/src/lib/user-config.js.map +1 -1
- package/dist/src/providers/accounts.js +4 -4
- package/dist/src/providers/accounts.js.map +1 -1
- package/dist/src/providers/claude-swap.d.ts +29 -0
- package/dist/src/providers/claude-swap.js +279 -0
- package/dist/src/providers/claude-swap.js.map +1 -0
- package/dist/src/providers/claude.js +122 -3
- package/dist/src/providers/claude.js.map +1 -1
- package/dist/src/tui.d.ts +6 -0
- package/dist/src/tui.js +30 -15
- package/dist/src/tui.js.map +1 -1
- package/dist/src/types.d.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -421,9 +421,10 @@ QUOTA_AXI_SNAPSHOT=test/fixtures/quota.json quota-axi --json
|
|
|
421
421
|
- On an interactive terminal the report stays up and refreshes every 5 minutes until you press `q` (or Ctrl+C). Press `r` to refresh immediately; the footer lists both controls. `--refresh` sets the interval (30s-24h) and `--once` renders a single frame. A non-TTY stdout or stdin (pipes, CI, screenshots) always renders one frame and exits.
|
|
422
422
|
- Every refresh re-runs the same quota read as a bare `quota-axi`, including [delegated credential refresh](#delegated-credential-refresh) when a stored session has expired in the meantime. Run `quota-axi --tui --no-credential-refresh` to keep the live report strictly read-only.
|
|
423
423
|
- Live frames paint on the alternate screen and repaint immediately on terminal resize; quitting restores the screen and prints the final frame so the last report stays in scrollback.
|
|
424
|
-
- Height comes from the terminal too. When the report is taller than the terminal, the live view windows it instead of letting the alternate screen (which has no scrollback) push the header and first cards out of reach. The viewport accounts for physical rows after terminal-width wrapping: a full-width visible line can consume its own row without wrapping the optional scroll affordance, which is omitted when it cannot fit. At five or more rows the header stays pinned; when there is room, the last row carries a scroll affordance naming how many report lines are above and below. Below five rows the header scrolls with the other report content, and at one row the scroll affordance is omitted so content still remains visible. Use `j`/`k`, the arrow keys, `PgUp`/`PgDn`, `Space`/`b`, or `g`/`G` to move the window. `renderQuotaTui` lays cards out for the width and returns every line that takes; `scrollFrame` in `src/tui-viewport.ts` windows that frame to the terminal, pins the first line, and clips oversized lines. The closing hint is composed outside `renderQuotaTui`, and the live paint has no trailing newline, so a frame that exactly fills the terminal does not scroll itself. Fold a provider only on positive evidence of absence. Declare an uncertain skip on the adapter that owns the source (`isUncertainSkip`) and a sibling-tool login as incidental (`incidentalSources`); do not special-case those in the TUI. The `tui.show`
|
|
424
|
+
- Height comes from the terminal too. When the report is taller than the terminal, the live view windows it instead of letting the alternate screen (which has no scrollback) push the header and first cards out of reach. The viewport accounts for physical rows after terminal-width wrapping: a full-width visible line can consume its own row without wrapping the optional scroll affordance, which is omitted when it cannot fit. At five or more rows the header stays pinned; when there is room, the last row carries a scroll affordance naming how many report lines are above and below. Below five rows the header scrolls with the other report content, and at one row the scroll affordance is omitted so content still remains visible. Use `j`/`k`, the arrow keys, `PgUp`/`PgDn`, `Space`/`b`, or `g`/`G` to move the window. `renderQuotaTui` lays cards out for the width and returns every line that takes; `scrollFrame` in `src/tui-viewport.ts` windows that frame to the terminal, pins the first line, and clips oversized lines. The closing hint is composed outside `renderQuotaTui`, and the live paint has no trailing newline, so a frame that exactly fills the terminal does not scroll itself. Fold a provider only on positive evidence of absence. Declare an uncertain skip on the adapter that owns the source (`isUncertainSkip`) and a sibling-tool login as incidental (`incidentalSources`); do not special-case those in the TUI. The `tui.show` and `tui.accountLabels` preferences stay on the human path in `src/commands.ts` and `src/tui.ts` and never change the model or machine output. Scrolling clamps at both ends, survives a refresh, and re-clamps on resize; growing the terminal back past the report's height restores the whole frame and the ordinary `Press r to refresh · q to quit` footer. `--once`, non-TTY output, the final frame echoed on quit, and the TOON and JSON surfaces are all unaffected by terminal height.
|
|
425
425
|
- Each live card with a combinable bound leads with the effective-availability rollup (min across bounding windows), colored by headroom: >=50% healthy, 20-50% tight, <20% critical. Per-window rows, including per-model breakouts, are the supporting detail.
|
|
426
426
|
- Percentages and bars show what is left by default. To have every provider's headline, window rows, and bars show what has been used instead, set `tui.show` to `used` in the user config file `~/.config/quota-axi/config.json` (`$XDG_CONFIG_HOME/quota-axi/config.json` when `XDG_CONFIG_HOME` is set): `{ "tui": { "show": "used" } }`. That file is the only place the preference is read - there is no environment variable or flag for it - and it is read once when `--tui` starts, so restart a live report to pick up a change. Only the exact values `used` and `remaining` are recognized; a missing, unreadable, or malformed file, or any other value, keeps the default remaining view. The used view rounds the raw consumed percentage independently of the remaining view, so rounded figures need not sum to 100% (48.5% used / 51.5% remaining displays 49% used / 52% remaining). It labels each headline `49% used · week`. Its bar fill is consumption, the `┃` marker moves to the elapsed share of the window, and fill running past the marker means burning ahead of the reset clock. Health colors, runway verdicts, used-share rows, raw credit balances, and `?` rows read the same in both views. It is a human display preference only: quota-axi never reads the file outside `--tui`, so the default TOON, `--json`, `--full`, and the cache are byte-identical whatever it says.
|
|
427
|
+
- Account lanes can be named for people. Each lane of a provider that [reports more than one account](#multiple-accounts) shows its opaque account key under the card title, so several `claude` profile cards look alike. Set `tui.accountLabels` in the same user config file to an object from a lane's `accountLocator.path` (the Claude config directory, written as an absolute or `~/` path) to a name, and that lane's card title reads `claude · posam` instead of `claude`, with the account key still on the line below: `{ "tui": { "accountLabels": { "~/.claude": "personal", "~/.claude-work": "posam" } } }`. Paths are compared after `~` expansion and symlink resolution, so a trailing slash or a linked directory names the same lane. A label is trimmed and cut to 20 columns; a relative path, a non-string or blank label, or a malformed setting is ignored. Only a lane that names its locator can carry a label, so a provider reporting a single lane keeps its plain title. Folded not-set-up lanes read `claude/posam` instead of `claude/profile:…`. Like `tui.show`, the file is read once when `--tui` starts, and the labels never reach TOON, `--json`, `--full`, or the cache.
|
|
427
428
|
- A window with `shareOf` is a used-share, not an independent remaining pool: the row prints `N% of <parent>` (or `share of <parent>` when `percentUsed` is absent) instead of a remaining bar or `?`, so it cannot be read as missing data or as its own headroom.
|
|
428
429
|
- The headline is labeled with the window it actually is: the minimum across bounding windows always equals at least one named window, so the label names the `limitingWindowIds` window (`week`, `session`, `credits`) and changes per provider and over time. Tied limiting windows read `credits + grok build`, compacting to `credits +2` when the names do not fit; a model- or product-scoped headline appends its scope, and any unresolved limiter falls back to the scope wording (`all models`).
|
|
429
430
|
- In the default view, 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.
|
|
@@ -439,7 +440,7 @@ QUOTA_AXI_SNAPSHOT=test/fixtures/quota.json quota-axi --json
|
|
|
439
440
|
|
|
440
441
|
The reporting unit is the verified underlying subscription, not each credential route that can read it.
|
|
441
442
|
A normal invocation reports every Codex ChatGPT subscription it can discover from sibling entries in one Pi `auth.json`.
|
|
442
|
-
Claude reports more than its one selected profile only when `QUOTA_AXI_CLAUDE_PROFILES`
|
|
443
|
+
Claude reports more than its one selected profile only when `QUOTA_AXI_CLAUDE_PROFILES` ([Claude profiles](#claude-profiles)) or `QUOTA_AXI_CLAUDE_SWAP` ([claude-swap accounts](#claude-swap-accounts)) opts in.
|
|
443
444
|
It keeps each account's quota windows, resets, plan, effective availability, runway, and `spendPriority` separate.
|
|
444
445
|
Each account gets its own TUI card, naming its key on an `account <key>` line under the card title, including accounts whose quota cannot be read.
|
|
445
446
|
The `default` key an expanded report fills in for single-account providers is a schema artefact, so the TUI leaves it out of both the card and the `--full` footer; TOON and JSON still publish it.
|
|
@@ -476,7 +477,7 @@ A proven sign-out retires only cached Codex snapshots whose stored account ident
|
|
|
476
477
|
|
|
477
478
|
### Claude profiles
|
|
478
479
|
|
|
479
|
-
Claude account lanes are opt-in.
|
|
480
|
+
Claude account lanes are opt-in. When `QUOTA_AXI_CLAUDE_SWAP` is not enabled and `QUOTA_AXI_CLAUDE_PROFILES` is absent, blank, or lists no entry, Claude reads only the profile this process selects, and the report, its schema, and the cache slot it uses are exactly what they are without these features: one keyless lane, quota schema 5, `accountKeys: ["default"]`. quota-axi never searches the home directory for other Claude profiles.
|
|
480
481
|
|
|
481
482
|
```sh
|
|
482
483
|
QUOTA_AXI_CLAUDE_PROFILES="$HOME/.claude-work:$HOME/.claude-team" quota-axi --provider claude --json
|
|
@@ -493,8 +494,27 @@ QUOTA_AXI_CLAUDE_PROFILES="$HOME/.claude-work:$HOME/.claude-team" quota-axi --pr
|
|
|
493
494
|
- `--full` adds `accountLocator: { kind: "config-dir", path, keychainService, delegateEligible }` to each expanded lane, so a consumer can map a lane to the `CLAUDE_CONFIG_DIR` that selects it, and the default lane by `keychainService: "Claude Code-credentials"`. One exception: on macOS, when the selected lane's Keychain service comes from `CLAUDE_SECURESTORAGE_CONFIG_DIR`, `path` alone is not a complete selector, because setting only that `CLAUDE_CONFIG_DIR` names a different Keychain item; the locator does not publish the secure-storage selector, only the resulting `keychainService`. `keychainService` is present on macOS only, and `delegateEligible` is `true` only on the process-selected lane. `--full` TOON adds the same fields to `accounts[]` as `locatorKind`, `locatorPath` (home shown as `~`), `keychainService`, and `delegateEligible` columns whenever any row has a locator, and the `--tui --full` footer shows the lane's path. The locator is never in default output, and a single surviving lane keeps the legacy keyless shape with no locator.
|
|
494
495
|
- Each lane is cached and served stale under its own profile context, and a definitive sign-out retires only that lane's snapshot; a sibling's stays.
|
|
495
496
|
- Two lanes signed in to the same Anthropic account and organization are one subscription and coalesce as described below. Claude identity for this purpose is the verified account id plus the organization the bearer is scoped to, because one login can hold seats in several organizations, each with its own limits; a reading whose organization is not reported stays its own lane.
|
|
497
|
+
- The `--tui` report can name each lane by its config directory with `tui.accountLabels` ([Human terminal report](#human-terminal-report---tui)); agent output keeps only the account key.
|
|
496
498
|
- `--profile-only` ignores the variable and keeps reading exactly one file.
|
|
497
499
|
|
|
500
|
+
### claude-swap accounts
|
|
501
|
+
|
|
502
|
+
`QUOTA_AXI_CLAUDE_SWAP=1` (or `true`) is an opt-in for people who run the third-party [claude-swap](https://github.com/realiti4/claude-swap) to hold several Claude accounts. Instead of reading Claude's own stores, quota-axi then runs claude-swap's non-interactive `cswap list --json` (fixed argv, resolved on `PATH`) and reports one lane per account it lists. Only the real executable is launched directly; a Windows `.cmd` or `.bat` launcher is reported as `claude_swap_unavailable` with `remedyCommand: pipx install claude-swap`, and can instead be replaced by the `cswap.exe` installed through uv. Unset or any value other than `1` or `true`, Claude behaves exactly as it does without the variable and `cswap` never runs.
|
|
503
|
+
|
|
504
|
+
```sh
|
|
505
|
+
QUOTA_AXI_CLAUDE_SWAP=1 quota-axi --provider claude --json
|
|
506
|
+
QUOTA_AXI_CLAUDE_SWAP=1 quota-axi --provider claude --full --json # adds source attempts and claude-swap's account labels
|
|
507
|
+
```
|
|
508
|
+
|
|
509
|
+
- quota-axi takes no credential or token from claude-swap: it reads only the account labels and usage that command prints, and sends no request of its own for these lanes. The child receives only set values from this environment allowlist: `HOME`, `PATH`, `USER`, `LOGNAME`, `SHELL`, `TMPDIR`, `TMP`, `TEMP`, `LANG`, `LC_ALL`, every `LC_*` variable, `TERM`, `XDG_CONFIG_HOME`, `XDG_DATA_HOME`, and `XDG_CACHE_HOME`; Windows additionally allows `SystemRoot`, `USERPROFILE`, `APPDATA`, `LOCALAPPDATA`, `PATHEXT`, and `COMSPEC`, matched case-insensitively. Claude, Anthropic, other provider, and quota-axi variables are not inherited. The command is claude-swap's own; it may fetch usage from Anthropic and renew credentials it manages under its own polling policy. For that reason, `--no-credential-refresh` does not run `cswap` and reports Claude unavailable with `claude_swap_refresh_disabled`. quota-axi otherwise waits up to 30 seconds and then walks away without signalling it, like a [delegated refresh](#delegated-credential-refresh). Command output goes to a private `0600` temporary file so a timed-out child keeps a writable destination without keeping quota-axi alive; completed output is read within a 1 MiB bound and then removed. A timed-out child's output is removed when it exits, or when quota-axi exits first.
|
|
510
|
+
- It reads claude-swap's JSON schema 1 (verified against claude-swap 0.26). Every account row must carry a non-empty `email`, string `organizationUuid` (which may be empty), non-empty `usageStatus`, and `usage` as an object or null; `organizationName` is optional but must be a string when present, and an object-valued `usage` requires a parseable `usageFetchedAt`. The complete source is malformed if any listed row violates that schema or produces a repeated lane key. `usage.fiveHour` and `usage.sevenDay`, when present, require a finite numeric `pct`; `resetsAt` must parse when present, and claude-swap omits it for a window that has not started. Their percentages are claude-swap's copies of the Anthropic usage endpoint's `utilization`, which is percent used, so they map through the native Claude normalizer to `five_hour` and `seven_day` windows with the same trusted durations. `resetsAt` passes through, and a window without one is treated like a native untriggered window. Nothing else is read: `usage.scoped`, `active`, `number`, `alias`, `spend`, and claude-swap's pace and projection fields are not published.
|
|
511
|
+
- Each lane's key is `claude-swap:` plus 24 hexadecimal characters of a one-way digest of the account's email and organization UUID, so it survives slot renumbering and contains no email. Lanes keep claude-swap's order, which carries no preference.
|
|
512
|
+
- A lane's `refreshedAt` is claude-swap's `usageFetchedAt`, and a window whose reset has passed since then is dropped. An account whose `usageStatus` is not `ok`, or that has no window left, is its own `unavailable` lane with `state.error: claude_swap_<usageStatus>` (or `claude_swap_usage_unavailable`) rather than disappearing; quota-axi does not treat claude-swap's status as a sign-out.
|
|
513
|
+
- `--full` reports `source: cli` with a `claude-swap` attempt, and `account` with claude-swap's `email` and `organizationName` marked `identityStatus: unverified`. With no verified account id, lanes never coalesce: two seats are never combined.
|
|
514
|
+
- These lanes are not cached and never served stale; claude-swap keeps its own last-good usage. `auth` never runs `cswap` and continues to inspect Claude's selected native credential.
|
|
515
|
+
- When `cswap` is missing, exits nonzero, outruns the wait, or prints anything but schema 1 whose complete account list passes the schema above with unique lane keys, Claude reports unavailable with a `claude_swap_*` reason and never falls back to native Claude.
|
|
516
|
+
- The variable takes precedence over `QUOTA_AXI_CLAUDE_PROFILES`, and `--profile-only` ignores it.
|
|
517
|
+
|
|
498
518
|
### Same subscription across sources
|
|
499
519
|
|
|
500
520
|
After a provider's lanes have been read, collection coalesces readings that share a provider-supported subscription identity.
|
|
@@ -521,7 +541,7 @@ A row covering one credential lists just its own key. A consumer that holds a cr
|
|
|
521
541
|
A provider without account discovery lists `accountKeys: ["default"]`, the same literal as its schema 6 `accountKey` filler. A discovering provider that stays on one row, such as two Pi keys for one account with no native login, keeps schema 5 and no `accountKey`, and its `accountKeys` starts with that lane's key.
|
|
522
542
|
Membership mirrors quota-axi's own grouping exactly: every key the provider grouped into the row, and no other. That grouping relies on stored account identity when no fresh live reading confirms it, so a fold is published as applied even when a later live reading names a different account.
|
|
523
543
|
`accountKeys` is a quota JSON field. Auth still lists each discovered lane on its own, because a fold that depends on the quota reading has not happened there. TOON does not add a column: its flat blocks already name the published lane by `accountKey`, and the membership list is the JSON account row's join field.
|
|
524
|
-
The shared account collector puts each discovered lane's key first; an adapter adds folded keys to its quota reading's `ProviderQuota.accountKeys`, including keys learned during the read. Codex and, when `QUOTA_AXI_CLAUDE_PROFILES` opts in, Claude are the adapters that discover accounts today; other providers report `default`. The list itself is not cached; Codex reconstructs a stale row's originating key from the cached credential source.
|
|
544
|
+
The shared account collector puts each discovered lane's key first; an adapter adds folded keys to its quota reading's `ProviderQuota.accountKeys`, including keys learned during the read. Codex and, when `QUOTA_AXI_CLAUDE_PROFILES` or `QUOTA_AXI_CLAUDE_SWAP` opts in, Claude are the adapters that discover accounts today; other providers report `default`. The list itself is not cached; Codex reconstructs a stale row's originating key from the cached credential source.
|
|
525
545
|
Every flat TOON block adds `accountKey` immediately after `provider`, and the quota/exhaustion/attention join becomes **`provider` + `accountKey` + `scope`**.
|
|
526
546
|
Models and model sort ties use **`provider` + `accountKey` + `id`**.
|
|
527
547
|
Models `unmatchedWindowIds` entries gain the same key, so an unmapped window reads `provider/accountKey/scope` instead of `provider/scope`; the key keeps two accounts of one provider from reporting the same unmapped window indistinguishably.
|
|
@@ -531,7 +551,7 @@ A Codex Pi lane's key is the auth.json provider id (`openai-codex`, `openai-code
|
|
|
531
551
|
It is stable across refreshes and discovery order and contains no token, email, or path, and it also names the account's cache slot.
|
|
532
552
|
A lone lane keeps the legacy keyless slot, which the single selected account uses too, so the snapshot itself records the stored ChatGPT account id of the credential that produced it (see [Cache](#cache)).
|
|
533
553
|
A key the report cannot publish (malformed or repeated) costs only its own lane: the lanes with usable keys still expand, so one unreadable entry never hides the accounts beside it.
|
|
534
|
-
The provider falls back to its single selected account only when no usable lane remains.
|
|
554
|
+
The provider normally falls back to its single selected account only when no usable lane remains; a source-owned failure lane, such as enabled claude-swap being unavailable, keeps that source's failure instead.
|
|
535
555
|
`--full` adds the vendor identity the usage endpoint supplied, when any.
|
|
536
556
|
|
|
537
557
|
If no provider expands, existing fields retain their shape and order, while quota JSON adds `accountKeys`: quota schema 5, auth/models schema 1, and no account column.
|
|
@@ -541,7 +561,7 @@ Consumers must honor the schema version; a legacy keyless row means the single s
|
|
|
541
561
|
|
|
542
562
|
Account collection is shared in `src/providers/accounts.ts`.
|
|
543
563
|
Adapters can implement `ProviderAdapter.discoverAccounts` with stable keys and bound quota/auth readers; collection preserves each account's success or failure.
|
|
544
|
-
Codex Pi sibling entries are the first discovery implementation on this tree,
|
|
564
|
+
Codex Pi sibling entries are the first discovery implementation on this tree, opt-in Claude profiles the second, and opt-in claude-swap accounts the third. An adapter may also name each lane's local selector as `ProviderAccount.locator`; the collector publishes it as `accountLocator` on an expanded lane's row, in `--full` only.
|
|
545
565
|
Other adapters retain their existing source-selection behavior.
|
|
546
566
|
|
|
547
567
|
## Output Model
|
|
@@ -1138,7 +1158,7 @@ Providers with no established non-interactive rotation command stay read-only on
|
|
|
1138
1158
|
- It never prints, logs, or caches credential values.
|
|
1139
1159
|
- It never mints, rotates, or writes a credential, and never performs a refresh-token exchange. Credential renewal is always delegated to the vendor CLI that owns the store (see [Delegated credential refresh](#delegated-credential-refresh)). Muse is the one provider whose only quota read, the Muse CLI's own startup request, also returns an API key; that read is verified to return the account's standing key rather than mint a fresh one, quota-axi discards the key while parsing, never stores or prints it, and bounds how often it sends the request (see [Muse provider notes](#provider-notes)).
|
|
1140
1160
|
- It never retains, prints, logs, renders, caches, sends, or exchanges a refresh token's value. The Pi credential brokers read a stored refresh value only to derive a usability boolean - whether it is a usable literal secret rather than absent or an environment, template, or command reference - and discard it immediately; elsewhere only its presence is checked, as evidence that the vendor can still recover.
|
|
1141
|
-
- It never launches the Cursor, GitHub (`gh`), Copilot, Pi, Kimi, MiniMax, OpenCode, Command Code, ElevenLabs, Devin, or Muse CLIs. It runs the read-only Alibaba `bl` usage command, the read-only Higgsfield `account status` / `account transactions` / `generate list` commands, the declared read-only Codex app-server probe, Antigravity's noninteractive structured `/quota` read (`agy -p "/quota"`), preferred ahead of its loopback access, and the two declared refresh delegates (`claude doctor`, `grok models`); none starts an agent session or spends the quota being measured. The one explicit exception is `--allow-claude-inference`, whose fixed native Claude request spends inference quota and is documented above.
|
|
1161
|
+
- It never launches the Cursor, GitHub (`gh`), Copilot, Pi, Kimi, MiniMax, OpenCode, Command Code, ElevenLabs, Devin, or Muse CLIs. It runs the read-only Alibaba `bl` usage command, the read-only Higgsfield `account status` / `account transactions` / `generate list` commands, the declared read-only Codex app-server probe, Antigravity's noninteractive structured `/quota` read (`agy -p "/quota"`), preferred ahead of its loopback access, claude-swap's `cswap list --json` only under the `QUOTA_AXI_CLAUDE_SWAP` opt-in ([claude-swap accounts](#claude-swap-accounts)), and the two declared refresh delegates (`claude doctor`, `grok models`); none starts an agent session or spends the quota being measured. The one explicit exception is `--allow-claude-inference`, whose fixed native Claude request spends inference quota and is documented above.
|
|
1142
1162
|
- It never signals or kills a delegated refresh. A vendor that outruns quota-axi's wait is left to finish its own token exchange, and quota-axi reports an unconfirmed refresh instead of a credential verdict.
|
|
1143
1163
|
- It never routes, ranks a winner, or orders providers preferentially. Derived comparative signals, including `effectiveAvailability[].selection`, are published as data for the consumer to act on.
|
|
1144
1164
|
|
package/dist/src/cli.js
CHANGED
|
@@ -12,9 +12,9 @@ output:
|
|
|
12
12
|
--tui palette: --theme light|dark|system, else QUOTA_AXI_THEME, else dark. system follows OS appearance on each refresh; unavailable or unknown settings fall back to dark.
|
|
13
13
|
notes:
|
|
14
14
|
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.
|
|
15
|
-
{"tui":{"show":"used"}} in ~/.config/quota-axi/config.json (or $XDG_CONFIG_HOME/quota-axi/config.json) makes --tui draw what each window has used instead of what is left;
|
|
15
|
+
{"tui":{"show":"used"}} in ~/.config/quota-axi/config.json (or $XDG_CONFIG_HOME/quota-axi/config.json) makes --tui draw what each window has used instead of what is left, and {"tui":{"accountLabels":{"~/.claude-work":"work"}}} titles that lane's --tui card claude · work; neither changes TOON or JSON.
|
|
16
16
|
Every read asks the vendor unless --max-age <duration> or QUOTA_AXI_MAX_AGE (the flag wins) opts into reuse: a provider's last successful reading is then served while younger than that bound and the credential selection and local credential files are unchanged, and processes starting together make one vendor read. --full ignores QUOTA_AXI_MAX_AGE, and --tui r always reads the vendor. A reused reading stays fresh and carries reused true plus its original refreshedAt. QUOTA_AXI_SNAPSHOT=<cache-format file> answers every provider from that file instead, for tests and fixtures.
|
|
17
|
-
Claude reports one lane, the profile this process selects, unless QUOTA_AXI_CLAUDE_PROFILES opts in: a path-delimiter-separated list of absolute Claude config directories (each exactly as CLAUDE_CONFIG_DIR would name it). Then the selected profile, the default profile when it holds a credential, and each listed directory become their own accountKey lanes; only the selected lane uses CLAUDE_CODE_OAUTH_TOKEN or delegated refresh, and --full --json names each lane's accountLocator.
|
|
17
|
+
Claude reports one lane, the profile this process selects, unless QUOTA_AXI_CLAUDE_PROFILES opts in: a path-delimiter-separated list of absolute Claude config directories (each exactly as CLAUDE_CONFIG_DIR would name it). Then the selected profile, the default profile when it holds a credential, and each listed directory become their own accountKey lanes; only the selected lane uses CLAUDE_CODE_OAUTH_TOKEN or delegated refresh, and --full --json names each lane's accountLocator. QUOTA_AXI_CLAUDE_SWAP=1 instead reports one claude-swap:<digest> lane per account the third-party claude-swap lists in \`cswap list --json\`, taking no credential from it. Failures are unavailable and never fall back to native Claude; auth and --no-credential-refresh do not run cswap.
|
|
18
18
|
--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.
|
|
19
19
|
flags[17]:
|
|
20
20
|
--provider <${PROVIDER_IDS.join(",")}>, --json, --full, --tui, --refresh <30s-24h>, --once, --theme <light|dark|system>, --all, --max-age <0-1h>, --allow-keychain-prompt, --allow-claude-inference, --no-credential-refresh, --profile-only, --intelligence <high|medium|low>, --sort <runway>, --help, -v/--version
|
package/dist/src/commands.js
CHANGED
|
@@ -9,11 +9,12 @@ import { withInputTrace } from "./lib/input-trace.js";
|
|
|
9
9
|
import { withQuotaSemantics } from "./interpretation.js";
|
|
10
10
|
import { createModelsResponse, MODEL_CATALOG_PROVIDER_IDS } from "./models.js";
|
|
11
11
|
import { providerPresence } from "./lib/source-attempts.js";
|
|
12
|
-
import { readTuiShowPreference } from "./lib/user-config.js";
|
|
12
|
+
import { readTuiAccountLabels, readTuiShowPreference, } from "./lib/user-config.js";
|
|
13
13
|
import { resolveSystemTuiTheme } from "./lib/system-theme.js";
|
|
14
14
|
import { nowIso } from "./lib/time.js";
|
|
15
15
|
import { coalesceVerifiedSubscriptions, fetchAccountQuotas, inspectAccountAuth, } from "./providers/accounts.js";
|
|
16
16
|
import { failedProvider } from "./providers/common.js";
|
|
17
|
+
import { claudeSwapEnabled } from "./providers/claude-swap.js";
|
|
17
18
|
import { PROVIDERS } from "./providers/index.js";
|
|
18
19
|
import { quotaJsonReport, redactedResponse, renderAuthToon, renderModelsToon, renderQuotaToon, } from "./render.js";
|
|
19
20
|
import { formatInterval, runLiveTui } from "./tui-live.js";
|
|
@@ -68,9 +69,10 @@ function omittedAbsentProviderIds(providers, laneAbsent) {
|
|
|
68
69
|
* everywhere else (pipes, CI, `--once`) it renders a single frame.
|
|
69
70
|
*/
|
|
70
71
|
async function quotaTuiReport(flags, options, maxAgeSeconds) {
|
|
71
|
-
//
|
|
72
|
-
// JSON never see
|
|
72
|
+
// Human display preferences, so they are read only on this path: TOON and
|
|
73
|
+
// JSON never see them.
|
|
73
74
|
const show = readTuiShowPreference();
|
|
75
|
+
const accountLabel = readTuiAccountLabels();
|
|
74
76
|
// Precedence: --theme, then QUOTA_AXI_THEME, then dark.
|
|
75
77
|
// A blank variable selects nothing, matching the project's env conventions.
|
|
76
78
|
// Validated once here so a variable edited mid-session can never throw inside
|
|
@@ -101,12 +103,17 @@ async function quotaTuiReport(flags, options, maxAgeSeconds) {
|
|
|
101
103
|
// derived from the complete model before the renderer sees the report.
|
|
102
104
|
const presence = response.providers.map((provider) => providerPresence(provider, PROVIDERS[provider.provider]));
|
|
103
105
|
notSetUp = presence.filter((entry) => entry === "absent").length;
|
|
106
|
+
// Redaction also removes the locator a lane label is keyed by.
|
|
107
|
+
const accountLabels = response.providers.map((provider) => provider.accountLocator
|
|
108
|
+
? accountLabel(provider.accountLocator.path)
|
|
109
|
+
: undefined);
|
|
104
110
|
return renderQuotaTui(redactedResponse(response, flags.full), {
|
|
105
111
|
...terminal(),
|
|
106
112
|
full: flags.full,
|
|
107
113
|
presence,
|
|
108
114
|
showNotSetUp,
|
|
109
115
|
show,
|
|
116
|
+
accountLabels,
|
|
110
117
|
});
|
|
111
118
|
};
|
|
112
119
|
if (flags.once || !isInteractiveTerminal()) {
|
|
@@ -274,7 +281,7 @@ export async function fetchQuota(providers, options, maxAgeSeconds = 0) {
|
|
|
274
281
|
if (snapshot && !isSnapshotFile(snapshot)) {
|
|
275
282
|
throw new AxiError(`${SNAPSHOT_ENV} is not a readable quota snapshot: ${snapshot}`, "VALIDATION_ERROR", [`Point ${SNAPSHOT_ENV} at a quota-axi cache file, or unset it`]);
|
|
276
283
|
}
|
|
277
|
-
if (!snapshot)
|
|
284
|
+
if (!snapshot && !claudeSwapEnabled())
|
|
278
285
|
validateClaudeProfiles(providers, options);
|
|
279
286
|
const writesCache = options.credentialMode !== "profile-only" && !snapshot;
|
|
280
287
|
// Providers a lock holder already cached, so the report-wide write below
|
package/dist/src/commands.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commands.js","sourceRoot":"","sources":["../../src/commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EACL,UAAU,EACV,gBAAgB,EAChB,aAAa,EACb,eAAe,GAEhB,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,qBAAqB,EACrB,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EACL,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,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C,QAAQ,EAAE,EACvD,kBAAkB,EAClB,CAAC,kDAAkD,CAAC,CACrD,CAAC;IACJ,CAAC;IACD,IAAI,YAAY,EAAE,EAAE,CAAC;QACnB,MAAM,IAAI,QAAQ,CAChB,0CAA0C,YAAY,EAAE,EACxD,kBAAkB,EAClB,CAAC,SAAS,YAAY,+BAA+B,CAAC,CACvD,CAAC;IACJ,CAAC;IACD,IAAI,KAAK,CAAC,mBAAmB,EAAE,CAAC;QAC9B,MAAM,IAAI,QAAQ,CAChB,gEAAgE,EAChE,kBAAkB,EAClB,CAAC,oDAAoD,CAAC,CACvD,CAAC;IACJ,CAAC;IACD,MAAM,QAAQ,GAAG,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,YAAY,CAAC;IAC5E,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC;QACnC,MAAM,IAAI,QAAQ,CAChB,kCAAkC,QAAQ,sBAAsB,QAAQ,EAAE,EAC1E,kBAAkB,EAClB,CAAC,OAAO,QAAQ,mCAAmC,CAAC,CACrD,CAAC;IACJ,CAAC;AACH,CAAC;AAED,SAAS,8BAA8B,CACrC,SAA0B,EAC1B,SAAiB;IAEjB,IAAI,CAAC;QACH,oBAAoB,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IAC7C,CAAC;IAAC,MAAM,CAAC;QACP,OAAO;IACT,CAAC;AACH,CAAC"}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* recording environment and fails when a variable it consults is neither
|
|
8
8
|
* listed here nor declared as not selecting a credential.
|
|
9
9
|
*/
|
|
10
|
-
export declare const CREDENTIAL_SELECTION_ENV: readonly ["HOME", "USERPROFILE", "USER", "APPDATA", "LOCALAPPDATA", "XDG_CONFIG_HOME", "XDG_DATA_HOME", "ANTHROPIC_API_KEY", "ANTHROPIC_AUTH_TOKEN", "CLAUDE_CODE_OAUTH_TOKEN", "CLAUDE_CONFIG_DIR", "CLAUDE_SECURESTORAGE_CONFIG_DIR", "QUOTA_AXI_CLAUDE_PROFILES", "CODEX_HOME", "QUOTA_AXI_CODEX_BINARY", "PI_CODING_AGENT_DIR", "CURSOR_CLI_CONFIG", "CURSOR_STATE_DB", "COPILOT_GH_HOST", "COPILOT_GITHUB_TOKEN", "COPILOT_HOME", "GITHUB_COPILOT_APPS_JSON", "GH_CONFIG_DIR", "GH_HOST", "GH_TOKEN", "GITHUB_TOKEN", "GROK_AUTH", "GROK_AUTH_JSON", "GROK_AUTH_PATH", "GROK_HOME", "KIMI_CODE_HOME", "QUOTA_AXI_OPENCODE_GO_PI_AUTH", "COMMAND_CODE_API_KEY", "COMMANDCODE_API_KEY", "MINIMAX_API_KEY", "MINIMAX_BASE_URL", "MMX_CONFIG_DIR", "MIMO_API_KEY", "DEEPSEEK_API_KEY", "OPENROUTER_API_KEY", "ELEVENLABS_API_KEY", "WINDSURF_API_KEY", "WINDSURF_API_SERVER_URL", "META_API_KEY"];
|
|
10
|
+
export declare const CREDENTIAL_SELECTION_ENV: readonly ["HOME", "USERPROFILE", "USER", "APPDATA", "LOCALAPPDATA", "XDG_CONFIG_HOME", "XDG_DATA_HOME", "ANTHROPIC_API_KEY", "ANTHROPIC_AUTH_TOKEN", "CLAUDE_CODE_OAUTH_TOKEN", "CLAUDE_CONFIG_DIR", "CLAUDE_SECURESTORAGE_CONFIG_DIR", "QUOTA_AXI_CLAUDE_PROFILES", "QUOTA_AXI_CLAUDE_SWAP", "CODEX_HOME", "QUOTA_AXI_CODEX_BINARY", "PI_CODING_AGENT_DIR", "CURSOR_CLI_CONFIG", "CURSOR_STATE_DB", "COPILOT_GH_HOST", "COPILOT_GITHUB_TOKEN", "COPILOT_HOME", "GITHUB_COPILOT_APPS_JSON", "GH_CONFIG_DIR", "GH_HOST", "GH_TOKEN", "GITHUB_TOKEN", "GROK_AUTH", "GROK_AUTH_JSON", "GROK_AUTH_PATH", "GROK_HOME", "KIMI_CODE_HOME", "QUOTA_AXI_OPENCODE_GO_PI_AUTH", "COMMAND_CODE_API_KEY", "COMMANDCODE_API_KEY", "MINIMAX_API_KEY", "MINIMAX_BASE_URL", "MMX_CONFIG_DIR", "MIMO_API_KEY", "DEEPSEEK_API_KEY", "OPENROUTER_API_KEY", "ELEVENLABS_API_KEY", "WINDSURF_API_KEY", "WINDSURF_API_SERVER_URL", "META_API_KEY"];
|
|
11
11
|
/**
|
|
12
12
|
* An opaque identifier for the credential selection this process would make.
|
|
13
13
|
* Values are hashed together, never stored: several of these variables are
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reuse-context.js","sourceRoot":"","sources":["../../../src/lib/reuse-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAE5C;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,MAAM;IACN,aAAa;IACb,MAAM;IACN,SAAS;IACT,cAAc;IACd,iBAAiB;IACjB,eAAe;IACf,mBAAmB;IACnB,sBAAsB;IACtB,yBAAyB;IACzB,mBAAmB;IACnB,iCAAiC;IACjC,2BAA2B;IAC3B,YAAY;IACZ,wBAAwB;IACxB,qBAAqB;IACrB,mBAAmB;IACnB,iBAAiB;IACjB,iBAAiB;IACjB,sBAAsB;IACtB,cAAc;IACd,0BAA0B;IAC1B,eAAe;IACf,SAAS;IACT,UAAU;IACV,cAAc;IACd,WAAW;IACX,gBAAgB;IAChB,gBAAgB;IAChB,WAAW;IACX,gBAAgB;IAChB,+BAA+B;IAC/B,sBAAsB;IACtB,qBAAqB;IACrB,iBAAiB;IACjB,kBAAkB;IAClB,gBAAgB;IAChB,cAAc;IACd,kBAAkB;IAClB,oBAAoB;IACpB,oBAAoB;IACpB,kBAAkB;IAClB,yBAAyB;IACzB,cAAc;CACN,CAAC;AAEX;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAC5B,cAAiC,OAAO,CAAC,GAAG;IAE5C,OAAO,UAAU,CAAC,QAAQ,CAAC;SACxB,MAAM,CACL,IAAI,CAAC,SAAS,CAAC;QACb,kBAAkB;QAClB,OAAO,EAAE;QACT,eAAe,EAAE;QACjB,wBAAwB,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC;KAClE,CAAC,CACH;SACA,MAAM,CAAC,KAAK,CAAC,CAAC;AACnB,CAAC;AAED,SAAS,eAAe;IACtB,IAAI,CAAC;QACH,OAAO,QAAQ,EAAE,CAAC,QAAQ,CAAC;IAC7B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
1
|
+
{"version":3,"file":"reuse-context.js","sourceRoot":"","sources":["../../../src/lib/reuse-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAE5C;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,MAAM;IACN,aAAa;IACb,MAAM;IACN,SAAS;IACT,cAAc;IACd,iBAAiB;IACjB,eAAe;IACf,mBAAmB;IACnB,sBAAsB;IACtB,yBAAyB;IACzB,mBAAmB;IACnB,iCAAiC;IACjC,2BAA2B;IAC3B,uBAAuB;IACvB,YAAY;IACZ,wBAAwB;IACxB,qBAAqB;IACrB,mBAAmB;IACnB,iBAAiB;IACjB,iBAAiB;IACjB,sBAAsB;IACtB,cAAc;IACd,0BAA0B;IAC1B,eAAe;IACf,SAAS;IACT,UAAU;IACV,cAAc;IACd,WAAW;IACX,gBAAgB;IAChB,gBAAgB;IAChB,WAAW;IACX,gBAAgB;IAChB,+BAA+B;IAC/B,sBAAsB;IACtB,qBAAqB;IACrB,iBAAiB;IACjB,kBAAkB;IAClB,gBAAgB;IAChB,cAAc;IACd,kBAAkB;IAClB,oBAAoB;IACpB,oBAAoB;IACpB,kBAAkB;IAClB,yBAAyB;IACzB,cAAc;CACN,CAAC;AAEX;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAC5B,cAAiC,OAAO,CAAC,GAAG;IAE5C,OAAO,UAAU,CAAC,QAAQ,CAAC;SACxB,MAAM,CACL,IAAI,CAAC,SAAS,CAAC;QACb,kBAAkB;QAClB,OAAO,EAAE;QACT,eAAe,EAAE;QACjB,wBAAwB,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC;KAClE,CAAC,CACH;SACA,MAAM,CAAC,KAAK,CAAC,CAAC;AACnB,CAAC;AAED,SAAS,eAAe;IACtB,IAAI,CAAC;QACH,OAAO,QAAQ,EAAE,CAAC,QAAQ,CAAC;IAC7B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -13,3 +13,14 @@ export declare function userConfigFilePath(environment?: Record<string, string |
|
|
|
13
13
|
* remaining view.
|
|
14
14
|
*/
|
|
15
15
|
export declare function readTuiShowPreference(file?: string): TuiShow;
|
|
16
|
+
/** Resolves a lane's `accountLocator.path` to the label its card shows. */
|
|
17
|
+
export type TuiAccountLabels = (locatorPath: string) => string | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* The `--tui` lane names, `tui.accountLabels` in the user config file: an
|
|
20
|
+
* object from a lane's locator path (absolute, or `~/`-relative) to the name
|
|
21
|
+
* its card shows. Paths are compared after `~` expansion and symlink
|
|
22
|
+
* resolution, so a trailing slash or a linked directory names the same lane.
|
|
23
|
+
* An absent, unreadable, or malformed file or setting names nothing; a
|
|
24
|
+
* relative path, a non-string label, or a blank label skips only that entry.
|
|
25
|
+
*/
|
|
26
|
+
export declare function readTuiAccountLabels(file?: string): TuiAccountLabels;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { realpathSync } from "node:fs";
|
|
1
2
|
import { homedir } from "node:os";
|
|
2
|
-
import { join } from "node:path";
|
|
3
|
+
import { isAbsolute, join, resolve } from "node:path";
|
|
3
4
|
import { readJsonFile } from "./fs.js";
|
|
4
5
|
/**
|
|
5
6
|
* The user-level quota-axi configuration file:
|
|
@@ -23,6 +24,42 @@ export function readTuiShowPreference(file = userConfigFilePath()) {
|
|
|
23
24
|
const show = isRecord(tui) ? tui.show : undefined;
|
|
24
25
|
return show === "used" ? "used" : "remaining";
|
|
25
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* The `--tui` lane names, `tui.accountLabels` in the user config file: an
|
|
29
|
+
* object from a lane's locator path (absolute, or `~/`-relative) to the name
|
|
30
|
+
* its card shows. Paths are compared after `~` expansion and symlink
|
|
31
|
+
* resolution, so a trailing slash or a linked directory names the same lane.
|
|
32
|
+
* An absent, unreadable, or malformed file or setting names nothing; a
|
|
33
|
+
* relative path, a non-string label, or a blank label skips only that entry.
|
|
34
|
+
*/
|
|
35
|
+
export function readTuiAccountLabels(file = userConfigFilePath()) {
|
|
36
|
+
const config = readJsonFile(file);
|
|
37
|
+
const tui = isRecord(config) ? config.tui : undefined;
|
|
38
|
+
const entries = isRecord(tui) ? tui.accountLabels : undefined;
|
|
39
|
+
const labels = new Map();
|
|
40
|
+
if (isRecord(entries)) {
|
|
41
|
+
for (const [path, label] of Object.entries(entries)) {
|
|
42
|
+
const expanded = expandHome(path);
|
|
43
|
+
if (!isAbsolute(expanded) || typeof label !== "string")
|
|
44
|
+
continue;
|
|
45
|
+
const trimmed = label.trim();
|
|
46
|
+
if (trimmed)
|
|
47
|
+
labels.set(canonicalPath(expanded), trimmed);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return (locatorPath) => labels.size === 0 ? undefined : labels.get(canonicalPath(locatorPath));
|
|
51
|
+
}
|
|
52
|
+
function expandHome(path) {
|
|
53
|
+
return path.startsWith("~/") ? join(homedir(), path.slice(2)) : path;
|
|
54
|
+
}
|
|
55
|
+
function canonicalPath(path) {
|
|
56
|
+
try {
|
|
57
|
+
return realpathSync(path);
|
|
58
|
+
}
|
|
59
|
+
catch {
|
|
60
|
+
return resolve(path);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
26
63
|
function isRecord(value) {
|
|
27
64
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
28
65
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-config.js","sourceRoot":"","sources":["../../../src/lib/user-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"user-config.js","sourceRoot":"","sources":["../../../src/lib/user-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEtD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAChC,cAAkD,OAAO,CAAC,GAAG;IAE7D,MAAM,IAAI,GAAG,WAAW,CAAC,eAAe,IAAI,IAAI,CAAC,OAAO,EAAE,EAAE,SAAS,CAAC,CAAC;IACvE,OAAO,IAAI,CAAC,IAAI,EAAE,WAAW,EAAE,aAAa,CAAC,CAAC;AAChD,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,qBAAqB,CACnC,OAAe,kBAAkB,EAAE;IAEnC,MAAM,MAAM,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IAClC,MAAM,GAAG,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC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AAM,CAAC,GAAG,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC;AAC3E,CAAC;AAED,SAAS,UAAU,CAAC,IAAY;IAC9B,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACvE,CAAC;AAED,SAAS,aAAa,CAAC,IAAY;IACjC,IAAI,CAAC;QACH,OAAO,YAAY,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,CAAC;AACH,CAAC;AAED,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC"}
|
|
@@ -9,12 +9,12 @@ import { sourceNames } from "./common.js";
|
|
|
9
9
|
* beside it. Only when no lane survives does the read fall back to the
|
|
10
10
|
* adapter's single selected account, which never fails the whole report.
|
|
11
11
|
*/
|
|
12
|
-
async function accountsFor(adapter, options) {
|
|
12
|
+
async function accountsFor(adapter, options, operation) {
|
|
13
13
|
if (options.credentialMode === "profile-only")
|
|
14
14
|
return undefined;
|
|
15
15
|
let accounts;
|
|
16
16
|
try {
|
|
17
|
-
accounts = await adapter.discoverAccounts?.();
|
|
17
|
+
accounts = await adapter.discoverAccounts?.(options, operation);
|
|
18
18
|
}
|
|
19
19
|
catch {
|
|
20
20
|
return undefined;
|
|
@@ -32,7 +32,7 @@ async function accountsFor(adapter, options) {
|
|
|
32
32
|
return usable.length > 0 ? usable : undefined;
|
|
33
33
|
}
|
|
34
34
|
export async function fetchAccountQuotas(adapter, options) {
|
|
35
|
-
const accounts = await accountsFor(adapter, options);
|
|
35
|
+
const accounts = await accountsFor(adapter, options, "quota");
|
|
36
36
|
if (!accounts)
|
|
37
37
|
return [await adapter.fetchQuota(options)];
|
|
38
38
|
// Keep each adapter's declaration order, including failed accounts. Readers
|
|
@@ -90,7 +90,7 @@ export function coveredAccountKeys(accountKey, covered) {
|
|
|
90
90
|
return keys;
|
|
91
91
|
}
|
|
92
92
|
export async function inspectAccountAuth(adapter, options) {
|
|
93
|
-
const accounts = await accountsFor(adapter, options);
|
|
93
|
+
const accounts = await accountsFor(adapter, options, "auth");
|
|
94
94
|
if (!accounts)
|
|
95
95
|
return [await adapter.inspectAuth(options)];
|
|
96
96
|
const reports = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accounts.js","sourceRoot":"","sources":["../../../src/providers/accounts.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C;;;;;;;;GAQG;AACH,KAAK,UAAU,WAAW,CACxB,OAAwB,EACxB,OAAwB;
|
|
1
|
+
{"version":3,"file":"accounts.js","sourceRoot":"","sources":["../../../src/providers/accounts.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C;;;;;;;;GAQG;AACH,KAAK,UAAU,WAAW,CACxB,OAAwB,EACxB,OAAwB,EACxB,SAA2B;IAE3B,IAAI,OAAO,CAAC,cAAc,KAAK,cAAc;QAAE,OAAO,SAAS,CAAC;IAChE,IAAI,QAAuC,CAAC;IAC5C,IAAI,CAAC;QACH,QAAQ,GAAG,MAAM,OAAO,CAAC,gBAAgB,EAAE,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IAClE,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC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,CAAC,YAAY,IAAI,EAAE,CAAC;QACnC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;KAC3C,CAAC;IACF,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAC5D,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export declare const CLAUDE_SWAP_SOURCE = "claude-swap";
|
|
2
|
+
export declare const CLAUDE_SWAP_EXECUTABLE_REMEDY = "pipx install claude-swap";
|
|
3
|
+
type ClaudeSwapWindow = {
|
|
4
|
+
pct: number;
|
|
5
|
+
resetsAt?: string;
|
|
6
|
+
};
|
|
7
|
+
type ClaudeSwapUsage = {
|
|
8
|
+
fiveHour?: ClaudeSwapWindow;
|
|
9
|
+
sevenDay?: ClaudeSwapWindow;
|
|
10
|
+
};
|
|
11
|
+
export type ClaudeSwapAccount = {
|
|
12
|
+
accountKey: string;
|
|
13
|
+
email: string;
|
|
14
|
+
organization?: string;
|
|
15
|
+
/** claude-swap's own `usageStatus`; only `ok` carries `usage`. */
|
|
16
|
+
usageStatus: string;
|
|
17
|
+
/** The `usage` object as printed. */
|
|
18
|
+
usage?: ClaudeSwapUsage;
|
|
19
|
+
/** When claude-swap measured `usage`. */
|
|
20
|
+
fetchedAt?: string;
|
|
21
|
+
};
|
|
22
|
+
export declare function claudeSwapEnabled(env?: NodeJS.ProcessEnv): boolean;
|
|
23
|
+
/**
|
|
24
|
+
* The accounts `cswap list --json` (schema 1) reports, in its order. Throws
|
|
25
|
+
* when the command is missing, fails, or prints anything but schema 1 with
|
|
26
|
+
* valid, uniquely keyed account rows.
|
|
27
|
+
*/
|
|
28
|
+
export declare function readClaudeSwapAccounts(): Promise<ClaudeSwapAccount[]>;
|
|
29
|
+
export {};
|