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.
- package/dist/bin/cli.js +0 -0
- package/package.json +125 -129
- package/scripts/install-dependencies.mjs +4 -4
- package/scripts/postgres-manager.mjs +219 -0
- package/scripts/postinstall.mjs +152 -119
- package/scripts/setup-windows.js +28 -26
- package/scripts/setup.mjs +0 -0
- package/scripts/test-installation.mjs +158 -0
- package/scripts/uninstall.mjs +33 -6
- package/scripts/docker-manager.mjs +0 -200
package/scripts/uninstall.mjs
CHANGED
|
@@ -69,20 +69,42 @@ function cmd(command, label) {
|
|
|
69
69
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
70
70
|
|
|
71
71
|
function listContainers() {
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
// ⚠️ CORRECTION CRITIQUE: Ne cibler que les containers OverMind, pas les containers personnels
|
|
73
|
+
// Les containers personnels comme "postgres-pgvector" ne doivent JAMAIS être supprimés
|
|
74
|
+
const overmindContainers = [
|
|
75
|
+
'overmind-postgres-pgvector', // Container créé par OverMind 2.2.0+
|
|
76
|
+
'overmind-rabbitmq', // Ancien container OverMind
|
|
77
|
+
'overmind-temporal', // Ancien container OverMind
|
|
78
|
+
'overmind-temporal-web', // Ancien container OverMind
|
|
79
|
+
'overmind-postgres', // Variant possible
|
|
80
|
+
'overmind-redis', // Variant possible
|
|
81
|
+
'overmind-prometheus', // Variant possible
|
|
82
|
+
'overmind-grafana', // Variant possible
|
|
83
|
+
'overmind-jaeger' // Variant possible
|
|
84
|
+
];
|
|
85
|
+
|
|
86
|
+
return overmindContainers.filter((containerName) => {
|
|
74
87
|
try {
|
|
75
|
-
execSync(`docker inspect ${
|
|
88
|
+
execSync(`docker inspect ${containerName}`, { stdio: 'pipe' });
|
|
76
89
|
return true;
|
|
77
90
|
} catch { return false; }
|
|
78
91
|
});
|
|
79
92
|
}
|
|
80
93
|
|
|
81
94
|
function listVolumes() {
|
|
82
|
-
|
|
83
|
-
|
|
95
|
+
// ⚠️ CORRECTION CRITIQUE: Ne cibler que les volumes OverMind, pas les volumes personnels
|
|
96
|
+
const overmindVolumes = [
|
|
97
|
+
'overmind_postgres_data', // Volume créé par OverMind 2.2.0+
|
|
98
|
+
'overmind-rabbitmq_data', // Ancien volume OverMind
|
|
99
|
+
'overmind-temporal_data', // Ancien volume OverMind
|
|
100
|
+
'overmind_prometheus_data', // Ancien volume OverMind
|
|
101
|
+
'overmind-grafana_data', // Ancien volume OverMind
|
|
102
|
+
'overmind-jaeger_data' // Ancien volume OverMind
|
|
103
|
+
];
|
|
104
|
+
|
|
105
|
+
return overmindVolumes.filter((volumeName) => {
|
|
84
106
|
try {
|
|
85
|
-
execSync(`docker volume inspect ${
|
|
107
|
+
execSync(`docker volume inspect ${volumeName}`, { stdio: 'pipe' });
|
|
86
108
|
return true;
|
|
87
109
|
} catch { return false; }
|
|
88
110
|
});
|
|
@@ -109,6 +131,11 @@ async function main() {
|
|
|
109
131
|
console.log(`║ ║`);
|
|
110
132
|
console.log(`╚${'═'.repeat(68)}╝`);
|
|
111
133
|
|
|
134
|
+
// ⚠️ AVERTISSEMENT DE SÉCURITÉ
|
|
135
|
+
console.log('\n⚠️ SÉCURITÉ: Ce script ne supprime QUE les containers/volumes OverMind.');
|
|
136
|
+
console.log(' Vos containers personnels (comme postgres-pgvector) sont PROTÉGÉS.');
|
|
137
|
+
console.log(' Seuls les containers commençant par "overmind-" seront supprimés.\n');
|
|
138
|
+
|
|
112
139
|
// ── 1. Containers actifs ──────────────────────────────────────────────
|
|
113
140
|
const containers = listContainers();
|
|
114
141
|
const volumes = listVolumes();
|
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* ═══════════════════════════════════════════════════════════════════════════════
|
|
4
|
-
* DOCKER-MANAGER - Gestion Simplifiée Docker Compose
|
|
5
|
-
* ═══════════════════════════════════════════════════════════════════════════════
|
|
6
|
-
* Gère les services Docker OverMind via des commandes simples
|
|
7
|
-
*
|
|
8
|
-
* Usage:
|
|
9
|
-
* overmind-infra up Démarrer les services
|
|
10
|
-
* overmind-infra down Arrêter les services
|
|
11
|
-
* overmind-infra status Vérifier l'état
|
|
12
|
-
* overmind-infra logs Voir les logs
|
|
13
|
-
* ═══════════════════════════════════════════════════════════════════════════════
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
import { execSync } from 'child_process';
|
|
17
|
-
import { existsSync } from 'fs';
|
|
18
|
-
import { join } from 'path';
|
|
19
|
-
import { fileURLToPath } from 'url';
|
|
20
|
-
import { dirname } from 'path';
|
|
21
|
-
|
|
22
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
23
|
-
const __dirname = dirname(__filename);
|
|
24
|
-
|
|
25
|
-
// Try to find .overmind directory, fallback to current directory
|
|
26
|
-
let INSTALL_DIR = join(process.env.HOME || process.env.USERPROFILE || process.env.HOMEPATH, '.overmind');
|
|
27
|
-
|
|
28
|
-
// If we're running from NPM package, check the install directory
|
|
29
|
-
if (!existsSync(INSTALL_DIR)) {
|
|
30
|
-
// Try to find relative to node_modules/overmind-mcp
|
|
31
|
-
const possiblePath = join(__dirname, '..', '.overmind');
|
|
32
|
-
if (existsSync(possiblePath)) {
|
|
33
|
-
INSTALL_DIR = possiblePath;
|
|
34
|
-
} else {
|
|
35
|
-
// Fallback to home directory
|
|
36
|
-
INSTALL_DIR = join(process.env.HOME || process.env.USERPROFILE, '.overmind');
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
const COMPOSE_FILE = join(INSTALL_DIR, 'docker-compose.overmind.yml');
|
|
41
|
-
|
|
42
|
-
// ═══════════════════════════════════════════════════════════════════════════════
|
|
43
|
-
// COMMANDS
|
|
44
|
-
// ═══════════════════════════════════════════════════════════════════════════════
|
|
45
|
-
|
|
46
|
-
function commandUp() {
|
|
47
|
-
console.log('🚀 Démarrage infrastructure Docker OverMind...');
|
|
48
|
-
console.log('');
|
|
49
|
-
|
|
50
|
-
if (!existsSync(COMPOSE_FILE)) {
|
|
51
|
-
console.error('❌ Fichier non trouvé:', COMPOSE_FILE);
|
|
52
|
-
console.error(' → Lancez d\'abord: overmind-setup');
|
|
53
|
-
process.exit(1);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
try {
|
|
57
|
-
execSync(`docker-compose -f "${COMPOSE_FILE}" up -d`, { stdio: 'inherit' });
|
|
58
|
-
console.log('');
|
|
59
|
-
console.log('✅ Services démarrés avec succès !');
|
|
60
|
-
console.log('');
|
|
61
|
-
console.log('🌐 Interfaces disponibles:');
|
|
62
|
-
console.log(' 📊 RabbitMQ Management: http://localhost:15672');
|
|
63
|
-
console.log(' 📈 Temporal Web UI: http://localhost:8233');
|
|
64
|
-
console.log(' 👤 User: overmind / Pass: overmind_secret_password_change_me');
|
|
65
|
-
console.log('');
|
|
66
|
-
} catch (error) {
|
|
67
|
-
console.error('❌ Erreur démarrage services:', error.message);
|
|
68
|
-
process.exit(1);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
function commandDown() {
|
|
73
|
-
console.log('🛑 Arrêt infrastructure Docker OverMind...');
|
|
74
|
-
console.log('');
|
|
75
|
-
|
|
76
|
-
if (!existsSync(COMPOSE_FILE)) {
|
|
77
|
-
console.error('❌ Fichier non trouvé:', COMPOSE_FILE);
|
|
78
|
-
process.exit(1);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
try {
|
|
82
|
-
execSync(`docker-compose -f "${COMPOSE_FILE}" down`, { stdio: 'inherit' });
|
|
83
|
-
console.log('');
|
|
84
|
-
console.log('✅ Services arrêtés avec succès !');
|
|
85
|
-
console.log('');
|
|
86
|
-
console.log('💡 Les données sont conservées dans les volumes Docker.');
|
|
87
|
-
} catch (error) {
|
|
88
|
-
console.error('❌ Erreur arrêt services:', error.message);
|
|
89
|
-
process.exit(1);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
function commandStatus() {
|
|
94
|
-
console.log('📊 État infrastructure Docker OverMind:');
|
|
95
|
-
console.log('');
|
|
96
|
-
|
|
97
|
-
if (!existsSync(COMPOSE_FILE)) {
|
|
98
|
-
console.error('❌ Fichier non trouvé:', COMPOSE_FILE);
|
|
99
|
-
console.log(' → Lancez d\'abord: overmind-setup');
|
|
100
|
-
process.exit(1);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
try {
|
|
104
|
-
execSync(`docker-compose -f "${COMPOSE_FILE}" ps`, { stdio: 'inherit' });
|
|
105
|
-
} catch (error) {
|
|
106
|
-
console.error('❌ Erreur vérification état:', error.message);
|
|
107
|
-
process.exit(1);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
function commandLogs() {
|
|
112
|
-
console.log('📋 Logs infrastructure Docker OverMind:');
|
|
113
|
-
console.log('');
|
|
114
|
-
console.log(' (Ctrl+C pour sortir)');
|
|
115
|
-
console.log('');
|
|
116
|
-
|
|
117
|
-
if (!existsSync(COMPOSE_FILE)) {
|
|
118
|
-
console.error('❌ Fichier non trouvé:', COMPOSE_FILE);
|
|
119
|
-
process.exit(1);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
try {
|
|
123
|
-
execSync(`docker-compose -f "${COMPOSE_FILE}" logs -f`, { stdio: 'inherit' });
|
|
124
|
-
} catch (error) {
|
|
125
|
-
// Ignore Ctrl+C
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
function commandRestart() {
|
|
130
|
-
console.log('🔄 Redémarrage infrastructure Docker OverMind...');
|
|
131
|
-
console.log('');
|
|
132
|
-
|
|
133
|
-
if (!existsSync(COMPOSE_FILE)) {
|
|
134
|
-
console.error('❌ Fichier non trouvé:', COMPOSE_FILE);
|
|
135
|
-
process.exit(1);
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
try {
|
|
139
|
-
execSync(`docker-compose -f "${COMPOSE_FILE}" restart`, { stdio: 'inherit' });
|
|
140
|
-
console.log('');
|
|
141
|
-
console.log('✅ Services redémarrés avec succès !');
|
|
142
|
-
} catch (error) {
|
|
143
|
-
console.error('❌ Erreur redémarrage:', error.message);
|
|
144
|
-
process.exit(1);
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
function showHelp() {
|
|
149
|
-
console.log('╔══════════════════════════════════════════════════════════════════╗');
|
|
150
|
-
console.log('║ OVERMIND-INFRA: Gestion Docker Compose OverMind ║');
|
|
151
|
-
console.log('╠════════════════════════════════════════════════════════════════╣');
|
|
152
|
-
console.log('║ Usage: ║');
|
|
153
|
-
console.log('║ overmind-infra up Démarrer les services ║');
|
|
154
|
-
console.log('║ overmind-infra down Arrêter tous les services ║');
|
|
155
|
-
console.log('║ overmind-infra restart Redémarrer les services ║');
|
|
156
|
-
console.log('║ overmind-infra status Vérifier l\'état ║');
|
|
157
|
-
console.log('║ overmind-infra logs Voir les logs en temps réel ║');
|
|
158
|
-
console.log('║ ║');
|
|
159
|
-
console.log('║ Services gérés: ║');
|
|
160
|
-
console.log('║ - RabbitMQ (Message Broker) ║');
|
|
161
|
-
console.log('║ - Temporal (Workflow Orchestrator) ║');
|
|
162
|
-
console.log('║ - Temporal Web (Interface Web) ║');
|
|
163
|
-
console.log('║ ║');
|
|
164
|
-
console.log('║ Interfaces: ║');
|
|
165
|
-
console.log('║ RabbitMQ: http://localhost:15672 ║');
|
|
166
|
-
console.log('║ Temporal: http://localhost:8233 ║');
|
|
167
|
-
console.log('║ ║');
|
|
168
|
-
console.log('║ Installation: ║');
|
|
169
|
-
console.log('║ Si docker-compose.overmind.yml manque: ║');
|
|
170
|
-
console.log('║ → overmind-setup --full ║');
|
|
171
|
-
console.log('╚══════════════════════════════════════════════════════════════════╝');
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
// ═══════════════════════════════════════════════════════════════════════════════
|
|
175
|
-
// MAIN
|
|
176
|
-
// ═══════════════════════════════════════════════════════════════════════════════
|
|
177
|
-
|
|
178
|
-
const command = process.argv[2] || 'help';
|
|
179
|
-
|
|
180
|
-
switch (command) {
|
|
181
|
-
case 'up':
|
|
182
|
-
commandUp();
|
|
183
|
-
break;
|
|
184
|
-
case 'down':
|
|
185
|
-
commandDown();
|
|
186
|
-
break;
|
|
187
|
-
case 'restart':
|
|
188
|
-
commandRestart();
|
|
189
|
-
break;
|
|
190
|
-
case 'status':
|
|
191
|
-
commandStatus();
|
|
192
|
-
break;
|
|
193
|
-
case 'logs':
|
|
194
|
-
commandLogs();
|
|
195
|
-
break;
|
|
196
|
-
case 'help':
|
|
197
|
-
default:
|
|
198
|
-
showHelp();
|
|
199
|
-
break;
|
|
200
|
-
}
|