
Security News
Rust 1.100 Will Add Dependency Cooldowns to Cargo
Rust 1.100 will add opt-in dependency cooldowns to Cargo, giving security scanners and maintainers time to catch malicious crate releases.
dsh-remote-file-system
Advanced tools
「DSH·远程文件系统」:提供模型可见的远程文件工具 read_remote、write_remote、edit_remote,经 ssh 读写远程主机文件;并在 Web 右侧栏以 remote tab 预览远程文本,补上内置查看器只认本地文件的缺口。write_remote 只允许新建,绝无覆写分支;文件后端 RemoteFileSystem 不继承 FileSystem,仅借用 @deepseek-ai/dsh-fs 的类型词表与 FsError。标准可安装的 dsh host 与 client 插件
模型可见的远程文件工具 read_remote、write_remote、edit_remote,经 ssh 读写远程主机文件;并在 Web 右侧栏以 remote tab 预览远程文本。标准可安装的 dsh host 与 client 插件。
DSH 只有本地文件系统的读写能力,而读写远程文件只能用 PowerShell 再套 bash 的 ssh 命令,非常容易出错。这个插件提供了三条可在模型中直接调用的远程文件工具,读写远程文件无需再套 ssh 命令。并将兼容 dsh-edit-diff 和 dsh-write-rule-guard 的优化显示与规则检查。
前面三件只管本地。一旦要改别的机器上的文件,差异显示与内容规则一条都不在场,本地也没有远端文件的旧快照,比不出改了什么,只能套着 ssh 拼命令盯着回显猜。本插件把这套显示与规则一起带过去。
| 工具 | 作用 | 关键语义 |
|---|---|---|
read_remote | 读远端 UTF-8 文本,行号分页 | offset、limit、totalLines,与原生 read 一致 |
write_remote | 远端新建文件 | 只允许新建,目标已存在即拒绝,绝无覆写分支 |
edit_remote | 远端字面替换 | 唯一匹配,多现拒绝,未命中报错;支持 replace_all |
内置查看器只认主机本地文件:点开 wsl:~/x.md 时地址是 dsh-resource://file/session/<id>/wsl:~/x.md,内置 text 类型经 ctx.fs 在本地查找而失败。
client 半身注册 remote tab 类型,以 extension 优先级认领这类能解析出远程别名的地址,经 Host 自注册的 /remote-file-system 通道读取远端文本。外观与内置文档预览一致:38px 路径栏、同一组换行与重新加载图标按钮;代码文件交给共享的 CodeBlock 渲染,可切换代码与纯文本,其他文件按源码行渲染。支持 params.line 定位与手动刷新。本地文件仍由内置查看器处理。
read_remote 的工具卡按工具名接管,卡内路径是可点击链接,点击即在右侧栏打开对应的 remote tab;点整行可展开结果文本。内置 read 卡只按工具名 read 注册,read_remote 没有条目而走通用行,也就没有打开文件的入口,故由本插件补上。
ssh 目标与远程路径合在一个 file_path 字段,沿用「别名:路径」前缀,别名取自 ~/.ssh/config:
wsl:~/x.md
myserver:/etc/hosts
只收绝对路径或 ~/ 开头;裸相对路径直接拒绝。
四件一起讲的宣传片,中文与日语配音两版同在一个投稿里:
| 文件四件套宣传片 · 一个核心,三个辅助 |
|---|
![]() |
从 GitHub 安装:源码在 src/,lib/ 不入仓库,安装时 npm 会触发 prepare 脚本现场构建。
dsh plugin --profile web add github:better-er/dsh-remote-file-system
从 npm 安装:包内已含构建产物 lib/index.js 与 lib/client.js,安装时不再构建。
dsh plugin --profile web add dsh-remote-file-system
两种方式装完都会自动挂载,重启 DSH web 后启用,无需手工编辑任何文件。
dsh plugin --profile web remove dsh-remote-file-system
彻底移除,重启 DSH web 后不再加载。
文件后端 RemoteFileSystem 刻意不继承 @deepseek-ai/dsh-fs 的 FileSystem 与 cordis Service,避免「继承即注册」污染会话 ctx.fs;只借用 dsh-fs 类型词表与 FsError。字节经 base64 再经 ssh 传输。
浏览器半身经 Host 自注册的 /remote-file-system 通道读取远端文本,复用 connection.requestRejection 做 Host 校验与浏览器鉴权,与 dsh-classic-coding 的 src/rpc-channel.ts 同源。
pnpm install # 装依赖,含 devDeps 类型与 esbuild
pnpm build # esbuild 打包 host 与 client 半身到 lib/
pnpm typecheck
node smoke/verify.mjs # 手动组装最小 cordis 组合,对 wsl 冒烟三工具
node smoke/rpc-smoke.mjs # 对源码的 RPC 通道做信封级冒烟,不依赖 @deepseek-ai 包
@deepseek-ai/dsh-fs、@deepseek-ai/dsh-tools、@deepseek-ai/dsh-system-prompt 版本 0.2.0-rc.2,@deepseek-ai/cordis 版本 4.0.2。构建必须把这些包 external,与 host 共享单一 cordis 与 dsh-fs 实例;否则双原型会让 instanceof FsError 与 Service 标识错位。
FAQs
「DSH·远程文件系统」:提供模型可见的远程文件工具 read_remote、write_remote、edit_remote,经 ssh 读写远程主机文件;并在 Web 右侧栏以 remote tab 预览远程文本,补上内置查看器只认本地文件的缺口。write_remote 只允许新建,绝无覆写分支;文件后端 RemoteFileSystem 不继承 FileSystem,仅借用 @deepseek-ai/dsh-fs 的类型词表与 FsError。标准可安装的 dsh host 与 client 插件
The npm package dsh-remote-file-system receives a total of 0 weekly downloads. As such, dsh-remote-file-system popularity was classified as not popular.
We found that dsh-remote-file-system demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
Rust 1.100 will add opt-in dependency cooldowns to Cargo, giving security scanners and maintainers time to catch malicious crate releases.

Security News
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.

Security News
Anthropic’s free OSS Scanner uses Mythos and other Claude models to find open source vulnerabilities and send maintainers reports with proposed fixes.