DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

Opencode Go Usage — DeepSeek Harness 插件(DSH Plugin)
← Plugins

@xiaweiliang060035/dsh-opencode-go-usage

Opencode Go Usage

DSH (DeepSeek Harness) 网页插件——悬浮小组件,实时显示每个 API key 的 OpenCode Go 订阅用量(滚动、每周、每月)。

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add @xiaweiliang060035/dsh-opencode-go-usage@0.3.0
README兼容性版本
floating widget

兼容性与来源证明

Opencode Go Usage 以 @xiaweiliang060035/dsh-opencode-go-usage 发布,当前版本为 0.3.0。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
web
发布来源
npm
Registry 更新时间
2026/9/20

版本

0.3.0stable
2026/8/15

相关插件

正在加载相关插件…

最新版
0.3.0
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
148.2 kB
文件数
8
Surface
web
许可证
MIT
发布源
npm
GitHub
★ 3
周下载
103
安全扫描
✓ v0.3.0 扫描通过
最近提交
2026/8/15
查看源码 ↗项目主页 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录

README

dsh-opencode-go-usage

简体中文 · English

A DeepSeek Harness web-GUI plugin that shows your OpenCode Go subscription usage in real time — a floating widget that tracks rolling / weekly / monthly quota for every API key in your pool, with color-coded progress bars and reset countdowns.

Features

  • Floating widget — a compact button pinned to the right edge of the page. Its badge shows the worst window across all keys at a glance; the color (green / orange / pulsing red) tells you whether any key is close to its quota limit.
  • Expandable panel — click the button to open a panel with one card per key (the currently active key is marked with a ★), each showing rolling / weekly / monthly usage as progress bars, percentages, and time-until-reset. Rate-limited windows are flagged with ⚠.
  • Real-time — the Host polls the official usage endpoint every 60 seconds (configurable); the panel refreshes automatically and has a manual refresh button.
  • Auto key-pool discovery — reads your key pool from $DSH_HOME/.credentials.yaml (any OPENCODE_GO_KEY_<name> entries), so there is no hardcoded key count or name. Falls back to the single current key (OPENCODE_GO_API_KEY) when no pool exists.
  • i18n — Chinese / English, auto-selected from your browser language.
  • Theme-aware — uses DSH theme tokens; works in both light and dark themes.

Screenshot

floating widget

How it works

Host half (plain Node ESM):

  1. Discovers key-pool names — from config.keyNames if provided, otherwise by scanning .credentials.yaml for OPENCODE_GO_KEY_* entries.
  2. Resolves each key value through the credentials service (environment → credentials file → .env layering).
  3. Calls the official usage endpoint with Authorization: Bearer <key>:
GET https://opencode.ai/zen/go/v1/usage
Authorization: Bearer <API_KEY>

Response example:

{
  "usage": {
    "rolling": { "status": "ok", "percent": 9,  "resetsAt": "2026-08-14T07:20:04.810Z" },
    "weekly":  { "status": "ok", "percent": 12, "resetsAt": "2026-08-17T00:00:00.810Z" },
    "monthly": { "status": "ok", "percent": 6,  "resetsAt": "2026-09-09T00:41:03.810Z" }
  }
}

The usage endpoint is not yet part of OpenCode's public documentation; it was discovered and verified via farion1231/cc-switch#6433. Parsing is defensive.

Client half (browser bundle) registers in the shell.overlay slot and polls the Host's web-server route /plugins/dsh-opencode-go-usage/snapshot. Keys never leave the Host.

Requirements

  • Node.js + a DeepSeek Harness web profile (the default dsh web profile mounts webServer, credentials, and timer, which this plugin needs).

Install

Option A — local package via file: dependency (recommended)

  1. Copy the package directory anywhere on disk, e.g. D:\tools\dsh-opencode-go-usage.
  2. In your profile's package.json (e.g. $DSH_HOME/profiles/web/package.json), add to dependencies:
"@xiaweiliang060035/dsh-opencode-go-usage": "file:D:/tools/dsh-opencode-go-usage"
  1. Add the package to the profile's bundle list (dsh.profile.bundles):
"dsh": {
  "profile": {
    "bundles": [ "...existing...", "dsh-opencode-go-usage" ]
  }
}
  1. Install and restart:
cd $DSH_HOME/profiles/web
pnpm install
# restart dsh web

The bundle carries its own cordis.patch.yml (declared via dsh.bundle.patch), so the plugin row is composed automatically — no manual patch edit needed.

Option B — npm package

The package is published on npm as @xiaweiliang060035/dsh-opencode-go-usage:

cd $DSH_HOME/profiles/web
pnpm add @xiaweiliang060035/dsh-opencode-go-usage

Then add "@xiaweiliang060035/dsh-opencode-go-usage" to the profile's dsh.profile.bundles list and restart dsh web.

The plugin registers both a Host half (fetch + webServer route) and a Client half (browser bundle). A plain copy into plugins/ with a relative patch entry loads the Host half only — the floating widget needs the bundle mechanism above.

Configuration

Tunables go in the plugin row's config (override it in your profile's cordis.patch.yml):

- id: opencode-go-usage
  config:
    keyNames: [go1, go2]      # optional: explicit key-pool names
    baseUrl: https://opencode.ai/zen/go/v1/usage   # optional
    refreshMs: 60000          # optional: poll interval (ms)
    timeoutMs: 15000          # optional: fetch timeout (ms)
    dshHome: ~                # optional: override the DSH home directory
    hideCordisPanel: true     # optional: hide the built-in "Cordis plugins" sidebar entry
KeyDefaultDescription
keyNamesauto-discoveredExplicit key-pool names (OPENCODE_GO_KEY_<name> in .credentials.yaml)
baseUrlhttps://opencode.ai/zen/go/v1/usageThe usage endpoint
refreshMs60000Host poll interval in milliseconds
timeoutMs15000Fetch timeout in milliseconds
dshHomeresolveDshHome()DSH home directory containing .credentials.yaml
hideCordisPanelfalseHide the built-in "Cordis plugins" sidebar entry (dynamic-plugin admin panel)

Key pool format

Keys are read from $DSH_HOME/.credentials.yaml (the standard DSH credentials file). A pool looks like:

OPENCODE_GO_API_KEY: sk-opencode-…      # the currently active key
OPENCODE_GO_KEY_ACTIVE: go2             # which pool entry is active
OPENCODE_GO_KEY_go1: sk-opencode-…
OPENCODE_GO_KEY_go2: sk-opencode-…
OPENCODE_GO_KEY_go3: sk-opencode-…

Any OPENCODE_GO_KEY_<name> entry is discovered automatically — the number and names of keys are arbitrary. If you have only one key (no pool), just set OPENCODE_GO_API_KEY; the widget shows that single key.

Troubleshooting

SymptomLikely cause / fix
Widget shows !Snapshot fetch failed — confirm dsh web is running and /plugins/dsh-opencode-go-usage/snapshot responds
Card shows Invalid key (401)That key is invalid or expired
Card shows Network errorHost cannot reach opencode.ai (proxy / offline / timeout)
Panel says "no keys configured".credentials.yaml has neither OPENCODE_GO_KEY_* nor OPENCODE_GO_API_KEY
⚠ rate-limitedThat window's quota is exhausted server-side

License

MIT

相关插件

继续浏览 models-usage 分类下经过校验的插件。

Usage@linxin666/dsh-usagedsh Web GUI 的使用统计插件:检测各提供商余额和编码计划配额,并提供实时令牌使用记录,以及当前提供商的专属宠物气泡Whale Widgetdsh-whale-widgetDSH Web 界面右下角的 DeepSeek 余额小鲸鱼挂件:余额/今日已用/峰谷定价、自定义泡泡点击序列(文本/余额/今日/峰谷/图片/随机语句与并列加权选择)、逐行样式与字体、悬浮快捷编辑、音效与每轮消耗、自定义角色/动图/音效、吸附与翻转自定义Usage Stats@ychris12138/dsh-usage-statsdsh Web GUI 的令牌使用热力图、提供商余额和订阅配额Codex Connectdsh-codex-connect用于 DeepSeek Harness 的 ChatGPT OAuth 和 Codex 模型。