@blackms/aistack 1.3.0 → 1.4.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 +533 -411
- package/README.md.backup +617 -0
- package/dist/agents/definitions/devops.d.ts +6 -0
- package/dist/agents/definitions/devops.d.ts.map +1 -0
- package/dist/agents/definitions/devops.js +65 -0
- package/dist/agents/definitions/devops.js.map +1 -0
- package/dist/agents/definitions/documentation.d.ts +6 -0
- package/dist/agents/definitions/documentation.d.ts.map +1 -0
- package/dist/agents/definitions/documentation.js +72 -0
- package/dist/agents/definitions/documentation.js.map +1 -0
- package/dist/agents/definitions/index.d.ts +3 -0
- package/dist/agents/definitions/index.d.ts.map +1 -1
- package/dist/agents/definitions/index.js +3 -0
- package/dist/agents/definitions/index.js.map +1 -1
- package/dist/agents/definitions/security-auditor.d.ts +6 -0
- package/dist/agents/definitions/security-auditor.d.ts.map +1 -0
- package/dist/agents/definitions/security-auditor.js +100 -0
- package/dist/agents/definitions/security-auditor.js.map +1 -0
- package/dist/agents/identity-service.d.ts +89 -0
- package/dist/agents/identity-service.d.ts.map +1 -0
- package/dist/agents/identity-service.js +280 -0
- package/dist/agents/identity-service.js.map +1 -0
- package/dist/agents/index.d.ts +1 -0
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +1 -0
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/registry.d.ts.map +1 -1
- package/dist/agents/registry.js +4 -1
- package/dist/agents/registry.js.map +1 -1
- package/dist/agents/spawner.d.ts +28 -1
- package/dist/agents/spawner.d.ts.map +1 -1
- package/dist/agents/spawner.js +154 -3
- package/dist/agents/spawner.js.map +1 -1
- package/dist/auth/index.d.ts +6 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/index.js +6 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/auth/service.d.ts +79 -0
- package/dist/auth/service.d.ts.map +1 -0
- package/dist/auth/service.js +383 -0
- package/dist/auth/service.js.map +1 -0
- package/dist/auth/types.d.ts +48 -0
- package/dist/auth/types.d.ts.map +1 -0
- package/dist/auth/types.js +10 -0
- package/dist/auth/types.js.map +1 -0
- package/dist/cli/commands/agent-watch.d.ts +17 -0
- package/dist/cli/commands/agent-watch.d.ts.map +1 -0
- package/dist/cli/commands/agent-watch.js +108 -0
- package/dist/cli/commands/agent-watch.js.map +1 -0
- package/dist/cli/commands/agent.d.ts.map +1 -1
- package/dist/cli/commands/agent.js +15 -0
- package/dist/cli/commands/agent.js.map +1 -1
- package/dist/cli/utils/terminal.d.ts +58 -0
- package/dist/cli/utils/terminal.d.ts.map +1 -0
- package/dist/cli/utils/terminal.js +130 -0
- package/dist/cli/utils/terminal.js.map +1 -0
- package/dist/cli/utils/watch-renderer.d.ts +51 -0
- package/dist/cli/utils/watch-renderer.d.ts.map +1 -0
- package/dist/cli/utils/watch-renderer.js +146 -0
- package/dist/cli/utils/watch-renderer.js.map +1 -0
- package/dist/coordination/review-loop.d.ts +4 -0
- package/dist/coordination/review-loop.d.ts.map +1 -1
- package/dist/coordination/review-loop.js +54 -19
- package/dist/coordination/review-loop.js.map +1 -1
- package/dist/integrations/slack-notifier.d.ts +63 -0
- package/dist/integrations/slack-notifier.d.ts.map +1 -0
- package/dist/integrations/slack-notifier.js +224 -0
- package/dist/integrations/slack-notifier.js.map +1 -0
- package/dist/integrations/slack.d.ts +50 -0
- package/dist/integrations/slack.d.ts.map +1 -0
- package/dist/integrations/slack.js +225 -0
- package/dist/integrations/slack.js.map +1 -0
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +2 -1
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/tools/identity-tools.d.ts +435 -0
- package/dist/mcp/tools/identity-tools.d.ts.map +1 -0
- package/dist/mcp/tools/identity-tools.js +409 -0
- package/dist/mcp/tools/identity-tools.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/memory-tools.d.ts +23 -0
- package/dist/mcp/tools/memory-tools.d.ts.map +1 -1
- package/dist/mcp/tools/memory-tools.js +20 -1
- package/dist/mcp/tools/memory-tools.js.map +1 -1
- package/dist/memory/fts-search.d.ts +2 -0
- package/dist/memory/fts-search.d.ts.map +1 -1
- package/dist/memory/fts-search.js +14 -2
- package/dist/memory/fts-search.js.map +1 -1
- package/dist/memory/index.d.ts +109 -1
- package/dist/memory/index.d.ts.map +1 -1
- package/dist/memory/index.js +160 -6
- package/dist/memory/index.js.map +1 -1
- package/dist/memory/sqlite-store.d.ts +146 -3
- package/dist/memory/sqlite-store.d.ts.map +1 -1
- package/dist/memory/sqlite-store.js +930 -26
- package/dist/memory/sqlite-store.js.map +1 -1
- package/dist/memory/vector-search.d.ts +2 -0
- package/dist/memory/vector-search.d.ts.map +1 -1
- package/dist/memory/vector-search.js +7 -3
- package/dist/memory/vector-search.js.map +1 -1
- package/dist/monitoring/health.d.ts +68 -0
- package/dist/monitoring/health.d.ts.map +1 -0
- package/dist/monitoring/health.js +220 -0
- package/dist/monitoring/health.js.map +1 -0
- package/dist/monitoring/metrics.d.ts +31 -0
- package/dist/monitoring/metrics.d.ts.map +1 -0
- package/dist/monitoring/metrics.js +230 -0
- package/dist/monitoring/metrics.js.map +1 -0
- package/dist/providers/index.d.ts.map +1 -1
- package/dist/providers/index.js +132 -94
- package/dist/providers/index.js.map +1 -1
- package/dist/types.d.ts +76 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +7 -0
- package/dist/types.js.map +1 -1
- package/dist/utils/config.d.ts.map +1 -1
- package/dist/utils/config.js +12 -0
- package/dist/utils/config.js.map +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/logger.d.ts +24 -7
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/logger.js +128 -20
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/retry.d.ts +49 -0
- package/dist/utils/retry.d.ts.map +1 -0
- package/dist/utils/retry.js +160 -0
- package/dist/utils/retry.js.map +1 -0
- package/dist/utils/semaphore.d.ts +75 -0
- package/dist/utils/semaphore.d.ts.map +1 -0
- package/dist/utils/semaphore.js +185 -0
- package/dist/utils/semaphore.js.map +1 -0
- package/dist/utils/validation.d.ts +2 -2
- package/dist/web/middleware/auth.d.ts +16 -10
- package/dist/web/middleware/auth.d.ts.map +1 -1
- package/dist/web/middleware/auth.js +152 -12
- package/dist/web/middleware/auth.js.map +1 -1
- package/dist/web/routes/auth.d.ts +50 -0
- package/dist/web/routes/auth.d.ts.map +1 -0
- package/dist/web/routes/auth.js +216 -0
- package/dist/web/routes/auth.js.map +1 -0
- package/dist/web/routes/identities.d.ts +7 -0
- package/dist/web/routes/identities.d.ts.map +1 -0
- package/dist/web/routes/identities.js +216 -0
- package/dist/web/routes/identities.js.map +1 -0
- package/dist/web/routes/index.d.ts +3 -0
- package/dist/web/routes/index.d.ts.map +1 -1
- package/dist/web/routes/index.js +3 -0
- package/dist/web/routes/index.js.map +1 -1
- package/dist/web/routes/memory.d.ts.map +1 -1
- package/dist/web/routes/memory.js +188 -0
- package/dist/web/routes/memory.js.map +1 -1
- package/dist/web/routes/review-loops.d.ts +12 -0
- package/dist/web/routes/review-loops.d.ts.map +1 -0
- package/dist/web/routes/review-loops.js +157 -0
- package/dist/web/routes/review-loops.js.map +1 -0
- package/dist/web/routes/sessions.d.ts.map +1 -1
- package/dist/web/routes/sessions.js +14 -0
- package/dist/web/routes/sessions.js.map +1 -1
- package/dist/web/routes/system.d.ts.map +1 -1
- package/dist/web/routes/system.js +34 -23
- package/dist/web/routes/system.js.map +1 -1
- package/dist/web/routes/workflows.d.ts.map +1 -1
- package/dist/web/routes/workflows.js +13 -1
- package/dist/web/routes/workflows.js.map +1 -1
- package/dist/web/server.d.ts +1 -0
- package/dist/web/server.d.ts.map +1 -1
- package/dist/web/server.js +32 -2
- package/dist/web/server.js.map +1 -1
- package/dist/web/utils/request.d.ts +13 -0
- package/dist/web/utils/request.d.ts.map +1 -0
- package/dist/web/utils/request.js +49 -0
- package/dist/web/utils/request.js.map +1 -0
- package/dist/web/websocket/handler.d.ts +4 -0
- package/dist/web/websocket/handler.d.ts.map +1 -1
- package/dist/web/websocket/handler.js +59 -0
- package/dist/web/websocket/handler.js.map +1 -1
- package/dist/workflows/doc-sync.d.ts.map +1 -1
- package/dist/workflows/doc-sync.js +4 -0
- package/dist/workflows/doc-sync.js.map +1 -1
- package/dist/workflows/full-stack-feature.d.ts +74 -0
- package/dist/workflows/full-stack-feature.d.ts.map +1 -0
- package/dist/workflows/full-stack-feature.js +273 -0
- package/dist/workflows/full-stack-feature.js.map +1 -0
- package/dist/workflows/index.d.ts +1 -0
- package/dist/workflows/index.d.ts.map +1 -1
- package/dist/workflows/index.js +2 -0
- package/dist/workflows/index.js.map +1 -1
- package/dist/workflows/runner.js.map +1 -1
- package/dist/workflows/types.d.ts +6 -5
- package/dist/workflows/types.d.ts.map +1 -1
- package/package.json +12 -5
package/README.md.backup
ADDED
|
@@ -0,0 +1,617 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
# aistack
|
|
4
|
+
|
|
5
|
+
### Multi-Agent Orchestration for Claude Code
|
|
6
|
+
|
|
7
|
+
[](https://github.com/blackms/aistack/stargazers)
|
|
8
|
+
[](https://github.com/blackms/aistack/actions/workflows/ci.yml)
|
|
9
|
+
[](https://codecov.io/gh/blackms/aistack)
|
|
10
|
+
[](https://www.npmjs.com/package/@blackms/aistack)
|
|
11
|
+
[](https://www.npmjs.com/package/@blackms/aistack)
|
|
12
|
+
[](LICENSE)
|
|
13
|
+
|
|
14
|
+
<br/>
|
|
15
|
+
|
|
16
|
+
**Production-ready agent orchestration with persistent memory, MCP integration, and real-time web dashboard.**
|
|
17
|
+
|
|
18
|
+
<br/>
|
|
19
|
+
|
|
20
|
+
[Get Started](#-quick-start) · [Architecture](#-architecture) · [Web Dashboard](#-web-dashboard) · [API Reference](#-mcp-tools) · [Documentation](./docs)
|
|
21
|
+
|
|
22
|
+
<br/>
|
|
23
|
+
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Why aistack?
|
|
29
|
+
|
|
30
|
+
Coordinate specialized AI agents through Claude Code with persistent context, hierarchical task management, and seamless extensibility.
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
7 agents · 30 MCP tools · 6 LLM providers · SQLite + FTS5 · Web dashboard · Plugin system
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Tech Stack
|
|
39
|
+
|
|
40
|
+
<table>
|
|
41
|
+
<tr>
|
|
42
|
+
<td align="center" width="96">
|
|
43
|
+
<img src="https://cdn.simpleicons.org/nodedotjs/339933" width="48" height="48" alt="Node.js" />
|
|
44
|
+
<br/>Node.js 20+
|
|
45
|
+
</td>
|
|
46
|
+
<td align="center" width="96">
|
|
47
|
+
<img src="https://cdn.simpleicons.org/typescript/3178C6" width="48" height="48" alt="TypeScript" />
|
|
48
|
+
<br/>TypeScript
|
|
49
|
+
</td>
|
|
50
|
+
<td align="center" width="96">
|
|
51
|
+
<img src="https://cdn.simpleicons.org/sqlite/003B57" width="48" height="48" alt="SQLite" />
|
|
52
|
+
<br/>SQLite + FTS5
|
|
53
|
+
</td>
|
|
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">
|
|
61
|
+
<img src="https://cdn.simpleicons.org/anthropic/191919" width="48" height="48" alt="Anthropic" />
|
|
62
|
+
<br/>Anthropic
|
|
63
|
+
</td>
|
|
64
|
+
<td align="center" width="96">
|
|
65
|
+
<img src="https://cdn.simpleicons.org/openai/412991" width="48" height="48" alt="OpenAI" />
|
|
66
|
+
<br/>OpenAI
|
|
67
|
+
</td>
|
|
68
|
+
<td align="center" width="96">
|
|
69
|
+
<img src="https://cdn.simpleicons.org/ollama/000000" width="48" height="48" alt="Ollama" />
|
|
70
|
+
<br/>Ollama
|
|
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>
|
|
76
|
+
</tr>
|
|
77
|
+
</table>
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## Features
|
|
82
|
+
|
|
83
|
+
| Feature | Description |
|
|
84
|
+
|---------|-------------|
|
|
85
|
+
| **Specialized Agents** | 7 built-in agent types: coder, researcher, tester, reviewer, architect, coordinator, analyst |
|
|
86
|
+
| **Persistent Memory** | SQLite with FTS5 full-text search and optional vector embeddings |
|
|
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 |
|
|
90
|
+
| **Hierarchical Coordination** | Task queue, message bus, and coordinator pattern |
|
|
91
|
+
| **Multi-Provider Support** | 3 API providers (Anthropic, OpenAI, Ollama) + 3 CLI providers (Claude, Gemini, Codex) |
|
|
92
|
+
| **Plugin System** | Runtime extensibility for agents, tools, hooks, and providers |
|
|
93
|
+
| **Workflow Engine** | Multi-phase workflows with adversarial validation |
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## Quick Start
|
|
98
|
+
|
|
99
|
+
### Installation
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
npm install @blackms/aistack
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Initialize & Connect
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
# Initialize project
|
|
109
|
+
npx @blackms/aistack init
|
|
110
|
+
|
|
111
|
+
# Add to Claude Code
|
|
112
|
+
claude mcp add aistack -- npx @blackms/aistack mcp start
|
|
113
|
+
|
|
114
|
+
# Verify installation
|
|
115
|
+
npx @blackms/aistack status
|
|
116
|
+
```
|
|
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
|
+
|
|
127
|
+
### Configuration
|
|
128
|
+
|
|
129
|
+
Create `aistack.config.json`:
|
|
130
|
+
|
|
131
|
+
```json
|
|
132
|
+
{
|
|
133
|
+
"version": "1.0.0",
|
|
134
|
+
"providers": {
|
|
135
|
+
"default": "anthropic",
|
|
136
|
+
"anthropic": { "apiKey": "${ANTHROPIC_API_KEY}" }
|
|
137
|
+
},
|
|
138
|
+
"memory": {
|
|
139
|
+
"path": "./data/aistack.db",
|
|
140
|
+
"vectorSearch": { "enabled": false }
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## Architecture
|
|
148
|
+
|
|
149
|
+
```mermaid
|
|
150
|
+
graph TB
|
|
151
|
+
subgraph Clients["Client Layer"]
|
|
152
|
+
CC[Claude Code IDE]
|
|
153
|
+
CLI[CLI]
|
|
154
|
+
WEB[Web Dashboard]
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
subgraph "aistack"
|
|
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>"]
|
|
161
|
+
|
|
162
|
+
subgraph Core["Core Services"]
|
|
163
|
+
AM[Agent Manager]
|
|
164
|
+
MM[Memory Manager]
|
|
165
|
+
TQ[Task Queue]
|
|
166
|
+
MB[Message Bus]
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
subgraph Agents["Agent Pool"]
|
|
170
|
+
direction LR
|
|
171
|
+
A1[Coder]
|
|
172
|
+
A2[Tester]
|
|
173
|
+
A3[Reviewer]
|
|
174
|
+
A4[Architect]
|
|
175
|
+
A5[Researcher]
|
|
176
|
+
A6[Coordinator]
|
|
177
|
+
A7[Analyst]
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
subgraph Storage["Persistence"]
|
|
181
|
+
SQL[(SQLite)]
|
|
182
|
+
FTS[FTS5 Index]
|
|
183
|
+
VEC[Vector Store]
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
subgraph Providers["LLM Providers"]
|
|
187
|
+
ANT[Anthropic]
|
|
188
|
+
OAI[OpenAI]
|
|
189
|
+
OLL[Ollama]
|
|
190
|
+
end
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
CC <-->|"MCP/stdio"| MCP
|
|
194
|
+
CLI <-->|"HTTP"| HTTP
|
|
195
|
+
WEB <-->|"HTTP + WS"| HTTP & WS
|
|
196
|
+
|
|
197
|
+
MCP & HTTP --> AM & MM
|
|
198
|
+
WS --> MB
|
|
199
|
+
AM --> TQ --> MB
|
|
200
|
+
MB --> A1 & A2 & A3 & A4 & A5 & A6 & A7
|
|
201
|
+
MM --> SQL --> FTS & VEC
|
|
202
|
+
AM -.-> ANT & OAI & OLL
|
|
203
|
+
```
|
|
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
|
+
|
|
238
|
+
### Request Flow
|
|
239
|
+
|
|
240
|
+
```mermaid
|
|
241
|
+
sequenceDiagram
|
|
242
|
+
participant CC as Claude Code
|
|
243
|
+
participant MCP as MCP Server
|
|
244
|
+
participant AM as Agent Manager
|
|
245
|
+
participant MM as Memory
|
|
246
|
+
participant DB as SQLite
|
|
247
|
+
|
|
248
|
+
CC->>MCP: agent_spawn("coder")
|
|
249
|
+
MCP->>AM: spawnAgent("coder")
|
|
250
|
+
AM-->>MCP: SpawnedAgent
|
|
251
|
+
MCP-->>CC: { id, type, status }
|
|
252
|
+
|
|
253
|
+
CC->>MCP: memory_store(key, content)
|
|
254
|
+
MCP->>MM: store(key, content)
|
|
255
|
+
MM->>DB: INSERT/UPDATE
|
|
256
|
+
DB-->>MM: MemoryEntry
|
|
257
|
+
MM-->>MCP: { success: true }
|
|
258
|
+
MCP-->>CC: { entry }
|
|
259
|
+
|
|
260
|
+
CC->>MCP: memory_search(query)
|
|
261
|
+
MCP->>MM: search(query)
|
|
262
|
+
MM->>DB: FTS5 MATCH
|
|
263
|
+
DB-->>MM: Results
|
|
264
|
+
MM-->>MCP: SearchResults
|
|
265
|
+
MCP-->>CC: { results }
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
---
|
|
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
|
+
|
|
330
|
+
## Agents
|
|
331
|
+
|
|
332
|
+
<table>
|
|
333
|
+
<tr>
|
|
334
|
+
<th>Agent</th>
|
|
335
|
+
<th>Purpose</th>
|
|
336
|
+
<th>Capabilities</th>
|
|
337
|
+
</tr>
|
|
338
|
+
<tr>
|
|
339
|
+
<td><b>coder</b></td>
|
|
340
|
+
<td>Write and modify code</td>
|
|
341
|
+
<td><code>write-code</code> <code>edit-code</code> <code>refactor</code> <code>debug</code> <code>implement-features</code></td>
|
|
342
|
+
</tr>
|
|
343
|
+
<tr>
|
|
344
|
+
<td><b>researcher</b></td>
|
|
345
|
+
<td>Gather information</td>
|
|
346
|
+
<td><code>search-code</code> <code>read-documentation</code> <code>analyze-patterns</code> <code>gather-requirements</code> <code>explore-codebase</code></td>
|
|
347
|
+
</tr>
|
|
348
|
+
<tr>
|
|
349
|
+
<td><b>tester</b></td>
|
|
350
|
+
<td>Test and validate</td>
|
|
351
|
+
<td><code>write-tests</code> <code>run-tests</code> <code>identify-edge-cases</code> <code>coverage-analysis</code> <code>test-debugging</code></td>
|
|
352
|
+
</tr>
|
|
353
|
+
<tr>
|
|
354
|
+
<td><b>reviewer</b></td>
|
|
355
|
+
<td>Quality assurance</td>
|
|
356
|
+
<td><code>code-review</code> <code>security-review</code> <code>performance-review</code> <code>best-practices</code> <code>feedback</code></td>
|
|
357
|
+
</tr>
|
|
358
|
+
<tr>
|
|
359
|
+
<td><b>architect</b></td>
|
|
360
|
+
<td>System design</td>
|
|
361
|
+
<td><code>system-design</code> <code>technical-decisions</code> <code>architecture-review</code> <code>documentation</code> <code>trade-off-analysis</code></td>
|
|
362
|
+
</tr>
|
|
363
|
+
<tr>
|
|
364
|
+
<td><b>coordinator</b></td>
|
|
365
|
+
<td>Orchestrate work</td>
|
|
366
|
+
<td><code>task-decomposition</code> <code>agent-coordination</code> <code>progress-tracking</code> <code>result-synthesis</code> <code>workflow-management</code></td>
|
|
367
|
+
</tr>
|
|
368
|
+
<tr>
|
|
369
|
+
<td><b>analyst</b></td>
|
|
370
|
+
<td>Data insights</td>
|
|
371
|
+
<td><code>data-analysis</code> <code>performance-profiling</code> <code>metrics-collection</code> <code>trend-analysis</code> <code>reporting</code></td>
|
|
372
|
+
</tr>
|
|
373
|
+
</table>
|
|
374
|
+
|
|
375
|
+
---
|
|
376
|
+
|
|
377
|
+
## MCP Tools
|
|
378
|
+
|
|
379
|
+
### Agent Tools (6)
|
|
380
|
+
```
|
|
381
|
+
agent_spawn agent_list agent_stop
|
|
382
|
+
agent_status agent_types agent_update_status
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
### Memory Tools (5)
|
|
386
|
+
```
|
|
387
|
+
memory_store memory_search memory_get
|
|
388
|
+
memory_list memory_delete
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
### Task Tools (5)
|
|
392
|
+
```
|
|
393
|
+
task_create task_assign task_complete
|
|
394
|
+
task_list task_get
|
|
395
|
+
```
|
|
396
|
+
|
|
397
|
+
### Session Tools (4)
|
|
398
|
+
```
|
|
399
|
+
session_start session_end session_status
|
|
400
|
+
session_active
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
### System Tools (3)
|
|
404
|
+
```
|
|
405
|
+
system_status system_health system_config
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
### GitHub Tools (7)
|
|
409
|
+
```
|
|
410
|
+
github_issue_create github_issue_list github_issue_get
|
|
411
|
+
github_pr_create github_pr_list github_pr_get
|
|
412
|
+
github_repo_info
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
---
|
|
416
|
+
|
|
417
|
+
## Programmatic API
|
|
418
|
+
|
|
419
|
+
```typescript
|
|
420
|
+
import {
|
|
421
|
+
spawnAgent,
|
|
422
|
+
getMemoryManager,
|
|
423
|
+
startMCPServer,
|
|
424
|
+
getConfig,
|
|
425
|
+
} from '@blackms/aistack';
|
|
426
|
+
|
|
427
|
+
// Spawn an agent
|
|
428
|
+
const agent = spawnAgent('coder', { name: 'my-coder' });
|
|
429
|
+
|
|
430
|
+
// Use memory with search
|
|
431
|
+
const memory = getMemoryManager(getConfig());
|
|
432
|
+
await memory.store('pattern', 'Use dependency injection', {
|
|
433
|
+
namespace: 'architecture'
|
|
434
|
+
});
|
|
435
|
+
const results = await memory.search('injection');
|
|
436
|
+
|
|
437
|
+
// Start MCP server
|
|
438
|
+
const server = await startMCPServer(getConfig());
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
### Submodule Imports
|
|
442
|
+
|
|
443
|
+
```typescript
|
|
444
|
+
import { MemoryManager } from '@blackms/aistack/memory';
|
|
445
|
+
import { spawnAgent, listAgentTypes } from '@blackms/aistack/agents';
|
|
446
|
+
import { startMCPServer } from '@blackms/aistack/mcp';
|
|
447
|
+
```
|
|
448
|
+
|
|
449
|
+
---
|
|
450
|
+
|
|
451
|
+
## Plugin System
|
|
452
|
+
|
|
453
|
+
Extend aistack with custom agents, tools, and hooks:
|
|
454
|
+
|
|
455
|
+
```typescript
|
|
456
|
+
import type { AgentStackPlugin } from '@blackms/aistack';
|
|
457
|
+
|
|
458
|
+
export default {
|
|
459
|
+
name: 'my-plugin',
|
|
460
|
+
version: '1.0.0',
|
|
461
|
+
|
|
462
|
+
agents: [{
|
|
463
|
+
type: 'custom-agent',
|
|
464
|
+
name: 'Custom Agent',
|
|
465
|
+
description: 'Specialized behavior',
|
|
466
|
+
systemPrompt: 'You are a custom agent...',
|
|
467
|
+
capabilities: ['custom-task'],
|
|
468
|
+
}],
|
|
469
|
+
|
|
470
|
+
tools: [{
|
|
471
|
+
name: 'custom_tool',
|
|
472
|
+
description: 'A custom MCP tool',
|
|
473
|
+
inputSchema: { type: 'object', properties: { input: { type: 'string' } } },
|
|
474
|
+
handler: async (params) => ({ result: 'done' })
|
|
475
|
+
}],
|
|
476
|
+
|
|
477
|
+
async init(config) { /* setup */ },
|
|
478
|
+
async cleanup() { /* teardown */ }
|
|
479
|
+
} satisfies AgentStackPlugin;
|
|
480
|
+
```
|
|
481
|
+
|
|
482
|
+
---
|
|
483
|
+
|
|
484
|
+
## CLI Reference
|
|
485
|
+
|
|
486
|
+
| Command | Description |
|
|
487
|
+
|---------|-------------|
|
|
488
|
+
| `init` | Initialize project structure |
|
|
489
|
+
| `agent spawn -t <type>` | Spawn agent |
|
|
490
|
+
| `agent list` | List active agents |
|
|
491
|
+
| `agent stop -n <name>` | Stop agent |
|
|
492
|
+
| `agent types` | Show available types |
|
|
493
|
+
| `agent status -n <name>` | Get agent status |
|
|
494
|
+
| `agent run -t <type> -p <prompt>` | Spawn and execute task |
|
|
495
|
+
| `agent exec -n <name> -p <prompt>` | Execute task with existing agent |
|
|
496
|
+
| `memory store -k <key> -c <content>` | Store entry |
|
|
497
|
+
| `memory search -q <query>` | Search memory |
|
|
498
|
+
| `memory list` | List entries |
|
|
499
|
+
| `memory delete -k <key>` | Delete entry |
|
|
500
|
+
| `mcp start` | Start MCP server |
|
|
501
|
+
| `mcp tools` | List MCP tools |
|
|
502
|
+
| `web start` | Start web dashboard server |
|
|
503
|
+
| `workflow run <name>` | Run workflow |
|
|
504
|
+
| `workflow list` | List workflows |
|
|
505
|
+
| `status` | System status |
|
|
506
|
+
|
|
507
|
+
---
|
|
508
|
+
|
|
509
|
+
## LLM Providers
|
|
510
|
+
|
|
511
|
+
### API Providers
|
|
512
|
+
| Provider | Default Model | Embeddings |
|
|
513
|
+
|----------|---------------|------------|
|
|
514
|
+
| **Anthropic** | claude-sonnet-4-20250514 | - |
|
|
515
|
+
| **OpenAI** | gpt-4o | text-embedding-3-small |
|
|
516
|
+
| **Ollama** | llama3.2 | nomic-embed-text |
|
|
517
|
+
|
|
518
|
+
### CLI Providers
|
|
519
|
+
| Provider | CLI Tool | Default Model |
|
|
520
|
+
|----------|----------|---------------|
|
|
521
|
+
| **Claude Code** | `claude` | sonnet |
|
|
522
|
+
| **Gemini CLI** | `gemini` | gemini-2.0-flash |
|
|
523
|
+
| **Codex** | `codex` | - |
|
|
524
|
+
|
|
525
|
+
CLI providers enable agent execution through external CLI tools, useful for interactive workflows.
|
|
526
|
+
|
|
527
|
+
---
|
|
528
|
+
|
|
529
|
+
## Project Structure
|
|
530
|
+
|
|
531
|
+
```
|
|
532
|
+
src/
|
|
533
|
+
├── agents/ # Agent registry, spawner, definitions (7 types)
|
|
534
|
+
├── cli/ # CLI commands
|
|
535
|
+
├── coordination/ # Task queue, message bus, topology
|
|
536
|
+
├── github/ # GitHub integration
|
|
537
|
+
├── hooks/ # Lifecycle hooks
|
|
538
|
+
├── mcp/ # MCP server and 30 tools
|
|
539
|
+
├── memory/ # SQLite, FTS5, vector search
|
|
540
|
+
├── plugins/ # Plugin loader and registry
|
|
541
|
+
├── providers/ # LLM provider implementations (6 providers)
|
|
542
|
+
├── web/ # REST API routes + WebSocket
|
|
543
|
+
├── workflows/ # Workflow engine
|
|
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
|
|
553
|
+
```
|
|
554
|
+
|
|
555
|
+
---
|
|
556
|
+
|
|
557
|
+
## Development
|
|
558
|
+
|
|
559
|
+
```bash
|
|
560
|
+
npm install # Install dependencies
|
|
561
|
+
npm run build # Build
|
|
562
|
+
npm test # Run tests
|
|
563
|
+
npm run test:coverage # With coverage
|
|
564
|
+
npm run typecheck # Type check
|
|
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
|
|
570
|
+
```
|
|
571
|
+
|
|
572
|
+
---
|
|
573
|
+
|
|
574
|
+
## Roadmap
|
|
575
|
+
|
|
576
|
+
| Priority | Feature |
|
|
577
|
+
|----------|---------|
|
|
578
|
+
| **P1** | HTTP transport for MCP server |
|
|
579
|
+
| **P1** | Streaming responses |
|
|
580
|
+
| **P2** | Agent state persistence |
|
|
581
|
+
| **P2** | Built-in workflow templates |
|
|
582
|
+
| **P3** | Enhanced dashboard analytics |
|
|
583
|
+
| **P3** | Metrics and observability |
|
|
584
|
+
|
|
585
|
+
<sub>Roadmap items are planned features, not current capabilities.</sub>
|
|
586
|
+
|
|
587
|
+
---
|
|
588
|
+
|
|
589
|
+
## Contributing
|
|
590
|
+
|
|
591
|
+
1. Fork the repository
|
|
592
|
+
2. Create a feature branch (`git checkout -b feature/amazing`)
|
|
593
|
+
3. Commit changes (`git commit -m 'Add amazing feature'`)
|
|
594
|
+
4. Push to branch (`git push origin feature/amazing`)
|
|
595
|
+
5. Open a Pull Request
|
|
596
|
+
|
|
597
|
+
All PRs must pass CI (tests, lint, typecheck, build).
|
|
598
|
+
|
|
599
|
+
---
|
|
600
|
+
|
|
601
|
+
## License
|
|
602
|
+
|
|
603
|
+
[MIT](LICENSE) © 2024
|
|
604
|
+
|
|
605
|
+
---
|
|
606
|
+
|
|
607
|
+
<div align="center">
|
|
608
|
+
|
|
609
|
+
**[Documentation](./docs)** · **[Issues](https://github.com/blackms/aistack/issues)** · **[Discussions](https://github.com/blackms/aistack/discussions)**
|
|
610
|
+
|
|
611
|
+
<sub>Built with TypeScript · Made for Claude Code</sub>
|
|
612
|
+
|
|
613
|
+
---
|
|
614
|
+
|
|
615
|
+
<sub>README verified against codebase v1.2.0. All features documented are backed by implemented code.</sub>
|
|
616
|
+
|
|
617
|
+
</div>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"devops.d.ts","sourceRoot":"","sources":["../../../src/agents/definitions/devops.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,eAAO,MAAM,WAAW,EAAE,eA4DzB,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DevOps agent definition
|
|
3
|
+
*/
|
|
4
|
+
export const devopsAgent = {
|
|
5
|
+
type: 'devops',
|
|
6
|
+
name: 'DevOps Engineer',
|
|
7
|
+
description: 'Manage deployment, CI/CD, containers, and infrastructure automation',
|
|
8
|
+
systemPrompt: `You are an expert DevOps engineer focused on automation, deployment, and infrastructure.
|
|
9
|
+
|
|
10
|
+
## Core Responsibilities
|
|
11
|
+
- Design and implement CI/CD pipelines
|
|
12
|
+
- Containerize applications with Docker
|
|
13
|
+
- Manage Kubernetes deployments and configurations
|
|
14
|
+
- Automate infrastructure provisioning
|
|
15
|
+
- Monitor system health and performance
|
|
16
|
+
- Implement security best practices
|
|
17
|
+
|
|
18
|
+
## Expertise Areas
|
|
19
|
+
- **CI/CD**: GitHub Actions, GitLab CI, Jenkins, CircleCI
|
|
20
|
+
- **Containers**: Docker, Docker Compose, container optimization
|
|
21
|
+
- **Orchestration**: Kubernetes, Helm charts, service meshes
|
|
22
|
+
- **Cloud Platforms**: AWS, GCP, Azure services and tools
|
|
23
|
+
- **Infrastructure as Code**: Terraform, Ansible, CloudFormation
|
|
24
|
+
- **Monitoring**: Prometheus, Grafana, CloudWatch, logging stacks
|
|
25
|
+
|
|
26
|
+
## Approach
|
|
27
|
+
1. Understand the deployment requirements and constraints
|
|
28
|
+
2. Choose appropriate tools for the specific use case
|
|
29
|
+
3. Implement automation over manual processes
|
|
30
|
+
4. Prioritize security, reliability, and observability
|
|
31
|
+
5. Document deployment procedures and runbooks
|
|
32
|
+
6. Design for scalability and fault tolerance
|
|
33
|
+
|
|
34
|
+
## Best Practices
|
|
35
|
+
- Use infrastructure as code for reproducibility
|
|
36
|
+
- Implement proper secrets management (never hardcode)
|
|
37
|
+
- Set up comprehensive monitoring and alerting
|
|
38
|
+
- Use multi-stage builds for smaller container images
|
|
39
|
+
- Implement health checks and graceful shutdowns
|
|
40
|
+
- Follow the principle of least privilege
|
|
41
|
+
- Use semantic versioning for releases
|
|
42
|
+
- Implement rollback strategies
|
|
43
|
+
|
|
44
|
+
## Security Focus
|
|
45
|
+
- Scan container images for vulnerabilities
|
|
46
|
+
- Use non-root users in containers
|
|
47
|
+
- Implement network policies and firewalls
|
|
48
|
+
- Encrypt data in transit and at rest
|
|
49
|
+
- Regularly update dependencies and base images
|
|
50
|
+
- Use signed container images
|
|
51
|
+
- Implement audit logging
|
|
52
|
+
|
|
53
|
+
When implementing DevOps solutions, prioritize automation, security, and operational excellence.`,
|
|
54
|
+
capabilities: [
|
|
55
|
+
'ci-cd-setup',
|
|
56
|
+
'containerization',
|
|
57
|
+
'kubernetes-deployment',
|
|
58
|
+
'infrastructure-automation',
|
|
59
|
+
'monitoring-setup',
|
|
60
|
+
'security-hardening',
|
|
61
|
+
'cloud-deployment',
|
|
62
|
+
'performance-optimization',
|
|
63
|
+
],
|
|
64
|
+
};
|
|
65
|
+
//# sourceMappingURL=devops.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"devops.js","sourceRoot":"","sources":["../../../src/agents/definitions/devops.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,CAAC,MAAM,WAAW,GAAoB;IAC1C,IAAI,EAAE,QAAQ;IACd,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,qEAAqE;IAClF,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iGA6CiF;IAC/F,YAAY,EAAE;QACZ,aAAa;QACb,kBAAkB;QAClB,uBAAuB;QACvB,2BAA2B;QAC3B,kBAAkB;QAClB,oBAAoB;QACpB,kBAAkB;QAClB,0BAA0B;KAC3B;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"documentation.d.ts","sourceRoot":"","sources":["../../../src/agents/definitions/documentation.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,eAAO,MAAM,kBAAkB,EAAE,eAmEhC,CAAC"}
|