@qubiit/lmagent 3.3.1 → 3.4.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/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "3.3.1",
6
+ "version": "3.4.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
+ }
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  /**
4
- * LMAgent Skill Generator — v3.3.0
4
+ * LMAgent Skill Generator — v3.4.0
5
5
  *
6
6
  * Genera la estructura completa de un nuevo skill interactivamente.
7
7
  *
@@ -14,11 +14,15 @@ import { mkdirSync, writeFileSync, existsSync } from 'fs';
14
14
  import { join, resolve, dirname } from 'path';
15
15
  import { fileURLToPath } from 'url';
16
16
  import { createInterface } from 'readline';
17
+ import { readFileSync } from 'fs';
17
18
 
18
19
  const __filename = fileURLToPath(import.meta.url);
19
20
  const __dirname = dirname(__filename);
20
21
  const ROOT = resolve(__dirname, '..');
21
- const SKILLS_DIR = join(ROOT, 'skills');
22
+ const SKILLS_DIR = join(ROOT, '.agents', 'skills');
23
+
24
+ const pkgContent = readFileSync(join(ROOT, 'package.json'), 'utf-8');
25
+ const CURRENT_VERSION = JSON.parse(pkgContent).version;
22
26
 
23
27
  // ─── Colores ──────────────────────────────────────────────────
24
28
  const c = {
@@ -92,7 +96,7 @@ name: ${data.name}
92
96
  description: ${data.description}
93
97
  role: ${data.role}
94
98
  type: ${data.type}
95
- version: "3.3.0"
99
+ version: "${CURRENT_VERSION}"
96
100
  icon: ${data.icon}
97
101
  expertise:
98
102
  ${expertise}
@@ -206,13 +210,13 @@ Antes de considerar una tarea terminada, verifica TODO:
206
210
 
207
211
  ---
208
212
 
209
- *Skill version: 3.3.0 | LMAgent Framework*
213
+ *Skill version: ${CURRENT_VERSION} | LMAgent Framework*
210
214
  `;
211
215
  }
212
216
 
213
217
  // ─── Main ─────────────────────────────────────────────────────
214
218
  async function main() {
215
- console.log(c.bold('\n🛠️ LMAgent Skill Generator v3.3.0\n'));
219
+ console.log(c.bold(`\n🛠️ LMAgent Skill Generator v${CURRENT_VERSION}\n`));
216
220
 
217
221
  const prompt = createPrompt();
218
222
 
@@ -75,32 +75,36 @@ function analyze(options = {}) {
75
75
  const projectRoot = process.cwd();
76
76
 
77
77
  // Detectar qué agentes están instalados
78
- // Detectar qué agentes están instalados
79
- const agentDirs = [
80
- { name: 'Cursor', rulesDir: '.cursor/rules', skillsDir: '.cursor/skills' },
81
- { name: 'Claude Code', rulesDir: '.claude/rules', skillsDir: '.claude/skills' },
82
- { name: 'Antigravity', rulesDir: '.agent/rules', skillsDir: '.agent/skills' },
83
- { name: 'Gemini CLI', rulesDir: '.gemini/rules', skillsDir: '.gemini/skills' },
84
- { name: 'Windsurf', rulesDir: '.windsurf/rules', skillsDir: '.windsurf/skills' },
85
- { name: 'Cline', rulesDir: '.clinerules', skillsDir: '.cline/skills' },
86
- { name: 'Roo Code', rulesDir: '.roo/rules', skillsDir: '.roo/skills' },
87
- { name: 'VSCode Copilot', rulesDir: '.github/instructions', skillsDir: '.github/skills' },
88
- { name: 'Augment', rulesDir: '.augment/rules', skillsDir: '.augment/skills' },
89
- { name: 'Continue', rulesDir: '.continue/rules', skillsDir: '.continue/skills' },
90
- { name: 'Codex', rulesDir: '.codex', skillsDir: '.codex/skills' },
91
- { name: 'OpenHands', rulesDir: '.openhands/microagents', skillsDir: '.openhands/skills' },
92
- { name: 'Junie', rulesDir: '.junie', skillsDir: '.junie/skills' },
93
- { name: 'Goose', rulesDir: '.goose', skillsDir: '.goose/skills' },
78
+ // Detectar qué agentes están instalados (simplificado revisando marcadores/directorios comunes)
79
+ const IDE_CONFIGS = [
80
+ { name: 'Cursor', rulesDir: '.cursor/rules', markerFile: '.cursorrules' },
81
+ { name: 'Windsurf', rulesDir: '.windsurf/rules', markerFile: '.windsurf' },
82
+ { name: 'Cline', rulesDir: '.clinerules', markerFile: '.clinerules' },
83
+ { name: 'Roo Code', rulesDir: '.roo/rules', markerFile: '.roo' },
84
+ { name: 'VSCode Copilot', rulesDir: '.github/instructions', markerFile: '.vscode' },
85
+ { name: 'Trae', rulesDir: '.trae/rules', markerFile: '.trae' },
86
+ { name: 'Claude Code', rulesDir: '.claude/rules', markerFile: '.claude' },
87
+ { name: 'Zed', rulesDir: '.rules', markerFile: '.zed' },
88
+ { name: 'Amp / Kimi / Replit', rulesDir: '.agents/rules', markerFile: '.agents' },
89
+ { name: 'Antigravity', rulesDir: '.agent/rules', markerFile: '.agent' },
90
+ { name: 'Augment', rulesDir: '.augment/rules', markerFile: '.augment' },
91
+ { name: 'Gemini CLI', rulesDir: '.gemini/rules', markerFile: '.gemini' },
92
+ { name: 'OpenClaw', rulesDir: 'rules', markerFile: 'openclaw.json' },
93
+ { name: 'CodeBuddy', rulesDir: '.codebuddy/rules', markerFile: '.codebuddy' },
94
+ { name: 'Codex', rulesDir: '.codex', markerFile: '.codex' },
95
+ { name: 'Continue', rulesDir: '.continue/rules', markerFile: '.continue' },
96
+ { name: 'Goose', rulesDir: '.goose', markerFile: '.goose' },
97
+ { name: 'OpenHands', rulesDir: '.openhands/microagents', markerFile: '.openhands' }
94
98
  ];
95
99
 
96
- const installedAgents = agentDirs.filter(a =>
97
- fs.existsSync(path.join(projectRoot, a.rulesDir)) ||
98
- fs.existsSync(path.join(projectRoot, a.skillsDir))
99
- );
100
+ const installedAgents = IDE_CONFIGS.filter(ide => {
101
+ const markerInProject = ide.markerFile && fs.existsSync(path.join(projectRoot, ide.markerFile));
102
+ const rulesDirRoot = ide.rulesDir && fs.existsSync(path.join(projectRoot, ide.rulesDir.split('/')[0]));
103
+ return markerInProject || rulesDirRoot;
104
+ });
100
105
 
101
106
  // ── Entry Points (archivos raíz que el agente lee al arrancar) ──
102
- const entryFiles = ['AGENTS.md', 'CLAUDE.md', 'GEMINI.md', '.cursorrules', '.continuerules', '.goosehints',
103
- '.openhands/microagents/repo.md', '.junie/guidelines.md', '.github/copilot-instructions.md'];
107
+ const entryFiles = ['AGENTS.md', 'CLAUDE.md', 'GEMINI.md', '.cursorrules', '.windsurfrules', '.windsurfrules.md', '.continuerules', '.goosehints', 'openclaw.json'];
104
108
  const entryItems = entryFiles
105
109
  .map(f => path.join(projectRoot, f))
106
110
  .filter(f => fs.existsSync(f))
@@ -110,47 +114,16 @@ function analyze(options = {}) {
110
114
  });
111
115
 
112
116
  // ── Skills ──
113
- const skillsItems = [];
114
- for (const agent of installedAgents) {
115
- const dir = path.join(projectRoot, agent.skillsDir);
116
- skillsItems.push(...scanDir(dir));
117
- }
118
- // Deduplicar por contenido (mismo archivo copiado a múltiples agentes)
119
- const skillsSeen = new Set();
120
- const skillsUniq = skillsItems.filter(i => {
121
- const key = path.basename(path.dirname(i.file)) + '/' + path.basename(i.file);
122
- if (skillsSeen.has(key)) return false;
123
- skillsSeen.add(key);
124
- return true;
125
- });
117
+ const skillsItems = scanDir(path.join(projectRoot, '.agents', 'skills'));
118
+ const skillsUniq = skillsItems;
126
119
 
127
120
  // ── Rules ──
128
- const rulesItems = [];
129
- for (const agent of installedAgents) {
130
- const dir = path.join(projectRoot, agent.rulesDir);
131
- rulesItems.push(...scanDir(dir));
132
- }
133
- const rulesSeen = new Set();
134
- const rulesUniq = rulesItems.filter(i => {
135
- const key = path.basename(i.file);
136
- if (rulesSeen.has(key)) return false;
137
- rulesSeen.add(key);
138
- return true;
139
- });
121
+ const rulesItems = scanDir(path.join(projectRoot, '.agents', 'rules'));
122
+ const rulesUniq = rulesItems;
140
123
 
141
124
  // ── Workflows ──
142
- const workflowsItems = [];
143
- const workflowDirs = installedAgents.map(a => a.skillsDir.replace('/skills', '/workflows'));
144
- for (const dir of workflowDirs) {
145
- workflowsItems.push(...scanDir(path.join(projectRoot, dir)));
146
- }
147
- const wfSeen = new Set();
148
- const workflowsUniq = workflowsItems.filter(i => {
149
- const key = path.basename(i.file);
150
- if (wfSeen.has(key)) return false;
151
- wfSeen.add(key);
152
- return true;
153
- });
125
+ const workflowsItems = scanDir(path.join(projectRoot, '.agents', 'workflows'));
126
+ const workflowsUniq = workflowsItems;
154
127
 
155
128
  // ── Totales ──
156
129
  const totalTokens = sumTokens(entryItems) + sumTokens(skillsUniq) + sumTokens(rulesUniq) + sumTokens(workflowsUniq);
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  /**
4
- * LMAgent Skills Validator — v3.0.13
4
+ * LMAgent Skills Validator — v3.4.0
5
5
  *
6
6
  * Valida la integridad de todos los skills del framework.
7
7
  * Verifica: frontmatter YAML, campos obligatorios, estructura de directorio.
@@ -26,10 +26,12 @@ const __dirname = dirname(__filename);
26
26
  const ROOT = resolve(__dirname, '..');
27
27
  const SKILLS_DIR = join(ROOT, '.agents', 'skills');
28
28
 
29
+ const pkgContent = readFileSync(join(ROOT, 'package.json'), 'utf-8');
30
+ const CURRENT_VERSION = JSON.parse(pkgContent).version;
31
+
29
32
  // ─── Configuración ────────────────────────────────────────────
30
33
  const REQUIRED_FIELDS = ['name', 'description', 'role', 'type', 'version', 'icon', 'expertise', 'activates_on', 'triggers'];
31
34
  const VALID_TYPES = ['agent_persona', 'methodology'];
32
- const CURRENT_VERSION = '3.2.0';
33
35
  const OPTIONAL_DIRS = ['scripts', 'references', 'assets'];
34
36
 
35
37
  // ─── Colores (sin dependencias) ───────────────────────────────
@@ -197,7 +199,7 @@ function main() {
197
199
 
198
200
  const c = chalk;
199
201
 
200
- console.log(c.bold('\n🔍 LMAgent Skill Validator v3.0.0\n'));
202
+ console.log(c.bold(`\n🔍 LMAgent Skill Validator v${CURRENT_VERSION}\n`));
201
203
  console.log(chalk.dim(` Directorio: ${SKILLS_DIR}`));
202
204
  console.log(chalk.dim(` Campos obligatorios: ${REQUIRED_FIELDS.length}`));
203
205
  console.log('');