antigravity-autopilot 1.4.6 → 1.4.7

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.
Files changed (3) hide show
  1. package/README.md +47 -12
  2. package/RELEASE.md +69 -0
  3. package/package.json +4 -1
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
  <img src="https://raw.githubusercontent.com/nguyenhx2/Antigravity-AutoPilot/master/icon.png" width="128" alt="Antigravity AutoPilot Logo">
5
5
  </p>
6
6
 
7
- > Automatically execute all tool calls and terminal commands in Antigravity — no manual confirmation needed.
7
+ > Automatically execute all tool calls, terminal commands, browser actions, and file permissions in Antigravity — no manual confirmation needed.
8
8
 
9
9
  [![npm](https://img.shields.io/npm/v/antigravity-autopilot)](https://www.npmjs.com/package/antigravity-autopilot)
10
10
  [![GitHub](https://img.shields.io/badge/GitHub-Antigravity--AutoPilot-blue)](https://github.com/nguyenhx2/Antigravity-AutoPilot)
@@ -14,13 +14,21 @@
14
14
 
15
15
  ## What it does
16
16
 
17
- Antigravity has an **"Always Proceed"** terminal execution policy, but due to a missing `useEffect` in its bundled JS, the policy never actually fires — commands still wait for manual approval.
17
+ Antigravity has an **"Always Proceed"** terminal execution policy, but due to missing `useEffect` hooks in its bundled JS, several actions still wait for manual approval.
18
18
 
19
- **Antigravity AutoPilot** patches the runtime JS bundle to inject the missing auto-accept logic, so every tool call and terminal command runs instantly when the policy is active.
19
+ **Antigravity AutoPilot** patches the runtime JS bundle to inject auto-accept logic for **three** permission types:
20
+
21
+ | Patch | What it does | Marker |
22
+ |-------|-------------|--------|
23
+ | **Terminal** | Auto-executes terminal commands when EAGER policy is active | `_aep=` |
24
+ | **Browser** | Auto-confirms browser action requests | `_abp=` |
25
+ | **File** | Auto-allows file permission requests (conversation scope) | `_afp=` |
20
26
 
21
27
  - ✅ Regex-based matching — works across Antigravity versions
22
28
  - ✅ Non-destructive — creates `.bak` backup before patching
23
29
  - ✅ Reversible — restore originals anytime with `--revert`
30
+ - ✅ Idempotent — safely skips already-patched files (no errors)
31
+ - ✅ Selective — patch all or choose individual types with `--only`
24
32
  - ✅ Available as VS Code Extension **and** CLI (`npx`)
25
33
  - 🛡️ 54+ built-in dangerous command presets (Linux/macOS/Windows)
26
34
  - 🔘 On/Off toggle for Command Blocking directly from sidebar
@@ -31,24 +39,45 @@ Antigravity has an **"Always Proceed"** terminal execution policy, but due to a
31
39
  ## CLI Usage
32
40
 
33
41
  ```bash
34
- # Apply the autopilot patch
42
+ # Apply all patches (terminal + browser + file)
35
43
  npx antigravity-autopilot
36
44
 
37
- # Check if already patched
45
+ # Apply only a specific patch type
46
+ npx antigravity-autopilot --only terminal
47
+ npx antigravity-autopilot --only browser
48
+ npx antigravity-autopilot --only file
49
+
50
+ # Check current patch status (per-type detail)
38
51
  npx antigravity-autopilot --check
39
52
 
40
53
  # Revert to original files
41
54
  npx antigravity-autopilot --revert
55
+
56
+ # Show help
57
+ npx antigravity-autopilot --help
58
+ ```
59
+
60
+ ### `--check` Output Example
61
+
62
+ ```
63
+ ✔ [workbench] terminal PATCHED · backup exists
64
+ ✔ [workbench] browser PATCHED · backup exists
65
+ ✔ [workbench] file PATCHED · backup exists
66
+ ✔ [jetskiAgent] terminal PATCHED · backup exists
67
+ ⊘ [jetskiAgent] browser NOT PATCHED · pattern not found
68
+ ⊘ [jetskiAgent] file NOT PATCHED · pattern not found
42
69
  ```
43
70
 
44
71
  ### Workflow
45
72
 
46
73
  ```
47
- 1. npx antigravity-autopilot → patch applied
48
- 2. Restart Antigravity → AutoPilot active 🚀
49
- 3. npx antigravity-autopilot --revert → undo anytime
74
+ 1. npx antigravity-autopilot → patch applied
75
+ 2. Restart Antigravity → AutoPilot active 🚀
76
+ 3. npx antigravity-autopilot --revert → undo anytime
50
77
  ```
51
78
 
79
+ > **Note:** Re-run after every Antigravity update, as the patched files are replaced during updates.
80
+
52
81
  ---
53
82
 
54
83
  ## VS Code Extension
@@ -57,7 +86,7 @@ Install the extension directly into Antigravity for a UI-based experience (sideb
57
86
 
58
87
  ```bash
59
88
  # Download .vsix from GitHub Releases, then:
60
- antigravity --install-extension antigravity-autopilot-1.4.0.vsix
89
+ antigravity --install-extension antigravity-autopilot-1.4.7.vsix
61
90
  ```
62
91
 
63
92
  **Extension features:**
@@ -113,13 +142,19 @@ Add your own patterns via Settings:
113
142
 
114
143
  ## How it works
115
144
 
116
- Antigravity bundles its UI as minified JavaScript. The patch locates the `setTerminalAutoExecutionPolicy` onChange handler and injects a `useEffect` that fires the auto-confirm function whenever the policy is set to `EAGER`:
145
+ Antigravity bundles its UI as minified JavaScript. The patch locates key handler patterns and injects `useEffect` hooks that auto-fire the approval functions:
117
146
 
118
147
  ```js
119
- // Injected patch (conceptual):
120
- useEffect(() => {
148
+ // Terminal: auto-confirm when policy is EAGER
149
+ _aep = useEffect(() => {
121
150
  if (policyVar === ENUM.EAGER && !secureMode) confirmFn(true);
122
151
  }, []);
152
+
153
+ // Browser: auto-confirm browser action requests
154
+ _abp = useEffect(() => { confirmFn() }, [confirmFn]);
155
+
156
+ // File: auto-allow file permission requests (conversation scope)
157
+ _afp = useEffect(() => { senderFn(true, Scope.CONVERSATION) }, [senderFn]);
123
158
  ```
124
159
 
125
160
  Variable names are resolved via regex at runtime, making the patch resilient to minification changes between versions.
package/RELEASE.md ADDED
@@ -0,0 +1,69 @@
1
+ # Release Checklist — Antigravity AutoPilot
2
+
3
+ Follow these steps in order for every release.
4
+
5
+ ## Pre-Release
6
+
7
+ 1. **Update code** — implement features/fixes
8
+ 2. **Bump `version`** in `package.json`
9
+ 3. **Update `README.md`** — document new features, commands, flags
10
+ 4. **Update `--help` screen** in `cli.js` if CLI changed
11
+ 5. **Update extension VSIX version reference** in `README.md` install command
12
+
13
+ ## Build & Test
14
+
15
+ 6. **Build VSIX:**
16
+ ```bash
17
+ npx -y @vscode/vsce package --no-dependencies
18
+ ```
19
+ 7. **Install VSIX locally:**
20
+ ```bash
21
+ cursor --install-extension antigravity-autopilot-X.Y.Z.vsix --force
22
+ ```
23
+ 8. **Test CLI commands:**
24
+ ```bash
25
+ node cli.js --check # verify per-patch status display
26
+ node cli.js # apply patches, check graceful skip
27
+ node cli.js # double-apply: all should show "Already patched"
28
+ node cli.js --revert # revert, then re-apply
29
+ node cli.js --only terminal # selective patch
30
+ node cli.js --help # verify help screen
31
+ ```
32
+
33
+ ## Publish
34
+
35
+ 9. **Commit all changes:**
36
+ ```bash
37
+ git add -A && git commit -m "feat: description (vX.Y.Z)"
38
+ ```
39
+ 10. **Push to GitHub:**
40
+ ```bash
41
+ git push origin master
42
+ ```
43
+ 11. **Publish to npm:**
44
+ ```bash
45
+ npm publish
46
+ ```
47
+ 12. **Create annotated tag (triggers GitHub Release via CI):**
48
+ ```bash
49
+ git tag -a vX.Y.Z -m "vX.Y.Z - changelog summary"
50
+ git push origin vX.Y.Z
51
+ ```
52
+ 13. **Verify GitHub Release** — check that the workflow ran and VSIX is attached
53
+ 14. **Verify npm** — `npm info antigravity-autopilot version` shows new version
54
+
55
+ ## Post-Release
56
+
57
+ 15. **(Optional) Publish to VS Code Marketplace:**
58
+ ```bash
59
+ npx -y @vscode/vsce publish
60
+ ```
61
+
62
+ ## Common Mistakes to Avoid
63
+
64
+ - ❌ Forgetting to update README with new features
65
+ - ❌ Forgetting to bump version in `package.json`
66
+ - ❌ Publishing to npm before pushing to GitHub
67
+ - ❌ Not testing double-apply idempotency
68
+ - ❌ Using wrong branch name (`master` vs `main`)
69
+ - ❌ Wrong publisher ID in `package.json` for Marketplace
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "antigravity-autopilot",
3
3
  "displayName": "Antigravity AutoPilot",
4
4
  "description": "Enables autopilot mode for Antigravity: automatically executes all tool calls and terminal commands without manual confirmation. Patches the runtime JS bundle to inject auto-accept logic whenever the 'Always Proceed' policy is active — regex-based and version-agnostic.",
5
- "version": "1.4.6",
5
+ "version": "1.4.7",
6
6
  "license": "MIT",
7
7
  "publisher": "nguyenhx2",
8
8
  "bin": {
@@ -122,5 +122,8 @@
122
122
  }
123
123
  }
124
124
  }
125
+ },
126
+ "dependencies": {
127
+ "antigravity-autopilot": "^1.4.6"
125
128
  }
126
129
  }