antigravity-ide 4.1.8 → 4.1.9
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 +37 -31
- package/README.md +2 -2
- package/README.vi.md +2 -2
- package/package.json +1 -1
- package/scripts/bump.js +93 -0
|
@@ -1,43 +1,49 @@
|
|
|
1
|
+
# SYSTEM-UPDATE.MD - Version Control Protocol
|
|
2
|
+
|
|
3
|
+
> **Mục tiêu**: Đảm bảo tính nhất quán tuyệt đối về phiên bản trên toàn bộ hệ thống.
|
|
4
|
+
|
|
1
5
|
---
|
|
2
|
-
trigger: model_decision
|
|
3
|
-
description: "Khi người dùng hỏi về cập nhật, phiên bản, hoặc update của gói antigravity-ide."
|
|
4
|
-
---
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
## 🚫 1. ZERO-DRIFT POLICY (Chính sách Không lệch)
|
|
8
|
+
|
|
9
|
+
Khi người dùng yêu cầu "update", "nâng cấp", hoặc "đẩy phiên bản mới", Agent **BẮT BUỘC** phải cập nhật đồng bộ các file sau cùng một lúc:
|
|
10
|
+
|
|
11
|
+
1. **`package.json`**: Trường `version`.
|
|
12
|
+
2. **`README.md`**:
|
|
13
|
+
* Header: `### *Advanced Edition • vX.Y.Z Meta-Engine*`
|
|
14
|
+
* Section: `## ✨ The Premium Edge (vX.Y.Z)`
|
|
15
|
+
3. **`README.vi.md`**:
|
|
16
|
+
* Header: `### *Phiên bản Nâng cao • vX.Y.Z Meta-Engine*`
|
|
17
|
+
* Section: `## ✨ Điểm khác biệt (Phiên bản vX.Y.Z)`
|
|
18
|
+
4. **`docs/MASTER_OPERATIONS.md`**: Line `**Version**: X.Y.Z`
|
|
19
|
+
5. **`docs/MASTER_OPERATIONS.vi.md`**: Line `**Version**: X.Y.Z`
|
|
7
20
|
|
|
8
|
-
|
|
21
|
+
**TUYỆT ĐỐI KHÔNG** cập nhật lẻ tẻ. Một phiên bản được coi là "hợp lệ" chỉ khi tất cả các file trên khớp nhau 100%.
|
|
9
22
|
|
|
10
23
|
---
|
|
11
24
|
|
|
12
|
-
##
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
25
|
+
## 🛠️ 2. AUTOMATION TOOL (Công cụ Tự động)
|
|
26
|
+
|
|
27
|
+
Để tránh sai sót do con người (hoặc AI), hãy sử dụng script đã được chuẩn bị sẵn:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
node scripts/bump.js <new-version>
|
|
31
|
+
# Ví dụ: node scripts/bump.js 4.1.9
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Script này sẽ tự động tìm và thay thế tất cả các vị trí cần thiết.
|
|
16
35
|
|
|
17
36
|
---
|
|
18
37
|
|
|
19
|
-
##
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
- Nếu `Local Version == NPM Version`: Thông báo người dùng đã ở bản mới nhất.
|
|
28
|
-
- Nếu `Local Version < NPM Version`:
|
|
29
|
-
- Thông báo có bản mới.
|
|
30
|
-
- Liệt kê một vài thay đổi (nếu có thể lấy từ changelog hoặc giả định).
|
|
31
|
-
- **Hỏi xác nhận**: "Bạn có muốn tôi cập nhật lên phiên bản [NPM_VERSION] không?"
|
|
32
|
-
|
|
33
|
-
4. **Bước 4: Thực thi Cập nhật (Nếu người dùng đồng ý)**:
|
|
34
|
-
```powershell
|
|
35
|
-
npm install -g antigravity-ide@latest
|
|
36
|
-
```
|
|
37
|
-
Sau đó thông báo người dùng khởi động lại CLI hoặc chat tiếp.
|
|
38
|
+
## 🚀 3. PUBLISHING CHECKLIST
|
|
39
|
+
|
|
40
|
+
Sau khi bump version, quy trình chuẩn để phát hành là:
|
|
41
|
+
|
|
42
|
+
1. **Commit**: `git commit -m "chore: release vX.Y.Z"`
|
|
43
|
+
2. **Tag**: `git tag vX.Y.Z`
|
|
44
|
+
3. **Push Code**: `git push`
|
|
45
|
+
4. **Push Tag**: `git push origin vX.Y.Z` (Kích hoạt CI/CD & GitHub Release)
|
|
38
46
|
|
|
39
47
|
---
|
|
40
48
|
|
|
41
|
-
|
|
42
|
-
- Luôn hỏi xác nhận trước khi chạy lệnh `npm install -g`.
|
|
43
|
-
- Nếu lệnh lỗi, hướng dẫn người dùng chạy thủ công bằng quyền Admin.
|
|
49
|
+
> **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.9 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.9)
|
|
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.9 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.9)
|
|
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "antigravity-ide",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.9",
|
|
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",
|
package/scripts/bump.js
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const chalk = require('chalk');
|
|
4
|
+
|
|
5
|
+
// Get new version from command line argument
|
|
6
|
+
const newVersion = process.argv[2];
|
|
7
|
+
|
|
8
|
+
if (!newVersion) {
|
|
9
|
+
console.error(chalk.red('❌ Error: Please provide a new version number.'));
|
|
10
|
+
console.log('Usage: node scripts/bump.js <new-version>');
|
|
11
|
+
process.exit(1);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// Regex for strict version validation (x.y.z)
|
|
15
|
+
if (!/^\d+\.\d+\.\d+$/.test(newVersion)) {
|
|
16
|
+
console.error(chalk.red('❌ Error: Invalid version format. Use x.y.z (e.g., 4.1.9)'));
|
|
17
|
+
process.exit(1);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const rootDir = path.join(__dirname, '..');
|
|
21
|
+
|
|
22
|
+
// 1. Files to update
|
|
23
|
+
const files = [
|
|
24
|
+
{
|
|
25
|
+
path: 'package.json',
|
|
26
|
+
replace: [
|
|
27
|
+
{ regex: /"version": "\d+\.\d+\.\d+"/, sub: `"version": "${newVersion}"` }
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
path: 'README.md',
|
|
32
|
+
replace: [
|
|
33
|
+
{ regex: /Advanced Edition • v\d+\.\d+\.\d+ Meta-Engine/, sub: `Advanced Edition • v${newVersion} Meta-Engine` },
|
|
34
|
+
{ regex: /The Premium Edge \(v\d+\.\d+\.\d+\)/, sub: `The Premium Edge (v${newVersion})` }
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
path: 'README.vi.md',
|
|
39
|
+
replace: [
|
|
40
|
+
{ regex: /Phiên bản Nâng cao • v\d+\.\d+\.\d+ Meta-Engine/, sub: `Phiên bản Nâng cao • v${newVersion} Meta-Engine` },
|
|
41
|
+
{ regex: /Điểm khác biệt \(Phiên bản v\d+\.\d+\.\d+\)/, sub: `Điểm khác biệt (Phiên bản v${newVersion})` }
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
path: 'docs/MASTER_OPERATIONS.md',
|
|
46
|
+
replace: [
|
|
47
|
+
{ regex: /\*\*Version\*\*: \d+\.\d+\.\d+ \(Stable Marketing/, sub: `**Version**: ${newVersion} (Stable Marketing` }
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
path: 'docs/MASTER_OPERATIONS.vi.md',
|
|
52
|
+
replace: [
|
|
53
|
+
{ regex: /\*\*Version\*\*: \d+\.\d+\.\d+ \(Stable Marketing/, sub: `**Version**: ${newVersion} (Stable Marketing` }
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
];
|
|
57
|
+
|
|
58
|
+
console.log(chalk.cyan(`🚀 Bumping version to v${newVersion} across ${files.length} files...\n`));
|
|
59
|
+
|
|
60
|
+
let errorCount = 0;
|
|
61
|
+
|
|
62
|
+
// 2. Execute Updates
|
|
63
|
+
files.forEach(file => {
|
|
64
|
+
const filePath = path.join(rootDir, file.path);
|
|
65
|
+
if (!fs.existsSync(filePath)) {
|
|
66
|
+
console.warn(chalk.yellow(`⚠️ File not found needed for bump: ${file.path}`));
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
let content = fs.readFileSync(filePath, 'utf8');
|
|
71
|
+
let updated = false;
|
|
72
|
+
|
|
73
|
+
file.replace.forEach(rep => {
|
|
74
|
+
if (rep.regex.test(content)) {
|
|
75
|
+
content = content.replace(rep.regex, rep.sub);
|
|
76
|
+
updated = true;
|
|
77
|
+
} else {
|
|
78
|
+
// Only warn if it's package.json (critical), others might have structural changes
|
|
79
|
+
if (file.path === 'package.json') {
|
|
80
|
+
console.warn(chalk.yellow(` ⚠️ Pattern not found in ${file.path}: ${rep.regex}`));
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
if (updated) {
|
|
86
|
+
fs.writeFileSync(filePath, content, 'utf8');
|
|
87
|
+
console.log(chalk.green(` ✓ Updated ${file.path}`));
|
|
88
|
+
} else {
|
|
89
|
+
console.log(chalk.gray(` - No changes needed for ${file.path}`));
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
console.log(chalk.bold.green(`\n✨ Version bump complete! Don't forget to commit and push.`));
|