Skip to content

feat(capacity): add Claude subscription usage - #251

Merged
codeaholicguy merged 1 commit into
mainfrom
feature-claude-capacity
Sep 27, 2026
Merged

codeaholicguy merged 1 commit into
mainfrom
feature-claude-capacity

Conversation

@codeaholicguy

Copy link
Copy Markdown
Owner

Summary

  • add Claude subscription usage to the capacity command using the existing capacity contracts
  • resolve OAuth credentials from the environment, the active Claude profile, or the default-profile macOS Keychain item
  • map session, weekly, model-scoped, and optional extra-usage capacity without inventing token totals
  • preserve sanitized provider errors and fixture-based coverage for auth, rate limits, and malformed or partial payloads

Validation

  • npm test --workspace=@ai-devkit/agent-manager -- src/tests/capacity/claude.test.ts (27 tests)
  • npm test --workspace=ai-devkit -- src/tests/commands/capacity/command.test.ts (13 tests)
  • npm run build --workspace=@ai-devkit/agent-manager
  • npm run build --workspace=ai-devkit
  • pre-commit secret scan, repository lint, and full repository tests (2,307 tests)

Risks

  • the OAuth usage endpoint and fixed Claude Code User-Agent may evolve upstream
  • the first macOS Keychain fallback can trigger an operating-system access prompt
  • no live account request or real Keychain access was performed during validation

@codeaholicguy
codeaholicguy force-pushed the feature-claude-capacity branch from 87d8f7e to 9d5a1a7 Compare September 27, 2026 09:56
@codeaholicguy
codeaholicguy merged commit 8ccfca4 into main Sep 27, 2026
7 checks passed
@codeaholicguy
codeaholicguy deleted the feature-claude-capacity branch September 27, 2026 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant