dsh-opencode-go
Manifest validOpenCode Go usage panel for the DeepSeek Harness Web UI — allowance meters and subscription renewal date.
dsh-opencode-go
OpenCode Go subscription panel for the DeepSeek Harness Web UI: a sidebar entry (below Plugins and Automation tasks) and a screen with usage statistics for your OpenCode Go plan.
What it shows
- Monthly allowance — the main card: percent used, percent left, the subscription renewal date, and a countdown.
- 5-hour window — the rolling five-hour window (capped at 20% of the monthly allowance).
- Weekly limit — 50% of the monthly allowance, resetting on Monday 00:00 UTC.
- Monthly allowance card — resets when a new paid period starts.
- Bar colour: green below 70%, amber from 70% to 89%, red from 90%.
- A Refresh button, automatic refresh every minute and on tab focus, and an "Open console" link.
Data comes from GET https://opencode.ai/inference/go/v1/usage with the
OPENCODE_GO_API_KEY credential — the same key the opencode-go provider uses.
Why there are no token counts
The subscription API reports only status, percent and resetsAt for the
three windows. It exposes no token counts, no dollar amounts and no per-model
breakdown. The screen therefore shows percentages and dates, and the footer
says so explicitly. A local DSH token counter could be added separately, but
that measures session history, not the subscription.
Requirements
- DeepSeek Harness
0.2.2-rc.1(the manifest declaresengines.dsh). - An OpenCode Go subscription and an API key stored as
OPENCODE_GO_API_KEY.
Install
dsh plugin --profile web add /path/to/dsh-opencode-go
The bundle is appended to dsh.profile.bundles and linked into the profile's
node_modules. Refresh the page afterwards: HMR recomposes the profile and the
client bundle is served from /plugins/??dsh-opencode-go/client.js. If the
entry does not appear, restart dsh web.
From GitHub (the package ships plain JavaScript, so there is no build step and
pnpm needs no allowBuilds approval):
dsh plugin --profile web add github:Andrewich/dsh-opencode-go
Configuration
The row accepts this configuration, in the bundle layer or the profile's
cordis.patch.yml:
| Field | Default | Meaning |
|---|---|---|
apiKeyEnv | OPENCODE_GO_API_KEY | credential reference name |
endpoint | https://opencode.ai/inference/go/v1/usage | subscription endpoint |
refreshSeconds | 45 | Host cache lifetime (the browser polls once a minute) |
timeoutMs | 10000 | timeout for one upstream request |
Override example:
- id: opencode-go
config:
refreshSeconds: 120
Security
- The key is read only on the Host through
ctx.credentials.resolve(); it never reaches the browser. The page receives percentages and dates only. GET /api/opencode-go/usageis registered on the connection carrier, answers only an authenticated owner (signed cookie), setscache-control: no-store, and never logs the key or theAuthorizationheader.- The plugin runs in-process with the Host's privileges. Install only code you trust.
Development
Without installing into a profile, on a separate port:
dsh web --patch ./dev.patch.yml --port 3081 --no-open
The relative path in dev.patch.yml resolves against the patch file, so the
checkout works from any directory. The loader finds the client half from the
nearest package.json that declares dsh.client. Do not use the overlay while
the bundle is installed in a profile: the opencode-go row would be declared
twice.
Tests:
npm test
# or
node --test test/*.test.mjs
Uninstall
dsh plugin --profile web remove dsh-opencode-go
Troubleshooting
- Entry visible, screen empty — check
Settings → ProvidersthatOPENCODE_GO_API_KEYis set; the panel shows "API key required" otherwise. - Key rejected — an
unauthorizedbanner; rotate the key in the OpenCode Console and in DSH. - No network — the last known values stay on screen with an
unreachablebanner. - No entry in the sidebar — the profile recomposition did not happen;
restart
dsh web.
Layout
| Path | Purpose |
|---|---|
lib/index.js | Host half: usage route, credential, upstream call, cache |
lib/client.js | Browser half: sidebar row and the screen |
cordis.patch.yml | Bundle layer used when installed into a profile |
dev.patch.yml | Overlay for running from a checkout |
test/ | Host route and client bundle tests |
License
GPL-3.0-only. See LICENSE.
Comments
Loading…
Similar plugins
by lccc233
OpenCode Go plan quota rings for the DeepSeek Harness web GUI
★ 0
MIT
JavaScript
Oct 2, 2026
dsh plugin --profile web add dsh-opencode-go-usageby 0x-0cd
DeepSeek Harness (DSH) Web plugin: OpenCode Go subscription panel — usage quota, remaining quota, subscription expiry and renewal state, all from one API-key endpoint (the public /zen/go/v1/usage API has no money and no expiry date).
★ 0
MIT
JavaScript
Sep 30, 2026
dsh plugin --profile web add dsh-opencode-go-statusby JAYcodr
OpenCode status, Go-plan allowance and live probe meter for the DeepSeek Harness Web UI
★ 0
MIT
JavaScript
Nov 9, 2026
dsh plugin --profile web add dsh-opencodeby moondrop12138
OpenCode Go subscription usage page for the DSH Web UI: official 5h / weekly / monthly used-percent windows, reset countdowns and a local sampling trail.
★ 0
JavaScript
Oct 21, 2026
dsh plugin --profile web add dsh-opencode-go-usageby 5777-wq
OpenCode Go subscription usage (rolling 5h / weekly / monthly) in the DSH Web UI: sidebar window bars, trend forecast, adaptive polling, and an agent tool.
★ 0
MIT
JavaScript
Nov 15, 2026
dsh plugin --profile web add dsh-opencode-go-quotaby xiaweiliang060035
DSH (DeepSeek Harness) web plugin — floating widget showing real-time OpenCode Go subscription usage (rolling / weekly / monthly) for every API key. 悬浮实时展示 opencode-go 各 key 用量。
★ 3
↓ 39/wk
MIT
JavaScript
Aug 15, 2026
dsh plugin --profile web add @xiaweiliang060035/dsh-opencode-go-usage