dsh-spawn: A DSH Client Plugin for Direct Command Execution Without Shell

Introduction

In DeepSeek Harness (DSH), models often piece together pipelines, change directories, and read files via the Shell tool. While the Shell is convenient, it can easily lead to entanglement between PowerShell and Bash syntax, and string-concatenating multi-step commands is often less clear than using structured tool calls. If you wish to “run programs directly via argv” and use spawn in PTC mode—along with optional file system query tools to replace the default Shell—you can install the community plugin @snylonue/dsh-spawn. The following section introduces what it is, the capabilities it provides, and how to install and select presets.

What is this

@snylonue/dsh-spawn (repository snylonue/dsh-spawn) is published by maintainer snylonue and categorized as a client-side plugin in the SkillHub directory. Its summary is “A tool to enable bashless dsh”: the core function is to provide the spawn tool to DSH, executing commands directly without going through a Shell. Additionally, two optional independent entry points, stat and list_dir, can be loaded for file system queries.

The npm package version is 2.0.0 (MIT), with an engine requirement of DSH 0.2.1-rc.2.

Core Features

spawn: Direct argv execution

Every spawn call initiates a job and relies on DSH services such as jobs, sandbox, sandboxPolicy, and workingDirectory. Foreground calls wait for the command to finish; if a timeout occurs, the job transitions to the background. Infrastructure-related failures throw errors in the foreground, while background jobs are marked as failed. Non-zero exit codes from commands are returned as normal results, consistent with the semantics of “command failed but call succeeded” in a Shell.

stat and list_dir (Optional)

The main package @snylonue/dsh-spawn only registers spawn. When directory listing or file status is required, you should load the following separately:

  • @snylonue/dsh-spawn/stat
  • @snylonue/dsh-spawn/list-dir

The tool-stat and tool-list-dir entries in the top-level configuration and their copies within presets are independent declarations; top-level copies are disabled by default. If using the PTC-spawn preset, you must modify the disabled setting within the preset sub-items, rather than only changing the top level.

Working Directory and Host Requirements

Only supports DSH 0.2.1-rc.2. spawn, stat, and list_dir rely on the host’s working-directory service (including directory switching and recovery for missing directories). Relative cwd overrides are resolved relative to the current working directory; the sandbox workspace root remains unchanged. The README explicitly states that there is no legacy host detection and no workspace/header cwd fallback.

PTC-spawn Preset

The plugin provides the preset PTC-spawn (id: ptc-spawn), which is based on PTC mode and uses the aforementioned tools to replace shell. This preset enables spawn, stat, and list_dir by default. If you wish to keep only spawn, you can set disabled: true for the corresponding entries in preset-ptc-spawn.config.plugins, for example:

- id: tool-stat
  name: '@snylonue/dsh-spawn/stat'
  disabled: true
- id: tool-list-dir
  name: '@snylonue/dsh-spawn/list-dir'
  disabled: true

The README mentions that using TypeScript or similar methods to combine multiple programs and process output is often more controllable than letting the model struggle within Bash/PowerShell—this is the design motivation, not a third-party evaluation conclusion.

Installation and Activation

Assuming the corresponding profile is ready and the npm package has been published, follow the README to install:

dsh plugin --profile web add @snylonue/dsh-spawn

Please replace web with the actual profile name you are using. Before installing, confirm that your local DSH version is 0.2.1-rc.2 and that you have the working-directory and related services available. The plugin runs with the permissions of the current DSH process; you should review the GitHub source code and LICENSE yourself before installation.

If you want to use the full PTC-spawn capability stack, enable the preset with the id ptc-spawn in your profile configuration (specific field names depend on your profile’s Cordis patch); for the main entry point only, simply load the default exported spawn.

Typical Usage (Conceptual)

The documentation does not provide complete conversation examples, but usage can be summarized as follows:

  1. After installing the main package, the model passes the executable file and an argument list (argv) via spawn, rather than a full Shell script.
  2. When directory listing or stat is needed, additionally load @snylonue/dsh-spawn/list-dir or @snylonue/dsh-spawn/stat, or enable the PTC-spawn preset to open all three at once.
  3. When you need to constrain the current directory, use the relative cwd supported by the working-directory service; do not assume that the legacy workspace header or header can automatically determine the cwd.

Specific tool schemas are subject to the type definitions (dist/index.d.ts, etc.) within the published package.

Use Cases and Notes

Who it is for: Agent developers already running on DSH 0.2.1-rc.2 using PTC or wishing to reduce Shell dependency; scenarios requiring job sandboxing, explicit working directories, and acceptance of the job model for every execution.

Notes:

  • Strict version binding; environments lower or higher than the engines.dsh in the README / package.json are not covered by the support statement.
  • The community directory SkillHub Plugin Page has no official affiliation with DeepSeek / High-Flyer. The DSH ecosystem itself is an independent community form where “everything is a plugin”.
  • Do not arbitrarily concatenate dsh plugin add github:... based on repository names; refer to the npm installation command in the README.

Conclusion

@snylonue/dsh-spawn separates “running programs directly” and optional file queries into independent tools and provides a Shell-free alternative path through the PTC-spawn preset. To further understand the classification and summary, you can view the directory page snylonue/dsh-spawn; implementation details and installation instructions are subject to the GitHub repository README.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye