
Security News
Deno Goes the Way of the Dinosaur
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.
dsh-go-balance
Advanced tools
OpenCode Go subscription balance widget for DeepSeek Harness Web: rolling/weekly/monthly quota remaining, shown at the right end of the composer tool row.
给 DeepSeek Harness(DSH)Web 界面加一个 OpenCode Go 订阅余额小部件:在输入框工具行右侧(发送按钮旁)显示滚动 / 每周 / 每月三个配额窗口的剩余百分比,数据直接来自 OpenCode Zen 用量接口(Go 订阅仪表页同源),不是估算值。
https://opencode.ai/zen/go/v1/usage,渲染与 Go 仪表页完全一致的数字。Go 96% · 94% · 97%(滚动 / 每周 / 每月剩余),位于发送按钮右侧。OPENCODE_ZERO_API_KEY),只留在 host 进程内;本仓库不含任何密钥,也不会下发到浏览器。


dsh plugin --profile web add dsh-go-balance
然后重启 DSH(dsh web)。插件会自动加入 profile 的 bundle 层,无需其他配置。
也可以直接从 GitHub 仓库安装(例如镜像源尚未同步时):
dsh plugin --profile web add github:iamfromchangsha/dsh-go-balance
本地开发目录安装:
# 在插件仓库目录下执行(相对路径锚定到当前目录)
dsh plugin --profile web add file:./
插件通过 DSH 凭据服务读取 OPENCODE_ZERO_API_KEY($DSH_HOME/.credentials.yaml 或进程环境变量,即您 Go 订阅的 API 密钥),每次刷新时在 host 进程内解析。
bundle 行暴露一个可选键:
| 键 | 默认值 | 含义 |
|---|---|---|
intervalMs | 60000 | host 轮询 OpenCode Zen 用量接口的间隔(毫秒)。 |
在 profile 补丁层($DSH_HOME/profiles/web/cordis.patch.yml)覆盖:
- id: go-balance
config:
intervalMs: 120000
一个 npm 包承载插件的两个半边:
lib/index.js)— goUsage 服务:经 ctx.credentials 解析 OPENCODE_ZERO_API_KEY,定时轮询 Zen 用量接口(请求发现缓存超过 30 秒也会顺手刷新),校验响应结构后在 GET /go-usage 提供快照。lib/client.js)— 注册进 conversation.input.right 插槽(输入框工具行右端),每 60 秒以及标签页重新可见时拉取 /go-usage。code(和可选的 HTTP status);DNS 失败等内部细节仅写入 host 日志,且日志中的密钥串一律替换为 [REDACTED]。密钥只经 Authorization: Bearer 发给 opencode.ai,仅存在于 host 进程内存,不落盘、不进日志、不过 /go-usage。/go-usage 另拒绝非回环 Origin 的浏览器跨站读取(403),并带每地址 120 次/分钟的内存级速率限制(429)。快照只含配额百分比与重置时间,绝不含密钥或身份信息。percent 必须是 [0, 100] 内的有限数字,上游返回畸形值会丢弃整份快照并保留上次有效数据。node --check lib/index.js && node --check lib/client.js
lib/client.js 随仓库提交并随包发布,安装时无需构建。
OPENCODE_ZERO_API_KEY 凭据。FAQs
OpenCode Go subscription balance widget for DeepSeek Harness Web: rolling/weekly/monthly quota remaining, shown at the right end of the composer tool row.
The npm package dsh-go-balance receives a total of 268 weekly downloads. As such, dsh-go-balance popularity was classified as not popular.
We found that dsh-go-balance demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.

Security News
Anthropic’s free OSS Scanner uses Mythos and other Claude models to find open source vulnerabilities and send maintainers reports with proposed fixes.

Security News
On Front Lines’ Early Adopters: CISO podcast, Andrew Becherer shares lessons from Datadog, weighs the long-term costs of AI-built tools, and explains how founders can actually gain a CISO’s trust.