Preface¶
In the DeepSeek Harness project, the core workspace typically points to a primary workspace. In practical development, source code repositories, test repositories, and documentation repositories often need to be handled simultaneously. Without plugins, the common approach is to switch between multiple workspaces or open these directories in different sessions.
dsh-multi-folder offers an alternative: configuring secondary working directories within the same DSH project, allowing the agent to read, write, and execute in configured secondary directories without leaving the primary workspace.
What is This¶
dsh-multi-folder is a DeepSeek Harness plugin maintained by AngelosZou, licensed under MIT.
It adds a set of secondary working directories to a DSH project. The agent’s core cwd and other core attributes still point to the primary workspace, but configured secondary directories can participate in sessions based on the current permission mode.
Core Features¶
- Maintain the primary workspace as the core working directory while providing secondary working directories.
- In
workspace-writemode, configured secondary directories can gain the same read / write / edit / execute permissions as the primary workspace. - Permission mode semantics remain unchanged:
read-onlystill denies writes,workspace-writeallows, anddanger-full-accessallows. - Inject the list of configured directories into the system prompt and re-render it during each session assembly.
- When the directory set actually changes, notify the agent via a non-interrupting message queue at the next message boundary.
- Support configuring directories before the session starts: both the session header panel and the session-creation page can operate through the sessionless
multiFolderremote API. - Do not add new tools; it uses framework-level tool-pipeline interception and provides a session-scoped UI header entry.
- Support adding directories via the native picker, immediate remove / refresh, per-session switching, and reuse per-session cache.
- Support
/multi-folderslash commands:list,add,remove,set. - When the target path or
workdirfalls within a configured secondary directory,write,edit,pwsh, andbashcalls are re-rooted to that directory.
Installation and Enabling¶
First, confirm the environment meets the requirements:
- Node.js
>= 20 - A DSH profile composed of
@deepseek-ai/dsh-base+@deepseek-ai/dsh-web-app
Installation command:
dsh plugin --profile web add dsh-multi-folder
After installation, restart the DSH backend and then refresh the browser page.
Version compatibility is as follows:
- DeepSeek Harness 0.1.1 or earlier: use
dsh-multi-folder@0.1.7 - DeepSeek Harness 0.1.2-alpha or later: use the latest
dsh-multi-folder
Typical Usage¶
- Open the panel. You can use the Multi-folder button in the session header or the corresponding entry in the session-creation page.
- Add directories using the native directory picker; remove / refresh takes effect immediately.
- The panel switches per session and uses per-session cache.
- You can also use slash commands directly:
/multi-folder list
/multi-folder add "D:\path\to\repo"
/multi-folder remove "D:\path\to\repo"
/multi-folder set "D:\a" "D:\b"
- For commands that need to create files, set
workdirto the directory where the command will write. - For git, run commands from within the repository, not from the primary workspace using
git -C. - Read operations are not subject to these restrictions and do not require
workdir.
Permission Boundaries¶
Each restricted command can only run under one writable root at a time.
- If the command’s cwd remains in the primary workspace, it cannot create files in a secondary directory.
- If the command is re-rooted to a certain secondary directory, it cannot write to the primary workspace or another secondary directory in the same call.
- Direct write / edit attempts to per-workspace config files are rejected.
- The agent cannot self-grant directories; directory configuration is managed by the user.
How It Works (Briefly)¶
The plugin intercepts write, edit, pwsh, and bash calls at the framework level. When the resolved path or workdir falls within a configured secondary directory, the plugin re-determines the command execution root based on that directory while preserving the semantics of the original permission mode.
The directory list enters the system prompt, informing the agent of the directories available in the current session. Configuration changes are only notified via the message queue when they actually occur, avoiding repetitive prompts.
Applicable Scenarios and Notes¶
Suitable for developers who need to handle source code, tests, and documentation simultaneously within the same DSH project, and for scenarios where a fixed set of available directories is desired before the session starts.
Note: This plugin runs with the DSH process, uses the permissions currently possessed by the dsh process, and alters the available directory scope and command execution roots in sessions. Before installation, it is recommended to review the source code and confirm that the MIT license meets your usage requirements.
Summary¶
dsh-multi-folder solves the problem of “a project needing multiple directories to be simultaneously writable.” It retains the core attributes of the primary workspace while incorporating configured secondary directories into the same session, ensuring each command runs under only one writable root through permission boundaries.
Repository address:
https://github.com/AngelosZou/dsh-multi-folder
No verifiable directory page address was provided in the materials, so this article does not list a directory page link. Community directories belong to independent sites and have no official affiliation with DeepSeek / High-Flyer; they should not be regarded as an official app store.