DeepSeek Harness (DSH) gains its core advantage from its plugin-based architecture and strong extensibility. Sometimes, developers need to replicate the core tool interaction contract of a specific Agent (such as Pi) while retaining DSH’s own backend capabilities (such as filesystem, session management, and more). The dsh-pi-compatible plugin is built precisely to address this need. It replicates the Agent Preset of the Pi tool group, provides a lowercase core tool contract and supports an extended version, while still being driven by DSH underneath.

Core Features

This plugin provides two presets: Pi-compatible Core and Pi-compatible Plus.

Pi-compatible Core

This preset replicates the core tool contract of Pi 0.84.2 and exposes seven core tools by default. These tools keep the same naming style as Pi, but their behavior is implemented by DSH.

  1. read: Reads a file, supporting offset and line-count limits, with a maximum safe limit of 64 MiB.
  2. bash: Executes Bash commands, creating a new process for each invocation, with no persistent state.
  3. edit: Edits a file, supporting fuzzy punctuation fallback and preserving BOM and newline formatting.
  4. write: Writes to a file, automatically creating parent directories.
  5. grep: ripgrep-based search, supporting JSON output and context control.
  6. find: fd-based search, supporting glob patterns and .gitignore ignoring.
  7. ls: Lists directory contents, including dotfiles, with case-insensitive sorting.

Pi-compatible Plus

In addition to Core, the Plus preset adds DSH-backend-supported extended tools, including:
* WebFetch
* WebSearch
* Task
* TodoWrite
* ExitPlanMode
* Think
* SlashCommand
* /plan
* /compact
* and DSH’s basic compression and tool result trimming features

Underlying Capabilities

All the aforementioned tools are built on top of DSH’s underlying capabilities, including:
* filesystem: File read/write and directory operations
* subprocess: Subprocess management
* attachment: Attachment handling (supports PNG, JPEG, GIF, WebP, BMP, etc.)
* session: Session management
* cancellation: Operation cancellation
* model-routing: Model routing
* presentation: Presentation capabilities

Installation and Enabling

Installing this plugin requires DSH’s Web profile.

  1. Run the installation command:
    dsh plugin --profile web add kingguuu8-svg/dsh-pi-compatible
Or install locally checked-out code:
    dsh plugin --profile web add .
  1. After installation, the plugin is extracted to the ${DSH_HOME:-~/.dsh}/.agent-presets/pi-compatible/ directory. This installation process is idempotent and will not overwrite an existing complete preset.

  2. Create a new session, and select Pi-compatible Core or Pi-compatible Plus from the preset list.

Runtime Configuration

The plugin depends on some external tools and configuration items. The following environment variables can be used to control behavior:

  • PI_COMPAT_BASH_PATH: Specifies the absolute path to the real Bash executable.
  • PI_COMPAT_FD_PATH: Specifies the absolute path to the fd tool.
  • PI_COMPAT_RG_PATH: Specifies the absolute path to the rg (ripgrep) tool.
  • PI_COMPAT_OFFLINE=1: Disables network downloads for fd and rg.
  • PI_OFFLINE=1: An alias for PI_COMPAT_OFFLINE, also disabling network downloads.
  • DSH_HOME: DSH’s home directory, which is also the cache root for the private pi-compatible/bin.

Tool resolution strategy:
* Bash: Prioritize Git Bash (on Windows), then Bash in PATH, and finally the version in the cache directory.
* fd/rg: Priority is environment variable > system path > cache directory > latest GitHub release (unless in offline mode).

Permissions and Trust

This plugin only supports the danger-full-access permission preset. It does not implement the upgrade workflow for narrower permission policies.

  • Trust statement: This plugin includes permissions to execute arbitrary Bash commands and modify arbitrary files. As a user Preset, it has the permissions of the loaded plugin. It is recommended to review the source code before installation.
  • Windows platform: Windows is a release blocker platform.
  • Pi baseline: The Pi baseline is permanently frozen at 0.84.2.
  • Compatibility boundary: Compatibility refers to patterns and key behavior, and does not require byte-level error messages or TUI rendering to be exactly consistent. DSH retains core control over path authorization, filesystem publishing, process tree cancellation, and similar concerns.