DeepSeek Harness plugin

dsh-opencode-go-usage-garfield

DeepSeek Harness plugin: query OpenCode Go quota (5h rolling / weekly / monthly) from the settings sidebar

Jump to install

Source facts

Repository
GarfieldGCat/dsh-opencode-go-usage
Latest update
Aug 15, 2026
Category
Tools & Capabilities
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/GarfieldGCat/dsh-opencode-go-usage
Plugin: dsh-opencode-go-usage-garfield
Author: GarfieldGCat

Check the source files

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

File explorer4 files
README.mdSource · read only
README language

dsh-opencode-go-usage

A DeepSeek Harness web plugin that shows your OpenCode Go quota next to the context status area in the chat composer.

  • Hover the icon: shows the 5-hour rolling quota remaining and starts an auto refresh (throttled to once every 15 seconds)
  • Click the icon: opens a panel with remaining / used percentages and reset times for 5h, weekly, and monthly windows
  • The icon is visible only when the current session's selected provider is opencode-go
  • Caches the last successful result globally: reopening the panel shows cached data and last query time immediately, then refreshes in the background
  • While a query is in flight, the hover tooltip shows refreshing…; clicking the icon during that time does not start a duplicate request
  • Auto refresh is limited to once per 15 seconds; manual refresh always queries

Demo

After installing and restarting dsh web, open a session using opencode-go. A small icon appears on the right side of the composer. Click it to see:

OpenCode Go quota
5h    left 85%
Wk    left 71%
Mo    left 93%
last query: 14:32:08 · refreshing…

Install

From GitHub (recommended)

dsh plugin --profile web add github:GarfieldGCat/dsh-opencode-go-usage

Then restart:

dsh web

Pin a release tag for stable installs:

dsh plugin --profile web add github:GarfieldGCat/dsh-opencode-go-usage#v0.1.2

Configuration

You can override the plugin config in your web profile's cordis.patch.yml:

- id: opencode-go-usage
  name: dsh-opencode-go-usage
  config:
    baseUrl: https://opencode.ai/zen/go/v1/usage
    timeoutMs: 15000
    providerId: opencode-go
KeyDefaultDescription
baseUrlhttps://opencode.ai/zen/go/v1/usageOpenCode Go usage endpoint
timeoutMs15000Request timeout in milliseconds
providerIdopencode-goProvider id that must match the current model provider

API key resolution

1. DSH credentials seam / environment variable OPENCODE_GO_API_KEY 2. ~/.local/share/opencode/auth.json, entry opencode-go (falls back to opencode) with type: "api"

How it works

Usage endpoint

GET https://opencode.ai/zen/go/v1/usage
Authorization: Bearer <API_KEY>

Example response:

{
  "usage": {
    "rolling": { "status": "ok", "percent": 9,  "resetsAt": "..." },
    "weekly":  { "status": "ok", "percent": 12, "resetsAt": "..." },
    "monthly": { "status": "ok", "percent": 6,  "resetsAt": "..." }
  }
}

The endpoint returns used percentages. The plugin displays remaining = 100 - percent.

Plugin structure

FilePurpose
index.jsHost side: provides the opencodeUsage Remote service, resolves the API key, and queries usage
typert.host.jsTypert host manifest
client.jsWeb side: registers the icon in conversation.input.right and renders the popover
cordis.patch.ymlBundle patch that mounts the host plugin automatically
package.jsonDeclares dsh.bundle + dsh.client

Visibility condition

The web client reads the current session's selected provider via modelDirectories:

  • current provider is opencode-go → show the icon
  • current provider is not opencode-go → hide the icon

Known limitations

  • The usage endpoint is undocumented and may change in the future.
  • The endpoint only returns percentages, not dollar amounts; the plugin shows percentages and reset times.
  • The cache is global: the same OpenCode Go account shares the same quota across sessions.

License

MIT

---

中文说明