diff --git a/KNOWN_ISSUES.md b/KNOWN_ISSUES.md index 95cdd6f..207ccd9 100644 --- a/KNOWN_ISSUES.md +++ b/KNOWN_ISSUES.md @@ -46,13 +46,13 @@ The `MitmConfig.modify_requests` flag exists and is plumbed through, but no actu ## 🟢 Low -### 5. Wrapper Script Fallback Paths May Be Stale +### ~~5. Wrapper Script Fallback Paths May Be Stale~~ ✅ FIXED **File:** `scripts/mitm-wrapper.sh` — `LS_FALLBACK_DIRS` -The fallback glob patterns (e.g., `~/.cursor/extensions/antigravity.antigravity-*/...`) assume a specific extension naming convention. These are only used when no running LS process is found via `/proc` scanning (Method 1), which is the primary and robust discovery mechanism. +~~Stale `.cursor`, `.vscode`, `.antigravity` glob patterns.~~ -**Impact:** Only affects `install` when the LS isn't running. Low priority. +**Fixed:** Replaced with actual Antigravity install paths (`/usr/share/antigravity/`, `/opt/Antigravity/`, `~/.local/share/antigravity/`). Primary /proc-based discovery is unaffected. --- @@ -70,43 +70,13 @@ The MITM module has unit tests for protobuf decoding and intercept parsing, but ## 🔍 Investigation -### 7. LS Exposes Credit/Quota Data via `GetUserStatus` +### ~~7. LS Exposes Credit/Quota Data via `GetUserStatus`~~ ✅ IMPLEMENTED -**Confirmed via live probing.** The LS's `GetUserStatus` RPC already returns structured cost/quota data: +**File:** `src/quota.rs` -```json -"planStatus": { - "planInfo": { - "planName": "Pro", - "monthlyPromptCredits": 50000, - "monthlyFlowCredits": 150000, - "monthlyFlexCreditPurchaseAmount": 25000, - "canBuyMoreCredits": true - }, - "availablePromptCredits": 500, - "availableFlowCredits": 100 -} -``` +~~Investigation item.~~ -Each model also includes **per-model quota info**: - -```json -"quotaInfo": { - "remainingFraction": 0.2, - "resetTime": "2026-02-14T07:41:37Z" -} -``` - -**Key findings:** - -- `GetUserStatus` is the single source for credit/quota data (exposed via `LanguageServerService`) -- `SeatManagementService` methods (`GetPlanStatus`, `GetTeamCreditEntries`, `GetCascadeAnalytics`, `GetUserSubscription`) are **not routed through the LS** — they're backend-only -- `PredictionService/RetrieveUserQuota` is also backend-only (not proxied by LS) -- `GetUserAnalyticsSummary` returns empty `{}` (may not be implemented or requires different context) -- `GetModelStatuses` returns empty `{}` (separate from the model configs in `GetUserStatus`) -- `userTier` field shows subscription level: `{"id": "g1-ultra-tier", "name": "Google AI Ultra"}` - -**Potential use:** We could poll `GetUserStatus` periodically and expose `availablePromptCredits`, `availableFlowCredits`, and per-model `remainingFraction` via the `/v1/usage` endpoint — giving users real-time credit burn visibility without needing MITM token counting. +**Implemented:** The `QuotaStore` polls `GetUserStatus` every 60s and exposes credit/quota data via `GET /v1/quota`. Shows plan info, prompt/flow credit balances, per-model remaining fraction, and reset timers. --- diff --git a/scripts/mitm-wrapper.sh b/scripts/mitm-wrapper.sh index e158ffe..4dc4276 100755 --- a/scripts/mitm-wrapper.sh +++ b/scripts/mitm-wrapper.sh @@ -33,10 +33,8 @@ CA_PATH="${REAL_HOME}/.config/antigravity-proxy/mitm-ca.pem" # Hardcoded paths are only used as a fallback if no LS process is running. LS_FALLBACK_DIRS=( "/usr/share/antigravity/resources/app/extensions/antigravity/bin" - "${REAL_HOME}/.antigravity/extensions/antigravity.antigravity-*/dist/bundled/language-server/bin" - "${REAL_HOME}/.cursor/extensions/antigravity.antigravity-*/dist/bundled/language-server/bin" - "${REAL_HOME}/.vscode/extensions/antigravity.antigravity-*/dist/bundled/language-server/bin" - "/opt/antigravity/language-server/bin" + "/opt/Antigravity/resources/app/extensions/antigravity/bin" + "${REAL_HOME}/.local/share/antigravity/resources/app/extensions/antigravity/bin" ) BACKUP_SUFFIX=".real"