omp-antigravity-acp-provider 0.1.24 → 0.1.26
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 +6 -9
- package/THIRD_PARTY_LICENSES.txt +0 -29
- package/THIRD_PARTY_NOTICES.md +1 -1
- package/extension/commands.ts +19 -13
- package/extension/index.ts +24 -18
- package/extension/runtime-pool.ts +7 -0
- package/extension/runtime.mjs +51 -36
- package/extension/session-cleanup.ts +1 -1
- package/extension/session-store.ts +1 -1
- package/extension/tier-connection.ts +3 -3
- package/extension/usage.ts +1 -1
- package/extension/vendor/pi-antigravity-acp-provider/LICENSE +21 -0
- package/extension/vendor/pi-antigravity-acp-provider/README.upstream.md +144 -0
- package/extension/vendor/pi-antigravity-acp-provider/package.json +86 -0
- package/extension/vendor/pi-antigravity-acp-provider/runtime-manifest.json +205 -0
- package/extension/vendor/pi-antigravity-acp-provider/src/acp/antigravity.ts +170 -0
- package/extension/vendor/pi-antigravity-acp-provider/src/acp/bounded-stream.ts +148 -0
- package/extension/vendor/pi-antigravity-acp-provider/src/acp/connection.ts +443 -0
- package/extension/vendor/pi-antigravity-acp-provider/src/acp/credential-storage.ts +113 -0
- package/extension/vendor/pi-antigravity-acp-provider/src/acp/errors.ts +42 -0
- package/extension/vendor/pi-antigravity-acp-provider/src/acp/events.ts +66 -0
- package/extension/vendor/pi-antigravity-acp-provider/src/acp/headless-oauth.ts +196 -0
- package/extension/vendor/pi-antigravity-acp-provider/src/acp/index.ts +8 -0
- package/extension/vendor/pi-antigravity-acp-provider/src/acp/integrity.ts +64 -0
- package/extension/vendor/pi-antigravity-acp-provider/src/acp/process.ts +256 -0
- package/extension/vendor/pi-antigravity-acp-provider/src/acp/prompt-watchdog.ts +80 -0
- package/extension/vendor/pi-antigravity-acp-provider/src/acp/proxy.ts +54 -0
- package/extension/vendor/pi-antigravity-acp-provider/src/acp/runtime-manifest.ts +183 -0
- package/extension/vendor/pi-antigravity-acp-provider/src/acp/session-state.ts +76 -0
- package/extension/vendor/pi-antigravity-acp-provider/src/acp/session-store.ts +88 -0
- package/extension/vendor/pi-antigravity-acp-provider/src/acp/setup.ts +793 -0
- package/extension/vendor/pi-antigravity-acp-provider/src/acp/store-lock.ts +24 -0
- package/extension/vendor/pi-antigravity-acp-provider/src/acp/supervisor.mjs +101 -0
- package/extension/vendor/pi-antigravity-acp-provider/src/config.ts +114 -0
- package/extension/vendor/pi-antigravity-acp-provider/src/constants.ts +10 -0
- package/extension/vendor/pi-antigravity-acp-provider/src/index.ts +8 -0
- package/extension/vendor/pi-antigravity-acp-provider/src/mcp/bridge.ts +217 -0
- package/extension/vendor/pi-antigravity-acp-provider/src/mcp/schema.ts +223 -0
- package/extension/vendor/pi-antigravity-acp-provider/src/models.ts +192 -0
- package/extension/vendor/pi-antigravity-acp-provider/src/provider.ts +149 -0
- package/extension/vendor/pi-antigravity-acp-provider/src/runtime.ts +1116 -0
- package/extension/vendor/pi-antigravity-acp-provider/src/status.ts +77 -0
- package/extension/vendor/pi-antigravity-acp-provider/src/stream/context.ts +249 -0
- package/extension/vendor/pi-antigravity-acp-provider/src/stream/index.ts +3 -0
- package/extension/vendor/pi-antigravity-acp-provider/src/stream/json.ts +17 -0
- package/extension/vendor/pi-antigravity-acp-provider/src/stream/pi-events.ts +141 -0
- package/extension/vendor/pi-antigravity-acp-provider/src/stream/usage.ts +37 -0
- package/extension/vendor/pi-antigravity-acp-provider/src/wizard.ts +83 -0
- package/package.json +6 -3
- package/scripts/build.mjs +20 -9
package/README.md
CHANGED
|
@@ -15,13 +15,12 @@ The original project's ACP transport, Google-managed authentication, runtime ins
|
|
|
15
15
|
|
|
16
16
|
This derivative adds OMP-specific provider registration, confirmed model/thinking selectors, lazy catalog loading, OMP-first tool instructions, API-equivalent pricing and per-session runtime lifecycle fixes for planning/refinement.
|
|
17
17
|
|
|
18
|
-
The repository
|
|
19
|
-
|
|
18
|
+
The repository vendors the upstream **0.1.15** source under `extension/vendor/pi-antigravity-acp-provider` (MIT, see `extension/vendor/pi-antigravity-acp-provider/LICENSE`). The standalone artifact bundles its runtime code, supervisor and signed runtime manifest; end users need no production npm dependencies. It does not contain a copy of upstream's Git history. See [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md) for the original copyright and license notice.
|
|
20
19
|
## Status
|
|
21
20
|
|
|
22
|
-
Version 0.1.
|
|
21
|
+
Version 0.1.26 waits for ACP process exit during session lease handoff and isolates idle runtimes while keeping the 0.1.24 session-ownership and profile-isolation fixes. Restart all OMP processes after upgrading so they participate in session ownership.
|
|
23
22
|
|
|
24
|
-
Version 0.1.
|
|
23
|
+
Version 0.1.26 supports all models advertised by the official ACP server. Earlier live inference was tested with macOS, OMP 18.12.5, upstream provider 0.1.15 and official ACP runtime 1.4.1. The 0.1.21–0.1.24 continuity fixes are verified offline, including OMP 18.13.3 catalog loading and the local OMP summarizer source. Other platforms and full interactive Refine plan behavior with a real model remain unverified.
|
|
25
24
|
|
|
26
25
|
Google's consumer-plan policies can restrict third-party agent access even through the official CLI or ACP executable. An official transport does not establish permission to use a subscription in OMP. Check the current [Antigravity FAQ](https://www.antigravity.google/docs/faq/) and [terms](https://antigravity.google/terms) for your account.
|
|
27
26
|
|
|
@@ -58,7 +57,7 @@ Or, inside OMP:
|
|
|
58
57
|
|
|
59
58
|
Select **omp-antigravity-acp-provider** in the browser, install it, and restart OMP to load the provider.
|
|
60
59
|
|
|
61
|
-
OMP's marketplace installer currently copies Git content without installing npm dependencies. This marketplace therefore ships a small source launcher that retrieves the exact published **0.1.
|
|
60
|
+
OMP's marketplace installer currently copies Git content without installing npm dependencies. This marketplace therefore ships a small source launcher that retrieves the exact published **0.1.26** prebuilt npm adapter on first load. It disables npm install scripts and performs no local compilation. Node.js 22.19+ and npm must be on PATH. The standalone build bundles the required code and supervisor assets with no production dependencies: a clean test installation occupied approximately **2.6 MiB** (477 KiB tarball), down from roughly 150 MiB with the old dependency tree. This excludes the separately downloaded Google runtime. First preparation needs internet access; later loads reuse the installed cache without npm network access.
|
|
62
61
|
|
|
63
62
|
The launcher stores its versioned dependencies in `.runtime/` inside the installed marketplace plugin's cache directory. Uninstalling the marketplace plugin removes that cache when it is no longer referenced by another scope. Google credentials and the separately downloaded official ACP runtime are unaffected.
|
|
64
63
|
|
|
@@ -82,7 +81,7 @@ omp plugin install npm:omp-antigravity-acp-provider
|
|
|
82
81
|
To pin a specific release:
|
|
83
82
|
|
|
84
83
|
```sh
|
|
85
|
-
omp plugin install npm:omp-antigravity-acp-provider@0.1.
|
|
84
|
+
omp plugin install npm:omp-antigravity-acp-provider@0.1.26
|
|
86
85
|
```
|
|
87
86
|
|
|
88
87
|
Restart OMP after installation. The npm package includes the built adapter; users do not need esbuild or a manual build step. Disable any older ACP adapter for the same provider before loading this package.
|
|
@@ -379,6 +378,4 @@ The original local implementation also passed live Argon/Flash inference, effort
|
|
|
379
378
|
|
|
380
379
|
The generic catalog implementation passed a live refresh and Argon Low/High inference. Claude, GPT-OSS and future IDs are covered by offline catalog/selector fixtures; live inference for those models remains unverified until the ACP server advertises them.
|
|
381
380
|
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
MIT. See [LICENSE](LICENSE) and [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md). Upstream source is installed as a pinned npm dependency rather than vendored or modified. Official Google executables and their licenses are separate.
|
|
381
|
+
MIT. See [LICENSE](LICENSE) and [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md). Upstream source is vendored under `extension/vendor/pi-antigravity-acp-provider` (MIT) and kept with attribution. Official Google executables and their licenses are separate.
|
package/THIRD_PARTY_LICENSES.txt
CHANGED
|
@@ -766,35 +766,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
766
766
|
SOFTWARE.
|
|
767
767
|
|
|
768
768
|
|
|
769
|
-
============================================================
|
|
770
|
-
|
|
771
|
-
pi-antigravity-acp-provider@0.1.15
|
|
772
|
-
License: MIT
|
|
773
|
-
|
|
774
|
-
LICENSE
|
|
775
|
-
MIT License
|
|
776
|
-
|
|
777
|
-
Copyright (c) 2026 pi-gemini-acp-provider contributors
|
|
778
|
-
|
|
779
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
780
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
781
|
-
in the Software without restriction, including without limitation the rights
|
|
782
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
783
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
784
|
-
furnished to do so, subject to the following conditions:
|
|
785
|
-
|
|
786
|
-
The above copyright notice and this permission notice shall be included in all
|
|
787
|
-
copies or substantial portions of the Software.
|
|
788
|
-
|
|
789
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
790
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
791
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
792
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
793
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
794
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
795
|
-
SOFTWARE.
|
|
796
|
-
|
|
797
|
-
|
|
798
769
|
============================================================
|
|
799
770
|
|
|
800
771
|
process-nextick-args@2.0.1
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Third-party notices
|
|
2
2
|
|
|
3
|
-
omp-antigravity-acp-provider is an OMP-focused derivative fork/adaptation of [pi-antigravity-acp-provider](https://github.com/zacbemis/pi-antigravity-acp-provider), originally created by [zacbemis](https://github.com/zacbemis) and contributors and distributed under MIT. It
|
|
3
|
+
omp-antigravity-acp-provider is an OMP-focused derivative fork/adaptation of [pi-antigravity-acp-provider](https://github.com/zacbemis/pi-antigravity-acp-provider), originally created by [zacbemis](https://github.com/zacbemis) and contributors and distributed under MIT. It vendors upstream version 0.1.15 source under `extension/vendor/pi-antigravity-acp-provider` (see `extension/vendor/pi-antigravity-acp-provider/LICENSE`) and keeps attribution.
|
|
4
4
|
|
|
5
5
|
The upstream authors retain credit for the original ACP transport, authentication, runtime installation, session restoration and MCP bridge implementation.
|
|
6
6
|
|
package/extension/commands.ts
CHANGED
|
@@ -75,6 +75,7 @@ export interface CommandControllerDeps {
|
|
|
75
75
|
setPermissionModeState: (mode: string) => void;
|
|
76
76
|
getLastToolAudit: () => ToolAuditSummary | undefined;
|
|
77
77
|
getRuntimeForSession: (sessionId?: string) => RuntimeBundleView;
|
|
78
|
+
acquireRuntimeForSession?: (sessionId?: string) => { value: RuntimeBundleView; release: () => void };
|
|
78
79
|
peekRuntimeForSession: (sessionId?: string) => RuntimeBundleView | undefined;
|
|
79
80
|
getSavedSessionCount: () => number;
|
|
80
81
|
getPermissionMode: () => string;
|
|
@@ -185,19 +186,24 @@ export function createAntigravityCommandHandler(deps: CommandControllerDeps) {
|
|
|
185
186
|
await deps.auth.beginFreshGoogleLogin();
|
|
186
187
|
// Direct Antigravity Google login through the command UI. OMP's /login
|
|
187
188
|
// runs the same flow and additionally stores the provider marker.
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
189
|
+
const lease = deps.acquireRuntimeForSession ? deps.acquireRuntimeForSession() : { value: deps.getRuntimeForSession(), release: () => {} };
|
|
190
|
+
try {
|
|
191
|
+
await lease.value.provider.auth.oauth.login({
|
|
192
|
+
signal: undefined,
|
|
193
|
+
notify(event) {
|
|
194
|
+
const link = event.links?.[0];
|
|
195
|
+
if (link) ctx.ui.notify(`${event.message ?? "Open this URL to authorize:"}\n${link.url}`, "info");
|
|
196
|
+
else if (event.message) ctx.ui.notify(event.message, "info");
|
|
197
|
+
},
|
|
198
|
+
prompt: async (request) => {
|
|
199
|
+
const answer = await ctx.ui.input?.(request.message, request.placeholder);
|
|
200
|
+
if (!answer?.trim()) throw new Error("Antigravity OAuth login cancelled");
|
|
201
|
+
return answer;
|
|
202
|
+
},
|
|
203
|
+
});
|
|
204
|
+
} finally {
|
|
205
|
+
lease.release();
|
|
206
|
+
}
|
|
201
207
|
const auth = inspectAntigravityAuth();
|
|
202
208
|
const email = antigravityAccountEmail();
|
|
203
209
|
ctx.ui.notify(`Antigravity Google login finished${email ? ` as ${email}` : ""} — fresh sign-in; ACP auth: ${auth.status}${auth.authType ? ` (${auth.authType})` : ""}.`, "info");
|
package/extension/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// OMP 18.x adapter for pi-antigravity-acp-provider 0.1.15 (Pi 1.1 API).
|
|
2
|
-
//
|
|
1
|
+
// OMP 18.x adapter for vendored pi-antigravity-acp-provider 0.1.15 (Pi 1.1 API).
|
|
2
|
+
// Upstream source is vendored under ./vendor/pi-antigravity-acp-provider; keep it intact and translate only the provider registration contract.
|
|
3
3
|
import fs from "node:fs";
|
|
4
4
|
import os from "node:os";
|
|
5
5
|
import path from "node:path";
|
|
@@ -145,7 +145,7 @@ export async function registerOmpAdapter(pi: OmpHostApi, stateDir: string) {
|
|
|
145
145
|
pi.on("session_shutdown", async (_event: unknown, ctx: OmpCommandContext) => {
|
|
146
146
|
const sessionId = sessionIdOf(ctx);
|
|
147
147
|
if (sessionId) {
|
|
148
|
-
await Promise.all([runtimes.close(sessionId), runtimes.
|
|
148
|
+
await Promise.all([runtimes.close(sessionId), runtimes.closeIdle()]);
|
|
149
149
|
} else {
|
|
150
150
|
await runtimes.closeAll();
|
|
151
151
|
}
|
|
@@ -195,8 +195,8 @@ export async function registerOmpAdapter(pi: OmpHostApi, stateDir: string) {
|
|
|
195
195
|
const request = runtimes.values().map(bundle => bundle.runtime.getPermission(params.requestId)).find(Boolean);
|
|
196
196
|
if (!request) throw new Error("Permission request expired or missing");
|
|
197
197
|
const labels = request.options.map((option: { label: string }) => option.label);
|
|
198
|
-
const selected = await ctx.ui.select
|
|
199
|
-
const optionId = request.options[labels.indexOf(selected)]?.id;
|
|
198
|
+
const selected = await ctx.ui.select?.(request.title, labels);
|
|
199
|
+
const optionId = selected !== undefined ? request.options[labels.indexOf(selected)]?.id : undefined;
|
|
200
200
|
return {
|
|
201
201
|
content: [{ type: "text", text: optionId ? `Permission: ${selected}` : "Permission denied." }],
|
|
202
202
|
details: { kind: PERMISSION_RESULT_KIND, requestId: request.id, optionId, cancelled: !optionId },
|
|
@@ -231,6 +231,7 @@ export async function registerOmpAdapter(pi: OmpHostApi, stateDir: string) {
|
|
|
231
231
|
setPermissionModeState: mode => { permissionMode = mode; },
|
|
232
232
|
getLastToolAudit: () => lastToolAudit,
|
|
233
233
|
getRuntimeForSession: sessionId => runtimes.get(sessionId),
|
|
234
|
+
acquireRuntimeForSession: sessionId => runtimes.acquire(sessionId),
|
|
234
235
|
peekRuntimeForSession: sessionId => runtimes.peek(sessionId),
|
|
235
236
|
getSavedSessionCount: savedSessionCount,
|
|
236
237
|
getPermissionMode: () => permissionMode,
|
|
@@ -346,19 +347,24 @@ export async function registerOmpAdapter(pi: OmpHostApi, stateDir: string) {
|
|
|
346
347
|
// Always offer a fresh Google sign-in; without this a new server
|
|
347
348
|
// process silently reuses the saved login and keeps the old account.
|
|
348
349
|
await auth.beginFreshGoogleLogin();
|
|
349
|
-
const
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
350
|
+
const lease = runtimes.acquire();
|
|
351
|
+
try {
|
|
352
|
+
const result = await lease.value.provider.auth.oauth.login({
|
|
353
|
+
signal: callbacks.signal,
|
|
354
|
+
notify(event: { message?: string; links?: Array<{ url: string }> }) {
|
|
355
|
+
if (event.links?.length) {
|
|
356
|
+
for (const link of event.links) callbacks.onAuth({ url: link.url, instructions: event.message });
|
|
357
|
+
} else callbacks.onProgress?.(event.message);
|
|
358
|
+
},
|
|
359
|
+
prompt: (request: { message: string; placeholder?: string }) => callbacks.onPrompt({ message: request.message, placeholder: request.placeholder }),
|
|
360
|
+
});
|
|
361
|
+
// Record the signed-in account on the marker credential so OMP's
|
|
362
|
+
// account list can label it; the email is identity data, not a secret.
|
|
363
|
+
const email = antigravityAccountEmail();
|
|
364
|
+
return email ? { ...result, email } : result;
|
|
365
|
+
} finally {
|
|
366
|
+
lease.release();
|
|
367
|
+
}
|
|
362
368
|
},
|
|
363
369
|
refreshToken: (credentials: unknown) => runtimes.get().provider.auth.oauth.refresh(credentials),
|
|
364
370
|
getApiKey: () => MARKER,
|
|
@@ -79,6 +79,13 @@ export class SessionRuntimePool<T> {
|
|
|
79
79
|
return [...this.entries.values()];
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
+
async closeIdle(sessionId?: string): Promise<boolean> {
|
|
83
|
+
const entry = this.entries.get(sessionId);
|
|
84
|
+
if (!entry || this.leases.has(entry) || this.idle.canDispose?.(entry) === false) return false;
|
|
85
|
+
await this.close(sessionId);
|
|
86
|
+
return true;
|
|
87
|
+
}
|
|
88
|
+
|
|
82
89
|
async close(sessionId?: string): Promise<void> {
|
|
83
90
|
const entry = this.entries.get(sessionId);
|
|
84
91
|
// Detach before awaiting teardown so a new turn cannot reuse a closed runtime.
|
package/extension/runtime.mjs
CHANGED
|
@@ -18906,12 +18906,12 @@ var require_content_type = __commonJS({
|
|
|
18906
18906
|
}
|
|
18907
18907
|
});
|
|
18908
18908
|
|
|
18909
|
-
//
|
|
18909
|
+
// extension/vendor/pi-antigravity-acp-provider/src/acp/antigravity.ts
|
|
18910
18910
|
import fs from "node:fs";
|
|
18911
18911
|
import os from "node:os";
|
|
18912
18912
|
import path from "node:path";
|
|
18913
18913
|
|
|
18914
|
-
//
|
|
18914
|
+
// extension/vendor/pi-antigravity-acp-provider/src/acp/errors.ts
|
|
18915
18915
|
var AntigravityAcpError = class extends Error {
|
|
18916
18916
|
constructor(code, message, options) {
|
|
18917
18917
|
super(message, options);
|
|
@@ -18934,7 +18934,7 @@ function redact(text) {
|
|
|
18934
18934
|
).slice(0, 4096);
|
|
18935
18935
|
}
|
|
18936
18936
|
|
|
18937
|
-
//
|
|
18937
|
+
// extension/vendor/pi-antigravity-acp-provider/src/acp/antigravity.ts
|
|
18938
18938
|
function resolveAntigravityAcpLaunch() {
|
|
18939
18939
|
const env2 = process.env.AGY_ACP_BIN?.trim();
|
|
18940
18940
|
if (env2) {
|
|
@@ -19046,7 +19046,7 @@ function expandHome(file2, home = os.homedir()) {
|
|
|
19046
19046
|
return file2 === "~" || file2.startsWith("~/") ? path.join(home, file2.slice(1)) : file2;
|
|
19047
19047
|
}
|
|
19048
19048
|
|
|
19049
|
-
//
|
|
19049
|
+
// extension/vendor/pi-antigravity-acp-provider/src/models.ts
|
|
19050
19050
|
var PROVIDER_ID = "antigravity-acp";
|
|
19051
19051
|
var API_ID = "antigravity-acp";
|
|
19052
19052
|
var ZERO_COST = { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 };
|
|
@@ -19569,7 +19569,7 @@ function collapseSystemMessages(context) {
|
|
|
19569
19569
|
return { messages: head ? [head, ...messages] : messages };
|
|
19570
19570
|
}
|
|
19571
19571
|
|
|
19572
|
-
//
|
|
19572
|
+
// extension/vendor/pi-antigravity-acp-provider/src/runtime.ts
|
|
19573
19573
|
import { createHash as createHash3 } from "node:crypto";
|
|
19574
19574
|
|
|
19575
19575
|
// node_modules/@agentclientprotocol/sdk/dist/schema/index.js
|
|
@@ -43450,7 +43450,7 @@ var ClientSideConnection = class {
|
|
|
43450
43450
|
}
|
|
43451
43451
|
};
|
|
43452
43452
|
|
|
43453
|
-
//
|
|
43453
|
+
// extension/vendor/pi-antigravity-acp-provider/package.json
|
|
43454
43454
|
var package_default = {
|
|
43455
43455
|
name: "pi-antigravity-acp-provider",
|
|
43456
43456
|
version: "0.1.15",
|
|
@@ -43538,13 +43538,13 @@ var package_default = {
|
|
|
43538
43538
|
}
|
|
43539
43539
|
};
|
|
43540
43540
|
|
|
43541
|
-
//
|
|
43541
|
+
// extension/vendor/pi-antigravity-acp-provider/src/constants.ts
|
|
43542
43542
|
var PACKAGE_VERSION = package_default.version;
|
|
43543
43543
|
var MANAGED_AUTH_MARKER = "pi-antigravity-acp:managed-by-antigravity";
|
|
43544
43544
|
var PERMISSION_TOOL_NAME = "antigravity_acp_permission";
|
|
43545
43545
|
var PERMISSION_RESULT_KIND = "pi-antigravity-acp-permission-v1";
|
|
43546
43546
|
|
|
43547
|
-
//
|
|
43547
|
+
// extension/vendor/pi-antigravity-acp-provider/src/acp/bounded-stream.ts
|
|
43548
43548
|
var DEFAULT_MAX_FRAME_BYTES = 32 * 1024 * 1024;
|
|
43549
43549
|
function boundedNdjsonStream(output2, input2, options = {}) {
|
|
43550
43550
|
const maxFrameBytes = options.maxFrameBytes ?? DEFAULT_MAX_FRAME_BYTES;
|
|
@@ -43652,14 +43652,14 @@ function isMessage(value) {
|
|
|
43652
43652
|
return typeof record3.method === "string" || "id" in record3;
|
|
43653
43653
|
}
|
|
43654
43654
|
|
|
43655
|
-
//
|
|
43655
|
+
// extension/vendor/pi-antigravity-acp-provider/src/acp/process.ts
|
|
43656
43656
|
import fs2 from "node:fs";
|
|
43657
43657
|
import { spawn } from "node:child_process";
|
|
43658
43658
|
import path3 from "node:path";
|
|
43659
43659
|
import { Readable, Writable } from "node:stream";
|
|
43660
43660
|
import { fileURLToPath } from "node:url";
|
|
43661
43661
|
|
|
43662
|
-
//
|
|
43662
|
+
// extension/vendor/pi-antigravity-acp-provider/src/acp/proxy.ts
|
|
43663
43663
|
import { execFileSync } from "node:child_process";
|
|
43664
43664
|
function applyAcpProxyEnvironment(env2, platform = process.platform, readSystemProxy = () => execFileSync("/usr/sbin/scutil", ["--proxy"], {
|
|
43665
43665
|
encoding: "utf8",
|
|
@@ -43707,7 +43707,7 @@ function setProxy(env2, url2) {
|
|
|
43707
43707
|
for (const key of PROXY_KEYS) env2[key] = url2;
|
|
43708
43708
|
}
|
|
43709
43709
|
|
|
43710
|
-
//
|
|
43710
|
+
// extension/vendor/pi-antigravity-acp-provider/src/acp/credential-storage.ts
|
|
43711
43711
|
import { execFileSync as execFileSync2 } from "node:child_process";
|
|
43712
43712
|
import path2 from "node:path";
|
|
43713
43713
|
var FORCE_FILE_STORAGE_ENV = "AGY_ACP_FORCE_FILE_STORAGE";
|
|
@@ -43762,7 +43762,7 @@ function describeCredentialStorage(options = {}) {
|
|
|
43762
43762
|
}
|
|
43763
43763
|
}
|
|
43764
43764
|
|
|
43765
|
-
//
|
|
43765
|
+
// extension/vendor/pi-antigravity-acp-provider/src/acp/process.ts
|
|
43766
43766
|
var STDERR_LIMIT = 16 * 1024;
|
|
43767
43767
|
var KILL_GRACE_MS = 1500;
|
|
43768
43768
|
var nextGeneration = 1;
|
|
@@ -43934,7 +43934,7 @@ function delay(ms) {
|
|
|
43934
43934
|
});
|
|
43935
43935
|
}
|
|
43936
43936
|
|
|
43937
|
-
//
|
|
43937
|
+
// extension/vendor/pi-antigravity-acp-provider/src/acp/prompt-watchdog.ts
|
|
43938
43938
|
var PromptWatchdog = class {
|
|
43939
43939
|
constructor(idleMs, workIdleMs, onTimeout) {
|
|
43940
43940
|
this.idleMs = idleMs;
|
|
@@ -44007,7 +44007,7 @@ var PromptWatchdog = class {
|
|
|
44007
44007
|
}
|
|
44008
44008
|
};
|
|
44009
44009
|
|
|
44010
|
-
//
|
|
44010
|
+
// extension/vendor/pi-antigravity-acp-provider/src/acp/session-state.ts
|
|
44011
44011
|
var valueSchema = external_exports.object({ value: external_exports.string(), name: external_exports.string() });
|
|
44012
44012
|
var selectorBase = { id: external_exports.string(), name: external_exports.string(), category: external_exports.string().nullish() };
|
|
44013
44013
|
var stateSchema = external_exports.object({
|
|
@@ -44051,7 +44051,7 @@ function sessionModes(state) {
|
|
|
44051
44051
|
};
|
|
44052
44052
|
}
|
|
44053
44053
|
|
|
44054
|
-
//
|
|
44054
|
+
// extension/vendor/pi-antigravity-acp-provider/src/acp/connection.ts
|
|
44055
44055
|
var DEFAULT_OPERATION_TIMEOUT_MS = 12e4;
|
|
44056
44056
|
var AntigravityAcpConnection = class {
|
|
44057
44057
|
process;
|
|
@@ -44407,7 +44407,7 @@ import path5 from "node:path";
|
|
|
44407
44407
|
import { createHash, randomUUID } from "node:crypto";
|
|
44408
44408
|
import { setTimeout as delay2 } from "node:timers/promises";
|
|
44409
44409
|
|
|
44410
|
-
//
|
|
44410
|
+
// extension/vendor/pi-antigravity-acp-provider/src/config.ts
|
|
44411
44411
|
import fs3 from "node:fs";
|
|
44412
44412
|
import os2 from "node:os";
|
|
44413
44413
|
import path4 from "node:path";
|
|
@@ -44605,7 +44605,7 @@ var AcpSessionStore = class {
|
|
|
44605
44605
|
}
|
|
44606
44606
|
};
|
|
44607
44607
|
|
|
44608
|
-
//
|
|
44608
|
+
// extension/vendor/pi-antigravity-acp-provider/src/acp/events.ts
|
|
44609
44609
|
function mapSessionUpdate(notification) {
|
|
44610
44610
|
const update = notification.update;
|
|
44611
44611
|
switch (update.sessionUpdate) {
|
|
@@ -44666,7 +44666,7 @@ function clean(value) {
|
|
|
44666
44666
|
return value.replace(/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]/gu, "").slice(0, 2e3);
|
|
44667
44667
|
}
|
|
44668
44668
|
|
|
44669
|
-
//
|
|
44669
|
+
// extension/vendor/pi-antigravity-acp-provider/src/acp/setup.ts
|
|
44670
44670
|
var import_unzipper = __toESM(require_unzip2(), 1);
|
|
44671
44671
|
import { execFile } from "node:child_process";
|
|
44672
44672
|
import { createHash as createHash2 } from "node:crypto";
|
|
@@ -44676,7 +44676,7 @@ import path6 from "node:path";
|
|
|
44676
44676
|
import { pipeline } from "node:stream/promises";
|
|
44677
44677
|
import { promisify } from "node:util";
|
|
44678
44678
|
|
|
44679
|
-
//
|
|
44679
|
+
// extension/vendor/pi-antigravity-acp-provider/src/acp/runtime-manifest.ts
|
|
44680
44680
|
import { verify } from "node:crypto";
|
|
44681
44681
|
import fs5 from "node:fs";
|
|
44682
44682
|
var MANIFEST_PUBLIC_KEY = `-----BEGIN PUBLIC KEY-----
|
|
@@ -44798,7 +44798,7 @@ function versionParts(value) {
|
|
|
44798
44798
|
return parts;
|
|
44799
44799
|
}
|
|
44800
44800
|
|
|
44801
|
-
//
|
|
44801
|
+
// extension/vendor/pi-antigravity-acp-provider/src/acp/setup.ts
|
|
44802
44802
|
var execFileAsync = promisify(execFile);
|
|
44803
44803
|
var REGISTRY_URL = "https://raw.githubusercontent.com/agentclientprotocol/registry/main/antigravity-acp/agent.json";
|
|
44804
44804
|
var INSTALL_TIMEOUT_MS = 45 * 6e4;
|
|
@@ -45312,7 +45312,7 @@ function delay3(ms) {
|
|
|
45312
45312
|
});
|
|
45313
45313
|
}
|
|
45314
45314
|
|
|
45315
|
-
//
|
|
45315
|
+
// extension/vendor/pi-antigravity-acp-provider/src/acp/headless-oauth.ts
|
|
45316
45316
|
import fs7 from "node:fs";
|
|
45317
45317
|
import os4 from "node:os";
|
|
45318
45318
|
import path7 from "node:path";
|
|
@@ -50869,7 +50869,7 @@ var StreamableHTTPServerTransport = class {
|
|
|
50869
50869
|
}
|
|
50870
50870
|
};
|
|
50871
50871
|
|
|
50872
|
-
//
|
|
50872
|
+
// extension/vendor/pi-antigravity-acp-provider/src/mcp/bridge.ts
|
|
50873
50873
|
import { timingSafeEqual } from "node:crypto";
|
|
50874
50874
|
import { createServer as createServer2 } from "node:http";
|
|
50875
50875
|
|
|
@@ -58954,7 +58954,7 @@ __export(value_exports, {
|
|
|
58954
58954
|
Repair: () => Repair
|
|
58955
58955
|
});
|
|
58956
58956
|
|
|
58957
|
-
//
|
|
58957
|
+
// extension/vendor/pi-antigravity-acp-provider/src/mcp/schema.ts
|
|
58958
58958
|
import { types as types3 } from "node:util";
|
|
58959
58959
|
var SCHEMA_LIMIT = 64 * 1024;
|
|
58960
58960
|
var MAX_SCHEMA_WORK = 1e5;
|
|
@@ -59148,7 +59148,7 @@ function jsonScalar(value) {
|
|
|
59148
59148
|
return value === null || typeof value === "string" || typeof value === "boolean";
|
|
59149
59149
|
}
|
|
59150
59150
|
|
|
59151
|
-
//
|
|
59151
|
+
// extension/vendor/pi-antigravity-acp-provider/src/mcp/bridge.ts
|
|
59152
59152
|
var BODY_LIMIT = 1024 * 1024;
|
|
59153
59153
|
var MAX_TOOLS = 64;
|
|
59154
59154
|
function piToolFingerprint(tools) {
|
|
@@ -59477,7 +59477,7 @@ ${instructions}` : "";
|
|
|
59477
59477
|
return { prompt, messageCount: messages.length };
|
|
59478
59478
|
}
|
|
59479
59479
|
|
|
59480
|
-
//
|
|
59480
|
+
// extension/vendor/pi-antigravity-acp-provider/src/stream/json.ts
|
|
59481
59481
|
function isJsonObject(value) {
|
|
59482
59482
|
return value !== null && typeof value === "object" && !Array.isArray(value) && isJsonValue(value, 0);
|
|
59483
59483
|
}
|
|
@@ -59492,7 +59492,7 @@ function isJsonValue(value, depth) {
|
|
|
59492
59492
|
return Object.values(value).every((item) => isJsonValue(item, depth + 1));
|
|
59493
59493
|
}
|
|
59494
59494
|
|
|
59495
|
-
//
|
|
59495
|
+
// extension/vendor/pi-antigravity-acp-provider/src/stream/usage.ts
|
|
59496
59496
|
function emptyUsage() {
|
|
59497
59497
|
return {
|
|
59498
59498
|
input: 0,
|
|
@@ -59525,7 +59525,7 @@ function asRecord(value) {
|
|
|
59525
59525
|
return value && typeof value === "object" ? value : void 0;
|
|
59526
59526
|
}
|
|
59527
59527
|
|
|
59528
|
-
//
|
|
59528
|
+
// extension/vendor/pi-antigravity-acp-provider/src/stream/pi-events.ts
|
|
59529
59529
|
var PiEventWriter = class {
|
|
59530
59530
|
stream;
|
|
59531
59531
|
message;
|
|
@@ -59652,7 +59652,7 @@ function usageFromPrompt2(response) {
|
|
|
59652
59652
|
return usage;
|
|
59653
59653
|
}
|
|
59654
59654
|
|
|
59655
|
-
//
|
|
59655
|
+
// extension/vendor/pi-antigravity-acp-provider/src/status.ts
|
|
59656
59656
|
var RuntimeMetrics = class {
|
|
59657
59657
|
totals = {
|
|
59658
59658
|
turns: 0,
|
|
@@ -59704,7 +59704,7 @@ function number4(value) {
|
|
|
59704
59704
|
return typeof value === "number" && Number.isFinite(value) && value >= 0 ? value : void 0;
|
|
59705
59705
|
}
|
|
59706
59706
|
|
|
59707
|
-
//
|
|
59707
|
+
// extension/vendor/pi-antigravity-acp-provider/src/runtime.ts
|
|
59708
59708
|
var ompMessageFingerprintMemo = createHistoryFingerprintMemo();
|
|
59709
59709
|
var PERMISSION_TIMEOUT_MS = 12e4;
|
|
59710
59710
|
var TOOL_BATCH_MS = 100;
|
|
@@ -60242,13 +60242,28 @@ var AntigravityRuntime = class {
|
|
|
60242
60242
|
void connection.close().catch(() => {
|
|
60243
60243
|
});
|
|
60244
60244
|
});
|
|
60245
|
-
|
|
60245
|
+
let releaseDone;
|
|
60246
|
+
const releaseOwned = async () => {
|
|
60247
|
+
if (releaseDone) return releaseDone;
|
|
60248
|
+
releaseDone = releaseOwnedLease().catch(() => {
|
|
60249
|
+
});
|
|
60250
|
+
return releaseDone;
|
|
60251
|
+
};
|
|
60252
|
+
releaseLease = async (wait = false) => {
|
|
60246
60253
|
if (connection.process.alive) {
|
|
60247
|
-
|
|
60248
|
-
|
|
60249
|
-
|
|
60254
|
+
if (wait) {
|
|
60255
|
+
await Promise.race([
|
|
60256
|
+
connection.process.exited,
|
|
60257
|
+
new Promise((resolve) => setTimeout(resolve, 2e3))
|
|
60258
|
+
]).catch(() => {
|
|
60259
|
+
});
|
|
60260
|
+
} else {
|
|
60261
|
+
void connection.process.exited.then(releaseOwned).catch(() => {
|
|
60262
|
+
});
|
|
60263
|
+
return;
|
|
60264
|
+
}
|
|
60250
60265
|
}
|
|
60251
|
-
await
|
|
60266
|
+
await releaseOwned();
|
|
60252
60267
|
};
|
|
60253
60268
|
this.assertEpoch(epoch);
|
|
60254
60269
|
}
|
|
@@ -60481,7 +60496,7 @@ var AntigravityRuntime = class {
|
|
|
60481
60496
|
}
|
|
60482
60497
|
} finally {
|
|
60483
60498
|
await closing;
|
|
60484
|
-
await binding.ompReleaseLease?.();
|
|
60499
|
+
await binding.ompReleaseLease?.(true);
|
|
60485
60500
|
if (current && await current === binding && this.bindings.get(key) === current) this.bindings.delete(key);
|
|
60486
60501
|
}
|
|
60487
60502
|
})();
|
|
@@ -60677,7 +60692,7 @@ function isAbort(error62) {
|
|
|
60677
60692
|
return error62 instanceof AntigravityAcpError ? error62.code === "aborted" : error62 instanceof DOMException && error62.name === "AbortError";
|
|
60678
60693
|
}
|
|
60679
60694
|
|
|
60680
|
-
//
|
|
60695
|
+
// extension/vendor/pi-antigravity-acp-provider/src/provider.ts
|
|
60681
60696
|
function createAntigravityProvider(runtime = new AntigravityRuntime()) {
|
|
60682
60697
|
let models = [...FALLBACK_MODELS];
|
|
60683
60698
|
const provider = {
|
|
@@ -3,7 +3,7 @@ import afs from "node:fs/promises";
|
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { createHash, randomUUID } from "node:crypto";
|
|
5
5
|
import { lock } from "proper-lockfile";
|
|
6
|
-
import { resolveAntigravityAcpDirectory } from "pi-antigravity-acp-provider/src/acp/antigravity.ts";
|
|
6
|
+
import { resolveAntigravityAcpDirectory } from "./vendor/pi-antigravity-acp-provider/src/acp/antigravity.ts";
|
|
7
7
|
import { isMissingFileError, writeJsonAtomic } from "./fs-atomic.ts";
|
|
8
8
|
import { AcpSessionStore } from "./session-store.ts";
|
|
9
9
|
import { sourceRoot, sourceId, findSources, type OmpSessionSource } from "./omp-session-source.ts";
|
|
@@ -3,7 +3,7 @@ import path from "node:path";
|
|
|
3
3
|
import { createHash, randomUUID } from "node:crypto";
|
|
4
4
|
import { setTimeout as delay } from "node:timers/promises";
|
|
5
5
|
import { lock } from "proper-lockfile";
|
|
6
|
-
import { resolvePiAgentDir } from "pi-antigravity-acp-provider/src/config.ts";
|
|
6
|
+
import { resolvePiAgentDir } from "./vendor/pi-antigravity-acp-provider/src/config.ts";
|
|
7
7
|
|
|
8
8
|
interface SavedSessionRecord {
|
|
9
9
|
piSessionId: string; acpSessionId: string; acpModelId: string; cwd: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
// Compatibility seam for pi-antigravity-acp-provider 0.1.15 / ACP server 1.4.x.
|
|
2
|
-
// OMP effort ->
|
|
3
|
-
import { AntigravityAcpConnection } from "pi-antigravity-acp-provider/src/acp/connection.ts";
|
|
1
|
+
// Compatibility seam for vendored pi-antigravity-acp-provider 0.1.15 / ACP server 1.4.x.
|
|
2
|
+
// OMP effort -> vendored advertised legacy ID -> official model/thought selectors.
|
|
3
|
+
import { AntigravityAcpConnection } from "./vendor/pi-antigravity-acp-provider/src/acp/connection.ts";
|
|
4
4
|
import { choices, resolveSelection, selector } from "./selectors.ts";
|
|
5
5
|
import { installSessionRouting, type NativeToolMode } from "./tool-routing.ts";
|
|
6
6
|
import { showAcpUpdate } from "./activity-presentation.ts";
|
package/extension/usage.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { usageFromPrompt as upstreamUsage } from "pi-antigravity-acp-provider/src/stream/usage.ts";
|
|
1
|
+
import { usageFromPrompt as upstreamUsage } from "./vendor/pi-antigravity-acp-provider/src/stream/usage.ts";
|
|
2
2
|
|
|
3
3
|
// Named shape of the upstream usage projection (pi-ai Usage) plus this
|
|
4
4
|
// adapter's contextTokens extension, so callers never depend on
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 pi-gemini-acp-provider contributors
|
|
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.
|