omp-antigravity-acp-provider 0.1.24 → 0.1.25

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 (48) hide show
  1. package/README.md +6 -9
  2. package/THIRD_PARTY_LICENSES.txt +0 -29
  3. package/THIRD_PARTY_NOTICES.md +1 -1
  4. package/extension/index.ts +2 -2
  5. package/extension/runtime.mjs +30 -30
  6. package/extension/session-cleanup.ts +1 -1
  7. package/extension/session-store.ts +1 -1
  8. package/extension/tier-connection.ts +3 -3
  9. package/extension/usage.ts +1 -1
  10. package/extension/vendor/pi-antigravity-acp-provider/LICENSE +21 -0
  11. package/extension/vendor/pi-antigravity-acp-provider/README.upstream.md +144 -0
  12. package/extension/vendor/pi-antigravity-acp-provider/package.json +86 -0
  13. package/extension/vendor/pi-antigravity-acp-provider/runtime-manifest.json +205 -0
  14. package/extension/vendor/pi-antigravity-acp-provider/src/acp/antigravity.ts +170 -0
  15. package/extension/vendor/pi-antigravity-acp-provider/src/acp/bounded-stream.ts +148 -0
  16. package/extension/vendor/pi-antigravity-acp-provider/src/acp/connection.ts +443 -0
  17. package/extension/vendor/pi-antigravity-acp-provider/src/acp/credential-storage.ts +113 -0
  18. package/extension/vendor/pi-antigravity-acp-provider/src/acp/errors.ts +42 -0
  19. package/extension/vendor/pi-antigravity-acp-provider/src/acp/events.ts +66 -0
  20. package/extension/vendor/pi-antigravity-acp-provider/src/acp/headless-oauth.ts +196 -0
  21. package/extension/vendor/pi-antigravity-acp-provider/src/acp/index.ts +8 -0
  22. package/extension/vendor/pi-antigravity-acp-provider/src/acp/integrity.ts +64 -0
  23. package/extension/vendor/pi-antigravity-acp-provider/src/acp/process.ts +256 -0
  24. package/extension/vendor/pi-antigravity-acp-provider/src/acp/prompt-watchdog.ts +80 -0
  25. package/extension/vendor/pi-antigravity-acp-provider/src/acp/proxy.ts +54 -0
  26. package/extension/vendor/pi-antigravity-acp-provider/src/acp/runtime-manifest.ts +183 -0
  27. package/extension/vendor/pi-antigravity-acp-provider/src/acp/session-state.ts +76 -0
  28. package/extension/vendor/pi-antigravity-acp-provider/src/acp/session-store.ts +88 -0
  29. package/extension/vendor/pi-antigravity-acp-provider/src/acp/setup.ts +793 -0
  30. package/extension/vendor/pi-antigravity-acp-provider/src/acp/store-lock.ts +24 -0
  31. package/extension/vendor/pi-antigravity-acp-provider/src/acp/supervisor.mjs +101 -0
  32. package/extension/vendor/pi-antigravity-acp-provider/src/config.ts +114 -0
  33. package/extension/vendor/pi-antigravity-acp-provider/src/constants.ts +10 -0
  34. package/extension/vendor/pi-antigravity-acp-provider/src/index.ts +8 -0
  35. package/extension/vendor/pi-antigravity-acp-provider/src/mcp/bridge.ts +217 -0
  36. package/extension/vendor/pi-antigravity-acp-provider/src/mcp/schema.ts +223 -0
  37. package/extension/vendor/pi-antigravity-acp-provider/src/models.ts +192 -0
  38. package/extension/vendor/pi-antigravity-acp-provider/src/provider.ts +149 -0
  39. package/extension/vendor/pi-antigravity-acp-provider/src/runtime.ts +1116 -0
  40. package/extension/vendor/pi-antigravity-acp-provider/src/status.ts +77 -0
  41. package/extension/vendor/pi-antigravity-acp-provider/src/stream/context.ts +249 -0
  42. package/extension/vendor/pi-antigravity-acp-provider/src/stream/index.ts +3 -0
  43. package/extension/vendor/pi-antigravity-acp-provider/src/stream/json.ts +17 -0
  44. package/extension/vendor/pi-antigravity-acp-provider/src/stream/pi-events.ts +141 -0
  45. package/extension/vendor/pi-antigravity-acp-provider/src/stream/usage.ts +37 -0
  46. package/extension/vendor/pi-antigravity-acp-provider/src/wizard.ts +83 -0
  47. package/package.json +6 -3
  48. package/scripts/build.mjs +1 -3
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 keeps the OMP adapter sources separately and uses upstream version **0.1.15** as an unmodified, pinned build dependency. 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.
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.24 protects cross-process session ownership even when ACP shutdown times out, isolates adapter state by OMP agent directory, and preserves registries with unsupported records. Restart all OMP processes after upgrading so they participate in session ownership.
21
+ Version 0.1.25 vendors `pi-antigravity-acp-provider 0.1.15` source for direct local modification 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.24 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.
23
+ Version 0.1.25 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.24** 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.
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.25** 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.24
84
+ omp plugin install npm:omp-antigravity-acp-provider@0.1.25
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
- ## License and attribution
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.
@@ -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
@@ -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 uses upstream version 0.1.15 as an unmodified npm dependency.
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
 
@@ -1,5 +1,5 @@
1
- // OMP 18.x adapter for pi-antigravity-acp-provider 0.1.15 (Pi 1.1 API).
2
- // Keep upstream code intact; translate only the provider registration contract.
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";
@@ -18906,12 +18906,12 @@ var require_content_type = __commonJS({
18906
18906
  }
18907
18907
  });
18908
18908
 
18909
- // node_modules/pi-antigravity-acp-provider/src/acp/antigravity.ts
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
- // node_modules/pi-antigravity-acp-provider/src/acp/errors.ts
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
- // node_modules/pi-antigravity-acp-provider/src/acp/antigravity.ts
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
- // node_modules/pi-antigravity-acp-provider/src/models.ts
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
- // node_modules/pi-antigravity-acp-provider/src/runtime.ts
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
- // node_modules/pi-antigravity-acp-provider/package.json
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
- // node_modules/pi-antigravity-acp-provider/src/constants.ts
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
- // node_modules/pi-antigravity-acp-provider/src/acp/bounded-stream.ts
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
- // node_modules/pi-antigravity-acp-provider/src/acp/process.ts
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
- // node_modules/pi-antigravity-acp-provider/src/acp/proxy.ts
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
- // node_modules/pi-antigravity-acp-provider/src/acp/credential-storage.ts
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
- // node_modules/pi-antigravity-acp-provider/src/acp/process.ts
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
- // node_modules/pi-antigravity-acp-provider/src/acp/prompt-watchdog.ts
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
- // node_modules/pi-antigravity-acp-provider/src/acp/session-state.ts
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
- // node_modules/pi-antigravity-acp-provider/src/acp/connection.ts
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
- // node_modules/pi-antigravity-acp-provider/src/config.ts
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
- // node_modules/pi-antigravity-acp-provider/src/acp/events.ts
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
- // node_modules/pi-antigravity-acp-provider/src/acp/setup.ts
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
- // node_modules/pi-antigravity-acp-provider/src/acp/runtime-manifest.ts
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
- // node_modules/pi-antigravity-acp-provider/src/acp/setup.ts
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
- // node_modules/pi-antigravity-acp-provider/src/acp/headless-oauth.ts
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
- // node_modules/pi-antigravity-acp-provider/src/mcp/bridge.ts
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
- // node_modules/pi-antigravity-acp-provider/src/mcp/schema.ts
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
- // node_modules/pi-antigravity-acp-provider/src/mcp/bridge.ts
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
- // node_modules/pi-antigravity-acp-provider/src/stream/json.ts
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
- // node_modules/pi-antigravity-acp-provider/src/stream/usage.ts
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
- // node_modules/pi-antigravity-acp-provider/src/stream/pi-events.ts
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
- // node_modules/pi-antigravity-acp-provider/src/status.ts
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
- // node_modules/pi-antigravity-acp-provider/src/runtime.ts
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;
@@ -60677,7 +60677,7 @@ function isAbort(error62) {
60677
60677
  return error62 instanceof AntigravityAcpError ? error62.code === "aborted" : error62 instanceof DOMException && error62.name === "AbortError";
60678
60678
  }
60679
60679
 
60680
- // node_modules/pi-antigravity-acp-provider/src/provider.ts
60680
+ // extension/vendor/pi-antigravity-acp-provider/src/provider.ts
60681
60681
  function createAntigravityProvider(runtime = new AntigravityRuntime()) {
60682
60682
  let models = [...FALLBACK_MODELS];
60683
60683
  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 -> upstream advertised legacy ID -> official model/thought selectors.
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";
@@ -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.
@@ -0,0 +1,144 @@
1
+ # pi-antigravity-acp-provider
2
+
3
+ A first-class [Pi](https://github.com/earendil-works/pi) provider for **Google Antigravity** through its official ACP server.
4
+
5
+ > **Important:** this package no longer uses `@google/gemini-cli`. The Gemini CLI individual Code Assist login path was retired and is not a supported authentication route. Antigravity/`agy` is the target runtime.
6
+
7
+ ## Features
8
+
9
+ - Registers `antigravity-acp/*` models backed by Google Antigravity.
10
+ - Uses ACP protocol v1 and the official TypeScript SDK.
11
+ - Collapses Antigravity's effort-qualified IDs into one entry per model; Pi's Shift+Tab reasoning control selects low/medium/high dynamically.
12
+ - Supports Pi streaming, cancellation, usage/quota metadata, lifecycle cleanup, and persisted ACP session restoration across Pi restarts.
13
+ - Routes compatible Pi tools through an authenticated loopback MCP bridge; doctor/status names omitted tools and their reasons.
14
+ - Supports persisted `default`, `auto-edit`, and `yolo` Antigravity permission modes. The requested default is `yolo`; switching to a prompting mode retains the single-use, fail-closed Pi permission broker.
15
+ - Advertises no ACP filesystem or terminal client capabilities.
16
+ - Provides setup, auth-health, logout/account-switching, qualification, quota, and runtime-update commands.
17
+ - Automatically checks for newer managed ACP runtimes once per day, with `automatic`, `notify`, and `manual` update modes.
18
+ - Uses an Ed25519-signed runtime catalog with exact Google artifact URLs, archive hashes and sizes, strict two-file extraction, pre-activation ACP identity/version validation, immutable releases, rollback retention, musl rejection, macOS quarantine cleanup, and Windows process-tree handling.
19
+
20
+ ## New-user setup
21
+
22
+ Install from the official Pi package gallery/npm:
23
+
24
+ ```bash
25
+ pi install npm:pi-antigravity-acp-provider
26
+ pi
27
+ ```
28
+
29
+ To run from source instead:
30
+
31
+ ```bash
32
+ git clone https://github.com/zacbemis/pi-antigravity-acp-provider.git
33
+ cd pi-antigravity-acp-provider
34
+ npm install
35
+ pi --no-extensions -e ./extensions/index.ts
36
+ ```
37
+
38
+ In Pi:
39
+
40
+ 1. Optionally run `/antigravity-acp setup` for a runtime/auth preflight.
41
+ 2. Run `/login`.
42
+ 3. Choose **Sign in with an account**.
43
+ 4. Choose **Google Antigravity (ACP)**.
44
+ 5. If needed, wait for the official ACP server download and extraction. Progress is shown; the Linux build observed during development expands to about 1.8 GB.
45
+ 6. Complete the Google login in the browser.
46
+ 7. Run `/antigravity-acp setup` again to perform a network auth probe and model discovery.
47
+ 8. Run `/model` and select one of the `antigravity-acp` models.
48
+ 9. Press **Shift+Tab** to choose the reasoning effort. Only tiers advertised by Antigravity are exposed. A model with a single tier (for example Argon Medium during rollout) remains a reasoning model with that tier; the provider does not invent Low/High variants.
49
+ 10. Send a prompt. The default permission mode is `yolo`, so Antigravity-native commands and edits can run without confirmation.
50
+
51
+ The provider first looks at `AGY_ACP_BIN`, then its verified managed `~/.local/opt/agy-acp/current/` release, `~/.local/bin/agy_acp_server.par`, and `PATH`. Set `AGY_ACP_BIN` to explicitly prefer an externally managed runtime. If absent, it installs the platform build published in the ACP registry. A global `agy` or `gemini` command is not required.
52
+
53
+ Loopback MCP traffic is exempted from proxies in the ACP child environment. Explicit `HTTP_PROXY`, `HTTPS_PROXY`, `ALL_PROXY` (and lowercase variants) are preserved. On macOS, when none are explicitly set, the provider probes enabled system HTTP proxy settings to avoid automatic SOCKS selection unsupported by the bundled Python runtime. Set `PI_ANTIGRAVITY_ACP_PROXY` to an absolute HTTP/HTTPS proxy URL to explicitly override child proxy settings; the provider does not log the override or change its parent environment. Existing `NO_PROXY` lists and TLS certificate overrides are retained.
54
+
55
+ Standalone Pi builds also need Node.js to run the ACP supervisor. The provider looks for `node` or `nodejs` on `PATH`; set `NODE` to the executable path if neither is available. On NixOS with Home Manager, `programs.pi-coding-agent.extraPackages = [ pkgs.nodejs ];` adds Node to Pi's `PATH`. An explicit `SSL_CERT_FILE` is preserved; otherwise the provider uses `NIX_SSL_CERT_FILE` or a readable system CA bundle when available.
56
+
57
+ ### SSH and headless Google login
58
+
59
+ When Pi is running over SSH, or on Linux without `DISPLAY`/`WAYLAND_DISPLAY`, `/login` automatically uses a manual browser relay:
60
+
61
+ 1. Pi prints the Google authorization URL instead of trying to launch a browser on the server.
62
+ 2. Open that URL in a browser on your local machine and finish Google sign-in.
63
+ 3. Google redirects to an Antigravity loopback URL. The page may show a connection error because `127.0.0.1` refers to your local machine; copy the **complete final URL** from the browser address bar.
64
+ 4. Paste that URL into Pi. The provider validates its host, port, path, and OAuth state, then relays it to Antigravity's loopback listener on the server. An SSH port-forward is not required.
65
+
66
+ Set `PI_ANTIGRAVITY_ACP_OAUTH_MODE=manual` to force this flow, or `PI_ANTIGRAVITY_ACP_OAUTH_MODE=browser` to force normal browser launch. OAuth URLs and callback codes are kept in a private temporary directory only for the duration of login and are never logged or persisted by this package.
67
+
68
+ For API-key authentication, choose **Enter an API key** and then **Antigravity Gemini API key** in `/login`, or set `GEMINI_API_KEY` before starting Pi.
69
+
70
+ Antigravity owns OAuth tokens under `~/.gemini/antigravity-acp/`; Pi stores only a non-secret configured marker. Existing `agy` CLI credentials and Gemini CLI credentials should not be assumed to authenticate this separate ACP server.
71
+
72
+ ### Model availability
73
+
74
+ The model catalog comes from the official ACP server. A successful model listing or selection is not an inference/access probe: newly listed models can still fail because of plan eligibility, staged rollout, or backend availability. As of October 13, 2026, Google's [Argon announcement](https://www.antigravity.google/blog/gemini-4-argon-in-google-antigravity) and [model availability table](https://www.antigravity.google/docs/models/) list Gemini 4 Argon for Google AI Ultra and eligible Enterprise subscriptions, not AI Pro. If it returns `Requested entity was not found`, check access in the official Antigravity app/CLI with the same account; do not guess alternate model IDs or assume the listing proves access. Use another advertised model while investigating.
75
+
76
+ ### macOS credential storage
77
+
78
+ On macOS the Antigravity server keeps the consumer token in the login keychain (service `gemini`, account `antigravity-acp`) and uses the 0600 file `~/.gemini/antigravity-acp/acp_token.json` only when that keychain is unusable. A keychain that is empty while a refreshable token file exists therefore leaves the server with no credentials it can see: every new ACP server process reports `Credentials missing or invalid`, opens interactive Google consent (which forces the consent screen on every process), and can exceed the session-setup deadline. This provider detects exactly that mismatch and pins the child to the secure-file backend it inspects, so the saved login is reused. Set `AGY_ACP_FORCE_FILE_STORAGE` yourself to take full control of the choice. `doctor`/`status` reports the expected backend as `Credential storage (preflight):`, since the running server's own functional probe can still fall back to the file store. An explicit `GEMINI_HOME` relocates the whole tree, including the token file, and is honored by setup, health checks, logout, and the credential-storage decision.
79
+
80
+ ## Commands
81
+
82
+ ```text
83
+ /antigravity-acp setup
84
+ /antigravity-acp doctor
85
+ /antigravity-acp doctor --verbose
86
+ /antigravity-acp status
87
+ /antigravity-acp quota
88
+ /antigravity-acp update
89
+ /antigravity-acp updates [automatic|notify|manual]
90
+ /antigravity-acp qualify
91
+ /antigravity-acp logout
92
+ /antigravity-acp account
93
+ /antigravity-acp permissions
94
+ /antigravity-acp permissions default
95
+ /antigravity-acp permissions auto-edit
96
+ /antigravity-acp permissions yolo
97
+ ```
98
+
99
+ Permission and runtime-update modes are saved in `$PI_CODING_AGENT_DIR/antigravity-acp-provider/config.json` (where `PI_CODING_AGENT_DIR` defaults to `~/.pi/agent`). Runtime updates default to `automatic`; only provider-managed installations are replaced. ACP session bindings are saved beside the config in `sessions.json`.
100
+
101
+ On first use of a custom profile without a config, existing permission/update settings are copied from the default agent directory (or the legacy Gemini-provider config). Existing custom configs are never overwritten, and saved sessions are not copied. **Custom Pi profiles do not isolate Antigravity accounts or managed runtimes:** Antigravity's OAuth credentials and runtime installation remain in their shared locations.
102
+
103
+ `logout`/`account` clears local Antigravity credentials and saved ACP sessions. Run Pi's `/logout` afterward to remove the Pi credential marker, then `/login` for the new account. `update` checks the official registry and installs its newest release only after matching it to the provider's signed runtime catalog. See [`docs/RUNTIME-UPDATES.md`](docs/RUNTIME-UPDATES.md).
104
+
105
+ ## Development
106
+
107
+ ```bash
108
+ npm run check
109
+ npm run test:real-acp # initializes the installed Antigravity ACP server
110
+ npm run test:live # sends a real authenticated prompt
111
+ npm run test:qualify # live cancel, restore, MCP, model, and permission qualification
112
+ npm run test:packed
113
+ npm audit --audit-level=moderate
114
+
115
+ # Maintainer-only runtime catalog refresh/signing
116
+ npm run refresh:runtime-manifest
117
+ ACP_RUNTIME_MANIFEST_PRIVATE_KEY_PATH=/secure/key.pem npm run sign:runtime-manifest
118
+ ```
119
+
120
+ CI checks Node 22.19.0 and 24, including typechecking, unit tests, packed installation and the full dependency audit. Live authenticated tests are opt-in and are not part of PR CI. See [`docs/MAINTENANCE.md`](docs/MAINTENANCE.md) for update and release policy.
121
+
122
+ ### Turn progress and recovery
123
+
124
+ Prompts are bounded by inactivity, not total turn duration: streaming progress resets a 10-minute idle window. An outstanding native tool, parked Pi tool, or permission request gets a **finite 60-minute no-progress window** instead, so long work survives the former two-minute Pi-tool deadline without making stuck tools wait forever. Cancellation still sends `session/cancel`, answers parked requests, and closes an unresponsive agent after its 1.5-second grace period. The interactive permission broker retains its two-minute response limit. Integrations can override `promptIdleTimeoutMs` and `promptWorkIdleTimeoutMs` in connection options with positive finite durations; initialize/auth/session-setup deadlines are unchanged.
125
+
126
+ System instructions are kept outside truncated conversation history. Instructions larger than 256 KiB UTF-8 fail clearly rather than being silently shortened. ACP has no mid-prompt system-update RPC: an instruction change received with tool/permission results finishes the existing prompt under its original instructions, then forces reconstruction before the next prompt. Such a stale binding is not persisted for restoration.
127
+
128
+ ## Security boundary
129
+
130
+ This launches a full coding agent with the user's OS privileges. **The default `yolo` mode permits Antigravity-native commands and edits without confirmation.** Use `/antigravity-acp permissions default` for confirmation prompts. Disabling ACP filesystem/terminal **client callbacks is not a sandbox** for Antigravity-native tools. Pi hooks govern tools routed through the `pi_` MCP namespace; Antigravity-native tools remain governed by Antigravity policy and ACP permission requests. New/restored sessions must advertise and confirm the requested permission mode. Unsupported or failed mode changes close affected sessions; an executing turn is stopped before changing its policy. Unexpected mode-change notifications also invalidate the session. Doctor/status distinguishes requested policy from each live binding's confirmed mode. This protocol enforcement is not a sandbox.
131
+
132
+ ## Compatibility
133
+
134
+ This release requires Pi 1.1.x and Node.js 22.19.0 or newer; development is pinned to Pi 1.1.0, ACP SDK 1.8.0, and ACP protocol 1. The provider supports stable session configuration options and retains compatibility with older Antigravity model-selection metadata; it does not enable experimental ACP v2. Upgrade Pi before upgrading from provider 0.1.12. Pi supplies the host packages at runtime, so their peer ranges remain `*` as required by Pi's package contract; this is not a promise of compatibility with every Pi version. Transcript system instructions and tool additions/removals are replayed into ACP checkpoints, replacing stale warm sessions when that state changes. The bundled signed catalog bootstraps Antigravity ACP 1.1.1 and can accept newer signed catalog releases without an npm update. ACP session setup allows up to two minutes for slow first-run initialization, while transport shutdown rejects pending requests immediately. The current official registry and signed catalog provide Linux x64/ARM64, Windows x64/ARM64, and macOS Intel/ARM64 artifacts. Intel macOS artifacts exist, but the proposed local re-signing workaround is not enabled or qualified by this package. Alpine/musl is rejected because Google's Linux build targets glibc.
135
+
136
+ During browser authentication, Chromium may write `Opening in existing browser session.` to the ACP process's inherited stdout. The transport ignores only that exact known compatibility line and reports its count in `doctor`; all other non-JSON stdout remains a fatal protocol error.
137
+
138
+ Managed installations also repair executable permissions for both the ACP server and its `localharness_external` helper. This repairs installations created by 0.1.3 and earlier, where OAuth could succeed but session creation failed with an opaque ACP `Internal error` because the extracted helper was not executable.
139
+
140
+ Earlier repository documents analyzing `@google/gemini-cli@0.58.0` describe the superseded implementation and are retained only as historical research. See [`docs/ANTIGRAVITY-MIGRATION.md`](docs/ANTIGRAVITY-MIGRATION.md).
141
+
142
+ ## License
143
+
144
+ MIT