@cerbur/clutch-dsh-worktree 0.1.9 → 0.1.12

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 (565) hide show
  1. package/README.md +230 -231
  2. package/README.zh.md +184 -225
  3. package/assets/screenshots/screenshots-dashboard.webp +0 -0
  4. package/assets/screenshots/screenshots-en.png +0 -0
  5. package/assets/screenshots/screenshots-import.png +0 -0
  6. package/assets/screenshots/screenshots-zh.png +0 -0
  7. package/lib/client/WorktreeSurface.d.ts +4 -7
  8. package/lib/client/WorktreeSurface.d.ts.map +1 -1
  9. package/lib/client/WorktreeSurface.js +179 -1418
  10. package/lib/client/WorktreeSurface.js.map +1 -1
  11. package/lib/client/{WorktreeContext.d.ts → context/WorktreeContext.d.ts} +1 -1
  12. package/lib/client/context/WorktreeContext.d.ts.map +1 -0
  13. package/lib/client/context/WorktreeContext.js.map +1 -0
  14. package/lib/client/{WorktreeHeroContext.d.ts → context/WorktreeHeroContext.d.ts} +1 -1
  15. package/lib/client/context/WorktreeHeroContext.d.ts.map +1 -0
  16. package/lib/client/context/WorktreeHeroContext.js.map +1 -0
  17. package/lib/client/{worktree-context-store.d.ts → context/worktree-context-store.d.ts} +1 -1
  18. package/lib/client/context/worktree-context-store.d.ts.map +1 -0
  19. package/lib/client/{worktree-context-store.js → context/worktree-context-store.js} +2 -2
  20. package/lib/client/context/worktree-context-store.js.map +1 -0
  21. package/lib/client/{worktree-context.d.ts → context/worktree-context.d.ts} +1 -1
  22. package/lib/client/context/worktree-context.d.ts.map +1 -0
  23. package/lib/client/{worktree-context.js → context/worktree-context.js} +5 -3
  24. package/lib/client/context/worktree-context.js.map +1 -0
  25. package/lib/client/dashboard/DashboardHeaderAction.d.ts +20 -0
  26. package/lib/client/dashboard/DashboardHeaderAction.d.ts.map +1 -0
  27. package/lib/client/dashboard/DashboardHeaderAction.js +19 -0
  28. package/lib/client/dashboard/DashboardHeaderAction.js.map +1 -0
  29. package/lib/client/dashboard/OpenInAppButton.d.ts +9 -0
  30. package/lib/client/dashboard/OpenInAppButton.d.ts.map +1 -0
  31. package/lib/client/dashboard/OpenInAppButton.js +123 -0
  32. package/lib/client/dashboard/OpenInAppButton.js.map +1 -0
  33. package/lib/client/dashboard/WorktreeDashboard.d.ts +21 -0
  34. package/lib/client/dashboard/WorktreeDashboard.d.ts.map +1 -0
  35. package/lib/client/dashboard/WorktreeDashboard.js +211 -0
  36. package/lib/client/dashboard/WorktreeDashboard.js.map +1 -0
  37. package/lib/client/dashboard/WorktreeInstructions.d.ts +8 -0
  38. package/lib/client/dashboard/WorktreeInstructions.d.ts.map +1 -0
  39. package/lib/client/dashboard/WorktreeInstructions.js +53 -0
  40. package/lib/client/dashboard/WorktreeInstructions.js.map +1 -0
  41. package/lib/client/dashboard/dashboard-icon.d.ts +7 -0
  42. package/lib/client/dashboard/dashboard-icon.d.ts.map +1 -0
  43. package/lib/client/dashboard/dashboard-icon.js +6 -0
  44. package/lib/client/dashboard/dashboard-icon.js.map +1 -0
  45. package/lib/client/dashboard/dashboard-overlay.d.ts +11 -0
  46. package/lib/client/dashboard/dashboard-overlay.d.ts.map +1 -0
  47. package/lib/client/dashboard/dashboard-overlay.js +120 -0
  48. package/lib/client/dashboard/dashboard-overlay.js.map +1 -0
  49. package/lib/client/dashboard/dashboard-selection.d.ts +32 -0
  50. package/lib/client/dashboard/dashboard-selection.d.ts.map +1 -0
  51. package/lib/client/dashboard/dashboard-selection.js +31 -0
  52. package/lib/client/dashboard/dashboard-selection.js.map +1 -0
  53. package/lib/client/dashboard/dashboard-sessions.d.ts +6 -0
  54. package/lib/client/dashboard/dashboard-sessions.d.ts.map +1 -0
  55. package/lib/client/dashboard/dashboard-sessions.js +21 -0
  56. package/lib/client/dashboard/dashboard-sessions.js.map +1 -0
  57. package/lib/client/dashboard/open-in-app-controller.d.ts +30 -0
  58. package/lib/client/dashboard/open-in-app-controller.d.ts.map +1 -0
  59. package/lib/client/dashboard/open-in-app-controller.js +94 -0
  60. package/lib/client/dashboard/open-in-app-controller.js.map +1 -0
  61. package/lib/client/dashboard/vscode-url.d.ts +3 -0
  62. package/lib/client/dashboard/vscode-url.d.ts.map +1 -0
  63. package/lib/client/dashboard/vscode-url.js +9 -0
  64. package/lib/client/dashboard/vscode-url.js.map +1 -0
  65. package/lib/client/dashboard/worktree-acquisition-facts.d.ts +16 -0
  66. package/lib/client/dashboard/worktree-acquisition-facts.d.ts.map +1 -0
  67. package/lib/client/dashboard/worktree-acquisition-facts.js +14 -0
  68. package/lib/client/dashboard/worktree-acquisition-facts.js.map +1 -0
  69. package/lib/client/dsh-slot-contract.d.ts +5 -0
  70. package/lib/client/dsh-slot-contract.d.ts.map +1 -1
  71. package/lib/client/entry.d.ts +1 -1
  72. package/lib/client/entry.d.ts.map +1 -1
  73. package/lib/client/entry.js +90 -13
  74. package/lib/client/entry.js.map +1 -1
  75. package/lib/client/index.d.ts +3 -3
  76. package/lib/client/index.d.ts.map +1 -1
  77. package/lib/client/index.js +2 -2
  78. package/lib/client/index.js.map +1 -1
  79. package/lib/client/locales.d.ts +204 -0
  80. package/lib/client/locales.d.ts.map +1 -1
  81. package/lib/client/locales.js +214 -10
  82. package/lib/client/locales.js.map +1 -1
  83. package/lib/client/{WorktreeOverlay.d.ts → overlay/WorktreeOverlay.d.ts} +2 -2
  84. package/lib/client/overlay/WorktreeOverlay.d.ts.map +1 -0
  85. package/lib/client/{WorktreeOverlay.js → overlay/WorktreeOverlay.js} +2 -2
  86. package/lib/client/overlay/WorktreeOverlay.js.map +1 -0
  87. package/lib/client/overlay/overlay-bounds.d.ts.map +1 -0
  88. package/lib/client/overlay/overlay-bounds.js.map +1 -0
  89. package/lib/client/overlay/sidebar-overlay-geometry.d.ts.map +1 -0
  90. package/lib/client/overlay/sidebar-overlay-geometry.js.map +1 -0
  91. package/lib/client/permission/worktree-permission-icon.d.ts.map +1 -0
  92. package/lib/client/permission/worktree-permission-icon.js.map +1 -0
  93. package/lib/client/permission/worktree-permission.d.ts.map +1 -0
  94. package/lib/client/permission/worktree-permission.js.map +1 -0
  95. package/lib/client/session/session-labels.d.ts +9 -0
  96. package/lib/client/session/session-labels.d.ts.map +1 -0
  97. package/lib/client/session/session-labels.js +44 -0
  98. package/lib/client/session/session-labels.js.map +1 -0
  99. package/lib/client/session/session-view.d.ts.map +1 -0
  100. package/lib/client/session/session-view.js.map +1 -0
  101. package/lib/client/{virtual-workspace-membership.d.ts → session/virtual-workspace-membership.d.ts} +1 -1
  102. package/lib/client/session/virtual-workspace-membership.d.ts.map +1 -0
  103. package/lib/client/{virtual-workspace-membership.js → session/virtual-workspace-membership.js} +1 -1
  104. package/lib/client/session/virtual-workspace-membership.js.map +1 -0
  105. package/lib/client/{worktree-session-fork.d.ts → session/worktree-session-fork.d.ts} +7 -1
  106. package/lib/client/session/worktree-session-fork.d.ts.map +1 -0
  107. package/lib/client/{worktree-session-fork.js → session/worktree-session-fork.js} +50 -4
  108. package/lib/client/session/worktree-session-fork.js.map +1 -0
  109. package/lib/client/session/worktree-session-order.d.ts.map +1 -0
  110. package/lib/client/session/worktree-session-order.js.map +1 -0
  111. package/lib/client/session/worktree-session-position.d.ts.map +1 -0
  112. package/lib/client/session/worktree-session-position.js.map +1 -0
  113. package/lib/client/{worktree-session.d.ts → session/worktree-session.d.ts} +3 -3
  114. package/lib/client/session/worktree-session.d.ts.map +1 -0
  115. package/lib/client/{worktree-session.js → session/worktree-session.js} +3 -3
  116. package/lib/client/session/worktree-session.js.map +1 -0
  117. package/lib/client/surface/actions/lifecycle-commands.d.ts +9 -0
  118. package/lib/client/surface/actions/lifecycle-commands.d.ts.map +1 -0
  119. package/lib/client/surface/actions/lifecycle-commands.js +243 -0
  120. package/lib/client/surface/actions/lifecycle-commands.js.map +1 -0
  121. package/lib/client/surface/actions/useDragActions.d.ts +26 -0
  122. package/lib/client/surface/actions/useDragActions.d.ts.map +1 -0
  123. package/lib/client/surface/actions/useDragActions.js +125 -0
  124. package/lib/client/surface/actions/useDragActions.js.map +1 -0
  125. package/lib/client/surface/actions/useLifecycleActions.d.ts +30 -0
  126. package/lib/client/surface/actions/useLifecycleActions.d.ts.map +1 -0
  127. package/lib/client/surface/actions/useLifecycleActions.js +140 -0
  128. package/lib/client/surface/actions/useLifecycleActions.js.map +1 -0
  129. package/lib/client/surface/actions/useNativeActions.d.ts +48 -0
  130. package/lib/client/surface/actions/useNativeActions.d.ts.map +1 -0
  131. package/lib/client/surface/actions/useNativeActions.js +182 -0
  132. package/lib/client/surface/actions/useNativeActions.js.map +1 -0
  133. package/lib/client/surface/actions/useSessionActions.d.ts +24 -0
  134. package/lib/client/surface/actions/useSessionActions.d.ts.map +1 -0
  135. package/lib/client/surface/actions/useSessionActions.js +116 -0
  136. package/lib/client/surface/actions/useSessionActions.js.map +1 -0
  137. package/lib/client/surface/actions/useSurfaceMutation.d.ts +15 -0
  138. package/lib/client/surface/actions/useSurfaceMutation.d.ts.map +1 -0
  139. package/lib/client/surface/actions/useSurfaceMutation.js +24 -0
  140. package/lib/client/surface/actions/useSurfaceMutation.js.map +1 -0
  141. package/lib/client/surface/actions/useWorktreeRegistration.d.ts +31 -0
  142. package/lib/client/surface/actions/useWorktreeRegistration.d.ts.map +1 -0
  143. package/lib/client/surface/actions/useWorktreeRegistration.js +203 -0
  144. package/lib/client/surface/actions/useWorktreeRegistration.js.map +1 -0
  145. package/lib/client/surface/actions/worktree-cleanup-flow.d.ts +10 -0
  146. package/lib/client/surface/actions/worktree-cleanup-flow.d.ts.map +1 -0
  147. package/lib/client/surface/actions/worktree-cleanup-flow.js +19 -0
  148. package/lib/client/surface/actions/worktree-cleanup-flow.js.map +1 -0
  149. package/lib/client/surface/components/AccessConfirmation.d.ts +9 -0
  150. package/lib/client/surface/components/AccessConfirmation.d.ts.map +1 -0
  151. package/lib/client/surface/components/AccessConfirmation.js +18 -0
  152. package/lib/client/surface/components/AccessConfirmation.js.map +1 -0
  153. package/lib/client/surface/components/ActiveWorktree.d.ts +28 -0
  154. package/lib/client/surface/components/ActiveWorktree.d.ts.map +1 -0
  155. package/lib/client/surface/components/ActiveWorktree.js +155 -0
  156. package/lib/client/surface/components/ActiveWorktree.js.map +1 -0
  157. package/lib/client/surface/components/ArchivedWorktree.d.ts +24 -0
  158. package/lib/client/surface/components/ArchivedWorktree.d.ts.map +1 -0
  159. package/lib/client/surface/components/ArchivedWorktree.js +146 -0
  160. package/lib/client/surface/components/ArchivedWorktree.js.map +1 -0
  161. package/lib/client/surface/components/ArchivedWorktrees.d.ts +25 -0
  162. package/lib/client/surface/components/ArchivedWorktrees.d.ts.map +1 -0
  163. package/lib/client/surface/components/ArchivedWorktrees.js +20 -0
  164. package/lib/client/surface/components/ArchivedWorktrees.js.map +1 -0
  165. package/lib/client/surface/components/LifecycleDialogs.d.ts +20 -0
  166. package/lib/client/surface/components/LifecycleDialogs.d.ts.map +1 -0
  167. package/lib/client/surface/components/LifecycleDialogs.js +31 -0
  168. package/lib/client/surface/components/LifecycleDialogs.js.map +1 -0
  169. package/lib/client/surface/components/NativeDialogs.d.ts +9 -0
  170. package/lib/client/surface/components/NativeDialogs.d.ts.map +1 -0
  171. package/lib/client/surface/components/NativeDialogs.js +14 -0
  172. package/lib/client/surface/components/NativeDialogs.js.map +1 -0
  173. package/lib/client/surface/components/NotificationToasts.d.ts +7 -0
  174. package/lib/client/surface/components/NotificationToasts.d.ts.map +1 -0
  175. package/lib/client/surface/components/NotificationToasts.js +24 -0
  176. package/lib/client/surface/components/NotificationToasts.js.map +1 -0
  177. package/lib/client/surface/components/RegistrationDialog.d.ts +15 -0
  178. package/lib/client/surface/components/RegistrationDialog.d.ts.map +1 -0
  179. package/lib/client/surface/components/RegistrationDialog.js +22 -0
  180. package/lib/client/surface/components/RegistrationDialog.js.map +1 -0
  181. package/lib/client/surface/components/SurfaceContent.d.ts +31 -0
  182. package/lib/client/surface/components/SurfaceContent.d.ts.map +1 -0
  183. package/lib/client/surface/components/SurfaceContent.js +65 -0
  184. package/lib/client/surface/components/SurfaceContent.js.map +1 -0
  185. package/lib/client/surface/components/SurfaceHeader.d.ts +15 -0
  186. package/lib/client/surface/components/SurfaceHeader.d.ts.map +1 -0
  187. package/lib/client/surface/components/SurfaceHeader.js +42 -0
  188. package/lib/client/surface/components/SurfaceHeader.js.map +1 -0
  189. package/lib/client/surface/components/WorkspaceTree.d.ts +32 -0
  190. package/lib/client/surface/components/WorkspaceTree.d.ts.map +1 -0
  191. package/lib/client/surface/components/WorkspaceTree.js +149 -0
  192. package/lib/client/surface/components/WorkspaceTree.js.map +1 -0
  193. package/lib/client/{worktree-surface-dialogs.d.ts → surface/components/dialogs.d.ts} +5 -2
  194. package/lib/client/surface/components/dialogs.d.ts.map +1 -0
  195. package/lib/client/{worktree-surface-dialogs.js → surface/components/dialogs.js} +67 -24
  196. package/lib/client/surface/components/dialogs.js.map +1 -0
  197. package/lib/client/{worktree-surface-rows.d.ts → surface/components/rows.d.ts} +3 -3
  198. package/lib/client/surface/components/rows.d.ts.map +1 -0
  199. package/lib/client/{worktree-surface-rows.js → surface/components/rows.js} +180 -20
  200. package/lib/client/surface/components/rows.js.map +1 -0
  201. package/lib/client/surface/notification-queue.d.ts +11 -0
  202. package/lib/client/surface/notification-queue.d.ts.map +1 -0
  203. package/lib/client/surface/notification-queue.js +19 -0
  204. package/lib/client/surface/notification-queue.js.map +1 -0
  205. package/lib/client/{worktree-surface-selectors.d.ts → surface/selectors.d.ts} +10 -5
  206. package/lib/client/surface/selectors.d.ts.map +1 -0
  207. package/lib/client/{worktree-surface-selectors.js → surface/selectors.js} +23 -6
  208. package/lib/client/surface/selectors.js.map +1 -0
  209. package/lib/client/surface/shared.d.ts +40 -0
  210. package/lib/client/surface/shared.d.ts.map +1 -0
  211. package/lib/client/surface/shared.js +53 -0
  212. package/lib/client/surface/shared.js.map +1 -0
  213. package/lib/client/surface/state/useLifecycleState.d.ts +34 -0
  214. package/lib/client/surface/state/useLifecycleState.d.ts.map +1 -0
  215. package/lib/client/surface/state/useLifecycleState.js +39 -0
  216. package/lib/client/surface/state/useLifecycleState.js.map +1 -0
  217. package/lib/client/surface/state/useRegistrationState.d.ts +34 -0
  218. package/lib/client/surface/state/useRegistrationState.d.ts.map +1 -0
  219. package/lib/client/surface/state/useRegistrationState.js +44 -0
  220. package/lib/client/surface/state/useRegistrationState.js.map +1 -0
  221. package/lib/client/surface/state/useSessionExpansion.d.ts +39 -0
  222. package/lib/client/surface/state/useSessionExpansion.d.ts.map +1 -0
  223. package/lib/client/surface/state/useSessionExpansion.js +230 -0
  224. package/lib/client/surface/state/useSessionExpansion.js.map +1 -0
  225. package/lib/client/surface/state/useSessionOrdering.d.ts +15 -0
  226. package/lib/client/surface/state/useSessionOrdering.d.ts.map +1 -0
  227. package/lib/client/surface/state/useSessionOrdering.js +68 -0
  228. package/lib/client/surface/state/useSessionOrdering.js.map +1 -0
  229. package/lib/client/surface/state/useSurfaceMenus.d.ts +9 -0
  230. package/lib/client/surface/state/useSurfaceMenus.d.ts.map +1 -0
  231. package/lib/client/surface/state/useSurfaceMenus.js +15 -0
  232. package/lib/client/surface/state/useSurfaceMenus.js.map +1 -0
  233. package/lib/client/surface/state/useSurfaceRefresh.d.ts +39 -0
  234. package/lib/client/surface/state/useSurfaceRefresh.d.ts.map +1 -0
  235. package/lib/client/surface/state/useSurfaceRefresh.js +274 -0
  236. package/lib/client/surface/state/useSurfaceRefresh.js.map +1 -0
  237. package/lib/client/surface/state/useSurfaceSources.d.ts +31 -0
  238. package/lib/client/surface/state/useSurfaceSources.d.ts.map +1 -0
  239. package/lib/client/surface/state/useSurfaceSources.js +63 -0
  240. package/lib/client/surface/state/useSurfaceSources.js.map +1 -0
  241. package/lib/client/{worktree-surface-types.d.ts → surface/types.d.ts} +58 -13
  242. package/lib/client/surface/types.d.ts.map +1 -0
  243. package/lib/client/surface/types.js +2 -0
  244. package/lib/client/surface/types.js.map +1 -0
  245. package/lib/client/{WorktreeModeAction.d.ts → view/WorktreeModeAction.d.ts} +1 -1
  246. package/lib/client/view/WorktreeModeAction.d.ts.map +1 -0
  247. package/lib/client/{WorktreeModeAction.js → view/WorktreeModeAction.js} +9 -1
  248. package/lib/client/view/WorktreeModeAction.js.map +1 -0
  249. package/lib/client/view/navigation.d.ts.map +1 -0
  250. package/lib/client/view/navigation.js.map +1 -0
  251. package/lib/client/view/view-mode-dispatch.d.ts +7 -0
  252. package/lib/client/view/view-mode-dispatch.d.ts.map +1 -0
  253. package/lib/client/view/view-mode-dispatch.js +11 -0
  254. package/lib/client/view/view-mode-dispatch.js.map +1 -0
  255. package/lib/client/view/view-mode-store.d.ts.map +1 -0
  256. package/lib/client/view/view-mode-store.js.map +1 -0
  257. package/lib/client/view/view-mode.d.ts.map +1 -0
  258. package/lib/client/view/view-mode.js.map +1 -0
  259. package/lib/client/{worktree-error-copy.d.ts → view/worktree-error-copy.d.ts} +2 -2
  260. package/lib/client/view/worktree-error-copy.d.ts.map +1 -0
  261. package/lib/client/view/worktree-error-copy.js.map +1 -0
  262. package/lib/client/{worktree-expand-state.d.ts → view/worktree-expand-state.d.ts} +1 -0
  263. package/lib/client/view/worktree-expand-state.d.ts.map +1 -0
  264. package/lib/client/{worktree-expand-state.js → view/worktree-expand-state.js} +11 -0
  265. package/lib/client/view/worktree-expand-state.js.map +1 -0
  266. package/lib/client/{worktree-view-actions.d.ts → view/worktree-view-actions.d.ts} +11 -5
  267. package/lib/client/view/worktree-view-actions.d.ts.map +1 -0
  268. package/lib/client/{worktree-view-actions.js → view/worktree-view-actions.js} +13 -11
  269. package/lib/client/view/worktree-view-actions.js.map +1 -0
  270. package/lib/client/view/worktree-view-errors.d.ts.map +1 -0
  271. package/lib/client/view/worktree-view-errors.js.map +1 -0
  272. package/lib/client/{worktree-view-read.d.ts → view/worktree-view-read.d.ts} +4 -2
  273. package/lib/client/view/worktree-view-read.d.ts.map +1 -0
  274. package/lib/client/{worktree-view-read.js → view/worktree-view-read.js} +4 -1
  275. package/lib/client/view/worktree-view-read.js.map +1 -0
  276. package/lib/client/view/worktree-view.d.ts.map +1 -0
  277. package/lib/client/view/worktree-view.js.map +1 -0
  278. package/lib/client/worktree-connection.d.ts +6 -0
  279. package/lib/client/worktree-connection.d.ts.map +1 -1
  280. package/lib/client/worktree-connection.js +20 -0
  281. package/lib/client/worktree-connection.js.map +1 -1
  282. package/lib/client.js +5869 -2648
  283. package/lib/client.js.map +1 -1
  284. package/lib/contract/index.contract.js +12 -0
  285. package/lib/contract/index.contract.js.map +1 -1
  286. package/lib/contract/index.d.ts +64 -3
  287. package/lib/contract/index.d.ts.map +1 -1
  288. package/lib/contract/index.js +8 -0
  289. package/lib/contract/index.js.map +1 -1
  290. package/lib/host/dsh-read-adapter.d.ts +13 -2
  291. package/lib/host/dsh-read-adapter.d.ts.map +1 -1
  292. package/lib/host/dsh-read-adapter.js +23 -3
  293. package/lib/host/dsh-read-adapter.js.map +1 -1
  294. package/lib/host/remote.d.ts.map +1 -1
  295. package/lib/host/remote.js +15 -0
  296. package/lib/host/remote.js.map +1 -1
  297. package/lib/host/service.d.ts +30 -0
  298. package/lib/host/service.d.ts.map +1 -1
  299. package/lib/host/service.js +47 -1
  300. package/lib/host/service.js.map +1 -1
  301. package/lib/host/worktree-activity.d.ts +13 -0
  302. package/lib/host/worktree-activity.d.ts.map +1 -0
  303. package/lib/host/worktree-activity.js +23 -0
  304. package/lib/host/worktree-activity.js.map +1 -0
  305. package/lib/host/worktree-instructions.d.ts +41 -0
  306. package/lib/host/worktree-instructions.d.ts.map +1 -0
  307. package/lib/host/worktree-instructions.js +65 -0
  308. package/lib/host/worktree-instructions.js.map +1 -0
  309. package/lib/host/worktree-permission-manager.js +2 -2
  310. package/lib/host/worktree-permission-manager.js.map +1 -1
  311. package/lib/index.d.ts +3 -3
  312. package/lib/index.d.ts.map +1 -1
  313. package/lib/index.js +2 -2
  314. package/lib/index.js.map +1 -1
  315. package/lib/manage/manager-context.d.ts +2 -1
  316. package/lib/manage/manager-context.d.ts.map +1 -1
  317. package/lib/manage/manager-sessions.js +4 -4
  318. package/lib/manage/manager-sessions.js.map +1 -1
  319. package/lib/manage/manager-worktree-lifecycle.d.ts +23 -0
  320. package/lib/manage/manager-worktree-lifecycle.d.ts.map +1 -0
  321. package/lib/manage/manager-worktree-lifecycle.js +165 -0
  322. package/lib/manage/manager-worktree-lifecycle.js.map +1 -0
  323. package/lib/manage/manager-worktrees.d.ts +1 -6
  324. package/lib/manage/manager-worktrees.d.ts.map +1 -1
  325. package/lib/manage/manager-worktrees.js +81 -112
  326. package/lib/manage/manager-worktrees.js.map +1 -1
  327. package/lib/manage/manager.d.ts +24 -1
  328. package/lib/manage/manager.d.ts.map +1 -1
  329. package/lib/manage/manager.js +70 -6
  330. package/lib/manage/manager.js.map +1 -1
  331. package/lib/manage/types.d.ts +1 -0
  332. package/lib/manage/types.d.ts.map +1 -1
  333. package/lib/provider/generated-name.d.ts +8 -0
  334. package/lib/provider/generated-name.d.ts.map +1 -0
  335. package/lib/provider/generated-name.js +29 -0
  336. package/lib/provider/generated-name.js.map +1 -0
  337. package/lib/provider/{git.d.ts → git/adapter.d.ts} +2 -2
  338. package/lib/provider/git/adapter.d.ts.map +1 -0
  339. package/lib/provider/{git.js → git/adapter.js} +11 -2
  340. package/lib/provider/git/adapter.js.map +1 -0
  341. package/lib/provider/{repository-fingerprint.d.ts → git/repository-fingerprint.d.ts} +1 -1
  342. package/lib/provider/git/repository-fingerprint.d.ts.map +1 -0
  343. package/lib/provider/git/repository-fingerprint.js.map +1 -0
  344. package/lib/provider/{subprocess.d.ts → git/subprocess.d.ts} +1 -1
  345. package/lib/provider/git/subprocess.d.ts.map +1 -0
  346. package/lib/provider/git/subprocess.js.map +1 -0
  347. package/lib/provider/git/worktree-status.d.ts +5 -0
  348. package/lib/provider/git/worktree-status.d.ts.map +1 -0
  349. package/lib/provider/git/worktree-status.js +23 -0
  350. package/lib/provider/git/worktree-status.js.map +1 -0
  351. package/lib/provider/index.d.ts +5 -5
  352. package/lib/provider/index.d.ts.map +1 -1
  353. package/lib/provider/index.js +5 -5
  354. package/lib/provider/index.js.map +1 -1
  355. package/lib/provider/mutation-token.d.ts +1 -1
  356. package/lib/provider/mutation-token.d.ts.map +1 -1
  357. package/lib/provider/mutation-token.js +1 -0
  358. package/lib/provider/mutation-token.js.map +1 -1
  359. package/lib/provider/sidecar/mutation-lock.d.ts.map +1 -0
  360. package/lib/provider/{mutation-lock.js → sidecar/mutation-lock.js} +1 -1
  361. package/lib/provider/sidecar/mutation-lock.js.map +1 -0
  362. package/lib/provider/{sidecar.d.ts → sidecar/repository.d.ts} +3 -3
  363. package/lib/provider/sidecar/repository.d.ts.map +1 -0
  364. package/lib/provider/{sidecar.js → sidecar/repository.js} +16 -5
  365. package/lib/provider/sidecar/repository.js.map +1 -0
  366. package/lib/provider/{sidecar-persistence.d.ts → sidecar/sidecar-persistence.d.ts} +1 -1
  367. package/lib/provider/sidecar/sidecar-persistence.d.ts.map +1 -0
  368. package/lib/provider/{sidecar-persistence.js → sidecar/sidecar-persistence.js} +29 -2
  369. package/lib/provider/sidecar/sidecar-persistence.js.map +1 -0
  370. package/lib/provider/{sidecar-schema.d.ts → sidecar/sidecar-schema.d.ts} +1 -1
  371. package/lib/provider/sidecar/sidecar-schema.d.ts.map +1 -0
  372. package/lib/provider/{sidecar-schema.js → sidecar/sidecar-schema.js} +59 -16
  373. package/lib/provider/sidecar/sidecar-schema.js.map +1 -0
  374. package/lib/provider/transaction/dependencies.d.ts +10 -0
  375. package/lib/provider/transaction/dependencies.d.ts.map +1 -0
  376. package/lib/provider/transaction/dependencies.js +2 -0
  377. package/lib/provider/transaction/dependencies.js.map +1 -0
  378. package/lib/provider/transaction/index.d.ts +17 -0
  379. package/lib/provider/transaction/index.d.ts.map +1 -0
  380. package/lib/provider/transaction/index.js +44 -0
  381. package/lib/provider/transaction/index.js.map +1 -0
  382. package/lib/provider/transaction/operations/adopt-branch.d.ts +6 -0
  383. package/lib/provider/transaction/operations/adopt-branch.d.ts.map +1 -0
  384. package/lib/provider/transaction/operations/adopt-branch.js +59 -0
  385. package/lib/provider/transaction/operations/adopt-branch.js.map +1 -0
  386. package/lib/provider/transaction/operations/clean.d.ts +4 -0
  387. package/lib/provider/transaction/operations/clean.d.ts.map +1 -0
  388. package/lib/provider/transaction/operations/clean.js +168 -0
  389. package/lib/provider/transaction/operations/clean.js.map +1 -0
  390. package/lib/provider/transaction/operations/create.d.ts +5 -0
  391. package/lib/provider/transaction/operations/create.d.ts.map +1 -0
  392. package/lib/provider/transaction/operations/create.js +136 -0
  393. package/lib/provider/transaction/operations/create.js.map +1 -0
  394. package/lib/provider/transaction/operations/import.d.ts +5 -0
  395. package/lib/provider/transaction/operations/import.d.ts.map +1 -0
  396. package/lib/provider/transaction/operations/import.js +93 -0
  397. package/lib/provider/transaction/operations/import.js.map +1 -0
  398. package/lib/provider/transaction/operations/remove.d.ts +4 -0
  399. package/lib/provider/transaction/operations/remove.d.ts.map +1 -0
  400. package/lib/provider/transaction/operations/remove.js +164 -0
  401. package/lib/provider/transaction/operations/remove.js.map +1 -0
  402. package/lib/provider/transaction/recovery/failure-recovery.d.ts +32 -0
  403. package/lib/provider/transaction/recovery/failure-recovery.d.ts.map +1 -0
  404. package/lib/provider/transaction/recovery/failure-recovery.js +147 -0
  405. package/lib/provider/transaction/recovery/failure-recovery.js.map +1 -0
  406. package/lib/provider/transaction/recovery/recover.d.ts +4 -0
  407. package/lib/provider/transaction/recovery/recover.d.ts.map +1 -0
  408. package/lib/provider/transaction/recovery/recover.js +164 -0
  409. package/lib/provider/transaction/recovery/recover.js.map +1 -0
  410. package/lib/provider/transaction/support/admission.d.ts +7 -0
  411. package/lib/provider/transaction/support/admission.d.ts.map +1 -0
  412. package/lib/provider/transaction/support/admission.js +90 -0
  413. package/lib/provider/transaction/support/admission.js.map +1 -0
  414. package/lib/provider/transaction/support/inspection.d.ts +11 -0
  415. package/lib/provider/transaction/support/inspection.d.ts.map +1 -0
  416. package/lib/provider/transaction/support/inspection.js +51 -0
  417. package/lib/provider/transaction/support/inspection.js.map +1 -0
  418. package/lib/provider/transaction/support/journal.d.ts +12 -0
  419. package/lib/provider/transaction/support/journal.d.ts.map +1 -0
  420. package/lib/provider/transaction/support/journal.js +74 -0
  421. package/lib/provider/transaction/support/journal.js.map +1 -0
  422. package/lib/provider/transaction/support/locking.d.ts +4 -0
  423. package/lib/provider/transaction/support/locking.d.ts.map +1 -0
  424. package/lib/provider/transaction/support/locking.js +11 -0
  425. package/lib/provider/transaction/support/locking.js.map +1 -0
  426. package/lib/provider/transaction/support/path-safety.d.ts +11 -0
  427. package/lib/provider/transaction/support/path-safety.d.ts.map +1 -0
  428. package/lib/provider/transaction/support/path-safety.js +82 -0
  429. package/lib/provider/transaction/support/path-safety.js.map +1 -0
  430. package/lib/provider/transaction/support/paths.d.ts +10 -0
  431. package/lib/provider/transaction/support/paths.d.ts.map +1 -0
  432. package/lib/provider/transaction/support/paths.js +68 -0
  433. package/lib/provider/transaction/support/paths.js.map +1 -0
  434. package/lib/provider/transaction/support/publication.d.ts +9 -0
  435. package/lib/provider/transaction/support/publication.d.ts.map +1 -0
  436. package/lib/provider/transaction/support/publication.js +92 -0
  437. package/lib/provider/transaction/support/publication.js.map +1 -0
  438. package/lib/provider/transaction/types.d.ts +38 -0
  439. package/lib/provider/transaction/types.d.ts.map +1 -0
  440. package/lib/provider/transaction/types.js +2 -0
  441. package/lib/provider/transaction/types.js.map +1 -0
  442. package/lib/provider/types.d.ts +22 -3
  443. package/lib/provider/types.d.ts.map +1 -1
  444. package/lib/provider/types.js +1 -1
  445. package/lib/provider/types.js.map +1 -1
  446. package/lib/provider/worktree-lifecycle.d.ts +19 -0
  447. package/lib/provider/worktree-lifecycle.d.ts.map +1 -0
  448. package/lib/provider/worktree-lifecycle.js +44 -0
  449. package/lib/provider/worktree-lifecycle.js.map +1 -0
  450. package/lib/typert.host.js +330 -36
  451. package/lib/typert.remote-client.d.ts +12 -0
  452. package/lib/typert.remote-client.d.ts.map +1 -1
  453. package/lib/typert.remote-client.js +330 -36
  454. package/package.json +21 -20
  455. package/lib/client/WorktreeContext.d.ts.map +0 -1
  456. package/lib/client/WorktreeContext.js.map +0 -1
  457. package/lib/client/WorktreeHeroContext.d.ts.map +0 -1
  458. package/lib/client/WorktreeHeroContext.js.map +0 -1
  459. package/lib/client/WorktreeModeAction.d.ts.map +0 -1
  460. package/lib/client/WorktreeModeAction.js.map +0 -1
  461. package/lib/client/WorktreeOverlay.d.ts.map +0 -1
  462. package/lib/client/WorktreeOverlay.js.map +0 -1
  463. package/lib/client/dsh-rc1-slot-contract.d.ts +0 -43
  464. package/lib/client/dsh-rc1-slot-contract.d.ts.map +0 -1
  465. package/lib/client/dsh-rc1-slot-contract.js +0 -2
  466. package/lib/client/dsh-rc1-slot-contract.js.map +0 -1
  467. package/lib/client/navigation.d.ts.map +0 -1
  468. package/lib/client/navigation.js.map +0 -1
  469. package/lib/client/overlay-bounds.d.ts.map +0 -1
  470. package/lib/client/overlay-bounds.js.map +0 -1
  471. package/lib/client/session-view.d.ts.map +0 -1
  472. package/lib/client/session-view.js.map +0 -1
  473. package/lib/client/sidebar-overlay-geometry.d.ts.map +0 -1
  474. package/lib/client/sidebar-overlay-geometry.js.map +0 -1
  475. package/lib/client/view-mode-store.d.ts.map +0 -1
  476. package/lib/client/view-mode-store.js.map +0 -1
  477. package/lib/client/view-mode.d.ts.map +0 -1
  478. package/lib/client/view-mode.js.map +0 -1
  479. package/lib/client/virtual-workspace-membership.d.ts.map +0 -1
  480. package/lib/client/virtual-workspace-membership.js.map +0 -1
  481. package/lib/client/worktree-context-store.d.ts.map +0 -1
  482. package/lib/client/worktree-context-store.js.map +0 -1
  483. package/lib/client/worktree-context.d.ts.map +0 -1
  484. package/lib/client/worktree-context.js.map +0 -1
  485. package/lib/client/worktree-error-copy.d.ts.map +0 -1
  486. package/lib/client/worktree-error-copy.js.map +0 -1
  487. package/lib/client/worktree-expand-state.d.ts.map +0 -1
  488. package/lib/client/worktree-expand-state.js.map +0 -1
  489. package/lib/client/worktree-permission-icon.d.ts.map +0 -1
  490. package/lib/client/worktree-permission-icon.js.map +0 -1
  491. package/lib/client/worktree-permission.d.ts.map +0 -1
  492. package/lib/client/worktree-permission.js.map +0 -1
  493. package/lib/client/worktree-session-fork.d.ts.map +0 -1
  494. package/lib/client/worktree-session-fork.js.map +0 -1
  495. package/lib/client/worktree-session-order.d.ts.map +0 -1
  496. package/lib/client/worktree-session-order.js.map +0 -1
  497. package/lib/client/worktree-session-position.d.ts.map +0 -1
  498. package/lib/client/worktree-session-position.js.map +0 -1
  499. package/lib/client/worktree-session.d.ts.map +0 -1
  500. package/lib/client/worktree-session.js.map +0 -1
  501. package/lib/client/worktree-surface-dialogs.d.ts.map +0 -1
  502. package/lib/client/worktree-surface-dialogs.js.map +0 -1
  503. package/lib/client/worktree-surface-rows.d.ts.map +0 -1
  504. package/lib/client/worktree-surface-rows.js.map +0 -1
  505. package/lib/client/worktree-surface-selectors.d.ts.map +0 -1
  506. package/lib/client/worktree-surface-selectors.js.map +0 -1
  507. package/lib/client/worktree-surface-types.d.ts.map +0 -1
  508. package/lib/client/worktree-surface-types.js +0 -2
  509. package/lib/client/worktree-surface-types.js.map +0 -1
  510. package/lib/client/worktree-view-actions.d.ts.map +0 -1
  511. package/lib/client/worktree-view-actions.js.map +0 -1
  512. package/lib/client/worktree-view-errors.d.ts.map +0 -1
  513. package/lib/client/worktree-view-errors.js.map +0 -1
  514. package/lib/client/worktree-view-read.d.ts.map +0 -1
  515. package/lib/client/worktree-view-read.js.map +0 -1
  516. package/lib/client/worktree-view.d.ts.map +0 -1
  517. package/lib/client/worktree-view.js.map +0 -1
  518. package/lib/provider/git.d.ts.map +0 -1
  519. package/lib/provider/git.js.map +0 -1
  520. package/lib/provider/mutation-lock.d.ts.map +0 -1
  521. package/lib/provider/mutation-lock.js.map +0 -1
  522. package/lib/provider/repository-fingerprint.d.ts.map +0 -1
  523. package/lib/provider/repository-fingerprint.js.map +0 -1
  524. package/lib/provider/sidecar-persistence.d.ts.map +0 -1
  525. package/lib/provider/sidecar-persistence.js.map +0 -1
  526. package/lib/provider/sidecar-schema.d.ts.map +0 -1
  527. package/lib/provider/sidecar-schema.js.map +0 -1
  528. package/lib/provider/sidecar.d.ts.map +0 -1
  529. package/lib/provider/sidecar.js.map +0 -1
  530. package/lib/provider/subprocess.d.ts.map +0 -1
  531. package/lib/provider/subprocess.js.map +0 -1
  532. package/lib/provider/transaction.d.ts +0 -65
  533. package/lib/provider/transaction.d.ts.map +0 -1
  534. package/lib/provider/transaction.js +0 -1011
  535. package/lib/provider/transaction.js.map +0 -1
  536. /package/lib/client/{WorktreeContext.js → context/WorktreeContext.js} +0 -0
  537. /package/lib/client/{WorktreeHeroContext.js → context/WorktreeHeroContext.js} +0 -0
  538. /package/lib/client/{overlay-bounds.d.ts → overlay/overlay-bounds.d.ts} +0 -0
  539. /package/lib/client/{overlay-bounds.js → overlay/overlay-bounds.js} +0 -0
  540. /package/lib/client/{sidebar-overlay-geometry.d.ts → overlay/sidebar-overlay-geometry.d.ts} +0 -0
  541. /package/lib/client/{sidebar-overlay-geometry.js → overlay/sidebar-overlay-geometry.js} +0 -0
  542. /package/lib/client/{worktree-permission-icon.d.ts → permission/worktree-permission-icon.d.ts} +0 -0
  543. /package/lib/client/{worktree-permission-icon.js → permission/worktree-permission-icon.js} +0 -0
  544. /package/lib/client/{worktree-permission.d.ts → permission/worktree-permission.d.ts} +0 -0
  545. /package/lib/client/{worktree-permission.js → permission/worktree-permission.js} +0 -0
  546. /package/lib/client/{session-view.d.ts → session/session-view.d.ts} +0 -0
  547. /package/lib/client/{session-view.js → session/session-view.js} +0 -0
  548. /package/lib/client/{worktree-session-order.d.ts → session/worktree-session-order.d.ts} +0 -0
  549. /package/lib/client/{worktree-session-order.js → session/worktree-session-order.js} +0 -0
  550. /package/lib/client/{worktree-session-position.d.ts → session/worktree-session-position.d.ts} +0 -0
  551. /package/lib/client/{worktree-session-position.js → session/worktree-session-position.js} +0 -0
  552. /package/lib/client/{navigation.d.ts → view/navigation.d.ts} +0 -0
  553. /package/lib/client/{navigation.js → view/navigation.js} +0 -0
  554. /package/lib/client/{view-mode-store.d.ts → view/view-mode-store.d.ts} +0 -0
  555. /package/lib/client/{view-mode-store.js → view/view-mode-store.js} +0 -0
  556. /package/lib/client/{view-mode.d.ts → view/view-mode.d.ts} +0 -0
  557. /package/lib/client/{view-mode.js → view/view-mode.js} +0 -0
  558. /package/lib/client/{worktree-error-copy.js → view/worktree-error-copy.js} +0 -0
  559. /package/lib/client/{worktree-view-errors.d.ts → view/worktree-view-errors.d.ts} +0 -0
  560. /package/lib/client/{worktree-view-errors.js → view/worktree-view-errors.js} +0 -0
  561. /package/lib/client/{worktree-view.d.ts → view/worktree-view.d.ts} +0 -0
  562. /package/lib/client/{worktree-view.js → view/worktree-view.js} +0 -0
  563. /package/lib/provider/{repository-fingerprint.js → git/repository-fingerprint.js} +0 -0
  564. /package/lib/provider/{subprocess.js → git/subprocess.js} +0 -0
  565. /package/lib/provider/{mutation-lock.d.ts → sidecar/mutation-lock.d.ts} +0 -0
package/README.md CHANGED
@@ -3,7 +3,13 @@
3
3
  `@cerbur/clutch-dsh-worktree` adds a Git Worktree view to the DSH Web UI. It groups
4
4
  Sessions as Workspace → Worktree → Session while keeping DSH as the source of truth for
5
5
  Project/Workspace identity, Session metadata, native lists, and conversation history.
6
- The plugin stores only external Worktree/Session relationship metadata.
6
+ The plugin stores external Worktree/Session relationships, acquisition facts, and user-authored
7
+ Worktree instructions in its own sidecar.
8
+
9
+ > **Preview:** Worktree Dashboard is an early, plugin-only MVP preview. The overview, Session
10
+ > navigation, Worktree instructions, Worktree creation/archive, and the open-in-app action are
11
+ > connected; Git details, derived Worktrees, Settings, and other actions marked **Coming soon** remain
12
+ > placeholders.
7
13
 
8
14
  ## Screenshots
9
15
 
@@ -17,15 +23,23 @@ Worktree rows, and the read-only blank-session Hero context.
17
23
  The Import screenshot shows the existing Workspace `+` dialog with Create selected by default,
18
24
  the adjacent Import tab, and a standard dropdown containing safe example branch/path values.
19
25
 
26
+ ![Worktree Dashboard preview (Chinese UI)](assets/screenshots/screenshots-dashboard.webp)
27
+
28
+ The Dashboard screenshot records the current preview UI: Worktree identity, acquisition facts,
29
+ connected Session and Worktree actions, and clearly marked placeholder cards.
30
+
20
31
  ## Capabilities
21
32
 
22
33
  - Enter Worktree mode from the DSH Sidebar footer and browse Workspace → Worktree → Session.
34
+ - Open Dashboard from the Local/Main or active/archived Worktree menu or its hover-only row action, or use
35
+ the quick Dashboard icon to the left of the native Session-header More actions button. View the
36
+ real name and cwd, copy the full path, and switch between Dashboard, Git & Changes, Sessions,
37
+ Children, and Settings. Unconnected MVP cards and actions are explicitly marked Coming soon.
23
38
  - Search Workspaces and create a Git Worktree and branch from an existing local branch.
24
39
  - 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
- - Remove plugin-created and imported Worktrees through real `git worktree remove`; removing an imported Worktree can delete its linked directory and is called out in the confirmation dialog.
27
- - Create a normal Session from Main or a Session whose runtime cwd is an active Worktree, then
28
- open it directly.
40
+ - Register an existing Worktree in place without moving, copying, or editing its directory; the imported record follows the same Session, binding, health, ordering, cwd, projection, refresh, and recovery flow as a plugin-created record.
41
+ - Archive Worktrees non-destructively, 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.
42
+ - Create a normal Session from Main or a Session whose runtime cwd is an active Worktree, then open it directly.
29
43
  - For active Worktree Sessions, request the named `worktree-full-access` preset after an
30
44
  explicit confirmation. It combines DSH `danger-full-access` with `ask`: it removes filesystem
31
45
  confinement for linked Git metadata while keeping approval prompts enabled; network and
@@ -38,23 +52,30 @@ the adjacent Import tab, and a standard dropdown containing safe example branch/
38
52
  and completed states occupy the trailing slot; idle Sessions show native relative time for the
39
53
  last human-authored message there. Hover or an open menu gives the trailing slot back to the
40
54
  existing actions menu.
55
+ - Dashboard Session cards use the same status-or-relative-time metadata in both the overview
56
+ preview and the full Sessions tab, keeping status semantics consistent with the Worktree list.
41
57
  - Show the native DSH Session hover detail card with the complete title, relative time, and current
42
58
  status; the card yields to the Session actions menu and row dragging.
43
59
  - Cover native waiting-for-approval, plan-review, question, completed, idle, and running-subagent
44
60
  states without copying the animation implementation into the plugin.
45
61
  - 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.
62
+ non-archived Sessions is active. A collapsed active group reserves the indicator's 28px box plus
63
+ a 4px label gap, and its long Worktree label scrolls while activity remains active; expanded groups
64
+ keep their normal action rail instead.
47
65
  - Promote a Session to the head of its Main or Worktree visual group after a newer user message.
48
66
  This ordering is browser-local and does not mutate DSH Workspace order or the Worktree sidecar.
49
67
  - 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.
68
+ action. When the parent has an active Worktree binding, the child is bound to the same Worktree
69
+ and opens directly in the Worktree view. The child remains a normal DSH Session.
54
70
  - See ready, repair, active, and detached Worktree states, including retryable operation errors.
55
71
  - 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 `Remove Worktree`
57
- with confirmation.
72
+ Local/Main and managed Worktree rows expose Dashboard through the existing menu and a hover-only row action.
73
+ The Worktree group rail is zero-width at rest unless a group is collapsed with active Session activity;
74
+ that state reserves the 28px running indicator and a 4px text gap. Hover, focus, or an open menu
75
+ reveals the available Dashboard, menu, and Session `+` controls at intrinsic width. Long Worktree labels
76
+ automatically scroll while hovered or while collapsed activity remains active, using one shared scroll
77
+ loop and resetting when neither trigger applies.
78
+ Active rows offer Archive Worktree with confirmation.
58
79
  - Create a new Worktree from the Local or an active Worktree's options menu. The Create dialog
59
80
  uses the selected row's current branch as its base and suggests the next available numbered
60
81
  name, such as `feature-2` or `feature-3`; detached Worktrees do not expose this action.
@@ -62,6 +83,7 @@ the adjacent Import tab, and a standard dropdown containing safe example branch/
62
83
  be reordered within their owning Workspace; order is stored in the plugin sidecar and Main is
63
84
  fixed first.
64
85
  - 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.
86
+ - Provide a Collapse All button in the Worktree Header to collapse all Workspaces and Worktrees at once.
65
87
  - 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.
66
88
  - Keep the current local branch or Worktree branch visible as read-only context in the existing
67
89
  Conversation title row and in the blank-session Hero.
@@ -73,27 +95,22 @@ the adjacent Import tab, and a standard dropdown containing safe example branch/
73
95
  `WT` button when the Sidebar is collapsed.
74
96
  - Keep Worktree Sessions in the original DSH Project/Workspace view; the plugin does not copy
75
97
  Session content or modify messages, prompts, transcripts, or history.
76
- - Worktree fork membership is not written to DSH's durable `Workspace.sessionIds`. While this
77
- plugin is loaded, the browser can show the child through its local projection; without the
78
- plugin, the child remains in DSH's global Session management but is not durably attached to the
79
- native Workspace root membership.
80
98
 
81
99
  ### Compatibility and prerequisites
82
100
 
83
- The supported compatibility facts are:
101
+ Session reload is compatible with DSH rc.1 persisted headers and newer DSH header snapshots.
102
+ The Worktree Dashboard preview records acquisition facts for new Worktrees and injects saved instructions for active sessions.
84
103
 
85
- | Component | Min Version | Notes |
86
- | --- | --- | --- |
87
- | DSH Client | `>=0.1.2-rc.1` | Requires the Session/Workspace Controllers and Client Store |
88
- | DSH Host | `>=0.1.2-rc.1` | Requires the Typert Gateway `/api` protocol and subprocess capability |
89
- | Git | `>=2.20.0` | Requires worktree core commands and branch discovery |
90
- | Node.js | `>=20.0.0` | LTS is recommended |
104
+ The supported compatibility requirements are:
91
105
 
92
- ## Installation
106
+ | Component | Min Version | Notes |
107
+ | ---------- | -------------- | --------------------------------------------------------------------- |
108
+ | DSH Client | `>=0.1.5-rc.1` | Requires the Session/Workspace Controllers and Client Store |
109
+ | DSH Host | `>=0.1.5-rc.1` | Requires the Typert Gateway `/api` protocol and subprocess capability |
110
+ | Git | `>=2.20.0` | Requires worktree core commands and branch discovery |
111
+ | Node.js | `>=20.0.0` | LTS is recommended |
93
112
 
94
- Use the npm package for the normal user installation. Use a repository checkout to develop or
95
- validate local source, or use the GitHub source path when installing the source package through a
96
- marketplace entry.
113
+ ## Installation
97
114
 
98
115
  ### Install from npm (recommended)
99
116
 
@@ -119,58 +136,6 @@ To inspect the currently published version on the official registry:
119
136
  npm view @cerbur/clutch-dsh-worktree version --registry=https://registry.npmjs.org/
120
137
  ```
121
138
 
122
- ### Prepare the current upstream DSH checkout
123
-
124
- For source-based development or validation, prepare the upstream checkout first. The current
125
- upstream default branch is `master`; follow the repository's default branch if it changes later.
126
- For the minimum rc.1 compatibility validation path, check out `dsh-v0.1.2-rc.1`:
127
-
128
- ```bash
129
- git clone https://github.com/deepseek-ai/deepseek-harness.git
130
- cd deepseek-harness
131
- git fetch origin
132
- git checkout dsh-v0.1.2-rc.1
133
- pnpm install
134
- pnpm run build
135
- ```
136
-
137
- ### Install from a repository checkout
138
-
139
- Build the package from the `clutch-dsh` checkout, then install its absolute path into the DSH
140
- profile:
141
-
142
- ```bash
143
- cd /path/to/clutch-dsh
144
- pnpm install
145
- pnpm --filter @cerbur/clutch-dsh-worktree build
146
-
147
- cd /path/to/deepseek-harness
148
- pnpm install
149
- pnpm run build
150
- pnpm dsh plugin --profile web add /path/to/clutch-dsh/packages/clutch-dsh-worktree
151
- pnpm dsh web --dump-config
152
- pnpm dsh web
153
- ```
154
-
155
- The `--dump-config` output should include the plugin bundle layer. If the profile still contains
156
- an old unscoped installation, remove it first:
157
-
158
- ```bash
159
- pnpm dsh plugin --profile web remove clutch-dsh-worktree
160
- ```
161
-
162
- To update a local checkout, rebuild the package and restart DSH:
163
-
164
- ```bash
165
- cd /path/to/clutch-dsh
166
- pnpm --filter @cerbur/clutch-dsh-worktree build
167
- cd /path/to/deepseek-harness
168
- pnpm dsh web
169
- ```
170
-
171
- After changing `package.json`, `cordis.patch.yml`, or the profile bundle members, run the plugin
172
- add command again.
173
-
174
139
  ### Install from GitHub source
175
140
 
176
141
  The source path generated by `awesome-dsh-plugin` is:
@@ -179,28 +144,8 @@ The source path generated by `awesome-dsh-plugin` is:
179
144
  dsh plugin --profile web add "github:Cerbur/clutch-dsh#path:/packages/clutch-dsh-worktree"
180
145
  ```
181
146
 
182
- This is a source Git dependency, not a prebuilt npm package. Its `prepare` lifecycle generates
183
- `lib/`. The current DSH profile uses pnpm 11 `allowBuilds`: on the first Git installation, pnpm
184
- intentionally rejects the build and prints a complete key containing the package name, Git URL,
185
- resolved commit, and subdirectory path. Copy that complete key into the profile's
186
- `pnpm-workspace.yaml`, for example:
187
-
188
- ```yaml
189
- allowBuilds:
190
- '@cerbur/clutch-dsh-worktree@git+https://github.com/Cerbur/clutch-dsh#<resolved-commit>&path:/packages/clutch-dsh-worktree': true
191
- ```
192
-
193
- Use the exact package key printed by pnpm: `<resolved-commit>`, the Git URL, and the path must
194
- match the error output. A package-name-only entry is not enough for a direct Git dependency, and
195
- `onlyBuiltDependencies` is not the configuration used by the current pnpm 11 Git prepare flow.
196
- After saving the allowlist, rerun the original install command. A new commit requires a new key.
197
- The allowlist belongs to the profile owner who trusts that Git commit; do not add it to this
198
- plugin package.
199
-
200
- After authorization, Git prepare runs `pnpm install` in the checked-out monorepo and then
201
- `pnpm run build`, so the profile must be able to reach its configured registry. Registry DNS,
202
- mirror, or lockfile errors after authorization are installation-environment errors, not
203
- `allowBuilds` rejections. Use the npm installation above to avoid source-build authorization.
147
+ This is a source Git dependency that builds during installation. For pnpm 11 `allowBuilds`
148
+ authorization, local development, and contributor workflows, see [docs/DEVELOPMENT.md](docs/DEVELOPMENT.md).
204
149
 
205
150
  ### Uninstall
206
151
 
@@ -223,8 +168,79 @@ pnpm dsh plugin --profile web remove @cerbur/clutch-dsh-worktree
223
168
  The screenshot above illustrates the Sidebar entry point and the visual context shown in the
224
169
  blank-session Hero. The displayed language follows DSH's current language setting.
225
170
 
171
+ ### Open a Worktree dashboard
172
+
173
+ The Dashboard is a plugin-only preview MVP; it does not replace DSH's native Session page or
174
+ write DSH-owned Workspace/Session data.
175
+
176
+ In Worktree mode, hover a managed Worktree row and click its Dashboard icon, or open the row's
177
+ options menu and choose **Dashboard**. For a current Session with a ready Main or Worktree
178
+ context, click the Dashboard icon to the left of the native **More actions** button in the
179
+ Session header. The dashboard temporarily replaces the area beside the Sidebar, including the
180
+ Session page.
181
+ The native conversation remains mounted. Use **Back to session**, press **Escape**, open
182
+ a Session from the Sidebar, or exit Worktree mode to restore the native page. No Session
183
+ is created or changed by opening the dashboard. Local/Main and managed Worktree rows can use the
184
+ inline Dashboard icon; the current Session can also use the Session-header shortcut. The Dashboard keeps the
185
+ Sidebar resize handle available while it is open.
186
+
187
+ ![Worktree Dashboard preview](assets/screenshots/screenshots-dashboard.webp)
188
+
189
+ The screenshot above shows the preview Dashboard beside the native Worktree Sidebar. Its connected
190
+ controls are intentionally limited to the MVP surface; unfinished cards remain visibly marked.
191
+
192
+ The title uses the same accepted branch name as the Worktree row. Click the title to copy the
193
+ branch name directly. The cwd is the record's full absolute path; its copy button reports success
194
+ or failure. If DSH cannot provide Main's current branch, the Dashboard labels it unavailable and
195
+ does not offer branch copying. Current branch, availability, and source use the existing Worktree projection. Ready means the Worktree is available;
196
+ it does **not** assert that Git files are clean. An archived or cleaned record still shows
197
+ its recorded path, which need not exist on disk.
198
+
199
+ The five tabs support Left/Right, Home, and End keys. Overview shows up to five current
200
+ Worktree Sessions; Sessions shows the full list. Both consume the existing in-memory Sessions
201
+ and bindings with Sidebar ordering and visibility rules, independent of Sidebar search.
202
+ Click a Session to return to its native page. New Session uses the existing create/bind/open
203
+ flow, including blank-Session reuse and failure recovery, and leaves the dashboard.
204
+ New Worktree opens the existing Create dialog with the current branch and numbered-name
205
+ defaults. Archive Worktree opens the existing non-destructive confirmation. These actions
206
+ follow the Sidebar's health, archive, and pending-operation gates.
207
+ Open in VS Code uses an encoded `vscode://file/...` link for the recorded cwd. VS Code must be
208
+ installed on the browser's machine and able to access that path; the browser may request
209
+ permission to open the app. This link does not verify directory existence or launch success.
210
+ Git details, derived Worktrees, settings, and other marked quick actions
211
+ remain placeholders. The layout follows DSH's theme and stacks cards on narrow screens.
212
+ Dashboard selection is transient and is not restored after a reload.
213
+
214
+ Use **Edit** on the Worktree instructions card to edit, save, or clear shared guidance
215
+ (up to 32,000 UTF-16 code units). Saved text enters bound Sessions' next model request as
216
+ `<system-reminder>` through DSH `agent/pre-step`, as a separate context entry in the
217
+ Session trajectory. DSH records the message; existing history is not rewritten.
218
+ Instruction text is inserted literally, including any `{{...}}` examples.
219
+ Archiving preserves active bindings and instructions; detached bindings, disk cleanup, and
220
+ removal from management stop the guidance. Clearing or losing the binding appends a
221
+ reminder invalidating earlier Worktree instructions on the next step. Unchanged guidance
222
+ is not repeated while its message remains visible, including after restart; compacted
223
+ guidance is republished when needed.
224
+ Failed saves retain the draft. Concurrent edits are rejected; cancel and reopen to load the
225
+ latest saved text before retrying. Instructions remain in the plugin sidecar, never AGENTS.md.
226
+
227
+ New plugin-created Worktrees show their recorded creation time and selected base branch.
228
+ Imported Worktrees show their registration time and do not infer an original creation time or
229
+ base. When these historical facts are unavailable, the Dashboard shows **Unavailable for
230
+ historical Worktrees** instead of Unknown. The base is the acquisition
231
+ branch name, not a live merge-base or ahead/behind calculation, and does not change on checkout.
232
+ The open-editor split button follows DSH's native styling and offers detected host applications;
233
+ if unavailable, it falls back to the VS Code protocol link described above.
234
+
226
235
  ### Create a Worktree
227
236
 
237
+ New directories use `$dshHome/clutch-dsh-worktree/worktree/wt_<12-hex-characters>`
238
+ (15 characters in the folder name, with 48 bits of cryptographic randomness).
239
+ Occupied directory names, Git registrations, and sidecar identities are automatically retried.
240
+ After eight random candidates collide, numeric suffixes such as `_1` and `_2` are tried until
241
+ available or cancelled. Existing Worktree paths and IDs stay unchanged; branch conflicts and
242
+ other Git failures retain their normal error handling.
243
+
228
244
  1. Select a Workspace, press its `+`, choose a baseline local branch, and enter a Worktree name.
229
245
  The default branch name is `dsh/<8-character-random-string>`.
230
246
  2. To create a sibling from an existing Worktree, open that active Worktree's options menu and
@@ -242,30 +258,27 @@ blank-session Hero. The displayed language follows DSH's current language settin
242
258
  1. Select a Workspace, press its `+`, and choose the `Import` tab. The dialog loads Git-linked
243
259
  Worktrees for that repository through the existing DSH `/api` Connection.
244
260
  2. The first version lists only branch-attached, non-root Worktrees that are not already present
245
- in the plugin sidecar. Detached HEAD entries are intentionally omitted. Candidates are presented
261
+ in the plugin sidecar. Detached HEAD, bare, prunable, missing-directory and missing-`.git`
262
+ entries are omitted. Managed health and import eligibility share one runtime status mapping;
263
+ importing rechecks that status. Locked Worktrees remain eligible when otherwise ready.
264
+ Candidates are presented
246
265
  in a standard dropdown; each option shows its branch first and absolute path as secondary
247
266
  diagnostic text.
248
267
  3. Choose an option and select `Import Worktree`. Registration writes only the plugin sidecar;
249
268
  the existing Worktree directory and Git working state remain in place. Import then creates or
250
269
  reuses a Session at that Worktree cwd and runs the same bind → open → binding refresh flow as
251
- Create. Newly created Sessions are not projected into native Workspace membership before the
252
- binding refresh.
270
+ Create.
253
271
  4. An active external import for the same Workspace and physical path is idempotent. A path already
254
- managed by the plugin returns `WORKTREE_ALREADY_MANAGED`; invalid or stale candidates return
255
- `WORKTREE_IMPORT_INVALID` and can be retried after the repository state is fixed.
272
+ managed by the plugin returns an error; invalid or stale candidates can be retried after the repository state is fixed.
256
273
 
257
274
  ### Create Main and Worktree Sessions
258
275
 
259
276
  - Use Main's `+` to create a normal DSH Session in the Project-root view.
260
- - Use a Worktree's `+` to create or reuse a Session with that Worktree as its runtime cwd. The
261
- plugin calls the DSH Session Controller with `ctx.sessions.create({ cwd: worktreePath })`, then
262
- saves the external binding and opens the Session. The browser-local `{ workspaceId, sessionId }`
263
- membership projection is refreshed afterward, so the newly created Session does not briefly
264
- appear in Main.
277
+ - Use a Worktree's `+` to create or reuse a Session with that Worktree as its runtime cwd. The Session
278
+ opens directly in the Worktree view without briefly appearing in Main.
265
279
  - The connector reuses an unarchived blank Session with the exact target cwd when possible. An
266
- already-bound Session opens directly; an unbound candidate is bound before projection and
267
- opening. Otherwise the new-Session flow is `create bind open refresh`, and concurrent
268
- clicks for the same Worktree are coalesced.
280
+ already-bound Session opens directly; an unbound candidate is bound before opening. Otherwise, a
281
+ new Session is created and bound, and concurrent clicks for the same Worktree are coalesced.
269
282
  - If binding fails after DSH has created the Session, the Session ID remains available for Retry
270
283
  or Open recovery. The plugin does not delete or mutate that DSH Session.
271
284
  - Before opening an active Worktree Session, the plugin explains in a DSH-styled in-page dialog why
@@ -293,7 +306,8 @@ blank-session Hero. The displayed language follows DSH's current language settin
293
306
  being dragged.
294
307
  - A collapsed Workspace, Main group, or Worktree group shows the same running dot when any
295
308
  non-archived member is ongoing, including activity hidden by search. Expanding the group hides
296
- the aggregate dot; hover, focus, or an open menu reveals the existing action controls.
309
+ the aggregate dot; hover, focus, or an open menu reveals the existing action controls and only then
310
+ reserves their width.
297
311
  - A newer user message promotes its Session to the head of the current Main or Worktree visual
298
312
  group. The promotion, observed timestamps, and per-group order live only in browser-local state;
299
313
  successful manual drag still uses the native DSH ordering API before updating that local order.
@@ -301,38 +315,48 @@ blank-session Hero. The displayed language follows DSH's current language settin
301
315
  ### Fork Worktree Sessions
302
316
 
303
317
  - Use any native DSH fork entry point: a Session-list tab, a Worktree Session menu, or the
304
- Conversation fork action. The plugin wraps the shared DSH `sessions.fork` service, so the
305
- original fork cut, title increment, and child lineage stay native.
306
- - After DSH creates the child, the plugin looks up the parent's active sidecar binding, writes the
307
- child binding through the existing `/api` Manager. The Worktree view refreshes the binding before
308
- replaying the browser-local Workspace membership projection, so the child does not briefly appear
309
- in Main/Local; ready content is retained during that refresh.
310
- - If the child is created but sidecar lookup or binding fails, DSH keeps the child and the plugin
311
- shows Retry Binding/Open Created Session recovery. A later plugin initialization also retries
312
- recoverable fork children from native Session lineage summaries; it never binds unrelated
313
- subagents automatically.
314
- - This flow does not persist the child into DSH `Workspace.sessionIds`. The native DSH Workspace
315
- view can only see the temporary browser projection while the plugin is loaded; the durable native
316
- Workspace data is unchanged.
318
+ Conversation fork action. Lineage, title increments, and conversation fork history remain native DSH behavior.
319
+ - When the parent Session has an active Worktree binding, the forked child Session is automatically
320
+ bound to the same Worktree and opens directly in that Worktree view. Ready content is retained during the binding refresh.
321
+ - If the child is created but binding fails, DSH keeps the child Session, and the Worktree view provides
322
+ Retry Binding and Open recovery actions. Later plugin initializations also retry recoverable fork children
323
+ from native Session lineage; unrelated subagents are never bound automatically.
324
+ - Fork binding is maintained by the plugin's external index without mutating DSH's durable Workspace storage.
317
325
 
318
326
  ### Reorder and manage Worktrees
319
327
 
320
- - Drag Worktrees within their owning Workspace. The ordered `worktrees` array is persisted in
321
- the plugin sidecar; Main is a fixed first row and Worktrees cannot move across Workspaces.
322
- - 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.
323
- - Open the shared Main and Worktree options menu to copy the selected row's absolute path. Main
324
- and detached/removed Worktrees show only `Copy path`; active Worktrees also show `Remove
325
- Worktree` with a confirmation dialog.
326
- - Imported Worktrees expose the same active options menu as plugin-created Worktrees. Removing
327
- either source runs real `git worktree remove`; for an imported Worktree, the confirmation warns
328
- that the linked Worktree directory may be deleted. Sessions are retained as detached bindings.
329
- - Removing a Worktree does not delete its Sessions. The relationship remains detached until it
330
- is explicitly unbound. Deleting a Workspace removes only DSH's Workspace registration; its
331
- directory, Sessions, Git Worktrees, and plugin sidecar remain.
332
- - After a successful removal, detached Sessions that still have Full Access are normalized to
333
- `workspace-write + ask` when the public DSH permission service is available. An unavailable
334
- service is reported as an unverified, retryable warning; it never grants Full Access to a
335
- detached Session.
328
+ - Drag Worktrees within their owning Workspace to reorder them. The custom order is preserved by the plugin;
329
+ Main is always fixed as the first row, and Worktrees cannot be dragged across Workspaces.
330
+ - Newly created or imported Worktrees are inserted at the head of their Workspace's Worktree list; existing Worktree order is preserved.
331
+ - Open the shared Main and Worktree options menu to copy the selected row's absolute path. Active
332
+ Worktrees show `Copy path` and `Archive Worktree`. Archiving an active Worktree is an internal
333
+ archive operation: it preserves disk files, active bindings, and runtime cwd, and moves the Worktree into
334
+ the default-collapsed `Archived` group at the bottom of the Workspace.
335
+ - The `Archived` group is rendered at the bottom of the Workspace when archived Worktrees exist and is
336
+ collapsed by default. Its label includes the total archived Worktree count, even when collapsed.
337
+ Each Workspace tracks its own collapsed state independently.
338
+ - Active Worktrees requiring repair also offer `Archive Worktree` to archive the record without
339
+ touching disk files or bindings. Worktrees in recovery-needed state block removal until recovery completes.
340
+ - For archived Worktrees whose disk has not been cleaned, the options menu provides:
341
+ 1. `Unarchive Worktree`: Restores a metadata-archived Worktree whose disk directory is intact back to active status, without secondary confirmation.
342
+ 2. `Clean Up Disk`: Prompts for secondary confirmation detailing the path and irreversible deletion,
343
+ tells you that the plugin does not check Session or subagent activity and requires you to confirm
344
+ that all tasks using the directory have stopped (otherwise deletion may cause task failures or data loss),
345
+ runs real non-forced `git worktree remove`, and upon success records the record as cleaned, transitions
346
+ bindings to detached, and normalizes Full Access permissions to `workspace-write + ask`. Disk removal
347
+ commitment is decoupled from permission normalization: once disk removal commits, the dialog closes and the
348
+ record updates to cleaned; any follow-up permission or refresh failure provides independent retry without
349
+ re-executing disk removal. If the Worktree directory or its `.git` entry was already deleted externally,
350
+ confirming cleanup marks the plugin record as completed and detaches its bindings without running Git removal.
351
+ 3. `Remove from Management`: Prompts for confirmation and removes the Worktree sidecar record and all
352
+ its bindings, while preserving disk files and native DSH Sessions. It retires in-flight fork operations,
353
+ recovery state, and permission notices for that Worktree. No Session activity check is required.
354
+ - For archived Worktrees whose disk has already been cleaned, the menu provides `Remove from Management`
355
+ to prune the sidecar record completely.
356
+ - Session activity is informational and does not block cleanup or removal from management. Stop all tasks
357
+ using the directory yourself before confirming disk cleanup; the plugin does not verify that they have stopped.
358
+ - Deleting a Workspace removes only DSH's Workspace registration; its directory, Sessions, Git Worktrees,
359
+ and plugin sidecar remain.
336
360
  - DSH-native Workspace rename/delete/reorder and Session menus remain available. Session drag
337
361
  ordering is limited to the current visual Main or Worktree group.
338
362
  - The Main group shows the current local branch as `Local (branch)` and falls back to `Local` if
@@ -347,13 +371,50 @@ blank-session Hero. The displayed language follows DSH's current language settin
347
371
  - When the Sidebar is collapsed, the footer keeps its icon-only native action geometry; the plugin
348
372
  does not render a separate `WT` rail control.
349
373
 
374
+ ### Reconcile a branch changed in Git
375
+
376
+ After an external `git checkout`, the next Worktree read shows `old branch → current branch`
377
+ and a branch-change warning. Reads occur on refresh and when opening a Worktree menu; the
378
+ plugin does not watch Git continuously. Detached HEAD is shown explicitly. Session bindings
379
+ and runtime cwd remain unchanged, and normal branch changes do not lock the Workspace.
380
+
381
+ Choose `Adopt current branch` from the active or archived Worktree menu and confirm the
382
+ displayed transition. This updates only the plugin's recorded branch. A changed branch or
383
+ stale snapshot during confirmation is rejected; refresh and confirm again. Detached HEAD
384
+ must first be switched to a branch in Git. Disk cleanup requires adopting the current branch
385
+ first. Creating a Worktree on the old branch is allowed when Git proves the existing record
386
+ has switched away; genuinely checked-out branches remain unavailable.
387
+
388
+ Confirmation failures appear inside the dialog. Choose `Retry` to reload the observed branch
389
+ and snapshot token, then confirm the updated transition; the old confirmation stays disabled
390
+ until refresh succeeds. If the Worktree is no longer branch-drifted or has entered detached HEAD,
391
+ the dialog closes. Creating a sibling Worktree uses the observed current branch, even before
392
+ adoption; detached HEAD does not offer this action.
393
+
394
+ For `recovery-needed`, the Worktree menu offers `Retry recovery` for its Workspace.
395
+ This retries safe journal recovery; it does not adopt branches, delete unknown paths, or
396
+ clear unresolved identity issues. Successful adoption and recovery refresh only the owning
397
+ Workspace while preserving existing ready content.
398
+
350
399
  ### Understand status and recovery messages
351
400
 
352
- - `ready` means the Worktree is available. `repair` identifies a missing or invalid Worktree,
353
- Session, binding, or cwd. `recovery-needed` means a Git/sidecar operation or identity check is
354
- unresolved and destructive actions are blocked. `detached` means the Git Worktree was removed
355
- while the relationship was retained. An active binding pointing to a missing Worktree produces
401
+ - Operation, permission, binding, and refresh failures use DSH's native toast, one at a time.
402
+ Unchanged errors are not repeated on every render. Full messages and existing Retry/Open
403
+ actions remain in the expandable Notification details and recovery entry after the toast fades.
404
+ Form validation and Workspace Git setup guidance remain next to their inputs.
405
+ - Hover or focus an active Worktree row to see its status, path, and repair guidance for missing
406
+ directories/Git registration, branch drift/detached HEAD, or incomplete recovery. Opening its
407
+ menu or dragging suppresses the hover card. Archive confirmation explicitly preserves the
408
+ directory, Session bindings, and cwd for both plugin-created and external Worktrees;
409
+ Clean Disk remains a separate action.
410
+ - `ready` means the Worktree is available. `cleaned` indicates disk cleanup completed while the
411
+ sidecar archive entry is retained. `repair` identifies a missing or invalid Worktree, Session, binding,
412
+ or cwd. `recovery-needed` means a Git/sidecar operation or identity check is unresolved and
413
+ destructive actions are blocked. `detached` means the Git Worktree was removed while the relationship
414
+ was retained. An active binding pointing to a missing Worktree produces
356
415
  an explicit repair warning or error; it never silently falls back to another Worktree.
416
+ - Without a pending Git transaction, missing active or archived Worktrees remain `repair` and
417
+ can be archived without blocking healthy Worktree Session bindings.
357
418
  - Worktree health is a runtime Git projection and is not written to the sidecar. Git readiness
358
419
  failures are shown per Workspace: a missing Git executable shows installation guidance without
359
420
  commands, while repository, initial commit, or local branch failures show copyable setup
@@ -383,9 +444,9 @@ when no current branch is reported.
383
444
  DSH owns the original Project/Workspace identity and root, Session identity and metadata, native
384
445
  Project/Session lists, messages, prompts, transcripts, and history. The plugin does not copy or
385
446
  rewrite any of those values. Its external index lives in the DSH host's plugin data directory or
386
- an independent sidecar store and may contain only relationship facts such as:
447
+ an independent sidecar store and contains only relationship facts such as:
387
448
 
388
- - `projectId`, `worktreeId`, and `sessionId`;
449
+ - `projectId`, `worktreeId`, and `sessionId` mappings;
389
450
  - an absolute Worktree path, branch, and lifecycle state;
390
451
  - the Worktree source (`plugin` or `external`);
391
452
  - binding status and schema version.
@@ -395,97 +456,35 @@ store a copy of `projectRoot` or any Session content. If the sidecar is unavaila
395
456
  the native Project/Session view remains readable and the plugin becomes degraded/read-only; an
396
457
  empty index must never overwrite the native DSH lists.
397
458
 
398
- The sidecar accepts v1 and v2 snapshots for backwards-compatible reads. Legacy records are
399
- normalized in memory, and the first successful mutation atomically upgrades the shard to v3.
400
- New v3 snapshots use a revision, an opaque repository fingerprint, and durable pending-operation
401
- metadata for Git create/remove. A transitional v3 snapshot containing an older raw repository
402
- field is read and cleaned on its next stable write. Invalid JSON, unknown schema versions, and
403
- invariant violations are reported as corruption rather than reset to an empty index.
404
-
405
459
  Each Session has at most one active Worktree binding, while a Worktree may have multiple bound
406
460
  Sessions. Rebinding the same Session to the same Worktree is idempotent; binding it to two active
407
461
  Worktrees is a conflict. A Session with no binding, a Main binding, or a detached binding runs
408
462
  with the Project root as cwd. An active Worktree binding runs with that Worktree path. The cwd is
409
463
  derived for each execution and is never persisted back into DSH Session metadata.
410
464
 
411
- Worktree creation creates the Git Worktree before recording its external relationship. Git
412
- create/remove mutations are serialized across Host processes per Workspace and repository,
413
- record a durable pending operation, and verify the actual Git result before publishing stable
414
- sidecar state. If a create cannot be reconciled or a path/repository identity changes, the
415
- operation remains explicitly recoverable; the plugin never uses force removal or deletes an
416
- unknown directory. If a sidecar write fails, the new Git Worktree is cleaned up when possible. A
417
- failed Worktree deletion does not silently change the relation, so it remains retryable or is
418
- marked `recovery-needed`. Session creation uses the native DSH API before binding; a binding
419
- failure never deletes or modifies the already-created Session.
420
-
421
- On Host startup, the plugin performs a best-effort safe recovery for known DSH Workspaces. It may
422
- finalize a pending create/remove only when Git path and repository identity are certain; otherwise
423
- it retains the marker and surfaces `WORKTREE_RECOVERY_REQUIRED` or
424
- `WORKTREE_IDENTITY_CHANGED`. It never guesses at destructive cleanup. A destructive action may
425
- also carry an opaque mutation token from the latest Worktree projection so a stale UI cannot act
426
- on a changed record.
427
-
428
- The Worktree session flow sends the independent Worktree cwd through the DSH Session Controller and
429
- keeps `{ workspaceId, sessionId }` as a browser-local membership projection rather than a
430
- persistent DSH attach. It does not modify DSH source, Session metadata, or native Workspace
431
- storage. The projection is replayed after native list refreshes and removed when the binding
432
- disappears or the Client is disposed.
433
-
434
- Permission changes use only the public DSH per-Session permission service and its
435
- `permission/preset`, `sandbox/mode`, and `approval/policy` records. The plugin does not write
436
- messages, prompts, transcripts, Workspace data, or Session metadata, and cannot enlarge a
437
- filesystem sandbox imposed by the host running DSH.
438
-
439
- The blank Hero context is visual only. Because the current upstream DSH source checkout has no
440
- additive Hero headline slot, its placement depends on the native `[data-phase="hero"]` and title
441
- anchors; it disappears when those anchors are unavailable and should move to a formal DSH slot
442
- when one exists.
465
+ Worktree creation creates the Git Worktree before recording its external relationship; if a sidecar
466
+ write fails, the newly created Git Worktree is cleaned up when possible. Session creation uses the
467
+ native DSH API before binding; a binding failure never deletes or modifies the already-created Session.
443
468
 
444
- ## Development and verification
469
+ The Worktree session flow presents Sessions in their bound Worktree context using browser-side
470
+ view projections without mutating DSH native Workspace storage.
445
471
 
446
- From the workspace root:
447
-
448
- ```bash
449
- cd /path/to/clutch-dsh
450
- pnpm install
451
- pnpm run check:workspace
452
- pnpm run check:patches
453
- pnpm --filter @cerbur/clutch-dsh-worktree typecheck
454
- pnpm --filter @cerbur/clutch-dsh-worktree build
455
- pnpm --filter @cerbur/clutch-dsh-worktree test
456
- ```
457
-
458
- For the bilingual README contract and formatting:
459
-
460
- ```bash
461
- cd /path/to/clutch-dsh/packages/clutch-dsh-worktree
462
- node --test test/readme-parity.test.mjs
463
- pnpm exec prettier --check README.md README.zh.md test/readme-parity.test.mjs
464
- ```
465
-
466
- The full workspace check is:
467
-
468
- ```bash
469
- cd /path/to/clutch-dsh
470
- pnpm run check
471
- ```
472
+ Permission changes use only the public DSH per-Session permission service. The plugin does not
473
+ write messages, prompts, transcripts, Workspace data, or Session metadata, and cannot enlarge a
474
+ filesystem sandbox imposed by the host running DSH.
472
475
 
473
- Do not commit generated `lib/`, coverage, sidecar data, or local credentials. See [AGENTS.md](AGENTS.md)
474
- for package data boundaries and lifecycle rules, [docs/RELEASING.md](docs/RELEASING.md) for
475
- version and installation-source details, and [src/client/README.md](src/client/README.md) for
476
- the browser Consumer boundary.
476
+ The blank Hero context is visual only. Because the current upstream DSH source checkout has no
477
+ additive Hero headline slot, its placement depends on native DOM anchors; it disappears when those
478
+ anchors are unavailable and should move to a formal DSH slot when one exists.
477
479
 
478
- ## Marketplace description
480
+ For detailed architectural models, lifecycle transitions, recovery guarantees, and developer documentation, see:
479
481
 
480
- When submitting to `awesome-dsh-plugin`, use the `git` category and keep the description aligned
481
- with the package:
482
+ - [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) Canonical architecture, lifecycle, and recovery invariants
483
+ - [docs/DEVELOPMENT.md](docs/DEVELOPMENT.md) — Local development, testing, and contribution guide
484
+ - [docs/RELEASING.md](docs/RELEASING.md) — Release parameters and versioning policy
485
+ - [AGENTS.md](AGENTS.md) — Coding agent working instructions
486
+ - [src/client/README.md](src/client/README.md) — Browser client integration and surface boundaries
482
487
 
483
- ```yaml
484
- category: git
485
- description:
486
- en: Adds a Worktree view to DSH Web UI that groups Sessions by Git worktree while keeping DSH as the source of truth.
487
- zh: 为 DSH Web UI 增加按 Git Worktree 组织 Session 的视角,同时继续由 DSH 管理原始 Project/Workspace 和 Session 数据。
488
- ```
488
+ ## Friendly Links
489
489
 
490
- Marketplace submission also requires external checks such as the `dsh-plugin` topic, repository
491
- age, and commit count. A package README cannot set those external properties.
490
+ - [LINUX DO](https://linux.do/) A new ideal community