DeepSeek Harness plugin

dsh-opencode-usage-zzh799

OpenCode Zen + Go usage readout for the dsh web GUI: a composer button showing concentric rings (5h / weekly / monthly) that opens a usage panel.

Jump to install

Source facts

Repository
zzh799/dsh-opencode-usage
Latest update
Aug 18, 2026
Category
UI Enhancements
GitHub stars
0
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/zzh799/dsh-opencode-usage
Plugin: dsh-opencode-usage-zzh799
Author: zzh799

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer3 files
README.mdSource · read only

dsh-opencode-usage

A dsh web GUI plugin that shows your OpenCode Zen balance and Go usage windows right in the composer tool row: a concentric-ring button (rolling 5h / weekly / monthly) that opens a usage panel.

  • Host half (src/index.tslib/index.js): resolves config from env

vars and $DSH_HOME/ocgo-usage.json, fetches the opencode.ai SSR pages, and serves same-origin JSON endpoints with caching + failure cooldown.

  • Browser half (src/client.tsxlib/client.js): renders the

concentric-ring composer button and usage panel, and the config editor (cookie values are only ever shown masked — the full cookie never leaves the host).

![button](./assets/CleanShot%202026-08-18%20at%2008.30.12@2x.png) ![panel](./assets/CleanShot%202026-08-18%20at%2008.30.04@2x.png)

Features

  • Rolling 5-hour / weekly / monthly usage rings on a single composer button
  • Usage panel with window details and a manual refresh
  • Built-in config editor in the panel (masked cookie tails only)
  • Smart cookie normalization: paste the raw auth token, a full header, or

anything in between

  • Server-side cache (default 5 min) + 60 s failure cooldown so the poller

never spams opencode.ai

  • Optional peak-clock display (showPeakClock)

Install

# From a local checkout (or a tarball), add into the dsh web profile:
dsh plugin --profile web add /path/to/dsh-opencode-usage

cordis.patch.yml inserts the plugin as opencode-usage; it requires the webServer service.

Configuration

Priority: env vars > config file ($DSH_HOME/ocgo-usage.json) > defaults.

Env varConfig file keyDefaultDescription
OPENCODE_GO_COOKIEcookieOpenCode Go session cookie (auto-normalized)
OPENCODE_GO_WORKSPACE_IDworkspaceIDOpenCode workspace id
OPENCODE_GO_BASE_URLbaseUrlhttps://opencode.aiProvider base URL
OPENCODE_GO_CACHE_TTLcacheTTL300Cache TTL in seconds, clamped to [60, 3600]
OPENCODE_GO_TIMEOUT_MStimeoutMs15000Fetch timeout in ms
showPeakClockfalseShow the peak-clock readout

The cookie is never logged. You can also edit cookie / workspaceID / showPeakClock from the panel's config editor; a successful write invalidates the cache so the next poll uses the fresh values immediately.

Config file is written with chmod 600.

API

The browser half talks to the host over plain same-origin JSON:

MethodPathDescription
GET/api/opencode-usageCached usage view
GET/api/opencode-usage/refreshForce a fresh provider query
GET/api/opencode-usage/configMasked config view
POST/api/opencode-usage/configWrite cookie / workspace / showPeakClock

Development

npm install      # dev deps (esbuild) — prepack build runs automatically
npm run build    # emit lib/client.js + lib/index.js
npm run watch    # hot-swap rebuilds into a running `dsh web` host

The build mirrors the dsh plugin loader contract: the browser bundle rides in the closure-factory module format with react/platform modules externalized, and CSS is inlined idempotently (data-plugin-css).

License

[MIT](./LICENSE)