antigravity-autopilot 1.4.11 → 1.4.12
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/README.md +1 -1
- package/cli.js +52 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -105,7 +105,7 @@ Install the extension directly into Antigravity for a UI-based experience (sideb
|
|
|
105
105
|
|
|
106
106
|
```bash
|
|
107
107
|
# Download .vsix from GitHub Releases, then:
|
|
108
|
-
antigravity --install-extension antigravity-autopilot-1.4.
|
|
108
|
+
antigravity --install-extension antigravity-autopilot-1.4.12.vsix
|
|
109
109
|
```
|
|
110
110
|
|
|
111
111
|
**Extension features:**
|
package/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* Antigravity AutoPilot — CLI v1.4.
|
|
4
|
+
* Antigravity AutoPilot — CLI v1.4.12
|
|
5
5
|
* ====================================
|
|
6
6
|
* npx antigravity-autopilot Apply all patches
|
|
7
7
|
* npx antigravity-autopilot --only terminal Patch terminal only
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
const fs = require('fs');
|
|
18
18
|
const path = require('path');
|
|
19
19
|
const os = require('os');
|
|
20
|
+
const crypto = require('crypto');
|
|
20
21
|
|
|
21
22
|
// ─── ANSI Colors (auto-disable when not a TTY) ───────────────────────────────
|
|
22
23
|
|
|
@@ -195,6 +196,54 @@ function getVersion(basePath) {
|
|
|
195
196
|
} catch { return 'unknown'; }
|
|
196
197
|
}
|
|
197
198
|
|
|
199
|
+
// ─── Checksum Update ─────────────────────────────────────────────────────────
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Map from getTargetFiles label to the checksum key used in product.json.
|
|
203
|
+
* product.json stores checksums relative to resources/app/out/.
|
|
204
|
+
*/
|
|
205
|
+
const CHECKSUM_KEY_MAP = {
|
|
206
|
+
workbench: 'vs/workbench/workbench.desktop.main.js',
|
|
207
|
+
jetskiAgent: 'jetskiAgent/main.js',
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Recalculates SHA-256 Base64 checksums for the target files and writes
|
|
212
|
+
* them back into product.json so the "jes" integrity service no longer
|
|
213
|
+
* flags the installation as corrupt.
|
|
214
|
+
*/
|
|
215
|
+
function updateProductChecksums(basePath, files) {
|
|
216
|
+
const productPath = path.join(basePath, 'resources', 'app', 'product.json');
|
|
217
|
+
try {
|
|
218
|
+
const product = JSON.parse(fs.readFileSync(productPath, 'utf8'));
|
|
219
|
+
if (!product.checksums || typeof product.checksums !== 'object') {
|
|
220
|
+
row('⊘', c.gray, '[checksums]', 'No checksums object in product.json — skipping');
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
let updated = 0;
|
|
225
|
+
for (const { filePath, label } of files) {
|
|
226
|
+
const key = CHECKSUM_KEY_MAP[label];
|
|
227
|
+
if (!key || !product.checksums.hasOwnProperty(key)) continue;
|
|
228
|
+
if (!fs.existsSync(filePath)) continue;
|
|
229
|
+
|
|
230
|
+
const content = fs.readFileSync(filePath);
|
|
231
|
+
const hash = crypto.createHash('sha256').update(content).digest('base64');
|
|
232
|
+
product.checksums[key] = hash;
|
|
233
|
+
updated++;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
if (updated > 0) {
|
|
237
|
+
fs.writeFileSync(productPath, JSON.stringify(product, null, '\t'), 'utf8');
|
|
238
|
+
row('✔', c.green, '[checksums]', `Updated ${updated} checksum(s) in product.json`);
|
|
239
|
+
} else {
|
|
240
|
+
row('⊘', c.gray, '[checksums]', 'No matching checksum keys found — skipping');
|
|
241
|
+
}
|
|
242
|
+
} catch (err) {
|
|
243
|
+
row('⊘', c.yellow, '[checksums]', `Could not update checksums: ${err.message}`);
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
198
247
|
// ─── Analyze: Terminal Auto-Execute ───────────────────────────────────────────
|
|
199
248
|
|
|
200
249
|
function analyzeTerminal(content) {
|
|
@@ -527,6 +576,7 @@ function main() {
|
|
|
527
576
|
section('Reverting Patch', '↩');
|
|
528
577
|
console.log('');
|
|
529
578
|
files.forEach(f => revertFile(f.filePath, f.label));
|
|
579
|
+
updateProductChecksums(basePath, files);
|
|
530
580
|
console.log('');
|
|
531
581
|
console.log(' ' + c.green + c.bold + '✔ Restored!' + c.reset + c.white + ' Restart Antigravity to apply changes.' + c.reset);
|
|
532
582
|
console.log('');
|
|
@@ -539,6 +589,7 @@ function main() {
|
|
|
539
589
|
section(`Applying AutoPilot Patch (${typeLabel})`, '⚡');
|
|
540
590
|
console.log('');
|
|
541
591
|
const ok = files.every(f => patchFile(f.filePath, f.label, onlyTypes));
|
|
592
|
+
updateProductChecksums(basePath, files);
|
|
542
593
|
console.log('');
|
|
543
594
|
if (ok) {
|
|
544
595
|
console.log(' +' + repeat('-', W - 2) + '+');
|
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.
|
|
5
|
+
"version": "1.4.12",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"publisher": "nguyenhx2",
|
|
8
8
|
"bin": {
|