overmind-mcp 2.1.1 → 2.2.1

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.
@@ -1,17 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
3
  * ═══════════════════════════════════════════════════════════════════════════════
4
- * OVERMIND-MCP - POST-INSTALL AUTOMATIQUE
5
- * ═════════════════════════════════════════════════════════════════════════════
4
+ * OVERMIND-MCP - POST-INSTALL AUTOMATIQUE (SIMPLIFIÉ)
5
+ * ═══════════════════════════════════════════════════════════════════════════════
6
6
  * Script exécuté automatiquement après npm install -g overmind-mcp
7
- * INSTALLE ET DÉMARRE TOUT AUTOMATIQUEMENT :
7
+ * INSTALLE UNIQUEMENT :
8
8
  * - Vérifie Docker
9
9
  * - Installe PostgreSQL + pgvector (si absent)
10
10
  * - Copie .env.example → .env
11
11
  * - Copie .mcp.json.example → .mcp.json
12
- * - Télécharge et démarre TOUTE l'infrastructure Docker
13
- * - Valide tous les services
14
- * - Montre où les voir dans Docker Desktop
15
12
  * ═══════════════════════════════════════════════════════════════════════════════
16
13
  */
17
14
 
@@ -119,7 +116,7 @@ async function setupPostgreSQL() {
119
116
 
120
117
  // Check if already exists
121
118
  const existingContainer = runCommand(
122
- 'docker ps --filter "name=postgres-pgvector" --format "{{.Names}}"',
119
+ 'docker ps --filter "name=postgres" --format "{{.Names}}"',
123
120
  { stdio: 'pipe' }
124
121
  );
125
122
 
@@ -170,33 +167,17 @@ async function setupPostgreSQL() {
170
167
  }
171
168
  }
172
169
 
173
- async function setupInfrastructure() {
174
- logSection('TÉLÉCHARGEMENT INFRASTRUCTURE');
170
+ async function setupConfigFiles() {
171
+ logSection('TÉLÉCHARGEMENT CONFIGURATIONS');
175
172
 
176
173
  mkdirSync(INSTALL_DIR, { recursive: true });
177
174
 
178
- log(COLORS.yellow, '📥 Téléchargement fichiers docker-compose...');
175
+ log(COLORS.yellow, '📥 Téléchargement fichiers de configuration...');
179
176
 
180
- const composeUrl = 'https://raw.githubusercontent.com/DeamonDev888/overmind-mcp/main/docker-compose.yml';
181
- const exportersUrl = 'https://raw.githubusercontent.com/DeamonDev888/overmind-mcp/main/docker-compose.exporters.yml';
182
177
  const envExampleUrl = 'https://raw.githubusercontent.com/DeamonDev888/overmind-mcp/main/.env.example';
183
178
  const mcpExampleUrl = 'https://raw.githubusercontent.com/DeamonDev888/overmind-mcp/main/.mcp.json.example';
184
179
 
185
180
  try {
186
- // Télécharger docker-compose.yml
187
- const composeData = runCommand(`curl -sL ${composeUrl}`);
188
- if (composeData) {
189
- writeFileSync(join(INSTALL_DIR, 'docker-compose.yml'), composeData);
190
- log(COLORS.green, '✅ docker-compose.yml téléchargé');
191
- }
192
-
193
- // Télécharger docker-compose.exporters.yml
194
- const exportersData = runCommand(`curl -sL ${exportersUrl}`);
195
- if (exportersData) {
196
- writeFileSync(join(INSTALL_DIR, 'docker-compose.exporters.yml'), exportersData);
197
- log(COLORS.green, '✅ docker-compose.exporters.yml téléchargé');
198
- }
199
-
200
181
  // Télécharger .env.example
201
182
  const envExampleData = runCommand(`curl -sL ${envExampleUrl}`);
202
183
  if (envExampleData) {
@@ -218,6 +199,34 @@ async function setupInfrastructure() {
218
199
  }
219
200
  }
220
201
 
202
+ async function installPostgresMCP() {
203
+ logSection('INSTALLATION OVERMIND-POSTGRES-MCP');
204
+
205
+ log(COLORS.yellow, '📦 Installation du serveur MCP PostgreSQL...');
206
+
207
+ try {
208
+ // Vérifier si déjà installé
209
+ const checkInstalled = runCommand('npm list -g overmind-postgres-mcp', { stdio: 'pipe' });
210
+
211
+ if (checkInstalled && checkInstalled.includes('overmind-postgres-mcp')) {
212
+ log(COLORS.green, '✅ overmind-postgres-mcp déjà installé');
213
+ return true;
214
+ }
215
+
216
+ await runCommandAsync(
217
+ 'npm install -g overmind-postgres-mcp',
218
+ 'Installation overmind-postgres-mcp'
219
+ );
220
+
221
+ log(COLORS.green, '✅ overmind-postgres-mcp installé avec succès !');
222
+ return true;
223
+ } catch (error) {
224
+ log(COLORS.yellow, "⚠️ Erreur installation overmind-postgres-mcp: " + error.message);
225
+ log(COLORS.cyan, "💡 Vous pouvez l'installer manuellement: npm install -g overmind-postgres-mcp");
226
+ return false; // Non bloquant
227
+ }
228
+ }
229
+
221
230
  function createEnvConfig() {
222
231
  logSection('CRÉATION CONFIGURATION');
223
232
 
@@ -227,6 +236,7 @@ function createEnvConfig() {
227
236
  const envExampleFile = join(INSTALL_DIR, '.env.example');
228
237
  const mcpFile = join(INSTALL_DIR, '.mcp.json');
229
238
  const mcpExampleFile = join(INSTALL_DIR, '.mcp.json.example');
239
+ const postgresEnvFile = join(INSTALL_DIR, '.env.postgres');
230
240
 
231
241
  // Copier .env.example → .env si existe
232
242
  if (existsSync(envExampleFile) && !existsSync(envFile)) {
@@ -254,18 +264,53 @@ POSTGRES_HOST=localhost
254
264
  POSTGRES_PORT=5432
255
265
  POSTGRES_USER=postgres
256
266
  POSTGRES_PASSWORD=overmind_temp_password_change_me
257
- POSTGRES_DB=overmind
267
+ POSTGRES_DB=overmind_memory
268
+
269
+ # OverMind
270
+ OVERMIND_WORKSPACE=${INSTALL_DIR}
271
+ OVERMIND_MEMORY_TYPE=postgres
258
272
 
259
273
  # OpenTelemetry (optionnel)
260
274
  OTEL_ENABLED=false
261
-
262
- # Workspace
263
- OVERMIND_WORKSPACE=${INSTALL_DIR}
264
275
  `;
265
276
  writeFileSync(envFile, envContent);
266
277
  log(COLORS.green, '✅ Configuration .env créée: ' + envFile);
267
278
  }
268
279
 
280
+ // Créer .env.postgres pour overmind-postgres-mcp
281
+ if (!existsSync(postgresEnvFile)) {
282
+ const postgresEnvContent = `# OverMind-PostgreSQL-MCP Configuration
283
+ # Généré automatiquement par OverMind-MCP
284
+
285
+ # Activer la base de données
286
+ USE_DATABASE=true
287
+
288
+ # PostgreSQL Configuration (compatible OverMind)
289
+ POSTGRES_HOST=localhost
290
+ POSTGRES_PORT=5432
291
+ POSTGRES_DATABASE=overmind_memory
292
+ POSTGRES_USER=postgres
293
+ POSTGRES_PASSWORD=overmind_temp_password_change_me
294
+
295
+ # Additional PostgreSQL Settings
296
+ POSTGRES_SSL=false
297
+ POSTGRES_MAX_CONNECTIONS=10
298
+ POSTGRES_IDLE_TIMEOUT=30000
299
+
300
+ # Environment
301
+ NODE_ENV=production
302
+
303
+ # OpenRouter Configuration (Qwen3 Embedding 8B - 4096D)
304
+ OPENROUTER_API_KEY=sk-or-v1-your_key_here
305
+ OPENROUTER_MODEL=qwen/qwen3-embedding-8b
306
+ EMBEDDING_PROVIDER=openrouter
307
+ EMBEDDING_DIMENSIONS=4096
308
+ EMBEDDING_CACHE_SIZE=1000
309
+ `;
310
+ writeFileSync(postgresEnvFile, postgresEnvContent);
311
+ log(COLORS.green, '✅ Configuration .env.postgres créée: ' + postgresEnvFile);
312
+ }
313
+
269
314
  // Copier .mcp.json.example → .mcp.json si existe
270
315
  if (existsSync(mcpExampleFile) && !existsSync(mcpFile)) {
271
316
  let mcpContent;
@@ -283,78 +328,54 @@ OVERMIND_WORKSPACE=${INSTALL_DIR}
283
328
  }
284
329
  }
285
330
 
286
- async function startInfrastructure() {
287
- logSection('DÉMARRAGE AUTOMATIQUE INFRASTRUCTURE COMPLÈTE');
331
+ async function startPostgreSQL() {
332
+ logSection('DÉMARRAGE POSTGRESQL + PGVECTOR');
288
333
 
289
- const composeFile = join(INSTALL_DIR, 'docker-compose.yml');
334
+ try {
335
+ const existingContainer = runCommand(
336
+ 'docker ps --filter "name=overmind-postgres-pgvector" --format "{{.Names}}"',
337
+ { stdio: 'pipe' }
338
+ );
290
339
 
291
- if (!existsSync(composeFile)) {
292
- log(COLORS.yellow, '⚠️ docker-compose.yml non trouvé. Téléchargement...');
293
- const downloaded = await setupInfrastructure();
294
- if (!downloaded) {
295
- return false;
340
+ if (existingContainer) {
341
+ log(COLORS.green, ' PostgreSQL + pgvector déjà démarré');
342
+ return true;
296
343
  }
297
- }
298
344
 
299
- try {
300
- log(COLORS.yellow, '🚀 Démarrage automatique de TOUS les services...');
301
- log(COLORS.cyan, ' (PostgreSQL, RabbitMQ, Temporal, Prometheus, Grafana, Jaeger, Redis)');
302
-
303
- await runCommandAsync(
304
- `cd "${INSTALL_DIR}" && docker-compose -f docker-compose.yml pull`,
305
- 'Téléchargement images Docker'
306
- );
345
+ log(COLORS.yellow, '🚀 Démarrage PostgreSQL + pgvector...');
307
346
 
308
347
  await runCommandAsync(
309
- `cd "${INSTALL_DIR}" && docker-compose -f docker-compose.yml up -d`,
310
- 'Démarrage infrastructure complète'
348
+ 'docker run -d --name overmind-postgres-pgvector -p 5432:5432 -e POSTGRES_PASSWORD=overmind_temp_password_change_me -e POSTGRES_USER=postgres -v overmind_postgres_data:/var/lib/postgresql/data --restart unless-stopped pgvector/pgvector:pg16',
349
+ 'Démarrage PostgreSQL'
311
350
  );
312
351
 
313
- log(COLORS.cyan, '\n⏳ Attente démarrage des services (20s)...');
352
+ log(COLORS.cyan, '\n⏳ Attente démarrage PostgreSQL (20s)...');
314
353
  await new Promise(resolve => setTimeout(resolve, 20000));
315
354
 
316
355
  return true;
317
356
  } catch (error) {
318
- log(COLORS.red, '\n⚠️ Erreur démarrage infrastructure: ' + error.message);
319
- log(COLORS.yellow, '\n💡 Solution manuelle:');
320
- log(COLORS.white, ' cd ~/.overmind');
321
- log(COLORS.white, ' docker-compose up -d');
357
+ log(COLORS.red, '\n⚠️ Erreur démarrage PostgreSQL: ' + error.message);
322
358
  return false;
323
359
  }
324
360
  }
325
361
 
326
- async function validateServices() {
327
- logSection('VALIDATION DES SERVICES');
328
-
329
- log(COLORS.yellow, '🔍 Vérification des containers Docker...\n');
330
-
331
- const services = [
332
- { name: 'PostgreSQL + pgvector', filter: 'postgres', color: COLORS.green },
333
- { name: 'RabbitMQ', filter: 'rabbitmq', color: COLORS.green },
334
- { name: 'Temporal', filter: 'temporal', color: COLORS.green },
335
- { name: 'Prometheus', filter: 'prometheus', color: COLORS.green },
336
- { name: 'Grafana', filter: 'grafana', color: COLORS.green },
337
- { name: 'Jaeger', filter: 'jaeger', color: COLORS.green },
338
- { name: 'Redis', filter: 'redis', color: COLORS.green },
339
- ];
362
+ async function validatePostgreSQL() {
363
+ logSection('VALIDATION POSTGRESQL');
340
364
 
341
- let allRunning = true;
365
+ log(COLORS.yellow, '🔍 Vérification PostgreSQL + pgvector...\n');
342
366
 
343
- for (const service of services) {
344
- const containerName = runCommand(
345
- `docker ps --filter "name=${service.filter}" --format "{{.Names}}"`,
346
- { stdio: 'pipe' }
347
- );
367
+ const containerName = runCommand(
368
+ 'docker ps --filter "name=postgres" --format "{{.Names}}"',
369
+ { stdio: 'pipe' }
370
+ );
348
371
 
349
- if (containerName) {
350
- log(service.color, ` ✅ ${service.name}: ${containerName.trim()}`);
351
- } else {
352
- log(COLORS.red, ` ❌ ${service.name}: Non trouvé`);
353
- allRunning = false;
354
- }
372
+ if (containerName) {
373
+ log(COLORS.green, ` ✅ PostgreSQL + pgvector: ${containerName.trim()}`);
374
+ return true;
375
+ } else {
376
+ log(COLORS.red, ' ❌ PostgreSQL + pgvector: Non trouvé');
377
+ return false;
355
378
  }
356
-
357
- return allRunning;
358
379
  }
359
380
 
360
381
  function showSummary() {
@@ -364,34 +385,42 @@ function showSummary() {
364
385
  console.log('║' + ' '.repeat(64) + '║');
365
386
  console.log('╚══════════════════════════════════════════════════════════════════╝');
366
387
  console.log('');
367
- log(COLORS.yellow, '📋 SERVICES ACTIFS DANS DOCKER DESKTOP:');
388
+ log(COLORS.yellow, "📋 COMPOSANTS INSTALLÉS:");
368
389
  console.log('');
369
390
  console.log('┌─────────────────────────────────────────────────────────────────┐');
370
391
  console.log('│ ' + COLORS.cyan + 'Ouvrez Docker Desktop → onglet "Containers"' + COLORS.reset + ' │');
371
- console.log('│ ' + COLORS.cyan + 'Vous verrez tous les services OverMind actifs:' + COLORS.reset + ' │');
372
- console.log('│ ' + COLORS.green + ' • PostgreSQL + pgvector' + COLORS.reset + ' │');
373
- console.log('│ ' + COLORS.green + ' • RabbitMQ (Message Broker)' + COLORS.reset + ' │');
374
- console.log('│ ' + COLORS.green + ' • Temporal (Workflow Engine)' + COLORS.reset + ' │');
375
- console.log('│ ' + COLORS.green + ' • Prometheus (Métriques)' + COLORS.reset + ' │');
376
- console.log('│ ' + COLORS.green + ' • Grafana (Dashboards)' + COLORS.reset + ' │');
377
- console.log('│ ' + COLORS.green + ' • Jaeger (Tracing)' + COLORS.reset + ' │');
378
- console.log('│ ' + COLORS.green + ' • Redis (Cache)' + COLORS.reset + ' │');
392
+ console.log('│ ' + COLORS.cyan + 'Vous verrez le service OverMind actif:' + COLORS.reset + ' │');
393
+ console.log('│ ' + COLORS.green + ' • PostgreSQL + pgvector (Mémoire Vectorielle)' + COLORS.reset + ' │');
394
+ console.log('│ │');
395
+ console.log('│ ' + COLORS.green + ' • overmind-postgres-mcp (Serveur MCP PostgreSQL)' + COLORS.reset + ' │');
379
396
  console.log('│ │');
380
- console.log('│ ' + COLORS.yellow + 'URLs utiles:' + COLORS.reset + ' │');
381
- console.log('│ • Prometheus: ' + COLORS.cyan + 'http://localhost:9090' + COLORS.reset + ' │');
382
- console.log('│ • Grafana: ' + COLORS.cyan + 'http://localhost:3000' + COLORS.reset + ' (admin/admin)' + ' │');
383
- console.log('│ • Jaeger: ' + COLORS.cyan + 'http://localhost:16686' + COLORS.reset + ' │');
384
- console.log('│ • RabbitMQ: ' + COLORS.cyan + 'http://localhost:15672' + COLORS.reset + ' (guest/guest)' + ' │');
385
- console.log('│ • Temporal: ' + COLORS.cyan + 'http://localhost:8233' + COLORS.reset + ' │');
397
+ console.log('│ ' + COLORS.yellow + 'Détails de connexion:' + COLORS.reset + ' │');
398
+ console.log('│ • Host: localhost:5432' + ' │');
399
+ console.log('│ • User: postgres' + ' │');
400
+ console.log('│ • Password: overmind_temp_password_change_me CHANGER !)' + ' │');
401
+ console.log('│ • Extension: vector (pgvector)' + ' │');
402
+ console.log('│ • Database: overmind_memory' + ' │');
386
403
  console.log('└─────────────────────────────────────────────────────────────────┘');
387
404
  console.log('');
388
- log(COLORS.yellow, '📚 DOCUMENTATION:');
389
- console.log('https://github.com/DeamonDev888/overmind-mcp');
390
- console.log('https://www.npmjs.com/package/overmind-mcp');
405
+ log(COLORS.yellow, "📁 FICHIERS DE CONFIGURATION:");
406
+ console.log("~/.overmind/.env (Configuration OverMind)");
407
+ console.log("~/.overmind/.env.postgres (Configuration PostgreSQL MCP)");
408
+ console.log(" • ~/.overmind/.mcp.json (Configuration serveurs MCP)");
409
+ console.log('');
410
+ log(COLORS.yellow, "🔧 SERVEURS MCP ACTIFS:");
411
+ console.log(" • overmind (Orchestration d'agents)");
412
+ console.log(" • memory (Gestion mémoire vectorielle)");
413
+ console.log(" • overmind-postgres (PostgreSQL vectoriel)");
414
+ console.log('');
415
+ log(COLORS.yellow, "📚 DOCUMENTATION:");
416
+ console.log(" • https://github.com/DeamonDev888/overmind-mcp");
417
+ console.log(" • https://www.npmjs.com/package/overmind-mcp");
418
+ console.log(" • https://github.com/DeamonDev888/PostgreSQL-MCP-Serveur");
391
419
  console.log('');
392
- log(COLORS.yellow, '🎉 PROCHAINE ÉTAPE:');
393
- console.log(' • Créez votre premier agent: overmind create-agent');
394
- console.log(' • Ou listez les agents: overmind list-agents');
420
+ log(COLORS.yellow, "🎉 PROCHAINE ÉTAPE:");
421
+ console.log(" • Créez votre premier agent: overmind create-agent");
422
+ console.log(" • Ou listez les agents: overmind list-agents");
423
+ console.log(" • Gestion PostgreSQL: overmind-postgres up/status/down");
395
424
  console.log('');
396
425
  }
397
426
 
@@ -411,12 +440,12 @@ async function main() {
411
440
  console.log(COLORS.cyan + 'Ce script VA installer automatiquement:' + COLORS.reset);
412
441
  console.log(' ✓ Vérifier Docker');
413
442
  console.log(' ✓ Installer PostgreSQL + pgvector (si absent)');
414
- console.log(' ✓ Télécharger docker-compose.yml et configs');
415
- console.log(' ✓ Démarrer TOUS les services Docker automatiquement');
443
+ console.log(' ✓ Télécharger fichiers de configuration');
444
+ console.log(' ✓ Installer overmind-postgres-mcp');
445
+ console.log(' ✓ Démarrer PostgreSQL + pgvector');
416
446
  console.log(' ✓ Copier .env.example → .env');
417
447
  console.log(' ✓ Copier .mcp.json.example → .mcp.json');
418
- console.log(' ✓ Valider tous les services');
419
- console.log(' ✓ Montrer où les voir dans Docker Desktop');
448
+ console.log(' ✓ Valider PostgreSQL');
420
449
  console.log('');
421
450
 
422
451
  // Step 1: Check Docker
@@ -431,26 +460,30 @@ async function main() {
431
460
  // Step 3: Setup .env et .mcp.json
432
461
  createEnvConfig();
433
462
 
434
- // Step 4: Download infrastructure files
435
- const downloaded = await setupInfrastructure();
463
+ // Step 4: Download config files
464
+ const downloaded = await setupConfigFiles();
465
+
466
+ // Step 5: Install overmind-postgres-mcp
467
+ if (downloaded) {
468
+ await installPostgresMCP();
469
+ }
436
470
 
437
- // Step 5: Start ALL services automatically
471
+ // Step 6: Start PostgreSQL
438
472
  if (downloaded) {
439
- const started = await startInfrastructure();
473
+ const started = await startPostgreSQL();
440
474
  if (!started) {
441
- log(COLORS.yellow, '\n⚠️ Infrastructure non démarrée automatiquement.');
442
- log(COLORS.yellow, ' PostgreSQL fonctionne, mais les autres services ne sont pas actifs.');
475
+ log(COLORS.yellow, '\n⚠️ PostgreSQL non démarré automatiquement.');
443
476
  }
444
477
  }
445
478
 
446
- // Step 6: Validate ALL services
479
+ // Step 7: Validate PostgreSQL
447
480
  if (downloaded) {
448
- const allOk = await validateServices();
449
- if (allOk) {
450
- logSection('✅ TOUS LES SERVICES SONT ACTIFS');
451
- log(COLORS.green, '🎉 Installation complète réussie !');
481
+ const ok = await validatePostgreSQL();
482
+ if (ok) {
483
+ logSection('✅ POSTGRESQL + PGVECTOR EST ACTIF');
484
+ log(COLORS.green, '🎉 Installation réussie !');
452
485
  } else {
453
- logSection('⚠️ CERTAINS SERVICES NON DÉMARRÉS');
486
+ logSection('⚠️ POSTGRESQL NON DÉMARRÉ');
454
487
  }
455
488
  }
456
489
 
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
3
  * ═══════════════════════════════════════════════════════════════════════════════
4
- * SETUP WINDOWS SCRIPT
4
+ * SETUP WINDOWS SCRIPT (SIMPLIFIÉ)
5
5
  * ═══════════════════════════════════════════════════════════════════════════════
6
6
  * Script d'installation automatique pour OverMind-MCP sur Windows
7
- * avec PostgreSQL + pgvector existant en Docker.
7
+ * avec PostgreSQL + pgvector uniquement.
8
8
  *
9
9
  * Usage:
10
10
  * node scripts/setup-windows.js
@@ -136,13 +136,27 @@ async function setupDatabase() {
136
136
  );
137
137
  }
138
138
 
139
- function startDockerServices() {
140
- logSection('DÉMARRAGE SERVICES DOCKER');
139
+ async function startDockerServices() {
140
+ logSection('VÉRIFICATION POSTGRESQL');
141
141
 
142
- return runCommand(
143
- 'docker-compose -f docker-compose.overmind.yml up -d',
144
- 'Démarrage RabbitMQ + Temporal'
145
- );
142
+ try {
143
+ const containers = execSync(
144
+ 'docker ps --filter "name=postgres" --format "{{.Names}}"',
145
+ { encoding: 'utf8' }
146
+ ).trim();
147
+
148
+ if (containers) {
149
+ console.log(`✅ PostgreSQL détecté: ${containers}`);
150
+ return true;
151
+ } else {
152
+ console.log('⚠️ PostgreSQL non démarré. Démarrez-le avec:');
153
+ console.log(' docker start overmind-postgres-pgvector');
154
+ return false;
155
+ }
156
+ } catch (error) {
157
+ console.error('❌ Impossible de vérifier PostgreSQL');
158
+ return false;
159
+ }
146
160
  }
147
161
 
148
162
  function buildProject() {
@@ -171,7 +185,7 @@ async function main() {
171
185
  console.log('╔══════════════════════════════════════════════════════════════════╗');
172
186
  console.log('║ ║');
173
187
  console.log('║ OVERMIND-MCP: SETUP WINDOWS AUTOMATISÉ ║');
174
- console.log('║ (PostgreSQL Existant + Docker) ║');
188
+ console.log('║ (PostgreSQL + pgvector uniquement) ║');
175
189
  console.log('║ ║');
176
190
  console.log('╚══════════════════════════════════════════════════════════════════╝');
177
191
  console.log('');
@@ -198,13 +212,6 @@ async function main() {
198
212
  process.exit(1);
199
213
  }
200
214
 
201
- // Start Docker services
202
- const dockerStarted = startDockerServices();
203
- if (!dockerStarted) {
204
- console.log('\n❌ ERREUR DÉMARRAGE SERVICES DOCKER');
205
- process.exit(1);
206
- }
207
-
208
215
  // Build project
209
216
  const projectBuilt = buildProject();
210
217
  if (!projectBuilt) {
@@ -221,16 +228,13 @@ async function main() {
221
228
  console.log(`
222
229
  🎉 OVERMIND-MCP EST PRÊT !
223
230
 
224
- 📋 SERVICES DÉMARRÉS:
225
- ✅ PostgreSQL (votre container existant)
226
- ✅ RabbitMQ (Message Broker)
227
- ✅ Temporal (Workflow Orchestrator)
228
- ✅ OverMind Agents (prêt à démarrer)
231
+ 📋 SERVICE DÉMARRÉ:
232
+ ✅ PostgreSQL + pgvector (Mémoire Vectorielle)
229
233
 
230
- 🌐 INTERFACES DISPONIBLES:
231
- 📊 RabbitMQ: http://localhost:15672
232
- 📈 Temporal: http://localhost:8088
234
+ 🌐 CONNEXION:
233
235
  🗄️ PostgreSQL: localhost:5432
236
+ 👤 User: postgres
237
+ 🔑 Password: overmind_temp_password_change_me (À CHANGER !)
234
238
 
235
239
  🚀 POUR DÉMARRER OVERMIND:
236
240
  pnpm run dev # Mode développement
@@ -238,8 +242,6 @@ async function main() {
238
242
 
239
243
  📚 DOCUMENTATION:
240
244
  - SETUP_WINDOWS.md (guide complet)
241
- - DEPLOYMENT.md (déploiement avancé)
242
- - SWARM_USAGE.md (utilisation Swarm)
243
245
 
244
246
  💡 PREMIER TEST:
245
247
  create_agent({
package/scripts/setup.mjs CHANGED
File without changes
@@ -0,0 +1,158 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * ═══════════════════════════════════════════════════════════════════════════════
4
+ * TEST INSTALLATION OVERMIND-MCP
5
+ * ═══════════════════════════════════════════════════════════════════════════════
6
+ * Script de vérification de l'installation complète d'OverMind-MCP
7
+ *
8
+ * Usage:
9
+ * node scripts/test-installation.mjs
10
+ * ═══════════════════════════════════════════════════════════════════════════════
11
+ */
12
+
13
+ import { execSync } from 'child_process';
14
+ import { existsSync } from 'fs';
15
+ import { join } from 'path';
16
+ import { fileURLToPath } from 'url';
17
+ import { dirname } from 'path';
18
+
19
+ const __filename = fileURLToPath(import.meta.url);
20
+ const __dirname = dirname(__filename);
21
+
22
+ const INSTALL_DIR = join(
23
+ process.env.HOME || process.env.USERPROFILE || process.env.HOMEPATH,
24
+ '.overmind'
25
+ );
26
+
27
+ function logSection(title) {
28
+ console.log('\n╔══════════════════════════════════════════════════════════════════╗');
29
+ console.log(`║ ${title.padEnd(64)} ║`);
30
+ console.log('╚══════════════════════════════════════════════════════════════════╝');
31
+ }
32
+
33
+ function runCommand(cmd) {
34
+ try {
35
+ return execSync(cmd, { stdio: 'pipe', encoding: 'utf8' });
36
+ } catch {
37
+ return null;
38
+ }
39
+ }
40
+
41
+ async function testInstallation() {
42
+ console.log('╔══════════════════════════════════════════════════════════════════╗');
43
+ console.log('║ ║');
44
+ console.log('║ 🧪 TEST INSTALLATION OVERMIND-MCP ║');
45
+ console.log('║ ║');
46
+ console.log('╚══════════════════════════════════════════════════════════════════╝');
47
+ console.log('');
48
+
49
+ const results = {
50
+ docker: false,
51
+ postgres: false,
52
+ postgresMCP: false,
53
+ configFiles: false,
54
+ connection: false
55
+ };
56
+
57
+ // Test 1: Docker
58
+ logSection('TEST 1: DOCKER');
59
+ const dockerVersion = runCommand('docker --version');
60
+ if (dockerVersion) {
61
+ console.log('✅ Docker installé:', dockerVersion.trim());
62
+ results.docker = true;
63
+ } else {
64
+ console.log('❌ Docker NON installé');
65
+ }
66
+
67
+ // Test 2: PostgreSQL Container
68
+ logSection('TEST 2: POSTGRESQL CONTAINER');
69
+ const postgresContainer = runCommand('docker ps --filter "name=postgres" --format "{{.Names}}"');
70
+ if (postgresContainer) {
71
+ console.log('✅ PostgreSQL container actif:', postgresContainer.trim());
72
+ results.postgres = true;
73
+ } else {
74
+ console.log('❌ PostgreSQL container NON actif');
75
+ }
76
+
77
+ // Test 3: overmind-postgres-mcp
78
+ logSection('TEST 3: OVERMIND-POSTGRES-MCP');
79
+ const postgresMCP = runCommand('npm list -g overmind-postgres-mcp');
80
+ if (postgresMCP && postgresMCP.includes('overmind-postgres-mcp')) {
81
+ console.log('✅ overmind-postgres-mcp installé');
82
+ results.postgresMCP = true;
83
+ } else {
84
+ console.log('❌ overmind-postgres-mcp NON installé');
85
+ }
86
+
87
+ // Test 4: Fichiers de configuration
88
+ logSection('TEST 4: FICHIERS DE CONFIGURATION');
89
+ const envFile = join(INSTALL_DIR, '.env');
90
+ const postgresEnvFile = join(INSTALL_DIR, '.env.postgres');
91
+ const mcpFile = join(INSTALL_DIR, '.mcp.json');
92
+
93
+ const filesExist = existsSync(envFile) && existsSync(postgresEnvFile) && existsSync(mcpFile);
94
+ if (filesExist) {
95
+ console.log('✅ Fichiers de configuration créés:');
96
+ console.log(' • .env');
97
+ console.log(' • .env.postgres');
98
+ console.log(' • .mcp.json');
99
+ results.configFiles = true;
100
+ } else {
101
+ console.log('❌ Fichiers de configuration manquants');
102
+ }
103
+
104
+ // Test 5: Connexion PostgreSQL
105
+ logSection('TEST 5: CONNEXION POSTGRESQL');
106
+ if (results.postgres) {
107
+ try {
108
+ const pgVersion = execSync('docker exec overmind-postgres-pgvector psql -U postgres -t -c "SELECT version();"');
109
+ if (pgVersion) {
110
+ console.log('✅ Connexion PostgreSQL réussie');
111
+ results.connection = true;
112
+ }
113
+ } catch {
114
+ console.log('❌ Connexion PostgreSQL échouée');
115
+ }
116
+ } else {
117
+ console.log('⏭️ Test ignoré (PostgreSQL non actif)');
118
+ }
119
+
120
+ // Résultat final
121
+ logSection('RÉSULTAT FINAL');
122
+ const totalTests = Object.keys(results).length;
123
+ const passedTests = Object.values(results).filter(Boolean).length;
124
+
125
+ console.log(`Tests passés: ${passedTests}/${totalTests}`);
126
+ console.log('');
127
+
128
+ if (passedTests === totalTests) {
129
+ console.log('🎉 INSTALLATION PARFAITE ! OverMind-MCP est prêt à l\'emploi.');
130
+ console.log('');
131
+ console.log('📋 Prochaines étapes:');
132
+ console.log(' 1. Créez votre premier agent: overmind create-agent');
133
+ console.log(' 2. Listez les agents: overmind list-agents');
134
+ console.log(' 3. Testez la mémoire: overmind memory-store "Test"');
135
+ } else {
136
+ console.log('⚠️ CERTAINS TESTS ONT ÉCHOUÉ. Vérifiez les erreurs ci-dessus.');
137
+ console.log('');
138
+ console.log('💡 Solutions possibles:');
139
+ if (!results.docker) {
140
+ console.log(' • Installez Docker: https://www.docker.com/products/docker-desktop/');
141
+ }
142
+ if (!results.postgres) {
143
+ console.log(' • Démarrez PostgreSQL: overmind-postgres up');
144
+ }
145
+ if (!results.postgresMCP) {
146
+ console.log(' • Installez le MCP: npm install -g overmind-postgres-mcp');
147
+ }
148
+ if (!results.configFiles) {
149
+ console.log(' • Lancez: npm install -g overmind-mcp');
150
+ }
151
+ }
152
+ }
153
+
154
+ // Run tests
155
+ testInstallation().catch(error => {
156
+ console.error('❌ ERREUR:', error.message);
157
+ process.exit(1);
158
+ });