插件目录 / Network / dsh-deepseek-usage
dsh-deepseek-usage
已验证 · 实测可装 ben7am1n
功能简介
dsh-deepseek-usage — DSH 插件(桥接)
可用 — 实测通过,早期项目
dsh-deepseek-usage — DSH 插件(桥接) 实测能干净安装、正常启动。早期项目,但功能可用。
「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。
README
dsh-deepseek-usage
DeepSeek usage monitor for DeepSeek Harness: account balance query and live token usage summary as model-callable tools.
Install
dsh plugin --profile <name> add dsh-deepseek-usage
Requires a DeepSeek API key available as DEEPSEEK_API_KEY (env or credential).
Tools
deepseek_balance
Queries GET https://api.deepseek.com/user/balance and returns availability and per-currency balances (total / granted / topped-up). When lowBalanceThreshold is configured, appends a warning when the primary currency balance drops below it.
usage_summary
Aggregates per-session token usage from the harness token meter across live sessions, sorted by total tokens descending. Use it to estimate context usage and spot runaway sessions.
Configuration
| Field | Default | Meaning |
|---|---|---|
apiKeyEnv |
DEEPSEEK_API_KEY |
Env var or credential reference for the API key |
baseURL |
https://api.deepseek.com |
DeepSeek API base URL |
lowBalanceThreshold |
— | Optional low-balance warning threshold |
# profile cordis.patch.yml
- id: deepseek-usage
config:
apiKeyEnv: DEEPSEEK_API_KEY
lowBalanceThreshold: 20
License
MIT
安装
装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:
dsh plugin add dshbase-catalog 然后对 agent 说「帮我装 dsh-deepseek-usage」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。
Web profile:
dsh plugin --profile web add dsh-deepseek-usage Headless(CLI)profile:
dsh plugin --profile headless add dsh-deepseek-usage 包信息
npm:dsh-deepseek-usage · 版本 0.1.0 · 实测环境 dsh 0.1.0-rc.6
实测报告
端到端验证通过:dsh 0.1.0-rc.6 上 L1 安装 + L2 加载 + L3 运行问答。
使用场景
给 agent 网络能力——请求、API、代理或协议——让它能触达外部系统。
适合谁
任务涉及网络的人——调 API、抓资源或与远端服务通信。
二次开发建议
适配器和请求整形是缝——加协议、鉴权处理器、重试和端点抽象。