DSH Plugins Marketplace

DSH Plugins

Plugins

/

Development & Infrastructure

/

dsh-worktree-branch

d

dsh-worktree-branch

Identified

Codex-style location, worktree and branch switchers on the New Session screen of DSH; all git work runs in the host half.

dsh-worktree-branch

Codex-style Location / Branch switchers on the New Session screen of DeepSeek Harness, for workspaces that are git repositories.

在 DSH「新建会话」页给 git 工作区加一块 Codex 风格的「工作位置 / 分支」chip: 直接切 worktree、切分支、新建分支,git 事实与副作用全部由 Host 半执行 (写操作走该会话的沙箱策略)。

What it does

  • Detects whether the session's working directory is inside a git repository; renders nothing when it is not.
  • Shows the current branch (or the short hash when HEAD is detached), every local branch, and every linked worktree.
  • Actions: create a worktree, switch to another worktree, switch branch, create-and-switch branch.
  • Names are validated twice: a cheap local whitelist plus git check-ref-format.
  • Every git call strips inherited GIT_* selectors (GIT_DIR, GIT_WORK_TREE, GIT_INDEX_FILE, …) so a user shell cannot redirect the command to another repository; write operations (switch, switch -c, worktree add) are wrapped in the session's sandbox policy.

Install

From GitHub:

dsh plugin --profile desktop add github:Qcsj777/dsh-worktree-branch

As a local link during development:

// ~/.dsh/profiles/<profile>/package.json
"dependencies": {
  "dsh-worktree-branch": "link:D:/path/to/worktree-branch"
}

The package ships its own Cordis patch (cordis.patch.yml) that inserts the host half with id worktree-branch. git must be on PATH.

How it works

Third-party bundles cannot add Remote namespaces, and a installed bundle's client half cannot call its own host half through host.call, so the two halves talk over same-origin HTTP:

GET  /worktree-branch/state?session=<id>&cwd=<path>
POST /worktree-branch/action  { sessionId, cwd, action, name?, path? }

action is one of create-worktree, use-worktree, switch-branch, create-branch. The state payload is { repo, cwd, repoRoot, currentBranch, head, branches[], worktrees[], mainPath, atMain }.

  • Client half (client.js): registers the chip on conversation.hero.options, only on the New Session screen.
  • Host half (index.js): injects webServer, subprocess, sandbox, sandboxPolicy, worktrees, sessionController, sessions, workingDirectory; owns the routes above.

Non-goals

  • No network operations (no fetch/pull/push), no deletes, no merge/rebase.
  • Switching to another worktree changes that session's working directory — that is the feature, not a side effect. The switch itself does not move any files.

Development

node check.mjs   # self-check for git-parse.mjs

License

MIT

Comments

Loading…

Similar plugins

dsh-wending-git-workbench

by dd2673

Codex-style Git workbench: workspace-scoped changes, diff, stage, commit, guarded branch operations, graph history, fetch, fast-forward pull, and upstream push through official plugin APIs.

Development & InfrastructureManifest valid

★ 1

Apache-2.0

TypeScript

Aug 16, 2026

dsh plugin --profile web add dsh-wending-git-workbench

A Git worktree plugin for DeepSeek Harness that creates task branches, registers worktrees as DSH Workspaces, and opens isolated sessions.

Development & InfrastructureTerminal & ClientsManifest valid

★ 0

dsh plugin --profile web add @xzhi/dsh-simple-worktree-plus

by HeathHe

Git worktree management panel for the DSH Web GUI — adds a project → worktree → sessions dimension to the sidebar.

UI & ExperienceManifest valid

★ 9

↓ 52/wk

MIT

JavaScript

Sep 15, 2026

dsh plugin --profile web add dsh-worktree-panel

by mays-hi

A git panel inside the DSH session: repository chip, branch tree, commit graph, working tree and commit detail, Settings page, and 8 git model tools.

Development & InfrastructureManifest valid

★ 0

MIT

JavaScript

Oct 13, 2026

dsh plugin --profile web add dsh-git-idea

by happyqu

Git workbench for deepseek-harness: changelists, staging, history, branches, stashes and optional AI assistance

Development & InfrastructureManifest valid

★ 0

NOASSERTION

JavaScript

Oct 19, 2026

dsh plugin --profile web add @happyqu/dsh-plugin-git

by nightosong

该仓库暂未提供项目说明。

Tools & CapabilitiesDevelopment & InfrastructureManifest valid

★ 2

↓ 315/wk

MIT

JavaScript

Oct 15, 2026

dsh plugin --profile web add gord-dsh-worktree