Introduction¶
When developing plugins in DeepSeek Harness (DSH), errors in the target Plugin’s Host code, configuration, or dependencies may cause the development instance to fail to restart, or even affect stable DSH instances. To isolate this risk, a mechanism is needed to manage independent development environments.
dsh-plugin-dev-manager provides a stable control plane for managing isolated Plugin development instances. By creating independent DSH_HOME, Web profile, and port for each development Workspace, it ensures that faults during development do not impact the stable DSH.
Core Features¶
The plugin mainly provides the following capabilities:
- Isolated development environment: Creates an independent
DSH_HOME, Web profile, and port for each development Workspace, sets an independentDSH_AGENTS_HOMEand bundled-skill directory, and avoids scanning Skills from the stable instance. - Multi-Plugin composition: A Workspace can combine multiple local Plugins, fixed-version dependencies, and team Presets. Local members can be installed via
link:<absolute-plugin-path>, and configuration can be declared in the repository using.dsh-dev.yml,.dsh-dev.yaml, or.dsh-dev.json. - Lifecycle management: Supports starting, stopping, restarting, and inspecting the development DSH. It automatically starts the
dev:clientwatcher for each local member and runsdsh --profile web --dump-configbefore startup. - Build and validation: Performs dependency installation and initial build, supports running the target package’s
check,test, or a specified package script. It installs the pnpm tarball into a fresh environment, and after passing the clean-environment gate, calculates the SHA-256 value and writes the promotion metadata. - Management and logs: Provides a Plugin Dev management panel in the DSH Settings page, and reads Host, watcher, check, clean validation, and supervisor logs. It supports safely unregistering a single instance, and optionally cleaning managed development data while retaining promoted Releases and Plugin source code.
- Process safety: Localhost supervisor RPC uses native HTTP. If supervisor startup fails or it loses a race, it actively reaps the process that was just created. It refuses to stop port occupants for which the supervisor does not hold a process handle.
Installation and Enabling¶
When installing this plugin, you must specify an independent DSH Home path that is not used for shared work, and it must not point to Stable.
DSH_HOME=/absolute/path/to/isolated-dsh-home \
dsh plugin --profile web add "github:QuanQQQ/dsh-plugin-dev-manager#v0.4.3"
After installation, you can find the Plugin Dev management panel in the DSH Settings page.
Typical Usage¶
Create a Development Workspace¶
Call the RPC to create a development Workspace. The plugin automatically reads the development manifest, installs dependencies, performs the initial build, and assigns an independent port.
dsh_dev_workspace_create({ workspacePath: "/work/campaign-plugin" })
Configure a Multi-Plugin Workspace¶
Create a .dsh-dev.yml file in the Workspace root directory to define the Workspace composition:
version: 1
name: campaign-dev
preset: team-web
plugins:
- path: .
role: primary
watch: dev:client
- path: ../dsh-plugin-common
role: member
- source: github:example/dsh-plugin-storage#v1.3.0
role: dependency
Uninstall a Stable Plugin¶
Uninstalling a Stable Plugin involves four steps: preview, queue, remove, and verify.
- Preview: View the installation source, version, and blocking reasons.
dsh_plugin_uninstall_preview({ packageName: "dsh-example-plugin" })
- Queue: Confirm the impact scope and queue the uninstall.
dsh_plugin_queue_uninstall({
packageName,
expectedGeneration: preview.profileGeneration,
confirm: true
})
- Remove: Execute the actual removal operation.
dsh plugin --profile web remove --config.ignore-scripts=true <packageName>
Applicable Scenarios and Notes¶
- Applicable scenarios: When you need to develop plugins using a stable DSH and want to ensure that faults in the development environment do not affect other instances or the Stable environment.
- Permissions and paths: The plugin runs with the permissions of the current dsh process. The
DSH_HOMEspecified in the installation example must be an absolute path and must be used only for an isolated environment; it cannot point to a shared Stable directory. - Update mechanism: Plugin updates for shared Stable environments must use
dsh_dev_queue_update, and Runtime updates must enter the same queue for the isolated compatibility validation flow.
Summary¶
dsh-plugin-dev-manager helps developers isolate development risks by providing an independent control plane, a strict build validation flow, and a safe process management mechanism for plugin development. It confines the fault domain of development instances to a single Workspace, ensuring the stability of the development environment.