diff --git a/GEMINI.md b/GEMINI.md index d225b1a..bf121fa 100644 --- a/GEMINI.md +++ b/GEMINI.md @@ -139,7 +139,7 @@ RUST_LOG=info ./target/release/antigravity-proxy # The LS has a protobuf field `detect_and_use_proxy` that defaults to UNSPECIFIED, # which means it ignores HTTPS_PROXY for LLM API calls. This patch sets it to ENABLED (1). # Must be re-applied after every Antigravity update. -sudo sed -i 's/detectAndUseProxy=pe.UNSPECIFIED/detectAndUseProxy=1/' \ +sudo sed -i -E 's/detectAndUseProxy=[^,;)]+/detectAndUseProxy=1/g' \ /usr/share/antigravity/resources/app/extensions/antigravity/dist/extension.js # 3. Install wrapper (patches LS binary to route through MITM) diff --git a/KNOWN_ISSUES.md b/KNOWN_ISSUES.md index de78198..229431b 100644 --- a/KNOWN_ISSUES.md +++ b/KNOWN_ISSUES.md @@ -150,13 +150,13 @@ When running a standalone LS instance (outside of Antigravity), cascades start b ## Medium -### 10. Extension Patch Fragility +### ~~10. Extension Patch Fragility~~ ✅ FIXED -**File:** `scripts/mitm-wrapper.sh`, GEMINI.md +**File:** GEMINI.md, `docs/mitm-interception-status.md` -The `sed` patch that sets `detectAndUseProxy=1` in `extension.js` must be **re-applied after every Antigravity update**. The search pattern (`detectAndUseProxy=pe.UNSPECIFIED`) is brittle — if the minified variable name changes from `pe` to something else, the patch silently fails. +~~The `sed` patch that sets `detectAndUseProxy=1` in `extension.js` must be **re-applied after every Antigravity update**. The search pattern (`detectAndUseProxy=pe.UNSPECIFIED`) is brittle — if the minified variable name changes from `pe` to something else, the patch silently fails.~~ -**Fix:** Use a regex-based patch (`detectAndUseProxy=[^;]*` → `detectAndUseProxy=1`) or patch via AST manipulation. Add a post-update hook or version check to warn when the patch is stale. +**Fixed:** Updated sed to use extended regex `s/detectAndUseProxy=[^,;)]+/detectAndUseProxy=1/g` which matches any value assignment regardless of minified variable names. Still requires re-applying after updates, but the pattern is now resilient to bundler name changes. --- diff --git a/docs/mitm-interception-status.md b/docs/mitm-interception-status.md index 79b72cc..dde1789 100644 --- a/docs/mitm-interception-status.md +++ b/docs/mitm-interception-status.md @@ -31,7 +31,7 @@ ignores proxy env vars. **Patch applied:** ```bash -sudo sed -i 's/detectAndUseProxy=pe.UNSPECIFIED/detectAndUseProxy=1/' \ +sudo sed -i -E 's/detectAndUseProxy=[^,;)]+/detectAndUseProxy=1/g' \ /usr/share/antigravity/resources/app/extensions/antigravity/dist/extension.js ```