dsh-desktop-kit 2.23.22 → 2.23.24
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 +8 -7
- package/README.md +14 -14
- package/client.js +1 -1
- package/docs/TEST-2.23.24.md +25 -0
- package/package.json +2 -2
- package/plugins/dsh-agent-extensions/index.js +3 -7
- package/plugins/dsh-agent-extensions/lib/agents.js +0 -23
- package/plugins/dsh-agent-extensions/lib/swarm.js +1 -6
- package/plugins/dsh-integrations/index.js +12 -0
- package/plugins/dsh-mcp-manager/lib/config.js +11 -2
- package/plugins/dsh-mcp-manager/lib/manager.js +11 -0
- package/docs/TOKEN-ECONOMY.md +0 -67
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
## 2.23.
|
|
2
|
-
|
|
3
|
-
- **
|
|
4
|
-
- **
|
|
5
|
-
- **
|
|
6
|
-
- **
|
|
7
|
-
- **
|
|
1
|
+
## 2.23.24 (2026-11-13)
|
|
2
|
+
|
|
3
|
+
- **MCP auto-start fixed:** `~/.dsh` is no longer mistaken for a project when the app cwd sits inside the user profile, so global servers keep `scope=global, trusted=true`.
|
|
4
|
+
- **MCP tools register:** dynamic `mcp__*` definitions now declare the `output` contract, so connected servers appear in the tool list.
|
|
5
|
+
- **Integrations tools register:** `integration_status` and `sandbox_run` declare `output` too.
|
|
6
|
+
- **team_message fixed:** the tool receives the plugin `ctx` and no longer fails with `ctx is not defined`.
|
|
7
|
+
- **Tester role:** `.dsh/agents/tester.md` allowlist includes `pwsh` on Windows.
|
|
8
|
+
- **Tests:** MCP profile-cwd regression, output-contract assertions, team_message regression, current peak-guard smoke assertion.
|
|
8
9
|
|
|
9
10
|
## 2.23.21 (2026-11-13)
|
|
10
11
|
|
package/README.md
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
# DSH Desktop Kit 2.23.
|
|
1
|
+
# DSH Desktop Kit 2.23.24
|
|
2
2
|
|
|
3
3
|
**Агенты, рой и MCP для DeepSeek Harness — с доказательствами, а не с обещаниями.**
|
|
4
4
|
|
|
5
5
|
18 плагинов и 30 навыков в одном npm-пакете: проектные роли, read-only рой с общей доской, research-ledger с проверкой источников, MCP с OAuth/sampling/elicitation, локальный marketplace, IDE bridge, guardrails, память, checkpoints, browser QA и русский интерфейс.
|
|
6
6
|
|
|
7
|
-

|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
|
11
11
|
## Быстрый старт
|
|
12
12
|
|
|
13
13
|
```powershell
|
|
14
|
-
# в DSH: Плагины → Add plugin → dsh-desktop-kit@2.23.
|
|
14
|
+
# в DSH: Плагины → Add plugin → dsh-desktop-kit@2.23.24
|
|
15
15
|
# или из терминала:
|
|
16
|
-
dsh plugin --profile desktop add dsh-desktop-kit@2.23.
|
|
16
|
+
dsh plugin --profile desktop add dsh-desktop-kit@2.23.24
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
После установки перезапустите окно DSH (`Ctrl+R`).
|
|
@@ -34,8 +34,8 @@ node tools/e2e-http.mjs # живой web + API
|
|
|
34
34
|
|
|
35
35
|
| Версия | Изменение |
|
|
36
36
|
|---|---|
|
|
37
|
-
| **2.23.20** | Один peak-warning surface: composer card, без дублирующего toast |
|
|
38
|
-
| **2.23.19** | Flash по умолчанию; pro только при ручном выборе |
|
|
37
|
+
| **2.23.20** | Один peak-warning surface: composer card, без дублирующего toast |
|
|
38
|
+
| **2.23.19** | Flash по умолчанию; pro только при ручном выборе |
|
|
39
39
|
| **2.23.18** | Русский routing, SSRF-защита, MCP trust default `false` |
|
|
40
40
|
| **2.23.17** | MCP trust UI обновляется оптимистично; `kit.settings.json` синхронизирован с bootstrap |
|
|
41
41
|
| **2.23.16** | `settings.update` RPC — сохранение Kit controls без 404 |
|
|
@@ -190,9 +190,9 @@ research_ledger action=summary
|
|
|
190
190
|
|
|
191
191
|
Кнопка **«Проверить и доверять»** показывает команду/URL и требует подтверждения. После trust сервер получает доступ к tools; это осознанное действие, не «по умолчанию».
|
|
192
192
|
|
|
193
|
-

|
|
194
194
|
|
|
195
|
-

|
|
196
196
|
|
|
197
197
|
---
|
|
198
198
|
|
|
@@ -221,11 +221,11 @@ research_ledger action=summary
|
|
|
221
221
|
- **Настройки → Память проектов** — досье, синхронизация;
|
|
222
222
|
- **Настройки → Перенос и резервные копии** — профиль, навыки, сессии.
|
|
223
223
|
|
|
224
|
-

|
|
225
225
|
|
|
226
|
-

|
|
227
227
|
|
|
228
|
-

|
|
229
229
|
|
|
230
230
|
---
|
|
231
231
|
|
|
@@ -239,7 +239,7 @@ research_ledger action=summary
|
|
|
239
239
|
- **sandbox_run** — Windows Job Objects: memory/process/time limits, kill-on-close. **Process containment, не filesystem/network isolation.**
|
|
240
240
|
- **HTTP API** — `/api/dsh-integrations/*`, проверен живым web-профилем: auth-cookie → `POST status` → 200.
|
|
241
241
|
|
|
242
|
-

|
|
243
243
|
|
|
244
244
|
---
|
|
245
245
|
|
|
@@ -259,7 +259,7 @@ research_ledger action=summary
|
|
|
259
259
|
### Из npm
|
|
260
260
|
|
|
261
261
|
```powershell
|
|
262
|
-
dsh plugin --profile desktop add dsh-desktop-kit@2.23.
|
|
262
|
+
dsh plugin --profile desktop add dsh-desktop-kit@2.23.24
|
|
263
263
|
```
|
|
264
264
|
|
|
265
265
|
### Из локальной папки
|
|
@@ -315,7 +315,7 @@ node tools/e2e-smoke.mjs # профиль
|
|
|
315
315
|
node tools/e2e-http.mjs # живой API
|
|
316
316
|
node tools/sandbox-tests.mjs # Job Objects
|
|
317
317
|
node tools/marketplace-remote-tests.mjs
|
|
318
|
-
npm run verify:release -- 2.23.
|
|
318
|
+
npm run verify:release -- 2.23.24
|
|
319
319
|
```
|
|
320
320
|
|
|
321
321
|
UI: `browser_qa audit` на 390/768/1440, overflow/console/markup.
|
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.23.
|
|
8377
|
+
window.__DSH_DESKTOP_KIT__ = { version: "2.23.24", parts: __partNames, errors: __kitErrors, ready: false };
|
|
8378
8378
|
} catch {}
|
|
8379
8379
|
const __inject = [];
|
|
8380
8380
|
for (const __part of __parts) {
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# DSH Desktop Kit 2.23.24
|
|
2
|
+
|
|
3
|
+
Дата: 2026-11-13.
|
|
4
|
+
|
|
5
|
+
## Что это
|
|
6
|
+
|
|
7
|
+
Патч поверх 2.23.21 (2.23.22/2.23.23 — неудачный эксперимент, 2.23.22 deprecated): восстановлено рабочее поведение и закрыты дефекты, найденные при проверке живого профиля.
|
|
8
|
+
|
|
9
|
+
## Исправлено
|
|
10
|
+
|
|
11
|
+
- **MCP не стартовал автоматически.** `findProject` больше не считает `~/.dsh` проектом, когда cwd приложения лежит внутри профиля пользователя; глобальные серверы сохраняют `scope=global` и `trusted=true`, автоподключение работает.
|
|
12
|
+
- **MCP-инструменты не регистрировались.** Динамические определения `mcp__*` теперь объявляют `output`-контракт (schema + render), как остальные инструменты кита.
|
|
13
|
+
- **Интеграции не регистрировались.** `integration_status` и `sandbox_run` объявляют `output`-контракт.
|
|
14
|
+
- **`team_message` падал** с `ctx is not defined`: инструмент получает `ctx` плагина; добавлен регрессионный тест.
|
|
15
|
+
- **Роль tester** на Windows: в allowlist добавлен `pwsh` (был только `bash`).
|
|
16
|
+
- **Smoke-тест:** актуализирован ассерт peak-guard (`conversation.composer.dock/peak-guard` вместо удалённого `peak-guard-toast`).
|
|
17
|
+
|
|
18
|
+
## Проверки
|
|
19
|
+
|
|
20
|
+
- `node tools/mcp-manager-tests.mjs` — OK, включая регрессию «cwd внутри профиля не делает `~/.dsh` проектом» и проверку `output`.
|
|
21
|
+
- `node tools/agent-extensions-tests.mjs` — OK, включая `team_message`.
|
|
22
|
+
- `node tools/integrations-tests.mjs` — OK.
|
|
23
|
+
- `node tools/smoke-tests.mjs` — 3/3.
|
|
24
|
+
- `npm test` — exit 0.
|
|
25
|
+
- Ручной коннект MCP `memory`: 9 инструментов (`create_entities`, `search_nodes`, …).
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-desktop-kit",
|
|
3
|
-
"version": "2.23.
|
|
4
|
-
"description": "DeepSeek Harness desktop kit 2.23.
|
|
3
|
+
"version": "2.23.24",
|
|
4
|
+
"description": "DeepSeek Harness desktop kit 2.23.24: 18 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",
|
|
@@ -12,7 +12,7 @@ import path from "node:path";
|
|
|
12
12
|
import { registerProjectHooks } from "./lib/hooks.js";
|
|
13
13
|
import { createCheckpoint } from "./lib/checkpoints.js";
|
|
14
14
|
import { runProjectAgent, runProjectTeam } from "./lib/agents.js";
|
|
15
|
-
import {
|
|
15
|
+
import { cancelRun, listRuns } from "./lib/agents.js";
|
|
16
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";
|
|
@@ -68,7 +68,6 @@ function toolDefinition(ctx) {
|
|
|
68
68
|
model: { type: "string", description: "Optional model override for run (for example deepseek-v4-pro or deepseek-flash)" },
|
|
69
69
|
effort: { type: "string", enum: ["off", "low", "high", "max"], description: "Optional reasoning effort override for run" },
|
|
70
70
|
background: { type: "boolean", description: "Return immediately with a durable run id instead of waiting for the child" },
|
|
71
|
-
parallel: { type: "boolean", description: "Allow a team/auto swarm while another background run is active (costs more tokens)" },
|
|
72
71
|
worktree: { type: "string", description: "Run in a git worktree: `auto` picks a name, or pass a lowercase slug" },
|
|
73
72
|
worktrees: { type: "boolean", description: "For team: give every writer its own worktree/branch (required for non-read-only agents)" },
|
|
74
73
|
id: { type: "string", description: "Run id for status/cancel" },
|
|
@@ -113,9 +112,6 @@ function toolDefinition(ctx) {
|
|
|
113
112
|
task = decision.research ? `${task}\n\nResearch requirement: use web_search/web_fetch, prefer official docs, and cite at least two sources with dates before conclusions.` : task;
|
|
114
113
|
input = { ...input, action: "team", names: members, lead: decision.lead, preset: "" };
|
|
115
114
|
}
|
|
116
|
-
if (input.action === "team" && activeRunCount() > 0 && input?.parallel !== true) {
|
|
117
|
-
return { ok: false, text: `project_agent team: ${activeRunCount()} background run(s) already active; wait, cancel, or pass parallel=true` };
|
|
118
|
-
}
|
|
119
115
|
if (input.action === "team") {
|
|
120
116
|
const preset = input?.preset ? findTeam(project.root, project.dsh ?? path.join(project.root, ".dsh"), input.preset) : null;
|
|
121
117
|
if (input?.preset && !preset) return { ok: false, text: `project_agent team: unknown preset "${input.preset}"` };
|
|
@@ -308,7 +304,7 @@ function boardToolDefinition() {
|
|
|
308
304
|
};
|
|
309
305
|
}
|
|
310
306
|
|
|
311
|
-
function teamMessageToolDefinition() {
|
|
307
|
+
export function teamMessageToolDefinition(ctx) {
|
|
312
308
|
return {
|
|
313
309
|
name: "team_message",
|
|
314
310
|
description:
|
|
@@ -372,7 +368,7 @@ export function apply(ctx) {
|
|
|
372
368
|
ctx.effect(() => ctx.tools.register(toolDefinition(ctx)), "agent-extensions: project_agent tool");
|
|
373
369
|
ctx.effect(() => ctx.tools.register(worktreeToolDefinition()), "agent-extensions: project_worktree tool");
|
|
374
370
|
ctx.effect(() => ctx.tools.register(boardToolDefinition()), "agent-extensions: team_board tool");
|
|
375
|
-
ctx.effect(() => ctx.tools.register(teamMessageToolDefinition()), "agent-extensions: team_message tool");
|
|
371
|
+
ctx.effect(() => ctx.tools.register(teamMessageToolDefinition(ctx)), "agent-extensions: team_message tool");
|
|
376
372
|
} catch (error) {
|
|
377
373
|
ctx.logger?.warn?.(`[agent-extensions] tool registration failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
378
374
|
}
|
|
@@ -30,32 +30,10 @@ function textFromOutput(output) {
|
|
|
30
30
|
.trim();
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
function budgetFor(definition) {
|
|
34
|
-
switch (definition.name) {
|
|
35
|
-
case "coordinator":
|
|
36
|
-
return "Board only: read board/tasks, assign and synthesize. Do not read code or run commands. Max 6 tool calls.";
|
|
37
|
-
case "researcher":
|
|
38
|
-
return "Search first. Open at most 2 authoritative sources, extract only the quotes you need, do not read whole pages. Max 6 searches and 4 fetches. Stop when two sources agree.";
|
|
39
|
-
case "reviewer":
|
|
40
|
-
return "Read only the diff and the files it touches. Max 12 file reads, no repository-wide scans. Stop when the changed behavior is covered.";
|
|
41
|
-
case "verifier":
|
|
42
|
-
return "Check only the claims you were given. Max 10 verification steps; do not re-research the whole topic.";
|
|
43
|
-
case "tester":
|
|
44
|
-
return "Run the smallest relevant test set first. Max 8 commands; do not repeat a passing suite.";
|
|
45
|
-
default:
|
|
46
|
-
return "Use the fewest tool calls that produce evidence. Do not re-read an unchanged file or repeat a search. Stop when the task is covered.";
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
|
|
51
33
|
function finishRun(projectRoot, id, patch) {
|
|
52
34
|
try { updateRun(projectRoot, id, patch); } catch { /* registry is best effort */ }
|
|
53
35
|
}
|
|
54
36
|
|
|
55
|
-
export function activeRunCount() {
|
|
56
|
-
return background.size;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
37
|
function remember(record, activation, projectRoot, signal, onAbort) {
|
|
60
38
|
background.set(record.id, { record, activation, projectRoot, signal, onAbort });
|
|
61
39
|
}
|
|
@@ -89,7 +67,6 @@ export async function runProjectAgent(ctx, exec, definition, task, options = {})
|
|
|
89
67
|
options.teamId ? `<team id="${options.teamId}">Use team_board action=post/read with teamId=${options.teamId} to share findings; use add-task/claim/done for work items. Use team_message to=\"parent\" for a live message to the lead; sibling live messaging is not available — the board is the shared channel.</team>` : "",
|
|
90
68
|
options.leadContext ? `<team-lead>You coordinate this team. Members: ${options.leadContext}. Read the board first; assign/claim tasks with acceptance criteria and non-overlapping scopes; use team_message to=<run-id> for live directions and team_message to=\"parent\" to report to the parent. Finish with a PASS/FAIL synthesis, blockers and unresolved risks.</team-lead>` : "",
|
|
91
69
|
"<quality>Evidence over confidence: for code claims cite file:line; for test claims quote the command and result; separate facts from assumptions; never invent a test, source or passing result. Findings: severity · location · evidence · impact · fix. If evidence is missing, say unknown. Final report: PASS/FAIL, blockers, uncertain items.</quality>",
|
|
92
|
-
`<budget>${budgetFor(definition)}</budget>`,
|
|
93
70
|
definition.output === "findings" ? findingsPrompt() : "",
|
|
94
71
|
"",
|
|
95
72
|
"Task:",
|
|
@@ -48,16 +48,11 @@ export function chooseSwarm(task, teams = [], agents = [], options = {}) {
|
|
|
48
48
|
|
|
49
49
|
const maxAgents = Math.max(2, Math.min(6, Number(options.maxAgents) || 4));
|
|
50
50
|
const research = EXTERNAL.some((pattern) => pattern.test(text));
|
|
51
|
-
const quality = /(?:audit|security|vulnerab|threat|compliance|аудит|безопас|уязвим|комплаенс)/iu.test(text);
|
|
52
51
|
const readOnlyNames = new Set(readOnly.map((agent) => agent.name));
|
|
53
52
|
const lead = readOnly.find((agent) => /^(?:lead|coordinator|orchestrator)$/iu.test(agent.name))?.name ?? "";
|
|
54
53
|
const candidates = readOnly.filter((agent) => agent.name !== lead);
|
|
55
54
|
|
|
56
|
-
const preferredPresets =
|
|
57
|
-
? ["audit", "security", "review"]
|
|
58
|
-
: research
|
|
59
|
-
? ["research", "audit", "review"]
|
|
60
|
-
: ["review", "security", "audit"];
|
|
55
|
+
const preferredPresets = research ? ["research", "audit"] : ["review", "security", "audit"];
|
|
61
56
|
const presets = teams
|
|
62
57
|
.filter((team) => Array.isArray(team.members) && team.members.length >= 2)
|
|
63
58
|
.map((team) => ({ team, score: preferredPresets.indexOf(team.id) }))
|
|
@@ -17,12 +17,23 @@ function projectFrom(agent) {
|
|
|
17
17
|
return agent?.session?.header?.cwd ?? process.cwd();
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
+
function toolOutput() {
|
|
21
|
+
return {
|
|
22
|
+
schema: { type: "object", additionalProperties: true },
|
|
23
|
+
render(_args, value) {
|
|
24
|
+
const text = typeof value?.text === "string" ? value.text : JSON.stringify(value);
|
|
25
|
+
return [{ type: "text", text: String(text).slice(0, 40_000) }];
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
|
|
20
30
|
function toolDefinition(ctx, bridge) {
|
|
21
31
|
return {
|
|
22
32
|
name: "integration_status",
|
|
23
33
|
description:
|
|
24
34
|
"Reports the marketplace catalog, IDE bridge status, and sandbox capabilities. Marketplace supports local and HTTPS checksummed archives; sandbox_run enforces Job Object memory/process/time limits, not filesystem or network isolation.",
|
|
25
35
|
parameters: { type: "object", additionalProperties: false, properties: {} },
|
|
36
|
+
output: toolOutput(),
|
|
26
37
|
async execute(_input, exec) {
|
|
27
38
|
const root = projectFrom(exec?.agent);
|
|
28
39
|
const status = bridge.status();
|
|
@@ -55,6 +66,7 @@ function sandboxTool() {
|
|
|
55
66
|
processLimit: { type: "number" },
|
|
56
67
|
},
|
|
57
68
|
},
|
|
69
|
+
output: toolOutput(),
|
|
58
70
|
async execute(input, exec) {
|
|
59
71
|
const root = projectFrom(exec?.agent);
|
|
60
72
|
const cwd = path.resolve(input?.cwd || root);
|
|
@@ -91,9 +91,14 @@ export function setGlobalServerFlags(id, flags) {
|
|
|
91
91
|
|
|
92
92
|
export function findProject(start) {
|
|
93
93
|
let current = path.resolve(start || process.cwd());
|
|
94
|
+
const homeDsh = path.resolve(mcpHome()).toLowerCase();
|
|
94
95
|
for (let depth = 0; depth < 8; depth += 1) {
|
|
95
96
|
const dsh = path.join(current, ".dsh");
|
|
96
|
-
|
|
97
|
+
/* `~/.dsh` is the global home, never a project: a cwd inside the user
|
|
98
|
+
profile (the Desktop app itself) must not downgrade global servers. */
|
|
99
|
+
if (path.resolve(dsh).toLowerCase() !== homeDsh && fs.existsSync(dsh)) {
|
|
100
|
+
return { root: current, config: path.join(dsh, "mcp.json") };
|
|
101
|
+
}
|
|
97
102
|
const parent = path.dirname(current);
|
|
98
103
|
if (parent === current) break;
|
|
99
104
|
current = parent;
|
|
@@ -168,7 +173,11 @@ export function loadConfig({ cwd = process.cwd(), env = process.env } = {}) {
|
|
|
168
173
|
const secrets = loadSecrets();
|
|
169
174
|
const sources = [];
|
|
170
175
|
const servers = new Map();
|
|
171
|
-
|
|
176
|
+
const files = [[globalFile, "global"]];
|
|
177
|
+
if (project.config && path.resolve(project.config).toLowerCase() !== path.resolve(globalFile).toLowerCase()) {
|
|
178
|
+
files.push([project.config, "project"]);
|
|
179
|
+
}
|
|
180
|
+
for (const [file, scope] of files) {
|
|
172
181
|
if (!file) continue;
|
|
173
182
|
let parsed;
|
|
174
183
|
try {
|
|
@@ -12,6 +12,16 @@ function sanitize(value) {
|
|
|
12
12
|
return String(value ?? "").replace(/[^A-Za-z0-9_-]+/gu, "_").replace(/^_+|_+$/gu, "").slice(0, 48);
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
function toolOutput() {
|
|
16
|
+
return {
|
|
17
|
+
schema: { type: "object", additionalProperties: true },
|
|
18
|
+
render(_args, value) {
|
|
19
|
+
const text = typeof value?.text === "string" ? value.text : JSON.stringify(value);
|
|
20
|
+
return [{ type: "text", text: String(text).slice(0, 40_000) }];
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
|
|
15
25
|
function textFromContent(content) {
|
|
16
26
|
if (!Array.isArray(content)) return "";
|
|
17
27
|
return content
|
|
@@ -120,6 +130,7 @@ export class McpManager {
|
|
|
120
130
|
parameters: entry.tool.inputSchema && typeof entry.tool.inputSchema === "object"
|
|
121
131
|
? entry.tool.inputSchema
|
|
122
132
|
: { type: "object", properties: {} },
|
|
133
|
+
output: toolOutput(),
|
|
123
134
|
async execute(input, exec) {
|
|
124
135
|
const record = entry.record;
|
|
125
136
|
if (!record?.client?.connected) return { ok: false, text: `MCP ${entry.serverId}: server is not connected` };
|
package/docs/TOKEN-ECONOMY.md
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
# Token economy — как снизить расход без потери качества
|
|
2
|
-
|
|
3
|
-
Дата: 2026-11-13. Версия: 2.23.22.
|
|
4
|
-
|
|
5
|
-
## Где реально уходят токены
|
|
6
|
-
|
|
7
|
-
| Источник | Наблюдение | Что сделано |
|
|
8
|
-
|---|---|---|
|
|
9
|
-
| `project-memory curator` | 1,4–2,3 млн токенов за один фоновый запуск | Авто-куратор отключён в `~/.dsh/projects-memory/registry.json`; память обновляется вручную `/remember` или инструментом |
|
|
10
|
-
| Дочерние агенты | researcher/reviewer читали проект и веб без ограничения | В промпт добавлен `<budget>`: 2 источника, 12 файлов, 6 проверок, 8 команд |
|
|
11
|
-
| Дубли auto-роя | Несколько команд запускались одновременно | `team/auto` блокируется, пока есть активный background run; обход — `parallel=true` |
|
|
12
|
-
| Родительский контекст | 716k из 1M в одной сессии | Держать сессию <60–70%; после крупной задачи `/compact` или новый чат |
|
|
13
|
-
| Высокий effort | high у quality-ролей | Оставлен: это качество, не основной расход |
|
|
14
|
-
|
|
15
|
-
## Правило запуска
|
|
16
|
-
|
|
17
|
-
- Один `project_agent action=auto` на задачу.
|
|
18
|
-
- Пока рой работает — не запускать второй; `status` покажет active run.
|
|
19
|
-
- `parallel=true` — только когда действительно нужны две независимые команды.
|
|
20
|
-
|
|
21
|
-
## Настройки
|
|
22
|
-
|
|
23
|
-
Для максимального качества:
|
|
24
|
-
|
|
25
|
-
```json
|
|
26
|
-
{ "threshold": 2, "maxAgents": 6 }
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
Для баланса (рекомендуется по умолчанию):
|
|
30
|
-
|
|
31
|
-
```json
|
|
32
|
-
{ "threshold": 3, "maxAgents": 4 }
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
`maxAgents` — потолок участников, не цель.
|
|
36
|
-
|
|
37
|
-
## Память
|
|
38
|
-
|
|
39
|
-
Авто-куратор выключен:
|
|
40
|
-
|
|
41
|
-
```json
|
|
42
|
-
{ "curator": { "enabled": false, "idleMs": 1800000 } }
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
Это не отключает `project_memory` и дайджест проекта. Ручное обновление:
|
|
46
|
-
|
|
47
|
-
```text
|
|
48
|
-
/remember
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
или `project_memory action=append_journal`.
|
|
52
|
-
|
|
53
|
-
## Ожидаемый эффект
|
|
54
|
-
|
|
55
|
-
Оценка, не гарантия:
|
|
56
|
-
|
|
57
|
-
- авто-куратор: до 1–2 млн токенов на запуск → 0 автоматических;
|
|
58
|
-
- дубли роя: −30–50% при повторных вызовах;
|
|
59
|
-
- tool-loop детей: −20–40% на длинных аудитах;
|
|
60
|
-
- компакция родителя: −30–60% на каждом следующем ходе.
|
|
61
|
-
|
|
62
|
-
## Что не меняется
|
|
63
|
-
|
|
64
|
-
- 8 ролей, 4 preset, board, findings, worktrees.
|
|
65
|
-
- flash по умолчанию, pro только вручную.
|
|
66
|
-
- research-first, web_search, research_ledger.
|
|
67
|
-
- Один peak-card.
|