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

dsh-opencode-go-usage

Opencode Go Usage

DSH (DeepSeek Harness) 插件:侧边栏中的 OpenCode GO 计划配额小组件、同源使用量代理,以及 /opencode-go 聊天命令

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

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

兼容性与来源证明

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

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

版本

1.3.1stable
2026/9/18
1.3.0stable
2026/9/10
1.2.3stable
2026/8/31
查看其余 5 个版本收起版本
1.2.2stable
2026/8/14
1.2.1stable
2026/8/14
1.1.1stable
2026/8/14
1.1.0stable
2026/8/14
1.0.1stable
2026/8/14

相关插件

正在加载相关插件…

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

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

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

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

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

README

dsh-opencode-go-usage

English | 中文

⚡ Get an OpenCode GO plan: buycodingplan.com

A DSH (DeepSeek Harness) plugin that watches your OpenCode GO plan quota — the $10/month subscription that gives you usage limits on open-source models (rolling 5-hour, weekly, and monthly windows).

Compatible with DSH 0.1.1-rc.2 and 0.1.2-alpha.2.

Features

  • Sidebar widget — a live widget pinned at the bottom of the DSH web sidebar (sidebar.footer.action slot) showing three usage bars: rolling (5h), weekly, and monthly, each with a relative countdown to its window reset. When the sidebar is collapsed it shrinks to a compact percentage badge.
  • /opencode-go chat command — prints the same numbers as text inside any conversation.
  • Same-origin proxy — the host registers GET /opencode-go/usage, forwards to the official GO gateway with your API key. The key never reaches the browser and no CORS is involved.
  • x-opencode-session fix — at runtime, injects the real harness session id into OpenCode GO gateway chat requests (the gateway 400s requests without it). No DSH file patching; survives upgrades.

The x-opencode-session fix

The GO gateway rejects chat-completion requests that lack the x-opencode-session header (HTTP 400 MissingSessionID), and DSH's llm-pi-ai adapter never sends it. Instead of patching DSH's installed files (which every DSH upgrade overwrites), this plugin:

  • wraps globalThis.fetch once, and
  • listens to DSH's official llm/stream waterfall event to capture the per-call harness session id (options.sessionId, filled by dsh-agent-loop).

The gateway base is resolved from the called provider's own settings (llm-pi-ai.providers.<route>.baseURL, falling back to this plugin's baseUrl) — no host names are hard-coded — so only requests to that call's gateway receive the header, with the real per-conversation session id.

  • Toggle: injectSessionHeader in the settings namespace (default true).
  • Observability: GET /opencode-go/usage returns sessionHeader: { active, count, diag }; diag reports what the runtime saw, e.g. streamSeen (handled llm/stream calls), lastStream (provider, session-id presence, base and its source), requests/injected/missed (wire fetches that carried the context, got the header, or fell through on a URL mismatch).

How it works

The plugin is a dual-half DSH package:

halffilerole
host (Node)lib/index.jsregisters the /opencode-go/usage web route (ctx.webServer) and the /opencode-go command (ctx.commands); resolves the key through DSH credentials; caches the upstream call (30 s)
browserlib/client.jsa hand-authored window.__ModuleLoader__.load({ id, factory }) bundle that waits for and registers into the sidebar.footer.action list slot, then polls the same-origin route every 60 s

package.json declares "dsh": { "client": { "platform": "web" } }, so DSH's client-modules node half scans it into the browser boot graph (window.__DSH_BOOT__) and serves the bundle at /plugins/dsh-opencode-go-usage/client.js.

How the sidebar widget loads under the official install

dsh plugin add installs the package into the profile, which satisfies the host half (routes, command, settings). DSH's client-modules scanner can only resolve browser bundles from its own installation directory, so a profile-installed third-party package would normally lose its browser half — this plugin avoids that by self-hosting its bundle: the host registers the /dsh-opencode-go-usage/client.js route and injects its boot-graph row through the official webServer.tapIndex API. The sidebar widget therefore works from any installation location.

Requirements

  • DSH installed and the web profile booted at least once (~/.dsh/profiles/web exists)
  • Node.js ≥ 18 (for fetch)
  • An OpenCode GO subscription and its API key

Install (official DSH flow)

Requirements: DSH installed with the web profile booted once, Node.js ≥ 18, an OpenCode GO subscription.

# 1. install the package into your web profile (pnpm; enable via corepack if needed)
dsh plugin --profile web add dsh-opencode-go-usage

# 2. store your GO API key as a DSH credential
#    (create the key at https://opencode.ai/auth)
#    → add to ~/.dsh/.credentials.yaml:
#      OPENCODE_GO_API_KEY: sk-...

# 3. restart `dsh web` and hard-refresh the browser page

That's it for the quota widget and /opencode-go command. The CLI reconciles the package's dsh.bundle.patch into the profile's bundle stack automatically — no manual cordis.patch.yml editing, no symlinks.

Not published on npm yet? Install from a checkout instead:

dsh plugin --profile web add /path/to/dsh-opencode-go-usage

New to DSH plugins? Follow the user guide (Chinese, step-by-step).

Usage

  • Widget: read it. Collapsed sidebar → percentage badge; expanded → three progress bars with reset countdowns.
  • Command: /opencode-go in any conversation prints the three windows as text.

Config reference

keydefaultdescription
keydefaultdescription
---------
apiKeyEnvOPENCODE_GO_API_KEYcredential reference / env var name for the API key
baseUrlhttps://opencode.ai/zen/gogateway base URL
cacheMs30000host-side upstream cache TTL

The usage API

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

{
  "usage": {
    "rolling": { "status": "ok", "percent": 0,  "resetsAt": "2026-08-14T07:51:13Z" },
    "weekly":  { "status": "ok", "percent": 1,  "resetsAt": "2026-08-17T00:00:00Z" },
    "monthly": { "status": "ok", "percent": 22, "resetsAt": "2026-08-21T13:05:13Z" }
  }
}

Developing / modifying the widget

The browser half is a hand-authored factory bundle (window.__ModuleLoader__.load), because out-of-tree client plugins have no public build pipeline yet. It may only require() modules from the shell module table (react, react/jsx-runtime, and the registered client packages). Edit lib/client.js directly, then restart dsh web and refresh the page — the bundle revision hash changes and the shell loads the new file.

Host changes (lib/index.js) need only a dsh web restart.

Troubleshooting

  • Widget missing after restart → hard-refresh the page (Cmd/Ctrl+Shift+R); the boot graph is injected per page load.
  • /opencode-go/usage returns 502 with "no API key" → configure the key in ~/.dsh/.credentials.yaml.
  • Gateway 401/403 → the key is invalid or the subscription lapsed; check the credential.
  • Widget shows an error string → hover the collapsed badge or read the error line in the expanded widget.

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 模型。