@herbertgao/pi-extensions 2026.9.3 → 2026.9.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.
Files changed (143) hide show
  1. package/README.md +2 -1
  2. package/THIRD_PARTY_NOTICES.md +25 -0
  3. package/node_modules/@dietrichgebert/ponytail/.qoder-plugin/plugin.json +1 -1
  4. package/node_modules/@dietrichgebert/ponytail/README.es.md +33 -2
  5. package/node_modules/@dietrichgebert/ponytail/README.ko.md +33 -2
  6. package/node_modules/@dietrichgebert/ponytail/README.md +49 -5
  7. package/node_modules/@dietrichgebert/ponytail/assets/retriever-icon.png +0 -0
  8. package/node_modules/@dietrichgebert/ponytail/assets/retriever-logo-dark.svg +4 -0
  9. package/node_modules/@dietrichgebert/ponytail/assets/retriever-logo-light.svg +4 -0
  10. package/node_modules/@dietrichgebert/ponytail/hooks/claude-codex-hooks.json +0 -3
  11. package/node_modules/@dietrichgebert/ponytail/hooks/cursor-hooks.json +17 -0
  12. package/node_modules/@dietrichgebert/ponytail/hooks/ponytail-activate.js +22 -3
  13. package/node_modules/@dietrichgebert/ponytail/hooks/ponytail-mode-tracker.js +27 -2
  14. package/node_modules/@dietrichgebert/ponytail/hooks/ponytail-runtime.js +61 -2
  15. package/node_modules/@dietrichgebert/ponytail/package.json +2 -1
  16. package/node_modules/@dietrichgebert/ponytail/scripts/cursor-hooks.js +135 -0
  17. package/node_modules/@dietrichgebert/ponytail/scripts/uninstall.js +21 -4
  18. package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/reference/index.ts +33 -15
  19. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/compact-mode.ts +3 -2
  20. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/default-mode.ts +16 -11
  21. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/mouse/interaction.ts +6 -2
  22. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/mouse/scroll.ts +23 -1
  23. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/diff/diff-renderer.ts +88 -19
  24. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/grouping.ts +12 -7
  25. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/result.ts +98 -0
  26. package/node_modules/@herbertgao/pi-cc-extensions/package.json +3 -3
  27. package/node_modules/@herbertgao/sol-pi/src/sol-pi/extensions/online-context-compact/economics.ts +4 -4
  28. package/node_modules/@herbertgao/sol-pi/src/sol-pi/extensions/online-context-compact/extension.ts +41 -1
  29. package/node_modules/@juicesharp/rpiv-ask-user-question/ask-user-question.ts +5 -1
  30. package/node_modules/@juicesharp/rpiv-ask-user-question/events.ts +5 -1
  31. package/node_modules/@juicesharp/rpiv-ask-user-question/package.json +3 -2
  32. package/node_modules/@juicesharp/rpiv-ask-user-question/tool/normalize-params.ts +56 -0
  33. package/node_modules/@juicesharp/rpiv-ask-user-question/view/components/option-list-view.ts +1 -1
  34. package/node_modules/@juicesharp/rpiv-ask-user-question/view/components/tab-bar.ts +1 -2
  35. package/node_modules/@pi-plugins/fast-mode/README.md +31 -44
  36. package/node_modules/@pi-plugins/fast-mode/dist/index.mjs +20914 -30
  37. package/node_modules/@pi-plugins/fast-mode/dist/index.mjs.map +1 -1
  38. package/node_modules/@pi-plugins/fast-mode/package.json +5 -7
  39. package/node_modules/@tifan/pi-copy-response/README.md +2 -2
  40. package/node_modules/@tifan/pi-copy-response/package.json +3 -2
  41. package/node_modules/@tifan/pi-inline-skills/README.md +2 -2
  42. package/node_modules/@tifan/pi-inline-skills/package.json +3 -2
  43. package/node_modules/@tifan/pi-mermaid-open/README.md +1 -1
  44. package/node_modules/@tifan/pi-mermaid-open/package.json +3 -2
  45. package/node_modules/@tifan/pi-preferred-thinking/package.json +3 -2
  46. package/node_modules/@tifan/pi-recap/package.json +3 -2
  47. package/node_modules/pi-antigravity/LICENSE +21 -0
  48. package/node_modules/pi-antigravity/README.md +194 -0
  49. package/node_modules/pi-antigravity/package.json +67 -0
  50. package/node_modules/pi-antigravity/src/auth/index.ts +14 -0
  51. package/node_modules/pi-antigravity/src/auth/oauth.ts +442 -0
  52. package/node_modules/pi-antigravity/src/client/client.ts +561 -0
  53. package/node_modules/pi-antigravity/src/client/index.ts +1 -0
  54. package/node_modules/pi-antigravity/src/diagnostics/diagnostics.ts +96 -0
  55. package/node_modules/pi-antigravity/src/diagnostics/index.ts +1 -0
  56. package/node_modules/pi-antigravity/src/image/image.ts +336 -0
  57. package/node_modules/pi-antigravity/src/image/index.ts +1 -0
  58. package/node_modules/pi-antigravity/src/index.ts +280 -0
  59. package/node_modules/pi-antigravity/src/models/discovery.ts +154 -0
  60. package/node_modules/pi-antigravity/src/models/grouping.ts +424 -0
  61. package/node_modules/pi-antigravity/src/models/index.ts +3 -0
  62. package/node_modules/pi-antigravity/src/models/models.ts +500 -0
  63. package/node_modules/pi-antigravity/src/stream/index.ts +1 -0
  64. package/node_modules/pi-antigravity/src/stream/stream.ts +1460 -0
  65. package/node_modules/pi-antigravity/src/types/enums.ts +42 -0
  66. package/node_modules/pi-antigravity/src/types/index.ts +2 -0
  67. package/node_modules/pi-antigravity/src/types/types.ts +292 -0
  68. package/node_modules/pi-antigravity/src/usage/index.ts +1 -0
  69. package/node_modules/pi-antigravity/src/usage/usage.ts +371 -0
  70. package/node_modules/pi-antigravity/src/utils/http.ts +91 -0
  71. package/node_modules/pi-antigravity/src/utils/index.ts +3 -0
  72. package/node_modules/pi-antigravity/src/utils/security.ts +73 -0
  73. package/node_modules/pi-antigravity/src/utils/util.ts +132 -0
  74. package/node_modules/pi-antigravity/tsconfig.json +21 -0
  75. package/node_modules/pi-mcp-adapter/CHANGELOG.md +78 -0
  76. package/node_modules/pi-mcp-adapter/README.md +125 -19
  77. package/node_modules/pi-mcp-adapter/agent-plugin-loader.ts +69 -30
  78. package/node_modules/pi-mcp-adapter/agent-plugin-provenance.ts +36 -0
  79. package/node_modules/pi-mcp-adapter/claude-plugin-loader.ts +365 -0
  80. package/node_modules/pi-mcp-adapter/commands.ts +13 -15
  81. package/node_modules/pi-mcp-adapter/config.ts +198 -30
  82. package/node_modules/pi-mcp-adapter/consent-manager.ts +40 -9
  83. package/node_modules/pi-mcp-adapter/direct-tool-surface.ts +250 -0
  84. package/node_modules/pi-mcp-adapter/direct-tools.ts +9 -228
  85. package/node_modules/pi-mcp-adapter/dist/agent-plugin-loader.js +74 -32
  86. package/node_modules/pi-mcp-adapter/dist/agent-plugin-loader.js.map +1 -1
  87. package/node_modules/pi-mcp-adapter/dist/agent-plugin-provenance.d.ts +1 -0
  88. package/node_modules/pi-mcp-adapter/dist/agent-plugin-provenance.js +31 -0
  89. package/node_modules/pi-mcp-adapter/dist/agent-plugin-provenance.js.map +1 -0
  90. package/node_modules/pi-mcp-adapter/dist/claude-plugin-loader.d.ts +9 -0
  91. package/node_modules/pi-mcp-adapter/dist/claude-plugin-loader.js +362 -0
  92. package/node_modules/pi-mcp-adapter/dist/claude-plugin-loader.js.map +1 -0
  93. package/node_modules/pi-mcp-adapter/dist/config.d.ts +3 -1
  94. package/node_modules/pi-mcp-adapter/dist/config.js +189 -27
  95. package/node_modules/pi-mcp-adapter/dist/config.js.map +1 -1
  96. package/node_modules/pi-mcp-adapter/dist/metadata-cache.js +7 -16
  97. package/node_modules/pi-mcp-adapter/dist/metadata-cache.js.map +1 -1
  98. package/node_modules/pi-mcp-adapter/dist/package-mcp-loader.js +5 -17
  99. package/node_modules/pi-mcp-adapter/dist/package-mcp-loader.js.map +1 -1
  100. package/node_modules/pi-mcp-adapter/dist/types.d.ts +30 -4
  101. package/node_modules/pi-mcp-adapter/dist/types.js +26 -0
  102. package/node_modules/pi-mcp-adapter/dist/types.js.map +1 -1
  103. package/node_modules/pi-mcp-adapter/dist/utils.d.ts +6 -0
  104. package/node_modules/pi-mcp-adapter/dist/utils.js +65 -6
  105. package/node_modules/pi-mcp-adapter/dist/utils.js.map +1 -1
  106. package/node_modules/pi-mcp-adapter/host-html-template.ts +20 -19
  107. package/node_modules/pi-mcp-adapter/http-ca.ts +84 -0
  108. package/node_modules/pi-mcp-adapter/index.ts +827 -164
  109. package/node_modules/pi-mcp-adapter/init.ts +48 -10
  110. package/node_modules/pi-mcp-adapter/lazy-loader.ts +7 -0
  111. package/node_modules/pi-mcp-adapter/mcp-auth-fetch.ts +113 -0
  112. package/node_modules/pi-mcp-adapter/mcp-auth-flow.ts +256 -77
  113. package/node_modules/pi-mcp-adapter/mcp-auth.ts +316 -54
  114. package/node_modules/pi-mcp-adapter/mcp-code.ts +45 -18
  115. package/node_modules/pi-mcp-adapter/mcp-install.ts +60 -0
  116. package/node_modules/pi-mcp-adapter/mcp-oauth-provider.ts +70 -6
  117. package/node_modules/pi-mcp-adapter/mcp-output-guard.ts +53 -42
  118. package/node_modules/pi-mcp-adapter/mcp-panel-theme.ts +104 -0
  119. package/node_modules/pi-mcp-adapter/mcp-panel.ts +366 -332
  120. package/node_modules/pi-mcp-adapter/mcp-references.ts +9 -14
  121. package/node_modules/pi-mcp-adapter/mcp-script-worker.mjs +3 -1
  122. package/node_modules/pi-mcp-adapter/mcp-setup-panel.ts +383 -341
  123. package/node_modules/pi-mcp-adapter/mcp-status.ts +5 -0
  124. package/node_modules/pi-mcp-adapter/metadata-cache.ts +7 -16
  125. package/node_modules/pi-mcp-adapter/namespace-tools.ts +61 -3
  126. package/node_modules/pi-mcp-adapter/oauth.ts +6 -2
  127. package/node_modules/pi-mcp-adapter/package-mcp-loader.ts +5 -17
  128. package/node_modules/pi-mcp-adapter/package.json +13 -3
  129. package/node_modules/pi-mcp-adapter/prompts.ts +35 -3
  130. package/node_modules/pi-mcp-adapter/proxy-modes.ts +108 -7
  131. package/node_modules/pi-mcp-adapter/runtime-owner.ts +16 -1
  132. package/node_modules/pi-mcp-adapter/sampling-handler.ts +9 -32
  133. package/node_modules/pi-mcp-adapter/sandbox-proxy-template.ts +20 -93
  134. package/node_modules/pi-mcp-adapter/server-manager.ts +227 -40
  135. package/node_modules/pi-mcp-adapter/session-approvals.ts +187 -0
  136. package/node_modules/pi-mcp-adapter/skills/mcp-scripting/SKILL.md +9 -1
  137. package/node_modules/pi-mcp-adapter/state.ts +10 -1
  138. package/node_modules/pi-mcp-adapter/tool-approval.ts +10 -22
  139. package/node_modules/pi-mcp-adapter/tool-metadata.ts +14 -0
  140. package/node_modules/pi-mcp-adapter/types.ts +57 -4
  141. package/node_modules/pi-mcp-adapter/ui-server.ts +36 -28
  142. package/node_modules/pi-mcp-adapter/utils.ts +64 -6
  143. package/package.json +15 -15
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-plugins/fast-mode",
3
- "version": "0.1.11",
3
+ "version": "0.1.12",
4
4
  "description": "Fast service-tier extension for pi-agent.",
5
5
  "keywords": [
6
6
  "fast",
@@ -34,22 +34,20 @@
34
34
  "publishConfig": {
35
35
  "access": "public"
36
36
  },
37
- "dependencies": {
38
- "@effect/platform-node": "4.0.0-beta.103",
39
- "effect": "4.0.0-beta.103"
40
- },
41
37
  "devDependencies": {
42
38
  "@earendil-works/pi-coding-agent": "0.83.0",
43
39
  "@earendil-works/pi-tui": "0.83.0",
40
+ "@effect/platform-node": "4.0.0-rc.115",
44
41
  "@types/node": "26.1.2",
42
+ "effect": "4.0.0-rc.115",
45
43
  "oxfmt": "0.62.0",
46
44
  "oxlint": "1.77.0",
47
45
  "tsdown": "0.22.14",
48
46
  "typescript": "7.0.2",
49
47
  "@pi-plugins/fmt": "0.0.0",
50
- "@pi-plugins/lint": "0.0.0",
48
+ "@pi-plugins/tsconfig": "0.0.0",
51
49
  "@pi-plugins/shared": "0.0.0",
52
- "@pi-plugins/tsconfig": "0.0.0"
50
+ "@pi-plugins/lint": "0.0.0"
53
51
  },
54
52
  "peerDependencies": {
55
53
  "@earendil-works/pi-coding-agent": "*",
@@ -18,8 +18,8 @@ pi install npm:@tifan/pi-copy-response
18
18
 
19
19
  ## Release notes
20
20
 
21
- See [CHANGELOG.md](CHANGELOG.md)
21
+ See [CHANGELOG.md](https://github.com/tifandotme/pi-extensions/blob/master/packages/pi-copy-response/CHANGELOG.md)
22
22
 
23
23
  ## License
24
24
 
25
- [MIT](LICENSE)
25
+ [MIT](https://github.com/tifandotme/pi-extensions/blob/master/LICENSE)
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tifan/pi-copy-response",
3
- "version": "0.2.6",
3
+ "version": "0.2.7",
4
4
  "description": "Pick and copy an assistant response from the current pi session.",
5
5
  "keywords": [
6
6
  "clipboard",
@@ -33,6 +33,7 @@
33
33
  "pi": {
34
34
  "extensions": [
35
35
  "./src/index.ts"
36
- ]
36
+ ],
37
+ "image": "https://raw.githubusercontent.com/tifandotme/pi-extensions/refs/heads/master/packages/pi-copy-response/assets/picker.webp"
37
38
  }
38
39
  }
@@ -34,8 +34,8 @@ Notes:
34
34
 
35
35
  ## Release notes
36
36
 
37
- See [CHANGELOG.md](CHANGELOG.md)
37
+ See [CHANGELOG.md](https://github.com/tifandotme/pi-extensions/blob/master/packages/pi-inline-skills/CHANGELOG.md)
38
38
 
39
39
  ## License
40
40
 
41
- [MIT](LICENSE)
41
+ [MIT](https://github.com/tifandotme/pi-extensions/blob/master/LICENSE)
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tifan/pi-inline-skills",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "Inline /skill autocomplete in the pi editor.",
5
5
  "keywords": [
6
6
  "autocomplete",
@@ -34,6 +34,7 @@
34
34
  "pi": {
35
35
  "extensions": [
36
36
  "./src/index.ts"
37
- ]
37
+ ],
38
+ "image": "https://raw.githubusercontent.com/tifandotme/pi-extensions/refs/heads/master/packages/pi-inline-skills/assets/skills-selector-triggered-inline.webp"
38
39
  }
39
40
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  Find Mermaid diagrams that Pi left unrendered and show one in a terminal image viewer.
4
4
 
5
- https://github.com/user-attachments/assets/d0c1d46f-0cba-4bf3-a44e-9aa0f4b8e3fd
5
+ https://github.com/user-attachments/assets/8be5b7cf-fc21-4979-a245-4ba0984360de
6
6
 
7
7
  ## How it works
8
8
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tifan/pi-mermaid-open",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Find skipped Mermaid diagrams and show them in a terminal image viewer.",
5
5
  "keywords": [
6
6
  "diagram",
@@ -41,6 +41,7 @@
41
41
  "pi": {
42
42
  "extensions": [
43
43
  "./src/index.ts"
44
- ]
44
+ ],
45
+ "video": "https://raw.githubusercontent.com/tifandotme/pi-extensions/refs/heads/master/packages/pi-mermaid-open/assets/demo.mp4"
45
46
  }
46
47
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tifan/pi-preferred-thinking",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Set and apply per-model thinking levels from Pi's native settings.",
5
5
  "keywords": [
6
6
  "pi",
@@ -37,6 +37,7 @@
37
37
  "pi": {
38
38
  "extensions": [
39
39
  "./src/index.ts"
40
- ]
40
+ ],
41
+ "image": "https://raw.githubusercontent.com/tifandotme/pi-extensions/refs/heads/master/packages/pi-preferred-thinking/assets/picker.webp"
41
42
  }
42
43
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tifan/pi-recap",
3
- "version": "0.4.6",
3
+ "version": "0.4.7",
4
4
  "description": "One-line session recap on demand or after you have been away.",
5
5
  "keywords": [
6
6
  "pi",
@@ -37,6 +37,7 @@
37
37
  "pi": {
38
38
  "extensions": [
39
39
  "./src/index.ts"
40
- ]
40
+ ],
41
+ "image": "https://raw.githubusercontent.com/tifandotme/pi-extensions/refs/heads/master/packages/pi-recap/assets/recap-widget.webp"
41
42
  }
42
43
  }
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Rahul Arya
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,194 @@
1
+ # pi-antigravity
2
+
3
+ [![npm version](https://img.shields.io/npm/v/pi-antigravity?logo=npm)](https://www.npmjs.com/package/pi-antigravity)
4
+ [![license](https://img.shields.io/npm/l/pi-antigravity)](LICENSE)
5
+ [![Sponsor](https://img.shields.io/badge/Sponsor-GitHub-ea4aaa?logo=github)](https://github.com/sponsors/Rahularya01)
6
+
7
+ **pi-antigravity** is a [Pi Coding Agent](https://pi.dev) provider that lets Pi talk directly to Google Antigravity / Cloud Code Assist models — Gemini, plus the Claude and GPT-OSS models Antigravity also advertises. Sign in with Google, pick a model, and go. Under the hood it handles OAuth login, native streaming, model routing, and quota diagnostics itself, so it never shells out to an external Antigravity CLI.
8
+
9
+ Using [OpenCode](https://opencode.ai) instead of Pi? Install the companion plugin [`@rahularya01/opencode-antigravity`](https://www.npmjs.com/package/@rahularya01/opencode-antigravity).
10
+
11
+ Want to equip Pi with MCP, web access, subagents, and todos? Install [`pi-essentials`](https://github.com/Rahularya01/pi-essentials) (currently in beta), an all-in-one companion extension designed for Pi.
12
+
13
+ > **Unofficial integration.** This project is not affiliated with or endorsed by Google. Use it only with an account and services you are authorized to access, and review its source before granting OAuth permissions.
14
+
15
+ ## Contents
16
+
17
+ - [Requirements](#requirements)
18
+ - [Install](#install)
19
+ - [Quick start](#quick-start)
20
+ - [Authentication and credential safety](#authentication-and-credential-safety)
21
+ - [Commands](#commands)
22
+ - [Models and routing](#models-and-routing)
23
+ - [Configuration](#configuration)
24
+ - [Troubleshooting](#troubleshooting)
25
+ - [Development](#development)
26
+
27
+ ## Requirements
28
+
29
+ - Pi Coding Agent and Pi AI version **0.80.0 or later**
30
+ - A Google account that can use the relevant Cloud Code Assist / Antigravity services
31
+ - A browser to complete the Google sign-in. Same-machine is best (the browser hits the local callback automatically); on a remote/headless machine, complete sign-in anywhere and paste the resulting callback URL back into Pi (see [Troubleshooting](#troubleshooting)).
32
+
33
+ ## Install
34
+
35
+ Install from npm:
36
+
37
+ ```bash
38
+ pi install npm:pi-antigravity
39
+ ```
40
+
41
+ Or install the latest repository version:
42
+
43
+ ```bash
44
+ pi install git:github.com/Rahularya01/pi-antigravity
45
+ ```
46
+
47
+ Restart Pi (or run `/reload`) after installation. To update the npm package later, use `pi update npm:pi-antigravity`.
48
+
49
+ ## Quick start
50
+
51
+ 1. Start Pi and run `/login antigravity`.
52
+ 2. Complete Google sign-in in your browser.
53
+ 3. Select a model, for example:
54
+
55
+ ```text
56
+ /model antigravity/gemini-3.8-flash
57
+ ```
58
+
59
+ 4. Start working. If a request fails, run `/antigravity.doctor` for sanitized diagnostics.
60
+
61
+ ## Authentication and credential safety
62
+
63
+ The provider uses the OAuth 2.0 Authorization Code flow with PKCE, so credentials are only ever exchanged with Google — never typed into Pi.
64
+
65
+ 1. `/login antigravity` opens Google sign-in and starts a temporary callback listener at `http://localhost:51121/oauth-callback`.
66
+ 2. After you approve access, Pi exchanges the callback code for tokens and stores the provider credentials in Pi's auth store (normally `~/.pi/agent/auth.json`).
67
+ 3. Pi refreshes access tokens automatically when they expire — you shouldn't need to sign in again unless a token is revoked.
68
+
69
+ The callback listener binds only to a loopback host, so it isn't reachable from outside your machine. The auth file it writes to contains sensitive access and refresh tokens: **do not commit it, paste it into issues, or share its contents.**
70
+
71
+ Signing in requests these Google OAuth scopes:
72
+
73
+ <!-- prettier-ignore -->
74
+ | Scope | Why it's needed |
75
+ | --- | --- |
76
+ | `aicode` | Access to the Cloud Code Assist / Antigravity model catalog and endpoints |
77
+ | `cloud-platform` | General Cloud Code Assist API access |
78
+ | `userinfo.email`, `userinfo.profile` | Identify the signed-in Google account |
79
+ | `cclog` | Cloud Code Assist logging/telemetry endpoints used by the API |
80
+ | `experimentsandconfigs` | Server-side experiment and config flags for the API |
81
+
82
+ Review these permissions before approving access. If your credentials expire or are revoked, just re-run `/login antigravity` to sign in again.
83
+
84
+ ## Commands
85
+
86
+ <!-- prettier-ignore -->
87
+ | Command | Description |
88
+ | --- | --- |
89
+ | `/login antigravity` | Sign in to Google and configure the provider. |
90
+ | `/model antigravity/<model-id>` | Choose a registered Antigravity model. |
91
+ | `/antigravity.usage` | Show the server-reported shared quota groups and reset times. |
92
+ | `/antigravity.models` | List available runtime models, remaining shared-pool quota, and capabilities. |
93
+ | `/antigravity.models all` | Include tab/chat models normally hidden from the model list. |
94
+ | `/antigravity.refresh` | Force refresh the dynamic model catalog from Antigravity. |
95
+ | `/antigravity.doctor` | Show sanitized provider diagnostics, including the endpoint, status, and resolved runtime model. |
96
+ | `/antigravity.image <prompt>` | Generate an image via Antigravity and save it under `.pi/generated-images/`. Optional `--ratio 16:9`, `--model`, `--path`. |
97
+
98
+ Model availability, entitlement, quota groups, and resets are returned by the service and can differ by account. The quota percentage shown for a model can represent a shared pool, not a private per-model allowance.
99
+
100
+ The extension also registers a `generate_image` tool the model can call. Images are written inside the project directory (default `.pi/generated-images/`). Image models such as `gemini-3-pro-image` are account-dependent; `/antigravity.image` falls back to other advertised Gemini image IDs on 404.
101
+
102
+ ## Models and routing
103
+
104
+ After you sign in, the provider refreshes its catalog from Antigravity (`fetchAvailableModels`) and groups runtime thinking variants into public Pi model IDs. Newly enabled models — for example a new Gemini Flash generation — become selectable after that refresh without waiting for an extension release. A last-known-good cache is kept for offline/cold start; the static table below is only the conservative fallback and a routing reference.
105
+
106
+ Use `/antigravity.models` to see live availability and quota for your account. Runtime names such as `gemini-3.8-flash-low` / `-medium` / `-high` collapse to `gemini-3.8-flash` with those thinking levels. The conservative static entries remain selectable when an account's authenticated catalog omits them.
107
+
108
+ ### Why Claude and GPT-OSS appear
109
+
110
+ Antigravity / Cloud Code Assist exposes a multi-provider catalog. Depending on your account, its Google-authenticated API can advertise Google Gemini models alongside Claude models served through Anthropic Vertex and GPT-OSS served through OpenAI Vertex. This extension intentionally exposes those advertised Claude and GPT-OSS models through the single `antigravity` provider; they are not separate Pi providers and do not use a separate Anthropic or OpenAI login.
111
+
112
+ The backend's display labels do not always match its runtime IDs. For example, `gemini-3.5-flash-extra-low`, `gemini-3.5-flash-low`, and `gemini-3-flash-agent` can be displayed as Gemini 3.5 Flash Low, Medium, and High. All supported models send integer `thinkingBudget` (Gemini 3.8/3.7/3.6: -1/4000/1000/0, Gemini 3.5: 10000/4000/1000/0, Gemini 3.1 Pro: 10001/1001/0, Claude: 1024/0, GPT-OSS: 8192/0) matching the official Antigravity CLI wire format.
113
+
114
+ <!-- prettier-ignore -->
115
+ | Public model ID | Input | Thinking levels shown | Max output tokens | Request routing |
116
+ | --- | --- | --- | --- | --- |
117
+ | `gemini-3.8-flash` | Text, image | Low, Medium, High | 65,536 | low → `gemini-3.8-flash-low`; medium → `gemini-3.8-flash-medium`; high → `gemini-3.8-flash-high` |
118
+ | `gemini-3.7-flash` | Text, image | Low, Medium, High | 65,536 | low → `gemini-3.7-flash-low`; medium → `gemini-3.7-flash-medium`; high → `gemini-3.7-flash-high` |
119
+ | `gemini-3.6-flash` | Text, image | Low, Medium, High | 65,536 | low → `gemini-3.6-flash-low`; medium → `gemini-3.6-flash-medium`; high → `gemini-3.6-flash-high` |
120
+ | `gemini-3.5-flash` | Text, image | Low, Medium, High | 65,536 | low → `gemini-3.5-flash-extra-low`; medium → `gemini-3.5-flash-low`; high → `gemini-3-flash-agent` |
121
+ | `gemini-3.1-pro` | Text, image | Low, High | 65,535 | low → `gemini-3.1-pro-low`; high → `gemini-pro-agent` |
122
+ | `claude-sonnet-4-6` | Text, image | High | 64,000 | high → `claude-sonnet-4-6` |
123
+ | `claude-opus-4-6` | Text, image | High | 64,000 | high → `claude-opus-4-6-thinking` |
124
+ | `gpt-oss-120b` | Text | Medium | 32,768 | medium → `gpt-oss-120b-medium` |
125
+
126
+ To limit which models Pi cycles through, enable specific entries in `~/.pi/agent/settings.json`:
127
+
128
+ ```json
129
+ {
130
+ "models": {
131
+ "antigravity/gemini-3.8-flash": { "enabled": true },
132
+ "antigravity/gemini-3.7-flash": { "enabled": true },
133
+ "antigravity/gemini-3.6-flash": { "enabled": true },
134
+ "antigravity/gemini-3.5-flash": { "enabled": true },
135
+ "antigravity/gemini-3.1-pro": { "enabled": true },
136
+ "antigravity/claude-sonnet-4-6": { "enabled": true }
137
+ }
138
+ }
139
+ ```
140
+
141
+ ## Configuration
142
+
143
+ All primary environment variables start with `ANTIGRAVITY_`. The legacy `NOAGY_` prefix is also accepted for compatibility.
144
+
145
+ <!-- prettier-ignore -->
146
+ | Variable | Purpose |
147
+ | --- | --- |
148
+ | `ANTIGRAVITY_BASE_URL` | Override the API base URL. It must be HTTPS, contain no URL credentials, and target an allowed Google APIs host. |
149
+ | `ANTIGRAVITY_PROJECT_ID` | Use a specific Cloud Code Assist project ID instead of discovery or the stable account fallback. |
150
+ | `ANTIGRAVITY_CALLBACK_HOST` | Bind OAuth callback to `127.0.0.1`, `::1`, or `localhost` only. Defaults to `127.0.0.1`. |
151
+ | `ANTIGRAVITY_USER_AGENT` | Override the request user-agent. |
152
+ | `ANTIGRAVITY_RUNTIME_MODEL` | Pin requests to a runtime model ID, bypassing discovered/fallback routing. |
153
+ | `ANTIGRAVITY_CATALOG_REFRESH_INTERVAL_MS` | Override catalog refresh TTL in ms. Defaults to 4 hours (`14400000`). Set to `0` to always refresh. |
154
+ | `ANTIGRAVITY_CLIENT_ID` | Use a custom Google OAuth client ID. |
155
+ | `ANTIGRAVITY_CLIENT_SECRET` | Use a custom Google OAuth client secret. Keep it out of source control and shell history. |
156
+ | `ANTIGRAVITY_NO_KEEPALIVE` | Set to `1` to skip the keep-alive connection pool. |
157
+ | `ANTIGRAVITY_NO_PREWARM` | Set to `1` to skip the TLS pre-warm request made when the extension loads. |
158
+
159
+ By default, the provider tries `https://daily-cloudcode-pa.googleapis.com`, then the sandbox host, then `https://cloudcode-pa.googleapis.com`. Prefer the built-in OAuth client unless you have a reason to use your own credentials.
160
+
161
+ ### Latency
162
+
163
+ Provider requests reuse a keep-alive connection pool when the runtime supports it, so consecutive turns do not repeat the DNS, TCP, and TLS handshake. When `HTTP_PROXY`, `HTTPS_PROXY`, or `ALL_PROXY` is set, that pool is skipped so Pi's proxy-aware dispatcher is used instead. The connection is also opened when the extension loads so the first message of a session skips the handshake too. For the lowest time-to-first-token, pick a fast runtime: `gemini-3.8-flash` with reasoning off routes to `gemini-3.8-flash-low` at thinking level `LOW`. Setting `ANTIGRAVITY_PROJECT_ID` also removes the project-discovery round-trip when credentials do not already carry a project ID.
164
+
165
+ ## Troubleshooting
166
+
167
+ - **No credentials / 401 / 403:** Run `/login antigravity` again, then check `/antigravity.doctor`.
168
+ - **Remote/headless machine — browser can't reach `localhost:51121`:** The callback binds to loopback only, so a browser on another machine can't hit it. You have two options:
169
+ - **Paste (no extra setup):** Run `/login antigravity`, open the shown URL and complete Google sign-in in _any_ browser. When it redirects to `http://localhost:51121/oauth-callback?…` and fails to load, copy that full URL from the address bar and paste it into the prompt Pi shows. The code is single-use and expires quickly, so paste promptly.
170
+ - **SSH tunnel (reusable):** From the machine with the browser, run `ssh -N -L 51121:127.0.0.1:51121 <user>@<server>` and keep it open, then run `/login antigravity` on the server. The redirect to `localhost:51121` tunnels through to the local callback automatically.
171
+ - **OAuth callback will not start:** Ensure port `51121` is free and `ANTIGRAVITY_CALLBACK_HOST` is a permitted loopback address.
172
+ - **Model is unavailable:** Run `/antigravity.models`; availability is account- and service-dependent.
173
+ - **Claude/GPT tool-call schema error:** Upgrade to the latest package release. The provider adapts Pi's JSON Schema tool definitions for the Cloud Code Assist custom-tool bridge.
174
+ - **Quota or rate limit:** Run `/antigravity.usage`. A `429` response usually indicates quota or rate limiting; changing models may still draw from the same shared pool.
175
+ - **Need a safe diagnostic:** `/antigravity.doctor` redacts recognized secrets from its error output. Still review output before sharing it publicly.
176
+
177
+ ## Development
178
+
179
+ This repo uses [Bun](https://bun.sh) for install, scripts, and CI. The published extension itself runs on Node (Pi's CLI).
180
+
181
+ ```bash
182
+ bun install
183
+ bun run check
184
+ ```
185
+
186
+ The package declares its Pi extension in `package.json` under `pi.extensions`. See the [Pi package documentation](https://pi.dev/docs/latest/packages) for package installation, manifest, and gallery conventions.
187
+
188
+ ## Support the project
189
+
190
+ If `pi-antigravity` is useful to you, consider [sponsoring the project on GitHub](https://github.com/sponsors/Rahularya01).
191
+
192
+ ## License
193
+
194
+ [MIT](LICENSE)
@@ -0,0 +1,67 @@
1
+ {
2
+ "name": "pi-antigravity",
3
+ "version": "0.7.2",
4
+ "description": "Personal Antigravity / Cloud Code Assist provider for Pi Coding Agent",
5
+ "author": "Rahul Arya",
6
+ "license": "MIT",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/Rahularya01/pi-antigravity.git"
10
+ },
11
+ "homepage": "https://github.com/Rahularya01/pi-antigravity#readme",
12
+ "bugs": {
13
+ "url": "https://github.com/Rahularya01/pi-antigravity/issues"
14
+ },
15
+ "type": "module",
16
+ "main": "./src/index.ts",
17
+ "keywords": [
18
+ "pi-package",
19
+ "pi-extension",
20
+ "antigravity",
21
+ "google",
22
+ "oauth",
23
+ "provider"
24
+ ],
25
+ "files": [
26
+ "LICENSE",
27
+ "README.md",
28
+ "src",
29
+ "tsconfig.json"
30
+ ],
31
+ "packageManager": "bun@1.4.0",
32
+ "scripts": {
33
+ "typecheck": "tsc --noEmit",
34
+ "lint": "eslint src",
35
+ "lint:fix": "eslint src --fix",
36
+ "format": "prettier --write .",
37
+ "format:check": "prettier --check .",
38
+ "security-check": "bun scripts/security-check.ts",
39
+ "test": "bun scripts/test-model-routing.ts && bun scripts/test-model-discovery.ts && bun scripts/test-usage-formatter.ts && bun scripts/test-stream-sse.ts && bun scripts/test-stream-header-deadline.ts && bun scripts/test-http-proxy.ts && bun scripts/test-image-gen.ts",
40
+ "smoke:tools": "bun scripts/smoke-tool-schema.ts",
41
+ "smoke:models": "bun scripts/smoke-all-models.mjs",
42
+ "check": "bun run typecheck && bun run lint && bun run format:check && bun run security-check && bun run test"
43
+ },
44
+ "pi": {
45
+ "extensions": [
46
+ "./src/index.ts"
47
+ ]
48
+ },
49
+ "peerDependencies": {
50
+ "@earendil-works/pi-ai": ">=0.80.0",
51
+ "@earendil-works/pi-coding-agent": ">=0.80.0"
52
+ },
53
+ "devDependencies": {
54
+ "@earendil-works/pi-ai": "^0.84.2",
55
+ "@eslint/js": "^10.0.1",
56
+ "@types/node": "^26.1.1",
57
+ "eslint": "^10.7.0",
58
+ "eslint-config-prettier": "^10.1.8",
59
+ "globals": "^17.7.0",
60
+ "prettier": "^3.9.5",
61
+ "typescript": "^6.0.3",
62
+ "typescript-eslint": "^8.64.0"
63
+ },
64
+ "dependencies": {
65
+ "undici": "^8.10.0"
66
+ }
67
+ }
@@ -0,0 +1,14 @@
1
+ export {
2
+ loginAntigravity,
3
+ refreshAntigravityToken,
4
+ getApiKey,
5
+ CLIENT_ID,
6
+ CLIENT_SECRET,
7
+ REDIRECT_URI,
8
+ AUTH_URL,
9
+ TOKEN_URL,
10
+ SCOPES,
11
+ CALLBACK_HOST,
12
+ OAUTH_CALLBACK_TIMEOUT_MS,
13
+ } from "./oauth.js";
14
+ export type { OAuthCredentials, OAuthLoginCallbacks } from "./oauth.js";