zq0929/dsh-coding-plan-balance ↗★ 0

dsh-coding-plan-balance

Coding Plan quota pill for the DSH Web composer dock: the billing cycle's USD usage and the rolling 5-hour window, read with the credential your ctrip model provider already uses. 适合需要实时监控Coding Plan额度及5小时滚动窗口用量的用户。

패키지
dsh-coding-plan-balance
호환성
미검증
버전
1.0.1
라이선스
MIT
최근 업데이트
2026. 10. 10.

설치

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:zq0929/dsh-coding-plan-balance

配置

在你自己 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 工具

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