pi-provider-antigravity 0.3.0 → 0.4.0
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 +75 -2
- package/dist/index.js +742 -251
- package/dist/index.js.map +4 -4
- package/package.json +6 -4
package/README.md
CHANGED
|
@@ -14,7 +14,8 @@ Use Google Antigravity models directly in [Pi](https://pi.dev).
|
|
|
14
14
|
synthesized from the live catalog and cached for offline startup.
|
|
15
15
|
Newly released models are usable immediately without waiting for an extension update.
|
|
16
16
|
- **OAuth with auto-refresh**: log in once via `/login antigravity`; tokens refresh silently.
|
|
17
|
-
- **Quota visibility**: 5-hour and weekly remaining quota per model pool, with reset times
|
|
17
|
+
- **Quota visibility**: 5-hour and weekly remaining quota per model pool, with reset times
|
|
18
|
+
and a live footer slot. See [Quota footer](#quota-footer).
|
|
18
19
|
|
|
19
20
|
## Requirements
|
|
20
21
|
|
|
@@ -65,8 +66,9 @@ Extension subcommands (`/antigravity ...`):
|
|
|
65
66
|
| Subcommand | Description |
|
|
66
67
|
|---|---|
|
|
67
68
|
| `usage` | Check 5-hour and weekly quota limits and reset times |
|
|
68
|
-
| `models` | View available models and remaining fraction |
|
|
69
|
+
| `models` | View available models and remaining fraction (alias: `model`) |
|
|
69
70
|
| `refresh` | Refresh dynamic model catalog from Antigravity |
|
|
71
|
+
| `settings` | Pick provider settings, Enter cycles values (alias: `setting`) |
|
|
70
72
|
| `login` | Shortcut: fills in `/login antigravity` for you |
|
|
71
73
|
|
|
72
74
|
Related Pi builtins:
|
|
@@ -76,6 +78,77 @@ Related Pi builtins:
|
|
|
76
78
|
| `/login antigravity` | Authenticate with Google via OAuth |
|
|
77
79
|
| `/model antigravity/<id>` | Select a model from the live catalog |
|
|
78
80
|
|
|
81
|
+
## Quota footer
|
|
82
|
+
|
|
83
|
+
Quota tracking right in Pi's footer:
|
|
84
|
+
|
|
85
|
+
```text
|
|
86
|
+
5h 22% (3h 0m) · Wk 87% (4d 4h)
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Each segment displays the window name (`5h` or `Wk`), remaining capacity percentage, and time left until reset.
|
|
90
|
+
|
|
91
|
+
### Visual Warnings
|
|
92
|
+
|
|
93
|
+
Remaining percentages are automatically colorized to keep depletion visible without clutter:
|
|
94
|
+
- **Normal** (> 30%): Default terminal color
|
|
95
|
+
- **Low** (≤ 30%): Yellow
|
|
96
|
+
- **Critical** (≤ 10%): Red
|
|
97
|
+
|
|
98
|
+
In `both` mode, each window carries its own color based on its remaining percentage.
|
|
99
|
+
|
|
100
|
+
### Display Modes
|
|
101
|
+
|
|
102
|
+
Switch between display modes at any time using `/antigravity settings`:
|
|
103
|
+
|
|
104
|
+
| Mode | Example | Behavior |
|
|
105
|
+
|---|---|---|
|
|
106
|
+
| `off` *(default)* | *(hidden)* | Slot stays empty; zero background quota requests |
|
|
107
|
+
| `single` | `Wk 6% (2d 14h)` | Shows only the primary bottleneck window |
|
|
108
|
+
| `both` | `5h 90% (3h 54m) · Wk 6% (2d 14h)` | Shows both 5-hour and weekly windows side-by-side |
|
|
109
|
+
|
|
110
|
+
### Under the Hood
|
|
111
|
+
|
|
112
|
+
- **Model-aware pool routing**: Automatically aligns with your active model. Selecting a Gemini model displays the Gemini quota pool; switching to Claude or GPT switches to the third-party pool. When using a non-Antigravity model or no model at all, the slot cleanly disappears.
|
|
113
|
+
- **Intelligent bottleneck detection**: In `single` mode, the extension determines urgency using `min(r5h, rWk × R)` rather than a naive percentage comparison, accounting for total volume differences between the 5-hour and weekly pools. The volume multiplier `R` starts at 6.0 and automatically self-calibrates between 1.0 and 20.0 based on real usage deltas, persisting across restarts.
|
|
114
|
+
- **Battery- and network-friendly caching**: Idle sessions perform zero network requests. The slot repaints instantly from memory on turn completion, session launch, and model changes. Upstream quota queries are throttled to at most once every 5 minutes. Running `/antigravity usage` refreshes upstream data immediately.
|
|
115
|
+
|
|
116
|
+
## Configuration
|
|
117
|
+
|
|
118
|
+
You can configure extension preferences interactively via the command palette or declaratively through a configuration file.
|
|
119
|
+
|
|
120
|
+
### Interactive Settings
|
|
121
|
+
|
|
122
|
+
Run the settings command to open Pi's native cycling menu:
|
|
123
|
+
|
|
124
|
+
```text
|
|
125
|
+
/antigravity settings
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
- Press **Enter** or **Space** to cycle through option values.
|
|
129
|
+
- Press **Esc** to close.
|
|
130
|
+
- Changes are saved and applied immediately.
|
|
131
|
+
|
|
132
|
+
### File-based Configuration
|
|
133
|
+
|
|
134
|
+
Configuration is stored in `pi-provider-antigravity.json` alongside Pi's `settings.json` (resolved via `$PI_CODING_AGENT_DIR`, falling back to `~/.pi/agent/`):
|
|
135
|
+
|
|
136
|
+
```json
|
|
137
|
+
{
|
|
138
|
+
"settings": {
|
|
139
|
+
"quotaFooter": "single"
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
> **Note:** The extension may persist runtime metadata (such as quota calibration ratios) in an adjacent `"states"` block. Hand-written comments in this file are not preserved across automated updates.
|
|
145
|
+
|
|
146
|
+
### Available Settings
|
|
147
|
+
|
|
148
|
+
| Key | Values | Default | Description |
|
|
149
|
+
|---|---|---|---|
|
|
150
|
+
| `quotaFooter` | `off`, `single`, `both` | `off` | Display remaining quota in Pi's status footer. See [Quota footer](#quota-footer). |
|
|
151
|
+
|
|
79
152
|
## Disclaimer
|
|
80
153
|
|
|
81
154
|
This extension spends your Google account's Antigravity quota from a third-party
|