D
dsh-analytics
v0.4.0 · 4 天前发布
Agent FinOps / token analytics for DeepSeek Harness: usage collection, time-aware cost engine, cache analysis, and session drill-down
README
dsh-analytics
English | 中文
面向 DeepSeek Harness 的 Agent FinOps / token 分析:从会话事件采集用量写入本地 SQLite 账本,用时间感知的定价表(绝不硬编码进逻辑)计费,并通过服务、agent 工具与 JSON API 路由查询。
这是设计中的 v1 范围:总览 + 会话下钻 + 成本引擎 + 缓存分析,并按 dsh-plugin 生态的 bundle 打包方式发布(带 dsh.bundle 的 npm 包 → cordis.patch.yml)。
安装
sh
dsh plugin --profile web add dsh-analytics
从 git 安装(需要 prepare 构建授权):
sh
dsh plugin --profile web add github:you/dsh-analytics#<sha>
从本地检出安装:
sh
dsh plugin --profile web add /path/to/dsh-analytics
本地开发时挂载源码 overlay:
sh
dsh --profile web --patch ./cordis.yml
配置
插件行的 config(形状见 cordis.yml):
| Key | 类型 | 默认值 | 说明 |
| --- | --- | --- | --- |
| dbPath | string | —(必填) | SQLite 数据库文件;缺失的目录会自动创建。 |
| currency | string | — | 摘要中优先排序的首选币种(每行自带币种
版本兼容矩阵
| 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
- dsh-analytics
- Repo
- git+https://github.com/hccccc01333/dsh-analytics.git
- Engines
{}- Weekly DL
- 0
- Monthly DL
- 0
- dsh.bundle
{"bundle":{"patch":"./cordis.patch.yml"},"permissions":"none","client":{"inject":["@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-slots","@deepseek-ai/dsh-client-locale","@deepseek-ai/dsh-client-ui-conversation","@deepseek-ai/dsh-client-ui-sidebar"],"platform":"web"}}