Bundle
dsh-ocgo-quota
OpenCode Go usage floating widget for the DeepSeek Harness Web UI: a bottom-right overlay showing rolling-5h / weekly / monthly quota, backed by the official opencode.ai usage endpoint.
- Source
- fuzz1og
- License
- MIT
- Updated
- Updated 7 days ago
Readme
# dsh-ocgo-quota DeepSeek Harness Web UI 插件:**OpenCode Go 用量悬浮窗**——右下角浮动小部件,实时显示 OpenCode Go 的滚动 5 小时 / 周 / 月额度用量,数据来自官方 `https://opencode.ai/zen/go/v1/usage` 端点(45s 缓存,并发请求共享同一 in-flight fetch)。 ## 安装 ```bash dsh plugin --profile web add github:fuzz1og/dsh-ocgo-quota ``` 该包声明了 `dsh.bundle.patch`,`dsh plugin add` 会自动把它加入 profile 的 `dsh.profile.bundles`,无需手改任何 patch 文件。 **重启 DSH 后生效。** > 旧版(无 `dsh.bundle.patch`)需要手动在 `cordis.patch.yml` 插入挂载行: > ```yaml > - insert: > - id: ocgo-quota > name: 'dsh-ocgo-quota' > ``` > 新安装无需此步骤。 ## 配置 插件通过凭据缝(credentials seam)解析 `OPENCODE_GO_API_KEY`,找不到时回退读取 `$DSH_HOME/.credentials.yaml` 中的同名键。 ## 工作原理 | 环节 | 说明 | | --- | --- | | 宿主半区 | `GET /ocgo-quota/usage` —— 解析 API key → 调用官方 usage 端点 → 返回 JSON;无任何失败路径会挂掉,均返回 JSON | | 客户端半区 | `conversation.composer.dock` 槽位注册右下角悬浮窗,轮询宿主路由渲染用量 | | 依赖 | 仅 `webServer` 服务 + Node 内置模块,零运行时依赖 | ## License MIT
Install
dsh plugin --profile web add github:fuzz1og/dsh-ocgo-quota
Profile: web
With the hub plugin installed, ask your agent to install it by name — it resolves the same plan shown here.
dsh plugin --profile web add github:stvlynn/dsh.fish#path:packages/dsh-plugin-hub
install dsh-ocgo-quota from the hub
- This source has no pinned commit, so a later push upstream changes what installs. Prefer pinning a commit.