deepseek-harness
deepseek-ai
DeepSeek Harness: Everything is a Plugin.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:ChenYiming-aaa/dsh-account-stats
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
DeepSeek 账户统计插件(dsh web 用):在输入栏右侧显示实时余额与本次会话消费,并支持悬停查看明细(估算 / 本轮余额变化 / 账户累计变化)。
account 会话投影——实时调用 DeepSeek /user/balance(每 60 秒轮询 + 每轮结束即时结算),按官方定价页(https://api-docs.deepseek.com/zh-cn/quick_start/pricing/)**分时计价**(高峰 = 北京 9:00–12:00 / 14:00–18:00,空闲半价),按模型(deepseek-v4-flash / v4-pro)分别计费;非 DeepSeek 计费模型(如 opencode 免费模型)自动跳过。AccountChip 注册到输入栏右侧(conversation.input.right slot),无需修改任何第三方 bundle。方式一(dsh plugin,npm 发布后):
# 从 npm 仓库安装(发布到 npm 后)
dsh plugin --profile web add dsh-account-stats
# 或本地打包安装
npm pack
dsh plugin --profile web add ./dsh-account-stats-0.1.0.tgz
方式二(一键脚本):
# 在插件目录下执行
.\install.ps1
脚本会把插件复制到 $DSH_HOME/profiles/node_modules/dsh-account-stats/,并在
$DSH_HOME/profiles/web/cordis.patch.yml 追加插件行(幂等,重复执行不会重复添加)。
方式二(手动):
dsh-account-stats 目录复制到 $DSH_HOME\profiles\node_modules\($DSH_HOME 默认 C:\Users\<you>\.dsh)$DSH_HOME\profiles\web\cordis.patch.yml 追加:- insert:
- id: account-stats
name: dsh-account-stats
config:
baseUrl: https://api.deepseek.com
apiKeyEnv: DEEPSEEK_API_KEY
refreshMs: 60000
timeoutMs: 10000
pricing:
defaultModel: deepseek-v4-flash
models:
deepseek-v4-flash:
peak:
inputCacheMiss: 3.0
inputCacheHit: 0.1
output: 9.0
offpeak:
inputCacheMiss: 1.5
inputCacheHit: 0.05
output: 4.5
deepseek-v4-pro:
peak:
inputCacheMiss: 9.0
inputCacheHit: 0.3
output: 27.0
offpeak:
inputCacheMiss: 4.5
inputCacheHit: 0.15
output: 13.5
dsh web(插件化加载需要重启一次),刷新页面即可看到输入栏右侧的余额 chip。需要 API Key:通过
dsh的凭据服务保存DEEPSEEK_API_KEY(Web 的模型设置页可写入),或设置环境变量。
| 配置项 | 默认值 | 说明 |
|---|---|---|
baseUrl |
https://api.deepseek.com |
余额接口地址 |
apiKeyEnv |
DEEPSEEK_API_KEY |
凭据引用名 |
refreshMs |
60000 |
余额轮询间隔(毫秒) |
timeoutMs |
10000 |
余额请求超时 |
pricing.defaultModel |
deepseek-v4-flash |
未识别模型时的兜底(当前不计费,见下) |
pricing.models |
官方两档价格 | 分时价格表(元/百万 tokens) |
价格按官方定价页配置;官方改价后请同步更新
cordis.patch.yml中的pricing.models。 不在价格表中的模型(如 opencode 的免费模型)不计入“本次消费”,避免虚增。
lib/index.js)改动后需重启 dsh 生效(Node ESM 缓存)。lib/client.js)改动后刷新页面即可生效(服务端实时读取)。CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。