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
|
@@ -3,9 +3,11 @@
|
|
|
3
3
|
* ═══════════════════════════════════════════════════════════════════════════════
|
|
4
4
|
* INSTALL-DEPENDENCIES SCRIPT
|
|
5
5
|
* ═══════════════════════════════════════════════════════════════════════════════
|
|
6
|
-
* Script qui installe
|
|
6
|
+
* Script cross-platform qui détecte et installe uniquement ce qui manque :
|
|
7
|
+
* - Docker Desktop / Docker Engine
|
|
8
|
+
* - PostgreSQL + pgvector (détecte si déjà en Docker)
|
|
7
9
|
*
|
|
8
|
-
*
|
|
10
|
+
* Supporte: Windows (Docker Desktop), Linux (Docker Engine), macOS (Docker Desktop)
|
|
9
11
|
* ═══════════════════════════════════════════════════════════════════════════════
|
|
10
12
|
*/
|
|
11
13
|
|
|
@@ -29,6 +31,14 @@ function logSection(title) {
|
|
|
29
31
|
console.log('╚══════════════════════════════════════════════════════════════════╝');
|
|
30
32
|
}
|
|
31
33
|
|
|
34
|
+
function runCommand(cmd, options = {}) {
|
|
35
|
+
try {
|
|
36
|
+
return execSync(cmd, { stdio: 'pipe', encoding: 'utf8', ...options });
|
|
37
|
+
} catch {
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
32
42
|
function runCommandAsync(cmd, description) {
|
|
33
43
|
return new Promise((resolve, reject) => {
|
|
34
44
|
console.log(`🔧 ${description}`);
|
|
@@ -64,74 +74,200 @@ function promptYesNo(question) {
|
|
|
64
74
|
rl.close();
|
|
65
75
|
resolve(answer.toLowerCase().startsWith('y'));
|
|
66
76
|
});
|
|
67
|
-
};
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function openUrl(url) {
|
|
81
|
+
const platform = process.platform;
|
|
82
|
+
|
|
83
|
+
if (platform === 'win32') {
|
|
84
|
+
runCommand(`start ${url}`, { stdio: 'ignore' });
|
|
85
|
+
} else if (platform === 'darwin') {
|
|
86
|
+
runCommand(`open ${url}`, { stdio: 'ignore' });
|
|
87
|
+
} else {
|
|
88
|
+
runCommand(`xdg-open ${url}`, { stdio: 'ignore' });
|
|
89
|
+
}
|
|
68
90
|
}
|
|
69
91
|
|
|
70
92
|
// ═══════════════════════════════════════════════════════════════════════════════
|
|
71
|
-
//
|
|
93
|
+
// DOCKER DETECTION
|
|
72
94
|
// ═══════════════════════════════════════════════════════════════════════════════
|
|
73
95
|
|
|
74
|
-
async function
|
|
96
|
+
async function checkDocker() {
|
|
75
97
|
logSection('VÉRIFICATION DOCKER');
|
|
76
98
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
return true;
|
|
81
|
-
} catch {
|
|
99
|
+
// Check if Docker is installed
|
|
100
|
+
const version = runCommand('docker --version');
|
|
101
|
+
if (!version) {
|
|
82
102
|
console.log('❌ Docker non trouvé');
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
103
|
+
return null;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
console.log('✅ Docker détecté:', version.trim());
|
|
107
|
+
|
|
108
|
+
// Detect Docker Desktop vs Docker Engine
|
|
109
|
+
const platform = process.platform;
|
|
110
|
+
|
|
111
|
+
if (platform === 'win32' || platform === 'darwin') {
|
|
112
|
+
// Windows/macOS: Check Docker Desktop
|
|
113
|
+
const desktopStatus = runCommand('docker info --format "{{.OperatingSystem}}"');
|
|
114
|
+
if (desktopStatus?.includes('Docker Desktop')) {
|
|
115
|
+
console.log('✅ Docker Desktop détecté');
|
|
116
|
+
return { type: 'desktop', platform };
|
|
117
|
+
}
|
|
118
|
+
} else if (platform === 'linux') {
|
|
119
|
+
// Linux: Docker Engine
|
|
120
|
+
console.log('✅ Docker Engine (Linux) détecté');
|
|
121
|
+
return { type: 'engine', platform };
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
return { type: 'unknown', platform };
|
|
125
|
+
}
|
|
89
126
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
127
|
+
async function installDockerIfNeeded() {
|
|
128
|
+
const dockerInfo = await checkDocker();
|
|
129
|
+
|
|
130
|
+
if (dockerInfo) {
|
|
131
|
+
return dockerInfo;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
console.log('');
|
|
135
|
+
console.log('📥 Installation Docker requise:');
|
|
136
|
+
console.log(' • Windows: Docker Desktop for Windows');
|
|
137
|
+
console.log(' • macOS: Docker Desktop for Mac');
|
|
138
|
+
console.log(' • Linux: Docker Engine (apt/yum/dnf)');
|
|
139
|
+
console.log('');
|
|
140
|
+
|
|
141
|
+
const answer = await promptYesNo('Voulez-vous ouvrir le site de téléchargement ?');
|
|
142
|
+
if (answer) {
|
|
143
|
+
const url = 'https://www.docker.com/products/docker-desktop/';
|
|
144
|
+
openUrl(url);
|
|
145
|
+
console.log('✅ Navigateur ouvert. Installez Docker, puis relancez ce script.');
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
return null;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
152
|
+
// POSTGRESQL + PGVECTOR DETECTION & INSTALLATION
|
|
153
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
154
|
+
|
|
155
|
+
async function detectExistingPostgreSQL() {
|
|
156
|
+
logSection('DÉTECTION POSTGRESQL EXISTANT');
|
|
157
|
+
|
|
158
|
+
// 1. Check native PostgreSQL (psql command)
|
|
159
|
+
const nativePg = runCommand('psql --version');
|
|
160
|
+
if (nativePg) {
|
|
161
|
+
console.log('✅ PostgreSQL natif détecté:', nativePg.trim());
|
|
162
|
+
|
|
163
|
+
// Check if pgvector is installed
|
|
164
|
+
const pgvectorCheck = runCommand('psql -U postgres -t -c "SELECT extname FROM pg_extension WHERE extname = \'vector\';"');
|
|
165
|
+
if (pgvectorCheck?.includes('vector')) {
|
|
166
|
+
console.log('✅ pgvector est installé');
|
|
167
|
+
return { type: 'native', hasPgvector: true };
|
|
168
|
+
} else {
|
|
169
|
+
console.log('⚠️ pgvector NON installé (installation manuelle requise)');
|
|
170
|
+
return { type: 'native', hasPgvector: false };
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
// 2. Check Docker containers with pgvector (multiple detection methods)
|
|
175
|
+
console.log('🔍 Recherche containers PostgreSQL avec pgvector...');
|
|
176
|
+
|
|
177
|
+
// Method A: Check by image name (pgvector/pgvector)
|
|
178
|
+
let containers = runCommand('docker ps --filter "ancestor=pgvector/pgvector" --format "{{.Names}}"', {
|
|
179
|
+
stdio: 'pipe'
|
|
180
|
+
});
|
|
95
181
|
|
|
182
|
+
// Method B: Check all containers with "pgvector" or "postgres" in name
|
|
183
|
+
if (!containers) {
|
|
184
|
+
containers = runCommand('docker ps --format "{{.Names}}" | grep -E "(pgvector|postgres)"', {
|
|
185
|
+
stdio: 'pipe',
|
|
186
|
+
shell: true
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
if (containers) {
|
|
191
|
+
const containerList = containers.trim().split('\n').filter(Boolean);
|
|
192
|
+
console.log(`✅ ${containerList.length} container(s) PostgreSQL détecté(s):`);
|
|
193
|
+
containerList.forEach(name => console.log(` • ${name}`));
|
|
194
|
+
|
|
195
|
+
// Check each container for pgvector
|
|
196
|
+
for (const container of containerList) {
|
|
96
197
|
try {
|
|
97
|
-
|
|
98
|
-
|
|
198
|
+
const pgvectorCheck = runCommand(
|
|
199
|
+
`docker exec ${container} psql -U postgres -t -c "SELECT extname FROM pg_extension WHERE extname = 'vector';" 2>&1`,
|
|
200
|
+
{ stdio: 'pipe' }
|
|
201
|
+
);
|
|
202
|
+
|
|
203
|
+
if (pgvectorCheck?.includes('vector')) {
|
|
204
|
+
console.log(`✅ pgvector actif dans ${container}`);
|
|
205
|
+
return { type: 'docker', container, hasPgvector: true };
|
|
206
|
+
}
|
|
99
207
|
} catch {
|
|
100
|
-
|
|
208
|
+
// Container might not be accessible, try next
|
|
101
209
|
}
|
|
102
210
|
}
|
|
103
211
|
|
|
104
|
-
|
|
212
|
+
console.log('⚠️ Containers trouvés mais SANS pgvector installé');
|
|
105
213
|
}
|
|
106
|
-
}
|
|
107
214
|
|
|
108
|
-
|
|
109
|
-
|
|
215
|
+
// 3. Check for any PostgreSQL container (might not have pgvector)
|
|
216
|
+
const allContainers = runCommand('docker ps --format "{{.Names}}"', {
|
|
217
|
+
stdio: 'pipe'
|
|
218
|
+
});
|
|
110
219
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
220
|
+
if (allContainers) {
|
|
221
|
+
const pgContainers = allContainers
|
|
222
|
+
.trim()
|
|
223
|
+
.split('\n')
|
|
224
|
+
.filter(name => name.toLowerCase().includes('postgres') || name.toLowerCase().includes('pgvector'));
|
|
225
|
+
|
|
226
|
+
if (pgContainers.length > 0) {
|
|
227
|
+
console.log(`⚠️ ${pgContainers.length} container(s) PostgreSQL détecté(s) SANS pgvector:`);
|
|
228
|
+
pgContainers.forEach(name => console.log(` • ${name}`));
|
|
229
|
+
console.log('');
|
|
230
|
+
console.log('💡 Le script va créer un nouveau container dédié.');
|
|
231
|
+
}
|
|
232
|
+
}
|
|
117
233
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
234
|
+
if (genericContainers) {
|
|
235
|
+
const containerList = genericContainers.trim().split('\n').filter(Boolean);
|
|
236
|
+
console.log(`⚠️ ${containerList.length} container(s) PostgreSQL détecté(s) SANS pgvector:`);
|
|
237
|
+
containerList.forEach(name => console.log(` • ${name}`));
|
|
238
|
+
console.log('');
|
|
239
|
+
console.log('💡 Ces containers n\'ont PAS pgvector. Le script va créer un nouveau container dédié.');
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
return null;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
async function waitForPostgreSQL(containerName, maxWait = 60) {
|
|
246
|
+
console.log(`⏳ Attente démarrage PostgreSQL (max ${maxWait}s)...`);
|
|
247
|
+
|
|
248
|
+
for (let i = 0; i < maxWait; i++) {
|
|
249
|
+
try {
|
|
250
|
+
execSync(
|
|
251
|
+
`docker exec ${containerName} pg_isready -U postgres`,
|
|
252
|
+
{ stdio: 'pipe', encoding: 'utf8' }
|
|
253
|
+
);
|
|
254
|
+
console.log('✅ PostgreSQL prêt !');
|
|
121
255
|
return true;
|
|
256
|
+
} catch {
|
|
257
|
+
process.stdout.write('.');
|
|
258
|
+
await new Promise(resolve => setTimeout(resolve, 1000));
|
|
122
259
|
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
// Check native PostgreSQL
|
|
126
|
-
try {
|
|
127
|
-
execSync('psql --version', { stdio: 'pipe' });
|
|
128
|
-
console.log('✅ PostgreSQL déjà installé (natif)');
|
|
129
|
-
return true;
|
|
130
|
-
} catch {}
|
|
260
|
+
}
|
|
131
261
|
|
|
132
|
-
// Install PostgreSQL + pgvector in Docker
|
|
133
|
-
console.log('🐳 Installation PostgreSQL + pgvector en Docker...');
|
|
134
262
|
console.log('');
|
|
263
|
+
console.log('❌ Timeout: PostgreSQL n\'a pas démarré à temps');
|
|
264
|
+
return false;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
async function installPostgreSQLDocker() {
|
|
268
|
+
logSection('INSTALLATION POSTGRESQL + PGVECTOR (DOCKER)');
|
|
269
|
+
|
|
270
|
+
const containerName = 'overmind-postgres-pgvector';
|
|
135
271
|
|
|
136
272
|
try {
|
|
137
273
|
// Pull image
|
|
@@ -141,58 +277,62 @@ async function installPostgreSQL() {
|
|
|
141
277
|
'Téléchargement image'
|
|
142
278
|
);
|
|
143
279
|
|
|
144
|
-
//
|
|
280
|
+
// Remove existing container if present
|
|
145
281
|
try {
|
|
146
|
-
execSync(
|
|
147
|
-
console.log(
|
|
148
|
-
execSync(
|
|
282
|
+
execSync(`docker inspect ${containerName}`, { stdio: 'pipe' });
|
|
283
|
+
console.log(`⚠️ Container ${containerName} existe déjà. Suppression...`);
|
|
284
|
+
execSync(`docker rm -f ${containerName}`, { stdio: 'pipe' });
|
|
149
285
|
} catch {
|
|
150
286
|
// Container doesn't exist, that's fine
|
|
151
287
|
}
|
|
152
288
|
|
|
153
|
-
//
|
|
289
|
+
// Create volume if doesn't exist
|
|
154
290
|
try {
|
|
155
|
-
execSync('docker volume
|
|
156
|
-
console.log('ℹ️ Volume postgres_data existe déjà (réutilisation)');
|
|
291
|
+
execSync('docker volume create overmind_postgres_data', { stdio: 'pipe' });
|
|
157
292
|
} catch {
|
|
158
|
-
|
|
293
|
+
// Volume might already exist
|
|
159
294
|
}
|
|
160
295
|
|
|
161
296
|
// Run container
|
|
162
297
|
console.log('🚀 Démarrage container PostgreSQL...');
|
|
163
|
-
const runCommand =
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
-
|
|
167
|
-
-
|
|
168
|
-
|
|
169
|
-
|
|
298
|
+
const runCommand = [
|
|
299
|
+
'docker', 'run', '-d',
|
|
300
|
+
'--name', containerName,
|
|
301
|
+
'-p', '5432:5432',
|
|
302
|
+
'-e', 'POSTGRES_PASSWORD=overmind_temp_password_change_me',
|
|
303
|
+
'-e', 'POSTGRES_USER=postgres',
|
|
304
|
+
'-v', 'overmind_postgres_data:/var/lib/postgresql/data',
|
|
305
|
+
'--restart', 'unless-stopped',
|
|
306
|
+
'pgvector/pgvector:pg16'
|
|
307
|
+
].join(' ');
|
|
170
308
|
|
|
171
309
|
await runCommandAsync(runCommand, 'Démarrage PostgreSQL');
|
|
172
310
|
|
|
173
311
|
// Wait for PostgreSQL to be ready
|
|
174
|
-
|
|
175
|
-
|
|
312
|
+
const ready = await waitForPostgreSQL(containerName);
|
|
313
|
+
if (!ready) {
|
|
314
|
+
throw new Error('PostgreSQL n\'a pas démarré');
|
|
315
|
+
}
|
|
176
316
|
|
|
177
317
|
// Test connection
|
|
178
318
|
console.log('🔍 Test connexion PostgreSQL...');
|
|
179
319
|
await runCommandAsync(
|
|
180
|
-
|
|
320
|
+
`docker exec ${containerName} psql -U postgres -c "SELECT version();"`,
|
|
181
321
|
'Test connexion'
|
|
182
322
|
);
|
|
183
323
|
|
|
184
324
|
// Enable pgvector
|
|
185
325
|
console.log('🔧 Activation extension pgvector...');
|
|
186
326
|
await runCommandAsync(
|
|
187
|
-
|
|
327
|
+
`docker exec ${containerName} psql -U postgres -c "CREATE EXTENSION IF NOT EXISTS vector;"`,
|
|
188
328
|
'Activation pgvector'
|
|
189
329
|
);
|
|
190
330
|
|
|
191
331
|
// Verify pgvector
|
|
192
332
|
console.log('✅ Vérification pgvector...');
|
|
193
|
-
const result =
|
|
194
|
-
|
|
195
|
-
{ encoding: 'utf8', stdio: 'pipe'
|
|
333
|
+
const result = runCommand(
|
|
334
|
+
`docker exec ${containerName} psql -U postgres -t -c "SELECT extname FROM pg_extension WHERE extname = 'vector';"`,
|
|
335
|
+
{ encoding: 'utf8', stdio: 'pipe' }
|
|
196
336
|
).trim();
|
|
197
337
|
|
|
198
338
|
if (result.includes('vector')) {
|
|
@@ -205,26 +345,29 @@ async function installPostgreSQL() {
|
|
|
205
345
|
console.log('🎉 PostgreSQL + pgvector installés !');
|
|
206
346
|
console.log('');
|
|
207
347
|
console.log('📋 Détails:');
|
|
208
|
-
console.log(
|
|
348
|
+
console.log(` Container: ${containerName}`);
|
|
209
349
|
console.log(' Port: 5432');
|
|
210
350
|
console.log(' User: postgres');
|
|
211
351
|
console.log(' Password: overmind_temp_password_change_me (À CHANGER !)');
|
|
212
352
|
console.log(' Extension: vector (pgvector)');
|
|
213
353
|
|
|
214
|
-
return true;
|
|
354
|
+
return { type: 'docker', container: containerName, hasPgvector: true };
|
|
215
355
|
|
|
216
356
|
} catch (error) {
|
|
217
357
|
console.error('❌ Erreur installation PostgreSQL:', error.message);
|
|
218
358
|
console.error('');
|
|
219
359
|
console.log('💡 Solution manuelle:');
|
|
220
|
-
console.log(
|
|
360
|
+
console.log(` docker run -d --name ${containerName} \\`);
|
|
221
361
|
console.log(' -p 5432:5432 \\');
|
|
222
362
|
console.log(' -e POSTGRES_PASSWORD=votre_pass \\');
|
|
223
363
|
console.log(' -e POSTGRES_USER=postgres \\');
|
|
224
|
-
console.log(' -v
|
|
364
|
+
console.log(' -v overmind_postgres_data:/var/lib/postgresql/data \\');
|
|
225
365
|
console.log(' --restart unless-stopped \\');
|
|
226
366
|
console.log(' pgvector/pgvector:pg16');
|
|
227
|
-
|
|
367
|
+
console.log('');
|
|
368
|
+
console.log('Ou en une ligne (Windows):');
|
|
369
|
+
console.log(` docker run -d --name ${containerName} -p 5432:5432 -e POSTGRES_PASSWORD=votre_pass -e POSTGRES_USER=postgres -v overmind_postgres_data:/var/lib/postgresql/data --restart unless-stopped pgvector/pgvector:pg16`);
|
|
370
|
+
return null;
|
|
228
371
|
}
|
|
229
372
|
}
|
|
230
373
|
|
|
@@ -236,21 +379,52 @@ async function main() {
|
|
|
236
379
|
console.log('╔══════════════════════════════════════════════════════════════════╗');
|
|
237
380
|
console.log('║ ║');
|
|
238
381
|
console.log('║ 🗄️️ INSTALLATION POSTGRESQL + PGVECTOR ║');
|
|
382
|
+
console.log('║ Détection & Installation Automatique ║');
|
|
239
383
|
console.log('║ ║');
|
|
240
384
|
console.log('╚══════════════════════════════════════════════════════════════════╝');
|
|
241
385
|
console.log('');
|
|
242
386
|
|
|
243
|
-
// Install Docker
|
|
244
|
-
const
|
|
245
|
-
if (!
|
|
387
|
+
// Step 1: Check/Install Docker
|
|
388
|
+
const dockerInfo = await installDockerIfNeeded();
|
|
389
|
+
if (!dockerInfo) {
|
|
246
390
|
console.log('\n⚠️ Relancez ce script après avoir installé Docker.');
|
|
247
391
|
process.exit(1);
|
|
248
392
|
}
|
|
249
393
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
394
|
+
console.log('');
|
|
395
|
+
console.log(`📊 Plateforme: ${dockerInfo.type} (${dockerInfo.platform})`);
|
|
396
|
+
console.log('');
|
|
397
|
+
|
|
398
|
+
// Step 2: Detect existing PostgreSQL
|
|
399
|
+
const existingPg = await detectExistingPostgreSQL();
|
|
400
|
+
|
|
401
|
+
if (existingPg && existingPg.hasPgvector) {
|
|
402
|
+
console.log('');
|
|
403
|
+
console.log('✅ PostgreSQL + pgvector sont déjà installés !');
|
|
404
|
+
|
|
405
|
+
if (existingPg.type === 'docker') {
|
|
406
|
+
console.log(` Container: ${existingPg.container}`);
|
|
407
|
+
console.log(' Port: 5432');
|
|
408
|
+
console.log(' User: postgres');
|
|
409
|
+
console.log(' Extension: vector (pgvector)');
|
|
410
|
+
} else if (existingPg.type === 'native') {
|
|
411
|
+
console.log(' Installation native détectée');
|
|
412
|
+
console.log(' Extension: vector (pgvector)');
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
console.log('');
|
|
416
|
+
console.log('🎉 Rien à installer !');
|
|
417
|
+
|
|
418
|
+
return;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
// Step 3: Install PostgreSQL + pgvector
|
|
422
|
+
console.log('');
|
|
423
|
+
console.log('📦 Installation de PostgreSQL + pgvector requise...');
|
|
424
|
+
|
|
425
|
+
const installResult = await installPostgreSQLDocker();
|
|
426
|
+
if (!installResult) {
|
|
427
|
+
console.log('\n⚠️ Installation échouée. Vérifiez les erreurs ci-dessus.');
|
|
254
428
|
process.exit(1);
|
|
255
429
|
}
|
|
256
430
|
|
|
@@ -258,24 +432,29 @@ async function main() {
|
|
|
258
432
|
logSection('✅ INSTALLATION TERMINÉE');
|
|
259
433
|
|
|
260
434
|
console.log(`
|
|
261
|
-
🎉 PostgreSQL + pgvector
|
|
435
|
+
🎉 PostgreSQL + pgvector sont prêts !
|
|
262
436
|
|
|
263
437
|
📋 PROCHAINE ÉTAPE:
|
|
264
438
|
→ Relancez: overmind-setup --full
|
|
265
439
|
Ou manuellement: overmind-setup
|
|
266
440
|
|
|
267
441
|
💡 RAPPEL:
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
442
|
+
• Container: ${installResult.container}
|
|
443
|
+
• Port: 5432
|
|
444
|
+
• User: postgres
|
|
445
|
+
• Password: overmind_temp_password_change_me (CHANGEZ-LE !)
|
|
446
|
+
• Extension: vector (pgvector)
|
|
272
447
|
|
|
273
448
|
═════════════════════════════════════════════════════════════════════
|
|
274
449
|
`);
|
|
275
450
|
}
|
|
276
451
|
|
|
277
452
|
// Run main
|
|
278
|
-
if (
|
|
453
|
+
// Check if this file is being run directly (not imported)
|
|
454
|
+
const modulePath = fileURLToPath(import.meta.url);
|
|
455
|
+
const isMainModule = process.argv[1] === modulePath;
|
|
456
|
+
|
|
457
|
+
if (isMainModule) {
|
|
279
458
|
main().catch((error) => {
|
|
280
459
|
console.error('\n❌ ERREUR FATALE:', error.message);
|
|
281
460
|
process.exit(1);
|