rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:LCspax/dsh-ocgo-ring
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
给 DeepSeek Harness 的 OpenCode Go 套餐余量环:常驻在输入框下方、上下文用量环的右侧(圆环 + 百分比),点击展开三个窗口的余量小浮窗,并可直接点选圆环显示哪一个。


100% − 已用)。滚动 / 每周 / 每月,每行显示余量百分比、4px 进度条和重置倒计时。localStorage(键 ocgo-ring.metric),刷新/重启后保留。--dsw-alias-state-warn-primary)。useDismissOnOutsidePointer,面板圆角、阴影、字号一致;浮窗位置按圆环的 getBoundingClientRect() 自行测量(DSH 0.2.2 起 useAnchoredPosition 已从 @deepseek-ai/dsh-client-ui-primitives 移除)。要求:DSH 0.2.1-rc.2 及以上(Web / Desktop),已在 0.2.2-rc.3 上验证,以及 OpenCode Go 订阅。
克隆仓库:
git clone https://github.com/LCspax/dsh-ocgo-ring.git
把 OpenCode Go 的 API key 写进 DSH 凭据存储(~/.dsh/.credentials.yaml):
OPENCODE_GO_API_KEY: sk-...
安装插件(仓库根目录就是插件包):
dsh plugin --profile <profile> add <path-to-repo>。首次安装完成后重启一次 DSH(Host 路由需要重新加载),再刷新页面。
当前为固定配置(改 index.js 顶部常量即可):
| 项 | 值 |
|---|---|
| 凭据引用 | OPENCODE_GO_API_KEY |
| 上游接口 | https://opencode.ai/zen/go/v1/usage |
| Host 缓存 | 60 秒 |
| 前端轮询 | 60 秒 |
| 同源路由 | GET /ocgo-ring/usage |
DSH 浏览器
└─ client.js 注册到 conversation.composer.dock(order 1 → 上下文用量环右侧)
│ fetch('/ocgo-ring/usage') 每 60s
▼
DSH Host
└─ index.js 读 ctx.credentials('OPENCODE_GO_API_KEY')
│ GET https://opencode.ai/zen/go/v1/usage(缓存 60s)
▼
OpenCode Go
client.js 是手写的 window.__ModuleLoader__.load bundle(不依赖构建工具),改完 DSH 客户端会自动热重载(约 1 秒)。.
├── index.js # Host 半:同源代理路由
├── client.js # 浏览器半:圆环 + 浮窗
├── cordis.patch.yml # Loader 补丁
├── package.json
├── locale/
│ ├── zh.json # 插件标题 / 描述
│ └── en.json
├── icon.svg
├── docs/
│ ├── promo.svg # 宣传图矢量源文件(1600×900,黑白)
│ ├── promo.png # 宣传图导出(3200×1800,README 使用)
│ ├── promo-square.svg # 小红书方图源文件(1024×1024)
│ ├── promo-square.png # 小红书方图(1024×1024)
│ └── preview.png # 真实界面裁图
node --check index.js
node --check client.js
改 client.js 保存即可看到 DSH 页面热更新;改 index.js 需要重启 DSH。
conversation.composer.dock、@deepseek-ai/dsh-client-ui-primitives 的 Tooltip / useDismissOnOutsidePointer 两个公开导出,以及 ctx.locale.register 与 ctx.slots.register 的 locale 选项。remainingOf() 及行内百分比即可。MIT © 2026 LCspax
A quota ring for the OpenCode Go plan, sitting right of DeepSeek Harness's own context meter under the composer: ring + percentage of remaining quota. Click the ring to open a small popover listing the rolling (5h), weekly, and monthly windows; click a row to choose which window the ring shows (persisted in localStorage). The host proxies GET /ocgo-ring/usage with OPENCODE_GO_API_KEY, caches for 60 s, and never exposes the key to the browser.
Requires DSH >= 0.2.1-rc.2. Clone, add OPENCODE_GO_API_KEY to ~/.dsh/.credentials.yaml, install the repo directory as a plugin, restart DSH once.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。