DeepSeek Harness plugin

dsh-workspace-files-brickmak

为 DSH Web 提供当前工作区文件树右侧栏

Jump to install

Source facts

Repository
brickmaker/dsh-workspace-files
Latest update
Aug 16, 2026
Category
Tools & Capabilities
GitHub stars
1
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/brickmaker/dsh-workspace-files
Plugin: dsh-workspace-files-brickmak
Author: brickmaker

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer3 files
README.mdSource · read only

DSH Workspace Files

DSH Workspace Files 是一个精简的 DeepSeek Harness(DSH) Web 插件。它在 DSH Web 右侧显示当前会话工作区的文件树;点击目录可展开下一层,点击文件会调用 DSH 已有的 openPath 能力,由宿主操作系统使用默认应用打开。侧栏默认关闭,可通过会话右上角的面板图标打开或关闭。

功能

  • 在 DSH Web 的 details 右侧栏显示当前工作区。
  • 在会话右上角提供侧栏开关图标,默认不占用右侧空间。
  • 文件树按需逐层读取,不会启动时递归扫描整个项目。
  • 每层最多返回 1000 个条目,避免超大目录产生无界响应。
  • 目录在前、文件在后,同类按名称排序。
  • 文件通过 DSH 的宿主接口打开,不在浏览器中读取或预览内容。
  • 目录读取以当前会话记录的工作区为根,并校验真实路径;.. 和越界符号链接不能读取工作区外部目录。
  • 插件卸载后,路由、样式和右栏注册会由 Cordis 生命周期自动清理。

兼容性

  • DSH:0.1.0-rc.50.1.x
  • Node.js:^22.19.0>=24
  • 界面:DSH Web

DSH 仍处于开发者预览阶段,Web 插槽接口可能发生不兼容变更。插件使用 DSH 0.1.0-rc.6 的发布类型构建,并在同级源码检出 0.1.0-rc.5 上完成了真实 Web 组合验证。

安装

从本地目录安装

dsh plugin --profile web add /absolute/path/to/dsh-workspace-files
dsh web

从 DSH 源码仓库运行时,将 dsh 替换成 pnpm dsh

pnpm dsh plugin --profile web add /absolute/path/to/dsh-workspace-files
pnpm dsh web

从 GitHub 安装

dsh plugin --profile web add github:brickmaker/dsh-workspace-files
dsh web

仓库已包含预构建的 lib/ 产物,Git 安装不会执行安装期构建脚本,也不需要配置 pnpm allowBuilds。正式使用时仍建议把 GitHub 安装地址固定到版本标签或提交 SHA。

从 npm 安装

发布到 npm 后可直接安装预构建产物,不需要授予安装时构建权限:

dsh plugin --profile web add dsh-workspace-files
dsh web

使用

打开或创建一个带工作区的会话后,右侧栏默认保持关闭。点击会话右上角的面板图标可以打开,再次点击会关闭。

  • 点击 或目录名称:加载并展开该目录。
  • 点击文件名称:使用操作系统默认应用打开。
  • 点击侧栏右上角 :关闭右侧栏;之后仍可用会话右上角的面板图标重新打开。

插件会成为 DSH details 单占位的默认内容,因此启用期间会遮蔽原有工具详情面板。移除本插件或从 profile 的 patch 中禁用该行后,原面板会自动恢复。

开发

pnpm install
pnpm run check

check 依次执行类型检查、单元测试、生产构建和 npm 包内容预检。生成物位于 lib/,并随版本提交到 Git,使 GitHub 安装无需在用户机器上运行构建脚本。

项目结构:

src/index.ts                 宿主端目录接口与越界校验
src/client/index.tsx         DSH Web 插槽注册与样式生命周期
src/client/FileTreePanel.tsx 文件树界面及交互
src/client/WorkspaceFilesToggle.tsx 会话右上角的侧栏开关
src/types.ts                 两端共享的 JSON 数据类型
cordis.patch.yml             安装后注入 profile 的组合层
lib/                         已提交的 Host、Browser 与类型构建产物

实现说明

包只在 cordis.patch.yml 中插入一个插件行。宿主端通过 ctx.webServer 注册只读接口,并优先从 ctx.sessions 读取实时会话;首屏尚未挂载的冷会话则通过 ctx.sessionPersistence 读取不可变会话头,不会为了展示文件树而恢复智能体。浏览器端由 package.json 的 dsh.client 声明自动发现,将文件树注册到 DSH Web 的 details 插槽,并将开关注册到右对齐的会话顶栏插槽。浏览器只提交会话 ID 和待展开路径,工作区根目录不会由浏览器指定。

该接口只返回名称、绝对路径和文件/目录类型,不读取文件内容。DSH Web 若绑定到 0.0.0.0,其所有宿主能力都会暴露给能访问该端口的人;请遵循 DSH 自身的网络信任设置,不要把开发服务器直接公开到不可信网络。

发布

GitHub、npm 和 DSH Hub 的完整发布步骤见 [docs/PUBLISHING.md](docs/PUBLISHING.md)。

许可证

[MIT](LICENSE)