overmind-mcp 2.8.22 → 2.8.23

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "overmind-mcp",
3
- "version": "2.8.22",
3
+ "version": "2.8.23",
4
4
  "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.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -18,6 +18,10 @@
18
18
  "import": "./dist/index.js",
19
19
  "types": "./dist/index.d.ts"
20
20
  },
21
+ "./bridge": {
22
+ "import": "./dist/bridge/index.js",
23
+ "types": "./dist/bridge/index.d.ts"
24
+ },
21
25
  "./package.json": "./package.json"
22
26
  },
23
27
  "files": [
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env bash
2
- # ════════════════════════════════════════════════════════════════════
3
- # Overmind Bridge Smoke Test (post-install validation)
4
- # ════════════════════════════════════════════════════════════════════
2
+ # ============================================================================
3
+ # Overmind Bridge - Smoke Test (post-install validation)
4
+ # ============================================================================
5
5
  #
6
- # Vérifie en moins de 10 secondes qu'un bridge nouvellement installé
7
- # répond correctement. À lancer après `systemctl start overmind-bridge`.
6
+ # Verifie en moins de 10s qu'un bridge nouvellement installe repond
7
+ # correctement. A lancer apres "systemctl start overmind-bridge".
8
8
  #
9
9
  # Usage:
10
10
  # ./scripts/bridge-smoke-test.sh
@@ -13,21 +13,21 @@
13
13
  #
14
14
  # Exit codes:
15
15
  # 0 = tous les tests OK
16
- # 1 = au moins un test a échoué
16
+ # 1 = au moins un test a echoue
17
17
  #
18
- # Dépendances : bash 4+, curl, jq (optionnel mais recommandé)
19
- # ════════════════════════════════════════════════════════════════════
18
+ # Dependances : bash 4+, curl, jq (optionnel)
19
+ # ============================================================================
20
20
 
21
21
  set -uo pipefail
22
22
 
23
- # ─── Defaults ──────────────────────────────────────────────────────
23
+ # === Defaults ===
24
24
  HOST="127.0.0.1"
25
25
  PORT="3100"
26
- TOKEN=""
26
+ AUTH_TOKEN_VAL=""
27
27
  ENV_FILE="/etc/overmind/bridge.env"
28
28
  TIMEOUT=5
29
29
 
30
- # ─── Couleurs (auto-désactivées si pas TTY) ────────────────────────
30
+ # === Couleurs, auto-desactivees si pas TTY ===
31
31
  if [[ -t 1 ]]; then
32
32
  C_RED=$'\033[0;31m'
33
33
  C_GREEN=$'\033[0;32m'
@@ -36,16 +36,22 @@ if [[ -t 1 ]]; then
36
36
  C_BOLD=$'\033[1m'
37
37
  C_RESET=$'\033[0m'
38
38
  else
39
- C_RED="" C_GREEN="" C_YELLOW="" C_BLUE="" C_BOLD="" C_RESET=""
39
+ C_RED=""
40
+ C_GREEN=""
41
+ C_YELLOW=""
42
+ C_BLUE=""
43
+ C_BOLD=""
44
+ C_RESET=""
40
45
  fi
41
46
 
42
- # ─── Args parsing ─────────────────────────────────────────────────
47
+ # === Args parsing ===
43
48
  while [[ $# -gt 0 ]]; do
44
49
  case "$1" in
45
- --host) HOST="$2"; shift 2 ;;
46
- --port) PORT="$2"; shift 2 ;;
47
- --auth-token) TOKEN="$2"; shift 2 ;;
48
- --env-file) ENV_FILE="$2"; shift 2 ;;
50
+ --host) HOST="$2"; shift 2 ;;
51
+ --port) PORT="$2"; shift 2 ;;
52
+ --auth-token) AUTH_TOKEN_VAL="$2"; shift 2 ;;
53
+ --env-file) ENV_FILE="$2"; shift 2 ;;
54
+ --timeout) TIMEOUT="$2"; shift 2 ;;
49
55
  -h|--help)
50
56
  sed -n '2,20p' "$0" | sed 's/^# *//'
51
57
  exit 0
@@ -57,55 +63,56 @@ while [[ $# -gt 0 ]]; do
57
63
  esac
58
64
  done
59
65
 
60
- # ─── Load token from env file si pas fourni ───────────────────────
61
- if [[ -z "$TOKEN" && -f "$ENV_FILE" ]]; then
62
- TOKEN=$(grep '^BRIDGE_AUTH_TOKEN=' "$ENV_FILE" | cut -d= -f2- | tr -d '"' | tr -d "'" || true)
66
+ # === Load token from env file si pas fourni ===
67
+ if [[ -z "${AUTH_TOKEN_VAL:-}" && -f "$ENV_FILE" ]]; then
68
+ AUTH_TOKEN_VAL="$(grep '^BRIDGE_AUTH_TOKEN=' "$ENV_FILE" | cut -d= -f2- | tr -d '"' | tr -d "'" || true)"
63
69
  fi
64
70
 
65
71
  BASE_URL="http://${HOST}:${PORT}"
66
72
  PASS=0
67
73
  FAIL=0
68
74
 
69
- # ─── Helpers ──────────────────────────────────────────────────────
75
+ # === Helpers ===
70
76
  have_jq() { command -v jq >/dev/null 2>&1; }
71
77
 
72
78
  check() {
73
79
  local name="$1"
74
80
  local result="$2"
75
81
  if [[ "$result" == "ok" ]]; then
76
- echo -e " ${C_GREEN}✓${C_RESET} $name"
82
+ echo -e " ${C_GREEN}OK${C_RESET} $name"
77
83
  PASS=$((PASS + 1))
78
84
  else
79
- echo -e " ${C_RED}✗${C_RESET} $name"
85
+ echo -e " ${C_RED}FAIL${C_RESET} $name"
80
86
  FAIL=$((FAIL + 1))
81
87
  fi
82
88
  }
83
89
 
84
90
  section() {
85
91
  echo
86
- echo -e "${C_BOLD}${C_BLUE} $1${C_RESET}"
92
+ echo -e "${C_BOLD}${C_BLUE}>> $1${C_RESET}"
87
93
  }
88
94
 
89
- # ─── Banner ───────────────────────────────────────────────────────
90
- echo -e "${C_BOLD}═══════════════════════════════════════════════════════${C_RESET}"
91
- echo -e "${C_BOLD} Overmind Bridge Smoke Test${C_RESET}"
95
+ # === Banner ===
96
+ echo -e "${C_BOLD}=======================================================${C_RESET}"
97
+ echo -e "${C_BOLD} Overmind Bridge - Smoke Test${C_RESET}"
92
98
  echo -e "${C_BOLD} Target: ${BASE_URL}${C_RESET}"
93
- echo -e "${C_BOLD}═══════════════════════════════════════════════════════${C_RESET}"
99
+ echo -e "${C_BOLD}=======================================================${C_RESET}"
94
100
 
95
- # ─── Test 1 : service joignable (TCP) ─────────────────────────────
101
+ # === Test 1 : service joignable ===
96
102
  section "1. Reachability"
97
- if curl -sS --max-time "$TIMEOUT" -o /dev/null -w "%{http_code}" \
98
- "$BASE_URL/health" 2>/dev/null | grep -qE '^(200|401|403)$'; then
99
- check "HTTP /health répond (200/401/403)" ok
103
+ HTTP_CODE=$(curl -sS --max-time "$TIMEOUT" -o /dev/null -w "%{http_code}" \
104
+ "$BASE_URL/health" 2>/dev/null || echo "000")
105
+ if echo "$HTTP_CODE" | grep -qE '^(200|401|403)$'; then
106
+ check "HTTP /health repond [200/401/403]" ok
100
107
  else
101
- check "HTTP /health ne répond pas bridge down ?" fail
108
+ check "HTTP /health ne repond pas - bridge down" fail
102
109
  echo
103
- echo -e "${C_RED}Bridge inaccessible. Abandon.${C_RESET}"
104
- echo -e " Vérifier : ${C_YELLOW}systemctl status overmind-bridge${C_RESET}"
110
+ echo -e "${C_RED}Bridge inaccessible. Abandon.${C_RESET}"
111
+ echo -e " Verifier : ${C_YELLOW}systemctl status overmind-bridge${C_RESET}"
105
112
  exit 1
106
113
  fi
107
114
 
108
- # ─── Test 2 : /health retourne un JSON valide ────────────────────
115
+ # === Test 2 : /health retourne un JSON valide ===
109
116
  section "2. /health endpoint"
110
117
  HEALTH_BODY=$(curl -sS --max-time "$TIMEOUT" "$BASE_URL/health" 2>/dev/null || true)
111
118
 
@@ -115,30 +122,30 @@ else
115
122
  HEALTH_STATUS=$(echo "$HEALTH_BODY" | grep -oE '"status"[[:space:]]*:[[:space:]]*"[^"]+"' | head -1 | cut -d'"' -f4)
116
123
  fi
117
124
 
118
- if [[ -n "$HEALTH_STATUS" && "$HEALTH_STATUS" != "missing" ]]; then
119
- check "/health expose un status ($HEALTH_STATUS)" ok
125
+ if [[ -n "${HEALTH_STATUS:-}" && "$HEALTH_STATUS" != "missing" ]]; then
126
+ check "/health expose un status : $HEALTH_STATUS" ok
120
127
  else
121
- check "/health n'expose pas de status endpoint cassé ?" fail
128
+ check "/health n expose pas de status - endpoint casse" fail
122
129
  fi
123
130
 
124
- # ─── Build AUTH_HEADER array for reuse ───────────────────────────
131
+ # === Build AUTH_HEADER array for reuse ===
125
132
  AUTH_HEADER=()
126
- if [[ -n "$TOKEN" ]]; then
127
- AUTH_HEADER=(-H "Authorization: Bearer $TOKEN")
133
+ if [[ -n "${AUTH_TOKEN_VAL:-}" ]]; then
134
+ AUTH_HEADER=(-H "Authorization: Bearer ${AUTH_TOKEN_VAL}")
128
135
  fi
129
136
 
130
- # ─── Test 3 : auth requise si token configuré ────────────────────
137
+ # === Test 3 : auth requise si token configure ===
131
138
  section "3. Authentication"
132
- if [[ -n "$TOKEN" ]]; then
139
+ if [[ -n "${AUTH_TOKEN_VAL:-}" ]]; then
133
140
  HTTP_NO_AUTH=$(curl -sS --max-time "$TIMEOUT" -o /dev/null -w "%{http_code}" \
134
141
  -X POST "$BASE_URL/rpc" \
135
142
  -H 'Content-Type: application/json' \
136
143
  -d '{"jsonrpc":"2.0","id":1,"method":"health.ping","params":{}}' 2>/dev/null || echo "000")
137
144
 
138
145
  if [[ "$HTTP_NO_AUTH" == "401" ]]; then
139
- check "Sans token 401 (auth actif)" ok
146
+ check "Sans token -> 401, auth actif" ok
140
147
  else
141
- check "Sans token $HTTP_NO_AUTH (attendu: 401)" fail
148
+ check "Sans token -> $HTTP_NO_AUTH [attendu: 401]" fail
142
149
  fi
143
150
 
144
151
  HTTP_WITH_AUTH=$(curl -sS --max-time "$TIMEOUT" -o /dev/null -w "%{http_code}" \
@@ -148,9 +155,9 @@ if [[ -n "$TOKEN" ]]; then
148
155
  -d '{"jsonrpc":"2.0","id":1,"method":"health.ping","params":{}}' 2>/dev/null || echo "000")
149
156
 
150
157
  if [[ "$HTTP_WITH_AUTH" == "200" ]]; then
151
- check "Avec token 200 (auth OK)" ok
158
+ check "Avec token -> 200, auth OK" ok
152
159
  else
153
- check "Avec token $HTTP_WITH_AUTH (attendu: 200)" fail
160
+ check "Avec token -> $HTTP_WITH_AUTH [attendu: 200]" fail
154
161
  fi
155
162
  else
156
163
  HTTP_OPEN=$(curl -sS --max-time "$TIMEOUT" -o /dev/null -w "%{http_code}" \
@@ -159,13 +166,13 @@ else
159
166
  -d '{"jsonrpc":"2.0","id":1,"method":"health.ping","params":{}}' 2>/dev/null || echo "000")
160
167
 
161
168
  if [[ "$HTTP_OPEN" == "200" ]]; then
162
- check "/rpc ouvert (auth non configurée)" ok
169
+ check "/rpc ouvert, auth non configuree" ok
163
170
  else
164
- check "/rpc ouvert $HTTP_OPEN (attendu: 200)" fail
171
+ check "/rpc ouvert -> $HTTP_OPEN [attendu: 200]" fail
165
172
  fi
166
173
  fi
167
174
 
168
- # ─── Test 4 : health.ping RPC ────────────────────────────────────
175
+ # === Test 4 : health.ping RPC ===
169
176
  section "4. JSON-RPC methods"
170
177
  PING_BODY=$(curl -sS --max-time "$TIMEOUT" \
171
178
  "${AUTH_HEADER[@]}" \
@@ -174,12 +181,12 @@ PING_BODY=$(curl -sS --max-time "$TIMEOUT" \
174
181
  -d '{"jsonrpc":"2.0","id":1,"method":"health.ping","params":{}}' 2>/dev/null || true)
175
182
 
176
183
  if echo "$PING_BODY" | grep -q '"pong"[[:space:]]*:[[:space:]]*true'; then
177
- check "RPC health.ping répond" ok
184
+ check "RPC health.ping repond" ok
178
185
  else
179
- check "RPC health.ping échoue body: ${PING_BODY:0:100}" fail
186
+ check "RPC health.ping echoue - body: ${PING_BODY:0:100}" fail
180
187
  fi
181
188
 
182
- # ─── Test 5 : JSON-RPC validation (params invalides) ─────────────
189
+ # === Test 5 : JSON-RPC validation (params invalides) ===
183
190
  section "5. Error handling"
184
191
  INVALID_BODY=$(curl -sS --max-time "$TIMEOUT" \
185
192
  "${AUTH_HEADER[@]}" \
@@ -188,44 +195,44 @@ INVALID_BODY=$(curl -sS --max-time "$TIMEOUT" \
188
195
  -d '{"jsonrpc":"2.0","id":1,"method":"agent.run","params":{}}' 2>/dev/null || true)
189
196
 
190
197
  if echo "$INVALID_BODY" | grep -q '"code"[[:space:]]*:[[:space:]]*-32602'; then
191
- check "Params invalides -32602 (Invalid params)" ok
198
+ check "Params invalides -> -32602 Invalid params" ok
192
199
  else
193
- check "Params invalides code attendu: -32602, reçu: $INVALID_BODY" fail
200
+ check "Params invalides - code attendu: -32602, recu: $INVALID_BODY" fail
194
201
  fi
195
202
 
196
- # ─── Test 6 : batch request ──────────────────────────────────────
203
+ # === Test 6 : batch request ===
197
204
  section "6. Batch RPC"
198
205
  BATCH_BODY=$(curl -sS --max-time "$TIMEOUT" \
199
206
  "${AUTH_HEADER[@]}" \
200
207
  -H 'Content-Type: application/json' \
201
208
  -X POST "$BASE_URL/rpc" \
202
- -d '[
203
- {"jsonrpc":"2.0","id":1,"method":"health.ping","params":{}},
204
- {"jsonrpc":"2.0","id":2,"method":"health.ping","params":{}}
209
+ -d '[\
210
+ {"jsonrpc":"2.0","id":1,"method":"health.ping","params":{}},\
211
+ {"jsonrpc":"2.0","id":2,"method":"health.ping","params":{}}\
205
212
  ]' 2>/dev/null || true)
206
213
 
207
214
  BATCH_COUNT=$(echo "$BATCH_BODY" | grep -oE '"id"[[:space:]]*:[[:space:]]*[12]' | wc -l | tr -d ' ')
208
215
  if [[ "$BATCH_COUNT" == "2" ]]; then
209
- check "Batch RPC retourne 2 réponses" ok
216
+ check "Batch RPC retourne 2 reponses" ok
210
217
  else
211
- check "Batch RPC reçu: $BATCH_COUNT réponses (attendu: 2)" fail
218
+ check "Batch RPC - recu: $BATCH_COUNT reponses [attendu: 2]" fail
212
219
  fi
213
220
 
214
- # ─── Résumé ───────────────────────────────────────────────────────
221
+ # === Resume ===
215
222
  echo
216
- echo -e "${C_BOLD}═══════════════════════════════════════════════════════${C_RESET}"
223
+ echo -e "${C_BOLD}=======================================================${C_RESET}"
217
224
  if [[ $FAIL -eq 0 ]]; then
218
- echo -e "${C_GREEN}${C_BOLD} $PASS tests OK, 0 échec${C_RESET}"
219
- echo -e "${C_GREEN} Bridge opérationnel sur ${BASE_URL}${C_RESET}"
220
- echo -e "${C_BOLD}═══════════════════════════════════════════════════════${C_RESET}"
225
+ echo -e "${C_GREEN}${C_BOLD} OK $PASS tests OK, 0 echec${C_RESET}"
226
+ echo -e "${C_GREEN} Bridge operationnel sur ${BASE_URL}${C_RESET}"
227
+ echo -e "${C_BOLD}=======================================================${C_RESET}"
221
228
  exit 0
222
229
  else
223
- echo -e "${C_RED}${C_BOLD} $FAIL échec(s), $PASS tests OK${C_RESET}"
230
+ echo -e "${C_RED}${C_BOLD} FAIL $FAIL echec(s), $PASS tests OK${C_RESET}"
224
231
  echo
225
232
  echo -e " ${C_YELLOW}Diagnostic :${C_RESET}"
226
233
  echo -e " 1. ${C_YELLOW}systemctl status overmind-bridge${C_RESET}"
227
234
  echo -e " 2. ${C_YELLOW}journalctl -u overmind-bridge -n 100${C_RESET}"
228
235
  echo -e " 3. ${C_YELLOW}curl -v $BASE_URL/health${C_RESET}"
229
- echo -e "${C_BOLD}═══════════════════════════════════════════════════════${C_RESET}"
236
+ echo -e "${C_BOLD}=======================================================${C_RESET}"
230
237
  exit 1
231
238
  fi