@goodandready/dsh-moa 0.2.0 → 0.2.2
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/README.md +146 -76
- package/docs/README.ru.md +190 -0
- package/docs/README.zh.md +190 -0
- package/docs/design/DESIGN.md +64 -0
- package/package.json +2 -3
- package/README.ru.md +0 -83
package/README.md
CHANGED
|
@@ -1,120 +1,190 @@
|
|
|
1
|
-
# @goodandready/dsh-moa
|
|
1
|
+
# 📦 @goodandready/dsh-moa
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<div align="center">
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
<h3>Mixture of Agents (MoA) Multi-Model Collaboration & Synthesis Engine for DeepSeek Harness</h3>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
<a href="https://www.npmjs.com/package/@goodandready/dsh-moa"><img src="https://img.shields.io/npm/v/@goodandready/dsh-moa.svg?style=for-the-badge&color=6366f1&labelColor=1e1b4b" alt="npm version"></a>
|
|
9
|
+
<a href="LICENSE"><img src="https://img.shields.io/github/license/GooDAnDReaDY/dsh-moa.svg?style=for-the-badge&color=10b981&labelColor=064e3b" alt="license"></a>
|
|
10
|
+
<a href="https://github.com/topics/dsh-plugin"><img src="https://img.shields.io/badge/DSH-Plugin-8b5cf6.svg?style=for-the-badge&labelColor=2e1065" alt="DSH Plugin"></a>
|
|
11
|
+
<a href="https://nodejs.org"><img src="https://img.shields.io/badge/Node-20%2B-f59e0b.svg?style=for-the-badge&labelColor=451a03" alt="Node version"></a>
|
|
12
|
+
</p>
|
|
6
13
|
|
|
7
|
-
|
|
14
|
+
<p align="center">
|
|
15
|
+
<a href="https://goodandready.app/"><img src="https://img.shields.io/badge/All_Author_Projects-goodandready.app-ff4500.svg?style=for-the-badge&logo=rocket&logoColor=white&labelColor=1a1a2e" alt="GoodAndReady Showcase"></a>
|
|
16
|
+
</p>
|
|
8
17
|
|
|
9
|
-
|
|
18
|
+
<p align="center">
|
|
19
|
+
<a href="README.md"><b>🇬🇧 English</b></a> •
|
|
20
|
+
<a href="docs/README.ru.md"><b>🇷🇺 Русский</b></a> •
|
|
21
|
+
<a href="docs/README.zh.md"><b>🇨🇳 中文说明</b></a>
|
|
22
|
+
</p>
|
|
10
23
|
|
|
11
|
-
|
|
12
|
-
1. **Interactive Requirement Refinement (Adaptive):** For broad or underspecified prompts (e.g. `/moa build a calculator`), advisor models formulate clarifying options and the judge synthesizes a structured 2-4 question questionnaire before generating code.
|
|
13
|
-
2. **Candidate Proposers (Advisors) & File Isolation:** Multiple independent models query the prompt concurrently to produce diverse, creative, and distinct solutions. Each candidate's generated files are isolated under `.moa/candidate-N/`.
|
|
14
|
-
3. **Aggregator (Judge / Synthesizer) & Promotion:** A frontier reasoning model critically compares all candidate solutions, chooses the best implementation via a machine marker (`WINNER_CANDIDATE_INDEX: N`), and promotes the winner's files directly into the project root directory while cleaning up temporary sandboxes.
|
|
15
|
-
4. **Live Canvas Integration:** If web files (HTML, JSX, etc.) are generated, `dsh-moa` automatically notifies `dsh-live-canvas` via its REST API, enabling instant 1-click visual previewing.
|
|
16
|
-
5. **Token-Efficient Code Summarization:** Chat responses present clean architectural summaries, file listings, and interactive links without dumping thousands of lines of raw code into the chat history.
|
|
17
|
-
6. **One-Shot Session Model Restoration:** The slash command operates strictly as a one-shot turn modifier. As soon as the synthesis completes (even on errors), the session automatically and cleanly reverts to the user's primary working model.
|
|
24
|
+
</div>
|
|
18
25
|
|
|
19
26
|
---
|
|
20
27
|
|
|
21
|
-
##
|
|
28
|
+
## ⚡ Overview & The Problem
|
|
22
29
|
|
|
23
|
-
-
|
|
24
|
-
- **Adaptive Questionnaire Gate:** Detects broad requests and interactively asks clarifying questions with recommended answers.
|
|
25
|
-
- **Parallel Fan-out with Live Heartbeats:** Fast concurrent model evaluation with real-time progress indicators (`⏳ [Ns] Processing...`, per-model completion badges).
|
|
26
|
-
- **Disk-Level Workspace Isolation:** Candidates create real files on disk in temporary workspaces; the judge picks the winning candidate and promotes files to the workspace.
|
|
27
|
-
- **Live Canvas 1-Click Integration:** Automatically creates sandbox sessions in `@goodandready/dsh-live-canvas` for generated web applications.
|
|
28
|
-
- **Token-Saving Chat Output:** Strips voluminous raw code dumps in chat messages in favor of compact file listings and markdown summaries.
|
|
29
|
-
- **Advisory Context Isolation:** Tool dumps and bulky system prompts are stripped from candidate advisor context, preventing prompt bloat and "missing tools" refusals.
|
|
30
|
-
- **DSH Native Settings Card:** Collapsible plugin card under `Settings → Plugins → Mixture of Agents` built using native `--dsw-alias-*` theme tokens.
|
|
31
|
-
- **Named Presets:** Configure custom MoA presets such as `default`, `code-review`, or `deep-reasoning`.
|
|
30
|
+
Single-model AI generation often suffers from blind spots, single-perspective biases, hallucinated architectural choices, and inconsistent code quality on challenging engineering tasks. When prompted with ambiguous or complex specifications, a single model may make premature assumptions and produce monolithic, unvetted implementations.
|
|
32
31
|
|
|
33
|
-
|
|
32
|
+
**`@goodandready/dsh-moa`** brings the **Mixture of Agents (MoA)** architecture natively to DeepSeek Harness via the `/moa` slash command:
|
|
34
33
|
|
|
35
|
-
|
|
34
|
+
1. **Adaptive Clarification Questionnaire**: For broad or underspecified prompts, advisor models formulate clarifying options and the judge synthesizes a structured 2–4 question questionnaire before generating code.
|
|
35
|
+
2. **Parallel Proposers Fan-Out & Workspace Isolation**: Multiple independent models evaluate the prompt concurrently. Each candidate's proposed files are written to isolated disk sandboxes (`.moa/candidate-N/`), avoiding cross-pollution.
|
|
36
|
+
3. **Frontier Judge Evaluation & File Promotion**: A flagship reasoning model critically benchmarks all proposals, selects the winning candidate via machine markers (`WINNER_CANDIDATE_INDEX: N`), and promotes the winner's files directly into the project root directory.
|
|
37
|
+
4. **Instant Live Canvas Previewing**: When web applications or UI components are generated, `dsh-moa` integrates seamlessly with `@goodandready/dsh-live-canvas`, automatically spawning sandboxes for 1-click browser previewing.
|
|
38
|
+
5. **Token-Saving Chat Summarization**: Replaces massive code dumps in chat bubbles with compact file listings and clean architectural summaries.
|
|
39
|
+
6. **One-Shot Session Model Restoration**: Executes cleanly as a one-shot turn modifier, automatically reverting back to the user's primary session model immediately after completion.
|
|
36
40
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
Type `/moa` in the DeepSeek Harness chat input:
|
|
41
|
+
---
|
|
40
42
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
+
## 🏗️ Architecture
|
|
44
|
+
|
|
45
|
+
```mermaid
|
|
46
|
+
graph TD
|
|
47
|
+
subgraph Input ["User Interaction (Chat Composer)"]
|
|
48
|
+
Cmd["Slash Command: /moa [preset] <prompt>"]
|
|
49
|
+
Gate{"Ambiguity Check & Questionnaire"}
|
|
50
|
+
QModal["Interactive Clarifying Questions<br/>(Options & Write-in responses)"]
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
subgraph Proposers ["Parallel Proposer Layer (Advisors)"]
|
|
54
|
+
P1["Proposer Model 1<br/>(Creative Approach)"]
|
|
55
|
+
P2["Proposer Model 2<br/>(Alternative Design)"]
|
|
56
|
+
P3["Proposer Model 3<br/>(Performant Strategy)"]
|
|
57
|
+
WS1[".moa/candidate-1/<br/>(Isolated Files)"]
|
|
58
|
+
WS2[".moa/candidate-2/<br/>(Isolated Files)"]
|
|
59
|
+
WS3[".moa/candidate-3/<br/>(Isolated Files)"]
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
subgraph Judge ["Synthesis & Promotion Layer"]
|
|
63
|
+
Aggregator["Frontier Judge Model<br/>(Cross-Evaluation & Code Critique)"]
|
|
64
|
+
WinnerMarker{"WINNER_CANDIDATE_INDEX"}
|
|
65
|
+
Promote["Promote Winner Files<br/>(Move to project root & cleanup sandboxes)"]
|
|
66
|
+
LiveCanvas["Live Canvas Integration<br/>(Auto-open Web UI sandbox)"]
|
|
67
|
+
Summary["Token-Saving Summary<br/>(File overview & architecture highlights)"]
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
Cmd --> Gate
|
|
71
|
+
Gate -->|Broad/Underspecified| QModal
|
|
72
|
+
QModal -->|User Answers| P1 & P2 & P3
|
|
73
|
+
Gate -->|Explicit/Detailed| P1 & P2 & P3
|
|
74
|
+
P1 --> WS1
|
|
75
|
+
P2 --> WS2
|
|
76
|
+
P3 --> WS3
|
|
77
|
+
WS1 & WS2 & WS3 --> Aggregator
|
|
78
|
+
Aggregator --> WinnerMarker
|
|
79
|
+
WinnerMarker --> Promote
|
|
80
|
+
Promote --> LiveCanvas
|
|
81
|
+
Promote --> Summary
|
|
43
82
|
```
|
|
44
83
|
|
|
45
|
-
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## ✨ Features & Capabilities
|
|
87
|
+
|
|
88
|
+
### 1. Slash Command (`/moa`) & Autocompletion
|
|
89
|
+
Integrated directly into the DeepSeek Harness composer via client input triggers. Typing `/moa` shows presets and instant autocompletion:
|
|
46
90
|
|
|
47
91
|
```text
|
|
48
|
-
/moa
|
|
92
|
+
/moa build a real-time reactive dashboard with charts and websocket updates
|
|
49
93
|
```
|
|
50
94
|
|
|
51
|
-
|
|
95
|
+
Or target a specific named preset:
|
|
52
96
|
|
|
53
97
|
```text
|
|
54
|
-
/moa
|
|
98
|
+
/moa:code-review audit the auth middleware and security boundaries
|
|
55
99
|
```
|
|
56
100
|
|
|
57
|
-
|
|
101
|
+
### 2. Adaptive Questionnaire Gate
|
|
102
|
+
When prompts are open-ended or lack architectural specifications (e.g. *"build a calculator app"*), advisor models detect ambiguities and formulate focused clarifying questions (e.g., UI style, persistence backend, framework choice) before generating code.
|
|
58
103
|
|
|
59
|
-
|
|
104
|
+
### 3. Parallel Fan-Out with Live Heartbeats
|
|
105
|
+
* Proposers query concurrently with live heartbeat progress badges (`⏳ [3s] Processing...`, per-model completion status).
|
|
106
|
+
* Bulky system prompts and tool schemas are cleanly stripped from advisor contexts, eliminating "missing tools" refusals and token bloat.
|
|
60
107
|
|
|
61
|
-
|
|
108
|
+
### 4. Disk-Level Candidate Isolation & Promotion
|
|
109
|
+
Unlike standard chat-only MoA, `dsh-moa` isolates file generation onto the filesystem:
|
|
110
|
+
* Each proposer generates files into `.moa/candidate-1/`, `.moa/candidate-2/`, etc.
|
|
111
|
+
* The Judge compares implementations and selects the optimal solution with `WINNER_CANDIDATE_INDEX: N`.
|
|
112
|
+
* The winner's files are promoted to the workspace root, and temporary candidate directories are pruned automatically.
|
|
62
113
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
114
|
+
### 5. Live Canvas 1-Click Preview
|
|
115
|
+
If web files (`index.html`, React/JSX components, Vue, CSS) are generated, `dsh-moa` communicates with `@goodandready/dsh-live-canvas` via its REST endpoint to instantiate a live preview container with 1-click instant access.
|
|
116
|
+
|
|
117
|
+
### 6. Native Settings Card & Presets
|
|
118
|
+
Configure your models in `Settings → Plugins → Mixture of Agents`:
|
|
119
|
+
* Set custom Proposer models (e.g., fast generative models for diverse ideas).
|
|
120
|
+
* Set the Aggregator / Judge model (e.g., deep reasoning models for rigorous critique).
|
|
121
|
+
* Configure named presets (`default`, `code-review`, `deep-reasoning`).
|
|
71
122
|
|
|
72
123
|
---
|
|
73
124
|
|
|
74
|
-
##
|
|
125
|
+
## 📦 Installation
|
|
126
|
+
|
|
127
|
+
Install into your DeepSeek Harness web profile:
|
|
75
128
|
|
|
129
|
+
```bash
|
|
130
|
+
dsh plugin --profile web add @goodandready/dsh-moa
|
|
76
131
|
```
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
132
|
+
|
|
133
|
+
Restart your DeepSeek Harness instance and refresh the browser.
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## ⚙️ Configuration (`settings.yaml`)
|
|
138
|
+
|
|
139
|
+
Configure presets and model pipelines in `settings.yaml` or through the Web UI Settings panel:
|
|
140
|
+
|
|
141
|
+
```yaml
|
|
142
|
+
# settings.yaml
|
|
143
|
+
dsh-moa:
|
|
144
|
+
defaultPreset: "default"
|
|
145
|
+
presets:
|
|
146
|
+
default:
|
|
147
|
+
references:
|
|
148
|
+
- provider: "your-fast-provider"
|
|
149
|
+
model: "your-creative-model"
|
|
150
|
+
- provider: "your-fast-provider"
|
|
151
|
+
model: "your-balanced-model"
|
|
152
|
+
aggregator:
|
|
153
|
+
provider: "your-reasoning-provider"
|
|
154
|
+
model: "your-judge-model"
|
|
155
|
+
code-review:
|
|
156
|
+
references:
|
|
157
|
+
- provider: "your-fast-provider"
|
|
158
|
+
model: "your-security-model"
|
|
159
|
+
- provider: "your-fast-provider"
|
|
160
|
+
model: "your-performance-model"
|
|
161
|
+
aggregator:
|
|
162
|
+
provider: "your-reasoning-provider"
|
|
163
|
+
model: "your-judge-model"
|
|
104
164
|
```
|
|
105
165
|
|
|
166
|
+
### Configuration Parameters
|
|
167
|
+
|
|
168
|
+
| Parameter | Type | Default | Description |
|
|
169
|
+
|:---|:---|:---|:---|
|
|
170
|
+
| `defaultPreset` | `string` | `"default"` | Default preset invoked when typing `/moa <prompt>` |
|
|
171
|
+
| `presets.<name>.references` | `array` | `[...]` | List of proposer models queried concurrently during the proposal phase |
|
|
172
|
+
| `presets.<name>.aggregator` | `object` | `{...}` | Frontier judge model responsible for synthesis, critique, and winner selection |
|
|
173
|
+
| `enableQuestionnaire` | `boolean` | `true` | Enable interactive clarifying questionnaire for underspecified requests |
|
|
174
|
+
| `autoPromoteWinner` | `boolean` | `true` | Automatically promote the judge's selected winner files into the project workspace |
|
|
175
|
+
|
|
106
176
|
---
|
|
107
177
|
|
|
108
|
-
## Testing
|
|
178
|
+
## 🧪 Testing
|
|
109
179
|
|
|
110
|
-
Run
|
|
180
|
+
Run the automated test suite:
|
|
111
181
|
|
|
112
182
|
```bash
|
|
113
|
-
|
|
183
|
+
npm test
|
|
114
184
|
```
|
|
115
185
|
|
|
116
186
|
---
|
|
117
187
|
|
|
118
|
-
## License
|
|
188
|
+
## 📄 License
|
|
119
189
|
|
|
120
190
|
MIT © [GooDAnDReaDY](https://github.com/GooDAnDReaDY)
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
# 📦 @goodandready/dsh-moa
|
|
2
|
+
|
|
3
|
+
<div align="center">
|
|
4
|
+
|
|
5
|
+
<h3>Движок мультимодельного взаимодействия и синтеза Mixture of Agents (MoA) для DeepSeek Harness</h3>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
<a href="https://www.npmjs.com/package/@goodandready/dsh-moa"><img src="https://img.shields.io/npm/v/@goodandready/dsh-moa.svg?style=for-the-badge&color=6366f1&labelColor=1e1b4b" alt="npm version"></a>
|
|
9
|
+
<a href="../LICENSE"><img src="https://img.shields.io/github/license/GooDAnDReaDY/dsh-moa.svg?style=for-the-badge&color=10b981&labelColor=064e3b" alt="license"></a>
|
|
10
|
+
<a href="https://github.com/topics/dsh-plugin"><img src="https://img.shields.io/badge/DSH-Plugin-8b5cf6.svg?style=for-the-badge&labelColor=2e1065" alt="DSH Plugin"></a>
|
|
11
|
+
<a href="https://nodejs.org"><img src="https://img.shields.io/badge/Node-20%2B-f59e0b.svg?style=for-the-badge&labelColor=451a03" alt="Node version"></a>
|
|
12
|
+
</p>
|
|
13
|
+
|
|
14
|
+
<p align="center">
|
|
15
|
+
<a href="https://goodandready.app/"><img src="https://img.shields.io/badge/Все_Проекты_Автора-goodandready.app-ff4500.svg?style=for-the-badge&logo=rocket&logoColor=white&labelColor=1a1a2e" alt="Витрина GoodAndReady"></a>
|
|
16
|
+
</p>
|
|
17
|
+
|
|
18
|
+
<p align="center">
|
|
19
|
+
<a href="../README.md"><b>🇬🇧 English</b></a> •
|
|
20
|
+
<a href="README.ru.md"><b>🇷🇺 Русский</b></a> •
|
|
21
|
+
<a href="README.zh.md"><b>🇨🇳 中文说明</b></a>
|
|
22
|
+
</p>
|
|
23
|
+
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## ⚡ Обзор и решаемая проблема
|
|
29
|
+
|
|
30
|
+
Генерация кода и архитектурных решений силами одной модели часто страдает от слепых зон, предвзятости одного подхода, галлюцинаций в структуре проекта и нестабильного качества на сложных инженерных задачах. При работе с неоднозначными требованиями одиночная модель нередко делает поспешные предположения и выдает монолитный, непроверенный результат.
|
|
31
|
+
|
|
32
|
+
**`@goodandready/dsh-moa`** интегрирует архитектуру **Mixture of Agents (MoA)** прямо в DeepSeek Harness через слеш-команду `/moa`:
|
|
33
|
+
|
|
34
|
+
1. **Адаптивный опросник для уточнения требований**: Если запрос пользователя сформулирован слишком широко или не содержит ключевых деталей, модели-советники формируют уточняющие варианты, а модель-судья синтезирует структурированный интерактивный опросник (2–4 вопроса) до начала генерации кода.
|
|
35
|
+
2. **Параллельный опрос моделей (Proposers) и изоляция на диске**: Несколько независимых моделей анализируют задачу одновременно. Файлы каждого кандидата сохраняются в изолированные директории (`.moa/candidate-N/`), исключая конфликты.
|
|
36
|
+
3. **Оценка флагманским судьей (Judge) и автоматический промоушн файлов**: Модель глубоких рассуждений проводит критический сравнительный анализ всех предложенных решений, выбирает победителя с помощью машинного маркера (`WINNER_CANDIDATE_INDEX: N`) и переносит готовые файлы победителя напрямую в корень проекта.
|
|
37
|
+
4. **Мгновенный предпросмотр через Live Canvas**: При создании веб-приложений и UI-компонентов `dsh-moa` бесшовно интегрируется с `@goodandready/dsh-live-canvas`, автоматически инициализируя контейнер для предпросмотра в браузере в 1 клик.
|
|
38
|
+
5. **Экономия токенов в чате**: Вместо вывода огромных листингов кода в чат формируется компактный отчет с перечнем созданных файлов и архитектурным резюме.
|
|
39
|
+
6. **Одноразовый модификатор сессии**: Команда выполняется в рамках одного такта и автоматически возвращает исходную модель сессии пользователя сразу после завершения.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## 🏗️ Архитектура
|
|
44
|
+
|
|
45
|
+
```mermaid
|
|
46
|
+
graph TD
|
|
47
|
+
subgraph Input ["Взаимодействие с пользователем (Композер чата)"]
|
|
48
|
+
Cmd["Слеш-команда: /moa [preset] <запрос>"]
|
|
49
|
+
Gate{"Проверка неоднозначности"}
|
|
50
|
+
QModal["Интерактивные уточняющие вопросы<br/>(Выбор вариантов и текстовые ответы)"]
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
subgraph Proposers ["Слой параллельных советников (Proposers)"]
|
|
54
|
+
P1["Модель 1<br/>(Креативный подход)"]
|
|
55
|
+
P2["Модель 2<br/>(Альтернативный дизайн)"]
|
|
56
|
+
P3["Модель 3<br/>(Производительная стратегия)"]
|
|
57
|
+
WS1[".moa/candidate-1/<br/>(Изолированные файлы)"]
|
|
58
|
+
WS2[".moa/candidate-2/<br/>(Изолированные файлы)"]
|
|
59
|
+
WS3[".moa/candidate-3/<br/>(Изолированные файлы)"]
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
subgraph Judge ["Слой синтеза и промоушна (Judge)"]
|
|
63
|
+
Aggregator["Флагманская модель-судья<br/>(Сравнительный анализ и аудит кода)"]
|
|
64
|
+
WinnerMarker{"WINNER_CANDIDATE_INDEX"}
|
|
65
|
+
Promote["Промоушн файлов победителя<br/>(Перенос в корень и очистка песочниц)"]
|
|
66
|
+
LiveCanvas["Интеграция с Live Canvas<br/>(Автозапуск веб-песочницы)"]
|
|
67
|
+
Summary["Компактный отчет<br/>(Обзор файлов и архитектурное резюме)"]
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
Cmd --> Gate
|
|
71
|
+
Gate -->|Широкий/Неточный запрос| QModal
|
|
72
|
+
QModal -->|Ответы пользователя| P1 & P2 & P3
|
|
73
|
+
Gate -->|Точный/Детальный запрос| P1 & P2 & P3
|
|
74
|
+
P1 --> WS1
|
|
75
|
+
P2 --> WS2
|
|
76
|
+
P3 --> WS3
|
|
77
|
+
WS1 & WS2 & WS3 --> Aggregator
|
|
78
|
+
Aggregator --> WinnerMarker
|
|
79
|
+
WinnerMarker --> Promote
|
|
80
|
+
Promote --> LiveCanvas
|
|
81
|
+
Promote --> Summary
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## ✨ Возможности и функциональность
|
|
87
|
+
|
|
88
|
+
### 1. Слеш-команда (`/moa`) и автодополнение
|
|
89
|
+
Плагин интегрируется напрямую в композер DeepSeek Harness. Ввод `/moa` открывает всплывающее меню с готовыми пресетами и автодополнением:
|
|
90
|
+
|
|
91
|
+
```text
|
|
92
|
+
/moa разработай реактивный дашборд с графиками и обновлениями по websocket
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Или вызов именованного пресета:
|
|
96
|
+
|
|
97
|
+
```text
|
|
98
|
+
/moa:code-review проведи аудит middleware авторизации и границ безопасности
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### 2. Адаптивный гейт уточнения требований
|
|
102
|
+
Когда запрос сформулирован слишком обобщенно (например, *"сделай калькулятор"*), советники определяют недостающие архитектурные требования и формулируют целевые вопросы (стиль интерфейса, сохранение состояния, стек технологий) до генерации кода.
|
|
103
|
+
|
|
104
|
+
### 3. Параллельный запуск с живыми пульсами прогресса
|
|
105
|
+
* Советники опрашиваются параллельно со статусами выполнения в реальном времени (`⏳ [3s] Processing...`, индивидуальный прогресс каждой модели).
|
|
106
|
+
* Из контекстов советников удаляются громоздкие системные промпты и схемы инструментов, что предотвращает ошибки отказа из-за отсутствия инструментов и экономит контекст.
|
|
107
|
+
|
|
108
|
+
### 4. Файловая изоляция кандидатов и промоушн
|
|
109
|
+
В отличие от обычных чатовых реализаций MoA, `dsh-moa` работает с реальной файловой системой:
|
|
110
|
+
* Каждый советник генерирует файлы в изолированные папки `.moa/candidate-1/`, `.moa/candidate-2/` и т.д.
|
|
111
|
+
* Судья сопоставляет реализации и выбирает лучшую через маркер `WINNER_CANDIDATE_INDEX: N`.
|
|
112
|
+
* Файлы победителя автоматически переносятся в корень рабочей области, а временные папки удаляются.
|
|
113
|
+
|
|
114
|
+
### 5. Интеграция с Live Canvas (1-клик предпросмотр)
|
|
115
|
+
При создании веб-файлов (`index.html`, компоненты React/JSX, Vue, стили CSS) плагин отправляет запрос в `@goodandready/dsh-live-canvas` для мгновенного развертывания интерактивного предпросмотра.
|
|
116
|
+
|
|
117
|
+
### 6. Нативная карточка настроек и пресеты
|
|
118
|
+
Настройка моделей в меню `Настройки → Плагины → Mixture of Agents`:
|
|
119
|
+
* Выбор моделей-советников (быстрые генеративные модели для разнообразия идей).
|
|
120
|
+
* Выбор модели-судьи (модель глубоких рассуждений для строгого аудита).
|
|
121
|
+
* Конфигурация именованных пресетов (`default`, `code-review`, `deep-reasoning`).
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## 📦 Установка
|
|
126
|
+
|
|
127
|
+
Установка в веб-профиль DeepSeek Harness:
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
dsh plugin --profile web add @goodandready/dsh-moa
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Перезапустите экземпляр DeepSeek Harness и обновите вкладку в браузере.
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## ⚙️ Конфигурация (`settings.yaml`)
|
|
138
|
+
|
|
139
|
+
Настройка пресетов и пайплайнов моделей доступна в `settings.yaml` или через графический интерфейс настроек:
|
|
140
|
+
|
|
141
|
+
```yaml
|
|
142
|
+
# settings.yaml
|
|
143
|
+
dsh-moa:
|
|
144
|
+
defaultPreset: "default"
|
|
145
|
+
presets:
|
|
146
|
+
default:
|
|
147
|
+
references:
|
|
148
|
+
- provider: "your-fast-provider"
|
|
149
|
+
model: "your-creative-model"
|
|
150
|
+
- provider: "your-fast-provider"
|
|
151
|
+
model: "your-balanced-model"
|
|
152
|
+
aggregator:
|
|
153
|
+
provider: "your-reasoning-provider"
|
|
154
|
+
model: "your-judge-model"
|
|
155
|
+
code-review:
|
|
156
|
+
references:
|
|
157
|
+
- provider: "your-fast-provider"
|
|
158
|
+
model: "your-security-model"
|
|
159
|
+
- provider: "your-fast-provider"
|
|
160
|
+
model: "your-performance-model"
|
|
161
|
+
aggregator:
|
|
162
|
+
provider: "your-reasoning-provider"
|
|
163
|
+
model: "your-judge-model"
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
### Параметры конфигурации
|
|
167
|
+
|
|
168
|
+
| Параметр | Тип | По умолчанию | Описание |
|
|
169
|
+
|:---|:---|:---|:---|
|
|
170
|
+
| `defaultPreset` | `string` | `"default"` | Пресет по умолчанию, вызываемый командой `/moa <запрос>` |
|
|
171
|
+
| `presets.<name>.references` | `array` | `[...]` | Список моделей-советников, опрашиваемых параллельно |
|
|
172
|
+
| `presets.<name>.aggregator` | `object` | `{...}` | Модель-судья, отвечающая за синтез, критику и выбор победителя |
|
|
173
|
+
| `enableQuestionnaire` | `boolean` | `true` | Включение интерактивного опросника при неоднозначных запросах |
|
|
174
|
+
| `autoPromoteWinner` | `boolean` | `true` | Автоматический перенос файлов выбранного победителя в корень проекта |
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## 🧪 Тестирование
|
|
179
|
+
|
|
180
|
+
Запуск автоматического набора тестов:
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
npm test
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## 📄 Лицензия
|
|
189
|
+
|
|
190
|
+
MIT © [GooDAnDReaDY](https://github.com/GooDAnDReaDY)
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
# 📦 @goodandready/dsh-moa
|
|
2
|
+
|
|
3
|
+
<div align="center">
|
|
4
|
+
|
|
5
|
+
<h3>面向 DeepSeek Harness 的 Mixture of Agents (MoA) 多模型协作与代码综合引擎</h3>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
<a href="https://www.npmjs.com/package/@goodandready/dsh-moa"><img src="https://img.shields.io/npm/v/@goodandready/dsh-moa.svg?style=for-the-badge&color=6366f1&labelColor=1e1b4b" alt="npm version"></a>
|
|
9
|
+
<a href="../LICENSE"><img src="https://img.shields.io/github/license/GooDAnDReaDY/dsh-moa.svg?style=for-the-badge&color=10b981&labelColor=064e3b" alt="license"></a>
|
|
10
|
+
<a href="https://github.com/topics/dsh-plugin"><img src="https://img.shields.io/badge/DSH-Plugin-8b5cf6.svg?style=for-the-badge&labelColor=2e1065" alt="DSH Plugin"></a>
|
|
11
|
+
<a href="https://nodejs.org"><img src="https://img.shields.io/badge/Node-20%2B-f59e0b.svg?style=for-the-badge&labelColor=451a03" alt="Node version"></a>
|
|
12
|
+
</p>
|
|
13
|
+
|
|
14
|
+
<p align="center">
|
|
15
|
+
<a href="https://goodandready.app/"><img src="https://img.shields.io/badge/作者所有项目-goodandready.app-ff4500.svg?style=for-the-badge&logo=rocket&logoColor=white&labelColor=1a1a2e" alt="GoodAndReady 作品展"></a>
|
|
16
|
+
</p>
|
|
17
|
+
|
|
18
|
+
<p align="center">
|
|
19
|
+
<a href="../README.md"><b>🇬🇧 English</b></a> •
|
|
20
|
+
<a href="README.ru.md"><b>🇷🇺 Русский</b></a> •
|
|
21
|
+
<a href="README.zh.md"><b>🇨🇳 中文说明</b></a>
|
|
22
|
+
</p>
|
|
23
|
+
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## ⚡ 概述与解决的核心痛点
|
|
29
|
+
|
|
30
|
+
在面对复杂的软件工程任务时,单一模型生成往往容易受到视角盲区、架构幻觉以及生成质量不稳定的限制。当用户输入模糊或缺乏技术细节的提示词时,单一模型容易做出主观假设,生成未经充分验证的单体代码。
|
|
31
|
+
|
|
32
|
+
**`@goodandready/dsh-moa`** 通过 `/moa` 斜杠命令将 **Mixture of Agents (MoA)** 混合智能体架构原生引入 DeepSeek Harness:
|
|
33
|
+
|
|
34
|
+
1. **自适应澄清问卷 (Questionnaire Gate)**:针对宽泛或不明确的提示词,顾问模型(Proposers)自动提炼关键分歧点,裁判模型(Judge)在生成代码前合成结构化的 2–4 题交互式问卷。
|
|
35
|
+
2. **多模型并行生成与工作区沙箱隔离**:多个独立模型并行分析任务。每个候选方案的文件生成均写入独立的磁盘沙箱 (`.moa/candidate-N/`),彻底避免跨模型文件污染。
|
|
36
|
+
3. **旗舰裁判模型评估与文件自动提升 (Promotion)**:深度推理模型对所有候选方案进行交叉评审,通过机器标记 (`WINNER_CANDIDATE_INDEX: N`) 评选胜出方案,并将胜出者的完整文件自动同步到项目根目录。
|
|
37
|
+
4. **Live Canvas 即时一键预览**:当生成 Web 应用或 UI 组件时,`dsh-moa` 与 `@goodandready/dsh-live-canvas` 深度联动,自动创建沙箱容器,支持在浏览器中 1 键即时运行与交互。
|
|
38
|
+
5. **极简对话摘要与 Token 节省**:对话界面不输出冗长的原始代码块,而是生成整洁的文件清单与架构设计摘要。
|
|
39
|
+
6. **单轮会话即时恢复**:作为一次性会话修改器运行,任务完成后自动恢复用户原本的会话主力模型。
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## 🏗️ 架构图
|
|
44
|
+
|
|
45
|
+
```mermaid
|
|
46
|
+
graph TD
|
|
47
|
+
subgraph Input ["用户交互 (聊天输入框)"]
|
|
48
|
+
Cmd["斜杠命令: /moa [preset] <prompt>"]
|
|
49
|
+
Gate{"模糊需求判断"}
|
|
50
|
+
QModal["交互式澄清问卷<br/>(多选选项与自定义输入)"]
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
subgraph Proposers ["并行顾问模型层 (Proposers)"]
|
|
54
|
+
P1["提案模型 1<br/>(创新方案)"]
|
|
55
|
+
P2["提案模型 2<br/>(替代架构)"]
|
|
56
|
+
P3["提案模型 3<br/>(高性能策略)"]
|
|
57
|
+
WS1[".moa/candidate-1/<br/>(隔离文件)"]
|
|
58
|
+
WS2[".moa/candidate-2/<br/>(隔离文件)"]
|
|
59
|
+
WS3[".moa/candidate-3/<br/>(隔离文件)"]
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
subgraph Judge ["综合评估与提升层 (Judge)"]
|
|
63
|
+
Aggregator["旗舰裁判模型<br/>(交叉对比与代码审查)"]
|
|
64
|
+
WinnerMarker{"WINNER_CANDIDATE_INDEX"}
|
|
65
|
+
Promote["提升胜出者文件<br/>(移至根目录并清理沙箱)"]
|
|
66
|
+
LiveCanvas["Live Canvas 联动<br/>(自动启动 Web 预览)"]
|
|
67
|
+
Summary["紧凑型摘要<br/>(文件清单与架构亮点)"]
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
Cmd --> Gate
|
|
71
|
+
Gate -->|需求宽泛/模糊| QModal
|
|
72
|
+
QModal -->|用户确认选项| P1 & P2 & P3
|
|
73
|
+
Gate -->|需求明确/详尽| P1 & P2 & P3
|
|
74
|
+
P1 --> WS1
|
|
75
|
+
P2 --> WS2
|
|
76
|
+
P3 --> WS3
|
|
77
|
+
WS1 & WS2 & WS3 --> Aggregator
|
|
78
|
+
Aggregator --> WinnerMarker
|
|
79
|
+
WinnerMarker --> Promote
|
|
80
|
+
Promote --> LiveCanvas
|
|
81
|
+
Promote --> Summary
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## ✨ 特性与能力
|
|
87
|
+
|
|
88
|
+
### 1. 斜杠命令 (`/moa`) 与实时补全
|
|
89
|
+
深度集成于 DeepSeek Harness 输入框。输入 `/moa` 即可触发预设菜单与自动补全:
|
|
90
|
+
|
|
91
|
+
```text
|
|
92
|
+
/moa 开发一个包含图表与 WebSocket 实时更新的响应式仪表盘
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
或指定命名预设:
|
|
96
|
+
|
|
97
|
+
```text
|
|
98
|
+
/moa:code-review 审查身份验证中间件和安全边界
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### 2. 自适应澄清问卷
|
|
102
|
+
当需求过于抽象(例如 *"制作一个计算器"*)时,系统会在生成代码前主动询问 UI 风格、数据持久化方式或框架偏好。
|
|
103
|
+
|
|
104
|
+
### 3. 并行调用与实时心跳反馈
|
|
105
|
+
* 多个顾问模型并发执行,并伴随实时心跳进度条 (`⏳ [3s] Processing...`,显示各模型独立进度)。
|
|
106
|
+
* 自动清理顾问上下文中的冗余系统提示词与工具定义,消除“缺少工具”的拒绝报错并大幅节约 Token。
|
|
107
|
+
|
|
108
|
+
### 4. 磁盘级沙箱隔离与胜出者提升
|
|
109
|
+
与仅停留在聊天文本层面的 MoA 不同,`dsh-moa` 针对真实工程项目:
|
|
110
|
+
* 各提案模型在 `.moa/candidate-1/`、`.moa/candidate-2/` 等独立目录生成工程代码。
|
|
111
|
+
* 裁判模型对比各版本实现,通过 `WINNER_CANDIDATE_INDEX: N` 指定最优方案。
|
|
112
|
+
* 胜出方案自动提升至项目根目录,临时沙箱随后自动清理。
|
|
113
|
+
|
|
114
|
+
### 5. Live Canvas 1 键即时预览
|
|
115
|
+
若生成了前端文件(`index.html`、React/JSX 组件、Vue、CSS),插件通过 REST API 自动调用 `@goodandready/dsh-live-canvas` 容器,实现免构建一键预览。
|
|
116
|
+
|
|
117
|
+
### 6. 原生设置卡片与预设管理
|
|
118
|
+
在 `设置 → 插件 → Mixture of Agents` 中可视化配置模型:
|
|
119
|
+
* 配置顾问模型列表(快速生成多样化构想)。
|
|
120
|
+
* 配置裁判模型(强推理模型进行严谨审查)。
|
|
121
|
+
* 自定义命名预设 (`default`, `code-review`, `deep-reasoning`)。
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## 📦 安装
|
|
126
|
+
|
|
127
|
+
在 DeepSeek Harness Web 配置文件中安装:
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
dsh plugin --profile web add @goodandready/dsh-moa
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
重启 DeepSeek Harness 实例并刷新浏览器页面。
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## ⚙️ 配置 (`settings.yaml`)
|
|
138
|
+
|
|
139
|
+
可在 `settings.yaml` 中配置预设与模型管道,或通过 Web UI 设置面板进行调整:
|
|
140
|
+
|
|
141
|
+
```yaml
|
|
142
|
+
# settings.yaml
|
|
143
|
+
dsh-moa:
|
|
144
|
+
defaultPreset: "default"
|
|
145
|
+
presets:
|
|
146
|
+
default:
|
|
147
|
+
references:
|
|
148
|
+
- provider: "your-fast-provider"
|
|
149
|
+
model: "your-creative-model"
|
|
150
|
+
- provider: "your-fast-provider"
|
|
151
|
+
model: "your-balanced-model"
|
|
152
|
+
aggregator:
|
|
153
|
+
provider: "your-reasoning-provider"
|
|
154
|
+
model: "your-judge-model"
|
|
155
|
+
code-review:
|
|
156
|
+
references:
|
|
157
|
+
- provider: "your-fast-provider"
|
|
158
|
+
model: "your-security-model"
|
|
159
|
+
- provider: "your-fast-provider"
|
|
160
|
+
model: "your-performance-model"
|
|
161
|
+
aggregator:
|
|
162
|
+
provider: "your-reasoning-provider"
|
|
163
|
+
model: "your-judge-model"
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
### 配置项说明
|
|
167
|
+
|
|
168
|
+
| 参数 | 类型 | 默认值 | 说明 |
|
|
169
|
+
|:---|:---|:---|:---|
|
|
170
|
+
| `defaultPreset` | `string` | `"default"` | 输入 `/moa <prompt>` 时默认调用的预设 |
|
|
171
|
+
| `presets.<name>.references` | `array` | `[...]` | 并行提案阶段并发调用的顾问模型列表 |
|
|
172
|
+
| `presets.<name>.aggregator` | `object` | `{...}` | 负责综合评审、代码审查与裁决胜出者的裁判模型 |
|
|
173
|
+
| `enableQuestionnaire` | `boolean` | `true` | 对模糊需求启用交互式澄清问卷 |
|
|
174
|
+
| `autoPromoteWinner` | `boolean` | `true` | 自动将裁判选中的胜出方案文件提升至项目根目录 |
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## 🧪 测试
|
|
179
|
+
|
|
180
|
+
运行自动化测试套件:
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
npm test
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## 📄 许可证
|
|
189
|
+
|
|
190
|
+
MIT © [GooDAnDReaDY](https://github.com/GooDAnDReaDY)
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# DESIGN.md — dsh-moa
|
|
2
|
+
|
|
3
|
+
## Product / Purpose
|
|
4
|
+
- Назначение: Плагин для DeepSeek Harness, реализующий архитектуру Mixture of Agents (MoA) через команду /moa <prompt>. Позволяет параллельно генерировать варианты решения задачи несколькими моделями-кандидатами (proposers / reference models), после чего ведущая модель-агрегатор (judge / aggregator) оценивает ответы, отбирает лучшее, устраняет ошибки и синтезирует итоговый результат. После завершения команды агент автоматически возвращается к основной модели текущей сессии.
|
|
5
|
+
- Аудитория: Пользователи DeepSeek Harness, решающие сложные инженерные, исследовательские, математические и архитектурные задачи, требующие ансамбля моделей и перекрёстной валидации.
|
|
6
|
+
- Статус: Active Development
|
|
7
|
+
|
|
8
|
+
## User Surfaces
|
|
9
|
+
- Web/UI: Выпадающее меню composer при вводе /moa с подсказкой и описанием; отображение индикации MoA-хода в чате; DSH Settings Card в разделе плагинов.
|
|
10
|
+
- DSH UI / settings / slots: слот settings.plugin.item ядра DSH, ключ dsh-moa. Сворачиваемая карточка настроек пресетов, советников, агрегатора и параметров генерации.
|
|
11
|
+
- API: HTTP endpoints хоста: GET /dsh-moa/status, GET /dsh-moa/presets, PUT /dsh-moa/presets, POST /dsh-moa/run.
|
|
12
|
+
- CLI / Slash Commands: Команда /moa <prompt> и /moa [preset] <prompt> в строке ввода DSH.
|
|
13
|
+
- Документация: docs/design/DESIGN.md, README.md, README.ru.md.
|
|
14
|
+
|
|
15
|
+
## Visual Direction
|
|
16
|
+
- Атмосфера: Строгий нативный UI ядра DeepSeek Harness, гармонично встроенный в существующий интерфейс без визуального шума.
|
|
17
|
+
- Утверждённые референсы и что из них берём: Карточки настроек ядра («Консоль», «Цикл агента», «Поиск в вебе»); слэш-меню ядра DSH.
|
|
18
|
+
- Не копировать: Сторонние UI-библиотеки, неродные шрифты, кастомные акцентные цвета.
|
|
19
|
+
|
|
20
|
+
## Foundations
|
|
21
|
+
- Цвета и роли: Исключительно переменные темы DSH (--dsw-alias-border-l2, --dsw-alias-bg-layer-3, --dsw-alias-label-primary, --dsw-alias-label-secondary, --dsw-alias-label-tertiary).
|
|
22
|
+
- Типографика: Системный стек шрифтов DSH, заголовок карточки 15px/600, пояснения 13px, поля 13px.
|
|
23
|
+
- Сетка, отступы, responsive: Карточка 12px border-radius, шапка padding 14px 16px, поля padding 12px 0.
|
|
24
|
+
- Accessibility: aria-expanded для раскрытия карточки, семантические кнопки, клавиатурный фокус, контрастные лейблы полей.
|
|
25
|
+
|
|
26
|
+
## Components And States
|
|
27
|
+
- Компоненты:
|
|
28
|
+
1. MoASettingsCard — карточка настройки плагина в списке настроек плагинов.
|
|
29
|
+
2. PresetEditor — редактор моделей-советников и агрегатора.
|
|
30
|
+
3. SlashTrigger — интеграция /moa в inputTriggers.
|
|
31
|
+
- Loading / empty / error / success:
|
|
32
|
+
- loading — состояние инициализации настроек и загрузки списка доступных моделей.
|
|
33
|
+
- ready — активная конфигурация с валидным списком моделей.
|
|
34
|
+
- unavailable — хост недоступен или модуль не инициализирован.
|
|
35
|
+
- error — индикация ошибки при валидации или сохранении.
|
|
36
|
+
- Формы, валидация и действия: Валидация наличия хотя бы одного советника и одного агрегатора.
|
|
37
|
+
|
|
38
|
+
## User Flows
|
|
39
|
+
- Критические сценарии:
|
|
40
|
+
1. Пользователь вводит /moa <вопрос> в composer:
|
|
41
|
+
- При вводе / отображается пункт moa в списке слэш-команд.
|
|
42
|
+
- После отправки запускается parallel fan-out на советников.
|
|
43
|
+
- Агрегатор синтезирует результат.
|
|
44
|
+
- Следующее сообщение автоматически выполняется на основной модели сессии.
|
|
45
|
+
2. Пользователь настраивает пресет в «Настройки -> Плагины -> Настройки плагинов -> Mixture of Agents»:
|
|
46
|
+
- Выбор кандидатов из доступных в ctx.llm.
|
|
47
|
+
- Выбор агрегатора.
|
|
48
|
+
- Сохранение настроек без перезапуска сервера.
|
|
49
|
+
|
|
50
|
+
## Do / Don't
|
|
51
|
+
- Do:
|
|
52
|
+
- Использовать нативные переменные DSH --dsw-alias-*.
|
|
53
|
+
- Префикс moa- для всех CSS-классов.
|
|
54
|
+
- Обязательно восстанавливать модель сессии в блоке finally.
|
|
55
|
+
- Стрипать служебные tool-результаты перед отправкой советникам.
|
|
56
|
+
- Don't:
|
|
57
|
+
- Не оставлять модель агрегатора активной после выполнения хода /moa.
|
|
58
|
+
- Не заводить отдельный раздел верхнего уровня в сайдбаре.
|
|
59
|
+
- Не передавать советникам системный промпт агента с инструментами.
|
|
60
|
+
|
|
61
|
+
## Locked Design Decisions
|
|
62
|
+
- 2026-09-03 — Реализация команды /moa как one-shot модификатора сессии с автовозвратом к базовой модели в finally.
|
|
63
|
+
- 2026-09-03 — Использование settings.plugin.item со сворачиваемой карточкой вместо отдельной вкладки настроек.
|
|
64
|
+
- 2026-09-03 — Поддержка именованных пресетов (default, code-review, deep-reasoning).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@goodandready/dsh-moa",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "Mixture of Agents (MoA) plugin for DeepSeek Harness with /moa slash command",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"lib/",
|
|
15
15
|
"cordis.patch.yml",
|
|
16
16
|
"README.md",
|
|
17
|
-
"
|
|
17
|
+
"docs/",
|
|
18
18
|
"LICENSE"
|
|
19
19
|
],
|
|
20
20
|
"scripts": {
|
|
@@ -45,7 +45,6 @@
|
|
|
45
45
|
"platform": "web",
|
|
46
46
|
"inject": [
|
|
47
47
|
"@deepseek-ai/dsh-client-locale",
|
|
48
|
-
"@deepseek-ai/dsh-client-ui-slots",
|
|
49
48
|
"@deepseek-ai/dsh-client-ui-settings",
|
|
50
49
|
"@deepseek-ai/dsh-client-ui-input-trigger"
|
|
51
50
|
]
|
package/README.ru.md
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
# @goodandready/dsh-moa
|
|
2
|
-
|
|
3
|
-
> Плагин **Mixture of Agents (MoA)** для **DeepSeek Harness**, добавляющий слэш-команду `/moa <prompt>`.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Обзор
|
|
8
|
-
|
|
9
|
-
`dsh-moa` реализует архитектуру **Mixture of Agents** в DeepSeek Harness по образцу передовых ансамблевых систем (Hermes Agent, OpenClaw).
|
|
10
|
-
|
|
11
|
-
Вместо отправки сложной инженерной или логической задачи одной модели, `dsh-moa` выполняет гибкий многофазный процесс:
|
|
12
|
-
1. **Интерактивное уточнение требований (Адаптивный опросник):** При широких или неполных запросах (например, `/moa создай калькулятор`) советники формируют варианты реализации, а судья синтезирует компактный опросник из 2–4 вопросов с вариантами ответов до запуска написания кода.
|
|
13
|
-
2. **Модели-кандидаты (Proposers / Advisors) и изолированные воркспейсы:** Несколько независимых моделей параллельно анализируют задачу и генерируют файлы в изолированных песочницах `.moa/candidate-N/`.
|
|
14
|
-
3. **Модель-агрегатор (Judge / Synthesizer) и промоция файлов:** Мощная рассуждающая модель сопоставляет решения кандидатов, определяет победителя машинным маркером (`WINNER_CANDIDATE_INDEX: N`), переносит созданные файлы победителя напрямую в корень проекта и удаляет временные директории.
|
|
15
|
-
4. **Интеграция с Live Canvas:** При создании веб-файлов (`index.html` и др.) плагин автоматически регистрирует их в сервисе `@goodandready/dsh-live-canvas` и предоставляет ссылки для мгновенного запуска предпросмотра в один клик.
|
|
16
|
-
5. **Экономия токенов при выводе в чат:** Большие блоки исходного кода заменяются компактными плашками с описанием файлов, сохраняя контекст чата чистым и лаконичным.
|
|
17
|
-
6. **One-Shot восстановление модели:** Команда `/moa` действует строго на один ход. Сразу после завершения ответа сессия автоматически и гарантированно возвращается к исходной рабочей модели.
|
|
18
|
-
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
## Возможности
|
|
22
|
-
|
|
23
|
-
- **Интеграция слэш-команды (`/moa`):** Автодополнение в поле ввода чата DeepSeek Harness через сервис `inputTriggers`.
|
|
24
|
-
- **Живые индикаторы прогресса (Heartbeats):** Отображение статуса в реальном времени (`⏳ [Ns] Идёт обработка...`, отметки о завершении генерации каждой моделью).
|
|
25
|
-
- **Дисковая изоляция кандидатов:** Реальное создание файлов на диске и перенос лучшего решения в корень проекта.
|
|
26
|
-
- **Интеграция с Live Canvas:** Автоматическое открытие созданных интерфейсов в плагине Live Canvas.
|
|
27
|
-
- **Параллельный опрос (Fan-out):** Конкурентное выполнение запросов с graceful degradation.
|
|
28
|
-
- **Изолированный контекст советников:** Очистка истории от системных промптов агента и дампов инструментов.
|
|
29
|
-
- **Нативная карточка настроек DSH:** Карточка в разделе «Настройки → Плагины → Mixture of Agents», использующая системные токены темы `--dsw-alias-*`.
|
|
30
|
-
- **Именованные пресеты:** Поддержка нескольких конфигураций моделей (`default`, `code-review`, `deep-reasoning`).
|
|
31
|
-
|
|
32
|
-
---
|
|
33
|
-
|
|
34
|
-
## Использование
|
|
35
|
-
|
|
36
|
-
В поле ввода чата DeepSeek Harness:
|
|
37
|
-
|
|
38
|
-
```text
|
|
39
|
-
/moa напиши архитектуру распределённого кэша с защитой от dog-piling
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
Или с указанием конкретного пресета:
|
|
43
|
-
|
|
44
|
-
```text
|
|
45
|
-
/moa deep-reasoning найди скрытые гонки данных в этом алгоритме
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
Создание проекта с реальными файлами:
|
|
49
|
-
|
|
50
|
-
```text
|
|
51
|
-
/moa сделай интерактивный калькулятор на HTML, CSS и JS
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
---
|
|
55
|
-
|
|
56
|
-
## Настройки
|
|
57
|
-
|
|
58
|
-
В разделе **Настройки → Плагины → Mixture of Agents**:
|
|
59
|
-
|
|
60
|
-
| Параметр | Описание | По умолчанию |
|
|
61
|
-
|---|---|---|
|
|
62
|
-
| **Основной пресет** | Имя пресета по умолчанию при вызове `/moa <prompt>` | `default` |
|
|
63
|
-
| **Модели-кандидаты** | Массив `{ provider, model }`, опрашиваемых параллельно | `deepseek:deepseek-chat`, `openai:gpt-4o` |
|
|
64
|
-
| **Ведущая модель (судья)** | Модель-агрегатор, синтезирующая финальный ответ | `anthropic:claude-3-7-sonnet` |
|
|
65
|
-
| **Температура кандидатов** | Степень креативности кандидатов | `0.6` |
|
|
66
|
-
| **Температура судьи** | Степень точности синтезатора | `0.4` |
|
|
67
|
-
| **Максимум токенов** | Лимит длины ответа | `4096` |
|
|
68
|
-
|
|
69
|
-
---
|
|
70
|
-
|
|
71
|
-
## Тестирование
|
|
72
|
-
|
|
73
|
-
Запуск модульных и контрактных тестов:
|
|
74
|
-
|
|
75
|
-
```bash
|
|
76
|
-
node --test test/*.test.mjs
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
---
|
|
80
|
-
|
|
81
|
-
## Лицензия
|
|
82
|
-
|
|
83
|
-
MIT © [GooDAnDReaDY](https://github.com/GooDAnDReaDY)
|