@cerbur/clutch-dsh-worktree 0.1.10 → 0.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (298) hide show
  1. package/README.md +278 -498
  2. package/README.zh.md +231 -432
  3. package/assets/screenshots/screenshots-dashboard.png +0 -0
  4. package/assets/screenshots/screenshots-en.png +0 -0
  5. package/assets/screenshots/screenshots-git-reviewer.png +0 -0
  6. package/assets/screenshots/screenshots-import.png +0 -0
  7. package/assets/screenshots/screenshots-zh.png +0 -0
  8. package/lib/client/WorktreeSurface.d.ts +1 -1
  9. package/lib/client/WorktreeSurface.d.ts.map +1 -1
  10. package/lib/client/WorktreeSurface.js +268 -10
  11. package/lib/client/WorktreeSurface.js.map +1 -1
  12. package/lib/client/context/WorktreeHeroContext.d.ts +4 -3
  13. package/lib/client/context/WorktreeHeroContext.d.ts.map +1 -1
  14. package/lib/client/context/WorktreeHeroContext.js +29 -11
  15. package/lib/client/context/WorktreeHeroContext.js.map +1 -1
  16. package/lib/client/dashboard/DashboardHeaderAction.d.ts +20 -0
  17. package/lib/client/dashboard/DashboardHeaderAction.d.ts.map +1 -0
  18. package/lib/client/dashboard/DashboardHeaderAction.js +19 -0
  19. package/lib/client/dashboard/DashboardHeaderAction.js.map +1 -0
  20. package/lib/client/dashboard/OpenInAppButton.d.ts +9 -0
  21. package/lib/client/dashboard/OpenInAppButton.d.ts.map +1 -0
  22. package/lib/client/dashboard/OpenInAppButton.js +123 -0
  23. package/lib/client/dashboard/OpenInAppButton.js.map +1 -0
  24. package/lib/client/dashboard/WorktreeDashboard.d.ts +28 -0
  25. package/lib/client/dashboard/WorktreeDashboard.d.ts.map +1 -0
  26. package/lib/client/dashboard/WorktreeDashboard.js +362 -0
  27. package/lib/client/dashboard/WorktreeDashboard.js.map +1 -0
  28. package/lib/client/dashboard/WorktreeInstructions.d.ts +8 -0
  29. package/lib/client/dashboard/WorktreeInstructions.d.ts.map +1 -0
  30. package/lib/client/dashboard/WorktreeInstructions.js +53 -0
  31. package/lib/client/dashboard/WorktreeInstructions.js.map +1 -0
  32. package/lib/client/dashboard/dashboard-icon.d.ts +7 -0
  33. package/lib/client/dashboard/dashboard-icon.d.ts.map +1 -0
  34. package/lib/client/dashboard/dashboard-icon.js +6 -0
  35. package/lib/client/dashboard/dashboard-icon.js.map +1 -0
  36. package/lib/client/dashboard/dashboard-navigation.d.ts +35 -0
  37. package/lib/client/dashboard/dashboard-navigation.d.ts.map +1 -0
  38. package/lib/client/dashboard/dashboard-navigation.js +48 -0
  39. package/lib/client/dashboard/dashboard-navigation.js.map +1 -0
  40. package/lib/client/dashboard/dashboard-overlay.d.ts +16 -0
  41. package/lib/client/dashboard/dashboard-overlay.d.ts.map +1 -0
  42. package/lib/client/dashboard/dashboard-overlay.js +185 -0
  43. package/lib/client/dashboard/dashboard-overlay.js.map +1 -0
  44. package/lib/client/dashboard/dashboard-selection.d.ts +33 -0
  45. package/lib/client/dashboard/dashboard-selection.d.ts.map +1 -0
  46. package/lib/client/dashboard/dashboard-selection.js +31 -0
  47. package/lib/client/dashboard/dashboard-selection.js.map +1 -0
  48. package/lib/client/dashboard/dashboard-sessions.d.ts +6 -0
  49. package/lib/client/dashboard/dashboard-sessions.d.ts.map +1 -0
  50. package/lib/client/dashboard/dashboard-sessions.js +21 -0
  51. package/lib/client/dashboard/dashboard-sessions.js.map +1 -0
  52. package/lib/client/dashboard/git/GitChangedFiles.d.ts +11 -0
  53. package/lib/client/dashboard/git/GitChangedFiles.d.ts.map +1 -0
  54. package/lib/client/dashboard/git/GitChangedFiles.js +101 -0
  55. package/lib/client/dashboard/git/GitChangedFiles.js.map +1 -0
  56. package/lib/client/dashboard/git/GitCommitList.d.ts +15 -0
  57. package/lib/client/dashboard/git/GitCommitList.d.ts.map +1 -0
  58. package/lib/client/dashboard/git/GitCommitList.js +55 -0
  59. package/lib/client/dashboard/git/GitCommitList.js.map +1 -0
  60. package/lib/client/dashboard/git/GitDiffView.d.ts +10 -0
  61. package/lib/client/dashboard/git/GitDiffView.d.ts.map +1 -0
  62. package/lib/client/dashboard/git/GitDiffView.js +65 -0
  63. package/lib/client/dashboard/git/GitDiffView.js.map +1 -0
  64. package/lib/client/dashboard/git/GitFileTypeIcon.d.ts +8 -0
  65. package/lib/client/dashboard/git/GitFileTypeIcon.d.ts.map +1 -0
  66. package/lib/client/dashboard/git/GitFileTypeIcon.js +24 -0
  67. package/lib/client/dashboard/git/GitFileTypeIcon.js.map +1 -0
  68. package/lib/client/dashboard/git/GitLineStats.d.ts +10 -0
  69. package/lib/client/dashboard/git/GitLineStats.d.ts.map +1 -0
  70. package/lib/client/dashboard/git/GitLineStats.js +9 -0
  71. package/lib/client/dashboard/git/GitLineStats.js.map +1 -0
  72. package/lib/client/dashboard/git/WorktreeGitOverview.d.ts +31 -0
  73. package/lib/client/dashboard/git/WorktreeGitOverview.d.ts.map +1 -0
  74. package/lib/client/dashboard/git/WorktreeGitOverview.js +89 -0
  75. package/lib/client/dashboard/git/WorktreeGitOverview.js.map +1 -0
  76. package/lib/client/dashboard/git/WorktreeGitPanel.d.ts +16 -0
  77. package/lib/client/dashboard/git/WorktreeGitPanel.d.ts.map +1 -0
  78. package/lib/client/dashboard/git/WorktreeGitPanel.js +126 -0
  79. package/lib/client/dashboard/git/WorktreeGitPanel.js.map +1 -0
  80. package/lib/client/dashboard/git/file-address.d.ts +2 -0
  81. package/lib/client/dashboard/git/file-address.d.ts.map +1 -0
  82. package/lib/client/dashboard/git/file-address.js +16 -0
  83. package/lib/client/dashboard/git/file-address.js.map +1 -0
  84. package/lib/client/dashboard/git/git-column-split.d.ts +34 -0
  85. package/lib/client/dashboard/git/git-column-split.d.ts.map +1 -0
  86. package/lib/client/dashboard/git/git-column-split.js +41 -0
  87. package/lib/client/dashboard/git/git-column-split.js.map +1 -0
  88. package/lib/client/dashboard/git/git-diff-parser.d.ts +24 -0
  89. package/lib/client/dashboard/git/git-diff-parser.d.ts.map +1 -0
  90. package/lib/client/dashboard/git/git-diff-parser.js +56 -0
  91. package/lib/client/dashboard/git/git-diff-parser.js.map +1 -0
  92. package/lib/client/dashboard/git/git-facts.d.ts +18 -0
  93. package/lib/client/dashboard/git/git-facts.d.ts.map +1 -0
  94. package/lib/client/dashboard/git/git-facts.js +31 -0
  95. package/lib/client/dashboard/git/git-facts.js.map +1 -0
  96. package/lib/client/dashboard/git/git-file-tree.d.ts +16 -0
  97. package/lib/client/dashboard/git/git-file-tree.d.ts.map +1 -0
  98. package/lib/client/dashboard/git/git-file-tree.js +52 -0
  99. package/lib/client/dashboard/git/git-file-tree.js.map +1 -0
  100. package/lib/client/dashboard/git/git-state-cache.d.ts +49 -0
  101. package/lib/client/dashboard/git/git-state-cache.d.ts.map +1 -0
  102. package/lib/client/dashboard/git/git-state-cache.js +80 -0
  103. package/lib/client/dashboard/git/git-state-cache.js.map +1 -0
  104. package/lib/client/dashboard/git/useGitPaneSplit.d.ts +33 -0
  105. package/lib/client/dashboard/git/useGitPaneSplit.d.ts.map +1 -0
  106. package/lib/client/dashboard/git/useGitPaneSplit.js +119 -0
  107. package/lib/client/dashboard/git/useGitPaneSplit.js.map +1 -0
  108. package/lib/client/dashboard/git/useWorktreeGitState.d.ts +60 -0
  109. package/lib/client/dashboard/git/useWorktreeGitState.d.ts.map +1 -0
  110. package/lib/client/dashboard/git/useWorktreeGitState.js +654 -0
  111. package/lib/client/dashboard/git/useWorktreeGitState.js.map +1 -0
  112. package/lib/client/dashboard/open-in-app-controller.d.ts +30 -0
  113. package/lib/client/dashboard/open-in-app-controller.d.ts.map +1 -0
  114. package/lib/client/dashboard/open-in-app-controller.js +94 -0
  115. package/lib/client/dashboard/open-in-app-controller.js.map +1 -0
  116. package/lib/client/dashboard/vscode-url.d.ts +3 -0
  117. package/lib/client/dashboard/vscode-url.d.ts.map +1 -0
  118. package/lib/client/dashboard/vscode-url.js +9 -0
  119. package/lib/client/dashboard/vscode-url.js.map +1 -0
  120. package/lib/client/dashboard/worktree-acquisition-facts.d.ts +16 -0
  121. package/lib/client/dashboard/worktree-acquisition-facts.d.ts.map +1 -0
  122. package/lib/client/dashboard/worktree-acquisition-facts.js +14 -0
  123. package/lib/client/dashboard/worktree-acquisition-facts.js.map +1 -0
  124. package/lib/client/dsh-slot-contract.d.ts +5 -0
  125. package/lib/client/dsh-slot-contract.d.ts.map +1 -1
  126. package/lib/client/entry.d.ts.map +1 -1
  127. package/lib/client/entry.js +93 -0
  128. package/lib/client/entry.js.map +1 -1
  129. package/lib/client/locales.d.ts +296 -0
  130. package/lib/client/locales.d.ts.map +1 -1
  131. package/lib/client/locales.js +296 -0
  132. package/lib/client/locales.js.map +1 -1
  133. package/lib/client/session/session-labels.d.ts +9 -0
  134. package/lib/client/session/session-labels.d.ts.map +1 -0
  135. package/lib/client/session/session-labels.js +44 -0
  136. package/lib/client/session/session-labels.js.map +1 -0
  137. package/lib/client/session/session-view.d.ts +10 -0
  138. package/lib/client/session/session-view.d.ts.map +1 -1
  139. package/lib/client/session/session-view.js +57 -0
  140. package/lib/client/session/session-view.js.map +1 -1
  141. package/lib/client/session/worktree-session-order.d.ts +2 -5
  142. package/lib/client/session/worktree-session-order.d.ts.map +1 -1
  143. package/lib/client/session/worktree-session-order.js +35 -10
  144. package/lib/client/session/worktree-session-order.js.map +1 -1
  145. package/lib/client/session/worktree-session-position.d.ts +2 -1
  146. package/lib/client/session/worktree-session-position.d.ts.map +1 -1
  147. package/lib/client/session/worktree-session-position.js +10 -3
  148. package/lib/client/session/worktree-session-position.js.map +1 -1
  149. package/lib/client/surface/actions/useDragActions.d.ts +33 -2
  150. package/lib/client/surface/actions/useDragActions.d.ts.map +1 -1
  151. package/lib/client/surface/actions/useDragActions.js +66 -18
  152. package/lib/client/surface/actions/useDragActions.js.map +1 -1
  153. package/lib/client/surface/components/ActiveWorktree.d.ts +1 -1
  154. package/lib/client/surface/components/ActiveWorktree.d.ts.map +1 -1
  155. package/lib/client/surface/components/ActiveWorktree.js +4 -3
  156. package/lib/client/surface/components/ActiveWorktree.js.map +1 -1
  157. package/lib/client/surface/components/ArchivedWorktree.d.ts +1 -1
  158. package/lib/client/surface/components/ArchivedWorktree.d.ts.map +1 -1
  159. package/lib/client/surface/components/ArchivedWorktree.js +4 -3
  160. package/lib/client/surface/components/ArchivedWorktree.js.map +1 -1
  161. package/lib/client/surface/components/ArchivedWorktrees.d.ts +1 -1
  162. package/lib/client/surface/components/ArchivedWorktrees.d.ts.map +1 -1
  163. package/lib/client/surface/components/ArchivedWorktrees.js +2 -2
  164. package/lib/client/surface/components/ArchivedWorktrees.js.map +1 -1
  165. package/lib/client/surface/components/SurfaceContent.d.ts +2 -2
  166. package/lib/client/surface/components/SurfaceContent.d.ts.map +1 -1
  167. package/lib/client/surface/components/SurfaceContent.js +1 -1
  168. package/lib/client/surface/components/SurfaceContent.js.map +1 -1
  169. package/lib/client/surface/components/SurfaceHeader.d.ts +1 -1
  170. package/lib/client/surface/components/SurfaceHeader.d.ts.map +1 -1
  171. package/lib/client/surface/components/SurfaceHeader.js +12 -3
  172. package/lib/client/surface/components/SurfaceHeader.js.map +1 -1
  173. package/lib/client/surface/components/WorkspaceTree.d.ts +1 -1
  174. package/lib/client/surface/components/WorkspaceTree.d.ts.map +1 -1
  175. package/lib/client/surface/components/WorkspaceTree.js +9 -5
  176. package/lib/client/surface/components/WorkspaceTree.js.map +1 -1
  177. package/lib/client/surface/components/rows.d.ts +2 -2
  178. package/lib/client/surface/components/rows.d.ts.map +1 -1
  179. package/lib/client/surface/components/rows.js +111 -8
  180. package/lib/client/surface/components/rows.js.map +1 -1
  181. package/lib/client/surface/selectors.d.ts +10 -0
  182. package/lib/client/surface/selectors.d.ts.map +1 -1
  183. package/lib/client/surface/selectors.js +14 -0
  184. package/lib/client/surface/selectors.js.map +1 -1
  185. package/lib/client/surface/state/useSessionExpansion.d.ts +2 -1
  186. package/lib/client/surface/state/useSessionExpansion.d.ts.map +1 -1
  187. package/lib/client/surface/state/useSessionExpansion.js +26 -13
  188. package/lib/client/surface/state/useSessionExpansion.js.map +1 -1
  189. package/lib/client/surface/state/useSessionOrdering.d.ts +1 -1
  190. package/lib/client/surface/state/useSessionOrdering.d.ts.map +1 -1
  191. package/lib/client/surface/state/useSessionOrdering.js +23 -8
  192. package/lib/client/surface/state/useSessionOrdering.js.map +1 -1
  193. package/lib/client/surface/types.d.ts +23 -3
  194. package/lib/client/surface/types.d.ts.map +1 -1
  195. package/lib/client/view/WorktreeModeAction.d.ts.map +1 -1
  196. package/lib/client/view/WorktreeModeAction.js +8 -0
  197. package/lib/client/view/WorktreeModeAction.js.map +1 -1
  198. package/lib/client/view/view-mode-dispatch.d.ts +7 -0
  199. package/lib/client/view/view-mode-dispatch.d.ts.map +1 -0
  200. package/lib/client/view/view-mode-dispatch.js +11 -0
  201. package/lib/client/view/view-mode-dispatch.js.map +1 -0
  202. package/lib/client/view/worktree-expand-state.d.ts +1 -1
  203. package/lib/client/view/worktree-expand-state.d.ts.map +1 -1
  204. package/lib/client/view/worktree-expand-state.js +8 -1
  205. package/lib/client/view/worktree-expand-state.js.map +1 -1
  206. package/lib/client/worktree-connection.d.ts +5 -0
  207. package/lib/client/worktree-connection.d.ts.map +1 -1
  208. package/lib/client/worktree-connection.js +14 -0
  209. package/lib/client/worktree-connection.js.map +1 -1
  210. package/lib/client.js +4865 -158
  211. package/lib/client.js.map +1 -1
  212. package/lib/contract/index.contract.js +10 -0
  213. package/lib/contract/index.contract.js.map +1 -1
  214. package/lib/contract/index.d.ts +163 -1
  215. package/lib/contract/index.d.ts.map +1 -1
  216. package/lib/contract/index.js +19 -0
  217. package/lib/contract/index.js.map +1 -1
  218. package/lib/host/dsh-read-adapter.d.ts +3 -1
  219. package/lib/host/dsh-read-adapter.d.ts.map +1 -1
  220. package/lib/host/dsh-read-adapter.js +5 -2
  221. package/lib/host/dsh-read-adapter.js.map +1 -1
  222. package/lib/host/remote.d.ts.map +1 -1
  223. package/lib/host/remote.js +5 -0
  224. package/lib/host/remote.js.map +1 -1
  225. package/lib/host/service.d.ts +20 -1
  226. package/lib/host/service.d.ts.map +1 -1
  227. package/lib/host/service.js +32 -0
  228. package/lib/host/service.js.map +1 -1
  229. package/lib/host/worktree-instructions.d.ts +41 -0
  230. package/lib/host/worktree-instructions.d.ts.map +1 -0
  231. package/lib/host/worktree-instructions.js +65 -0
  232. package/lib/host/worktree-instructions.js.map +1 -0
  233. package/lib/index.d.ts +4 -4
  234. package/lib/index.d.ts.map +1 -1
  235. package/lib/index.js +3 -3
  236. package/lib/index.js.map +1 -1
  237. package/lib/manage/manager-git-history.d.ts +17 -0
  238. package/lib/manage/manager-git-history.d.ts.map +1 -0
  239. package/lib/manage/manager-git-history.js +717 -0
  240. package/lib/manage/manager-git-history.js.map +1 -0
  241. package/lib/manage/manager-worktrees.d.ts.map +1 -1
  242. package/lib/manage/manager-worktrees.js +27 -0
  243. package/lib/manage/manager-worktrees.js.map +1 -1
  244. package/lib/manage/manager.d.ts +21 -1
  245. package/lib/manage/manager.d.ts.map +1 -1
  246. package/lib/manage/manager.js +60 -0
  247. package/lib/manage/manager.js.map +1 -1
  248. package/lib/manage/types.d.ts +1 -0
  249. package/lib/manage/types.d.ts.map +1 -1
  250. package/lib/provider/git/adapter.d.ts +54 -1
  251. package/lib/provider/git/adapter.d.ts.map +1 -1
  252. package/lib/provider/git/adapter.js +820 -1
  253. package/lib/provider/git/adapter.js.map +1 -1
  254. package/lib/provider/index.d.ts +2 -2
  255. package/lib/provider/index.d.ts.map +1 -1
  256. package/lib/provider/index.js +1 -1
  257. package/lib/provider/index.js.map +1 -1
  258. package/lib/provider/mutation-token.d.ts +1 -1
  259. package/lib/provider/mutation-token.d.ts.map +1 -1
  260. package/lib/provider/mutation-token.js +1 -0
  261. package/lib/provider/mutation-token.js.map +1 -1
  262. package/lib/provider/sidecar/repository.d.ts +1 -1
  263. package/lib/provider/sidecar/repository.d.ts.map +1 -1
  264. package/lib/provider/sidecar/repository.js +7 -2
  265. package/lib/provider/sidecar/repository.js.map +1 -1
  266. package/lib/provider/sidecar/sidecar-schema.d.ts +16 -3
  267. package/lib/provider/sidecar/sidecar-schema.d.ts.map +1 -1
  268. package/lib/provider/sidecar/sidecar-schema.js +117 -28
  269. package/lib/provider/sidecar/sidecar-schema.js.map +1 -1
  270. package/lib/provider/transaction/operations/create.d.ts.map +1 -1
  271. package/lib/provider/transaction/operations/create.js +21 -6
  272. package/lib/provider/transaction/operations/create.js.map +1 -1
  273. package/lib/provider/transaction/operations/import.d.ts.map +1 -1
  274. package/lib/provider/transaction/operations/import.js +1 -0
  275. package/lib/provider/transaction/operations/import.js.map +1 -1
  276. package/lib/provider/transaction/recovery/failure-recovery.d.ts.map +1 -1
  277. package/lib/provider/transaction/recovery/failure-recovery.js +11 -4
  278. package/lib/provider/transaction/recovery/failure-recovery.js.map +1 -1
  279. package/lib/provider/transaction/recovery/recover.js +11 -11
  280. package/lib/provider/transaction/recovery/recover.js.map +1 -1
  281. package/lib/provider/transaction/support/inspection.d.ts +0 -2
  282. package/lib/provider/transaction/support/inspection.d.ts.map +1 -1
  283. package/lib/provider/transaction/support/inspection.js +0 -4
  284. package/lib/provider/transaction/support/inspection.js.map +1 -1
  285. package/lib/provider/transaction/support/journal.d.ts.map +1 -1
  286. package/lib/provider/transaction/support/journal.js +4 -0
  287. package/lib/provider/transaction/support/journal.js.map +1 -1
  288. package/lib/provider/transaction/types.d.ts +1 -0
  289. package/lib/provider/transaction/types.d.ts.map +1 -1
  290. package/lib/provider/types.d.ts +53 -5
  291. package/lib/provider/types.d.ts.map +1 -1
  292. package/lib/provider/types.js +1 -1
  293. package/lib/provider/types.js.map +1 -1
  294. package/lib/typert.host.js +349 -33
  295. package/lib/typert.remote-client.d.ts +11 -1
  296. package/lib/typert.remote-client.d.ts.map +1 -1
  297. package/lib/typert.remote-client.js +349 -33
  298. package/package.json +23 -20
package/README.md CHANGED
@@ -1,102 +1,23 @@
1
+ [English](README.md) | [简体中文](README.zh.md)
2
+
1
3
  # @cerbur/clutch-dsh-worktree
2
4
 
3
5
  `@cerbur/clutch-dsh-worktree` adds a Git Worktree view to the DSH Web UI. It groups
4
6
  Sessions as Workspace → Worktree → Session while keeping DSH as the source of truth for
5
- Project/Workspace identity, Session metadata, native lists, and conversation history.
6
- The plugin stores only external Worktree/Session relationship metadata.
7
-
8
- ## Screenshots
9
-
10
- ![English Worktree sidebar and blank-session Hero](assets/screenshots/screenshots-en.png)
11
-
12
- The English screenshot shows Worktree mode in the Sidebar, a Workspace tree with Main and
13
- Worktree rows, and the read-only blank-session Hero context.
14
-
15
- ![English Worktree Create/Import dialog](assets/screenshots/screenshots-import.png)
16
-
17
- The Import screenshot shows the existing Workspace `+` dialog with Create selected by default,
18
- the adjacent Import tab, and a standard dropdown containing safe example branch/path values.
19
-
20
- ## Capabilities
21
-
22
- - Enter Worktree mode from the DSH Sidebar footer and browse Workspace → Worktree → Session.
23
- - Search Workspaces and create a Git Worktree and branch from an existing local branch.
24
- - Choose Import in the same dialog to discover unmanaged, branch-attached Git Worktrees linked to the Workspace repository. The first version omits the repository root and detached HEAD entries.
25
- - Register an existing Worktree in place without moving, copying, or editing its directory; the imported record uses `source: external` and then follows the same Session, binding, health, ordering, cwd, projection, refresh, and recovery flow as a plugin-created record.
26
- - Archive Worktrees non-destructively (`status: removed`), preserving disk files, active bindings, and runtime cwd. Disk cleanup (`git worktree remove`) requires secondary confirmation: users must confirm all Sessions, subagents, and other tasks using the directory have stopped. Worktrees can also be forgotten from plugin management while retaining disk files and Sessions.
27
- - Create a normal Session from Main or a Session whose runtime cwd is an active Worktree, then
28
- open it directly.
29
- - For active Worktree Sessions, request the named `worktree-full-access` preset after an
30
- explicit confirmation. It combines DSH `danger-full-access` with `ask`: it removes filesystem
31
- confinement for linked Git metadata while keeping approval prompts enabled; network and
32
- process policy are unchanged. The native Access menu marks `Worktree Full Access` with a
33
- Worktree branch icon.
34
- - Preserve an explicit restriction selected in DSH's native Access UI. If the custom preset is
35
- unavailable, fall back to `workspace-write + ask` when possible; if the permission capability
36
- cannot be verified, show a retryable degraded state instead of claiming Full Access.
37
- - Reuse the native `StateDot` for Session status indicators. Running, running-subagent, warning,
38
- and completed states occupy the trailing slot; idle Sessions show native relative time for the
39
- last human-authored message there. Hover or an open menu gives the trailing slot back to the
40
- existing actions menu.
41
- - Show the native DSH Session hover detail card with the complete title, relative time, and current
42
- status; the card yields to the Session actions menu and row dragging.
43
- - Cover native waiting-for-approval, plan-review, question, completed, idle, and running-subagent
44
- states without copying the animation implementation into the plugin.
45
- - Show one native running indicator on a collapsed Workspace, Main, or Worktree when any of its
46
- non-archived Sessions is active; expanded groups keep their normal action rail instead.
47
- - Promote a Session to the head of its Main or Worktree visual group after a newer user message.
48
- This ordering is browser-local and does not mutate DSH Workspace order or the Worktree sidecar.
49
- - Fork a Session from the native DSH Workspace tab, the Worktree view, or the Conversation fork
50
- action. When the parent has an active Worktree binding, the child is bound to the same Worktree,
51
- then added to the browser-local Workspace membership projection after the binding refresh; the
52
- child remains a normal DSH Session. The refresh ordering keeps it from briefly appearing in
53
- Main/Local. A sidecar failure keeps the child available and exposes retryable binding recovery.
54
- - See ready, repair, active, and detached Worktree states, including retryable operation errors.
55
- - Use the shared Main and Worktree row options menu to copy the selected row's absolute path.
56
- Main and detached rows show only `Copy path`; active Worktree rows also show `Archive Worktree`
57
- with confirmation.
58
- - Create a new Worktree from the Local or an active Worktree's options menu. The Create dialog
59
- uses the selected row's current branch as its base and suggests the next available numbered
60
- name, such as `feature-2` or `feature-3`; detached Worktrees do not expose this action.
61
- - Continue using DSH-native Workspace rename/delete/reorder and Session menus. Worktree rows can
62
- be reordered within their owning Workspace; order is stored in the plugin sidecar and Main is
63
- fixed first.
64
- - Persist Workspace, Main, and Worktree expansion choices in browser-local storage; the five-row Session overflow state remains transient and resets after refresh or parent collapse.
65
- - Provide a Collapse All button in the Worktree Header to collapse all Workspaces and Worktrees at once.
66
- - Highlight the DSH current Session in Worktree view; entering Worktree mode or switching the current Session temporarily reveals its Workspace/Main/Worktree path, expands Session overflow only when the row is outside the first five, clears a hiding search, and scrolls the row into view; this browser-local behavior does not change persisted expansion choices.
67
- - Keep the current local branch or Worktree branch visible as read-only context in the existing
68
- Conversation title row and in the blank-session Hero.
69
- - Copy the ID of any non-blank Worktree Session from its Session actions menu.
70
- - Keep Conversation and Hero context stable across same-Session snapshot updates and Session
71
- switches, while retaining the last valid context during replacement reads.
72
- - Truncate long branch labels to fit their chips and reveal the complete value through a native
73
- hover card; the Sidebar footer action follows native typography and does not add a duplicate
74
- `WT` button when the Sidebar is collapsed.
75
- - Keep Worktree Sessions in the original DSH Project/Workspace view; the plugin does not copy
76
- Session content or modify messages, prompts, transcripts, or history.
77
- - Worktree fork membership is not written to DSH's durable `Workspace.sessionIds`. While this
78
- plugin is loaded, the browser can show the child through its local projection; without the
79
- plugin, the child remains in DSH's global Session management but is not durably attached to the
80
- native Workspace root membership.
81
-
82
- ### Compatibility and prerequisites
83
-
84
- The supported compatibility facts are:
85
-
86
- | Component | Min Version | Notes |
87
- | --- | --- | --- |
88
- | DSH Client | `>=0.1.2-rc.1` | Requires the Session/Workspace Controllers and Client Store |
89
- | DSH Host | `>=0.1.2-rc.1` | Requires the Typert Gateway `/api` protocol and subprocess capability |
90
- | Git | `>=2.20.0` | Requires worktree core commands and branch discovery |
91
- | Node.js | `>=20.0.0` | LTS is recommended |
7
+ Workspace identity, Session metadata, native lists, messages, and conversation history.
92
8
 
93
- ## Installation
9
+ The plugin stores Worktree relationships, acquisition facts, and shared Worktree instructions in
10
+ its own sidecar. Managed Worktrees also expose a read-only Git & Changes dashboard where users can
11
+ choose a local branch baseline; the plugin does not copy transcripts or rewrite DSH Sessions.
94
12
 
95
- Use the npm package for the normal user installation. Use a repository checkout to develop or
96
- validate local source, or use the GitHub source path when installing the source package through a
97
- marketplace entry.
13
+ > **Preview:** Worktree Dashboard is an early, plugin-only MVP preview. Worktree navigation,
14
+ > lifecycle actions, Session actions, instructions, and the managed Worktree Git & Changes view
15
+ > are connected. Derived Worktrees, Settings, and other unfinished actions remain marked
16
+ > **Coming soon**.
98
17
 
99
- ### Install from npm (recommended)
18
+ ## Installation
19
+
20
+ ### Install from npm
100
21
 
101
22
  With an installed DSH CLI:
102
23
 
@@ -105,463 +26,322 @@ dsh plugin --profile web add @cerbur/clutch-dsh-worktree
105
26
  dsh web
106
27
  ```
107
28
 
108
- When using a `deepseek-harness` source checkout without a standalone `dsh` command, use the
109
- equivalent forwarding form:
110
-
111
- ```bash
112
- cd /path/to/deepseek-harness
113
- pnpm dsh plugin --profile web add @cerbur/clutch-dsh-worktree
114
- pnpm dsh web
115
- ```
116
-
117
- To inspect the currently published version on the official registry:
118
-
119
- ```bash
120
- npm view @cerbur/clutch-dsh-worktree version --registry=https://registry.npmjs.org/
121
- ```
29
+ When using a DeepSeek Harness source checkout without a standalone `dsh` command, use the
30
+ equivalent `pnpm dsh` form.
122
31
 
123
- ### Prepare the current upstream DSH checkout
32
+ ### Install from a local checkout
124
33
 
125
- For source-based development or validation, prepare the upstream checkout first. The current
126
- upstream default branch is `master`; follow the repository's default branch if it changes later.
127
- For the minimum rc.1 compatibility validation path, check out `dsh-v0.1.2-rc.1`:
34
+ Build this package, build the DSH source checkout, and add the package by absolute path:
128
35
 
129
36
  ```bash
130
- git clone https://github.com/deepseek-ai/deepseek-harness.git
131
- cd deepseek-harness
132
- git fetch origin
133
- git checkout dsh-v0.1.2-rc.1
134
- pnpm install
135
- pnpm run build
136
- ```
137
-
138
- ### Install from a repository checkout
139
-
140
- Build the package from the `clutch-dsh` checkout, then install its absolute path into the DSH
141
- profile:
142
-
143
- ```bash
144
- cd /path/to/clutch-dsh
37
+ cd /absolute/path/to/clutch-dsh
145
38
  pnpm install
146
39
  pnpm --filter @cerbur/clutch-dsh-worktree build
147
40
 
148
- cd /path/to/deepseek-harness
41
+ cd /absolute/path/to/deepseek-harness
149
42
  pnpm install
150
43
  pnpm run build
151
- pnpm dsh plugin --profile web add /path/to/clutch-dsh/packages/clutch-dsh-worktree
152
- pnpm dsh web --dump-config
44
+ pnpm dsh plugin --profile web add /absolute/path/to/clutch-dsh/packages/clutch-dsh-worktree
153
45
  pnpm dsh web
154
46
  ```
155
47
 
156
- The `--dump-config` output should include the plugin bundle layer. If the profile still contains
157
- an old unscoped installation, remove it first:
48
+ The DSH Web profile must be able to start before this plugin is added. Re-run the absolute-path
49
+ install command after changing `package.json` or `cordis.patch.yml`.
158
50
 
159
- ```bash
160
- pnpm dsh plugin --profile web remove clutch-dsh-worktree
161
- ```
51
+ ### Install from GitHub source (optional)
162
52
 
163
- To update a local checkout, rebuild the package and restart DSH:
164
-
165
- ```bash
166
- cd /path/to/clutch-dsh
167
- pnpm --filter @cerbur/clutch-dsh-worktree build
168
- cd /path/to/deepseek-harness
169
- pnpm dsh web
170
- ```
171
-
172
- After changing `package.json`, `cordis.patch.yml`, or the profile bundle members, run the plugin
173
- add command again.
174
-
175
- ### Install from GitHub source
176
-
177
- The source path generated by `awesome-dsh-plugin` is:
53
+ The package also supports the source dependency form used by the DSH plugin market:
178
54
 
179
55
  ```bash
180
56
  dsh plugin --profile web add "github:Cerbur/clutch-dsh#path:/packages/clutch-dsh-worktree"
181
57
  ```
182
58
 
183
- This is a source Git dependency, not a prebuilt npm package. Its `prepare` lifecycle generates
184
- `lib/`. The current DSH profile uses pnpm 11 `allowBuilds`: on the first Git installation, pnpm
185
- intentionally rejects the build and prints a complete key containing the package name, Git URL,
186
- resolved commit, and subdirectory path. Copy that complete key into the profile's
187
- `pnpm-workspace.yaml`, for example:
188
-
189
- ```yaml
190
- allowBuilds:
191
- '@cerbur/clutch-dsh-worktree@git+https://github.com/Cerbur/clutch-dsh#<resolved-commit>&path:/packages/clutch-dsh-worktree': true
192
- ```
193
-
194
- Use the exact package key printed by pnpm: `<resolved-commit>`, the Git URL, and the path must
195
- match the error output. A package-name-only entry is not enough for a direct Git dependency, and
196
- `onlyBuiltDependencies` is not the configuration used by the current pnpm 11 Git prepare flow.
197
- After saving the allowlist, rerun the original install command. A new commit requires a new key.
198
- The allowlist belongs to the profile owner who trusts that Git commit; do not add it to this
199
- plugin package.
200
-
201
- After authorization, Git prepare runs `pnpm install` in the checked-out monorepo and then
202
- `pnpm run build`, so the profile must be able to reach its configured registry. Registry DNS,
203
- mirror, or lockfile errors after authorization are installation-environment errors, not
204
- `allowBuilds` rejections. Use the npm installation above to avoid source-build authorization.
59
+ This form builds the package during installation. For pnpm build-script authorization and local
60
+ development details, see [docs/DEVELOPMENT.md](docs/DEVELOPMENT.md).
205
61
 
206
- ### Uninstall
62
+ ## Features
207
63
 
208
- ```bash
209
- cd /path/to/deepseek-harness
210
- pnpm dsh plugin --profile web remove @cerbur/clutch-dsh-worktree
211
- ```
64
+ | Feature | Preview | What it does |
65
+ | --- | --- | --- |
66
+ | **Worktree navigation** | <img src="assets/screenshots/screenshots-en.png" width="420" alt="DSH Worktree navigation with Workspace, Main, Worktree, and Session rows"> | Adds a Worktree mode to the Sidebar. Browse each Workspace through Local/Main and Git Worktree rows, then open the Sessions bound to each row. |
67
+ | **Create and import Worktrees** | <img src="assets/screenshots/screenshots-import.png" width="420" alt="Worktree create and import dialog"> | Create a Worktree from a local branch, or register an existing branch-attached Worktree in place. Import does not move, copy, or edit the existing directory. |
68
+ | **Worktree Dashboard** | <img src="assets/screenshots/screenshots-dashboard.png" width="420" alt="Worktree Dashboard preview with Sessions and Worktree actions"> | The preview Dashboard shows Worktree identity, path, Sessions, instructions, connected actions, and the read-only Git & Changes view for eligible managed Worktrees. Derived Worktrees, Settings, and other unfinished cards remain **Coming soon**. |
212
69
 
213
70
  ## Usage
214
71
 
215
72
  ### Open Worktree mode
216
73
 
217
- 1. Start the DSH Web UI and select Worktree from the Sidebar footer. Worktree mode is an
218
- additive surface; it does not add a separate Workspace/Worktree tab.
219
- 2. Use the Workspace tree to search, expand, and select the Main or Worktree view. Each group
220
- initially shows five rows; use Expand more/Collapse for additional rows.
221
-
222
- ![Worktree sidebar and blank-session Hero while using Worktree mode](assets/screenshots/screenshots-en.png)
223
-
224
- The screenshot above illustrates the Sidebar entry point and the visual context shown in the
225
- blank-session Hero. The displayed language follows DSH's current language setting.
74
+ 1. Start DSH Web and select **Worktree** from the DSH Sidebar footer.
75
+ 2. Search or expand a Workspace in the Worktree tree.
76
+ 3. Select Local/Main or a Worktree to browse its Sessions. The view is additive; DSH's native
77
+ Workspace and Session navigation remains available. Each group initially shows five rows;
78
+ use **Expand more** and **Collapse** for additional rows.
79
+ 4. Use **Collapse All** in the header to collapse other unrelated Workspaces and Worktrees;
80
+ the Workspace and Worktree containing the current Session remain expanded.
226
81
 
227
82
  ### Create a Worktree
228
83
 
229
- New directories use `$dshHome/clutch-dsh-worktree/worktree/wt_<12-hex-characters>`
230
- (15 characters in the folder name, with 48 bits of cryptographic randomness).
231
- Occupied directory names, Git registrations, and sidecar identities are automatically retried.
232
- After eight random candidates collide, numeric suffixes such as `_1` and `_2` are tried until
233
- available or cancelled. Existing Worktree paths and IDs stay unchanged; branch conflicts and
234
- other Git failures retain their normal error handling.
235
-
236
- 1. Select a Workspace, press its `+`, choose a baseline local branch, and enter a Worktree name.
237
- The default branch name is `dsh/<8-character-random-string>`.
238
- 2. To create a sibling from an existing Worktree, open that active Worktree's options menu and
239
- choose `Create new Worktree`. The dialog preselects the Worktree branch as the base and
240
- chooses the next available numeric suffix for the name; existing names are skipped.
241
- 3. The target Worktree path must be absolute, belong to the same Project, and differ from the
242
- Project root. Relative paths, a different Project, or the Project root are rejected.
243
- 4. Git must be installed and available on `PATH`. A missing Git executable shows install guidance and no command block;
244
- install Git, restart DSH, and retry. If the repository, initial commit,
245
- or local branch is missing, follow the copyable setup commands in the dialog. The plugin only
246
- renders this guidance; it does not run setup or installation commands or edit business files.
84
+ 1. Open the options menu for Local/Main or an active Worktree and choose **Create Worktree**.
85
+ 2. Choose the local base branch. You can also provide a new branch name.
86
+ 3. Confirm the dialog. The plugin creates the Git Worktree, records its acquisition facts, and
87
+ continues through the normal Session and binding flow when you open a Session from that Worktree.
88
+
89
+ Git must have a usable repository, local branch, and initial commit. If setup is incomplete, DSH
90
+ shows the relevant readiness message and copyable setup guidance.
247
91
 
248
92
  ### Import an existing Worktree
249
93
 
250
- 1. Select a Workspace, press its `+`, and choose the `Import` tab. The dialog loads Git-linked
251
- Worktrees for that repository through the existing DSH `/api` Connection.
252
- 2. The first version lists only branch-attached, non-root Worktrees that are not already present
253
- in the plugin sidecar. Detached HEAD, bare, prunable, missing-directory and missing-`.git`
254
- entries are omitted. Managed health and import eligibility share one runtime status mapping;
255
- importing rechecks that status. Locked Worktrees remain eligible when otherwise ready.
256
- Candidates are presented
257
- in a standard dropdown; each option shows its branch first and absolute path as secondary
258
- diagnostic text.
259
- 3. Choose an option and select `Import Worktree`. Registration writes only the plugin sidecar;
260
- the existing Worktree directory and Git working state remain in place. Import then creates or
261
- reuses a Session at that Worktree cwd and runs the same bind → open → binding refresh flow as
262
- Create. Newly created Sessions are not projected into native Workspace membership before the
263
- binding refresh.
264
- 4. An active external import for the same Workspace and physical path is idempotent. A path already
265
- managed by the plugin returns `WORKTREE_ALREADY_MANAGED`; invalid or stale candidates return
266
- `WORKTREE_IMPORT_INVALID` and can be retried after the repository state is fixed.
267
-
268
- ### Create Main and Worktree Sessions
269
-
270
- - Use Main's `+` to create a normal DSH Session in the Project-root view.
271
- - Use a Worktree's `+` to create or reuse a Session with that Worktree as its runtime cwd. The
272
- plugin calls the DSH Session Controller with `ctx.sessions.create({ cwd: worktreePath })`, then
273
- saves the external binding and opens the Session. The browser-local `{ workspaceId, sessionId }`
274
- membership projection is refreshed afterward, so the newly created Session does not briefly
275
- appear in Main.
276
- - The connector reuses an unarchived blank Session with the exact target cwd when possible. An
277
- already-bound Session opens directly; an unbound candidate is bound before projection and
278
- opening. Otherwise the new-Session flow is `create → bind → open → refresh`, and concurrent
279
- clicks for the same Worktree are coalesced.
280
- - If binding fails after DSH has created the Session, the Session ID remains available for Retry
281
- or Open recovery. The plugin does not delete or mutate that DSH Session.
282
- - Before opening an active Worktree Session, the plugin explains in a DSH-styled in-page dialog why
283
- linked Git metadata may need access outside the Session directory. The dialog requires an explicit
284
- risk acknowledgement; cancelling keeps the Session and binding, does not change permissions, and
285
- leaves a retryable pending state. The native DSH Access selector remains the way to switch to
286
- another permission mode.
287
- - A provisional blank Session follows DSH's native display rules: it is shown only in the
288
- selected view, uses the localized `New Session` label, hides its generated ID, and has no
289
- Rename, Fork, or Archive menu. After the first prompt is accepted, it becomes an ordinary
290
- Session row; hiding the blank row does not delete the Session or its Worktree binding.
291
-
292
- ### Session activity and ordering
293
-
294
- - Session rows reuse DSH's native `StateDot`: running Sessions, Sessions with running subagents,
295
- waiting approval, plan review, question, and completed states show their status dot in the
296
- trailing slot instead of relative time. Idle Sessions use that slot for the native compact
297
- relative-time label.
298
- - The trailing metadata uses the native compact buckets (`now`, minutes, hours, days, months, and
299
- years). It is based on DSH's `updatedAt`, which advances with the latest human-authored message;
300
- blank New Session rows have no time label. The display follows snapshot renders and does not add
301
- an independent minute ticker.
302
- - Hovering a Worktree Session row opens the native detail card after 500 ms with its full title,
303
- relative time, and status; the card is suppressed while the Session menu is open or a row is
304
- being dragged.
305
- - A collapsed Workspace, Main group, or Worktree group shows the same running dot when any
306
- non-archived member is ongoing, including activity hidden by search. Expanding the group hides
307
- the aggregate dot; hover, focus, or an open menu reveals the existing action controls.
308
- - A newer user message promotes its Session to the head of the current Main or Worktree visual
309
- group. The promotion, observed timestamps, and per-group order live only in browser-local state;
310
- successful manual drag still uses the native DSH ordering API before updating that local order.
311
-
312
- ### Fork Worktree Sessions
313
-
314
- - Use any native DSH fork entry point: a Session-list tab, a Worktree Session menu, or the
315
- Conversation fork action. The plugin wraps the shared DSH `sessions.fork` service, so the
316
- original fork cut, title increment, and child lineage stay native.
317
- - After DSH creates the child, the plugin looks up the parent's active sidecar binding, writes the
318
- child binding through the existing `/api` Manager. The Worktree view refreshes the binding before
319
- replaying the browser-local Workspace membership projection, so the child does not briefly appear
320
- in Main/Local; ready content is retained during that refresh.
321
- - If the child is created but sidecar lookup or binding fails, DSH keeps the child and the plugin
322
- shows Retry Binding/Open Created Session recovery. A later plugin initialization also retries
323
- recoverable fork children from native Session lineage summaries; it never binds unrelated
324
- subagents automatically.
325
- - This flow does not persist the child into DSH `Workspace.sessionIds`. The native DSH Workspace
326
- view can only see the temporary browser projection while the plugin is loaded; the durable native
327
- Workspace data is unchanged.
328
-
329
- ### Reorder and manage Worktrees
330
-
331
- - Drag Worktrees within their owning Workspace. The ordered `worktrees` array is persisted in
332
- the plugin sidecar; Main is a fixed first row and Worktrees cannot move across Workspaces.
94
+ 1. Select a Workspace, open its `+` action, and switch to **Import**.
95
+ 2. Choose a candidate from the branch-and-path list.
96
+ 3. Select **Import Worktree**. The plugin registers the existing directory without moving,
97
+ copying, or changing its files, then uses the same Session flow as a created Worktree.
98
+
99
+ The first version lists only ready, branch-attached, non-root Git Worktrees that are not already
100
+ managed by the plugin. Detached, bare, prunable, missing, and invalid entries are omitted. Imported
101
+ Worktrees can still use Git & Changes after you choose a local baseline branch.
102
+
103
+ ### Create and open Sessions
104
+
105
+ - Use **+** on Local/Main for a normal DSH Session whose runtime directory is the Workspace root.
106
+ - Use **+** on a Worktree for a Session whose runtime directory is that Worktree.
107
+ - When possible, the plugin reuses an unarchived blank Session with the exact target directory.
108
+ - Use native DSH fork actions from a Session list, Worktree Session menu, or conversation. A
109
+ child of a Worktree-bound Session is bound to the same Worktree and opens in that view.
110
+
111
+ If DSH creates a Session but binding fails, the Session is kept. The Worktree view exposes retry
112
+ or open recovery actions; the plugin does not delete or rewrite the DSH Session.
113
+
114
+ ### Open the Worktree Dashboard
115
+
116
+ Open **Dashboard** from a Local/Main or Worktree row menu, its hover action, or the Dashboard icon
117
+ beside the native Session-header actions. The Dashboard is a peer page to the native Session content: it
118
+ occupies the center area beside the Sidebar while leaving an already-open right sidebar visible for a
119
+ session-bound target. When the target Worktree has Sessions, opening its Dashboard waits for an initial pending
120
+ Session list to become ready, then keeps the current Session if it belongs to that Worktree; otherwise it
121
+ switches to the retained head Session so both views stay aligned. A ready
122
+ empty Session list opens a page-level Dashboard without changing the current Session, collapses any currently
123
+ open native right sidebar because there is no target Session, and does not create a Session automatically. The
124
+ Dashboard header keeps the native right-sidebar button available whenever a current Session can host it and the
125
+ sidebar is collapsed; once opened, the button is hidden following native behavior.
126
+
127
+ Use **Back to session**, Escape, a Sidebar Session, or Worktree mode exit to close it. For a Worktree with no
128
+ Sessions, the top-right action becomes **New Session** and starts one in that Worktree. The connected MVP surface
129
+ can show Overview and Sessions, create a Session or Worktree, archive a Worktree, edit instructions, copy a
130
+ path, open the recorded directory in VS Code, and inspect Git & Changes.
131
+ Derived Worktrees, Settings, and other marked quick actions remain placeholders. VS Code must be
132
+ installed on the browser's machine and able to access the recorded path; the link does not verify
133
+ launch success.
134
+
135
+ ### Use Git & Changes
136
+
137
+ Open the **Git & Changes** tab from a managed Worktree Dashboard. For a managed Worktree with a
138
+ persisted `baseBranch` that differs from the current branch, or with a captured acquisition commit that
139
+ supplies the implicit baseline, the Overview performs one compact, on-demand Git status read through the
140
+ existing `/api` Connection. It shows ahead/behind commit counts plus separate
141
+ committed (baseline-to-HEAD) and uncommitted (live working-tree) line totals; this is an ephemeral
142
+ projection, not a watcher or a Worktree-record field. Main,
143
+ unavailable, or baseline-unselected views honestly remain **Not connected**. Opening Overview does not
144
+ load the branch list; the first Git tab activation loads local branches and, once a baseline is resolved,
145
+ commit history. To replace that baseline, click the pencil icon beside the Base fact to open the branch
146
+ picker: its search field sits permanently above a bounded branch list that shows roughly seven rows and
147
+ scrolls internally, so the dialog keeps one size while you filter. Choose any local branch except the
148
+ current Worktree branch and save.
149
+ The save replaces the persisted `baseBranch` in the plugin sidecar; the saved value becomes the default for
150
+ the Git selector. Once the Git tab is open, changing its selector remains a transient view choice and reloads
151
+ history, changed files, and diffs without another Worktree-record write. If no usable saved baseline exists
152
+ (absent or equal to the current Worktree branch), the Git tab and the Overview read against the Worktree's
153
+ immutable captured acquisition commit and show that resolved commit as the Base fact; only a Worktree with
154
+ neither a usable saved baseline nor a captured commit stays baseline-unselected and prompts you to choose
155
+ one. When the selected branch has diverged, Git resolves the two heads' common ancestor. The
156
+ Git & Changes view reports Worktree commits after that ancestor as `+N` ahead and base-branch commits after it
157
+ as `-N` behind; history and file reads remain available. If the two heads have no common ancestor, the
158
+ committed summary falls back to the full tree diff between the base branch tip and Worktree `HEAD`, while
159
+ history uses the Worktree commits not reachable from that base tip.
160
+ With a valid baseline loaded, the Git & Changes tab initially selects **Baseline summary** rather than the
161
+ first commit; changing the baseline branch also returns to that summary. Choose a commit or **Uncommitted
162
+ changes** when you need a narrower target.
163
+
164
+ The selected local branch is resolved again for each read. The browser can choose only a plain local branch
165
+ name, not a raw commit SHA or arbitrary Git ref: a full ref path, tag, or remote-tracking ref is rejected
166
+ outright, while a selected branch that no longer exists shows the honest unavailable state instead of a
167
+ generic Git failure. `baseCommit` is immutable acquisition metadata, is never user-selectable directly, and
168
+ is the implicit baseline whenever no saved branch baseline is usable; creation recovery never overwrites
169
+ it. When the Worktree has staged, unstaged, or untracked
170
+ files, the list prepends an **Uncommitted changes** entry; selecting it compares the live working tree with
171
+ `HEAD` and uses the same changed-file and diff views.
172
+
173
+ The **Baseline summary** is a separate target that shows the net committed tree diff from the resolved
174
+ common ancestor to the request's captured `HEAD` (or the two branch tips when no common ancestor exists);
175
+ it excludes working-tree changes by default. Turn on **Include working tree** to replace that target with
176
+ one net diff from the same comparison boundary to the current working tree, including committed, staged,
177
+ unstaged, untracked, deleted, and renamed changes. This is a
178
+ fresh on-demand projection rather than a concatenation of two diffs. Clicking a commit shows that
179
+ commit's own diff. Turn on **Multi-select commits** in the commits header to pick several committed rows
180
+ and view the exact union of their first-parent deltas; the switch is off by default, and turning it off
181
+ collapses the selection back to the focused commit. The changed-file list
182
+ records the contributing commits, and each selected commit is rendered as its own diff segment; this is
183
+ not an implicit range and does not include unselected commits. The changed-files column header shows the
184
+ aggregate green `+N` and red `-N` totals for the current target, including the Baseline summary, selected
185
+ commits, or Uncommitted changes; binary-only totals show Unknown. The working-tree entry remains mutually
186
+ exclusive with committed multi-selection. The **Open in Sidebar** action in the summary diff toolbar
187
+ reveals the current file in the native right sidebar using the current Session, only when that Session
188
+ belongs to the Dashboard Worktree. An empty Worktree
189
+ or an unrelated current Session cannot open a file through this action.
190
+
191
+ The history is capped at 200 commits and marks longer histories as truncated. A changed-file list larger
192
+ than the Git adapter's output bound reports an explicit truncated state instead of a generic error.
193
+ Commit details use
194
+ first-parent comparisons; root commits compare against the empty tree; rename and copy rows retain
195
+ both paths; binary or oversized diffs show an explicit display-safe state. Changed-file rows show text
196
+ line counts as green `+N` additions and red `-N` deletions; binary files omit those counts. File names use
197
+ green for additions, red for deletions, and blue for other changes, and each row's title and accessible
198
+ label spells the status out. Folder icons indicate whether each folder is
199
+ expanded or collapsed. The **Uncommitted changes** entry is an on-demand snapshot, is not persisted, and is not a
200
+ Git watcher; refresh it to see later edits.
201
+
202
+ Git & Changes uses a viewport-bounded, fixed-size surface. Wide layouts show two columns: commits and
203
+ changed files stack in the narrower left column around a draggable divider, while the diff keeps the full
204
+ height on the right. Narrow layouts keep two rows: commits and changed files side by side on the first row,
205
+ with the summary diff underneath. Both dividers stay draggable in either layout — the vertical one trades
206
+ width between the columns, or between commits and changed files inside the first row, and the horizontal one
207
+ trades height between the commits and changed-file panes, or between the first row and the diff. Drag a
208
+ divider, or focus it and press the arrow keys, to move it, and double-click it to restore the default split.
209
+ Long commit and changed-file lists scroll inside their panes instead of expanding the Dashboard. The
210
+ changed-file pane also scrolls horizontally when paths are wider than the pane, keeping file and folder
211
+ names untruncated. Changed files are grouped by folders; folders start expanded and can be opened or
212
+ collapsed independently. Diff content also scrolls inside its bounded pane, while the read-only selection
213
+ and refresh behavior remains unchanged.
214
+
215
+ The view is read-only and does not provide commit or staging controls. The plugin validates committed
216
+ entries against the selected branch-to-`HEAD` projection and re-reads working-tree paths against a fresh
217
+ status projection, so these endpoints are not generic Git object or file readers. Refresh keeps ready
218
+ content visible while replacement data loads, and late responses for an older commit or file selection
219
+ are ignored.
220
+
221
+ ### Add Worktree instructions
222
+
223
+ In the Dashboard, use **Edit** on the instructions card to save or clear shared guidance, up to
224
+ 32,000 UTF-16 code units. For an active binding, the next model request receives the text as a
225
+ separate `<system-reminder>` context entry through DSH's pre-step hook.
226
+
227
+ Instructions stay in the plugin's own data. They are not written to the project directory or an
228
+ `AGENTS.md` file. Clearing, detaching, archiving, cleaning, or forgetting a Worktree stops future
229
+ injection; unchanged instruction text is not repeatedly added while its message remains visible.
230
+
231
+ ### Archive or remove a Worktree
232
+
233
+ - **Archive Worktree** is non-destructive. It keeps the directory, bindings, instructions, and
234
+ runtime Worktree context. An archived Worktree can be unarchived while its Git registration is
235
+ intact.
236
+ - **Clean Up Disk** is a separate action. It requires a second confirmation and runs the normal
237
+ non-forced `git worktree remove`. The plugin does not check whether Sessions or subagents are
238
+ still using the directory; stop those tasks before confirming. Successful cleanup detaches the
239
+ bindings while keeping the recorded history until it is forgotten.
240
+ - **Remove from Management** deletes only the plugin's Worktree and binding records. It preserves
241
+ the disk files and native DSH Sessions, and does not require a Session activity check.
242
+
243
+ ## Requirements
244
+
245
+ | Component | Requirement |
246
+ | --- | --- |
247
+ | DSH Client | `>=0.1.5-rc.1`, including the Session and Workspace Controllers and Client Store |
248
+ | DSH Host | `>=0.1.5-rc.1`, including the Typert Gateway `/api` connection and subprocess capability |
249
+ | Git | `>=2.20.0`, installed and available on `PATH` |
250
+ | Node.js | `>=20.0.0` for the DSH host runtime |
251
+
252
+ ## Behavior and limitations
253
+
254
+ - DSH owns Workspace identity and root paths, Session identity and metadata, native lists,
255
+ messages, prompts, transcripts, and history. The plugin never copies or rewrites those values.
256
+ - The plugin's external index stores Worktree paths, branches, sources, lifecycle state, bindings,
257
+ ordering, instructions, acquisition facts, and related metadata. For managed Worktrees, the
258
+ Dashboard Base fact is the persisted `baseBranch`; users can replace it with a local branch other
259
+ than the current Worktree branch, and the saved value becomes the Git-tab selector default. The
260
+ immutable acquisition `baseCommit` remains separate and is not rewritten by that edit. The index is
261
+ kept in the DSH host plugin data directory, not in a project directory or DSH's raw data store. It
262
+ does not store Session content or a copy of the Workspace root.
263
+ - Runtime `cwd` is derived for each execution. No binding, Main, or detached binding uses the
264
+ Workspace root; an active Worktree binding uses that Worktree path. The cwd is never persisted
265
+ into DSH Session metadata.
266
+ - One Session can have at most one active Worktree binding, while a Worktree can have many Sessions.
267
+ Removing or cleaning a Worktree never deletes a DSH Session. A broken active binding reports a
268
+ repair state instead of silently falling back to another Worktree.
269
+ - Git is read on relevant refreshes, when relevant menus open, and on Git Dashboard activation;
270
+ the plugin does not watch Git continuously. An external branch change is shown as branch drift
271
+ and requires explicit **Adopt current branch** before disk cleanup. Detached HEAD and
272
+ recovery-needed states remain visible and retryable.
273
+ - Worktree health is shown by tinting the branch icon: ready uses the success (green) color, branch drift uses the warning color, and repair/recovery-needed uses the error color. The localized health label remains available to assistive technology even when hover replaces the icon with the disclosure control.
333
274
  - Newly created or imported Worktrees are inserted at the head of their Workspace's Worktree list; existing Worktree order is preserved and Main remains fixed first.
334
- - Open the shared Main and Worktree options menu to copy the selected row's absolute path. Active
335
- Worktrees show `Copy path` and `Archive Worktree`. Archiving an active Worktree is an internal
336
- archive operation: it sets `status: removed`, preserves disk files, active bindings, and runtime cwd,
337
- and moves the Worktree into the default-collapsed `Archived` group at the bottom of the Workspace.
338
- - The `Archived` group is rendered at the bottom of the Workspace when archived Worktrees exist and is
339
- collapsed by default. Its label includes the total archived Worktree count, even when collapsed.
340
- Each Workspace tracks its own collapsed state independently.
341
- - Active Worktrees with `health: repair` also offer `Archive Worktree` to archive the record without
342
- touching disk files or bindings. `recovery-needed` still blocks removal pending recovery.
343
- - For archived Worktrees whose disk has not been cleaned, the options menu provides:
344
- 1. `Unarchive Worktree`: Restores a metadata-archived Worktree whose disk directory is intact back to active status, without secondary confirmation.
345
- 2. `Clean Up Disk`: Prompts for secondary confirmation detailing the path and irreversible deletion,
346
- tells you that the plugin does not check Session or subagent activity and requires you to confirm
347
- that all tasks using the directory have stopped (otherwise deletion may cause task failures or data loss),
348
- runs real non-forced `git worktree remove`, and upon success records
349
- `diskCleanup: completed`, projects health as `cleaned`, transitions bindings to detached, and
350
- normalizes Full Access permissions to `workspace-write + ask`. Disk removal commitment is decoupled
351
- from permission normalization: once disk removal commits, the dialog closes and the record updates to
352
- `cleaned`; any follow-up permission or refresh failure provides independent retry without re-executing disk removal.
353
- Use `Retry` in the permission notice to retry only permission normalization for the cleaned Worktree.
354
- If the Worktree directory or its `.git` entry was already deleted externally, confirming cleanup only marks
355
- the plugin record as completed and detaches its bindings. It does not run Git removal or prune
356
- stale Git registration. Any remaining directory and files are preserved. The completed status
357
- reads `Worktree removed`, which does not imply residual files were deleted. Ordinary refreshes still show
358
- missing directories as `repair` until cleanup is explicitly confirmed.
359
- 3. `Remove from Management`: Prompts for confirmation and removes the Worktree sidecar record and all
360
- its bindings, while preserving disk files and native DSH Sessions. It retires in-flight fork operations,
361
- recovery state, and permission notices for that Worktree. No Session activity check is required.
362
- - For archived Worktrees whose disk has already been cleaned (`health: cleaned`), the menu provides
363
- `Remove from Management` to prune the sidecar record completely.
364
- - Session activity is informational and does not block cleanup or removal from management.
365
- The default Host may report `unknown`. Before confirming disk cleanup, stop all tasks using
366
- the directory yourself; the plugin does not verify that they have stopped. Native activity
367
- changes and reopening the archived menu refresh its owning Workspace while retaining ready content.
368
- - Deleting a Workspace removes only DSH's Workspace registration; its directory, Sessions, Git Worktrees,
369
- and plugin sidecar remain.
370
- - DSH-native Workspace rename/delete/reorder and Session menus remain available. Session drag
371
- ordering is limited to the current visual Main or Worktree group.
372
- - The Main group shows the current local branch as `Local (branch)` and falls back to `Local` if
373
- DSH reports no current branch. When a Workspace is imported from a Git subdirectory, the Git
374
- root is resolved first and the same branch/worktree information is used as for the root.
375
- Branch names, paths, Workspace names, Session titles, and raw DSH/Git errors keep their
376
- original values.
377
- - Existing Sessions show read-only context in the form `Session title` → `Agent mode` →
378
- `current branch / Worktree branch`. Long values remain ellipsized in the compact chip and show
379
- their complete value in a hover card. The blank Hero shows `Workspace (branch)` after the native
380
- title when its anchors are available and offers the same complete-value hover card.
381
- - When the Sidebar is collapsed, the footer keeps its icon-only native action geometry; the plugin
382
- does not render a separate `WT` rail control.
383
-
384
- ### Reconcile a branch changed in Git
385
-
386
- After an external `git checkout`, the next Worktree read shows `old branch → current branch`
387
- and a branch-change warning. Reads occur on refresh and when opening a Worktree menu; the
388
- plugin does not watch Git continuously. Detached HEAD is shown explicitly. Session bindings
389
- and runtime cwd remain unchanged, and normal branch changes do not lock the Workspace.
390
-
391
- Choose `Adopt current branch` from the active or archived Worktree menu and confirm the
392
- displayed transition. This updates only the plugin's recorded branch. A changed branch or
393
- stale snapshot during confirmation is rejected; refresh and confirm again. Detached HEAD
394
- must first be switched to a branch in Git. Disk cleanup requires adopting the current branch
395
- first. Creating a Worktree on the old branch is allowed when Git proves the existing record
396
- has switched away; genuinely checked-out branches remain unavailable.
397
-
398
- Confirmation failures appear inside the dialog. Choose `Retry` to reload the observed branch
399
- and snapshot token, then confirm the updated transition; the old confirmation stays disabled
400
- until refresh succeeds. If the Worktree is no longer branch-drifted or has entered detached HEAD,
401
- the dialog closes. Creating a sibling Worktree uses the observed current branch, even before
402
- adoption; detached HEAD does not offer this action.
403
-
404
- For `recovery-needed`, the Worktree menu offers `Retry recovery` for its Workspace.
405
- This retries safe journal recovery; it does not adopt branches, delete unknown paths, or
406
- clear unresolved identity issues. Successful adoption and recovery refresh only the owning
407
- Workspace while preserving existing ready content. Legacy non-transactional branch observations
408
- are retired automatically; there is no need to edit sidecar JSON for ordinary checkout drift.
409
-
410
- ### Understand status and recovery messages
411
-
412
- - Operation, permission, binding, and refresh failures use DSH's native toast, one at a time.
413
- Unchanged errors are not repeated on every render. Full messages and existing Retry/Open
414
- actions remain in the expandable Notification details and recovery entry after the toast fades.
415
- Form validation and Workspace Git setup guidance remain next to their inputs.
416
- - Hover or focus an active Worktree row to see its status, path, and repair guidance for missing
417
- directories/Git registration, branch drift/detached HEAD, or incomplete recovery. Opening its
418
- menu or dragging suppresses the hover card. Archive confirmation explicitly preserves the
419
- directory, Session bindings, and cwd for both plugin-created and external Worktrees;
420
- Clean Disk remains a separate action.
421
-
422
- - `ready` means the Worktree is available. `cleaned` indicates disk cleanup completed while the
423
- sidecar archive entry is retained. `repair` identifies a missing or invalid Worktree, Session, binding,
424
- or cwd. `recovery-needed` means a Git/sidecar operation or identity check is unresolved and
425
- destructive actions are blocked. `detached` means the Git Worktree was removed while the relationship
426
- was retained. An active binding pointing to a missing Worktree produces
427
- an explicit repair warning or error; it never silently falls back to another Worktree.
428
- - Without a pending Git transaction, missing active or archived Worktrees remain `repair` and
429
- can be archived without blocking healthy Worktree Session bindings. Legacy non-transactional
430
- `WORKTREE_RECOVERY_REQUIRED` observations for existing, uncleaned records are retired under
431
- the sidecar lock; pending transactions, unknown records, and identity-change issues still block.
432
- - Worktree health is a runtime Git projection and is not written to the sidecar. Git readiness
433
- failures are shown per Workspace: a missing Git executable shows installation guidance without
434
- commands, while repository, initial commit, or local branch failures show copyable setup
435
- commands. Connection, Gateway, and unexpected Worktree-domain failures remain visible as
436
- retryable errors rather than empty lists.
437
- - Permission status is also explicit: Full Access, fallback `workspace-write`, preserved user
438
- restriction, unverified capability, confirmation pending, and retryable setup failure are not
439
- silently collapsed into an empty or falsely successful Worktree state.
440
- - Refreshing an already-ready view preserves its current projection until replacement data is
441
- available. Same-Session snapshot updates do not blank the context or trigger redundant reads;
442
- initial entry and explicit Retry may show a loading state when no cached view is available.
275
+ - Persist Workspace, Main, and Worktree expansion choices in browser-local storage; the five-row Session overflow state remains transient and resets after refresh or parent collapse. **Collapse All** collapses unrelated nodes while keeping the current Session's Workspace and Worktree expanded.
276
+ - When the current Session is outside the visible tree, the matching row is highlighted and temporarily revealed; positioning keeps the navigation scroll unchanged when the row is already visible and moves only enough to expose it otherwise. This does not change persisted expansion choices.
277
+ - Git Dashboard reads run on the Host through the existing DSH `/api` transport. The browser does
278
+ not execute Git, read sidecar files or `.git`, or expose working-tree mutation controls. File
279
+ diffs disable external diff and text conversion and are bounded for safe display.
280
+ - The Git Dashboard is intentionally limited to committed history, a read-only **Baseline summary**
281
+ (optionally including one fresh baseline-to-working-tree projection), one **Uncommitted changes**
282
+ snapshot, changed files, and one unified diff at a time. These projections combine staged, unstaged,
283
+ and untracked files when requested but are never written back to Git. The Dashboard does not provide
284
+ commit, staging, reset, revert, cherry-pick, fetch, push, pull, pull requests, graph lanes, pagination,
285
+ or syntax highlighting.
286
+ - Session rows use DSH's native status and relative-time presentation. Collapsed Workspace, Main,
287
+ and Worktree groups derive one aggregate `StateDot` from their complete eligible membership (after native blank/archive filtering): waiting
288
+ approval (and other pending-interaction warnings) takes priority over running, and running
289
+ takes priority over completed. Idle Sessions do not contribute a group dot; Worktree health
290
+ remains a separate leading indicator. Visual Session ordering initially follows the newest `updatedAt` values and
291
+ remains browser-local; Main remains fixed first, Worktree drag updates only this local order projection,
292
+ and Main drag updates native Workspace order only after DSH accepts it.
293
+ - Active Worktree Sessions may request the named `worktree-full-access` preset after an explicit
294
+ confirmation. It combines DSH `danger-full-access` with `ask`, keeps approval prompts enabled,
295
+ and does not change network or process policy. If unavailable, the plugin falls back to
296
+ `workspace-write + ask` when possible or reports an unverified, retryable state. It cannot
297
+ exceed the sandbox imposed by the host running DSH.
298
+ - Git must be installed and available on `PATH`. A missing Git executable shows install guidance
299
+ and no command block; the plugin does not run setup or installation commands.
300
+ - If the plugin's external index is unavailable or corrupt, native DSH Workspace and Session views
301
+ remain readable and the plugin enters a degraded read-only state. It never replaces native data
302
+ with an empty index.
443
303
 
444
304
  ## Language behavior
445
305
 
446
- Worktree mode follows DSH's current interface language. DSH owns the language preference; the
447
- plugin does not add an independent language setting. The Worktree entry point, Workspace →
448
- Worktree → Session tree, menus, dialogs, statuses, and retry messages are localized in English
449
- and Chinese.
450
-
451
- Workspace names, Session titles, branch names, paths, and raw DSH/Host error messages remain
452
- unchanged for diagnosis and continued use of native DSH data. The Main group is localized as
453
- `Local (branch)` in English and `本地(branch)` in Chinese, with `Local`/`本地` as the fallback
454
- when no current branch is reported.
455
-
456
- ## Data boundaries and current limitations
457
-
458
- DSH owns the original Project/Workspace identity and root, Session identity and metadata, native
459
- Project/Session lists, messages, prompts, transcripts, and history. The plugin does not copy or
460
- rewrite any of those values. Its external index lives in the DSH host's plugin data directory or
461
- an independent sidecar store and may contain only relationship facts such as:
462
-
463
- - `projectId`, `worktreeId`, and `sessionId`;
464
- - an absolute Worktree path, branch, and lifecycle state;
465
- - the Worktree source (`plugin` or `external`);
466
- - binding status and schema version.
467
-
468
- The index is not written into a Project working tree or DSH's raw data directory. It does not
469
- store a copy of `projectRoot` or any Session content. If the sidecar is unavailable or corrupt,
470
- the native Project/Session view remains readable and the plugin becomes degraded/read-only; an
471
- empty index must never overwrite the native DSH lists.
472
-
473
- The sidecar accepts v1, v2, and v3 snapshots for backwards-compatible reads. Legacy records are
474
- normalized in memory, and the first successful mutation atomically upgrades the shard to v4.
475
- Legacy removed records become `diskCleanup: completed`; v3 revisions are preserved.
476
- New v4 snapshots use a revision, an opaque repository fingerprint, and durable pending-operation
477
- metadata for Git create/remove. A transitional v3 snapshot containing an older raw repository
478
- field is read and cleaned on its next stable write. Invalid JSON, unknown schema versions, and
479
- invariant violations are reported as corruption rather than reset to an empty index.
480
-
481
- Each Session has at most one active Worktree binding, while a Worktree may have multiple bound
482
- Sessions. Rebinding the same Session to the same Worktree is idempotent; binding it to two active
483
- Worktrees is a conflict. A Session with no binding, a Main binding, or a detached binding runs
484
- with the Project root as cwd. An active Worktree binding runs with that Worktree path. The cwd is
485
- derived for each execution and is never persisted back into DSH Session metadata.
486
-
487
- Worktree creation creates the Git Worktree before recording its external relationship. Git
488
- create/remove mutations are serialized across Host processes per Workspace and repository,
489
- record a durable pending operation, and verify the actual Git result before publishing stable
490
- sidecar state. If a create cannot be reconciled or a path/repository identity changes, the
491
- operation remains explicitly recoverable; the plugin never uses force removal or deletes an
492
- unknown directory. If a sidecar write fails, the new Git Worktree is cleaned up when possible. A
493
- failed Worktree deletion does not silently change the relation, so it remains retryable or is
494
- marked `recovery-needed`. Session creation uses the native DSH API before binding; a binding
495
- failure never deletes or modifies the already-created Session.
496
-
497
- On Host startup, the plugin performs a best-effort safe recovery for known DSH Workspaces. It may
498
- finalize a pending create/remove only when Git path and repository identity are certain; otherwise
499
- it retains the marker and surfaces `WORKTREE_RECOVERY_REQUIRED` or
500
- `WORKTREE_IDENTITY_CHANGED`. It never guesses at destructive cleanup. A destructive action may
501
- also carry an opaque mutation token from the latest Worktree projection so a stale UI cannot act
502
- on a changed record.
503
-
504
- The Worktree session flow sends the independent Worktree cwd through the DSH Session Controller and
505
- keeps `{ workspaceId, sessionId }` as a browser-local membership projection rather than a
506
- persistent DSH attach. It does not modify DSH source, Session metadata, or native Workspace
507
- storage. The projection is replayed after native list refreshes and removed when the binding
508
- disappears or the Client is disposed.
509
-
510
- Permission changes use only the public DSH per-Session permission service and its
511
- `permission/preset`, `sandbox/mode`, and `approval/policy` records. The plugin does not write
512
- messages, prompts, transcripts, Workspace data, or Session metadata, and cannot enlarge a
513
- filesystem sandbox imposed by the host running DSH.
514
-
515
- The blank Hero context is visual only. Because the current upstream DSH source checkout has no
516
- additive Hero headline slot, its placement depends on the native `[data-phase="hero"]` and title
517
- anchors; it disappears when those anchors are unavailable and should move to a formal DSH slot
518
- when one exists.
519
-
520
- ## Development and verification
521
-
522
- From the workspace root:
306
+ Worktree mode follows DSH's current interface language. The entry point, tree, menus, dialogs,
307
+ statuses, Dashboard labels, and retry messages are localized in English and Chinese. Workspace
308
+ names, Session titles, branch names, paths, and raw DSH or Git errors keep their original values.
309
+
310
+ ## Development
311
+
312
+ For architecture, local DSH integration, testing, and contribution details, see:
313
+
314
+ - [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md)
315
+ - [docs/DEVELOPMENT.md](docs/DEVELOPMENT.md)
316
+ - [docs/RELEASING.md](docs/RELEASING.md)
317
+ - [AGENTS.md](AGENTS.md)
318
+ - [src/client/README.md](src/client/README.md)
319
+
320
+ The focused package commands are:
523
321
 
524
322
  ```bash
525
- cd /path/to/clutch-dsh
526
- pnpm install
527
- pnpm run check:workspace
528
- pnpm run check:patches
529
323
  pnpm --filter @cerbur/clutch-dsh-worktree typecheck
530
324
  pnpm --filter @cerbur/clutch-dsh-worktree build
531
325
  pnpm --filter @cerbur/clutch-dsh-worktree test
532
326
  ```
533
327
 
534
- For the bilingual README contract and formatting:
328
+ The bilingual README structure is checked with:
535
329
 
536
330
  ```bash
537
- cd /path/to/clutch-dsh/packages/clutch-dsh-worktree
538
331
  node --test test/readme-parity.test.mjs
539
- pnpm exec prettier --check README.md README.zh.md test/readme-parity.test.mjs
540
332
  ```
541
333
 
542
- The full workspace check is:
334
+ ## Uninstall
335
+
336
+ With the DSH CLI:
543
337
 
544
338
  ```bash
545
- cd /path/to/clutch-dsh
546
- pnpm run check
339
+ dsh plugin --profile web remove @cerbur/clutch-dsh-worktree
547
340
  ```
548
341
 
549
- Do not commit generated `lib/`, coverage, sidecar data, or local credentials. See [AGENTS.md](AGENTS.md)
550
- for package data boundaries and lifecycle rules, [docs/RELEASING.md](docs/RELEASING.md) for
551
- version and installation-source details, and [src/client/README.md](src/client/README.md) for
552
- the browser Consumer boundary.
342
+ From a DeepSeek Harness checkout, use `pnpm dsh plugin --profile web remove` with the same package
343
+ name.
553
344
 
554
- ## Marketplace description
555
-
556
- When submitting to `awesome-dsh-plugin`, use the `git` category and keep the description aligned
557
- with the package:
558
-
559
- ```yaml
560
- category: git
561
- description:
562
- en: Adds a Worktree view to DSH Web UI that groups Sessions by Git worktree while keeping DSH as the source of truth.
563
- zh: 为 DSH Web UI 增加按 Git Worktree 组织 Session 的视角,同时继续由 DSH 管理原始 Project/Workspace 和 Session 数据。
564
- ```
345
+ ## Friendly Links
565
346
 
566
- Marketplace submission also requires external checks such as the `dsh-plugin` topic, repository
567
- age, and commit count. A package README cannot set those external properties.
347
+ - [LINUX DO](https://linux.do/) — A new ideal community.