@blackms/aistack 1.2.0 → 1.3.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/README.md +152 -11
- package/dist/agents/definitions/adversarial.d.ts +6 -0
- package/dist/agents/definitions/adversarial.d.ts.map +1 -0
- package/dist/agents/definitions/adversarial.js +34 -0
- package/dist/agents/definitions/adversarial.js.map +1 -0
- package/dist/agents/definitions/index.d.ts +1 -0
- package/dist/agents/definitions/index.d.ts.map +1 -1
- package/dist/agents/definitions/index.js +1 -0
- package/dist/agents/definitions/index.js.map +1 -1
- package/dist/agents/registry.d.ts.map +1 -1
- package/dist/agents/registry.js +2 -1
- package/dist/agents/registry.js.map +1 -1
- package/dist/coordination/index.d.ts +1 -0
- package/dist/coordination/index.d.ts.map +1 -1
- package/dist/coordination/index.js +1 -0
- package/dist/coordination/index.js.map +1 -1
- package/dist/coordination/review-loop.d.ts +85 -0
- package/dist/coordination/review-loop.d.ts.map +1 -0
- package/dist/coordination/review-loop.js +306 -0
- package/dist/coordination/review-loop.js.map +1 -0
- package/dist/mcp/tools/index.d.ts +1 -0
- package/dist/mcp/tools/index.d.ts.map +1 -1
- package/dist/mcp/tools/index.js +1 -0
- package/dist/mcp/tools/index.js.map +1 -1
- package/dist/mcp/tools/review-loop-tools.d.ts +210 -0
- package/dist/mcp/tools/review-loop-tools.d.ts.map +1 -0
- package/dist/mcp/tools/review-loop-tools.js +213 -0
- package/dist/mcp/tools/review-loop-tools.js.map +1 -0
- package/dist/types.d.ts +35 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
### Multi-Agent Orchestration for Claude Code
|
|
6
6
|
|
|
7
|
+
[](https://github.com/blackms/aistack/stargazers)
|
|
7
8
|
[](https://github.com/blackms/aistack/actions/workflows/ci.yml)
|
|
8
9
|
[](https://codecov.io/gh/blackms/aistack)
|
|
9
10
|
[](https://www.npmjs.com/package/@blackms/aistack)
|
|
@@ -12,11 +13,11 @@
|
|
|
12
13
|
|
|
13
14
|
<br/>
|
|
14
15
|
|
|
15
|
-
**Production-ready agent orchestration with persistent memory and
|
|
16
|
+
**Production-ready agent orchestration with persistent memory, MCP integration, and real-time web dashboard.**
|
|
16
17
|
|
|
17
18
|
<br/>
|
|
18
19
|
|
|
19
|
-
[Get Started](#-quick-start) · [Architecture](#-architecture) · [API Reference](#-mcp-tools) · [Documentation](./docs)
|
|
20
|
+
[Get Started](#-quick-start) · [Architecture](#-architecture) · [Web Dashboard](#-web-dashboard) · [API Reference](#-mcp-tools) · [Documentation](./docs)
|
|
20
21
|
|
|
21
22
|
<br/>
|
|
22
23
|
|
|
@@ -29,7 +30,7 @@
|
|
|
29
30
|
Coordinate specialized AI agents through Claude Code with persistent context, hierarchical task management, and seamless extensibility.
|
|
30
31
|
|
|
31
32
|
```
|
|
32
|
-
7 agents · 30 MCP tools ·
|
|
33
|
+
7 agents · 30 MCP tools · 6 LLM providers · SQLite + FTS5 · Web dashboard · Plugin system
|
|
33
34
|
```
|
|
34
35
|
|
|
35
36
|
---
|
|
@@ -48,9 +49,15 @@ Coordinate specialized AI agents through Claude Code with persistent context, hi
|
|
|
48
49
|
</td>
|
|
49
50
|
<td align="center" width="96">
|
|
50
51
|
<img src="https://cdn.simpleicons.org/sqlite/003B57" width="48" height="48" alt="SQLite" />
|
|
51
|
-
<br/>SQLite
|
|
52
|
+
<br/>SQLite + FTS5
|
|
52
53
|
</td>
|
|
53
54
|
<td align="center" width="96">
|
|
55
|
+
<img src="https://cdn.simpleicons.org/react/61DAFB" width="48" height="48" alt="React" />
|
|
56
|
+
<br/>React 18
|
|
57
|
+
</td>
|
|
58
|
+
</tr>
|
|
59
|
+
<tr>
|
|
60
|
+
<td align="center" width="96">
|
|
54
61
|
<img src="https://cdn.simpleicons.org/anthropic/191919" width="48" height="48" alt="Anthropic" />
|
|
55
62
|
<br/>Anthropic
|
|
56
63
|
</td>
|
|
@@ -62,6 +69,10 @@ Coordinate specialized AI agents through Claude Code with persistent context, hi
|
|
|
62
69
|
<img src="https://cdn.simpleicons.org/ollama/000000" width="48" height="48" alt="Ollama" />
|
|
63
70
|
<br/>Ollama
|
|
64
71
|
</td>
|
|
72
|
+
<td align="center" width="96">
|
|
73
|
+
<img src="https://cdn.simpleicons.org/vite/646CFF" width="48" height="48" alt="Vite" />
|
|
74
|
+
<br/>Vite
|
|
75
|
+
</td>
|
|
65
76
|
</tr>
|
|
66
77
|
</table>
|
|
67
78
|
|
|
@@ -74,8 +85,10 @@ Coordinate specialized AI agents through Claude Code with persistent context, hi
|
|
|
74
85
|
| **Specialized Agents** | 7 built-in agent types: coder, researcher, tester, reviewer, architect, coordinator, analyst |
|
|
75
86
|
| **Persistent Memory** | SQLite with FTS5 full-text search and optional vector embeddings |
|
|
76
87
|
| **MCP Integration** | 30 tools exposed via Model Context Protocol for Claude Code |
|
|
88
|
+
| **Web Dashboard** | Real-time dashboard with 9 pages for visual management and monitoring |
|
|
89
|
+
| **REST API + WebSocket** | 50+ HTTP endpoints with live WebSocket event streaming |
|
|
77
90
|
| **Hierarchical Coordination** | Task queue, message bus, and coordinator pattern |
|
|
78
|
-
| **Multi-Provider Support** | Anthropic, OpenAI,
|
|
91
|
+
| **Multi-Provider Support** | 3 API providers (Anthropic, OpenAI, Ollama) + 3 CLI providers (Claude, Gemini, Codex) |
|
|
79
92
|
| **Plugin System** | Runtime extensibility for agents, tools, hooks, and providers |
|
|
80
93
|
| **Workflow Engine** | Multi-phase workflows with adversarial validation |
|
|
81
94
|
|
|
@@ -102,6 +115,15 @@ claude mcp add aistack -- npx @blackms/aistack mcp start
|
|
|
102
115
|
npx @blackms/aistack status
|
|
103
116
|
```
|
|
104
117
|
|
|
118
|
+
### Start Web Dashboard
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
# Start backend + web dashboard
|
|
122
|
+
npx @blackms/aistack web start
|
|
123
|
+
|
|
124
|
+
# Open http://localhost:3001
|
|
125
|
+
```
|
|
126
|
+
|
|
105
127
|
### Configuration
|
|
106
128
|
|
|
107
129
|
Create `aistack.config.json`:
|
|
@@ -126,12 +148,16 @@ Create `aistack.config.json`:
|
|
|
126
148
|
|
|
127
149
|
```mermaid
|
|
128
150
|
graph TB
|
|
129
|
-
subgraph "
|
|
151
|
+
subgraph Clients["Client Layer"]
|
|
130
152
|
CC[Claude Code IDE]
|
|
153
|
+
CLI[CLI]
|
|
154
|
+
WEB[Web Dashboard]
|
|
131
155
|
end
|
|
132
156
|
|
|
133
157
|
subgraph "aistack"
|
|
134
158
|
MCP["MCP Server<br/><small>stdio transport</small>"]
|
|
159
|
+
HTTP["HTTP Server<br/><small>REST API</small>"]
|
|
160
|
+
WS["WebSocket<br/><small>Real-time events</small>"]
|
|
135
161
|
|
|
136
162
|
subgraph Core["Core Services"]
|
|
137
163
|
AM[Agent Manager]
|
|
@@ -164,14 +190,51 @@ graph TB
|
|
|
164
190
|
end
|
|
165
191
|
end
|
|
166
192
|
|
|
167
|
-
CC <-->|"MCP
|
|
168
|
-
|
|
193
|
+
CC <-->|"MCP/stdio"| MCP
|
|
194
|
+
CLI <-->|"HTTP"| HTTP
|
|
195
|
+
WEB <-->|"HTTP + WS"| HTTP & WS
|
|
196
|
+
|
|
197
|
+
MCP & HTTP --> AM & MM
|
|
198
|
+
WS --> MB
|
|
169
199
|
AM --> TQ --> MB
|
|
170
200
|
MB --> A1 & A2 & A3 & A4 & A5 & A6 & A7
|
|
171
201
|
MM --> SQL --> FTS & VEC
|
|
172
202
|
AM -.-> ANT & OAI & OLL
|
|
173
203
|
```
|
|
174
204
|
|
|
205
|
+
### Deployment Overview
|
|
206
|
+
|
|
207
|
+
```mermaid
|
|
208
|
+
C4Deployment
|
|
209
|
+
title Deployment Diagram - Local Machine
|
|
210
|
+
|
|
211
|
+
Deployment_Node(local, "Local Machine", "Developer Workstation") {
|
|
212
|
+
Deployment_Node(npm, "npm", "Node.js 20+") {
|
|
213
|
+
Container(aistack, "aistack", "TypeScript", "MCP Server + HTTP Server + WebSocket")
|
|
214
|
+
ContainerDb(sqlite, "SQLite", "better-sqlite3", "Memory + FTS5 + Vector")
|
|
215
|
+
}
|
|
216
|
+
Deployment_Node(browser, "Browser", "Chrome/Firefox/Safari") {
|
|
217
|
+
Container(dashboard, "Web Dashboard", "React 18 + Vite", "Management UI")
|
|
218
|
+
}
|
|
219
|
+
Deployment_Node(ide, "IDE", "VS Code") {
|
|
220
|
+
Container(claude, "Claude Code", "Extension", "AI Assistant")
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
Deployment_Node(cloud, "Cloud Services", "External") {
|
|
225
|
+
Container(anthropic, "Anthropic API", "HTTPS", "Claude models")
|
|
226
|
+
Container(openai, "OpenAI API", "HTTPS", "GPT models")
|
|
227
|
+
Container(ollama_remote, "Ollama", "Local/Remote", "Local LLMs")
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
Rel(claude, aistack, "MCP/stdio")
|
|
231
|
+
Rel(dashboard, aistack, "HTTP + WebSocket")
|
|
232
|
+
Rel(aistack, sqlite, "SQL")
|
|
233
|
+
Rel(aistack, anthropic, "HTTPS")
|
|
234
|
+
Rel(aistack, openai, "HTTPS")
|
|
235
|
+
Rel(aistack, ollama_remote, "HTTP")
|
|
236
|
+
```
|
|
237
|
+
|
|
175
238
|
### Request Flow
|
|
176
239
|
|
|
177
240
|
```mermaid
|
|
@@ -204,6 +267,66 @@ sequenceDiagram
|
|
|
204
267
|
|
|
205
268
|
---
|
|
206
269
|
|
|
270
|
+
## Web Dashboard
|
|
271
|
+
|
|
272
|
+
The built-in web dashboard provides visual management and real-time monitoring of your agent orchestration.
|
|
273
|
+
|
|
274
|
+
### Starting the Dashboard
|
|
275
|
+
|
|
276
|
+
```bash
|
|
277
|
+
# Start the web server (includes dashboard)
|
|
278
|
+
npx @blackms/aistack web start
|
|
279
|
+
|
|
280
|
+
# Open in browser
|
|
281
|
+
open http://localhost:3001
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
### Dashboard Pages
|
|
285
|
+
|
|
286
|
+
| Page | Description |
|
|
287
|
+
|------|-------------|
|
|
288
|
+
| **Dashboard** | System overview with agent status, memory stats, and recent activity |
|
|
289
|
+
| **Agents** | Spawn, monitor, and manage agents in real-time |
|
|
290
|
+
| **Memory** | Browse, search, and manage memory entries with FTS5 |
|
|
291
|
+
| **Tasks** | View task queue, status, and completion history |
|
|
292
|
+
| **Projects** | Project management with task workflows |
|
|
293
|
+
| **Project Detail** | Deep dive into project tasks and specifications |
|
|
294
|
+
| **Task Detail** | Task lifecycle with phase transitions |
|
|
295
|
+
| **Workflows** | Define and run multi-phase workflows |
|
|
296
|
+
| **Chat** | Interactive agent chat interface |
|
|
297
|
+
|
|
298
|
+
### Web Dashboard Flow
|
|
299
|
+
|
|
300
|
+
```mermaid
|
|
301
|
+
sequenceDiagram
|
|
302
|
+
participant User as Browser
|
|
303
|
+
participant WS as WebSocket
|
|
304
|
+
participant HTTP as HTTP Server
|
|
305
|
+
participant Core as Core Services
|
|
306
|
+
participant DB as SQLite
|
|
307
|
+
|
|
308
|
+
User->>HTTP: GET /api/system/status
|
|
309
|
+
HTTP->>Core: getSystemStatus()
|
|
310
|
+
Core-->>HTTP: SystemStatus
|
|
311
|
+
HTTP-->>User: { agents, memory, tasks }
|
|
312
|
+
|
|
313
|
+
User->>WS: Connect ws://localhost:3001
|
|
314
|
+
WS-->>User: Connected
|
|
315
|
+
|
|
316
|
+
User->>HTTP: POST /api/agents
|
|
317
|
+
HTTP->>Core: spawnAgent("coder")
|
|
318
|
+
Core->>WS: emit("agent:spawned")
|
|
319
|
+
WS-->>User: { event: "agent:spawned", data }
|
|
320
|
+
HTTP-->>User: { agent }
|
|
321
|
+
|
|
322
|
+
Note over User,WS: Real-time updates via WebSocket
|
|
323
|
+
|
|
324
|
+
Core->>WS: emit("task:completed")
|
|
325
|
+
WS-->>User: { event: "task:completed", data }
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
---
|
|
329
|
+
|
|
207
330
|
## Agents
|
|
208
331
|
|
|
209
332
|
<table>
|
|
@@ -376,6 +499,7 @@ export default {
|
|
|
376
499
|
| `memory delete -k <key>` | Delete entry |
|
|
377
500
|
| `mcp start` | Start MCP server |
|
|
378
501
|
| `mcp tools` | List MCP tools |
|
|
502
|
+
| `web start` | Start web dashboard server |
|
|
379
503
|
| `workflow run <name>` | Run workflow |
|
|
380
504
|
| `workflow list` | List workflows |
|
|
381
505
|
| `status` | System status |
|
|
@@ -406,7 +530,7 @@ CLI providers enable agent execution through external CLI tools, useful for inte
|
|
|
406
530
|
|
|
407
531
|
```
|
|
408
532
|
src/
|
|
409
|
-
├── agents/ # Agent registry, spawner, definitions
|
|
533
|
+
├── agents/ # Agent registry, spawner, definitions (7 types)
|
|
410
534
|
├── cli/ # CLI commands
|
|
411
535
|
├── coordination/ # Task queue, message bus, topology
|
|
412
536
|
├── github/ # GitHub integration
|
|
@@ -414,9 +538,18 @@ src/
|
|
|
414
538
|
├── mcp/ # MCP server and 30 tools
|
|
415
539
|
├── memory/ # SQLite, FTS5, vector search
|
|
416
540
|
├── plugins/ # Plugin loader and registry
|
|
417
|
-
├── providers/ # LLM provider implementations
|
|
541
|
+
├── providers/ # LLM provider implementations (6 providers)
|
|
542
|
+
├── web/ # REST API routes + WebSocket
|
|
418
543
|
├── workflows/ # Workflow engine
|
|
419
544
|
└── utils/ # Config, logger, validation
|
|
545
|
+
|
|
546
|
+
web/
|
|
547
|
+
├── src/
|
|
548
|
+
│ ├── pages/ # 9 dashboard pages
|
|
549
|
+
│ ├── components/ # React components
|
|
550
|
+
│ ├── hooks/ # Custom React hooks
|
|
551
|
+
│ └── stores/ # Zustand state management
|
|
552
|
+
└── public/ # Static assets
|
|
420
553
|
```
|
|
421
554
|
|
|
422
555
|
---
|
|
@@ -430,6 +563,10 @@ npm test # Run tests
|
|
|
430
563
|
npm run test:coverage # With coverage
|
|
431
564
|
npm run typecheck # Type check
|
|
432
565
|
npm run lint # Lint
|
|
566
|
+
|
|
567
|
+
# Web dashboard development
|
|
568
|
+
npm run dev:web # Start Vite dev server for web UI
|
|
569
|
+
npm run build:web # Build web UI for production
|
|
433
570
|
```
|
|
434
571
|
|
|
435
572
|
---
|
|
@@ -442,7 +579,7 @@ npm run lint # Lint
|
|
|
442
579
|
| **P1** | Streaming responses |
|
|
443
580
|
| **P2** | Agent state persistence |
|
|
444
581
|
| **P2** | Built-in workflow templates |
|
|
445
|
-
| **P3** |
|
|
582
|
+
| **P3** | Enhanced dashboard analytics |
|
|
446
583
|
| **P3** | Metrics and observability |
|
|
447
584
|
|
|
448
585
|
<sub>Roadmap items are planned features, not current capabilities.</sub>
|
|
@@ -473,4 +610,8 @@ All PRs must pass CI (tests, lint, typecheck, build).
|
|
|
473
610
|
|
|
474
611
|
<sub>Built with TypeScript · Made for Claude Code</sub>
|
|
475
612
|
|
|
613
|
+
---
|
|
614
|
+
|
|
615
|
+
<sub>README verified against codebase v1.2.0. All features documented are backed by implemented code.</sub>
|
|
616
|
+
|
|
476
617
|
</div>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adversarial.d.ts","sourceRoot":"","sources":["../../../src/agents/definitions/adversarial.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,eAAO,MAAM,gBAAgB,EAAE,eA6B9B,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adversarial agent definition - aggressive critical code reviewer
|
|
3
|
+
*/
|
|
4
|
+
export const adversarialAgent = {
|
|
5
|
+
type: 'adversarial',
|
|
6
|
+
name: 'Adversarial Reviewer',
|
|
7
|
+
description: 'Aggressive critical code reviewer that actively tries to break code',
|
|
8
|
+
systemPrompt: `You are an ADVERSARIAL code reviewer. Your mission is to BREAK the code.
|
|
9
|
+
|
|
10
|
+
## Core Mindset
|
|
11
|
+
- ASSUME the code has bugs until proven otherwise
|
|
12
|
+
- ACTIVELY try to break the code with edge cases
|
|
13
|
+
- BE SKEPTICAL of all claims and assumptions
|
|
14
|
+
- NEVER accept "it probably works" - demand proof
|
|
15
|
+
|
|
16
|
+
## Attack Vectors (Check ALL)
|
|
17
|
+
1. Input Validation: NULL, empty, negative, overflow, injection
|
|
18
|
+
2. State & Race Conditions: concurrent access, async timing, memory leaks
|
|
19
|
+
3. Error Handling: missing try/catch, silent failures, resource leaks
|
|
20
|
+
4. Security: auth bypass, IDOR, secrets exposure, insecure defaults
|
|
21
|
+
5. Logic Errors: off-by-one, boundaries, floating point, division by zero
|
|
22
|
+
6. Performance: O(n^2), unbounded recursion, N+1 queries
|
|
23
|
+
|
|
24
|
+
## Output Format
|
|
25
|
+
**[SEVERITY: CRITICAL/HIGH/MEDIUM/LOW]** - Issue Title
|
|
26
|
+
- **Location**: file:line
|
|
27
|
+
- **Attack Vector**: How to exploit
|
|
28
|
+
- **Impact**: What happens when exploited
|
|
29
|
+
- **Required Fix**: Specific remediation
|
|
30
|
+
|
|
31
|
+
**VERDICT: APPROVE** or **VERDICT: REJECT**`,
|
|
32
|
+
capabilities: ['adversarial-review', 'security-audit', 'edge-case-analysis', 'break-code'],
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=adversarial.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adversarial.js","sourceRoot":"","sources":["../../../src/agents/definitions/adversarial.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,CAAC,MAAM,gBAAgB,GAAoB;IAC/C,IAAI,EAAE,aAAa;IACnB,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE,qEAAqE;IAClF,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;4CAuB4B;IAC1C,YAAY,EAAE,CAAC,oBAAoB,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,YAAY,CAAC;CAC3F,CAAC"}
|
|
@@ -5,6 +5,7 @@ export { coderAgent } from './coder.js';
|
|
|
5
5
|
export { researcherAgent } from './researcher.js';
|
|
6
6
|
export { testerAgent } from './tester.js';
|
|
7
7
|
export { reviewerAgent } from './reviewer.js';
|
|
8
|
+
export { adversarialAgent } from './adversarial.js';
|
|
8
9
|
export { architectAgent } from './architect.js';
|
|
9
10
|
export { coordinatorAgent } from './coordinator.js';
|
|
10
11
|
export { analystAgent } from './analyst.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/agents/definitions/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/agents/definitions/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -5,6 +5,7 @@ export { coderAgent } from './coder.js';
|
|
|
5
5
|
export { researcherAgent } from './researcher.js';
|
|
6
6
|
export { testerAgent } from './tester.js';
|
|
7
7
|
export { reviewerAgent } from './reviewer.js';
|
|
8
|
+
export { adversarialAgent } from './adversarial.js';
|
|
8
9
|
export { architectAgent } from './architect.js';
|
|
9
10
|
export { coordinatorAgent } from './coordinator.js';
|
|
10
11
|
export { analystAgent } from './analyst.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/agents/definitions/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/agents/definitions/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/agents/registry.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAa,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/agents/registry.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAa,MAAM,aAAa,CAAC;AA8B9D;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe,GAAG,IAAI,CASvE;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,MAAM,EAAE,CAYzC;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,eAAe,EAAE,CAYxD;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,UAAU,EAAE,eAAe,GAAG,IAAI,CAY/D;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAWrD;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAElD;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAM/E;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,CAExC"}
|
package/dist/agents/registry.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Agent type registry - manages core and custom agent definitions
|
|
3
3
|
*/
|
|
4
|
-
import { coderAgent, researcherAgent, testerAgent, reviewerAgent, architectAgent, coordinatorAgent, analystAgent, } from './definitions/index.js';
|
|
4
|
+
import { coderAgent, researcherAgent, testerAgent, reviewerAgent, adversarialAgent, architectAgent, coordinatorAgent, analystAgent, } from './definitions/index.js';
|
|
5
5
|
import { logger } from '../utils/logger.js';
|
|
6
6
|
const log = logger.child('registry');
|
|
7
7
|
// Core agent types
|
|
@@ -10,6 +10,7 @@ const CORE_AGENTS = new Map([
|
|
|
10
10
|
['researcher', researcherAgent],
|
|
11
11
|
['tester', testerAgent],
|
|
12
12
|
['reviewer', reviewerAgent],
|
|
13
|
+
['adversarial', adversarialAgent],
|
|
13
14
|
['architect', architectAgent],
|
|
14
15
|
['coordinator', coordinatorAgent],
|
|
15
16
|
['analyst', analystAgent],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/agents/registry.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EACL,UAAU,EACV,eAAe,EACf,WAAW,EACX,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,YAAY,GACb,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;AAErC,mBAAmB;AACnB,MAAM,WAAW,GAAoC,IAAI,GAAG,CAAC;IAC3D,CAAC,OAAO,EAAE,UAAU,CAAC;IACrB,CAAC,YAAY,EAAE,eAAe,CAAC;IAC/B,CAAC,QAAQ,EAAE,WAAW,CAAC;IACvB,CAAC,UAAU,EAAE,aAAa,CAAC;IAC3B,CAAC,WAAW,EAAE,cAAc,CAAC;IAC7B,CAAC,aAAa,EAAE,gBAAgB,CAAC;IACjC,CAAC,SAAS,EAAE,YAAY,CAAC;CAC1B,CAAC,CAAC;AAEH,6BAA6B;AAC7B,MAAM,YAAY,GAAiC,IAAI,GAAG,EAAE,CAAC;AAE7D;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAAY;IAC7C,0BAA0B;IAC1B,MAAM,SAAS,GAAG,WAAW,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AAG,CAAC,IAAI,CAAC,mCAAmC,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;QACxD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM,OAAO,GAAG,YAAY,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC1C,IAAI,OAAO,EAAE,CAAC;QACZ,GAAG,CAAC,IAAI,CAAC,2BAA2B,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;IAClD,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,YAAY,CAAC,IAAY;IACvC,OAAO,WAAW,CAAC,GAAG,CAAC,IAAiB,CAAC,IAAI,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AACtE,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,aAAa;IAC3B,OAAO;QACL,IAAI,EAAE,WAAW,CAAC,IAAI;QACtB,MAAM,EAAE,YAAY,CAAC,IAAI;QACzB,KAAK,EAAE,WAAW,CAAC,IAAI,GAAG,YAAY,CAAC,IAAI;KAC5C,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,iBAAiB;IAC/B,YAAY,CAAC,KAAK,EAAE,CAAC;AACvB,CAAC"}
|
|
@@ -4,4 +4,5 @@
|
|
|
4
4
|
export { TaskQueue, type QueuedTask } from './task-queue.js';
|
|
5
5
|
export { MessageBus, getMessageBus, resetMessageBus, type Message } from './message-bus.js';
|
|
6
6
|
export { HierarchicalCoordinator, type CoordinatorOptions } from './topology.js';
|
|
7
|
+
export { ReviewLoopCoordinator, createReviewLoop, getReviewLoop, listReviewLoops, abortReviewLoop, clearReviewLoops, type ReviewLoopOptions, } from './review-loop.js';
|
|
7
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/coordination/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,eAAe,EAAE,KAAK,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC5F,OAAO,EAAE,uBAAuB,EAAE,KAAK,kBAAkB,EAAE,MAAM,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/coordination/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,eAAe,EAAE,KAAK,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC5F,OAAO,EAAE,uBAAuB,EAAE,KAAK,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACjF,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,aAAa,EACb,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,KAAK,iBAAiB,GACvB,MAAM,kBAAkB,CAAC"}
|
|
@@ -4,4 +4,5 @@
|
|
|
4
4
|
export { TaskQueue } from './task-queue.js';
|
|
5
5
|
export { MessageBus, getMessageBus, resetMessageBus } from './message-bus.js';
|
|
6
6
|
export { HierarchicalCoordinator } from './topology.js';
|
|
7
|
+
export { ReviewLoopCoordinator, createReviewLoop, getReviewLoop, listReviewLoops, abortReviewLoop, clearReviewLoops, } from './review-loop.js';
|
|
7
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/coordination/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAmB,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,eAAe,EAAgB,MAAM,kBAAkB,CAAC;AAC5F,OAAO,EAAE,uBAAuB,EAA2B,MAAM,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/coordination/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAmB,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,eAAe,EAAgB,MAAM,kBAAkB,CAAC;AAC5F,OAAO,EAAE,uBAAuB,EAA2B,MAAM,eAAe,CAAC;AACjF,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,aAAa,EACb,eAAe,EACf,eAAe,EACf,gBAAgB,GAEjB,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Review Loop Coordinator - iterative coder-adversarial review pattern
|
|
3
|
+
*
|
|
4
|
+
* Workflow: Coder produces code → Adversarial reviews → If REJECT: Coder fixes → Repeat
|
|
5
|
+
*/
|
|
6
|
+
import { EventEmitter } from 'node:events';
|
|
7
|
+
import type { AgentStackConfig, ReviewLoopState, ReviewResult, ReviewIssue } from '../types.js';
|
|
8
|
+
export interface ReviewLoopOptions {
|
|
9
|
+
maxIterations?: number;
|
|
10
|
+
sessionId?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface ReviewLoopEvents {
|
|
13
|
+
'loop:start': (state: ReviewLoopState) => void;
|
|
14
|
+
'loop:iteration': (iteration: number, state: ReviewLoopState) => void;
|
|
15
|
+
'loop:review': (result: ReviewResult, state: ReviewLoopState) => void;
|
|
16
|
+
'loop:fix': (iteration: number, issues: ReviewIssue[], state: ReviewLoopState) => void;
|
|
17
|
+
'loop:approved': (state: ReviewLoopState) => void;
|
|
18
|
+
'loop:complete': (state: ReviewLoopState) => void;
|
|
19
|
+
'loop:error': (error: Error, state: ReviewLoopState) => void;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* ReviewLoopCoordinator - manages iterative code review cycles
|
|
23
|
+
*/
|
|
24
|
+
export declare class ReviewLoopCoordinator extends EventEmitter {
|
|
25
|
+
private state;
|
|
26
|
+
private config;
|
|
27
|
+
constructor(codeInput: string, config: AgentStackConfig, options?: ReviewLoopOptions);
|
|
28
|
+
/**
|
|
29
|
+
* Get current state
|
|
30
|
+
*/
|
|
31
|
+
getState(): ReviewLoopState;
|
|
32
|
+
/**
|
|
33
|
+
* Start the review loop
|
|
34
|
+
*/
|
|
35
|
+
start(): Promise<ReviewLoopState>;
|
|
36
|
+
/**
|
|
37
|
+
* Generate initial code from input
|
|
38
|
+
*/
|
|
39
|
+
private generateInitialCode;
|
|
40
|
+
/**
|
|
41
|
+
* Main review loop
|
|
42
|
+
*/
|
|
43
|
+
private runLoop;
|
|
44
|
+
/**
|
|
45
|
+
* Perform adversarial review
|
|
46
|
+
*/
|
|
47
|
+
private performReview;
|
|
48
|
+
/**
|
|
49
|
+
* Parse review result from adversarial agent response
|
|
50
|
+
*/
|
|
51
|
+
private parseReviewResult;
|
|
52
|
+
/**
|
|
53
|
+
* Fix code based on review issues
|
|
54
|
+
*/
|
|
55
|
+
private fixCode;
|
|
56
|
+
/**
|
|
57
|
+
* Abort the review loop
|
|
58
|
+
*/
|
|
59
|
+
abort(): void;
|
|
60
|
+
/**
|
|
61
|
+
* Cleanup resources
|
|
62
|
+
*/
|
|
63
|
+
cleanup(): void;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Create and start a review loop
|
|
67
|
+
*/
|
|
68
|
+
export declare function createReviewLoop(codeInput: string, config: AgentStackConfig, options?: ReviewLoopOptions): Promise<ReviewLoopState>;
|
|
69
|
+
/**
|
|
70
|
+
* Get an active review loop by ID
|
|
71
|
+
*/
|
|
72
|
+
export declare function getReviewLoop(id: string): ReviewLoopCoordinator | null;
|
|
73
|
+
/**
|
|
74
|
+
* List all active review loops
|
|
75
|
+
*/
|
|
76
|
+
export declare function listReviewLoops(): ReviewLoopState[];
|
|
77
|
+
/**
|
|
78
|
+
* Abort a review loop by ID
|
|
79
|
+
*/
|
|
80
|
+
export declare function abortReviewLoop(id: string): boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Clear all review loops (used for testing)
|
|
83
|
+
*/
|
|
84
|
+
export declare function clearReviewLoops(): void;
|
|
85
|
+
//# sourceMappingURL=review-loop.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"review-loop.d.ts","sourceRoot":"","sources":["../../src/coordination/review-loop.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,WAAW,EAGZ,MAAM,aAAa,CAAC;AAMrB,MAAM,WAAW,iBAAiB;IAChC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,gBAAgB;IAC/B,YAAY,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;IAC/C,gBAAgB,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;IACtE,aAAa,EAAE,CAAC,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;IACtE,UAAU,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,EAAE,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;IACvF,eAAe,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;IAClD,eAAe,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;IAClD,YAAY,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;CAC9D;AAKD;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,YAAY;IACrD,OAAO,CAAC,KAAK,CAAkB;IAC/B,OAAO,CAAC,MAAM,CAAmB;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