DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

Worktree — DeepSeek Harness 插件(DSH Plugin)
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录
← Plugins

@guowenzhang/dsh-worktree

Worktree

DeepSeek Harness 的 Git 工作树隔离:创建工作树,将其注册为独立项目,并在其中启动会话

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add @guowenzhang/dsh-worktree@0.1.1
README兼容性版本
The Worktree settings page

兼容性与来源证明

Worktree 以 @guowenzhang/dsh-worktree 发布,当前版本为 0.1.1。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
web
发布来源
npm
Registry 更新时间
2026/9/24

版本

0.1.1stable
2026/9/24
0.1.0stable
2026/9/23

相关插件

正在加载相关插件…

最新版
0.1.1
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
135.6 kB
文件数
8
Surface
web
许可证
Apache-2.0
发布源
npm
GitHub
★ 0
周下载
0
最近提交
2026/9/24
查看源码 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题

相关插件

继续浏览 developer-tools 分类下经过校验的插件。

Web App@deepseek-ai/dsh-web-appdsh 浏览器界面捆绑包:位于 dsh-base 之上的 Web 补丁层,加上运行时粘合插件(提供前端 dist、Web 界面提示符、bash 运行时变量和 URL 行)Sdk Minimal@deepseek-ai/dsh-sdk-minimal独立的最小 SDK 配置包:JSON-RPC、一个 DeepSeek 适配器、持久化 Shell 和 JSONL 会话Sdk App@deepseek-ai/dsh-sdk-appdsh SDK 配置包:基于 dsh-base 提供 stdio JSON-RPC 服务和进程生命周期管理Subagent Codex@deepseek-ai/dsh-subagent-codex基于官方 app-server 协议的一次性 Codex 子代理提供程序

README

@guowenzhang/dsh-worktree

English | 中文

Background: DeepSeek Harness

DeepSeek Harness (dsh) is the open-source agent harness from DeepSeek AI, where nearly every capability is a plugin on Cordis. It is in developer preview and iterating fast, so expect compatibility-breaking changes (docs, 0.1.7-alpha.*); this plugin is a standalone third-party package that resolves @deepseek-ai/* from the running host.

The problem this plugin solves

A session working directory is frozen when the session is created, so working in an isolated Git worktree meant building the checkout and starting a session by hand; this plugin does both from one check on the New Session screen.

Screenshots

The worktree capsule on the New Session screen Ticking worktree at the right end of the 选择工作区 / 模式 row creates the checkout and starts the session inside it.

The Worktree settings page 设置 → Worktree: 创建子仓库, 扫描层级, and worktree 存储位置, with 恢复默认 / 保存.

Install

npx @deepseek-ai/dsh plugin --profile web add @guowenzhang/dsh-worktree

From the npm registry: https://www.npmjs.com/package/@guowenzhang/dsh-worktree — restart the host afterwards; local checkouts, git sources and troubleshooting are in AGENTS.md.

Usage

Start a session in a new worktree

On the New Session screen, the 选择工作区 / 模式 row grows a second capsule at its right end: ⑂ <branch> ▾ │ ☐ <add-workspace icon> worktree. The left half is the local branch dropdown — the local branch the new branch starts from, defaulting to the branch of the checkout the session is in, or HEAD when that cannot be read. The list is read only when the menu opens, sorted by most recent commit, and holds refs/heads only: a remote branch or a tag would make git worktree add enter a detached HEAD silently, so neither is offered. The interface never asks for a branch name.

Ticking the worktree half is the whole action, and it runs four steps in order: the checkout is created from the main repository with git worktree add -b <branch> <path> <base> (a session already inside a linked worktree still resolves back to the main repository); the new directory is registered as a workspace; the session is started with that directory as its meta.cwd; and the session is attached to the workspace ledger, because a session belongs to a workspace only through that ledger — without it the session renders as ungrouped and 选择工作区 has no name to display. The browser then refreshes the session catalog and switches to the session, because the Host created it outside the client's Session Controller and navigation refuses an id that has not been catalogued yet.

Ticking is one-way: checking creates the checkout and starts the session, and nothing checks it back off. Failures come in two kinds. The Host refused — the branch name is taken, the directory is not a repository — created nothing: the control returns to unchecked with the reason, and checking again retries. Created but not switched to — navigation failed — keeps that session on the control, so checking again opens it instead of creating a second checkout.

Every session is independent and cannot be changed afterwards: the working directory is frozen in the session header at creation, so the control appears only while the session is still blank (no turn has run). This is a design constraint, not a defect — changing the directory means starting a new session.

When the worktree control appears

The control's state follows the session and its directory:

StateControlWhy
Blank session, directory inside the main checkoutOperableThe choice is still open
Session already inside a linked worktreeShown but locked (base + checked)It is already isolated; one more choice would nest a checkout inside a checkout
Session has run at least one turnHiddenheader.cwd is frozen, and the Host would refuse
Directory is not a Git repositoryHiddenThere is no repository to isolate

A locked control offers no change — both segments are disabled and the chevron is collapsed, and the tooltip names the branch the checkout actually holds. After a page refresh the memory that "this checkout was created here" is gone, so the locked control reports the checkout's own branch; that still names its origin, because the branch is <base>-<6 digits>.

Choose the checkout layout

设置 → Worktree, titled 「worktree 配置」, is one settings page with three rows in the usual label-left / control-right form:

  • 创建子仓库 — off by default. On means the submodules a checkout records, and the repositories nested inside it, are created along with it; off means the parent repository alone.
  • 扫描层级 — how many directory levels below the repository root are searched for nested repositories, defaulting to 1 (the direct children). The row is disabled until 创建子仓库 is on.
  • worktree 存储位置 — 工作区内 / 仓库同级 / 用户目录, with the directory each choice resolves to shown as that row's explanation.

The footer holds [恢复默认] [保存] together, and a save takes effect without restarting the host, because the new policy is installed onto the running service instance. Leaving the page drops every staged edit.

ValueLabelDirectory
agents (default)工作区内<workspace>/.agents/worktree/<branch>, inside the workspace tree
sibling仓库同级<repo>-wt-<branch>, beside the repository and outside the workspace tree
home用户目录~/.agents/worktree/<branch>, shared by every workspace on the machine

Work with checkouts from the model

Three model tools consume the same service, and none of them starts a session — the model creates the checkout, and the product's own new-session flow puts a session inside it. worktree_create creates a linked checkout and returns its path; worktree_list lists the repository's checkouts, main checkout first; worktree_remove removes one, refusing the main checkout and refusing any checkout with uncommitted work unless force is passed.

// inside a session
worktree_create({ branch: 'fix/123' })
worktree_list()
worktree_remove({ path: '/abs/path' })

Branch names

The interface never takes a branch name; the Host derives one. It is the chosen base branch name with / replaced by -, plus 6 random digits — dev-482913 — and worktree-<6 digits> when the base is not a local branch (HEAD, a SHA, origin/x). The base itself is recorded nowhere, but it stays readable, because the workspace title, the checkout directory and git branch all carry the generated name.

Notes and caveats

  • Nothing is cleaned up automatically. A worktree is not deleted when its session ends: uncommitted work must never be discarded silently, so removal is always explicit.
  • Removal does not check for live sessions. Deleting a checkout that still has a session running in it is not blocked.
  • A 6-digit suffix can collide. Two checkouts of one base draw from the same space, about one collision in a million; git worktree add then fails with its own message, and checking again retries.
  • The default location shows up in git status. agents puts the checkout under <workspace>/.agents/worktree/, an untracked directory inside the main checkout. Add .agents/worktree/ to .gitignore or .git/info/exclude, or choose 仓库同级 / 用户目录.
  • 用户目录 is shared machine-wide. ~/.agents/worktree/<branch> belongs to no workspace: checkouts of several repositories sit side by side there, and that directory needs its own .gitignore entry when it lands inside a repository.
  • You cannot name the branch from the interface. The branch is visible in the workspace title; pass branch to worktree_create when the name matters.
  • Submodules are detached HEAD by design. That is what a gitlink means, not a defect; a child repository that needs a branch is an independent nested repository.
  • Only a real .git directory counts as a nested repository. A subdirectory that is itself another repository's linked worktree (.git is a file), or a submodule, is not mirrored onto a new branch.
  • Local-path submodules need Git's file transport permission. protocol.file.allow is Git's own safety switch and this plugin does not override it: a repository whose .gitmodules points at a local path needs the permission granted in git configuration (global or repository-level), or creation fails with Git's own message and rolls back. Submodules over https/ssh are unaffected.
  • Removing a checkout never removes branches. The branches of a worktree — including those created for nested repositories, which live in their own repositories — survive deletion, exactly like the workspace's own branch.
  • Memory is shared; files and authorizations are not. dsh-memory and dsh-claude-compat resolve a linked worktree's {project} back to the main repository, so every worktree of one repository shares one memory store, while files and sandbox authorizations stay per-checkout. This is deliberate: what is isolated is files and authorizations, what is shared is knowledge and context.

License

The plugin itself is Apache-2.0 — see LICENSE and NOTICE.

It ships no DeepSeek Harness source: the harness packages are peer dependencies resolved from the running host.

Further reading

  • AGENTS.md — install variants, the build, composition wiring, live-update semantics, release steps, design decisions, troubleshooting, and the test runners.
  • dsh-memory — the sibling memory plugin whose {project} resolution makes one repository's worktrees share one memory store.
  • DeepSeek Harness documentation.