DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

Coding Plan Balance — DeepSeek Harness 插件(DSH Plugin)
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录
← Plugins
C

dsh-coding-plan-balance

Coding Plan Balance

DSH Web composer dock 的 Coding Plan 配额提示:使用您的 ctrip 模型提供商已在使用的凭据读取计费周期内的 USD 使用量和滚动 5 小时窗口。

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add github:zq0929/dsh-coding-plan-balance#f1c8e4be6b2edae5933e33a7a795a0267ffcb164
README兼容性版本

兼容性与来源证明

Coding Plan Balance 以 dsh-coding-plan-balance 发布,当前版本为 1.0.1。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
web
发布来源
github
Registry 更新时间
2026/10/10

版本

1.0.1stable
2026/10/10
1.0.0stable
2026/10/10

相关插件

正在加载相关插件…

最新版
1.0.1
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
未提供
文件数
未提供
Surface
web
许可证
MIT
发布源
github
GitHub
★ 0
周下载
0
最近提交
2026/10/10
查看源码 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题

相关插件

继续浏览 models-usage 分类下经过校验的插件。

Whale Widgetdsh-whale-widgetDSH Web 界面右下角的 DeepSeek 余额小鲸鱼挂件:余额/今日已用/峰谷定价、自定义泡泡点击序列(文本/余额/今日/峰谷/图片/随机语句与并列加权选择)、逐行样式与字体、悬浮快捷编辑、音效与每轮消耗、自定义角色/动图/音效、吸附与翻转自定义Client Ui Model Capabilities@linxin666/dsh-client-ui-model-capabilities为自定义 pi-ai 提供商声明每个模型的能力(图像输入和推理力度),可直接在 Models 设置卡片中编辑;写入官方 llm-pi-ai 设置命名空间,不更改 DSH 源代码。Cost Meterdsh-cost-meterDeepSeek Harness 会话费用统计插件:本会话成本、当日费用、历史记录与官方价格同步,支持多厂商多模型价格计费(内置 170+ 模型 ID 价格目录与自动匹配)、主流 Coding Plan 订阅额度查询与显示(13 家,含 OpenDesign 工作区查询、含小米 MiMo Token Plan 控制台 Cookie 查询、SCNet Token Plan 本地 Credits 计量与火山方舟 Volcano Ark Coding Plan AK/SK 签名查询)、自定义 Provider Codex Subscriptiondsh-codex-subscription通过 OAuth 在 DeepSeek Harness 中使用 ChatGPT 和 Codex 订阅,支持配额管理、安全重置、网页搜索、图像和快速模式

README

Coding Plan balance gauge

dsh-coding-plan-balance

把 Coding Plan 余额做成 DSH Web 界面里输入框下方的一枚常驻胶囊:本计费周期的已用 / 限额(USD)、使用百分比,以及滚动 5 小时窗口的用量。

凭据复用你 profile 里 ctrip 模型 provider 的同一条 API Key;密钥只留在 Host 进程,页面只拿到额度数字。

◔ 50 美金 · $0.13 / $50.00 · 0% · 5h $0.00 / $50.00

中文 · English · MIT


中文

特性

  • 常驻输入框下方:注册进 conversation.composer.dock,与 DSH 自带的 activity / usage 两个胶囊并排,不占对话区域。
  • 一眼看到三件事:套餐名 · 周期已用/限额 · 使用百分比 · 5 小时窗口用量。
  • 悬停看细节:套餐状态、周期已用/限额/百分比、剩余额度、重置时间、5h 窗口结束时间、本次读取时间。
  • 点击刷新(强制取最新),平时按 Host 下发的间隔(默认 60s)自动轮询;轮询走 Host 的复用窗口,多个会话同时看也只多打一次上游请求。
  • 失败不消失:未配置 Key、网络不通、额度被阻断时,胶囊留在原位并显示原因,数字改用主题的警告/错误色。
  • 同样的能力给 agent:注册 coding_plan_balance 工具,可以直接问"还剩多少额度"。
  • 主题与语言:只用 --dsw-alias-* 主题 token(自动跟随明/暗),文案走 Client locale(中 / 英)。

安装

任选一种(都是 DSH 自带的插件安装路径):

  1. Web GUI:设置 → 插件 → 添加插件,填 https://github.com/zq0929/dsh-coding-plan-balance
  2. 命令行:dsh plugin add https://github.com/zq0929/dsh-coding-plan-balance
  3. 本地开发:克隆到本地后,在"添加插件"里填目录绝对路径,装完直接改源码即可(index.js 改动跟随 Loader 重组,client.js 改动跟随 Client 模块图)。

安装后需要刷新页面让浏览器侧模块生效。

凭据

插件不新增任何密钥配置,默认复用 profile 里 ctrip provider 用的那条 Key:

  1. config.apiKey(显式配置,优先级最高);
  2. ctx.credentials.resolve(config.apiKeyEnv) —— 覆盖进程环境变量、provider 管理的凭据库、.env,默认名 CTRIP_API_KEY;
  3. process.env[config.apiKeyEnv]。

如果你的 provider 用的是别的变量名,把 apiKeyEnv 改成那个名字即可。要求该 token 已绑定生效套餐。

配置

在你自己 profile 的 cordis.patch.yml 里按行 id 覆盖(profile 层在 bundle 层之后应用):

- id: coding-plan-balance
  config:
    apiKeyEnv: MY_CTRIP_KEY
    refreshSeconds: 120
字段默认说明
baseUrlhttps://ada-cli-go.ctripcorp.comCoding Plan API 主域名
fallbackBaseUrlhttp://ada-cli-golang.ctripcorp.com主域名不可达时回退;留空关闭回退
apiKeyEnvCTRIP_API_KEY凭据名
apiKey空显式密钥,优先于 apiKeyEnv
refreshSeconds60页面轮询间隔,小于 20 按 20 处理
cacheSeconds10Host 端快照复用窗口:不带 refresh 的读取在此窗口内复用同一份快照;并发读取一律合并成一次上游请求
timeoutMs8000单次上游请求超时
routePath/api/coding-plan.balance页面读取额度用的 Host 路由(必须以 /api/ 开头)
tooltrue是否注册 coding_plan_balance 工具

工作原理

  • Host 半(index.js):解析凭据 → 调 /api/coding-plan/quota/me、/api/coding-plan/5h-usage、/api/user/api-tokens/userinfo(周期配额必需,另两个尽力而为)→ 归一化成一个快照 → 通过 ctx.connection.fetch.register() 挂在 /api/coding-plan.balance。鉴权、Host/Origin 校验、浏览器会话 cookie 都由 Connection 统一处理,未携带会话的请求得到 401。
  • Client 半(client.js):用 window.__ModuleLoader__ 注册懒工厂,通过 ctx.slots.inject('conversation.composer.dock') 挂一枚胶囊,以文档相对路径拉取 api/coding-plan.balance,按 refreshSeconds 轮询,点击立即 ?refresh=1。
  • 一份实现两个调用方:UI 点击和 agent 工具走同一条读取路径,工具结果是同一份快照,不存在两套逻辑。

已知限制

  • 只读个人额度:团队套餐详情、团队 AI 代码统计这两类接口需要更大权限范围,本插件不调用。
  • 5 小时窗口在 source: none(还没有产生费用、没有活动窗口)时,接口返回的窗口时间只是兜底展示值,插件因此不显示"窗口结束"。
  • 需要能访问 *.ctripcorp.com(内网或代理)。
  • 少数接口字段语义依赖上游:limit_usd 为 0 表示未配置限额,此时显示"不限"。
  • 本仓库只做静态校验(语法、清单、id 一致性、语言文件、图标),没有浏览器视觉回归。

开发

node --check index.js
node --check client.js
node scripts/check.mjs

仓库自检脚本会核对:包名、dsh.bundle.patch、exports/files 覆盖的文件、client.js 的模块 id 与包名一致、cordis.patch.yml 行名与包名一致、中英语言文件的 meta.title/meta.description、图标是 <svg> 且在 256 KiB 以内。


English

A persistent Coding Plan quota pill for the DSH Web composer dock: it shows the billing cycle's used/limit in USD, the usage percentage, and the rolling 5-hour window usage.

◔ 50 美金 · $0.13 / $50.00 · 0% · 5h $0.00 / $50.00
  • Where it renders: one entry in conversation.composer.dock, beside the shipped activity/usage pills, using only --dsw-alias-* theme tokens and Client locale dictionaries (zh/en).
  • Interaction: hover for the full reading (plan status, cycle used/limit/percent, remaining, reset time, 5-hour window end, last read time); click to refresh immediately, which forces a fresh read; otherwise it polls on the interval the Host reports (60s by default) through the Host's reuse window, so several sessions watching at once cost one upstream request.
  • Credential: the same key your ctrip model provider uses — config.apiKey, then ctx.credentials.resolve(apiKeyEnv) (default CTRIP_API_KEY), then process.env. The key never reaches the page; only quota numbers do.
  • Also an agent tool: coding_plan_balance returns the same snapshot, so the UI action and the tool share one implementation.
  • Host side: the plugin calls /api/coding-plan/quota/me, /api/coding-plan/5h-usage, and /api/user/api-tokens/userinfo, normalizes one snapshot, and serves it on /api/coding-plan.balance through ctx.connection.fetch.register(), which owns browser-session authentication, Host/Origin checks, and the 401 for cookie-less requests.

Install

dsh plugin add https://github.com/zq0929/dsh-coding-plan-balance

Or use Settings → Plugins → Add plugin in the Web UI and paste the same Git URL (an absolute local path works too for development). Refresh the page afterwards.

Configuration

Override the row by id in your profile's cordis.patch.yml:

- id: coding-plan-balance
  config:
    apiKeyEnv: MY_CTRIP_KEY
    refreshSeconds: 120
FieldDefaultMeaning
baseUrlhttps://ada-cli-go.ctripcorp.comPrimary Coding Plan API origin
fallbackBaseUrlhttp://ada-cli-golang.ctripcorp.comTried once when the primary is unreachable; empty disables it
apiKeyEnvCTRIP_API_KEYCredential name
apiKeyemptyExplicit key, takes priority over apiKeyEnv
refreshSeconds60Page poll interval (minimum 20)
cacheSeconds10Host-side reuse window: reads without refresh share one snapshot inside it, and concurrent reads always collapse into one upstream request
timeoutMs8000Upstream request timeout
routePath/api/coding-plan.balanceHost route the page reads (must start with /api/)
tooltrueRegister the coding_plan_balance tool

Limitations

Read-only personal quota. The team plan and team AI-code-statistics endpoints are out of scope. With 5h source: none the API's window times are display fallbacks, so no window end is shown. The plugin needs network access to *.ctripcorp.com. CI checks syntax, manifest, id consistency, locales, and the icon — there is no browser visual regression.

License

MIT © 2026 zq0929