feat(cli): add provider capacity command - #147
Open
codeaholicguy wants to merge 18 commits into
Open
Conversation
codeaholicguy
force-pushed
the
feature-capacity-cmd
branch
from
August 20, 2026 06:03
2ab4ec0 to
a69dc18
Compare
codeaholicguy
force-pushed
the
feature-capacity-cmd
branch
from
August 22, 2026 14:55
2558c88 to
ffb417c
Compare
The schemaVersion field in the JSON output is the machine-checked contract marker; help text and README now describe the flag's behavior without leaking the contract version. Lifecycle docs updated to match; the design doc's rejected-alternative table keeps its wording because it records the decision itself.
Use '-j, --json' with 'Output as JSON' like every agent subcommand; drop remaining schema mentions from README and lifecycle docs. The schemaVersion field stays in the JSON output itself.
Replace the hand-rolled table with ui.table (widths, truncation, maxWidth, bold headers, separator) and chalk column styles matching agent list: cyan provider, green/yellow/gray availability, dim metadata. JSON output goes through console.log and warnings through ui.warning like agent list.
Help text and README no longer hard-code Codex or the model-quota rationale; the supported provider list is enforced in code.
Drop schemaVersion, the providers array, status/configured/installed/agentType/plan/checkedAt/source, aliases, the resetCredits wrapper, the embedded usage snapshot, warnings, and error codes: none had a current consumer and all predate the codex-only cut. The report is now one flat object: provider, generatedAt, authenticated, available, native windows (id, label, durationMinutes, usedPercent, resetsAt), and creditsRemaining. remainingPercent and alias derivation are left to consumers; configured-detection is removed with the field it fed. Verified against a live Codex probe; fields can return with a second provider.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ai-devkit capacityto support Codex only--max-age,--refresh, and all cache reads/writes so every invocation probes fresh@ai-devkit/agent-managerCodex probe
CODEX_HOME/auth.jsonor~/.codex/auth.jsonwhoamiplus usage, then fresh OAuth usage, then the hardened CLI fallbackcodex -s read-only -a untrusted app-serverand call onlyaccount/rateLimits/readandaccount/readPackage boundary
packages/agent-manager/src/capacity/owns the capacity model and fresh Codex report APIgetCodexCapacityReportand public capacity types from its root entry pointpackages/cli/src/commands/capacity.tsvalidates only omitted provider orcodex, calls agent-manager, and renders the resultValidation
After rebasing onto current
origin/main:npm run build— passed for all 6 projectsnpm test --workspace=@ai-devkit/agent-manager— 28 files, 571 tests passednpm test --workspace=ai-devkit— 85 files, 1,033 tests passedRisks