dshbase

插件目录 / Developer / dsh-go-usage

dsh-go-usage

未验证 shsr07

✓ 持续维护

查看 GitHub ↗ ← 返回插件目录

1Stars
0Forks
0未关闭 issue
语言
2026-08-17最近推送
跨平台平台

功能简介

OpenCode GO subscription usage widget for DeepSeek Harness: rolling / weekly / monthly usage with reset countdowns, collapsible to a right-edge tab.—— DeepSeek Harness 的 OpenCode GO 套餐用量角标插件:右下角卡片显示滚动 / 每周 / 每月用量与重置倒计时,可收起为右边缘竖条。

我们的评价
未验证 — 尚未实测

OpenCode GO subscription usage widget for DeepSeek Harness: rolling / weekly / monthly usage with reset countdowns, collapsible to a right-edge tab.—— DeepSeek Harness 的 OpenCode GO 套餐用量角标插件:右下角卡片显示滚动 / 每周 / 每月用量与重置倒计时,可收起为右边缘竖条。 尚未验证——请自行安装测试。

「未验证」表示我们的自动化 CI 尚未安装过该插件。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。

你是插件作者? 想拿到「已验证」标签——提交你自己的验证证据(截图、日志或短视频),我们审核通过后即改为「已验证」。

提交验证证据 ↗

README

dsh-go-usage

English | 中文

dsh-go-usage is a DeepSeek Harness (DSH) web plugin that shows your OpenCode GO subscription usage as a bottom-right corner widget: rolling / weekly / monthly usage percentages with reset countdowns, collapsible to a right-edge vertical tab.

dsh-go-usageDeepSeek Harness (DSH) 的 Web 插件:在页面右下角以角标组件显示你的 OpenCode GO 套餐用量——滚动 / 每周 / 每月用量百分比与重置倒计时,可收起为右边缘竖条标签。

Features

  • Three usage buckets — rolling / weekly / monthly, matching the OpenCode console page.
  • Progress bars — color shifts to amber at 80% and red at 100% (rate-limited).
  • Live countdowns — "Resets in X days X hours / X hours X minutes" ticking every 15 seconds.
  • Auto refresh — re-fetches every 60 seconds; the ↻ button refreshes manually.
  • Collapsible — the » button collapses the card into a slim right-edge tab; click the tab to expand.
  • Theme-aware — follows the DSH theme: pure white in light mode, pure black in dark mode.
  • Bilingual — copy follows the DSH locale setting: Chinese (滚动用量 / 重置于 X 天 X 小时) or English (Rolling usage / Resets in X days X hours), switching live.

Requirements

  • Windows only (usage data is fetched via powershell.exe).
  • Node.js >= 24, pnpm.

Installation

Prerequisites

  • DeepSeek Harness (dsh) installed — npm install -g @deepseek-ai/dsh
  • An OpenCode account with an active GO subscription
  • The opencode-go API key present in the local opencode auth file (set up by the OpenCode CLI):
    %USERPROFILE%\.local\share\opencode\auth.json

From npm

dsh plugin --profile web add dsh-go-usage

From source / GitHub

git clone https://github.com/shsr07/dsh-go-usage.git
cd dsh-go-usage
pnpm install
pnpm build
dsh plugin --profile web add link:<absolute-path-to-this-checkout>

link: points at the local checkout — after editing, re-run pnpm build and restart the web service. You can also install straight from a git host: dsh plugin --profile web add github:shsr07/dsh-go-usage#<sha> (the package ships a prepare script that builds from source; allow the build when pnpm asks).

After installation

Restart the web service (dsh web), then look at the bottom-right corner of the page.

Configuration

All settings are optional; the defaults work out of the box. Add a config: block to the plugin row in your profile's cordis.patch.yml to override:

- id: go-usage
  name: 'dsh-go-usage'
  config:
    authJsonPath: 'C:\Users\me\.local\share\opencode\auth.json'
    apiUrl: 'https://opencode.ai/zen/go/v1/usage'
    powershellExe: 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe'
    timeoutSec: 15
Key Type Default Meaning
authJsonPath string $USERPROFILE/.local/share/opencode/auth.json (or $HOME) Absolute path of the opencode auth.json containing the opencode-go API key.
apiUrl string https://opencode.ai/zen/go/v1/usage The OpenCode GO usage API endpoint.
powershellExe string C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe The PowerShell executable the fetch runs.
timeoutSec number 15 API request timeout in seconds (1–120).

How it works

  • The host half registers a fenced JSON route /go-usage/api/usage on the DSH web server. Each request runs one powershell.exe invocation: it reads the opencode-go API key from the local opencode auth.json, calls https://opencode.ai/zen/go/v1/usage, and returns the parsed buckets. TLS 1.2 is enabled explicitly because Windows PowerShell 5.1 defaults to older TLS.
  • The browser half registers the corner widget into the frame overlay (shell.overlay) and fetches the same-origin route every 60 seconds.
  • The route is protected by the same trust fence as the DSH /api gateway (loopback Host header or the connection row's trustedHosts), so a cross-site page cannot reach it.

Privacy

  • The API key stays on your machine: it is read from your local auth.json by the host process and never leaves it.
  • Only the three usage percentages and reset timestamps are displayed; nothing is sent anywhere except the request to opencode.ai itself.

License

MIT

安装

🧩 让 Agent 自动装(推荐)

装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:

dsh plugin add dshbase-catalog

然后对 agent 说「帮我装 dsh-go-usage」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包

该插件是 GitHub 源码(未发 npm)——直接从仓库装:

Web profile:

dsh plugin --profile web add github:shsr07/dsh-go-usage

Headless(CLI)profile:

dsh plugin --profile headless add github:shsr07/dsh-go-usage

实测报告

尚未 L3 验证——若已跑过,见下方失败备注。

状态:pending · 最近测试 2026-08-26 · 标记 webonly
备注:验证: web-only;待 L4 web CDP;L4 web CDP runtime-fail on dsh 0.1.0-rc.8. 浏览全部待验证失败 →
安全:尚未扫描——我们的每日静态扫描将很快覆盖它。

分享徽章

Developer 里更多

浏览全部 7795 个插件 →