luoxunhao/dsh-codex-project
DSH 工作区共享子目录插件 —— 源自 Codex 的项目处理思想:一个工作区可以挂载任意数量的共享子目录(可跨盘符),该工作区的 DSH 会话可以像对待自己的工作区一样读写这些目录——全程保持 workspace-write 权限,永远不需要 danger-full-access。
catalog descriptioncatalog 简介 / catalog description:codex风格的项目管理,可以给dsh项目增加附加目录,访问附加目录不需要full-access权限,方便多项目开发,可配合dsh-better-sidebar插件使用。
Project Overview项目介绍
luoxunhao/dsh-codex-project is a natively built plugin for DSH that brings Codex-style shared multi-root workspaces to DSH. It allows users to mount any number of cross-drive shared subdirectories to a single DSH workspace, so DSH sessions can read and write all these directories while retaining the safer workspace-write permission, eliminating the need for the risky full system access permission. It hooks into DSH’s runtime via the Cordis IoC framework and does not modify DSH source code directly. To install, you can clone the repository and run dsh plugin --profile web add <local-path> to add it to your web profile.
The plugin is designed for developers who work with projects that span multiple directories, such as main codebases, shared libraries, documentation and data folders stored in different locations. Users can add or remove shared directories via the injected entry in the DSH workspace’s overflow menu, or run the /adddir command to pull up a system native directory picker to quickly add a new directory to the current workspace. The AI model can also request adding new directories via the built-in add_dir tool, which requires explicit user approval before changes take effect. On first run of a configured session, the plugin injects a folded system reminder that lists all accessible roots for the model.
The plugin is released under the permissive MIT license, and requires DSH version 0.1.6-alpha.2 or higher, matching the peer dependency range for @deepseek-ai/cordis version 4.0.2. All configuration data is stored locally in a SQLite database at ~/.dsh-codex-project/dirs.db, so no user data is sent to external servers. The entire test suite includes 225 individual test cases and all pass on the validated DSH baseline, with the only known untested behavior being that clicking the same file twice will reload it. This release is currently validated via local build, not published to the NPM registry as an official stable release.
这是一个专为 DSH 开发的原生插件,实现了源自 Codex 的多目录共享工作区管理功能。它允许用户在一个 DSH 工作区中挂载任意数量跨盘符的共享子目录,让当前 DSH 会话可以在保持 workspace-write 权限的前提下读写这些目录,不需要开启危险的 danger-full-access 全磁盘权限。插件通过 Cordis 钩子切入 DSH 运行循环,不侵入 DSH 本身源码。
主要面向需要将分散在多个位置的代码、共享库、数据、文档整合到同一个工作会话的开发者。用户可以通过侧边栏原生菜单添加或移除共享子目录,也可以输入 /adddir 指令快速选择添加目录,模型还可以通过自带的 add_dir 工具请求添加新目录,需用户确认后生效。插件会在会话上下文自动插入折叠的目录清单,明确告知模型当前可访问的所有路径。
本插件采用 MIT 许可开源,要求 DSH 版本不低于 0.1.6-alpha.2,适配 Cordis 4.0.2 及以上版本。配置存储在用户目录下的 ~/.dsh-codex-project/dirs.db SQLite 文件中,所有功能均在本地运行,不会上传数据到远端。目前已通过真机验证,所有测试用例全量通过,仅存在未测试重复点击同一文件会重读的问题。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-codex-project(luoxunhao/dsh-codex-project)
仓库:https://github.com/luoxunhao/dsh-codex-project
本站详情页:https://www.yhbd.top/plugins/luoxunhao-dsh-codex-project/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 3 · 最近提交 2026-09-25 · 主语言 TypeScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- Only 3 stars - very few users, little community feedback星标只有 3,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项
Compatibility兼容性
- DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
- External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
- Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册
Security安全性
- Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
- Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
- curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
- Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
- Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
- Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式
Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add @luoxunhao/dsh-codex-project
把 luoxunhao/dsh-codex-project 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-codex-project
DSH 工作区共享子目录插件 —— 源自 Codex 的项目处理思想:一个工作区可以挂载任意数量的共享子目录(可跨盘符),该工作区的 DSH 会话可以像对待自己的工作区一样读写这些目录——全程保持 workspace-write 权限,永远不需要 danger-full-access。
设计思想
Codex 处理项目时,一个"项目"往往横跨多个目录:主代码库、共享库、文档、数据目录。传统做法要么给模型 full access(危险),要么逐个授权(繁琐)。
本插件的模型是 Codex 式的项目共享:
一个共享配置(记录)= 一个主根(该工作区自身的 path)+ 任意数量的共享子目录(跨盘符)
命中该配置的会话 → 可读写该配置的全部可写根(主根 ∪ 现存共享子目录)
- 单配置模型:会话的可写集合 = 其 cwd 命中的那一条配置的可写根(无并集、无叠加),行为可预期;
- 单边命中:会话 cwd(规范路径)== 某条记录的
path即命中该条记录(锚定);共享子目录里的会话不会仅因该目录出现在别人配置里而命中; - 不强制注册:共享子目录可以是裸目录,不必是 DSH 注册的工作区;
- 不升级权限:仍在
workspace-write权限级内,只是把可写集合从单根扩展为多根(Windows ACL 受限令牌 + 空间级 SID)。
功能特性
| 能力 | 说明 |
|---|---|
| 共享子目录配置 | 每个工作区可配置任意数量共享子目录(跨盘符、可裸目录) |
| 「编辑工作区」弹窗 | 原生工作区「…」菜单注入入口:源文件夹列表 + 添加/移除/设为主要 |
| 「项目文件夹」tab | 侧边栏注册的项目多根目录树:主根 + 共享子目录(跨盘符),按层懒加载;仿 Files tab 布局(顶部搜索框 + 刷新/上传按钮 + 文件树)。点击文件交给 DSH 自带的文件 viewer(openResource,工作区外/跨盘一样能读);右键「编辑」在插件自有的「文件预览」page 里开编辑器,右键目录用文件管理器打开。承载走 DSH 原生右侧栏(ctx.sidebarRightTabs + sidebar.right.pane.tab 键控 seat,0.1.6 的 web 组合默认自带) |
| 「打开本地目录」 | 原生「…」菜单注入入口:用系统文件管理器打开该工作区文件夹(插件自有路由 spawn explorer.exe——不走 workspaces.openPath,避免被 better-sidebar 等插件劫持到侧边栏编辑器) |
| 多根沙箱 runner | 命中配置的会话,shell/subprocess 自动走多根受限令牌(lib/runner.js) |
| 多根 fs fence | 进程内 fs 工具(read/write/edit)同样按配置可写根放行(lib/fs.js) |
| 会话上下文提醒 | 第一条 user 消息后折叠 <system-reminder> 目录清单(注明附加目录与主目录权限一致) |
| 配置 CRUD + 持久化 | /codex-project/api JSON 路由,SQLite 存于 ~/.dsh-codex-project/dirs.db |
add_dir 模型工具 |
模型可通过工具请求添加目录(用户确认后生效)——工具名下划线,与 dsh 模型工具命名一致 |
/adddir 指令 |
人类在 composer 输入 /adddir → 弹系统目录选择框,把选中目录加入当前会话工作区(对应模型工具 add_dir) |
架构总览
┌─────────────────────────── DSH web ───────────────────────────────────┐
│ (client half) │
│ 侧边栏工作区「…」菜单 ──注入「打开本地目录」+「编辑工作区」──▶ 本地动作/弹窗 │
│ 「项目文件夹」tab ──注册进 DSH 原生右侧栏(sidebarRightTabs + seat) │
│ │ └ 点击→宿主自带 viewer;「编辑」→自有 page │
│ │ fetch() │
│ ▼ │
│ /codex-project/api (CRUD + 项目目录树,loopback 守卫) │
└───────────────────────────────────────────────────────────────────────┘
│
▼
┌───────────────────────────────────────────────────────────────────────┐
│ (host half) 四个独立钩子,共用命中判定 matchingWorkspace │
│ │
│ ① ctx.webServer.register ─── HTTP 路由(CRUD / 文件读写) │
│ ② ctx.on('agent/pre-step') ─── 折叠 <system-reminder> 目录清单 │
│ ③ ctx.tools.register ─── add_dir 模型工具 │
│ ④ sandbox.confine wrap ─── 多根 runner(lib/runner.js) │
│ │
│ ⑤ ctx.fs 提供者(bundle patch 替换核心 fs-sandbox) │
│ └── lib/fs.js 多根 fence(与 ④ 共用命中判定) │
│ │
│ ⑥ ctx.commands.register ─── /adddir 指令(原生目录选择器) │
│ │
│ 配置外 / 单根 / 无 cwd 的会话 → 四个钩子全部纯透传(零影响) │
└───────────────────────────────────────────────────────────────────────┘
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
10086ggqq/dsh_theme_terraria
Lzh3070/dsh-file-review-tab
Tokeii0/dsh-lovelyaudit
CooStack/dsh-code-review
feiyang-dev/DeepSeek-Harness-Desktop
xuboboo/dsh-gui