Boy-Grid/dsh-multi-folder-workspace--plugins-multi-folder-workspace0

@boy_grid/multi-folder-workspace

DeepSeek Harness 的多文件夹工作区插件,支持跨多个不同路径的文件夹创建统一工作区。

AI 分析

核心用途是允许会话同时读写分布在不同位置的多个成员文件夹。适合需要跨项目、多目录联合开发或管理任务的用户。必要条件是必须配合核心包补丁集使用,无法在原生 DSH 上直接运行。

包名
@boy_grid/multi-folder-workspace
版本
0.1.0
许可证
MIT
最近更新
2026年8月22日

安装

此插件尚未提供可验证的 bundle,或兼容性检查未通过。请先阅读仓库说明。 阅读完整 README ↗

@boy_grid/multi-folder-workspace

Multi-folder workspaces for DeepSeek Harness (DSH): one workspace spanning several folders that live in different places. Sessions inside it can read and write every member folder, and the workspace sits in the sidebar next to ordinary single-folder ones.

This package is the plugin half (browser/client) of the feature: the multi-select directory flow plus the member-management UI.

This plugin does not work on a stock DSH install. The feature reaches into several DSH core packages, so it ships together with a patch set for those packages (workspace.paths[], the addMember/removeMember RPCs, onPicked(paths[]), hasMemberManager, multi-root sandbox policy). Install both, or neither. The patch set lives in the repository.

What it does

  • Multi-select directory flow — occupies the directoryFlow slot and replaces the default single-folder picker with a centered browse-and-tick dialog (built on DSH UI primitives; ./.. rows, breadcrumbs, create-folder, a selected-members panel, dark-mode safe).
  • Member management — adds "Manage folders…" to the workspace row menu, driving the same dialog to add or remove members of an existing workspace. Adds go through the uniqueness and non-nesting checks; the last member cannot be removed; removing a member keeps its existing sessions grouped but revokes their write access immediately.
  • Friendly errors — host business errors (workspace-member-nested / -conflict / -not-found / -required, workspace-invalid-cwd) become one localized inline notice instead of a raw error dump.
  • Bilingual UI — ships zh and en locale dictionaries.

Security note

A multi-folder workspace widens the agent's write surface: in workspace-write mode, sessions in the workspace can write to every member folder, not just their own working directory. Paths outside the member set are still denied, and read-only / danger-full-access semantics are unchanged. The patch set modifies DSH's sandbox components (dsh-sandbox, dsh-sandbox-policy, dsh-sandbox-local, dsh-sandbox-windows-acl) to make this possible — review that trade-off before installing.

Install

Install this package together with the core patch set. Full steps: docs/RELEASE.md.

  1. Apply the 10 core patches through pnpm patchedDependencies and pin @deepseek-ai/dsh exactly to the baseline version (currently 0.1.1-rc.2). The repository ships a ready-made consumer-template/ with the patches and a frozen lockfile.
  2. Add this package to the profile bundles, enable directory-picker-browse, and disable the native directory-picker:
- id: directory-picker
  disabled: true
- insert:
    - id: directory-picker-browse
      name: '@deepseek-ai/dsh-host-directory-picker-browse'
    - id: multi-folder-workspace
      name: '@boy_grid/multi-folder-workspace'
  1. Restart dsh web.

Compatibility

Version
DSH baseline0.1.1-rc.2 (pinned exactly — the patches are built against this build)
Node>= 22

peerDependencies pins the baseline exactly on purpose: an open range would suggest the plugin works against any newer DSH, which it does not until the patch set is rebased.

Uninstalling

Removing the patch set is safe: the records the patched core writes keep a path field pointing at the primary member, so a stock DSH still starts and shows those workspaces as ordinary single-folder ones. It is one-way though — stock DSH drops the paths field the first time it writes a record, so the member set is lost after that. Back up $DSH_HOME/storages/workspace.json first if you want to keep it.

Development

pnpm run bundle     # tsdown build + rolldown emit of the __ModuleLoader__ client half
pnpm run typecheck  # tsc --noEmit
  • Entry points: src/index.ts (host half, service identity only) and src/client.tsx (client half).
  • dsh.client.inject declares dsh-client-runtime / dsh-client-ui-workspace / dsh-client-locale.
  • The published tarball is limited by files to lib/* plus LICENSE.

Documentation

Design, verification and release docs live in the repository's docs/ (written in Chinese): architecture, implementation status, manual E2E checklist, cross-platform testing, release runbook.

License

MIT. The patch set is derived from the MIT-licensed upstream @deepseek-ai/dsh-* artifacts; the upstream copyright notice is kept in the repository's THIRD_PARTY_NOTICES.md.