antigravity-ide 4.1.13 → 4.1.14

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/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  <div align="center">
2
2
 
3
3
  # 🛰️ AntiGravity IDE
4
- ### *Advanced Edition • v4.1.13 Meta-Engine*
4
+ ### *Advanced Edition • v4.1.14 Meta-Engine*
5
5
 
6
6
  <!-- VISUAL BADGES -->
7
7
  [![npm version](https://img.shields.io/npm/v/antigravity-ide?style=flat&color=2ea44f&logo=npm)](https://www.npmjs.com/package/antigravity-ide)
@@ -51,7 +51,7 @@ npx antigravity-ide validate
51
51
 
52
52
  ---
53
53
 
54
- ## ✨ The Premium Edge (v4.1.13)
54
+ ## ✨ The Premium Edge (v4.1.14)
55
55
 
56
56
  Why choose AntiGravity over standard AI wrappers?
57
57
 
package/README.vi.md CHANGED
@@ -1,7 +1,7 @@
1
1
  <div align="center">
2
2
 
3
3
  # 🛰️ AntiGravity IDE
4
- ### *Phiên bản Nâng cao • v4.1.13 Meta-Engine*
4
+ ### *Phiên bản Nâng cao • v4.1.14 Meta-Engine*
5
5
 
6
6
  <!-- VISUAL BADGES -->
7
7
  [![npm version](https://img.shields.io/npm/v/antigravity-ide?style=flat&color=2ea44f&logo=npm)](https://www.npmjs.com/package/antigravity-ide)
@@ -51,7 +51,7 @@ npx antigravity-ide validate
51
51
 
52
52
  ---
53
53
 
54
- ## ✨ Điểm khác biệt (Phiên bản v4.1.13)
54
+ ## ✨ Điểm khác biệt (Phiên bản v4.1.14)
55
55
 
56
56
  Tại sao nên chọn AntiGravity thay vì các AI wrapper thông thường?
57
57
 
package/cli/create.js CHANGED
@@ -148,9 +148,7 @@ async function createProject(projectName, options, predefinedConfig = null) {
148
148
 
149
149
  // If we moved the root write to copyModularStructure (Step 5), then this block is DUPLICATE.
150
150
  // Let's remove this block to avoid double-logging.
151
- if (!fs.existsSync(rootGeminiPath)) {
152
- // Redundant fallback - logic moved to copyModularStructure
153
- }
151
+ // Redundant fallback block removed
154
152
 
155
153
  const stats = {
156
154
  rules: rulesToInstall.length,
@@ -254,7 +252,6 @@ async function copyModularStructure(projectPath, config, rulesList, agentsList)
254
252
  fs.mkdirSync(path.join(destAgentDir, 'workflows'), { recursive: true });
255
253
 
256
254
  // 5. Create GEMINI.md (Core file) - Write ONLY to Root, not to .agent/
257
- // Previous versions wrote to .agent/GEMINI.md as well, which was redundant.
258
255
  const geminiContent = generateGeminiMd(config.rules, config.language, config.industryDomain, config.agentName);
259
256
  const geminiDecision = await handleCoreFileConflict(path.join(projectPath, 'GEMINI.md'), 'GEMINI.md', config.force, config.skipPrompts);
260
257
 
@@ -267,56 +264,20 @@ async function copyModularStructure(projectPath, config, rulesList, agentsList)
267
264
  }
268
265
  }
269
266
 
270
- // 6. Copy START_HERE.md (if exists)
271
- const startHereSource = path.join(sourceAgentDir, 'START_HERE.md');
272
- if (fs.existsSync(startHereSource)) {
273
- const startHereDest = path.join(destAgentDir, 'START_HERE.md');
274
- const decision = await handleCoreFileConflict(startHereDest, 'START_HERE.md', config.force, config.skipPrompts);
275
- if (decision.shouldWrite) {
276
- fs.copyFileSync(startHereSource, decision.targetPath);
277
- if (decision.isOverwrite) {
278
- console.log(chalk.green(` ✓ Overwrote existing START_HERE.md`));
279
- }
280
- }
281
- }
282
-
283
- // 7. Copy README, .gitignore
284
- const files = ['README.md', '.gitignore'];
285
- const rootDir = path.join(__dirname, '..');
286
-
287
- for (const file of files) {
288
- const source = path.join(rootDir, file);
289
- const dest = path.join(projectPath, file);
290
-
291
- if (fs.existsSync(source)) {
292
- const decision = await handleCoreFileConflict(dest, file, config.force, config.skipPrompts);
293
- if (decision.shouldWrite) {
294
- fs.copyFileSync(source, decision.targetPath);
295
- if (decision.isBackup) {
296
- console.log(chalk.yellow(` ℹ️ ${file} exists, created ${path.basename(decision.targetPath)}`));
297
- } else if (decision.isOverwrite) {
298
- console.log(chalk.green(` ✓ Overwrote existing ${file}`));
299
- }
300
- }
301
- }
302
- }
303
-
304
- // 8. Copy RESOURCES.md to .agent/
267
+ // 6. Copy RESOURCES.md to .agent/ (Internal doc)
305
268
  const resourcesSource = path.join(sourceAgentDir, 'RESOURCES.md');
306
269
  if (fs.existsSync(resourcesSource)) {
307
270
  const resourcesDest = path.join(destAgentDir, 'RESOURCES.md');
308
- const decision = await handleCoreFileConflict(resourcesDest, 'RESOURCES.md', config.force, config.skipPrompts);
309
- if (decision.shouldWrite) {
310
- fs.copyFileSync(resourcesSource, decision.targetPath);
311
- if (decision.isBackup) {
312
- console.log(chalk.yellow(` ℹ️ RESOURCES.md exists, created ${path.basename(decision.targetPath)}`));
313
- } else if (decision.isOverwrite) {
314
- console.log(chalk.green(` ✓ Overwrote existing RESOURCES.md`));
315
- }
271
+ // No need for conflict check usually strictly internal, but safe to overwrite or skip
272
+ if (!fs.existsSync(resourcesDest) || config.force) {
273
+ fs.copyFileSync(resourcesSource, resourcesDest);
316
274
  }
317
275
  }
318
276
  }
319
277
 
278
+
279
+
280
+
320
281
  async function copySkills(projectPath, categories, engineMode) {
321
282
  const skillsSourceDir = path.join(__dirname, '..', '.agent', 'skills');
322
283
  const skillsDestDir = path.join(projectPath, '.agent', 'skills');
@@ -355,69 +316,6 @@ async function copyWorkflows(projectPath, workflows) {
355
316
  return count;
356
317
  }
357
318
 
358
- async function generateConfigs(projectPath, config) {
359
- // Generate package.json
360
- const packageJsonPath = path.join(projectPath, 'package.json');
361
- const pkgDecision = await handleCoreFileConflict(packageJsonPath, 'package.json', config.force, config.skipPrompts);
362
-
363
- if (pkgDecision.shouldWrite) {
364
- const packageJson = {
365
- name: config.projectName,
366
- version: '1.0.0',
367
- description: 'AI Agent project powered by Google Antigravity',
368
- private: true,
369
- scripts: {
370
- dev: 'echo "No dev server configured"',
371
- build: 'echo "No build script"'
372
- },
373
- keywords: ['ai', 'agent', 'antigravity-ide'],
374
- author: '',
375
- license: 'MIT'
376
- };
377
-
378
- fs.writeFileSync(
379
- pkgDecision.targetPath,
380
- JSON.stringify(packageJson, null, 2)
381
- );
382
- if (pkgDecision.isBackup) {
383
- console.log(chalk.yellow(` ℹ️ package.json exists, created ${path.basename(pkgDecision.targetPath)}`));
384
- } else if (pkgDecision.isOverwrite || !fs.existsSync(packageJsonPath)) {
385
- console.log(chalk.green(' ✓ Created package.json'));
386
- }
387
- }
388
-
389
- // Generate .editorconfig
390
- const editorconfigPath = path.join(projectPath, '.editorconfig');
391
- const ecDecision = await handleCoreFileConflict(editorconfigPath, '.editorconfig', config.force, config.skipPrompts);
392
-
393
- if (ecDecision.shouldWrite) {
394
- const editorConfig = `root = true\n\n[*]\ncharset = utf-8\nend_of_line = lf\ninsert_final_newline = true\nindent_style = space\nindent_size = 2\ntrim_trailing_whitespace = true\n\n[*.md]\ntrim_trailing_whitespace = false\n`;
395
- fs.writeFileSync(ecDecision.targetPath, editorConfig);
396
- if (ecDecision.isBackup) {
397
- console.log(chalk.yellow(` ℹ️ .editorconfig exists, created ${path.basename(ecDecision.targetPath)}`));
398
- } else if (ecDecision.isOverwrite || !fs.existsSync(editorconfigPath)) {
399
- console.log(chalk.green(' ✓ Created .editorconfig'));
400
- }
401
- }
402
-
403
- // Generate .gitattributes
404
- const gitAttributesPath = path.join(projectPath, '.gitattributes');
405
- const gaDecision = await handleCoreFileConflict(gitAttributesPath, '.gitattributes', config.force, config.skipPrompts);
406
-
407
- if (gaDecision.shouldWrite) {
408
- const gitAttributes = `* text=auto eol=lf\n*.js text eol=lf\n*.sh text eol=lf\nbin/* text eol=lf\n`;
409
- fs.writeFileSync(gaDecision.targetPath, gitAttributes);
410
- if (gaDecision.isBackup) {
411
- console.log(chalk.yellow(` ℹ️ .gitattributes exists, created ${path.basename(gaDecision.targetPath)}`));
412
- } else if (gaDecision.isOverwrite || !fs.existsSync(gitAttributesPath)) {
413
- console.log(chalk.green(' ✓ Created .gitattributes'));
414
- }
415
- }
416
- }
417
-
418
-
419
-
420
-
421
319
  function printSuccessMessage(projectName, config, stats = null) {
422
320
  console.log('\n');
423
321
  console.log(gradient.rainbow('━'.repeat(60)));
package/cli/repair.js CHANGED
@@ -10,6 +10,7 @@ const gradient = require('gradient-string');
10
10
  const { getRulesList, getAgentsList } = require('./logic/manifest-manager');
11
11
  const { generateGeminiMd } = require('./logic/gemini-generator');
12
12
  const { getScaleConfig } = require('./logic/scale-rules');
13
+ const { getSkillsForCategories } = require('./logic/skill-definitions');
13
14
 
14
15
  // Helper to determine file filter based on engine mode (Copied from create.js for consistency)
15
16
  function getEngineFilter(engineMode) {
@@ -106,17 +107,22 @@ async function repairProject(projectPath, options, config) {
106
107
  // For simplicity and safety in Repair, let's restore the Core set defined by the Scale.
107
108
  // And if the user has "creative", that usually implies a lot of skills.
108
109
 
110
+ // For simplicity and safety in Repair, let's restore the Core set defined by the Scale.
111
+ // And if the user has "creative", that usually implies a lot of skills.
112
+
109
113
  let restoredSkills = 0;
110
114
  const filter = getEngineFilter(config.engineMode || 'standard');
111
115
 
112
116
  if (fs.existsSync(skillsSourceDir)) {
113
- // Flatten skills list if it's categories (logic copied from prompts/create)
114
- // But wait, scaleConfig.coreSkillCategories are CATEGORIES (folders in skills/)
115
- // Actually in current codebase, skills are direct folders in .agent/skills/
116
- // Let's verify structure. `skillsSourceDir` has folders like `3d-web-experience`, `api-fuzzing...`
117
- // `coreSkillCategories` in scale-rules are arrays of these folder names.
117
+ // Flatten skills list via logic/skill-definitions
118
+ // scaleConfig.coreSkillCategories are CATEGORIES (e.g. ['webdev', 'ai'])
119
+ // We need to map them to actual folder names (e.g. ['modern-web-architect', ...])
120
+ const skillsToInstall = getSkillsForCategories(skillsToRestore);
118
121
 
119
- for (const skill of skillsToRestore) {
122
+ // Deduplicate
123
+ const uniqueSkills = [...new Set(skillsToInstall)];
124
+
125
+ for (const skill of uniqueSkills) {
120
126
  const srcSkill = path.join(skillsSourceDir, skill);
121
127
  const destSkill = path.join(skillsDestDir, skill);
122
128
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "antigravity-ide",
3
- "version": "4.1.13",
3
+ "version": "4.1.14",
4
4
  "description": "The Ultimate AI-Powered IDE for 10x Engineers (Full Agentic Workflow)• 573 Master Skills • 2977 AI Patterns • 30 Workflows • 135 Shared DNA Libraries. One Command to Rule Them All.",
5
5
  "homepage": "https://antigravity-ide-cli.vercel.app/",
6
6
  "main": "cli/index.js",
@@ -14,7 +14,7 @@
14
14
  "test": "jest",
15
15
  "setup": "node ./setup.js",
16
16
  "update": "node ./update.js",
17
- "prepublishOnly": "node ./scripts/bundle-skills.js"
17
+ "prepublishOnly": "node .agent/scripts/generate-skill-definitions.js && node ./scripts/bundle-skills.js"
18
18
  },
19
19
  "dependencies": {
20
20
  "boxen": "^5.1.2",