pi-antigravity-rotator 1.3.9 → 1.4.5
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/CHANGELOG.md +35 -0
- package/README.md +12 -10
- package/package.json +1 -1
- package/src/dashboard.ts +672 -9
- package/src/proxy.ts +157 -29
- package/src/rotator.ts +290 -20
- package/src/types.ts +59 -6
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,41 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [1.4.5] - 2026-04-28
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- **Extended Token Views**: Added `2h`, `4h`, `8h`, and `12h` options to the Token Usage chart. The backend now retains up to 12 hours of minute-level resolution for accurate high-fidelity zooming.
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
- **Activity Heatmap Scaling**: Expanded the heatmap to cover the last 60 days. The grid is now responsive, taking up the full width of the screen without distorting cell proportions, and the Y-axis now orders hours naturally from 00 to 23.
|
|
12
|
+
- **Timezone Alignment**: X-axis labels on the Token Usage chart and the Heatmap now correctly reflect the browser's local time instead of UTC.
|
|
13
|
+
|
|
14
|
+
## [1.4.1] - 2026-04-28
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
- **Export Data**: Added `CSV` and `JSON` export buttons to the Token Usage panel on the dashboard to easily download token metrics for external reporting.
|
|
18
|
+
|
|
19
|
+
## [1.4.0] - 2026-04-28
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
- **Savings Estimation**: Dashboard now calculates and displays estimated USD savings based on tracked token usage compared to paid API pricing.
|
|
23
|
+
- **Latency Tracking**: Proxy measures Time-to-First-Byte (TTFB) and Total duration per request. Dashboard displays p50/p95 latency stats by model.
|
|
24
|
+
- **Quota Forecast**: Dashboard predicts when each model's quota will run out based on real-time requests/hour burn rate.
|
|
25
|
+
- **Live Dashboard (SSE)**: Dashboard now updates in real-time via Server-Sent Events, removing the need for polling or manual refreshes.
|
|
26
|
+
- **Live Request Log**: Searchable, real-time mini-log in the dashboard showing the last 200 requests (Account, Model, Status, TTFB, Total duration, Tokens).
|
|
27
|
+
- **Activity Heatmap**: GitHub-style contribution grid displaying request intensity per hour across the last 7 days.
|
|
28
|
+
- **Enhanced Logging**: Added explicit `START` and `END` proxy logs with unique request IDs for unambiguous tracing of 503s and 429s.
|
|
29
|
+
|
|
30
|
+
### Changed
|
|
31
|
+
- Configurable **Antigravity Version**: Extracted hardcoded `QUOTA_USER_AGENT` into an environment variable to prevent "This version of Antigravity is no longer supported" API errors. Now uses `1.107.0` by default.
|
|
32
|
+
- Per-model cooldown granularity: Accounts can now serve fallback models (e.g. Gemini) even if their primary model (e.g. Claude) is exhausted.
|
|
33
|
+
- **Token Tracking Architecture**: Refactored token usage into a tiered time-series (minutes/hours/days/months) with rolling sliding windows to avoid data drops at calendar boundaries.
|
|
34
|
+
|
|
35
|
+
### Fixed
|
|
36
|
+
- Fixed in-flight request leak where accounts could get stuck in a "busy" state indefinitely due to deprecated `req.aborted` handlers in Node 24.
|
|
37
|
+
- Fixed rate-limit logic bypassing model-specific cooldown checks after a 429 was hit.
|
|
38
|
+
|
|
39
|
+
|
|
5
40
|
## [1.3.9] - 2026-04-27
|
|
6
41
|
|
|
7
42
|
### Fixed
|
package/README.md
CHANGED
|
@@ -94,15 +94,14 @@ After starting the proxy, open `http://localhost:51200/dashboard` or `http://<yo
|
|
|
94
94
|
|
|
95
95
|
The dashboard shows:
|
|
96
96
|
|
|
97
|
-
- **
|
|
98
|
-
- **
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
- Re-enable button for disabled accounts
|
|
97
|
+
- **Top Status & Controls** -- Real-time routing state, uptime, requests, and PII masking toggle.
|
|
98
|
+
- **Token Usage & Savings** -- Interactive chart (`1h`, `2h`, `4h`, `8h`, `12h`, `1d`, `7d`, `1m`) showing token consumption by model, with estimated USD savings and `CSV`/`JSON` export options.
|
|
99
|
+
- **Activity Heatmap** -- 60-day responsive GitHub-style contribution grid showing request intensity hour by hour.
|
|
100
|
+
- **Latency (p50/p95)** -- Real-time median and 95th percentile tracking for Time-to-First-Byte (TTFB) and Total Duration per model.
|
|
101
|
+
- **Quota Forecast** -- Predictive modeling showing when each model's quota will run out based on the current requests/hour burn rate.
|
|
102
|
+
- **Searchable Request Log** -- Live feed of the last 200 requests with exact timestamps, models, masked accounts, status codes, and latency.
|
|
103
|
+
- **Account Cards** -- Sorted by total quota. Shows status (`active`, `ready`, `cooldown`, `flagged`, `disabled`), served models, quota bars with timers, and precise error messages.
|
|
104
|
+
- **Operator Panels** -- "Attention Needed" summaries for quarantined accounts and a real-time event feed of rotator actions.
|
|
106
105
|
|
|
107
106
|

|
|
108
107
|
|
|
@@ -219,8 +218,11 @@ The dashboard is intended to replace day-to-day `journalctl` digging for normal
|
|
|
219
218
|
Config files (`accounts.json`, `state.json`) are stored in `~/.pi-antigravity-rotator/` by default. Override with:
|
|
220
219
|
|
|
221
220
|
```bash
|
|
222
|
-
# Environment
|
|
221
|
+
# Environment variables
|
|
223
222
|
export PI_ROTATOR_DIR=/path/to/config
|
|
223
|
+
export PI_ROTATOR_QUOTA_USER_AGENT="antigravity/1.107.0 darwin/arm64"
|
|
224
|
+
# Optional override for Antigravity UA version used by quota fetches
|
|
225
|
+
export PI_AI_ANTIGRAVITY_VERSION=1.107.0
|
|
224
226
|
|
|
225
227
|
# Or CLI flag
|
|
226
228
|
pi-antigravity-rotator start --config-dir /path/to/config
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-antigravity-rotator",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.5",
|
|
4
4
|
"description": "Multi-account rotation proxy for Google Antigravity with per-model routing, real-time quota tracking, and infringement detection",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|