omp-antigravity-acp-provider 0.1.13 → 0.1.14

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 CHANGED
@@ -19,7 +19,7 @@ The repository keeps the OMP adapter sources separately and installs upstream ve
19
19
 
20
20
  ## Status
21
21
 
22
- Version 0.1.13 supports all models advertised by the official ACP server. Tested with macOS, OMP 18.12.3, upstream provider 0.1.15 and official ACP runtime 1.4.1. Other platforms and OMP versions are not yet verified.
22
+ Version 0.1.14 supports all models advertised by the official ACP server. Tested with macOS, OMP 18.12.3, upstream provider 0.1.15 and official ACP runtime 1.4.1. Other platforms and OMP versions are not yet verified.
23
23
 
24
24
  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.
25
25
 
@@ -56,7 +56,7 @@ Or, inside OMP:
56
56
 
57
57
  Select **omp-antigravity-acp-provider** in the browser, install it, and restart OMP to load the provider.
58
58
 
59
- 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.13** prebuilt npm adapter and production dependencies on first load. It disables npm install scripts, skips Pi CLI peer installation, and performs no local compilation. Node.js 22.19+ and npm must be on PATH. First preparation needs internet access and roughly **150 MiB** of disk space; later loads reuse the installed cache without npm network access.
59
+ 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.14** prebuilt npm adapter and production dependencies on first load. It disables npm install scripts, skips Pi CLI peer installation, and performs no local compilation. Node.js 22.19+ and npm must be on PATH. First preparation needs internet access and roughly **150 MiB** of disk space; later loads reuse the installed cache without npm network access.
60
60
 
61
61
  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.
62
62
 
@@ -80,7 +80,7 @@ omp plugin install npm:omp-antigravity-acp-provider
80
80
  To pin a specific release:
81
81
 
82
82
  ```sh
83
- omp plugin install npm:omp-antigravity-acp-provider@0.1.13
83
+ omp plugin install npm:omp-antigravity-acp-provider@0.1.14
84
84
  ```
85
85
 
86
86
  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.
@@ -181,7 +181,7 @@ The initial permission mode follows upstream configuration, whose default is `yo
181
181
 
182
182
  OMP's oauth contract has no provider-side logout hook, so `/logout` by itself only removes OMP's stored non-secret marker record. This adapter watches the credential store and finishes the Antigravity-side logout automatically: after `/logout` removes the marker, it closes this process's ACP runtimes, clears saved ACP session mappings, deletes the local token file and the settings auth choice, and removes the matching macOS keychain entry, then confirms with one line (`/antigravity-acp account` shows the details). The keychain removal waits for this adapter's ACP server processes to fully exit and verifies the deletion, because a dying server can flush its token back. The cleanup waits for in-flight Antigravity requests to finish, a re-login before it runs cancels it, and automatic credential soft-disables (for example an expired refresh grant) never trigger it. Set `OMP_ACP_FOLLOW_LOGOUT=0` before starting OMP to keep OMP's `/logout` marker-only. `/antigravity-acp logout` performs the same complete logout in one command without waiting for OMP; it refuses to run while Antigravity requests are active. If its OMP-marker removal is unavailable through the host API, the command says so and OMP's `/logout` finishes that part.
183
183
 
184
- The logout only touches ACP-owned state: the `antigravity-acp` keychain item and the `~/.gemini/antigravity-acp/` directory. The separate `gemini`/`antigravity` keychain item and files such as `~/.gemini/jetski-standalone-oauth-token` belong to the agy CLI/Antigravity IDE and are intentionally left alone; logging those out is out of scope for this adapter.
184
+ The provider's non-secret config apiKey fallback is registered only until a logout is observed: removing the marker credential makes the adapter re-register without it in the same tick, so OMP's own logout report finds no remaining "provider config (fallback)" source and the model catalog hides until the next `/login`. Fresh profiles that never stored a marker keep the fallback so first-run model listing works; storing a marker again restores it.
185
185
 
186
186
  The debug switch controls gray `[Antigravity tool: …]` and `[Antigravity tool update: …]` lines. It defaults to off and applies immediately to this process's active ACP connections. Normal OMP tool displays/results, real thought chunks and plan messages are preserved. The option is saved as `debugToolUpdates` in `omp-tools.json` alongside `nativeTools`; toggling either option preserves the other. Existing policy files without the debug field default to off. Other OMP processes need a restart to read a setting changed elsewhere. `OMP_ACP_TRACE=1` is a separate, opt-in terminal diagnostic setting.
187
187
 
@@ -161,8 +161,17 @@ export async function registerOmpAdapter(pi: any, stateDir: string) {
161
161
  let markerPresent: boolean | undefined;
162
162
  let suppressFollow = false;
163
163
  let selfLogout = false;
164
+ // Whether registerProvider keeps the non-secret config apiKey fallback.
165
+ let apiKeyFallback = true;
164
166
  let followTimer: ReturnType<typeof setTimeout> | undefined;
165
167
  let followRetry: ReturnType<typeof setTimeout> | undefined;
168
+ function syncProviderRegistration() {
169
+ // Re-registering without an apiKey does not clear OMP's stored key
170
+ // config; unregister first so a logout report finds no remaining
171
+ // "provider config (fallback)" source.
172
+ try { pi.unregisterProvider?.("antigravity-acp"); } catch { /* older hosts */ }
173
+ try { adapted.registerProvider(); } catch { /* advisory */ }
174
+ }
166
175
  function ompMarkerStored(ctx: any): boolean | undefined {
167
176
  try {
168
177
  return Boolean(ctx?.modelRegistry?.authStorage?.credentials?.getOAuth?.("antigravity-acp"));
@@ -238,14 +247,31 @@ export async function registerOmpAdapter(pi: any, stateDir: string) {
238
247
  const wasPresent = markerPresent === true;
239
248
  markerPresent = current;
240
249
  if (current) suppressFollow = false;
250
+ if (wasPresent !== current) {
251
+ // Flip the config apiKey in the same synchronous tick as the marker
252
+ // change: OMP's own logout report then finds no remaining
253
+ // "provider config (fallback)" source, while a fresh profile that
254
+ // never stored a marker keeps the catalog visible.
255
+ apiKeyFallback = current;
256
+ syncProviderRegistration();
257
+ }
241
258
  if (!wasPresent || current || selfLogout) return;
242
259
  clearTimeout(followTimer);
243
260
  followTimer = setTimeout(() => {
244
261
  followTimer = undefined;
245
262
  if (process.env.OMP_ACP_FOLLOW_LOGOUT === "0") return;
246
- if (suppressFollow) { suppressFollow = false; return; }
263
+ if (suppressFollow) {
264
+ suppressFollow = false;
265
+ apiKeyFallback = true;
266
+ syncProviderRegistration();
267
+ return;
268
+ }
247
269
  // A quick re-login after the removal cancels the cleanup.
248
- if (ompMarkerStored(ctx) !== false) return;
270
+ if (ompMarkerStored(ctx) !== false) {
271
+ apiKeyFallback = true;
272
+ syncProviderRegistration();
273
+ return;
274
+ }
249
275
  void finishFollowedLogout(ctx);
250
276
  }, logoutFollow.delayMs);
251
277
  followTimer.unref?.();
@@ -368,6 +394,11 @@ export async function registerOmpAdapter(pi: any, stateDir: string) {
368
394
  selfLogout = true;
369
395
  let ompMarker: "removed" | "absent" | "unavailable";
370
396
  try { ompMarker = await removeOmpCredentialRecord(ctx); } finally { selfLogout = false; }
397
+ if (ompMarker !== "unavailable") {
398
+ // Drop the config apiKey with the marker even without the watcher.
399
+ apiKeyFallback = false;
400
+ syncProviderRegistration();
401
+ }
371
402
  // Keep the confirmation terse; /antigravity-acp account shows the details.
372
403
  const cleared = ["Google credentials", "saved ACP sessions"];
373
404
  if (keychainRemoved === true) cleared.push("the macOS keychain entry");
@@ -506,8 +537,11 @@ export async function registerOmpAdapter(pi: any, stateDir: string) {
506
537
  return () => target.registerProvider("antigravity-acp", {
507
538
  api: "antigravity-acp",
508
539
  baseUrl: "acp://antigravity",
509
- // This is a non-secret marker. Google tokens remain in ACP storage.
510
- apiKey: MARKER,
540
+ // A config apiKey keeps OMP's own logout report claiming a remaining
541
+ // "provider config (fallback)" source, but dropping it entirely hides
542
+ // the catalog before the first /login. Register it only while an OMP
543
+ // marker is known to exist or before any logout was observed.
544
+ apiKey: apiKeyFallback ? MARKER : undefined,
511
545
  models: initialModels,
512
546
  async fetchDynamicModels() {
513
547
  // OMP may call this during startup, even for another provider.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omp-antigravity-acp-provider",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "description": "Google Antigravity ACP provider for Oh My Pi (OMP), with tool bridging and per-model thinking; derived from zacbemis/pi-antigravity-acp-provider",
5
5
  "type": "module",
6
6
  "license": "MIT",