xuanling-dsh-tools-replace
Verified@xuanling-rs/xuanling-dsh-tools-replace Β· v0.7.0 Β· MIT
Opt-in DeepSeek Harness filesystem replacement facade backed by XuanLing MCP with host approval, observation, image, and diff projection.
Install
dsh plugin add @xuanling-rs/xuanling-dsh-tools-replace Confirm the layer applied with dsh --profile default --dump-config β see the install guide.
Source
Published to npm without a public repository. Inspect the package contents before installing.
Readme
xuanling-dsh-tools-replace
English | Simplified Chinese
Opt-in DeepSeek Harness filesystem replacement: DSH's native
read/write/edit surface backed by XuanLing's SHA-256-guarded file
operations, with host approval, observation, image, and diff behavior
preserved. Package @xuanling-rs/[email protected].
What it is
Disables the native tool-fs plugin and registers six same-name tools:
readreads UTF-8 text through XuanLing and records the full body plus SHA-256 preimage for same-session edits.writecreates or replaces a file; replacing an existing file requires a same-sessionreadorfile_hash.editandedit_batchapply exact replacements, single or ordered multi-file; the batch supports whole-request preflight anddry_run.file_hashrecords a byte fingerprint only; it enables a guarded whole-file write but noteditoredit_batch.read_imageremains the native Harness implementation.
Reads and writes stay bound to the host filesystem version, so read/diff cards and observation rules keep working.
Why use it
- Use it for XuanLing's exact edits, SHA-256 CAS, atomic replacement, batch preflight, and recovery under DSH's existing prompts and cards, including migrations from the historical replacement package.
- Do not start here for a new installation. Prefer the recommended Memory preset or the full additive tools bundle; see the bundle guide.
- Do not combine it with
xuanling-dsh-toolsorxuanling-dsh-memory. This preset adds no XuanLing Memory tools.
Requirements
- DSH with the shipped
weborheadlessprofile; Node.js 22.14 or newer. - A DSH build that provides
@deepseek-ai/dsh-mcp-clientand@deepseek-ai/dsh-tool-fsfrom the0.2.1-rc.2capability channel. XUANLING_WORKSPACE_ROOTset to the confirmed absolute workspace; the facade fails startup when the root, bridge, native image tool, or required XuanLing definitions are missing.- macOS ARM64, Linux x64 with glibc 2.35+, or Windows x64 with MSVC.
Install
export XUANLING_WORKSPACE_ROOT=/absolute/path/to/project
dsh plugin --profile web remove @xuanling-rs/xuanling-dsh-memory @xuanling-rs/xuanling-dsh-tools
dsh plugin --profile web add @xuanling-rs/[email protected]
dsh --profile web --dump-config
The dump should show native tool-fs disabled and one xuanling-tools-replace
row; drop remove if those packages are absent. Use --profile headless for
the headless profile; a custom new profile name starts from the base bundle.
Quickstart
- Restart the profile and refresh DSH.
- Call
readon a text file insideXUANLING_WORKSPACE_ROOT; expect a native read card. Then callediton it: the mutation requires approval and renders a native diff card. - Optionally call
edit_batchwithdry_run: truefirst; the whole request is validated before any file changes.
Configuration
XUANLING_WORKSPACE_ROOTis required, absolute, and is the target root; the DSH process working directory is not an authorization source.- Observation is session-scoped.
writeon an existing file needs a same-sessionreadorfile_hash;editandedit_batchneed a same-sessionreadβ a fingerprint alone is not enough. A formatter or other external writer invalidates the next CAS; reread or rehash before continuing. readpages withoffsetandlimit(default 2000 lines per call); the full body is retained for edits.- Mutations require host approval; a rejected, cancelled, or unavailable approval fails closed.
- Tool-call budget: 120 seconds. Server name is fixed to
xuanling, and raw XuanLing mutation names are never exposed.
Limits and safety
- Six tools only. This is a filesystem facade, not the full catalog: no
fs_search,fs_glob,fs_copy,fs_move,fs_remove, and no process, project, artifact, session, or Memory tools. - Approval is required. A non-interactive profile or a missing approval channel fails closed by design.
- A hash is not a read.
file_hashpermits a guarded whole-filewritebut cannot authorizeeditoredit_batch. - No sandbox change. Pathname capabilities apply under the workspace root, but other tools and processes are unaffected; untrusted execution still needs host approval and an OS sandbox.
Troubleshooting
- Startup fails on the workspace root. Export the confirmed absolute path
in the environment of the DSH process; a non-absolute value reports
[XUANLING_FACADE_INVALID_ROOT]. - Startup mentions a missing XuanLing definition. The runtime is incomplete
or mismatched; reinstall the exact
0.7.0versions and restart. [XUANLING_FACADE_NOT_OBSERVED]or a rejected edit. Read the file first (or takefile_hashfor a whole-file write) in the same session; for an ambiguous edit, makeold_stringunique or re-read after an external change.- A mutation was rejected or blocked on approval. Approval was denied, cancelled, or unavailable; retry from an interactive profile.
- A conflict is reported for multiple runtime bundles. Remove the other XuanLing runtime packages and restart.