dsh-desktop-kit 2.11.0 → 2.13.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 +14 -0
- package/README.md +17 -17
- package/client.js +8 -1
- package/docs/TEST-2.12.0.md +26 -0
- package/docs/TEST-2.13.0.md +21 -0
- package/package.json +2 -2
- package/plugins/dsh-agent-extensions/client.js +7 -0
- package/plugins/dsh-agent-extensions/index.js +40 -6
- package/plugins/dsh-agent-extensions/lib/agents.js +20 -4
- package/plugins/dsh-agent-extensions/screenshots/team-1440.png +0 -0
- package/plugins/dsh-mcp-manager/screenshots/elicitation-1440.png +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.13.0 (2026-11-12)
|
|
4
|
+
|
|
5
|
+
- **Team с пишущими агентами.** `worktrees=true` выдаёт каждому участнику отдельную ветку `dsh/<name>-…` и рабочую копию; без флага team остаётся read-only.
|
|
6
|
+
- **Изоляция.** Пишущие агенты никогда не делят cwd; результат каждого — отдельный run и ветка, merge остаётся за пользователем.
|
|
7
|
+
- **UI.** Подсказка про `worktrees=true` в секции «Параллельная команда».
|
|
8
|
+
- **Тесты.** Полный набор зелёный; read-only team и worktree-тесты без изменений.
|
|
9
|
+
|
|
10
|
+
## 2.12.0 (2026-11-12)
|
|
11
|
+
|
|
12
|
+
- **Параллельная команда.** `project_agent action=team names=[...] task=...` запускает 2–6 **read-only** ролей на одной задаче; каждая получает свой контекст и отдельный run.
|
|
13
|
+
- **Безопасность.** Team отклоняет пишущих агентов, дубликаты и размеры вне 2–6; общий cwd только для read-only.
|
|
14
|
+
- **UI.** Секция «Параллельная команда» в Агентах: подсказка и доступные read-only роли.
|
|
15
|
+
- **Тесты.** `team-agents-tests`; UI 390/768/1440 без overflow.
|
|
16
|
+
|
|
3
17
|
## 2.11.0 (2026-11-12)
|
|
4
18
|
|
|
5
19
|
- **MCP elicitation.** Opt-in `elicitation: true`; `elicitation/create` открывает глобальную форму DSH с Accept/Decline/Cancel, валидацией плоской JSON-схемы и таймаутом.
|
package/README.md
CHANGED
|
@@ -4,17 +4,17 @@
|
|
|
4
4
|
|
|
5
5
|
Набор из **16 плагинов и 30 навыков** для DeepSeek Harness 0.2.x: русский интерфейс, автопилот навыков, токен-лаборатория, студия навыков, память проектов, обмен памятью между машинами (GitHub и USB), guardrails, карта репозитория, чекпоинты, plan mode, browser QA, GitHub review, Claude Code-подобные hooks/agents/commands, перенос чатов и резервные копии профиля.
|
|
6
6
|
|
|
7
|
-

|
|
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
|
-

|
|
14
14
|
|
|
15
|
-

|
|
16
16
|
|
|
17
|
-

|
|
18
18
|
|
|
19
19
|
## Права и субагенты
|
|
20
20
|
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
- **Worktrees и фоновые агенты.** `project_worktree` создаёт ветку `dsh/<slug>` и отдельную папку `.dsh/worktrees/<slug>`; `project_agent ... worktree=auto background=true` запускает агента в изоляции, а страница **Агенты** показывает worktrees и очередь запусков с кнопкой «Остановить».
|
|
26
26
|
- **Инструкции проекта.** `AGENTS.md` и `CLAUDE.md` читаются иерархически (root → вложенные папки → `.dsh`) с `@import`; MCP roots сообщает серверу корень проекта.
|
|
27
27
|
|
|
28
|
-

|
|
29
29
|
|
|
30
|
-

|
|
31
31
|
|
|
32
|
-
**v2.
|
|
32
|
+
**v2.13.0** · MIT · проверено на DSH `0.2.1-rc.5` и `0.2.2-rc.1` (Windows 11) · без внешних зависимостей и телеметрии
|
|
33
33
|
|
|
34
34
|
**План развития:** [docs/ROADMAP-3.0.md](docs/ROADMAP-3.0.md) — Memory Fabric, семантическое
|
|
35
35
|
слияние, локальный индекс памяти, шифрованные переносы, Memory Hub и npm trusted publishing.
|
|
@@ -117,27 +117,27 @@
|
|
|
117
117
|
- перед каждой синхронизацией проверяется, что репозиторий всё ещё приватный;
|
|
118
118
|
- секреты и PII вычищаются, домашние пути заменяются токеном `%DSH_HOME%`; LLM не вызывается — **0 токенов**.
|
|
119
119
|
|
|
120
|
-

|
|
121
121
|
|
|
122
|
-

|
|
123
123
|
|
|
124
124
|
## Скриншоты
|
|
125
125
|
|
|
126
126
|
### Skills Studio: каталог, стоимость и редактор
|
|
127
127
|
|
|
128
|
-

|
|
129
129
|
|
|
130
|
-

|
|
131
131
|
|
|
132
132
|
### Token Lab: куда уходит контекст
|
|
133
133
|
|
|
134
|
-

|
|
135
135
|
|
|
136
136
|
### Тёмная тема и мобильный
|
|
137
137
|
|
|
138
|
-

|
|
139
139
|
|
|
140
|
-

|
|
141
141
|
|
|
142
142
|
## Окно-напоминание: пиковый тариф
|
|
143
143
|
|
|
@@ -147,11 +147,11 @@ DeepSeek включает двойной тариф в пиковые часы (
|
|
|
147
147
|
- **в окне** — красная карточка: причина, границы окна в местном времени и UTC, живой отсчёт до конца и рекомендация, когда вернуться;
|
|
148
148
|
- **после окна** — карточка исчезает; состояние всегда доступно через `window.__DSH_PEAK_GUARD__.state()`.
|
|
149
149
|
|
|
150
|
-

|
|
151
151
|
|
|
152
|
-

|
|
153
153
|
|
|
154
|
-

|
|
155
155
|
|
|
156
156
|
Подробности и настройки — [plugins/dsh-peak-guard/README.md](plugins/dsh-peak-guard/README.md).
|
|
157
157
|
|
package/client.js
CHANGED
|
@@ -7739,6 +7739,13 @@ var(--dsw-alias-bg-layer-1,#fff);box-shadow:inset 0 1px 0 color-mix(in srgb,#fff
|
|
|
7739
7739
|
h("pre", { className: "ag-code" }, "---\nname: reviewer\ndescription: Ревью диффа\nmodel: deepseek-flash\ntools: read, grep\npermission: read-only\n---\n\nТы ревьюер. Верни только findings."),
|
|
7740
7740
|
) : null,
|
|
7741
7741
|
agents.length > 0 ? h("div", { className: "ag-grid" }, agents.map((agent) => h(AgentCard, { key: agent.name, agent }))) : null,
|
|
7742
|
+
h("div", { className: "ag-section" },
|
|
7743
|
+
h("h3", null, "Параллельная команда"),
|
|
7744
|
+
h("p", { className: "ag-hint" }, "`project_agent action=team names=[reviewer,researcher] task=...` запускает 2–6 read-only ролей на одной задаче. Для пишущих добавьте `worktrees=true` — каждый получит отдельную ветку и рабочую копию. Результаты — в «Фоновых запусках»."),
|
|
7745
|
+
agents.filter((agent) => agent.permission === "read-only").length > 0
|
|
7746
|
+
? h("div", { className: "ag-tools" }, agents.filter((agent) => agent.permission === "read-only").map((agent) => h("span", { key: agent.name, className: "ag-tool" }, agent.name)))
|
|
7747
|
+
: h("div", { className: "ag-mini-empty" }, "Нужна хотя бы одна read-only роль: team не запускает пишущих агентов в общем cwd."),
|
|
7748
|
+
),
|
|
7742
7749
|
h("div", { className: "ag-section" },
|
|
7743
7750
|
h("h3", null, "Worktrees"),
|
|
7744
7751
|
h("p", { className: "ag-hint" }, "Изолированные рабочие копии: `project_worktree create` или `project_agent` с `worktree=auto`."),
|
|
@@ -8018,7 +8025,7 @@ var(--dsw-alias-bg-layer-1,#fff);box-shadow:inset 0 1px 0 color-mix(in srgb,#fff
|
|
|
8018
8025
|
if (__kitErrors.length <= 5) console.error("[dsh-desktop-kit] registration failed:", label, message);
|
|
8019
8026
|
};
|
|
8020
8027
|
try {
|
|
8021
|
-
window.__DSH_DESKTOP_KIT__ = { version: "2.
|
|
8028
|
+
window.__DSH_DESKTOP_KIT__ = { version: "2.13.0", parts: __partNames, errors: __kitErrors, ready: false };
|
|
8022
8029
|
} catch {}
|
|
8023
8030
|
const __inject = [];
|
|
8024
8031
|
for (const __part of __parts) {
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# DSH Desktop Kit 2.12.0 — тест
|
|
2
|
+
|
|
3
|
+
Дата: 2026-11-12.
|
|
4
|
+
|
|
5
|
+
## Team
|
|
6
|
+
|
|
7
|
+
- `project_agent action=team names=[...] task=...`.
|
|
8
|
+
- 2–6 уникальных read-only агентов.
|
|
9
|
+
- Каждый — отдельный background run; результаты в «Фоновых запусках».
|
|
10
|
+
- Пишущие роли, дубликаты и неверный размер отклоняются.
|
|
11
|
+
- Общий cwd безопасен, потому что write запрещён политикой роли.
|
|
12
|
+
|
|
13
|
+
## UI
|
|
14
|
+
|
|
15
|
+
- Секция «Параллельная команда» в Агентах.
|
|
16
|
+
- 390/768/1440: overflow 0, console 0, markup 0.
|
|
17
|
+
|
|
18
|
+
## Тесты
|
|
19
|
+
|
|
20
|
+
- `tools/team-agents-tests.mjs` — OK.
|
|
21
|
+
- `npm test` — exit 0.
|
|
22
|
+
- `build:client` / `check:client` — OK.
|
|
23
|
+
|
|
24
|
+
## Ограничение
|
|
25
|
+
|
|
26
|
+
Это параллельный анализ, не обмен сообщениями между агентами.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# DSH Desktop Kit 2.13.0 — тест
|
|
2
|
+
|
|
3
|
+
Дата: 2026-11-12.
|
|
4
|
+
|
|
5
|
+
## Team worktrees
|
|
6
|
+
|
|
7
|
+
- `project_agent action=team ... worktrees=true`.
|
|
8
|
+
- Пишущая роль получает `.dsh/worktrees/<slug>` и ветку `dsh/<slug>`.
|
|
9
|
+
- Read-only team по-прежнему работает в общем cwd.
|
|
10
|
+
- Без `worktrees=true` пишущая роль отклоняется.
|
|
11
|
+
- Merge автоматически не выполняется — это осознанно.
|
|
12
|
+
|
|
13
|
+
## Проверки
|
|
14
|
+
|
|
15
|
+
- `npm test` — exit 0.
|
|
16
|
+
- `build:client` / `check:client` — OK.
|
|
17
|
+
- UI-подсказка обновлена; layout не менялся, прежний аудит 390/768/1440 актуален.
|
|
18
|
+
|
|
19
|
+
## Ограничение
|
|
20
|
+
|
|
21
|
+
Нет обмена сообщениями между участниками и общей доски задач.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-desktop-kit",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.13.0",
|
|
4
4
|
"description": "DeepSeek Harness desktop kit 2.7: 16 plugins and 30 skills — self-applying skills, token lab, Skills Studio, project memory, GitHub and USB memory transfer, guardrails, repo map, checkpoints, plan mode, browser QA, GitHub review, Claude Code-like hooks/agents/commands, Russian UI, peak guard, chat move and profile transfer.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"deepseek-harness",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"build:client": "node tools/build-client.mjs",
|
|
75
75
|
"build:skills": "node tools/build-skill-manifest.mjs",
|
|
76
76
|
"check:client": "node tools/check-client.mjs client.js",
|
|
77
|
-
"test": "node tools/smoke-tests.mjs && node tools/memory-tests.mjs && node tools/skills-sync-tests.mjs && node tools/kit-upgrade-tests.mjs && node plugins/dsh-profile-transfer/test/transfer.test.mjs && node --test plugins/dsh-memory-bridge/test/bridge.test.mjs plugins/dsh-memory-bridge/test/github.test.mjs plugins/dsh-memory-bridge/test/merge.test.mjs plugins/dsh-memory-bridge/test/user-specific.test.mjs && node tools/repo-map-tests.mjs && node tools/checkpoints-tests.mjs && node tools/plan-mode-tests.mjs && node tools/browser-qa-tests.mjs && node tools/ui-gate-tests.mjs && node tools/agent-extensions-tests.mjs && node tools/mcp-manager-tests.mjs && node tools/github-review-tests.mjs && node tools/instructions-tests.mjs && node tools/mcp-elicitation-tests.mjs && node tools/mcp-sampling-tests.mjs && node tools/mcp-oauth-tests.mjs && node tools/worktrees-tests.mjs && node tools/background-agents-tests.mjs && node tools/permissions-ui-tests.mjs && node plugins/dsh-guardrails/tools/guardrails-tests.mjs",
|
|
77
|
+
"test": "node tools/smoke-tests.mjs && node tools/memory-tests.mjs && node tools/skills-sync-tests.mjs && node tools/kit-upgrade-tests.mjs && node plugins/dsh-profile-transfer/test/transfer.test.mjs && node --test plugins/dsh-memory-bridge/test/bridge.test.mjs plugins/dsh-memory-bridge/test/github.test.mjs plugins/dsh-memory-bridge/test/merge.test.mjs plugins/dsh-memory-bridge/test/user-specific.test.mjs && node tools/repo-map-tests.mjs && node tools/checkpoints-tests.mjs && node tools/plan-mode-tests.mjs && node tools/browser-qa-tests.mjs && node tools/ui-gate-tests.mjs && node tools/agent-extensions-tests.mjs && node tools/mcp-manager-tests.mjs && node tools/github-review-tests.mjs && node tools/instructions-tests.mjs && node tools/mcp-elicitation-tests.mjs && node tools/mcp-sampling-tests.mjs && node tools/mcp-oauth-tests.mjs && node tools/worktrees-tests.mjs && node tools/team-agents-tests.mjs && node tools/background-agents-tests.mjs && node tools/permissions-ui-tests.mjs && node plugins/dsh-guardrails/tools/guardrails-tests.mjs",
|
|
78
78
|
"skills:cost": "node tools/skill-cost.mjs",
|
|
79
79
|
"skills:check": "node tools/skill-cost.mjs --check",
|
|
80
80
|
"release": "node tools/release.mjs"
|
|
@@ -183,6 +183,13 @@ window.__ModuleLoader__.load({
|
|
|
183
183
|
h("pre", { className: "ag-code" }, "---\nname: reviewer\ndescription: Ревью диффа\nmodel: deepseek-flash\ntools: read, grep\npermission: read-only\n---\n\nТы ревьюер. Верни только findings."),
|
|
184
184
|
) : null,
|
|
185
185
|
agents.length > 0 ? h("div", { className: "ag-grid" }, agents.map((agent) => h(AgentCard, { key: agent.name, agent }))) : null,
|
|
186
|
+
h("div", { className: "ag-section" },
|
|
187
|
+
h("h3", null, "Параллельная команда"),
|
|
188
|
+
h("p", { className: "ag-hint" }, "`project_agent action=team names=[reviewer,researcher] task=...` запускает 2–6 read-only ролей на одной задаче. Для пишущих добавьте `worktrees=true` — каждый получит отдельную ветку и рабочую копию. Результаты — в «Фоновых запусках»."),
|
|
189
|
+
agents.filter((agent) => agent.permission === "read-only").length > 0
|
|
190
|
+
? h("div", { className: "ag-tools" }, agents.filter((agent) => agent.permission === "read-only").map((agent) => h("span", { key: agent.name, className: "ag-tool" }, agent.name)))
|
|
191
|
+
: h("div", { className: "ag-mini-empty" }, "Нужна хотя бы одна read-only роль: team не запускает пишущих агентов в общем cwd."),
|
|
192
|
+
),
|
|
186
193
|
h("div", { className: "ag-section" },
|
|
187
194
|
h("h3", null, "Worktrees"),
|
|
188
195
|
h("p", { className: "ag-hint" }, "Изолированные рабочие копии: `project_worktree create` или `project_agent` с `worktree=auto`."),
|
|
@@ -11,7 +11,7 @@ import fs from "node:fs";
|
|
|
11
11
|
import path from "node:path";
|
|
12
12
|
import { registerProjectHooks } from "./lib/hooks.js";
|
|
13
13
|
import { createCheckpoint } from "./lib/checkpoints.js";
|
|
14
|
-
import { runProjectAgent } from "./lib/agents.js";
|
|
14
|
+
import { runProjectAgent, runProjectTeam } from "./lib/agents.js";
|
|
15
15
|
import { cancelRun, listRuns } from "./lib/agents.js";
|
|
16
16
|
import { createWorktree, removeWorktree, worktreeSummary } from "./lib/worktrees.js";
|
|
17
17
|
import { registerChildPolicyHook } from "./lib/policy.js";
|
|
@@ -40,16 +40,18 @@ function toolDefinition(ctx) {
|
|
|
40
40
|
return {
|
|
41
41
|
name: TOOL,
|
|
42
42
|
description:
|
|
43
|
-
"Run or list project-local custom agents from `.dsh/agents/*.md`. `run` starts a child agent; `background=true` returns immediately with a run id; `worktree=true|slug` runs the child in an isolated git worktree. `status` lists runs, `cancel` stops one. Use for repeated specialised work (reviewer, researcher, SEO, migration).",
|
|
43
|
+
"Run or list project-local custom agents from `.dsh/agents/*.md`. `run` starts a child agent; `background=true` returns immediately with a run id; `worktree=true|slug` runs the child in an isolated git worktree. `team` starts 2–6 read-only agents on the same task in parallel (analysis, not messaging). `status` lists runs, `cancel` stops one. Use for repeated specialised work (reviewer, researcher, SEO, migration).",
|
|
44
44
|
parameters: {
|
|
45
45
|
type: "object",
|
|
46
46
|
additionalProperties: false,
|
|
47
47
|
properties: {
|
|
48
|
-
action: { type: "string", enum: ["list", "run", "status", "cancel"], description: "list agents, run one, list background runs, or cancel a run" },
|
|
48
|
+
action: { type: "string", enum: ["list", "run", "team", "status", "cancel"], description: "list agents, run one, start a read-only team, list background runs, or cancel a run" },
|
|
49
49
|
name: { type: "string", description: "Agent name from `.dsh/agents/<name>.md`" },
|
|
50
|
+
names: { type: "array", items: { type: "string" }, maxItems: 6, description: "For team: 2–6 read-only agent names" },
|
|
50
51
|
task: { type: "string", description: "Task/prompt for the child agent (required for run)" },
|
|
51
52
|
background: { type: "boolean", description: "Return immediately with a durable run id instead of waiting for the child" },
|
|
52
53
|
worktree: { type: "string", description: "Run in a git worktree: `auto` picks a name, or pass a lowercase slug" },
|
|
54
|
+
worktrees: { type: "boolean", description: "For team: give every writer its own worktree/branch (required for non-read-only agents)" },
|
|
53
55
|
id: { type: "string", description: "Run id for status/cancel" },
|
|
54
56
|
},
|
|
55
57
|
required: ["action"],
|
|
@@ -80,10 +82,42 @@ function toolDefinition(ctx) {
|
|
|
80
82
|
return { ok: false, text: `project_agent cancel ${id}: ${error instanceof Error ? error.message : String(error)}` };
|
|
81
83
|
}
|
|
82
84
|
}
|
|
83
|
-
if (input?.action !== "run") return { ok: false, text: "project_agent: action must be list, run, status or cancel" };
|
|
84
|
-
const name = String(input?.name ?? "").trim();
|
|
85
|
+
if (input?.action !== "run" && input?.action !== "team") return { ok: false, text: "project_agent: action must be list, run, team, status or cancel" };
|
|
85
86
|
const task = String(input?.task ?? "").trim();
|
|
86
|
-
if (!
|
|
87
|
+
if (!task) return { ok: false, text: `project_agent: task is required for ${input.action}` };
|
|
88
|
+
if (input.action === "team") {
|
|
89
|
+
const names = Array.isArray(input?.names) ? [...new Set(input.names.map((item) => String(item).trim()).filter(Boolean))] : [];
|
|
90
|
+
if (names.length < 2 || names.length > 6) return { ok: false, text: "project_agent team: names must contain 2–6 unique agents" };
|
|
91
|
+
const definitions = [];
|
|
92
|
+
for (const name of names) {
|
|
93
|
+
const definition = agents.find((agent) => agent.name === name);
|
|
94
|
+
if (!definition) return { ok: false, text: `project_agent team: unknown agent "${name}"` };
|
|
95
|
+
if (definition.permission !== "read-only" && input?.worktrees !== true) {
|
|
96
|
+
return { ok: false, text: `project_agent team: "${name}" is not read-only; pass worktrees=true to isolate writers` };
|
|
97
|
+
}
|
|
98
|
+
definitions.push(definition);
|
|
99
|
+
}
|
|
100
|
+
if (input?.worktrees === true) {
|
|
101
|
+
const results = [];
|
|
102
|
+
for (const definition of definitions) {
|
|
103
|
+
let worktree = null;
|
|
104
|
+
try {
|
|
105
|
+
worktree = createWorktree({ cwd: project.root, slug: `${safeSlug(definition.name)}-${Date.now().toString(36).slice(-5)}` });
|
|
106
|
+
const result = await runProjectAgent(ctx, exec, definition, task, { background: true, worktree, cwd: worktree.path });
|
|
107
|
+
results.push({ name: definition.name, ok: !result.error, id: result.id, error: result.error ?? "", worktree });
|
|
108
|
+
} catch (error) {
|
|
109
|
+
results.push({ name: definition.name, ok: false, id: null, error: error instanceof Error ? error.message : String(error), worktree });
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
const text = results.map((result) => `${result.ok ? "✓" : "✗"} ${result.name}${result.id ? ` · ${result.id}` : ""}${result.worktree ? ` · ${result.worktree.branch}` : ""}${result.error ? ` — ${result.error}` : ""}`).join("\n");
|
|
113
|
+
return { ok: results.every((result) => result.ok), text: `project_agent team (isolated worktrees):\n${text}`, runs: results };
|
|
114
|
+
}
|
|
115
|
+
const results = await runProjectTeam(ctx, exec, definitions, task);
|
|
116
|
+
const text = results.map((result) => `${result.ok ? "✓" : "✗"} ${result.name}${result.id ? ` · ${result.id}` : ""}${result.error ? ` — ${result.error}` : ""}`).join("\n");
|
|
117
|
+
return { ok: results.every((result) => result.ok), text: `project_agent team:\n${text}`, runs: results };
|
|
118
|
+
}
|
|
119
|
+
const name = String(input?.name ?? "").trim();
|
|
120
|
+
if (!name) return { ok: false, text: "project_agent: name is required for run" };
|
|
87
121
|
const definition = agents.find((agent) => agent.name === name);
|
|
88
122
|
if (!definition) return { ok: false, text: `project_agent: unknown agent "${name}"` };
|
|
89
123
|
let worktree = null;
|
|
@@ -29,8 +29,7 @@ function remember(record, activation, projectRoot, signal, onAbort) {
|
|
|
29
29
|
background.set(record.id, { record, activation, projectRoot, signal, onAbort });
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
export async function runProjectAgent(ctx, exec, definition, task, options = {}) {
|
|
33
|
-
const subagents = ctx.get("subagents");
|
|
32
|
+
export async function runProjectAgent(ctx, exec, definition, task, options = {}) { const subagents = ctx.get("subagents");
|
|
34
33
|
if (!subagents || typeof subagents.startActivation !== "function") {
|
|
35
34
|
throw new Error("subagents service is unavailable");
|
|
36
35
|
}
|
|
@@ -160,8 +159,25 @@ export async function runProjectAgent(ctx, exec, definition, task, options = {})
|
|
|
160
159
|
}
|
|
161
160
|
}
|
|
162
161
|
|
|
163
|
-
|
|
164
|
-
|
|
162
|
+
/**
|
|
163
|
+
* Start a read-only team. Each member gets the same task and its own child
|
|
164
|
+
* context; no member can write, so sharing the project cwd is safe. This is
|
|
165
|
+
* parallel analysis, not inter-agent messaging.
|
|
166
|
+
*/
|
|
167
|
+
export async function runProjectTeam(ctx, exec, definitions, task, options = {}) {
|
|
168
|
+
const runs = [];
|
|
169
|
+
for (const definition of definitions) {
|
|
170
|
+
try {
|
|
171
|
+
const result = await runProjectAgent(ctx, exec, definition, task, { ...options, background: true });
|
|
172
|
+
runs.push({ name: definition.name, ok: !result.error, id: result.id, text: result.text, error: result.error ?? "" });
|
|
173
|
+
} catch (error) {
|
|
174
|
+
runs.push({ name: definition.name, ok: false, id: null, text: "", error: error instanceof Error ? error.message : String(error) });
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
return runs;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export function listRuns(projectRoot) { const persisted = loadRuns(projectRoot);
|
|
165
181
|
return persisted.map((run) => {
|
|
166
182
|
const live = background.get(run.id);
|
|
167
183
|
return {
|
|
Binary file
|
|
Binary file
|