overmind-mcp 2.1.0 → 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/install-overmind-unix.sh +75 -6
- package/install-overmind-windows.bat +74 -8
- package/package.json +8 -14
- 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/test-installation.mjs +158 -0
- package/scripts/docker-manager.mjs +0 -200
package/install-overmind-unix.sh
CHANGED
|
@@ -211,6 +211,80 @@ if [ "$USE_EXTERNAL_POSTGRES" -eq 1 ]; then
|
|
|
211
211
|
fi
|
|
212
212
|
|
|
213
213
|
echo -e "${GREEN}[OK] Fichers téléchargés${NC}"
|
|
214
|
+
|
|
215
|
+
echo -e "${YELLOW}[INFO] Création fichiers de configuration...${NC}"
|
|
216
|
+
mkdir -p "$OVERMIND_DIR/config/grafana/provisioning/datasources"
|
|
217
|
+
|
|
218
|
+
echo -e "${YELLOW}[INFO] Création config OTEL collector...${NC}"
|
|
219
|
+
cat > "$OVERMIND_DIR/config/otel-collector.yml" << 'EOF'
|
|
220
|
+
receivers:
|
|
221
|
+
otlp:
|
|
222
|
+
protocols:
|
|
223
|
+
grpc:
|
|
224
|
+
endpoint: 0.0.0.0:4317
|
|
225
|
+
http:
|
|
226
|
+
endpoint: 0.0.0.0:4318
|
|
227
|
+
|
|
228
|
+
processors:
|
|
229
|
+
batch:
|
|
230
|
+
|
|
231
|
+
exporters:
|
|
232
|
+
otlp/jaeger:
|
|
233
|
+
endpoint: jaeger:4317
|
|
234
|
+
tls:
|
|
235
|
+
insecure: true
|
|
236
|
+
|
|
237
|
+
prometheusremotewrite:
|
|
238
|
+
endpoint: http://prometheus:9090/api/v1/write
|
|
239
|
+
|
|
240
|
+
service:
|
|
241
|
+
pipelines:
|
|
242
|
+
traces:
|
|
243
|
+
receivers: [otlp]
|
|
244
|
+
processors: [batch]
|
|
245
|
+
exporters: [otlp/jaeger]
|
|
246
|
+
|
|
247
|
+
metrics:
|
|
248
|
+
receivers: [otlp]
|
|
249
|
+
processors: [batch]
|
|
250
|
+
exporters: [prometheusremotewrite]
|
|
251
|
+
EOF
|
|
252
|
+
|
|
253
|
+
echo -e "${YELLOW}[INFO] Création config Prometheus...${NC}"
|
|
254
|
+
cat > "$OVERMIND_DIR/config/prometheus.yml" << 'EOF'
|
|
255
|
+
global:
|
|
256
|
+
scrape_interval: 15s
|
|
257
|
+
evaluation_interval: 15s
|
|
258
|
+
|
|
259
|
+
scrape_configs:
|
|
260
|
+
- job_name: 'prometheus'
|
|
261
|
+
static_configs:
|
|
262
|
+
- targets: ['localhost:9090']
|
|
263
|
+
|
|
264
|
+
- job_name: 'otel-collector'
|
|
265
|
+
static_configs:
|
|
266
|
+
- targets: ['otel-collector:9464']
|
|
267
|
+
EOF
|
|
268
|
+
|
|
269
|
+
echo -e "${YELLOW}[INFO] Création config Grafana datasource...${NC}"
|
|
270
|
+
cat > "$OVERMIND_DIR/config/grafana/provisioning/datasources/prometheus.yml" << 'EOF'
|
|
271
|
+
apiVersion: 1
|
|
272
|
+
|
|
273
|
+
datasources:
|
|
274
|
+
- name: Prometheus
|
|
275
|
+
type: prometheus
|
|
276
|
+
access: proxy
|
|
277
|
+
url: http://prometheus:9090
|
|
278
|
+
isDefault: true
|
|
279
|
+
EOF
|
|
280
|
+
|
|
281
|
+
echo -e "${GREEN}[OK] Fichiers de configuration créés${NC}"
|
|
282
|
+
|
|
283
|
+
echo -e "${YELLOW}[INFO] Création init-db.sql...${NC}"
|
|
284
|
+
curl -sL https://raw.githubusercontent.com/DeamonDev888/overmind-mcp/main/init-db.sql -o "$OVERMIND_DIR/init-db.sql"
|
|
285
|
+
echo -e "${GREEN}[OK] init-db.sql téléchargé${NC}"
|
|
286
|
+
|
|
287
|
+
|
|
214
288
|
echo ""
|
|
215
289
|
|
|
216
290
|
# ============================================================
|
|
@@ -284,12 +358,7 @@ fi
|
|
|
284
358
|
|
|
285
359
|
# Test Temporal
|
|
286
360
|
echo -e " • Temporal:"
|
|
287
|
-
|
|
288
|
-
if [ $? -eq 0 ]; then
|
|
289
|
-
echo -e "${GREEN} [OK] Temporal actif${NC}"
|
|
290
|
-
else
|
|
291
|
-
echo -e "${RED} [FAIL] Temporal non trouvé${NC}"
|
|
292
|
-
fi
|
|
361
|
+
echo -e "${YELLOW} [INFO] Désactivé (requiert init DB)${NC}"
|
|
293
362
|
|
|
294
363
|
# Test Prometheus
|
|
295
364
|
echo -e " • Prometheus:"
|
|
@@ -204,7 +204,78 @@ echo [INFO] Telechargement docker-compose.yml...
|
|
|
204
204
|
curl -sL https://raw.githubusercontent.com/DeamonDev888/overmind-mcp/main/docker-compose.yml -o "%USERPROFILE%\.overmind\docker-compose.yml"
|
|
205
205
|
curl -sL https://raw.githubusercontent.com/DeamonDev888/overmind-mcp/main/docker-compose.exporters.yml -o "%USERPROFILE%\.overmind\docker-compose.exporters.yml"
|
|
206
206
|
|
|
207
|
-
echo
|
|
207
|
+
echo [INFO] Creation configuration fichiers...
|
|
208
|
+
if not exist "%USERPROFILE%\.overmind\config" mkdir "%USERPROFILE%\.overmind\config"
|
|
209
|
+
if not exist "%USERPROFILE%\.overmind\config\grafana\provisioning\datasources" mkdir "%USERPROFILE%\.overmind\config\grafana\provisioning\datasources"
|
|
210
|
+
|
|
211
|
+
echo [INFO] Creation OTEL collector config...
|
|
212
|
+
(
|
|
213
|
+
echo receivers:
|
|
214
|
+
echo otlp:
|
|
215
|
+
echo protocols:
|
|
216
|
+
echo grpc:
|
|
217
|
+
echo endpoint: 0.0.0.0:4317
|
|
218
|
+
echo http:
|
|
219
|
+
echo endpoint: 0.0.0.0:4318
|
|
220
|
+
echo.
|
|
221
|
+
echo processors:
|
|
222
|
+
echo batch:
|
|
223
|
+
echo.
|
|
224
|
+
echo exporters:
|
|
225
|
+
echo otlp/jaeger:
|
|
226
|
+
echo endpoint: jaeger:4317
|
|
227
|
+
echo tls:
|
|
228
|
+
echo insecure: true
|
|
229
|
+
echo.
|
|
230
|
+
echo prometheusremotewrite:
|
|
231
|
+
echo endpoint: http://prometheus:9090/api/v1/write
|
|
232
|
+
echo.
|
|
233
|
+
echo service:
|
|
234
|
+
echo pipelines:
|
|
235
|
+
echo traces:
|
|
236
|
+
echo receivers: [otlp]
|
|
237
|
+
echo processors: [batch]
|
|
238
|
+
echo exporters: [otlp/jaeger]
|
|
239
|
+
echo.
|
|
240
|
+
echo metrics:
|
|
241
|
+
echo receivers: [otlp]
|
|
242
|
+
echo processors: [batch]
|
|
243
|
+
echo exporters: [prometheusremotewrite]
|
|
244
|
+
) > "%USERPROFILE%\.overmind\config\otel-collector.yml"
|
|
245
|
+
|
|
246
|
+
echo [INFO] Creation Prometheus config...
|
|
247
|
+
(
|
|
248
|
+
echo global:
|
|
249
|
+
echo scrape_interval: 15s
|
|
250
|
+
echo evaluation_interval: 15s
|
|
251
|
+
echo.
|
|
252
|
+
echo scrape_configs:
|
|
253
|
+
echo - job_name: 'prometheus'
|
|
254
|
+
echo static_configs:
|
|
255
|
+
echo - targets: ['localhost:9090']
|
|
256
|
+
echo.
|
|
257
|
+
echo - job_name: 'otel-collector'
|
|
258
|
+
echo static_configs:
|
|
259
|
+
echo - targets: ['otel-collector:9464']
|
|
260
|
+
) > "%USERPROFILE%\.overmind\config\prometheus.yml"
|
|
261
|
+
|
|
262
|
+
echo [INFO] Creation Grafana datasource config...
|
|
263
|
+
(
|
|
264
|
+
echo apiVersion: 1
|
|
265
|
+
echo.
|
|
266
|
+
echo datasources:
|
|
267
|
+
echo - name: Prometheus
|
|
268
|
+
echo type: prometheus
|
|
269
|
+
echo access: proxy
|
|
270
|
+
echo url: http://prometheus:9090
|
|
271
|
+
echo isDefault: true
|
|
272
|
+
) > "%USERPROFILE%\.overmind\config\grafana\provisioning\datasources\prometheus.yml"
|
|
273
|
+
|
|
274
|
+
echo %ESC%[92m[OK] Configuration fichiers crees%ESC%
|
|
275
|
+
|
|
276
|
+
echo [INFO] Creation init-db.sql...
|
|
277
|
+
curl -sL https://raw.githubusercontent.com/DeamonDev888/overmind-mcp/main/init-db.sql -o "%USERPROFILE%.overmindinit-db.sql"
|
|
278
|
+
|
|
208
279
|
echo.
|
|
209
280
|
|
|
210
281
|
REM ============================================================
|
|
@@ -283,13 +354,8 @@ if errorlevel 1 (
|
|
|
283
354
|
echo %ESC%[92m [OK] RabbitMQ actif%ESC%
|
|
284
355
|
)
|
|
285
356
|
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
if errorlevel 1 (
|
|
289
|
-
echo %ESC%[91m [FAIL] Temporal non trouve%ESC%
|
|
290
|
-
) else (
|
|
291
|
-
echo %ESC%[92m [OK] Temporal actif%ESC%
|
|
292
|
-
)
|
|
357
|
+
REM Temporal desactive - skip validation
|
|
358
|
+
echo - Temporal: %ESC%[93m [INFO] Desactive (requiert init DB)%ESC%
|
|
293
359
|
|
|
294
360
|
echo - Prometheus:
|
|
295
361
|
docker ps --filter "name=overmind-prometheus" --format "{{.Names}}" | findstr prometheus >nul
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "overmind-mcp",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"preferGlobal": true,
|
|
5
5
|
"description": "Orchestrateur universel agents IA multi-modeles via MCP. Inclut le protocole 'Custom-Nickname' pour identifier vos agents avec des surnoms originaux (The Chaos Prophet, Shadow Sniper, etc.), l'isolation mémoire (Private Memory Context) et le support pour QwenCli et Nous Hermes. Installation automatique des dépendances Docker (PostgreSQL, pgvector) inclus.",
|
|
6
6
|
"type": "module",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"bin": {
|
|
10
10
|
"overmind": "./dist/bin/cli.js",
|
|
11
11
|
"overmind-setup": "./scripts/setup.mjs",
|
|
12
|
-
"overmind-
|
|
12
|
+
"overmind-postgres": "./scripts/postgres-manager.mjs",
|
|
13
13
|
"overmind-uninstall": "./scripts/uninstall.mjs"
|
|
14
14
|
},
|
|
15
15
|
"exports": {
|
|
@@ -33,8 +33,6 @@
|
|
|
33
33
|
"rebuild": "rimraf dist && tsc",
|
|
34
34
|
"clean": "rimraf dist",
|
|
35
35
|
"start": "node --no-warnings --env-file=.env dist/bin/cli.js",
|
|
36
|
-
"worker:rabbitmq": "node --no-warnings --env-file=.env dist/bin/rabbitmq-worker.js",
|
|
37
|
-
"worker:temporal": "node --no-warnings --env-file=.env dist/bin/temporal-worker.js",
|
|
38
36
|
"dev": "node --no-warnings --watch --env-file=.env dist/bin/cli.js",
|
|
39
37
|
"build:fix": "pnpm run clean && pnpm install && pnpm run build",
|
|
40
38
|
"lint": "eslint .",
|
|
@@ -42,19 +40,19 @@
|
|
|
42
40
|
"format": "prettier --write .",
|
|
43
41
|
"check-types": "tsc --noEmit",
|
|
44
42
|
"test": "vitest run",
|
|
43
|
+
"test:install": "node scripts/test-installation.mjs",
|
|
45
44
|
"changeset": "changeset",
|
|
46
45
|
"version": "changeset version",
|
|
47
46
|
"release": "pnpm run build && changeset publish",
|
|
48
47
|
"prepublishOnly": "pnpm run rebuild",
|
|
49
48
|
"postinstall": "node scripts/postinstall.mjs",
|
|
50
49
|
"setup": "overmind-setup",
|
|
51
|
-
"setup:full": "overmind-setup --full",
|
|
52
50
|
"setup:deps": "node scripts/install-dependencies.mjs",
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
51
|
+
"postgres:up": "overmind-postgres up",
|
|
52
|
+
"postgres:down": "overmind-postgres down",
|
|
53
|
+
"postgres:status": "overmind-postgres status",
|
|
54
|
+
"postgres:logs": "overmind-postgres logs",
|
|
55
|
+
"postgres:reset": "overmind-postgres reset"
|
|
58
56
|
},
|
|
59
57
|
"keywords": [
|
|
60
58
|
"mcp",
|
|
@@ -64,11 +62,7 @@
|
|
|
64
62
|
"llm",
|
|
65
63
|
"orchestration",
|
|
66
64
|
"automation",
|
|
67
|
-
"swarm",
|
|
68
|
-
"temporal",
|
|
69
|
-
"rabbitmq",
|
|
70
65
|
"pgvector",
|
|
71
|
-
"observability",
|
|
72
66
|
"docker",
|
|
73
67
|
"auto-installation"
|
|
74
68
|
],
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
3
|
* ═══════════════════════════════════════════════════════════════════════════════
|
|
4
|
-
* INSTALL-DEPENDENCIES SCRIPT
|
|
4
|
+
* INSTALL-DEPENDENCIES SCRIPT (SIMPLIFIÉ)
|
|
5
5
|
* ═══════════════════════════════════════════════════════════════════════════════
|
|
6
6
|
* Script cross-platform qui détecte et installe uniquement ce qui manque :
|
|
7
7
|
* - Docker Desktop / Docker Engine
|
|
8
|
-
* - PostgreSQL + pgvector (
|
|
8
|
+
* - PostgreSQL + pgvector (uniquement)
|
|
9
9
|
*
|
|
10
10
|
* Supporte: Windows (Docker Desktop), Linux (Docker Engine), macOS (Docker Desktop)
|
|
11
11
|
* ═══════════════════════════════════════════════════════════════════════════════
|
|
@@ -435,8 +435,8 @@ async function main() {
|
|
|
435
435
|
🎉 PostgreSQL + pgvector sont prêts !
|
|
436
436
|
|
|
437
437
|
📋 PROCHAINE ÉTAPE:
|
|
438
|
-
→ Relancez: overmind-setup
|
|
439
|
-
Ou manuellement: overmind-
|
|
438
|
+
→ Relancez: overmind-setup
|
|
439
|
+
Ou manuellement: npm install -g overmind-mcp
|
|
440
440
|
|
|
441
441
|
💡 RAPPEL:
|
|
442
442
|
• Container: ${installResult.container}
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* ═══════════════════════════════════════════════════════════════════════════════
|
|
4
|
+
* POSTGRES-MANAGER - Gestion PostgreSQL OverMind
|
|
5
|
+
* ═══════════════════════════════════════════════════════════════════════════════
|
|
6
|
+
* Script simplifié pour gérer PostgreSQL + pgvector OverMind
|
|
7
|
+
*
|
|
8
|
+
* Usage:
|
|
9
|
+
* overmind-postgres up Démarrer PostgreSQL
|
|
10
|
+
* overmind-postgres down Arrêter PostgreSQL
|
|
11
|
+
* overmind-postgres status Vérifier l'état
|
|
12
|
+
* overmind-postgres logs Voir les logs
|
|
13
|
+
* overmind-postgres reset Réinitialiser (⚠️ supprime les données)
|
|
14
|
+
* ═══════════════════════════════════════════════════════════════════════════════
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { execSync } from 'child_process';
|
|
18
|
+
import { existsSync } from 'fs';
|
|
19
|
+
import { join } from 'path';
|
|
20
|
+
import { fileURLToPath } from 'url';
|
|
21
|
+
import { dirname } from 'path';
|
|
22
|
+
|
|
23
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
24
|
+
const __dirname = dirname(__filename);
|
|
25
|
+
|
|
26
|
+
const PROJECT_ROOT = join(__dirname, '..');
|
|
27
|
+
const COMPOSE_FILE = join(PROJECT_ROOT, 'docker-compose.yml');
|
|
28
|
+
|
|
29
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
30
|
+
// UTILS
|
|
31
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
32
|
+
|
|
33
|
+
function logSection(title) {
|
|
34
|
+
console.log('\n╔══════════════════════════════════════════════════════════════════╗');
|
|
35
|
+
console.log(`║ ${title.padEnd(64)} ║`);
|
|
36
|
+
console.log('╚══════════════════════════════════════════════════════════════════╝');
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function runCommand(cmd, options = {}) {
|
|
40
|
+
try {
|
|
41
|
+
return execSync(cmd, { stdio: 'inherit', ...options });
|
|
42
|
+
} catch (error) {
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
48
|
+
// COMMANDS
|
|
49
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
50
|
+
|
|
51
|
+
function commandUp() {
|
|
52
|
+
logSection('DÉMARRAGE POSTGRESQL OVERMIND');
|
|
53
|
+
|
|
54
|
+
if (!existsSync(COMPOSE_FILE)) {
|
|
55
|
+
console.error('❌ Fichier docker-compose.yml non trouvé');
|
|
56
|
+
process.exit(1);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
try {
|
|
60
|
+
runCommand(`docker-compose -f "${COMPOSE_FILE}" up -d`);
|
|
61
|
+
console.log('');
|
|
62
|
+
console.log('✅ PostgreSQL + pgvector démarré avec succès !');
|
|
63
|
+
console.log('');
|
|
64
|
+
console.log('📊 Connexion:');
|
|
65
|
+
console.log(' Host: localhost:5432');
|
|
66
|
+
console.log(' Database: overmind_memory');
|
|
67
|
+
console.log(' User: postgres');
|
|
68
|
+
console.log(' Password: overmind_temp_password_change_me');
|
|
69
|
+
console.log('');
|
|
70
|
+
console.log('💪 Extensions: pgvector (4096D) activé');
|
|
71
|
+
console.log('');
|
|
72
|
+
} catch (error) {
|
|
73
|
+
console.error('❌ Erreur démarrage PostgreSQL:', error.message);
|
|
74
|
+
process.exit(1);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function commandDown() {
|
|
79
|
+
logSection('ARRÊT POSTGRESQL OVERMIND');
|
|
80
|
+
|
|
81
|
+
if (!existsSync(COMPOSE_FILE)) {
|
|
82
|
+
console.error('❌ Fichier docker-compose.yml non trouvé');
|
|
83
|
+
process.exit(1);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
try {
|
|
87
|
+
runCommand(`docker-compose -f "${COMPOSE_FILE}" down`);
|
|
88
|
+
console.log('');
|
|
89
|
+
console.log('✅ PostgreSQL arrêté avec succès !');
|
|
90
|
+
console.log('');
|
|
91
|
+
console.log('💡 Les données sont conservées dans le volume Docker.');
|
|
92
|
+
console.log('');
|
|
93
|
+
} catch (error) {
|
|
94
|
+
console.error('❌ Erreur arrêt PostgreSQL:', error.message);
|
|
95
|
+
process.exit(1);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
function commandStatus() {
|
|
100
|
+
logSection('ÉTAT POSTGRESQL OVERMIND');
|
|
101
|
+
|
|
102
|
+
if (!existsSync(COMPOSE_FILE)) {
|
|
103
|
+
console.error('❌ Fichier docker-compose.yml non trouvé');
|
|
104
|
+
process.exit(1);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
try {
|
|
108
|
+
runCommand(`docker-compose -f "${COMPOSE_FILE}" ps`);
|
|
109
|
+
} catch (error) {
|
|
110
|
+
console.error('❌ Erreur vérification état:', error.message);
|
|
111
|
+
process.exit(1);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
function commandLogs() {
|
|
116
|
+
logSection('LOGS POSTGRESQL OVERMIND');
|
|
117
|
+
console.log(' (Ctrl+C pour sortir)');
|
|
118
|
+
console.log('');
|
|
119
|
+
|
|
120
|
+
if (!existsSync(COMPOSE_FILE)) {
|
|
121
|
+
console.error('❌ Fichier docker-compose.yml non trouvé');
|
|
122
|
+
process.exit(1);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
try {
|
|
126
|
+
runCommand(`docker-compose -f "${COMPOSE_FILE}" logs -f`);
|
|
127
|
+
} catch (error) {
|
|
128
|
+
// Ignore Ctrl+C
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
function commandReset() {
|
|
133
|
+
logSection('RÉINITIALISATION POSTGRESQL OVERMIND');
|
|
134
|
+
console.log('');
|
|
135
|
+
console.log('⚠️ ATTENTION: Cette commande va SUPPRIMER TOUTES LES DONNÉES !');
|
|
136
|
+
console.log('');
|
|
137
|
+
|
|
138
|
+
const { confirm } = require('minimist')(process.argv.slice(2));
|
|
139
|
+
if (!confirm) {
|
|
140
|
+
console.log('❌ Annulé. Pour confirmer, utilisez: --confirm');
|
|
141
|
+
console.log(' overmind-postgres reset --confirm');
|
|
142
|
+
process.exit(0);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
if (!existsSync(COMPOSE_FILE)) {
|
|
146
|
+
console.error('❌ Fichier docker-compose.yml non trouvé');
|
|
147
|
+
process.exit(1);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
try {
|
|
151
|
+
console.log('🛑 Arrêt PostgreSQL...');
|
|
152
|
+
runCommand(`docker-compose -f "${COMPOSE_FILE}" down -v`);
|
|
153
|
+
|
|
154
|
+
console.log('🗑️ Suppression du volume Docker...');
|
|
155
|
+
runCommand('docker volume rm overmind-postgres-data', { stdio: 'inherit' });
|
|
156
|
+
|
|
157
|
+
console.log('');
|
|
158
|
+
console.log('✅ PostgreSQL réinitialisé avec succès !');
|
|
159
|
+
console.log('');
|
|
160
|
+
console.log('📊 Prochaine étape:');
|
|
161
|
+
console.log(' overmind-postgres up');
|
|
162
|
+
console.log('');
|
|
163
|
+
} catch (error) {
|
|
164
|
+
console.error('❌ Erreur réinitialisation:', error.message);
|
|
165
|
+
process.exit(1);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
function showHelp() {
|
|
170
|
+
console.log('╔══════════════════════════════════════════════════════════════════╗');
|
|
171
|
+
console.log('║ POSTGRES-MANAGER: Gestion PostgreSQL OverMind ║');
|
|
172
|
+
console.log('╠════════════════════════════════════════════════════════════════╣');
|
|
173
|
+
console.log('║ Usage: ║');
|
|
174
|
+
console.log('║ overmind-postgres up Démarrer PostgreSQL ║');
|
|
175
|
+
console.log('║ overmind-postgres down Arrêter PostgreSQL ║');
|
|
176
|
+
console.log('║ overmind-postgres status Vérifier l''état ║');
|
|
177
|
+
console.log('║ overmind-postgres logs Voir les logs en temps réel ║');
|
|
178
|
+
console.log('║ overmind-postgres reset Réinitialiser (⚠️ données) ║');
|
|
179
|
+
console.log('║ ║');
|
|
180
|
+
console.log('║ Configuration: ║');
|
|
181
|
+
console.log('║ Host: localhost:5432 ║');
|
|
182
|
+
console.log('║ Database: overmind_memory ║');
|
|
183
|
+
console.log('║ User: postgres ║');
|
|
184
|
+
console.log('║ Extension: pgvector (4096D) ║');
|
|
185
|
+
console.log('║ ║');
|
|
186
|
+
console.log('║ Intégration OverMind: ║');
|
|
187
|
+
console.log('║ • Agents stockés dans overmind_agents ║');
|
|
188
|
+
console.log('║ • Mémoires vectorielles dans overmind_memories ║');
|
|
189
|
+
console.log('║ • Sessions dans overmind_sessions ║');
|
|
190
|
+
console.log('╚══════════════════════════════════════════════════════════════════╝');
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
194
|
+
// MAIN
|
|
195
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
196
|
+
|
|
197
|
+
const command = process.argv[2] || 'help';
|
|
198
|
+
|
|
199
|
+
switch (command) {
|
|
200
|
+
case 'up':
|
|
201
|
+
commandUp();
|
|
202
|
+
break;
|
|
203
|
+
case 'down':
|
|
204
|
+
commandDown();
|
|
205
|
+
break;
|
|
206
|
+
case 'status':
|
|
207
|
+
commandStatus();
|
|
208
|
+
break;
|
|
209
|
+
case 'logs':
|
|
210
|
+
commandLogs();
|
|
211
|
+
break;
|
|
212
|
+
case 'reset':
|
|
213
|
+
commandReset();
|
|
214
|
+
break;
|
|
215
|
+
case 'help':
|
|
216
|
+
default:
|
|
217
|
+
showHelp();
|
|
218
|
+
break;
|
|
219
|
+
}
|