Skip to content

feat: add credential balance /status to TUI and ACP - #15

Merged
CCGV2 merged 1 commit into
qiz029:mainfrom
CCGV2:codex/provider-status
Oct 11, 2026
Merged

CCGV2 merged 1 commit into
qiz029:mainfrom
CCGV2:codex/provider-status

Conversation

@CCGV2

@CCGV2 CCGV2 commented Oct 11, 2026

Copy link
Copy Markdown
Collaborator

What changed

Add /status to the TUI and ACP so users can inspect the selected provider, model and current credential's balance without an inference request. ACP advertises the command name and description when creating or resuming a session, before the user sends a prompt.

  • DeepSeek API keys show account balances with currency; account login shows recharge and bonus wallets separately.
  • OpenRouter separates account funds, the current key's spending limit and any reported effective budget. A key without a spending cap is not presented as unlimited account funds.
  • Each invocation resolves the active credential afresh. TUI model changes take effect immediately, including before the next model request. Unsupported endpoints, missing credentials, query failures and timeouts are explicit; credentials and raw provider errors are omitted.
  • Update both READMEs and command/ACP documentation, and verify the new modules and guarded ACP patch ship in the npm bundle.

Why

Configured credentials and an advertised model do not tell users whether they have funds remaining. ACP users also need command discovery as soon as a session is opened, rather than having to know and type /status themselves.

Checks run

  • node scripts/check-docs.mjs
  • npm run lint
  • npm run typecheck and npm run typecheck:strict
  • npm run test:unit — 1,112 passing tests
  • Targeted coverage for plugins/status/* and scripts/patch-acp-status.mjs — 100% lines/functions, 96.60% branches
  • node scripts/verify-acp.mjs — command discovery on new/resumed sessions, execution without inference, model switching, and existing prompt/approval/cancellation/error lifecycle
  • npm run build:packages and node scripts/verify-packages.mjs

The narrower checks above were run; the full npm run check gate was not run locally. Balance responses use fixtures, not live billing credentials. Actual PAX rendering was not manually tested.

Notes

Balance lookup currently supports official DeepSeek API/account routes and OpenRouter. Custom endpoints and other subscription providers report unsupported. The ACP integration is a guarded, idempotent patch against pinned DSH 0.2.0-rc.2; other terminal slash commands remain outside this change. No version bump or npm publication.

Expose /status with the selected provider, model, currency and fresh balance
information for DeepSeek and OpenRouter. Resolve the active credential and
separate account funds from key spending limits, with explicit unsupported,
failure and timeout states.

Advertise the command on ACP session creation and resume, and preserve the
TUI's immediate model selection when querying status. Cover credential
rotation, currencies, failure handling, command discovery and no-inference
execution; verify the guarded runtime patch ships in the npm bundle.

Validation: 1,112 unit tests, targeted 100% line coverage, ACP protocol probe,
both typecheck gates, documentation check, lint, package build and checks.
@CCGV2
CCGV2 merged commit a89ed4b into qiz029:main Oct 11, 2026
3 checks passed
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