
TGYD-helige/dsh-pi
30Last commit Aug 14, 2026
dsh-pi DSH plugin
dsh-pi is a compatibility host that runs unmodified Pi extensions inside DeepSeek Harness (DSH). It creates one Pi runtime per DSH agent and maps Pi ExtensionAPI methods to DSH capabilities, enabling tools, commands, messages, and attachments. Instead of converting Pi source code, it adapts the observable surface at runtime, preserving Pi's lifecycle and session state.
How to install the dsh-pi DSH plugin
dsh plugin --profile demo add dsh-pi-host \Copying does not run this command. Review the repository and version before installing the dsh-pi DSH plugin.
dsh-pi DSH plugin data source
dsh-pi DSH plugin snapshot date: Aug 16, 2026
discovered
What the dsh-pi DSH plugin can do
- Register Pi flags and retrieve their values (registerFlag, getFlag).
- Send user messages with text and images as DSH follow-ups (sendUserMessage).
- Execute subprocesses with configurable cwd, env, timeout, and cancellation (exec).
- Expose Pi context capabilities to extensions: cwd, idle status, project trust, abort signal, and waitForIdle.
Where the dsh-pi DSH plugin fits
- Use a Pi image generation extension (e.g., @amaster.ai/pi-image-gen) inside a DSH agent.
- Run Pi video generation tools alongside existing DSH plugins without modifying the Pi code.
- Integrate Pi command-based extensions with DSH commands and lifecycle events.
- Test Pi extensions in a DSH environment during development or compatibility validation.
Who the dsh-pi DSH plugin is for
- DSH users who want to leverage the Pi extension ecosystem.
- Pi extension developers seeking to test or run their extensions within DSH.
dsh-pi DSH plugin limitations
- Only supports Pi 0.80.x and DSH 0.1.0-rc.6; the version range is intentionally narrow.
- Many Pi ExtensionAPI methods are only partially supported (e.g., registerTool, sendMessage, registerCommand) and some are completely unsupported (registerShortcut, registerMessageRenderer, registerProvider).
- Pi extensions are trusted Node.js code and are not sandboxed; allowLocalPaths is disabled by default.
- Requires users to provide their own API keys (e.g., GEMINI_API_KEY) and configure Pi settings.json separately.
dsh-pi DSH plugin: from the repository README
Quoted from the TGYD-helige/dsh-pi README, the upstream source of the dsh-pi DSH plugin. Copyright remains with the original authors.
Run trusted, unmodified [Pi extensions](https://pi.dev/docs/latest/extensions) inside [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness). This is a compatibility host, not a source-to-source converter: Pi's official loader and `ExtensionRunner` own Pi semantics, while this package adapts their observable surface to agent-scoped DSH tools, commands, messages, attachments, and lifecycle hooks. The project currently targets Pi `0.80.x` and DSH `0.1.0-rc.6`. DSH is still a developer preview; the peer range is intentionally narrow. ## Why a host instead of generated plugins An extension factory is executable code with lifecycle and session state. Converting its source once cannot preserve tools registered during `session_start`, mutable active-tool sets, cancellation, providers, or per-agent state. The host therefore creates one Pi runtime per DSH agent and reconciles registrations into that agent's Cordis context. ```mermaid flowchart LR C["DSH bundle config"] --> R["Package / manifest resolver"] R --> P["Pi loader + ExtensionRunner"] P --> A["Agent-scoped adapter"] A --> T["DSH tools"] A --> M["DSH commands"] A --> L["DSH lifecycle and messages"] F["
Read the full READMERepository license: Apache-2.0
dsh-pi DSH plugin questions
How do I install dsh-pi?
Install the published bundle and any Pi extensions you need in the same DSH profile. For example: `dsh plugin --profile demo add dsh-pi-host @amaster.ai/pi-image-gen @amaster.ai/pi-video-gen`. Then override the bundle's config in your profile's `cordis.patch.yml` to list the Pi extensions. For local development, you can use a path like `./dsh-pi` instead of the package name.
How do I configure Pi extensions for dsh-pi?
Place a `settings.json` file in your DSH profile directory (e.g., `$DSH_HOME/profiles/demo/settings.json`). Set the environment variable `PI_CODING_AGENT_DIR` to that profile directory. In `settings.json`, use Pi's standard format with top-level keys for each extension, such as `{"pi-image-gen": {"defaultModel": "nano-banana"}}`. API keys should be set in environment variables (e.g., `GEMINI_API_KEY`).
Does dsh-pi support all Pi extensions?
dsh-pi works with Pi extensions that use the supported ExtensionAPI methods. Many methods are partially supported or unsupported (e.g., `registerShortcut`, `registerMessageRenderer`, `registerProvider`). Check the compatibility table in the README to see which methods work. The host also has a `strict` mode that skips tools whose schemas cannot be fully represented in DSH.
Can I use dsh-pi with other DSH plugins?
Yes, dsh-pi is a DSH bundle and can coexist with other plugins. The Pi extensions are loaded as dependencies of dsh-pi, not as independent DSH layers. They are integrated into the same agent context. You can mix Pi tools and commands with DSH-native ones.
What are the version requirements for dsh-pi?
dsh-pi currently targets Pi 0.80.x and DSH 0.1.0-rc.6. The version range is intentionally narrow because DSH is still in developer preview. You need to ensure your Pi and DSH versions match these ranges. Check the README for the latest supported versions.