The core logic of DeepSeek Harness (DSH) is “one session, one workspace,” meaning it corresponds to a root directory in the file system. In real-world development, a complete project is often split across multiple directories (for example, separate frontend and backend, with documentation stored independently). When an Agent needs to operate on these directories, manually entering absolute paths is both cumbersome and error-prone (especially when directory names are highly similar).

The dsh-workspace-plus plugin solves this problem by establishing a “label → absolute path” mapping for directories inside a workspace. It provides a set of directory management entry points for each workspace and injects the mapping table into the Agent’s context, allowing the Agent to locate files precisely without repeatedly pasting paths in the conversation.

Core Features

This plugin provides three main interaction entry points:

  1. Directory button on workspace rows: In the workspace list rows in the DSH sidebar, a “Directory” button is inserted. Clicking this button opens a configuration window for registering multiple directories and their labels for the current workspace.
  2. @ trigger in the conversation input box: Typing @ in the conversation input box opens a candidate list showing all labels from the currently enabled workspaces. After selecting a label, a reference chip is inserted, and the absolute path corresponding to that label is submitted to the model.
  3. Toggle on the Settings page: In the workspace+ section of DSH settings, you can enable or disable this plugin feature for each workspace individually. By default, all workspaces except the default workspace are enabled; the default workspace is disabled.

Usage

1. Enable the Feature

Go to the DSH Settings page and find the workspace+ section. Turn on the corresponding switch for workspaces where you want to use this feature. After enabling, a Directory button appears on the workspace row, and directory mapping tables are automatically injected into conversation requests for that workspace.

2. Manage Directories

Click the “Directory” button on the workspace row, then add directories in the pop-up window.
* Add method: Click the “Select Directory” button to open the system native dialog. After selecting a path, a label is automatically generated.
* Label naming: If no label is entered for the selected directory, the system tries to generate one based on the directory name (e.g., D:\proj\my api -> my-api). Pure Chinese directory names are not automatically generated.
* State file: The configuration is persisted in $DSH_HOME/workspaceplus/directories.json.

3. Reference Directories

Type @ in the conversation input box to see the list of labels for the workspace of the current session (as well as other enabled workspaces).
* Scenario: If you type @backend, the model receives D:\proj\backend, not just backend.
* Fallback: If context injection is compressed or lost for some reason, the model can still continue working using the absolute path selected with @.

4. Tool Calls

In addition to context injection, the plugin provides the workspace_dirs tool, supporting operations such as listing, adding, and removing through the action parameter, for dynamically adjusting directory mappings in the conversation.

Technical Implementation and Configuration

Data Storage

The plugin maintains a standalone JSON state file located at $DSH_HOME/workspaceplus/directories.json (or at ~/.dsh/workspaceplus/ if DSH_HOME is not set). The file structure is as follows:

{
  "version": 1,
  "settings": {
    "defaultWorkspaceEnabled": false,
    "workspaceEnabled": {
      "d:\\projects\\api": true
    }
  },
  "workspaces": {
    "d:\\proj": {
      "path": "D:\\proj",
      "dirs": [
        {
          "label": "backend",
          "path": "D:\\proj\\backend",
          "note": "后端 API"
        }
      ]
    }
  }
}
  • workspaceEnabled: Controls whether the plugin feature is enabled for each workspace.
  • workspaces: Stores the specific directory mapping relationships.

Context Injection

The plugin registers a runtime-context contribution on the host side with a priority (order) of 130. Each time a request is made for that workspace session, the system injects the directory mapping table into the Agent’s context, explicitly informing the Agent of path rules (such as “labels are case-insensitive” and “work only within the label’s directory”).

HTTP Routing

The plugin provides the POST/GET /workspaceplus/api route for interaction with the UI, following the shell-layer authentication mechanism.

Sandbox Limitations and Notes

According to DSH’s sandbox policy, each session has only one writable root directory. This means that although the plugin can manage multiple directories, the actual file write operations of the Agent must still fall under the current session’s workspace root directory, or be performed through specific file-system operations via tool calls.

Also, the plugin is open-sourced under the MIT license, with source code on GitHub. Before installation, it is recommended to review the source code to confirm that its runtime behavior meets your security requirements.