Files
deepseek-harness/packages/ssh/fs-ssh/README.md
T
sjw1231 2bd9913e2f refactor(apply-patch): drop unrelated changes and redundant prose
Restore files outside the patch feature to their merge-base state: the
invariant-check refactors across acp, session-controller, client,
compaction, agent-loop, agent, session-title, and subprocess, the cast
baseline edit, and the rescope-vendor skip list added during the merge.

Rename tool-fs.enableApplyPatch to applyPatch, matching the read, write,
and edit switches. Remove the unused collectMutationPaths export and the
unconsumed PatchHunk.contextLineIndices field, including its SSH schema
and fixtures. Report preflight refusals and syntax failures directly
instead of padding every phase with outcome, affectedPaths, and
cancelled fields. Add apply_patch to the shipped tool catalog test.

Fold the default-activation Agent Note into the apply_patch file-editing
note and delete it. Delete the guarded-filesystem-mutations upgrade
guide: every change is additive and all FileSystem subclasses live in
this repository. Trim defensive and reviewer-addressed sentences from
the package READMEs, subsystem docs, FileSystem JSDoc, and the Agent
Note, keeping the English and Chinese pairs aligned.
2026-10-20 20:25:24 +08:00

3.7 KiB
Raw Blame History

description, kind
description kind
Remote filesystem semantics for consumers sharing files with SSH subprocesses. package-reference

@deepseek-ai/dsh-fs-ssh

English | 中文

Summary

dsh-fs-ssh provides ctx.fs in the SSH helper’s filesystem. File tools read and mutate the same files that remote Bash, terminals, language servers and Node programs see. Remote canonicalization, version guards and atomic mutations use the local filesystem implementations installed beside the helper.

Table of Contents


Use this package

Mount this provider with dsh-ssh and sandboxPolicy; use its paired SSH subprocess and sandbox providers for execution. This provider has no configuration fields: connection identity and the default workspace belong to dsh-ssh, while file-effect mode belongs to sandboxPolicy.

resolve() canonicalizes paths on the remote host. processPath() and fileUrl() name files in that same remote namespace; they do not grant host-side access. File URLs encode literal percent signs, backslashes and newlines without changing the filename. processPathFromHostPath() returns undefined, so consumers requiring an installed executable or bootstrap must supply a remote artifact explicitly.

Reads preserve the shared filesystem error codes. All five mutations send the resolved per-call policy to the helper; patchText, deleteFile, and moveFile use fs.patch, fs.delete, and fs.move, with guards and results matching the local provider. Lost transport reports an I/O failure; a mutation may already have committed and is not retried automatically.


Understand the implementation

Implementation internals — click to expand

The helper reuses fs-local and fs-sandbox, preserving symlink identity, stale-version rejection, diff bases and publication semantics. UTF-8 streaming uses bounded pull requests and closes its remote iterator when the consumer stops early.


Further Exploration


Model Experience

Indirectly, through existing filesystem consumers, which present remote paths and file contents while owning every tool and prompt.

KV Cache effect

This provider contributes no request-prefix content. Its consumers own model-visible tools and results.

Known Limitations and Deferred Work

  • Whole-text reads and individual byte windows are limited to 8 MiB by the helper. Use text streaming or multiple byte windows for larger reads; other JSON transfers also obey the connection’s frame cap.
  • Filesystem watching is unsupported: the provider keeps no watch() override, so the base FS_IO_ERROR rejection applies without polling or opening a local watcher for a remote path. Ordinary reads and consumer-owned manual refresh remain available.
  • Remote file URLs are execution coordinates, not host filesystem handles or Web download links.

Dev Note

Working context for maintainers — click to expand

None.