dsh-git-worktree 0.9.2 → 0.10.0
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/CHANGELOG.md +418 -386
- package/LICENSE +21 -21
- package/NOTICE +16 -14
- package/README.en.md +169 -169
- package/README.md +169 -169
- package/cordis.patch.yml +11 -11
- package/docs/i18n.md +63 -63
- package/lib/adapters/initial-commit.js +3 -3
- package/lib/adapters/project-skill-provider.js +14 -4
- package/lib/adapters/project-skill-provider.js.map +1 -1
- package/lib/client/actions.d.ts +19 -3
- package/lib/client/actions.js +23 -3
- package/lib/client/actions.js.map +1 -1
- package/lib/client/console-remote/adapter.js +1 -1
- package/lib/client/console-remote/adapter.js.map +1 -1
- package/lib/client/console-remote/index.d.ts +10 -3
- package/lib/client/console-remote/index.js +56 -13
- package/lib/client/console-remote/index.js.map +1 -1
- package/lib/client/index.js +1 -0
- package/lib/client/index.js.map +1 -1
- package/lib/client/pre-session/controller.d.ts +1 -1
- package/lib/client/pre-session/controller.js +33 -18
- package/lib/client/pre-session/controller.js.map +1 -1
- package/lib/client/review-console/recovery-continuation.d.ts +1 -1
- package/lib/client/review-console/recovery-continuation.js +9 -4
- package/lib/client/review-console/recovery-continuation.js.map +1 -1
- package/lib/client/review-console/review-console.styles.js +190 -190
- package/lib/client/styles.js +146 -140
- package/lib/client/styles.js.map +1 -1
- package/lib/client/target-console/target-console.styles.js +155 -155
- package/lib/client/workspace-sidebar/index.d.ts +11 -2
- package/lib/client/workspace-sidebar/index.js +89 -9
- package/lib/client/workspace-sidebar/index.js.map +1 -1
- package/lib/client.js +10501 -1345
- package/lib/console-contract.d.ts +2 -0
- package/lib/console-contract.js.map +1 -1
- package/lib/console-host/service.js +4 -2
- package/lib/console-host/service.js.map +1 -1
- package/lib/console-remote/descriptors.js +10 -3
- package/lib/console-remote/descriptors.js.map +1 -1
- package/lib/console-remote/schemas.js +1 -0
- package/lib/console-remote/schemas.js.map +1 -1
- package/lib/host-compat.d.ts +4 -0
- package/lib/host-compat.js +25 -0
- package/lib/host-compat.js.map +1 -0
- package/lib/i18n/client-messages.d.ts +4 -0
- package/lib/i18n/client-messages.js +4 -0
- package/lib/i18n/client-messages.js.map +1 -1
- package/lib/index.d.ts +4 -1
- package/lib/index.js +9 -2
- package/lib/index.js.map +1 -1
- package/lib/workspace-provider-lifecycle.d.ts +16 -1
- package/lib/workspace-provider-lifecycle.js +69 -5
- package/lib/workspace-provider-lifecycle.js.map +1 -1
- package/package.json +153 -149
- package/scripts/check-publish.mjs +239 -238
- package/scripts/check-workspace-sidebar-version.mjs +18 -14
- package/scripts/clean-lib.mjs +7 -7
- package/scripts/dev-dsh-lib.mjs +547 -509
- package/scripts/dev-dsh.mjs +98 -95
- package/scripts/dsh-source-runner.mjs +20 -14
- package/scripts/workspace-sidebar-upstream-alpha.mjs +102 -0
- package/scripts/workspace-sidebar-upstream-next.mjs +134 -0
- package/scripts/workspace-sidebar-upstream.d.mts +8 -8
- package/scripts/workspace-sidebar-upstream.mjs +182 -162
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 wloops
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 wloops
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/NOTICE
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
dsh-git-worktree
|
|
2
|
-
|
|
3
|
-
The generated browser bundle includes software derived at build time from:
|
|
4
|
-
|
|
5
|
-
@deepseek-ai/dsh-client-ui-workspace 0.1.2-rc.1
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
dsh-git-worktree
|
|
2
|
+
|
|
3
|
+
The generated browser bundle includes software derived at build time from:
|
|
4
|
+
|
|
5
|
+
@deepseek-ai/dsh-client-ui-workspace 0.1.2-rc.1
|
|
6
|
+
@deepseek-ai/dsh-client-ui-workspace 0.1.6-alpha.2
|
|
7
|
+
@deepseek-ai/dsh-client-ui-workspace 0.1.7-rc.2
|
|
8
|
+
Copyright (c) 2026 DeepSeek
|
|
9
|
+
Licensed under the MIT License
|
|
10
|
+
https://www.npmjs.com/package/@deepseek-ai/dsh-client-ui-workspace
|
|
11
|
+
|
|
12
|
+
Each upstream Client factory is version- and SHA-256-gated by the matching
|
|
13
|
+
scripts/workspace-sidebar-upstream*.mjs. Official Workspace Browser,
|
|
14
|
+
WorkspacePicker, locale dictionaries, stores, and directory-flow declarations
|
|
15
|
+
are preserved. dsh-git-worktree wraps the Browser projection and applies
|
|
16
|
+
fail-closed Managed owner row decorations for Worktree identity and status.
|
package/README.en.md
CHANGED
|
@@ -1,169 +1,169 @@
|
|
|
1
|
-
# dsh-git-worktree
|
|
2
|
-
|
|
3
|
-
[](https://www.npmjs.com/package/dsh-git-worktree)
|
|
4
|
-
[](https://www.npmjs.com/package/dsh-git-worktree)
|
|
5
|
-
[](https://github.com/wloops/dsh-git-worktree/actions/workflows/ci.yml)
|
|
6
|
-
[](LICENSE)
|
|
7
|
-
|
|
8
|
-
**Let agents complete tasks in independent Git Worktrees, then review the changes before deciding whether to save them.**
|
|
9
|
-
|
|
10
|
-
`dsh-git-worktree` is a Git Worktree plugin for [DeepSeek Harness](https://github.com/deepseek-ai/DeepSeek-Harness). It creates a separate Worktree (working directory) for every coding task, so the agent does not directly edit the project you are using. When the task is complete, you can preview the result and then save it, send it back for changes, or discard it.
|
|
11
|
-
|
|
12
|
-
This Git Worktree workflow originated in [Domi](https://github.com/restflux/domi), an open-source desktop coding workbench powered by the Pi Agent Runtime. This plugin is independently adapted for DeepSeek Harness and can be installed and used on its own.
|
|
13
|
-
|
|
14
|
-
[中文](README.md) · [Full usage guide](docs/USAGE.en.md) · [Architecture](docs/WORKTREE-CONSOLE-ARCHITECTURE.md)
|
|
15
|
-
|
|
16
|
-
## Why use it?
|
|
17
|
-
|
|
18
|
-
When an agent edits the current project directly, its changes can mix with your unfinished work. Running multiple tasks at once can also make them interfere with one another. With this plugin:
|
|
19
|
-
|
|
20
|
-
- every task is edited and tested in its own Git Worktree (an independent working directory);
|
|
21
|
-
- multiple tasks can run at the same time without sharing one working directory;
|
|
22
|
-
- when the agent finishes, you can temporarily show the changes in the current project and inspect them;
|
|
23
|
-
- changes are saved only after confirmation, and conflicts never overwrite your work automatically.
|
|
24
|
-
|
|
25
|
-
## Highlights
|
|
26
|
-
|
|
27
|
-
- **Git Worktree isolation**: every task gets its own working directory and its own agent conversation.
|
|
28
|
-
- **Run multiple Worktrees**: develop several tasks in parallel; to avoid mixing changes, review one task at a time per project.
|
|
29
|
-
- **Preview before committing**: inspect the real result in the current project without immediately creating a Git commit.
|
|
30
|
-
- **Send it back safely**: undo the current preview and ask the agent for more changes without disturbing unrelated local work.
|
|
31
|
-
- **Save only this task**: confirmation commits only the current task instead of pulling unrelated changes into it.
|
|
32
|
-
- **Preserve progress on long tasks**: save the current stage and keep developing; the stages still become one final delivery.
|
|
33
|
-
- **Protect the working state**: branch changes, conflicts, and interrupted operations stop safely and leave the state available for recovery.
|
|
34
|
-
- **See related tasks together**: current and historical Worktrees are grouped under their Host-provided project navigation owner; ambiguous tasks conservatively remain where they are.
|
|
35
|
-
- **Inspect review details in one place**: open a read-only view from the review bar for changed files, validation records, and version details without searching tool messages.
|
|
36
|
-
- **Start safely from an empty repository**: after explicit confirmation, an unborn repository can receive an empty initial commit that excludes user files before the isolated Worktree is created.
|
|
37
|
-
- **Carry project Skills**: the first Worktree and each next iteration receive one snapshot of `.dsh/skills`, `.agents/skills`, and `.claude/skills`, while auxiliary files stay separate from Git delivery.
|
|
38
|
-
- **Continue in the same conversation**: after delivery, begin another task without opening a new conversation.
|
|
39
|
-
|
|
40
|
-
> The current version manages Git Worktrees within one project. It does not yet provide a global cross-project manager.
|
|
41
|
-
|
|
42
|
-
## Workflow
|
|
43
|
-
|
|
44
|
-
```mermaid
|
|
45
|
-
flowchart LR
|
|
46
|
-
A[Current project] -->|Create isolated task| B[Independent Git Worktree]
|
|
47
|
-
B --> C[Agent edits and tests]
|
|
48
|
-
C --> D[Review the result]
|
|
49
|
-
D -->|Preview changes| E[Inspect them in the current project]
|
|
50
|
-
E -->|Confirm and save| F[Create the task commit]
|
|
51
|
-
F --> G[Continue in the same conversation]
|
|
52
|
-
|
|
53
|
-
D -.->|Save current progress| H[Keep developing]
|
|
54
|
-
E -.->|Undo this preview| I[Return for changes]
|
|
55
|
-
D -.->|Skip preview| F
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
### Which action should I choose?
|
|
59
|
-
|
|
60
|
-
| Goal | Action |
|
|
61
|
-
| --- | --- |
|
|
62
|
-
| Inspect the result in the current project | **Preview changes** |
|
|
63
|
-
| The preview looks correct | **Confirm and save** |
|
|
64
|
-
| Preserve progress during a long task | **Save checkpoint and continue** |
|
|
65
|
-
| Ask the agent for more edits | **Continue editing** or **Undo this preview** |
|
|
66
|
-
| Save without inspecting it first | **Skip preview and save** |
|
|
67
|
-
|
|
68
|
-
See the [full usage guide](docs/USAGE.en.md) for detailed actions, recovery scenarios, and commands.
|
|
69
|
-
|
|
70
|
-
## Quick start
|
|
71
|
-
|
|
72
|
-
### Requirements
|
|
73
|
-
|
|
74
|
-
- Node.js `^22.19.0 || >=24.0.0`
|
|
75
|
-
- DeepSeek Harness: `0.1.2-rc.1` is the development validation baseline; `0.1.5-rc.1` is user-reported working and partially verified in isolation. See the [compatibility matrix and limitations](docs/COMPATIBILITY.md#english); the newest Host is not mandatory.
|
|
76
|
-
- Harness Web Client
|
|
77
|
-
- A Git Workspace
|
|
78
|
-
|
|
79
|
-
Before upgrading an existing Harness installation, handle Host data migration: `0.1.2-rc.1` removes the optional SQLite Session backend, so use an older Harness version to export that data first. Code Mode is now named PTC mode, while existing conversation records remain readable. Launch applications and install this plugin through a `dsh` Profile.
|
|
80
|
-
|
|
81
|
-
After upgrading Harness from an earlier release, if the web UI shows **Failed to load plugins**, choose a fixed version from the [compatibility matrix](docs/COMPATIBILITY.md#english) and restart Harness; the example below uses
|
|
82
|
-
|
|
83
|
-
```bash
|
|
84
|
-
dsh plugin --profile web add dsh-git-worktree@0.9.2
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
### Install
|
|
88
|
-
|
|
89
|
-
```bash
|
|
90
|
-
dsh plugin --profile web add dsh-git-worktree
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
Or install a specific version:
|
|
94
|
-
|
|
95
|
-
```bash
|
|
96
|
-
dsh plugin --profile web add github:wloops/dsh-git-worktree#v0.9.2
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
Open a Git Workspace and enable **Worktree** when creating a Session. An existing Local Session can also let the model call `worktree_create`.
|
|
100
|
-
|
|
101
|
-
For the first run, complete one full create → Preview changes → Confirm and save → cleanup cycle.
|
|
102
|
-
|
|
103
|
-
If pnpm build approval blocks a Git-source install, or you need complete commands and troubleshooting, see [Installation and troubleshooting](docs/USAGE.en.md#installation-and-troubleshooting).
|
|
104
|
-
|
|
105
|
-
## Screenshots
|
|
106
|
-
|
|
107
|
-
### Project grouping and task status
|
|
108
|
-
|
|
109
|
-

|
|
110
|
-
|
|
111
|
-
### Prepare the review
|
|
112
|
-
|
|
113
|
-

|
|
114
|
-
|
|
115
|
-
See the [full usage guide](docs/USAGE.en.md#complete-delivery-example) for the complete flow.
|
|
116
|
-
|
|
117
|
-
## Safety boundary
|
|
118
|
-
|
|
119
|
-
Before writing task changes back to the current project, the plugin checks again that the task version, project location, and file state still match the review. If you switched branches, changes conflict, or a previous operation was interrupted, it stops and preserves the working state instead of guessing and overwriting files.
|
|
120
|
-
|
|
121
|
-
Worktree separation is designed to prevent tasks from accidentally changing one another's files. It is not a system sandbox for running untrusted code.
|
|
122
|
-
|
|
123
|
-
For the detailed state checks and recovery rules, see:
|
|
124
|
-
|
|
125
|
-
- [Worktree Console architecture](docs/WORKTREE-CONSOLE-ARCHITECTURE.md)
|
|
126
|
-
- [Session Target porting notes](docs/PORTING.md)
|
|
127
|
-
|
|
128
|
-
## Current limitations
|
|
129
|
-
|
|
130
|
-
- A task is grouped under its original project only when that relationship is clear. Uncertain tasks remain in their original location so they are never hidden.
|
|
131
|
-
- Isolated tasks can be renamed and archived, but a new task cannot yet be forked directly from the task conversation.
|
|
132
|
-
- Child agents share the parent task's working directory; a separate Worktree is not created for every child agent.
|
|
133
|
-
- Saved stage records cannot yet be edited, deleted, reordered, or rolled back to an arbitrary stage.
|
|
134
|
-
- The broader cross-project management, direct repair of the current project, dependency reuse, and collaboration handoff features in [Domi](https://github.com/restflux/domi) are outside this plugin's current scope.
|
|
135
|
-
|
|
136
|
-
## Local development
|
|
137
|
-
|
|
138
|
-
```bash
|
|
139
|
-
pnpm install
|
|
140
|
-
pnpm run typecheck
|
|
141
|
-
pnpm test
|
|
142
|
-
pnpm run build
|
|
143
|
-
pnpm run check:publish
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
Run the local end-to-end environment:
|
|
147
|
-
|
|
148
|
-
```bash
|
|
149
|
-
pnpm run dev:dsh
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
See the [full usage guide](docs/USAGE.en.md#local-development) for more development commands and the [release checklist](docs/RELEASE.md) before publishing.
|
|
153
|
-
|
|
154
|
-
## Documentation
|
|
155
|
-
|
|
156
|
-
- [Full usage guide](docs/USAGE.en.md)
|
|
157
|
-
- [Worktree Console architecture](docs/WORKTREE-CONSOLE-ARCHITECTURE.md)
|
|
158
|
-
- [Session Target porting notes](docs/PORTING.md)
|
|
159
|
-
- [UI development notes](docs/UI-DEVELOPMENT.md)
|
|
160
|
-
- [Release checklist](docs/RELEASE.md)
|
|
161
|
-
- [Changelog](CHANGELOG.md)
|
|
162
|
-
|
|
163
|
-
## License
|
|
164
|
-
|
|
165
|
-
[MIT](LICENSE)
|
|
166
|
-
|
|
167
|
-
## Language
|
|
168
|
-
|
|
169
|
-
The plugin follows DSH’s language selection without a separate switch. Explicitly select English in DSH to use English in the UI, tools, and `/worktree` messages. If automatic browser detection has not produced a saved DSH preference, tools and commands fall back to Chinese. See [language transport and translation contributions](docs/i18n.md).
|
|
1
|
+
# dsh-git-worktree
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/dsh-git-worktree)
|
|
4
|
+
[](https://www.npmjs.com/package/dsh-git-worktree)
|
|
5
|
+
[](https://github.com/wloops/dsh-git-worktree/actions/workflows/ci.yml)
|
|
6
|
+
[](LICENSE)
|
|
7
|
+
|
|
8
|
+
**Let agents complete tasks in independent Git Worktrees, then review the changes before deciding whether to save them.**
|
|
9
|
+
|
|
10
|
+
`dsh-git-worktree` is a Git Worktree plugin for [DeepSeek Harness](https://github.com/deepseek-ai/DeepSeek-Harness). It creates a separate Worktree (working directory) for every coding task, so the agent does not directly edit the project you are using. When the task is complete, you can preview the result and then save it, send it back for changes, or discard it.
|
|
11
|
+
|
|
12
|
+
This Git Worktree workflow originated in [Domi](https://github.com/restflux/domi), an open-source desktop coding workbench powered by the Pi Agent Runtime. This plugin is independently adapted for DeepSeek Harness and can be installed and used on its own.
|
|
13
|
+
|
|
14
|
+
[中文](README.md) · [Full usage guide](docs/USAGE.en.md) · [Architecture](docs/WORKTREE-CONSOLE-ARCHITECTURE.md)
|
|
15
|
+
|
|
16
|
+
## Why use it?
|
|
17
|
+
|
|
18
|
+
When an agent edits the current project directly, its changes can mix with your unfinished work. Running multiple tasks at once can also make them interfere with one another. With this plugin:
|
|
19
|
+
|
|
20
|
+
- every task is edited and tested in its own Git Worktree (an independent working directory);
|
|
21
|
+
- multiple tasks can run at the same time without sharing one working directory;
|
|
22
|
+
- when the agent finishes, you can temporarily show the changes in the current project and inspect them;
|
|
23
|
+
- changes are saved only after confirmation, and conflicts never overwrite your work automatically.
|
|
24
|
+
|
|
25
|
+
## Highlights
|
|
26
|
+
|
|
27
|
+
- **Git Worktree isolation**: every task gets its own working directory and its own agent conversation.
|
|
28
|
+
- **Run multiple Worktrees**: develop several tasks in parallel; to avoid mixing changes, review one task at a time per project.
|
|
29
|
+
- **Preview before committing**: inspect the real result in the current project without immediately creating a Git commit.
|
|
30
|
+
- **Send it back safely**: undo the current preview and ask the agent for more changes without disturbing unrelated local work.
|
|
31
|
+
- **Save only this task**: confirmation commits only the current task instead of pulling unrelated changes into it.
|
|
32
|
+
- **Preserve progress on long tasks**: save the current stage and keep developing; the stages still become one final delivery.
|
|
33
|
+
- **Protect the working state**: branch changes, conflicts, and interrupted operations stop safely and leave the state available for recovery.
|
|
34
|
+
- **See related tasks together**: current and historical Worktrees are grouped under their Host-provided project navigation owner; ambiguous tasks conservatively remain where they are.
|
|
35
|
+
- **Inspect review details in one place**: open a read-only view from the review bar for changed files, validation records, and version details without searching tool messages.
|
|
36
|
+
- **Start safely from an empty repository**: after explicit confirmation, an unborn repository can receive an empty initial commit that excludes user files before the isolated Worktree is created.
|
|
37
|
+
- **Carry project Skills**: the first Worktree and each next iteration receive one snapshot of `.dsh/skills`, `.agents/skills`, and `.claude/skills`, while auxiliary files stay separate from Git delivery.
|
|
38
|
+
- **Continue in the same conversation**: after delivery, begin another task without opening a new conversation.
|
|
39
|
+
|
|
40
|
+
> The current version manages Git Worktrees within one project. It does not yet provide a global cross-project manager.
|
|
41
|
+
|
|
42
|
+
## Workflow
|
|
43
|
+
|
|
44
|
+
```mermaid
|
|
45
|
+
flowchart LR
|
|
46
|
+
A[Current project] -->|Create isolated task| B[Independent Git Worktree]
|
|
47
|
+
B --> C[Agent edits and tests]
|
|
48
|
+
C --> D[Review the result]
|
|
49
|
+
D -->|Preview changes| E[Inspect them in the current project]
|
|
50
|
+
E -->|Confirm and save| F[Create the task commit]
|
|
51
|
+
F --> G[Continue in the same conversation]
|
|
52
|
+
|
|
53
|
+
D -.->|Save current progress| H[Keep developing]
|
|
54
|
+
E -.->|Undo this preview| I[Return for changes]
|
|
55
|
+
D -.->|Skip preview| F
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Which action should I choose?
|
|
59
|
+
|
|
60
|
+
| Goal | Action |
|
|
61
|
+
| --- | --- |
|
|
62
|
+
| Inspect the result in the current project | **Preview changes** |
|
|
63
|
+
| The preview looks correct | **Confirm and save** |
|
|
64
|
+
| Preserve progress during a long task | **Save checkpoint and continue** |
|
|
65
|
+
| Ask the agent for more edits | **Continue editing** or **Undo this preview** |
|
|
66
|
+
| Save without inspecting it first | **Skip preview and save** |
|
|
67
|
+
|
|
68
|
+
See the [full usage guide](docs/USAGE.en.md) for detailed actions, recovery scenarios, and commands.
|
|
69
|
+
|
|
70
|
+
## Quick start
|
|
71
|
+
|
|
72
|
+
### Requirements
|
|
73
|
+
|
|
74
|
+
- Node.js `^22.19.0 || >=24.0.0`
|
|
75
|
+
- DeepSeek Harness: `0.1.2-rc.1` is the development validation baseline; `0.1.5-rc.1` is user-reported working and partially verified in isolation. See the [compatibility matrix and limitations](docs/COMPATIBILITY.md#english); the newest Host is not mandatory.
|
|
76
|
+
- Harness Web Client
|
|
77
|
+
- A Git Workspace
|
|
78
|
+
|
|
79
|
+
Before upgrading an existing Harness installation, handle Host data migration: `0.1.2-rc.1` removes the optional SQLite Session backend, so use an older Harness version to export that data first. Code Mode is now named PTC mode, while existing conversation records remain readable. Launch applications and install this plugin through a `dsh` Profile.
|
|
80
|
+
|
|
81
|
+
After upgrading Harness from an earlier release, if the web UI shows **Failed to load plugins**, choose a fixed version from the [compatibility matrix](docs/COMPATIBILITY.md#english) and restart Harness; the example below uses `0.9.2`. Releases through `0.7.2` depend on the discontinued `dsh-client-runtime`; `0.7.3` can also form a `conversation` / `uiWorkspace` activation cycle in the rc.1 Web Client.
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
dsh plugin --profile web add dsh-git-worktree@0.9.2
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Install
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
dsh plugin --profile web add dsh-git-worktree
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Or install a specific version:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
dsh plugin --profile web add github:wloops/dsh-git-worktree#v0.9.2
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Open a Git Workspace and enable **Worktree** when creating a Session. An existing Local Session can also let the model call `worktree_create`.
|
|
100
|
+
|
|
101
|
+
For the first run, complete one full create → Preview changes → Confirm and save → cleanup cycle.
|
|
102
|
+
|
|
103
|
+
If pnpm build approval blocks a Git-source install, or you need complete commands and troubleshooting, see [Installation and troubleshooting](docs/USAGE.en.md#installation-and-troubleshooting).
|
|
104
|
+
|
|
105
|
+
## Screenshots
|
|
106
|
+
|
|
107
|
+
### Project grouping and task status
|
|
108
|
+
|
|
109
|
+

|
|
110
|
+
|
|
111
|
+
### Prepare the review
|
|
112
|
+
|
|
113
|
+

|
|
114
|
+
|
|
115
|
+
See the [full usage guide](docs/USAGE.en.md#complete-delivery-example) for the complete flow.
|
|
116
|
+
|
|
117
|
+
## Safety boundary
|
|
118
|
+
|
|
119
|
+
Before writing task changes back to the current project, the plugin checks again that the task version, project location, and file state still match the review. If you switched branches, changes conflict, or a previous operation was interrupted, it stops and preserves the working state instead of guessing and overwriting files.
|
|
120
|
+
|
|
121
|
+
Worktree separation is designed to prevent tasks from accidentally changing one another's files. It is not a system sandbox for running untrusted code.
|
|
122
|
+
|
|
123
|
+
For the detailed state checks and recovery rules, see:
|
|
124
|
+
|
|
125
|
+
- [Worktree Console architecture](docs/WORKTREE-CONSOLE-ARCHITECTURE.md)
|
|
126
|
+
- [Session Target porting notes](docs/PORTING.md)
|
|
127
|
+
|
|
128
|
+
## Current limitations
|
|
129
|
+
|
|
130
|
+
- A task is grouped under its original project only when that relationship is clear. Uncertain tasks remain in their original location so they are never hidden.
|
|
131
|
+
- Isolated tasks can be renamed and archived, but a new task cannot yet be forked directly from the task conversation.
|
|
132
|
+
- Child agents share the parent task's working directory; a separate Worktree is not created for every child agent.
|
|
133
|
+
- Saved stage records cannot yet be edited, deleted, reordered, or rolled back to an arbitrary stage.
|
|
134
|
+
- The broader cross-project management, direct repair of the current project, dependency reuse, and collaboration handoff features in [Domi](https://github.com/restflux/domi) are outside this plugin's current scope.
|
|
135
|
+
|
|
136
|
+
## Local development
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
pnpm install
|
|
140
|
+
pnpm run typecheck
|
|
141
|
+
pnpm test
|
|
142
|
+
pnpm run build
|
|
143
|
+
pnpm run check:publish
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
Run the local end-to-end environment:
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
pnpm run dev:dsh
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
See the [full usage guide](docs/USAGE.en.md#local-development) for more development commands and the [release checklist](docs/RELEASE.md) before publishing.
|
|
153
|
+
|
|
154
|
+
## Documentation
|
|
155
|
+
|
|
156
|
+
- [Full usage guide](docs/USAGE.en.md)
|
|
157
|
+
- [Worktree Console architecture](docs/WORKTREE-CONSOLE-ARCHITECTURE.md)
|
|
158
|
+
- [Session Target porting notes](docs/PORTING.md)
|
|
159
|
+
- [UI development notes](docs/UI-DEVELOPMENT.md)
|
|
160
|
+
- [Release checklist](docs/RELEASE.md)
|
|
161
|
+
- [Changelog](CHANGELOG.md)
|
|
162
|
+
|
|
163
|
+
## License
|
|
164
|
+
|
|
165
|
+
[MIT](LICENSE)
|
|
166
|
+
|
|
167
|
+
## Language
|
|
168
|
+
|
|
169
|
+
The plugin follows DSH’s language selection without a separate switch. Explicitly select English in DSH to use English in the UI, tools, and `/worktree` messages. If automatic browser detection has not produced a saved DSH preference, tools and commands fall back to Chinese. See [language transport and translation contributions](docs/i18n.md).
|