antigravity-ide 4.1.7 → 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 +49 -26
- package/README.vi.md +50 -22
- package/cli/create.js +1 -0
- package/cli/prompts.js +1 -1
- package/cli/repair.js +33 -3
- 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,28 +1,25 @@
|
|
|
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
|
-
|
|
7
|
-
[](https://www.npmjs.com/package/antigravity-ide)
|
|
8
|
+
[](https://www.npmjs.com/package/antigravity-ide)
|
|
9
|
+
[](https://github.com/Dokhacgiakhoa/antigravity-ide/actions)
|
|
10
|
+
[](LICENSE)
|
|
9
11
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
This project adopts the **[Agent Skills Standard](https://github.com/HoangNguyen0403/agent-skills-standard)** for AI engineering practices.
|
|
14
|
-
- **Goal**: Token Economy, High-Density Context, and Universal Compatibility.
|
|
15
|
-
- **License**: MIT (Ref: HoangNguyen0403)
|
|
16
|
-
|
|
17
|
-
We also integrate official skills from **[anthropics/skills](https://github.com/anthropics/skills)** (Apache 2.0).
|
|
12
|
+
<!-- SECURITY & QUALITY -->
|
|
13
|
+
[](https://socket.dev/npm/package/antigravity-ide)
|
|
14
|
+
[](https://github.com/Dokhacgiakhoa/antigravity-ide)
|
|
18
15
|
|
|
19
|
-
**
|
|
16
|
+
**Easy Vibe, Lazy Code. One Command to Rule Them All.**
|
|
20
17
|
|
|
21
18
|
[Explore Docs](https://antigravity-ide-cli.vercel.app/) • [Github](https://github.com/Dokhacgiakhoa/antigravity-ide) • [Report Bug](https://github.com/Dokhacgiakhoa/antigravity-ide/issues)
|
|
22
19
|
|
|
23
20
|
---
|
|
24
21
|
|
|
25
|
-
### 📊
|
|
22
|
+
### 📊 System Capability Matrix
|
|
26
23
|
|
|
27
24
|
| **15** Rules | **22** Agents | **573** Skills | **2977** Patterns | **30** Flows | **135** DNA |
|
|
28
25
|
| :---: | :---: | :---: | :---: | :---: | :---: |
|
|
@@ -36,21 +33,27 @@ We also integrate official skills from **[anthropics/skills](https://github.com/
|
|
|
36
33
|
|
|
37
34
|
The recommended way to use Antigravity IDE is via **npx**. No global clutter, always the latest engine.
|
|
38
35
|
|
|
39
|
-
|
|
36
|
+
```bash
|
|
37
|
+
# 🔥 UNIFIED GOD COMMAND
|
|
38
|
+
# Create, Update, Repair, and Sync - All in one.
|
|
40
39
|
npx antigravity-ide [project-name]
|
|
41
40
|
|
|
42
|
-
# If run
|
|
41
|
+
# If run inside an existing project:
|
|
42
|
+
# Automatically detects version, repairs config, and syncs docs.
|
|
43
43
|
npx antigravity-ide .
|
|
44
44
|
|
|
45
|
-
# Validate
|
|
45
|
+
# Validate project compliance:
|
|
46
46
|
npx antigravity-ide validate
|
|
47
|
+
```
|
|
47
48
|
|
|
48
49
|
> [!TIP]
|
|
49
|
-
> **New to npx?** Check our [NPX Installation Guide](
|
|
50
|
+
> **New to npx?** Check our [NPX Installation Guide](docs/INSTALL_NPX_GUIDE.md) for a step-by-step setup.
|
|
50
51
|
|
|
51
52
|
---
|
|
52
53
|
|
|
53
|
-
## ✨ The Premium Edge (v4.1.
|
|
54
|
+
## ✨ The Premium Edge (v4.1.9)
|
|
55
|
+
|
|
56
|
+
Why choose AntiGravity over standard AI wrappers?
|
|
54
57
|
|
|
55
58
|
| Feature | **AntiGravity IDE** | Standard AI Wrappers |
|
|
56
59
|
| :--- | :--- | :--- |
|
|
@@ -58,18 +61,22 @@ npx antigravity-ide validate
|
|
|
58
61
|
| **🛡️ Watchdog System** | Real-time hang detection & error learning | Direct failures / Silent crashes |
|
|
59
62
|
| **🌊 Scale Adaptive** | Modular DNA for Instant, Creative, or SME | One-size-fits-all |
|
|
60
63
|
| **🛠️ Self-Healing** | Auto-repair logic via unified god command | Manual JSON debugging |
|
|
64
|
+
| **🔒 Provenance** | NPM Signed Builds (Sigstore) | Unverified builds |
|
|
61
65
|
|
|
62
66
|
---
|
|
63
67
|
|
|
64
68
|
## 🎯 3 Steps to Your First App
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
69
|
+
|
|
70
|
+
1. **Launch Terminal**: Open Command Prompt or Powershell.
|
|
71
|
+
2. **Execute God Command**: `npx antigravity-ide my-app`
|
|
72
|
+
3. **Talk to the Brain**: Interact with your new Virtual Team.
|
|
68
73
|
|
|
69
74
|
---
|
|
70
75
|
|
|
71
76
|
## 📂 Visual Brain Structure
|
|
72
77
|
|
|
78
|
+
A fracture-free, standardized architecture for scalable AI development.
|
|
79
|
+
|
|
73
80
|
```text
|
|
74
81
|
your-project/
|
|
75
82
|
├── .agent/ # 🧠 THE BRAIN (Fractal Core)
|
|
@@ -100,12 +107,28 @@ your-project/
|
|
|
100
107
|
|
|
101
108
|
---
|
|
102
109
|
|
|
103
|
-
##
|
|
110
|
+
## 📚 Documentation
|
|
111
|
+
|
|
104
112
|
- **[Gemini Usage Guide](docs/GEMINI_USAGE.md)**: How to configure and use with Google Gemini.
|
|
105
113
|
- **[Master Operations](docs/MASTER_OPERATIONS.md)**: Deep dive into the IDE's core mechanics.
|
|
106
114
|
- **[Publishing Guide](docs/PUBLISHING_GUIDE.md)**: How to release your own Agent packages.
|
|
107
115
|
|
|
108
|
-
|
|
109
|
-
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## 🙏 Credits & Acknowledgments
|
|
119
|
+
|
|
120
|
+
This project is independently developed by **Dokhacgiakhoa**.
|
|
121
|
+
|
|
122
|
+
We respectfully acknowledge the following open-source projects as **references and sources of inspiration** (Note: These authors are not directly involved in the development of this project):
|
|
123
|
+
|
|
124
|
+
- **[Agent Skills Standard](https://github.com/HoangNguyen0403/agent-skills-standard)**: Adopted as the core architectural standard for AI engineering.
|
|
125
|
+
- **[Antigravity Kit](https://github.com/vudovn/antigravity-kit)**: Inspiration for the "Antigravity" concept and meta-engine philosophy.
|
|
126
|
+
- **[Awesome Skills](https://github.com/sickn33/antigravity-awesome-skills)**: Reference for skill directory structure.
|
|
127
|
+
- **[anthropics/skills](https://github.com/anthropics/skills)**: Official Anthropic skills integrated under Apache 2.0 license.
|
|
110
128
|
|
|
111
|
-
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
<div align="center">
|
|
132
|
+
Developed with 💡 by <strong>Dokhacgiakhoa</strong><br>
|
|
133
|
+
<a href="LICENSE">MIT LICENSE</a>
|
|
134
|
+
</div>
|
package/README.vi.md
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
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
|
-
|
|
7
|
-
[](https://www.npmjs.com/package/antigravity-ide)
|
|
8
|
+
[](https://www.npmjs.com/package/antigravity-ide)
|
|
9
|
+
[](https://github.com/Dokhacgiakhoa/antigravity-ide/actions)
|
|
10
|
+
[](LICENSE)
|
|
11
|
+
|
|
12
|
+
<!-- SECURITY & QUALITY -->
|
|
13
|
+
[](https://socket.dev/npm/package/antigravity-ide)
|
|
14
|
+
[](https://github.com/Dokhacgiakhoa/antigravity-ide)
|
|
9
15
|
|
|
10
16
|
**Vibe thoải mái, Code thảnh thơi. Một lệnh duy nhất cân cả thế giới.**
|
|
11
17
|
|
|
@@ -13,9 +19,9 @@
|
|
|
13
19
|
|
|
14
20
|
---
|
|
15
21
|
|
|
16
|
-
### 📊
|
|
22
|
+
### 📊 Ma trận Năng lực Hệ thống
|
|
17
23
|
|
|
18
|
-
| **15** Quy tắc | **22** Chuyên gia | **573** Kỹ năng | **2977** Chiến thuật | **30** Quy trình | **135**
|
|
24
|
+
| **15** Quy tắc | **22** Chuyên gia | **573** Kỹ năng | **2977** Chiến thuật | **30** Quy trình | **135** DNA |
|
|
19
25
|
| :---: | :---: | :---: | :---: | :---: | :---: |
|
|
20
26
|
| *Quản trị* | *Virtual Agents* | *Công cụ lõi* | *Mẫu AI Nâng cao* | *Chuẩn hóa* | *DNA Dùng chung* |
|
|
21
27
|
|
|
@@ -25,27 +31,29 @@
|
|
|
25
31
|
|
|
26
32
|
## ⚡ Cài đặt Toàn cầu (npx)
|
|
27
33
|
|
|
28
|
-
Khuyến khích sử dụng thông qua **npx** để luôn
|
|
34
|
+
Khuyến khích sử dụng thông qua **npx** để luôn nhận được Engine và Skills mới nhất mà không gây rác hệ thống.
|
|
29
35
|
|
|
30
|
-
|
|
36
|
+
```bash
|
|
37
|
+
# 🔥 LỆNH VẠN NĂNG (GOD COMMAND)
|
|
38
|
+
# Tạo mới, Cập nhật, Sửa lỗi và Đồng bộ - Tất cả trong 1.
|
|
31
39
|
npx antigravity-ide [ten-du-an]
|
|
32
40
|
|
|
33
|
-
# Chạy trong dự án
|
|
41
|
+
# Chạy trong dự án cũ:
|
|
42
|
+
# Tự động phát hiện phiên bản, vá lỗi config và cập nhật docs.
|
|
34
43
|
npx antigravity-ide .
|
|
35
44
|
|
|
36
|
-
# Kiểm tra dự án theo chuẩn
|
|
45
|
+
# Kiểm tra dự án theo chuẩn:
|
|
37
46
|
npx antigravity-ide validate
|
|
38
47
|
```
|
|
39
48
|
|
|
40
|
-
## 📜 Ghi nhận & Tiêu chuẩn
|
|
41
|
-
Dự án áp dụng **[Agent Skills Standard](https://github.com/HoangNguyen0403/agent-skills-standard)** và tích hợp bộ kỹ năng từ **[anthropics/skills](https://github.com/anthropics/skills)** để đảm bảo tính tương thích và hiệu quả token tối đa.
|
|
42
|
-
|
|
43
49
|
> [!TIP]
|
|
44
|
-
> **Mới dùng npx?** Xem [Hướng dẫn Cài đặt](
|
|
50
|
+
> **Mới dùng npx?** Xem [Hướng dẫn Cài đặt](docs/INSTALL_NPX_GUIDE.vi.md) để bắt đầu.
|
|
45
51
|
|
|
46
52
|
---
|
|
47
53
|
|
|
48
|
-
## ✨ Đ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
|
+
|
|
56
|
+
Tại sao nên chọn AntiGravity thay vì các AI wrapper thông thường?
|
|
49
57
|
|
|
50
58
|
| Tính năng | **AntiGravity IDE** | Wrapper AI thông thường |
|
|
51
59
|
| :--- | :--- | :--- |
|
|
@@ -53,18 +61,22 @@ Dự án áp dụng **[Agent Skills Standard](https://github.com/HoangNguyen0403
|
|
|
53
61
|
| **🛡️ Hệ thống Watchdog** | Phát hiện treo & Tự học từ lỗi dự án | Hay bị kẹt / Lỗi im lặng |
|
|
54
62
|
| **🌊 Scale Adaptive** | DNA linh hoạt cho Instant/Creative/SME | Một khuôn mẫu cho mọi dự án |
|
|
55
63
|
| **🛠️ Self-Healing** | Tự sửa lỗi cấu hình qua 1 lệnh duy nhất | Phải sửa JSON thủ công |
|
|
64
|
+
| **🔒 Provenance** | Build được ký số (NPM Sigstore) | Không xác thực nguồn gốc |
|
|
56
65
|
|
|
57
66
|
---
|
|
58
67
|
|
|
59
68
|
## 🎯 3 Bước để Bắt đầu
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
69
|
+
|
|
70
|
+
1. **Mở Terminal**: Command Prompt hoặc Powershell.
|
|
71
|
+
2. **Chạy Lệnh Vạn Năng**: `npx antigravity-ide ten-du-an`
|
|
72
|
+
3. **Trò chuyện với AI**: Bắt đầu làm việc với đội ngũ ảo của bạn.
|
|
63
73
|
|
|
64
74
|
---
|
|
65
75
|
|
|
66
76
|
## 📂 Cấu trúc Dự án (Visual Tree)
|
|
67
77
|
|
|
78
|
+
Kiến trúc chuẩn hóa, dễ dàng mở rộng và bảo trì.
|
|
79
|
+
|
|
68
80
|
```text
|
|
69
81
|
du-an-cua-ban/
|
|
70
82
|
├── .agent/ # 🧠 BỘ NÃO (Fractal Core)
|
|
@@ -96,11 +108,27 @@ du-an-cua-ban/
|
|
|
96
108
|
---
|
|
97
109
|
|
|
98
110
|
## 📚 Tài liệu tham khảo
|
|
111
|
+
|
|
99
112
|
- **[Hướng dẫn Gemini](docs/GEMINI_USAGE.md)**: Cách cấu hình và sử dụng với Google Gemini.
|
|
100
|
-
- **[Vận hành Master](docs/MASTER_OPERATIONS.md)**: Tìm hiểu sâu về cơ chế cốt lõi.
|
|
113
|
+
- **[Vận hành Master](docs/MASTER_OPERATIONS.vi.md)**: Tìm hiểu sâu về cơ chế cốt lõi.
|
|
101
114
|
- **[Hướng dẫn Phát hành](docs/PUBLISHING_GUIDE.md)**: Cách đóng gói và xuất bản Agent của riêng bạn.
|
|
102
115
|
|
|
103
|
-
|
|
104
|
-
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## 🙏 Ghi nhận & Tham khảo
|
|
105
119
|
|
|
106
|
-
|
|
120
|
+
Dự án này được phát triển độc lập bởi **Dokhacgiakhoa**.
|
|
121
|
+
|
|
122
|
+
Chúng tôi xin trân trọng ghi nhận các dự án mã nguồn mở sau đây là **nguồn cảm hứng và tài liệu tham khảo** (Lưu ý: Các tác giả này không trực tiếp tham gia vào quá trình phát triển dự án này):
|
|
123
|
+
|
|
124
|
+
- **[Agent Skills Standard](https://github.com/HoangNguyen0403/agent-skills-standard)**: Được áp dụng làm chuẩn kiến trúc cốt lõi cho AI.
|
|
125
|
+
- **[Antigravity Kit](https://github.com/vudovn/antigravity-kit)**: Nguồn cảm hứng cho khái niệm "Antigravity" và triết lý Meta-Engine.
|
|
126
|
+
- **[Awesome Skills](https://github.com/sickn33/antigravity-awesome-skills)**: Tham khảo về cấu trúc thư mục kỹ năng.
|
|
127
|
+
- **[anthropics/skills](https://github.com/anthropics/skills)**: Tích hợp các kỹ năng chính thức từ Anthropic (Apache 2.0).
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
<div align="center">
|
|
132
|
+
Phát triển với 💡 bởi <strong>Dokhacgiakhoa</strong><br>
|
|
133
|
+
<a href="LICENSE">MIT LICENSE</a>
|
|
134
|
+
</div>
|
package/cli/create.js
CHANGED
|
@@ -10,6 +10,7 @@ const { execSync } = require('child_process');
|
|
|
10
10
|
const { getProjectConfig, getSkillsForCategories, confirmOverwrite } = require('./prompts');
|
|
11
11
|
const gradient = require('gradient-string');
|
|
12
12
|
const { getRulesList, getAgentsList } = require('./logic/manifest-manager');
|
|
13
|
+
const { getScaleConfig } = require('./logic/scale-rules');
|
|
13
14
|
const { repairProject } = require('./repair');
|
|
14
15
|
const { generateGeminiMd } = require('./logic/gemini-generator');
|
|
15
16
|
|
package/cli/prompts.js
CHANGED
|
@@ -36,7 +36,7 @@ function displayBanner() {
|
|
|
36
36
|
console.log(gradient.pastel.multiline('/_/ |_/_/ /_/\\__/_/\\____/_/ \\__,_/ |___/_/\\__/\\__, / '));
|
|
37
37
|
console.log(gradient.pastel.multiline(' /____/ '));
|
|
38
38
|
console.log(chalk.gray(` AntiGravity IDE • v${packageJson.version}`));
|
|
39
|
-
console.log(chalk.gray(' ✨
|
|
39
|
+
console.log(chalk.gray(' ✨ System Core: 15 Rules • 22 Agents • 573 Skills • 30 Workflows • 2977 Patterns'));
|
|
40
40
|
console.log(gradient.rainbow('━'.repeat(60)));
|
|
41
41
|
console.log('');
|
|
42
42
|
}
|
package/cli/repair.js
CHANGED
|
@@ -66,6 +66,29 @@ async function repairProject(projectPath, options, config) {
|
|
|
66
66
|
}
|
|
67
67
|
spinner.succeed(`Specialist Agents ready (${restoredAgents} updated/restored)`);
|
|
68
68
|
|
|
69
|
+
// 4. Sync Workflows (Critical for slash commands)
|
|
70
|
+
spinner.start('Restoring Workflows...');
|
|
71
|
+
const workflowsDest = path.join(agentDir, 'workflows');
|
|
72
|
+
fs.ensureDirSync(workflowsDest);
|
|
73
|
+
const workflowsSourceDir = path.join(sourceAgentDir, 'workflows');
|
|
74
|
+
|
|
75
|
+
let restoredWorkflows = 0;
|
|
76
|
+
const workflowsToInstall = config.workflows || [];
|
|
77
|
+
|
|
78
|
+
for (const workflow of workflowsToInstall) {
|
|
79
|
+
const workflowFile = `${workflow}.md`;
|
|
80
|
+
const srcWorkflow = path.join(workflowsSourceDir, workflowFile);
|
|
81
|
+
const destWorkflow = path.join(workflowsDest, workflowFile);
|
|
82
|
+
|
|
83
|
+
if (!fs.existsSync(destWorkflow) || options.force) {
|
|
84
|
+
if (fs.existsSync(srcWorkflow)) {
|
|
85
|
+
await fs.copy(srcWorkflow, destWorkflow);
|
|
86
|
+
restoredWorkflows++;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
spinner.succeed(`Operational Workflows ready (${restoredWorkflows} restored)`);
|
|
91
|
+
|
|
69
92
|
// 4. Update Core Configuration (GEMINI.md)
|
|
70
93
|
spinner.start('Updating Core Constitution (GEMINI.md)...');
|
|
71
94
|
const geminiContent = generateGeminiMd(
|
|
@@ -92,10 +115,17 @@ async function repairProject(projectPath, options, config) {
|
|
|
92
115
|
spinner.succeed('Core Configuration applied (v' + require('../package.json').version + ')');
|
|
93
116
|
|
|
94
117
|
console.log(chalk.bold.green('\n✨ Repair & Sync Complete!'));
|
|
95
|
-
console.log(chalk.white(' Your project is now
|
|
96
|
-
|
|
118
|
+
console.log(chalk.white(' Your project is now aligned with Antigravity v' + require('../package.json').version));
|
|
119
|
+
|
|
120
|
+
const statLine = [
|
|
121
|
+
chalk.white(`${restoredRules} Rules`),
|
|
122
|
+
chalk.white(`${restoredAgents} Agents`),
|
|
123
|
+
chalk.white(`${restoredWorkflows} Workflows`)
|
|
124
|
+
].join(chalk.gray(' • '));
|
|
125
|
+
console.log(gradient.pastel(' ✨ Synced: ') + statLine);
|
|
126
|
+
|
|
97
127
|
if (!options.force) {
|
|
98
|
-
console.log(chalk.dim(' (Note: Existing custom rules/agents were preserved. Use --force to reset them.)'));
|
|
128
|
+
console.log(chalk.dim('\n (Note: Existing custom rules/agents were preserved. Use --force to reset them.)'));
|
|
99
129
|
}
|
|
100
130
|
console.log('');
|
|
101
131
|
|
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.`));
|