antigravity-ide 4.1.13 → 4.1.15
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 +2 -2
- package/README.vi.md +2 -2
- package/cli/create.js +10 -111
- package/cli/repair.js +12 -6
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
|
|
3
3
|
# 🛰️ AntiGravity IDE
|
|
4
|
-
### *Advanced Edition • v4.1.
|
|
4
|
+
### *Advanced Edition • v4.1.15 Meta-Engine*
|
|
5
5
|
|
|
6
6
|
<!-- VISUAL BADGES -->
|
|
7
7
|
[](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.
|
|
54
|
+
## ✨ The Premium Edge (v4.1.15)
|
|
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.
|
|
4
|
+
### *Phiên bản Nâng cao • v4.1.15 Meta-Engine*
|
|
5
5
|
|
|
6
6
|
<!-- VISUAL BADGES -->
|
|
7
7
|
[](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.
|
|
54
|
+
## ✨ Điểm khác biệt (Phiên bản v4.1.15)
|
|
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
|
@@ -7,12 +7,13 @@ const path = require('path');
|
|
|
7
7
|
const chalk = require('chalk');
|
|
8
8
|
const ora = require('ora');
|
|
9
9
|
const { execSync } = require('child_process');
|
|
10
|
-
const { getProjectConfig,
|
|
10
|
+
const { getProjectConfig, confirmOverwrite } = require('./prompts');
|
|
11
11
|
const gradient = require('gradient-string');
|
|
12
12
|
const { getRulesList, getAgentsList } = require('./logic/manifest-manager');
|
|
13
13
|
const { getScaleConfig } = require('./logic/scale-rules');
|
|
14
14
|
const { repairProject } = require('./repair');
|
|
15
15
|
const { generateGeminiMd } = require('./logic/gemini-generator');
|
|
16
|
+
const { getSkillsForCategories } = require('./logic/skill-definitions');
|
|
16
17
|
|
|
17
18
|
async function createProject(projectName, options, predefinedConfig = null) {
|
|
18
19
|
try {
|
|
@@ -148,9 +149,7 @@ async function createProject(projectName, options, predefinedConfig = null) {
|
|
|
148
149
|
|
|
149
150
|
// If we moved the root write to copyModularStructure (Step 5), then this block is DUPLICATE.
|
|
150
151
|
// Let's remove this block to avoid double-logging.
|
|
151
|
-
|
|
152
|
-
// Redundant fallback - logic moved to copyModularStructure
|
|
153
|
-
}
|
|
152
|
+
// Redundant fallback block removed
|
|
154
153
|
|
|
155
154
|
const stats = {
|
|
156
155
|
rules: rulesToInstall.length,
|
|
@@ -254,7 +253,6 @@ async function copyModularStructure(projectPath, config, rulesList, agentsList)
|
|
|
254
253
|
fs.mkdirSync(path.join(destAgentDir, 'workflows'), { recursive: true });
|
|
255
254
|
|
|
256
255
|
// 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
256
|
const geminiContent = generateGeminiMd(config.rules, config.language, config.industryDomain, config.agentName);
|
|
259
257
|
const geminiDecision = await handleCoreFileConflict(path.join(projectPath, 'GEMINI.md'), 'GEMINI.md', config.force, config.skipPrompts);
|
|
260
258
|
|
|
@@ -267,56 +265,20 @@ async function copyModularStructure(projectPath, config, rulesList, agentsList)
|
|
|
267
265
|
}
|
|
268
266
|
}
|
|
269
267
|
|
|
270
|
-
// 6. Copy
|
|
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/
|
|
268
|
+
// 6. Copy RESOURCES.md to .agent/ (Internal doc)
|
|
305
269
|
const resourcesSource = path.join(sourceAgentDir, 'RESOURCES.md');
|
|
306
270
|
if (fs.existsSync(resourcesSource)) {
|
|
307
271
|
const resourcesDest = path.join(destAgentDir, 'RESOURCES.md');
|
|
308
|
-
|
|
309
|
-
if (
|
|
310
|
-
fs.copyFileSync(resourcesSource,
|
|
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
|
-
}
|
|
272
|
+
// No need for conflict check usually strictly internal, but safe to overwrite or skip
|
|
273
|
+
if (!fs.existsSync(resourcesDest) || config.force) {
|
|
274
|
+
fs.copyFileSync(resourcesSource, resourcesDest);
|
|
316
275
|
}
|
|
317
276
|
}
|
|
318
277
|
}
|
|
319
278
|
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
|
|
320
282
|
async function copySkills(projectPath, categories, engineMode) {
|
|
321
283
|
const skillsSourceDir = path.join(__dirname, '..', '.agent', 'skills');
|
|
322
284
|
const skillsDestDir = path.join(projectPath, '.agent', 'skills');
|
|
@@ -355,69 +317,6 @@ async function copyWorkflows(projectPath, workflows) {
|
|
|
355
317
|
return count;
|
|
356
318
|
}
|
|
357
319
|
|
|
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
320
|
function printSuccessMessage(projectName, config, stats = null) {
|
|
422
321
|
console.log('\n');
|
|
423
322
|
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
|
|
114
|
-
//
|
|
115
|
-
//
|
|
116
|
-
|
|
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
|
-
|
|
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.
|
|
3
|
+
"version": "4.1.15",
|
|
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",
|