@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.
Files changed (2) hide show
  1. package/install.js +26 -3
  2. 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 — SOLO en el PROYECTO (no en HOME, para evitar falsos positivos)
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
- return markerInProject || rulesDirInProject || skillsDirInProject || configInProject;
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
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "3.3.0",
6
+ "version": "3.3.1",
7
7
  "files": [
8
8
  "install.js",
9
9
  "README.md",
@@ -83,4 +83,4 @@
83
83
  "gradient-string": "^3.0.0",
84
84
  "inquirer": "^8.2.6"
85
85
  }
86
- }
86
+ }