dsh-git-worktree 0.10.0 → 0.12.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 +61 -1
- package/README.en.md +27 -17
- package/README.md +27 -17
- package/lib/adapters/git.js +45 -8
- package/lib/adapters/git.js.map +1 -1
- package/lib/adapters/project-skill-io.js +7 -1
- package/lib/adapters/project-skill-io.js.map +1 -1
- package/lib/adapters/project-skill-snapshot.d.ts +10 -0
- package/lib/adapters/project-skill-snapshot.js +182 -0
- package/lib/adapters/project-skill-snapshot.js.map +1 -0
- package/lib/adapters/project-skills.d.ts +18 -3
- package/lib/adapters/project-skills.js +102 -13
- package/lib/adapters/project-skills.js.map +1 -1
- package/lib/adapters/registry.js +4 -32
- package/lib/adapters/registry.js.map +1 -1
- package/lib/client/WorktreeCreateRow.js +14 -2
- package/lib/client/WorktreeCreateRow.js.map +1 -1
- package/lib/client/actions.d.ts +34 -1
- package/lib/client/actions.js +41 -0
- package/lib/client/actions.js.map +1 -1
- package/lib/client/index.d.ts +6 -1
- package/lib/client/index.js +11 -2
- package/lib/client/index.js.map +1 -1
- package/lib/client/pre-session/controller.js +5 -0
- package/lib/client/pre-session/controller.js.map +1 -1
- package/lib/client/review-console/PreflightStatus.js +5 -2
- package/lib/client/review-console/PreflightStatus.js.map +1 -1
- package/lib/client/review-console/ReviewActions.js +47 -46
- package/lib/client/review-console/ReviewActions.js.map +1 -1
- package/lib/client/review-console/ReviewDetailsModal.js +13 -3
- package/lib/client/review-console/ReviewDetailsModal.js.map +1 -1
- package/lib/client/review-console/review-console.styles.js +22 -11
- package/lib/client/review-console/review-console.styles.js.map +1 -1
- package/lib/client/target-console/TargetStatusAction.js +11 -9
- package/lib/client/target-console/TargetStatusAction.js.map +1 -1
- package/lib/client/target-console/WorktreeReviewStatus.js +7 -7
- package/lib/client/target-console/WorktreeReviewStatus.js.map +1 -1
- package/lib/client/workspace-desktop.d.ts +15 -0
- package/lib/client/workspace-desktop.js +95 -0
- package/lib/client/workspace-desktop.js.map +1 -0
- package/lib/client/workspace-sidebar/index.js +6 -3
- package/lib/client/workspace-sidebar/index.js.map +1 -1
- package/lib/client.js +1598 -454
- package/lib/commit-message.d.ts +2 -0
- package/lib/commit-message.js +5 -0
- package/lib/commit-message.js.map +1 -0
- package/lib/console-host/control-plane.js +6 -5
- package/lib/console-host/control-plane.js.map +1 -1
- package/lib/console-host/review-diff.js +9 -4
- package/lib/console-host/review-diff.js.map +1 -1
- package/lib/console-remote/schemas.d.ts +1 -1
- package/lib/console-remote/schemas.js +2 -1
- package/lib/console-remote/schemas.js.map +1 -1
- package/lib/creation-failure.d.ts +6 -0
- package/lib/creation-failure.js +9 -0
- package/lib/creation-failure.js.map +1 -1
- package/lib/host-compat.js +2 -1
- package/lib/host-compat.js.map +1 -1
- package/lib/i18n/client-messages.d.ts +16 -4
- package/lib/i18n/client-messages.js +5 -5
- package/lib/i18n/client-messages.js.map +1 -1
- package/lib/i18n/host-messages.d.ts +3 -7
- package/lib/i18n/host-messages.js +3 -7
- package/lib/i18n/host-messages.js.map +1 -1
- package/lib/index.d.ts +9 -9
- package/lib/ports.d.ts +1 -1
- package/lib/session-checkout-apply.js +12 -8
- package/lib/session-checkout-apply.js.map +1 -1
- package/lib/session-checkout-module.js +16 -8
- package/lib/session-checkout-module.js.map +1 -1
- package/lib/workspace-provider-lifecycle.js +31 -6
- package/lib/workspace-provider-lifecycle.js.map +1 -1
- package/package.json +43 -41
- package/scripts/check-publish.mjs +2 -0
- package/scripts/workspace-sidebar-resources.mjs +25 -0
- package/scripts/workspace-sidebar-upstream-alpha.mjs +18 -15
- package/scripts/workspace-sidebar-upstream-next.mjs +14 -17
- package/scripts/workspace-sidebar-upstream.mjs +20 -5
|
@@ -48,7 +48,12 @@ export function mountWorkspaceProviderLifecycle(ctx, flavor = hostWorkspaceClien
|
|
|
48
48
|
const label = kind === 'disable' ? 'official Workspace disable' : 'official Workspace restore';
|
|
49
49
|
let operation;
|
|
50
50
|
try {
|
|
51
|
-
|
|
51
|
+
const fiber = entry.fiber;
|
|
52
|
+
operation = kind === 'disable'
|
|
53
|
+
? entry.update({}, false, true).then(() => fiber?.await())
|
|
54
|
+
// Loader 1.0.6 retains disposed fibers; refresh() treats any reference
|
|
55
|
+
// as running, whereas init() replaces the dead generation.
|
|
56
|
+
: fiber?.uid === null ? entry.init() : entry.refresh();
|
|
52
57
|
}
|
|
53
58
|
catch (error) {
|
|
54
59
|
ctx.logger.warn(`dsh-git-worktree: ${label} threw during Loader reconciliation`, error);
|
|
@@ -97,20 +102,40 @@ export function mountWorkspaceProviderLifecycle(ctx, flavor = hostWorkspaceClien
|
|
|
97
102
|
});
|
|
98
103
|
return pending;
|
|
99
104
|
};
|
|
105
|
+
const releaseMarker = ctx.provide('worktreeWorkspaceProvider', true);
|
|
100
106
|
ctx.effect(() => async () => {
|
|
101
107
|
released = true;
|
|
108
|
+
// Cordis 4.0.5 unloads effects concurrently, not in LIFO order. Explicitly
|
|
109
|
+
// withdraw the marker before evaluating the official disabled expression.
|
|
110
|
+
await releaseMarker();
|
|
111
|
+
// Loader retains failed/disposed fibers and the Web registry only checks
|
|
112
|
+
// the entry reference, not fiber state. Withdraw this generation alone and
|
|
113
|
+
// publish the same owning-fiber event the registry consumes on disposal.
|
|
114
|
+
// A later activation must never be cleared by this generation's cleanup.
|
|
115
|
+
const withdraw = () => {
|
|
116
|
+
const replacement = ctx.fiber.entry;
|
|
117
|
+
if (replacement?.fiber !== ctx.fiber)
|
|
118
|
+
return;
|
|
119
|
+
replacement.fiber = undefined;
|
|
120
|
+
ctx.emit('internal/plugin', ctx.fiber);
|
|
121
|
+
};
|
|
122
|
+
if (ctx.fiber.uid === null)
|
|
123
|
+
withdraw();
|
|
124
|
+
// A restart also unloads effects, but reuses its live fiber. Only withdraw
|
|
125
|
+
// that reference if activation actually failed, after unload settles.
|
|
126
|
+
// Do not await our own cleanup from inside this disposer.
|
|
127
|
+
else
|
|
128
|
+
void ctx.fiber.await().catch(withdraw);
|
|
102
129
|
// Root/Include teardown owns these entries; do not resurrect that tree.
|
|
103
130
|
if (ctx.root.fiber.uid === null || ctx.root.fiber.state === UNLOADING)
|
|
104
131
|
return;
|
|
105
132
|
await pending.catch(() => { });
|
|
106
133
|
for (const entry of owned()) {
|
|
107
|
-
if (entry.parent.ctx.fiber.uid !== null && entry.parent.ctx.fiber.state !== UNLOADING && !entry.disabled
|
|
108
|
-
|
|
134
|
+
if (entry.parent.ctx.fiber.uid !== null && entry.parent.ctx.fiber.state !== UNLOADING && !entry.disabled
|
|
135
|
+
&& !inFlight.has(entry.id))
|
|
136
|
+
await operate(entry, 'restore');
|
|
109
137
|
}
|
|
110
138
|
});
|
|
111
|
-
// Registered after the fallback so LIFO teardown releases the selection
|
|
112
|
-
// before restoring Workspace, including when the replacement apply fails.
|
|
113
|
-
ctx.provide('worktreeWorkspaceProvider', true);
|
|
114
139
|
// Includes may add the official row after the replacement has activated.
|
|
115
140
|
ctx.on('internal/status', fiber => {
|
|
116
141
|
if (fiber === ctx.fiber && !released) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-provider-lifecycle.js","sourceRoot":"","sources":["../src/workspace-provider-lifecycle.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAA8B,MAAM,kBAAkB,CAAA;AAExF,MAAM,CAAC,MAAM,4BAA4B,GAAG,0IAA0I,CAAA;AAOtL,MAAM,kBAAkB,GAAG,sCAAsC,CAAA;AACjE,+EAA+E;AAC/E,MAAM,SAAS,GAAe,CAAC,CAAA;AAC/B,2EAA2E;AAC3E,wEAAwE;AACxE,4EAA4E;AAC5E,iEAAiE;AACjE,MAAM,4BAA4B,GAAG,MAAM,CAAA;AAQ3C;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,+BAA+B,CAC7C,GAAY,EACZ,SAAgC,yBAAyB,EAAE,EAC3D,UAA6C,EAAE;IAE/C,IAAI,MAAM,KAAK,aAA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"version": "0.12.0",
|
|
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",
|
|
@@ -50,7 +50,8 @@
|
|
|
50
50
|
"@deepseek-ai/dsh-client-locale",
|
|
51
51
|
"@deepseek-ai/dsh-client-ui-conversation",
|
|
52
52
|
"@deepseek-ai/dsh-client-ui-tool",
|
|
53
|
-
"@deepseek-ai/dsh-api-gateway"
|
|
53
|
+
"@deepseek-ai/dsh-api-gateway",
|
|
54
|
+
"@deepseek-ai/dsh-api-remote-access"
|
|
54
55
|
],
|
|
55
56
|
"platform": "web"
|
|
56
57
|
}
|
|
@@ -81,54 +82,55 @@
|
|
|
81
82
|
"prepublishOnly": "pnpm run check:sidebar-version && pnpm run build && pnpm run check:publish:release && pnpm run test"
|
|
82
83
|
},
|
|
83
84
|
"dependencies": {
|
|
84
|
-
"@deepseek-ai/schemastery": "3.18.
|
|
85
|
+
"@deepseek-ai/schemastery": "3.18.5",
|
|
85
86
|
"lucide-react": "1.43.0",
|
|
86
87
|
"zod": "4.4.3"
|
|
87
88
|
},
|
|
88
89
|
"peerDependencies": {
|
|
89
|
-
"@deepseek-ai/cordis": "
|
|
90
|
-
"@deepseek-ai/cordis-plugin-loader": "
|
|
91
|
-
"@deepseek-ai/dsh-agent": "0.2.
|
|
92
|
-
"@deepseek-ai/dsh-client-locale": "0.2.
|
|
93
|
-
"@deepseek-ai/dsh-commands": "0.2.
|
|
94
|
-
"@deepseek-ai/dsh-fs": "0.2.
|
|
95
|
-
"@deepseek-ai/dsh-session": "0.2.
|
|
96
|
-
"@deepseek-ai/dsh-skill": "0.2.
|
|
97
|
-
"@deepseek-ai/dsh-skill-filesystem": "0.2.
|
|
98
|
-
"@deepseek-ai/dsh-subprocess": "0.2.
|
|
99
|
-
"@deepseek-ai/dsh-system-prompt": "0.2.
|
|
100
|
-
"@deepseek-ai/dsh-tools": "0.2.
|
|
101
|
-
"@deepseek-ai/dsh-typert-protocol": "0.2.
|
|
102
|
-
"@deepseek-ai/dsh-typert-registry": "0.2.
|
|
90
|
+
"@deepseek-ai/cordis": "~4.0.5",
|
|
91
|
+
"@deepseek-ai/cordis-plugin-loader": "~1.0.6",
|
|
92
|
+
"@deepseek-ai/dsh-agent": ">=0.2.1-rc.2",
|
|
93
|
+
"@deepseek-ai/dsh-client-locale": ">=0.2.1-rc.2",
|
|
94
|
+
"@deepseek-ai/dsh-commands": ">=0.2.1-rc.2",
|
|
95
|
+
"@deepseek-ai/dsh-fs": ">=0.2.1-rc.2",
|
|
96
|
+
"@deepseek-ai/dsh-session": ">=0.2.1-rc.2",
|
|
97
|
+
"@deepseek-ai/dsh-skill": ">=0.2.1-rc.2",
|
|
98
|
+
"@deepseek-ai/dsh-skill-filesystem": ">=0.2.1-rc.2",
|
|
99
|
+
"@deepseek-ai/dsh-subprocess": ">=0.2.1-rc.2",
|
|
100
|
+
"@deepseek-ai/dsh-system-prompt": ">=0.2.1-rc.2",
|
|
101
|
+
"@deepseek-ai/dsh-tools": ">=0.2.1-rc.2",
|
|
102
|
+
"@deepseek-ai/dsh-typert-protocol": ">=0.2.1-rc.2",
|
|
103
|
+
"@deepseek-ai/dsh-typert-registry": ">=0.2.1-rc.2",
|
|
103
104
|
"react": "^18.2.0"
|
|
104
105
|
},
|
|
105
106
|
"devDependencies": {
|
|
106
|
-
"@deepseek-ai/cordis": "4.0.
|
|
107
|
-
"@deepseek-ai/cordis-plugin-include": "1.0.
|
|
108
|
-
"@deepseek-ai/cordis-plugin-loader": "1.0.
|
|
109
|
-
"@deepseek-ai/dsh-agent": "0.2.
|
|
110
|
-
"@deepseek-ai/dsh-api-gateway": "0.2.
|
|
111
|
-
"@deepseek-ai/dsh-api-
|
|
112
|
-
"@deepseek-ai/dsh-api-
|
|
113
|
-
"@deepseek-ai/dsh-
|
|
114
|
-
"@deepseek-ai/dsh-client-
|
|
115
|
-
"@deepseek-ai/dsh-client-
|
|
116
|
-
"@deepseek-ai/dsh-client-
|
|
117
|
-
"@deepseek-ai/dsh-client-
|
|
118
|
-
"@deepseek-ai/dsh-client-ui-
|
|
107
|
+
"@deepseek-ai/cordis": "4.0.5",
|
|
108
|
+
"@deepseek-ai/cordis-plugin-include": "1.0.10",
|
|
109
|
+
"@deepseek-ai/cordis-plugin-loader": "1.0.6",
|
|
110
|
+
"@deepseek-ai/dsh-agent": "0.2.1-rc.2",
|
|
111
|
+
"@deepseek-ai/dsh-api-gateway": "0.2.1-rc.2",
|
|
112
|
+
"@deepseek-ai/dsh-api-remote-access": "0.2.1-rc.2",
|
|
113
|
+
"@deepseek-ai/dsh-api-session-controller": "0.2.1-rc.2",
|
|
114
|
+
"@deepseek-ai/dsh-api-workspace-controller": "0.2.1-rc.2",
|
|
115
|
+
"@deepseek-ai/dsh-client-connection": "0.2.1-rc.2",
|
|
116
|
+
"@deepseek-ai/dsh-client-locale": "0.2.1-rc.2",
|
|
117
|
+
"@deepseek-ai/dsh-client-modules": "0.2.1-rc.2",
|
|
118
|
+
"@deepseek-ai/dsh-client-store": "0.2.1-rc.2",
|
|
119
|
+
"@deepseek-ai/dsh-client-ui-primitives": "0.2.1-rc.2",
|
|
120
|
+
"@deepseek-ai/dsh-client-ui-workspace": "0.2.1-rc.2",
|
|
119
121
|
"@deepseek-ai/dsh-client-ui-workspace-alpha": "npm:@deepseek-ai/dsh-client-ui-workspace@0.1.6-alpha.2",
|
|
120
122
|
"@deepseek-ai/dsh-client-ui-workspace-next": "npm:@deepseek-ai/dsh-client-ui-workspace@0.1.7-rc.2",
|
|
121
|
-
"@deepseek-ai/dsh-commands": "0.2.
|
|
122
|
-
"@deepseek-ai/dsh-fs": "0.2.
|
|
123
|
-
"@deepseek-ai/dsh-session": "0.2.
|
|
124
|
-
"@deepseek-ai/dsh-skill": "0.2.
|
|
125
|
-
"@deepseek-ai/dsh-skill-filesystem": "0.2.
|
|
126
|
-
"@deepseek-ai/dsh-subprocess": "0.2.
|
|
127
|
-
"@deepseek-ai/dsh-system-prompt": "0.2.
|
|
128
|
-
"@deepseek-ai/dsh-tools": "0.2.
|
|
129
|
-
"@deepseek-ai/dsh-typert-loader": "0.2.
|
|
130
|
-
"@deepseek-ai/dsh-typert-protocol": "0.2.
|
|
131
|
-
"@deepseek-ai/dsh-typert-registry": "0.2.
|
|
123
|
+
"@deepseek-ai/dsh-commands": "0.2.1-rc.2",
|
|
124
|
+
"@deepseek-ai/dsh-fs": "0.2.1-rc.2",
|
|
125
|
+
"@deepseek-ai/dsh-session": "0.2.1-rc.2",
|
|
126
|
+
"@deepseek-ai/dsh-skill": "0.2.1-rc.2",
|
|
127
|
+
"@deepseek-ai/dsh-skill-filesystem": "0.2.1-rc.2",
|
|
128
|
+
"@deepseek-ai/dsh-subprocess": "0.2.1-rc.2",
|
|
129
|
+
"@deepseek-ai/dsh-system-prompt": "0.2.1-rc.2",
|
|
130
|
+
"@deepseek-ai/dsh-tools": "0.2.1-rc.2",
|
|
131
|
+
"@deepseek-ai/dsh-typert-loader": "0.2.1-rc.2",
|
|
132
|
+
"@deepseek-ai/dsh-typert-protocol": "0.2.1-rc.2",
|
|
133
|
+
"@deepseek-ai/dsh-typert-registry": "0.2.1-rc.2",
|
|
132
134
|
"@testing-library/react": "^16.3.2",
|
|
133
135
|
"@types/node": "^22.0.0",
|
|
134
136
|
"@types/react": "~18.3.31",
|
|
@@ -161,6 +161,7 @@ if (!client || client.platform !== 'web' || !Array.isArray(client.inject) || cli
|
|
|
161
161
|
fail('package.json must declare dsh.client { platform: "web", inject: [...] }')
|
|
162
162
|
}
|
|
163
163
|
const requiredClientPackages = [
|
|
164
|
+
'@deepseek-ai/dsh-api-remote-access',
|
|
164
165
|
'@deepseek-ai/dsh-api-session-controller',
|
|
165
166
|
'@deepseek-ai/dsh-api-workspace-controller',
|
|
166
167
|
'@deepseek-ai/dsh-client-ui-conversation',
|
|
@@ -216,6 +217,7 @@ try {
|
|
|
216
217
|
if (!clientExports || typeof clientExports.apply !== 'function' || !Array.isArray(clientExports.inject)) {
|
|
217
218
|
fail('client bundle factory did not return apply + inject')
|
|
218
219
|
}
|
|
220
|
+
if (!clientExports.inject.includes('remoteAccess')) fail('client bundle must inject the official remoteAccess service')
|
|
219
221
|
if (!clientExports.inject.includes('remote')) fail('client bundle must inject the official Remote service before $mount')
|
|
220
222
|
if (clientExports.inject.includes('remote.directoryPicker')) fail('client bundle entry must not wait for the directory-picker Remote: its provider entry waits for uiWorkspace, so requiring it here deadlocks the 0.2.x web boot')
|
|
221
223
|
if (!clientSource.includes("'remote.directoryPicker'") && !clientSource.includes('"remote.directoryPicker"')) fail('client bundle must resolve the directory-picker lazily at call time through the managed context (deferred facade)')
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const UPSTREAM_OWNER = '@deepseek-ai/dsh-client-ui-workspace'
|
|
2
|
+
const DERIVED_OWNER = 'dsh-git-worktree'
|
|
3
|
+
|
|
4
|
+
/** Embedded factories must not share CSS deduplication or cleanup identity.
|
|
5
|
+
* All variants materialize eagerly, even though only one Browser is applied.
|
|
6
|
+
* Keep the pinned CSS bytes/class maps; change only resource ownership/keys.
|
|
7
|
+
*/
|
|
8
|
+
export function ownWorkspaceStyles(source, version, expectedStyles) {
|
|
9
|
+
let keys = 0
|
|
10
|
+
let owners = 0
|
|
11
|
+
const derived = source
|
|
12
|
+
.replace(/const tagId(\$\d+)? = "@deepseek-ai\/dsh-client-ui-workspace\/([^"/]+\.module\.css)";/gu,
|
|
13
|
+
(_match, suffix = '', file) => {
|
|
14
|
+
keys++
|
|
15
|
+
return `const tagId${suffix} = ${JSON.stringify(`${DERIVED_OWNER}/workspace-${version}/${file}`)};`
|
|
16
|
+
})
|
|
17
|
+
.replaceAll(`tag.dataset.plugin = "${UPSTREAM_OWNER}";`, () => {
|
|
18
|
+
owners++
|
|
19
|
+
return `tag.dataset.plugin = "${DERIVED_OWNER}";`
|
|
20
|
+
})
|
|
21
|
+
if (keys !== expectedStyles || owners !== expectedStyles) {
|
|
22
|
+
throw new Error(`Cannot derive Workspace ${version} CSS ownership: expected ${expectedStyles} keys/owners, got ${keys}/${owners}`)
|
|
23
|
+
}
|
|
24
|
+
return derived
|
|
25
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { createHash } from 'node:crypto'
|
|
2
2
|
import { readFileSync } from 'node:fs'
|
|
3
3
|
import { createRequire } from 'node:module'
|
|
4
|
+
import { ownWorkspaceStyles } from './workspace-sidebar-resources.mjs'
|
|
4
5
|
import { materializeWorkspaceFactory } from './workspace-sidebar-upstream-next.mjs'
|
|
5
6
|
|
|
6
7
|
export const ALPHA_WORKSPACE_VERSION = '0.1.6-alpha.2'
|
|
@@ -43,26 +44,23 @@ export function decorateAlphaWorkspaceClient(source) {
|
|
|
43
44
|
'\t\t\t\t\tlabel: g.label,\n\t\t\t\t\t...g.__dshGitWorktreeProtected === true ? { __dshGitWorktreeProtected: true } : {},\n\t\t\t\t\tsessionCount: g.sessions.length,',
|
|
44
45
|
'protected workspace row',
|
|
45
46
|
)
|
|
47
|
+
// Cordis Service derives its own Context; capture the instance-local guard
|
|
48
|
+
// from the constructor argument rather than looking it up on this.ctx later.
|
|
46
49
|
replace(
|
|
47
|
-
'\t\t\
|
|
48
|
-
'\t\t\
|
|
49
|
-
'managed
|
|
50
|
+
'\t\t\t\tsuper(ctx, "uiWorkspace");\n\t\t\t\tthis.directoryPicker = directoryPicker;',
|
|
51
|
+
'\t\t\t\tsuper(ctx, "uiWorkspace");\n\t\t\t\tthis.managedWorktreeGuard = ctx.get("__dshGitWorktreeManagedGuard");\n\t\t\t\tthis.directoryPicker = directoryPicker;',
|
|
52
|
+
'instance-local managed guard',
|
|
50
53
|
)
|
|
51
54
|
replace(
|
|
52
|
-
'\t\t\tasync
|
|
53
|
-
'\t\t\tasync
|
|
54
|
-
'managed Session
|
|
55
|
+
'\t\t\tasync forkSession(sessionId) {\n\t\t\t\tconst navigation = AbortSignal.any([this.ctx.layout.beginNavigation(), this.lifetime.signal]);',
|
|
56
|
+
'\t\t\tasync forkSession(sessionId) {\n\t\t\t\tif (this.managedWorktreeGuard.blockSession(sessionId)) throw new Error("managed Session must be changed through its Worktree owner");\n\t\t\t\tconst navigation = AbortSignal.any([this.ctx.layout.beginNavigation(), this.lifetime.signal]);',
|
|
57
|
+
'managed Session fork',
|
|
55
58
|
)
|
|
56
59
|
replace(
|
|
57
60
|
'\t\t\t\tconst target = workspaceId ?? currentWorkspaceId ?? recent;\n\t\t\t\tif (target === void 0) {',
|
|
58
|
-
'\t\t\t\tconst target = workspaceId ?? currentWorkspaceId ?? recent;\n\t\t\t\tif (target !== void 0 && this.
|
|
61
|
+
'\t\t\t\tconst target = workspaceId ?? currentWorkspaceId ?? recent;\n\t\t\t\tif (target !== void 0 && this.managedWorktreeGuard.blockWorkspace(target)) return;\n\t\t\t\tif (target === void 0) {',
|
|
59
62
|
'managed Workspace new Session shortcut',
|
|
60
63
|
)
|
|
61
|
-
replace(
|
|
62
|
-
'\t\t\t\trenameSession: async (sessionId, title) => {\n\t\t\t\t\tconst result = await sessions.using(',
|
|
63
|
-
'\t\t\t\trenameSession: async (sessionId, title) => {\n\t\t\t\t\tif (ctx.get("__dshGitWorktreeManagedGuard").blockSession(sessionId)) throw new Error("managed Session must be changed through its Worktree owner");\n\t\t\t\t\tconst result = await sessions.using(',
|
|
64
|
-
'managed Session rename',
|
|
65
|
-
)
|
|
66
64
|
replace(
|
|
67
65
|
'\t\t\t\tupdatedAt: s.updatedAt,\n\t\t\t\t...pendingInteraction === void 0 ? {} : { pendingInteraction }',
|
|
68
66
|
'\t\t\t\tupdatedAt: s.updatedAt,\n\t\t\t\t__dshGitWorktree: s.__dshGitWorktree,\n\t\t\t\t...pendingInteraction === void 0 ? {} : { pendingInteraction }',
|
|
@@ -83,7 +81,12 @@ export function decorateAlphaWorkspaceClient(source) {
|
|
|
83
81
|
'managed Session row guard',
|
|
84
82
|
)
|
|
85
83
|
replace('\t\t\tconst draggable = drag !== void 0 && !row.blank;', '\t\t\tconst draggable = drag !== void 0 && !row.blank && !protectedManagedSession;', 'managed Session drag')
|
|
86
|
-
replace(
|
|
84
|
+
replace(
|
|
85
|
+
'\t\t\t];\n\t\t\treturn (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.HoverCard, {',
|
|
86
|
+
'\t\t\t];\n\t\t\tconst visibleSessionMenuItems = protectedManagedSession ? sessionMenuItems.filter((item) => item.id !== "fork") : sessionMenuItems;\n\t\t\treturn (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.HoverCard, {',
|
|
87
|
+
'managed Session safe menu items',
|
|
88
|
+
)
|
|
89
|
+
replace('\t\t\t\t\t\t\t\titems: sessionMenuItems,', '\t\t\t\t\t\t\t\titems: visibleSessionMenuItems,', 'managed Session menu')
|
|
87
90
|
replace(
|
|
88
91
|
'\t\t\t\t\t\t(0, react_jsx_runtime.jsx)("span", {\n\t\t\t\t\t\t\tref: titleRef,\n\t\t\t\t\t\t\tclassName: Rows_module_css_default.title,',
|
|
89
92
|
'\t\t\t\t\t\tprotectedManagedSession && (0, react_jsx_runtime.jsx)("span", { title: node.__dshGitWorktree.label, "aria-label": node.__dshGitWorktree.label, style: { flexShrink: 0, display: "inline-flex" }, children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconBranchOutline16, {}) }),\n\t\t\t\t\t\t(0, react_jsx_runtime.jsx)("span", {\n\t\t\t\t\t\t\tref: titleRef,\n\t\t\t\t\t\t\tclassName: Rows_module_css_default.title,',
|
|
@@ -91,12 +94,12 @@ export function decorateAlphaWorkspaceClient(source) {
|
|
|
91
94
|
)
|
|
92
95
|
replace(
|
|
93
96
|
'\t\t\t\t\t\t\tchildren: title\n\t\t\t\t\t\t}),\n\t\t\t\t\t\trow.hasActiveSchedule && (0, react_jsx_runtime.jsx)(ActiveScheduleIndicator, { t }),',
|
|
94
|
-
'\t\t\t\t\t\t\tchildren: title\n\t\t\t\t\t\t}),\n\t\t\t\t\t\tprotectedManagedSession && (0, react_jsx_runtime.jsx)("span", { className: "dsh-git-worktree-sidebar-badge", "data-worktree-state": node.__dshGitWorktree.state, children: node.__dshGitWorktree.label }),\n\t\t\t\t\t\trow.hasActiveSchedule && (0, react_jsx_runtime.jsx)(ActiveScheduleIndicator, { t }),',
|
|
97
|
+
'\t\t\t\t\t\t\tchildren: title\n\t\t\t\t\t\t}),\n\t\t\t\t\t\tprotectedManagedSession && node.__dshGitWorktree.state !== "working" && (0, react_jsx_runtime.jsx)("span", { className: "dsh-git-worktree-sidebar-badge", "data-worktree-state": node.__dshGitWorktree.state, children: node.__dshGitWorktree.label }),\n\t\t\t\t\t\trow.hasActiveSchedule && (0, react_jsx_runtime.jsx)(ActiveScheduleIndicator, { t }),',
|
|
95
98
|
'managed Session status badge',
|
|
96
99
|
)
|
|
97
100
|
return derived
|
|
98
101
|
}
|
|
99
102
|
|
|
100
103
|
export function materializeAlphaWorkspaceClientModule() {
|
|
101
|
-
return materializeWorkspaceFactory(decorateAlphaWorkspaceClient(readAlphaWorkspaceClient()))
|
|
104
|
+
return materializeWorkspaceFactory(ownWorkspaceStyles(decorateAlphaWorkspaceClient(readAlphaWorkspaceClient()), ALPHA_WORKSPACE_VERSION, 3))
|
|
102
105
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { createHash } from 'node:crypto'
|
|
2
2
|
import { readFileSync } from 'node:fs'
|
|
3
3
|
import { createRequire } from 'node:module'
|
|
4
|
+
import { ownWorkspaceStyles } from './workspace-sidebar-resources.mjs'
|
|
4
5
|
|
|
5
6
|
export const NEXT_WORKSPACE_VERSION = '0.1.7-rc.2'
|
|
6
7
|
export const NEXT_WORKSPACE_SHA256 = '854722447794b79607651e6c75d0652db1aba376324f468ab8cd6ecdfe7d177f'
|
|
@@ -42,26 +43,23 @@ export function decorateNextWorkspaceClient(source) {
|
|
|
42
43
|
'\t\t\t\t\tlabel: g.label,\n\t\t\t\t\t...g.__dshGitWorktreeProtected === true ? { __dshGitWorktreeProtected: true } : {},\n\t\t\t\t\tsessionCount: g.sessions.length,',
|
|
43
44
|
'protected workspace row',
|
|
44
45
|
)
|
|
46
|
+
// Cordis Service derives its own Context; capture the instance-local guard
|
|
47
|
+
// from the constructor argument rather than looking it up on this.ctx later.
|
|
45
48
|
replace(
|
|
46
|
-
'\t\t\
|
|
47
|
-
'\t\t\
|
|
48
|
-
'managed
|
|
49
|
+
'\t\t\t\tsuper(ctx, "uiWorkspace");\n\t\t\t\tthis.directoryPicker = directoryPicker;',
|
|
50
|
+
'\t\t\t\tsuper(ctx, "uiWorkspace");\n\t\t\t\tthis.managedWorktreeGuard = ctx.get("__dshGitWorktreeManagedGuard");\n\t\t\t\tthis.directoryPicker = directoryPicker;',
|
|
51
|
+
'instance-local managed guard',
|
|
49
52
|
)
|
|
50
53
|
replace(
|
|
51
|
-
'\t\t\tasync
|
|
52
|
-
'\t\t\tasync
|
|
53
|
-
'managed Session
|
|
54
|
+
'\t\t\tasync forkSession(sessionId) {\n\t\t\t\tawait this.sessions.fork({',
|
|
55
|
+
'\t\t\tasync forkSession(sessionId) {\n\t\t\t\tif (this.managedWorktreeGuard.blockSession(sessionId)) throw new Error("managed Session must be changed through its Worktree owner");\n\t\t\t\tawait this.sessions.fork({',
|
|
56
|
+
'managed Session fork from official menu and shortcuts',
|
|
54
57
|
)
|
|
55
58
|
replace(
|
|
56
59
|
'\t\t\t\tconst target = workspaceId ?? currentWorkspaceId ?? recent;\n\t\t\t\tif (target === void 0) {',
|
|
57
|
-
'\t\t\t\tconst target = workspaceId ?? currentWorkspaceId ?? recent;\n\t\t\t\tif (target !== void 0 && this.
|
|
60
|
+
'\t\t\t\tconst target = workspaceId ?? currentWorkspaceId ?? recent;\n\t\t\t\tif (target !== void 0 && this.managedWorktreeGuard.blockWorkspace(target)) return;\n\t\t\t\tif (target === void 0) {',
|
|
58
61
|
'managed Workspace new Session shortcut',
|
|
59
62
|
)
|
|
60
|
-
replace(
|
|
61
|
-
'\t\t\tconst renameSession = async (sessionId, title) => {\n\t\t\t\tconst result = await sessions.using(',
|
|
62
|
-
'\t\t\tconst renameSession = async (sessionId, title) => {\n\t\t\t\tif (ctx.get("__dshGitWorktreeManagedGuard").blockSession(sessionId)) throw new Error("managed Session must be changed through its Worktree owner");\n\t\t\t\tconst result = await sessions.using(',
|
|
63
|
-
'managed Session rename dialog',
|
|
64
|
-
)
|
|
65
63
|
replace(
|
|
66
64
|
'\t\t\t\tupdatedAt: s.updatedAt,\n\t\t\t\t...pendingInteraction === void 0 ? {} : { pendingInteraction }',
|
|
67
65
|
'\t\t\t\tupdatedAt: s.updatedAt,\n\t\t\t\t__dshGitWorktree: s.__dshGitWorktree,\n\t\t\t\t...pendingInteraction === void 0 ? {} : { pendingInteraction }',
|
|
@@ -82,9 +80,8 @@ export function decorateNextWorkspaceClient(source) {
|
|
|
82
80
|
'managed Session row guard',
|
|
83
81
|
)
|
|
84
82
|
replace('\t\t\tconst draggable = drag !== void 0 && !row.blank && !row.archived;', '\t\t\tconst draggable = drag !== void 0 && !row.blank && !row.archived && !protectedManagedSession;', 'managed Session drag')
|
|
85
|
-
|
|
86
|
-
//
|
|
87
|
-
// for managed Sessions, while ordinary Sessions retain every official action.
|
|
83
|
+
// Keep the official hover container. The Slot proxy preserves pin, rename
|
|
84
|
+
// and archive on managed owners while filtering ownership-changing actions.
|
|
88
85
|
replace(
|
|
89
86
|
'\t\t\t\t\t\t(0, react_jsx_runtime.jsx)("span", {\n\t\t\t\t\t\t\tref: titleRef,\n\t\t\t\t\t\t\tclassName: Rows_module_css_default.title,',
|
|
90
87
|
'\t\t\t\t\t\tprotectedManagedSession && (0, react_jsx_runtime.jsx)("span", { title: node.__dshGitWorktree.label, "aria-label": node.__dshGitWorktree.label, style: { flexShrink: 0, display: "inline-flex" }, children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconBranchOutlineRegular, { size: 16 }) }),\n\t\t\t\t\t\t(0, react_jsx_runtime.jsx)("span", {\n\t\t\t\t\t\t\tref: titleRef,\n\t\t\t\t\t\t\tclassName: Rows_module_css_default.title,',
|
|
@@ -92,14 +89,14 @@ export function decorateNextWorkspaceClient(source) {
|
|
|
92
89
|
)
|
|
93
90
|
replace(
|
|
94
91
|
'\t\t\t\t\t\t\tchildren: title\n\t\t\t\t\t\t}),\n\t\t\t\t\t\t!row.blank && (0, react_jsx_runtime.jsx)("span", {\n\t\t\t\t\t\t\tclassName: Rows_module_css_default.time,',
|
|
95
|
-
'\t\t\t\t\t\t\tchildren: title\n\t\t\t\t\t\t}),\n\t\t\t\t\t\tprotectedManagedSession && (0, react_jsx_runtime.jsx)("span", { className: "dsh-git-worktree-sidebar-badge", "data-worktree-state": node.__dshGitWorktree.state, children: node.__dshGitWorktree.label }),\n\t\t\t\t\t\t!row.blank && (0, react_jsx_runtime.jsx)("span", {\n\t\t\t\t\t\t\tclassName: Rows_module_css_default.time,',
|
|
92
|
+
'\t\t\t\t\t\t\tchildren: title\n\t\t\t\t\t\t}),\n\t\t\t\t\t\tprotectedManagedSession && node.__dshGitWorktree.state !== "working" && (0, react_jsx_runtime.jsx)("span", { className: "dsh-git-worktree-sidebar-badge", "data-worktree-state": node.__dshGitWorktree.state, children: node.__dshGitWorktree.label }),\n\t\t\t\t\t\t!row.blank && (0, react_jsx_runtime.jsx)("span", {\n\t\t\t\t\t\t\tclassName: Rows_module_css_default.time,',
|
|
96
93
|
'managed Session status badge',
|
|
97
94
|
)
|
|
98
95
|
return derived
|
|
99
96
|
}
|
|
100
97
|
|
|
101
98
|
export function materializeNextWorkspaceClientModule() {
|
|
102
|
-
return materializeWorkspaceFactory(decorateNextWorkspaceClient(readNextWorkspaceClient()))
|
|
99
|
+
return materializeWorkspaceFactory(ownWorkspaceStyles(decorateNextWorkspaceClient(readNextWorkspaceClient()), NEXT_WORKSPACE_VERSION, 4))
|
|
103
100
|
}
|
|
104
101
|
|
|
105
102
|
/** Load one pinned official Client factory without registering its upstream ModuleLoader row. */
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { createHash } from 'node:crypto'
|
|
2
2
|
import { readFileSync } from 'node:fs'
|
|
3
3
|
import { createRequire } from 'node:module'
|
|
4
|
+
import { ownWorkspaceStyles } from './workspace-sidebar-resources.mjs'
|
|
4
5
|
|
|
5
|
-
export const WORKSPACE_UI_VERSION = '0.2.
|
|
6
|
-
export const WORKSPACE_LOCALE_VERSION = '0.2.
|
|
7
|
-
export const WORKSPACE_CLIENT_SHA256 = '
|
|
6
|
+
export const WORKSPACE_UI_VERSION = '0.2.1-rc.2'
|
|
7
|
+
export const WORKSPACE_LOCALE_VERSION = '0.2.1-rc.2'
|
|
8
|
+
export const WORKSPACE_CLIENT_SHA256 = '52765aacb6c7f96327da5d8709d8cbb30dd2957d4744a42da04c18e07fe264e5'
|
|
8
9
|
export const OFFICIAL_WORKSPACE_VIRTUAL_ID = 'virtual:dsh-official-workspace-client'
|
|
9
10
|
export const RESOLVED_OFFICIAL_WORKSPACE_VIRTUAL_ID = `\0${OFFICIAL_WORKSPACE_VIRTUAL_ID}`
|
|
10
11
|
|
|
@@ -48,6 +49,20 @@ function replaceIfPresent(source, needle, replacement, label) {
|
|
|
48
49
|
*/
|
|
49
50
|
export function decorateOfficialWorkspaceClient(source) {
|
|
50
51
|
let derived = source
|
|
52
|
+
// Service derives its own Cordis Context, so retain the proxy's per-instance
|
|
53
|
+
// guard at construction. Menus and shortcuts share these service boundaries.
|
|
54
|
+
derived = replaceExactlyOnce(derived,
|
|
55
|
+
'\t\t\t\tsuper(ctx, "uiWorkspace");\n\t\t\t\tthis.directoryPicker = directoryPicker;',
|
|
56
|
+
'\t\t\t\tsuper(ctx, "uiWorkspace");\n\t\t\t\tthis.managedWorktreeGuard = ctx.get("__dshGitWorktreeManagedGuard");\n\t\t\t\tthis.directoryPicker = directoryPicker;',
|
|
57
|
+
'instance-local managed guard')
|
|
58
|
+
derived = replaceExactlyOnce(derived,
|
|
59
|
+
'\t\t\tasync forkSession(sessionId, onCreated, options) {\n\t\t\t\treturn this.sessions.fork({',
|
|
60
|
+
'\t\t\tasync forkSession(sessionId, onCreated, options) {\n\t\t\t\tif (this.managedWorktreeGuard.blockSession(sessionId)) throw new Error("managed Session must be changed through its Worktree owner");\n\t\t\t\treturn this.sessions.fork({',
|
|
61
|
+
'Managed Session fork from menus and shortcuts')
|
|
62
|
+
derived = replaceExactlyOnce(derived,
|
|
63
|
+
'\t\t\t\tconst target = workspaceId ?? currentWorkspaceId ?? recent;\n\t\t\t\tif (target === void 0) {',
|
|
64
|
+
'\t\t\t\tconst target = workspaceId ?? currentWorkspaceId ?? recent;\n\t\t\t\tif (target !== void 0 && this.managedWorktreeGuard.blockWorkspace(target)) return;\n\t\t\t\tif (target === void 0) {',
|
|
65
|
+
'Managed Workspace new Session shortcut')
|
|
51
66
|
derived = replaceExactlyOnce(derived,
|
|
52
67
|
'\t\tconst zh = {',
|
|
53
68
|
`\t\tconst zh = {\n\t\t\t"dshGitWorktree.managed": "托管 Worktree",\n\t\t\t"dshGitWorktree.state.working": "进行中",\n\t\t\t"dshGitWorktree.state.ready_for_review": "待验收",\n\t\t\t"dshGitWorktree.state.preview_active": "预览中",\n\t\t\t"dshGitWorktree.state.preview_detached": "待恢复",\n\t\t\t"dshGitWorktree.state.recovery_required": "需要恢复",\n\t\t\t"dshGitWorktree.state.finalized": "已完成",\n\t\t\t"dshGitWorktree.state.discarded": "已放弃",`,
|
|
@@ -86,7 +101,7 @@ export function decorateOfficialWorkspaceClient(source) {
|
|
|
86
101
|
'modern session row decoration')
|
|
87
102
|
derived = replaceIfPresent(derived,
|
|
88
103
|
'\t\tfunction SessionHoverContent',
|
|
89
|
-
`\t\tfunction managedWorktreeDecoration(node, t) {\n\t\t\tconst value = node.__dshGitWorktree;\n\t\t\tif (value?.kind !== "managed-worktree" || typeof value.state !== "string") return void 0;\n\t\t\tconst label = t(\`dshGitWorktree.state.\${value.state}\`);\n\t\t\treturn {\n\t\t\t\tstate: value.state,\n\t\t\t\tlabel,\n\t\t\t\tariaLabel: \`\${t("dshGitWorktree.managed")}, \${label}, \${displayTitle(node, t)}\`\n\t\t\t};\n\t\t}\n\t\tfunction ManagedWorktreeIdentity({ decoration }) {\n\t\t\treturn (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsx)("span", {\n\t\t\t\tclassName: "dsh-git-worktree-sidebar-icon",\n\t\t\t\t"data-worktree-state": decoration.state,\n\t\t\t\t"aria-hidden": "true",\n\t\t\t\tchildren: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconBranchOutlineRegular, {})\n\t\t\t}), (0, react_jsx_runtime.jsx)("span", {\n\t\t\t\tclassName: "dsh-git-worktree-sidebar-badge",\n\t\t\t\t"data-worktree-state": decoration.state,\n\t\t\t\t"aria-hidden": "true",\n\t\t\t\tchildren: decoration.label\n\t\t\t})] });\n\t\t}\n\t\t/** Hover-card body: full title, relative time, and every relevant live status. */\n\t\tfunction SessionHoverContent`,
|
|
104
|
+
`\t\tfunction managedWorktreeDecoration(node, t) {\n\t\t\tconst value = node.__dshGitWorktree;\n\t\t\tif (value?.kind !== "managed-worktree" || typeof value.state !== "string") return void 0;\n\t\t\tconst label = t(\`dshGitWorktree.state.\${value.state}\`);\n\t\t\treturn {\n\t\t\t\tstate: value.state,\n\t\t\t\tlabel,\n\t\t\t\tariaLabel: \`\${t("dshGitWorktree.managed")}, \${label}, \${displayTitle(node, t)}\`\n\t\t\t};\n\t\t}\n\t\tfunction ManagedWorktreeIdentity({ decoration }) {\n\t\t\treturn (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsx)("span", {\n\t\t\t\tclassName: "dsh-git-worktree-sidebar-icon",\n\t\t\t\t"data-worktree-state": decoration.state,\n\t\t\t\t"aria-hidden": "true",\n\t\t\t\tchildren: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconBranchOutlineRegular, {})\n\t\t\t}), decoration.state !== "working" && (0, react_jsx_runtime.jsx)("span", {\n\t\t\t\tclassName: "dsh-git-worktree-sidebar-badge",\n\t\t\t\t"data-worktree-state": decoration.state,\n\t\t\t\t"aria-hidden": "true",\n\t\t\t\tchildren: decoration.label\n\t\t\t})] });\n\t\t}\n\t\t/** Hover-card body: full title, relative time, and every relevant live status. */\n\t\tfunction SessionHoverContent`,
|
|
90
105
|
'Managed row helper')
|
|
91
106
|
derived = replaceExactlyOnce(derived,
|
|
92
107
|
'\t\t\tconst statuses = sessionStatuses(node, t).filter((status) => !(node.archived && (status.state === "done" || status.state === "idle")));\n\t\t\treturn (0, react_jsx_runtime.jsxs)("div", {\n\t\t\t\tclassName: Rows_module_css_default.hoverContent,',
|
|
@@ -149,7 +164,7 @@ export function decorateOfficialWorkspaceClient(source) {
|
|
|
149
164
|
|
|
150
165
|
export function materializeOfficialWorkspaceClientModule() {
|
|
151
166
|
const official = readOfficialWorkspaceClient()
|
|
152
|
-
const source = decorateOfficialWorkspaceClient(official.source)
|
|
167
|
+
const source = ownWorkspaceStyles(decorateOfficialWorkspaceClient(official.source), WORKSPACE_UI_VERSION, 4)
|
|
153
168
|
const factoryToken = 'factory: (require) => {'
|
|
154
169
|
const start = source.indexOf(factoryToken)
|
|
155
170
|
const end = source.lastIndexOf('\n\t}\n});')
|