rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:blkot/dsh-usage-hub
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
Aggregated subscription usage for the DeepSeek Harness composer dock: the DeepSeek API balance and the OpenCode Go allowance, side by side, in one panel.
[● DeepSeek ¥110.00] [● Go 7%]
Click either reading for the panel: DeepSeek balance with its topped-up/granted split, the OpenCode Go rolling/weekly/monthly bars with reset times, and a Refresh button.
git clone https://github.com/blkot/dsh-usage-hub.git
then install the directory with Plugins → Add plugin, or point plugin_manager at it. Installation links the checkout into the profile, so editing the files here takes effect without reinstalling (reload the page for client changes).
DeepSeek — GET https://api.deepseek.com/user/balance with the credential named by deepseek.apiKeyEnv (default DEEPSEEK_API_KEY), resolved through the harness credential store first and the process environment second. DeepSeek publishes no official per-key spend endpoint; the private platform dashboard endpoints need a signed-in web session, so the balance is what this plugin can honestly show.
OpenCode Go — two possible sources, chosen by opencode.mode:
api (the auto default) — GET https://opencode.ai/zen/go/v1/usage with the Go API key named by opencode.apiKeyEnv (default OPENCODE_GO_API_KEY), which is the same key the opencode-go model provider uses. If that reference is unset, the key is also read from the record the pi-ai adapter writes on provider sign-in (credentialRecord, default llm-pi-ai/opencode-go). Nothing else needs to be installed, so this works on any machine that can already talk to the provider. It returns the rolling/weekly/monthly percentages and their reset instants.server — GET /api/experimental/usage/limits on a local OpenCode server: the plugin attaches to a server you configure (opencode.baseUrl + opencode.password), or starts the CLI on a free loopback port, reads its printed password, asks once, and stops it again. This also reports the Console workspace name, the usage-page link and Console budgets.auto uses the API key when it resolves and falls back to a local server otherwise; api never starts a process; server never uses the key.
- insert:
- id: usage-hub
name: 'dsh-usage-hub'
config:
cacheTtlMs: 300000 # snapshot cache lifetime (5 minutes)
deepseek:
enabled: true
apiKeyEnv: DEEPSEEK_API_KEY
baseUrl: 'https://api.deepseek.com'
opencode:
enabled: true
mode: auto # auto | api | server
apiKeyEnv: OPENCODE_GO_API_KEY
credentialRecord: 'llm-pi-ai/opencode-go' # second source for the key
apiBaseUrl: 'https://opencode.ai/zen/go/v1'
cliPath: '' # server mode: empty: auto-detect the desktop install
baseUrl: '' # server mode: fill with password to attach to a running server
password: ''
startTimeoutMs: 25000
enabled: false on a provider removes its reading from the dock; the panel still names it as turned off.
| Layer | Frequency | Notes |
|---|---|---|
| Browser → plugin route | every 5 minutes | POLL_MS in client.js, plus one read at page load |
| Plugin → upstream | at most once per cacheTtlMs |
one DeepSeek call + one OpenCode call per cache miss |
| Panel Refresh | immediately | bypasses the cache; both providers re-read |
server mode every OpenCode read starts a short-lived opencode serve (a couple of seconds) and stops it; in api mode it is a single lightweight GET.opencode-go API key is not in the credential store and no local CLI was found. Configure the provider key in Settings → Models (it is stored as OPENCODE_GO_API_KEY), then refresh. The API-key path needs no OpenCode app at all.deepseek.apiKeyEnv is missing.api mode, or the local server's Console view in server mode.MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek、deepseek-harness。