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.

Plugin Opencode Usage — DSH Plugin for DeepSeek Harness
← Plugins

dsh-plugin-opencode-usage

Plugin Opencode Usage

OpenCode Go usage percentage floating panel: Displays rolling, weekly, and monthly usage percentages and reset times in the lower-left corner of the DeepSeek Harness Web session window.

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

npx -y @deepseek-ai/dsh plugin --profile web add dsh-plugin-opencode-usage@0.1.1
READMECompatibilityVersions
OpenCode Go 订阅用量面板

Compatibility and provenance

Plugin Opencode Usage is published as dsh-plugin-opencode-usage and currently resolves to version 0.1.1. 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/13/2026

Versions

0.1.1stable
9/13/2026
0.1.0stable
8/22/2026

Related plugins

Loading related plugins…

Latest
0.1.1
DSH
*
HMR
Process restart
Tree shaking
Safe tree shaking not declared
Unpacked size
87.2 kB
Files
7
Surface
web
License
MIT
Source
npm
GitHub
★ 0
Weekly downloads
0
Last push
9/13/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
DeepSeek Harness Plugin Hub
ProfilesPluginsCategoriesNewsDocsSign inManage Profiles
ProfilesPluginsCategoriesNewsDocsSign in

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 the current session provider's today usage on the sidebar entryWhale 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

dsh-plugin-opencode-usage

OpenCode Go 订阅用量悬浮面板:在 DeepSeek Harness Web GUI 会话窗口左下角显示订阅额度使用情况。

功能

  • 在会话窗口左下角注册独立悬浮入口,不占用侧边栏入口,也不放入输入框,避免与其他插件冲突
  • 点击弹出悬浮面板,展示 OpenCode Go 订阅的三个窗口:滚动用量、每周用量、每月用量
  • 每张卡片显示:已用百分比 / 剩余百分比 / 重置时间
  • 不展示具体美元金额,避免不同模型额度金额不同造成误导
  • 面板以入口按钮为锚点:左边缘对齐按钮,底部在按钮上方 12px,随会话窗口/侧边栏变化自动调整
  • 打开期间每 60s 自动刷新;支持 Esc 与点击面板外部关闭
  • API key 只在 Harness host 进程内解析,不会下发浏览器

截图

OpenCode Go 订阅用量面板

工作原理

DSH Web 浏览器
   │  1. 点击会话窗口左下角按钮
   ▼
GET /plugins/opencode-usage/stats
   │
   ▼
DSH Host 插件
   │  2. ctx.credentials.resolve("OPENCODE_GO_API_KEY")
   │  3. GET https://opencode.ai/zen/go/v1/usage
   │     Authorization: Bearer <api-key>
   │  4. 透出 percent / remainingPercent / resetsAt
   ▼
返回 JSON,由 React 面板渲染

官方接口只返回 percent 与 resetsAt:

{
  "usage": {
    "rolling": { "status": "ok", "percent": 30, "resetsAt": "..." },
    "weekly":  { "status": "ok", "percent": 19, "resetsAt": "..." },
    "monthly": { "status": "ok", "percent": 9,  "resetsAt": "..." }
  }
}

插件直接展示官方 API 返回的百分比,不做金额换算。

目录结构

dsh-plugin-opencode-usage/
├── cordis.patch.yml   # bundle patch: 把插件插入 profile host 组合
├── lib/
│   ├── index.js       # Host 半: 订阅额度 API 查询 + HTTP 路由
│   └── client.js      # Client 半: 会话窗口左下角悬浮按钮 + 面板
├── LICENSE
├── package.json       # dsh.bundle / dsh.client 元数据
└── README.md

额度口径(背景说明,不用于显示)

不同模型的额度金额不同(例如 V4 Pro 月度 $15、V4 Flash 月度 $30, 整体月上限 $60),因此插件只展示官方 API 返回的百分比,不做金额换算。

窗口官方接口字段说明
滚动用量usage.rolling5 小时滚动窗口百分比
每周用量usage.weekly每周窗口百分比
每月用量usage.monthly月度窗口百分比

官方 API 只返回 percent 与 resetsAt;插件同时给出 remainingPercent = 100 - percent。

安装

从 npm 安装(推荐):

dsh plugin --profile web add dsh-plugin-opencode-usage

也可以从 GitHub 仓库安装(无构建步骤,lib/ 即源码,可直接引用):

dsh plugin --profile web add github:jiekesu967/dsh-plugin-opencode-usage

或者从本地目录安装:

dsh plugin --profile web add ./dsh-plugin-opencode-usage

安装后 dsh plugin 会自动写入 web profile 的 dependencies,并把 dsh-plugin-opencode-usage 追加到 dsh.profile.bundles。重启 dsh web 并刷新页面后,会话窗口左下角会出现独立的 “OpenCode Go 用量” 悬浮入口。

配置

在 profile 的 cordis.patch.yml 覆盖 opencode-usage 条目:

- id: opencode-usage
  config:
    # Harness credentials 文件中保存 API key 的变量名
    credentialRef: OPENCODE_GO_API_KEY

    # OpenCode Go 订阅接口
    apiBaseUrl: https://opencode.ai/zen/go/v1

    # host 成功结果缓存时间
    cacheMs: 30000

凭据

在 ~/.dsh/.credentials.yaml 中确认存在:

OPENCODE_GO_API_KEY: sk-...

也可以通过 DSH Web 的 Models / Credentials 设置页写入。

入口与面板定位规则

入口注册在 shell.overlay,绝对定位于 AppFrame 的会话中心列左下角:

  1. 按钮:会话中心列左侧内边距 12px、底部 16px
  2. 面板:左边缘与按钮对齐,底部位于按钮上方 12px
  3. 面板宽度最大 392px,右侧/顶部超出视口时自动回退
  4. ResizeObserver 监听会话中心列,侧边栏展开/收起、详情面板开关、窗口缩放时实时跟随

兼容性

插件声明了它需要哪一版 Harness,市场与 dsh-market 据此判断能否安装:

"engines": {
  "node": "^22.19.0 || >=24.0.0",
  "dsh": ">=0.1.5-rc.1 <0.2.0-0"        // 支持 DSH 0.1.5 这一条发布线
},
"peerDependencies": {
  "@deepseek-ai/cordis": "^4.0.2",
  "@deepseek-ai/dsh-client-locale":       ">=0.1.5-rc.1 <0.2.0-0",
  "@deepseek-ai/dsh-client-ui-renderer":  ">=0.1.5-rc.1 <0.2.0-0",
  "@deepseek-ai/dsh-credentials":         ">=0.1.5-rc.1 <0.2.0-0",
  "@deepseek-ai/dsh-host-webserver":      ">=0.1.5-rc.1 <0.2.0-0"
}

已验证覆盖 0.1.5-rc.2(当前最新)与 0.1.5-rc.1。

关于范围写法:>=0.0.1-rc <2 这类「看起来很宽」的范围会静默排除所有预发布构建。 node-semver 只有当范围内某个比较符与该版本的 major.minor.patch 元组完全一致、 且自身带预发布标签时才放行预发布版本,而 >=0.0.1-rc <2 在 0.1.5 这个元组上没有 这样的比较符。上界写成 <0.2.0-0 而不是 <0.2.0,同样是为了让 0.2.0-rc.1 这类版本被正确拒绝而不是意外放行。

未声明任何 Harness 依赖时,市场会显示 unknown(未声明) 而不是「兼容」—— 这也是本插件 0.1.0 的状态,0.1.1 起已显式声明。

已知限制

  • 官方 usage 接口只返回百分比,不返回绝对金额;插件也只展示百分比
  • 不同模型额度金额不同,因此不提供金额换算,避免误导
  • 仅适用于 web profile;headless 下不注册路由
  • GET /plugins/opencode-usage/stats 不做鉴权,它继承 webserver 的绑定地址。 默认 profile 绑定 127.0.0.1,只有本机可访问;若你把 profile 的 webServer.config.host 改成 0.0.0.0,同一局域网内的任何人都能读到用量百分比。 API key 本身不会离开 host 进程(只作为请求头上游使用),所以泄露的是用量信息而非凭据。 介意的话请保持回环绑定,或在反向代理层限制该路径。

致谢 / Credits

  • DeepSeek Harness — 本插件运行所基于的 Harness 框架
  • jiekesu967 — 插件开发者

License

MIT