Workspace Git
A branch chip below the composer, and a Git panel in the right sidebar that follows the Session’s workspace. Switch branches from the status row; the sidebar holds the graph, changes, branches and worktrees, with right-click cherry-pick, revert and drop.
- Version
- 0.5.1
- Licence
- MIT
A zero-dependency ESM Host half; the browser half is a committed client.js.
Install
@litingyes/dsh-git
plugin_manager action=install_bundle target= @litingyes/dsh-git@0.5.1 The Host half is loaded at startup, so restart DSH after an upgrade.
Requirements
- DSH >=0.2.1-rc.5 <0.3.0-0 with the right sidebar in the composition
- A working git on PATH
- The Session’s working directory inside a registered workspace
The commit graph
Real commits from this repository, laid out by the plugin’s own layoutGraph. Open any row for the details.
fix(ci): name the test files instead of the directory
- Author
- litingyes
- Committed
- 2026-11-07 15:09
- Parents
- ddb5b39
- refs
- —
2 files changed
- M .github/workflows/ci.yml +2 -1
- M AGENTS.md +1 -1
Patch AGENTS.md
diff --git a/AGENTS.md b/AGENTS.mdindex 7fc72e1..44ca928 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -45,3 +45,3 @@ npm run check # 产物新鲜度 + 语法;dsh-git 先跑 build --check node scripts/check-release.mjs # 门禁:每个 manifest 版本都有 tag-node --test scripts/ # 门禁自身的测试+node --test scripts/*.test.mjs # 门禁自身的测试(Node 22 不展开目录参数) node scripts/release.mjs <dir> --bump patch --dry-run # 演练发版 chore(site): refresh the graph after the release gate
- Author
- litingyes
- Committed
- 2026-11-07 15:07
- Parents
- 0c2f9ab
- refs
- origin/release
1 files changed
- M site/src/data/repo-graph.json +217 -120
Patch site/src/data/repo-graph.json
diff --git a/site/src/data/repo-graph.json b/site/src/data/repo-graph.jsonindex dad3e08..fc0a03b 100644--- a/site/src/data/repo-graph.json+++ b/site/src/data/repo-graph.json@@ -2,7 +2,7 @@ "source": {- "head": "fac38bfd7a7c7f4137abb5ae2af931ba3d48bab2",- "headShort": "fac38bf",+ "head": "0c2f9abc35db22bbf67c1140ed50c3d8445eba4d",+ "headShort": "0c2f9ab", "headDate": "2026-11-07", "currentBranch": "release",- "total": 23,+ "total": 25, "limit": 40,@@ -11,2 +11,31 @@ "commits": [+ {+ "sha": "0c2f9abc35db22bbf67c1140ed50c3d8445eba4d",+ "parents": [ chore(release): make a version bump without a tag impossible
- Author
- litingyes
- Committed
- 2026-11-07 15:06
- Parents
- 0813c53
- refs
- —
11 files changed
- A .github/workflows/ci.yml +47 -0
- M .github/workflows/publish.yml +36 -0
- A AGENTS.md +97 -0
- M README.md +11 -13
- M dsh-git/README.en.md +2 -2
- M dsh-git/README.md +2 -2
- A scripts/check-release.mjs +149 -0
- A scripts/check-release.test.mjs +132 -0
- A scripts/packages.mjs +32 -0
- M scripts/release.mjs +158 -17
Patch dsh-git/README.en.md
diff --git a/dsh-git/README.en.md b/dsh-git/README.en.mdindex f2a63af..f503787 100644--- a/dsh-git/README.en.md+++ b/dsh-git/README.en.md@@ -2,3 +2,3 @@ -A Git plugin for DeepSeek Harness: **the current branch is shown and switchable in the status row below the composer**, and a **right-sidebar tab follows the Session's workspace** with **a multi-branch commit graph as the primary view**, where every node shows its description, author, date, and commit and expands into full details — beside staging, committing, and branch and worktree management. Right-click a commit for cherry-pick / revert / drop, or a branch row to merge it into the current branch or rebase onto it. Both surfaces share one repository snapshot. 0.3.0 no longer registers agent tools.+A Git plugin for DeepSeek Harness: **the current branch is shown and switchable in the status row below the composer**, and a **right-sidebar tab follows the Session's workspace** with **a multi-branch commit graph as the primary view**, where every node shows its description, author, date, and commit and expands into full details — beside staging, committing, and branch and worktree management. Right-click a commit for cherry-pick / revert / drop, or a branch row to merge it into the current branch or rebase onto it. Both surfaces share one repository snapshot. 0.5.0 no longer registers agent tools. @@ -90,3 +90,3 @@ Configuration lives on the mount row in `cordis.patch.yml`. **Overriding the row -> 0.3.0 removed the four agent tools (`git_status` / `git_diff` / `git_commit` / `git_branch`) along with the `tools` and `defaultWorkspaceId` fields. Legacy keys left in a profile patch are ignored, not rejected.+> 0.5.0 removed the four agent tools (`git_status` / `git_diff` / `git_commit` / `git_branch`) along with the `tools` and `defaultWorkspaceId` fields (the change itself landed in the 0.3.0 commit, but 0.3.0 and 0.4.0 were never published on their own — 0.5.0 is the first npm version after 0.2.0). Legacy keys left in a profile patch are ignored, not rejected. chore(site): refresh the graph after the 0.5.1 follow-ups
- Author
- litingyes
- Committed
- 2026-11-07 12:56
- Parents
- fac38bf
- refs
- —
1 files changed
- M site/src/data/repo-graph.json +180 -158
Patch site/src/data/repo-graph.json
diff --git a/site/src/data/repo-graph.json b/site/src/data/repo-graph.jsonindex fc04a64..dad3e08 100644--- a/site/src/data/repo-graph.json+++ b/site/src/data/repo-graph.json@@ -2,7 +2,7 @@ "source": {- "head": "4d1e1f677742618f2efe27bd1ed9dc7f57e12979",- "headShort": "4d1e1f6",+ "head": "fac38bfd7a7c7f4137abb5ae2af931ba3d48bab2",+ "headShort": "fac38bf", "headDate": "2026-11-07", "currentBranch": "release",- "total": 20,+ "total": 23, "limit": 40,@@ -12,5 +12,5 @@ {- "sha": "4d1e1f677742618f2efe27bd1ed9dc7f57e12979",+ "sha": "fac38bfd7a7c7f4137abb5ae2af931ba3d48bab2", "parents": [ build(git): assert the committed client.js is fresh
- Author
- litingyes
- Committed
- 2026-11-07
- Parents
- 31418ab
- refs
- —
fix(git): rebuild the browser half for 0.5.1
- Author
- litingyes
- Committed
- 2026-11-07
- Parents
- b4a027a
- refs
- dsh-git-v0.5.1
chore(site): refresh the data for dsh-git 0.5.1
- Author
- litingyes
- Committed
- 2026-11-07
- Parents
- 4d1e1f6
- refs
- —
docs(git): correct claims the source contradicts
- Author
- litingyes
- Committed
- 2026-11-07
- Parents
- 4e7b356
- refs
- —
chore(site): refresh the repo graph after the release tags
- Author
- litingyes
- Committed
- 2026-11-06
- Parents
- 2c5cba0
- refs
- —
chore(site): align the portal with dsh-git 0.5.0
- Author
- litingyes
- Committed
- 2026-11-06
- Parents
- 0899728
- refs
- dsh-git-v0.5.0, dsh-context7-v0.2.1
docs: sync the plugin docs with the released behaviour
- Author
- litingyes
- Committed
- 2026-11-06
- Parents
- 8737129
- refs
- —
feat(git): act on commits and branches from the panel
- Author
- litingyes
- Committed
- 2026-11-06
- Parents
- c0e204c
- refs
- feature/dsh-git
chore(site): refresh the repo graph after the dsh-git merge
- Author
- litingyes
- Committed
- 2026-11-06
- Parents
- 2658252
- refs
- —
docs(git): keep the npm install note pre-release
- Author
- litingyes
- Committed
- 2026-11-06
- Parents
- 9dbfec8
- refs
- —
Merge branch 'feature/dsh-git' into release
- Author
- litingyes
- Committed
- 2026-11-06
- Parents
- 0a297ec f9d31c3
- refs
- —
feat(git): switch branches from the composer status row
- Author
- litingyes
- Committed
- 2026-11-06
- Parents
- 81cefd6
- refs
- —
fix(site): keep the data guard green after docs-only commits
- Author
- litingyes
- Committed
- 2026-11-06
- Parents
- dda11f1
- refs
- —
feat(site): add the bilingual portal for the plugin collection
- Author
- litingyes
- Committed
- 2026-11-06
- Parents
- f66eaba
- refs
- —
feat(context7): add always-on guidance so the tools actually get called
- Author
- litingyes
- Committed
- 2026-11-05
- Parents
- bf39041
- refs
- dsh-context7-v0.2.0
chore: ignore the local pnpm store
- Author
- litingyes
- Committed
- 2026-11-05
- Parents
- b784bb8
- refs
- —
feat(git): fold the branch sections and move worktrees above remote
- Author
- litingyes
- Committed
- 2026-11-05
- Parents
- f003889
- refs
- —
chore(release): keep the tag probe from printing git errors
- Author
- litingyes
- Committed
- 2026-11-05
- Parents
- e7198d0
- refs
- —
chore(release): publish from npm through tag-triggered CI
- Author
- litingyes
- Committed
- 2026-11-05
- Parents
- 459979e
- refs
- dsh-git-v0.2.0, dsh-context7-v0.1.0
feat(git)!: manage worktrees and stop clipping the right-sidebar rows
- Author
- litingyes
- Committed
- 2026-11-05
- Parents
- 459979e
- refs
- —
feat(git): add right-sidebar workspace Git plugin
- Author
- litingyes
- Committed
- 2026-11-05
- Parents
- 0090429
- refs
- —
feat(context7): add Context7 MCP documentation plugin
- Author
- litingyes
- Committed
- 2026-11-04
- Parents
- 055d494
- refs
- —
Initial commit
- Author
- Liting
- Committed
- 2026-11-04
- Parents
- —
- refs
- —
What it does
-
The branch chip below the composer
A status-row pill shows the current branch and the uncommitted-change dot. Clicking it opens the local-branch picker upward: filter as you type, switch, or create and switch, with git’s own refusal shown.
-
Multi-branch commit graph
Every local and remote branch in --date-order, drawn as parallel lanes, with up to three ref badges per row (the rest collapse into +N). Open a row for the message, author and committer, parents and file diffs.
-
Changes and commits
Staged, unstaged, untracked and conflicted groups, selected by file or as a group. The first three carry inline row buttons; conflicted rows use the group header once selected. Discard needs the dialog and the Host’s confirm check; Cmd/Ctrl+Enter commits.
-
Right-click history actions
Right-click a commit to copy its SHA, cherry-pick it, revert it or drop it; right-click a branch to merge it in or rebase onto it. Entries a snapshot cannot allow stay in the menu with the reason.
-
Branches and worktrees
Local, worktree and remote sections that fold at the header; create, switch, remove and prune are inline icon buttons. New worktrees default to .agents/worktrees/ and get the ignore marker.
-
Narrow first
It lays out against its own width, not the window: one column when squeezed, ellipsis where it can, and no horizontal scrollbar. Fullscreen the sidebar and the Changes tab splits in two again.
Branches 2
- feature/dsh-git no upstream 8737129
- release current origin/release f9b2161
From this repository’s git branches, not sample data.
Configuration
Set on the mount row in cordis.patch.yml. Overriding the row replaces config wholesale, so restate every field.
| Field | Default | Meaning |
|---|---|---|
| refs | all | all walks every branch; head walks only the current one |
| maxCommits | 200 | Commits fetched for the graph, 20 to 500 |
| maxDiffBytes | 400000 | Byte budget for one patch sent to the browser; larger patches are truncated with a notice |
| commandTimeoutMs | 15000 | Timeout for one git invocation, 500 to 120000 |
Security model
Workspace allowlist: mutations take a workspace id, a snapshot read may name the Session directory, and git always runs from the registered path.
No shell: execFile(‘git’, args) passes one argument per entry, so branch names and messages cannot become syntax.
Path validation: assertRelativePath refuses empty strings, absolute paths, .. segments and NUL; a worktree path must stay inside the workspace, outside .git, and not exist yet.
Authorisation first: the route runs connection.requestRejection before returning even the workspace list.
History preconditions: attached HEAD, no tracked changes, no stopped operation; drop also needs confirm: true and refuses a root or merge commit and any range containing merges.
Conflicts abort themselves: merge, rebase, cherry-pick and revert run the matching --abort first, then return a structured error.
Destructive work needs two confirmations: the dialog plus confirm: true on the request; discarding re-reads status to prove the path is changed.
Limits
- No network operations: no fetch, pull, push or clone.
- Commit, merge and rebase always run with --no-verify, so the repository’s pre-commit, commit-msg, pre-merge-commit and pre-rebase hooks never run.
- No stash and no conflict resolution: history actions abort on conflict, with no continue, skip or conflict editor.
- Rebase uses git’s default, so merge commits in the replayed range are flattened; drop refuses such a range outright.
- Context menus open by right-click or touch long-press; commit and branch rows have no extra “more” button.
- The chip lists local branches only; the panel never moves the Session’s directory, so you enter a new worktree yourself.
- At most 500 commits and 400 changed files per response.
- More than eight lanes are folded with a notice; lane colours are a fixed eight-hue palette and everything else comes from host theme tokens.