dsh-desktop-kit 2.37.0 → 2.39.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 +31 -0
- package/README.en.md +20 -5
- package/README.md +39 -9
- package/client.js +27 -20
- package/docs/ARCHITECTURE.md +4 -2
- package/docs/MEASURED.md +10 -10
- package/docs/TEST-2.38.0.md +23 -0
- package/docs/TEST-2.38.1.md +23 -0
- package/docs/TEST-2.39.0.md +33 -0
- package/docs/images/hero-2.39.png +0 -0
- package/docs/measured.json +14 -14
- package/lib/skills-sync.js +130 -16
- package/package.json +2 -1
- package/plugins/dsh-browser-qa/lib/extras.js +20 -1
- package/plugins/dsh-profile-transfer/README.md +4 -4
- package/plugins/dsh-profile-transfer/client.js +26 -19
- package/plugins/dsh-profile-transfer/package.json +1 -3
- package/plugins/dsh-profile-transfer/transfer.js +97 -57
- package/plugins/dsh-skill-autopilot/index.js +7 -0
- package/skills/content-writing/SKILL.md +1 -1
- package/skills/content-writing/references/images.md +6 -6
- package/skills/content-writing/references/process.md +1 -1
- package/skills/content-writing/references/quick-recipes.md +1 -1
- package/skills/manifest.json +12 -12
- package/skills/skills-router/SKILL.md +2 -1
- package/skills/skills-router/references/routing-matrix.md +2 -2
- package/skills/visual-studio/SKILL.md +13 -5
- package/skills/wow-design/assets/kit/assets/js/kit.js +7 -3
- package/skills/wow-design/assets/kit/showcase.html +1 -1
- package/skills-baseline.json +2803 -193
package/lib/skills-sync.js
CHANGED
|
@@ -5,10 +5,12 @@
|
|
|
5
5
|
* - a missing skill is installed;
|
|
6
6
|
* - a skill that still matches the hash recorded at the last sync is updated
|
|
7
7
|
* (with a backup);
|
|
8
|
-
* - a skill
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
8
|
+
* - a skill whose content matches ANY released kit version is kit content and
|
|
9
|
+
* is updated (with a backup) — even without a state entry or when the entry
|
|
10
|
+
* points at a newer version. Old installs, restored profiles and manual
|
|
11
|
+
* copies therefore heal instead of staying "user-owned" forever;
|
|
12
|
+
* - only content that matches no released version is treated as a user edit:
|
|
13
|
+
* it is reported as a conflict and stays untouched.
|
|
12
14
|
*
|
|
13
15
|
* The state file lives next to the skills and is written atomically.
|
|
14
16
|
*/
|
|
@@ -18,8 +20,9 @@ import path from "node:path";
|
|
|
18
20
|
|
|
19
21
|
export const SKILLS_SYNC_SCHEMA = 1;
|
|
20
22
|
export const STATE_FILE = ".dsh-kit-skills.json";
|
|
23
|
+
export const MARKER_FILE = ".dsh-kit-skill.json";
|
|
21
24
|
export const BACKUP_DIR = ".dsh-kit-backups";
|
|
22
|
-
const SKIP_FILES = new Set([".DS_Store", "Thumbs.db", STATE_FILE]);
|
|
25
|
+
const SKIP_FILES = new Set([".DS_Store", "Thumbs.db", STATE_FILE, MARKER_FILE]);
|
|
23
26
|
|
|
24
27
|
function sha256(data) {
|
|
25
28
|
return crypto.createHash("sha256").update(data).digest("hex");
|
|
@@ -29,8 +32,37 @@ export function hashText(text) {
|
|
|
29
32
|
return sha256(String(text ?? ""));
|
|
30
33
|
}
|
|
31
34
|
|
|
32
|
-
/**
|
|
35
|
+
/**
|
|
36
|
+
* Windows checkouts with core.autocrlf=true rewrite text files to CRLF while the
|
|
37
|
+
* manifest and the published tarball carry LF bytes. Hashing the raw working copy
|
|
38
|
+
* made the same skill look different there: the release gate reported a fake
|
|
39
|
+
* manifest drift and skills-sync saw a fake user edit. Text is hashed with LF
|
|
40
|
+
* line endings; binary files keep their exact bytes.
|
|
41
|
+
*/
|
|
42
|
+
function normalizeEol(content) {
|
|
43
|
+
if (content.length === 0 || content.includes(0)) return content;
|
|
44
|
+
const text = content.toString("utf8");
|
|
45
|
+
/* Invalid UTF-8 (a binary file without NUL bytes) keeps its bytes too. */
|
|
46
|
+
if (Buffer.byteLength(text, "utf8") !== content.length) return content;
|
|
47
|
+
if (!text.includes("\r\n")) return content;
|
|
48
|
+
return Buffer.from(text.replace(/\r\n/gu, "\n"), "utf8");
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/** Deterministic directory hash: sorted relative paths + bytes, text with LF. */
|
|
33
52
|
export function hashSkillDir(directory) {
|
|
53
|
+
return hashSkillDirWith(directory, true);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Hash of the same directory with raw line endings. Copies installed by kits
|
|
58
|
+
* before EOL normalisation carry this hash in their marker/state/baseline, so
|
|
59
|
+
* sync recognises them as kit content instead of reporting a fake user edit.
|
|
60
|
+
*/
|
|
61
|
+
export function hashSkillDirRaw(directory) {
|
|
62
|
+
return hashSkillDirWith(directory, false);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function hashSkillDirWith(directory, normalizeLineEndings) {
|
|
34
66
|
const hash = crypto.createHash("sha256");
|
|
35
67
|
let files = 0;
|
|
36
68
|
let bytes = 0;
|
|
@@ -54,13 +86,14 @@ export function hashSkillDir(directory) {
|
|
|
54
86
|
if (!entry.isFile()) continue;
|
|
55
87
|
try {
|
|
56
88
|
const content = fs.readFileSync(full);
|
|
89
|
+
const payload = normalizeLineEndings ? normalizeEol(content) : content;
|
|
57
90
|
hash.update(rel);
|
|
58
91
|
hash.update("\0");
|
|
59
|
-
hash.update(String(
|
|
92
|
+
hash.update(String(payload.length));
|
|
60
93
|
hash.update("\0");
|
|
61
|
-
hash.update(
|
|
94
|
+
hash.update(payload);
|
|
62
95
|
files += 1;
|
|
63
|
-
bytes +=
|
|
96
|
+
bytes += payload.length;
|
|
64
97
|
} catch {
|
|
65
98
|
/* unreadable file: ignore, the hash stays stable */
|
|
66
99
|
}
|
|
@@ -88,6 +121,33 @@ export function readBaseline(packageRoot) {
|
|
|
88
121
|
}
|
|
89
122
|
}
|
|
90
123
|
|
|
124
|
+
/**
|
|
125
|
+
* Provenance marker written into every skill the kit installs. It records the
|
|
126
|
+
* source hash, so the next sync can tell "kit copy, possibly from a version the
|
|
127
|
+
* baseline does not know" (safe to update) from "user edit" (never overwritten).
|
|
128
|
+
* The marker is excluded from the directory hash.
|
|
129
|
+
*/
|
|
130
|
+
export function readSkillMarker(directory) {
|
|
131
|
+
try {
|
|
132
|
+
const parsed = JSON.parse(fs.readFileSync(path.join(directory, MARKER_FILE), "utf8"));
|
|
133
|
+
return parsed && parsed.schema === SKILLS_SYNC_SCHEMA && typeof parsed.hash === "string" ? parsed : null;
|
|
134
|
+
} catch {
|
|
135
|
+
return null;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export function writeSkillMarker(directory, hash, kitVersion) {
|
|
140
|
+
try {
|
|
141
|
+
fs.writeFileSync(
|
|
142
|
+
path.join(directory, MARKER_FILE),
|
|
143
|
+
`${JSON.stringify({ schema: SKILLS_SYNC_SCHEMA, hash, kitVersion, installedAt: new Date().toISOString() }, null, 2)}\n`,
|
|
144
|
+
"utf8",
|
|
145
|
+
);
|
|
146
|
+
} catch {
|
|
147
|
+
/* provenance is best effort: an unwritable marker must not fail a sync */
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
91
151
|
export function loadSkillState(target) {
|
|
92
152
|
try {
|
|
93
153
|
const parsed = JSON.parse(fs.readFileSync(path.join(target, STATE_FILE), "utf8"));
|
|
@@ -136,6 +196,36 @@ function copySkill(source, destination) {
|
|
|
136
196
|
return temp;
|
|
137
197
|
}
|
|
138
198
|
|
|
199
|
+
function sleepSync(ms) {
|
|
200
|
+
/* Atomics.wait is a synchronous sleep in Node (browsers forbid it). */
|
|
201
|
+
try {
|
|
202
|
+
Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, ms);
|
|
203
|
+
} catch {
|
|
204
|
+
/* no SharedArrayBuffer: fall through to a tight retry loop */
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Windows refuses a directory rename while a freshly written copy is still
|
|
210
|
+
* being scanned by the indexer or an antivirus (EPERM/EBUSY). A short retry
|
|
211
|
+
* turns that transient failure into a normal update instead of a failed start.
|
|
212
|
+
*/
|
|
213
|
+
function renameWithRetry(from, to) {
|
|
214
|
+
const retryable = new Set(["EPERM", "EBUSY", "EACCES", "ENOTEMPTY"]);
|
|
215
|
+
let lastError;
|
|
216
|
+
for (let attempt = 0; attempt < 6; attempt += 1) {
|
|
217
|
+
try {
|
|
218
|
+
fs.renameSync(from, to);
|
|
219
|
+
return;
|
|
220
|
+
} catch (error) {
|
|
221
|
+
lastError = error;
|
|
222
|
+
if (!retryable.has(error?.code)) throw error;
|
|
223
|
+
sleepSync(20 * (attempt + 1));
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
throw lastError;
|
|
227
|
+
}
|
|
228
|
+
|
|
139
229
|
function moveWithBackup(target, source, name) {
|
|
140
230
|
const hadTarget = fs.existsSync(target);
|
|
141
231
|
let backup = null;
|
|
@@ -144,13 +234,13 @@ function moveWithBackup(target, source, name) {
|
|
|
144
234
|
fs.mkdirSync(backupRoot, { recursive: true });
|
|
145
235
|
const stamp = new Date().toISOString().replace(/[:.]/gu, "-");
|
|
146
236
|
backup = path.join(backupRoot, `${name}-${stamp}`);
|
|
147
|
-
|
|
237
|
+
renameWithRetry(target, backup);
|
|
148
238
|
}
|
|
149
239
|
try {
|
|
150
|
-
|
|
240
|
+
renameWithRetry(source, target);
|
|
151
241
|
} catch (error) {
|
|
152
242
|
if (backup && !fs.existsSync(target)) {
|
|
153
|
-
try {
|
|
243
|
+
try { renameWithRetry(backup, target); } catch { /* best effort */ }
|
|
154
244
|
}
|
|
155
245
|
throw error;
|
|
156
246
|
}
|
|
@@ -171,9 +261,11 @@ export function syncSkills({ source, target, kitVersion, manifest, baseline, for
|
|
|
171
261
|
state.schema = SKILLS_SYNC_SCHEMA;
|
|
172
262
|
const knownBaselines = new Map();
|
|
173
263
|
for (const version of Object.values(baseline ?? {})) {
|
|
174
|
-
for (const [name,
|
|
264
|
+
for (const [name, value] of Object.entries(version ?? {})) {
|
|
175
265
|
if (!knownBaselines.has(name)) knownBaselines.set(name, new Set());
|
|
176
|
-
|
|
266
|
+
/* A version may hold an array when the git tree and the published
|
|
267
|
+
* tarball drifted; both hashes are legitimate kit content. */
|
|
268
|
+
for (const hash of Array.isArray(value) ? value : [value]) knownBaselines.get(name).add(hash);
|
|
177
269
|
}
|
|
178
270
|
}
|
|
179
271
|
const bundled = [];
|
|
@@ -191,10 +283,15 @@ export function syncSkills({ source, target, kitVersion, manifest, baseline, for
|
|
|
191
283
|
const targetExists = fs.existsSync(targetDir);
|
|
192
284
|
const entry = state.skills[name];
|
|
193
285
|
const targetHash = targetExists ? hashSkillDir(targetDir).hash : "";
|
|
286
|
+
/* Kits before the EOL fix hashed raw bytes; match their records too, so an
|
|
287
|
+
* old Windows copy heals instead of being reported as a user edit. */
|
|
288
|
+
const rawTargetHash = targetExists ? hashSkillDirRaw(targetDir).hash : "";
|
|
289
|
+
const marker = targetExists ? readSkillMarker(targetDir) : null;
|
|
194
290
|
|
|
195
291
|
if (!targetExists) {
|
|
196
292
|
const temp = copySkill(sourceDir, targetDir);
|
|
197
293
|
moveWithBackup(targetDir, temp, name);
|
|
294
|
+
writeSkillMarker(targetDir, sourceHash, state.kitVersion);
|
|
198
295
|
state.skills[name] = { hash: sourceHash, updatedAt: state.updatedAt, kitVersion: state.kitVersion };
|
|
199
296
|
delete state.conflicts[name];
|
|
200
297
|
result.added.push(name);
|
|
@@ -203,14 +300,24 @@ export function syncSkills({ source, target, kitVersion, manifest, baseline, for
|
|
|
203
300
|
if (targetHash === sourceHash || (manifestHash && targetHash === manifestHash && sourceHash === manifestHash)) {
|
|
204
301
|
state.skills[name] = { hash: sourceHash, updatedAt: entry?.updatedAt ?? state.updatedAt, kitVersion: state.kitVersion };
|
|
205
302
|
delete state.conflicts[name];
|
|
303
|
+
if (!marker || marker.hash !== sourceHash) writeSkillMarker(targetDir, sourceHash, state.kitVersion);
|
|
206
304
|
if (!entry) result.adopted.push(name);
|
|
207
305
|
continue;
|
|
208
306
|
}
|
|
209
|
-
|
|
210
|
-
|
|
307
|
+
/* The kit installed this copy itself and nobody touched it since: its
|
|
308
|
+
* version may be missing from the baseline, but the content is still the
|
|
309
|
+
* kit's, not a user edit. */
|
|
310
|
+
const unchangedSinceSync =
|
|
311
|
+
Boolean(entry && (entry.hash === targetHash || entry.hash === rawTargetHash)) ||
|
|
312
|
+
Boolean(marker && (marker.hash === targetHash || marker.hash === rawTargetHash));
|
|
313
|
+
/* Matching any released version makes the copy kit content, not a user
|
|
314
|
+
* edit. The backup in moveWithBackup keeps an intentional revert
|
|
315
|
+
* recoverable even though the file itself is replaced. */
|
|
316
|
+
const knownBaseline = Boolean(knownBaselines.get(name)?.has(targetHash) || knownBaselines.get(name)?.has(rawTargetHash));
|
|
211
317
|
if (force || unchangedSinceSync || knownBaseline) {
|
|
212
318
|
const temp = copySkill(sourceDir, targetDir);
|
|
213
319
|
moveWithBackup(targetDir, temp, name);
|
|
320
|
+
writeSkillMarker(targetDir, sourceHash, state.kitVersion);
|
|
214
321
|
state.skills[name] = { hash: sourceHash, updatedAt: state.updatedAt, kitVersion: state.kitVersion };
|
|
215
322
|
delete state.conflicts[name];
|
|
216
323
|
result.updated.push(name);
|
|
@@ -230,6 +337,13 @@ export function syncSkills({ source, target, kitVersion, manifest, baseline, for
|
|
|
230
337
|
if (!bundled.includes(name) && fs.existsSync(path.join(target, name))) result.removed.push(name);
|
|
231
338
|
}
|
|
232
339
|
|
|
340
|
+
/* A conflict record for a skill the bundle no longer ships can never be
|
|
341
|
+
* resolved by a later sync, so it would keep the profile "conflicted"
|
|
342
|
+
* forever. Drop such stale records. */
|
|
343
|
+
for (const name of Object.keys(state.conflicts)) {
|
|
344
|
+
if (!bundled.includes(name)) delete state.conflicts[name];
|
|
345
|
+
}
|
|
346
|
+
|
|
233
347
|
saveSkillState(target, state);
|
|
234
348
|
result.state = state;
|
|
235
349
|
if (result.added.length + result.updated.length > 0) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-desktop-kit",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.39.0",
|
|
4
4
|
"description": "DeepSeek Harness desktop kit — 21 plugins and 38 skills: quality mission with phases, gates G0..G13, a pre-work layer (product brief, measured references, IA/content inventory, plan with dependencies, risks and blockers), an art-direction brief with variants, a release pipeline and remote_ops (typed ssh/scp with host state diff), units of work and an evidence trail; browser QA with 18 actions (interaction scenarios, accessibility WCAG 2.2 AA, performance budgets, element locate, pixel-diff baselines, palette contrast matrix, cross-page consistency, interactive-state and content checks, design report, reference take), plus an i18n dictionary pipeline; 14 project agents including ui-critic, a11y, cms-ops and a worktree builder; phase-aware skill routing with a token budget; MCP with OAuth 2.1, sampling and elicitation; read-only/writer swarm with a shared board; token lab, Skills Studio, project memory, guardrails, repo map, checkpoints, plan mode, GitHub review, hooks/commands, Russian UI and profile transfer. Includes local marketplace, localhost IDE bridge and an honest sandbox audit.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"deepseek-harness",
|
|
@@ -91,6 +91,7 @@
|
|
|
91
91
|
"scripts": {
|
|
92
92
|
"build:client": "node tools/build-client.mjs",
|
|
93
93
|
"build:skills": "node tools/build-skill-manifest.mjs",
|
|
94
|
+
"build:baseline": "node tools/build-baseline.mjs",
|
|
94
95
|
"check:client": "node tools/check-client.mjs client.js",
|
|
95
96
|
"test": "node tools/run-tests.mjs --parallel",
|
|
96
97
|
"skills:cost": "node tools/skill-cost.mjs",
|
|
@@ -59,6 +59,24 @@ function a11yProbe() {
|
|
|
59
59
|
return true;
|
|
60
60
|
};
|
|
61
61
|
|
|
62
|
+
/* `aria-hidden` content may only be reported when a keyboard user could
|
|
63
|
+
* reach it. A dialog closed with display/visibility is not rendered at all,
|
|
64
|
+
* so its buttons are not focusable and the block is not a violation. */
|
|
65
|
+
const hiddenByAncestor = (el) => {
|
|
66
|
+
try {
|
|
67
|
+
if (typeof el.checkVisibility === "function") return !el.checkVisibility({ visibilityProperty: true });
|
|
68
|
+
} catch {
|
|
69
|
+
/* Chrome without checkVisibility: walk the ancestors below */
|
|
70
|
+
}
|
|
71
|
+
let node = el;
|
|
72
|
+
while (node && node.nodeType === 1) {
|
|
73
|
+
const style = getComputedStyle(node);
|
|
74
|
+
if (style.display === "none" || style.visibility === "hidden") return true;
|
|
75
|
+
node = node.parentElement;
|
|
76
|
+
}
|
|
77
|
+
return false;
|
|
78
|
+
};
|
|
79
|
+
|
|
62
80
|
const nameOf = (el) => {
|
|
63
81
|
const aria = el.getAttribute("aria-label");
|
|
64
82
|
if (aria && aria.trim()) return aria.trim();
|
|
@@ -191,6 +209,7 @@ function a11yProbe() {
|
|
|
191
209
|
}
|
|
192
210
|
|
|
193
211
|
for (const el of document.querySelectorAll("[aria-hidden='true']")) {
|
|
212
|
+
if (el.closest("[hidden]") || hiddenByAncestor(el)) continue;
|
|
194
213
|
const focusable = el.querySelector("a[href], button, input, select, textarea, [tabindex]:not([tabindex='-1'])");
|
|
195
214
|
if (focusable) push("aria-hidden-focusable", "serious", pathOf(el), "aria-hidden=true содержит фокусируемый элемент");
|
|
196
215
|
}
|
|
@@ -786,7 +805,7 @@ function formatA11yText(result) {
|
|
|
786
805
|
for (const issue of (result.issues ?? []).slice(0, 18)) {
|
|
787
806
|
lines.push(` ${issue.severity === "serious" ? "FAIL" : issue.severity === "moderate" ? "warn" : "info"} ${issue.rule}: ${issue.detail} [${issue.node}]`);
|
|
788
807
|
}
|
|
789
|
-
for (const item of (result.focus ?? []).filter((entry) => entry.visible === false || entry.obscured).slice(0, 8)) {
|
|
808
|
+
for (const item of (result.focus ?? []).filter((entry) => (entry.visible === false && entry.focusVisible === true) || entry.obscured).slice(0, 8)) {
|
|
790
809
|
const why = item.visible === false ? "нет видимого индикатора" : `перекрыт (${item.top}); проверьте после закрытия оверлеев`;
|
|
791
810
|
lines.push(` ${item.visible === false ? "FAIL" : "warn"} focus ${item.tag} «${item.label}»: ${why}`);
|
|
792
811
|
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|---|---|
|
|
11
11
|
| Профиль и конфиги | `package.json`, `cordis.patch.yml`, `cordis.yml`, `pnpm-lock.yaml`, `.npmrc` (без `node_modules`) |
|
|
12
12
|
| Рабочие области | реестр `storages/workspace.json`: названия, папки, группировка чатов, архив/закрепления |
|
|
13
|
-
| Папки рабочих областей |
|
|
13
|
+
| Папки рабочих областей | по умолчанию включено: код и артефакты папок рабочих областей без `node_modules`, `.git`, `pgruntime`, `tmp`, кэшей; без лимита размера |
|
|
14
14
|
| Локальные плагины | исходники плагинов, установленных из папок (`link:`/`file:` в зависимостях профиля) |
|
|
15
15
|
| Навыки | `~/.dsh/skills` (без `node_modules`) |
|
|
16
16
|
| Память | `~/.dsh/memory` |
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
| Глобальные конфиги | `AGENTS.md`, `dream-skin.json` |
|
|
19
19
|
| История сессий | `~/.dsh/sessions` (опционально, может быть большой) |
|
|
20
20
|
| Вложения | `~/.dsh/attachments` (опционально) |
|
|
21
|
-
| Секреты | `.credentials.yaml` (по умолчанию
|
|
21
|
+
| Секреты | `.credentials.yaml` (по умолчанию включено; только доверенная машина — можно снять галочку) |
|
|
22
22
|
|
|
23
23
|
## Как это работает
|
|
24
24
|
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
`manifest.json` (формат, версия, дата, машина, профиль, состав, перечень файлов
|
|
27
27
|
с размерами). Архив по умолчанию: `<Документы>\DSH-обмены\dsh-profile-<дата>.tar.gz`.
|
|
28
28
|
- **Рабочие области.** В архив попадает реестр рабочих областей: названия, папки, группировка чатов, закреплённые и архивные чаты. При импорте он **сливается** с локальным реестром, пути переписываются со старого домашнего каталога на новый, а ссылки на отсутствующие на новой машине сессии отфильтровываются. После импорта нужен перезапуск DSH, чтобы реестр перечитался.
|
|
29
|
-
- **Папки рабочих областей (опция).** Если включить, в архив добавляются файлы папок рабочих областей (`payload/workspace-folders/<id>/...`). Импорт **никогда не перезаписывает** существующие каталоги: если путь уже существует и не пуст, папка разворачивается рядом с суффиксом `-dsh-restored-<дата>`, путь сообщается в отчёте. Исключаются `node_modules`, `.git`, `pgruntime`, `tmp`, виртуальные окружения и кэши;
|
|
29
|
+
- **Папки рабочих областей (опция).** Если включить, в архив добавляются файлы папок рабочих областей (`payload/workspace-folders/<id>/...`). Импорт **никогда не перезаписывает** существующие каталоги: если путь уже существует и не пуст, папка разворачивается рядом с суффиксом `-dsh-restored-<дата>`, путь сообщается в отчёте. Исключаются `node_modules`, `.git`, `pgruntime`, `tmp`, виртуальные окружения и кэши; лимита размера и числа файлов нет — архив пишется потоково через системный `tar`, а не в память.
|
|
30
30
|
- **Импорт.** Архив проверяется (манифест/формат), затем текущее состояние
|
|
31
31
|
резервируется в `~/.dsh/backup-import-<дата>/`, файлы разворачиваются, `link:`
|
|
32
32
|
зависимости профиля переписываются на `~/.dsh/local-plugins/<пакет>`,
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
## Ограничения
|
|
57
57
|
|
|
58
58
|
- `node_modules` не переносится — восстанавливается через `pnpm install`.
|
|
59
|
-
- По умолчанию архив содержит
|
|
59
|
+
- По умолчанию архив содержит **всё**: `~/.dsh` (профиль, плагины, навыки, память, projects-memory, сессии, вложения, секреты) и папки рабочих областей. Всё можно снять галочками; кнопки «Выбрать всё»/«Снять всё» — в одном месте.
|
|
60
60
|
- Максимально большой перенос ограничен диском и таймаутом RPC; сессии/вложения
|
|
61
61
|
включайте осознанно.
|
|
62
62
|
- После импорта обязателен перезапуск DSH.
|
|
@@ -67,6 +67,8 @@ window.__ModuleLoader__.load({
|
|
|
67
67
|
missingArchive: "Enter the archive path first",
|
|
68
68
|
confirmRequired: "Confirm the replacement checkbox first",
|
|
69
69
|
selectAtLeastOne: "Tick at least one item to export",
|
|
70
|
+
selectAll: "Select all",
|
|
71
|
+
selectNone: "Clear all",
|
|
70
72
|
groupProfile: "Profile and configs",
|
|
71
73
|
groupProfileDesc: "package.json, cordis.patch.yml, cordis.yml, pnpm-lock.yaml (no node_modules)",
|
|
72
74
|
groupLocalPlugins: "Local plugins",
|
|
@@ -165,6 +167,8 @@ window.__ModuleLoader__.load({
|
|
|
165
167
|
missingArchive: "Сначала укажите путь к архиву",
|
|
166
168
|
confirmRequired: "Сначала подтвердите замену текущего профиля",
|
|
167
169
|
selectAtLeastOne: "Отметьте хотя бы один пункт для экспорта",
|
|
170
|
+
selectAll: "Выбрать всё",
|
|
171
|
+
selectNone: "Снять всё",
|
|
168
172
|
groupProfile: "Профиль и конфиги",
|
|
169
173
|
groupProfileDesc: "package.json, cordis.patch.yml, cordis.yml, pnpm-lock.yaml (без node_modules)",
|
|
170
174
|
groupLocalPlugins: "Локальные плагины",
|
|
@@ -263,6 +267,8 @@ window.__ModuleLoader__.load({
|
|
|
263
267
|
missingArchive: "请先输入归档路径",
|
|
264
268
|
confirmRequired: "请先勾选确认替换当前配置",
|
|
265
269
|
selectAtLeastOne: "请至少勾选一项导出内容",
|
|
270
|
+
selectAll: "全选",
|
|
271
|
+
selectNone: "清空",
|
|
266
272
|
groupProfile: "配置与档案",
|
|
267
273
|
groupProfileDesc: "package.json、cordis.patch.yml、cordis.yml、pnpm-lock.yaml(不含 node_modules)",
|
|
268
274
|
groupLocalPlugins: "本地插件",
|
|
@@ -533,7 +539,7 @@ window.__ModuleLoader__.load({
|
|
|
533
539
|
}
|
|
534
540
|
const value = result.value;
|
|
535
541
|
setOptions(value);
|
|
536
|
-
setSelected({ ...value.selection
|
|
542
|
+
setSelected({ ...value.selection });
|
|
537
543
|
setDestination(value.destination ?? "");
|
|
538
544
|
setPhase("ready");
|
|
539
545
|
})
|
|
@@ -554,15 +560,7 @@ window.__ModuleLoader__.load({
|
|
|
554
560
|
.filter((row) => row !== undefined);
|
|
555
561
|
}, [options]);
|
|
556
562
|
|
|
557
|
-
const visibleGroups =
|
|
558
|
-
() =>
|
|
559
|
-
groups.filter(
|
|
560
|
-
(group) =>
|
|
561
|
-
group.id !== "projectsMemory" &&
|
|
562
|
-
(mode === "full" || group.id === "workspaces" || group.id === "workspaceFolders"),
|
|
563
|
-
),
|
|
564
|
-
[groups, mode],
|
|
565
|
-
);
|
|
563
|
+
const visibleGroups = groups;
|
|
566
564
|
|
|
567
565
|
const selectedCount = visibleGroups.filter((group) => selected[group.id] === true).length;
|
|
568
566
|
|
|
@@ -583,7 +581,7 @@ window.__ModuleLoader__.load({
|
|
|
583
581
|
credentials: false,
|
|
584
582
|
});
|
|
585
583
|
} else {
|
|
586
|
-
setSelected({ ...(options?.selection ?? {})
|
|
584
|
+
setSelected({ ...(options?.selection ?? {}) });
|
|
587
585
|
}
|
|
588
586
|
setPreview(null);
|
|
589
587
|
setImported(null);
|
|
@@ -726,16 +724,25 @@ window.__ModuleLoader__.load({
|
|
|
726
724
|
}
|
|
727
725
|
}
|
|
728
726
|
|
|
727
|
+
const allIds = visibleGroups.map((group) => group.id);
|
|
729
728
|
const stepOneGroups = h(
|
|
730
729
|
"div",
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
730
|
+
null,
|
|
731
|
+
h("div", { style: { display: "flex", gap: "8px", flexWrap: "wrap", marginBottom: "10px" } },
|
|
732
|
+
h("button", { className: "dpt-btn", type: "button", onClick: () => setSelected(Object.fromEntries(allIds.map((id) => [id, true]))) }, t("selectAll")),
|
|
733
|
+
h("button", { className: "dpt-btn", type: "button", onClick: () => setSelected(Object.fromEntries(allIds.map((id) => [id, false]))) }, t("selectNone")),
|
|
734
|
+
),
|
|
735
|
+
h(
|
|
736
|
+
"div",
|
|
737
|
+
{ className: "dpt-list" },
|
|
738
|
+
visibleGroups.map((group) => h(GroupRow, {
|
|
739
|
+
key: group.id,
|
|
740
|
+
group,
|
|
741
|
+
checked: selected[group.id] === true,
|
|
742
|
+
onToggle: toggle,
|
|
743
|
+
t,
|
|
744
|
+
})),
|
|
745
|
+
),
|
|
739
746
|
);
|
|
740
747
|
|
|
741
748
|
return h(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-profile-transfer",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Move a complete DSH setup between machines: pick what to export (profile, skills, memory, local plugins, sessions, secrets), pack one archive, restore it on a fresh install.",
|
|
6
6
|
"type": "module",
|
|
@@ -34,5 +34,3 @@
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
|
|
38
|
-
|