overmind-mcp 2.0.1 → 2.0.3
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 +145 -232
- package/dist/server.d.ts +40 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +104 -61
- package/dist/server.js.map +1 -1
- package/dist/services/ClaudeRunner.d.ts.map +1 -1
- package/dist/services/ClaudeRunner.js +68 -47
- package/dist/services/ClaudeRunner.js.map +1 -1
- package/docs/INDEX.md +144 -0
- package/docs/README.md +128 -0
- package/docs/api/prompt/Claude_code.md +74 -0
- package/docs/api/prompt/Kilo.md +74 -0
- package/docs/api/prompt/Kilo_Hermes.md +170 -0
- package/docs/api/prompt/Minimax4.md +96 -0
- package/docs/changelog/CHANGELOG.add.md +106 -0
- package/docs/index.html +569 -0
- package/docs/library.html +239 -0
- package/docs/prompt.html +1212 -0
- package/docs/script.js +428 -0
- package/docs/styles.css +2816 -0
- package/docs/tools.md +794 -0
- package/install-overmind-unix.sh +250 -0
- package/install-overmind-windows.bat +257 -0
- package/package.json +6 -12
- package/scripts/docker-manager.mjs +2 -2
- package/scripts/install-dependencies.mjs +266 -87
- package/scripts/postinstall.mjs +98 -129
- package/scripts/setup.mjs +4 -6
- package/scripts/uninstall.mjs +224 -0
- package/SETUP_WINDOWS.md +0 -362
- package/dist/tools/metadata.d.ts +0 -20
- package/dist/tools/metadata.d.ts.map +0 -1
- package/dist/tools/metadata.js +0 -246
- package/dist/tools/metadata.js.map +0 -1
- package/docker-compose.overmind.yml +0 -172
- /package/{CHANGELOG.md → docs/changelog/CHANGELOG.md} +0 -0
- /package/{DEPLOYMENT.md → docs/guides/DEPLOYMENT.md} +0 -0
- /package/{SWARM_USAGE.md → docs/guides/SWARM_USAGE.md} +0 -0
package/scripts/postinstall.mjs
CHANGED
|
@@ -1,223 +1,192 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* Script exécuté automatiquement après `npm install -g overmind-mcp`
|
|
7
|
-
* Détecte l'environnement et guide l'utilisateur selon son setup
|
|
8
|
-
*
|
|
9
|
-
* Usage: (exécuté automatiquement par NPM)
|
|
10
|
-
* ═══════════════════════════════════════════════════════════════════════════════
|
|
3
|
+
* POSTINSTALL SCRIPT — OverMind-MCP
|
|
4
|
+
* Executeur apres `npm install -g overmind-mcp`
|
|
5
|
+
* Detecte l'environnement et affiche les prochaines etapes.
|
|
11
6
|
*/
|
|
12
7
|
|
|
13
8
|
import { execSync } from 'child_process';
|
|
14
|
-
import { existsSync } from 'fs';
|
|
15
9
|
import { platform } from 'os';
|
|
16
|
-
import {
|
|
10
|
+
import { dirname } from 'path';
|
|
17
11
|
import { fileURLToPath } from 'url';
|
|
18
12
|
|
|
19
13
|
const __filename = fileURLToPath(import.meta.url);
|
|
20
14
|
const __dirname = dirname(__filename);
|
|
21
15
|
|
|
22
|
-
// ═══════════════════════════════════════════════════════════════════════════════
|
|
23
|
-
// DETECTION FUNCTIONS
|
|
24
|
-
// ═══════════════════════════════════════════════════════════════════════════════
|
|
25
|
-
|
|
26
16
|
function detectDocker() {
|
|
27
17
|
try {
|
|
28
18
|
const version = execSync('docker --version', { encoding: 'utf8', stdio: 'pipe' }).trim();
|
|
29
|
-
console.log('
|
|
19
|
+
console.log('[OK] Docker detecte: ' + version.split(',')[0]);
|
|
30
20
|
return true;
|
|
31
21
|
} catch {
|
|
32
|
-
console.log('
|
|
33
|
-
console.log('
|
|
22
|
+
console.log('[ERR] Docker non trouve');
|
|
23
|
+
console.log(' -> Installez Docker Desktop: https://www.docker.com/products/docker-desktop/');
|
|
34
24
|
return false;
|
|
35
25
|
}
|
|
36
26
|
}
|
|
37
27
|
|
|
38
28
|
function detectPostgreSQL() {
|
|
39
|
-
// Check PostgreSQL dans Docker
|
|
40
29
|
try {
|
|
41
30
|
const containers = execSync(
|
|
42
|
-
'docker ps --filter "name=postgres" --format "{{.Names}}"',
|
|
31
|
+
'docker ps --filter "name=postgres-pgvector" --format "{{.Names}}"',
|
|
43
32
|
{ encoding: 'utf8', stdio: 'pipe' }
|
|
44
33
|
).trim();
|
|
45
|
-
|
|
46
34
|
if (containers) {
|
|
47
|
-
console.log('
|
|
35
|
+
console.log('[OK] PostgreSQL detecte (Docker): ' + containers);
|
|
48
36
|
return { hasPG: true, type: 'docker', name: containers };
|
|
49
37
|
}
|
|
50
38
|
} catch {}
|
|
51
39
|
|
|
52
|
-
// Check PostgreSQL natif
|
|
53
40
|
try {
|
|
54
41
|
execSync('psql --version', { stdio: 'pipe' });
|
|
55
|
-
console.log('
|
|
42
|
+
console.log('[OK] PostgreSQL detecte (natif)');
|
|
56
43
|
return { hasPG: true, type: 'native' };
|
|
57
44
|
} catch {}
|
|
58
45
|
|
|
59
|
-
console.log('
|
|
60
|
-
console.log('
|
|
46
|
+
console.log('[ERR] PostgreSQL non trouve');
|
|
47
|
+
console.log(' -> Installe par: overmind-setup --full');
|
|
61
48
|
return { hasPG: false };
|
|
62
49
|
}
|
|
63
50
|
|
|
64
51
|
function detectPgVector() {
|
|
65
52
|
try {
|
|
66
53
|
if (platform() === 'win32') {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
'docker exec postgres pgvector -- pg_config --version',
|
|
54
|
+
const r = execSync(
|
|
55
|
+
"docker exec postgres-pgvector psql -U postgres -t -c \"SELECT 1 FROM pg_extension WHERE extname='vector';\"",
|
|
70
56
|
{ encoding: 'utf8', stdio: 'pipe' }
|
|
71
57
|
).trim();
|
|
72
|
-
if (
|
|
73
|
-
console.log('✅ pgvector installé (Docker)');
|
|
74
|
-
return true;
|
|
75
|
-
}
|
|
58
|
+
if (r === '1') { console.log('[OK] pgvector installe (Docker)'); return true; }
|
|
76
59
|
} else {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
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 {}
|
|
83
71
|
}
|
|
84
72
|
} catch {}
|
|
85
73
|
|
|
86
|
-
console.log('
|
|
87
|
-
console.log('
|
|
74
|
+
console.log('[ERR] pgvector non trouve');
|
|
75
|
+
console.log(' -> Installe par: overmind-setup --full');
|
|
88
76
|
return false;
|
|
89
77
|
}
|
|
90
78
|
|
|
91
79
|
function detectNodeVersion() {
|
|
92
80
|
try {
|
|
93
|
-
|
|
94
|
-
console.log('✅ Node.js:', version);
|
|
81
|
+
console.log('[OK] Node.js: ' + execSync('node --version', { encoding: 'utf8' }).trim());
|
|
95
82
|
return true;
|
|
96
83
|
} catch {
|
|
97
|
-
console.log('
|
|
84
|
+
console.log('[ERR] Node.js non trouve');
|
|
98
85
|
return false;
|
|
99
86
|
}
|
|
100
87
|
}
|
|
101
88
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
89
|
+
function bar(label, ok) {
|
|
90
|
+
const pad = (s) => (' ' + s).slice(-18);
|
|
91
|
+
const okStr = ok ? '[OK]' : '[ERR]';
|
|
92
|
+
console.log(' ' + okStr + ' ' + pad(label));
|
|
93
|
+
}
|
|
105
94
|
|
|
106
95
|
function main() {
|
|
107
|
-
console.log('
|
|
108
|
-
console.log('
|
|
109
|
-
console.log('
|
|
110
|
-
console.log('
|
|
111
|
-
console.log('╚══════════════════════════════════════════════════════════════════╝');
|
|
96
|
+
console.log('');
|
|
97
|
+
console.log('================================================================');
|
|
98
|
+
console.log(' BRAIN OVERMIND-MCP v2.0.0 - INSTALLATION');
|
|
99
|
+
console.log('================================================================');
|
|
112
100
|
console.log('');
|
|
113
101
|
|
|
114
|
-
console.log('
|
|
102
|
+
console.log('[CHECK] Detection de votre environnement...');
|
|
115
103
|
console.log('');
|
|
116
104
|
|
|
117
|
-
// Detect components
|
|
118
105
|
const hasDocker = detectDocker();
|
|
119
106
|
const pgInfo = detectPostgreSQL();
|
|
120
107
|
const hasPgVector = detectPgVector();
|
|
121
|
-
|
|
108
|
+
detectNodeVersion();
|
|
122
109
|
|
|
123
110
|
console.log('');
|
|
124
|
-
console.log('
|
|
125
|
-
console.log('
|
|
126
|
-
console.log('
|
|
111
|
+
console.log('================================================================');
|
|
112
|
+
console.log(' MODE DETECTE');
|
|
113
|
+
console.log('================================================================');
|
|
127
114
|
|
|
128
115
|
if (hasDocker && pgInfo.hasPG && hasPgVector) {
|
|
129
|
-
console.log('
|
|
130
|
-
console.log('
|
|
131
|
-
console.log('
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
console.log('
|
|
137
|
-
console.log('
|
|
138
|
-
console.log('║ overmind-setup --full ║');
|
|
116
|
+
console.log(' [GO] MODE COMPLET (Docker + PostgreSQL + pgvector)');
|
|
117
|
+
console.log('');
|
|
118
|
+
console.log(' OverMind fonctionne avec TOUTES les features:');
|
|
119
|
+
bar('Swarm Orchestration', true);
|
|
120
|
+
bar('Workflows Long-Running', true);
|
|
121
|
+
bar('Vector DB (4096D)', true);
|
|
122
|
+
bar('Observabilite complete', true);
|
|
123
|
+
console.log('');
|
|
124
|
+
console.log(' Commande: overmind-setup --full');
|
|
139
125
|
} else if (hasDocker) {
|
|
140
|
-
console.log('
|
|
141
|
-
console.log('
|
|
142
|
-
console.log('
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
console.log('
|
|
147
|
-
console.log('
|
|
148
|
-
console.log('║ overmind-setup --full ║');
|
|
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');
|
|
149
134
|
} else {
|
|
150
|
-
console.log('
|
|
151
|
-
console.log('
|
|
152
|
-
console.log('
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
console.log('
|
|
159
|
-
console.log('
|
|
160
|
-
console.log('
|
|
161
|
-
console.log('
|
|
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');
|
|
162
147
|
}
|
|
163
148
|
|
|
164
|
-
console.log('╚══════════════════════════════════════════════════════════════════╝');
|
|
165
149
|
console.log('');
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
console.log('
|
|
150
|
+
console.log('================================================================');
|
|
151
|
+
console.log(' PROCHAINES ETAPES');
|
|
152
|
+
console.log('================================================================');
|
|
169
153
|
console.log('');
|
|
170
154
|
|
|
171
155
|
if (!pgInfo.hasPG || !hasPgVector) {
|
|
172
|
-
console.log('
|
|
173
|
-
console.log('
|
|
156
|
+
console.log(' Etape 1: Installer les dependances manquantes');
|
|
157
|
+
console.log(' -> overmind-setup --full');
|
|
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');
|
|
174
164
|
console.log('');
|
|
175
|
-
console.log(' Cette commande va:');
|
|
176
|
-
console.log(' - Installer PostgreSQL + pgvector en Docker (si absent)');
|
|
177
|
-
console.log(' - Créer la base de données OverMind');
|
|
178
|
-
console.log(' - Démarrer RabbitMQ + Temporal');
|
|
179
|
-
console.log(' - Configurer les fichiers nécessaires');
|
|
180
165
|
}
|
|
181
166
|
|
|
182
|
-
console.log('
|
|
183
|
-
console.log('
|
|
184
|
-
console.log('
|
|
185
|
-
console.log('
|
|
167
|
+
console.log(' DOCUMENTATION:');
|
|
168
|
+
console.log(' -> https://deamondev888.github.io/overmind-mcp/');
|
|
169
|
+
console.log(' -> https://github.com/DeamonDev888/overmind-mcp');
|
|
170
|
+
console.log(' -> Discord: https://discord.gg/4AR82phtBz');
|
|
186
171
|
console.log('');
|
|
187
|
-
|
|
188
|
-
// Show basic usage examples
|
|
189
|
-
console.log('🚀 UTILISATION RAPIDE:');
|
|
172
|
+
console.log(' UTILISATION RAPIDE:');
|
|
190
173
|
console.log('');
|
|
191
174
|
|
|
192
175
|
if (!hasDocker) {
|
|
193
|
-
console.log('
|
|
194
|
-
console.log('
|
|
195
|
-
console.log('
|
|
196
|
-
console.log(' │ --prompt "Tu es un expert Python..." │');
|
|
197
|
-
console.log(' │ │');
|
|
198
|
-
console.log(' │ overmind run-agent --runner claude \\ │');
|
|
199
|
-
console.log(' │ --prompt "Analyse ce code..." │');
|
|
200
|
-
console.log(' └─────────────────────────────────────────────────────┘');
|
|
176
|
+
console.log(' Mode Simple (sans Docker):');
|
|
177
|
+
console.log(' $ overmind create-agent --name expert --runner claude --prompt "Tu es un expert..."');
|
|
178
|
+
console.log(' $ overmind run-agent --runner claude --prompt "Analyse ce code..."');
|
|
201
179
|
} else {
|
|
202
|
-
console.log('
|
|
203
|
-
console.log('
|
|
204
|
-
console.log('
|
|
205
|
-
console.log('
|
|
206
|
-
console.log('
|
|
207
|
-
console.log(' │ overmind create-agent ... │');
|
|
208
|
-
console.log(' │ overmind run-agent ... │');
|
|
209
|
-
console.log(' │ │');
|
|
210
|
-
console.log(' │ # Gérer Docker: │');
|
|
211
|
-
console.log(' │ overmind-infra up │');
|
|
212
|
-
console.log(' │ overmind-infra down │');
|
|
213
|
-
console.log(' │ overmind-infra status │');
|
|
214
|
-
console.log(' └─────────────────────────────────────────────────────┘');
|
|
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');
|
|
215
185
|
}
|
|
216
186
|
|
|
217
187
|
console.log('');
|
|
218
|
-
console.log('
|
|
188
|
+
console.log('================================================================');
|
|
219
189
|
console.log('');
|
|
220
190
|
}
|
|
221
191
|
|
|
222
|
-
// Run main
|
|
223
192
|
main();
|
package/scripts/setup.mjs
CHANGED
|
@@ -233,8 +233,8 @@ function setupConfigurationFiles() {
|
|
|
233
233
|
}
|
|
234
234
|
|
|
235
235
|
// Copy docker-manager script
|
|
236
|
-
const dockerManagerPath = join(__dirname, 'docker-manager.
|
|
237
|
-
const destManagerPath = join(INSTALL_DIR, 'docker-manager.
|
|
236
|
+
const dockerManagerPath = join(__dirname, 'docker-manager.mjs');
|
|
237
|
+
const destManagerPath = join(INSTALL_DIR, 'docker-manager.mjs');
|
|
238
238
|
|
|
239
239
|
copyFileSync(dockerManagerPath, destManagerPath);
|
|
240
240
|
console.log('✅ Scripts Docker installés');
|
|
@@ -268,12 +268,10 @@ async function startDockerServices() {
|
|
|
268
268
|
async function createOvermindDatabase() {
|
|
269
269
|
logSection('CRÉATION BASE OVERMIND');
|
|
270
270
|
|
|
271
|
-
// Import and run setup-overmind-db.
|
|
272
|
-
const setupDbPath = join(__dirname, 'setup-overmind-db.
|
|
271
|
+
// Import and run setup-overmind-db.mjs
|
|
272
|
+
const setupDbPath = join(__dirname, 'setup-overmind-db.mjs');
|
|
273
273
|
|
|
274
274
|
try {
|
|
275
|
-
// Copy script to install dir
|
|
276
|
-
const destDbPath = join(INSTALL_DIR, 'setup-overmind-db.js');
|
|
277
275
|
copyFileSync(setupDbPath, destDbPath);
|
|
278
276
|
|
|
279
277
|
// Run it
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* ═══════════════════════════════════════════════════════════════════════════════
|
|
4
|
+
* UNINSTALL SCRIPT — OverMind-MCP
|
|
5
|
+
* ═══════════════════════════════════════════════════════════════════════════════
|
|
6
|
+
* Désinstallation propre : supprime containers, volumes, images, config.
|
|
7
|
+
*
|
|
8
|
+
* Usage:
|
|
9
|
+
* overmind uninstall # interactif (recommandé)
|
|
10
|
+
* overmind uninstall --force # skip prompts,Tout supprime
|
|
11
|
+
* ═══════════════════════════════════════════════════════════════════════════════
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import { execSync } from 'child_process';
|
|
15
|
+
import { existsSync, rmSync } from 'fs';
|
|
16
|
+
import { join, dirname } from 'path';
|
|
17
|
+
import { fileURLToPath } from 'url';
|
|
18
|
+
import { createInterface } from 'readline';
|
|
19
|
+
|
|
20
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
21
|
+
const __dirname = dirname(__filename);
|
|
22
|
+
|
|
23
|
+
const INSTALL_DIR = join(process.env.HOME || process.env.USERPROFILE || process.env.HOMEPATH, '.overmind');
|
|
24
|
+
const FORCE = process.argv.includes('--force');
|
|
25
|
+
|
|
26
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
27
|
+
// UTILS
|
|
28
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
29
|
+
|
|
30
|
+
function p(prompt) {
|
|
31
|
+
return new Promise((resolve) => {
|
|
32
|
+
const rl = createInterface({ input: process.stdin, output: process.stdout });
|
|
33
|
+
rl.question(prompt, (answer) => { rl.close(); resolve(answer); });
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
async function yesNo(question, def = false) {
|
|
38
|
+
const answer = await p(`${question} ${def ? '[Y/n]' : '[y/N]'}: `);
|
|
39
|
+
return answer.toLowerCase().startsWith('y');
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function log(msg) { console.log(msg); }
|
|
43
|
+
function section(title) {
|
|
44
|
+
console.log(`\n╔${'═'.repeat(68)}╗`);
|
|
45
|
+
console.log(`║ ${title.padEnd(66)} ║`);
|
|
46
|
+
console.log(`╚${'═'.repeat(68)}╝`);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function cmd(command, label) {
|
|
50
|
+
try {
|
|
51
|
+
execSync(command, { stdio: 'pipe' });
|
|
52
|
+
log(`✅ ${label}`);
|
|
53
|
+
return true;
|
|
54
|
+
} catch (e) {
|
|
55
|
+
const msg = e.message || '';
|
|
56
|
+
if (msg.includes('No such container') || msg.includes('no such container')) {
|
|
57
|
+
log(`⚠️ ${label} (déjà absent)`);
|
|
58
|
+
} else if (msg.includes('No such volume')) {
|
|
59
|
+
log(`⚠️ ${label} (volume déjà absent)`);
|
|
60
|
+
} else {
|
|
61
|
+
log(`❌ ${label} — ${msg.split('\n')[0]}`);
|
|
62
|
+
}
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
68
|
+
// DETECTION & LISTING
|
|
69
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
70
|
+
|
|
71
|
+
function listContainers() {
|
|
72
|
+
const names = ['postgres-pgvector', 'overmind-rabbitmq', 'overmind-temporal', 'overmind-temporal-web'];
|
|
73
|
+
return names.filter((n) => {
|
|
74
|
+
try {
|
|
75
|
+
execSync(`docker inspect ${n}`, { stdio: 'pipe' });
|
|
76
|
+
return true;
|
|
77
|
+
} catch { return false; }
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function listVolumes() {
|
|
82
|
+
const names = ['postgres_data', 'rabbitmq_data'];
|
|
83
|
+
return names.filter((n) => {
|
|
84
|
+
try {
|
|
85
|
+
execSync(`docker volume inspect ${n}`, { stdio: 'pipe' });
|
|
86
|
+
return true;
|
|
87
|
+
} catch { return false; }
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function listImages() {
|
|
92
|
+
const imgs = ['pgvector/pgvector:pg16', 'rabbitmq:3.13-management', 'temporalio/auto-setup:1.24.0', 'temporalio/web:1.24.0'];
|
|
93
|
+
return imgs.filter((img) => {
|
|
94
|
+
try {
|
|
95
|
+
execSync(`docker image inspect ${img}`, { stdio: 'pipe' });
|
|
96
|
+
return true;
|
|
97
|
+
} catch { return false; }
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
102
|
+
// MAIN
|
|
103
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
104
|
+
|
|
105
|
+
async function main() {
|
|
106
|
+
console.log(`\n╔${'═'.repeat(68)}╗`);
|
|
107
|
+
console.log(`║ ║`);
|
|
108
|
+
console.log(`║ 🧹 OVERMIND-MCP — DÉSINSTALLATION PROPRE ║`);
|
|
109
|
+
console.log(`║ ║`);
|
|
110
|
+
console.log(`╚${'═'.repeat(68)}╝`);
|
|
111
|
+
|
|
112
|
+
// ── 1. Containers actifs ──────────────────────────────────────────────
|
|
113
|
+
const containers = listContainers();
|
|
114
|
+
const volumes = listVolumes();
|
|
115
|
+
const images = listImages();
|
|
116
|
+
const hasInstallDir = existsSync(INSTALL_DIR);
|
|
117
|
+
|
|
118
|
+
if (!containers.length && !volumes.length && !images.length && !hasInstallDir) {
|
|
119
|
+
log('\n✅ OverMind-MCP ne laisse aucune trace détectable.');
|
|
120
|
+
log(' Supprimez le package manuellement :\n npm uninstall -g overmind-mcp\n');
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
log('\n📋 Éléments OverMind détectés sur cette machine :\n');
|
|
125
|
+
|
|
126
|
+
if (containers.length) {
|
|
127
|
+
log(' Containers :');
|
|
128
|
+
containers.forEach((c) => log(` - ${c}`));
|
|
129
|
+
} else {
|
|
130
|
+
log(' Containers : aucun');
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
if (volumes.length) {
|
|
134
|
+
log(' Volumes Docker :');
|
|
135
|
+
volumes.forEach((v) => log(` - ${v}`));
|
|
136
|
+
} else {
|
|
137
|
+
log(' Volumes Docker : aucun');
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
if (images.length) {
|
|
141
|
+
log(' Images Docker (↺ réutilisables) :');
|
|
142
|
+
images.forEach((i) => log(` - ${i}`));
|
|
143
|
+
} else {
|
|
144
|
+
log(' Images Docker : aucune');
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
if (hasInstallDir) {
|
|
148
|
+
log(` Config ~/.overmind/ : présent`);
|
|
149
|
+
} else {
|
|
150
|
+
log(' Config ~/.overmind/ : absent');
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
if (FORCE) {
|
|
154
|
+
log('\n⚠️ Mode --force : suppression sans confirmation.\n');
|
|
155
|
+
} else {
|
|
156
|
+
log('\n⏳ Les données des volumes Docker seront DÉTRUITES.\n');
|
|
157
|
+
const confirm = await yesNo('Procéder à la désinstallation ?');
|
|
158
|
+
if (!confirm) { log('\n🛑 Annulé.'); return; }
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// ── 2. Stop & remove containers ───────────────────────────────────────
|
|
162
|
+
section('SUPPRESSION CONTENEURS');
|
|
163
|
+
for (const c of containers) {
|
|
164
|
+
cmd(`docker stop ${c}`, `Stop ${c}`);
|
|
165
|
+
cmd(`docker rm -f ${c}`, `Remove ${c}`);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// ── 3. Remove volumes ─────────────────────────────────────────────────
|
|
169
|
+
if (FORCE || await yesNo('\n🗑️ Supprimer les volumes Docker (DESTRUCTIF) ?')) {
|
|
170
|
+
section('SUPPRESSION VOLUMES');
|
|
171
|
+
for (const v of volumes) {
|
|
172
|
+
cmd(`docker volume rm ${v}`, `Remove volume ${v}`);
|
|
173
|
+
}
|
|
174
|
+
} else {
|
|
175
|
+
log('\n⚠️ Volumes conservés (données PostgreSQL intactes).');
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// ── 4. Remove images ────────────────────────────────────────────────────
|
|
179
|
+
if (FORCE || await yesNo('\n🗑️ Supprimer les images OverMind Docker (~3-4 GB) ?')) {
|
|
180
|
+
section('SUPPRESSION IMAGES');
|
|
181
|
+
for (const img of images) {
|
|
182
|
+
cmd(`docker rmi ${img}`, `Remove image ${img}`);
|
|
183
|
+
}
|
|
184
|
+
} else {
|
|
185
|
+
log('\n⚠️ Images conservées.');
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
// ── 5. Remove ~/.overmind ──────────────────────────────────────────────
|
|
189
|
+
if (FORCE || await yesNo('\n📁 Supprimer ~/.overmind/ (config + .env avec credentials) ?')) {
|
|
190
|
+
section('SUPPRESSION CONFIG');
|
|
191
|
+
if (existsSync(INSTALL_DIR)) {
|
|
192
|
+
try {
|
|
193
|
+
rmSync(INSTALL_DIR, { recursive: true, force: true });
|
|
194
|
+
log(`✅ ~/.overmind/ supprimé`);
|
|
195
|
+
} catch (e) {
|
|
196
|
+
log(`❌ ~/.overmind/ : ${e.message.split('\n')[0]}`);
|
|
197
|
+
}
|
|
198
|
+
} else {
|
|
199
|
+
log('⚠️ ~/.overmind/ déjà absent');
|
|
200
|
+
}
|
|
201
|
+
} else {
|
|
202
|
+
log('\n⚠️ Config ~/.overmind/ conservée.');
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
// ── Done ───────────────────────────────────────────────────────────────
|
|
206
|
+
section('DÉSINSTALLATION TERMINÉE');
|
|
207
|
+
console.log(`
|
|
208
|
+
✅ OverMind-MCP a été retiré proprement.
|
|
209
|
+
|
|
210
|
+
📋 Pour désinstaller complètement le package NPM :
|
|
211
|
+
npm uninstall -g overmind-mcp
|
|
212
|
+
|
|
213
|
+
💡 Si vous réinstallez plus tard :
|
|
214
|
+
npm install -g overmind-mcp
|
|
215
|
+
overmind-setup --full # (si vous voulez le Mode Avancé)
|
|
216
|
+
|
|
217
|
+
══════════════════════════════════════════════════════════════════════
|
|
218
|
+
`);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
main().catch((e) => {
|
|
222
|
+
console.error('\n❌ ERREUR FATALE:', e.message);
|
|
223
|
+
process.exit(1);
|
|
224
|
+
});
|