rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:fuqiancheng/dsh-commandcode-quota
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
A Command Code balance and quota panel for DeepSeek Harness (DSH).
The plugin renders a compact status row directly underneath the DSH composer:
belowThreshold and exceeded fields; hover any light for an explanationIt is single-account by design. There is no account switcher, and your API key never reaches the browser.
dsh web or the desktop app)dsh plugin add dsh-commandcode-quota
DSH expands the bundled cordis.patch.yml into your profile, so no manual patch editing is needed.
dsh plugin add file:/path/to/dsh-commandcode-quota
The Electron desktop profile is managed by the application and does not run the dsh plugin add reconciliation, so register it yourself.
Link the package into the shared resolution pool:
New-Item -ItemType Junction `
-Path "$env:USERPROFILE\.dsh\profiles\node_modules\dsh-commandcode-quota" `
-Target "C:\path\to\dsh-commandcode-quota"
Then add this to ~/.dsh/profiles/<profile>/cordis.patch.yml:
- insert:
- id: dsh-commandcode-quota
name: 'dsh-commandcode-quota'
config:
apiKeyEnv: COMMANDCODE_API_KEY
The junction name must be exactly the package name, otherwise the host cannot resolve the import.
After installing or changing the plugin, reload the plugin tree (the plugin page's refresh action, or a client restart).
| Key | Default | Description |
|---|---|---|
apiKeyEnv |
COMMANDCODE_API_KEY |
Credential entry resolved through DSH's credentials service |
fallbackEnv |
— | Optional second entry, used only when the first one is missing |
baseURL |
https://api.commandcode.ai |
Command Code API origin |
timeoutMs |
30000 |
Per-request timeout in milliseconds |
Credentials live in ~/.dsh/.credentials.yaml, or in DSH Settings → Credentials. Never commit them.
The package has two halves:
src/index.js) resolves the key through the DSH credentials service and registers a read-only HTTP endpoint that fans out to the Command Code API, then aggregates the responses into a single payload. The key is read on every request and never serialized to the client.src/client.js) registers a status row into the composer dock slot, polls the host endpoint, and renders it with DSH theme tokens so light and dark themes both work.Polling is tiered: balance every 3 minutes (cheap), usage and subscriptions every 30 minutes (expensive). Polling pauses while the page is hidden and refreshes fully when it comes back.
Data comes from four Command Code endpoints, each called with Authorization: Bearer <key>:
| Endpoint | Used for |
|---|---|
GET /alpha/billing/credits |
Balance and the 5-hour / weekly limits |
GET /alpha/usage/summary |
Spend, tokens and the period start (for daily spend) |
GET /alpha/billing/subscriptions |
Subscription status and period boundaries |
GET /alpha/whoami |
Account information |
The monthly window is composed from the usage total plus the remaining credits, with the reset time taken from the subscription period.
$DSH_HOME/dsh-commandcode-quota-cache.json, so it survives a restart. It holds quota fields only — no account details, and never the key itself.npm test # host and client unit tests; no network, no DSH process
node --check src/index.js # host half syntax
node --check src/client.js # client half syntax
The tests stub the credentials service, the web server, fetch and React, so they run offline and never touch a live DSH instance.
MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。