Introduction

When handling multiple projects in DSH, agents often need to simultaneously read, search, and modify files scattered in different directories. Opening directories one by one and searching paths one by one can slow down cross-project tasks and make interface management fragmented.

dsh-virtual-workspace does this: it first organizes multiple project directories into a named virtual workspace, and then allows agents to access these directories through a unified path syntax and tools.

What is it

dsh-virtual-workspace is a dynamic Cordis plugin for DeepSeek Harness (DSH), maintained by KevinWen7415, and is licensed under MIT.

It organizes multiple project directories into named virtual workspaces and provides the agent tool vws, sidebar drawer management, built-in workspace list mirroring, and write upgrades consistent with the session sandbox.

Core Features

Virtual Workspaces and Virtual Paths

The plugin maintains a mapping group of “name → multiple project directories” and can be used across sessions after a single definition.

The agent can access member directories using the virtual path syntax name:/relative_path. File operations take the first match, while directory operations take the union.

vws Tool

The plugin provides the agent tool vws, containing 13 actions:

list
add
remove
add-dir
remove-dir
set-mirror
resolve
read
write
edit
ls
find
grep

The tool and prompt segment are registered in the root context, so any agent in any session can call vws and see the workspace list.

The plugin takes over the “+ Add Workspace” button at the top of the sidebar. Clicking it opens a drawer where you can create standard workspaces, associated virtual workspaces, and manage existing workspaces.

Member directories are registered as built-in workspace entries with the title format “Workspace Name · Directory Name”. The plugin only cleans up entries it created.

Sandbox Consistency

Reading is unrestricted.

Writing and editing follow the sandbox boundaries of the calling session. If access is denied due to boundary crossing, one-time approval upgrades can be used via sandbox_permissions + justification.

Persistence and Language

Workspace definitions are saved in:

<deployed_workspace_root>/.vws-workspaces.json

On this machine, it is:

C:\Users\<user>\.vws-workspaces.json

It is automatically restored after restart.

The interface supports Simplified Chinese (zh) and English (en). zh displays Simplified Chinese; other languages fall back to English, and language switching takes effect immediately.

Installation Type

The plugin can be installed as a bundle or run as a dynamic Cordis plugin.

The bundle carries both Host and Client, loading automatically after process restart without depending on sessions.

Dynamic installation requires no build. Code constraints are pure JavaScript, without using import/require/JSX/TypeScript; the Client uses React.createElement; file operations must go through the ctx.fs service.

The version in package.json is 1.2.2. Dependencies are:

"@deepseek-ai/dsh-tools": "^0.1.0-rc.6"

peerDependencies are:

"@deepseek-ai/cordis": "^4.0.1"

Installation & Enablement

Bundle Installation

First confirm the DSH profile name, then execute:

dsh plugin --profile <name> add github:KevinWen7415/dsh-virtual-workspace
dsh --profile <name>

The bundle carries both Host and Client, loading automatically after process restart without depending on sessions.

Dynamic Installation

Send the following in a DSH session:

请从这个仓库自动安装插件:https://github.com/KevinWen7415/dsh-virtual-workspace(读取 src/host.js 与 src/client.js,用 cordis_define 定义后 cordis_run 激活)

If the DSH machine cannot access GitHub, clone it locally first:

git clone https://github.com/KevinWen7415/dsh-virtual-workspace

Then continue the installation using the local path.

The first activation of a package with browser UI requires page approval; if approval is denied, it will not retry automatically.

Manual Dynamic Installation

Manual installation involves three steps:

  1. Call cordis_define with the plugin set to:
{ "kind": "new", "idPrefix": "vws" }

Fill the function bodies of src/host.js and src/client.js into code.host and code.client respectively.

  1. Record the returned pluginId and packageId.

  2. Call cordis_run with mode run.

After approval passes and a success notification is received, refresh the page.

Verification

  1. Click the “+” at the top of the sidebar to confirm the Virtual Workspaces drawer pops up.

  2. Add a workspace in the drawer.

  3. Send the following in the chat:

用 vws list 列出虚拟工作区

If the agent returns the workspace status, the installation is available.

Typical Usage

Driven by Natural Language

You can tell the agent:

读 EDB:/src/xxx
在 EDB 里搜索 xxx
把 EDB 的 xxx 改成 yyy

If writing exceeds the current session boundary, the agent will initiate an upgrade request; after approval, the one-time write is completed.

Update and Rollback

To update the version:

对同一 pluginId 用 cordis_define(kind: existing)追加新包,再 cordis_run mode update

To roll back:

cordis_run mode run 指定 currentPackageId

To disable:

cordis_stop

Before uninstalling, you must first clean up workspaces or mirrors, then execute:

cordis_stop
cordis_undefine

The cleanup method before uninstalling is to remove workspaces in the drawer or close mirrors. If there are residual entries in the built-in list after uninstalling, they can be manually deleted in the official sidebar.

After Process Restart

Dynamic plugins persist with the DSH process. After the DSH process restarts, you need to activate the original pluginId again with cordis_run; workspace definitions are persistent and will not be lost.

Use Cases & Notes

Suitable for the following scenarios:

  • Multiple project directories need to be read, searched, or modified together.
  • You want the agent to access multiple directories through unified named paths.
  • You want to create, manage, and mirror virtual workspaces in the sidebar.
  • You need to preserve DSH’s session sandbox boundaries and handle one-time approval when writing exceeds boundaries.

Notes:

  • The plugin runs with the current DSH process permissions; check the source code and license before installing.
  • The license is MIT.
  • Reading is unrestricted; writing and editing are limited by the sandbox boundaries of the calling session.
  • Dynamic installation depends on the DSH process; activation is required again after process restart.
  • If the DSH machine cannot access GitHub, clone the repository locally first.
  • Workspace definitions are saved in .vws-workspaces.json; understand the file location before uninstalling or migrating.

Links

  • GitHub: https://github.com/KevinWen7415/dsh-virtual-workspace
  • Directory Page (Independent Site): https://www.skillhub.cn/plugins/KevinWen7415/dsh-virtual-workspace