overmind-mcp 3.3.7 → 3.3.8

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.
@@ -761,61 +761,96 @@ for check_dir in "bridge/wrappers" "logs" "hermes/profiles" "hermes/distribution
761
761
  done
762
762
 
763
763
  # ─── 2. Détecter le dual-path ~/.hermes vs ~/.overmind/hermes ─
764
+ # SOLUTION DÉFINITIVE: remplacer ~/.hermes/ par un SYMLINK vers ~/.overmind/hermes/
765
+ # Comme ça, peu importe qui écrit dans ~/.hermes/ (agent, humain, CLI),
766
+ # ça atterrit TOUJOURS dans ~/.overmind/hermes/.
764
767
  HERMES_NATIVE="$OM_HOME/.hermes"
765
- if [ -d "$HERMES_NATIVE" ] && [ -d "$OM_DIR/hermes" ]; then
766
- # Les deux existent! C'est le bug dual-path.
768
+
769
+ if [ -d "$HERMES_NATIVE" ] && [ ! -L "$HERMES_NATIVE" ]; then
770
+ # ~/.hermes/ existe ET n'est pas un symlink → c'est un vrai dossier
767
771
  NATIVE_PROFILES=$(find "$HERMES_NATIVE/profiles" -mindepth 1 -maxdepth 1 -type d 2>/dev/null | wc -l | tr -d ' ')
768
- OM_PROFILES=$(find "$PROFILES_DIR" -mindepth 1 -maxdepth 1 -type d 2>/dev/null | wc -l | tr -d ' ')
772
+ warn "DUAL-PATH détecté: ~/.hermes/ est un vrai dossier ($NATIVE_PROFILES profils)"
773
+ log "Migration → symlink: ~/.hermes/ → ~/.overmind/hermes/ (sans rien effacer)..."
769
774
 
770
- if [ "$NATIVE_PROFILES" -gt 0 ] && [ "$OM_PROFILES" -gt 0 ]; then
771
- warn "DUAL-PATH détecté: ~/.hermes/ ($NATIVE_PROFILES profils) ET ~/.overmind/hermes/ ($OM_PROFILES profils)"
772
- log "Correction: migration des profils ~/.hermes/ → ~/.overmind/hermes/profiles/ (sans effacer)..."
775
+ # 1. Créer ~/.overmind/hermes/ si vide
776
+ mkdir -p "$PROFILES_DIR" "$OM_DIR/hermes/distributions" 2>/dev/null || true
773
777
 
778
+ # 2. Copier TOUS les fichiers de ~/.hermes/ vers ~/.overmind/hermes/ (sans écraser)
779
+ if [ "$NATIVE_PROFILES" -gt 0 ]; then
774
780
  for native_profile in "$HERMES_NATIVE/profiles"/*/; do
775
781
  [ -d "$native_profile" ] || continue
776
782
  pname=$(basename "$native_profile")
777
783
  target="$PROFILES_DIR/$pname"
778
784
 
779
785
  if [ -d "$target" ]; then
780
- # Le profil existe déjà dans overmind vérifier quels fichiers manquent
781
- for file in config.yaml SOUL.md .env .mcp.json profile.yaml workspace.yaml; do
786
+ # Profil existe déjà combler les fichiers manquants uniquement
787
+ for file in config.yaml SOUL.md .env .mcp.json profile.yaml workspace.yaml auth.json state.db; do
782
788
  if [ ! -f "$target/$file" ] && [ -f "$native_profile/$file" ]; then
783
- log " Copie $pname/$file (manquant dans overmind, présent dans native)"
784
789
  cp -p "$native_profile/$file" "$target/$file" 2>/dev/null || true
790
+ log " Copie $pname/$file"
785
791
  fi
786
792
  done
787
- # state.db
788
- if [ ! -f "$target/state.db" ] && [ -f "$native_profile/state.db" ]; then
789
- log " Copie $pname/state.db"
790
- cp -p "$native_profile/state.db" "$target/state.db" 2>/dev/null || true
791
- fi
792
- # auth.json
793
- if [ ! -f "$target/auth.json" ] && [ -f "$native_profile/auth.json" ]; then
794
- log " Copie $pname/auth.json"
795
- cp -p "$native_profile/auth.json" "$target/auth.json" 2>/dev/null || true
796
- fi
797
- # skills/
798
- if [ ! -d "$target/skills" ] && [ -d "$native_profile/skills" ]; then
799
- log " Copie $pname/skills/"
800
- cp -rp "$native_profile/skills" "$target/" 2>/dev/null || true
801
- fi
802
- ok "Profil $pname: fichiers manquants comblés depuis ~/.hermes/"
793
+ for subdir in skills memories cron hooks; do
794
+ if [ ! -d "$target/$subdir" ] && [ -d "$native_profile/$subdir" ]; then
795
+ cp -rp "$native_profile/$subdir" "$target/" 2>/dev/null || true
796
+ log " Copie $pname/$subdir/"
797
+ fi
798
+ done
799
+ ok "Profil $pname: synchronisé"
803
800
  else
804
- # Le profil n'existe pas dans overmind — migration complète
805
- log " Migration complète: $pname"
801
+ # Profil n'existe pas migration complète
806
802
  cp -rp "$native_profile" "$target/" 2>/dev/null || true
807
- ok "Profil $pname migré vers ~/.overmind/hermes/profiles/"
803
+ ok "Profil $pname migré"
808
804
  fi
809
805
  done
810
- ok "Migration dual-path terminée (rien effacé — ~/.hermes/ conservé)"
811
- elif [ "$NATIVE_PROFILES" -gt 0 ] && [ "$OM_PROFILES" -eq 0 ]; then
812
- warn "~/.hermes/ a $NATIVE_PROFILES profils, ~/.overmind/hermes/ est vide"
813
- log "Migration complète des profils..."
814
- cp -rp "$HERMES_NATIVE/profiles/"* "$PROFILES_DIR/" 2>/dev/null || true
815
- # Copier aussi config.yaml et auth.json globaux
816
- [ -f "$HERMES_NATIVE/config.yaml" ] && cp -p "$HERMES_NATIVE/config.yaml" "$OM_DIR/hermes/config.yaml" 2>/dev/null || true
817
- [ -f "$HERMES_NATIVE/auth.json" ] && cp -p "$HERMES_NATIVE/auth.json" "$OM_DIR/hermes/auth.json" 2>/dev/null || true
818
- ok "Profils migrés vers ~/.overmind/hermes/profiles/"
806
+ fi
807
+
808
+ # 3. Copier les fichiers globaux (config.yaml, auth.json, .env)
809
+ for global_file in config.yaml auth.json .env .mcp.json; do
810
+ if [ -f "$HERMES_NATIVE/$global_file" ] && [ ! -f "$OM_DIR/hermes/$global_file" ]; then
811
+ cp -p "$HERMES_NATIVE/$global_file" "$OM_DIR/hermes/$global_file" 2>/dev/null || true
812
+ log " Copie globale: $global_file"
813
+ fi
814
+ done
815
+
816
+ # 4. Backup ~/.hermes/ → ~/.hermes.backup.YYYYMMDD (ne pas effacer!)
817
+ BACKUP_NAME="$HERMES_NATIVE.backup.$(date +%Y%m%d%H%M%S)"
818
+ mv "$HERMES_NATIVE" "$BACKUP_NAME" 2>/dev/null || {
819
+ track_warn "Impossible de renommer ~/.hermes/ — permission refusée"
820
+ track_warn "Migration manuelle requise: voir ~/.overmind/docs/MIGRATION_V3.md"
821
+ }
822
+
823
+ # 5. Créer le symlink ~/.hermes → ~/.overmind/hermes
824
+ if [ ! -e "$HERMES_NATIVE" ]; then
825
+ ln -sfn "$OM_DIR/hermes" "$HERMES_NATIVE" 2>/dev/null || {
826
+ track_warn "Impossible de créer le symlink ~/.hermes/ → ~/.overmind/hermes/"
827
+ track_warn "Faites manuellement: ln -sfn ~/.overmind/hermes ~/.hermes"
828
+ }
829
+ if [ -L "$HERMES_NATIVE" ]; then
830
+ ok "Symlink créé: ~/.hermes/ → ~/.overmind/hermes/"
831
+ ok "Backup conservé: $BACKUP_NAME"
832
+ ok "Aucune donnée effacée — backup disponible si rollback nécessaire"
833
+ fi
834
+ fi
835
+
836
+ elif [ -L "$HERMES_NATIVE" ]; then
837
+ # C'est déjà un symlink — vérifier qu'il pointe au bon endroit
838
+ LINK_TARGET=$(readlink "$HERMES_NATIVE" 2>/dev/null)
839
+ if [ "$LINK_TARGET" = "$OM_DIR/hermes" ]; then
840
+ ok "Symlink ~/.hermes/ → ~/.overmind/hermes/ déjà en place"
841
+ else
842
+ warn "Symlink ~/.hermes/ pointe vers $LINK_TARGET (mauvaise cible)"
843
+ log "Correction: ~/.hermes/ → ~/.overmind/hermes/"
844
+ ln -sfn "$OM_DIR/hermes" "$HERMES_NATIVE" 2>/dev/null || true
845
+ ok "Symlink corrigé"
846
+ fi
847
+
848
+ elif [ ! -e "$HERMES_NATIVE" ]; then
849
+ # ~/.hermes/ n'existe pas → créer le symlink directement
850
+ log "Création symlink ~/.hermes/ → ~/.overmind/hermes/"
851
+ ln -sfn "$OM_DIR/hermes" "$HERMES_NATIVE" 2>/dev/null || true
852
+ if [ -L "$HERMES_NATIVE" ]; then
853
+ ok "Symlink créé: ~/.hermes/ → ~/.overmind/hermes/"
819
854
  fi
820
855
  fi
821
856
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "overmind-mcp",
3
- "version": "3.3.7",
3
+ "version": "3.3.8",
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",