Regenerate config/tool/module/event catalogs, Cordis API and client slot catalogs; re-record reviewed bilingual hashes instead of merging generated bytes. Accept deleted filesystem invariant companions. Master has no replacement event-invariant registration; keep delete-intent in typed events, policy guards, and behavior tests. Adopt master workspace-changes intent waterfalls and tool-execution recorder association, add a prepended delete-intent listener that delegates before capture, remove argument parsing and the fs-patch dependency, and retain the real-tool Review matrix. Keep master filesystem mutation-result metadata and tool switches alongside opt-in apply_patch. Await current-directory resolution in plan and no-follow preflight; store patch diffs as processPath. Adapt native/PTC fixtures to the supported modes. Preserve client patch diffs and stopped states with master partial arguments and absolute navigation. Use master's rewritten ProviderEditor, including its remaining repeated model validation. Regenerate the lockfile with pnpm install and align the new fs-patch package version. Clean retired package build outputs. Update exact rescope exceptions for verified preset and event identifiers from master; old package names remain rejected.
3.5 KiB
description, kind
| description | kind |
|---|---|
| 面向与 SSH 子进程共享文件的消费方,说明远端文件系统语义。 | package-reference |
@deepseek-ai/dsh-fs-ssh
English | 中文
概述
dsh-fs-ssh 在 SSH 辅助进程的文件系统中提供 ctx.fs。文件工具读写的文件与远端 Bash、终端、语言服务器和 Node 程序看到的文件一致。远端路径规范化、版本保护及原子修改使用辅助程序旁安装的本地文件系统实现。
目录
使用本包
将本提供方与 dsh-ssh 及 sandboxPolicy 一同挂载,并使用配套 SSH 子进程与沙箱提供方执行程序。本提供方没有配置字段:连接身份和默认工作区属于 dsh-ssh,文件效果模式属于 sandboxPolicy。
resolve() 在远端主机上规范化路径。processPath() 与 fileUrl() 在同一个远端命名空间中标识文件,并不授予主机侧访问能力。文件 URL 对字面的百分号、反斜杠和换行进行编码,保留原文件名。processPathFromHostPath() 返回 undefined,因此需要已安装可执行文件或引导程序的消费方必须显式提供远端产物。
读取保留共享文件系统错误码。五个变更操作都会向辅助进程发送逐次调用策略。patchText、deleteFile 和 moveFile 使用 fs.patch、fs.delete 和 fs.move;其防护和结果遵循本地提供方,包括目标已发布但源删除失败的结果。响应经过严格校验。取消或传输丢失可能使远端结果未知;请求不会重放,已提交效果不会回滚。
理解实现
实现细节 — 点击展开
辅助程序复用 fs-local 与 fs-sandbox,保留符号链接身份、陈旧版本拒绝、差异基线及发布语义。UTF-8 流使用有界拉取请求,在消费方提前停止时关闭远端迭代器。
进一步探索
模型体验
间接通过现有文件系统消费方产生影响,由它们展示远端路径及文件内容,并负责每个工具与提示。
KV Cache 影响
本提供方不贡献请求前缀内容。面向模型的工具与结果由消费方负责。
已知限制与延后工作
- 辅助程序将整段文本读取及单次字节窗口限制为 8 MiB。更大的读取需使用文本流或多个字节窗口;其他 JSON 传输也受连接消息大小上限约束。
- 不支持文件系统监听:提供方不覆写
watch(),由基类以FS_IO_ERROR拒绝;不使用轮询,也不为远程路径建立本地监听。普通读取与消费方提供的手动刷新仍可用。 - 远端文件 URL 是执行坐标,不是主机文件系统句柄或 Web 下载链接。
开发备注
维护者工作上下文 — 点击展开
无。