The core philosophy of DeepSeek Harness is plugin-based extensibility. When building agents or handling complex development tasks, basic file operations and Shell environments often need more stable support. dsh-tool-plus is a foundational tool-enhancement plugin designed to fill these gaps with features such as persistent bash, structured reading, and multi-mode editing.

Core Features

The plugin covers multiple levels, from basic Shell usage to advanced file operations:

  • Persistent bash: Shell sessions maintain state across invocations (variables such as those set by cd and export are not lost); long logs are automatically handled by compression, and background tasks are managed automatically when output is extremely long; it can also intercept commands such as cat, grep, find, and sed-i to guide users toward dedicated tools.
  • Safe deletion: By default, the rm command moves files to the system trash instead of deleting them permanently. If you need to truly delete a file, use command rm.
  • Structured read: Supports reading by line range (:N-M) and raw content (:raw); large files return a structural summary by default, with details expanded as needed. It also supports reading zip, tar, SQLite, notebook, PDF, image, and web content.
  • Atomic write: Write operations return a diff; supports patch-style writes to zip and tar archive members and SQLite databases.
  • Multi-mode edit: Defaults to replace mode, and also supports three patch formats: patch, hashline, and apply-patch.
  • grep / glob: Provides full-text search and filename matching, with support for mtime sorting, context lines, and ignore-rule configuration.
  • Optional AST tools: Provides syntax-tree-based structured search and rewriting capabilities (ast_grep / ast_edit).
  • Agent presets: The plugin includes two built-in presets—Tool Plus Standard Enhanced and PTC (Code Mode). After installation, they can be selected from the preset list.

Installation and Activation

Before installing, ensure that the dsh CLI is installed globally and that Node.js is installed (version >= 22.19 or >= 24).

Web Installation

dsh plugin --profile web add --allow-build=@xiaoso/dsh-tool-plus --allow-build=koffi @xiaoso/dsh-tool-plus

Note: Web installation requires pnpm >= 10.4. If you encounter errors due to an older version, allow builds in ~/.dsh/profiles/web/pnpm-workspace.yaml, or run pnpm approve-builds --all.

Desktop Installation

Install inside the profile-specific directory for desktop:

cd ~/.dsh/profiles/desktop
pnpm add --allow-build=@xiaoso/dsh-tool-plus --allow-build=koffi @xiaoso/dsh-tool-plus

Local Development

Use a local link for development and debugging:

dsh plugin --profile web add link:<本仓库路径>

Typical Usage

After installation, the plugin automatically takes over the official bash / pwsh / file / search tools.

  • Read specific lines: Use the :N-M syntax to specify a line range.
  • Read raw content: Use :raw to retrieve the file’s raw content.
  • Truly delete a file: Add the command prefix before rm.
  • Patch editing: Use edit patch to specify patch mode.
  • Select a preset: Select “Tool Plus Standard Enhanced” or “PTC” in the tool settings.

Notes

  • Permission mode: It is recommended to use this plugin in danger-full-access mode to avoid sandbox mode accidentally blocking file writes due to permission issues.
  • Shell consistency: The plugin does not provide a separate pwsh tool; all shell scenarios are handled uniformly by persistent bash.
  • Safe deletion mechanism: Files deleted with rm are moved to the system trash, but their location and visibility differ across platforms (Windows, macOS, and Linux all behave differently; for example, on Linux, file names usually become UUIDs).
  • Version upgrade: Users upgrading from version 0.1.9 or earlier can safely delete the ~/.dsh/.agent-presets/ directory.

Summary

dsh-tool-plus integrates persistent Shell, structured file reading and writing, safe deletion, and multi-mode editing into a single plugin, significantly improving development and debugging efficiency in the DeepSeek Harness environment. For more details or to submit feedback, visit the plugin catalog or the GitHub repository.