新增 /dshpp 斜杠命令,从 Harness 会话日志汇总会话数与 token 用量、缓存命中率与估算成本;同仓库还附带用于生命周期、Provider、会话与插件安全管理的 CLI 与本地 Web 控制台。
安装
# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)
dsh plugin --profile web add github:limlnx523/dsh-plus-plus
装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本——pnpm 默认拦截,所以安装可能停在 ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED 或 ERR_PNPM_IGNORED_BUILDS;dsh 会打印出需要添加的确切键名,把它加进该 profile 的 pnpm-workspace.yaml 的 allowBuilds 下,重跑一次即可装上。放行构建本身就是一次信任判断:请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。
README
该插件的 README 只有英文版本。
DSH++ — a local-first control plane for DeepSeek Harness (dsh).
It runs on your machine, reads the same $DSH_HOME state the harness does, and gives you the operational layer the harness doesn't ship.
Why you need it
- You can't easily see which plugins are installed, or what each one can reach (filesystem, shell, network, credentials).
- A config change, a new plugin, a prompt tweak, or a harness upgrade can silently break a workflow — and you only find out later.
- Credentials, config, and sessions live in
$DSH_HOMEwith no snapshot/rollback or usage/cost view.
Core capabilities
- Plugin security auditing —
dshpp auditinventories installed plugins, classifies the capabilities (seams) each one touches, grades risk, and flags what to remove. - Workflow regression testing —
dshpp testruns a fixed set of harness tasks against your current DSH configuration, compares to a stored baseline, and reports regressions. It exits non-zero on a regression, so it can gate CI. - Lifecycle management — detect the install, snapshot and roll back
$DSH_HOMEconfiguration, run diagnostics, and manage providers and credentials.
Install & go
npm i -g .
dshpp status # overview of the DSH install
dshpp audit # plugin security risk report
dshpp test # regression-test the DSH workflow vs baseline
Demo
Change a DSH workflow, run dshpp test, and it finds the regression:
Requirements
- Node.js >= 20.
- No third-party runtime dependencies. Built-in
node:zlibdecodes the concatenated-zstd session logs.
Install
npm i -g .
Or install it as a harness plugin (adds a /dshpp slash command):
dsh plugin --profile web add github:limlnx523/dsh-plus-plus
Example
$ dshpp status
[DSH++] DeepSeek Harness · status
----------------------------------------------------
DSH home C:\Users\you\.dsh
dsh CLI present (C:\Users\you\AppData\Roaming\npm\dsh)
.env found — 1 key(s), 1 secret(s) hidden
settings.yaml C:\Users\you\.dsh\settings.yaml
provider keys (none detected)
backups 2 snapshot(s)
DSH++ home C:\Users\you\.dsh-plus-plus
----------------------------------------------------
health: run `dshpp doctor` · console: run `dshpp web`
$ dshpp audit
[DSH++] DeepSeek Harness · control plane · plugin security audit (197 plugin(s) · dsh 0.1.1-rc.2)
risk: 高=8 中=69 低=120
[高] @deepseek-ai/dsh-client-connection@0.1.1-rc.2 官方 seams=network,shell,credentials,goal
[高] @deepseek-ai/dsh-host-apiproxy@0.1.1-rc.2 官方 seams=network,shell,credentials,llm
[高] @deepseek-ai/dsh-tool-cordis@0.1.1-rc.2 官方 seams=network,shell,credentials,sandbox,llm,goal
解读: 高/中风险插件可读取密钥、执行 shell 或访问网络。
只安装并保留信任的插件;识别为高风险的插件建议停用或移除。
$ dshpp test
[DSH++] DeepSeek Harness · control plane · regression test 6 case(s) model=deepseek-v4-flash dsh=0.1.1-rc.2
PASS math 4.9s in=16598 out=108 cost=$0.00460 answer present
PASS file-write 6.4s in=16944 out=256 cost=$0.00470 file written
PASS file-read 5.9s in=16888 out=198 cost=$0.00470 value read
PASS edit 7.2s in=17020 out=406 cost=$0.00474 replaced
PASS glob 7.7s in=16746 out=180 cost=$0.00466 two files counted
PASS shell-echo 7.9s in=16790 out=200 cost=$0.00468 echoed
vs baseline:
math same latency +0.4s cost 0.0000
file-write same latency -0.1s cost 0.0000
file-read same latency +0.2s cost 0.0000
edit same latency 0.0s cost 0.0000
glob same latency +0.1s cost 0.0000
shell-echo same latency -0.2s cost 0.0000
no regression.
CLI
dshpp status Overview (home, env, settings, backups)
dshpp doctor Diagnostics checklist
dshpp env ls [--show] List credentials (masked unless --show)
dshpp env set KEY=VALUE Add/update a credential
dshpp env rm KEY Remove a credential
dshpp backup Create a timestamped snapshot
dshpp backup ls List snapshots
dshpp backup restore <id> Restore a snapshot (auto pre-snapshot)
dshpp backup rm <id> Delete a snapshot
dshpp providers ls|export|probe List providers, export config, probe endpoint models
dshpp usage Token/cost aggregate from session logs
dshpp budget [set <usd>] Show or set the monthly budget
dshpp sessions List session logs
dshpp sessions export <id> Export a session as text
dshpp plugins Inventory installed plugins + seam audit
dshpp audit Security risk report for installed plugins
dshpp test [--case <id>] Regression-test the DSH workflow vs baseline
dshpp web [--port N] [--no-open] Start the local web console (loopback only)
Web console
dshpp web serves a local console at http://127.0.0.1:4848/. It binds to loopback only. It surfaces providers, masked credentials, backups, usage and cost, sessions, plugins, and regression results. Secrets are masked unless you opt in with --show, and the console never returns raw key values over the API.
Configuration
- Harness home:
$DSH_HOMEor~/.dsh - Credentials:
$DSH_HOME/.env(never committed; snapshots warn when they include it) - dsh-plus-plus state:
~/.dsh-plus-plus/(backups, provider manifest, regression baseline)
Development
npm link
node bin/dshpp.mjs --help
npm test
License
MIT
链接
同类插件
bowenliang123/dsh-context★ 2049
DSH 上下文洞察面板:Context 仪表盘 + /context命令 + Context 浏览器,查看 Context的分类组成、内容详情、演进趋势、压缩/注入事件、统计等一站式 Context 全生命周期管理。
Han-1413141/dsh-cost-meter★ 400
会话与当日 API 费用统计、预算图框(已用%)、官方余额、历史看板,支持峰谷计价与官方价格一键同步。
wssfk12138/dsh-damage-pulse★ 260
在 DSH Web 界面追踪 DeepSeek Token 用量、单次与会话费用及账户余额,并显示缓存感知的扣费动画。
zh667/TokenLedger★ 202
侧边栏用量面板:把 Token 归属到实际服务该请求的中转站,站点从已有的 provider 配置中读出,无需额外配置;含今日/本月/累计三窗口、按站点与模型下钻、一年活跃度热力图,以及 New API / Sub2API / DeepSeek 余额。
Ychris12138/dsh-usage-stats★ 172
多供应商用量看板:按供应商/模型统计 Token 与日期下钻,统一展示账户余额,并追踪 OpenCode Go / Z.ai 订阅额度。
PolinniZhong/dsh-personal-center★ 118
DeepSeek Harness 个人中心:跨会话用量统计、按模型成本估算、全局自定义指令、外观全局字号、数据驱动的桌面宠物(位图/矢量皮肤)与会话状态概览,纯本地离线运行。
社区评论
评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。