dsh-desktop-kit 2.20.0 → 2.21.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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.21.0 (2026-11-12)
4
+
5
+ - **Windows Job Objects.** `sandbox_run`: memory/process/timeout limits, kill-on-close, cwd внутри проекта; не файловая/сетевая изоляция.
6
+ - **MCP presets.** GitHub — official remote `https://api.githubcopilot.com/mcp/`; archived github/postgres presets удалены; trust только вручную.
7
+ - **Tests.** sandbox simple/timeout, integrations routes.
8
+
3
9
  ## 2.20.0 (2026-11-12)
4
10
 
5
11
  - **VS Code extension.** `integrations/vscode`: `/health`, `/context`, bearer, loopback-only URL; packaging через `vsce`.
package/README.md CHANGED
@@ -1,20 +1,20 @@
1
- # DSH Desktop Kit 2.20
1
+ # DSH Desktop Kit 2.21
2
2
 
3
3
  **MCP с OAuth, sampling и elicitation. Агенты, worktrees и рой с общей доской. Интерфейс, который не мешает.**
4
4
 
5
5
  Набор из **17 плагинов и 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.20.0/docs/images/hero.png)
7
+ ![DSH Desktop Kit 2.7](https://unpkg.com/dsh-desktop-kit@2.21.0/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.20.0/plugins/dsh-mcp-manager/screenshots/settings-1440.png)
13
+ ![MCP Settings](https://unpkg.com/dsh-desktop-kit@2.21.0/plugins/dsh-mcp-manager/screenshots/settings-1440.png)
14
14
 
15
- ![MCP на 390px](https://unpkg.com/dsh-desktop-kit@2.20.0/plugins/dsh-mcp-manager/screenshots/settings-390.png)
15
+ ![MCP на 390px](https://unpkg.com/dsh-desktop-kit@2.21.0/plugins/dsh-mcp-manager/screenshots/settings-390.png)
16
16
 
17
- ![Добавление MCP-сервера](https://unpkg.com/dsh-desktop-kit@2.20.0/plugins/dsh-mcp-manager/screenshots/modal-390.png)
17
+ ![Добавление MCP-сервера](https://unpkg.com/dsh-desktop-kit@2.21.0/plugins/dsh-mcp-manager/screenshots/modal-390.png)
18
18
 
19
19
  ## Агенты, worktrees и рой
20
20
 
@@ -26,17 +26,17 @@
26
26
  - **Живые сообщения** — `team_message` отправляет текст лиду (`to="parent"`) или участнику по run id; копия каждого сообщения остаётся в board.
27
27
  - **Инструкции проекта** — `AGENTS.md`/`CLAUDE.md` иерархически (root → вложенные папки → `.dsh`) с `@import`; MCP roots сообщает корень проекта.
28
28
 
29
- ![Доска команды](https://unpkg.com/dsh-desktop-kit@2.20.0/plugins/dsh-agent-extensions/screenshots/board-1440.png)
29
+ ![Доска команды](https://unpkg.com/dsh-desktop-kit@2.21.0/plugins/dsh-agent-extensions/screenshots/board-1440.png)
30
30
 
31
- ![Доска команды на 390px](https://unpkg.com/dsh-desktop-kit@2.20.0/plugins/dsh-agent-extensions/screenshots/board-390.png)
31
+ ![Доска команды на 390px](https://unpkg.com/dsh-desktop-kit@2.21.0/plugins/dsh-agent-extensions/screenshots/board-390.png)
32
32
 
33
- ![Транскрипт фонового агента](https://unpkg.com/dsh-desktop-kit@2.20.0/plugins/dsh-agent-extensions/screenshots/transcript-1440.png)
33
+ ![Транскрипт фонового агента](https://unpkg.com/dsh-desktop-kit@2.21.0/plugins/dsh-agent-extensions/screenshots/transcript-1440.png)
34
34
 
35
- Транскрипт сохраняется в `.dsh/agents/transcripts/<run>.json` (0600) и доступен после restart.\n\n![Транскрипт на 390px](https://unpkg.com/dsh-desktop-kit@2.20.0/plugins/dsh-agent-extensions/screenshots/transcript-390.png)
35
+ Транскрипт сохраняется в `.dsh/agents/transcripts/<run>.json` (0600) и доступен после restart.\n\n![Транскрипт на 390px](https://unpkg.com/dsh-desktop-kit@2.21.0/plugins/dsh-agent-extensions/screenshots/transcript-390.png)
36
36
 
37
- ![MCP sampling](https://unpkg.com/dsh-desktop-kit@2.20.0/plugins/dsh-mcp-manager/screenshots/sampling-1440.png)
37
+ ![MCP sampling](https://unpkg.com/dsh-desktop-kit@2.21.0/plugins/dsh-mcp-manager/screenshots/sampling-1440.png)
38
38
 
39
- ![MCP elicitation](https://unpkg.com/dsh-desktop-kit@2.20.0/plugins/dsh-mcp-manager/screenshots/elicitation-1440.png)
39
+ ![MCP elicitation](https://unpkg.com/dsh-desktop-kit@2.21.0/plugins/dsh-mcp-manager/screenshots/elicitation-1440.png)
40
40
 
41
41
  ## Интеграции
42
42
 
@@ -46,9 +46,9 @@ Marketplace, IDE bridge и sandbox-аудит — в одном экране **
46
46
  - **IDE bridge** — localhost JSON API (`/health`, `/context`) с bearer-токеном; расширение редактора — отдельный проект.
47
47
  - **Sandbox** — честный аудит: DSH preset + kit guardrails — это политика, не OS sandbox.
48
48
 
49
- ![Интеграции](https://unpkg.com/dsh-desktop-kit@2.20.0/plugins/dsh-integrations/screenshots/integrations-1440.png)
49
+ ![Интеграции](https://unpkg.com/dsh-desktop-kit@2.21.0/plugins/dsh-integrations/screenshots/integrations-1440.png)
50
50
 
51
- ![Интеграции на 390px](https://unpkg.com/dsh-desktop-kit@2.20.0/plugins/dsh-integrations/screenshots/integrations-390.png)
51
+ ![Интеграции на 390px](https://unpkg.com/dsh-desktop-kit@2.21.0/plugins/dsh-integrations/screenshots/integrations-390.png)
52
52
 
53
53
  ## Ноль настройки
54
54
 
@@ -70,11 +70,11 @@ MCP-предложения — это только **ссылки на подд
70
70
  - **Worktrees и фоновые агенты.** `project_worktree` создаёт ветку `dsh/<slug>` и отдельную папку `.dsh/worktrees/<slug>`; `project_agent ... worktree=auto background=true` запускает агента в изоляции, а страница **Агенты** показывает worktrees и очередь запусков с кнопкой «Остановить».
71
71
  - **Инструкции проекта.** `AGENTS.md` и `CLAUDE.md` читаются иерархически (root → вложенные папки → `.dsh`) с `@import`; MCP roots сообщает серверу корень проекта.
72
72
 
73
- ![Агенты проекта](https://unpkg.com/dsh-desktop-kit@2.20.0/plugins/dsh-agent-extensions/screenshots/agents-1440.png)
73
+ ![Агенты проекта](https://unpkg.com/dsh-desktop-kit@2.21.0/plugins/dsh-agent-extensions/screenshots/agents-1440.png)
74
74
 
75
- ![Права и ограничения](https://unpkg.com/dsh-desktop-kit@2.20.0/plugins/dsh-guardrails/screenshots/permissions-1440.png)
75
+ ![Права и ограничения](https://unpkg.com/dsh-desktop-kit@2.21.0/plugins/dsh-guardrails/screenshots/permissions-1440.png)
76
76
 
77
- **v2.20.0** · MIT · проверено на DSH `0.2.1-rc.5` и `0.2.2-rc.1` (Windows 11) · без внешних зависимостей и телеметрии
77
+ **v2.21.0** · MIT · проверено на DSH `0.2.1-rc.5` и `0.2.2-rc.1` (Windows 11) · без внешних зависимостей и телеметрии
78
78
 
79
79
  **План развития:** [docs/ROADMAP-3.0.md](docs/ROADMAP-3.0.md) — Memory Fabric, семантическое
80
80
  слияние, локальный индекс памяти, шифрованные переносы, Memory Hub и npm trusted publishing.
@@ -169,27 +169,27 @@ MCP-предложения — это только **ссылки на подд
169
169
  - перед каждой синхронизацией проверяется, что репозиторий всё ещё приватный;
170
170
  - секреты и PII вычищаются, домашние пути заменяются токеном `%DSH_HOME%`; LLM не вызывается — **0 токенов**.
171
171
 
172
- ![Настройки памяти проектов](https://unpkg.com/dsh-desktop-kit@2.20.0/plugins/dsh-memory-bridge/docs/images/settings-light.png)
172
+ ![Настройки памяти проектов](https://unpkg.com/dsh-desktop-kit@2.21.0/plugins/dsh-memory-bridge/docs/images/settings-light.png)
173
173
 
174
- ![Конфликты досье](https://unpkg.com/dsh-desktop-kit@2.20.0/plugins/dsh-memory-bridge/docs/images/conflicts.png)
174
+ ![Конфликты досье](https://unpkg.com/dsh-desktop-kit@2.21.0/plugins/dsh-memory-bridge/docs/images/conflicts.png)
175
175
 
176
176
  ## Скриншоты
177
177
 
178
178
  ### Skills Studio: каталог, стоимость и редактор
179
179
 
180
- ![Каталог навыков](https://unpkg.com/dsh-desktop-kit@2.20.0/plugins/dsh-gkb-ru-ui/screenshots/02-skills-1440-light.png)
180
+ ![Каталог навыков](https://unpkg.com/dsh-desktop-kit@2.21.0/plugins/dsh-gkb-ru-ui/screenshots/02-skills-1440-light.png)
181
181
 
182
- ![Редактор навыка](https://unpkg.com/dsh-desktop-kit@2.20.0/plugins/dsh-gkb-ru-ui/screenshots/03-skills-editor-1440-light.png)
182
+ ![Редактор навыка](https://unpkg.com/dsh-desktop-kit@2.21.0/plugins/dsh-gkb-ru-ui/screenshots/03-skills-editor-1440-light.png)
183
183
 
184
184
  ### Token Lab: куда уходит контекст
185
185
 
186
- ![Токен-лаборатория](https://unpkg.com/dsh-desktop-kit@2.20.0/plugins/dsh-token-lab/screenshots/01-token-lab-1440-light.png)
186
+ ![Токен-лаборатория](https://unpkg.com/dsh-desktop-kit@2.21.0/plugins/dsh-token-lab/screenshots/01-token-lab-1440-light.png)
187
187
 
188
188
  ### Тёмная тема и мобильный
189
189
 
190
- ![Тёмная тема](https://unpkg.com/dsh-desktop-kit@2.20.0/plugins/dsh-gkb-ru-ui/screenshots/04-skills-1440-dark.png)
190
+ ![Тёмная тема](https://unpkg.com/dsh-desktop-kit@2.21.0/plugins/dsh-gkb-ru-ui/screenshots/04-skills-1440-dark.png)
191
191
 
192
- ![Каталог навыков на 390 px](https://unpkg.com/dsh-desktop-kit@2.20.0/plugins/dsh-gkb-ru-ui/screenshots/05-skills-390-light.png)
192
+ ![Каталог навыков на 390 px](https://unpkg.com/dsh-desktop-kit@2.21.0/plugins/dsh-gkb-ru-ui/screenshots/05-skills-390-light.png)
193
193
 
194
194
  ## Окно-напоминание: пиковый тариф
195
195
 
@@ -199,11 +199,11 @@ DeepSeek включает двойной тариф в пиковые часы (
199
199
  - **в окне** — красная карточка: причина, границы окна в местном времени и UTC, живой отсчёт до конца и рекомендация, когда вернуться;
200
200
  - **после окна** — карточка исчезает; состояние всегда доступно через `window.__DSH_PEAK_GUARD__.state()`.
201
201
 
202
- ![Окно-напоминание: светлая тема](https://unpkg.com/dsh-desktop-kit@2.20.0/plugins/dsh-peak-guard/screenshots/03-peak-card-1440-light.png)
202
+ ![Окно-напоминание: светлая тема](https://unpkg.com/dsh-desktop-kit@2.21.0/plugins/dsh-peak-guard/screenshots/03-peak-card-1440-light.png)
203
203
 
204
- ![Окно-напоминание: тёмная тема](https://unpkg.com/dsh-desktop-kit@2.20.0/plugins/dsh-peak-guard/screenshots/04-peak-card-1440-dark.png)
204
+ ![Окно-напоминание: тёмная тема](https://unpkg.com/dsh-desktop-kit@2.21.0/plugins/dsh-peak-guard/screenshots/04-peak-card-1440-dark.png)
205
205
 
206
- ![Окно-напоминание на 390 px](https://unpkg.com/dsh-desktop-kit@2.20.0/plugins/dsh-peak-guard/screenshots/05-peak-card-390-light.png)
206
+ ![Окно-напоминание на 390 px](https://unpkg.com/dsh-desktop-kit@2.21.0/plugins/dsh-peak-guard/screenshots/05-peak-card-390-light.png)
207
207
 
208
208
  Подробности и настройки — [plugins/dsh-peak-guard/README.md](plugins/dsh-peak-guard/README.md).
209
209
 
package/client.js CHANGED
@@ -8253,7 +8253,7 @@ var(--dsw-alias-bg-layer-1,#fff);box-shadow:inset 0 1px 0 color-mix(in srgb,#fff
8253
8253
  if (__kitErrors.length <= 5) console.error("[dsh-desktop-kit] registration failed:", label, message);
8254
8254
  };
8255
8255
  try {
8256
- window.__DSH_DESKTOP_KIT__ = { version: "2.20.0", parts: __partNames, errors: __kitErrors, ready: false };
8256
+ window.__DSH_DESKTOP_KIT__ = { version: "2.21.0", parts: __partNames, errors: __kitErrors, ready: false };
8257
8257
  } catch {}
8258
8258
  const __inject = [];
8259
8259
  for (const __part of __parts) {
@@ -0,0 +1,29 @@
1
+ # DSH Desktop Kit 2.21.0 — тест
2
+
3
+ Дата: 2026-11-12.
4
+
5
+ ## Job Objects
6
+
7
+ - `sandbox_run` запускает команду в Windows Job Object.
8
+ - Лимиты: memoryMb, processLimit, timeoutMs; kill-on-close.
9
+ - cwd только внутри проекта.
10
+ - Тест: простой процесс, timeout 1s → exit 124.
11
+
12
+ ## MCP trust
13
+
14
+ - GitHub preset переведён на официальный remote `https://api.githubcopilot.com/mcp/`.
15
+ - Archived `server-github`/`server-postgres` больше не пресеты.
16
+ - `trusted:false` у пресетов: trust только вручную.
17
+
18
+ ## Remote marketplace
19
+
20
+ - HTTPS + SHA-256 sync, atomic remote.json, backup.
21
+
22
+ ## IDE
23
+
24
+ - VS Code thin client: health/context.
25
+
26
+ ## E2E
27
+
28
+ - profile mount через реальный CLI — OK.
29
+ - HTTP routes под GUI auth — не автоматизированы.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dsh-desktop-kit",
3
- "version": "2.20.0",
4
- "description": "DeepSeek Harness desktop kit 2.20.0: 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. Includes local marketplace, localhost IDE bridge and an honest sandbox audit.",
3
+ "version": "2.21.0",
4
+ "description": "DeepSeek Harness desktop kit 2.21.0: 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. Includes local marketplace, localhost IDE bridge and an honest sandbox audit.",
5
5
  "keywords": [
6
6
  "deepseek-harness",
7
7
  "dsh",
@@ -9,6 +9,8 @@
9
9
  import { inspectCatalog, installFromCatalog } from "./lib/catalog.js";
10
10
  import { IdeBridge } from "./lib/bridge.js";
11
11
  import { registerIntegrationApi } from "./lib/api.js";
12
+ import { runJobSandbox } from "./lib/job-sandbox.js";
13
+ import path from "node:path";
12
14
 
13
15
  export const inject = ["tools"];
14
16
 
@@ -30,17 +32,45 @@ function toolDefinition(ctx, bridge) {
30
32
  text: `integrations:\n- marketplace: ${inspectCatalog(root).length} entries\n- ide bridge: ${status.running ? status.url : "stopped"}\n- sandbox: policy audit only (no OS enforcement)`,
31
33
  marketplace: inspectCatalog(root),
32
34
  bridge: { running: status.running, url: status.url },
33
- sandbox: { enforcement: false, note: "DSH permission presets + kit guardrails; OS sandbox requires DSH core/native helper" },
35
+ sandbox: { enforcement: false, jobObjects: process.platform === "win32", optInTool: "sandbox_run", note: "Job Objects limit memory/processes/time; filesystem and network are not isolated" },
34
36
  };
35
37
  },
36
38
  };
37
39
  }
38
40
 
41
+ function sandboxTool() {
42
+ return {
43
+ name: "sandbox_run",
44
+ description:
45
+ "Runs a command inside a Windows Job Object with memory, process and timeout limits (kill-on-close). This is process containment only, not filesystem or network sandboxing. cwd must be inside the project.",
46
+ parameters: {
47
+ type: "object",
48
+ additionalProperties: false,
49
+ required: ["command"],
50
+ properties: {
51
+ command: { type: "string" },
52
+ args: { type: "array", items: { type: "string" } },
53
+ cwd: { type: "string" },
54
+ timeoutMs: { type: "number" },
55
+ memoryMb: { type: "number" },
56
+ processLimit: { type: "number" },
57
+ },
58
+ },
59
+ async execute(input, exec) {
60
+ const root = projectFrom(exec?.agent);
61
+ const cwd = path.resolve(input?.cwd || root);
62
+ if (cwd !== path.resolve(root) && !cwd.startsWith(`${path.resolve(root)}${path.sep}`)) throw new Error("sandbox: cwd must be inside the project");
63
+ return runJobSandbox({ ...input, cwd });
64
+ },
65
+ };
66
+ }
67
+
39
68
  export function apply(ctx) {
40
69
  const bridge = new IdeBridge();
41
70
  ctx.effect(() => () => { void bridge.stop(); }, "integrations: cleanup");
42
71
  try {
43
72
  ctx.effect(() => ctx.tools.register(toolDefinition(ctx, bridge)), "integrations: status tool");
73
+ ctx.effect(() => ctx.tools.register(sandboxTool()), "integrations: sandbox tool");
44
74
  } catch (error) {
45
75
  ctx.logger?.warn?.(`[integrations] tool registration failed: ${error instanceof Error ? error.message : String(error)}`);
46
76
  }
@@ -0,0 +1,31 @@
1
+ import { spawnSync } from "node:child_process";
2
+ import path from "node:path";
3
+ import { fileURLToPath } from "node:url";
4
+
5
+ const script = path.join(path.dirname(fileURLToPath(import.meta.url)), "job-sandbox.ps1");
6
+
7
+ export function runJobSandbox({ command, args = [], cwd = process.cwd(), timeoutMs = 30_000, memoryMb = 512, processLimit = 16 } = {}) {
8
+ if (process.platform !== "win32") return { supported: false, error: "Job Objects are Windows-only" };
9
+ if (typeof command !== "string" || !command.trim()) throw new Error("sandbox: command is required");
10
+ const spec = {
11
+ command,
12
+ args: Array.isArray(args) ? args.map(String) : [],
13
+ cwd,
14
+ timeoutMs: Math.max(1000, Math.min(300_000, Number(timeoutMs) || 30_000)),
15
+ memoryMb: Math.max(64, Math.min(4096, Number(memoryMb) || 512)),
16
+ processLimit: Math.max(1, Math.min(64, Number(processLimit) || 16)),
17
+ };
18
+ const result = spawnSync(process.env.DSH_POWERSHELL || "powershell.exe", ["-NoProfile", "-NonInteractive", "-ExecutionPolicy", "Bypass", "-File", script], {
19
+ encoding: "utf8",
20
+ timeout: spec.timeoutMs + 10_000,
21
+ env: { ...process.env, DSH_JOB_SPEC: JSON.stringify(spec) },
22
+ maxBuffer: 4 * 1024 * 1024,
23
+ });
24
+ if (result.error) throw new Error(`sandbox: ${result.error.message}`);
25
+ const line = String(result.stdout || "").trim().split(/\r?\n/u).at(-1) || "";
26
+ try {
27
+ return JSON.parse(line);
28
+ } catch {
29
+ throw new Error(`sandbox: invalid helper output: ${line.slice(0, 300)}`);
30
+ }
31
+ }
@@ -0,0 +1,50 @@
1
+ $ErrorActionPreference = "Stop"
2
+ $spec = $env:DSH_JOB_SPEC | ConvertFrom-Json
3
+ Add-Type @"
4
+ using System;
5
+ using System.Runtime.InteropServices;
6
+ public static class DshJob {
7
+ [StructLayout(LayoutKind.Sequential)] public struct IO_COUNTERS { public ulong ReadOperationCount; public ulong WriteOperationCount; public ulong OtherOperationCount; public ulong ReadTransferCount; public ulong WriteTransferCount; public ulong OtherTransferCount; }
8
+ [StructLayout(LayoutKind.Sequential)] public struct JOBOBJECT_BASIC_LIMIT_INFORMATION { public long PerProcessUserTimeLimit; public long PerJobUserTimeLimit; public uint LimitFlags; public UIntPtr MinimumWorkingSetSize; public UIntPtr MaximumWorkingSetSize; public uint ActiveProcessLimit; public UIntPtr Affinity; public uint PriorityClass; public uint SchedulingClass; }
9
+ [StructLayout(LayoutKind.Sequential)] public struct JOBOBJECT_EXTENDED_LIMIT_INFORMATION { public JOBOBJECT_BASIC_LIMIT_INFORMATION BasicLimitInformation; public IO_COUNTERS IoInfo; public UIntPtr ProcessMemoryLimit; public UIntPtr JobMemoryLimit; public UIntPtr PeakProcessMemoryUsed; public UIntPtr PeakJobMemoryUsed; }
10
+ [DllImport("kernel32.dll", CharSet = CharSet.Unicode)] public static extern IntPtr CreateJobObject(IntPtr a, string name);
11
+ [DllImport("kernel32.dll")] public static extern bool SetInformationJobObject(IntPtr job, int infoClass, ref JOBOBJECT_EXTENDED_LIMIT_INFORMATION info, int length);
12
+ [DllImport("kernel32.dll")] public static extern bool AssignProcessToJobObject(IntPtr job, IntPtr process);
13
+ [DllImport("kernel32.dll")] public static extern bool TerminateJobObject(IntPtr job, uint exitCode);
14
+ [DllImport("kernel32.dll")] public static extern bool CloseHandle(IntPtr handle);
15
+ }
16
+ "@
17
+
18
+ $job = [DshJob]::CreateJobObject([IntPtr]::Zero, $null)
19
+ if ($job -eq [IntPtr]::Zero) { throw "CreateJobObject failed" }
20
+ $out = [System.IO.Path]::GetTempFileName()
21
+ $err = [System.IO.Path]::GetTempFileName()
22
+ try {
23
+ $info = New-Object DshJob+JOBOBJECT_EXTENDED_LIMIT_INFORMATION
24
+ $info.BasicLimitInformation.LimitFlags = 0x2000 -bor 0x100 -bor 0x8
25
+ $info.BasicLimitInformation.ActiveProcessLimit = [uint32]$spec.processLimit
26
+ $info.ProcessMemoryLimit = [UIntPtr]([uint64]([int64]$spec.memoryMb * 1MB))
27
+ $size = [System.Runtime.InteropServices.Marshal]::SizeOf($info)
28
+ if (-not [DshJob]::SetInformationJobObject($job, 9, [ref]$info, $size)) { throw "SetInformationJobObject failed" }
29
+ $started = Get-Date
30
+ $process = Start-Process -FilePath $spec.command -ArgumentList $spec.args -WorkingDirectory $spec.cwd -PassThru -NoNewWindow -RedirectStandardOutput $out -RedirectStandardError $err
31
+ if (-not [DshJob]::AssignProcessToJobObject($job, $process.Handle)) { throw "AssignProcessToJobObject failed" }
32
+ $finished = $process.WaitForExit([int]$spec.timeoutMs)
33
+ if (-not $finished) { [void][DshJob]::TerminateJobObject($job, 124); $process.WaitForExit(2000) | Out-Null }
34
+ $stdout = if (Test-Path $out) { [System.IO.File]::ReadAllText($out) } else { "" }
35
+ $stderr = if (Test-Path $err) { [System.IO.File]::ReadAllText($err) } else { "" }
36
+ [pscustomobject]@{
37
+ supported = $true
38
+ exitCode = if ($finished) { $process.ExitCode } else { 124 }
39
+ timedOut = -not $finished
40
+ stdout = $stdout
41
+ stderr = $stderr
42
+ durationMs = [int]((Get-Date) - $started).TotalMilliseconds
43
+ limits = @{ memoryMb = [int]$spec.memoryMb; processLimit = [int]$spec.processLimit }
44
+ } | ConvertTo-Json -Compress -Depth 5
45
+ } catch {
46
+ [pscustomobject]@{ supported = $false; error = $_.Exception.Message } | ConvertTo-Json -Compress
47
+ } finally {
48
+ [void][DshJob]::CloseHandle($job)
49
+ Remove-Item $out, $err -Force -ErrorAction SilentlyContinue
50
+ }
@@ -61,26 +61,14 @@ function presets() {
61
61
  {
62
62
  id: "github",
63
63
  title: "GitHub",
64
- subtitle: "Issues, pull requests, code search и Actions",
65
- transport: "stdio",
66
- command: "npx",
67
- args: ["-y", "@modelcontextprotocol/server-github"],
68
- tokenEnv: "GITHUB_TOKEN",
69
- tokenLabel: "GitHub token",
70
- tokenPlaceholder: "ghp_… или github_pat_…",
71
- trusted: true,
72
- },
73
- {
74
- id: "postgres",
75
- title: "PostgreSQL",
76
- subtitle: "Схема и read-only запросы; отдельная роль обязательна",
77
- transport: "stdio",
78
- command: "npx",
79
- args: ["-y", "@modelcontextprotocol/server-postgres", "postgresql://readonly@localhost:5432/postgres"],
80
- tokenEnv: "PGPASSWORD",
81
- tokenLabel: "Пароль read-only роли",
82
- tokenPlaceholder: "пароль",
83
- trusted: true,
64
+ subtitle: "Официальный remote MCP: issues, PR, code search",
65
+ transport: "http",
66
+ url: "https://api.githubcopilot.com/mcp/",
67
+ tokenEnv: "GITHUB_PERSONAL_ACCESS_TOKEN",
68
+ tokenHeader: "Authorization",
69
+ tokenLabel: "GitHub PAT",
70
+ tokenPlaceholder: "github_pat_…",
71
+ trusted: false,
84
72
  },
85
73
  {
86
74
  id: "filesystem",
@@ -89,7 +77,7 @@ function presets() {
89
77
  transport: "stdio",
90
78
  command: "npx",
91
79
  args: ["-y", "@modelcontextprotocol/server-filesystem", "${cwd}"],
92
- trusted: true,
80
+ trusted: false,
93
81
  },
94
82
  ];
95
83
  }