antigravity-ide 4.1.11 → 4.1.13
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/.agent/rules/system-update.md +10 -0
- package/README.md +2 -2
- package/README.vi.md +2 -2
- package/cli/create.js +23 -19
- package/cli/repair.js +75 -6
- package/package.json +1 -1
|
@@ -46,4 +46,14 @@ Sau khi bump version, quy trình chuẩn để phát hành là:
|
|
|
46
46
|
|
|
47
47
|
---
|
|
48
48
|
|
|
49
|
+
## 4. HUMAN-IN-THE-LOOP PROTOCOL (QUAN TRỌNG)
|
|
50
|
+
|
|
51
|
+
> **Mệnh lệnh tối cao**: Tuyệt đối **KHÔNG** tự động đẩy version mới (git tag / npm publish) nếu chưa có hiệu lệnh rõ ràng từ User.
|
|
52
|
+
|
|
53
|
+
1. **Chế độ chờ**: Khi hoàn thành code, chỉ chạy test và báo cáo.
|
|
54
|
+
2. **Xin phép**: Hỏi "Bạn có muốn tôi release phiên bản mới (vX.Y.Z) không?".
|
|
55
|
+
3. **Thực thi**: Chỉ chạy `scripts/bump.js` và các lệnh git khi User trả lời "OK", "Push đi", "Duyệt".
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
49
59
|
> **Lưu ý**: Nếu người dùng phàn nàn về version cũ/mới, hãy kiểm tra ngay 5 file trong danh sách trên đầu tiên.
|
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.13 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.13)
|
|
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.13 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.13)
|
|
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
|
@@ -130,22 +130,26 @@ async function createProject(projectName, options, predefinedConfig = null) {
|
|
|
130
130
|
|
|
131
131
|
// Create GEMINI.md
|
|
132
132
|
// generateGeminiMd(rules, language, industry, agentName)
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
const rootGeminiPath = path.join(projectPath, 'GEMINI.md');
|
|
140
|
-
const rootGeminiDecision = await handleCoreFileConflict(rootGeminiPath, 'GEMINI.md', config.force, config.skipPrompts);
|
|
133
|
+
// Create GEMINI.md
|
|
134
|
+
// generateGeminiMd(rules, language, industry, agentName)
|
|
135
|
+
// Check if modular structure already handled it?
|
|
136
|
+
// Actually, copyModularStructure already wrote it to Root in our previous edit to Step 5.
|
|
137
|
+
// But copyModularStructure is only called if we are in Modular mode.
|
|
138
|
+
// Let's ensure strict single source.
|
|
141
139
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
140
|
+
// If copyModularStructure ran, GEMINI.md is already there.
|
|
141
|
+
// We should check if it exists before overwriting, OR rely on the fact that modular structure is the main path.
|
|
142
|
+
|
|
143
|
+
// Let's keep this block for safety in case copyModularStructure didn't run (unlikely in current flow)
|
|
144
|
+
// But strictly, we removed the duplicate logic.
|
|
145
|
+
// To be safe: If GEMINI.md exists at root, don't re-write it here unless FORCE.
|
|
146
|
+
// Actually, the previous block (Step 5 in copyModularStructure) is INSIDE copyModularStructure.
|
|
147
|
+
// The block here is at the end of createProject.
|
|
148
|
+
|
|
149
|
+
// If we moved the root write to copyModularStructure (Step 5), then this block is DUPLICATE.
|
|
150
|
+
// Let's remove this block to avoid double-logging.
|
|
151
|
+
if (!fs.existsSync(rootGeminiPath)) {
|
|
152
|
+
// Redundant fallback - logic moved to copyModularStructure
|
|
149
153
|
}
|
|
150
154
|
|
|
151
155
|
const stats = {
|
|
@@ -249,12 +253,12 @@ async function copyModularStructure(projectPath, config, rulesList, agentsList)
|
|
|
249
253
|
fs.mkdirSync(path.join(destAgentDir, 'skills'), { recursive: true });
|
|
250
254
|
fs.mkdirSync(path.join(destAgentDir, 'workflows'), { recursive: true });
|
|
251
255
|
|
|
252
|
-
// 5.
|
|
253
|
-
|
|
254
|
-
const
|
|
256
|
+
// 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
|
+
const geminiContent = generateGeminiMd(config.rules, config.language, config.industryDomain, config.agentName);
|
|
259
|
+
const geminiDecision = await handleCoreFileConflict(path.join(projectPath, 'GEMINI.md'), 'GEMINI.md', config.force, config.skipPrompts);
|
|
255
260
|
|
|
256
261
|
if (geminiDecision.shouldWrite) {
|
|
257
|
-
const geminiContent = generateGeminiMd(config.rules, config.language, config.industryDomain, config.agentName);
|
|
258
262
|
fs.writeFileSync(geminiDecision.targetPath, geminiContent);
|
|
259
263
|
if (geminiDecision.isBackup) {
|
|
260
264
|
console.log(chalk.yellow(` ℹ️ GEMINI.md exists, created ${path.basename(geminiDecision.targetPath)}`));
|
package/cli/repair.js
CHANGED
|
@@ -6,8 +6,30 @@ const fs = require('fs-extra');
|
|
|
6
6
|
const path = require('path');
|
|
7
7
|
const chalk = require('chalk');
|
|
8
8
|
const ora = require('ora');
|
|
9
|
+
const gradient = require('gradient-string');
|
|
9
10
|
const { getRulesList, getAgentsList } = require('./logic/manifest-manager');
|
|
10
11
|
const { generateGeminiMd } = require('./logic/gemini-generator');
|
|
12
|
+
const { getScaleConfig } = require('./logic/scale-rules');
|
|
13
|
+
|
|
14
|
+
// Helper to determine file filter based on engine mode (Copied from create.js for consistency)
|
|
15
|
+
function getEngineFilter(engineMode) {
|
|
16
|
+
return (src, dest) => {
|
|
17
|
+
if (engineMode === 'standard') {
|
|
18
|
+
const lowerSrc = src.toLowerCase();
|
|
19
|
+
if (lowerSrc.endsWith('.py') ||
|
|
20
|
+
lowerSrc.endsWith('.pyc') ||
|
|
21
|
+
lowerSrc.endsWith('requirements.txt') ||
|
|
22
|
+
lowerSrc.endsWith('pipfile') ||
|
|
23
|
+
lowerSrc.endsWith('pyproject.toml') ||
|
|
24
|
+
lowerSrc.includes('__pycache__') ||
|
|
25
|
+
lowerSrc.includes('venv/') ||
|
|
26
|
+
lowerSrc.includes('.venv/')) {
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return true;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
11
33
|
|
|
12
34
|
async function repairProject(projectPath, options, config) {
|
|
13
35
|
const spinner = ora('🔍 Analyzing project integrity...').start();
|
|
@@ -66,6 +88,48 @@ async function repairProject(projectPath, options, config) {
|
|
|
66
88
|
}
|
|
67
89
|
spinner.succeed(`Specialist Agents ready (${restoredAgents} updated/restored)`);
|
|
68
90
|
|
|
91
|
+
// 3.5 Sync Skills (Critical for Agent Capabilities)
|
|
92
|
+
spinner.start('Restoring Skills...');
|
|
93
|
+
const skillsSourceDir = path.join(sourceAgentDir, 'skills');
|
|
94
|
+
const skillsDestDir = path.join(agentDir, 'skills');
|
|
95
|
+
fs.ensureDirSync(skillsDestDir);
|
|
96
|
+
|
|
97
|
+
// Get allowed skills based on Scale
|
|
98
|
+
const scaleConfig = getScaleConfig(config.rules || 'creative');
|
|
99
|
+
// If creative, use all skills logic eventually, but for now let's use core set + existing
|
|
100
|
+
// Actually, for repair, we should probably restore what's defined in scale rules
|
|
101
|
+
// OR if it's creative/full, restore ALL skills?
|
|
102
|
+
// Let's stick to the "Mandatory" set from Scale Config to ensure they always exist
|
|
103
|
+
const skillsToRestore = scaleConfig.coreSkillCategories || [];
|
|
104
|
+
|
|
105
|
+
// Also we might want to scan ALL skills if mode is creative?
|
|
106
|
+
// For simplicity and safety in Repair, let's restore the Core set defined by the Scale.
|
|
107
|
+
// And if the user has "creative", that usually implies a lot of skills.
|
|
108
|
+
|
|
109
|
+
let restoredSkills = 0;
|
|
110
|
+
const filter = getEngineFilter(config.engineMode || 'standard');
|
|
111
|
+
|
|
112
|
+
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.
|
|
118
|
+
|
|
119
|
+
for (const skill of skillsToRestore) {
|
|
120
|
+
const srcSkill = path.join(skillsSourceDir, skill);
|
|
121
|
+
const destSkill = path.join(skillsDestDir, skill);
|
|
122
|
+
|
|
123
|
+
if (fs.existsSync(srcSkill)) {
|
|
124
|
+
if (!fs.existsSync(destSkill) || options.force) {
|
|
125
|
+
await fs.copy(srcSkill, destSkill, { filter, overwrite: true });
|
|
126
|
+
restoredSkills++;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
spinner.succeed(`Skills synchronized (${restoredSkills} restored)`);
|
|
132
|
+
|
|
69
133
|
// 4. Sync Workflows (Critical for slash commands)
|
|
70
134
|
spinner.start('Restoring Workflows...');
|
|
71
135
|
const workflowsDest = path.join(agentDir, 'workflows');
|
|
@@ -101,16 +165,20 @@ async function repairProject(projectPath, options, config) {
|
|
|
101
165
|
const rootGeminiPath = path.join(projectPath, 'GEMINI.md');
|
|
102
166
|
const agentGeminiPath = path.join(agentDir, 'GEMINI.md');
|
|
103
167
|
|
|
104
|
-
//
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
168
|
+
// Cleanup: Remove redundant .agent/GEMINI.md if it exists (User request: Don't duplicate)
|
|
169
|
+
if (fs.existsSync(agentGeminiPath)) {
|
|
170
|
+
fs.unlinkSync(agentGeminiPath);
|
|
171
|
+
}
|
|
108
172
|
|
|
109
173
|
if (!fs.existsSync(rootGeminiPath) || options.force) {
|
|
110
174
|
fs.writeFileSync(rootGeminiPath, geminiContent);
|
|
111
175
|
} else {
|
|
112
|
-
//
|
|
113
|
-
fs.
|
|
176
|
+
// Check if content is different before creating .new
|
|
177
|
+
const currentContent = fs.readFileSync(rootGeminiPath, 'utf8');
|
|
178
|
+
if (currentContent !== geminiContent) {
|
|
179
|
+
fs.writeFileSync(path.join(projectPath, 'GEMINI.new.md'), geminiContent);
|
|
180
|
+
console.log(chalk.yellow(` ℹ️ Configuration updated: See GEMINI.new.md`));
|
|
181
|
+
}
|
|
114
182
|
}
|
|
115
183
|
spinner.succeed('Core Configuration applied (v' + require('../package.json').version + ')');
|
|
116
184
|
|
|
@@ -120,6 +188,7 @@ async function repairProject(projectPath, options, config) {
|
|
|
120
188
|
const statLine = [
|
|
121
189
|
chalk.white(`${restoredRules} Rules`),
|
|
122
190
|
chalk.white(`${restoredAgents} Agents`),
|
|
191
|
+
chalk.white(`${restoredSkills} Skills`),
|
|
123
192
|
chalk.white(`${restoredWorkflows} Workflows`)
|
|
124
193
|
].join(chalk.gray(' • '));
|
|
125
194
|
console.log(gradient.pastel(' ✨ Synced: ') + statLine);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "antigravity-ide",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.13",
|
|
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",
|