dsh-git-worktree 0.1.2 → 0.3.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 +93 -0
- package/LICENSE +21 -21
- package/README.md +187 -43
- package/README.zh.md +187 -41
- package/cordis.patch.yml +7 -7
- package/lib/adapters/lookup.d.ts +4 -2
- package/lib/adapters/lookup.js +31 -3
- package/lib/adapters/lookup.js.map +1 -1
- package/lib/adapters/registry.js +41 -0
- package/lib/adapters/registry.js.map +1 -1
- package/lib/adapters/safe-file.js +34 -4
- package/lib/adapters/safe-file.js.map +1 -1
- package/lib/client/WorktreeCreateRow.d.ts +7 -0
- package/lib/client/WorktreeCreateRow.js +26 -0
- package/lib/client/WorktreeCreateRow.js.map +1 -0
- package/lib/client/WorktreeReviewRow.d.ts +11 -0
- package/lib/client/WorktreeReviewRow.js +67 -0
- package/lib/client/WorktreeReviewRow.js.map +1 -0
- package/lib/client/actions.d.ts +86 -0
- package/lib/client/actions.js +35 -0
- package/lib/client/actions.js.map +1 -0
- package/lib/client/console-remote/adapter.d.ts +3 -0
- package/lib/client/console-remote/adapter.js +61 -0
- package/lib/client/console-remote/adapter.js.map +1 -0
- package/lib/client/console-remote/index.d.ts +18 -0
- package/lib/client/console-remote/index.js +17 -0
- package/lib/client/console-remote/index.js.map +1 -0
- package/lib/client/index.d.ts +17 -0
- package/lib/client/index.js +44 -0
- package/lib/client/index.js.map +1 -0
- package/lib/client/model.d.ts +68 -0
- package/lib/client/model.js +127 -0
- package/lib/client/model.js.map +1 -0
- package/lib/client/pre-session/PreSessionWorktreeToggle.d.ts +16 -0
- package/lib/client/pre-session/PreSessionWorktreeToggle.js +128 -0
- package/lib/client/pre-session/PreSessionWorktreeToggle.js.map +1 -0
- package/lib/client/pre-session/controller.d.ts +42 -0
- package/lib/client/pre-session/controller.js +149 -0
- package/lib/client/pre-session/controller.js.map +1 -0
- package/lib/client/pre-session/index.d.ts +15 -0
- package/lib/client/pre-session/index.js +16 -0
- package/lib/client/pre-session/index.js.map +1 -0
- package/lib/client/review-console/ReviewActions.d.ts +15 -0
- package/lib/client/review-console/ReviewActions.js +234 -0
- package/lib/client/review-console/ReviewActions.js.map +1 -0
- package/lib/client/review-console/WorktreeReviewPanel.d.ts +20 -0
- package/lib/client/review-console/WorktreeReviewPanel.js +75 -0
- package/lib/client/review-console/WorktreeReviewPanel.js.map +1 -0
- package/lib/client/review-console/index.d.ts +8 -0
- package/lib/client/review-console/index.js +22 -0
- package/lib/client/review-console/index.js.map +1 -0
- package/lib/client/review-console/review-console.styles.d.ts +1 -0
- package/lib/client/review-console/review-console.styles.js +81 -0
- package/lib/client/review-console/review-console.styles.js.map +1 -0
- package/lib/client/review-console/status-events.d.ts +3 -0
- package/lib/client/review-console/status-events.js +6 -0
- package/lib/client/review-console/status-events.js.map +1 -0
- package/lib/client/styles.d.ts +1 -0
- package/lib/client/styles.js +78 -0
- package/lib/client/styles.js.map +1 -0
- package/lib/client/target-console/TargetStatusAction.d.ts +7 -0
- package/lib/client/target-console/TargetStatusAction.js +46 -0
- package/lib/client/target-console/TargetStatusAction.js.map +1 -0
- package/lib/client/target-console/WorktreeConsoleView.d.ts +9 -0
- package/lib/client/target-console/WorktreeConsoleView.js +362 -0
- package/lib/client/target-console/WorktreeConsoleView.js.map +1 -0
- package/lib/client/target-console/WorktreeReviewStatus.d.ts +9 -0
- package/lib/client/target-console/WorktreeReviewStatus.js +125 -0
- package/lib/client/target-console/WorktreeReviewStatus.js.map +1 -0
- package/lib/client/target-console/index.d.ts +14 -0
- package/lib/client/target-console/index.js +23 -0
- package/lib/client/target-console/index.js.map +1 -0
- package/lib/client/target-console/target-console.styles.d.ts +1 -0
- package/lib/client/target-console/target-console.styles.js +130 -0
- package/lib/client/target-console/target-console.styles.js.map +1 -0
- package/lib/client.js +6902 -0
- package/lib/commands.d.ts +2 -4
- package/lib/commands.js +69 -28
- package/lib/commands.js.map +1 -1
- package/lib/console-contract.d.ts +253 -0
- package/lib/console-contract.js +86 -0
- package/lib/console-contract.js.map +1 -0
- package/lib/console-host/control-plane.d.ts +31 -0
- package/lib/console-host/control-plane.js +502 -0
- package/lib/console-host/control-plane.js.map +1 -0
- package/lib/console-host/errors.d.ts +6 -0
- package/lib/console-host/errors.js +31 -0
- package/lib/console-host/errors.js.map +1 -0
- package/lib/console-host/projection.d.ts +12 -0
- package/lib/console-host/projection.js +136 -0
- package/lib/console-host/projection.js.map +1 -0
- package/lib/console-host/review-diff.d.ts +18 -0
- package/lib/console-host/review-diff.js +176 -0
- package/lib/console-host/review-diff.js.map +1 -0
- package/lib/console-host/service.d.ts +26 -0
- package/lib/console-host/service.js +143 -0
- package/lib/console-host/service.js.map +1 -0
- package/lib/console-remote/descriptors.d.ts +3 -0
- package/lib/console-remote/descriptors.js +105 -0
- package/lib/console-remote/descriptors.js.map +1 -0
- package/lib/console-remote/remote.d.ts +29 -0
- package/lib/console-remote/remote.js +4 -0
- package/lib/console-remote/remote.js.map +1 -0
- package/lib/console-remote/schemas.d.ts +29 -0
- package/lib/console-remote/schemas.js +145 -0
- package/lib/console-remote/schemas.js.map +1 -0
- package/lib/console-remote/typert.d.ts +3 -0
- package/lib/console-remote/typert.js +14 -0
- package/lib/console-remote/typert.js.map +1 -0
- package/lib/index.d.ts +26 -8
- package/lib/index.js +28 -10
- package/lib/index.js.map +1 -1
- package/lib/managed-worktree-path.d.ts +14 -13
- package/lib/managed-worktree-path.js +32 -22
- package/lib/managed-worktree-path.js.map +1 -1
- package/lib/ports.d.ts +39 -1
- package/lib/session-checkout-apply.d.ts +54 -1
- package/lib/session-checkout-apply.js +318 -28
- package/lib/session-checkout-apply.js.map +1 -1
- package/lib/session-checkout-module.js +1098 -36
- package/lib/session-checkout-module.js.map +1 -1
- package/lib/session-target-context.d.ts +6 -0
- package/lib/session-target-context.js +16 -0
- package/lib/session-target-context.js.map +1 -0
- package/lib/tools.d.ts +6 -6
- package/lib/tools.js +107 -218
- package/lib/tools.js.map +1 -1
- package/lib/types.d.ts +57 -11
- package/lib/types.js +6 -6
- package/lib/types.js.map +1 -1
- package/package.json +116 -69
- package/scripts/check-publish.mjs +193 -0
- package/scripts/clean-lib.mjs +7 -0
- package/scripts/dev-dsh-lib.mjs +509 -0
- package/scripts/dev-dsh.mjs +95 -0
- package/scripts/dsh-source-runner.mjs +14 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
本项目的显著变更记录在此文件中。版本号遵循 Semantic Versioning;在 `0.x` 阶段,minor 版本可能包含需要迁移的公开能力调整。
|
|
4
|
+
|
|
5
|
+
## [0.3.0] - 2026-08-17
|
|
6
|
+
|
|
7
|
+
`0.3.0` 完善同一 isolated Session 的连续修改体验:未同步 Review 可以安全恢复编辑,成功交付并 cleanup 后也能保留 Session ID、immutable cwd 与完整对话开始下一轮。
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- cleanup 后在原 isolated Session 中开始 iteration + 1;新 checkout 从最新 Local HEAD 创建,并通过 `predecessorCheckoutId` 保留上一轮交付记录与迭代血缘。
|
|
12
|
+
- delivered composer dock 增加“开始下一轮修改”,模型增加 `worktree_begin_next_iteration`,人工命令增加 `/worktree next`。
|
|
13
|
+
- Host、strict Typert Remote、Client Adapter 与 Console Contract 增加 `beginNextIteration`;Remote 方法总数由 13 个增加到 14 个。
|
|
14
|
+
- cleanup 后 Harness 过滤缺失 cwd 的 Session 时,lookup adapter 可通过当前 live Session 的 immutable header cwd 恢复精确且唯一的 Workspace 身份。
|
|
15
|
+
- 新增 `worktree_resume_revision`、`/worktree continue` 与 Ready 更多菜单“继续修改”,在不写入 Local 的情况下使未同步 Review 失效并恢复同一 iteration。
|
|
16
|
+
- Worktree Console Contract、Host、strict Typert Remote 与 Client Adapter 增加 `resumeRevision`;Remote 方法总数由 14 个增加到 15 个。
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
|
|
20
|
+
- 修复 `worktree_ready_for_review` 输出 Schema,使其符合 Harness 工具结果契约。
|
|
21
|
+
- 发布产物门禁同步校验新增的 `beginNextIteration` 与 `resumeRevision` Remote 方法。
|
|
22
|
+
- 完善并稳定本地开发 Harness 的源码预览、验收输出提取、命令失败诊断与跨平台路径处理。
|
|
23
|
+
|
|
24
|
+
### Safety
|
|
25
|
+
|
|
26
|
+
- 下一轮仅允许已成功清理的 delivered owner,并校验 caller、Workspace、revision、Local Git common dir、managed path 与 predecessor lineage。
|
|
27
|
+
- 如果上一轮 managed path 已重新出现或包含未知内容,拒绝覆盖;retained、cleanup-pending 与 recovery 状态必须先完成清理或恢复。
|
|
28
|
+
- 创建中断且尚未形成 Worktree 时,reconcile 恢复 predecessor binding;存在无法确认的残留时进入 recovery 并保留现场。
|
|
29
|
+
- live Session cwd fallback 对 cold、无 cwd、路径不匹配或歧义映射继续 fail closed。
|
|
30
|
+
- resume-revision 严格校验 live owner Session、expected revision、expected review ID、Workspace/checkout 身份;转换只更新 registry delivery state,不修改 Local、Worktree bytes 或 Git refs。
|
|
31
|
+
|
|
32
|
+
### Changed
|
|
33
|
+
|
|
34
|
+
- Ready for Review 不再阻断普通对话:讨论类 follow-up 保持当前 Review;新的代码或文件修改由模型自动恢复 Working,不要求用户先同步或点击恢复编辑。
|
|
35
|
+
- 重写中英文 README,补充当前 Session Target 流程、安全边界、命令、模型工具和已知限制。
|
|
36
|
+
- `SessionCheckoutModule.beginNextIteration` 现在要求调用方传入 `expectedRevision`,避免基于过期 delivered 状态创建下一轮。
|
|
37
|
+
|
|
38
|
+
## [0.2.0] - 2026-08-17
|
|
39
|
+
|
|
40
|
+
`0.2.0` 将插件从单一 Worktree 管理器升级为 DeepSeek Harness 中完整、可验收、可撤回的 Worktree Session Target。
|
|
41
|
+
|
|
42
|
+
### Added
|
|
43
|
+
|
|
44
|
+
- 真实 source/target Session 分离:Host 分配唯一 checkout、managed root 与 target Session ID,source Session 始终保持 Local。
|
|
45
|
+
- blank Local Session 的 pre-session **Worktree** 开关与确认弹窗:确认前零副作用,确认后才创建 target、迁移未发送的文字/图片并打开独立 Session。
|
|
46
|
+
- Harness 官方 Slot 集成:
|
|
47
|
+
- Create/Ready ToolView;
|
|
48
|
+
- Header Session Target 状态胶囊;
|
|
49
|
+
- `conversation.input.dock` 的 Ready、Preview 与 Recovery 状态条。
|
|
50
|
+
- Domi 式交付生命周期:
|
|
51
|
+
- Ready for Review;
|
|
52
|
+
- 不提交、可撤回的 Local Preview;
|
|
53
|
+
- Preview 验收提交;
|
|
54
|
+
- 撤回并恢复 Worktree 编辑;
|
|
55
|
+
- 跳过验收直接提交;
|
|
56
|
+
- cleanup 与 retain 策略。
|
|
57
|
+
- 项目级单 Preview 验收槽位、持久 Preview receipt、内部 Git refs、crash reconcile 与 cleanup retry。
|
|
58
|
+
- 13 个 strict Typert Remote 方法,覆盖 current/list/create/inspect、preflight、Preview/rollback/finalize、Discard、retention 与 cleanup。
|
|
59
|
+
- sibling managed Worktree 路径与安全 fallback;短 checkout identity 冲突时自动扩展,旧 registry 路径继续可管理。
|
|
60
|
+
- 一键本地 DSH 开发、临时 tarball 安装、profile smoke 与发布产物门禁。
|
|
61
|
+
|
|
62
|
+
### Safety
|
|
63
|
+
|
|
64
|
+
- Preview receipt 在触碰 Local 前持久化,并绑定 review、revision、isolated HEAD/fingerprint 和 Local HEAD/ref/fingerprint CAS。
|
|
65
|
+
- Local staged、unstaged、untracked 状态在 Preview、rollback 和 finalize 中保持分层语义;无法证明无损时 fail closed。
|
|
66
|
+
- 同分支 fast-forward 后的安全 rollback 使用三方反向合并,只移除 Preview delta,同时保留新 Commit 和 Preview 外 Local 修改。
|
|
67
|
+
- branch switch、non-fast-forward、重叠冲突、Preview 已进入 Commit、额外 Preview 修改或最终 CAS 漂移会进入 detached/recovery 状态,不覆盖用户修改。
|
|
68
|
+
- active Preview 的 Discard 必须先成功 rollback;detached Preview 保留 Worktree、receipt 与内部 refs 作为恢复证据。
|
|
69
|
+
- target Workspace cwd 必须 canonicalize 到 Host 记录的 managed root;caller/project/workspace/owner/review identity 全部 fail closed。
|
|
70
|
+
- owner Session live 后,source Session 不再拥有管理权限;其他 Session 不能依赖持久化 owner ID 越权管理。
|
|
71
|
+
|
|
72
|
+
### Changed
|
|
73
|
+
|
|
74
|
+
- Ready 主操作改为“同步到 Local 验收”;Preview 主操作改为“验收通过并提交”,撤回和 direct finish 收入“更多”菜单。
|
|
75
|
+
- 普通验收界面改为中文优先的紧凑摘要,验证详情默认折叠,不显示 Diff/Inspect 或平铺 Retention。
|
|
76
|
+
- 历史不可逆 `worktree_apply` 公开路径暂停;模型不再直接拥有 Finish、Discard 或 Remove 权限。
|
|
77
|
+
- `WorktreeConsoleView`、Host 控制面和 strict Remote 管理能力继续保留,但可见的项目级 `conversation.view` Worktree 页签暂不挂载,优先稳定 pre-session、独立 target Session 与 composer 验收主流程。
|
|
78
|
+
- managed Worktree 新路径采用 `<repo>--worktrees/<repo>--<checkout-short>--worktree`,不安全时回退到插件 stateDir。
|
|
79
|
+
|
|
80
|
+
### Compatibility
|
|
81
|
+
|
|
82
|
+
- 需要 DeepSeek Harness `0.1.0-rc.6` 包线与 Node.js 20 或更高版本。
|
|
83
|
+
- pnpm 10 的 Git 源安装可能需要在 profile `pnpm-workspace.yaml` 中允许 `dsh-git-worktree` 执行 `prepare`。
|
|
84
|
+
- `./manager` 不再是发布 export;Client/Host 集成改用正式 package entry、`./client`、strict `./typert` / `./remote` 与 `./console-contract`。
|
|
85
|
+
- 已经使用旧不可逆 Apply 的历史记录不会自动迁移到 Preview 生命周期,Finish/Discard 会保守拒绝并要求人工检查 Local。
|
|
86
|
+
|
|
87
|
+
## [0.1.2] - 2026-07-28
|
|
88
|
+
|
|
89
|
+
- 发布初版 Domi-grade Worktree 管理、基础 apply/finish/discard 生命周期和安全清理。
|
|
90
|
+
|
|
91
|
+
[0.3.0]: https://github.com/wloops/dsh-git-worktree/compare/v0.2.0...v0.3.0
|
|
92
|
+
[0.2.0]: https://github.com/wloops/dsh-git-worktree/compare/v0.1.2...v0.2.0
|
|
93
|
+
[0.1.2]: https://github.com/wloops/dsh-git-worktree/releases/tag/v0.1.2
|
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/README.md
CHANGED
|
@@ -1,43 +1,187 @@
|
|
|
1
|
-
# dsh-git-worktree
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
1
|
+
# dsh-git-worktree
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/dsh-git-worktree)
|
|
4
|
+
[](https://github.com/wloops/dsh-git-worktree/actions/workflows/ci.yml)
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
|
|
7
|
+
**Run coding tasks in real Git worktrees, review the result in Local, and commit only after explicit human approval.**
|
|
8
|
+
|
|
9
|
+
`dsh-git-worktree` is an experimental [DeepSeek Harness](https://github.com/deepseek-ai/DeepSeek-Harness) plugin that turns a Git worktree into an isolated Session Target. The agent works in a separate checkout and Session; the original Local checkout stays under human control.
|
|
10
|
+
|
|
11
|
+
[中文文档](README.zh.md)
|
|
12
|
+
|
|
13
|
+
## Why use it?
|
|
14
|
+
|
|
15
|
+
A normal agent session can modify the same working tree you are using. This plugin separates execution from acceptance:
|
|
16
|
+
|
|
17
|
+
- **Real isolation** — each task gets a distinct Git worktree, Workspace, cwd, and Session ID.
|
|
18
|
+
- **Human-gated delivery** — the model can prepare a review, but it cannot commit, discard, or clean up by itself.
|
|
19
|
+
- **Reversible Local Preview** — inspect the exact change in Local before committing, then accept it or roll it back.
|
|
20
|
+
- **Local changes are preserved** — staged, unstaged, and untracked Local state is kept separate from the task change.
|
|
21
|
+
- **Fail-closed recovery** — stale reviews, conflicting edits, changed branches, and uncertain cleanup stop instead of overwriting data.
|
|
22
|
+
|
|
23
|
+
> The project is still experimental. It provides a project-scoped Worktree Session workflow, not a cross-project global worktree manager.
|
|
24
|
+
|
|
25
|
+
## Workflow
|
|
26
|
+
|
|
27
|
+
```text
|
|
28
|
+
Local Session
|
|
29
|
+
│
|
|
30
|
+
├─ Create isolated Worktree Session
|
|
31
|
+
▼
|
|
32
|
+
Agent edits and validates in the Worktree
|
|
33
|
+
│
|
|
34
|
+
├─ worktree_ready_for_review
|
|
35
|
+
▼
|
|
36
|
+
Ready for Review
|
|
37
|
+
│
|
|
38
|
+
├─ Sync to Local Preview ── Accept and commit
|
|
39
|
+
│ └─ Roll back and continue editing
|
|
40
|
+
├─ Skip Preview and commit directly
|
|
41
|
+
└─ Discard
|
|
42
|
+
│
|
|
43
|
+
└─ After cleanup: start iteration + 1 in the same Session
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
1. In a blank Local Session, turn on **Worktree** and confirm creation. The unsent text/image draft moves to the isolated Session; cancelling creates nothing.
|
|
47
|
+
2. For an existing Local Session, the model can call `worktree_create`, after which you open the isolated Session from its ToolView.
|
|
48
|
+
3. The agent edits and validates only inside the isolated cwd.
|
|
49
|
+
4. The agent ends with `worktree_ready_for_review`, including changed files, validation evidence, and a suggested commit message.
|
|
50
|
+
5. You choose what happens next:
|
|
51
|
+
- **Sync to Local for review**, then commit or roll the Preview back;
|
|
52
|
+
- **Skip review and commit directly**;
|
|
53
|
+
- **Discard** the task.
|
|
54
|
+
6. After a successful commit and cleanup, the delivered Session can start the next iteration without losing its conversation. Harness keeps Session cwd immutable, so the plugin recreates only the previously cleaned, Host-owned managed path after strict identity checks.
|
|
55
|
+
|
|
56
|
+
All acceptance paths revalidate the review revision, Worktree HEAD/fingerprint, and Local state before writing. Retained or cleanup-pending environments must be cleaned first; starting another iteration never silently removes them.
|
|
57
|
+
|
|
58
|
+
## Requirements
|
|
59
|
+
|
|
60
|
+
- Node.js 20 or newer
|
|
61
|
+
- DeepSeek Harness `0.1.0-rc.6` package line
|
|
62
|
+
- Harness Web client for the interactive Worktree controls
|
|
63
|
+
- A Git repository
|
|
64
|
+
|
|
65
|
+
## Install
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
# npm package
|
|
69
|
+
dsh plugin --profile web add dsh-git-worktree
|
|
70
|
+
|
|
71
|
+
# Git tag; prepare builds the Host and Client bundles
|
|
72
|
+
dsh plugin --profile web add github:wloops/dsh-git-worktree#v0.3.0
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
With pnpm 10 or newer, a Git install may require this entry in the profile's `pnpm-workspace.yaml` before retrying:
|
|
76
|
+
|
|
77
|
+
```yaml
|
|
78
|
+
allowBuilds:
|
|
79
|
+
dsh-git-worktree: true
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Start Harness normally after installation and open a Git repository as the workspace.
|
|
83
|
+
|
|
84
|
+
## User and model controls
|
|
85
|
+
|
|
86
|
+
### Model tools
|
|
87
|
+
|
|
88
|
+
| Tool | Purpose |
|
|
89
|
+
| --- | --- |
|
|
90
|
+
| `worktree_create` | Create a managed Worktree and reserve a distinct target Session without changing the current Session cwd |
|
|
91
|
+
| `worktree_list` | List Worktrees visible to the current Session within the original project |
|
|
92
|
+
| `worktree_resume_revision` | Automatically invalidate an unsynced review before new code/file changes and resume the same iteration without touching Local |
|
|
93
|
+
| `worktree_begin_next_iteration` | Recreate a successfully cleaned delivered Session cwd for iteration + 1, preserving the same Session and conversation |
|
|
94
|
+
| `worktree_ready_for_review` | Save the delivery report and stop for explicit human acceptance |
|
|
95
|
+
|
|
96
|
+
Finish, Discard, and Remove are deliberately excluded from the model tool surface. While an unsynced review is waiting, ordinary discussion continues without changing it; if a follow-up requests code or file changes, the model calls `worktree_resume_revision` automatically. The user does not need to synchronize Local or click a recovery control.
|
|
97
|
+
|
|
98
|
+
### User controls
|
|
99
|
+
|
|
100
|
+
The Web UI provides the normal create, Preview, rollback, commit, retention, and discard actions. The same Host-controlled operations are also available through `/worktree` commands:
|
|
101
|
+
|
|
102
|
+
```text
|
|
103
|
+
/worktree status
|
|
104
|
+
/worktree list
|
|
105
|
+
/worktree continue
|
|
106
|
+
/worktree next
|
|
107
|
+
/worktree finalize [<reviewId> <revision>] [cleanup|retain_24h|retain_3d|retain_manual]
|
|
108
|
+
/worktree finish <commit message>
|
|
109
|
+
/worktree discard
|
|
110
|
+
/worktree remove <checkoutId>
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
`finalize` uses the suggested commit message from the active review. `finish` is the explicit direct-commit path with a custom message.
|
|
114
|
+
|
|
115
|
+
## Safety model
|
|
116
|
+
|
|
117
|
+
The implementation ports Domi's hardened checkout/apply foundations to Harness's authoritative Workspace and Session cwd model. Important invariants include:
|
|
118
|
+
|
|
119
|
+
- The initial Local source and isolated target use different Session IDs; later iterations keep the same isolated Session ID.
|
|
120
|
+
- An active target is trusted only when its Harness Workspace resolves to the recorded managed root. A cleaned delivered target may temporarily reference its missing immutable cwd only when the Host path identity exactly matches the predecessor record.
|
|
121
|
+
- One canonical Local project can have only one active Preview.
|
|
122
|
+
- Preview receipts are persisted before Local writes so rollback/finalize can recover after a Host restart.
|
|
123
|
+
- Preview, commit, rollback, and resume-revision paths use revision and identity checks; review-based paths bind the review ID, and resume-revision changes only registry delivery state after validating the managed checkout.
|
|
124
|
+
- Cleanup verifies path identity, Git metadata, and the final fingerprint; uncertain residue is retained or quarantined.
|
|
125
|
+
- Next iteration creation only reuses an absent path from a successfully cleaned predecessor, creates a new checkout record, and preserves the predecessor as recovery evidence.
|
|
126
|
+
- Legacy records created by the old irreversible Apply flow are not automatically finished or discarded.
|
|
127
|
+
|
|
128
|
+
For the detailed boundary and recovery design, see [Porting notes](docs/PORTING.md) and [Worktree Console architecture](docs/WORKTREE-CONSOLE-ARCHITECTURE.md).
|
|
129
|
+
|
|
130
|
+
## Local development
|
|
131
|
+
|
|
132
|
+
Install dependencies and run the standard checks:
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
pnpm install
|
|
136
|
+
pnpm run typecheck
|
|
137
|
+
pnpm test
|
|
138
|
+
pnpm run build
|
|
139
|
+
pnpm run check:publish
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
For an end-to-end local Harness run:
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
pnpm run dev:dsh
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
This command builds the current checkout, packs it into a temporary local tarball, installs it into the `web` profile, verifies 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 to npm or push Git refs.
|
|
149
|
+
|
|
150
|
+
Useful variants:
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
# Install and verify the snapshot without starting Web
|
|
154
|
+
pnpm run dev:dsh:install
|
|
155
|
+
|
|
156
|
+
# Verify the already-installed profile
|
|
157
|
+
pnpm run dev:dsh:smoke
|
|
158
|
+
|
|
159
|
+
# Use an existing Git root, another port, or another profile
|
|
160
|
+
pnpm run dev:dsh -- --repo G:/path/to/repo --port 4090 --profile web
|
|
161
|
+
|
|
162
|
+
# Remove the development install and cached local archives
|
|
163
|
+
pnpm run dev:dsh:remove
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
When nearby DeepSeek Harness source checkouts are found, `dev:dsh` prefers a runnable candidate with `node_modules/tsx` installed. Select a checkout in any other location with `DSH_HARNESS_ROOT` or `--harness <path>`. Once a source checkout is selected, plugin installation, config validation, removal, and Web startup all use that source CLI without requiring a globally installed `dsh`. If an explicitly selected checkout has not installed its dependencies, the workflow fails before building and prints the corresponding `pnpm --dir <path> install` command. Only runs without a source checkout fall back to `dsh` on PATH.
|
|
167
|
+
|
|
168
|
+
## Current limitations
|
|
169
|
+
|
|
170
|
+
- No cross-project global sidebar manager yet.
|
|
171
|
+
- The project-scoped Worktree Console implementation exists, but its visible `conversation.view` tab is not mounted in `v0.3.0` while the primary flow is stabilised.
|
|
172
|
+
- In the verified Harness `0.1.0-rc.6` line, Workflow `agent({ isolation })` integration is not available.
|
|
173
|
+
- In that Harness line, subagents inherit the parent Session cwd; they are isolated only when the parent is already a Worktree Session.
|
|
174
|
+
- Dependency snapshot/restore and the complete collaborator handoff UI are deferred.
|
|
175
|
+
- Immediate cleanup removes the isolated cwd, making that Session terminal; continue from Local or start a new iteration.
|
|
176
|
+
|
|
177
|
+
## Documentation
|
|
178
|
+
|
|
179
|
+
- [Porting from Domi to Harness](docs/PORTING.md)
|
|
180
|
+
- [Worktree Console architecture](docs/WORKTREE-CONSOLE-ARCHITECTURE.md)
|
|
181
|
+
- [UI development notes](docs/UI-DEVELOPMENT.md)
|
|
182
|
+
- [Release checklist](docs/RELEASE.md)
|
|
183
|
+
- [Changelog](CHANGELOG.md)
|
|
184
|
+
|
|
185
|
+
## License
|
|
186
|
+
|
|
187
|
+
[MIT](LICENSE)
|
package/README.zh.md
CHANGED
|
@@ -1,41 +1,187 @@
|
|
|
1
|
-
# dsh-git-worktree
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
1
|
+
# dsh-git-worktree
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/dsh-git-worktree)
|
|
4
|
+
[](https://github.com/wloops/dsh-git-worktree/actions/workflows/ci.yml)
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
|
|
7
|
+
**让 Agent 在真实 Git Worktree 中完成任务,在 Local 中验收,并且只在用户明确确认后提交。**
|
|
8
|
+
|
|
9
|
+
`dsh-git-worktree` 是一个实验性的 [DeepSeek Harness](https://github.com/deepseek-ai/DeepSeek-Harness) 插件。它把 Git Worktree 变成独立的 Session Target:Agent 使用单独的 checkout 和 Session 工作,原始 Local 工作区始终由用户控制。
|
|
10
|
+
|
|
11
|
+
[English](README.md)
|
|
12
|
+
|
|
13
|
+
## 为什么需要它?
|
|
14
|
+
|
|
15
|
+
普通 Agent Session 可能直接修改你正在使用的工作区。本插件把“执行任务”和“接受结果”分开:
|
|
16
|
+
|
|
17
|
+
- **真实隔离**:每个任务都有独立的 Git Worktree、Workspace、cwd 和 Session ID。
|
|
18
|
+
- **用户掌握交付权**:模型可以准备验收报告,但不能自行提交、放弃或清理。
|
|
19
|
+
- **可撤回的 Local Preview**:提交前先在 Local 查看精确变更,可以验收提交,也可以撤回后继续修改。
|
|
20
|
+
- **保留 Local 现场**:Local 中已有的 staged、unstaged 和 untracked 内容不会被混入任务提交。
|
|
21
|
+
- **保守恢复**:历史验收卡、并发修改、分支变化或清理身份不确定时直接停止,不覆盖用户数据。
|
|
22
|
+
|
|
23
|
+
> 项目仍处于实验阶段。当前提供的是项目级 Worktree Session 工作流,还不是跨项目的全局 Worktree Manager。
|
|
24
|
+
|
|
25
|
+
## 工作流程
|
|
26
|
+
|
|
27
|
+
```text
|
|
28
|
+
Local Session
|
|
29
|
+
│
|
|
30
|
+
├─ 创建隔离的 Worktree Session
|
|
31
|
+
▼
|
|
32
|
+
Agent 在 Worktree 中修改并验证
|
|
33
|
+
│
|
|
34
|
+
├─ worktree_ready_for_review
|
|
35
|
+
▼
|
|
36
|
+
等待验收
|
|
37
|
+
│
|
|
38
|
+
├─ 同步到 Local Preview ── 验收并提交
|
|
39
|
+
│ └─ 撤回并继续修改
|
|
40
|
+
├─ 跳过 Preview,直接提交
|
|
41
|
+
└─ 放弃任务
|
|
42
|
+
│
|
|
43
|
+
└─ cleanup 后在原 Session 开始 iteration + 1
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
1. 在 blank/new Local Session 中打开 **Worktree** 开关并确认。未发送的文字和图片草稿会迁移到隔离 Session;取消不会创建任何资源。
|
|
47
|
+
2. 已存在的 Local Session 可以由模型调用 `worktree_create`,然后由用户从 ToolView 打开隔离 Session。
|
|
48
|
+
3. Agent 只在隔离 cwd 中修改和验证代码。
|
|
49
|
+
4. Agent 最后调用 `worktree_ready_for_review`,写入变更摘要、验证证据和建议 Commit Message,然后停止。
|
|
50
|
+
5. 用户决定如何处理:
|
|
51
|
+
- **同步到 Local 验收**,再提交或撤回 Preview;
|
|
52
|
+
- **跳过验收,直接提交**;
|
|
53
|
+
- **放弃任务**。
|
|
54
|
+
6. 成功提交并 cleanup 后,可以在原隔离 Session 中开始下一轮,不丢失现有对话。Harness 的 Session cwd 不可变,因此插件只会在严格身份校验后重建上一轮已经清理的 Host-owned managed path。
|
|
55
|
+
|
|
56
|
+
所有验收路径在写入前都会重新校验 review revision、Worktree HEAD/fingerprint 和 Local 状态。Retained 或 cleanup-pending 环境必须先完成清理;开始下一轮不会静默删除这些环境。
|
|
57
|
+
|
|
58
|
+
## 环境要求
|
|
59
|
+
|
|
60
|
+
- Node.js 20 或更高版本
|
|
61
|
+
- DeepSeek Harness `0.1.0-rc.6` 包线
|
|
62
|
+
- 使用 Harness Web Client 才能获得完整交互界面
|
|
63
|
+
- 当前 Workspace 必须是 Git 仓库
|
|
64
|
+
|
|
65
|
+
## 安装
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
# npm 包
|
|
69
|
+
dsh plugin --profile web add dsh-git-worktree
|
|
70
|
+
|
|
71
|
+
# Git tag;prepare 会构建 Host 和 Client bundle
|
|
72
|
+
dsh plugin --profile web add github:wloops/dsh-git-worktree#v0.3.0
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
使用 pnpm 10 或更高版本时,Git 源安装可能需要先在 profile 的 `pnpm-workspace.yaml` 中加入:
|
|
76
|
+
|
|
77
|
+
```yaml
|
|
78
|
+
allowBuilds:
|
|
79
|
+
dsh-git-worktree: true
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
安装后正常启动 Harness,并以一个 Git 仓库作为 Workspace。
|
|
83
|
+
|
|
84
|
+
## 用户与模型入口
|
|
85
|
+
|
|
86
|
+
### 模型工具
|
|
87
|
+
|
|
88
|
+
| 工具 | 作用 |
|
|
89
|
+
| --- | --- |
|
|
90
|
+
| `worktree_create` | 创建 managed Worktree 并预留独立 target Session,不修改当前 Session cwd |
|
|
91
|
+
| `worktree_list` | 列出当前 Session 在原始项目中可见的 Worktree |
|
|
92
|
+
| `worktree_resume_revision` | 新的代码/文件修改前自动使未同步 Review 失效,在不触碰 Local 的情况下恢复同一 iteration |
|
|
93
|
+
| `worktree_begin_next_iteration` | 为已成功清理的 delivered Session 重建 iteration + 1,并保持同一 Session 与完整对话 |
|
|
94
|
+
| `worktree_ready_for_review` | 保存交付报告并停止,等待用户明确验收 |
|
|
95
|
+
|
|
96
|
+
Finish、Discard、Remove 不向模型开放,避免用模型参数代替用户授权。未同步 Review 等待期间,普通讨论会直接继续且不改变验收稿;如果 follow-up 要求修改代码或文件,模型会自动调用 `worktree_resume_revision`。用户不需要先同步 Local,也不需要点击恢复编辑。
|
|
97
|
+
|
|
98
|
+
### 用户操作
|
|
99
|
+
|
|
100
|
+
Web UI 提供创建、Preview、撤回、提交、保留和放弃等常用操作。Host 控制的同类能力也可以通过 `/worktree` 命令调用:
|
|
101
|
+
|
|
102
|
+
```text
|
|
103
|
+
/worktree status
|
|
104
|
+
/worktree list
|
|
105
|
+
/worktree continue
|
|
106
|
+
/worktree next
|
|
107
|
+
/worktree finalize [<reviewId> <revision>] [cleanup|retain_24h|retain_3d|retain_manual]
|
|
108
|
+
/worktree finish <Commit Message>
|
|
109
|
+
/worktree discard
|
|
110
|
+
/worktree remove <checkoutId>
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
`finalize` 使用当前验收报告中的建议 Commit Message;`finish` 是由用户提供自定义消息的直接提交路径。
|
|
114
|
+
|
|
115
|
+
## 安全模型
|
|
116
|
+
|
|
117
|
+
实现把 Domi 中经过生产验证的 checkout/apply 安全基础迁移到 Harness 的权威 Workspace / Session cwd 模型。关键不变量包括:
|
|
118
|
+
|
|
119
|
+
- 初始 Local source 与 isolated target 使用不同的 Session ID;后续 iteration 保持同一个 isolated Session ID。
|
|
120
|
+
- 活动 target 的 Harness Workspace 必须解析到 Host 记录的 managed root。已清理的 delivered target 只在 Host Workspace 原始路径与 predecessor 记录精确一致时,才允许暂时引用缺失的 immutable cwd。
|
|
121
|
+
- 同一 canonical Local 项目同时只允许一个活动 Preview。
|
|
122
|
+
- 在写入 Local 前先持久化 Preview receipt,使 Host 重启后仍可恢复 rollback/finalize。
|
|
123
|
+
- Preview、Commit、rollback 与 resume-revision 路径都使用 revision 和身份校验;基于验收报告的路径绑定 review ID,resume-revision 在验证 managed checkout 后只改变 registry delivery state。
|
|
124
|
+
- 清理前验证路径身份、Git 元数据和最终 fingerprint;无法确认的残余会保留或 quarantine。
|
|
125
|
+
- 下一轮只复用已成功清理且当前不存在的 predecessor path,创建新的 checkout record,并保留上一轮记录作为恢复证据。
|
|
126
|
+
- 旧版不可逆 Apply 流程产生的历史记录不会被自动 Finish 或 Discard。
|
|
127
|
+
|
|
128
|
+
详细边界与恢复设计见 [Domi 到 Harness 的迁移说明](docs/PORTING.md) 和 [Worktree Console 架构](docs/WORKTREE-CONSOLE-ARCHITECTURE.md)。
|
|
129
|
+
|
|
130
|
+
## 本地开发
|
|
131
|
+
|
|
132
|
+
安装依赖并运行标准检查:
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
pnpm install
|
|
136
|
+
pnpm run typecheck
|
|
137
|
+
pnpm test
|
|
138
|
+
pnpm run build
|
|
139
|
+
pnpm run check:publish
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
端到端启动本地 Harness:
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
pnpm run dev:dsh
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
该命令会构建当前 checkout,将其打成临时本地 tarball,安装到 `web` profile,验证组合配置,准备受 marker 保护的临时 Git fixture,并默认在 `http://127.0.0.1:3081` 启动 `dsh web`。它不会发布 npm 包,也不会 push Git refs。
|
|
149
|
+
|
|
150
|
+
常用变体:
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
# 只安装并验证当前快照,不启动 Web
|
|
154
|
+
pnpm run dev:dsh:install
|
|
155
|
+
|
|
156
|
+
# 验证已经安装的 profile
|
|
157
|
+
pnpm run dev:dsh:smoke
|
|
158
|
+
|
|
159
|
+
# 使用现有 Git 根目录、其他端口或其他 profile
|
|
160
|
+
pnpm run dev:dsh -- --repo G:/path/to/repo --port 4090 --profile web
|
|
161
|
+
|
|
162
|
+
# 移除开发安装和缓存的本地归档
|
|
163
|
+
pnpm run dev:dsh:remove
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
如果发现附近的 DeepSeek Harness 源码 checkout,`dev:dsh` 会优先选择已经安装 `node_modules/tsx`、可直接运行的候选;源码位于任意其他目录时,可以通过 `DSH_HARNESS_ROOT` 或 `--harness <path>` 指定。选择源码 checkout 后,插件安装、配置验证、移除和 Web 启动都会使用该源码 CLI,不再要求全局安装 `dsh`;显式指定的 checkout 尚未安装依赖时,脚本会在构建前提示对应的 `pnpm --dir <path> install` 命令。只有未选择源码 checkout 时才回退到 PATH 中的 `dsh`。
|
|
167
|
+
|
|
168
|
+
## 当前限制
|
|
169
|
+
|
|
170
|
+
- 暂无跨项目全局侧栏 Manager。
|
|
171
|
+
- 项目级 Worktree Console 实现仍保留,但 `v0.3.0` 暂不挂载可见的 `conversation.view` 标签页,当前优先稳定主流程。
|
|
172
|
+
- 在已验证的 Harness `0.1.0-rc.6` 包线中,Workflow `agent({ isolation })` 集成尚不可用。
|
|
173
|
+
- 在该 Harness 包线中,子 Agent 继承父 Session cwd;只有父 Session 已经是 Worktree Session 时才处于隔离环境。
|
|
174
|
+
- dependency snapshot/restore 和完整 collaborator handoff UI 尚未实现。
|
|
175
|
+
- 选择立即清理后,隔离 cwd 会被删除,该 Session 随即进入终态;后续应回到 Local 或开始新一轮任务。
|
|
176
|
+
|
|
177
|
+
## 文档
|
|
178
|
+
|
|
179
|
+
- [Domi 到 Harness 的迁移说明](docs/PORTING.md)
|
|
180
|
+
- [Worktree Console 架构](docs/WORKTREE-CONSOLE-ARCHITECTURE.md)
|
|
181
|
+
- [UI 开发说明](docs/UI-DEVELOPMENT.md)
|
|
182
|
+
- [发布清单](docs/RELEASE.md)
|
|
183
|
+
- [变更记录](CHANGELOG.md)
|
|
184
|
+
|
|
185
|
+
## 许可证
|
|
186
|
+
|
|
187
|
+
[MIT](LICENSE)
|
package/cordis.patch.yml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
# dsh-git-worktree bundle patch: one insert over the profile root, adding the
|
|
2
|
-
# plugin row. Later profile layers and the user's own cordis.patch.yml address
|
|
3
|
-
# this row by id; the last write wins per row.
|
|
4
|
-
|
|
5
|
-
- insert:
|
|
6
|
-
- id: dsh-git-worktree
|
|
7
|
-
name: dsh-git-worktree
|
|
1
|
+
# dsh-git-worktree bundle patch: one insert over the profile root, adding the
|
|
2
|
+
# plugin row. Later profile layers and the user's own cordis.patch.yml address
|
|
3
|
+
# this row by id; the last write wins per row.
|
|
4
|
+
|
|
5
|
+
- insert:
|
|
6
|
+
- id: dsh-git-worktree
|
|
7
|
+
name: dsh-git-worktree
|
package/lib/adapters/lookup.d.ts
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
* DSH lookup adapter: maps sessions and projects onto the harness's
|
|
3
3
|
* `workspaceRegistry` service (retrieved dynamically, like the ecosystem's
|
|
4
4
|
* plugins, because the published package version lags the rc.6 runtime). A
|
|
5
|
-
* session's project is found by scanning workspace session accounts; a
|
|
5
|
+
* session's project is found by scanning workspace session accounts; when a
|
|
6
|
+
* cleaned immutable cwd makes Harness filter a still-live Session from that
|
|
7
|
+
* projection, the immutable live header may restore the exact mapping. A
|
|
6
8
|
* project record maps to a workspace's `id`/`title`/`path`. Missing service or
|
|
7
9
|
* records degrade to `undefined`, which the state machine treats as
|
|
8
10
|
* recovery/orphan facts rather than failures.
|
|
@@ -24,5 +26,5 @@ export interface WorkspaceRegistryLike {
|
|
|
24
26
|
create(path: string, title?: string): Promise<WorkspaceLike>;
|
|
25
27
|
delete(id: string): Promise<boolean>;
|
|
26
28
|
}
|
|
27
|
-
/** Build the lookup port over
|
|
29
|
+
/** Build the lookup port over Harness workspace and live-session projections. */
|
|
28
30
|
export declare function createDshLookupPort(ctx: Context): SessionCheckoutLookupPort;
|