overmind-mcp 2.1.1 → 2.2.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/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 +146 -113
- package/scripts/setup-windows.js +28 -26
- package/scripts/setup.mjs +0 -0
- package/scripts/test-installation.mjs +158 -0
- package/scripts/uninstall.mjs +0 -0
- package/scripts/docker-manager.mjs +0 -200
|
@@ -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
|
-
}
|