dsh-git-worktree 0.2.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/CHANGELOG.md +52 -2
  2. package/README.en.md +334 -0
  3. package/README.md +300 -65
  4. package/lib/adapters/lookup.d.ts +4 -2
  5. package/lib/adapters/lookup.js +31 -3
  6. package/lib/adapters/lookup.js.map +1 -1
  7. package/lib/adapters/registry.js +1 -0
  8. package/lib/adapters/registry.js.map +1 -1
  9. package/lib/client/console-remote/adapter.js +2 -0
  10. package/lib/client/console-remote/adapter.js.map +1 -1
  11. package/lib/client/review-console/ReviewActions.js +20 -5
  12. package/lib/client/review-console/ReviewActions.js.map +1 -1
  13. package/lib/client/review-console/review-console.styles.js +2 -1
  14. package/lib/client/review-console/review-console.styles.js.map +1 -1
  15. package/lib/client/styles.js +1 -0
  16. package/lib/client/styles.js.map +1 -1
  17. package/lib/client/target-console/WorktreeReviewStatus.js +34 -0
  18. package/lib/client/target-console/WorktreeReviewStatus.js.map +1 -1
  19. package/lib/client.js +100 -9
  20. package/lib/commands.js +17 -2
  21. package/lib/commands.js.map +1 -1
  22. package/lib/console-contract.d.ts +17 -0
  23. package/lib/console-contract.js.map +1 -1
  24. package/lib/console-host/control-plane.d.ts +3 -1
  25. package/lib/console-host/control-plane.js +65 -6
  26. package/lib/console-host/control-plane.js.map +1 -1
  27. package/lib/console-host/projection.js +5 -0
  28. package/lib/console-host/projection.js.map +1 -1
  29. package/lib/console-host/service.d.ts +2 -0
  30. package/lib/console-host/service.js +12 -0
  31. package/lib/console-host/service.js.map +1 -1
  32. package/lib/console-remote/descriptors.js +9 -0
  33. package/lib/console-remote/descriptors.js.map +1 -1
  34. package/lib/console-remote/remote.d.ts +2 -0
  35. package/lib/console-remote/schemas.js +2 -0
  36. package/lib/console-remote/schemas.js.map +1 -1
  37. package/lib/index.d.ts +4 -2
  38. package/lib/index.js.map +1 -1
  39. package/lib/ports.d.ts +2 -0
  40. package/lib/session-checkout-module.js +250 -8
  41. package/lib/session-checkout-module.js.map +1 -1
  42. package/lib/tools.d.ts +2 -1
  43. package/lib/tools.js +80 -1
  44. package/lib/tools.js.map +1 -1
  45. package/package.json +1 -1
  46. package/scripts/check-publish.mjs +1 -1
  47. package/scripts/dev-dsh-lib.mjs +83 -27
  48. package/scripts/dev-dsh.mjs +18 -12
  49. package/README.zh.md +0 -115
package/CHANGELOG.md CHANGED
@@ -2,6 +2,54 @@
2
2
 
3
3
  本项目的显著变更记录在此文件中。版本号遵循 Semantic Versioning;在 `0.x` 阶段,minor 版本可能包含需要迁移的公开能力调整。
4
4
 
5
+ ## [0.3.1] - 2026-08-18
6
+
7
+ `0.3.1` 修复验收卡操作菜单被卡片裁剪的问题,并将项目文档重组为中文优先、带完整产品流程截图的发布入口。
8
+
9
+ ### Fixed
10
+
11
+ - Ready for Review Tool 卡片允许操作菜单溢出显示,避免菜单被卡片边界裁剪。
12
+ - 验收卡菜单改为向下展开,composer dock 中的同类菜单继续向上展开,并增加对应 CSS 回归测试。
13
+
14
+ ### Changed
15
+
16
+ - 中文 README 成为默认入口,英文文档迁移到 `README.en.md`。
17
+ - 重写 Worktree 产品文档、迁移说明与架构入口,补充创建、Ready、Local Preview、提交、保留环境和下一轮修改的产品截图。
18
+ - 本地 DSH 开发 tarball staging 同步包含 `README.en.md`。
19
+
20
+ ## [0.3.0] - 2026-08-17
21
+
22
+ `0.3.0` 完善同一 isolated Session 的连续修改体验:未同步 Review 可以安全恢复编辑,成功交付并 cleanup 后也能保留 Session ID、immutable cwd 与完整对话开始下一轮。
23
+
24
+ ### Added
25
+
26
+ - cleanup 后在原 isolated Session 中开始 iteration + 1;新 checkout 从最新 Local HEAD 创建,并通过 `predecessorCheckoutId` 保留上一轮交付记录与迭代血缘。
27
+ - delivered composer dock 增加“开始下一轮修改”,模型增加 `worktree_begin_next_iteration`,人工命令增加 `/worktree next`。
28
+ - Host、strict Typert Remote、Client Adapter 与 Console Contract 增加 `beginNextIteration`;Remote 方法总数由 13 个增加到 14 个。
29
+ - cleanup 后 Harness 过滤缺失 cwd 的 Session 时,lookup adapter 可通过当前 live Session 的 immutable header cwd 恢复精确且唯一的 Workspace 身份。
30
+ - 新增 `worktree_resume_revision`、`/worktree continue` 与 Ready 更多菜单“继续修改”,在不写入 Local 的情况下使未同步 Review 失效并恢复同一 iteration。
31
+ - Worktree Console Contract、Host、strict Typert Remote 与 Client Adapter 增加 `resumeRevision`;Remote 方法总数由 14 个增加到 15 个。
32
+
33
+ ### Fixed
34
+
35
+ - 修复 `worktree_ready_for_review` 输出 Schema,使其符合 Harness 工具结果契约。
36
+ - 发布产物门禁同步校验新增的 `beginNextIteration` 与 `resumeRevision` Remote 方法。
37
+ - 完善并稳定本地开发 Harness 的源码预览、验收输出提取、命令失败诊断与跨平台路径处理。
38
+
39
+ ### Safety
40
+
41
+ - 下一轮仅允许已成功清理的 delivered owner,并校验 caller、Workspace、revision、Local Git common dir、managed path 与 predecessor lineage。
42
+ - 如果上一轮 managed path 已重新出现或包含未知内容,拒绝覆盖;retained、cleanup-pending 与 recovery 状态必须先完成清理或恢复。
43
+ - 创建中断且尚未形成 Worktree 时,reconcile 恢复 predecessor binding;存在无法确认的残留时进入 recovery 并保留现场。
44
+ - live Session cwd fallback 对 cold、无 cwd、路径不匹配或歧义映射继续 fail closed。
45
+ - resume-revision 严格校验 live owner Session、expected revision、expected review ID、Workspace/checkout 身份;转换只更新 registry delivery state,不修改 Local、Worktree bytes 或 Git refs。
46
+
47
+ ### Changed
48
+
49
+ - Ready for Review 不再阻断普通对话:讨论类 follow-up 保持当前 Review;新的代码或文件修改由模型自动恢复 Working,不要求用户先同步或点击恢复编辑。
50
+ - 重写中英文 README,补充当前 Session Target 流程、安全边界、命令、模型工具和已知限制。
51
+ - `SessionCheckoutModule.beginNextIteration` 现在要求调用方传入 `expectedRevision`,避免基于过期 delivered 状态创建下一轮。
52
+
5
53
  ## [0.2.0] - 2026-08-17
6
54
 
7
55
  `0.2.0` 将插件从单一 Worktree 管理器升级为 DeepSeek Harness 中完整、可验收、可撤回的 Worktree Session Target。
@@ -14,7 +62,7 @@
14
62
  - Create/Ready ToolView;
15
63
  - Header Session Target 状态胶囊;
16
64
  - `conversation.input.dock` 的 Ready、Preview 与 Recovery 状态条。
17
- - Domi 式交付生命周期:
65
+ - 两阶段验收交付生命周期:
18
66
  - Ready for Review;
19
67
  - 不提交、可撤回的 Local Preview;
20
68
  - Preview 验收提交;
@@ -53,7 +101,9 @@
53
101
 
54
102
  ## [0.1.2] - 2026-07-28
55
103
 
56
- - 发布初版 Domi-grade Worktree 管理、基础 apply/finish/discard 生命周期和安全清理。
104
+ - 发布初版生产级 Worktree 管理、基础 apply/finish/discard 生命周期和安全清理。
57
105
 
106
+ [0.3.1]: https://github.com/wloops/dsh-git-worktree/compare/v0.3.0...v0.3.1
107
+ [0.3.0]: https://github.com/wloops/dsh-git-worktree/compare/v0.2.0...v0.3.0
58
108
  [0.2.0]: https://github.com/wloops/dsh-git-worktree/compare/v0.1.2...v0.2.0
59
109
  [0.1.2]: https://github.com/wloops/dsh-git-worktree/releases/tag/v0.1.2
package/README.en.md ADDED
@@ -0,0 +1,334 @@
1
+ # dsh-git-worktree
2
+
3
+ [![npm](https://img.shields.io/npm/v/dsh-git-worktree)](https://www.npmjs.com/package/dsh-git-worktree)
4
+ [![CI](https://github.com/wloops/dsh-git-worktree/actions/workflows/ci.yml/badge.svg)](https://github.com/wloops/dsh-git-worktree/actions/workflows/ci.yml)
5
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
6
+
7
+ **Let agents work in real Git worktrees, preview the result in Local, and commit only after explicit human approval.**
8
+
9
+ `dsh-git-worktree` is an experimental Session Target plugin for [DeepSeek Harness](https://github.com/deepseek-ai/DeepSeek-Harness). Each coding task runs in its own checkout and Session, so the Local workspace controlled by the user does not become the agent's construction site.
10
+
11
+ This is more than a wrapper around `git worktree`. It provides a complete delivery lifecycle: create an isolated environment, iterate safely, prepare a review, preview the task in Local without committing, finalize one task-only commit, and preserve recovery evidence when safety cannot be proven.
12
+
13
+ > Its Worktree safety foundation originates from workflows used in the author's internal desktop project **Domi**. This plugin is independently adapted for Harness and does not require Domi to install or run.
14
+
15
+ [中文文档](README.md)
16
+
17
+ ## What problem does it solve?
18
+
19
+ When an agent edits the current working tree directly, several concerns become entangled:
20
+
21
+ - task changes mix with existing staged, unstaged, and untracked Local state;
22
+ - multiple agent tasks sharing one checkout can overwrite files, switch branches, or contaminate each other's commit boundaries;
23
+ - multiple tasks writing results into Local at the same time can interfere with Preview, conflict handling, and cleanup;
24
+ - it becomes difficult to tell which bytes belong to the current task;
25
+ - “show me the result” may already mean an irreversible write into Local;
26
+ - commit, cleanup, and recovery decisions may depend too heavily on model judgment;
27
+ - starting another coding round often means losing the original conversation or rebuilding its context.
28
+
29
+ This plugin separates a coding task into two explicit boundaries:
30
+
31
+ 1. **The agent implements and validates in an Isolated Worktree.**
32
+ 2. **The user reviews the result in Local and decides whether to commit it.**
33
+
34
+ ## Highlights
35
+
36
+ - **Real isolation** — every task gets a distinct Git worktree, Harness Workspace, cwd, and Session ID.
37
+ - **Human-gated delivery** — the model may prepare a review, but it cannot Preview, Commit, Discard, or delete the Worktree by itself.
38
+ - **Reversible Local Preview** — inspect the task in Local without creating a commit, then accept it or remove only that Preview.
39
+ - **Local state preservation** — existing staged, unstaged, and untracked Local changes are not automatically folded into the task commit.
40
+ - **Parallel preparation, serialized acceptance** — multiple Isolated Worktrees may prepare tasks concurrently, while one active Preview per Local project prevents review drafts from being written over each other.
41
+ - **Stop on conflict instead of overwriting** — overlapping changes, Local drift, branch movement, or an inseparable delta enters conflict/recovery rather than silently choosing one side.
42
+ - **Task-only commit** — acceptance creates one commit for the isolated task while preserving separable Local work.
43
+ - **Continuous Session iterations** — after delivery and cleanup, iteration + 1 can start in the same Session with the full conversation intact.
44
+ - **Review-to-edit recovery** — an unsynced review does not block discussion; a later file change safely resumes the current iteration first.
45
+ - **Fail-closed recovery** — stale reviews, Local drift, branch changes, concurrent Previews, and uncertain cleanup stop instead of overwriting data.
46
+
47
+ > The current scope is a project-scoped Worktree Session workflow, not a cross-project global Worktree Manager. The project is still experimental; use it first in Git repositories that you can recover independently.
48
+
49
+ ### Parallel tasks and conflict boundaries
50
+
51
+ Multiple tasks can edit, test, and prepare reviews concurrently in separate Worktrees, Workspaces, and Sessions without sharing one checkout. Local acceptance is deliberately serialized: one canonical Local project has one acceptance slot. Until the active Preview is committed or rolled back, another task receives `project_acceptance_busy` instead of layering another write into Local.
52
+
53
+ “Parallel tasks” does not mean “automatically merge every conflict.” If a task overlaps Local changes, its review becomes stale, the branch moves non-fast-forward, or the Host cannot prove that Rollback/Finalize will preserve unrelated work, the operation stops and retains recovery evidence for the user to resolve.
54
+
55
+ ## Workflow
56
+
57
+ ```text
58
+ Local Session
59
+ │
60
+ ├─ Create isolated Worktree Session
61
+ ▼
62
+ Agent edits and validates in the Worktree
63
+ │
64
+ ├─ worktree_ready_for_review
65
+ ▼
66
+ Ready for Review
67
+ │
68
+ ├─ Sync to Local Preview ── Accept and commit
69
+ │ └─ Roll back and continue editing
70
+ ├─ Skip Preview and commit directly
71
+ └─ Discard
72
+ │
73
+ └─ After cleanup: start iteration + 1 in the same Session
74
+ ```
75
+
76
+ ### 1. Create an isolated Session
77
+
78
+ In a blank/new Local Session, enable **Worktree** and confirm creation. Nothing is created before confirmation. After confirmation, the unsent text and image draft is transferred to the new isolated Session.
79
+
80
+ An existing Local Session may also ask the model to call `worktree_create`. The source Session remains Local and is never silently switched to another cwd.
81
+
82
+ ### 2. Work inside the Worktree
83
+
84
+ The agent reads, edits, and validates only inside the isolated cwd. That cwd is a real Git worktree and is registered as a Harness Workspace, so Harness Workspace and Session boundaries remain authoritative.
85
+
86
+ ### 3. Prepare the review
87
+
88
+ When implementation and validation are complete, the agent calls `worktree_ready_for_review` with:
89
+
90
+ - a change summary;
91
+ - changed files;
92
+ - validation status and test commands;
93
+ - a suggested commit message.
94
+
95
+ This stores a review report. It does not write to Local and does not create a commit.
96
+
97
+ ### 4. Choose how to deliver
98
+
99
+ The user can then:
100
+
101
+ - **Sync to Local for review** — create an uncommitted, reversible Preview;
102
+ - **Accept and commit** — commit only the task delta;
103
+ - **Roll back and continue editing** — remove the Preview and return to the Worktree;
104
+ - **Skip review and commit directly** — use the guarded direct-delivery path after explicit confirmation;
105
+ - **Discard** — clean up the task environment when all safety conditions pass.
106
+
107
+ ### 5. Start the next round in the same conversation
108
+
109
+ After a successful commit and cleanup, the current Worktree cwd is removed, but the Session and conversation remain. When the user requests more code or file changes, the plugin can recreate the immutable cwd from the latest Local HEAD and start the next iteration safely.
110
+
111
+ Retained, cleanup-pending, and recovery states are never removed silently. They must be handled before another iteration can begin.
112
+
113
+ ## Screenshots
114
+
115
+ The following screenshots show the primary delivery flow in the order a task normally follows it.
116
+
117
+ ### Create a Worktree Session
118
+
119
+ After Worktree is enabled in a new Local Session, Harness explains the Session-switch boundary. The isolated Session is created and selected only after explicit confirmation.
120
+
121
+ ![Confirm creation and switch to a Worktree Session](docs/screenshots/01-create-worktree.png)
122
+
123
+ ### Prepare the review
124
+
125
+ When implementation and validation finish, the agent prepares a Ready for Review report. The user can inspect the summary and validation evidence before syncing anything to Local.
126
+
127
+ ![Worktree changes ready for review](docs/screenshots/02-ready-for-review.png)
128
+
129
+ ### Review the Local Preview
130
+
131
+ After synchronization, the task delta waits in Local as a reversible Preview. The user can commit it, roll it back and continue editing, or discard the task.
132
+
133
+ ![Task changes waiting for acceptance in Local Preview](docs/screenshots/03-local-preview.png)
134
+
135
+ ### Confirm the commit and choose retention
136
+
137
+ The default path confirms the Commit Message and cleans up the Worktree after submission. When further investigation is useful, the frozen runtime environment can instead be retained for the selected period.
138
+
139
+ | Commit and clean up | Commit and retain the runtime environment |
140
+ | --- | --- |
141
+ | ![Confirm the task-only commit and clean up the Worktree](docs/screenshots/04-commit-confirmation.png) | ![Confirm the task-only commit and retain the runtime environment](docs/screenshots/06-retain-environment.png) |
142
+
143
+ ### Start the next iteration in the same Session
144
+
145
+ After delivery and cleanup succeed, the conversation remains available and can begin another iteration from the latest Local HEAD.
146
+
147
+ ![Delivered Session ready to start the next iteration](docs/screenshots/05-next-iteration.png)
148
+
149
+ ## Design foundation and Harness adaptation
150
+
151
+ The Worktree lifecycle and Git delivery engine are adapted from a mature desktop implementation that has been exercised in real workflows. The goal is not to copy its UI, but to preserve proven safety invariants:
152
+
153
+ - managed checkout registry and revision CAS;
154
+ - canonical path, Git common-dir, and git-dir identity checks;
155
+ - complete fingerprints for staged, unstaged, untracked, binary, and deleted files;
156
+ - receipt-first Local Preview, Rollback, and Finalize;
157
+ - task-only commits that preserve unrelated Local work;
158
+ - internal refs, journal recovery, retention, quarantine, and conservative cleanup;
159
+ - fail closed whenever the Host cannot prove that a write is safe.
160
+
161
+ DeepSeek Harness has a different Host and Session model from the original desktop host, so the integration was adapted rather than copied mechanically:
162
+
163
+ - Harness Workspace and Session cwd are authoritative; the plugin registry is supporting state only;
164
+ - Host capabilities are exposed through strict Typert Remote, while browser UI uses public Harness Client Slots;
165
+ - Local source and Isolated target always use separate Sessions;
166
+ - cleanup does not mutate Harness's persisted Session cwd; the next iteration recreates the same path only after strict identity checks;
167
+ - the model creates targets, resumes editing, and prepares reviews, while user-controlled surfaces own Local writes, commits, and cleanup.
168
+
169
+ See [Session Target porting notes](docs/PORTING.md) for the detailed identity, state, and recovery boundary mapping.
170
+
171
+ ## Requirements
172
+
173
+ - Node.js 20 or newer;
174
+ - DeepSeek Harness `0.1.0-rc.6` package line;
175
+ - Harness Web Client for the complete Worktree creation and acceptance UI;
176
+ - a Git repository as the current Workspace.
177
+
178
+ ## Install
179
+
180
+ Install the npm package:
181
+
182
+ ```bash
183
+ dsh plugin --profile web add dsh-git-worktree
184
+ ```
185
+
186
+ Or install a specific Git tag:
187
+
188
+ ```bash
189
+ dsh plugin --profile web add github:wloops/dsh-git-worktree#v0.3.1
190
+ ```
191
+
192
+ With pnpm 10 or newer, a Git install may require this entry in the profile's `pnpm-workspace.yaml` before retrying:
193
+
194
+ ```yaml
195
+ allowBuilds:
196
+ dsh-git-worktree: true
197
+ ```
198
+
199
+ Start Harness normally after installation and open a Git repository as the Workspace.
200
+
201
+ ## Model tools and user controls
202
+
203
+ ### Model tools
204
+
205
+ | Tool | Purpose |
206
+ | --- | --- |
207
+ | `worktree_create` | Create a managed Worktree from a Local Session and reserve a distinct target Session |
208
+ | `worktree_list` | List Worktrees visible to the current Session in the original project |
209
+ | `worktree_resume_revision` | Invalidate an unsynced review and resume the current iteration without touching Local |
210
+ | `worktree_begin_next_iteration` | Recreate the Worktree cwd for a delivered and successfully cleaned Session |
211
+ | `worktree_ready_for_review` | Save the delivery report and stop for explicit human acceptance |
212
+
213
+ Finish, Discard, Remove, and Local Preview are not model tools. Ordinary discussion leaves a Ready review unchanged; only new code or file work needs to resume Working.
214
+
215
+ ### User controls
216
+
217
+ The Web UI provides the normal create, Preview, rollback, commit, retention, continue-editing, and discard actions. Equivalent Host-controlled operations are also available through `/worktree` commands:
218
+
219
+ ```text
220
+ /worktree status
221
+ /worktree list
222
+ /worktree continue
223
+ /worktree next
224
+ /worktree finalize [<reviewId> <revision>] [cleanup|retain_24h|retain_3d|retain_manual]
225
+ /worktree finish <commit message>
226
+ /worktree discard
227
+ /worktree remove <checkoutId>
228
+ ```
229
+
230
+ `finalize` uses the suggested commit message from the current review. `finish` is the explicit direct-commit path with a user-provided message.
231
+
232
+ ## Safety model
233
+
234
+ Every acceptance operation is revalidated by the Host. Browser display state and model-provided identity data are never treated as authority.
235
+
236
+ Important rules include:
237
+
238
+ - Local source and Isolated target use different Session IDs;
239
+ - an active target Workspace must canonicalize to the managed root recorded by the Host;
240
+ - one canonical Local project can have only one active Preview;
241
+ - Preview receipts and internal refs are persisted before Local writes;
242
+ - Preview, Rollback, Finalize, Discard, and resume-editing paths bind checkout, revision, review, and fingerprint identity;
243
+ - Rollback removes only the delta proven to belong to the Preview and preserves separable Local changes made during review;
244
+ - branch switches, non-fast-forward history, overlapping conflicts, committed Preview bytes, or additional drift enter recovery instead of being overwritten;
245
+ - cleanup verifies managed-path identity, Git metadata, and the final fingerprint; uncertain residue is retained or quarantined;
246
+ - historical records from the old irreversible Apply flow are not automatically finished or discarded.
247
+
248
+ See [Worktree Console architecture](docs/WORKTREE-CONSOLE-ARCHITECTURE.md) for the complete state model and authorization matrix.
249
+
250
+ ## Current limitations
251
+
252
+ - There is no cross-project global Worktree Manager yet.
253
+ - The project-scoped Worktree Console Host capabilities and components remain available, but the visible `conversation.view` tab is not mounted in `v0.3.1`.
254
+ - Workflow `agent({ isolation })` integration is not available in the verified Harness `0.1.0-rc.6` line.
255
+ - Subagents inherit their parent Session cwd; they share the isolated boundary only when the parent is already a Worktree Session.
256
+ - Dependency snapshot/restore and the complete collaborator handoff UI have not yet been implemented.
257
+ - A reviewed stage cannot yet be saved as an internal checkpoint before continuing development.
258
+ - An Isolated Session cannot yet request a bounded transaction to repair the real Local checkout directly.
259
+ - Cleanup removes the current Worktree cwd, but a delivered Session can recreate the path and start another iteration after strict validation.
260
+
261
+ ## Roadmap
262
+
263
+ The following items describe possible directions for continuing the project. They are not release-date commitments.
264
+
265
+ ### Near term
266
+
267
+ - Continue improving marketplace presentation and end-to-end examples.
268
+ - Continue hardening Ready, Preview, Rollback, Finalize, cleanup, and iteration recovery.
269
+ - Improve error categories, recovery guidance, and compatibility across real Harness releases.
270
+ - Re-evaluate mounting the project-scoped Worktree Console tab after the primary flow stabilizes.
271
+
272
+ ### Medium term
273
+
274
+ - Add “save stage and continue” so long tasks can record reviewed stages inside the isolated checkout, continue from a clean worktree, and retain stage history in final acceptance.
275
+ - Evaluate a bounded Local repair transaction: a user-approved temporary authorization tied to the current Local state, allowing an Isolated Session to repair Local through restricted tools without changing its Session Target, then automatically resume the original task.
276
+ - Port dependency snapshot/restore to reduce repeated setup across Worktrees.
277
+ - Complete the collaborator/subagent handoff lifecycle so delegated work can be released and delivered safely.
278
+ - Add richer project-scoped Worktree listing, inspection, retention, and cleanup management.
279
+ - Improve review presentation with clearer diff and validation information without weakening Host authority.
280
+
281
+ ### Long term
282
+
283
+ - Build a cross-project global Worktree Manager.
284
+ - Integrate Workflow-level `agent({ isolation })` when Harness exposes a stable seam.
285
+ - Add richer audit, runtime metrics, and recovery diagnostics.
286
+ - Explore richer multi-task orchestration, serialized acceptance, and cross-Session handoff while preserving explicit human approval for every Local write.
287
+
288
+ ## Local development
289
+
290
+ Install dependencies and run the standard checks:
291
+
292
+ ```bash
293
+ pnpm install
294
+ pnpm run typecheck
295
+ pnpm test
296
+ pnpm run build
297
+ pnpm run check:publish
298
+ ```
299
+
300
+ For an end-to-end local Harness run:
301
+
302
+ ```bash
303
+ pnpm run dev:dsh
304
+ ```
305
+
306
+ This command builds the current checkout, packs a temporary tarball, installs it into the `web` profile, validates the composed configuration, prepares a marker-protected disposable Git fixture, and starts `dsh web` at `http://127.0.0.1:3081` by default. It does not publish packages or push Git refs.
307
+
308
+ Useful variants:
309
+
310
+ ```bash
311
+ # Install and verify the snapshot without starting Web
312
+ pnpm run dev:dsh:install
313
+
314
+ # Verify the already-installed profile
315
+ pnpm run dev:dsh:smoke
316
+
317
+ # Select another Git root, port, profile, or Harness source checkout
318
+ pnpm run dev:dsh -- --repo G:/path/to/repo --port 4090 --profile web
319
+
320
+ # Remove the development install and cached local archives
321
+ pnpm run dev:dsh:remove
322
+ ```
323
+
324
+ ## Documentation
325
+
326
+ - [Session Target porting notes](docs/PORTING.md)
327
+ - [Worktree Console architecture](docs/WORKTREE-CONSOLE-ARCHITECTURE.md)
328
+ - [UI development notes](docs/UI-DEVELOPMENT.md)
329
+ - [Release checklist](docs/RELEASE.md)
330
+ - [Changelog](CHANGELOG.md)
331
+
332
+ ## License
333
+
334
+ [MIT](LICENSE)