dsh-plugin

by kbtime

0 用量与计费github收录于 08-23

DeepSeek Harness 插件:用量统计、费用计算(含峰谷计价)、缓存命中与上下文监控

安装

dsh plugin --profile web add github:kbtime/dsh-plugin

GitHub 源码安装:首次需按提示配置 allowBuilds 构建授权后重试

安装与环境配置指引、插件开发教程见 DSH 中文社区文档 ↗

安装即在你的机器上以你的权限运行第三方代码——它可读写文件、使用凭据、访问网络,DSH 的工具审批不会为插件代码加沙箱。「检测到 manifest」仅代表发现 dsh.bundle / dsh.plugin 清单,不构成兼容性或安全审查;安装前请审阅源码,不熟悉的插件先在不含密钥的环境试用。

README

DeepSeek Harness 插件集(monorepo)。每个插件独立版本,各自可单独安装。

插件

插件 说明
packages/dsh-usage-meter 用量统计、费用计算(人民币峰谷计价)、缓存命中与上下文监控
packages/dsh-updater DSH 自升级:核对官方仓库(deepseek-ai/deepseek-harness)是否有更新,一键 merge + install + build 升级本地源码 checkout,失败可回滚

安装

用 git 依赖 + path: 参数指定子目录(pnpm 语法 仓库#tag&path:子目录):

# 用量统计
dsh plugin --profile web add "github:kbtime/DSH-plugin#v0.3.0&path:packages/dsh-usage-meter"

# 检查更新(自升级)
dsh plugin --profile web add "github:kbtime/DSH-plugin#v0.3.0&path:packages/dsh-updater"

安装后重启 dsh web 生效。

v0.2.x 及更早的 tag 是单插件布局(仓库根即 dsh-usage-meter),旧安装引用不受影响;升级时请改用上面的子路径写法。

开发

git clone https://github.com/kbtime/DSH-plugin.git
cd DSH-plugin
# 本地试用(link 安装,改代码刷新页面即生效)
dsh plugin --profile web add ./packages/dsh-updater

两个插件均为零依赖纯 JS(无构建步骤)。

原始 README: https://github.com/kbtime/DSH-plugin/blob/main/README.md ↗