antigravity-ide 4.1.16 → 4.1.17

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.16 Meta-Engine*
4
+ ### *Advanced Edition • v4.1.17 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.16)
54
+ ## ✨ The Premium Edge (v4.1.17)
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.16 Meta-Engine*
4
+ ### *Phiên bản Nâng cao • v4.1.17 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.16)
54
+ ## ✨ Điểm khác biệt (Phiên bản v4.1.17)
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/repair.js CHANGED
@@ -50,74 +50,73 @@ async function repairProject(projectPath, options, config) {
50
50
 
51
51
  // 2. Restore/Update Rules
52
52
  spinner.start('Verifying Rules & Compliance...');
53
- const rulesToInstall = getRulesList(config.rules || 'creative', config.productType || 'other');
54
- const rulesDest = path.join(agentDir, 'rules');
55
- fs.ensureDirSync(rulesDest);
53
+ const rulesSourceDir = path.join(sourceAgentDir, 'rules');
54
+ const rulesDestDir = path.join(agentDir, 'rules');
55
+ fs.ensureDirSync(rulesDestDir);
56
56
 
57
57
  let restoredRules = 0;
58
- for (const rule of rulesToInstall) {
59
- const srcRule = path.join(sourceAgentDir, 'rules', rule);
60
- const destRule = path.join(rulesDest, rule);
61
- // If rule doesn't exist or we are forcing, restore it
62
- if (!fs.existsSync(destRule) || options.force) {
58
+ if (fs.existsSync(rulesSourceDir)) {
59
+ const rulesToRestore = getRulesList(config.rules || 'creative', config.productType || 'other');
60
+ for (const rule of rulesToRestore) {
61
+ const srcRule = path.join(rulesSourceDir, rule);
62
+ const destRule = path.join(rulesDestDir, rule);
63
+
63
64
  if (fs.existsSync(srcRule)) {
64
- await fs.copy(srcRule, destRule);
65
+ // Smart Repair: Merge folders (Add missing files, preserve existing) unless --force
66
+ await fs.copy(srcRule, destRule, { filter, overwrite: options.force });
65
67
  restoredRules++;
66
68
  }
67
69
  }
68
70
  }
69
71
  spinner.succeed(`Verified Governance rules (${restoredRules} updated/restored)`);
70
72
 
71
- // 3. Sync Specialist Agents
73
+ // 2. Sync Agents
72
74
  spinner.start('Checking Specialist Agents...');
73
- const agentsDir = path.join(sourceAgentDir, 'agents');
74
- const allAgents = fs.existsSync(agentsDir) ? fs.readdirSync(agentsDir) : [];
75
- const agentsToInstall = getAgentsList(config.rules || 'creative', config.productType || 'other', allAgents);
76
- const agentsDest = path.join(agentDir, 'agents');
77
- fs.ensureDirSync(agentsDest);
78
-
75
+ const agentsSourceDir = path.join(sourceAgentDir, 'agents');
76
+ const agentsDestDir = path.join(agentDir, 'agents');
77
+ fs.ensureDirSync(agentsDestDir);
78
+
79
79
  let restoredAgents = 0;
80
- for (const agent of agentsToInstall) {
81
- const srcAgent = path.join(agentsDir, agent);
82
- const destAgent = path.join(agentsDest, agent);
83
- if (!fs.existsSync(destAgent) || options.force) {
80
+ if (fs.existsSync(agentsSourceDir)) {
81
+ // Need logical Agent List here too if we want to be precise, or just restore defined ones?
82
+ // For repair, we restore what's defined in manifest or ALL?
83
+ // Let's rely on manifest logic if possible, or restore based on config.
84
+ const allAgentsInSource = fs.readdirSync(agentsSourceDir); // Get all available agents
85
+ const agentsToRestore = getAgentsList(config.rules || 'creative', config.productType || 'other', allAgentsInSource);
86
+
87
+ for (const agent of agentsToRestore) {
88
+ const srcAgent = path.join(agentsSourceDir, agent);
89
+ const destAgent = path.join(agentsDestDir, agent);
90
+
84
91
  if (fs.existsSync(srcAgent)) {
85
- await fs.copy(srcAgent, destAgent);
92
+ await fs.copy(srcAgent, destAgent, { filter, overwrite: options.force });
86
93
  restoredAgents++;
87
94
  }
88
95
  }
89
96
  }
90
97
  spinner.succeed(`Specialist Agents ready (${restoredAgents} updated/restored)`);
91
98
 
92
- // 3.5 Sync Skills (Critical for Agent Capabilities)
93
- spinner.start('Restoring Skills...');
99
+ // 3. Sync Skills (The Big One)
100
+ spinner.start('Synchronizing Skills...');
94
101
  const skillsSourceDir = path.join(sourceAgentDir, 'skills');
95
102
  const skillsDestDir = path.join(agentDir, 'skills');
96
103
  fs.ensureDirSync(skillsDestDir);
97
-
104
+
98
105
  // Get allowed skills based on Scale
99
106
  const scaleConfig = getScaleConfig(config.rules || 'creative');
100
107
  // If creative, use all skills logic eventually, but for now let's use core set + existing
101
108
  // Actually, for repair, we should probably restore what's defined in scale rules
102
109
  // OR if it's creative/full, restore ALL skills?
103
110
  // Let's stick to the "Mandatory" set from Scale Config to ensure they always exist
104
- const skillsToRestore = scaleConfig.coreSkillCategories || [];
105
-
106
- // Also we might want to scan ALL skills if mode is creative?
107
- // For simplicity and safety in Repair, let's restore the Core set defined by the Scale.
108
- // And if the user has "creative", that usually implies a lot of skills.
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.
111
+ const skillsToRestoreCategories = scaleConfig.coreSkillCategories || [];
112
112
 
113
113
  let restoredSkills = 0;
114
- const filter = getEngineFilter(config.engineMode || 'standard');
115
114
 
116
115
  if (fs.existsSync(skillsSourceDir)) {
117
116
  // Flatten skills list via logic/skill-definitions
118
117
  // scaleConfig.coreSkillCategories are CATEGORIES (e.g. ['webdev', 'ai'])
119
118
  // We need to map them to actual folder names (e.g. ['modern-web-architect', ...])
120
- const skillsToInstall = getSkillsForCategories(skillsToRestore);
119
+ const skillsToInstall = getSkillsForCategories(skillsToRestoreCategories);
121
120
 
122
121
  // Deduplicate
123
122
  const uniqueSkills = [...new Set(skillsToInstall)];
@@ -127,17 +126,10 @@ async function repairProject(projectPath, options, config) {
127
126
  const destSkill = path.join(skillsDestDir, skill);
128
127
 
129
128
  if (fs.existsSync(srcSkill)) {
130
- // Start SmartSync:
131
- // 1. If dest doesn't exist -> Copy
132
- // 2. If dest exists BUT is empty (failed install) -> Copy
133
- // 3. If force flag -> Copy (Overwrite)
134
- const destExists = fs.existsSync(destSkill);
135
- const isEmpty = destExists ? fs.readdirSync(destSkill).length === 0 : true;
136
-
137
- if (!destExists || isEmpty || options.force) {
138
- await fs.copy(srcSkill, destSkill, { filter, overwrite: true });
139
- restoredSkills++;
140
- }
129
+ // Smart Repair: Merge folders (Add missing files, preserve existing) unless --force
130
+ // fs.copy with overwrite: false will copy MISSING files and SKIP existing ones. Perfect.
131
+ await fs.copy(srcSkill, destSkill, { filter, overwrite: options.force });
132
+ restoredSkills++;
141
133
  }
142
134
  }
143
135
  }
@@ -145,21 +137,22 @@ async function repairProject(projectPath, options, config) {
145
137
 
146
138
  // 4. Sync Workflows (Critical for slash commands)
147
139
  spinner.start('Restoring Workflows...');
148
- const workflowsDest = path.join(agentDir, 'workflows');
149
- fs.ensureDirSync(workflowsDest);
150
140
  const workflowsSourceDir = path.join(sourceAgentDir, 'workflows');
141
+ const workflowsDestDir = path.join(agentDir, 'workflows');
142
+ fs.ensureDirSync(workflowsDestDir);
151
143
 
152
144
  let restoredWorkflows = 0;
153
- const workflowsToInstall = config.workflows || [];
154
-
155
- for (const workflow of workflowsToInstall) {
156
- const workflowFile = `${workflow}.md`;
157
- const srcWorkflow = path.join(workflowsSourceDir, workflowFile);
158
- const destWorkflow = path.join(workflowsDest, workflowFile);
145
+ if (fs.existsSync(workflowsSourceDir)) {
146
+ const workflowsToRestore = scaleConfig.baseWorkflows || [];
159
147
 
160
- if (!fs.existsSync(destWorkflow) || options.force) {
148
+ for (const workflow of workflowsToRestore) {
149
+ const workflowFile = `${workflow}.md`;
150
+ const srcWorkflow = path.join(workflowsSourceDir, workflowFile);
151
+ const destWorkflow = path.join(workflowsDestDir, workflowFile);
152
+
161
153
  if (fs.existsSync(srcWorkflow)) {
162
- await fs.copy(srcWorkflow, destWorkflow);
154
+ // Files: Overwrite: false means keep existing. force -> overwrite.
155
+ await fs.copy(srcWorkflow, destWorkflow, { overwrite: options.force });
163
156
  restoredWorkflows++;
164
157
  }
165
158
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "antigravity-ide",
3
- "version": "4.1.16",
3
+ "version": "4.1.17",
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",