omp-antigravity-acp-provider 0.2.4 → 0.3.1
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/AGENT_INSTALL.md +2 -2
- package/README.md +4 -2
- package/extension/auth-sync.ts +6 -6
- package/extension/commands.ts +1 -1
- package/extension/index.ts +4 -4
- package/extension/model-catalog.ts +3 -3
- package/extension/omp-session-lifecycle.ts +3 -3
- package/extension/quota-usage.ts +1 -1
- package/extension/runtime/models.ts +2 -2
- package/extension/runtime/provider.ts +3 -3
- package/extension/runtime/runtime.ts +1 -1
- package/extension/runtime/stream/pi-events.ts +2 -2
- package/extension/runtime.mjs +8 -8
- package/package.json +2 -2
package/AGENT_INSTALL.md
CHANGED
|
@@ -15,7 +15,7 @@ Steps:
|
|
|
15
15
|
2. Run `omp plugin list --json` and search `npm[].name` and `marketplace[].id` for `antigravity-acp-provider`. If one exists, stop and report it instead of installing a second copy.
|
|
16
16
|
3. Install with `omp plugin install npm:omp-antigravity-acp-provider`. For the marketplace variant, run `omp plugin marketplace add SenCha930511/omp-antigravity-acp-provider` first, then `omp plugin install omp-antigravity-acp-provider@sencha-plugins`.
|
|
17
17
|
4. Run `omp plugin list --json` again and confirm exactly one adapter is present. Record its version.
|
|
18
|
-
5. Run `omp models antigravity-acp --json`. Offline/cached listing must not start the ACP server. Before discovery, the built-in Gemini, Hydrogen and known partner-model fallback entries may be listed; neither those entries nor an empty catalog proves a live login. Report any failure instead of retrying in a loop.
|
|
18
|
+
5. Run `omp models antigravity-acp-provider --json`. Offline/cached listing must not start the ACP server. Before discovery, the built-in Gemini, Hydrogen and known partner-model fallback entries may be listed; neither those entries nor an empty catalog proves a live login. Report any failure instead of retrying in a loop.
|
|
19
19
|
6. Tell the user to restart OMP, then run `/login` → "Google Antigravity (ACP)" and `/antigravity-acp refresh` inside OMP. Do not perform these steps yourself.
|
|
20
20
|
|
|
21
21
|
Notes:
|
|
@@ -23,5 +23,5 @@ Notes:
|
|
|
23
23
|
- To pin a channel, set `runtimeSource` in `~/.omp/agent/antigravity-acp-provider/config.json` to `auto`, `cli`, or `managed`. A pinned source fails instead of downloading the other channel.
|
|
24
24
|
- ACP sessions are stored under `~/.gemini/antigravity-acp/`. The user's personal `agy` CLI chats under `~/.gemini/antigravity-cli/` are never read or deleted by the adapter.
|
|
25
25
|
|
|
26
|
-
Acceptance: one adapter installed, `omp models antigravity-acp --json` returns valid JSON, and no credential material appears in any output. Report the commands run, the adapter version, any model IDs and the first step that failed.
|
|
26
|
+
Acceptance: one adapter installed, `omp models antigravity-acp-provider --json` returns valid JSON, and no credential material appears in any output. Report the commands run, the adapter version, any model IDs and the first step that failed.
|
|
27
27
|
```
|
package/README.md
CHANGED
|
@@ -14,6 +14,8 @@ Google Antigravity's official ACP server, adapted for **Oh My Pi (OMP)**.
|
|
|
14
14
|
|
|
15
15
|
This is an independent adaptation, **NOT** an official Google or OMP integration. It uses ACP over stdio. The local HTTP MCP bridge carries tool calls; it is not a model API reverse proxy.
|
|
16
16
|
|
|
17
|
+
This plugin registers the OMP provider and API name `antigravity-acp-provider`. OMP 18.20+ reserves `antigravity-acp` for its built-in Antigravity provider, so the two can be installed side by side. Select this adapter's models as `antigravity-acp-provider/<model-id>`.
|
|
18
|
+
|
|
17
19
|
## Features
|
|
18
20
|
|
|
19
21
|
- All server-advertised models, including Claude, GPT-OSS and future IDs when the ACP endpoint advertises them.
|
|
@@ -97,7 +99,7 @@ Run `/login`, choose **Google Antigravity (ACP)**, and complete Google's consent
|
|
|
97
99
|
/model
|
|
98
100
|
```
|
|
99
101
|
|
|
100
|
-
`refresh` asks the ACP server which models the account can use; `/model` lists them. Set an effort with OMP's thinking control when the model advertises levels. If OMP's `enabledModels` whitelist is configured, add `antigravity-acp/*` to it.
|
|
102
|
+
`refresh` asks the ACP server which models the account can use; `/model` lists them. Set an effort with OMP's thinking control when the model advertises levels. If OMP's `enabledModels` whitelist is configured, add `antigravity-acp-provider/*` to it.
|
|
101
103
|
|
|
102
104
|
### 6. Verify
|
|
103
105
|
|
|
@@ -121,7 +123,7 @@ To remove the installed plugin, use `omp plugin uninstall omp-antigravity-acp-pr
|
|
|
121
123
|
| --- | --- |
|
|
122
124
|
| `omp: command not found` | This is an OMP plugin. Install OMP first; there is no standalone CLI. |
|
|
123
125
|
| No models after `/antigravity-acp refresh` | Run `/antigravity-acp account` to confirm both sides are signed in, then retry with internet access. ACP can advertise fewer models than the Antigravity app. |
|
|
124
|
-
| Two Antigravity providers appear |
|
|
126
|
+
| Two Antigravity providers appear | That is expected on OMP 18.20+: the built-in `antigravity-acp` provider and this plugin's `antigravity-acp-provider` coexist. Remove only a second copy of this adapter (`antigravity-acp-omp`, the upstream Pi extension, or a duplicate npm install), then restart OMP. |
|
|
125
127
|
| Login opens the wrong Google account | Both login paths always start a fresh sign-in. Choose the intended account (or "Use another account") on Google's consent screen. |
|
|
126
128
|
| Default `disabled` native-tool mode rejects the session | The official runtime must advertise system-append support (1.4.1+). Upgrade the runtime or run `/antigravity-acp native-tools prefer`. |
|
|
127
129
|
| The first request is slow | Runtime download and cold ACP start happen once; later turns reuse the warm session. |
|
package/extension/auth-sync.ts
CHANGED
|
@@ -214,7 +214,7 @@ export interface OmpCommandContext {
|
|
|
214
214
|
// the model registry surface is host version dependent and absent in tests.
|
|
215
215
|
export function ompCredentialSummary(ctx: OmpCommandContext | undefined) {
|
|
216
216
|
try {
|
|
217
|
-
const stored = ctx?.modelRegistry?.authStorage?.credentials?.getOAuth?.("antigravity-acp");
|
|
217
|
+
const stored = ctx?.modelRegistry?.authStorage?.credentials?.getOAuth?.("antigravity-acp-provider");
|
|
218
218
|
if (!stored) return { present: false };
|
|
219
219
|
return {
|
|
220
220
|
present: true,
|
|
@@ -232,9 +232,9 @@ export async function removeOmpCredentialRecord(ctx: OmpCommandContext | undefin
|
|
|
232
232
|
try {
|
|
233
233
|
const credentials = ctx?.modelRegistry?.authStorage?.credentials;
|
|
234
234
|
if (!credentials?.remove || !credentials.getOAuth) return "unavailable";
|
|
235
|
-
if (!credentials.getOAuth("antigravity-acp")) return "absent";
|
|
236
|
-
await credentials.remove("antigravity-acp");
|
|
237
|
-
try { await ctx?.modelRegistry?.refreshProvider?.("antigravity-acp", "online"); } catch { /* advisory only */ }
|
|
235
|
+
if (!credentials.getOAuth("antigravity-acp-provider")) return "absent";
|
|
236
|
+
await credentials.remove("antigravity-acp-provider");
|
|
237
|
+
try { await ctx?.modelRegistry?.refreshProvider?.("antigravity-acp-provider", "online"); } catch { /* advisory only */ }
|
|
238
238
|
return "removed";
|
|
239
239
|
} catch { return "unavailable"; }
|
|
240
240
|
}
|
|
@@ -376,7 +376,7 @@ export class OmpAuthCoordinator {
|
|
|
376
376
|
|
|
377
377
|
ompMarkerStored(ctx: OmpCommandContext | undefined): boolean | undefined {
|
|
378
378
|
try {
|
|
379
|
-
return Boolean(ctx?.modelRegistry?.authStorage?.credentials?.getOAuth?.("antigravity-acp"));
|
|
379
|
+
return Boolean(ctx?.modelRegistry?.authStorage?.credentials?.getOAuth?.("antigravity-acp-provider"));
|
|
380
380
|
} catch { return undefined; }
|
|
381
381
|
}
|
|
382
382
|
|
|
@@ -581,7 +581,7 @@ export class OmpAuthCoordinator {
|
|
|
581
581
|
// destroy the Antigravity-side login. OMP emits credential_disabled for
|
|
582
582
|
// those, but not for user-initiated removals such as /logout.
|
|
583
583
|
this.deps.pi.on("credential_disabled", (event: unknown) => {
|
|
584
|
-
if (event && typeof event === "object" && "provider" in event && event.provider === "antigravity-acp") {
|
|
584
|
+
if (event && typeof event === "object" && "provider" in event && event.provider === "antigravity-acp-provider") {
|
|
585
585
|
this.disabledUntil = performance.now() + logoutFollow.disabledSuppressionMs;
|
|
586
586
|
this.suppressFollow = true;
|
|
587
587
|
}
|
package/extension/commands.ts
CHANGED
|
@@ -454,7 +454,7 @@ export function createAntigravityCommandHandler(deps: CommandControllerDeps) {
|
|
|
454
454
|
if (value) throw new Error("Usage: /antigravity-acp account");
|
|
455
455
|
const auth = await inspectAcpAuth();
|
|
456
456
|
let ompSource: string | undefined;
|
|
457
|
-
try { ompSource = ctx?.modelRegistry?.authStorage?.keys?.describe?.("antigravity-acp", sessionIdOf(ctx)); } catch { /* host version dependent */ }
|
|
457
|
+
try { ompSource = ctx?.modelRegistry?.authStorage?.keys?.describe?.("antigravity-acp-provider", sessionIdOf(ctx)); } catch { /* host version dependent */ }
|
|
458
458
|
// Reading saved state needs no live runtime; show live numbers only
|
|
459
459
|
// when a runtime for this session already exists.
|
|
460
460
|
const bundle = deps.peekRuntimeForSession(sessionIdOf(ctx));
|
package/extension/index.ts
CHANGED
|
@@ -586,7 +586,7 @@ export async function registerOmpAdapter(pi: OmpHostApi, stateDir: string,
|
|
|
586
586
|
// Re-registering without an apiKey does not clear OMP's stored key
|
|
587
587
|
// config; unregister first so a logout report finds no remaining
|
|
588
588
|
// "provider config (fallback)" source.
|
|
589
|
-
try { pi.unregisterProvider?.("antigravity-acp"); } catch { /* older hosts */ }
|
|
589
|
+
try { pi.unregisterProvider?.("antigravity-acp-provider"); } catch { /* older hosts */ }
|
|
590
590
|
tryRegisterProvider();
|
|
591
591
|
}
|
|
592
592
|
|
|
@@ -707,7 +707,7 @@ export async function registerOmpAdapter(pi: OmpHostApi, stateDir: string,
|
|
|
707
707
|
const modelRecord = typeof model === "object" && model !== null ? model : undefined;
|
|
708
708
|
const provider = Reflect.get(event, "provider") ?? Reflect.get(event, "providerId")
|
|
709
709
|
?? (modelRecord ? Reflect.get(modelRecord, "provider") ?? Reflect.get(modelRecord, "api") : undefined);
|
|
710
|
-
if (typeof provider === "string" && provider.length > 0) return provider === "antigravity-acp";
|
|
710
|
+
if (typeof provider === "string" && provider.length > 0) return provider === "antigravity-acp-provider";
|
|
711
711
|
const id = Reflect.get(event, "modelId") ?? (modelRecord ? Reflect.get(modelRecord, "id") : undefined);
|
|
712
712
|
return typeof id === "string"
|
|
713
713
|
&& (catalogStore.upstreamModels.has(id) || catalogStore.currentModels.some(candidate => candidate.id === id));
|
|
@@ -792,8 +792,8 @@ export async function registerOmpAdapter(pi: OmpHostApi, stateDir: string,
|
|
|
792
792
|
}
|
|
793
793
|
|
|
794
794
|
function registerProvider(): void {
|
|
795
|
-
pi.registerProvider("antigravity-acp", {
|
|
796
|
-
api: "antigravity-acp",
|
|
795
|
+
pi.registerProvider("antigravity-acp-provider", {
|
|
796
|
+
api: "antigravity-acp-provider",
|
|
797
797
|
baseUrl: "acp://antigravity",
|
|
798
798
|
// A config apiKey keeps OMP's own logout report claiming a remaining
|
|
799
799
|
// "provider config (fallback)" source, but dropping it entirely hides
|
|
@@ -11,8 +11,8 @@ export interface AdvertisedModel {
|
|
|
11
11
|
export interface PublicCatalogModel {
|
|
12
12
|
id: string;
|
|
13
13
|
name: string;
|
|
14
|
-
api: "antigravity-acp";
|
|
15
|
-
provider: "antigravity-acp";
|
|
14
|
+
api: "antigravity-acp-provider";
|
|
15
|
+
provider: "antigravity-acp-provider";
|
|
16
16
|
baseUrl?: string;
|
|
17
17
|
reasoning: boolean;
|
|
18
18
|
input: string[];
|
|
@@ -96,7 +96,7 @@ function publicModel(id: string, name: string, map: Record<string, string> = {},
|
|
|
96
96
|
const defaultLevel = current && (efforts as readonly string[]).includes(current) ? current
|
|
97
97
|
: efforts.includes("high") ? "high" : efforts.includes("medium") ? "medium" : efforts[0];
|
|
98
98
|
return {
|
|
99
|
-
id, name, api: "antigravity-acp", provider: "antigravity-acp", baseUrl: "",
|
|
99
|
+
id, name, api: "antigravity-acp-provider", provider: "antigravity-acp-provider", baseUrl: "",
|
|
100
100
|
reasoning: efforts.length > 0, input: ["text", "image"],
|
|
101
101
|
// These are conservative client metadata defaults, not inferred server limits.
|
|
102
102
|
contextWindow: known?.contextWindow ?? 32_768,
|
|
@@ -49,16 +49,16 @@ export class OmpSessionLifecycle {
|
|
|
49
49
|
let scope = this.fallback, replaced: Scope | undefined;
|
|
50
50
|
if (host) {
|
|
51
51
|
const previous = this.scopes.get(host);
|
|
52
|
-
if (previous && !previous.closed && host.get("antigravity-acp") === previous) scope = previous;
|
|
52
|
+
if (previous && !previous.closed && host.get("antigravity-acp-provider") === previous) scope = previous;
|
|
53
53
|
else {
|
|
54
54
|
replaced = previous;
|
|
55
55
|
let predecessor: Promise<void> | undefined;
|
|
56
56
|
try {
|
|
57
|
-
const existing = host.get("antigravity-acp");
|
|
57
|
+
const existing = host.get("antigravity-acp-provider");
|
|
58
58
|
if (existing) predecessor = Promise.resolve(existing.close());
|
|
59
59
|
} catch (error) { predecessor = Promise.reject(error); }
|
|
60
60
|
scope = this.newScope(predecessor);
|
|
61
|
-
this.scopes.set(host, scope); host.set("antigravity-acp", scope);
|
|
61
|
+
this.scopes.set(host, scope); host.set("antigravity-acp-provider", scope);
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
let ticket = scope.sessions.get(id);
|
package/extension/quota-usage.ts
CHANGED
|
@@ -67,7 +67,7 @@ export interface QuotaUsageProvider {
|
|
|
67
67
|
fetchUsage(params: QuotaUsageProviderParams, ctx: QuotaUsageProviderContext): Promise<QuotaUsageReport | null>;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
const DEFAULT_PROVIDER = "antigravity-acp";
|
|
70
|
+
const DEFAULT_PROVIDER = "antigravity-acp-provider";
|
|
71
71
|
const WEEK_MS = 604_800_000;
|
|
72
72
|
const FIVE_HOURS_MS = 18_000_000;
|
|
73
73
|
const DAY_MS = 86_400_000;
|
|
@@ -6,8 +6,8 @@ import type {
|
|
|
6
6
|
ThinkingLevelMap,
|
|
7
7
|
} from "@earendil-works/pi-ai";
|
|
8
8
|
|
|
9
|
-
export const PROVIDER_ID = "antigravity-acp";
|
|
10
|
-
export const API_ID = "antigravity-acp";
|
|
9
|
+
export const PROVIDER_ID = "antigravity-acp-provider";
|
|
10
|
+
export const API_ID = "antigravity-acp-provider";
|
|
11
11
|
|
|
12
12
|
export interface AntigravityModel extends Omit<Model<typeof API_ID>, "baseUrl" | "input" | "compat"> {
|
|
13
13
|
baseUrl?: string;
|
|
@@ -14,8 +14,8 @@ import { hasAntigravityAuth } from "./acp/antigravity.ts";
|
|
|
14
14
|
import { type AntigravityModel, FALLBACK_MODELS, projectModels, PROVIDER_ID } from "./models.ts";
|
|
15
15
|
import { AntigravityRuntime, MANAGED_AUTH_MARKER, type OmpStreamOptions } from "./runtime.ts";
|
|
16
16
|
|
|
17
|
-
export interface AntigravityProvider extends Omit<Provider<"antigravity-acp">, "auth" | "streamSimple"> {
|
|
18
|
-
auth: NonNullable<Provider<"antigravity-acp">["auth"]> & {
|
|
17
|
+
export interface AntigravityProvider extends Omit<Provider<"antigravity-acp-provider">, "auth" | "streamSimple"> {
|
|
18
|
+
auth: NonNullable<Provider<"antigravity-acp-provider">["auth"]> & {
|
|
19
19
|
oauth: {
|
|
20
20
|
name: string;
|
|
21
21
|
loginLabel: string;
|
|
@@ -174,4 +174,4 @@ function stream(
|
|
|
174
174
|
return runtime.stream(model, context, options).stream;
|
|
175
175
|
}
|
|
176
176
|
|
|
177
|
-
export const ANTIGRAVITY_ACP_API = "antigravity-acp" satisfies Api;
|
|
177
|
+
export const ANTIGRAVITY_ACP_API = "antigravity-acp-provider" satisfies Api;
|
|
@@ -371,7 +371,7 @@ export class AntigravityRuntime {
|
|
|
371
371
|
return {
|
|
372
372
|
...message,
|
|
373
373
|
role: "assistant",
|
|
374
|
-
provider: "antigravity-acp",
|
|
374
|
+
provider: "antigravity-acp-provider",
|
|
375
375
|
model: "",
|
|
376
376
|
content: filtered.length ? filtered : [{ type: "text", text: "" }],
|
|
377
377
|
};
|
|
@@ -29,8 +29,8 @@ export class PiEventWriter {
|
|
|
29
29
|
this.message = {
|
|
30
30
|
role: "assistant",
|
|
31
31
|
content: [],
|
|
32
|
-
api: model.api ?? "antigravity-acp",
|
|
33
|
-
provider: model.provider ?? "antigravity-acp",
|
|
32
|
+
api: model.api ?? "antigravity-acp-provider",
|
|
33
|
+
provider: model.provider ?? "antigravity-acp-provider",
|
|
34
34
|
model: model.id,
|
|
35
35
|
usage: emptyUsage(),
|
|
36
36
|
stopReason: "pending",
|
package/extension/runtime.mjs
CHANGED
|
@@ -9110,8 +9110,8 @@ function expandHome(file2, home = os.homedir()) {
|
|
|
9110
9110
|
}
|
|
9111
9111
|
|
|
9112
9112
|
// extension/runtime/models.ts
|
|
9113
|
-
var PROVIDER_ID = "antigravity-acp";
|
|
9114
|
-
var API_ID = "antigravity-acp";
|
|
9113
|
+
var PROVIDER_ID = "antigravity-acp-provider";
|
|
9114
|
+
var API_ID = "antigravity-acp-provider";
|
|
9115
9115
|
var ZERO_COST = { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 };
|
|
9116
9116
|
var FALLBACK_MODELS = [
|
|
9117
9117
|
reasoningModel("gemini-3.8-flash", "Gemini 3.8 Flash", {
|
|
@@ -31603,7 +31603,7 @@ var ClientSideConnection = class {
|
|
|
31603
31603
|
// package.json
|
|
31604
31604
|
var package_default = {
|
|
31605
31605
|
name: "omp-antigravity-acp-provider",
|
|
31606
|
-
version: "0.
|
|
31606
|
+
version: "0.3.1",
|
|
31607
31607
|
ompAcpBundle: 1,
|
|
31608
31608
|
description: "Google Antigravity ACP provider for Oh My Pi (OMP), with tool bridging and per-model thinking; derived from zacbemis/pi-antigravity-acp-provider",
|
|
31609
31609
|
type: "module",
|
|
@@ -44466,8 +44466,8 @@ var PiEventWriter = class {
|
|
|
44466
44466
|
this.message = {
|
|
44467
44467
|
role: "assistant",
|
|
44468
44468
|
content: [],
|
|
44469
|
-
api: model.api ?? "antigravity-acp",
|
|
44470
|
-
provider: model.provider ?? "antigravity-acp",
|
|
44469
|
+
api: model.api ?? "antigravity-acp-provider",
|
|
44470
|
+
provider: model.provider ?? "antigravity-acp-provider",
|
|
44471
44471
|
model: model.id,
|
|
44472
44472
|
usage: emptyUsage(),
|
|
44473
44473
|
stopReason: "pending",
|
|
@@ -44793,7 +44793,7 @@ var AntigravityRuntime = class {
|
|
|
44793
44793
|
return {
|
|
44794
44794
|
...message,
|
|
44795
44795
|
role: "assistant",
|
|
44796
|
-
provider: "antigravity-acp",
|
|
44796
|
+
provider: "antigravity-acp-provider",
|
|
44797
44797
|
model: "",
|
|
44798
44798
|
content: filtered.length ? filtered : [{ type: "text", text: "" }]
|
|
44799
44799
|
};
|
|
@@ -46581,8 +46581,8 @@ function publicModel(id, name, map2 = {}, current) {
|
|
|
46581
46581
|
return {
|
|
46582
46582
|
id,
|
|
46583
46583
|
name,
|
|
46584
|
-
api: "antigravity-acp",
|
|
46585
|
-
provider: "antigravity-acp",
|
|
46584
|
+
api: "antigravity-acp-provider",
|
|
46585
|
+
provider: "antigravity-acp-provider",
|
|
46586
46586
|
baseUrl: "",
|
|
46587
46587
|
reasoning: efforts.length > 0,
|
|
46588
46588
|
input: ["text", "image"],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omp-antigravity-acp-provider",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"ompAcpBundle": 1,
|
|
5
5
|
"description": "Google Antigravity ACP provider for Oh My Pi (OMP), with tool bridging and per-model thinking; derived from zacbemis/pi-antigravity-acp-provider",
|
|
6
6
|
"type": "module",
|
|
@@ -88,5 +88,5 @@
|
|
|
88
88
|
"acp",
|
|
89
89
|
"gemini"
|
|
90
90
|
],
|
|
91
|
-
"gitHead": "
|
|
91
|
+
"gitHead": "f4c17d202d605f53f0fb96499eb1f055da0f1d77"
|
|
92
92
|
}
|