dsh-git-worktree 0.7.3 → 0.7.4
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 +11 -0
- package/README.en.md +7 -1
- package/README.md +7 -1
- package/lib/client/console-remote/index.d.ts +5 -0
- package/lib/client/console-remote/index.js +16 -2
- package/lib/client/console-remote/index.js.map +1 -1
- package/lib/client/index.d.ts +1 -1
- package/lib/client/index.js +0 -2
- package/lib/client/index.js.map +1 -1
- package/lib/client.js +65 -58
- package/package.json +1 -1
- package/scripts/check-publish.mjs +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,16 @@
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.7.4] - 2026-09-04
|
|
8
|
+
|
|
9
|
+
`0.7.4` 修复 `0.7.3` 在 DeepSeek Harness `0.1.2-rc.1` Web Client 中的启动循环依赖。插件现在先恢复被受控派生替换的官方 `uiWorkspace` 服务,再延迟加载依赖 Conversation 的 Worktree 界面。
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- 将官方 Workspace Client 与 Worktree ToolView/Pre-session/Target/Review UI 拆分为两个 Cordis 激活阶段,消除 `dsh-git-worktree → conversation → uiWorkspace → dsh-git-worktree` 循环等待。
|
|
14
|
+
- 顶层 Client fiber 只等待官方 Workspace 的公开 prerequisites;`conversation` 与 `connection` 留在子 fiber,服务后续出现时再注册其余 Worktree UI。
|
|
15
|
+
- 增加无 Conversation 启动图回归和发布门禁,确保插件先提供 `uiWorkspace`,且官方 Workspace Slot declaration tree 仍只注册一次。
|
|
16
|
+
|
|
7
17
|
## [0.7.3] - 2026-09-03
|
|
8
18
|
|
|
9
19
|
`0.7.3` 将插件完整适配到 DeepSeek Harness `0.1.2-rc.1` 的 Host、Client、Remote Gateway 与 Workspace 模块边界,并重写中英文项目首页,让安装要求、Worktree 工作方式与安全限制更容易理解。
|
|
@@ -265,6 +275,7 @@
|
|
|
265
275
|
|
|
266
276
|
- 发布初版生产级 Worktree 管理、基础 apply/finish/discard 生命周期和安全清理。
|
|
267
277
|
|
|
278
|
+
[0.7.4]: https://github.com/wloops/dsh-git-worktree/compare/v0.7.3...v0.7.4
|
|
268
279
|
[0.7.3]: https://github.com/wloops/dsh-git-worktree/compare/v0.7.2...v0.7.3
|
|
269
280
|
[0.7.2]: https://github.com/wloops/dsh-git-worktree/compare/v0.7.1...v0.7.2
|
|
270
281
|
[0.7.1]: https://github.com/wloops/dsh-git-worktree/compare/v0.7.0...v0.7.1
|
package/README.en.md
CHANGED
|
@@ -75,6 +75,12 @@ See the [full usage guide](docs/USAGE.en.md) for detailed actions, recovery scen
|
|
|
75
75
|
|
|
76
76
|
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.
|
|
77
77
|
|
|
78
|
+
After upgrading Harness from an earlier release, if the web UI shows **Failed to load plugins**, install version `0.7.4` or later and restart Harness. 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.
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
dsh plugin --profile web add dsh-git-worktree@0.7.4
|
|
82
|
+
```
|
|
83
|
+
|
|
78
84
|
### Install
|
|
79
85
|
|
|
80
86
|
```bash
|
|
@@ -84,7 +90,7 @@ dsh plugin --profile web add dsh-git-worktree
|
|
|
84
90
|
Or install a specific version:
|
|
85
91
|
|
|
86
92
|
```bash
|
|
87
|
-
dsh plugin --profile web add github:wloops/dsh-git-worktree#v0.7.
|
|
93
|
+
dsh plugin --profile web add github:wloops/dsh-git-worktree#v0.7.4
|
|
88
94
|
```
|
|
89
95
|
|
|
90
96
|
Open a Git Workspace and enable **Worktree** when creating a Session. An existing Local Session can also let the model call `worktree_create`.
|
package/README.md
CHANGED
|
@@ -75,6 +75,12 @@ flowchart LR
|
|
|
75
75
|
|
|
76
76
|
从旧 Harness 升级时请先处理 Host 数据迁移:`0.1.2-rc.1` 已移除可选 SQLite Session 后端,旧数据需使用旧版 Harness 导出;Code Mode 已更名为 PTC mode,但现有会话记录仍可读取。应用和本插件统一通过 `dsh` Profile 启动与安装。
|
|
77
77
|
|
|
78
|
+
从旧版 Harness 升级后,如果 Web 界面提示 **Failed to load plugins**,请安装 `0.7.4` 或更高版本并重启 Harness。`0.7.2` 及更早版本依赖已停止发布的 `dsh-client-runtime`;`0.7.3` 在 rc.1 Web Client 中还可能形成 `conversation` / `uiWorkspace` 循环等待。
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
dsh plugin --profile web add dsh-git-worktree@0.7.4
|
|
82
|
+
```
|
|
83
|
+
|
|
78
84
|
### 安装
|
|
79
85
|
|
|
80
86
|
```bash
|
|
@@ -84,7 +90,7 @@ dsh plugin --profile web add dsh-git-worktree
|
|
|
84
90
|
也可以安装指定版本:
|
|
85
91
|
|
|
86
92
|
```bash
|
|
87
|
-
dsh plugin --profile web add github:wloops/dsh-git-worktree#v0.7.
|
|
93
|
+
dsh plugin --profile web add github:wloops/dsh-git-worktree#v0.7.4
|
|
88
94
|
```
|
|
89
95
|
|
|
90
96
|
安装后打开 Git Workspace,在新建 Session 时启用 **Worktree**;已有 Local Session 也可以让模型调用 `worktree_create` 创建隔离 Session。
|
|
@@ -3,6 +3,11 @@ import type { ClientRemote } from '@deepseek-ai/dsh-api-gateway/client';
|
|
|
3
3
|
import type { WorktreeConsoleAdapter } from '../../console-contract.js';
|
|
4
4
|
import { type GitWorktreeRemote } from '../../console-remote/remote.js';
|
|
5
5
|
export { createWorktreeConsoleRemoteAdapter } from './adapter.js';
|
|
6
|
+
/**
|
|
7
|
+
* Activate on the same prerequisites as the official Workspace Client. The
|
|
8
|
+
* conversation-dependent Worktree surfaces run in a child fiber below so the
|
|
9
|
+
* Workspace service can break the uiConversation -> uiWorkspace boot edge.
|
|
10
|
+
*/
|
|
6
11
|
export declare const inject: string[];
|
|
7
12
|
interface ConsoleClientContext extends Context {
|
|
8
13
|
remote: ClientRemote & {
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import contribution from '../../console-remote/remote.js';
|
|
2
2
|
import { apply as applyToolViews, inject as toolViewInject } from '../index.js';
|
|
3
|
+
import { registerManagedWorkspaceSidebar } from '../workspace-sidebar/index.js';
|
|
4
|
+
import { inject as officialWorkspaceInject } from 'virtual:dsh-official-workspace-client';
|
|
3
5
|
import { createWorktreeConsoleRemoteAdapter } from './adapter.js';
|
|
4
6
|
export { createWorktreeConsoleRemoteAdapter } from './adapter.js';
|
|
5
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Activate on the same prerequisites as the official Workspace Client. The
|
|
9
|
+
* conversation-dependent Worktree surfaces run in a child fiber below so the
|
|
10
|
+
* Workspace service can break the uiConversation -> uiWorkspace boot edge.
|
|
11
|
+
*/
|
|
12
|
+
export const inject = [...officialWorkspaceInject];
|
|
6
13
|
/** Mount the package-owned strict Remote contribution in this Client fiber. */
|
|
7
14
|
export async function apply(ctx) {
|
|
8
15
|
const disposeRemote = await ctx.remote.$mount(contribution);
|
|
@@ -12,6 +19,13 @@ export async function apply(ctx) {
|
|
|
12
19
|
throw new Error('Worktree Console Remote namespace 挂载失败');
|
|
13
20
|
const adapter = createWorktreeConsoleRemoteAdapter(remote);
|
|
14
21
|
ctx.provide('worktreeConsole', adapter);
|
|
15
|
-
|
|
22
|
+
// The official ui-workspace row is disabled by cordis.patch.yml. Restore its
|
|
23
|
+
// service and Slot declarations before uiConversation becomes available.
|
|
24
|
+
registerManagedWorkspaceSidebar(ctx, adapter);
|
|
25
|
+
// The remaining Worktree views consume conversation/connection. Keeping
|
|
26
|
+
// them in a child fiber prevents those services from blocking uiWorkspace.
|
|
27
|
+
ctx.inject(toolViewInject, child => {
|
|
28
|
+
applyToolViews(child, adapter);
|
|
29
|
+
});
|
|
16
30
|
}
|
|
17
31
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/client/console-remote/index.ts"],"names":[],"mappings":"AAGA,OAAO,YAAwC,MAAM,gCAAgC,CAAA;AACrF,OAAO,EAAE,KAAK,IAAI,cAAc,EAAE,MAAM,IAAI,cAAc,EAAE,MAAM,aAAa,CAAA;AAC/E,OAAO,EAAE,kCAAkC,EAAE,MAAM,cAAc,CAAA;AAEjE,OAAO,EAAE,kCAAkC,EAAE,MAAM,cAAc,CAAA;AAEjE,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,GAAG,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/client/console-remote/index.ts"],"names":[],"mappings":"AAGA,OAAO,YAAwC,MAAM,gCAAgC,CAAA;AACrF,OAAO,EAAE,KAAK,IAAI,cAAc,EAAE,MAAM,IAAI,cAAc,EAAE,MAAM,aAAa,CAAA;AAC/E,OAAO,EAAE,+BAA+B,EAAE,MAAM,+BAA+B,CAAA;AAC/E,OAAO,EAAE,MAAM,IAAI,uBAAuB,EAAE,MAAM,uCAAuC,CAAA;AACzF,OAAO,EAAE,kCAAkC,EAAE,MAAM,cAAc,CAAA;AAEjE,OAAO,EAAE,kCAAkC,EAAE,MAAM,cAAc,CAAA;AAEjE;;;;GAIG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,GAAG,uBAAuB,CAAC,CAAA;AAYlD,+EAA+E;AAC/E,MAAM,CAAC,KAAK,UAAU,KAAK,CAAC,GAAyB;IACnD,MAAM,aAAa,GAAG,MAAM,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,CAAA;IAC3D,GAAG,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,aAAa,CAAC,CAAA;IAC/B,MAAM,MAAM,GAAG,GAAG,CAAC,GAAG,CAAC,oBAAoB,CAAkC,CAAA;IAC7E,IAAI,MAAM,KAAK,SAAS;QAAE,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAA;IACnF,MAAM,OAAO,GAAG,kCAAkC,CAAC,MAAM,CAAC,CAAA;IAC1D,GAAG,CAAC,OAAO,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAA;IAEvC,6EAA6E;IAC7E,yEAAyE;IACzE,+BAA+B,CAC7B,GAAuE,EACvE,OAAO,CACR,CAAA;IAED,wEAAwE;IACxE,2EAA2E;IAC3E,GAAG,CAAC,MAAM,CAAC,cAAc,EAAE,KAAK,CAAC,EAAE;QACjC,cAAc,CAAC,KAAwD,EAAE,OAAO,CAAC,CAAA;IACnF,CAAC,CAAC,CAAA;AACJ,CAAC"}
|
package/lib/client/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ interface ClientContextLike {
|
|
|
7
7
|
get(name: string): unknown;
|
|
8
8
|
effect(setup: () => void | (() => void), label?: string): void;
|
|
9
9
|
slots: {
|
|
10
|
-
inject(name: 'tool.call.toolview' | 'conversation.session.header.actions' | 'conversation.input.dock' | 'conversation.input.left'
|
|
10
|
+
inject(name: 'tool.call.toolview' | 'conversation.session.header.actions' | 'conversation.input.dock' | 'conversation.input.left', callback: () => unknown): void;
|
|
11
11
|
register(descriptor: Record<string, unknown>, component: ComponentType<any>): unknown;
|
|
12
12
|
};
|
|
13
13
|
}
|
package/lib/client/index.js
CHANGED
|
@@ -5,7 +5,6 @@ import { WORKTREE_STYLES } from './styles.js';
|
|
|
5
5
|
import { registerPreSessionWorktree } from './pre-session/index.js';
|
|
6
6
|
import { registerTargetConsole } from './target-console/index.js';
|
|
7
7
|
import { TARGET_CONSOLE_STYLES } from './target-console/target-console.styles.js';
|
|
8
|
-
import { registerManagedWorkspaceSidebar } from './workspace-sidebar/index.js';
|
|
9
8
|
export { registerTargetConsole } from './target-console/index.js';
|
|
10
9
|
export const WORKTREE_CONSOLE_ADAPTER_SERVICE = 'worktreeConsole';
|
|
11
10
|
/** Required client services. */
|
|
@@ -40,7 +39,6 @@ export function apply(ctx, adapterOverride) {
|
|
|
40
39
|
if (adapter !== undefined) {
|
|
41
40
|
registerTargetConsole({ slots: ctx.slots }, adapter, services);
|
|
42
41
|
registerPreSessionWorktree({ slots: ctx.slots }, adapter, services);
|
|
43
|
-
registerManagedWorkspaceSidebar(ctx, adapter);
|
|
44
42
|
}
|
|
45
43
|
}
|
|
46
44
|
//# sourceMappingURL=index.js.map
|
package/lib/client/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/client/index.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAC7C,OAAO,EAAE,0BAA0B,EAAkC,MAAM,wBAAwB,CAAA;AACnG,OAAO,EAAE,qBAAqB,EAAiC,MAAM,2BAA2B,CAAA;AAChG,OAAO,EAAE,qBAAqB,EAAE,MAAM,2CAA2C,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/client/index.tsx"],"names":[],"mappings":"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"}
|
package/lib/client.js
CHANGED
|
@@ -9671,6 +9671,61 @@ const TARGET_CONSOLE_STYLES = String.raw`
|
|
|
9671
9671
|
}
|
|
9672
9672
|
`;
|
|
9673
9673
|
|
|
9674
|
+
//#endregion
|
|
9675
|
+
//#region src/client/index.tsx
|
|
9676
|
+
const WORKTREE_CONSOLE_ADAPTER_SERVICE = "worktreeConsole";
|
|
9677
|
+
/** Required client services. */
|
|
9678
|
+
const inject$1 = [
|
|
9679
|
+
"slots",
|
|
9680
|
+
"workspaces",
|
|
9681
|
+
"sessions",
|
|
9682
|
+
"conversation",
|
|
9683
|
+
"connection",
|
|
9684
|
+
"locale"
|
|
9685
|
+
];
|
|
9686
|
+
function servicesOf(ctx) {
|
|
9687
|
+
return {
|
|
9688
|
+
workspaces: ctx.get("workspaces"),
|
|
9689
|
+
sessions: ctx.get("sessions"),
|
|
9690
|
+
conversation: ctx.get("conversation")
|
|
9691
|
+
};
|
|
9692
|
+
}
|
|
9693
|
+
/** Register replay-stable keyed rows and one scoped stylesheet. */
|
|
9694
|
+
function apply$1(ctx, adapterOverride) {
|
|
9695
|
+
const services = servicesOf(ctx);
|
|
9696
|
+
const adapter = adapterOverride ?? ctx.get(WORKTREE_CONSOLE_ADAPTER_SERVICE);
|
|
9697
|
+
ctx.effect(() => {
|
|
9698
|
+
const style = document.createElement("style");
|
|
9699
|
+
style.dataset.dshGitWorktree = "true";
|
|
9700
|
+
style.textContent = `${WORKTREE_STYLES}\n${TARGET_CONSOLE_STYLES}`;
|
|
9701
|
+
document.head.append(style);
|
|
9702
|
+
return () => {
|
|
9703
|
+
style.remove();
|
|
9704
|
+
};
|
|
9705
|
+
}, "dsh-git-worktree: styles");
|
|
9706
|
+
const CreateRow = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(WorktreeCreateRow, {
|
|
9707
|
+
...props,
|
|
9708
|
+
services
|
|
9709
|
+
});
|
|
9710
|
+
const ReviewRow = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(WorktreeReviewRow, {
|
|
9711
|
+
...props,
|
|
9712
|
+
services,
|
|
9713
|
+
adapter
|
|
9714
|
+
});
|
|
9715
|
+
ctx.slots.inject("tool.call.toolview", () => ctx.slots.register({
|
|
9716
|
+
name: "tool.call.toolview",
|
|
9717
|
+
key: "worktree_create"
|
|
9718
|
+
}, CreateRow));
|
|
9719
|
+
ctx.slots.inject("tool.call.toolview", () => ctx.slots.register({
|
|
9720
|
+
name: "tool.call.toolview",
|
|
9721
|
+
key: "worktree_ready_for_review"
|
|
9722
|
+
}, ReviewRow));
|
|
9723
|
+
if (adapter !== void 0) {
|
|
9724
|
+
registerTargetConsole({ slots: ctx.slots }, adapter, services);
|
|
9725
|
+
registerPreSessionWorktree({ slots: ctx.slots }, adapter, services);
|
|
9726
|
+
}
|
|
9727
|
+
}
|
|
9728
|
+
|
|
9674
9729
|
//#endregion
|
|
9675
9730
|
//#region \0virtual:dsh-official-workspace-client
|
|
9676
9731
|
const modules = {
|
|
@@ -12667,62 +12722,6 @@ function registerManagedWorkspaceSidebar(ctx, adapter) {
|
|
|
12667
12722
|
apply$2(officialContextProxy(ctx, adapter));
|
|
12668
12723
|
}
|
|
12669
12724
|
|
|
12670
|
-
//#endregion
|
|
12671
|
-
//#region src/client/index.tsx
|
|
12672
|
-
const WORKTREE_CONSOLE_ADAPTER_SERVICE = "worktreeConsole";
|
|
12673
|
-
/** Required client services. */
|
|
12674
|
-
const inject$1 = [
|
|
12675
|
-
"slots",
|
|
12676
|
-
"workspaces",
|
|
12677
|
-
"sessions",
|
|
12678
|
-
"conversation",
|
|
12679
|
-
"connection",
|
|
12680
|
-
"locale"
|
|
12681
|
-
];
|
|
12682
|
-
function servicesOf(ctx) {
|
|
12683
|
-
return {
|
|
12684
|
-
workspaces: ctx.get("workspaces"),
|
|
12685
|
-
sessions: ctx.get("sessions"),
|
|
12686
|
-
conversation: ctx.get("conversation")
|
|
12687
|
-
};
|
|
12688
|
-
}
|
|
12689
|
-
/** Register replay-stable keyed rows and one scoped stylesheet. */
|
|
12690
|
-
function apply$1(ctx, adapterOverride) {
|
|
12691
|
-
const services = servicesOf(ctx);
|
|
12692
|
-
const adapter = adapterOverride ?? ctx.get(WORKTREE_CONSOLE_ADAPTER_SERVICE);
|
|
12693
|
-
ctx.effect(() => {
|
|
12694
|
-
const style = document.createElement("style");
|
|
12695
|
-
style.dataset.dshGitWorktree = "true";
|
|
12696
|
-
style.textContent = `${WORKTREE_STYLES}\n${TARGET_CONSOLE_STYLES}`;
|
|
12697
|
-
document.head.append(style);
|
|
12698
|
-
return () => {
|
|
12699
|
-
style.remove();
|
|
12700
|
-
};
|
|
12701
|
-
}, "dsh-git-worktree: styles");
|
|
12702
|
-
const CreateRow = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(WorktreeCreateRow, {
|
|
12703
|
-
...props,
|
|
12704
|
-
services
|
|
12705
|
-
});
|
|
12706
|
-
const ReviewRow = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(WorktreeReviewRow, {
|
|
12707
|
-
...props,
|
|
12708
|
-
services,
|
|
12709
|
-
adapter
|
|
12710
|
-
});
|
|
12711
|
-
ctx.slots.inject("tool.call.toolview", () => ctx.slots.register({
|
|
12712
|
-
name: "tool.call.toolview",
|
|
12713
|
-
key: "worktree_create"
|
|
12714
|
-
}, CreateRow));
|
|
12715
|
-
ctx.slots.inject("tool.call.toolview", () => ctx.slots.register({
|
|
12716
|
-
name: "tool.call.toolview",
|
|
12717
|
-
key: "worktree_ready_for_review"
|
|
12718
|
-
}, ReviewRow));
|
|
12719
|
-
if (adapter !== void 0) {
|
|
12720
|
-
registerTargetConsole({ slots: ctx.slots }, adapter, services);
|
|
12721
|
-
registerPreSessionWorktree({ slots: ctx.slots }, adapter, services);
|
|
12722
|
-
registerManagedWorkspaceSidebar(ctx, adapter);
|
|
12723
|
-
}
|
|
12724
|
-
}
|
|
12725
|
-
|
|
12726
12725
|
//#endregion
|
|
12727
12726
|
//#region src/client/console-remote/adapter.ts
|
|
12728
12727
|
function transport(message) {
|
|
@@ -12798,7 +12797,12 @@ function createWorktreeConsoleRemoteAdapter(remote) {
|
|
|
12798
12797
|
|
|
12799
12798
|
//#endregion
|
|
12800
12799
|
//#region src/client/console-remote/index.ts
|
|
12801
|
-
|
|
12800
|
+
/**
|
|
12801
|
+
* Activate on the same prerequisites as the official Workspace Client. The
|
|
12802
|
+
* conversation-dependent Worktree surfaces run in a child fiber below so the
|
|
12803
|
+
* Workspace service can break the uiConversation -> uiWorkspace boot edge.
|
|
12804
|
+
*/
|
|
12805
|
+
const inject = [...inject$2];
|
|
12802
12806
|
/** Mount the package-owned strict Remote contribution in this Client fiber. */
|
|
12803
12807
|
async function apply(ctx) {
|
|
12804
12808
|
const disposeRemote = await ctx.remote.$mount(remote_default);
|
|
@@ -12807,7 +12811,10 @@ async function apply(ctx) {
|
|
|
12807
12811
|
if (remote === void 0) throw new Error("Worktree Console Remote namespace 挂载失败");
|
|
12808
12812
|
const adapter = createWorktreeConsoleRemoteAdapter(remote);
|
|
12809
12813
|
ctx.provide("worktreeConsole", adapter);
|
|
12810
|
-
|
|
12814
|
+
registerManagedWorkspaceSidebar(ctx, adapter);
|
|
12815
|
+
ctx.inject(inject$1, (child) => {
|
|
12816
|
+
apply$1(child, adapter);
|
|
12817
|
+
});
|
|
12811
12818
|
}
|
|
12812
12819
|
|
|
12813
12820
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-git-worktree",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.4",
|
|
4
4
|
"description": "Experimental Git worktree Session Targets for DeepSeek Harness with isolated sessions, review checkpoints, human-confirmed delivery, and safe recovery.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -211,8 +211,10 @@ if (!clientExports || typeof clientExports.apply !== 'function' || !Array.isArra
|
|
|
211
211
|
fail('client bundle factory did not return apply + inject')
|
|
212
212
|
}
|
|
213
213
|
if (!clientExports.inject.includes('remote')) fail('client bundle must inject the official Remote service before $mount')
|
|
214
|
-
if (!clientExports.inject.includes('
|
|
215
|
-
|
|
214
|
+
if (!clientExports.inject.includes('remote.directoryPicker')) fail('client bundle must wait for the official directory-picker Remote before restoring uiWorkspace')
|
|
215
|
+
if (clientExports.inject.includes('conversation')) fail('client bundle root must not wait for conversation: uiConversation depends on the uiWorkspace restored by this plugin')
|
|
216
|
+
if (clientExports.inject.includes('connection')) fail('client bundle root must keep connection-dependent Worktree views in the deferred child fiber')
|
|
217
|
+
ok(`${clientRel} registers ${manifest.name} through the browser ModuleLoader contract without a uiWorkspace/uiConversation boot cycle`)
|
|
216
218
|
|
|
217
219
|
// 7. Release CI and npm's prepublish lifecycle require committed source identity;
|
|
218
220
|
// local review builds intentionally run against a dirty managed Worktree.
|