DSH Desktop Edition 0.2.0 removed scanning of preset directories. Presets commonly used under the ~/.dsh/.agent-presets directory in 0.1.x environments will disappear from the mode selector. This plugin aims to restore this discovery channel by reconnecting the conventional 0.1.x preset directory to the DSH Desktop Edition 0.2.x mode list.
Plugin Overview¶
- Name: dsh-preset-bridge
- Maintainer: Lyrissonare
- Category: Workflow
- Core Features:
- Reconnect the conventional 0.1.x preset directory to the DSH Desktop Edition 0.2.x mode list.
- Handle the compatibility mapping from
@deepseek-ai/dsh-workflow-worker-threadto the officialdsh-workflow-ptc. - Support configuring additional scanning directories (roots) in
cordis.patch.yml. - Rewrite relative line names to absolute
file:URLs to fix mounting errors.
Installation and Enablement¶
Installing the plugin requires administrator privileges. Run the following command:
D:\DSH\resources\runtime\cli\bin\dsh.cmd plugin --profile desktop add https://github.com/Lyrissonare/dsh-preset-bridge
After installation, the desktop client must be restarted. After restarting, when creating a new session, check the mode selector; presets under .agent-presets should appear. You can also view them under “Settings” -> “Agent Presets” -> “Custom”.
Configuration¶
The plugin supports overriding configuration by id in the profile’s cordis.patch.yml:
- id: dsh-preset-bridge
config:
roots: # 额外扫描目录;缺省只扫 ${DSH_HOME:-~/.dsh}/.agent-presets
- D:/somewhere/else/presets
Notes¶
- Version restriction: Only applicable to the 0.2.x Desktop Edition profile (
>=0.2.0-rc <0.3.0-0); do not install it in a 0.1.x environment. - Mount status: Being “discovered” does not guarantee a “healthy mount.” The plugin is only responsible for registering presets into the registry; it does not manage the 0.2.x compatibility of the preset contents themselves. If a preset fails to mount, it will be displayed under “Settings” -> “Agent Presets” -> “Custom”.
- Compatibility mapping: Compatibility mappings are accumulated item by item and currently only cover known issues (mainly the replacement of
worker-threadwithworkflow-ptc). If a preset references other packages removed in 0.2.0, it may still fail to mount. - Engine differences:
worker-threadandworkflow-ptcare two different engine implementations (thread pool vs. spawned child processes). Workflow-type presets may have subtle differences in runtime details. - Major version updates: DSH major version updates may invalidate this plugin (in 0.3.0+, these conventions may change at any time).
- Transitional nature: This plugin is a transitional patch and may be retired at any time.
- No guarantee: This plugin is provided “AS IS” without any warranty.
Technical Details¶
- Relative path fix: When 0.2.0 mounts presets, it resolves relative script names based on the base URL at the declaration site; local scripts inside preset directories may fail to resolve. Before mounting, the plugin rewrites line names starting with
./to absolute addresses usingpathToFileURL. - Dependency replacement: Delegation groups in 0.1.x presets typically include
@deepseek-ai/dsh-workflow-worker-thread, which was removed in 0.2.0. The plugin replaces it in place with the official@deepseek-ai/dsh-workflow-ptcbefore registration. - Name collision handling: If preset names collide (with built-in presets or with each other), the registry throws an error. The plugin catches this, emits a warning, skips the entry, and prevents a single broken preset from blocking the registration of the rest.
Summary¶
dsh-preset-bridge is a transitional solution introduced to address the removal of directory scanning in DSH Desktop Edition 0.2.0. It can reconnect presets from the local .agent-presets directory back to the system, but it only covers known compatibility issues and does not guarantee that all presets will work.
- Project page: https://github.com/Lyrissonare/dsh-preset-bridge
- Directory page: https://www.skillhub.cn/plugins/Lyrissonare/dsh-preset-bridge