overmind-mcp 2.0.2 → 2.0.4
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/install-overmind-unix.sh +250 -0
- package/install-overmind-windows.bat +257 -0
- package/package.json +4 -2
- package/scripts/auto-install.mjs +327 -0
- package/scripts/postinstall.mjs +324 -143
package/scripts/postinstall.mjs
CHANGED
|
@@ -1,192 +1,373 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
3
|
+
* ═══════════════════════════════════════════════════════════════════════════════
|
|
4
|
+
* OVERMIND-MCP - POST-INSTALL AUTOMATIQUE
|
|
5
|
+
* ═══════════════════════════════════════════════════════════════════════════════
|
|
6
|
+
* Script exécuté automatiquement après npm install -g overmind-mcp
|
|
7
|
+
* Installe et configure TOUT :
|
|
8
|
+
* - Vérifie Docker
|
|
9
|
+
* - Installe PostgreSQL + pgvector (si absent)
|
|
10
|
+
* - Télécharge et lance l'infrastructure Docker complète
|
|
11
|
+
* - Valide tous les services
|
|
12
|
+
* - Montre à l'utilisateur où voir les services dans Docker Desktop
|
|
13
|
+
* ═══════════════════════════════════════════════════════════════════════════════
|
|
6
14
|
*/
|
|
7
15
|
|
|
8
|
-
import { execSync } from 'child_process';
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
16
|
+
import { execSync, spawn } from 'child_process';
|
|
17
|
+
import { existsSync, mkdirSync, writeFileSync } from 'fs';
|
|
18
|
+
import { join } from 'path';
|
|
11
19
|
import { fileURLToPath } from 'url';
|
|
20
|
+
import { dirname } from 'path';
|
|
12
21
|
|
|
13
22
|
const __filename = fileURLToPath(import.meta.url);
|
|
14
23
|
const __dirname = dirname(__filename);
|
|
15
24
|
|
|
16
|
-
|
|
25
|
+
const INSTALL_DIR = join(
|
|
26
|
+
process.env.HOME || process.env.USERPROFILE || process.env.HOMEPATH,
|
|
27
|
+
'.overmind'
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
31
|
+
// CONFIG & COLORS
|
|
32
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
33
|
+
|
|
34
|
+
const COLORS = {
|
|
35
|
+
cyan: '\x1b[36m',
|
|
36
|
+
green: '\x1b[32m',
|
|
37
|
+
yellow: '\x1b[33m',
|
|
38
|
+
red: '\x1b[31m',
|
|
39
|
+
white: '\x1b[37m',
|
|
40
|
+
reset: '\x1b[0m'
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
function log(color, str) {
|
|
44
|
+
console.log(`${color}${str}${COLORS.reset}`);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function logSection(title) {
|
|
48
|
+
console.log('\n╔══════════════════════════════════════════════════════════════════╗');
|
|
49
|
+
console.log(`║ ${title.padEnd(64)} ║`);
|
|
50
|
+
console.log('╚══════════════════════════════════════════════════════════════════╝');
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function runCommand(cmd, options = {}) {
|
|
17
54
|
try {
|
|
18
|
-
|
|
19
|
-
console.log('[OK] Docker detecte: ' + version.split(',')[0]);
|
|
20
|
-
return true;
|
|
55
|
+
return execSync(cmd, { stdio: 'pipe', encoding: 'utf8', ...options });
|
|
21
56
|
} catch {
|
|
22
|
-
|
|
23
|
-
console.log(' -> Installez Docker Desktop: https://www.docker.com/products/docker-desktop/');
|
|
24
|
-
return false;
|
|
57
|
+
return null;
|
|
25
58
|
}
|
|
26
59
|
}
|
|
27
60
|
|
|
28
|
-
function
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
61
|
+
async function runCommandAsync(cmd, description) {
|
|
62
|
+
return new Promise((resolve, reject) => {
|
|
63
|
+
console.log(`🔧 ${description}`);
|
|
64
|
+
console.log(` $ ${cmd}`);
|
|
65
|
+
|
|
66
|
+
const child = spawn(cmd, { shell: true, stdio: 'inherit' });
|
|
67
|
+
|
|
68
|
+
child.on('close', (code) => {
|
|
69
|
+
if (code === 0) {
|
|
70
|
+
console.log(`✅ ${description} terminé`);
|
|
71
|
+
resolve(true);
|
|
72
|
+
} else {
|
|
73
|
+
console.error(`❌ Erreur (code ${code})`);
|
|
74
|
+
reject(new Error(`Command failed with code ${code}`));
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
child.on('error', (err) => {
|
|
79
|
+
console.error('❌ Erreur:', err.message);
|
|
80
|
+
reject(err);
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
86
|
+
// INSTALLATION STEPS
|
|
87
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
88
|
+
|
|
89
|
+
async function checkDocker() {
|
|
90
|
+
logSection('VÉRIFICATION DOCKER');
|
|
91
|
+
|
|
92
|
+
const version = runCommand('docker --version');
|
|
93
|
+
if (!version) {
|
|
94
|
+
log(COLORS.red, '❌ Docker non trouvé');
|
|
95
|
+
console.log('');
|
|
96
|
+
log(COLORS.yellow, '📥 Installation Docker requise:');
|
|
97
|
+
|
|
98
|
+
const platform = process.platform;
|
|
99
|
+
if (platform === 'win32') {
|
|
100
|
+
console.log(' Windows: https://www.docker.com/products/docker-desktop/');
|
|
101
|
+
} else if (platform === 'darwin') {
|
|
102
|
+
console.log(' macOS: https://www.docker.com/products/docker-desktop/');
|
|
103
|
+
} else {
|
|
104
|
+
console.log(' Linux: https://docs.docker.com/engine/install/');
|
|
37
105
|
}
|
|
38
|
-
|
|
106
|
+
|
|
107
|
+
log(COLORS.cyan, '\n📥 Après installation de Docker, relancez: npm install -g overmind-mcp');
|
|
108
|
+
return false;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
log(COLORS.green, '✅ Docker détecté: ' + version.trim());
|
|
112
|
+
return true;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
async function setupPostgreSQL() {
|
|
116
|
+
logSection('INSTALLATION POSTGRESQL + PGVECTOR');
|
|
117
|
+
|
|
118
|
+
// Check if already exists
|
|
119
|
+
const existingContainer = runCommand(
|
|
120
|
+
'docker ps --filter "name=postgres-pgvector" --format "{{.Names}}"',
|
|
121
|
+
{ stdio: 'pipe' }
|
|
122
|
+
);
|
|
123
|
+
|
|
124
|
+
if (existingContainer) {
|
|
125
|
+
log(COLORS.green, '✅ PostgreSQL + pgvector déjà installé');
|
|
126
|
+
log(COLORS.cyan, ' Container: ' + existingContainer.trim());
|
|
127
|
+
return true;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
log(COLORS.yellow, '📦 Installation PostgreSQL + pgvector...');
|
|
39
131
|
|
|
40
132
|
try {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
133
|
+
await runCommandAsync(
|
|
134
|
+
'docker pull pgvector/pgvector:pg16',
|
|
135
|
+
'Téléchargement image'
|
|
136
|
+
);
|
|
137
|
+
|
|
138
|
+
// Remove existing if stopped
|
|
139
|
+
runCommand('docker rm -f overmind-postgres-pgvector', { stdio: 'pipe' });
|
|
140
|
+
|
|
141
|
+
const runCmd = [
|
|
142
|
+
'docker', 'run', '-d',
|
|
143
|
+
'--name', 'overmind-postgres-pgvector',
|
|
144
|
+
'-p', '5432:5432',
|
|
145
|
+
'-e', 'POSTGRES_PASSWORD=overmind_temp_password_change_me',
|
|
146
|
+
'-e', 'POSTGRES_USER=postgres',
|
|
147
|
+
'-v', 'overmind_postgres_data:/var/lib/postgresql/data',
|
|
148
|
+
'--restart', 'unless-stopped',
|
|
149
|
+
'pgvector/pgvector:pg16'
|
|
150
|
+
].join(' ');
|
|
151
|
+
|
|
152
|
+
await runCommandAsync(runCmd, 'Démarrage PostgreSQL');
|
|
153
|
+
|
|
154
|
+
log(COLORS.cyan, '\n⏳ Attente démarrage PostgreSQL (20s)...');
|
|
155
|
+
await new Promise(resolve => setTimeout(resolve, 20000));
|
|
156
|
+
|
|
157
|
+
// Enable pgvector
|
|
158
|
+
await runCommandAsync(
|
|
159
|
+
`docker exec overmind-postgres-pgvector psql -U postgres -c "CREATE EXTENSION IF NOT EXISTS vector;"`,
|
|
160
|
+
'Activation pgvector'
|
|
161
|
+
);
|
|
162
|
+
|
|
163
|
+
log(COLORS.green, '\n✅ PostgreSQL + pgvector installés !');
|
|
164
|
+
return true;
|
|
165
|
+
} catch (error) {
|
|
166
|
+
log(COLORS.red, '❌ Erreur installation PostgreSQL: ' + error.message);
|
|
167
|
+
return false;
|
|
168
|
+
}
|
|
49
169
|
}
|
|
50
170
|
|
|
51
|
-
function
|
|
171
|
+
async function setupInfrastructure() {
|
|
172
|
+
logSection('TÉLÉCHARGEMENT INFRASTRUCTURE DOCKER');
|
|
173
|
+
|
|
174
|
+
mkdirSync(INSTALL_DIR, { recursive: true });
|
|
175
|
+
|
|
176
|
+
log(COLORS.yellow, '📥 Téléchargement docker-compose.yml...');
|
|
177
|
+
|
|
178
|
+
const composeUrl = 'https://raw.githubusercontent.com/DeamonDev888/overmind-mcp/main/docker-compose.yml';
|
|
179
|
+
const exportersUrl = 'https://raw.githubusercontent.com/DeamonDev888/overmind-mcp/main/docker-compose.exporters.yml';
|
|
180
|
+
|
|
52
181
|
try {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
).trim();
|
|
58
|
-
if (r === '1') { console.log('[OK] pgvector installe (Docker)'); return true; }
|
|
59
|
-
} else {
|
|
60
|
-
try {
|
|
61
|
-
const r = execSync('pg_config --version', { encoding: 'utf8', stdio: 'pipe' }).trim();
|
|
62
|
-
if (r.includes('pgvector')) { console.log('[OK] pgvector installe (natif)'); return true; }
|
|
63
|
-
} catch {}
|
|
64
|
-
try {
|
|
65
|
-
const r = execSync(
|
|
66
|
-
"psql -U postgres -t -c \"SELECT 1 FROM pg_extension WHERE extname='vector';\"",
|
|
67
|
-
{ encoding: 'utf8', stdio: 'pipe' }
|
|
68
|
-
).trim();
|
|
69
|
-
if (r === '1') { console.log('[OK] pgvector installe (natif)'); return true; }
|
|
70
|
-
} catch {}
|
|
182
|
+
const composeData = runCommand(`curl -sL ${composeUrl}`);
|
|
183
|
+
if (composeData) {
|
|
184
|
+
writeFileSync(join(INSTALL_DIR, 'docker-compose.yml'), composeData);
|
|
185
|
+
log(COLORS.green, '✅ docker-compose.yml téléchargé');
|
|
71
186
|
}
|
|
72
|
-
} catch {}
|
|
73
187
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
188
|
+
const exportersData = runCommand(`curl -sL ${exportersUrl}`);
|
|
189
|
+
if (exportersData) {
|
|
190
|
+
writeFileSync(join(INSTALL_DIR, 'docker-compose.exporters.yml'), exportersData);
|
|
191
|
+
log(COLORS.green, '✅ docker-compose.exporters.yml téléchargé');
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
return true;
|
|
195
|
+
} catch (error) {
|
|
196
|
+
log(COLORS.red, '❌ Erreur téléchargement: ' + error.message);
|
|
197
|
+
return false;
|
|
198
|
+
}
|
|
77
199
|
}
|
|
78
200
|
|
|
79
|
-
function
|
|
201
|
+
async function startInfrastructure() {
|
|
202
|
+
logSection('DÉMARRAGE INFRASTRUCTURE COMPLÈTE');
|
|
203
|
+
|
|
204
|
+
const composeFile = join(INSTALL_DIR, 'docker-compose.yml');
|
|
205
|
+
|
|
206
|
+
if (!existsSync(composeFile)) {
|
|
207
|
+
log(COLORS.yellow, '⚠️ docker-compose.yml non trouvé. Mode minimal activé.');
|
|
208
|
+
return false;
|
|
209
|
+
}
|
|
210
|
+
|
|
80
211
|
try {
|
|
81
|
-
|
|
212
|
+
log(COLORS.yellow, '🚀 Démarrage des services Docker...');
|
|
213
|
+
await runCommandAsync(
|
|
214
|
+
`cd "${INSTALL_DIR}" && docker-compose -f docker-compose.yml up -d`,
|
|
215
|
+
'Démarrage infrastructure'
|
|
216
|
+
);
|
|
217
|
+
|
|
218
|
+
log(COLORS.cyan, '\n⏳ Attente démarrage des services (15s)...');
|
|
219
|
+
await new Promise(resolve => setTimeout(resolve, 15000));
|
|
220
|
+
|
|
82
221
|
return true;
|
|
83
|
-
} catch {
|
|
84
|
-
|
|
222
|
+
} catch (error) {
|
|
223
|
+
log(COLORS.red, '❌ Erreur démarrage: ' + error.message);
|
|
85
224
|
return false;
|
|
86
225
|
}
|
|
87
226
|
}
|
|
88
227
|
|
|
89
|
-
function
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
228
|
+
async function validateServices() {
|
|
229
|
+
logSection('VALIDATION DES SERVICES');
|
|
230
|
+
|
|
231
|
+
log(COLORS.yellow, '🔍 Vérification des containers...\n');
|
|
232
|
+
|
|
233
|
+
const services = [
|
|
234
|
+
{ name: 'PostgreSQL + pgvector', filter: 'postgres', color: COLORS.green },
|
|
235
|
+
{ name: 'RabbitMQ', filter: 'rabbitmq', color: COLORS.green },
|
|
236
|
+
{ name: 'Temporal', filter: 'temporal', color: COLORS.green },
|
|
237
|
+
{ name: 'Prometheus', filter: 'prometheus', color: COLORS.green },
|
|
238
|
+
{ name: 'Grafana', filter: 'grafana', color: COLORS.green },
|
|
239
|
+
{ name: 'Jaeger', filter: 'jaeger', color: COLORS.green },
|
|
240
|
+
];
|
|
241
|
+
|
|
242
|
+
let allRunning = true;
|
|
243
|
+
|
|
244
|
+
for (const service of services) {
|
|
245
|
+
const containerName = runCommand(
|
|
246
|
+
`docker ps --filter "name=${service.filter}" --format "{{.Names}}"`,
|
|
247
|
+
{ stdio: 'pipe' }
|
|
248
|
+
);
|
|
249
|
+
|
|
250
|
+
if (containerName) {
|
|
251
|
+
log(service.color, ` ✅ ${service.name}: ${containerName.trim()}`);
|
|
252
|
+
} else {
|
|
253
|
+
log(COLORS.red, ` ❌ ${service.name}: Non trouvé`);
|
|
254
|
+
allRunning = false;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
return allRunning;
|
|
93
259
|
}
|
|
94
260
|
|
|
95
|
-
function
|
|
96
|
-
|
|
97
|
-
console.log('================================================================');
|
|
98
|
-
console.log(' BRAIN OVERMIND-MCP v2.0.0 - INSTALLATION');
|
|
99
|
-
console.log('================================================================');
|
|
100
|
-
console.log('');
|
|
261
|
+
function createEnvConfig() {
|
|
262
|
+
mkdirSync(INSTALL_DIR, { recursive: true });
|
|
101
263
|
|
|
102
|
-
|
|
103
|
-
console.log('');
|
|
264
|
+
const envFile = join(INSTALL_DIR, '.env');
|
|
104
265
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
detectNodeVersion();
|
|
266
|
+
if (!existsSync(envFile)) {
|
|
267
|
+
const envContent = `# OverMind-MCP Environment Configuration
|
|
268
|
+
# Généré automatiquement par npm install
|
|
109
269
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
270
|
+
# PostgreSQL
|
|
271
|
+
POSTGRES_HOST=localhost
|
|
272
|
+
POSTGRES_PORT=5432
|
|
273
|
+
POSTGRES_USER=postgres
|
|
274
|
+
POSTGRES_PASSWORD=overmind_temp_password_change_me
|
|
275
|
+
POSTGRES_DB=overmind
|
|
114
276
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
console.log(' Commande: overmind-setup --full');
|
|
125
|
-
} else if (hasDocker) {
|
|
126
|
-
console.log(' [FAST] MODE PARTIEL (Docker uniquement)');
|
|
127
|
-
console.log('');
|
|
128
|
-
console.log(' OverMind installera automatiquement:');
|
|
129
|
-
bar('PostgreSQL + pgvector', true);
|
|
130
|
-
bar('RabbitMQ (Broker)', true);
|
|
131
|
-
bar('Temporal (Workflows)', true);
|
|
132
|
-
console.log('');
|
|
133
|
-
console.log(' Commande: overmind-setup --full');
|
|
134
|
-
} else {
|
|
135
|
-
console.log(' [OK] MODE SIMPLE (sans Docker)');
|
|
136
|
-
console.log('');
|
|
137
|
-
console.log(' OverMind fonctionne immediatement avec:');
|
|
138
|
-
bar('Agents IA (Claude, Gemini...)', true);
|
|
139
|
-
bar('Creation/Config agents', true);
|
|
140
|
-
bar('Execution taches complexes', true);
|
|
141
|
-
bar('Vector DB', false);
|
|
142
|
-
bar('Workflows Long-Running', false);
|
|
143
|
-
console.log('');
|
|
144
|
-
console.log(' Pour activer toutes les features:');
|
|
145
|
-
console.log(' 1. Installez Docker Desktop');
|
|
146
|
-
console.log(' 2. Relancez: overmind-setup --full');
|
|
277
|
+
# OpenTelemetry (optionnel)
|
|
278
|
+
OTEL_ENABLED=false
|
|
279
|
+
|
|
280
|
+
# Workspace
|
|
281
|
+
OVERMIND_WORKSPACE=${INSTALL_DIR}
|
|
282
|
+
`;
|
|
283
|
+
|
|
284
|
+
writeFileSync(envFile, envContent);
|
|
285
|
+
log(COLORS.green, '✅ Configuration créée: ' + envFile);
|
|
147
286
|
}
|
|
287
|
+
}
|
|
148
288
|
|
|
289
|
+
function showSummary() {
|
|
290
|
+
console.log('\n╔══════════════════════════════════════════════════════════════════╗');
|
|
291
|
+
console.log('║' + ' '.repeat(64) + '║');
|
|
292
|
+
console.log('║' + COLORS.green + ' ✅ INSTALLATION TERMINÉE !' + COLORS.reset + ' '.repeat(33) + '║');
|
|
293
|
+
console.log('║' + ' '.repeat(64) + '║');
|
|
294
|
+
console.log('╚══════════════════════════════════════════════════════════════════╝');
|
|
295
|
+
console.log('');
|
|
296
|
+
log(COLORS.yellow, '📋 SERVICES DISPONIBLES:');
|
|
297
|
+
console.log('');
|
|
298
|
+
console.log('┌─────────────────────────────────────────────────────────────────┐');
|
|
299
|
+
console.log('│ ' + COLORS.cyan + 'Ouvrez Docker Desktop pour voir tous les containers' + COLORS.reset + ' │');
|
|
300
|
+
console.log('│ │');
|
|
301
|
+
console.log('│ ' + COLORS.yellow + 'URLs utiles:' + COLORS.reset + ' │');
|
|
302
|
+
console.log('│ • Prometheus: ' + COLORS.cyan + 'http://localhost:9090' + COLORS.reset + ' │');
|
|
303
|
+
console.log('│ • Grafana: ' + COLORS.cyan + 'http://localhost:3000' + COLORS.reset + ' (admin/admin)' + ' │');
|
|
304
|
+
console.log('│ • Jaeger: ' + COLORS.cyan + 'http://localhost:16686' + COLORS.reset + ' │');
|
|
305
|
+
console.log('│ • RabbitMQ: ' + COLORS.cyan + 'http://localhost:15672' + COLORS.reset + ' (guest/guest)' + ' │');
|
|
306
|
+
console.log('│ • Temporal: ' + COLORS.cyan + 'http://localhost:8233' + COLORS.reset + ' │');
|
|
307
|
+
console.log('└─────────────────────────────────────────────────────────────────┘');
|
|
149
308
|
console.log('');
|
|
150
|
-
|
|
151
|
-
console.log('
|
|
152
|
-
console.log('
|
|
309
|
+
log(COLORS.yellow, '📚 DOCUMENTATION:');
|
|
310
|
+
console.log(' • https://github.com/DeamonDev888/overmind-mcp');
|
|
311
|
+
console.log(' • https://www.npmjs.com/package/overmind-mcp');
|
|
153
312
|
console.log('');
|
|
313
|
+
log(COLORS.yellow, '🎉 PROCHAINE ÉTAPE:');
|
|
314
|
+
console.log(' • Créez votre premier agent: overmind create-agent');
|
|
315
|
+
console.log(' • Ou listez les agents: overmind list-agents');
|
|
316
|
+
console.log('');
|
|
317
|
+
}
|
|
154
318
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
console.log('');
|
|
159
|
-
console.log(' Cette commande va:');
|
|
160
|
-
console.log(' - Installer PostgreSQL + pgvector en Docker');
|
|
161
|
-
console.log(' - Creer la base de donnees OverMind');
|
|
162
|
-
console.log(' - Demarrer RabbitMQ + Temporal');
|
|
163
|
-
console.log(' - Configurer les fichiers necessaires');
|
|
164
|
-
console.log('');
|
|
165
|
-
}
|
|
319
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
320
|
+
// MAIN
|
|
321
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
166
322
|
|
|
167
|
-
|
|
168
|
-
console.log('
|
|
169
|
-
console.log('
|
|
170
|
-
console.log('
|
|
323
|
+
async function main() {
|
|
324
|
+
console.log('╔══════════════════════════════════════════════════════════════════╗');
|
|
325
|
+
console.log('║' + ' '.repeat(64) + '║');
|
|
326
|
+
console.log('║' + COLORS.cyan + ' 🚀 OVERMIND-MCP - INSTALLATION AUTOMATIQUE' + COLORS.reset + ' '.repeat(25) + '║');
|
|
327
|
+
console.log('║' + ' '.repeat(64) + '║');
|
|
328
|
+
console.log('╚══════════════════════════════════════════════════════════════════╝');
|
|
171
329
|
console.log('');
|
|
172
|
-
|
|
330
|
+
|
|
331
|
+
// Banner
|
|
332
|
+
console.log(COLORS.cyan + 'Ce script va:' + COLORS.reset);
|
|
333
|
+
console.log(' ✓ Vérifier Docker');
|
|
334
|
+
console.log(' ✓ Installer PostgreSQL + pgvector (si absent)');
|
|
335
|
+
console.log(' ✓ Télécharger l\'infrastructure Docker');
|
|
336
|
+
console.log(' ✓ Démarrer tous les services');
|
|
337
|
+
console.log(' ✓ Valider l\'installation');
|
|
173
338
|
console.log('');
|
|
174
339
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
} else {
|
|
180
|
-
console.log(' Mode Avance (avec Docker):');
|
|
181
|
-
console.log(' $ overmind-setup --full');
|
|
182
|
-
console.log(' $ overmind create-agent ...');
|
|
183
|
-
console.log(' $ overmind run-agent ...');
|
|
184
|
-
console.log(' $ overmind-infra up/down/status');
|
|
340
|
+
// Step 1: Check Docker
|
|
341
|
+
const dockerOk = await checkDocker();
|
|
342
|
+
if (!dockerOk) {
|
|
343
|
+
return;
|
|
185
344
|
}
|
|
186
345
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
346
|
+
// Step 2: Setup .env
|
|
347
|
+
createEnvConfig();
|
|
348
|
+
|
|
349
|
+
// Step 3: Install PostgreSQL if needed
|
|
350
|
+
await setupPostgreSQL();
|
|
351
|
+
|
|
352
|
+
// Step 4: Download infrastructure
|
|
353
|
+
const downloaded = await setupInfrastructure();
|
|
354
|
+
|
|
355
|
+
// Step 5: Start infrastructure
|
|
356
|
+
if (downloaded) {
|
|
357
|
+
await startInfrastructure();
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
// Step 6: Validate services
|
|
361
|
+
if (downloaded) {
|
|
362
|
+
await validateServices();
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
// Show summary
|
|
366
|
+
showSummary();
|
|
190
367
|
}
|
|
191
368
|
|
|
192
|
-
main
|
|
369
|
+
// Run main
|
|
370
|
+
main().catch((error) => {
|
|
371
|
+
console.error('\n❌ ERREUR FATALE:', error.message);
|
|
372
|
+
process.exit(1);
|
|
373
|
+
});
|