dsh-git-worktree 0.7.1 → 0.7.3
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 +33 -0
- package/NOTICE +1 -1
- package/README.en.md +45 -41
- package/README.md +45 -41
- package/lib/adapters/registry.js +29 -0
- package/lib/adapters/registry.js.map +1 -1
- package/lib/client/console-remote/index.d.ts +2 -2
- package/lib/client/pre-session/PreSessionWorktreeToggle.js +27 -11
- package/lib/client/pre-session/PreSessionWorktreeToggle.js.map +1 -1
- package/lib/client/workspace-sidebar/index.js.map +1 -1
- package/lib/client.js +435 -147
- package/lib/console-host/projection.js +1 -1
- package/lib/console-host/projection.js.map +1 -1
- package/lib/session-checkout-module.js +4 -1
- package/lib/session-checkout-module.js.map +1 -1
- package/package.json +32 -19
- package/scripts/check-publish.mjs +35 -13
- package/scripts/workspace-sidebar-upstream.mjs +13 -11
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-git-worktree",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.3",
|
|
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",
|
|
@@ -43,7 +43,8 @@
|
|
|
43
43
|
},
|
|
44
44
|
"client": {
|
|
45
45
|
"inject": [
|
|
46
|
-
"@deepseek-ai/dsh-
|
|
46
|
+
"@deepseek-ai/dsh-api-session-controller",
|
|
47
|
+
"@deepseek-ai/dsh-api-workspace-controller",
|
|
47
48
|
"@deepseek-ai/dsh-client-connection",
|
|
48
49
|
"@deepseek-ai/dsh-client-locale",
|
|
49
50
|
"@deepseek-ai/dsh-client-ui-conversation",
|
|
@@ -79,29 +80,41 @@
|
|
|
79
80
|
"prepublishOnly": "pnpm run check:sidebar-version && pnpm run build && pnpm run check:publish:release && pnpm run test"
|
|
80
81
|
},
|
|
81
82
|
"dependencies": {
|
|
82
|
-
"@deepseek-ai/
|
|
83
|
-
"@deepseek-ai/dsh-agent": "0.1.1-rc.2",
|
|
84
|
-
"@deepseek-ai/dsh-commands": "0.1.1-rc.2",
|
|
85
|
-
"@deepseek-ai/dsh-session": "0.1.1-rc.2",
|
|
86
|
-
"@deepseek-ai/dsh-subprocess": "0.1.1-rc.2",
|
|
87
|
-
"@deepseek-ai/dsh-system-prompt": "0.1.1-rc.2",
|
|
88
|
-
"@deepseek-ai/dsh-tools": "0.1.1-rc.2",
|
|
89
|
-
"@deepseek-ai/dsh-typert-protocol": "0.1.1-rc.2",
|
|
90
|
-
"@deepseek-ai/dsh-typert-registry": "0.1.1-rc.2",
|
|
91
|
-
"@deepseek-ai/schemastery": "3.18.1",
|
|
83
|
+
"@deepseek-ai/schemastery": "3.18.2",
|
|
92
84
|
"zod": "4.4.3"
|
|
93
85
|
},
|
|
94
86
|
"peerDependencies": {
|
|
95
|
-
"@deepseek-ai/
|
|
87
|
+
"@deepseek-ai/cordis": "^4.0.2",
|
|
88
|
+
"@deepseek-ai/dsh-agent": "^0.1.2-rc.1",
|
|
89
|
+
"@deepseek-ai/dsh-client-locale": "0.1.2-rc.1",
|
|
90
|
+
"@deepseek-ai/dsh-commands": "^0.1.2-rc.1",
|
|
91
|
+
"@deepseek-ai/dsh-session": "^0.1.2-rc.1",
|
|
92
|
+
"@deepseek-ai/dsh-subprocess": "^0.1.2-rc.1",
|
|
93
|
+
"@deepseek-ai/dsh-system-prompt": "^0.1.2-rc.1",
|
|
94
|
+
"@deepseek-ai/dsh-tools": "^0.1.2-rc.1",
|
|
95
|
+
"@deepseek-ai/dsh-typert-protocol": "^0.1.2-rc.1",
|
|
96
|
+
"@deepseek-ai/dsh-typert-registry": "^0.1.2-rc.1",
|
|
96
97
|
"react": "^18.2.0"
|
|
97
98
|
},
|
|
98
99
|
"devDependencies": {
|
|
99
|
-
"@deepseek-ai/
|
|
100
|
-
"@deepseek-ai/dsh-
|
|
101
|
-
"@deepseek-ai/dsh-
|
|
102
|
-
"@deepseek-ai/dsh-
|
|
103
|
-
"@deepseek-ai/dsh-
|
|
104
|
-
"@deepseek-ai/dsh-
|
|
100
|
+
"@deepseek-ai/cordis": "4.0.2",
|
|
101
|
+
"@deepseek-ai/dsh-agent": "0.1.2-rc.1",
|
|
102
|
+
"@deepseek-ai/dsh-api-gateway": "0.1.2-rc.1",
|
|
103
|
+
"@deepseek-ai/dsh-api-session-controller": "0.1.2-rc.1",
|
|
104
|
+
"@deepseek-ai/dsh-api-workspace-controller": "0.1.2-rc.1",
|
|
105
|
+
"@deepseek-ai/dsh-client-connection": "0.1.2-rc.1",
|
|
106
|
+
"@deepseek-ai/dsh-client-locale": "0.1.2-rc.1",
|
|
107
|
+
"@deepseek-ai/dsh-client-store": "0.1.2-rc.1",
|
|
108
|
+
"@deepseek-ai/dsh-client-ui-primitives": "0.1.2-rc.1",
|
|
109
|
+
"@deepseek-ai/dsh-client-ui-workspace": "0.1.2-rc.1",
|
|
110
|
+
"@deepseek-ai/dsh-commands": "0.1.2-rc.1",
|
|
111
|
+
"@deepseek-ai/dsh-session": "0.1.2-rc.1",
|
|
112
|
+
"@deepseek-ai/dsh-subprocess": "0.1.2-rc.1",
|
|
113
|
+
"@deepseek-ai/dsh-system-prompt": "0.1.2-rc.1",
|
|
114
|
+
"@deepseek-ai/dsh-tools": "0.1.2-rc.1",
|
|
115
|
+
"@deepseek-ai/dsh-typert-loader": "0.1.2-rc.1",
|
|
116
|
+
"@deepseek-ai/dsh-typert-protocol": "0.1.2-rc.1",
|
|
117
|
+
"@deepseek-ai/dsh-typert-registry": "0.1.2-rc.1",
|
|
105
118
|
"@testing-library/react": "^16.3.2",
|
|
106
119
|
"@types/node": "^22.0.0",
|
|
107
120
|
"@types/react": "~18.3.31",
|
|
@@ -35,7 +35,32 @@ function includedByFiles(target) {
|
|
|
35
35
|
})
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
// 1. Host
|
|
38
|
+
// 1. Host singleton packages must resolve from DSH instead of a plugin-private dependency tree.
|
|
39
|
+
const hostSingletonPackages = [
|
|
40
|
+
'@deepseek-ai/cordis',
|
|
41
|
+
'@deepseek-ai/dsh-agent',
|
|
42
|
+
'@deepseek-ai/dsh-commands',
|
|
43
|
+
'@deepseek-ai/dsh-session',
|
|
44
|
+
'@deepseek-ai/dsh-subprocess',
|
|
45
|
+
'@deepseek-ai/dsh-system-prompt',
|
|
46
|
+
'@deepseek-ai/dsh-tools',
|
|
47
|
+
'@deepseek-ai/dsh-typert-protocol',
|
|
48
|
+
'@deepseek-ai/dsh-typert-registry',
|
|
49
|
+
]
|
|
50
|
+
for (const packageName of hostSingletonPackages) {
|
|
51
|
+
if (manifest.dependencies?.[packageName] !== undefined) {
|
|
52
|
+
fail(`${packageName} must be a peerDependency; a private copy breaks Host service identity`)
|
|
53
|
+
}
|
|
54
|
+
if (typeof manifest.peerDependencies?.[packageName] !== 'string') {
|
|
55
|
+
fail(`${packageName} is missing from peerDependencies`)
|
|
56
|
+
}
|
|
57
|
+
if (typeof manifest.devDependencies?.[packageName] !== 'string') {
|
|
58
|
+
fail(`${packageName} is missing from devDependencies`)
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
ok(`${hostSingletonPackages.length} Host singleton packages are peer-provided and locally testable`)
|
|
62
|
+
|
|
63
|
+
// 2. Host bundle declaration and patch.
|
|
39
64
|
const patchRel = manifest.dsh?.bundle?.patch
|
|
40
65
|
if (typeof patchRel !== 'string' || patchRel.length === 0) {
|
|
41
66
|
fail('package.json lacks "dsh".bundle.patch — dsh plugin add would install a plain dependency without mounting it')
|
|
@@ -58,7 +83,7 @@ if (!manifest.files?.includes('NOTICE') || !existsSync(resolve(root, 'NOTICE')))
|
|
|
58
83
|
}
|
|
59
84
|
ok(`Host mount patch ${patchRel} replaces official ui-workspace with one gated derivative`)
|
|
60
85
|
|
|
61
|
-
//
|
|
86
|
+
// 3. Every package export must exist and be included in the tarball.
|
|
62
87
|
const exportsMap = manifest.exports
|
|
63
88
|
if (!exportsMap || typeof exportsMap !== 'object' || Array.isArray(exportsMap)) fail('package.json lacks an exports map')
|
|
64
89
|
let exportCount = 0
|
|
@@ -83,7 +108,7 @@ for (const stale of [
|
|
|
83
108
|
}
|
|
84
109
|
ok('removed Diff UI has no stale publish artifact')
|
|
85
110
|
|
|
86
|
-
//
|
|
111
|
+
// 4. Manual strict Typert artifacts: one descriptor identity feeds Host Loader and Client mount.
|
|
87
112
|
if (manifest.dependencies?.['@deepseek-ai/dsh-typert-generator'] || manifest.devDependencies?.['@deepseek-ai/dsh-typert-generator']) {
|
|
88
113
|
fail('manual contribution package must not depend on @deepseek-ai/dsh-typert-generator')
|
|
89
114
|
}
|
|
@@ -116,7 +141,7 @@ for (const descriptor of hostContribution.invocations) {
|
|
|
116
141
|
}
|
|
117
142
|
ok(`manual strict ./typert + ./remote contribution (${expectedRemoteMethods.length} methods)`)
|
|
118
143
|
|
|
119
|
-
//
|
|
144
|
+
// 5. Host entry metadata required by the Cordis loader.
|
|
120
145
|
const entryRel = exportsMap['.']?.default ?? manifest.main
|
|
121
146
|
if (typeof entryRel !== 'string') fail('exports["."].default is not a path')
|
|
122
147
|
const entry = readFileSync(resolve(root, entryRel), 'utf8')
|
|
@@ -124,13 +149,14 @@ if (!/export\s+function\s+apply\b/.test(entry)) fail(`${entryRel} does not expor
|
|
|
124
149
|
if (!/export\s+const\s+inject\b/.test(entry)) fail(`${entryRel} does not export const inject`)
|
|
125
150
|
ok(`${entryRel} exports Host apply + inject`)
|
|
126
151
|
|
|
127
|
-
//
|
|
152
|
+
// 6. Browser ToolView declaration and executable ModuleLoader closure.
|
|
128
153
|
const client = manifest.dsh?.client
|
|
129
154
|
if (!client || client.platform !== 'web' || !Array.isArray(client.inject) || client.inject.length === 0) {
|
|
130
155
|
fail('package.json must declare dsh.client { platform: "web", inject: [...] }')
|
|
131
156
|
}
|
|
132
157
|
const requiredClientPackages = [
|
|
133
|
-
'@deepseek-ai/dsh-
|
|
158
|
+
'@deepseek-ai/dsh-api-session-controller',
|
|
159
|
+
'@deepseek-ai/dsh-api-workspace-controller',
|
|
134
160
|
'@deepseek-ai/dsh-client-ui-conversation',
|
|
135
161
|
'@deepseek-ai/dsh-api-gateway',
|
|
136
162
|
]
|
|
@@ -146,7 +172,8 @@ const allowedBrowserRequires = new Set([
|
|
|
146
172
|
'react',
|
|
147
173
|
'react/jsx-runtime',
|
|
148
174
|
'@deepseek-ai/dsh-client-ui-primitives',
|
|
149
|
-
'@deepseek-ai/
|
|
175
|
+
'@deepseek-ai/cordis',
|
|
176
|
+
'@deepseek-ai/dsh-client-store',
|
|
150
177
|
])
|
|
151
178
|
const unsupportedBrowserRequires = browserRequires.filter(specifier => !allowedBrowserRequires.has(specifier))
|
|
152
179
|
if (unsupportedBrowserRequires.length > 0) {
|
|
@@ -172,11 +199,6 @@ if (!handoff || handoff.id !== manifest.name || typeof handoff.factory !== 'func
|
|
|
172
199
|
}
|
|
173
200
|
const browserRequire = (specifier) => {
|
|
174
201
|
if (specifier === '@deepseek-ai/dsh-client-ui-primitives') return { Modal: () => null, Menu: () => null }
|
|
175
|
-
if (specifier === '@deepseek-ai/dsh-client-runtime/client') return {
|
|
176
|
-
defineStore: spec => ({ spec, create: () => ({ actions: {} }) }),
|
|
177
|
-
indexSubagentDescendants: () => new Map(),
|
|
178
|
-
abbreviateHomePath: path => path,
|
|
179
|
-
}
|
|
180
202
|
return require(specifier)
|
|
181
203
|
}
|
|
182
204
|
let clientExports
|
|
@@ -192,7 +214,7 @@ if (!clientExports.inject.includes('remote')) fail('client bundle must inject th
|
|
|
192
214
|
if (!clientExports.inject.includes('conversation')) fail('client bundle must inject the public conversation service for pre-session draft transfer')
|
|
193
215
|
ok(`${clientRel} registers ${manifest.name} through the browser ModuleLoader contract`)
|
|
194
216
|
|
|
195
|
-
//
|
|
217
|
+
// 7. Release CI and npm's prepublish lifecycle require committed source identity;
|
|
196
218
|
// local review builds intentionally run against a dirty managed Worktree.
|
|
197
219
|
const requireClean = process.env.CHECK_PUBLISH_REQUIRE_CLEAN === '1'
|
|
198
220
|
|| process.argv.includes('--require-clean')
|
|
@@ -2,9 +2,9 @@ import { createHash } from 'node:crypto'
|
|
|
2
2
|
import { readFileSync } from 'node:fs'
|
|
3
3
|
import { createRequire } from 'node:module'
|
|
4
4
|
|
|
5
|
-
export const WORKSPACE_UI_VERSION = '0.1.
|
|
6
|
-
export const WORKSPACE_LOCALE_VERSION = '0.1.
|
|
7
|
-
export const WORKSPACE_CLIENT_SHA256 = '
|
|
5
|
+
export const WORKSPACE_UI_VERSION = '0.1.2-rc.1'
|
|
6
|
+
export const WORKSPACE_LOCALE_VERSION = '0.1.2-rc.1'
|
|
7
|
+
export const WORKSPACE_CLIENT_SHA256 = '53c40660195c42cde709b802e239f473dd721f45bc329684af31c01fdb73282a'
|
|
8
8
|
export const OFFICIAL_WORKSPACE_VIRTUAL_ID = 'virtual:dsh-official-workspace-client'
|
|
9
9
|
export const RESOLVED_OFFICIAL_WORKSPACE_VIRTUAL_ID = `\0${OFFICIAL_WORKSPACE_VIRTUAL_ID}`
|
|
10
10
|
|
|
@@ -53,12 +53,12 @@ export function decorateOfficialWorkspaceClient(source) {
|
|
|
53
53
|
'\t\t\t\tconst group = buildGroup(workspace.workspaceId, workspace.workspaceId, workspace.path, Date.parse(workspace.createdAt), workspace.title, members, "account");\n\t\t\t\tif (workspace.__dshGitWorktreeProtected === true) group.__dshGitWorktreeProtected = true;\n\t\t\t\tgroups.push(group);',
|
|
54
54
|
'Managed workspace metadata')
|
|
55
55
|
derived = replaceExactlyOnce(derived,
|
|
56
|
-
'\t\t\t\tupdatedAt: s.updatedAt,\n\t\t\t\t...
|
|
57
|
-
'\t\t\t\tupdatedAt: s.updatedAt,\n\t\t\t\t...s.__dshGitWorktree === void 0 ? {} : { __dshGitWorktree: s.__dshGitWorktree },\n\t\t\t\t...
|
|
56
|
+
'\t\t\t\tupdatedAt: s.updatedAt,\n\t\t\t\t...pendingInteraction === void 0 ? {} : { pendingInteraction }',
|
|
57
|
+
'\t\t\t\tupdatedAt: s.updatedAt,\n\t\t\t\t...s.__dshGitWorktree === void 0 ? {} : { __dshGitWorktree: s.__dshGitWorktree },\n\t\t\t\t...pendingInteraction === void 0 ? {} : { pendingInteraction }',
|
|
58
58
|
'session node metadata')
|
|
59
59
|
derived = replaceExactlyOnce(derived,
|
|
60
|
-
'\t\t\t\t\t\trunningSubagentCount: descendants.get(summary.id)?.runningCount ?? 0,\n\t\t\t\t\t\t...
|
|
61
|
-
'\t\t\t\t\t\trunningSubagentCount: descendants.get(summary.id)?.runningCount ?? 0,\n\t\t\t\t\t\t...summary.__dshGitWorktree === void 0 ? {} : { __dshGitWorktree: summary.__dshGitWorktree },\n\t\t\t\t\t\t...
|
|
60
|
+
'\t\t\t\t\t\trunningSubagentCount: descendants.get(summary.id)?.runningCount ?? 0,\n\t\t\t\t\t\t...pendingInteraction === void 0 ? {} : { pendingInteraction },',
|
|
61
|
+
'\t\t\t\t\t\trunningSubagentCount: descendants.get(summary.id)?.runningCount ?? 0,\n\t\t\t\t\t\t...summary.__dshGitWorktree === void 0 ? {} : { __dshGitWorktree: summary.__dshGitWorktree },\n\t\t\t\t\t\t...pendingInteraction === void 0 ? {} : { pendingInteraction },',
|
|
62
62
|
'search result metadata')
|
|
63
63
|
derived = replaceExactlyOnce(derived,
|
|
64
64
|
'\t\t\t\t\tlabel: g.label,\n\t\t\t\t\tsessionCount: g.sessions.length,',
|
|
@@ -81,8 +81,8 @@ export function decorateOfficialWorkspaceClient(source) {
|
|
|
81
81
|
'\t\t\tconst primaryStatus = statuses[0];\n\t\t\tconst worktreeDecoration = managedWorktreeDecoration(result, t);\n\t\t\treturn (0, react_jsx_runtime.jsxs)("button", {\n\t\t\t\ttype: "button",\n\t\t\t\tclassName: clsx(Rows_module_css_default.searchResultRow, selected && Rows_module_css_default.selected),\n\t\t\t\t...worktreeDecoration === void 0 ? {} : { "aria-label": worktreeDecoration.ariaLabel, "data-managed-worktree": "true" },',
|
|
82
82
|
'search Worktree identity')
|
|
83
83
|
derived = replaceExactlyOnce(derived,
|
|
84
|
-
'\t\t\t\t\t\tchildren: (primaryStatus.state !== "done" || result.completed) && (0, react_jsx_runtime.jsx)(SessionStatusDots, { statuses })\n\t\t\t\t\t})
|
|
85
|
-
'\t\t\t\t\t\tchildren: (primaryStatus.state !== "done" || result.completed) && (0, react_jsx_runtime.jsx)(SessionStatusDots, { statuses })\n\t\t\t\t\t})
|
|
84
|
+
'\t\t\t\t\t\t\tchildren: (primaryStatus.state !== "done" || result.completed) && (0, react_jsx_runtime.jsx)(SessionStatusDots, { statuses })\n\t\t\t\t\t\t}),\n\t\t\t\t\t\t(0, react_jsx_runtime.jsx)("span", {\n\t\t\t\t\t\t\tclassName: Rows_module_css_default.searchResultTitle,',
|
|
85
|
+
'\t\t\t\t\t\t\tchildren: (primaryStatus.state !== "done" || result.completed) && (0, react_jsx_runtime.jsx)(SessionStatusDots, { statuses })\n\t\t\t\t\t\t}),\n\t\t\t\t\t\tworktreeDecoration !== void 0 && (0, react_jsx_runtime.jsx)(ManagedWorktreeIdentity, { decoration: worktreeDecoration }),\n\t\t\t\t\t\t(0, react_jsx_runtime.jsx)("span", {\n\t\t\t\t\t\t\tclassName: Rows_module_css_default.searchResultTitle,',
|
|
86
86
|
'search Worktree decoration')
|
|
87
87
|
derived = replaceExactlyOnce(derived,
|
|
88
88
|
'\t\t\tconst label = row.workspaceId === void 0 ? t("group.ungrouped") : row.label;\n\t\t\tconst active = group.expanded && group.containsCurrent;',
|
|
@@ -138,12 +138,14 @@ export function materializeOfficialWorkspaceClientModule() {
|
|
|
138
138
|
}
|
|
139
139
|
const body = source.slice(start + factoryToken.length, end)
|
|
140
140
|
return `
|
|
141
|
-
import * as
|
|
141
|
+
import * as cordis from '@deepseek-ai/cordis'
|
|
142
|
+
import * as store from '@deepseek-ai/dsh-client-store'
|
|
142
143
|
import * as jsxRuntime from 'react/jsx-runtime'
|
|
143
144
|
import * as react from 'react'
|
|
144
145
|
import * as primitives from '@deepseek-ai/dsh-client-ui-primitives'
|
|
145
146
|
const modules = {
|
|
146
|
-
'@deepseek-ai/
|
|
147
|
+
'@deepseek-ai/cordis': cordis,
|
|
148
|
+
'@deepseek-ai/dsh-client-store': store,
|
|
147
149
|
'react/jsx-runtime': jsxRuntime,
|
|
148
150
|
'react': react,
|
|
149
151
|
'@deepseek-ai/dsh-client-ui-primitives': primitives,
|