D
@token-budget/dsh-plugin
v0.1.0 · 1 天前发布
DeepSeek Harness 插件 — 通过读取企划书 / 半成品软件 / 资料预估特定模型的 token 消耗量并实时按各家定价计费
README
dsh-token-budget
DeepSeek Harness 插件 — 通过读取企划书 / 半成品项目 / 资料,预估 LLM token 消耗量并按各家定价实时计费。
安装
bash
dsh plugin --profile web add dsh-token-budget@0.1.0
dsh web
或本地开发:
bash
dsh web --patch ./cordis.patch.yml
注册给 Agent 的工具
| 工具名 | 用途 |
|---|---|
| estimate-tokens | 估算单模型 token 数 |
| estimate-cost | 多模型对比 + Markdown/JSON 成本报告 |
| list-models | 列出所有支持模型 |
| list-pricing | 列出定价(含分段定价) |
配置
cordis.patch.yml:
```yaml
- id: dsh-token-budget
name: ${DSH_PLUGIN_DIR}/src/index.js
config:
displayCurrency: USD # USD 或 CNY
defaultCacheHitRatio: 0 # 0-1
defaultOutputRatio: 0.3 # 输出/输入比
forceHeuristic: false # 强制启发式
pricingOverrides: #
版本兼容矩阵
| DSH 版本 | 状态 | 说明 |
|---|---|---|
dsh@0.1.0-rc.6 | ✅ 兼容 | cordis patch ✅ |
dsh@0.1.0 | ✅ 兼容 | 标准 patch ✅ |
dsh@0.2.0 | ⚠️ 待验证 | 待实测(API 可能在变) |
dsh@0.3.0+ | ❓ 未知 | 尚未发布 |
💡 兼容矩阵每周末自动跑实测,欢迎 PR 修正
元数据
- License
- MIT
- npm
- @token-budget/dsh-plugin
- Repo
- git+https://github.com/tachika710/token-budget.git
- Engines
{}- Weekly DL
- 0
- Monthly DL
- 0
- dsh.bundle
{"displayName":"Token Budget & Cost Estimator","bundle":{"patch":"./cordis.patch.yml"}}