antigravity-autopilot 1.4.9 → 1.4.11
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/cli.js +4 -4
- package/package.json +1 -1
- package/patcher.js +4 -4
package/cli.js
CHANGED
|
@@ -237,10 +237,10 @@ function analyzeTerminal(content) {
|
|
|
237
237
|
}
|
|
238
238
|
if (!useEffectAlias) return null;
|
|
239
239
|
|
|
240
|
-
const patchCode = `_aep=${useEffectAlias}(()=>{${policyVar}===${enumAlias}.EAGER&&!${secureVar}&&${confirmFn}(!0)},[])
|
|
240
|
+
const patchCode = `_aep=${useEffectAlias}(()=>{${policyVar}===${enumAlias}.EAGER&&!${secureVar}&&${confirmFn}(!0)},[])`;
|
|
241
241
|
return {
|
|
242
242
|
target: fullMatch,
|
|
243
|
-
replacement:
|
|
243
|
+
replacement: fullMatch + ',' + patchCode,
|
|
244
244
|
patchMarker: `_aep=${useEffectAlias}(()=>{${policyVar}===${enumAlias}.EAGER`,
|
|
245
245
|
};
|
|
246
246
|
}
|
|
@@ -280,7 +280,7 @@ function analyzeBrowser(content) {
|
|
|
280
280
|
}
|
|
281
281
|
if (!useEffectAlias) return null;
|
|
282
282
|
|
|
283
|
-
const patchCode = `_abp=${useEffectAlias}(()=>{${confirmVar}()},[${confirmVar}])
|
|
283
|
+
const patchCode = `_abp=${useEffectAlias}(()=>{${confirmVar}()},[${confirmVar}])`;
|
|
284
284
|
return {
|
|
285
285
|
target: fullMatch,
|
|
286
286
|
replacement: fullMatch + ',' + patchCode,
|
|
@@ -329,7 +329,7 @@ function analyzeFile_(content) {
|
|
|
329
329
|
}
|
|
330
330
|
if (!useEffectAlias) return null;
|
|
331
331
|
|
|
332
|
-
const patchCode = `_afp=${useEffectAlias}(()=>{${senderVar}(!0,${scopeEnum}.CONVERSATION)},[${senderVar}])
|
|
332
|
+
const patchCode = `_afp=${useEffectAlias}(()=>{${senderVar}(!0,${scopeEnum}.CONVERSATION)},[${senderVar}])`;
|
|
333
333
|
return {
|
|
334
334
|
target: fullMatch,
|
|
335
335
|
replacement: fullMatch + ',' + patchCode,
|
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.11",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"publisher": "nguyenhx2",
|
|
8
8
|
"bin": {
|
package/patcher.js
CHANGED
|
@@ -179,11 +179,11 @@ function analyzeFile(content, label) {
|
|
|
179
179
|
log(` useEffect=${useEffectAlias} (confidence: ${maxCount} hits)`);
|
|
180
180
|
|
|
181
181
|
// 5. Build patch — exact same logic as original
|
|
182
|
-
const patchCode = `_aep=${useEffectAlias}(()=>{${policyVar}===${enumAlias}.EAGER&&!${secureVar}&&${confirmFn}(!0)},[])
|
|
182
|
+
const patchCode = `_aep=${useEffectAlias}(()=>{${policyVar}===${enumAlias}.EAGER&&!${secureVar}&&${confirmFn}(!0)},[])`;
|
|
183
183
|
|
|
184
184
|
return {
|
|
185
185
|
target: fullMatch,
|
|
186
|
-
replacement:
|
|
186
|
+
replacement: fullMatch + ',' + patchCode,
|
|
187
187
|
patchMarker: `_aep=${useEffectAlias}(()=>{${policyVar}===${enumAlias}.EAGER`,
|
|
188
188
|
label
|
|
189
189
|
};
|
|
@@ -250,7 +250,7 @@ function analyzeBrowserAction(content, label) {
|
|
|
250
250
|
log(` useEffect=${useEffectAlias} (confidence: ${maxCount} hits)`);
|
|
251
251
|
|
|
252
252
|
// 3. Build patch — auto-call confirmVar() on mount
|
|
253
|
-
const patchCode = `_abp=${useEffectAlias}(()=>{${confirmVar}()},[${confirmVar}])
|
|
253
|
+
const patchCode = `_abp=${useEffectAlias}(()=>{${confirmVar}()},[${confirmVar}])`;
|
|
254
254
|
|
|
255
255
|
return {
|
|
256
256
|
target: fullMatch,
|
|
@@ -333,7 +333,7 @@ function analyzeFilePermission(content, label) {
|
|
|
333
333
|
log(` useEffect=${useEffectAlias} (confidence: ${maxCount} hits)`);
|
|
334
334
|
|
|
335
335
|
// 4. Build patch — auto-call senderVar(!0, scopeEnum.CONVERSATION) on mount
|
|
336
|
-
const patchCode = `_afp=${useEffectAlias}(()=>{${senderVar}(!0,${scopeEnum}.CONVERSATION)},[${senderVar}])
|
|
336
|
+
const patchCode = `_afp=${useEffectAlias}(()=>{${senderVar}(!0,${scopeEnum}.CONVERSATION)},[${senderVar}])`;
|
|
337
337
|
|
|
338
338
|
return {
|
|
339
339
|
target: fullMatch,
|