@cerbur/clutch-dsh-worktree 0.1.12 → 0.1.14
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.
- package/README.md +312 -433
- package/README.zh.md +265 -348
- package/assets/screenshots/screenshots-dashboard.png +0 -0
- package/assets/screenshots/screenshots-git-reviewer.png +0 -0
- package/lib/client/WorktreeSurface.d.ts.map +1 -1
- package/lib/client/WorktreeSurface.js +140 -18
- package/lib/client/WorktreeSurface.js.map +1 -1
- package/lib/client/context/WorktreeHeroContext.d.ts +4 -3
- package/lib/client/context/WorktreeHeroContext.d.ts.map +1 -1
- package/lib/client/context/WorktreeHeroContext.js +29 -11
- package/lib/client/context/WorktreeHeroContext.js.map +1 -1
- package/lib/client/dashboard/WorktreeDashboard.d.ts +9 -2
- package/lib/client/dashboard/WorktreeDashboard.d.ts.map +1 -1
- package/lib/client/dashboard/WorktreeDashboard.js +165 -14
- package/lib/client/dashboard/WorktreeDashboard.js.map +1 -1
- package/lib/client/dashboard/dashboard-navigation.d.ts +35 -0
- package/lib/client/dashboard/dashboard-navigation.d.ts.map +1 -0
- package/lib/client/dashboard/dashboard-navigation.js +48 -0
- package/lib/client/dashboard/dashboard-navigation.js.map +1 -0
- package/lib/client/dashboard/dashboard-overlay.d.ts +7 -2
- package/lib/client/dashboard/dashboard-overlay.d.ts.map +1 -1
- package/lib/client/dashboard/dashboard-overlay.js +81 -16
- package/lib/client/dashboard/dashboard-overlay.js.map +1 -1
- package/lib/client/dashboard/dashboard-selection.d.ts +5 -3
- package/lib/client/dashboard/dashboard-selection.d.ts.map +1 -1
- package/lib/client/dashboard/dashboard-selection.js +3 -2
- package/lib/client/dashboard/dashboard-selection.js.map +1 -1
- package/lib/client/dashboard/git/GitChangedFiles.d.ts +11 -0
- package/lib/client/dashboard/git/GitChangedFiles.d.ts.map +1 -0
- package/lib/client/dashboard/git/GitChangedFiles.js +101 -0
- package/lib/client/dashboard/git/GitChangedFiles.js.map +1 -0
- package/lib/client/dashboard/git/GitCommitList.d.ts +15 -0
- package/lib/client/dashboard/git/GitCommitList.d.ts.map +1 -0
- package/lib/client/dashboard/git/GitCommitList.js +55 -0
- package/lib/client/dashboard/git/GitCommitList.js.map +1 -0
- package/lib/client/dashboard/git/GitDiffView.d.ts +10 -0
- package/lib/client/dashboard/git/GitDiffView.d.ts.map +1 -0
- package/lib/client/dashboard/git/GitDiffView.js +65 -0
- package/lib/client/dashboard/git/GitDiffView.js.map +1 -0
- package/lib/client/dashboard/git/GitFileTypeIcon.d.ts +8 -0
- package/lib/client/dashboard/git/GitFileTypeIcon.d.ts.map +1 -0
- package/lib/client/dashboard/git/GitFileTypeIcon.js +24 -0
- package/lib/client/dashboard/git/GitFileTypeIcon.js.map +1 -0
- package/lib/client/dashboard/git/GitLineStats.d.ts +10 -0
- package/lib/client/dashboard/git/GitLineStats.d.ts.map +1 -0
- package/lib/client/dashboard/git/GitLineStats.js +9 -0
- package/lib/client/dashboard/git/GitLineStats.js.map +1 -0
- package/lib/client/dashboard/git/WorktreeGitOverview.d.ts +31 -0
- package/lib/client/dashboard/git/WorktreeGitOverview.d.ts.map +1 -0
- package/lib/client/dashboard/git/WorktreeGitOverview.js +89 -0
- package/lib/client/dashboard/git/WorktreeGitOverview.js.map +1 -0
- package/lib/client/dashboard/git/WorktreeGitPanel.d.ts +16 -0
- package/lib/client/dashboard/git/WorktreeGitPanel.d.ts.map +1 -0
- package/lib/client/dashboard/git/WorktreeGitPanel.js +126 -0
- package/lib/client/dashboard/git/WorktreeGitPanel.js.map +1 -0
- package/lib/client/dashboard/git/file-address.d.ts +2 -0
- package/lib/client/dashboard/git/file-address.d.ts.map +1 -0
- package/lib/client/dashboard/git/file-address.js +16 -0
- package/lib/client/dashboard/git/file-address.js.map +1 -0
- package/lib/client/dashboard/git/git-column-split.d.ts +34 -0
- package/lib/client/dashboard/git/git-column-split.d.ts.map +1 -0
- package/lib/client/dashboard/git/git-column-split.js +41 -0
- package/lib/client/dashboard/git/git-column-split.js.map +1 -0
- package/lib/client/dashboard/git/git-diff-parser.d.ts +24 -0
- package/lib/client/dashboard/git/git-diff-parser.d.ts.map +1 -0
- package/lib/client/dashboard/git/git-diff-parser.js +56 -0
- package/lib/client/dashboard/git/git-diff-parser.js.map +1 -0
- package/lib/client/dashboard/git/git-facts.d.ts +22 -0
- package/lib/client/dashboard/git/git-facts.d.ts.map +1 -0
- package/lib/client/dashboard/git/git-facts.js +37 -0
- package/lib/client/dashboard/git/git-facts.js.map +1 -0
- package/lib/client/dashboard/git/git-file-tree.d.ts +16 -0
- package/lib/client/dashboard/git/git-file-tree.d.ts.map +1 -0
- package/lib/client/dashboard/git/git-file-tree.js +52 -0
- package/lib/client/dashboard/git/git-file-tree.js.map +1 -0
- package/lib/client/dashboard/git/git-state-cache.d.ts +49 -0
- package/lib/client/dashboard/git/git-state-cache.d.ts.map +1 -0
- package/lib/client/dashboard/git/git-state-cache.js +80 -0
- package/lib/client/dashboard/git/git-state-cache.js.map +1 -0
- package/lib/client/dashboard/git/useGitPaneSplit.d.ts +33 -0
- package/lib/client/dashboard/git/useGitPaneSplit.d.ts.map +1 -0
- package/lib/client/dashboard/git/useGitPaneSplit.js +119 -0
- package/lib/client/dashboard/git/useGitPaneSplit.js.map +1 -0
- package/lib/client/dashboard/git/useWorktreeGitState.d.ts +60 -0
- package/lib/client/dashboard/git/useWorktreeGitState.d.ts.map +1 -0
- package/lib/client/dashboard/git/useWorktreeGitState.js +650 -0
- package/lib/client/dashboard/git/useWorktreeGitState.js.map +1 -0
- package/lib/client/dashboard/open-in-app-controller.d.ts +1 -0
- package/lib/client/dashboard/open-in-app-controller.d.ts.map +1 -1
- package/lib/client/dashboard/open-in-app-controller.js +6 -24
- package/lib/client/dashboard/open-in-app-controller.js.map +1 -1
- package/lib/client/dashboard/vscode-url.d.ts.map +1 -1
- package/lib/client/dashboard/vscode-url.js +6 -3
- package/lib/client/dashboard/vscode-url.js.map +1 -1
- package/lib/client/entry.d.ts.map +1 -1
- package/lib/client/entry.js +28 -0
- package/lib/client/entry.js.map +1 -1
- package/lib/client/locales.d.ts +158 -0
- package/lib/client/locales.d.ts.map +1 -1
- package/lib/client/locales.js +172 -14
- package/lib/client/locales.js.map +1 -1
- package/lib/client/session/session-view.d.ts +10 -0
- package/lib/client/session/session-view.d.ts.map +1 -1
- package/lib/client/session/session-view.js +57 -0
- package/lib/client/session/session-view.js.map +1 -1
- package/lib/client/session/worktree-session-order.d.ts +2 -5
- package/lib/client/session/worktree-session-order.d.ts.map +1 -1
- package/lib/client/session/worktree-session-order.js +35 -10
- package/lib/client/session/worktree-session-order.js.map +1 -1
- package/lib/client/session/worktree-session-position.d.ts +2 -1
- package/lib/client/session/worktree-session-position.d.ts.map +1 -1
- package/lib/client/session/worktree-session-position.js +10 -3
- package/lib/client/session/worktree-session-position.js.map +1 -1
- package/lib/client/session/worktree-session.d.ts +2 -0
- package/lib/client/session/worktree-session.d.ts.map +1 -1
- package/lib/client/session/worktree-session.js +15 -3
- package/lib/client/session/worktree-session.js.map +1 -1
- package/lib/client/surface/actions/useDragActions.d.ts +33 -2
- package/lib/client/surface/actions/useDragActions.d.ts.map +1 -1
- package/lib/client/surface/actions/useDragActions.js +66 -18
- package/lib/client/surface/actions/useDragActions.js.map +1 -1
- package/lib/client/surface/components/ActiveWorktree.js +2 -2
- package/lib/client/surface/components/ActiveWorktree.js.map +1 -1
- package/lib/client/surface/components/ArchivedWorktree.js +2 -2
- package/lib/client/surface/components/ArchivedWorktree.js.map +1 -1
- package/lib/client/surface/components/ArchivedWorktrees.js +2 -2
- package/lib/client/surface/components/ArchivedWorktrees.js.map +1 -1
- package/lib/client/surface/components/SurfaceContent.d.ts +1 -1
- package/lib/client/surface/components/SurfaceContent.d.ts.map +1 -1
- package/lib/client/surface/components/SurfaceContent.js +1 -1
- package/lib/client/surface/components/SurfaceContent.js.map +1 -1
- package/lib/client/surface/components/SurfaceHeader.d.ts +1 -1
- package/lib/client/surface/components/SurfaceHeader.d.ts.map +1 -1
- package/lib/client/surface/components/SurfaceHeader.js +12 -3
- package/lib/client/surface/components/SurfaceHeader.js.map +1 -1
- package/lib/client/surface/components/WorkspaceTree.js +4 -4
- package/lib/client/surface/components/WorkspaceTree.js.map +1 -1
- package/lib/client/surface/components/rows.d.ts +2 -2
- package/lib/client/surface/components/rows.d.ts.map +1 -1
- package/lib/client/surface/components/rows.js +14 -9
- package/lib/client/surface/components/rows.js.map +1 -1
- package/lib/client/surface/selectors.d.ts +10 -0
- package/lib/client/surface/selectors.d.ts.map +1 -1
- package/lib/client/surface/selectors.js +14 -0
- package/lib/client/surface/selectors.js.map +1 -1
- package/lib/client/surface/state/useSessionExpansion.d.ts +2 -1
- package/lib/client/surface/state/useSessionExpansion.d.ts.map +1 -1
- package/lib/client/surface/state/useSessionExpansion.js +26 -13
- package/lib/client/surface/state/useSessionExpansion.js.map +1 -1
- package/lib/client/surface/state/useSessionOrdering.d.ts +1 -1
- package/lib/client/surface/state/useSessionOrdering.d.ts.map +1 -1
- package/lib/client/surface/state/useSessionOrdering.js +23 -8
- package/lib/client/surface/state/useSessionOrdering.js.map +1 -1
- package/lib/client/surface/types.d.ts +15 -3
- package/lib/client/surface/types.d.ts.map +1 -1
- package/lib/client/view/worktree-expand-state.d.ts +1 -1
- package/lib/client/view/worktree-expand-state.d.ts.map +1 -1
- package/lib/client/view/worktree-expand-state.js +8 -1
- package/lib/client/view/worktree-expand-state.js.map +1 -1
- package/lib/client/view/worktree-view-read.d.ts +3 -1
- package/lib/client/view/worktree-view-read.d.ts.map +1 -1
- package/lib/client/view/worktree-view-read.js +9 -2
- package/lib/client/view/worktree-view-read.js.map +1 -1
- package/lib/client/worktree-connection.d.ts +5 -0
- package/lib/client/worktree-connection.d.ts.map +1 -1
- package/lib/client/worktree-connection.js +14 -0
- package/lib/client/worktree-connection.js.map +1 -1
- package/lib/client.js +3520 -321
- package/lib/client.js.map +1 -1
- package/lib/contract/index.contract.js +10 -0
- package/lib/contract/index.contract.js.map +1 -1
- package/lib/contract/index.d.ts +155 -1
- package/lib/contract/index.d.ts.map +1 -1
- package/lib/contract/index.js +20 -0
- package/lib/contract/index.js.map +1 -1
- package/lib/contract/windows-path.d.ts +11 -0
- package/lib/contract/windows-path.d.ts.map +1 -0
- package/lib/contract/windows-path.js +41 -0
- package/lib/contract/windows-path.js.map +1 -0
- package/lib/host/remote.d.ts.map +1 -1
- package/lib/host/remote.js +5 -0
- package/lib/host/remote.js.map +1 -1
- package/lib/host/service.d.ts +18 -1
- package/lib/host/service.d.ts.map +1 -1
- package/lib/host/service.js +30 -0
- package/lib/host/service.js.map +1 -1
- package/lib/host/worktree-instructions.js +2 -2
- package/lib/host/worktree-instructions.js.map +1 -1
- package/lib/host/worktree-permission-manager.d.ts.map +1 -1
- package/lib/host/worktree-permission-manager.js +5 -1
- package/lib/host/worktree-permission-manager.js.map +1 -1
- package/lib/index.d.ts +4 -4
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +3 -3
- package/lib/index.js.map +1 -1
- package/lib/manage/manager-git-history.d.ts +17 -0
- package/lib/manage/manager-git-history.d.ts.map +1 -0
- package/lib/manage/manager-git-history.js +884 -0
- package/lib/manage/manager-git-history.js.map +1 -0
- package/lib/manage/manager-sessions.js +1 -1
- package/lib/manage/manager-sessions.js.map +1 -1
- package/lib/manage/manager-support.d.ts +3 -2
- package/lib/manage/manager-support.d.ts.map +1 -1
- package/lib/manage/manager-support.js +5 -13
- package/lib/manage/manager-support.js.map +1 -1
- package/lib/manage/manager-worktree-lifecycle.d.ts.map +1 -1
- package/lib/manage/manager-worktree-lifecycle.js +11 -3
- package/lib/manage/manager-worktree-lifecycle.js.map +1 -1
- package/lib/manage/manager-worktrees.d.ts.map +1 -1
- package/lib/manage/manager-worktrees.js +24 -0
- package/lib/manage/manager-worktrees.js.map +1 -1
- package/lib/manage/manager.d.ts +18 -1
- package/lib/manage/manager.d.ts.map +1 -1
- package/lib/manage/manager.js +74 -16
- package/lib/manage/manager.js.map +1 -1
- package/lib/provider/git/adapter.d.ts +54 -1
- package/lib/provider/git/adapter.d.ts.map +1 -1
- package/lib/provider/git/adapter.js +824 -2
- package/lib/provider/git/adapter.js.map +1 -1
- package/lib/provider/index.d.ts +2 -2
- package/lib/provider/index.d.ts.map +1 -1
- package/lib/provider/index.js +1 -1
- package/lib/provider/index.js.map +1 -1
- package/lib/provider/mutation-token.d.ts +1 -1
- package/lib/provider/mutation-token.d.ts.map +1 -1
- package/lib/provider/mutation-token.js +1 -0
- package/lib/provider/mutation-token.js.map +1 -1
- package/lib/provider/path-identity.d.ts +8 -0
- package/lib/provider/path-identity.d.ts.map +1 -0
- package/lib/provider/path-identity.js +62 -0
- package/lib/provider/path-identity.js.map +1 -0
- package/lib/provider/sidecar/mutation-lock.d.ts +4 -1
- package/lib/provider/sidecar/mutation-lock.d.ts.map +1 -1
- package/lib/provider/sidecar/mutation-lock.js +5 -11
- package/lib/provider/sidecar/mutation-lock.js.map +1 -1
- package/lib/provider/sidecar/process-liveness.d.ts +12 -0
- package/lib/provider/sidecar/process-liveness.d.ts.map +1 -0
- package/lib/provider/sidecar/process-liveness.js +39 -0
- package/lib/provider/sidecar/process-liveness.js.map +1 -0
- package/lib/provider/sidecar/repository.d.ts +1 -1
- package/lib/provider/sidecar/repository.d.ts.map +1 -1
- package/lib/provider/sidecar/repository.js +3 -2
- package/lib/provider/sidecar/repository.js.map +1 -1
- package/lib/provider/sidecar/sidecar-durability.d.ts +9 -0
- package/lib/provider/sidecar/sidecar-durability.d.ts.map +1 -0
- package/lib/provider/sidecar/sidecar-durability.js +36 -0
- package/lib/provider/sidecar/sidecar-durability.js.map +1 -0
- package/lib/provider/sidecar/sidecar-persistence.d.ts.map +1 -1
- package/lib/provider/sidecar/sidecar-persistence.js +2 -27
- package/lib/provider/sidecar/sidecar-persistence.js.map +1 -1
- package/lib/provider/sidecar/sidecar-schema.d.ts +16 -3
- package/lib/provider/sidecar/sidecar-schema.d.ts.map +1 -1
- package/lib/provider/sidecar/sidecar-schema.js +124 -25
- package/lib/provider/sidecar/sidecar-schema.js.map +1 -1
- package/lib/provider/transaction/operations/create.d.ts.map +1 -1
- package/lib/provider/transaction/operations/create.js +21 -6
- package/lib/provider/transaction/operations/create.js.map +1 -1
- package/lib/provider/transaction/recovery/failure-recovery.d.ts.map +1 -1
- package/lib/provider/transaction/recovery/failure-recovery.js +11 -4
- package/lib/provider/transaction/recovery/failure-recovery.js.map +1 -1
- package/lib/provider/transaction/recovery/recover.d.ts.map +1 -1
- package/lib/provider/transaction/recovery/recover.js +9 -11
- package/lib/provider/transaction/recovery/recover.js.map +1 -1
- package/lib/provider/transaction/support/inspection.d.ts +0 -2
- package/lib/provider/transaction/support/inspection.d.ts.map +1 -1
- package/lib/provider/transaction/support/inspection.js +0 -4
- package/lib/provider/transaction/support/inspection.js.map +1 -1
- package/lib/provider/transaction/support/journal.d.ts.map +1 -1
- package/lib/provider/transaction/support/journal.js +2 -0
- package/lib/provider/transaction/support/journal.js.map +1 -1
- package/lib/provider/transaction/support/paths.d.ts +2 -1
- package/lib/provider/transaction/support/paths.d.ts.map +1 -1
- package/lib/provider/transaction/support/paths.js +2 -12
- package/lib/provider/transaction/support/paths.js.map +1 -1
- package/lib/provider/transaction/types.d.ts +1 -0
- package/lib/provider/transaction/types.d.ts.map +1 -1
- package/lib/provider/types.d.ts +58 -8
- package/lib/provider/types.d.ts.map +1 -1
- package/lib/provider/types.js +1 -1
- package/lib/provider/types.js.map +1 -1
- package/lib/typert.host.js +337 -35
- package/lib/typert.remote-client.d.ts +11 -1
- package/lib/typert.remote-client.d.ts.map +1 -1
- package/lib/typert.remote-client.js +337 -35
- package/package.json +3 -1
- package/assets/screenshots/screenshots-dashboard.webp +0 -0
package/README.md
CHANGED
|
@@ -1,118 +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
|
-
|
|
6
|
-
|
|
7
|
-
Worktree
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
>
|
|
12
|
-
>
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-

|
|
17
|
-
|
|
18
|
-
The English screenshot shows Worktree mode in the Sidebar, a Workspace tree with Main and
|
|
19
|
-
Worktree rows, and the read-only blank-session Hero context.
|
|
20
|
-
|
|
21
|
-

|
|
22
|
-
|
|
23
|
-
The Import screenshot shows the existing Workspace `+` dialog with Create selected by default,
|
|
24
|
-
the adjacent Import tab, and a standard dropdown containing safe example branch/path values.
|
|
25
|
-
|
|
26
|
-

|
|
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
|
-
|
|
31
|
-
## Capabilities
|
|
32
|
-
|
|
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.
|
|
38
|
-
- Search Workspaces and create a Git Worktree and branch from an existing local branch.
|
|
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.
|
|
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.
|
|
43
|
-
- For active Worktree Sessions, request the named `worktree-full-access` preset after an
|
|
44
|
-
explicit confirmation. It combines DSH `danger-full-access` with `ask`: it removes filesystem
|
|
45
|
-
confinement for linked Git metadata while keeping approval prompts enabled; network and
|
|
46
|
-
process policy are unchanged. The native Access menu marks `Worktree Full Access` with a
|
|
47
|
-
Worktree branch icon.
|
|
48
|
-
- Preserve an explicit restriction selected in DSH's native Access UI. If the custom preset is
|
|
49
|
-
unavailable, fall back to `workspace-write + ask` when possible; if the permission capability
|
|
50
|
-
cannot be verified, show a retryable degraded state instead of claiming Full Access.
|
|
51
|
-
- Reuse the native `StateDot` for Session status indicators. Running, running-subagent, warning,
|
|
52
|
-
and completed states occupy the trailing slot; idle Sessions show native relative time for the
|
|
53
|
-
last human-authored message there. Hover or an open menu gives the trailing slot back to the
|
|
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.
|
|
57
|
-
- Show the native DSH Session hover detail card with the complete title, relative time, and current
|
|
58
|
-
status; the card yields to the Session actions menu and row dragging.
|
|
59
|
-
- Cover native waiting-for-approval, plan-review, question, completed, idle, and running-subagent
|
|
60
|
-
states without copying the animation implementation into the plugin.
|
|
61
|
-
- Show one native running indicator on a collapsed Workspace, Main, or Worktree when any of its
|
|
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.
|
|
65
|
-
- Promote a Session to the head of its Main or Worktree visual group after a newer user message.
|
|
66
|
-
This ordering is browser-local and does not mutate DSH Workspace order or the Worktree sidecar.
|
|
67
|
-
- Fork a Session from the native DSH Workspace tab, the Worktree view, or the Conversation fork
|
|
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.
|
|
70
|
-
- See ready, repair, active, and detached Worktree states, including retryable operation errors.
|
|
71
|
-
- Use the shared Main and Worktree row options menu to copy the selected row's absolute path.
|
|
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.
|
|
79
|
-
- Create a new Worktree from the Local or an active Worktree's options menu. The Create dialog
|
|
80
|
-
uses the selected row's current branch as its base and suggests the next available numbered
|
|
81
|
-
name, such as `feature-2` or `feature-3`; detached Worktrees do not expose this action.
|
|
82
|
-
- Continue using DSH-native Workspace rename/delete/reorder and Session menus. Worktree rows can
|
|
83
|
-
be reordered within their owning Workspace; order is stored in the plugin sidecar and Main is
|
|
84
|
-
fixed first.
|
|
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.
|
|
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.
|
|
88
|
-
- Keep the current local branch or Worktree branch visible as read-only context in the existing
|
|
89
|
-
Conversation title row and in the blank-session Hero.
|
|
90
|
-
- Copy the ID of any non-blank Worktree Session from its Session actions menu.
|
|
91
|
-
- Keep Conversation and Hero context stable across same-Session snapshot updates and Session
|
|
92
|
-
switches, while retaining the last valid context during replacement reads.
|
|
93
|
-
- Truncate long branch labels to fit their chips and reveal the complete value through a native
|
|
94
|
-
hover card; the Sidebar footer action follows native typography and does not add a duplicate
|
|
95
|
-
`WT` button when the Sidebar is collapsed.
|
|
96
|
-
- Keep Worktree Sessions in the original DSH Project/Workspace view; the plugin does not copy
|
|
97
|
-
Session content or modify messages, prompts, transcripts, or history.
|
|
98
|
-
|
|
99
|
-
### Compatibility and prerequisites
|
|
100
|
-
|
|
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.
|
|
103
|
-
|
|
104
|
-
The supported compatibility requirements are:
|
|
105
|
-
|
|
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 |
|
|
7
|
+
Workspace identity, Session metadata, native lists, messages, and conversation history.
|
|
8
|
+
|
|
9
|
+
The plugin stores Worktree relationships, acquisition facts, shared Worktree instructions, and Workspace-root
|
|
10
|
+
Main instructions in its own sidecar. Managed Worktrees expose a read-only baseline-relative Git & Changes dashboard, while Main exposes
|
|
11
|
+
its Workspace-root HEAD history; the plugin does not copy transcripts or rewrite DSH Sessions.
|
|
12
|
+
|
|
13
|
+
> **Preview:** Worktree Dashboard is an early, plugin-only MVP preview. Worktree navigation, lifecycle actions,
|
|
14
|
+
> Session actions, Worktree/Main instructions, and the managed Worktree or Main Git & Changes view are connected.
|
|
15
|
+
> Derived Worktrees, Settings, and other unfinished actions remain marked
|
|
16
|
+
> **Coming soon**.
|
|
112
17
|
|
|
113
18
|
## Installation
|
|
114
19
|
|
|
115
|
-
### Install from npm
|
|
20
|
+
### Install from npm
|
|
116
21
|
|
|
117
22
|
With an installed DSH CLI:
|
|
118
23
|
|
|
@@ -121,370 +26,344 @@ dsh plugin --profile web add @cerbur/clutch-dsh-worktree
|
|
|
121
26
|
dsh web
|
|
122
27
|
```
|
|
123
28
|
|
|
124
|
-
When using a
|
|
125
|
-
equivalent
|
|
29
|
+
When using a DeepSeek Harness source checkout without a standalone `dsh` command, use the
|
|
30
|
+
equivalent `pnpm dsh` form.
|
|
126
31
|
|
|
127
|
-
|
|
128
|
-
cd /path/to/deepseek-harness
|
|
129
|
-
pnpm dsh plugin --profile web add @cerbur/clutch-dsh-worktree
|
|
130
|
-
pnpm dsh web
|
|
131
|
-
```
|
|
32
|
+
### Install from a local checkout
|
|
132
33
|
|
|
133
|
-
|
|
34
|
+
Build this package, build the DSH source checkout, and add the package by absolute path:
|
|
134
35
|
|
|
135
36
|
```bash
|
|
136
|
-
|
|
37
|
+
cd /absolute/path/to/clutch-dsh
|
|
38
|
+
pnpm install
|
|
39
|
+
pnpm --filter @cerbur/clutch-dsh-worktree build
|
|
40
|
+
|
|
41
|
+
cd /absolute/path/to/deepseek-harness
|
|
42
|
+
pnpm install
|
|
43
|
+
pnpm run build
|
|
44
|
+
pnpm dsh plugin --profile web add /absolute/path/to/clutch-dsh/packages/clutch-dsh-worktree
|
|
45
|
+
pnpm dsh web
|
|
137
46
|
```
|
|
138
47
|
|
|
139
|
-
|
|
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`.
|
|
140
50
|
|
|
141
|
-
|
|
51
|
+
### Install from GitHub source (optional)
|
|
52
|
+
|
|
53
|
+
The package also supports the source dependency form used by the DSH plugin market:
|
|
142
54
|
|
|
143
55
|
```bash
|
|
144
56
|
dsh plugin --profile web add "github:Cerbur/clutch-dsh#path:/packages/clutch-dsh-worktree"
|
|
145
57
|
```
|
|
146
58
|
|
|
147
|
-
This
|
|
148
|
-
|
|
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).
|
|
149
61
|
|
|
150
|
-
|
|
62
|
+
## Features
|
|
151
63
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
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, Worktree/Main instructions, connected actions, the host-provided Open In action, and the read-only Git & Changes view for managed Worktrees or Main. Derived Worktrees, Settings, and other unfinished cards remain **Coming soon**. |
|
|
156
69
|
|
|
157
70
|
## Usage
|
|
158
71
|
|
|
159
72
|
### Open Worktree mode
|
|
160
73
|
|
|
161
|
-
1. Start
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
The screenshot above illustrates the Sidebar entry point and the visual context shown in the
|
|
169
|
-
blank-session Hero. The displayed language follows DSH's current language setting.
|
|
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
|
-

|
|
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.
|
|
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.
|
|
234
81
|
|
|
235
82
|
### Create a Worktree
|
|
236
83
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
1. Select a Workspace, press its `+`, choose a baseline local branch, and enter a Worktree name.
|
|
245
|
-
The default branch name is `dsh/<8-character-random-string>`.
|
|
246
|
-
2. To create a sibling from an existing Worktree, open that active Worktree's options menu and
|
|
247
|
-
choose `Create new Worktree`. The dialog preselects the Worktree branch as the base and
|
|
248
|
-
chooses the next available numeric suffix for the name; existing names are skipped.
|
|
249
|
-
3. The target Worktree path must be absolute, belong to the same Project, and differ from the
|
|
250
|
-
Project root. Relative paths, a different Project, or the Project root are rejected.
|
|
251
|
-
4. Git must be installed and available on `PATH`. A missing Git executable shows install guidance and no command block;
|
|
252
|
-
install Git, restart DSH, and retry. If the repository, initial commit,
|
|
253
|
-
or local branch is missing, follow the copyable setup commands in the dialog. The plugin only
|
|
254
|
-
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.
|
|
255
91
|
|
|
256
92
|
### Import an existing Worktree
|
|
257
93
|
|
|
258
|
-
1. Select a Workspace,
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
-
|
|
417
|
-
can be
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
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
|
+
### Open the recorded directory in an app
|
|
136
|
+
|
|
137
|
+
The Dashboard **Open in ...** split button is plugin UI backed by DSH's official Host routes:
|
|
138
|
+
|
|
139
|
+
- `GET /open-in-app/apps` detects the available applications;
|
|
140
|
+
- `GET /open-in-app/icon/<appId>` supplies each application icon; and
|
|
141
|
+
- `POST /open-in-app/open` launches `{ "app": string, "path": absoluteDirectoryPath }`.
|
|
142
|
+
|
|
143
|
+
The button sends relative requests to the current DSH host and uses the Dashboard record's
|
|
144
|
+
`absolutePath`; it does not probe the operating system or persist an application choice. The selected
|
|
145
|
+
application is remembered only in the current page's memory. After a refresh, the first available
|
|
146
|
+
application is used. If no application is available or the Host request fails, the button keeps the
|
|
147
|
+
existing VS Code protocol-link fallback.
|
|
148
|
+
|
|
149
|
+
### Use Git & Changes
|
|
150
|
+
|
|
151
|
+
Open the **Git & Changes** tab from a managed Worktree or Main Dashboard. Main reads the current Workspace-root
|
|
152
|
+
commit history directly and prepends an **Uncommitted changes** entry when the root has tracked, staged, unstaged, or
|
|
153
|
+
untracked changes. It shows at most the first 200 committed commits, selects the first visible target, and uses the same
|
|
154
|
+
changed-file and diff panes for either a live working-tree target or a committed history entry. For a managed Worktree with a
|
|
155
|
+
persisted `baseBranch` that differs from the current branch, or with a captured acquisition commit that
|
|
156
|
+
supplies the implicit baseline, the Overview performs one compact, on-demand Git status read through the
|
|
157
|
+
existing `/api` Connection. It shows ahead/behind commit counts plus separate
|
|
158
|
+
committed (baseline-to-HEAD) and uncommitted (live working-tree) line totals; this is an ephemeral
|
|
159
|
+
projection, not a watcher or a Worktree-record field. Main has no Worktree baseline comparison, so Overview remains
|
|
160
|
+
**Not connected** for ahead/behind facts while its Git tab still exposes Main history. Unavailable or baseline-unselected
|
|
161
|
+
managed views honestly remain **Not connected**. Opening Overview does not load the branch list; the first Git tab
|
|
162
|
+
activation loads local branches and, once a baseline is resolved, managed Worktree commit history. To replace that baseline, click the pencil icon beside the Base fact to open the branch
|
|
163
|
+
picker: its search field sits permanently above a bounded branch list that shows roughly seven rows and
|
|
164
|
+
scrolls internally, so the dialog keeps one size while you filter. Choose any local branch except the
|
|
165
|
+
current Worktree branch and save.
|
|
166
|
+
The save replaces the persisted `baseBranch` in the plugin sidecar; the saved value becomes the default for
|
|
167
|
+
the Git selector. Once the Git tab is open, changing its selector remains a transient view choice and reloads
|
|
168
|
+
history, changed files, and diffs without another Worktree-record write. If no usable saved baseline exists
|
|
169
|
+
(absent or equal to the current Worktree branch), the Git tab and the Overview read against the Worktree's
|
|
170
|
+
immutable captured acquisition commit and show that resolved commit as the Base fact; only a Worktree with
|
|
171
|
+
neither a usable saved baseline nor a captured commit stays baseline-unselected and prompts you to choose
|
|
172
|
+
one. When the selected branch has diverged, Git resolves the two heads' common ancestor. The
|
|
173
|
+
Git & Changes view reports Worktree commits after that ancestor as `+N` ahead and base-branch commits after it
|
|
174
|
+
as `-N` behind; history and file reads remain available. If the two heads have no common ancestor, the
|
|
175
|
+
committed summary falls back to the full tree diff between the base branch tip and Worktree `HEAD`, while
|
|
176
|
+
history uses the Worktree commits not reachable from that base tip.
|
|
177
|
+
With a valid managed Worktree baseline loaded, the Git & Changes tab initially selects **Baseline summary** rather than the
|
|
178
|
+
first commit; changing the baseline branch also returns to that summary. Choose a commit or **Uncommitted
|
|
179
|
+
changes** when you need a narrower target. Main skips this comparison-only summary but presents the same committed history and multi-commit selection behavior, plus a live working-tree target when the
|
|
180
|
+
Workspace root has changes. Selecting **Uncommitted changes** compares the current Workspace root with `HEAD`; it does not
|
|
181
|
+
create a baseline or write any Git state.
|
|
182
|
+
|
|
183
|
+
The selected local branch is resolved again for each read. The browser can choose only a plain local branch
|
|
184
|
+
name, not a raw commit SHA or arbitrary Git ref: a full ref path, tag, or remote-tracking ref is rejected
|
|
185
|
+
outright, while a selected branch that no longer exists shows the honest unavailable state instead of a
|
|
186
|
+
generic Git failure. `baseCommit` is immutable acquisition metadata, is never user-selectable directly, and
|
|
187
|
+
is the implicit baseline whenever no saved branch baseline is usable; creation recovery never overwrites
|
|
188
|
+
it. When a managed Worktree or Main Workspace root has staged, unstaged, or untracked files, the list prepends an
|
|
189
|
+
**Uncommitted changes** entry; selecting it compares that live working tree with `HEAD` and uses the same changed-file
|
|
190
|
+
and diff views.
|
|
191
|
+
|
|
192
|
+
The **Baseline summary** is a separate target that shows the net committed tree diff from the resolved
|
|
193
|
+
common ancestor to the request's captured `HEAD` (or the two branch tips when no common ancestor exists);
|
|
194
|
+
it excludes working-tree changes by default. Turn on **Include working tree** to replace that target with
|
|
195
|
+
one net diff from the same comparison boundary to the current working tree, including committed, staged,
|
|
196
|
+
unstaged, untracked, deleted, and renamed changes. This is a
|
|
197
|
+
fresh on-demand projection rather than a concatenation of two diffs. Clicking a commit shows that
|
|
198
|
+
commit's own diff. For managed Worktrees and Main, turn on **Multi-select commits** in the commits header to pick several committed rows
|
|
199
|
+
and view the exact union of their first-parent deltas; Main has no baseline-summary or working-tree-inclusion controls, and the switch is off by default; turning it off
|
|
200
|
+
collapses the selection back to the focused commit. The changed-file list
|
|
201
|
+
records the contributing commits, and each selected commit is rendered as its own diff segment; this is
|
|
202
|
+
not an implicit range and does not include unselected commits. The changed-files column header shows the
|
|
203
|
+
aggregate green `+N` and red `-N` totals for the current target, including the Baseline summary, selected
|
|
204
|
+
commits, or Uncommitted changes; binary-only totals show Unknown. The working-tree entry remains mutually
|
|
205
|
+
exclusive with committed multi-selection. The **Open in Sidebar** action in the summary diff toolbar
|
|
206
|
+
reveals the current file in the native right sidebar using the current Session, only when that Session
|
|
207
|
+
belongs to the Dashboard Worktree. An empty Worktree
|
|
208
|
+
or an unrelated current Session cannot open a file through this action.
|
|
209
|
+
|
|
210
|
+
Managed Worktree and Main history are each capped at 200 commits and mark longer histories as truncated. A changed-file list larger
|
|
211
|
+
than the Git adapter's output bound reports an explicit truncated state instead of a generic error.
|
|
212
|
+
Commit details use
|
|
213
|
+
first-parent comparisons; root commits compare against the empty tree; rename and copy rows retain
|
|
214
|
+
both paths; binary or oversized diffs show an explicit display-safe state. Changed-file rows show text
|
|
215
|
+
line counts as green `+N` additions and red `-N` deletions; binary files omit those counts. File names use
|
|
216
|
+
green for additions, red for deletions, and blue for other changes, and each row's title and accessible
|
|
217
|
+
label spells the status out. Folder icons indicate whether each folder is
|
|
218
|
+
expanded or collapsed. The **Uncommitted changes** entry is an on-demand snapshot, is not persisted, and is not a
|
|
219
|
+
Git watcher; refresh it to see later edits.
|
|
220
|
+
|
|
221
|
+
Git & Changes uses a viewport-bounded, fixed-size surface. Wide layouts show two columns: commits and
|
|
222
|
+
changed files stack in the narrower left column around a draggable divider, while the diff keeps the full
|
|
223
|
+
height on the right. Narrow layouts keep two rows: commits and changed files side by side on the first row,
|
|
224
|
+
with the summary diff underneath. Both dividers stay draggable in either layout — the vertical one trades
|
|
225
|
+
width between the columns, or between commits and changed files inside the first row, and the horizontal one
|
|
226
|
+
trades height between the commits and changed-file panes, or between the first row and the diff. Drag a
|
|
227
|
+
divider, or focus it and press the arrow keys, to move it, and double-click it to restore the default split.
|
|
228
|
+
Long commit and changed-file lists scroll inside their panes instead of expanding the Dashboard. The
|
|
229
|
+
changed-file pane also scrolls horizontally when paths are wider than the pane, keeping file and folder
|
|
230
|
+
names untruncated. Changed files are grouped by folders; folders start expanded and can be opened or
|
|
231
|
+
collapsed independently. Diff content also scrolls inside its bounded pane, while the read-only selection
|
|
232
|
+
and refresh behavior remains unchanged.
|
|
233
|
+
|
|
234
|
+
The view is read-only and does not provide commit or staging controls. For managed Worktrees, the plugin validates committed
|
|
235
|
+
entries against the selected branch-to-`HEAD` projection and re-reads working-tree paths against a fresh status projection;
|
|
236
|
+
Main validates committed entries against its bounded HEAD-history projection. These endpoints are not generic Git object or file readers. Refresh keeps ready
|
|
237
|
+
content visible while replacement data loads, and late responses for an older commit or file selection
|
|
238
|
+
are ignored.
|
|
239
|
+
|
|
240
|
+
### Add Worktree or Main instructions
|
|
241
|
+
|
|
242
|
+
In the Dashboard, use **Edit** on the instructions card to save or clear shared guidance for the selected Worktree or
|
|
243
|
+
Main Workspace, up to 32,000 UTF-16 code units. The next model request receives the text as a separate
|
|
244
|
+
`<system-reminder>` context entry through DSH's pre-step hook, including unbound Sessions running at Main.
|
|
245
|
+
|
|
246
|
+
Instructions stay in the plugin's own data. They are not written to the project directory or an
|
|
247
|
+
`AGENTS.md` file. Clearing, detaching, cleaning, or forgetting a Worktree stops future injection; archiving
|
|
248
|
+
keeps an active binding and therefore keeps its Worktree instruction effective. Unchanged instruction text is not repeatedly added while its message remains visible.
|
|
249
|
+
|
|
250
|
+
### Archive or remove a Worktree
|
|
251
|
+
|
|
252
|
+
- **Archive Worktree** is non-destructive. It keeps the directory, bindings, instructions, and
|
|
253
|
+
runtime Worktree context. An archived Worktree can be unarchived while its Git registration is
|
|
254
|
+
intact.
|
|
255
|
+
- **Clean Up Disk** is a separate action. It requires a second confirmation and runs the normal
|
|
256
|
+
non-forced `git worktree remove`. The plugin does not check whether Sessions or subagents are
|
|
257
|
+
still using the directory; stop those tasks before confirming. Successful cleanup detaches the
|
|
258
|
+
bindings while keeping the recorded history until it is forgotten.
|
|
259
|
+
- **Remove from Management** deletes only the plugin's Worktree and binding records. It preserves
|
|
260
|
+
the disk files and native DSH Sessions, and does not require a Session activity check.
|
|
261
|
+
|
|
262
|
+
## Requirements
|
|
263
|
+
|
|
264
|
+
| Component | Requirement |
|
|
265
|
+
| --- | --- |
|
|
266
|
+
| DSH Client | `>=0.1.5-rc.1`, including the Session and Workspace Controllers and Client Store |
|
|
267
|
+
| DSH Host | `>=0.1.5-rc.1`, including the Typert Gateway `/api` connection and subprocess capability |
|
|
268
|
+
| Git | `>=2.20.0`, installed and available on `PATH` |
|
|
269
|
+
| Node.js | `>=20.0.0` for the DSH host runtime |
|
|
270
|
+
| Host filesystem | Normal Windows and macOS local paths are supported for sidecar and Git Worktree data; network, special, or alias-heavy filesystems may not support durable sync or identity checks. |
|
|
271
|
+
|
|
272
|
+
## Behavior and limitations
|
|
273
|
+
|
|
274
|
+
- DSH owns Workspace identity and root paths, Session identity and metadata, native lists,
|
|
275
|
+
messages, prompts, transcripts, and history. The plugin never copies or rewrites those values.
|
|
276
|
+
- The plugin's external index stores Worktree paths, branches, sources, lifecycle state, bindings,
|
|
277
|
+
ordering, instructions, acquisition facts, and related metadata. For managed Worktrees, the
|
|
278
|
+
Dashboard Base fact is the persisted `baseBranch`; users can replace it with a local branch other
|
|
279
|
+
than the current Worktree branch, and the saved value becomes the Git-tab selector default. The
|
|
280
|
+
immutable acquisition `baseCommit` remains separate and is not rewritten by that edit. The index is
|
|
281
|
+
kept in the DSH host plugin data directory, not in a project directory or DSH's raw data store. It
|
|
282
|
+
does not store Session content or a copy of the Workspace root.
|
|
283
|
+
- Runtime `cwd` is derived for each execution. No binding, Main, or detached binding uses the
|
|
284
|
+
Workspace root; an active Worktree binding uses that Worktree path. The cwd is never persisted
|
|
285
|
+
into DSH Session metadata.
|
|
286
|
+
- One Session can have at most one active Worktree binding, while a Worktree can have many Sessions.
|
|
287
|
+
Removing or cleaning a Worktree never deletes a DSH Session. A broken active binding reports a
|
|
288
|
+
repair state instead of silently falling back to another Worktree.
|
|
289
|
+
- Git is read on relevant refreshes, when relevant menus open, and on Git Dashboard activation;
|
|
290
|
+
the plugin does not watch Git continuously. An external branch change is shown as branch drift
|
|
291
|
+
and requires explicit **Adopt current branch** before disk cleanup. Detached HEAD and
|
|
292
|
+
recovery-needed states remain visible and retryable.
|
|
293
|
+
- 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.
|
|
294
|
+
- 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.
|
|
295
|
+
- 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.
|
|
296
|
+
- 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.
|
|
297
|
+
- Git Dashboard reads run on the Host through the existing DSH `/api` transport. The browser does
|
|
298
|
+
not execute Git, read sidecar files or `.git`, or expose working-tree mutation controls. File
|
|
299
|
+
diffs disable external diff and text conversion and are bounded for safe display.
|
|
300
|
+
- The Dashboard Open In action uses only the official relative DSH Host open-in-app routes for application discovery, icons, and launching. It keeps the application choice in current-page memory; refreshes use the first available application, and an empty or failed Host response falls back to the encoded VS Code protocol link.
|
|
301
|
+
- The Git Dashboard is intentionally limited to committed history, a read-only **Baseline summary**
|
|
302
|
+
(optionally including one fresh baseline-to-working-tree projection), one **Uncommitted changes**
|
|
303
|
+
snapshot, changed files, and one unified diff at a time. These projections combine staged, unstaged,
|
|
304
|
+
and untracked files when requested but are never written back to Git. The Dashboard does not provide
|
|
305
|
+
commit, staging, reset, revert, cherry-pick, fetch, push, pull, pull requests, graph lanes, pagination,
|
|
306
|
+
or syntax highlighting.
|
|
307
|
+
- Session rows use DSH's native status and relative-time presentation. Collapsed Workspace, Main,
|
|
308
|
+
and Worktree groups derive one aggregate `StateDot` from their complete eligible membership (after native blank/archive filtering): waiting
|
|
309
|
+
approval (and other pending-interaction warnings) takes priority over running, and running
|
|
310
|
+
takes priority over completed. Idle Sessions do not contribute a group dot; Worktree health
|
|
311
|
+
remains a separate leading indicator. Visual Session ordering initially follows the newest `updatedAt` values and
|
|
312
|
+
remains browser-local; Main remains fixed first, Worktree drag updates only this local order projection,
|
|
313
|
+
and Main drag updates native Workspace order only after DSH accepts it.
|
|
314
|
+
- Active Worktree Sessions may request the named `worktree-full-access` preset after an explicit
|
|
315
|
+
confirmation. It combines DSH `danger-full-access` with `ask`, keeps approval prompts enabled,
|
|
316
|
+
and does not change network or process policy. If unavailable, the plugin falls back to
|
|
317
|
+
`workspace-write + ask` when possible or reports an unverified, retryable state. It cannot
|
|
318
|
+
exceed the sandbox imposed by the host running DSH.
|
|
319
|
+
- Session-to-Worktree bindings and permission checks compare physical filesystem identity on the Host (`stat`/`realpath`) rather than relying on lexical path equality. This ensures robust compatibility across Windows and macOS path variations (including drive-letter casing, forward/backward slashes, UNC paths, and extended-length prefixes like `\\?\\`). On Windows, sidecar atomic persistence uses file-handle synchronization with best-effort directory sync, and Git CLI integration cleanly handles `NUL` null-device paths and CRLF line endings.
|
|
320
|
+
- Git must be installed and available on `PATH`. A missing Git executable shows install guidance
|
|
321
|
+
and no command block; the plugin does not run setup or installation commands.
|
|
322
|
+
- If the plugin's external index is unavailable or corrupt, native DSH Workspace and Session views
|
|
323
|
+
remain readable and the plugin enters a degraded read-only state. It never replaces native data
|
|
324
|
+
with an empty index.
|
|
429
325
|
|
|
430
326
|
## Language behavior
|
|
431
327
|
|
|
432
|
-
Worktree mode follows DSH's current interface language.
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
and Chinese.
|
|
436
|
-
|
|
437
|
-
Workspace names, Session titles, branch names, paths, and raw DSH/Host error messages remain
|
|
438
|
-
unchanged for diagnosis and continued use of native DSH data. The Main group is localized as
|
|
439
|
-
`Local (branch)` in English and `本地(branch)` in Chinese, with `Local`/`本地` as the fallback
|
|
440
|
-
when no current branch is reported.
|
|
328
|
+
Worktree mode follows DSH's current interface language. The entry point, tree, menus, dialogs,
|
|
329
|
+
statuses, Dashboard labels, and retry messages are localized in English and Chinese. Workspace
|
|
330
|
+
names, Session titles, branch names, paths, and raw DSH or Git errors keep their original values.
|
|
441
331
|
|
|
442
|
-
##
|
|
332
|
+
## Development
|
|
443
333
|
|
|
444
|
-
|
|
445
|
-
Project/Session lists, messages, prompts, transcripts, and history. The plugin does not copy or
|
|
446
|
-
rewrite any of those values. Its external index lives in the DSH host's plugin data directory or
|
|
447
|
-
an independent sidecar store and contains only relationship facts such as:
|
|
334
|
+
For architecture, local DSH integration, testing, and contribution details, see:
|
|
448
335
|
|
|
449
|
-
-
|
|
450
|
-
-
|
|
451
|
-
-
|
|
452
|
-
-
|
|
336
|
+
- [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md)
|
|
337
|
+
- [docs/DEVELOPMENT.md](docs/DEVELOPMENT.md)
|
|
338
|
+
- [docs/RELEASING.md](docs/RELEASING.md)
|
|
339
|
+
- [AGENTS.md](AGENTS.md)
|
|
340
|
+
- [src/client/README.md](src/client/README.md)
|
|
453
341
|
|
|
454
|
-
The
|
|
455
|
-
store a copy of `projectRoot` or any Session content. If the sidecar is unavailable or corrupt,
|
|
456
|
-
the native Project/Session view remains readable and the plugin becomes degraded/read-only; an
|
|
457
|
-
empty index must never overwrite the native DSH lists.
|
|
342
|
+
The focused package commands are:
|
|
458
343
|
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
344
|
+
```bash
|
|
345
|
+
pnpm --filter @cerbur/clutch-dsh-worktree typecheck
|
|
346
|
+
pnpm --filter @cerbur/clutch-dsh-worktree build
|
|
347
|
+
pnpm --filter @cerbur/clutch-dsh-worktree test
|
|
348
|
+
```
|
|
464
349
|
|
|
465
|
-
|
|
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.
|
|
350
|
+
The bilingual README structure is checked with:
|
|
468
351
|
|
|
469
|
-
|
|
470
|
-
|
|
352
|
+
```bash
|
|
353
|
+
node --test test/readme-parity.test.mjs
|
|
354
|
+
```
|
|
471
355
|
|
|
472
|
-
|
|
473
|
-
write messages, prompts, transcripts, Workspace data, or Session metadata, and cannot enlarge a
|
|
474
|
-
filesystem sandbox imposed by the host running DSH.
|
|
356
|
+
## Uninstall
|
|
475
357
|
|
|
476
|
-
|
|
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.
|
|
358
|
+
With the DSH CLI:
|
|
479
359
|
|
|
480
|
-
|
|
360
|
+
```bash
|
|
361
|
+
dsh plugin --profile web remove @cerbur/clutch-dsh-worktree
|
|
362
|
+
```
|
|
481
363
|
|
|
482
|
-
|
|
483
|
-
|
|
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
|
|
364
|
+
From a DeepSeek Harness checkout, use `pnpm dsh plugin --profile web remove` with the same package
|
|
365
|
+
name.
|
|
487
366
|
|
|
488
367
|
## Friendly Links
|
|
489
368
|
|
|
490
|
-
- [LINUX DO](https://linux.do/) — A new ideal community
|
|
369
|
+
- [LINUX DO](https://linux.do/) — A new ideal community.
|