antigravity-autopilot 1.3.0 → 1.4.0
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/LICENSE +1 -1
- package/README.md +12 -3
- package/extension.js +43 -2
- package/package.json +1 -1
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2026 Nguyen Hoang (nguyenhx2)
|
|
3
|
+
Copyright (c) 2026 Nguyen Hoang (nguyenhx2 or Brian)
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
package/README.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Antigravity AutoPilot
|
|
2
2
|
|
|
3
|
+
<p align="center">
|
|
4
|
+
<img src="icon.png" width="128" alt="Antigravity AutoPilot Logo">
|
|
5
|
+
</p>
|
|
6
|
+
|
|
3
7
|
> Automatically execute all tool calls and terminal commands in Antigravity — no manual confirmation needed.
|
|
4
8
|
|
|
5
9
|
[](https://www.npmjs.com/package/antigravity-autopilot)
|
|
@@ -19,6 +23,7 @@ Antigravity has an **"Always Proceed"** terminal execution policy, but due to a
|
|
|
19
23
|
- ✅ Reversible — restore originals anytime with `--revert`
|
|
20
24
|
- ✅ Available as VS Code Extension **and** CLI (`npx`)
|
|
21
25
|
- 🛡️ 54+ built-in dangerous command presets (Linux/macOS/Windows)
|
|
26
|
+
- 🔘 On/Off toggle for Command Blocking directly from sidebar
|
|
22
27
|
- ⚙️ Fully customizable preset management with Reset Defaults
|
|
23
28
|
|
|
24
29
|
---
|
|
@@ -52,7 +57,7 @@ Install the extension directly into Antigravity for a UI-based experience (sideb
|
|
|
52
57
|
|
|
53
58
|
```bash
|
|
54
59
|
# Download .vsix from GitHub Releases, then:
|
|
55
|
-
antigravity --install-extension antigravity-autopilot-1.
|
|
60
|
+
antigravity --install-extension antigravity-autopilot-1.4.0.vsix
|
|
56
61
|
```
|
|
57
62
|
|
|
58
63
|
**Extension features:**
|
|
@@ -61,6 +66,8 @@ antigravity --install-extension antigravity-autopilot-1.3.0.vsix
|
|
|
61
66
|
- ⌨️ Keyboard shortcut: `Ctrl+Shift+F12`
|
|
62
67
|
- ⚙️ `applyOnStartup` setting for fully automatic operation
|
|
63
68
|
- 🔘 `enabledOnStartup` — toggle AutoPilot active/suspended on launch
|
|
69
|
+
- 🛡️ **Command Blocking On/Off** — toggle dangerous command blocking directly from the sidebar UI
|
|
70
|
+
- 📋 **Preset Management** — view, remove, and reset 54+ built-in dangerous command presets
|
|
64
71
|
|
|
65
72
|
---
|
|
66
73
|
|
|
@@ -74,12 +81,14 @@ Built-in protection against destructive commands. **54+ preset patterns** coveri
|
|
|
74
81
|
| **macOS** | `diskutil eraseDisk`, `csrutil disable` |
|
|
75
82
|
| **Windows** | `format C:`, `Remove-Item -Recurse C:\`, `bcdedit /deletevalue`, `IEX download-and-exec` |
|
|
76
83
|
|
|
77
|
-
###
|
|
84
|
+
### Sidebar Controls
|
|
78
85
|
|
|
86
|
+
- 🔘 **On/Off Toggle** — enable or disable command blocking with a single switch
|
|
79
87
|
- 📋 **View all presets** — full list of blocked commands with OS badges (LNX/MAC/WIN)
|
|
80
88
|
- ✕ **Remove individual presets** — click the ✕ button to exclude a preset
|
|
81
89
|
- 🔄 **Reset Defaults** — restore all removed presets with one click
|
|
82
90
|
- 📊 **Active count** — always see how many presets are active
|
|
91
|
+
- 🔅 **Visual feedback** — presets section dims when blocking is disabled
|
|
83
92
|
|
|
84
93
|
### Custom Patterns
|
|
85
94
|
|
|
@@ -130,4 +139,4 @@ Variable names are resolved via regex at runtime, making the patch resilient to
|
|
|
130
139
|
|
|
131
140
|
## License
|
|
132
141
|
|
|
133
|
-
[MIT](LICENSE)
|
|
142
|
+
[MIT](LICENSE) — Copyright (c) 2026 Nguyen Hoang (nguyenhx2 or Brian)
|
package/extension.js
CHANGED
|
@@ -334,6 +334,15 @@ class AntigravityPanelProvider {
|
|
|
334
334
|
);
|
|
335
335
|
} else if (msg.command === 'openSettings') {
|
|
336
336
|
vscode.commands.executeCommand('workbench.action.openSettings', 'antigravityAutoAccept');
|
|
337
|
+
} else if (msg.command === 'toggleCommandBlocking') {
|
|
338
|
+
const cfg = vscode.workspace.getConfiguration('antigravityAutoAccept');
|
|
339
|
+
const current = cfg.get('dangerousCommandBlocking.enabled', true);
|
|
340
|
+
const next = !current;
|
|
341
|
+
await cfg.update('dangerousCommandBlocking.enabled', next, vscode.ConfigurationTarget.Global);
|
|
342
|
+
this.sendBlockingEnabled(next);
|
|
343
|
+
vscode.window.showInformationMessage(
|
|
344
|
+
next ? '🛡️ Command Blocking enabled' : '⚠️ Command Blocking disabled',
|
|
345
|
+
);
|
|
337
346
|
} else if (msg.command === 'removePattern') {
|
|
338
347
|
// Remove a built-in pattern by ID
|
|
339
348
|
const removed = getRemovedPatternIds();
|
|
@@ -352,6 +361,9 @@ class AntigravityPanelProvider {
|
|
|
352
361
|
// Initial load
|
|
353
362
|
refreshStatus();
|
|
354
363
|
this.sendEnabled(autoPilotEnabled);
|
|
364
|
+
this.sendBlockingEnabled(
|
|
365
|
+
vscode.workspace.getConfiguration('antigravityAutoAccept').get('dangerousCommandBlocking.enabled', true),
|
|
366
|
+
);
|
|
355
367
|
this.sendPatterns();
|
|
356
368
|
}
|
|
357
369
|
|
|
@@ -377,6 +389,12 @@ class AntigravityPanelProvider {
|
|
|
377
389
|
this._view.webview.postMessage({ command: 'setEnabled', enabled });
|
|
378
390
|
}
|
|
379
391
|
|
|
392
|
+
/** @param {boolean} enabled */
|
|
393
|
+
sendBlockingEnabled(enabled) {
|
|
394
|
+
if (!this._view) return;
|
|
395
|
+
this._view.webview.postMessage({ command: 'setBlockingEnabled', enabled });
|
|
396
|
+
}
|
|
397
|
+
|
|
380
398
|
/** Send current pattern list to the webview */
|
|
381
399
|
sendPatterns() {
|
|
382
400
|
if (!this._view) return;
|
|
@@ -603,6 +621,18 @@ class AntigravityPanelProvider {
|
|
|
603
621
|
|
|
604
622
|
<div class="path-box" id="pathBox" style="display:none"></div>
|
|
605
623
|
|
|
624
|
+
<!-- Command Blocking toggle -->
|
|
625
|
+
<div class="toggle-row" id="blockingToggleRow">
|
|
626
|
+
<div>
|
|
627
|
+
<div class="toggle-label">🛡️ Command Blocking</div>
|
|
628
|
+
<div class="toggle-sub" id="blockingToggleSub">Active — blocking dangerous commands</div>
|
|
629
|
+
</div>
|
|
630
|
+
<label class="switch" title="Toggle Command Blocking on/off">
|
|
631
|
+
<input type="checkbox" id="blockingToggleCheck" checked onchange="send('toggleCommandBlocking')">
|
|
632
|
+
<span class="slider"></span>
|
|
633
|
+
</label>
|
|
634
|
+
</div>
|
|
635
|
+
|
|
606
636
|
<!-- Dangerous Command Blocking section -->
|
|
607
637
|
<div class="section" id="blockSection">
|
|
608
638
|
<div class="section-header" id="blockHeader">
|
|
@@ -629,8 +659,8 @@ class AntigravityPanelProvider {
|
|
|
629
659
|
const vscode = acquireVsCodeApi();
|
|
630
660
|
|
|
631
661
|
function send(cmd, extra) {
|
|
632
|
-
if (cmd !== 'openSettings' && cmd !== 'toggleEnabled' && cmd !== '
|
|
633
|
-
&& cmd !== 'removePattern' && cmd !== 'resetPatterns') {
|
|
662
|
+
if (cmd !== 'openSettings' && cmd !== 'toggleEnabled' && cmd !== 'toggleCommandBlocking'
|
|
663
|
+
&& cmd !== 'refresh' && cmd !== 'removePattern' && cmd !== 'resetPatterns') {
|
|
634
664
|
document.getElementById('btnApply').disabled = true;
|
|
635
665
|
document.getElementById('btnRevert').disabled = true;
|
|
636
666
|
}
|
|
@@ -710,6 +740,17 @@ class AntigravityPanelProvider {
|
|
|
710
740
|
: 'Suspended — commands require confirmation';
|
|
711
741
|
}
|
|
712
742
|
|
|
743
|
+
if (data.command === 'setBlockingEnabled') {
|
|
744
|
+
const chk = document.getElementById('blockingToggleCheck');
|
|
745
|
+
chk.checked = data.enabled;
|
|
746
|
+
document.getElementById('blockingToggleSub').textContent = data.enabled
|
|
747
|
+
? 'Active — blocking dangerous commands'
|
|
748
|
+
: 'Disabled — commands not blocked';
|
|
749
|
+
// Dim the presets section when blocking is off
|
|
750
|
+
const section = document.getElementById('blockSection');
|
|
751
|
+
if (section) section.style.opacity = data.enabled ? '1' : '0.4';
|
|
752
|
+
}
|
|
753
|
+
|
|
713
754
|
if (data.command === 'patterns') {
|
|
714
755
|
renderPatterns(data.patterns, data.totalBuiltin);
|
|
715
756
|
}
|
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.
|
|
5
|
+
"version": "1.4.0",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"publisher": "nguyen-hoang",
|
|
8
8
|
"bin": {
|