dsh-desktop-kit 2.31.0 → 2.33.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 +23 -0
- package/README.en.md +22 -6
- package/README.md +33 -9
- package/client.js +1 -1
- package/docs/MEASURED.md +7 -7
- package/docs/TEST-2.32.0.md +32 -0
- package/docs/TEST-2.33.0.md +33 -0
- package/docs/measured.json +9 -9
- package/package.json +2 -1
- package/plugins/dsh-agent-extensions/lib/agents.js +20 -1
- package/plugins/dsh-agent-extensions/lib/checkpoints.js +109 -5
- package/plugins/dsh-agent-extensions/lib/commands.js +40 -3
- package/plugins/dsh-agent-extensions/lib/instructions.js +96 -1
- package/plugins/dsh-agent-extensions/lib/locks.js +114 -0
- package/plugins/dsh-agent-extensions/lib/policy.js +5 -0
- package/plugins/dsh-agent-extensions/lib/project.js +7 -1
- package/plugins/dsh-agent-extensions/lib/scaffold.js +14 -14
- package/plugins/dsh-browser-qa/lib/ui-gate.js +5 -1
- package/plugins/dsh-guardrails/index.js +31 -4
- package/plugins/dsh-guardrails/lib/hooks.js +22 -5
- package/plugins/dsh-guardrails/lib/runtime.js +122 -0
- package/plugins/dsh-project-memory/index.js +28 -3
- package/plugins/dsh-quality-pipeline/index.js +14 -3
- package/plugins/dsh-quality-pipeline/lib/text.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,26 @@
|
|
|
1
|
+
## 2.33.0 (2026-12-02)
|
|
2
|
+
|
|
3
|
+
**Approval runtime, валидатор инструкций, health проекта и writer locks.**
|
|
4
|
+
|
|
5
|
+
- **`guardrails action=runtime`.** Consequence-классификатор (`read/write/external/destructive/credential`) и in-memory snapshot последних ask/deny: уровень риска, irreversible/external, режим, правило и fingerprint. Текст команды не хранится; DSH остаётся владельцем approval-карточки. Новые тесты: классификация, запись ask/deny, отсутствие команды в snapshot, runtime action.
|
|
6
|
+
- **Валидатор инструкций.** `validateProjectInstructions` находит битые `@import`, устаревшие навыки, дубли `AGENTS.md`/`CLAUDE.md` в корне и превышение размера; `<instructions-warning>` добавляется в проектный prompt; команда `/instructions` показывает отчёт. Тест на stale-skill/import-missing/valid-skill.
|
|
7
|
+
- **`project_memory action=health`.** Проверяет корень, git, `.dsh`, `.dsh/PROJECT.md`, AGENTS/CLAUDE, предупреждения автоскана и возраст скана. Результат — findings с уровнями; тест в memory suite.
|
|
8
|
+
- **Writer locks.** `lib/locks.js`: lock в `~/.dsh/agent-extensions/locks` с TTL 15 минут, owner/pid/heartbeat; второй writer получает отказ, чужой owner не снимает. `runProjectAgent` берёт lock для не-read-only роли и отпускает на success/failure/foreground-finally. Тесты конфликта/освобождения/списка.
|
|
9
|
+
- **Project OS dashboard.** `/doctor` и `/project health` показывают агентов, инструкции и их предупреждения, locks, quality-миссию, hooks и checkpoints; `/project health` — алиас.
|
|
10
|
+
- **Проверки:** `guardrails` 43 теста, `agent-extensions`, `instructions`, `memory`, `quality-pipeline`, `smoke` 3/3; полный набор — 43 шага, failed=0.
|
|
11
|
+
- **Не входит:** карты/OCR-toolchain; npm publish и GitHub release — отдельным шагом в конце.
|
|
12
|
+
|
|
13
|
+
## 2.32.0 (2026-12-02)
|
|
14
|
+
|
|
15
|
+
**Роли перестают падать на allowlist, UI-гейт проверяет поведение, checkpoint работает без git.**
|
|
16
|
+
|
|
17
|
+
- **Все 14 ролей получают `skill`.** Добавлены `read_image`, `web_fetch`, `list_agents` там, где они нужны; `disallowed_tools` проверяется в `checkChildTool` и запрещает инструмент даже при разрешающем allowlist. Это закрывает 107 ошибок `tool … не входит в allowlist` из аудита чатов.
|
|
18
|
+
- **UI-гейт v2.** В strict-профиле (`standard`/`turnkey`) недостаточно чистого `audit matrix=full`: обязательны `a11y` с `serious 0` и проходящий `interact`. Если сценария нет — гейт просит его; если сценарий упал — держит ход. Это закрывает дыру «зелёный audit, мёртвое меню».
|
|
19
|
+
- **Checkpoint без git.** `createCheckpoint` определяет git-репозиторий; для папки без git пишет файловый snapshot в `~/.dsh/agent-extensions/file-checkpoints`, `restoreCheckpoint` возвращает файлы и **не удаляет** созданные позже. Git-режим по-прежнему не двигает HEAD и пользовательский индекс.
|
|
20
|
+
- **`/quality start`.** Миссия качества создаётся вручную (`/quality start [задача]`), без миссии команда объясняет следующий шаг. Auto-start для веб-проектов сохранён.
|
|
21
|
+
- **Intake-first-pass.** Добавлена спецификация незнакомых задач (PDF/DOCX/фото/карты, «перечерти по образцу»): триаж, один раунд вопросов, brief freeze, source↔output verify, toolchain с установкой по необходимости. В релиз **не** входят OCR/PDF-библиотеки и картографический конвейер — это отдельная задача.
|
|
22
|
+
- **Тесты:** контракт 14 ролей (`skill` у всех, `read_image` у визуальных, `list_agents` у координатора), `disallowed_tools`, обязательный `interact` в UI-гейте, файловый checkpoint, восстановление без удаления новых файлов. Все шаги test-цепочки — OK; `npm run check:release` — OK.
|
|
23
|
+
|
|
1
24
|
## 2.31.0 (2026-12-01)
|
|
2
25
|
|
|
3
26
|
**Диагностика до изменений, измерения в доках.**
|
package/README.en.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# DSH Desktop Kit 2.
|
|
1
|
+
# DSH Desktop Kit 2.33.0
|
|
2
2
|
|
|
3
3
|
[Русский](README.md) · **English**
|
|
4
4
|
|
|
@@ -6,10 +6,26 @@
|
|
|
6
6
|
|
|
7
7
|
21 plugins and 35 skills in one npm package: a quality mission with phases and G0..G13 gates, browser QA with interactions/accessibility/performance, 14 project roles (ui-critic, a11y, cms-ops, release-ops, builder in a worktree), phase-aware skill routing with a token budget, a read-only swarm with a shared board, a research ledger with source checks, MCP with OAuth 2.1 / sampling / elicitation, a local marketplace, an IDE bridge, guardrails, project memory, checkpoints, `/kit doctor|plan|tune`, and a Russian-first UI.
|
|
8
8
|
|
|
9
|
-

|
|
10
10
|
|
|
11
11
|
> The Russian [README.md](README.md) is the canonical document. This page is a compact English map for npm and GitHub readers.
|
|
12
12
|
|
|
13
|
+
## What's new in 2.33.0
|
|
14
|
+
|
|
15
|
+
- **`guardrails action=runtime`** classifies a call (`read/write/external/destructive/credential`) and records the actual ask/deny decisions as a bounded in-memory snapshot; command text is never stored.
|
|
16
|
+
- **Instruction validator** checks `AGENTS.md`/`CLAUDE.md` for broken `@import`, stale skills, duplicate root files and size; warnings appear in `<instructions-warning>`, and `/instructions` prints the report.
|
|
17
|
+
- **`project_memory action=health`** reports git, `.dsh`, `PROJECT.md`, AGENTS/CLAUDE, scan warnings and scan age.
|
|
18
|
+
- **Writer locks** stop two `project_agent` writers from starting in the same root: lock under `~/.dsh/agent-extensions/locks`, 15-minute TTL, another owner cannot release it.
|
|
19
|
+
- **Project OS dashboard**: `/doctor` and `/project health` show agents, instructions, locks, quality mission, hooks and checkpoints.
|
|
20
|
+
|
|
21
|
+
## What's new in 2.32.0
|
|
22
|
+
|
|
23
|
+
- **All 14 roles can load skills.** Added `skill`, `read_image`, `web_fetch` and `list_agents` where they belong; `disallowed_tools` is enforced by the child policy.
|
|
24
|
+
- **The UI gate now requires behaviour, not just geometry.** Strict mode needs `audit matrix=full` + `a11y serious 0` + a passing `interact` scenario; a clean audit alone no longer closes the turn.
|
|
25
|
+
- **Checkpoints work without git.** A non-git folder gets a file snapshot; restore never deletes files created later. Git checkpoints still leave HEAD and the user index untouched.
|
|
26
|
+
- **`/quality start`** creates a quality mission on demand instead of only auto-starting on a web turn.
|
|
27
|
+
- **Intake-first-pass** for unfamiliar tasks (PDF/DOCX/photo/maps): triage, one question round, brief freeze, source↔output verification. Spec: [docs/analysis/INTAKE-PROTOCOL.md](docs/analysis/INTAKE-PROTOCOL.md).
|
|
28
|
+
|
|
13
29
|
## What it is
|
|
14
30
|
|
|
15
31
|
The kit is a bundle for [DeepSeek Harness](https://deepseek.com) (DSH) that installs as one package and mounts 21 child plugins. It adds workflow, not a model: gates, roles, evidence, diagnostics and safe defaults.
|
|
@@ -23,7 +39,7 @@ The kit is a bundle for [DeepSeek Harness](https://deepseek.com) (DSH) that inst
|
|
|
23
39
|
| Research | `research_ledger`, research-first policy, citation and source-date checks |
|
|
24
40
|
| Safety | Guardrails for dangerous commands, `.env`, `.ssh`, keys; sandbox audit; MCP trust default `off` |
|
|
25
41
|
| Memory | Project dossiers in `~/.dsh/projects-memory`, GitHub memory bridge, USB export/import |
|
|
26
|
-
| Diagnostics | `/kit doctor`, `/kit plan`, `/kit tune` (
|
|
42
|
+
| Diagnostics | `/kit doctor`, `/kit plan`, `/kit tune` (since 2.31.0) |
|
|
27
43
|
| Release | `remote_ops` (typed ssh/scp with host state diff), release pipeline, i18n dictionary pipeline |
|
|
28
44
|
|
|
29
45
|
## Requirements
|
|
@@ -36,7 +52,7 @@ The kit is a bundle for [DeepSeek Harness](https://deepseek.com) (DSH) that inst
|
|
|
36
52
|
From npm:
|
|
37
53
|
|
|
38
54
|
```powershell
|
|
39
|
-
dsh plugin --profile desktop add dsh-desktop-kit@2.
|
|
55
|
+
dsh plugin --profile desktop add dsh-desktop-kit@2.33.0
|
|
40
56
|
```
|
|
41
57
|
|
|
42
58
|
From a local clone, with the interactive installer (Windows):
|
|
@@ -70,7 +86,7 @@ npm run skills:check # every skill core stays under the 6 000-token
|
|
|
70
86
|
npm run measure # refresh docs/measured.json + docs/MEASURED.md
|
|
71
87
|
npm run measure -- --check # the stored measurements match package.json
|
|
72
88
|
npm run check:release # versions agree across READMEs, measured.json and CHANGELOG
|
|
73
|
-
npm run verify:release -- 2.
|
|
89
|
+
npm run verify:release -- 2.33.0 # verify the published npm artifact (after publishing)
|
|
74
90
|
```
|
|
75
91
|
|
|
76
92
|
## Measured, not claimed
|
|
@@ -99,4 +115,4 @@ Every number in [docs/MEASURED.md](docs/MEASURED.md) is reproducible: the comman
|
|
|
99
115
|
|
|
100
116
|
MIT. Built for DeepSeek Harness; no external runtime dependencies and no telemetry.
|
|
101
117
|
|
|
102
|
-
**2.
|
|
118
|
+
**2.33.0** · 21 plugins · 35 skills · 14 roles · 7 presets · 14 gates · Windows 11 · DSH 0.2.x
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# DSH Desktop Kit 2.
|
|
1
|
+
# DSH Desktop Kit 2.33.0
|
|
2
2
|
|
|
3
3
|
**Русский** · [English](README.en.md)
|
|
4
4
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
`21 плагин` · `35 навыков` · `14 ролей` · `7 пресетов` · `14 гейтов` · `0 внешних runtime-зависимостей`
|
|
8
8
|
|
|
9
|
-

|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
## Быстрый старт
|
|
26
26
|
|
|
27
27
|
```powershell
|
|
28
|
-
# в DSH: Плагины → Add plugin → dsh-desktop-kit@2.
|
|
28
|
+
# в DSH: Плагины → Add plugin → dsh-desktop-kit@2.33.0
|
|
29
29
|
# или из терминала:
|
|
30
|
-
dsh plugin --profile desktop add dsh-desktop-kit@2.
|
|
30
|
+
dsh plugin --profile desktop add dsh-desktop-kit@2.33.0
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
После установки перезапустите окно DSH (`Ctrl+R`). Проверка:
|
|
@@ -44,6 +44,28 @@ node tools/e2e-http.mjs # живой web + API
|
|
|
44
44
|
|
|
45
45
|
---
|
|
46
46
|
|
|
47
|
+
## Что нового в 2.33.0
|
|
48
|
+
|
|
49
|
+
| Что | Зачем |
|
|
50
|
+
|---|---|
|
|
51
|
+
| **`guardrails action=runtime`** | Consequence-классификатор (`read/write/external/destructive/credential`) и in-memory snapshot последних ask/deny: видно, что именно DSH попросил подтвердить, без хранения текста команды. |
|
|
52
|
+
| **Валидатор инструкций** | AGENTS.md/CLAUDE.md проверяются на битые `@import`, устаревшие навыки, дубли корня и размер; предупреждение попадает в `<instructions-warning>`, команда `/instructions` показывает отчёт. |
|
|
53
|
+
| **`project_memory action=health`** | Сканер проекта: git, `.dsh`, `PROJECT.md`, AGENTS/CLAUDE, предупреждения автоскана, свежесть. |
|
|
54
|
+
| **Writer locks** | Два `project_agent`-писателя не стартуют в одном корне одновременно: lock в `~/.dsh/agent-extensions/locks`, TTL 15 минут, чужой owner не снимает. |
|
|
55
|
+
| **Project OS dashboard** | `/doctor` и `/project health` показывают агентов, инструкции, locks, quality-миссию, hooks и checkpoints в одном месте. |
|
|
56
|
+
| **Тесты** | 43 guardrails-теста, контракт ролей, locks, instructions validator, project health, UI-гейт и checkpoint — в полном наборе. |
|
|
57
|
+
|
|
58
|
+
## Что нового в 2.32.0
|
|
59
|
+
|
|
60
|
+
| Что | Зачем |
|
|
61
|
+
|---|---|
|
|
62
|
+
| **Все 14 ролей умеют `skill`** | Роль больше не падает на первом шаге из-за allowlist: добавлены `skill`, `read_image`, `web_fetch`, `list_agents`; у ролей появился `disallowed_tools`. |
|
|
63
|
+
| **UI-гейт требует поведение** | В strict-профиле недостаточно чистого audit: нужен `audit matrix=full` + `a11y` serious 0 + **проходящий `interact`**. Зелёная геометрия с мёртвым меню больше не закрывает ход. |
|
|
64
|
+
| **Checkpoint без git** | Проект без репозитория получает файловый snapshot; restore не удаляет файлы, созданные позже. Git-режим по-прежнему не двигает HEAD и индекс. |
|
|
65
|
+
| **`/quality start`** | Миссию качества можно создать вручную до первого веб-хода; без миссии команда объясняет следующий шаг, а не молчит. |
|
|
66
|
+
| **Intake-first-pass** | Протокол незнакомых задач (PDF/DOCX/фото/карты, «перечерти по образцу»): триаж, один раунд вопросов, бриф, source↔output verify. Спецификация — [docs/analysis/INTAKE-PROTOCOL.md](docs/analysis/INTAKE-PROTOCOL.md). |
|
|
67
|
+
| **Тесты** | Контракт ролей, обязательный `interact`, не-git checkpoint и `/quality start` покрыты тестами; полный набор — `npm test`. |
|
|
68
|
+
|
|
47
69
|
## Что нового в 2.31.0
|
|
48
70
|
|
|
49
71
|
| Что | Зачем |
|
|
@@ -70,7 +92,7 @@ node tools/e2e-http.mjs # живой web + API
|
|
|
70
92
|
|
|
71
93
|
## Что внутри
|
|
72
94
|
|
|
73
|
-

|
|
74
96
|
|
|
75
97
|
*Один пакет закрывает полный контур: качество, агенты, навыки, ops, знания, безопасность и платформу.*
|
|
76
98
|
|
|
@@ -88,7 +110,7 @@ node tools/e2e-http.mjs # живой web + API
|
|
|
88
110
|
|
|
89
111
|
## Миссия качества
|
|
90
112
|
|
|
91
|
-

|
|
92
114
|
|
|
93
115
|
`quality_gate` превращает «сделай премиально» в исполняемое состояние:
|
|
94
116
|
|
|
@@ -240,7 +262,7 @@ i18n_sync action=check lang=ar
|
|
|
240
262
|
|
|
241
263
|
MCP: GitHub (official remote), Filesystem и свои серверы; OAuth 2.1 + PKCE; sampling через approval-карточку DSH; elicitation через Accept/Decline; tools/resources/prompts, health и статусы. Секреты — в `~/.dsh/mcp.secrets.json`, trust — только вручную.
|
|
242
264
|
|
|
243
|
-

|
|
244
266
|
|
|
245
267
|
*Настройки → MCP: серверы, health, tools и ручной trust.*
|
|
246
268
|
|
|
@@ -263,7 +285,7 @@ MCP: GitHub (official remote), Filesystem и свои серверы; OAuth 2.1
|
|
|
263
285
|
- **Sandbox** — Job Objects; файловая/сетевая изоляция не заявляется.
|
|
264
286
|
- **Данные** — `.dsh/` в проекте; транскрипты `0600`; PII и секреты не попадают в board.
|
|
265
287
|
|
|
266
|
-

|
|
267
289
|
|
|
268
290
|
*Настройки → Права: эффективные правила, защищённые пути и статус hooks.*
|
|
269
291
|
|
|
@@ -339,6 +361,8 @@ node tools/e2e-http.mjs
|
|
|
339
361
|
## Документация
|
|
340
362
|
|
|
341
363
|
- [CHANGELOG.md](CHANGELOG.md)
|
|
364
|
+
- [docs/TEST-2.33.0.md](docs/TEST-2.33.0.md)
|
|
365
|
+
- [docs/TEST-2.32.0.md](docs/TEST-2.32.0.md)
|
|
342
366
|
- [docs/TEST-2.31.0.md](docs/TEST-2.31.0.md)
|
|
343
367
|
- [docs/TEST-2.30.0.md](docs/TEST-2.30.0.md)
|
|
344
368
|
- [docs/MEASURED.md](docs/MEASURED.md)
|
|
@@ -359,4 +383,4 @@ node tools/e2e-http.mjs
|
|
|
359
383
|
|
|
360
384
|
MIT. Сделано для DeepSeek Harness; без внешних зависимостей и телеметрии.
|
|
361
385
|
|
|
362
|
-
**2.
|
|
386
|
+
**2.33.0** · 21 плагин · 35 навыков · 14 ролей · 7 пресетов · 14 гейтов · Windows 11 · DSH 0.2.x
|
package/client.js
CHANGED
|
@@ -8374,7 +8374,7 @@ var(--dsw-alias-bg-layer-1,#fff);box-shadow:inset 0 1px 0 color-mix(in srgb,#fff
|
|
|
8374
8374
|
if (__kitErrors.length <= 5) console.error("[dsh-desktop-kit] registration failed:", label, message);
|
|
8375
8375
|
};
|
|
8376
8376
|
try {
|
|
8377
|
-
window.__DSH_DESKTOP_KIT__ = { version: "2.
|
|
8377
|
+
window.__DSH_DESKTOP_KIT__ = { version: "2.33.0", parts: __partNames, errors: __kitErrors, ready: false };
|
|
8378
8378
|
} catch {}
|
|
8379
8379
|
const __inject = [];
|
|
8380
8380
|
for (const __part of __parts) {
|
package/docs/MEASURED.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
Отрицательный результат тоже результат: если метрика ухудшилась, она остаётся в таблице — с новой датой и честным объяснением, а не удаляется.
|
|
8
8
|
|
|
9
9
|
<!-- MEASURED:START -->
|
|
10
|
-
Версия **2.
|
|
10
|
+
Версия **2.33.0** · замер 2026-12-02T11:32:42.256Z · Windows_NT 10.0.26200 · AMD Ryzen 7 4800H with Radeon Graphics · 16 потоков · 7.4 ГБ RAM · Node v24.20.0.
|
|
11
11
|
|
|
12
12
|
| Метрика | Значение | Как измерено |
|
|
13
13
|
|---|---:|---|
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
| Каталог навыков, токенов | 53460 | node tools/skill-cost.mjs |
|
|
17
17
|
| references, токенов | 224412 | node tools/skill-cost.mjs |
|
|
18
18
|
| Самое тяжёлое ядро | 2417 (web-build) | бюджет 6000 токенов |
|
|
19
|
-
| Документов в docs/ |
|
|
20
|
-
| README.md, байт |
|
|
21
|
-
| README.en.md, байт |
|
|
22
|
-
| Tarball, байт |
|
|
23
|
-
| Файлов в tarball |
|
|
24
|
-
| Распакованный размер, байт |
|
|
19
|
+
| Документов в docs/ | 84 | tools/measure.mjs → docs/**/*.md |
|
|
20
|
+
| README.md, байт | 29777 | stat README.md |
|
|
21
|
+
| README.en.md, байт | 7654 | stat README.en.md |
|
|
22
|
+
| Tarball, байт | 12417273 | npm pack --dry-run --json |
|
|
23
|
+
| Файлов в tarball | 551 | npm pack --dry-run --json |
|
|
24
|
+
| Распакованный размер, байт | 16617311 | npm pack --dry-run --json |
|
|
25
25
|
<!-- MEASURED:END -->
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# TEST 2.32.0 — роли, UI-гейт, checkpoint без git
|
|
2
|
+
|
|
3
|
+
Дата: 2026-12-02 · Платформа: Windows 11 · Node v24.20.0 · DSH 0.2.x.
|
|
4
|
+
|
|
5
|
+
## Что проверялось
|
|
6
|
+
|
|
7
|
+
- **Роли:** все 14 шаблонов провижены; у каждой роли в `tools` есть `skill`; `ui-critic`/`a11y`/`reviewer`/`builder`/`release-ops` получают `read_image`; `coordinator` — `list_agents`; `disallowed_tools` запрещает инструмент даже при разрешающем allowlist.
|
|
8
|
+
- **UI-гейт:** strict-профиль требует `audit matrix=full` + `a11y serious 0` + проходящий `interact`; отсутствие `interact` держит ход, падение сценария — тоже.
|
|
9
|
+
- **Checkpoints:** git-режим не двигает HEAD и индекс; не-git папка получает файловый snapshot; restore возвращает содержимое и не удаляет файлы, созданные позже; `.env`, `.ssh`, ключи и credentials в файловый snapshot не попадают.
|
|
10
|
+
- **`/quality start`:** команда создаёт миссию; без миссии объясняет следующий шаг (проверено синтаксически и по коду регистрации; отдельного command-теста пока нет).
|
|
11
|
+
- **Совместимость:** полный набор тестов kit и release-consistency.
|
|
12
|
+
|
|
13
|
+
## Команды и результаты
|
|
14
|
+
|
|
15
|
+
| Команда | Результат |
|
|
16
|
+
|---|---|
|
|
17
|
+
| `node tools/agent-extensions-tests.mjs` | OK |
|
|
18
|
+
| `node tools/ui-gate-tests.mjs` | OK |
|
|
19
|
+
| `node tools/quality-pipeline-tests.mjs` | 27 groups OK |
|
|
20
|
+
| `node tools/checkpoints-tests.mjs` | OK |
|
|
21
|
+
| `node tools/smoke-tests.mjs` | 3/3 OK |
|
|
22
|
+
| `node tools/integrations-tests.mjs` | OK |
|
|
23
|
+
| `node tools/onboarding-tests.mjs` | OK |
|
|
24
|
+
| `node tools/check-release-consistency.mjs` | OK для 2.32.0 |
|
|
25
|
+
| Полная test-цепочка (пошаговый прогон) | все шаги exit 0 |
|
|
26
|
+
|
|
27
|
+
## Ограничения
|
|
28
|
+
|
|
29
|
+
- `npm test` через `npm.ps1` на этой машине падает до запуска из-за ExecutionPolicy; использовать `npm.cmd test` или `-ExecutionPolicy Bypass`. Это окружение, не код.
|
|
30
|
+
- `max_turns`, `skills`, `isolation` парсятся из frontmatter, но **не** принуждаются в этом релизе; принуждение — следующий шаг.
|
|
31
|
+
- `interact` требует хотя бы один сценарий; покрытие всех ключевых сценариев остаётся на авторе.
|
|
32
|
+
- Инструменты OCR/PDF/DOCX/карт (Tesseract, Poppler, LibreOffice) **не устанавливались** и в релиз не входят.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# TEST 2.33.0 — approvals runtime, instructions, health, locks
|
|
2
|
+
|
|
3
|
+
Дата: 2026-12-02 · Windows 11 · Node v24.20.0 · DSH 0.2.x.
|
|
4
|
+
|
|
5
|
+
## Что проверялось
|
|
6
|
+
|
|
7
|
+
- **Approvals/runtime:** consequence-классификатор (`read/write/external/destructive/credential`), запись ask/deny без текста команды, `guardrails action=runtime`.
|
|
8
|
+
- **Instruction validator:** битый `@import`, устаревший навык, валидный навык, `<instructions-warning>` в prompt.
|
|
9
|
+
- **Project health:** `project_memory action=health` с git, `.dsh`, `PROJECT.md`, AGENTS/CLAUDE, scan warnings.
|
|
10
|
+
- **Writer locks:** конфликт двух owner, отказ чужому owner, освобождение, повторный захват, список.
|
|
11
|
+
- **Project OS dashboard:** `/doctor`, `/project health`, `/instructions`; регистрация команд.
|
|
12
|
+
- **Регрессии:** UI-гейт, роли, checkpoints, quality pipeline, memory, smoke.
|
|
13
|
+
|
|
14
|
+
## Команды и результаты
|
|
15
|
+
|
|
16
|
+
| Команда | Результат |
|
|
17
|
+
|---|---|
|
|
18
|
+
| `node plugins/dsh-guardrails/tools/guardrails-tests.mjs` | 43 tests OK |
|
|
19
|
+
| `node tools/agent-extensions-tests.mjs` | OK |
|
|
20
|
+
| `node tools/instructions-tests.mjs` | OK |
|
|
21
|
+
| `node tools/memory-tests.mjs` | OK (health action) |
|
|
22
|
+
| `node tools/ui-gate-tests.mjs` | OK |
|
|
23
|
+
| `node tools/quality-pipeline-tests.mjs` | 27 groups OK |
|
|
24
|
+
| `node tools/smoke-tests.mjs` | 3/3 |
|
|
25
|
+
| Полная test-цепочка | 43 шага, failed=0 |
|
|
26
|
+
|
|
27
|
+
## Ограничения
|
|
28
|
+
|
|
29
|
+
- Runtime хранится **в памяти процесса**: после перезапуска DSH история ask/deny пуста; это диагностика, не audit-log.
|
|
30
|
+
- Lock **advisory**: другие инструменты могут писать в проект, обходя `project_agent`; TTL 15 минут, heartbeat обновляется только при захвате/повторе.
|
|
31
|
+
- Валидатор инструкций — эвристика: проверяет явные `@import`, пути `skills/` и кодовые имена в строках со словом skill/навык; не доказывает смысловую непротиворечивость.
|
|
32
|
+
- `max_turns`, `skills`, `isolation` по-прежнему парсятся, но не принуждаются.
|
|
33
|
+
- Карты/OCR-toolchain не входят. npm publish/GitHub release — отдельным шагом после приёмки.
|
package/docs/measured.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": 1,
|
|
3
|
-
"version": "2.
|
|
4
|
-
"measuredAt": "2026-12-
|
|
3
|
+
"version": "2.33.0",
|
|
4
|
+
"measuredAt": "2026-12-02T11:32:42.256Z",
|
|
5
5
|
"command": "npm run measure",
|
|
6
6
|
"machine": {
|
|
7
7
|
"platform": "win32 x64",
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
"skillCoreBudget": 6000,
|
|
20
20
|
"skillCoreMaxTokens": 2417,
|
|
21
21
|
"skillCoreMaxName": "web-build",
|
|
22
|
-
"docsFiles":
|
|
23
|
-
"readmeBytes":
|
|
24
|
-
"readmeEnBytes":
|
|
25
|
-
"tarballBytes":
|
|
26
|
-
"unpackedBytes":
|
|
27
|
-
"tarballEntries":
|
|
28
|
-
"tarballName": "dsh-desktop-kit-2.
|
|
22
|
+
"docsFiles": 84,
|
|
23
|
+
"readmeBytes": 29777,
|
|
24
|
+
"readmeEnBytes": 7654,
|
|
25
|
+
"tarballBytes": 12417273,
|
|
26
|
+
"unpackedBytes": 16617311,
|
|
27
|
+
"tarballEntries": 551,
|
|
28
|
+
"tarballName": "dsh-desktop-kit-2.33.0.tgz"
|
|
29
29
|
}
|
|
30
30
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-desktop-kit",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.33.0",
|
|
4
4
|
"description": "DeepSeek Harness desktop kit 2.31.0 — 21 plugins and 35 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",
|
|
@@ -72,6 +72,7 @@
|
|
|
72
72
|
"uninstall.ps1",
|
|
73
73
|
"lib/**",
|
|
74
74
|
"docs/**",
|
|
75
|
+
"!docs/analysis/**",
|
|
75
76
|
"skills-baseline.json",
|
|
76
77
|
"plugins/*/package.json",
|
|
77
78
|
"plugins/*/*.js",
|
|
@@ -12,6 +12,7 @@ import { loadRuns, runPreview, updateRun, upsertRun } from "./runs.js";
|
|
|
12
12
|
import { saveTranscript } from "./transcripts.js";
|
|
13
13
|
import { findingsPrompt, parseFindings, validateFindings } from "./findings.js";
|
|
14
14
|
import { agentOptionsFor, chooseAgentRoute } from "./routing.js";
|
|
15
|
+
import { acquireLock, releaseLock } from "./locks.js";
|
|
15
16
|
|
|
16
17
|
const MODEL_ERROR = /(?:model|provider).*(?:not found|unknown|unsupported|unavailable|not available|invalid|no such|does not exist)/iu;
|
|
17
18
|
const background = new Map();
|
|
@@ -64,8 +65,20 @@ export async function runProjectAgent(ctx, exec, definition, task, options = {})
|
|
|
64
65
|
const route = chooseAgentRoute(definition, task, options.route);
|
|
65
66
|
let routeUsed = route;
|
|
66
67
|
setChildPolicy(reservedId, definition);
|
|
68
|
+
let heldLock = null;
|
|
67
69
|
let activation;
|
|
68
70
|
try {
|
|
71
|
+
if (definition.permission !== "read-only" && options.lock !== false) {
|
|
72
|
+
heldLock = acquireLock({
|
|
73
|
+
cwd: options.worktree?.path ?? project.root,
|
|
74
|
+
owner: reservedId,
|
|
75
|
+
scope: "writer",
|
|
76
|
+
});
|
|
77
|
+
if (!heldLock.ok) {
|
|
78
|
+
const holder = heldLock.holder ?? {};
|
|
79
|
+
throw new Error(`project busy: writer lock held by ${holder.owner ?? "another agent"} since ${holder.createdAt ?? "?"}`);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
69
82
|
const prompt = [
|
|
70
83
|
`<project-agent name="${definition.name}">`,
|
|
71
84
|
definition.body,
|
|
@@ -162,6 +175,7 @@ export async function runProjectAgent(ctx, exec, definition, task, options = {})
|
|
|
162
175
|
}
|
|
163
176
|
try { await activation.dispose?.(); } catch { /* best effort */ }
|
|
164
177
|
clearChildPolicy(activeId);
|
|
178
|
+
releaseLock({ cwd: options.worktree?.path ?? project.root, owner: reservedId });
|
|
165
179
|
background.delete(record.id);
|
|
166
180
|
signal?.removeEventListener?.("abort", abort);
|
|
167
181
|
}).catch((error) => {
|
|
@@ -175,6 +189,7 @@ export async function runProjectAgent(ctx, exec, definition, task, options = {})
|
|
|
175
189
|
});
|
|
176
190
|
}
|
|
177
191
|
clearChildPolicy(activeId);
|
|
192
|
+
releaseLock({ cwd: options.worktree?.path ?? project.root, owner: reservedId });
|
|
178
193
|
background.delete(record.id);
|
|
179
194
|
signal?.removeEventListener?.("abort", abort);
|
|
180
195
|
});
|
|
@@ -212,6 +227,7 @@ export async function runProjectAgent(ctx, exec, definition, task, options = {})
|
|
|
212
227
|
};
|
|
213
228
|
} catch (error) {
|
|
214
229
|
clearChildPolicy(activeId);
|
|
230
|
+
releaseLock({ cwd: options.worktree?.path ?? project.root, owner: reservedId });
|
|
215
231
|
if (isBackground) {
|
|
216
232
|
const message = error instanceof Error ? error.message : String(error);
|
|
217
233
|
const record = {
|
|
@@ -235,7 +251,10 @@ export async function runProjectAgent(ctx, exec, definition, task, options = {})
|
|
|
235
251
|
}
|
|
236
252
|
throw error;
|
|
237
253
|
} finally {
|
|
238
|
-
if (!isBackground)
|
|
254
|
+
if (!isBackground) {
|
|
255
|
+
releaseLock({ cwd: options.worktree?.path ?? project.root, owner: reservedId });
|
|
256
|
+
signal?.removeEventListener?.("abort", abort);
|
|
257
|
+
}
|
|
239
258
|
}
|
|
240
259
|
}
|
|
241
260
|
|
|
@@ -35,13 +35,108 @@ function homeDirectory(home) {
|
|
|
35
35
|
return home || process.env.DSH_HOME || path.join(os.homedir(), ".dsh");
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
+
function digestOf(root) {
|
|
39
|
+
return crypto.createHash("sha256").update(String(root).toLowerCase()).digest("hex").slice(0, 16);
|
|
40
|
+
}
|
|
41
|
+
|
|
38
42
|
function checkpointDir(root, home) {
|
|
39
|
-
|
|
40
|
-
|
|
43
|
+
return path.join(homeDirectory(home), "agent-extensions", "checkpoints", digestOf(root));
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function fileCheckpointDir(root, home) {
|
|
47
|
+
return path.join(homeDirectory(home), "agent-extensions", "file-checkpoints", digestOf(root));
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const FILE_SKIP = /(?:^|[\\/])(?:node_modules|\.git|\.dsh|dist|build|coverage|\.cache|vendor|\.next|target|\.ssh|\.aws|\.azure|\.gnupg)(?:[\\/]|$)|(?:^|[\\/])\.env(?:\.|$)|(?:^|[\\/])(?:\.npmrc|\.git-credentials|credentials)(?:[\\/]|$)|\.(?:pem|key|pfx|p12|kdbx)$/iu;
|
|
51
|
+
const FILE_LIMIT = 5000;
|
|
52
|
+
const BYTE_LIMIT = 200 * 1024 * 1024;
|
|
53
|
+
|
|
54
|
+
function resolveRoot(cwd) {
|
|
55
|
+
try {
|
|
56
|
+
return { root: repoRoot(cwd), kind: "git" };
|
|
57
|
+
} catch {
|
|
58
|
+
return { root: path.resolve(cwd || process.cwd()), kind: "files" };
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function walkFiles(root, relative = "", state = { files: [], bytes: 0 }) {
|
|
63
|
+
const directory = path.join(root, relative);
|
|
64
|
+
for (const entry of fs.readdirSync(directory, { withFileTypes: true })) {
|
|
65
|
+
const rel = relative ? path.join(relative, entry.name) : entry.name;
|
|
66
|
+
if (FILE_SKIP.test(rel)) continue;
|
|
67
|
+
const full = path.join(root, rel);
|
|
68
|
+
if (entry.isSymbolicLink()) continue;
|
|
69
|
+
if (entry.isDirectory()) {
|
|
70
|
+
walkFiles(root, rel, state);
|
|
71
|
+
continue;
|
|
72
|
+
}
|
|
73
|
+
if (!entry.isFile()) continue;
|
|
74
|
+
const size = fs.statSync(full).size;
|
|
75
|
+
state.files.push(rel);
|
|
76
|
+
state.bytes += size;
|
|
77
|
+
if (state.files.length > FILE_LIMIT) throw new Error(`checkpoint: больше ${FILE_LIMIT} файлов; укажите меньшую папку`);
|
|
78
|
+
if (state.bytes > BYTE_LIMIT) throw new Error(`checkpoint: больше ${Math.round(BYTE_LIMIT / 1024 / 1024)} МБ; укажите меньшую папку`);
|
|
79
|
+
}
|
|
80
|
+
return state;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function copyFiles(root, destination, files) {
|
|
84
|
+
for (const rel of files) {
|
|
85
|
+
const target = path.join(destination, rel);
|
|
86
|
+
fs.mkdirSync(path.dirname(target), { recursive: true, mode: 0o700 });
|
|
87
|
+
fs.copyFileSync(path.join(root, rel), target);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function createFileCheckpoint({ cwd, label, home }) {
|
|
92
|
+
const root = path.resolve(cwd || process.cwd());
|
|
93
|
+
const id = `cp-${new Date().toISOString().replace(/[-:T.Z]/gu, "").slice(0, 14)}-${crypto.randomBytes(3).toString("hex")}`;
|
|
94
|
+
const state = walkFiles(root);
|
|
95
|
+
const directory = path.join(fileCheckpointDir(root, home), id);
|
|
96
|
+
fs.mkdirSync(path.join(directory, "files"), { recursive: true, mode: 0o700 });
|
|
97
|
+
copyFiles(root, path.join(directory, "files"), state.files);
|
|
98
|
+
const meta = {
|
|
99
|
+
id,
|
|
100
|
+
kind: "files",
|
|
101
|
+
label: String(label ?? ""),
|
|
102
|
+
createdAt: new Date().toISOString(),
|
|
103
|
+
root,
|
|
104
|
+
files: state.files.length,
|
|
105
|
+
bytes: state.bytes,
|
|
106
|
+
snapshot: path.join(directory, "files"),
|
|
107
|
+
};
|
|
108
|
+
fs.writeFileSync(path.join(directory, "meta.json"), `${JSON.stringify(meta, null, 2)}\n`, { mode: 0o600 });
|
|
109
|
+
return meta;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
function listFileCheckpoints(root, home) {
|
|
113
|
+
const directory = fileCheckpointDir(root, home);
|
|
114
|
+
if (!fs.existsSync(directory)) return [];
|
|
115
|
+
return fs.readdirSync(directory)
|
|
116
|
+
.filter((name) => /^cp-[^\\/]+$/u.test(name))
|
|
117
|
+
.map((name) => {
|
|
118
|
+
try {
|
|
119
|
+
return JSON.parse(fs.readFileSync(path.join(directory, name, "meta.json"), "utf8"));
|
|
120
|
+
} catch {
|
|
121
|
+
return null;
|
|
122
|
+
}
|
|
123
|
+
})
|
|
124
|
+
.filter(Boolean);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
function restoreFileCheckpoint(checkpoint) {
|
|
128
|
+
const snapshot = checkpoint.snapshot;
|
|
129
|
+
if (!snapshot || !fs.existsSync(snapshot)) throw new Error(`checkpoint snapshot not found: ${checkpoint.id}`);
|
|
130
|
+
const files = walkFiles(snapshot).files;
|
|
131
|
+
copyFiles(snapshot, checkpoint.root, files);
|
|
132
|
+
return checkpoint;
|
|
41
133
|
}
|
|
42
134
|
|
|
135
|
+
|
|
43
136
|
export function createCheckpoint({ cwd, label = "", home } = {}) {
|
|
44
|
-
const
|
|
137
|
+
const resolved = resolveRoot(cwd);
|
|
138
|
+
if (resolved.kind === "files") return createFileCheckpoint({ cwd, label, home });
|
|
139
|
+
const root = resolved.root;
|
|
45
140
|
const id = `cp-${new Date().toISOString().replace(/[-:T.Z]/gu, "").slice(0, 14)}-${crypto.randomBytes(3).toString("hex")}`;
|
|
46
141
|
const indexPath = path.join(os.tmpdir(), `dsh-agent-extensions-index-${process.pid}-${Date.now()}`);
|
|
47
142
|
const env = { GIT_INDEX_FILE: indexPath };
|
|
@@ -59,6 +154,7 @@ export function createCheckpoint({ cwd, label = "", home } = {}) {
|
|
|
59
154
|
git(root, ["update-ref", `refs/dsh-agent-extensions/${id}`, commit], env);
|
|
60
155
|
const meta = {
|
|
61
156
|
id,
|
|
157
|
+
kind: "git",
|
|
62
158
|
label: String(label ?? ""),
|
|
63
159
|
createdAt: new Date().toISOString(),
|
|
64
160
|
repo: root,
|
|
@@ -76,7 +172,9 @@ export function createCheckpoint({ cwd, label = "", home } = {}) {
|
|
|
76
172
|
}
|
|
77
173
|
|
|
78
174
|
export function listCheckpoints({ cwd, home } = {}) {
|
|
79
|
-
const
|
|
175
|
+
const resolved = resolveRoot(cwd);
|
|
176
|
+
const root = resolved.root;
|
|
177
|
+
if (resolved.kind === "files") return listFileCheckpoints(root, home).sort((left, right) => String(right.createdAt).localeCompare(String(left.createdAt)));
|
|
80
178
|
const directory = checkpointDir(root, home);
|
|
81
179
|
if (!fs.existsSync(directory)) return [];
|
|
82
180
|
return fs
|
|
@@ -94,7 +192,13 @@ export function listCheckpoints({ cwd, home } = {}) {
|
|
|
94
192
|
}
|
|
95
193
|
|
|
96
194
|
export function restoreCheckpoint({ cwd, id, home } = {}) {
|
|
97
|
-
const
|
|
195
|
+
const resolved = resolveRoot(cwd);
|
|
196
|
+
if (resolved.kind === "files") {
|
|
197
|
+
const checkpoint = listFileCheckpoints(resolved.root, home).find((item) => item.id === id);
|
|
198
|
+
if (!checkpoint) throw new Error(`checkpoint not found: ${id}`);
|
|
199
|
+
return restoreFileCheckpoint(checkpoint);
|
|
200
|
+
}
|
|
201
|
+
const root = resolved.root;
|
|
98
202
|
const checkpoints = listCheckpoints({ cwd: root, home });
|
|
99
203
|
const checkpoint = checkpoints.find((item) => item.id === id);
|
|
100
204
|
if (!checkpoint) throw new Error(`checkpoint not found: ${id}`);
|