DeepSeek Harness 插件

dsh-opencode-go-usage-xueayi

OpenCode Go plan usage monitor for DeepSeek Harness: real-time 5h-rolling / weekly / monthly quota in a floating web dock(英文原文)

跳到安装方式

来源信息

GitHub 仓库
xueayi/dsh-opencode-go-usage
最近更新
2026年8月19日
分类
工具与能力
GitHub stars
4
载体类型
plugin
目录证据
上游声明已找到 dsh.bundle
证据路径
package.json#dsh.bundle
核对版本
0.1.0-rc.8
上游核对日期
2026-08-20

该证据由上游目录提供。本站没有安装、运行或安全审核这个插件。

安装

默认先复制一段 Prompt,让 Agent 读 GitHub 仓库和源码;需要自己装时再切到命令。

复制这段 Prompt,发给 DSH、Codex 或其他 Agent,让它先读 GitHub 仓库和源码。

请先不要安装或执行任何命令。阅读这个插件的 GitHub 仓库、README 和关键源码,然后用清楚、直接的方式回答以下问题,帮助我判断它是否适合我的需求:

1. 这个插件是什么,解决什么问题;
2. 适合哪些用户和典型使用场景;
3. 安装后如何使用,并给出一个最小使用示例;
4. 有哪些已知限制,以及隐私、安全、兼容性或维护风险;
5. 给出“推荐 / 有条件推荐 / 不推荐”的明确建议和理由。

请区分仓库明确说明、根据源码推断和未知信息。证据不足时请明确说明,不要猜测或照抄 README。

GitHub:https://github.com/xueayi/dsh-opencode-go-usage
插件名:dsh-opencode-go-usage-xueayi
作者:xueayi

检查来源文件

安装前先看这个插件目录里的 README 和其他文件。

文件资源管理器3 个文件
README.md来源说明 · 只读预览

dsh-opencode-go-usage

OpenCode Go plan usage monitor for DeepSeek Harness: a floating dock in the web GUI showing the 5h-rolling / weekly / monthly quota windows with live reset countdowns.

Data comes from the official quota API (GET https://opencode.ai/zen/go/v1/usage, Bearer API key; no workspace id, no cookie).

Install

# From npm (the Web GUI runs on the `web` profile):
dsh plugin --profile web add @xueayi/dsh-opencode-go-usage
# Or from a local checkout:
dsh plugin --profile web add /path/to/dsh-opencode-go-usage
# Upgrade to the latest version:
dsh plugin --profile web update @xueayi/dsh-opencode-go-usage

Restart the profile afterwards (dsh web for the browser UI).

Configure

Recommended: pick the official-channel OpenCode Go provider in Web Settings → Models and enter the API key there; nothing else is needed.

The API key is resolved per refresh through ctx.credentials under the apiKeyEnv reference (default OPENCODE_GO_API_KEY) — it can also be stored manually in ~/.dsh/.credentials.yaml or an environment variable:

- insert:
    - id: opencode-go-usage
      name: '@xueayi/dsh-opencode-go-usage'
      config:
        apiKeyEnv: OPENCODE_GO_API_KEY
        refreshMs: 60000
FieldTypeDefaultMeaning
apiKeyEnvstringOPENCODE_GO_API_KEYcredential reference
apiKeystringdirect key fallback (discouraged)
endpointstringhttps://opencode.ai/zen/go/v1/usagequota endpoint
refreshMsnumber60000auto-refresh interval
timeoutMsnumber10000per-request timeout

Usage dock

<img src="img/example.png" width="340" alt="Usage dock screenshot" />

A glassy floating dock at the bottom-right corner (the web shell owns no bottom-right slot; mounted through a body portal):

  • Badge (collapsed): three mini double rings show all three quota

windows at a glance — the outer ring is the remaining quota share (a full ring when nothing is used yet, shrinking as quota is spent; the arc is threshold-colored by spent share: green <60% / orange ≥60% / red ≥85%, so a nearly-empty ring reads red), the inner ring is the window's remaining time until its next reset (brand blue, shrinking live with the window period); beside them an exact 5h-rolling countdown (↻3h25m) and a live health dot.

  • Panel (click to expand): one row per window (5h Rolling / Weekly /

Monthly) with a double usage ring (remaining quota outer + remaining time inner), the used/remaining percent (preceded by a tone-colored dot: green/amber/red for the spent share, a blue dot before the reset countdown restating the inner ring color), and a live reset countdown; the footer holds the update timestamp, a "Console ↗" link to the OpenCode Go console, and a manual refresh button.

  • Unconfigured/error states render inline with configuration guidance; a

failed fetch never blanks the dock.

Display stability

Data and health are decoupled: when a refresh fails (timeout, API error), the dock keeps showing the last successful sample — the status dot turns yellow and a quiet "refresh failed, showing previous data" note appears in the panel footer. The display is never blanked; error / unconfigured states appear only before the first successful fetch.

The status dot and the manual refresh action reuse the shared dsh-client-ui-primitives (StateDot / Button) so the dock's affordances stay visually consistent with the rest of DSH. The dock also honors prefers-reduced-motion (a reduced-motion environment skips the pop and ring tweens and closes the panel without the exit animation), and the floating badge / panel are offset by the viewport's safe-area insets so they never sit under a notch or home indicator.

Model Experience

Request surface and condition

The plugin exposes no model-facing surface: the model never sees quota values, no prompt text or tool schema is added.

#### Token effect

None — no model request, no injected tokens.

#### KV Cache effect

None — no request tokens added or replaced.

Known Limitations and Deferred Work

  • Poll latency — the collapsed badge polls every 60s, the open panel

every 10s; quota changes appear within at most one poll cycle.

  • Data freshness — after repeated failed refreshes the dock keeps showing

the last successful sample, which grows stale until a refresh succeeds.

  • Single account — one API key per profile; multi-account dashboards are

out of scope.