DeepSeek Harness Plugin Hub

Publish and manage complete Harness Profiles. Discover Plugins for your next setup.

Explore

PluginsPresetsDocsNews

Community

Publish a pluginContactReport an issue

Resources

Plugin Hub on GitHubDeepSeek HarnessSystem statusPrivacy notice
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

Independent and unofficial. Not affiliated with, authorized by, or endorsed by DeepSeek.

Opencode Usage — DSH Plugin for DeepSeek Harness
DeepSeek Harness Plugin Hub
ProfilesPluginsCategoriesNewsDocsSign inManage Profiles
ProfilesPluginsCategoriesNewsDocsSign in
← Plugins

@wingsky-1/dsh-opencode-usage

Opencode Usage

OpenCode Go plan usage overlay: persistent three-window usage percentages in the top-right corner, expanding into three independent mini charts for rolling/weekly/monthly (each window has an independently adaptive axis, a 100% quota reference line, reset marker line, and background sampling to prese

The plugin will be installed here. Keep web if you are unsure.

npx -y @deepseek-ai/dsh plugin --profile web add @wingsky-1/dsh-opencode-usage@0.1.9
READMECompatibilityVersions

Description

OpenCode Go plan usage overlay: persistent three-window usage percentages in the top-right corner, expanding into three independent mini charts for rolling/weekly/monthly (each window has an independently adaptive axis, a 100% quota reference line, reset marker line, and background sampling to preserve historical continuity; official /v1/usage endpoint, authoritative data, zero local computation)

Compatibility and provenance

Opencode Usage is published as @wingsky-1/dsh-opencode-usage and currently resolves to version 0.1.9. The Hub verifies its manifest and preserves the exact installation source for reproducible installs.

DSH compatibility
*
Runtime surfaces
web
Release source
npm
Registry updated
9/20/2026

Versions

0.1.9stable
8/20/2026
0.1.8stable
8/20/2026
0.1.7stable
8/18/2026
Show 5 more versionsCollapse versions
0.1.6stable
8/18/2026
0.1.5stable
8/18/2026
0.1.4stable
8/18/2026
0.1.3stable
8/17/2026
0.1.1stable
8/16/2026

Related plugins

Loading related plugins…

Latest
0.1.9
DSH
*
HMR
Process restart
Tree shaking
Safe tree shaking not declared
Unpacked size
77.4 kB
Files
16
Surface
web
License
MIT
Source
npm
GitHub
★ 19
Weekly downloads
43
Last push
9/20/2026
View source ↗
README badge

Click the badge to copy Markdown for your README.

Do you maintain this Plugin?Claim benefit · Priority security scan

Verify the GitHub repository declared in package.json to manage this listing. After you claim it, Hub will prioritize a security scan of the current version and publish the result when it passes.

Claim this Plugin →
Report an issue

Related plugins

More verified plugins in models-usage.

Usage@linxin666/dsh-usageUsage statistics plugin for the dsh web GUI: per-provider balance and coding-plan quota detection plus a live token usage ledger, with a dedicated pet bubble for the current providerWhale Widgetdsh-whale-widgetDeepSeek balance whale widget in the bottom-right corner of the DSH Web interface: balance/today’s usage/peak-off-peak pricing, customizable bubble click sequence (text/balance/today/peak-off-peak/image/random phrases and parallel weighted selection), per-line styles and fonts, floating quick editinUsage Stats@ychris12138/dsh-usage-statsToken usage heatmap, provider balances, and subscription quotas for the dsh web GUICodex Connectdsh-codex-connectChatGPT OAuth and Codex models for DeepSeek Harness.

README

@wingsky-1/dsh-opencode-usage

DSH(DeepSeek Harness)Web GUI 插件:OpenCode Go 套餐用量悬浮框 + 三窗口迷你图。

聊天界面右上角常驻悬浮胶囊,实时显示 OpenCode Go 套餐三窗口消耗百分比 (颜色随消耗程度变化:>80% 黄、>95% 红),点击展开详情面板:

  • 三张迷你图卡片(rolling 5 小时滚动 / weekly / monthly),各窗口独立自适应 y 轴与 x 轴时间刻度、100% 配额参考虚线、重置标记线(按 resetsAt 反推)
  • 后台采样保历史连续(浏览器关闭也持续),数据来自官方 /v1/usage 接口 (权威数据,零本地计算)

安装

前提:已安装 DeepSeek Harness 且 dsh web 可正常启动(未全局安装 dsh 见下方「未全局安装 dsh」)。

安装插件(add)

dsh plugin --profile web add @wingsky-1/dsh-opencode-usage

卸载插件(remove)

dsh plugin --profile web remove @wingsky-1/dsh-opencode-usage

更新插件(update)

dsh plugin --profile web update @wingsky-1/dsh-opencode-usage

安装 / 卸载 / 更新后都需重启一次 dsh web(bundle 层只在启动时组合)生效。

指定版本号(@version)

registry 尚未同步到最新、或最新版在你的环境有问题时,可在包名后追加 @版本号:

dsh plugin --profile web add @wingsky-1/dsh-opencode-usage@0.1.8

未全局安装 dsh

若本机没有全局 dsh 命令,用 npx 临时拉起(底层调用 pnpm,仍需本机装好 pnpm 与 Node.js):

npx @deepseek-ai/dsh plugin --profile web add @wingsky-1/dsh-opencode-usage
npx @deepseek-ai/dsh plugin --profile web remove @wingsky-1/dsh-opencode-usage
npx @deepseek-ai/dsh plugin --profile web update @wingsky-1/dsh-opencode-usage

数据源

插件直接调用 OpenCode Go 官方用量接口:

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

响应带 30 秒 TTL 缓存(可配置),避免高频请求。

API Key 解析顺序

  1. 插件配置 config.apiKey(显式指定,可选)
  2. 环境变量 OPENCODE_GO_API_KEY
  3. DSH 凭据文件 <DSH_HOME>/.credentials.yaml(DSH_HOME 优先,默认 ~/.dsh) 中的 OPENCODE_GO_API_KEY
  4. OpenCode 自身 ~/.local/share/opencode/auth.json 的 opencode-go (回退 opencode)条目

配置

键默认值含义
enabledtrue插件开关
baseUrlhttps://opencode.ai/zen/go/v1/usage用量接口地址(可配置,即 token 转发目标)
timeoutMs15000请求超时(毫秒)
cacheTtlMs30000用量缓存 TTL(毫秒)
limits{rolling:12, weekly:30, monthly:60}展示用限额(美元/窗口)
apiKey无显式 API Key(缺省走凭据解析链)
maxAgeDays14历史采样保留天数(1–365)
sampleIntervalMs300000宿主后台采样间隔(30s–1h)
persistFile<DSH_HOME>/dsh-opencode-usage/history.json历史采样落盘路径

路由(全部 loopback 围栏)

路由说明
GET /api/dsh-opencode-usage/stats用量统计(TTL 缓存)
GET /api/dsh-opencode-usage/history[?days=N]历史采样序列
GET /api/dsh-opencode-usage/health健康检查

安全与边界

  • token 不落盘、不落日志、不进浏览器端:API Key 仅存于宿主进程内存, 浏览器只经 /stats 拿百分比数值(src/index.ts 凭据解析链 + stats 路由 均不回传 token)
  • baseUrl 可配置 = 你的 token 会发送到该地址:仅配置可信的用量接口; 默认官方 https://opencode.ai/zen/go/v1/usage
  • 历史采样落盘 0600 权限(tmp + rename 原子写),目录默认 <DSH_HOME>/dsh-opencode-usage/
  • 所有路由 loopback 围栏(非回环 403 / 方法错 405)
  • 官方接口请求频率受控:GUI 轮询 ≤1 次/60 秒 + 后台采样 ≤1 次/5 分钟 (各另有 30s TTL 缓存抑制重复请求),不会限流

验证

# 健康检查(回环)
curl -s http://127.0.0.1:3080/api/dsh-opencode-usage/health

# 源码在 src/,改后必须 build
pnpm --filter @wingsky-1/dsh-opencode-usage build
node test/smoke.mjs

License

MIT