omp-multi-auth 1.4.2 → 2.0.0

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
@@ -2,6 +2,8 @@
2
2
 
3
3
  Multi-account OAuth login for [omp (Oh My Pi)](https://github.com/can1357/oh-my-pi). Add, authenticate, and switch between multiple accounts per provider. OMP's built-in fallback handles rate-limit retry and model fallback.
4
4
 
5
+ Requires the latest omp release. Older omp versions are not supported; a daily CI job tests against the newest omp.
6
+
5
7
  ## Install
6
8
 
7
9
  ```bash
@@ -40,6 +42,8 @@ omp install git:github.com/tuandinh0801/omp-multi-auth
40
42
  | `/multi-auth status` | Show account and authentication status |
41
43
  | `/multi-auth limits` | Check provider quota and usage |
42
44
 
45
+ On OMP 19's legacy extension bridge, account menus use OMP's built-in selection dialog and quota checks show a progress notification.
46
+
43
47
  ### `/multi-auth-preset`
44
48
 
45
49
  | Command | Description |
@@ -73,8 +77,6 @@ Create `.omp/multi-auth.json` in a project to restrict which subscription provid
73
77
  | `anthropic` | Anthropic (Claude Pro/Max) |
74
78
  | `openai-codex` | ChatGPT Plus/Pro (Codex) |
75
79
  | `github-copilot` | GitHub Copilot |
76
- | `google-gemini-cli` | Google Cloud Code Assist |
77
- | `google-antigravity` | Antigravity |
78
80
  | `kimi-code` | Kimi Code |
79
81
  | `xai-oauth` | xAI Grok OAuth |
80
82
  | `cursor` | Cursor (browser PKCE OAuth or API key) |
@@ -108,11 +110,11 @@ For `cursor`, `/multi-auth login` prompts for a dashboard API key (`crsr_...`/`c
108
110
 
109
111
  ## Built-in quotas
110
112
 
111
- Run `/multi-auth limits` to inspect quota and usage information for supported providers. This currently includes built-in quota checks for Codex, Google, and OpenCode Go providers. Results depend on provider availability and authenticated account state.
113
+ Run `/multi-auth limits` to inspect quota and usage information for supported providers. This currently includes built-in quota checks for Codex and OpenCode Go providers. Results depend on provider availability and authenticated account state.
112
114
 
113
115
  OpenCode Go reports 5-hour, weekly, and monthly windows. The status line and ready/low/blocked state use the tighter of the 5-hour and weekly windows; the monthly window is shown for reference only, because an exhausted month can still serve requests when the account's "Use balance" fallback is on.
114
116
 
115
- Added accounts also report usage to OMP itself, so `/usage`, `omp usage`, and status lines built on OMP's usage reports show each account (for example `anthropic-2`) next to the base provider. This works for every provider OMP has a usage fetcher for, on OMP versions with the usage registry. OMP caches, refreshes and invalidates these reports like any other provider's. Until OMP keeps a registered provider's reports across processes ([can1357/oh-my-pi#20030](https://github.com/can1357/oh-my-pi/pull/20030)), each new OMP process probes each added account once.
117
+ Added accounts also report usage to OMP itself, so `/usage`, `omp usage`, and status lines built on OMP's usage reports show each account (for example `anthropic-2`) next to the base provider. This works for every provider OMP has a usage fetcher for. OMP caches, refreshes and invalidates these reports like any other provider's. Until OMP keeps a registered provider's reports across processes ([can1357/oh-my-pi#20030](https://github.com/can1357/oh-my-pi/pull/20030)), each new OMP process probes each added account once.
116
118
 
117
119
  ## Configuration files
118
120
 
@@ -2,7 +2,7 @@
2
2
  import type { ExtensionCommandContext, ExtensionContext, AuthStorage as HostAuthStorage } from "@oh-my-pi/pi-coding-agent";
3
3
  import { getBundledModels, type GeneratedProvider } from "@oh-my-pi/pi-catalog";
4
4
  import type { Api, Model } from "@oh-my-pi/pi-ai";
5
- import type { GoogleQuotaAccountSnapshot, CodexUsageSnapshot, OpenCodeGoUsageSnapshot } from "./quota.ts";
5
+ import type { CodexUsageSnapshot, OpenCodeGoUsageSnapshot } from "./quota.ts";
6
6
 
7
7
  export function getModels(providerId: string): Model<Api>[] {
8
8
  return getBundledModels(providerId as GeneratedProvider) as Model<Api>[];
@@ -182,7 +182,6 @@ export interface QuotaCheckResult {
182
182
  summary: string;
183
183
  details: string[];
184
184
  score: number;
185
- googleSnapshot?: GoogleQuotaAccountSnapshot;
186
185
  codexSnapshot?: CodexUsageSnapshot;
187
186
  opencodeGoSnapshot?: OpenCodeGoUsageSnapshot;
188
187
  }
@@ -8,6 +8,7 @@ import { getAgentDir, type ExtensionAPI, type ProviderConfig, type ProviderModel
8
8
  import { getProviderDefinition } from "@oh-my-pi/pi-ai/registry";
9
9
  import type { OAuthCredentials, OAuthLoginCallbacks } from "@oh-my-pi/pi-ai/oauth";
10
10
  import { AssistantMessageEventStream, streamSimple, type Api, type AssistantMessageEvent, type Context, type Model, type SimpleStreamOptions, type UsageProvider, type UsageReport } from "@oh-my-pi/pi-ai";
11
+ import { defaultUsageProvider } from "@oh-my-pi/pi-ai/usage/registry";
11
12
  import { buildModel } from "@oh-my-pi/pi-catalog/build";
12
13
  import { fetchCodexModels } from "@oh-my-pi/pi-catalog/discovery/codex";
13
14
  import { CODEX_BASE_URL, getCodexAccountId } from "@oh-my-pi/pi-catalog/wire/codex";
@@ -34,9 +35,7 @@ export function getRegisteredProviderApiKey(providerId: string, credentials: OAu
34
35
  case "kimi-code":
35
36
  case "xai-oauth":
36
37
  return credentials.access;
37
- case "github-copilot":
38
- case "google-gemini-cli":
39
- case "google-antigravity": {
38
+ case "github-copilot": {
40
39
  const registered = credentials as OAuthCredentials & {
41
40
  apiEndpoint?: string;
42
41
  enterpriseUrl?: string;
@@ -193,7 +192,6 @@ export function getGitHubCopilotBaseUrl(token: string | undefined, enterpriseUrl
193
192
  // through one shared wrapper, which restores canonical identity only inside
194
193
  // transport and puts subscription identity back on emitted assistant messages.
195
194
  export const SUB_TRANSPORT_CONFIG: Record<string, { builtinApi: Api | ((modelId: string) => Api); customApiId: string }> = {
196
- "google-antigravity": { builtinApi: "google-gemini-cli", customApiId: "google-antigravity-mp" },
197
195
  // pi-ai keys X-Api-Key (anthropic-messages) and x-opencode-session on provider === "opencode-go".
198
196
  "opencode-go": {
199
197
  builtinApi: (modelId) => getModels("opencode-go").find(m => m.id === modelId)?.api ?? "openai-completions",
@@ -202,44 +200,6 @@ export const SUB_TRANSPORT_CONFIG: Record<string, { builtinApi: Api | ((modelId:
202
200
  };
203
201
 
204
202
 
205
- const ANTIGRAVITY_ZWSP = "\u200B";
206
-
207
- /** Substrings that make up Cloud Code Assist's system-prompt abuse fingerprint
208
- * (omp #11699, #12655). The live trigger is the `<conventions>` tag plus the
209
- * `RFC 2119: ...` sentence; breaking any one component defeats it. */
210
- export const ANTIGRAVITY_FINGERPRINTS = ["RFC 2119", "<conventions>", "</conventions>"] as const;
211
-
212
- /** Break Cloud Code Assist's system-prompt fingerprint so it stops masking
213
- * requests as 429 RESOURCE_EXHAUSTED (omp #11699, #12655). A zero-width space is
214
- * inserted into each flagged substring: invisible to the model, but it breaks
215
- * the contiguous literal the upstream WAF matches. Idempotent — a second pass
216
- * finds no intact substring. Content is otherwise preserved. */
217
- export function defeatAntigravityFingerprint(text: string): string {
218
- let out = text;
219
- for (const s of ANTIGRAVITY_FINGERPRINTS) {
220
- out = out.split(s).join(s[0] + ANTIGRAVITY_ZWSP + s.slice(1));
221
- }
222
- return out;
223
- }
224
-
225
- export function rewriteAntigravitySystemInstruction(payload: unknown): unknown {
226
- if (!payload || typeof payload !== "object") return payload;
227
- const body = payload as Record<string, unknown>;
228
- const request = body.request;
229
- if (!request || typeof request !== "object") return payload;
230
- const req = request as Record<string, unknown>;
231
- const sys = req.systemInstruction;
232
- if (!sys || typeof sys !== "object") return payload;
233
- const sysObj = sys as Record<string, unknown>;
234
- if (!Array.isArray(sysObj.parts)) return payload;
235
- const parts = sysObj.parts.map(part =>
236
- part && typeof part === "object" && typeof (part as { text?: unknown }).text === "string"
237
- ? { ...part, text: defeatAntigravityFingerprint((part as { text: string }).text) }
238
- : part,
239
- );
240
- return { ...body, request: { ...req, systemInstruction: { ...sysObj, parts } } };
241
- }
242
-
243
203
  export type SubscriptionStream = (
244
204
  model: Model<Api>,
245
205
  context: Context,
@@ -274,14 +234,7 @@ export function createSubscriptionStream(
274
234
  const internalOptions: SimpleStreamOptions = {
275
235
  ...(options ?? {}),
276
236
  headers: options?.headers,
277
- onPayload: async (payload: unknown) => {
278
- const rewritten =
279
- canonicalProvider === "google-antigravity"
280
- ? rewriteAntigravitySystemInstruction(payload)
281
- : payload;
282
- const replacement = await options?.onPayload?.(rewritten, model);
283
- return replacement ?? rewritten;
284
- },
237
+ onPayload: async (payload: unknown) => (await options?.onPayload?.(payload, model)) ?? payload,
285
238
  onSseEvent: options?.onSseEvent
286
239
  ? (event: Parameters<NonNullable<SimpleStreamOptions["onSseEvent"]>>[0]) => options.onSseEvent?.(event, model)
287
240
  : undefined,
@@ -380,20 +333,6 @@ export const PROVIDER_TEMPLATES: Record<string, ProviderTemplate> = {
380
333
  },
381
334
  },
382
335
 
383
- "google-gemini-cli": {
384
- displayName: "Google Cloud Code Assist",
385
- buildOAuth(index: number) {
386
- return flowBackedOAuth("google-gemini-cli", `Google Cloud Code Assist #${index}`);
387
- },
388
- },
389
-
390
- "google-antigravity": {
391
- displayName: "Antigravity",
392
- buildOAuth(index: number) {
393
- return flowBackedOAuth("google-antigravity", `Antigravity #${index}`);
394
- },
395
- },
396
-
397
336
  "kimi-code": {
398
337
  displayName: "Kimi Code",
399
338
  buildOAuth(index: number) {
@@ -424,7 +363,6 @@ for (const spec of API_KEY_PROVIDERS) {
424
363
  };
425
364
  }
426
365
 
427
-
428
366
  export const SUPPORTED_PROVIDERS = Object.keys(PROVIDER_TEMPLATES);
429
367
 
430
368
  export function subDisplayName(entry: SubEntry): string {
@@ -470,16 +408,11 @@ export function cloneModels(originalProvider: string, index: number): ProviderMo
470
408
  // Register a single subscription as a provider
471
409
  // ==========================================================================
472
410
 
473
- // pi-ai added the usage registry after 18.1.20, the lowest host this extension
474
- // supports. A static import would stop the whole extension from loading there,
475
- // so older hosts load it and their added accounts get no usage report.
476
- const usageRegistry = await import("@oh-my-pi/pi-ai/usage/registry").catch(() => undefined);
477
-
478
411
  // Built-in usage fetchers only accept their own provider id, so a sub would get no
479
412
  // usage report. Probe as the base provider and relabel the report as the sub. The
480
413
  // host caches, invalidates and retains the relabeled report under the sub's id.
481
414
  function subUsageProvider(baseProvider: string, name: string): UsageProvider | undefined {
482
- const base = usageRegistry?.defaultUsageProvider(baseProvider);
415
+ const base = defaultUsageProvider(baseProvider);
483
416
  if (!base) return undefined;
484
417
  const asSub = (report: UsageReport | null): UsageReport | null =>
485
418
  report && {
@@ -3,34 +3,14 @@
3
3
  // ========================================================================
4
4
  import { randomUUID } from "node:crypto";
5
5
  import type { ExtensionCommandContext, ExtensionContext } from "@oh-my-pi/pi-coding-agent";
6
- import { BorderedLoader } from "@oh-my-pi/pi-coding-agent";
7
- import type { Api, Model } from "@oh-my-pi/pi-ai";
6
+ import * as agent from "@oh-my-pi/pi-coding-agent";
8
7
  import { getBaseProvider, subDisplayName, PROVIDER_TEMPLATES } from "./providers.ts";
9
- import { getAuthStorage, adaptAuthStorage, getModels, subProviderName, type AuthStorageEntry, type MultiAuthConfig, type QuotaAccount, type QuotaCheckResult, type QuotaStatusKind, type ProviderQuotaChecker, type AuthStorage } from "./core.ts";
8
+ import { getAuthStorage, adaptAuthStorage, getModels, subProviderName, type AuthStorageEntry, type QuotaAccount, type QuotaCheckResult, type QuotaStatusKind, type ProviderQuotaChecker, type AuthStorage } from "./core.ts";
10
9
  import { loadGlobalConfig, loadProjectConfig, parseEnvConfig, mergeConfigs, normalizeEntries } from "./config.ts";
11
- import { getWrappedSelectIndex, showWrappedSelect } from "./ui.ts";
10
+ import { showWrappedSelect } from "./ui.ts";
12
11
  import type { SelectItem } from "@oh-my-pi/pi-tui";
13
12
 
14
13
  export const DEFAULT_CODEX_USAGE_BASE_URL = "https://chatgpt.com/backend-api";
15
- export const GOOGLE_GEMINI_QUOTA_ENDPOINT = "https://cloudcode-pa.googleapis.com/v1internal:retrieveUserQuota";
16
- export const GOOGLE_ANTIGRAVITY_QUOTA_ENDPOINTS = [
17
- "https://daily-cloudcode-pa.sandbox.googleapis.com/v1internal:fetchAvailableModels",
18
- "https://cloudcode-pa.googleapis.com/v1internal:fetchAvailableModels",
19
- ] as const;
20
- export const GOOGLE_GEMINI_HEADERS = {
21
- "User-Agent": "google-api-nodejs-client/9.15.1",
22
- "X-Goog-Api-Client": "gl-node/22.17.0",
23
- };
24
- export const GOOGLE_ANTIGRAVITY_HEADERS = {
25
- "User-Agent": "antigravity/1.11.9 windows/amd64",
26
- "X-Goog-Api-Client": "google-cloud-sdk vscode_cloudshelleditor/0.1",
27
- "Client-Metadata": JSON.stringify({
28
- ideType: "IDE_UNSPECIFIED",
29
- platform: "PLATFORM_UNSPECIFIED",
30
- pluginType: "GEMINI",
31
- }),
32
- };
33
- export const GOOGLE_ANTIGRAVITY_HIDDEN_MODELS = new Set(["tab_flash_lite_preview"]);
34
14
  export const OPENAI_AUTH_CLAIM = "https://api.openai.com/auth";
35
15
  export const OPENAI_PROFILE_CLAIM = "https://api.openai.com/profile";
36
16
 
@@ -59,43 +39,6 @@ export interface OpenCodeGoUsageSnapshot {
59
39
  monthly: OpenCodeGoUsageWindow;
60
40
  }
61
41
 
62
- export interface GoogleGeminiQuotaResponse {
63
- buckets?: Array<{
64
- modelId?: string;
65
- remainingFraction?: number;
66
- resetTime?: string;
67
- }>;
68
- }
69
-
70
- export interface GoogleAntigravityQuotaResponse {
71
- models?: Record<
72
- string,
73
- {
74
- displayName?: string;
75
- model?: string;
76
- isInternal?: boolean;
77
- quotaInfo?: {
78
- remainingFraction?: number;
79
- resetTime?: string;
80
- };
81
- }
82
- >;
83
- }
84
-
85
- export interface GoogleQuotaModelSnapshot {
86
- model: string;
87
- remainingPercent?: number;
88
- resetAt?: number;
89
- key?: string;
90
- }
91
-
92
- export interface GoogleQuotaAccountSnapshot {
93
- endpoint: string;
94
- projectId?: string;
95
- models: GoogleQuotaModelSnapshot[];
96
- worstRemainingPercent?: number;
97
- }
98
-
99
42
  export function decodeJwtPayload(token: string): Record<string, unknown> {
100
43
  const parts = token.split(".");
101
44
  if (parts.length < 2) return {};
@@ -359,7 +302,6 @@ export function formatQuotaOverview(results: QuotaCheckResult[]): string {
359
302
  export function formatQuotaCurrentHint(
360
303
  results: QuotaCheckResult[],
361
304
  currentProviderName: string | undefined,
362
- currentModel?: { id: string; name: string },
363
305
  ): string | undefined {
364
306
  if (!currentProviderName) return undefined;
365
307
 
@@ -367,13 +309,6 @@ export function formatQuotaCurrentHint(
367
309
  if (!current) return undefined;
368
310
 
369
311
  let hint = `Current: ${current.account.displayName} is ${formatQuotaKind(current.kind)}`;
370
- if (current.googleSnapshot && currentModel) {
371
- const matches = matchGoogleQuotaModels(current.account.baseProvider, currentModel, current.googleSnapshot);
372
- const worst = pickWorstQuotaModel(matches);
373
- if (worst) {
374
- hint += ` • ${worst.model} ${formatRemainingPercent(worst.remainingPercent)} left`;
375
- }
376
- }
377
312
  const best = results[0];
378
313
  if (best && best.account.providerName !== current.account.providerName) {
379
314
  hint += ` • best available: ${best.account.displayName}`;
@@ -426,7 +361,10 @@ export async function loadQuotaResults(
426
361
  accounts: QuotaAccount[],
427
362
  authStorage: AuthStorage,
428
363
  ): Promise<QuotaCheckResult[] | null> {
429
- if (!ctx.hasUI) {
364
+ const { BorderedLoader } = agent;
365
+ const message = `Checking limits across ${accounts.length} ${accounts.length === 1 ? "account" : "accounts"}...`;
366
+ if (!ctx.hasUI || !BorderedLoader) {
367
+ if (ctx.hasUI) ctx.ui.notify(message, "info");
430
368
  return runQuotaChecks(accounts, authStorage);
431
369
  }
432
370
 
@@ -434,7 +372,7 @@ export async function loadQuotaResults(
434
372
  const loader = new BorderedLoader(
435
373
  tui,
436
374
  theme,
437
- `Checking limits across ${accounts.length} ${accounts.length === 1 ? "account" : "accounts"}...`,
375
+ message,
438
376
  );
439
377
  loader.onAbort = () => done(null);
440
378
 
@@ -464,7 +402,7 @@ export async function selectQuotaResult(
464
402
  subtitle: [
465
403
  "Select an account to inspect its full quota windows.",
466
404
  formatQuotaOverview(results),
467
- formatQuotaCurrentHint(results, currentProviderName, ctx.model),
405
+ formatQuotaCurrentHint(results, currentProviderName),
468
406
  ].filter(Boolean).join("\n"),
469
407
  items: buildQuotaSelectItems(results, currentProviderName),
470
408
  initialValue: currentProviderName,
@@ -475,528 +413,6 @@ export async function selectQuotaResult(
475
413
  return results.find((result) => result.account.providerName === selectedProviderName);
476
414
  }
477
415
 
478
- export function normalizeGoogleRemainingPercent(value: unknown): number | undefined {
479
- if (typeof value !== "number" || !Number.isFinite(value)) return undefined;
480
- return Math.max(0, Math.min(100, Math.round(value * 100)));
481
- }
482
-
483
- export function getGoogleProjectId(account: QuotaAccount, auth: AuthStorageEntry): string | undefined {
484
- if (typeof auth.projectId === "string" && auth.projectId.length > 0) {
485
- return auth.projectId;
486
- }
487
-
488
- if (account.baseProvider === "google-antigravity") {
489
- const projectId = process.env.GOOGLE_ANTIGRAVITY_PROJECT_ID || process.env.GOOGLE_ANTIGRAVITY_PROJECT;
490
- if (projectId) return projectId;
491
- }
492
-
493
- const projectId = process.env.GOOGLE_CLOUD_PROJECT || process.env.GOOGLE_CLOUD_PROJECT_ID;
494
- return projectId || undefined;
495
- }
496
-
497
- export function updateGoogleQuotaModel(
498
- modelsByName: Map<string, GoogleQuotaModelSnapshot>,
499
- model: string,
500
- remainingPercent: number | undefined,
501
- resetAt: number | undefined,
502
- key?: string,
503
- ): void {
504
- const existing = modelsByName.get(model);
505
- if (!existing) {
506
- modelsByName.set(model, { model, remainingPercent, resetAt, key });
507
- return;
508
- }
509
-
510
- let next = existing;
511
- if (existing.key === undefined && key !== undefined) {
512
- next = { ...next, key };
513
- }
514
- if (remainingPercent !== undefined) {
515
- if (existing.remainingPercent === undefined || remainingPercent < existing.remainingPercent) {
516
- next = { ...next, remainingPercent };
517
- }
518
- }
519
- if (resetAt !== undefined) {
520
- if (next.resetAt === undefined || resetAt < next.resetAt) {
521
- next = { ...next, resetAt };
522
- }
523
- }
524
- if (next !== existing) {
525
- modelsByName.set(model, next);
526
- }
527
- }
528
-
529
- export function buildGoogleQuotaSnapshot(
530
- endpoint: string,
531
- projectId: string | undefined,
532
- modelsByName: Map<string, GoogleQuotaModelSnapshot>,
533
- ): GoogleQuotaAccountSnapshot {
534
- const models = [...modelsByName.values()];
535
- const remainingPercents = models
536
- .map((model) => model.remainingPercent)
537
- .filter((value): value is number => value !== undefined);
538
- const worstRemainingPercent = remainingPercents.length > 0
539
- ? Math.min(...remainingPercents)
540
- : undefined;
541
-
542
- return {
543
- endpoint,
544
- projectId,
545
- models,
546
- worstRemainingPercent,
547
- };
548
- }
549
-
550
- export function getGoogleGeminiModelLabel(modelId: string | undefined): string {
551
- if (!modelId) return "unknown";
552
- const normalized = modelId.toLowerCase();
553
- if (normalized.includes("pro")) return "Pro";
554
- if (normalized.includes("flash")) return "Flash";
555
- return modelId;
556
- }
557
-
558
- export function parseGoogleGeminiQuotaSnapshot(
559
- data: unknown,
560
- projectId: string | undefined,
561
- ): GoogleQuotaAccountSnapshot {
562
- const raw = getRecord(data) as GoogleGeminiQuotaResponse | undefined;
563
- const buckets = Array.isArray(raw?.buckets) ? raw.buckets : [];
564
- const modelsByName = new Map<string, GoogleQuotaModelSnapshot>();
565
-
566
- for (const bucketValue of buckets) {
567
- const bucket = getRecord(bucketValue);
568
- const rawKey = typeof bucket?.modelId === "string" ? bucket.modelId : undefined;
569
- if (rawKey && (rawKey.toLowerCase().includes("placeholder") || rawKey.toLowerCase().startsWith("tab_"))) {
570
- continue;
571
- }
572
- const model = getGoogleGeminiModelLabel(rawKey);
573
- if (model.toLowerCase().includes("placeholder")) continue;
574
- const remainingPercent = normalizeGoogleRemainingPercent(bucket?.remainingFraction);
575
- const resetAt = typeof bucket?.resetTime === "string"
576
- ? parseIsoTimestampSeconds(bucket.resetTime)
577
- : undefined;
578
- if (remainingPercent === undefined && resetAt === undefined) continue;
579
- updateGoogleQuotaModel(modelsByName, model, remainingPercent, resetAt, rawKey);
580
- }
581
-
582
- return buildGoogleQuotaSnapshot(GOOGLE_GEMINI_QUOTA_ENDPOINT, projectId, modelsByName);
583
- }
584
-
585
- export function isGoogleAntigravityPlaceholder(value: string | undefined): boolean {
586
- if (!value) return true;
587
- const lower = value.toLowerCase();
588
- return lower.includes("placeholder") || lower.startsWith("model_");
589
- }
590
-
591
- export function isGoogleAntigravityHiddenModel(modelKey: string, displayName?: string): boolean {
592
- const lowerKey = modelKey.toLowerCase();
593
- if (
594
- lowerKey.startsWith("tab_") ||
595
- lowerKey.startsWith("chat_") ||
596
- lowerKey.includes("placeholder") ||
597
- GOOGLE_ANTIGRAVITY_HIDDEN_MODELS.has(lowerKey)
598
- ) {
599
- return true;
600
- }
601
- if (displayName) {
602
- const lowerName = displayName.toLowerCase();
603
- if (
604
- lowerName.includes("placeholder") ||
605
- GOOGLE_ANTIGRAVITY_HIDDEN_MODELS.has(lowerName)
606
- ) {
607
- return true;
608
- }
609
- }
610
- return false;
611
- }
612
-
613
- export function formatAntigravityModelKey(key: string): string {
614
- const base = key.replace(/-tiered$/, "");
615
- try {
616
- const bundled = getModels("google-antigravity");
617
- const exact = bundled.find((m) => m.id === key);
618
- if (exact) return exact.name;
619
- const baseMatch = bundled.find((m) => m.id === base);
620
- if (baseMatch) return baseMatch.name;
621
- } catch {
622
- // Fall back to title-casing below
623
- }
624
-
625
- return base
626
- .split("-")
627
- .map((part) => (part.length > 0 ? part[0].toUpperCase() + part.slice(1) : part))
628
- .join(" ");
629
- }
630
-
631
- export function parseGoogleAntigravityQuotaSnapshot(
632
- data: unknown,
633
- endpoint: string,
634
- projectId: string | undefined,
635
- ): GoogleQuotaAccountSnapshot {
636
- const raw = getRecord(data) as GoogleAntigravityQuotaResponse | undefined;
637
- const rawModels = getRecord(raw?.models);
638
- const modelsByName = new Map<string, GoogleQuotaModelSnapshot>();
639
-
640
- if (rawModels) {
641
- for (const [modelKey, modelValue] of Object.entries(rawModels)) {
642
- const model = getRecord(modelValue);
643
- if (model?.isInternal === true) continue;
644
- if (isGoogleAntigravityHiddenModel(modelKey)) continue;
645
-
646
- const rawDisplayName = typeof model?.displayName === "string" && model.displayName.length > 0
647
- ? model.displayName
648
- : typeof model?.model === "string" && model.model.length > 0 && !isGoogleAntigravityPlaceholder(model.model)
649
- ? model.model
650
- : undefined;
651
-
652
- const displayName = (rawDisplayName && !isGoogleAntigravityPlaceholder(rawDisplayName))
653
- ? rawDisplayName
654
- : formatAntigravityModelKey(modelKey);
655
-
656
- if (isGoogleAntigravityHiddenModel(modelKey, displayName)) continue;
657
-
658
- const quotaInfo = getRecord(model?.quotaInfo);
659
- const remainingPercent = normalizeGoogleRemainingPercent(quotaInfo?.remainingFraction);
660
- const resetAt = typeof quotaInfo?.resetTime === "string"
661
- ? parseIsoTimestampSeconds(quotaInfo.resetTime)
662
- : undefined;
663
- if (remainingPercent === undefined && resetAt === undefined) continue;
664
- updateGoogleQuotaModel(modelsByName, displayName, remainingPercent, resetAt, modelKey);
665
- }
666
- }
667
-
668
- return buildGoogleQuotaSnapshot(endpoint, projectId, modelsByName);
669
- }
670
-
671
- export function normalizeModelToken(value: string): string {
672
- return value.toLowerCase().replace(/[^a-z0-9]/g, "");
673
- }
674
-
675
- export function stripCloneSuffix(name: string): string {
676
- return name.replace(/\s*\(#\d+\)\s*$/, "");
677
- }
678
-
679
- export function getGeminiFamily(model: { id: string; name: string }): "pro" | "flash" | undefined {
680
- const idNorm = normalizeModelToken(model.id);
681
- const nameNorm = normalizeModelToken(model.name);
682
- if (idNorm.includes("pro") || nameNorm.includes("pro")) return "pro";
683
- if (idNorm.includes("flash") || nameNorm.includes("flash")) return "flash";
684
- return undefined;
685
- }
686
-
687
- export function matchGoogleQuotaModels(
688
- baseProvider: string,
689
- model: { id: string; name: string },
690
- snapshot: GoogleQuotaAccountSnapshot,
691
- ): GoogleQuotaModelSnapshot[] {
692
- if (baseProvider === "google-gemini-cli") {
693
- const family = getGeminiFamily(model);
694
- if (!family) return [];
695
- return snapshot.models.filter((bucket) => bucket.model.toLowerCase() === family);
696
- }
697
-
698
- const mid = normalizeModelToken(model.id);
699
- const mname = normalizeModelToken(stripCloneSuffix(model.name));
700
-
701
- return snapshot.models.filter((bucket) => {
702
- const bkey = normalizeModelToken(bucket.key ?? "");
703
- const blabel = normalizeModelToken(bucket.model);
704
-
705
- if (bkey && mid && bkey === mid) return true;
706
- if (blabel && mname && blabel === mname) return true;
707
-
708
- if (bkey && mid && Math.min(bkey.length, mid.length) >= 4) {
709
- if (bkey.startsWith(mid) || mid.startsWith(bkey)) return true;
710
- }
711
- if (blabel && mname && Math.min(blabel.length, mname.length) >= 4) {
712
- if (blabel.startsWith(mname) || mname.startsWith(blabel)) return true;
713
- }
714
-
715
- return false;
716
- });
717
- }
718
-
719
- export function pickWorstQuotaModel(models: GoogleQuotaModelSnapshot[]): GoogleQuotaModelSnapshot | undefined {
720
- if (models.length === 0) return undefined;
721
- let worst = models[0];
722
- for (let i = 1; i < models.length; i++) {
723
- const current = models[i];
724
- const currentPercent = current.remainingPercent ?? 101;
725
- const worstPercent = worst.remainingPercent ?? 101;
726
- if (currentPercent < worstPercent) {
727
- worst = current;
728
- }
729
- }
730
- return worst;
731
- }
732
-
733
- export function classifyGoogleQuotaKind(snapshot: GoogleQuotaAccountSnapshot): {
734
- kind: QuotaStatusKind;
735
- score: number;
736
- } {
737
- const bottleneck = snapshot.worstRemainingPercent;
738
- if (bottleneck === undefined) {
739
- return { kind: "error", score: 0 };
740
- }
741
- if (bottleneck <= 5) return { kind: "blocked", score: bottleneck };
742
- if (bottleneck <= 15) return { kind: "low", score: bottleneck };
743
- if (bottleneck <= 30) return { kind: "watch", score: bottleneck };
744
- return { kind: "ready", score: bottleneck };
745
- }
746
-
747
- export async function resolveGoogleQuotaAccess(
748
- account: QuotaAccount,
749
- auth: AuthStorageEntry,
750
- authStorage: AuthStorage,
751
- signal?: AbortSignal,
752
- ): Promise<{ accessToken: string; projectId?: string }> {
753
- const projectId = getGoogleProjectId(account, auth);
754
- const hasFreshAccess = typeof auth.access === "string"
755
- && auth.access.length > 0
756
- && (typeof auth.expires !== "number" || auth.expires > Date.now() + 60_000);
757
- if (hasFreshAccess) {
758
- return { accessToken: auth.access!, projectId };
759
- }
760
-
761
- const storage = adaptAuthStorage(authStorage);
762
- const access = await (typeof storage.getOAuthAccess === "function"
763
- ? storage.getOAuthAccess(account.providerName, undefined, { signal })
764
- : undefined);
765
- if (!access) {
766
- throw new Error("Unable to refresh Google OAuth credentials. Log in again.");
767
- }
768
- return {
769
- accessToken: access.accessToken,
770
- projectId: access.projectId || projectId,
771
- };
772
- }
773
-
774
- export async function fetchGoogleGeminiQuotaSnapshot(
775
- accessToken: string,
776
- projectId: string | undefined,
777
- signal?: AbortSignal,
778
- ): Promise<GoogleQuotaAccountSnapshot> {
779
- const response = await fetch(GOOGLE_GEMINI_QUOTA_ENDPOINT, {
780
- method: "POST",
781
- headers: {
782
- Authorization: `Bearer ${accessToken}`,
783
- Accept: "application/json",
784
- "Content-Type": "application/json",
785
- ...GOOGLE_GEMINI_HEADERS,
786
- },
787
- body: "{}",
788
- signal,
789
- });
790
- if (!response.ok) {
791
- throw new Error(await readResponseError(response));
792
- }
793
- return parseGoogleGeminiQuotaSnapshot(await response.json(), projectId);
794
- }
795
-
796
- export async function fetchGoogleAntigravityQuotaSnapshot(
797
- accessToken: string,
798
- projectId: string | undefined,
799
- signal?: AbortSignal,
800
- ): Promise<GoogleQuotaAccountSnapshot> {
801
- let lastError = "Google quota lookup failed";
802
-
803
- for (const endpoint of GOOGLE_ANTIGRAVITY_QUOTA_ENDPOINTS) {
804
- const response = await fetch(endpoint, {
805
- method: "POST",
806
- headers: {
807
- Authorization: `Bearer ${accessToken}`,
808
- Accept: "application/json",
809
- "Content-Type": "application/json",
810
- ...GOOGLE_ANTIGRAVITY_HEADERS,
811
- },
812
- body: JSON.stringify(projectId ? { project: projectId } : {}),
813
- signal,
814
- });
815
- if (response.ok) {
816
- return parseGoogleAntigravityQuotaSnapshot(await response.json(), endpoint, projectId);
817
- }
818
- lastError = await readResponseError(response);
819
- }
820
-
821
- throw new Error(lastError);
822
- }
823
-
824
- export function getGoogleQuotaBucketLabel(account: QuotaAccount, count: number): string {
825
- if (account.baseProvider === "google-gemini-cli") {
826
- return `${count} ${count === 1 ? "family" : "families"}`;
827
- }
828
- return `${count} ${count === 1 ? "model" : "models"}`;
829
- }
830
-
831
- export function buildGoogleQuotaErrorDetails(
832
- account: QuotaAccount,
833
- message: string,
834
- projectId?: string,
835
- ): string[] {
836
- const details = [
837
- `account: ${account.displayName}`,
838
- `provider: ${account.providerName}`,
839
- "status: error",
840
- ];
841
- if (projectId) {
842
- details.push(`project: ${projectId}`);
843
- }
844
- details.push(`details: ${message}`);
845
-
846
- if (/401|unauthorized/i.test(message)) {
847
- details.push("login: use /multi-auth login or /login to authenticate this account again");
848
- return details;
849
- }
850
-
851
- if (/403|permission/i.test(message)) {
852
- if (account.baseProvider === "google-gemini-cli") {
853
- details.push(
854
- "hint: Google Cloud Code Assist rejected quota access for this account; try /multi-auth login again and verify this account still has Gemini quota access",
855
- );
856
- } else {
857
- details.push(
858
- "hint: Google rejected this Antigravity quota request; verify the saved project/account pairing is still valid and try /multi-auth login again",
859
- );
860
- }
861
- }
862
-
863
- return details;
864
- }
865
-
866
- export function formatGoogleQuotaDetails(
867
- account: QuotaAccount,
868
- snapshot: GoogleQuotaAccountSnapshot,
869
- kind: QuotaStatusKind,
870
- currentModel?: { id: string; name: string },
871
- ): string[] {
872
- const details = [
873
- `account: ${account.displayName}`,
874
- `provider: ${account.providerName}`,
875
- `status: ${formatQuotaKind(kind)}`,
876
- ];
877
- if (snapshot.projectId) {
878
- details.push(`project: ${snapshot.projectId}`);
879
- }
880
- if (snapshot.worstRemainingPercent !== undefined) {
881
- details.push(`bottleneck: ${formatRemainingPercent(snapshot.worstRemainingPercent)} left`);
882
- }
883
-
884
- let currentModelLabels = new Set<string>();
885
- if (currentModel) {
886
- const matches = matchGoogleQuotaModels(account.baseProvider, currentModel, snapshot);
887
- const worst = pickWorstQuotaModel(matches);
888
- if (worst) {
889
- details.push(
890
- `current model (${worst.model}): ${formatRemainingPercent(worst.remainingPercent)} left, resets ${formatResetLong(worst.resetAt)}`,
891
- );
892
- currentModelLabels = new Set(matches.map((m) => m.model));
893
- } else {
894
- details.push(`current model (${currentModel.name}): not tracked by this provider`);
895
- }
896
- }
897
-
898
- for (const model of [...snapshot.models].sort((left, right) => {
899
- const leftPercent = left.remainingPercent ?? 101;
900
- const rightPercent = right.remainingPercent ?? 101;
901
- return leftPercent - rightPercent || left.model.localeCompare(right.model);
902
- })) {
903
- const suffix = currentModelLabels.has(model.model) ? " ← current" : "";
904
- details.push(
905
- `${model.model}: ${formatRemainingPercent(model.remainingPercent)} left, resets ${formatResetLong(model.resetAt)}${suffix}`,
906
- );
907
- }
908
- details.push(`endpoint: ${snapshot.endpoint}`);
909
- return details;
910
- }
911
-
912
- export async function checkGoogleQuotaAccount(
913
- account: QuotaAccount,
914
- fetchSnapshot: (
915
- accessToken: string,
916
- projectId: string | undefined,
917
- signal?: AbortSignal,
918
- ) => Promise<GoogleQuotaAccountSnapshot>,
919
- authStorage: AuthStorage,
920
- signal?: AbortSignal,
921
- ): Promise<QuotaCheckResult> {
922
- const auth = account.auth;
923
- if (!auth || auth.type !== "oauth") {
924
- return {
925
- account,
926
- kind: "missing-auth",
927
- summary: "not logged in",
928
- details: [
929
- `account: ${account.displayName}`,
930
- `provider: ${account.providerName}`,
931
- "status: not logged in",
932
- "login: use /multi-auth login or /login to authenticate this account",
933
- ],
934
- score: 0,
935
- };
936
- }
937
- if ((typeof auth.access !== "string" || auth.access.length === 0)
938
- && (typeof auth.refresh !== "string" || auth.refresh.length === 0)) {
939
- return {
940
- account,
941
- kind: "missing-auth",
942
- summary: "missing Google tokens",
943
- details: [
944
- `account: ${account.displayName}`,
945
- `provider: ${account.providerName}`,
946
- "status: not logged in",
947
- "details: saved Google credentials are missing both access and refresh tokens",
948
- "login: use /multi-auth login or /login to authenticate this account again",
949
- ],
950
- score: 0,
951
- };
952
- }
953
-
954
-
955
- let projectId: string | undefined;
956
-
957
- try {
958
- const credentials = await resolveGoogleQuotaAccess(account, auth, authStorage, signal);
959
- projectId = credentials.projectId;
960
- const snapshot = await fetchSnapshot(credentials.accessToken, credentials.projectId, signal);
961
- if (snapshot.models.length === 0 || snapshot.worstRemainingPercent === undefined) {
962
- return {
963
- account,
964
- kind: "error",
965
- summary: "no model quota data returned",
966
- details: [
967
- `account: ${account.displayName}`,
968
- `provider: ${account.providerName}`,
969
- "status: error",
970
- ...(projectId ? [`project: ${projectId}`] : []),
971
- "details: Google returned no usable model quota data",
972
- `endpoint: ${snapshot.endpoint}`,
973
- ],
974
- score: 0,
975
- };
976
- }
977
-
978
- const classification = classifyGoogleQuotaKind(snapshot);
979
- return {
980
- account,
981
- kind: classification.kind,
982
- summary: `${getGoogleQuotaBucketLabel(account, snapshot.models.length)} | bottleneck ${formatRemainingPercent(snapshot.worstRemainingPercent)} | ${formatQuotaKind(classification.kind)}`,
983
- details: formatGoogleQuotaDetails(account, snapshot, classification.kind),
984
- score: classification.score,
985
- googleSnapshot: snapshot,
986
- };
987
- } catch (error: unknown) {
988
- if (signal?.aborted || isAbortError(error)) throw error;
989
- const message = error instanceof Error ? error.message : String(error);
990
- return {
991
- account,
992
- kind: "error",
993
- summary: message,
994
- details: buildGoogleQuotaErrorDetails(account, message, projectId),
995
- score: 0,
996
- };
997
- }
998
- }
999
-
1000
416
  export function normalizeQuotaAllowedProviderNames(cwd: string): string[] | undefined {
1001
417
  const project = loadProjectConfig(cwd);
1002
418
  if (!project?.allowedSubs || project.allowedSubs.length === 0) return undefined;
@@ -1151,20 +567,6 @@ export const codexQuotaChecker: ProviderQuotaChecker = {
1151
567
  },
1152
568
  };
1153
569
 
1154
- export const googleGeminiCliQuotaChecker: ProviderQuotaChecker = {
1155
- baseProvider: "google-gemini-cli",
1156
- async check(account: QuotaAccount, authStorage: AuthStorage, signal?: AbortSignal): Promise<QuotaCheckResult> {
1157
- return checkGoogleQuotaAccount(account, fetchGoogleGeminiQuotaSnapshot, authStorage, signal);
1158
- },
1159
- };
1160
-
1161
- export const googleAntigravityQuotaChecker: ProviderQuotaChecker = {
1162
- baseProvider: "google-antigravity",
1163
- async check(account: QuotaAccount, authStorage: AuthStorage, signal?: AbortSignal): Promise<QuotaCheckResult> {
1164
- return checkGoogleQuotaAccount(account, fetchGoogleAntigravityQuotaSnapshot, authStorage, signal);
1165
- },
1166
- };
1167
-
1168
570
  export const OPENCODE_GO_DEFAULT_BASE_URL = "https://opencode.ai/inference/go";
1169
571
  // Background poll outside any conversation; the route requires some session id.
1170
572
  const OPENCODE_GO_USAGE_SESSION = randomUUID();
@@ -1215,12 +617,11 @@ export function pickOpenCodeGoBottleneck(snapshot: OpenCodeGoUsageSnapshot): {
1215
617
  export const opencodeGoQuotaChecker: ProviderQuotaChecker = {
1216
618
  baseProvider: "opencode-go",
1217
619
  async check(account: QuotaAccount, authStorage: AuthStorage, signal?: AbortSignal): Promise<QuotaCheckResult> {
1218
- const auth = account.auth;
1219
- // The host key cascade also covers env/config/runtime keys and is looked up per provider name,
1220
- // so clones never inherit the canonical provider's env key. Older hosts lack it: use the stored key.
1221
- const keys = authStorage.keys as { peek?: (provider: string) => Promise<string | undefined> } | undefined;
1222
- const key = (await keys?.peek?.(account.providerName))
1223
- ?? (auth?.type === "api_key" && typeof auth.key === "string" ? auth.key : "");
620
+ // The host key cascade covers env/config/runtime/stored keys per provider name,
621
+ // so clones never inherit the canonical provider's env key.
622
+ // AuthStorage's index signature widens `keys` to `unknown`; omp >=19 always exposes `keys.peek`.
623
+ const keys = authStorage.keys as { peek(provider: string): Promise<string | undefined> };
624
+ const key = await keys.peek(account.providerName);
1224
625
  const fail = (kind: QuotaStatusKind, summary: string, extra: string[]): QuotaCheckResult => ({
1225
626
  account,
1226
627
  kind,
@@ -1294,8 +695,6 @@ export const opencodeGoQuotaChecker: ProviderQuotaChecker = {
1294
695
 
1295
696
  export const PROVIDER_QUOTA_CHECKERS: ProviderQuotaChecker[] = [
1296
697
  codexQuotaChecker,
1297
- googleGeminiCliQuotaChecker,
1298
- googleAntigravityQuotaChecker,
1299
698
  opencodeGoQuotaChecker,
1300
699
  ];
1301
700
 
@@ -1303,14 +702,10 @@ export async function showQuotaDetails(
1303
702
  ctx: ExtensionCommandContext,
1304
703
  result: QuotaCheckResult,
1305
704
  ): Promise<void> {
1306
- const details = (result.googleSnapshot && result.account.providerName === ctx.model?.provider && ctx.model)
1307
- ? formatGoogleQuotaDetails(result.account, result.googleSnapshot, result.kind, ctx.model)
1308
- : result.details;
1309
-
1310
705
  await showWrappedSelect(ctx, {
1311
706
  title: `Limit Details: ${result.account.displayName}`,
1312
707
  subtitle: "Press Enter or Escape to go back to the limits list.",
1313
- items: details.map((detail, index) => ({ value: `${index}:${detail}`, label: detail })),
708
+ items: result.details.map((detail, index) => ({ value: `${index}:${detail}`, label: detail })),
1314
709
  confirmHint: "back",
1315
710
  cancelHint: "back",
1316
711
  });
@@ -1354,19 +749,12 @@ export const QUOTA_STATUS_KEY = "multi-auth-quota";
1354
749
 
1355
750
  export function formatCurrentModelQuota(
1356
751
  result: QuotaCheckResult,
1357
- model: { id: string; name: string; provider: string },
752
+ _model: { id: string; name: string; provider: string },
1358
753
  ): string | undefined {
1359
754
  if (result.kind === "missing-auth" || result.kind === "error") {
1360
755
  return undefined;
1361
756
  }
1362
757
 
1363
- if (result.googleSnapshot) {
1364
- const matches = matchGoogleQuotaModels(result.account.baseProvider, model, result.googleSnapshot);
1365
- const worst = pickWorstQuotaModel(matches);
1366
- if (!worst) return undefined;
1367
- return `${worst.model} ${formatRemainingPercent(worst.remainingPercent)} ${formatResetShort(worst.resetAt)}`;
1368
- }
1369
-
1370
758
  if (result.codexSnapshot) {
1371
759
  const s = result.codexSnapshot;
1372
760
  const five = getCodexWindowRemaining(s.fiveHour);
@@ -1,7 +1,11 @@
1
1
  // Shared TUI select helpers.
2
2
  import type { ExtensionCommandContext } from "@oh-my-pi/pi-coding-agent";
3
- import { DynamicBorder, keyHint } from "@oh-my-pi/pi-coding-agent";
4
- import { Container, Key, SelectList, Text, matchesKey, type SelectItem } from "@oh-my-pi/pi-tui";
3
+ import * as agent from "@oh-my-pi/pi-coding-agent";
4
+ import * as tuiComponents from "@oh-my-pi/pi-tui";
5
+ import type { SelectItem } from "@oh-my-pi/pi-tui";
6
+
7
+ const { DynamicBorder, keyHint } = agent;
8
+ const { Container, Key, SelectList, Text, matchesKey } = tuiComponents;
5
9
 
6
10
  export function getWrappedSelectIndex(items: SelectItem[], value: string | undefined): number {
7
11
  if (!value) return 0;
@@ -22,7 +26,8 @@ export async function showWrappedSelect(
22
26
  ): Promise<string | undefined> {
23
27
  if (options.items.length === 0) return undefined;
24
28
 
25
- if (!ctx.hasUI) {
29
+ // OMP 19's legacy bridge provides native dialogs but omits the TUI components.
30
+ if (!ctx.hasUI || !DynamicBorder || !keyHint || !Container || !Key || !SelectList || !Text || !matchesKey) {
26
31
  const renderedItems = options.items.map((item) =>
27
32
  item.description ? `${item.label} — ${item.description}` : item.label,
28
33
  );
@@ -1,6 +1,6 @@
1
1
  import type { ExtensionAPI, ExtensionCommandContext, ExtensionContext } from "@oh-my-pi/pi-coding-agent";
2
2
  import { loadGlobalConfig, parseEnvConfig, mergeConfigs, normalizeEntries, loadEffectiveConfig, formatAllowedProviderSummary, getProjectScopedProviderNames, findSelectableModelForProvider, getProviderDisplayName } from "./lib/config.ts";
3
- import { registerSub, rewriteAntigravitySystemInstruction } from "./lib/providers.ts";
3
+ import { registerSub } from "./lib/providers.ts";
4
4
  import { handleSubsMenu, handleSubsList, handleSubsAdd, handleSubsRemove, handleSubsLogin, handleSubsLogout, handleSubsSwitch, handleSubsStatus } from "./lib/commands-subs.ts";
5
5
  import { handleSubsLimits, refreshQuotaStatusLine, invalidateStatusQuota } from "./lib/quota.ts";
6
6
  import { handlePresetActivate, handlePresetCreate, handlePresetList, handlePresetToggle, handlePresetRemove, handlePresetMenu } from "./lib/commands-preset.ts";
@@ -20,13 +20,6 @@ export default function multiSub(pi: ExtensionAPI) {
20
20
  registerSub(pi, entry);
21
21
  }
22
22
 
23
- // Break Cloud Code Assist's system-prompt fingerprint at the OMP payload seam (base provider).
24
- pi.on("before_provider_request", (event, ctx) => {
25
- if (ctx.model?.provider === "google-antigravity") {
26
- return rewriteAntigravitySystemInstruction(event.payload);
27
- }
28
- });
29
-
30
23
  let projectRestrictionSwitchInFlight = false;
31
24
  const enforceProjectRestriction = async (
32
25
  ctx: ExtensionContext | ExtensionCommandContext,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omp-multi-auth",
3
- "version": "1.4.2",
3
+ "version": "2.0.0",
4
4
  "type": "module",
5
5
  "description": "Multi-account OAuth login for omp (Oh My Pi) -- add and manage multiple accounts per provider from one place.",
6
6
  "keywords": [
@@ -33,10 +33,10 @@
33
33
  "access": "public"
34
34
  },
35
35
  "peerDependencies": {
36
- "@oh-my-pi/pi-ai": "^18.1.20",
37
- "@oh-my-pi/pi-catalog": "^18.1.20",
38
- "@oh-my-pi/pi-coding-agent": "^18.1.20",
39
- "@oh-my-pi/pi-tui": "^18.1.20"
36
+ "@oh-my-pi/pi-ai": "^19.3.0",
37
+ "@oh-my-pi/pi-catalog": "^19.3.0",
38
+ "@oh-my-pi/pi-coding-agent": "^19.3.0",
39
+ "@oh-my-pi/pi-tui": "^19.3.0"
40
40
  },
41
41
  "omp": {
42
42
  "extensions": [