wefio/dsh-cache-miss
当缓存未命中时提示
Project Overview项目介绍
This is a native plugin built exclusively for DeepSeek Harness (DSH) that displays an inline prompt cache miss notification right when the event occurs. It inserts the notification directly below the first assistant reply of each conversation turn, where DSH’s built-in cache statistics do not reach. To install the plugin, you run the command dsh plugin --profile web add dsh-cache-miss via the DSH CLI, then restart the dsh web process or hard refresh the running GUI to load the client bundle.
The yellow notification line displays clear metrics: idle time since the last turn, the number of input tokens that missed the cache, the number of tokens that hit the cache, and TTFT (time to first token) when data is available. It only renders when three conditions are met: input tokens from miss are over 0, hit ratio is below 80%, and the total missed tokens are at least 1000. It is purely front-end, does not write to session logs or modify DSH source, so it never conflicts with output lines from other plugins.
The plugin has a few documented, public limitations. TTFT values are not displayed if timing boundary data falls outside the already loaded conversation window, and only one log entry is output to the browser console per step. For providers that do not return cache fields at all, the plugin shows a one-time gray notification that cache status cannot be confirmed, avoiding misleading false positive reports. It is released under the open-source MIT license, has no external dependencies, and is free for anyone to use and modify.
这是一个专为 DeepSeek Harness (DSH) 开发的原生网页插件,功能是在每轮对话的第一条助手回复下方,就地提示该轮首次请求发生了提示缓存未命中。DSH 自带的 token 和缓存统计信息展示在输入框下方,相关数据要等到轮次结束才生成展示,无法在缓存未命中真正发生的位置及时给出提示。本插件填补了这一空白,能够在 miss 发生时立刻给出醒目的黄色单行提示。
提示行清晰显示距上一轮结束的空闲时长、未命中缓存需要重新计费的 token 数、命中缓存的 token 数,以及在数据可用时显示首 token 时延。插件仅做前端展示,不会写入会话日志,也不修改 DSH 源码,不会和其他插件(如 DSH-better-sidebar)的产物行产生冲突。它适合需要关注缓存命中率、控制 DeepSeek API 调用成本的 DSH 用户使用。
安装方式为通过 DSH CLI 执行 dsh plugin --profile web add dsh-cache-miss,安装后需要重启 dsh web 或硬刷新 GUI 加载。插件存在少量已知限制,比如 TTFT 数据缺失时不显示对应字段,从未返回缓存字段的提供商首次使用时会显示一次灰色提示,不会误报缓存状态。本插件采用 MIT 许可证开源,无额外依赖和使用成本。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-cache-miss(wefio/dsh-cache-miss)
仓库:https://github.com/wefio/dsh-cache-miss
本站详情页:https://www.yhbd.top/plugins/wefio-dsh-cache-miss/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 2 · 最近提交 2026-09-29 · 主语言 TypeScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项
Compatibility兼容性
- DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
- External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
- Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册
Security安全性
- Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
- Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
- curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
- Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
- Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
- Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式
Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add dsh-cache-miss
把 wefio/dsh-cache-miss 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-cache-miss
DSH 网页插件:在一轮的第一条 assistant 回复正下方,以一条黄色单行提示该轮首次请求的提示缓存未命中(prompt cache miss)。
功能
一轮 Agent 对话是 assistant -> tool -> assistant -> tool ...。该轮第一次模型调用正是供应商提示缓存可能已过期、需要整段重新 prefill(重建缓存)的时机;同轮后续调用往往命中刚重建的缓存。DSH 自带的 token/缓存统计在输入框下方,产物文件行在轮尾,都无法在 miss 真正发生的位置就地提示。
本插件在轮首第一条 assistant 回复正下方,仅当该请求确为缓存未命中时渲染一条黄色单行:
Cache miss after 3m idle: 182k tokens re-billed · 0.8k cached · ttft 2.1s ↑

idle—— 距上一轮结束的空闲时长。re-billed—— 该请求未命中缓存的输入 token 数(缩写为 k)。cached—— 同一 prefill 中命中缓存的部分(provider 回报时显示),让“重算量 vs 命中量”一目了然。ttft—— 首 token 时延(取自 assistant timing,可用时显示);上箭头示意重建 prefill 通常更慢。
纯前端展示:不写入 session log,不修改 DSH 源码,也不占用 turn-tail 链,因此不会与产物文件行冲突(例如 DSH-better-sidebar)。
miss 判定
inputTokens 是"未命中缓存的输入"(disjoint 口径),cacheReadTokens 是同一 prefill 中命中的部分,因此缓存命中率 hitRatio = cacheReadTokens / (inputTokens + cacheReadTokens)。一个请求同时满足以下三条才算 miss:
inputTokens > 0;hitRatio < 80%(超过 20% 的输入未命中——因为上下文是累积的,这部分绝对量已经不小);inputTokens >= 1000(至少有 1k token 真正被重新计费)。
回 usage 但不回 cache 字段的 provider,在从未见过该 provider 的任何 cache 字段前,插件无法区分「完全 miss」与「命中但不报 cache 明细」:此时不把它误报成 miss,而是渲染一条灰色提示 Provider reports no cache fields — cannot confirm cache status。每个这样的 provider 首次出现时提示一次,切换到另一个这样的 provider 会再次提示;控制台同步输出每个 provider 一次更详细的 warning。一旦该 provider 出现过任一 cache 字段,后续无字段的请求按完全 miss 正常显示黄色 miss。完全不回 usage 的 provider 保持静默(不产生任何提示)。正常续写(命中率 ≥ 80%)保持静默;re-billed 只显示未命中的 inputTokens。
miss 数据取自流中的 usage chunk(adapter 在终止 finish 之前就会发出),因此提示在 usage 到达时就出现(回复仍在生成中),不必等到 assistant 消息结束。每步在浏览器控制台输出一次,时间戳按浏览器本地时区。
安装
dsh plugin --profile web add dsh-cache-miss
重启 dsh web(或硬刷新正在运行的 GUI)以加载 client bundle。
已知限制
- TTFT 是 step 的
step/start事件到首个非空 token delta 事件的墙钟间隔,取自会话事件时间;当任一边界落在已加载窗口之外时视为缺省(不显示· ttft ...段)。 - 节点对每个 assistant step 都会发布,但命中时渲染为空,因此命中轮不产生可见行;每一步至多输出一条控制台日志。
- 从未出现 cache 字段的 provider 首次出现时显示一次灰色“无法确认”提示,不做启发式猜测——TTFT 受网络/负载影响,无法可靠区分"cache miss 导致慢"与"本来就慢"。
nocobase/nocobase
Yuer6327/NoLetMe
xiaohai-78/Top
Small-tailqwq/dsh-tps