dsh-desktop-kit 2.15.4 → 2.15.5

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.15.5 (2026-11-12)
4
+
5
+ - **Worktree merge.** `project_worktree action=merge` вливает чистую ветку `dsh/<slug>` в main через `--no-ff`; грязный main/worktree отклоняется, конфликт автоматически отменяется (`merge --abort`), ветка сохраняется.
6
+ - **Тесты.** merge-сценарий в `worktrees-tests`.
7
+ - **UI.** Подсказка Worktrees обновлена.
8
+
3
9
  ## 2.15.4 (2026-11-12)
4
10
 
5
11
  - **Зависимости задач.** `team_board add-task dependsOn=[...]`; `read` показывает `blockedBy` и `ready`.
package/README.md CHANGED
@@ -4,33 +4,33 @@
4
4
 
5
5
  Набор из **16 плагинов и 30 навыков** для DeepSeek Harness 0.2.x: MCP tools/resources/prompts + OAuth 2.1, sampling, elicitation; проектные агенты, worktrees, фон и read-only рой с общей доской; русский интерфейс, автопилот навыков, токен-лаборатория, студия навыков, память проектов, guardrails, карта репозитория, чекпоинты, plan mode, browser QA, GitHub review, hooks/commands и резервные копии профиля.
6
6
 
7
- ![DSH Desktop Kit 2.7](https://unpkg.com/dsh-desktop-kit@2.15.4/docs/images/hero.png)
7
+ ![DSH Desktop Kit 2.7](https://unpkg.com/dsh-desktop-kit@2.15.5/docs/images/hero.png)
8
8
 
9
9
  ## MCP: подключения без JSON
10
10
 
11
11
  Настройки → **MCP**: пресеты GitHub, PostgreSQL и Filesystem, живые статусы, health, список tools и безопасное хранение токенов в `~/.dsh/mcp.secrets.json`. Промпты сервера открываются кнопкой **Prompts**: аргументы, запуск и копирование результата. HTTP-серверы подключаются через **OAuth 2.1 + PKCE**, **sampling** идёт через approval-карточку DSH, а **elicitation** — через глобальную форму с Accept/Decline.
12
12
 
13
- ![MCP Settings](https://unpkg.com/dsh-desktop-kit@2.15.4/plugins/dsh-mcp-manager/screenshots/settings-1440.png)
13
+ ![MCP Settings](https://unpkg.com/dsh-desktop-kit@2.15.5/plugins/dsh-mcp-manager/screenshots/settings-1440.png)
14
14
 
15
- ![MCP на 390px](https://unpkg.com/dsh-desktop-kit@2.15.4/plugins/dsh-mcp-manager/screenshots/settings-390.png)
15
+ ![MCP на 390px](https://unpkg.com/dsh-desktop-kit@2.15.5/plugins/dsh-mcp-manager/screenshots/settings-390.png)
16
16
 
17
- ![Добавление MCP-сервера](https://unpkg.com/dsh-desktop-kit@2.15.4/plugins/dsh-mcp-manager/screenshots/modal-390.png)
17
+ ![Добавление MCP-сервера](https://unpkg.com/dsh-desktop-kit@2.15.5/plugins/dsh-mcp-manager/screenshots/modal-390.png)
18
18
 
19
19
  ## Агенты, worktrees и рой
20
20
 
21
21
  - **Проектные роли** — `.dsh/agents/*.md`: `tools`, `permission` и `model` реально ограничивают ребёнка.
22
- - **Worktrees** — `project_worktree` создаёт ветку `dsh/<slug>` и папку `.dsh/worktrees/<slug>`; `project_agent worktree=auto` запускает агента в изоляции.
22
+ - **Worktrees** — `project_worktree` создаёт ветку `dsh/<slug>` и папку `.dsh/worktrees/<slug>`; `merge` вливает чистую ветку в main и делает abort при конфликте; `project_agent worktree=auto` запускает агента в изоляции.
23
23
  - **Фон** — `background=true` возвращает run id сразу; страница **Агенты** показывает очередь и кнопку «Остановить».
24
24
  - **Команда** — `project_agent action=team names=[reviewer,researcher] task=...` запускает 2–6 read-only ролей; `worktrees=true` даёт каждому писателю отдельную ветку.
25
25
  - **Рой и общая доска** — `team_board` хранит сообщения и задачи в `.dsh/agents/board.json` (0600, redaction, лимиты); team автоматически создаёт `teamId` и передаёт его ролям.
26
26
  - **Живые сообщения** — `team_message` отправляет текст лиду (`to="parent"`) или участнику по run id; копия каждого сообщения остаётся в board.
27
27
  - **Инструкции проекта** — `AGENTS.md`/`CLAUDE.md` иерархически (root → вложенные папки → `.dsh`) с `@import`; MCP roots сообщает корень проекта.
28
28
 
29
- ![Команда и worktrees](https://unpkg.com/dsh-desktop-kit@2.15.4/plugins/dsh-agent-extensions/screenshots/team-1440.png)
29
+ ![Команда и worktrees](https://unpkg.com/dsh-desktop-kit@2.15.5/plugins/dsh-agent-extensions/screenshots/team-1440.png)
30
30
 
31
- ![MCP sampling](https://unpkg.com/dsh-desktop-kit@2.15.4/plugins/dsh-mcp-manager/screenshots/sampling-1440.png)
31
+ ![MCP sampling](https://unpkg.com/dsh-desktop-kit@2.15.5/plugins/dsh-mcp-manager/screenshots/sampling-1440.png)
32
32
 
33
- ![MCP elicitation](https://unpkg.com/dsh-desktop-kit@2.15.4/plugins/dsh-mcp-manager/screenshots/elicitation-1440.png)
33
+ ![MCP elicitation](https://unpkg.com/dsh-desktop-kit@2.15.5/plugins/dsh-mcp-manager/screenshots/elicitation-1440.png)
34
34
 
35
35
  ## Права и субагенты
36
36
 
@@ -41,11 +41,11 @@
41
41
  - **Worktrees и фоновые агенты.** `project_worktree` создаёт ветку `dsh/<slug>` и отдельную папку `.dsh/worktrees/<slug>`; `project_agent ... worktree=auto background=true` запускает агента в изоляции, а страница **Агенты** показывает worktrees и очередь запусков с кнопкой «Остановить».
42
42
  - **Инструкции проекта.** `AGENTS.md` и `CLAUDE.md` читаются иерархически (root → вложенные папки → `.dsh`) с `@import`; MCP roots сообщает серверу корень проекта.
43
43
 
44
- ![Агенты проекта](https://unpkg.com/dsh-desktop-kit@2.15.4/plugins/dsh-agent-extensions/screenshots/agents-1440.png)
44
+ ![Агенты проекта](https://unpkg.com/dsh-desktop-kit@2.15.5/plugins/dsh-agent-extensions/screenshots/agents-1440.png)
45
45
 
46
- ![Права и ограничения](https://unpkg.com/dsh-desktop-kit@2.15.4/plugins/dsh-guardrails/screenshots/permissions-1440.png)
46
+ ![Права и ограничения](https://unpkg.com/dsh-desktop-kit@2.15.5/plugins/dsh-guardrails/screenshots/permissions-1440.png)
47
47
 
48
- **v2.15.4** · MIT · проверено на DSH `0.2.1-rc.5` и `0.2.2-rc.1` (Windows 11) · без внешних зависимостей и телеметрии
48
+ **v2.15.5** · MIT · проверено на DSH `0.2.1-rc.5` и `0.2.2-rc.1` (Windows 11) · без внешних зависимостей и телеметрии
49
49
 
50
50
  **План развития:** [docs/ROADMAP-3.0.md](docs/ROADMAP-3.0.md) — Memory Fabric, семантическое
51
51
  слияние, локальный индекс памяти, шифрованные переносы, Memory Hub и npm trusted publishing.
@@ -140,27 +140,27 @@
140
140
  - перед каждой синхронизацией проверяется, что репозиторий всё ещё приватный;
141
141
  - секреты и PII вычищаются, домашние пути заменяются токеном `%DSH_HOME%`; LLM не вызывается — **0 токенов**.
142
142
 
143
- ![Настройки памяти проектов](https://unpkg.com/dsh-desktop-kit@2.15.4/plugins/dsh-memory-bridge/docs/images/settings-light.png)
143
+ ![Настройки памяти проектов](https://unpkg.com/dsh-desktop-kit@2.15.5/plugins/dsh-memory-bridge/docs/images/settings-light.png)
144
144
 
145
- ![Конфликты досье](https://unpkg.com/dsh-desktop-kit@2.15.4/plugins/dsh-memory-bridge/docs/images/conflicts.png)
145
+ ![Конфликты досье](https://unpkg.com/dsh-desktop-kit@2.15.5/plugins/dsh-memory-bridge/docs/images/conflicts.png)
146
146
 
147
147
  ## Скриншоты
148
148
 
149
149
  ### Skills Studio: каталог, стоимость и редактор
150
150
 
151
- ![Каталог навыков](https://unpkg.com/dsh-desktop-kit@2.15.4/plugins/dsh-gkb-ru-ui/screenshots/02-skills-1440-light.png)
151
+ ![Каталог навыков](https://unpkg.com/dsh-desktop-kit@2.15.5/plugins/dsh-gkb-ru-ui/screenshots/02-skills-1440-light.png)
152
152
 
153
- ![Редактор навыка](https://unpkg.com/dsh-desktop-kit@2.15.4/plugins/dsh-gkb-ru-ui/screenshots/03-skills-editor-1440-light.png)
153
+ ![Редактор навыка](https://unpkg.com/dsh-desktop-kit@2.15.5/plugins/dsh-gkb-ru-ui/screenshots/03-skills-editor-1440-light.png)
154
154
 
155
155
  ### Token Lab: куда уходит контекст
156
156
 
157
- ![Токен-лаборатория](https://unpkg.com/dsh-desktop-kit@2.15.4/plugins/dsh-token-lab/screenshots/01-token-lab-1440-light.png)
157
+ ![Токен-лаборатория](https://unpkg.com/dsh-desktop-kit@2.15.5/plugins/dsh-token-lab/screenshots/01-token-lab-1440-light.png)
158
158
 
159
159
  ### Тёмная тема и мобильный
160
160
 
161
- ![Тёмная тема](https://unpkg.com/dsh-desktop-kit@2.15.4/plugins/dsh-gkb-ru-ui/screenshots/04-skills-1440-dark.png)
161
+ ![Тёмная тема](https://unpkg.com/dsh-desktop-kit@2.15.5/plugins/dsh-gkb-ru-ui/screenshots/04-skills-1440-dark.png)
162
162
 
163
- ![Каталог навыков на 390 px](https://unpkg.com/dsh-desktop-kit@2.15.4/plugins/dsh-gkb-ru-ui/screenshots/05-skills-390-light.png)
163
+ ![Каталог навыков на 390 px](https://unpkg.com/dsh-desktop-kit@2.15.5/plugins/dsh-gkb-ru-ui/screenshots/05-skills-390-light.png)
164
164
 
165
165
  ## Окно-напоминание: пиковый тариф
166
166
 
@@ -170,11 +170,11 @@ DeepSeek включает двойной тариф в пиковые часы (
170
170
  - **в окне** — красная карточка: причина, границы окна в местном времени и UTC, живой отсчёт до конца и рекомендация, когда вернуться;
171
171
  - **после окна** — карточка исчезает; состояние всегда доступно через `window.__DSH_PEAK_GUARD__.state()`.
172
172
 
173
- ![Окно-напоминание: светлая тема](https://unpkg.com/dsh-desktop-kit@2.15.4/plugins/dsh-peak-guard/screenshots/03-peak-card-1440-light.png)
173
+ ![Окно-напоминание: светлая тема](https://unpkg.com/dsh-desktop-kit@2.15.5/plugins/dsh-peak-guard/screenshots/03-peak-card-1440-light.png)
174
174
 
175
- ![Окно-напоминание: тёмная тема](https://unpkg.com/dsh-desktop-kit@2.15.4/plugins/dsh-peak-guard/screenshots/04-peak-card-1440-dark.png)
175
+ ![Окно-напоминание: тёмная тема](https://unpkg.com/dsh-desktop-kit@2.15.5/plugins/dsh-peak-guard/screenshots/04-peak-card-1440-dark.png)
176
176
 
177
- ![Окно-напоминание на 390 px](https://unpkg.com/dsh-desktop-kit@2.15.4/plugins/dsh-peak-guard/screenshots/05-peak-card-390-light.png)
177
+ ![Окно-напоминание на 390 px](https://unpkg.com/dsh-desktop-kit@2.15.5/plugins/dsh-peak-guard/screenshots/05-peak-card-390-light.png)
178
178
 
179
179
  Подробности и настройки — [plugins/dsh-peak-guard/README.md](plugins/dsh-peak-guard/README.md).
180
180
 
package/client.js CHANGED
@@ -8042,7 +8042,7 @@ var(--dsw-alias-bg-layer-1,#fff);box-shadow:inset 0 1px 0 color-mix(in srgb,#fff
8042
8042
  if (__kitErrors.length <= 5) console.error("[dsh-desktop-kit] registration failed:", label, message);
8043
8043
  };
8044
8044
  try {
8045
- window.__DSH_DESKTOP_KIT__ = { version: "2.15.4", parts: __partNames, errors: __kitErrors, ready: false };
8045
+ window.__DSH_DESKTOP_KIT__ = { version: "2.15.5", parts: __partNames, errors: __kitErrors, ready: false };
8046
8046
  } catch {}
8047
8047
  const __inject = [];
8048
8048
  for (const __part of __parts) {
@@ -0,0 +1,16 @@
1
+ # DSH Desktop Kit 2.15.5 — тест
2
+
3
+ Дата: 2026-11-12.
4
+
5
+ ## Worktree merge
6
+
7
+ - `project_worktree action=merge slug=<id>`.
8
+ - Требования: main чистый, source worktree чистый, branch не detached.
9
+ - `git merge --no-ff`; при конфликте `merge --abort`, ветка остаётся.
10
+ - Branch после merge не удаляется.
11
+
12
+ ## Тесты
13
+
14
+ - `worktrees-tests`: create → commit → merge → файл в main → commit message.
15
+ - `npm test` — exit 0.
16
+ - `build:client` / `check:client` — OK.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dsh-desktop-kit",
3
- "version": "2.15.4",
4
- "description": "DeepSeek Harness desktop kit 2.15.4: 16 plugins and 30 skills — MCP tools/resources/prompts with OAuth 2.1, sampling and elicitation, project agents, git worktrees, background runs and a read-only/writer swarm with a shared board, plus self-applying skills, token lab, Skills Studio, project memory, guardrails, repo map, checkpoints, plan mode, browser QA, GitHub review, hooks/commands, Russian UI and profile transfer.",
3
+ "version": "2.15.5",
4
+ "description": "DeepSeek Harness desktop kit 2.15.5: 16 plugins and 30 skills — MCP tools/resources/prompts with OAuth 2.1, sampling and elicitation, project agents, git worktrees, background runs and a read-only/writer swarm with a shared board, plus self-applying skills, token lab, Skills Studio, project memory, guardrails, repo map, checkpoints, plan mode, browser QA, GitHub review, hooks/commands, Russian UI and profile transfer.",
5
5
  "keywords": [
6
6
  "deepseek-harness",
7
7
  "dsh",
@@ -13,7 +13,7 @@ import { registerProjectHooks } from "./lib/hooks.js";
13
13
  import { createCheckpoint } from "./lib/checkpoints.js";
14
14
  import { runProjectAgent, runProjectTeam } from "./lib/agents.js";
15
15
  import { cancelRun, listRuns } from "./lib/agents.js";
16
- import { createWorktree, removeWorktree, worktreeSummary } from "./lib/worktrees.js";
16
+ import { createWorktree, mergeWorktree, removeWorktree, worktreeSummary } from "./lib/worktrees.js";
17
17
  import { registerChildPolicyHook } from "./lib/policy.js";
18
18
  import { registerCommands } from "./lib/commands.js";
19
19
  import { registerAgentApi } from "./lib/api.js";
@@ -157,12 +157,12 @@ function worktreeToolDefinition() {
157
157
  return {
158
158
  name: WORKTREE_TOOL,
159
159
  description:
160
- "Manage isolated git worktrees for project agents. `list` shows branches, paths, dirty state; `create` adds `.dsh/worktrees/<slug>` on branch `dsh/<slug>`; `remove` refuses a dirty worktree unless force=true. The branch is kept after removal.",
160
+ "Manage isolated git worktrees for project agents. `list` shows branches, paths, dirty state; `create` adds `.dsh/worktrees/<slug>` on branch `dsh/<slug>`; `merge` merges a clean managed branch into the main worktree and aborts on conflict; `remove` refuses a dirty worktree unless force=true. The branch is kept after removal.",
161
161
  parameters: {
162
162
  type: "object",
163
163
  additionalProperties: false,
164
164
  properties: {
165
- action: { type: "string", enum: ["list", "create", "remove"], description: "list, create or remove a worktree" },
165
+ action: { type: "string", enum: ["list", "create", "merge", "remove"], description: "list, create, merge or remove a worktree" },
166
166
  slug: { type: "string", description: "Worktree id: lowercase letters, digits, hyphen" },
167
167
  base: { type: "string", description: "Base ref for create; default HEAD" },
168
168
  force: { type: "boolean", description: "Remove a dirty/locked worktree (data loss risk)" },
@@ -183,6 +183,12 @@ function worktreeToolDefinition() {
183
183
  const created = createWorktree({ cwd: project.root, slug, base: input?.base });
184
184
  return { ok: true, text: `project_worktree create: ${created.branch} → ${created.path}`, worktree: created };
185
185
  }
186
+ if (input?.action === "merge") {
187
+ const slug = String(input?.slug ?? "").trim();
188
+ if (!slug) return { ok: false, text: "project_worktree merge: slug is required" };
189
+ const merged = mergeWorktree({ cwd: project.root, id: slug });
190
+ return { ok: true, text: `project_worktree merge: ${merged.branch} → ${merged.commit.slice(0, 12)}`, worktree: merged };
191
+ }
186
192
  if (input?.action === "remove") {
187
193
  const slug = String(input?.slug ?? "").trim();
188
194
  if (!slug) return { ok: false, text: "project_worktree remove: slug is required" };
@@ -158,3 +158,28 @@ export function worktreeSummary({ cwd }) {
158
158
  main: list.find((item) => item.main) ?? null,
159
159
  };
160
160
  }
161
+
162
+ /**
163
+ * Merge one managed branch into the main worktree. Refuses a dirty main or
164
+ * dirty source worktree. On conflict the merge is aborted, leaving the repo
165
+ * exactly as before; the branch is preserved for manual resolution.
166
+ */
167
+ export function mergeWorktree({ cwd, id }) {
168
+ const repo = repoRoot(cwd);
169
+ const name = validateSlug(id);
170
+ const list = listWorktrees({ cwd: repo });
171
+ const item = list.find((entry) => entry.id === name && !entry.main);
172
+ if (!item) throw new Error(`worktree not found: ${name}`);
173
+ if (item.branch == null) throw new Error(`worktree ${name} is detached; cannot merge`);
174
+ if (item.dirty) throw new Error(`worktree ${name} has uncommitted changes`);
175
+ if (tryRun(repo, ["status", "--porcelain"])) throw new Error("main worktree is dirty; commit or stash before merge");
176
+ const branch = item.branch;
177
+ try {
178
+ run(repo, ["merge", "--no-ff", branch, "-m", `merge ${branch} (dsh worktree)`]);
179
+ } catch (error) {
180
+ tryRun(repo, ["merge", "--abort"]);
181
+ const detail = error instanceof Error ? error.message.slice(0, 500) : String(error);
182
+ throw new Error(`merge ${branch} failed and was aborted: ${detail}`);
183
+ }
184
+ return { repo, branch, commit: run(repo, ["rev-parse", "HEAD"]) };
185
+ }