Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,39 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [5.4.7] - 2026-11-08

### ⚡ Extension 1.10.0 Support, Multi-Editor Discovery, Account Manager & Dynamic Launcher

#### 🧩 VS Code Extension 1.10.0 Minification Fix (#46)
- **Atomic Regex Matching:** Replaced regex backreferences with atomic pattern to reliably match minified variants of the extension in version 1.10.0.
- **SOCKS5 Isolation:** Resolved `UND_ERR_INVALID_ARG` in Node.js (undici) by isolating SOCKS5/SOCKS5h loopback from `HTTPS_PROXY` environment variables.

#### 👤 Multi-Account Manager & Token Bridge Hardening
- **Token Protection:** Prevented `SyncTokenBridge` from stomping the active `jetski-standalone-oauth-token` when running under SSH connection spoofing.
- **Bi-Directional Sync:** Synchronized active tokens between file storage and OS Keyring in `SaveAccount` and `SwitchAccount`.

#### 🔍 Editor & IDE Discovery Expansion (#45)
- **Multi-Editor Extension Support:** Added discovery and patching support for **Cursor** (`~/.cursor/extensions`), **Windsurf** (`~/.windsurf/extensions`), and **VSCodium** across Linux, macOS, and Windows.
- **Alternative Extension Prefixes:** Added support for alternative extension ID prefixes (`google.antigravity-` and `antigravity-`).

#### 🚀 Dynamic Target Selection & Auto-Fix
- **Auto-Fix Extension Coverage:** Included `PatchVsCodeExtension` in `runQuickAutoFix` (Option 1) so 1-click auto-fix covers all IDE extensions without requiring manual individual patch commands.
- **Dynamic Launcher Selection:** Prompt dynamically when multiple Antigravity targets are installed, with CLI target flags (`launch ide` / `launch app`).

---

## [5.4.6] - 2026-11-04

### 🛡️ AMFI SIGTERM Resolution, Chromium & SQLite Session Purge & V8 Bytecode Optimization

- **macOS AMFI SIGTERM Resolution (#37):** Added `HealDarwinBinaries` to auto-purge legacy shell script wrappers, restore native Mach-O `language_server` with ad-hoc codesign, and keep native binary intact to prevent AMFI SIGTERM aborts.
- **Chromium & Session Purge (#44):** Deep wipe modern Chromium `Network/` subdirectories (`Cookies`, `Trust Tokens`, `TransportSecurity`, `Persistent State`), `WebStorage/`, and safely reset `antigravityUnifiedStateSync.oauthToken` in `state.vscdb`.
- **V8 Cache & Bundled IDE:** Deep clean V8 Code Cache (`js`/`wasm`, Partitions) and support `dist/main.js` to prevent stale bytecode execution in Antigravity IDE.
- **CLI (agy):** Fully dynamic zero-hardcode binary detection for `agy 1.4.12` with bytecode multi-gate bypass.

---

## [5.4.5] - 2026-11-02

### 🚑 Stability & Self-Healing Hotfix: Windows Binary Restoration, macOS CodeSign & Flag Modernization
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
APP_NAME := antigravity-cleaner
VERSION := 5.4.6
VERSION := 5.4.7
BUILD_DIR := dist

.PHONY: all build clean test release
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<h1 align="center">⚡ Antigravity Cleaner, Fixer & Patcher Pro (v5.4.3)</h1>

<p align="center">
<strong>Autonomous Sanction Bypass, Zero-Telemetry Engine & Direct No-TUN Proxy Injector for Google Antigravity</strong>
<strong>The Best 1-Click Autonomous Region Fixer, Sanction Bypass & Direct No-TUN Proxy Injector for Google Antigravity (Ubuntu/Linux, Windows, macOS)</strong>
</p>

<div align="center">
Expand Down Expand Up @@ -150,7 +150,7 @@ Run `ag-cleaner` in your terminal for an interactive Lipgloss dashboard, and sel
<img src="docs/images/error-notice.png" alt="Google Region Restriction Notice" width="680">
</p>

**Antigravity Cleaner, Fixer & Patcher Pro** is a specialized, open-source systems utility engineered in **pure Go** that neutralizes region blocking, account eligibility barriers, telemetry phone-home beacons, and HTTP 429 quota locks across:
**Antigravity Fixer, Cleaner & Patcher** is the best open-source autonomous utility designed to remove region restrictions, bypass Google sanctions, and resolve **"Your current account is not eligible" (Error 403)**, **Region Locks**, and **HTTP 429 Quota locks** across Ubuntu/Linux, Windows, and macOS:
- **Google Antigravity 2.x**
- **Antigravity IDE**
- **Antigravity CLI (`agy`)**
Expand Down
45 changes: 42 additions & 3 deletions cmd/antigravity/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/tawroot/antigravity-cleaner/pkg/updater"
)

const Version = "5.4.6"
const Version = "5.4.7"

func init() {
patcher.RegisterPostInstallHook(func(logger patcher.LogFunc) {
Expand Down Expand Up @@ -263,7 +263,18 @@ func handleSubcommand(cmd string, args []string) {
fs := flag.NewFlagSet("launch", flag.ExitOnError)
fs.StringVar(&proxyURL, "proxy", "", "Custom proxy URL (e.g. socks5h://127.0.0.1:10808)")
_ = fs.Parse(args)
_ = proxy.LaunchAntigravityWithProxy("", proxyURL, fs.Args())

var preference string
remaining := fs.Args()
if len(remaining) > 0 {
switch strings.ToLower(remaining[0]) {
case "ide", "app", "standalone":
preference = remaining[0]
remaining = remaining[1:]
}
}
appPath := proxy.FindTargetExecutable(preference)
_ = proxy.LaunchAntigravityWithProxy(appPath, proxyURL, remaining)
case "gui":
runGui()
case "clean":
Expand Down Expand Up @@ -417,6 +428,12 @@ func runQuickAutoFix() {
coreSuccess = true
}

if res, err := patcher.PatchVsCodeExtension(""); err != nil {
ui.PrintStatus("INFO", "VS Code / IDE Extension", "No external extensions folder found (optional)")
} else {
ui.PrintStatus("OK", "VS Code / IDE Extension", res)
}

if res, err := patcher.PatchAsarZeroLog(""); err != nil {
ui.PrintStatus("INFO", "Zero-Log ASAR", "Antigravity Standalone (app.asar optional)")
} else {
Expand Down Expand Up @@ -546,9 +563,31 @@ func runLaunchProxy() {
}

ui.PrintStatus("OK", "Proxy Detected", fmt.Sprintf("%s (%s)", best.URL, best.Provider))

targets := proxy.FindAllAntigravityExecutables()
selectedExe := ""
if len(targets) > 1 {
fmt.Println()
fmt.Println(lipgloss.NewStyle().Bold(true).Foreground(lipgloss.Color("#00F0FF")).Render(" ℹ Multiple Antigravity installations detected:"))
for i, t := range targets {
fmt.Printf(" [%d] %s (%s)\n", i+1, lipgloss.NewStyle().Bold(true).Render(t.Name), t.ExePath)
}
fmt.Println()
choice := ui.ReadInput(fmt.Sprintf("Select target to launch [1-%d] (default: 1)", len(targets)))
idx := 0
if choice != "" {
if n, err := strconv.Atoi(strings.TrimSpace(choice)); err == nil && n >= 1 && n <= len(targets) {
idx = n - 1
}
}
selectedExe = targets[idx].ExePath
} else if len(targets) == 1 {
selectedExe = targets[0].ExePath
}

fmt.Printf(" %s\n", lipgloss.NewStyle().Foreground(lipgloss.Color("#6272A4")).Render("Starting Antigravity with injected environment..."))

if err := proxy.LaunchAntigravityWithProxy("", best.URL, nil); err != nil {
if err := proxy.LaunchAntigravityWithProxy(selectedExe, best.URL, nil); err != nil {
ui.PrintStatus("FAIL", "Launch Error", err.Error())
} else {
ui.PrintStatus("OK", "Process Spawned", "Antigravity launched successfully without TUN mode!")
Expand Down
44 changes: 36 additions & 8 deletions pkg/account/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,23 +182,37 @@ func SaveAccount(name string, dbPath string) error {
}
}

// Capture OS Keyring token payload (gemini / antigravity)
// Capture OS Keyring token payload (gemini / antigravity) or fallback to file token
var keyringSecret string
if krVal, err := keyring.Get("gemini", "antigravity"); err == nil && krVal != "" {
keyringSecret = krVal
if email == "" || email == "Google User (Antigravity Hub)" {
if match := emailRe.FindString(krVal); match != "" {
email = match
}
tokenFilePath := StandaloneTokenFilePath()
if tokenFilePath != "" {
if fileData, err := os.ReadFile(tokenFilePath); err == nil && len(fileData) > 0 {
if keyringSecret == "" {
keyringSecret = string(fileData)
}
}
}
if keyringSecret != "" && (email == "" || email == "Google User (Antigravity Hub)") {
if match := emailRe.FindString(keyringSecret); match != "" {
email = match
}
}

if email == "" {
email = "Google User (Antigravity Hub)"
}

_ = os.MkdirAll(accountProfileDir, 0700)

if tokenFilePath != "" {
if fileData, err := os.ReadFile(tokenFilePath); err == nil && len(fileData) > 0 {
_ = os.WriteFile(filepath.Join(accountProfileDir, "jetski-standalone-oauth-token"), fileData, 0600)
}
}

// Backup Hub files
for _, f := range hubFiles {
src := filepath.Join(hubDir, f)
Expand Down Expand Up @@ -322,10 +336,24 @@ func SwitchAccount(name string, dbPath string) error {
}

// 0. Restore OS Keyring credentials if present (gemini / antigravity)
if account.KeyringSecret != "" {
_ = keyring.Set("gemini", "antigravity", account.KeyringSecret)
} else if krBytes, err := os.ReadFile(filepath.Join(accountProfileDir, "keyring_secret.json")); err == nil {
_ = keyring.Set("gemini", "antigravity", string(krBytes))
secret := account.KeyringSecret
if secret == "" {
if krBytes, err := os.ReadFile(filepath.Join(accountProfileDir, "keyring_secret.json")); err == nil {
secret = string(krBytes)
} else if tokBytes, err := os.ReadFile(filepath.Join(accountProfileDir, "jetski-standalone-oauth-token")); err == nil {
secret = string(tokBytes)
}
}

if secret != "" {
_ = keyring.Set("gemini", "antigravity", secret)
}

// 0b. Restore ~/.gemini/jetski-standalone-oauth-token for file-token mode (SSH spoofing)
tokenFilePath := StandaloneTokenFilePath()
if tokenFilePath != "" && secret != "" {
_ = os.MkdirAll(filepath.Dir(tokenFilePath), 0700)
_ = os.WriteFile(tokenFilePath, []byte(secret), 0600)
}

// 1. Restore Hub files
Expand Down
12 changes: 9 additions & 3 deletions pkg/account/token_bridge.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,19 @@ func SyncTokenBridge(logger func(format string, args ...interface{})) error {
return nil
}

// If both have valid tokens but are different, update file to match active keyring
// If both have valid tokens but are different:
// Prioritize file storage because in SSH spoofing mode (which Antigravity runs with),
// Google's language_server reads and updates jetski-standalone-oauth-token directly,
// while OS Keyring remains untouched. Overwriting file with Keyring clobbers fresh logins!
if krHasValidToken && fileHasValidToken {
krHash := sha256.Sum256([]byte(krVal))
fileHash := sha256.Sum256(fileBytes)
if krHash != fileHash {
_ = os.WriteFile(tokenFilePath, []byte(krVal), 0600)
logger("Updated file token storage with latest active OS Keyring credentials")
if err := keyring.Set("gemini", "antigravity", string(fileBytes)); err != nil {
logger("Warning: failed to sync file token to OS Keyring: %v", err)
} else {
logger("Synced active file token storage to OS Keyring")
}
}
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/gui/assets/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Antigravity Patcher v5.4.6 - by dalroot</title>
<title>Antigravity Patcher v5.4.7 - by dalroot</title>
<style>
* {
box-sizing: border-box;
Expand Down Expand Up @@ -270,7 +270,7 @@
<!-- Titlebar -->
<div class="title-bar">
<div class="title-bar-text">
<span>💾</span> Antigravity PATCH v5.4.6 - [dalroot]
<span>💾</span> Antigravity PATCH v5.4.7 - [dalroot]
</div>
<div class="title-bar-controls">
<div class="close-btn" onclick="soundBeep(400)">_</div>
Expand Down
2 changes: 1 addition & 1 deletion pkg/gui/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ func (s *Server) handleDoctor(w http.ResponseWriter, r *http.Request) {

func (s *Server) handleReport(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
report := doctor.GenerateDiagnosticReport("5.4.6")
report := doctor.GenerateDiagnosticReport("5.4.7")
doctor.CopyToClipboard(report)
filePath, _ := doctor.SaveAndOpenReport(report)
_ = json.NewEncoder(w).Encode(map[string]interface{}{
Expand Down
43 changes: 32 additions & 11 deletions pkg/patcher/vscode.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,27 @@ import (
)

var (
channelChangedRe = regexp.MustCompile(`const\s+isChannelChanged\s*=\s*manifestFetched\s*&&\s*lastInstalledUrl\s*!==\s*releaseBaseUrl;`)
channelPatched = `const isChannelChanged = false;`
channelChangedRe = regexp.MustCompile(`const\s+isChannelChanged\s*=\s*manifestFetched\s*&&\s*lastInstalledUrl\s*!==\s*releaseBaseUrl;`)
channelChangedMinifiedRe = regexp.MustCompile(`let\s+([a-zA-Z0-9_$]+)\s*=\s*[^;]+;\s*([a-zA-Z0-9_$]+\s*&&\s*[a-zA-Z0-9_$]+\.appendLine\(\s*[` + "`" + `'"]\[INSTALL\]\s*Release channel change detected)`)
channelPatched = `const isChannelChanged = false; /*patched:channel_lock*/`

downloadGuardTarget = regexp.MustCompile(`(outputChannel\.appendLine\(\s*['"]\[INSTALL\]\s*Checking Antigravity releases\.\.\.['"]\s*\);)`)
downloadGuardTarget = regexp.MustCompile(`([a-zA-Z0-9_$]+\.appendLine\(\s*['"]\[INSTALL\]\s*Checking Antigravity releases\.\.\.['"]\s*\);)`)
downloadGuardCode = `{const __primary=options.targetPathOverride||getInstalledTargetPath(); const __candidates=[__primary, (0,path_1.join)((0,path_1.dirname)(__primary),'antigravity'+((0,path_1.extname)(__primary)||''))]; for(const __p of __candidates){if(__p&&await pathExists(__p)){ outputChannel.appendLine('[INSTALL] Existing binary found at '+__p+'. Skipping version check and re-download.');return __p;}}}`
)

// FindVsCodeExtension finds the extension.js of google.google-antigravity
// FindVsCodeExtension finds the extension.js of google.google-antigravity or related forks (Cursor, Windsurf, VSCodium)
func FindVsCodeExtension() string {
home, _ := os.UserHomeDir()
candidateDirs := []string{
filepath.Join(home, ".vscode", "extensions"),
filepath.Join(home, ".vscode-insiders", "extensions"),
filepath.Join(home, ".vscode-oss", "extensions"),
filepath.Join(home, ".vscode-server", "extensions"),
filepath.Join(home, ".cursor", "extensions"),
filepath.Join(home, ".cursor-server", "extensions"),
filepath.Join(home, ".windsurf", "extensions"),
filepath.Join(home, ".windsurf-server", "extensions"),
filepath.Join(home, ".vscodium", "extensions"),
filepath.Join(home, ".antigravity-ide", "extensions"),
filepath.Join(home, ".antigravity", "extensions"),
}
Expand All @@ -35,13 +41,16 @@ func FindVsCodeExtension() string {
filepath.Join(localApp, "Programs", "Antigravity IDE", "resources", "app", "extensions"),
filepath.Join(localApp, "Programs", "Antigravity", "resources", "app", "extensions"),
filepath.Join(localApp, "Programs", "antigravity", "resources", "app", "extensions"),
filepath.Join(localApp, "Programs", "cursor", "resources", "app", "extensions"),
filepath.Join(localApp, "Programs", "Cursor", "resources", "app", "extensions"),
)
} else if runtime.GOOS == "linux" {
candidateDirs = append(candidateDirs,
"/usr/share/antigravity/resources/app/extensions",
"/usr/share/antigravity-ide/resources/app/extensions",
"/opt/antigravity/resources/app/extensions",
"/opt/Antigravity IDE/resources/app/extensions",
"/opt/Cursor/resources/app/extensions",
)
}

Expand Down Expand Up @@ -69,7 +78,7 @@ func FindVsCodeExtension() string {
continue
}
for _, e := range entries {
if e.IsDir() && (strings.HasPrefix(e.Name(), "google.google-antigravity-") || strings.EqualFold(e.Name(), "agy") || strings.HasPrefix(e.Name(), "agy-")) {
if e.IsDir() && (strings.HasPrefix(e.Name(), "google.google-antigravity-") || strings.HasPrefix(e.Name(), "google.antigravity-") || strings.HasPrefix(e.Name(), "antigravity-") || strings.EqualFold(e.Name(), "agy") || strings.HasPrefix(e.Name(), "agy-")) {
for _, sub := range []string{"extension.js", filepath.Join("dist", "extension.js")} {
extJs := filepath.Join(dir, e.Name(), sub)
if fi, err := os.Stat(extJs); err == nil && !fi.IsDir() {
Expand Down Expand Up @@ -100,17 +109,29 @@ func PatchVsCodeExtension(extPath string) (string, error) {
}

content := string(data)
if strings.Contains(content, channelPatched) && strings.Contains(content, "Skipping version check and re-download") {
alreadyPatched := (strings.Contains(content, channelPatched) && strings.Contains(content, "Skipping version check and re-download")) ||
strings.Contains(content, "/*patched:channel_lock*/")
if alreadyPatched {
return fmt.Sprintf("Already patched: %s", filepath.Base(filepath.Dir(extPath))), nil
}

// Apply Part 1: Channel lock
patched := channelChangedRe.ReplaceAllString(content, channelPatched)
channelApplied := patched != content || strings.Contains(content, channelPatched)
// Apply Part 1: Channel lock (Classic unminified and v1.10.0+ minified)
patched := content
channelApplied := false

if channelChangedRe.MatchString(patched) {
patched = channelChangedRe.ReplaceAllString(patched, channelPatched)
channelApplied = true
} else if channelChangedMinifiedRe.MatchString(patched) {
patched = channelChangedMinifiedRe.ReplaceAllString(patched, "let $1 = false; /*patched:channel_lock*/ $2")
channelApplied = true
} else if strings.Contains(content, channelPatched) || strings.Contains(content, "/*patched:channel_lock*/") {
channelApplied = true
}

// Apply Part 2: Re-download guard injection
// Apply Part 2: Re-download guard injection (if unminified AST present)
guardApplied := strings.Contains(patched, "Skipping version check and re-download")
if downloadGuardTarget.MatchString(patched) {
if !guardApplied && downloadGuardTarget.MatchString(patched) && strings.Contains(patched, "options.targetPathOverride") {
patched = downloadGuardTarget.ReplaceAllString(patched, "$1\n"+downloadGuardCode)
guardApplied = true
}
Expand Down
Loading
Loading