dsh-workspace-switch: Isolate Skills, MCP, and Plugins by Workspace

Introduction

In DeepSeek Harness (DSH), a single process often hosts multiple workspaces and multiple Agents. Skills, MCP servers, and plugins enabled in a Profile are, by default, treated identically across all workspaces. When performing security audits, writing documentation, or running game engine toolchains, you often want to ensure that “a specific set of MCPs is not exposed in this directory” or “a certain plugin is disabled for that project,” rather than modifying the global Profile or splitting into multiple Harness instances.

The following introduces the community plugin dsh-workspace-switch (maintainer liaoyuqing, SkillHub category admin-security): it allows you to individually decide which plugins, MCP servers, and skills are available to sessions in each workspace. You can edit these switches via a dialog in the workspace row menu. Workspaces that are not configured continue to inherit the deployment-level composition, behaving exactly as they would without the plugin installed.

What is this

dsh-workspace-switch is a bundle plugin for DSH (npm package name dsh-workspace-switch, version 0.2.0 according to current data, MIT License). It solves the problem of multi-workspace capability isolation: within the same Harness process, Agents in two different workspaces can see different Skill directories, MCP tool sets, and plugin tool sets.

The plugin consists of two halves, yet presents as a single plugin externally:

  • Host half (lib/index.js): Reads the configuration for the workspace when creating an Agent and applies it to that Agent’s own Cordis scope. Disabled skills are registered as non-callable “shadows” within a scope of the same name, disappearing from the skill directory visible to the model; disabled MCPs reject all mcp__<serverName>__* tools within that scope; disabled plugins reject the tool names declared in their entry.
  • Browser half (lib/client.js): Adds a row to the workspace ... menu that opens a dialog. This dialog lists the capabilities provided by the current composition categorized by type, with a switch for each item.

The Host half also provides the configuration routing used by the dialog.

Core Features

Per-Workspace Enable/Disable of Three Capability Types

  1. Skills: When enabled: false, they are gated within that workspace’s scope; they are not exposed from the directory and are not loaded. The files remain on disk (see limitations below).
  2. MCP: Once disabled by server name, the corresponding mcp__* tools are rejected within that scope.
  3. Plugins: Once disabled by plugin, the tool names listed in the plugin entry’s tools array are rejected. Plugin entries that do not declare tools cannot have any tools gated.

Configuration Sources and Priority

There are two writable configuration locations for the same workspace; the latter overrides the former:

  1. <DSH_HOME>/workspace-switch.json, where workspaces uses workspace directory paths as keys;
  2. <workspace>/.dsh/workspace-switch.json: If it exists, it replaces the entry for that workspace in the shared file.

Missing entries imply enabled. enabled: false indicates that the item is turned off in that workspace.

The dialog writes to the file that is “currently effective” for the workspace: if .dsh/workspace-switch.json exists within the project, it writes to the project file; otherwise, it writes to the shared store. Writes are published via a temporary file followed by a rename to avoid reading half-written documents.

Example (excerpt from the official README):

{
  "workspaces": {
    "E:\\my_project\\godot-game": {
      "plugins": { "mcp-godot-ai": { "enabled": false, "tools": ["mcp__godot-ai__run"] } },
      "mcp": { "godot-ai": { "enabled": false } },
      "skills": { "godot-scene-authoring": { "enabled": false } }
    }
  }
}

The keys in workspaces must match the actual workspace directory paths (the example shows a Windows path; on Linux, replace it with your absolute path).

Unconfigured Workspaces

If a workspace has no entry in workspace-switch.json, it fully inherits the deployment composition, and the plugin does not alter its behavior. Isolation is only applied to workspaces that have been explicitly configured.

Installation and Activation

The plugin is installed as a DSH bundle: add it to a profile and select it within that profile.

The installation method described in the documentation is a local link (not a direct github:owner/repo install; the repository notes that direct cloning might lack the committed lib/ entry, and an independent clone cannot complete the browser build outside the repository):

dsh plugin add link:/path/to/dsh_workspace_switch

Then, add dsh-workspace-switch to the dsh.profile.bundles of that profile. The new bundle line will be loaded on the next Harness startup.

The runtime environment requires Node >= 22 (from engines in package.json).

Typical Usage

  1. Complete the installation as described above, write the bundle to the profile, and restart DSH.
  2. Open the target workspace, open the ... menu on that row in the workspace list, and enter the workspace-switch dialog.
  3. In the dialog, view items currently managed by the Host categorized by plugins / MCP / skills. Use the switches to turn off unneeded capabilities; after saving, the configuration is written to the project-internal or <DSH_HOME> workspace-switch.json.
  4. If version control or team sharing is required, maintain <workspace>/.dsh/workspace-switch.json in the repository; for local-only policies, <DSH_HOME>/workspace-switch.json is commonly used.

When manually editing the JSON, plugin entries must include the list of tools names to be gated, matching the tool names registered by the plugin.

Use Cases and Notes

Who is it for

  • Running multiple projects mixed within the same DSH instance, where different projects have different requirements for Skill / MCP / plugin exposure.
  • Requiring minimal exposure for a single workspace while keeping certain capabilities enabled in the “Global Profile” (admin-security type control).

Known Limitations (Official README)

  • Skills are gated, not unloaded: After being turned off, the files remain on disk, but are simply not displayed or loaded in that workspace’s scope.
  • Plugin disabling relies on the tools declaration in the entry; without a declaration, tools cannot be rejected by name.
  • The dialog only lists capabilities already exposed by the Host’s current composition; items not appearing in the profile / manifest cannot be configured here.

Security and Permissions

DSH plugins run under the permissions of the current dsh process and can read/write configuration, affecting tool and Skill visibility within the Agent scope. Before installation, please review the GitHub Source Code and the MIT License yourself to ensure compliance with your deployment and compliance requirements. The SkillHub directory page is a community collection and has no official affiliation with DeepSeek / High-Flyer.

For developers modifying the plugin within the Harness source tree: the browser half needs to be built using the toolchain within the repository; lib/ is committed to the repository. If changes require rebuilding the browser half, lib/ should be submitted together (see the Build section of the repository README for details).

Conclusion

dsh-workspace-switch separates “which workspace can use which Skills, MCPs, and plugins” from the Global Profile, managing them uniformly via configuration files and a UI dialog. It applies these settings to the Cordis scope when the Agent is created, making it suitable for scenarios involving parallel multi-workspace usage with the need for capability isolation.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye