acefun29/dsh-file-mount
Project Overview项目介绍
This is a native DeepSeek Harness plugin that adds incremental file mounting and duplicate read deduplication functionality to DSH. It keeps track of which line ranges of each file have already been added to the model's context window, so repeated reads only add the missing or modified lines instead of the entire file. It also includes a dedicated dashboard in the DSH UI to show the current mounting status of all files, and it is ported from the context-mount mechanism of the piwpi project. The recommended installation method is to use the pre-built release via the DSH CLI command, which is straightforward and does not require building from source.
The core problem this plugin solves is redundant token usage when AI agents repeatedly read the same file. It is common for agents to read a file, make a small change, then read it again, which would normally send the entire file content again even though most of it is already in the model's context. This plugin keeps a ledger of what has already been read, so it only sends the new or changed lines, cutting down on unnecessary token usage and reducing cost for users. Many users find that this reduces total token consumption significantly for long-running development sessions, especially when working on large codebases.
The plugin requires Node.js version ^22.19 or >=24 to run, and you must have pnpm installed to complete the installation process. After installation, you will need to restart your DSH harness for the plugin to activate, as just refreshing the web page is not enough to load the plugin. It is released under the permissive MIT license, and users can configure a range of options including excluded file glob patterns, cache capacity, and cross-session token statistics persistence. There are some known limitations, such as the DSH read UI card being downgraded to a generic card after the result text is replaced by the plugin.
这是一款专为DeepSeek Harness打造的原生插件,核心功能是提供文件增量挂载和重复读取去重。它会记录每个文件中哪些行范围已经进入模型上下文,重复读取时只补充缺失的内容,文件修改后也只会按行对比补充改动的行,还提供了「挂载文件」仪表盘实时展示挂载状态,功能移植自piwpi项目的context-mount机制。
在AI开发流程中,智能体经常会反复读取同一个文件,比如修改几行后再次读取,每次完整读取都会产生额外的token开销,大部分内容其实模型已经处理过。这款插件通过记录已读内容的账本,从第二次读取开始只发送真正缺失或改动的内容,有效减少不必要的token消耗,适合需要节省上下文token的DSH用户使用。
它要求Node.js版本为^22.19或>=24,需要pnpm才能完成安装,可以通过预构建包快速安装,也可以从源码安装,安装后必须重启harness才能生效。插件采用MIT许可证开源,支持多维度配置,同时也存在一些已知限制,比如替换结果文本后UI的read卡片会降级为通用卡片。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-file-mount(acefun29/dsh-file-mount)
仓库:https://github.com/acefun29/dsh-file-mount
本站详情页:https://www.yhbd.top/plugins/acefun29-dsh-file-mount/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 18 · 最近提交 2026-09-27 · 主语言 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 更稳。
- 18 stars - an early-stage project星标 18,属于早期项目
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 file:$(pwd)/dsh-file-mount-$(node -p "require('./package.json').version").tgz
把 acefun29/dsh-file-mount 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-file-mount
DeepSeek Harness 插件:文件增量挂载 + 重复读取去重。记录每个文件哪些行范围已经进入模型上下文,重复读取只补缺失的部分;文件在磁盘上变化时按行级对比只补改动的行;并用「挂载文件」仪表盘实时展示账本。
移植自 piwpi 的 context-mount 机制。
为什么需要它
Agent 会反复读同一个文件:刚看过一眼的实现,改两行再看一次;或者换个窗口范围再读一遍。每一次都是完整的 token 开销,而其中绝大部分内容模型刚刚才看过。
这个插件把「读过什么」记成账本。第二次之后的读取只把真正缺失或改动的行送进上下文,重复的部分换成一行去重说明——省下的是上下文,也是钱。
效果

- 模型侧:读过的行范围不重复进上下文(去重 marker);缺失/改动的正文写进本次 read 的工具结果(增量 / 重挂),纸条只记账本声明;文件改动后只补改动的行(行级 diff,日志追加只补新尾巴——超出行级底稿上限的大文件也走追加识别);AI 自己写过的文件回头读直接免单(写后磁盘内容与模型写入不一致时除外,例如被 format-on-save 钩子改写);
file_mount_forget工具让模型能主动强制重读。 - 界面侧:「挂载文件」标签页是仪表盘——打开时停在顶部,净节省与路径搜索固定在顶栏,文件列表单独滚动;每个文件行可展开成文件段列表,每段带新鲜度色带(绿=新鲜 / 黄=一般 / 橙=接近过期 / 红=已过期 / 灰=未知)和过期次数;另有覆盖图(色块标出已挂载行在文件中的位置)、搜索、排序、净节省与人民币折算;对话区有上下文注入折叠行,「文件已变更」时行上有角标。
- 节省统计:中文按 1 字 ≈ 1 token、其他按 4 字符 ≈ 1 token 估算;同时记账「省下的」和「插件开销」(状态通知、marker、过期重发正文),界面显示净值(为负时按 0 显示);可选把跨会话总账落盘(
statsFile)。
安装
一个包两面:dsh.bundle.patch 挂载宿主插件行,dsh.client manifest 让 Web 端扫描出浏览器半部。装进 profile 后必须重启 harness(刷新页面不够)。需要本机有 pnpm(dsh plugin 转调它)和 Node ^22.19 || >=24。
快速开始(推荐)
npx --yes @deepseek-ai/dsh plugin --profile web add https://github.com/acefun29/dsh-file-mount/releases/latest/download/dsh-file-mount.tgz
npx --yes @deepseek-ai/dsh --profile web
已有全局 dsh 时,第一行换成 dsh plugin --profile web add <同一个地址>。装的是预构建包:不走 npm,也不需要 allowBuilds。
若 npx @deepseek-ai/dsh 长时间没输出,多半在拉 CLI(首次要下整棵依赖树),等它结束即可。
从本仓库源码安装
pnpm dsh:install
安装器会构建、打包 tarball,再用 file:E:/...tgz 交给 pnpm。
Windows 注意:不要对目录路径用
dsh plugin add .或file:E:\...(反斜杠)。pnpm 会把盘符拼进 profile 目录(profile\E:\...),插件装上但不激活。安装器已经处理了这个坑。
手动装本地 tarball
pnpm run build
npm pack --ignore-scripts
dsh plugin --profile web add file:$(pwd)/dsh-file-mount-$(node -p "require('./package.json').version").tgz
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
liangmianya/dsh-synapse
alaliqing/claude-paper
acryldev/acryl
omdsh-dev/dsh-annotation
Anionex/dsh-turn-rewind
Tyan66666/billion-context-dsh
qkycir-123/dsh-run2skill