@qubiit/lmagent 3.3.0 → 3.3.1
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.js +26 -3
- package/package.json +2 -2
package/install.js
CHANGED
|
@@ -477,16 +477,39 @@ async function runInstall(options) {
|
|
|
477
477
|
console.log(`🔧 Método: ${chalk.green(isWindows ? 'Copy (Windows Safe)' : 'Symlink (Live Updates)')}`);
|
|
478
478
|
console.log('');
|
|
479
479
|
|
|
480
|
-
// 3. Auto-Detect IDEs —
|
|
480
|
+
// 3. Auto-Detect IDEs — Detección DUAL: Proyecto + Sistema
|
|
481
|
+
// Primero busca en el PROYECTO actual, luego en HOME del usuario.
|
|
482
|
+
// HOME_PATHS se usa SOLO para detectar agentes instalados en el sistema (pre-selección).
|
|
483
|
+
// La instalación siempre va al PROYECTO actual, nunca a HOME.
|
|
484
|
+
const userHome = os.homedir();
|
|
485
|
+
const HOME_PATHS = {
|
|
486
|
+
'cursor': ['.cursor'], 'windsurf': ['.windsurf', '.codeium/windsurf'],
|
|
487
|
+
'cline': ['.cline'], 'roo': ['.roo'],
|
|
488
|
+
'vscode': ['.vscode'], 'trae': ['.trae'], 'trae-cn': ['.trae-cn'],
|
|
489
|
+
'claude': ['.claude'], 'zed': ['.config/zed', '.zed'],
|
|
490
|
+
'antigravity': ['.gemini'], 'gemini': ['.gemini'],
|
|
491
|
+
'augment': ['.augment'], 'continue': ['.continue'], 'codex': ['.codex'],
|
|
492
|
+
'goose': ['.config/goose', '.goose'], 'junie': ['.junie'],
|
|
493
|
+
'kilo': ['.kilocode'], 'kiro': ['.kiro'], 'opencode': ['.opencode'],
|
|
494
|
+
'openhands': ['.openhands'], 'amp': ['.config/amp'],
|
|
495
|
+
'zencoder': ['.zencoder'], 'codebuddy': ['.codebuddy'],
|
|
496
|
+
};
|
|
497
|
+
|
|
481
498
|
const detectedIdes = IDE_CONFIGS.filter(ide => {
|
|
482
499
|
if (ide.value === 'custom' || ide.value === 'generic') return false;
|
|
483
500
|
|
|
501
|
+
// 1) Buscar en el PROYECTO actual
|
|
484
502
|
const markerInProject = ide.markerFile && fs.existsSync(path.join(projectRoot, ide.markerFile));
|
|
485
503
|
const rulesDirInProject = ide.rulesDir && fs.existsSync(path.join(projectRoot, ide.rulesDir));
|
|
486
504
|
const skillsDirInProject = ide.skillsDir && fs.existsSync(path.join(projectRoot, ide.skillsDir));
|
|
487
|
-
// Detectar también por configFile existente en el proyecto
|
|
488
505
|
const configInProject = ide.configFile && fs.existsSync(path.join(projectRoot, ide.configFile));
|
|
489
|
-
|
|
506
|
+
const inProject = markerInProject || rulesDirInProject || skillsDirInProject || configInProject;
|
|
507
|
+
|
|
508
|
+
// 2) Buscar en HOME del usuario (detectar agente instalado en el sistema)
|
|
509
|
+
const homePaths = HOME_PATHS[ide.value] || [];
|
|
510
|
+
const inSystem = homePaths.some(p => fs.existsSync(path.join(userHome, p)));
|
|
511
|
+
|
|
512
|
+
return inProject || inSystem;
|
|
490
513
|
});
|
|
491
514
|
|
|
492
515
|
// 4. Smart Multi-Agent Auto-Detection Setup
|