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.
@@ -23,6 +23,7 @@ import os from "node:os";
23
23
  import path from "node:path";
24
24
  import zlib from "node:zlib";
25
25
  import crypto from "node:crypto";
26
+ import { spawnSync } from "node:child_process";
26
27
  import { fileURLToPath } from "node:url";
27
28
 
28
29
  const PLUGIN_ROOT = path.dirname(fileURLToPath(import.meta.url));
@@ -32,8 +33,6 @@ export const FORMAT = "dsh-profile-transfer";
32
33
  export const FORMAT_VERSION = 1;
33
34
  const EXCLUDED_NAMES = new Set(["node_modules", ".git", ".DS_Store", "Thumbs.db"]);
34
35
  const WORKSPACE_FOLDER_EXCLUDES = new Set(["pgruntime", ".venv", "venv", "__pycache__", ".pytest_cache", ".mypy_cache", ".cache", ".next", "coverage", "tmp"]);
35
- const MAX_WORKSPACE_FOLDER_BYTES = 1024 * 1024 * 1024;
36
- const MAX_WORKSPACE_FOLDER_FILES = 250000;
37
36
  const SKIP_DSH_TOP_LEVEL = new Set([
38
37
  "profiles",
39
38
  "skills",
@@ -253,13 +252,13 @@ const DEFAULT_SELECTION = {
253
252
  profile: true,
254
253
  localPlugins: true,
255
254
  workspaces: true,
256
- workspaceFolders: false,
255
+ workspaceFolders: true,
257
256
  skills: true,
258
257
  memory: true,
259
- projectsMemory: false,
260
- sessions: false,
261
- attachments: false,
262
- credentials: false,
258
+ projectsMemory: true,
259
+ sessions: true,
260
+ attachments: true,
261
+ credentials: true,
263
262
  config: true,
264
263
  };
265
264
 
@@ -313,7 +312,7 @@ function workspaceFolderName(id) {
313
312
 
314
313
  /** Files and per-workspace stats for the optional "workspace folders" group. */
315
314
  function workspaceFolderEntries(home, options = {}) {
316
- const maxFiles = Number.isFinite(options.maxFiles) ? Math.max(1, Number(options.maxFiles)) : 8000;
315
+ const maxFiles = Number.isFinite(options.maxFiles) ? Math.max(1, Number(options.maxFiles)) : Infinity;
317
316
  const entries = [];
318
317
  const workspaces = [];
319
318
  let capped = false;
@@ -413,7 +412,7 @@ export function describeSources(options = {}) {
413
412
  : [];
414
413
  addGroup("workspaces", "Рабочие области", "реестр рабочих областей: названия, папки, закрепление и группировка чатов", workspaceFiles, workspaceFiles.length > 0);
415
414
 
416
- const workspaceFolderPlan = workspaceFolderEntries(home, { maxFiles: 8000 });
415
+ const workspaceFolderPlan = workspaceFolderEntries(home);
417
416
  const workspaceFolderFiles = workspaceFolderPlan.entries;
418
417
  const workspaceFolderGroup = {
419
418
  id: "workspaceFolders",
@@ -452,12 +451,12 @@ export function describeSources(options = {}) {
452
451
  addGroup("config", "Глобальные конфиги", "AGENTS.md, dream-skin.json", configFiles, configFiles.length > 0);
453
452
 
454
453
  const sessionsDir = path.join(home, "sessions");
455
- const sessionFiles = walkFiles(sessionsDir, "payload/sessions", { maxFiles: 4000 });
454
+ const sessionFiles = walkFiles(sessionsDir, "payload/sessions");
456
455
  const sessionsGroup = { id: "sessions", label: "История сессий", description: "sessions/ — может быть очень большим", available: fs.existsSync(sessionsDir), files: sessionFiles.length, bytes: sizeOf(sessionFiles), human: humanSize(sizeOf(sessionFiles)), capped: sessionFiles.capped === true };
457
456
  groups.push(sessionsGroup);
458
457
 
459
458
  const attachmentsDir = path.join(home, "attachments");
460
- const attachmentFiles = walkFiles(attachmentsDir, "payload/attachments", { maxFiles: 2000 });
459
+ const attachmentFiles = walkFiles(attachmentsDir, "payload/attachments");
461
460
  groups.push({ id: "attachments", label: "Вложения", description: "attachments/ — картинки и файлы из чатов", available: fs.existsSync(attachmentsDir), files: attachmentFiles.length, bytes: sizeOf(attachmentFiles), human: humanSize(sizeOf(attachmentFiles)), capped: attachmentFiles.capped === true });
462
461
 
463
462
  const credentialsFile = path.join(home, ".credentials.yaml");
@@ -512,7 +511,7 @@ function groupFiles(description, id) {
512
511
  ? [{ source: path.join(home, "storages", "workspace.json"), relative: "payload/workspaces/workspace.json", size: fs.statSync(path.join(home, "storages", "workspace.json")).size }]
513
512
  : [];
514
513
  case "workspaceFolders":
515
- return workspaceFolderEntries(home, { maxFiles: MAX_WORKSPACE_FOLDER_FILES }).entries;
514
+ return workspaceFolderEntries(home).entries;
516
515
  case "skills":
517
516
  return walkFiles(path.join(home, "skills"), "payload/skills");
518
517
  case "memory":
@@ -572,43 +571,21 @@ export function exportBundle(options = {}) {
572
571
  const entries = collectEntries(description);
573
572
  if (entries.length === 0) throw new Error("не выбрано ни одной группы для экспорта");
574
573
  const workspaceFolderEntriesSelected = entries.filter((entry) => entry.relative.startsWith("payload/workspace-folders/"));
575
- const workspaceFolderBytes = sizeOf(workspaceFolderEntriesSelected);
576
- if (workspaceFolderEntriesSelected.length > MAX_WORKSPACE_FOLDER_FILES || workspaceFolderBytes > MAX_WORKSPACE_FOLDER_BYTES) {
577
- throw new Error(
578
- `Папки рабочих областей слишком большие для архива: ${workspaceFolderEntriesSelected.length} файлов, ${humanSize(workspaceFolderBytes)}. ` +
579
- `Лимит — ${MAX_WORKSPACE_FOLDER_FILES} файлов и ${humanSize(MAX_WORKSPACE_FOLDER_BYTES)}. Скопируйте папки проектов вручную.`,
580
- );
581
- }
582
574
  const destinationDirectory = options.destinationDirectory ?? path.join(os.homedir(), "Documents", "DSH-обмены");
583
575
  fs.mkdirSync(destinationDirectory, { recursive: true });
584
576
  const timestamp = new Date().toISOString().replace(/[:.]/gu, "-").slice(0, 19);
585
577
  const archivePath = options.archivePath ?? path.join(destinationDirectory, `dsh-profile-${timestamp}.tar.gz`);
586
- const tar = createTarGz();
587
- // Root-level bootstrap first: on a clean machine the user sees УСТАНОВИТЬ.cmd
588
- // immediately after extracting the archive, without digging into payload/.
589
- const bootstrapFiles = bootstrapArchiveFiles();
590
- for (const file of bootstrapFiles) {
591
- try {
592
- const bytes = fs.readFileSync(file.absolute);
593
- tar.addFile(safeRelative(file.relative), bytes, file.stat);
594
- } catch {
595
- /* a missing bootstrap resource must not break the data export */
596
- }
597
- }
598
578
  const files = [];
599
579
  const seen = new Set();
600
580
  for (const entry of entries) {
601
581
  if (seen.has(entry.relative)) continue;
602
582
  seen.add(entry.relative);
603
- let bytes;
604
- try {
605
- bytes = fs.readFileSync(entry.source);
606
- } catch {
607
- continue;
608
- }
609
- tar.addFile(safeRelative(entry.relative), bytes, fs.statSync(entry.source));
610
- files.push({ path: safeRelative(entry.relative), size: bytes.length, sha256: sha256(bytes) });
583
+ let size;
584
+ try { size = fs.statSync(entry.source).size; } catch { continue; }
585
+ files.push({ path: safeRelative(entry.relative), size });
611
586
  }
587
+ const bootstrapFiles = bootstrapArchiveFiles();
588
+ for (const file of bootstrapFiles) files.push({ path: safeRelative(file.relative), size: file.stat.size });
612
589
  const manifest = {
613
590
  format: FORMAT,
614
591
  version: FORMAT_VERSION,
@@ -653,30 +630,91 @@ export function exportBundle(options = {}) {
653
630
  },
654
631
  files,
655
632
  };
656
- tar.addFile("manifest.json", Buffer.from(`${JSON.stringify(manifest, null, 2)}\n`, "utf8"));
657
- const archive = tar.finish();
658
- fs.writeFileSync(archivePath, archive);
659
- return { archivePath, manifest, bytes: archive.length, human: humanSize(archive.length) };
633
+
634
+ // Stage hardlinks (or copies) on the same volume as the sources, then let the
635
+ // OS tar stream the archive to disk. This removes the old 1 GB in-memory cap.
636
+ const staging = fs.mkdtempSync(path.join(os.tmpdir(), "dsh-transfer-stage-"));
637
+ try {
638
+ const place = (relative, source) => {
639
+ const target = path.join(staging, safeRelative(relative));
640
+ fs.mkdirSync(path.dirname(target), { recursive: true });
641
+ try {
642
+ fs.linkSync(source, target);
643
+ } catch {
644
+ fs.copyFileSync(source, target);
645
+ }
646
+ };
647
+ for (const file of bootstrapFiles) {
648
+ try { place(file.relative, file.absolute); } catch { /* bootstrap is optional */ }
649
+ }
650
+ for (const entry of entries) {
651
+ if (seen.has(entry.relative) === false) continue;
652
+ try { place(entry.relative, entry.source); } catch { /* unreadable file is skipped */ }
653
+ }
654
+ fs.writeFileSync(path.join(staging, "manifest.json"), `${JSON.stringify(manifest, null, 2)}\n`, "utf8");
655
+ if (fs.existsSync(archivePath)) fs.rmSync(archivePath, { force: true });
656
+ const tar = spawnSync(process.env.TAR ?? "tar", ["-czf", archivePath, "-C", staging, "."], { stdio: "pipe", windowsHide: true, maxBuffer: 16 * 1024 * 1024 });
657
+ if (tar.error) throw new Error(`tar не запустился: ${tar.error.message}`);
658
+ if (tar.status !== 0) throw new Error(`tar завершился с кодом ${tar.status}: ${(tar.stderr ?? "").toString().slice(0, 500)}`);
659
+ } finally {
660
+ fs.rmSync(staging, { recursive: true, force: true });
661
+ }
662
+ const stat = fs.statSync(archivePath);
663
+ return { archivePath, manifest, bytes: stat.size, human: humanSize(stat.size) };
660
664
  }
661
665
 
662
666
  /* ------------------------------------------------------------------ */
663
667
  /* import */
664
668
  /* ------------------------------------------------------------------ */
665
669
 
666
- export function inspectBundle(archivePath) {
667
- const archive = fs.readFileSync(archivePath);
668
- const entries = parseTarGz(archive);
669
- const manifestEntry = entries.find((entry) => entry.path === "manifest.json");
670
- if (manifestEntry === undefined) throw new Error("в архиве нет manifest.json — это не архив переноса DSH");
671
- const manifest = JSON.parse(manifestEntry.data.toString("utf8"));
672
- if (manifest.format !== FORMAT || manifest.version !== FORMAT_VERSION) throw new Error("неизвестный формат архива переноса");
673
- const files = entries.filter((entry) => entry.type === "0" && entry.path !== "manifest.json");
674
- return {
675
- manifest,
676
- files: files.map((entry) => ({ path: entry.path, size: entry.data.length })),
677
- bytes: archive.length,
678
- human: humanSize(archive.length),
670
+ function extractArchiveToTemp(archivePath) {
671
+ const base = fs.existsSync(archivePath) ? path.dirname(archivePath) : os.tmpdir();
672
+ const directory = fs.mkdtempSync(path.join(base, "dsh-transfer-read-"));
673
+ const tar = spawnSync(process.env.TAR ?? "tar", ["-xzf", archivePath, "-C", directory], { stdio: "pipe", windowsHide: true, maxBuffer: 16 * 1024 * 1024 });
674
+ if (tar.error) throw new Error(`tar не запустился: ${tar.error.message}`);
675
+ if (tar.status !== 0) throw new Error(`не удалось распаковать архив: ${(tar.stderr ?? "").toString().slice(0, 500)}`);
676
+ return directory;
677
+ }
678
+
679
+ function extractedEntries(directory) {
680
+ const entries = [];
681
+ const walk = (current) => {
682
+ for (const item of fs.readdirSync(current, { withFileTypes: true })) {
683
+ const absolute = path.join(current, item.name);
684
+ if (item.isDirectory()) { walk(absolute); continue; }
685
+ if (!item.isFile()) continue;
686
+ const relative = path.relative(directory, absolute).replaceAll("\\", "/").replace(/^\.\//u, "");
687
+ const stat = fs.statSync(absolute);
688
+ entries.push({
689
+ type: "0",
690
+ path: relative,
691
+ size: stat.size,
692
+ get data() { return fs.readFileSync(absolute); },
693
+ });
694
+ }
679
695
  };
696
+ walk(directory);
697
+ return entries;
698
+ }
699
+
700
+ export function inspectBundle(archivePath) {
701
+ if (!fs.existsSync(archivePath)) throw new Error(`архив не найден: ${archivePath}`);
702
+ const temporary = fs.mkdtempSync(path.join(path.dirname(archivePath), "dsh-transfer-manifest-"));
703
+ try {
704
+ const tar = spawnSync(process.env.TAR ?? "tar", ["-xzf", archivePath, "-C", temporary, "manifest.json"], { stdio: "pipe", windowsHide: true });
705
+ if (tar.status !== 0) throw new Error("в архиве нет manifest.json — это не архив переноса DSH");
706
+ const manifest = JSON.parse(fs.readFileSync(path.join(temporary, "manifest.json"), "utf8"));
707
+ if (manifest.format !== FORMAT || manifest.version !== FORMAT_VERSION) throw new Error("неизвестный формат архива переноса");
708
+ const bytes = fs.statSync(archivePath).size;
709
+ return {
710
+ manifest,
711
+ files: (manifest.files ?? []).map((file) => ({ path: file.path, size: file.size })),
712
+ bytes,
713
+ human: humanSize(bytes),
714
+ };
715
+ } finally {
716
+ fs.rmSync(temporary, { recursive: true, force: true });
717
+ }
680
718
  }
681
719
 
682
720
  /** Session ids that actually exist under the sessions directory (cwd folder / session-id). */
@@ -923,7 +961,8 @@ export function applyBundle(options = {}) {
923
961
  if (typeof archivePath !== "string" || !fs.existsSync(archivePath)) throw new Error(`архив не найден: ${archivePath}`);
924
962
  const inspected = inspectBundle(archivePath);
925
963
  const selection = normalizeSelection(options.selection ?? inspected.manifest.selection);
926
- const entries = parseTarGz(fs.readFileSync(archivePath));
964
+ const extractedDirectory = extractArchiveToTemp(archivePath);
965
+ const entries = extractedEntries(extractedDirectory);
927
966
  const warnings = [];
928
967
  const restored = { profile: 0, localPlugins: 0, workspaces: 0, workspaceFolders: 0, skills: 0, memory: 0, projectsMemory: 0, projectsRegistry: { added: 0, merged: 0 }, config: 0, sessions: 0, attachments: 0, credentials: 0 };
929
968
  let backupDir;
@@ -1081,6 +1120,7 @@ export function applyBundle(options = {}) {
1081
1120
  const nodeModules = path.join(home, "profiles", profileName, "node_modules");
1082
1121
  if (!fs.existsSync(nodeModules)) needsPnpm = true;
1083
1122
 
1123
+ fs.rmSync(extractedDirectory, { recursive: true, force: true });
1084
1124
  const summaryPath = path.join(home, "profile-transfer-last.json");
1085
1125
  fs.writeFileSync(summaryPath, `${JSON.stringify({
1086
1126
  appliedAt: new Date().toISOString(),
@@ -112,6 +112,13 @@ const RULES = [
112
112
  any: ["стать", "пост", "контент", "пресс-релиз", "новост", "заголов", "редакт", "текст для", "написать текст", "объявлен"],
113
113
  skills: ["content-writing"],
114
114
  },
115
+ {
116
+ id: "image",
117
+ label: "Картинки/визуал",
118
+ any: ["картинк", "изображен", "иллюстрац", "обложк", "баннер", "превью", "соцкарточ", "og-", "нарису", "сгенерир", "генерац", "comfyui", "comfy", "flux", "sdxl", "постер", "афиш", "визуал", "фото"],
119
+ skills: ["visual-studio"],
120
+ follow: { any: ["текст", "заголов", "цифр", "схем", "инфографик"], skills: ["design-system"] },
121
+ },
115
122
  {
116
123
  id: "research",
117
124
  label: "Актуальные факты",
@@ -38,7 +38,7 @@ user-invocable: true
38
38
  5. **Факт-чек** — таблица «утверждение → источник → статус»; арифметика, цитаты, ссылки.
39
39
  6. **Редактура** — −10–20%; канцелярит → глагол, пассив → актив; конкретика; вслух.
40
40
  7. **Стиль** — ритм, конкретика, голос, без AI-штампов, типографика издания.
41
- 8. **Иллюстрации** — смысл, права (`img`), формат (1080×1350, 1200×630, 16:9, 9:16), alt, этика.
41
+ 8. **Иллюстрации** — смысл, права (`visual-studio`), формат (1080×1350, 1200×630, 16:9, 9:16), alt, этика.
42
42
  9. **SEO и сдача** — title 50–60, description 140–160, H1, alt, JSON-LD; проверка в вёрстке; отчёт.
43
43
 
44
44
  ### Достоверность — жёстко (полностью — `rules.md` §2)
@@ -2,7 +2,7 @@
2
2
 
3
3
  > Картинка в публикации — не украшение, а часть сообщения. Она должна объяснять, показывать или
4
4
  > останавливать взгляд — и при этом не врать, не нарушать права и не раскрывать чужие данные.
5
- > Генерация — через скилл `img` (локальный ComfyUI: FLUX.1-schnell — качество, RealVisXL — скорость).
5
+ > Генерация — через скилл `visual-studio` (MCP `mcp__imagegen__generate_image`, локальный ComfyUI: FLUX.1-schnell — качество, RealVisXL — скорость).
6
6
 
7
7
  ## 1. Когда картинка нужна, а когда нет
8
8
 
@@ -115,10 +115,10 @@
115
115
  - Для сгенерированного: «Иллюстрация сгенерирована, не является фотографией реального пациента».
116
116
  - Подпись не повторяет alt дословно: alt — для доступности, подпись — для читателя.
117
117
 
118
- ## 9. Генерация через скилл `img`
118
+ ## 9. Генерация через скилл `visual-studio`
119
119
 
120
120
  Локально доступны: **FLUX.1-schnell** (Q4 GGUF, ~13 с на 1024², качество, точнее следует промпту)
121
- и **RealVisXL V5** (SDXL, 6–12 с, скорость/черновики). Вызов — по инструкции скилла `img`
121
+ и **RealVisXL V5** (SDXL, 6–12 с, скорость/черновики). Вызов — по инструкции скилла `visual-studio`
122
122
  (MCP `mcp__imagegen__generate_image` или скрипт `comfy.py`), результат проверяется глазами.
123
123
 
124
124
  ### Формула промпта (по-английски)
@@ -150,7 +150,7 @@ subject → action/context → lighting → lens/optics → style/quality
150
150
  - FLUX: `steps 4`, `cfg 1.0`; SDXL: `steps 28–32`, `cfg 5`.
151
151
  - Размеры: 1024×1024, 832×1216 (портрет), 1216×832 (пейзаж), 2:1 для баннера.
152
152
  - Seed фиксировать для воспроизводимости; менять **одну** вещь за раз (промпт/seed/размер).
153
- - Апскейл 2× через скилл `img` — для печати/больших обложек (4× требует много VRAM, делать
153
+ - Апскейл 2× через скилл `visual-studio` — для печати/больших обложек (4× требует много VRAM, делать
154
154
  последовательно).
155
155
 
156
156
  ### Проверка результата (обязательно глазами)
@@ -202,8 +202,8 @@ architectural photography, no people, no text` — конкретная сцен
202
202
 
203
203
  ## 13. Первоисточники
204
204
 
205
- - Локальный скилл `img` — `%USERPROFILE%\Documents\deepseek-harness\default-workspace\.dsh\skills\img\SKILL.md`
206
- (или `~/.dsh/skills/img/`)
205
+ - Скилл `visual-studio` — маршруты A/B/C, арт-направление, провенанс и QA; локальная генерация —
206
+ MCP `mcp__imagegen__generate_image` (ComfyUI, FLUX.1-schnell / RealVisXL V5)
207
207
  - Unsplash License — https://unsplash.com/license
208
208
  - Pexels License — https://www.pexels.com/license/
209
209
  - Creative Commons — https://creativecommons.org/licenses/
@@ -106,7 +106,7 @@
106
106
  ## Шаг 8. Иллюстрации
107
107
 
108
108
  - **Смысл:** что читатель поймёт из картинки, чего не понял из текста? Нет ответа — не нужна.
109
- - **Права:** реальное фото — согласие и права; стоки — по лицензии; генерация — по `img`-скиллу;
109
+ - **Права:** реальное фото — согласие и права; стоки — по лицензии; генерация — по `visual-studio`;
110
110
  госучреждению — реальные фото мест и людей с согласия, не «счастливые стоковые врачи».
111
111
  - **Формат:** 1080×1350 лента, 1200×630 OG, 16:9 сайт/Дзен, 9:16 клип.
112
112
  - **Подпись и alt:** что/кто/где/когда; alt — для незрячих, не набор ключевиков.
@@ -89,7 +89,7 @@ SEO: <title/description/H1, перелинковка — если сайт>
89
89
 
90
90
  - **`seo`** — обязателен для любого текста на сайте: интент, title/description, H1/H2, перелинковка,
91
91
  структурированные данные, E-E-A-T. `seo-content.md` — только мост, не замена.
92
- - **`img`** — генерация иллюстраций: FLUX.1-schnell (качество) / RealVisXL (скорость), промпты по формуле,
92
+ - **`visual-studio`** — генерация иллюстраций: FLUX.1-schnell (качество) / RealVisXL (скорость), промпты по формуле,
93
93
  проверка глазами. `images.md` — как выбрать, снять права и вписать в публикацию.
94
94
  - **`wow-design`** — если текст идёт в вёрстку/лендинг: композиция, типографика, ритм.
95
95
  - **`office`** — если материал сдаётся в Word/PowerPoint/PDF.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schema": 1,
3
- "kitVersion": "2.37.0",
4
- "generatedAt": "2026-12-02T13:04:22.311Z",
3
+ "kitVersion": "2.39.0",
4
+ "generatedAt": "2026-12-05T07:37:45.817Z",
5
5
  "skills": {
6
6
  "a11y-audit": {
7
7
  "hash": "707659a5cc1207b478bcf45012b06ba46ba88e795ef7e482799f415072fc47b2",
@@ -19,9 +19,9 @@
19
19
  "bytes": 4483
20
20
  },
21
21
  "content-writing": {
22
- "hash": "a21b26ff814e0337d03eeb587b200a1dc66e7de91bfea0f32840ddf8884deeee",
22
+ "hash": "f25fe30da6fbe0c26bf901313745209c618b6ed7848ffa6514a4f30345811e8a",
23
23
  "files": 28,
24
- "bytes": 271717
24
+ "bytes": 271886
25
25
  },
26
26
  "context-economy": {
27
27
  "hash": "bc8fa2e15327d21cf9ebd187b0df5f620d6a5b617976fa88910ae7877eb46b75",
@@ -119,9 +119,9 @@
119
119
  "bytes": 4257
120
120
  },
121
121
  "seo": {
122
- "hash": "ed48ebc4c1278f857ff430f9a5ec55f638c2f9ba07cc406185cfb94be18ee80d",
122
+ "hash": "a6b9bd61604a8f2f67d6ccb285b549a05eeb7afe3f2b0df5cc15cf71d4ea175e",
123
123
  "files": 29,
124
- "bytes": 386169
124
+ "bytes": 385967
125
125
  },
126
126
  "service-desk-conventions": {
127
127
  "hash": "22ae6c29b7debb0154d183bc732795b67557aeaa0ac906d7b038134aea8ba39a",
@@ -149,9 +149,9 @@
149
149
  "bytes": 4201
150
150
  },
151
151
  "skills-router": {
152
- "hash": "63c2dcdeb07dd4af464a30a8065465bd06b73e4caa8aa874802e5188d4d5a4ae",
152
+ "hash": "132bd7af8824a478768346b51ce1422f329a69e7e2667653fc3fddb40adf556b",
153
153
  "files": 3,
154
- "bytes": 13888
154
+ "bytes": 14185
155
155
  },
156
156
  "subagent-playbook": {
157
157
  "hash": "72d10995462d43891e7ec2d028caa0ccbca7932875410d4a0d6cfa75c5fe2df9",
@@ -169,9 +169,9 @@
169
169
  "bytes": 5899
170
170
  },
171
171
  "visual-studio": {
172
- "hash": "f62fa6e511014289f318d41ba345b8f1508c38d697138968480e9f33276a34eb",
172
+ "hash": "de1d930cd5499edc293b08366f2fb4f8b0cdd3dbffe2e2dc18acdf69e9592ad1",
173
173
  "files": 6,
174
- "bytes": 14455
174
+ "bytes": 16846
175
175
  },
176
176
  "web-build": {
177
177
  "hash": "9e8aa571f28e6974f8ba25a5004ba983efedd7def9daa865a39c78cecd16d55c",
@@ -189,9 +189,9 @@
189
189
  "bytes": 16320
190
190
  },
191
191
  "wow-design": {
192
- "hash": "81139f32fc759f438a36eb4c0212ed3ea17df9d8075e909580e12bc47a0848dd",
192
+ "hash": "3c45443119689497464a6033426e87fbd76ffe76529aa4cafab99702e7133cd5",
193
193
  "files": 52,
194
- "bytes": 913669
194
+ "bytes": 913691
195
195
  }
196
196
  }
197
197
  }
@@ -35,7 +35,8 @@ user-invocable: true
35
35
  | Тесты, baseline, баг | `testing-strategy` / `service-desk-testing`; баг — `debugging-playbook` |
36
36
  | Права, аутентификация, загрузки, секреты | `security-review` (+ `code-review-checklist`) |
37
37
  | Релиз, деплой, git, CI, откат | `release-and-deploy` + `git-and-ci` (+ `service-desk-release`) |
38
- | Word/Excel/PDF, изображения | `office` / `img` (если установлены) |
38
+ | Word/Excel/PDF | `office` (если установлен) |
39
+ | Изображения, обложки, иллюстрации, OG-карточки | `visual-studio` (генерация — MCP `imagegen`, локальный ComfyUI) |
39
40
 
40
41
  > Навыки с пометкой «если установлен» не входят в `dsh-desktop-kit`. Вызывай их, только когда они есть в каталоге навыков сессии; иначе применяй правила из профиля/памяти проекта, не тратя вызов на ошибку.
41
42
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > Часть навыка skills-router. ≈1 700 токенов. Читать, когда: нужно классифицировать задачу, выбрать скиллы по типу работы или по артефакту.
4
4
  >
5
- > Внешние навыки (`php-laravel`, `bitrix-aspro`, `css-scss`, `javascript-typescript`, `react`, `office`, `img`) вызывай только если они есть в каталоге навыков сессии; иначе применяй правила из профиля/памяти проекта.
5
+ > Внешние навыки (`php-laravel`, `bitrix-aspro`, `css-scss`, `javascript-typescript`, `react`, `office`) вызывай только если они есть в каталоге навыков сессии; иначе применяй правила из профиля/памяти проекта.
6
6
 
7
7
  ## Триаж за 60 секунд
8
8
  - **Что создаём/меняем?** Код, интерфейс, контент, данные, конфиг, документ, инфраструктура, плагин.
@@ -31,7 +31,7 @@
31
31
  | Релиз, деплой, версия, архив, откат | `release-and-deploy` (+ `git-and-ci`, `service-desk-release` при необходимости) |
32
32
  | Git, ветки, CI, теги, коммиты | `git-and-ci` |
33
33
  | Документы Word/Excel/PowerPoint/PDF | `office` + соответствующий `office-*` |
34
- | Генерация изображений | `img` |
34
+ | Изображения: обложки, иллюстрации, OG-карточки, генерация | `visual-studio` (MCP `imagegen`, локальный ComfyUI; текст/схемы — HTML-маршрут) |
35
35
  | Проверка/аудит готового кода/UI | `code-review-checklist` + `design-critique` (UI) + `seo` (веб) |
36
36
  | Анализ/исследование/сравнение вариантов | `requirements-and-planning` + `dev-workflow`; выводы фиксировать в память |
37
37
 
@@ -27,6 +27,8 @@ user-invocable: true
27
27
 
28
28
  **Правило:** если можно объяснить схемой — не генерируй «красивый туман». Если нужен реальный объект/человек — не подменяй ИИ-картинкой.
29
29
 
30
+ **По умолчанию, без напоминаний:** нужна растровая картинка (фотореализм, арт, фон, сюжетная иллюстрация) → сразу маршрут C через MCP `mcp__imagegen__generate_image` (локальный ComfyUI), разрешения не спрашивай. Текст, схемы, цифры, обложка с надписью → маршрут A (HTML/SVG): модели не рисуют кириллицу.
31
+
30
32
  ## 2. Арт-направление
31
33
 
32
34
  До генерации зафиксируй:
@@ -61,12 +63,18 @@ node tools/visual-studio.mjs --template editorial --title "…" --kicker "…" -
61
63
  - Сохранить: файл, prompt, provider, дата, стоимость, лицензия/условия.
62
64
  - Не отправлять ПДн, медицинские документы, внутренние карты, лица без согласия.
63
65
 
64
- ## 5. Локальный маршрут C
66
+ ## 5. Локальный маршрут C — ComfyUI (по умолчанию для растрового визуала)
67
+
68
+ Инструмент подключён в профиль DSH глобально: MCP `mcp__imagegen__generate_image`. ComfyUI поднимается сам при первом вызове (до 2–4 минут на холодную) — отдельно запускать ничего не нужно.
65
69
 
66
- - ComfyUI + FLUX/SDXL; нужен GPU.
67
- - Модели и LoRA — с проверенной лицензией.
68
- - Данные не уходят в облако; всё равно не генерировать реальных людей/документы.
69
- - Сохранять workflow и seed для воспроизводимости.
70
+ - **Триггер:** фотореализм, арт, фон, предметная/сюжетная иллюстрация, текстура → генерируй сразу, без вопросов пользователю.
71
+ - **Не сюда:** текст на картинке, схемы, таблицы, цифры, обложки с надписями — маршрут A (HTML/SVG): FLUX/SDXL не рисуют кириллицу и ломают мелкие подписи.
72
+ - **Дефолты:** `engine: "flux"` (FLUX.1-schnell Q4, ~10–15 с), `width`/`height` по формату (1200×630, 1080×1350, 1600×900, 1080×1080), `steps: 4`, `cfg: 1`; черновики и скорость — `engine: "sdxl"` (RealVisXL V5, 6–12 с, steps 30, cfg 5); печать/крупный кроп — `upscale: 2`.
73
+ - **Промпт (по-английски):** subject → context → light → lens → style; negative для sdxl — `text, watermark, logo, extra fingers`.
74
+ - **Проверка:** сразу открывай результат (`read_image`); артефакты, лишние пальцы, текст, чужие логотипы → новый seed или уточнённый промпт, «сойдёт» не принимается.
75
+ - **Сохранение:** копируй PNG из `C:\AI\imagegen\out\` в проект; рядом `visual.json` — prompt, engine, seed, steps, размер, дата, лицензия модели.
76
+ - **Границы:** реальные люди, дети, пациенты, документы, чужие логотипы, медицинские обещания — нельзя; ИИ-иллюстрация подписывается.
77
+ - **Если упало:** `python C:\AI\imagegen\comfy.py --status`; причина — в `C:\AI\imagegen\ComfyUI\logs\comfy.log`.
70
78
 
71
79
  ## 6. Провенанс и этика
72
80
 
@@ -198,7 +198,7 @@
198
198
  if (activeModal) closeModal(activeModal);
199
199
  lastTrigger = trigger || document.activeElement;
200
200
  modal.classList.add('is-open');
201
- modal.removeAttribute('aria-hidden');
201
+ modal.removeAttribute('inert');
202
202
  document.body.classList.add('modal-open');
203
203
  var target = modal.querySelector('[data-autofocus]') || focusables(modal)[0] || modal;
204
204
  window.setTimeout(function () { target.focus(); }, 60);
@@ -210,7 +210,7 @@
210
210
  var el = typeof modal === 'string' ? document.getElementById(modal) : modal;
211
211
  if (!el) return;
212
212
  el.classList.remove('is-open');
213
- el.setAttribute('aria-hidden', 'true');
213
+ el.setAttribute('inert', '');
214
214
  document.body.classList.remove('modal-open');
215
215
  if (activeModal === el) activeModal = null;
216
216
  if (lastTrigger && typeof lastTrigger.focus === 'function') lastTrigger.focus();
@@ -219,8 +219,12 @@
219
219
  }
220
220
 
221
221
  function initModals() {
222
+ /* A closed dialog is removed from the tab order and the accessibility tree
223
+ * with `inert`; `aria-hidden` is not used because the static markup then
224
+ * contains focusable children that static a11y checks (rightly) flag. */
222
225
  document.querySelectorAll('.modal').forEach(function (modal) {
223
- modal.setAttribute('aria-hidden', modal.classList.contains('is-open') ? 'false' : 'true');
226
+ if (modal.classList.contains('is-open')) modal.removeAttribute('inert');
227
+ else modal.setAttribute('inert', '');
224
228
  });
225
229
 
226
230
  document.addEventListener('click', function (event) {
@@ -1105,7 +1105,7 @@
1105
1105
  </main>
1106
1106
 
1107
1107
  <!-- Модалка демо -->
1108
- <div class="modal" id="demo-modal" role="dialog" aria-modal="true" aria-labelledby="demo-modal-title" aria-describedby="demo-modal-text" aria-hidden="true">
1108
+ <div class="modal" id="demo-modal" role="dialog" aria-modal="true" aria-labelledby="demo-modal-title" aria-describedby="demo-modal-text" inert>
1109
1109
  <div class="modal__backdrop" data-modal-close="true"></div>
1110
1110
  <div class="modal__dialog">
1111
1111
  <div class="modal__head">