v587d/dsh-opencode-go-usage
一个DeepSeek Harness(dsh)捆绑包,用于在Web GUI的编辑器停靠栏中显示OpenCode Go订阅使用情况——与内置对话统计行位于同一位置。
Project Overview项目介绍
This is a native bundle built exclusively for DeepSeek Harness (DSH), designed to show OpenCode Go subscription usage stats directly in DSH’s web UI. It adds a status chip to the dock area above the input box, displaying 5-hour rolling, weekly, and monthly usage percentage along with time remaining until the usage window resets. The chip changes color based on usage thresholds: yellow when usage hits 80%, and red when it goes over 90% or hits a rate limit. It also displays the timestamp of the last successful data fetch to help users check data freshness.
To install the bundle, you need DSH version 0.1.0-rc.6 or newer running with the web profile, and pnpm available on your system PATH. The recommended installation method is installing directly from GitHub via the command dsh plugin --profile web add github:v587d/dsh-opencode-go-usage. The repository ships pre-built artifacts in the lib/ directory, so no extra build step or build permissions are required after installation. It can also be installed from npm or a local tarball. After installation, you need to restart dsh web and refresh the browser page for the chip to appear.
Configuration can be done in three ways, the simplest being the in-ui Set panel accessed by clicking the status chip. You can also set credentials via environment variables or a local configuration file stored in $DSH_HOME/ocgo-usage.json. The plugin follows strict security practices: the OpenCode Go auth cookie is never exposed to the browser and only stored on the host side. It is released under the permissive MIT license, and the auth cookie expires after one year, so you just need to update it after it expires. Optional configuration options let you adjust cache TTL and API base URL.
这是一款专为 DeepSeek Harness (DSH) 开发的原生 bundle 插件,功能是在 DSH Web 界面输入框上方的 dock 区域(和内置令牌统计同位置)显示 OpenCode Go 的订阅用量。它支持展示 5 小时滚动、每周、每月三个窗口的用量百分比和重置倒计时,会根据阈值自动变色,在用量耗尽触发限流前提醒用户,是 pi-ocgo-usage Pi 插件的 Web 对应版本。
需要安装在 0.1.0-rc.6 或更新版本的 Web 配置档 DSH 上,系统要求 PATH 环境变量中提前配置好 pnpm 工具。安装方式推荐从 GitHub 直接安装,执行对应命令即可完成,也支持从 npm 或本地压缩包安装,无需额外权限。由于仓库已经提交了预构建产物,整个安装过程不需要额外执行构建步骤,流程十分简便。
配置支持三种方式,最简便的是界面内点击芯片展开后通过 Set 面板直接输入 workspace ID 和 cookie,也支持通过环境变量或配置文件填写。插件遵循安全规范,cookie 仅保存在 host 侧,浏览器不会获取到完整 cookie。项目采用 MIT 许可证开源,cookie 有效期为一年,过期后更新即可继续使用。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-opencode-go-usage(v587d/dsh-opencode-go-usage)
仓库:https://github.com/v587d/dsh-opencode-go-usage
本站详情页:https://www.yhbd.top/plugins/v587d-dsh-opencode-go-usage/
本站登记:类型 bundle · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 10 · 最近提交 2026-08-25 · 主语言 TypeScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- 10 stars - an early-stage project星标 10,属于早期项目
DSH walks through these 9 checksDSH 会逐条核对这 9 项
Compatibility兼容性
- DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
- External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
- Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册
Security安全性
- Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
- Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
- curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
- Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
- Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
- Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式
Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add dsh-ocgo-usage
把 v587d/dsh-opencode-go-usage 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-opencode-go-usage
English | 中文

一个 DeepSeek Harness (dsh) bundle,在 Web 界面的输入框上方 dock(与内置 token 统计同位置)显示 OpenCode Go 订阅用量。
它是 pi-ocgo-usage(Pi 插件)的 Web 对应物:三个用量窗口(5h 滚动 / 每周 / 每月)的百分比与重置倒计时,按阈值变色,让你在窗口耗尽、请求被限流之前就发现。
OpenCode Go: 5h 0% (1h 23m) · wk 65% (2d 20h) · mo 83% (6d 21h) · upd 20:15
特性
- 三个窗口 —— 5h 滚动 / 每周 / 每月 的百分比 + 重置倒计时
- 颜色阈值 —— 正常 → 黄色警告(≥80%)→ 红色错误(≥90% 或已限流)
- 数据新鲜度 ——
upd HH:MM显示最近一次成功抓取时间 - 轻量轮询 —— 每 10s 轮询(切回标签页立即刷新);host 端 300s 缓存(TTL 可配)+ 60s 失败冷却,不会频繁打扰 opencode.ai
- Provider 感知 —— 仅当会话当前模型走
opencode-goprovider 时显示;每次轮询读取内存中的实时模型选择(session.models,毫秒级),切到 DeepSeek 官方等其它 provider 后一个轮询周期内自动隐藏,切回自动恢复(与 pi-ocgo-usage 行为一致) - 点击展开 —— 详情面板显示每个窗口的重置倒计时,左下角
Set可配置凭据,右侧refresh upd HH:MM手动刷新 - 内置凭据编辑器 —— 无需碰终端:
Set面板直接修改 workspace id 与 cookie(输入框以••••+ 末尾 4 位显示,点击外部 / Esc / 保存确认写入) - 优雅降级 —— 配置缺失显示
<err:noconfig>,HTTP 失败显示<err:httpXXX>;出错时点击 chip 直接进入 Set 面板 - Cookie 只在 host 侧 —— 浏览器只访问同源
/api/ocgo-usageJSON 端点,cookie 永不进入页面
⚠️ 需要 OpenCode Go 会话 cookie。 该 cookie 是完整用户会话(不是 API key),可访问你 OpenCode 账户的全部内容。请像对待密码一样对待它——见 配置。
环境要求
- DeepSeek Harness
0.1.0-rc.6或更新(web profile) PATH上有 pnpm(dsh plugin需要)
安装
这是一个标准的 dsh bundle:package.json 声明了 dsh.bundle,通过 dsh plugin --profile web add <spec> 安装(pnpm 转发器),自动加入 profile 的 dsh.profile.bundles。仓库内置预构建的 lib/ 产物,安装无需任何构建步骤或构建权限——遵循官方 publish 指南。
从 GitHub 安装(推荐)
dsh plugin --profile web add github:v587d/dsh-opencode-go-usage
因为 lib/ 已提交到仓库,pnpm 直接安装构建好的包,不会要求构建脚本授权。
从 npm 安装(发布后)
dsh plugin --profile web add dsh-ocgo-usage
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
Renzic-Stone/DSH-EasyRewrite
MichengAI/dsh-codex-ui
HakureiMonika/dsh-sandbox-escalation-fix
PerryLink/dsh-claude-move
Chang-Tong/dsh-import-agents
Player-MINEPIG/dsh-tavern