From 9a654564948282c6d08019b1bc8470ee5cbd824d Mon Sep 17 00:00:00 2001 From: "Andrew (agent)" Date: Fri, 13 Nov 2026 20:12:06 -0500 Subject: [PATCH 01/41] feat(accounts): read-only per-account Antigravity probe and manual model discovery Original PR: #8642 --- .../010_design.md | 86 ++++++++ .../docs/reference/cli/providers-accounts.md | 18 ++ .../provider-workspace/AccountProbe.tsx | 53 +++++ .../provider-workspace/ProviderAuthPanel.tsx | 19 ++ .../ProviderModelDiscovery.tsx | 120 ++++++++++ .../provider-workspace/ProviderSettings.tsx | 4 + gui/src/hooks/useAccountProbe.ts | 81 +++++++ gui/src/i18n/account-probe-copy.ts | 36 +++ gui/src/i18n/de.ts | 2 + gui/src/i18n/en.ts | 2 + gui/src/i18n/fr.ts | 2 + gui/src/i18n/ja.ts | 2 + gui/src/i18n/ko.ts | 2 + gui/src/i18n/pt.ts | 2 + gui/src/i18n/ru.ts | 2 + gui/src/i18n/tr.ts | 2 + gui/src/i18n/vi.ts | 2 + gui/src/i18n/zh-TW.ts | 2 + gui/src/i18n/zh.ts | 2 + scripts/test-layout/layout.json | 1 + .../ocx/references/01_management_surface.md | 16 +- skills/ocx/references/01_surface_accounts.md | 21 +- .../references/01_surface_providers-models.md | 20 +- src/cli/account-probe.ts | 66 ++++++ src/cli/account.ts | 5 + src/cli/capabilities-accounts.ts | 7 + src/cli/capabilities-provider-models.ts | 6 + src/cli/models-runtime-subcommands.ts | 1 + src/cli/models-runtime.ts | 30 +++ .../quota/antigravity-account-probe.ts | 166 ++++++++++++++ src/providers/quota/antigravity.ts | 35 +++ src/server/management/model-routes.ts | 30 +++ src/server/management/oauth-account-routes.ts | 17 ++ src/server/management/route-registry.ts | 2 + tests/fixtures/test-layout-expected.json | 2 +- tests/server/account-probe-routes.test.ts | 205 ++++++++++++++++++ 36 files changed, 1062 insertions(+), 7 deletions(-) create mode 100644 devlog/_plan/261112_account_probe_and_model_discovery/010_design.md create mode 100644 gui/src/components/provider-workspace/AccountProbe.tsx create mode 100644 gui/src/components/provider-workspace/ProviderModelDiscovery.tsx create mode 100644 gui/src/hooks/useAccountProbe.ts create mode 100644 gui/src/i18n/account-probe-copy.ts create mode 100644 src/cli/account-probe.ts create mode 100644 src/providers/quota/antigravity-account-probe.ts create mode 100644 tests/server/account-probe-routes.test.ts diff --git a/devlog/_plan/261112_account_probe_and_model_discovery/010_design.md b/devlog/_plan/261112_account_probe_and_model_discovery/010_design.md new file mode 100644 index 00000000000..1dc983c138d --- /dev/null +++ b/devlog/_plan/261112_account_probe_and_model_discovery/010_design.md @@ -0,0 +1,86 @@ +# Per-account probe and manual model discovery + +Status: implemented on `feat/antigravity-account-probe`. + +## Problem + +1. `POST /api/providers/test` resolves only the active account's token, so an operator with a + pool of Google Antigravity accounts cannot tell which individual accounts still work. Accounts + that started returning `permission_denied` could only be checked with an out-of-tree script. +2. Model discovery runs implicitly (catalog convergence, `liveModels`). There is no per-provider + "discover now" action, and recent arrivals only show as small NEW badges on the Models page. + +## 1. Per-account probe + +`POST /api/oauth/accounts/probe` — body `{ "provider": "google-antigravity", "accountId"?: string }`. +Omitting `accountId` probes every stored account (concurrency 4). Response: + +```json +{ "provider": "google-antigravity", "probedAt": "", + "results": [{ "accountId": "…", "maskedLabel": "a***b@example.com", "active": true, "paused": false, + "status": "ok", "httpStatus": 200, "reason": null, "message": null, + "expiresAt": 0, "latencyMs": 412, "quota": { "customWindows": [] } }] } +``` + +`status` is one of: + +| status | meaning | rule | +| --- | --- | --- | +| `ok` | usable | HTTP 200 | +| `paused` | account is paused by the operator; not tested | `account.paused === true`; no request is sent | +| `token_expired` | stored access token expired, not refreshed | `credential.expires <= now`; no request is sent | +| `suspended` | upstream says the account is suspended/disabled | 403 whose reason/message names suspension, disablement or ToS | +| `verification_required` | upstream asks the user to verify the account | 403 with `details[].reason == VALIDATION_REQUIRED` or "verify your account" wording | +| `rate_limited` | throttled / quota exhausted | 429 or `RESOURCE_EXHAUSTED` | +| `permission_denied` | other 403 | 403 | +| `error` | anything else (401, 5xx, transport, missing project) | `httpStatus` and `reason` carry the detail | + +Read-only by construction: + +- Uses the account's stored access token exactly as read through `getAccountSet()`; never calls + `getValidAccessToken`, never refreshes, never writes the auth store, never changes pause, + active, cooldown or health state. Paused accounts are skipped with status `paused` and no + request: an operator who parked an account has said not to use it, and a probe is still a use. + To test one, resume it first. +- One request: `POST https://daily-cloudcode-pa.googleapis.com/v1internal:retrieveUserQuotaSummary` + with `{ "project": }` and `User-Agent: antigravityCliUserAgent()`. Unlike the quota + poller there is no 403 retry under the IDE UA and no `fetchAvailableModels` fallback: the + first answer is the evidence, and the CLI fingerprint is the one that reports the Gemini group. +- Goes through the pinned provider-outbound transport used by the quota poller. +- The response carries no token. `message` is Google's error message passed through + `sanitizeUpstreamErrorText` and truncated to 300 characters. + +Only `google-antigravity` is supported for now; other providers get HTTP 400 +`account probe is not supported for this provider`. The request/response shape is provider-neutral +so another provider can plug in a probe function later. + +CLI: `ocx account probe [] [--json]` (capability registered in +`src/cli/capabilities-accounts.ts`). + +GUI: Providers → Google Antigravity → Available accounts. Each account row gets a **Test** button; +the result renders under the row as a coloured badge plus `HTTP · · `. +The section head gets **Test all**. + +## 2. Manual model discovery + +`POST /api/model-discovery/refresh` — body `{ "provider": "" }`. + +1. 404 for an unknown provider; `{ ok: false, applicable: false, reason: "static_catalog" }` when the + provider has `liveModels: false` (no live endpoint to ask). +2. Snapshot the provider's `recentArrivals` ids, `clearModelCache(provider)`, then run the normal + catalog convergence (`convergeCodexCatalog`), which re-fetches the provider and records new + arrivals through the existing new-model policy. +3. Respond with `{ ok, provider, discovery, liveModelCount, newArrivals, recentArrivals, catalogRefresh }`, + where `newArrivals` are the arrivals recorded by this call and `discovery` is the provider's + discovery status (`ok` / `failed` + reason / http status). + +CLI: `ocx models discover [--json]`. + +GUI: provider settings, directly under the "Discover models from provider" toggle: a +**Discover now** button and a "Recently added" list (newest first, with date and whether the model +was auto-disabled by the new-model policy). + +## Not changed + +- `POST /api/providers/test` and the active-account path. +- Token refresh, re-login, pause/resume semantics. diff --git a/docs-site/src/content/docs/reference/cli/providers-accounts.md b/docs-site/src/content/docs/reference/cli/providers-accounts.md index d6f2dce16e7..9b68bc70c4d 100644 --- a/docs-site/src/content/docs/reference/cli/providers-accounts.md +++ b/docs-site/src/content/docs/reference/cli/providers-accounts.md @@ -1063,6 +1063,24 @@ token re-login or a plain account-list re-read. `--json` returns failures exit 1; an upstream quota probe that fails or times out degrades to a null or stale report instead (exit 0), matching the dashboard's quota bars. +### `ocx account probe google-antigravity [id|alias] [--json]` + +Read-only per-account check for Google Antigravity. Each account gets one +`retrieveUserQuotaSummary` request with its own stored access token, under the CLI fingerprint, and +the result is classified as `ok`, `rate_limited`, `verification_required`, `suspended`, +`permission_denied` or `error` (with the HTTP status and Google's reason). Two outcomes are decided +locally and send nothing: `paused` (the account is paused; resume it to test it) and `token_expired` +(the stored token has expired). The probe never refreshes a token, never writes the auth store and +never changes pause, active, cooldown or health state. The dashboard's **Test** and **Test all** +buttons on Antigravity account rows call the same endpoint, `POST /api/oauth/accounts/probe`. + +### `ocx models discover [--json]` + +Runs the provider's live model discovery now instead of waiting for the next scheduled refresh, and +prints how many live models it saw and which ones are new. It is the same action as **Discover now** +under the provider's settings (`POST /api/model-discovery/refresh`). Providers without live +discovery report that discovery is off. + ### `ocx account auto-switch > [--json]` Controls the `openai` Codex pool threshold, or stores a threshold for a generic OAuth pool. `on` stores 80%, `off` stores 0%, and `threshold ` accepts 0–100. A generic pool threshold steers selection only while `pool.kernel` is on with `strategy: "fill-first"`; with the flag off, saving one does not enable threshold-based switching. It never changes the provider enablement override or disables reactive 429 rotation. `status` and mutation output for generic pools use the confirmed server response. For generic pools, `poolEnabled` is the stored provider override (`null` means unspecified), not inherited effective state; `inert: true` means the threshold is stored but not applied, `inert: false` means the pool is applying it, and an absent `inert` is an unknown capability, which never reports `enabled: true`. API-key providers and invalid values are rejected. diff --git a/gui/src/components/provider-workspace/AccountProbe.tsx b/gui/src/components/provider-workspace/AccountProbe.tsx new file mode 100644 index 00000000000..8af55e07e91 --- /dev/null +++ b/gui/src/components/provider-workspace/AccountProbe.tsx @@ -0,0 +1,53 @@ +import { useT } from "../../i18n/shared"; +import type { AccountProbeController, AccountProbeEntry, AccountProbeStatus } from "../../hooks/useAccountProbe"; + +function statusBadgeClass(status: AccountProbeStatus): string { + if (status === "ok") return "badge badge-green"; + if (status === "token_expired" || status === "paused") return "badge badge-muted"; + return "badge badge-amber"; +} + +export function AccountProbeButton({ controller, accountId, label, disabled }: { + controller: AccountProbeController; accountId: string; label: string; disabled?: boolean; +}) { + const t = useT(); + const pending = controller.isPending(accountId); + return ( + + ); +} + +/** One line under the account row: verdict badge, then HTTP code, reason and upstream message. */ +export function AccountProbeResultLine({ entry }: { entry: AccountProbeEntry | undefined }) { + const t = useT(); + if (!entry) return null; + const time = new Date(entry.at).toLocaleTimeString(); + if ("failed" in entry) { + return
{`${t("acctProbe.failed")} · ${time}`}
; + } + const { result } = entry; + const evidence = [ + result.httpStatus !== null ? `HTTP ${result.httpStatus}` : null, + result.reason, + result.message, + ].filter((part): part is string => Boolean(part)).join(" · "); + const windows = (result.quota?.customWindows ?? []) + .map(window => `${window.label} ${Math.max(0, Math.round(100 - window.percent))}%`) + .join(" · "); + return ( +
+ {t(`acctProbe.status.${result.status}`)} + {evidence && {evidence}} + {windows && {windows}} + {time} +
+ ); +} diff --git a/gui/src/components/provider-workspace/ProviderAuthPanel.tsx b/gui/src/components/provider-workspace/ProviderAuthPanel.tsx index 43d056afccc..fc5b40e0cd9 100644 --- a/gui/src/components/provider-workspace/ProviderAuthPanel.tsx +++ b/gui/src/components/provider-workspace/ProviderAuthPanel.tsx @@ -29,6 +29,8 @@ import ClaudeNativePassthroughSetting from "./ClaudeNativePassthroughSetting"; import { LoginHint as LoginHintView } from "../login-url-block"; import { OpenBrowserPrefToggle } from "../open-browser-pref-toggle"; import ProviderAccountQuota from "./ProviderAccountQuota"; +import { AccountProbeButton, AccountProbeResultLine } from "./AccountProbe"; +import { ACCOUNT_PROBE_PROVIDERS, useAccountProbe } from "../../hooks/useAccountProbe"; import { GrokCouponBadge, GrokResetCouponModal } from "./GrokResetCoupons"; import { AnthropicGrantBadge, AnthropicResetGrantModal } from "./AnthropicResetGrants"; import type { CodexAccountPoolController } from "../../hooks/useCodexAccountPool"; @@ -285,6 +287,9 @@ export default function ProviderAuthPanel({ const setGrantAccount = (account: OAuthAccountRow | null) => { setGrantSelection(account ? { scope: grantScope, account } : null); }; + // Read-only per-account probe (stored token, no refresh); only providers the server implements. + const accountProbe = useAccountProbe(apiBase, item.name); + const probeEnabled = isOauth && ACCOUNT_PROBE_PROVIDERS.has(item.name) && accounts.length > 0; const refreshQuota = async () => { if (!onRefreshQuota || refreshingQuota) return; const generation = ++quotaRefreshGeneration.current; @@ -469,6 +474,15 @@ export default function ProviderAuthPanel({ )} + {probeEnabled && ( +
+ +
+ )}
{item.name === "xai" && ( @@ -711,6 +725,10 @@ export default function ProviderAuthPanel({ {claudeGrantsEnabled && !showReauth && ( setGrantAccount(account)} /> )} + {probeEnabled && ( + + )} +
+ {listed.length === 0 ? ( +

{t("modelDiscover.none")}

+ ) : ( +
    + {listed.map(row => ( +
  • + {added.has(row.id) && {t("modelDiscover.new")}} + {row.id} + {formatArrivalTime(row.at)} + {row.state === "auto-disabled" && {t("modelDiscover.autoDisabled")}} +
  • + ))} +
+ )} + + ); +} diff --git a/gui/src/components/provider-workspace/ProviderSettings.tsx b/gui/src/components/provider-workspace/ProviderSettings.tsx index 4fcdc8b2005..d063258b7ad 100644 --- a/gui/src/components/provider-workspace/ProviderSettings.tsx +++ b/gui/src/components/provider-workspace/ProviderSettings.tsx @@ -26,6 +26,7 @@ import { isVertexProvider, providerSupportsLiveModelDiscovery } from "../../prov import type { CatalogPreset } from "../provider-catalog/provider-presets"; import { authModeLabel } from "./ProviderRail"; import { ProviderProtocolPanel } from "./ProviderProtocolPanel"; +import ProviderModelDiscovery from "./ProviderModelDiscovery"; import { ProviderKeyPacing, type KeyPacingDraft, type KeyPacingStatus } from "./ProviderKeyPacing"; import type { WorkspaceItem, ProviderUpdateCallback } from "./types"; import { @@ -685,6 +686,9 @@ function ProviderSettingsForm({ {t("pws.liveModelsDesc")} + {apiBase !== undefined && liveModelDiscoverySupported && ( + + )}

{t("pws.pacingTitle")}

{t("pws.pacingDesc")}

diff --git a/gui/src/hooks/useAccountProbe.ts b/gui/src/hooks/useAccountProbe.ts new file mode 100644 index 00000000000..9475387c059 --- /dev/null +++ b/gui/src/hooks/useAccountProbe.ts @@ -0,0 +1,81 @@ +import { useCallback, useState } from "react"; + +/** Mirrors `AccountProbeStatus` in src/providers/quota/antigravity-account-probe.ts. */ +export const ACCOUNT_PROBE_STATUSES = [ + "ok", "paused", "token_expired", "suspended", "verification_required", "rate_limited", "permission_denied", "error", +] as const; +export type AccountProbeStatus = typeof ACCOUNT_PROBE_STATUSES[number]; + +export interface AccountProbeResultDto { + accountId: string; + status: AccountProbeStatus; + httpStatus: number | null; + reason: string | null; + message: string | null; + latencyMs?: number; + quota?: { customWindows?: Array<{ label: string; percent: number }> } | null; +} + +/** Providers whose management API implements `POST /api/oauth/accounts/probe`. */ +export const ACCOUNT_PROBE_PROVIDERS: ReadonlySet = new Set(["google-antigravity"]); + +export type AccountProbeEntry = { result: AccountProbeResultDto; at: number } | { failed: true; at: number }; + +function isProbeResult(value: unknown): value is AccountProbeResultDto { + if (!value || typeof value !== "object") return false; + const row = value as Partial; + return typeof row.accountId === "string" && typeof row.status === "string" + && (ACCOUNT_PROBE_STATUSES as readonly string[]).includes(row.status); +} + +/** Probe state for one provider's account list; results stay in memory for this view only. */ +export function useAccountProbe(apiBase: string, provider: string) { + const [entries, setEntries] = useState>({}); + const [pending, setPending] = useState>(new Set()); + const [allPending, setAllPending] = useState(false); + + const probe = useCallback(async (accountIds: readonly string[], all: boolean) => { + setPending(previous => new Set([...previous, ...accountIds])); + if (all) setAllPending(true); + const at = Date.now(); + try { + const response = await fetch(`${apiBase}/api/oauth/accounts/probe`, { + method: "POST", + headers: { "Content-Type": "application/json" }, + body: JSON.stringify({ provider, ...(all ? {} : { accountId: accountIds[0] }) }), + }); + const json = response.ok ? await response.json().catch(() => null) as { results?: unknown } | null : null; + const results = Array.isArray(json?.results) ? json.results.filter(isProbeResult) : []; + setEntries(previous => { + const next = { ...previous }; + for (const id of accountIds) next[id] = { failed: true, at }; + for (const result of results) next[result.accountId] = { result, at }; + return next; + }); + } catch { + setEntries(previous => { + const next = { ...previous }; + for (const id of accountIds) next[id] = { failed: true, at }; + return next; + }); + } finally { + setPending(previous => { + const next = new Set(previous); + for (const id of accountIds) next.delete(id); + return next; + }); + if (all) setAllPending(false); + } + }, [apiBase, provider]); + + return { + entries, + isPending: (accountId: string) => pending.has(accountId), + allPending, + probeOne: (accountId: string) => probe([accountId], false), + probeAll: (accountIds: readonly string[]) => probe(accountIds, true), + }; +} + +export type AccountProbeController = ReturnType; + diff --git a/gui/src/i18n/account-probe-copy.ts b/gui/src/i18n/account-probe-copy.ts new file mode 100644 index 00000000000..805fe9aadac --- /dev/null +++ b/gui/src/i18n/account-probe-copy.ts @@ -0,0 +1,36 @@ +type Locale = "en" | "ko" | "de" | "fr" | "zh" | "zh-TW" | "ru" | "ja" | "tr" | "vi" | "pt"; +const locales: readonly Locale[] = ["en", "ko", "de", "fr", "zh", "zh-TW", "ru", "ja", "tr", "vi", "pt"]; +type Row = readonly [string, string, string, string, string, string, string, string, string, string, string]; + +/** Per-account probe and manual model discovery copy, one row per key in `locales` order. */ +const rows = { + "acctProbe.test": ["Test", "테스트", "Testen", "Tester", "测试", "測試", "Проверить", "テスト", "Test et", "Kiểm tra", "Testar"], + "acctProbe.testing": ["Testing…", "테스트 중…", "Wird getestet…", "Test en cours…", "测试中…", "測試中…", "Проверка…", "テスト中…", "Test ediliyor…", "Đang kiểm tra…", "Testando…"], + "acctProbe.testAll": ["Test all", "모두 테스트", "Alle testen", "Tout tester", "全部测试", "全部測試", "Проверить все", "すべてテスト", "Tümünü test et", "Kiểm tra tất cả", "Testar todas"], + "acctProbe.hint": ["Read-only: sends one quota request with this account's stored token. Expired tokens are reported, never refreshed.", "읽기 전용: 이 계정에 저장된 토큰으로 할당량 요청을 한 번 보냅니다. 만료된 토큰은 갱신하지 않고 그대로 보고합니다.", "Nur lesend: sendet eine Kontingentanfrage mit dem gespeicherten Token dieses Kontos. Abgelaufene Tokens werden gemeldet, nie erneuert.", "Lecture seule : envoie une requête de quota avec le jeton enregistré de ce compte. Un jeton expiré est signalé, jamais renouvelé.", "只读:用该账号已存的 token 发一次额度查询。token 已过期时只报告,不刷新。", "唯讀:用該帳號已存的 Token 送出一次額度查詢。Token 已過期時只回報,不刷新。", "Только чтение: один запрос квоты с сохранённым токеном аккаунта. Истёкший токен только отмечается, не обновляется.", "読み取り専用:このアカウントの保存済みトークンでクォータ要求を 1 回送ります。期限切れトークンは報告のみで更新しません。", "Salt okunur: bu hesabın kayıtlı belirteciyle bir kota isteği gönderir. Süresi dolmuş belirteç yenilenmez, yalnızca bildirilir.", "Chỉ đọc: gửi một yêu cầu hạn mức bằng token đã lưu của tài khoản. Token hết hạn chỉ được báo, không làm mới.", "Somente leitura: envia uma consulta de cota com o token salvo desta conta. Tokens expirados são informados, nunca renovados."], + "acctProbe.failed": ["Test request failed", "테스트 요청 실패", "Testanfrage fehlgeschlagen", "La requête de test a échoué", "测试请求失败", "測試請求失敗", "Запрос проверки не выполнен", "テスト要求に失敗しました", "Test isteği başarısız", "Yêu cầu kiểm tra thất bại", "Falha na solicitação de teste"], + "acctProbe.status.ok": ["Usable", "사용 가능", "Nutzbar", "Utilisable", "可用", "可用", "Работает", "利用可能", "Kullanılabilir", "Dùng được", "Utilizável"], + "acctProbe.status.paused": ["Paused (not tested)", "일시 중지됨(테스트 안 함)", "Pausiert (nicht getestet)", "En pause (non testé)", "已暂停(未测试)", "已暫停(未測試)", "Приостановлен (не проверялся)", "一時停止中(未テスト)", "Duraklatıldı (test edilmedi)", "Đã tạm dừng (không kiểm tra)", "Pausada (não testada)"], + "acctProbe.status.token_expired": ["Token expired (not refreshed)", "토큰 만료(갱신 안 함)", "Token abgelaufen (nicht erneuert)", "Jeton expiré (non renouvelé)", "token 已过期(未刷新)", "Token 已過期(未刷新)", "Токен истёк (не обновлён)", "トークン期限切れ(未更新)", "Belirteç süresi doldu (yenilenmedi)", "Token hết hạn (chưa làm mới)", "Token expirado (não renovado)"], + "acctProbe.status.suspended": ["Suspended", "정지됨", "Gesperrt", "Suspendu", "已暂停", "已暫停", "Приостановлен", "停止中", "Askıya alındı", "Bị đình chỉ", "Suspensa"], + "acctProbe.status.verification_required": ["Verification required", "인증 필요", "Verifizierung erforderlich", "Vérification requise", "要求验证", "需要驗證", "Требуется подтверждение", "確認が必要", "Doğrulama gerekli", "Cần xác minh", "Verificação necessária"], + "acctProbe.status.rate_limited": ["Rate limited", "요청 제한", "Ratenlimit", "Limite de débit", "限流", "限流", "Ограничение частоты", "レート制限", "Hız sınırı", "Bị giới hạn tốc độ", "Limite de taxa"], + "acctProbe.status.permission_denied": ["Permission denied (403)", "권한 거부(403)", "Zugriff verweigert (403)", "Accès refusé (403)", "权限拒绝(403)", "權限遭拒(403)", "Доступ запрещён (403)", "権限拒否(403)", "İzin reddedildi (403)", "Bị từ chối quyền (403)", "Permissão negada (403)"], + "acctProbe.status.error": ["Other error", "기타 오류", "Anderer Fehler", "Autre erreur", "其他错误", "其他錯誤", "Другая ошибка", "その他のエラー", "Diğer hata", "Lỗi khác", "Outro erro"], + "modelDiscover.now": ["Discover now", "지금 검색", "Jetzt abrufen", "Découvrir maintenant", "立即发现", "立即探索", "Найти сейчас", "今すぐ検出", "Şimdi keşfet", "Khám phá ngay", "Descobrir agora"], + "modelDiscover.running": ["Discovering…", "검색 중…", "Wird abgerufen…", "Découverte…", "发现中…", "探索中…", "Поиск…", "検出中…", "Keşfediliyor…", "Đang khám phá…", "Descobrindo…"], + "modelDiscover.recent": ["Recently added models", "최근 추가된 모델", "Kürzlich hinzugekommene Modelle", "Modèles ajoutés récemment", "最近新增的模型", "最近新增的模型", "Недавно добавленные модели", "最近追加されたモデル", "Son eklenen modeller", "Mô hình mới thêm gần đây", "Modelos adicionados recentemente"], + "modelDiscover.none": ["No new models recorded yet.", "아직 기록된 새 모델이 없습니다.", "Noch keine neuen Modelle erfasst.", "Aucun nouveau modèle enregistré pour l’instant.", "还没有记录到新模型。", "尚未記錄到新模型。", "Новые модели пока не обнаружены.", "新しいモデルはまだ記録されていません。", "Henüz yeni model kaydedilmedi.", "Chưa ghi nhận mô hình mới nào.", "Nenhum modelo novo registrado ainda."], + "modelDiscover.result": ["{count} live models, {added} new", "실시간 모델 {count}개, 새 모델 {added}개", "{count} Live-Modelle, {added} neu", "{count} modèles en direct, {added} nouveaux", "共 {count} 个在线模型,新增 {added} 个", "共 {count} 個線上模型,新增 {added} 個", "Моделей: {count}, новых: {added}", "ライブモデル {count} 件、新規 {added} 件", "{count} canlı model, {added} yeni", "{count} mô hình trực tiếp, {added} mới", "{count} modelos ativos, {added} novos"], + "modelDiscover.failed": ["Discovery failed", "검색 실패", "Abruf fehlgeschlagen", "Échec de la découverte", "发现失败", "探索失敗", "Поиск не удался", "検出に失敗しました", "Keşif başarısız", "Khám phá thất bại", "Falha na descoberta"], + "modelDiscover.static": ["Live discovery is off for this provider.", "이 공급자는 실시간 검색이 꺼져 있습니다.", "Live-Abruf ist für diesen Anbieter aus.", "La découverte en direct est désactivée pour ce fournisseur.", "该供应商未开启在线发现。", "此供應商未開啟線上探索。", "Для этого провайдера поиск моделей отключён.", "このプロバイダーはライブ検出がオフです。", "Bu sağlayıcı için canlı keşif kapalı.", "Nhà cung cấp này đang tắt khám phá trực tiếp.", "A descoberta ao vivo está desativada para este provedor."], + "modelDiscover.autoDisabled": ["hidden by new-model policy", "새 모델 정책으로 숨김", "durch Neu-Modell-Richtlinie ausgeblendet", "masqué par la règle des nouveaux modèles", "按新模型策略已隐藏", "依新模型政策已隱藏", "скрыта политикой новых моделей", "新モデルポリシーで非表示", "yeni model politikasıyla gizlendi", "bị ẩn theo chính sách mô hình mới", "oculto pela política de novos modelos"], + "modelDiscover.new": ["NEW", "NEW", "NEU", "NOUVEAU", "新", "新", "НОВАЯ", "NEW", "YENİ", "MỚI", "NOVO"], +} as const satisfies Record; + +export type AccountProbeCopyKey = keyof typeof rows; + +export function accountProbeCopy(locale: Locale): Record { + const index = locales.indexOf(locale); + return Object.fromEntries(Object.entries(rows).map(([key, values]) => [key, values[index]!])) as Record; +} diff --git a/gui/src/i18n/de.ts b/gui/src/i18n/de.ts index 9a223fa6ece..2ce81c28eda 100644 --- a/gui/src/i18n/de.ts +++ b/gui/src/i18n/de.ts @@ -1,4 +1,5 @@ import { desktopCompatibilityCopy } from "./desktop-compatibility-copy"; +import { accountProbeCopy } from "./account-probe-copy"; import { shellV2Copy } from "./shell-v2-copy"; import { codexCliUpdateCopy } from "./codex-cli-update-copy"; import { remoteLinkDiagnosticsCopy } from "./remote-link-diagnostics-copy"; @@ -135,6 +136,7 @@ export const de: Record = { "workflowBudget.saveFailed": "Workflow-Limits konnten nicht gespeichert werden.", "workflowBudget.saved": "Workflow-Limits gespeichert.", ...desktopCompatibilityCopy("de"), + ...accountProbeCopy("de"), ...shellV2Copy("de"), ...codexCliUpdateCopy("de"), ...remoteLinkDiagnosticsCopy("de"), diff --git a/gui/src/i18n/en.ts b/gui/src/i18n/en.ts index fdfafafcf7a..0f8b69619c1 100644 --- a/gui/src/i18n/en.ts +++ b/gui/src/i18n/en.ts @@ -1,4 +1,5 @@ import { desktopCompatibilityCopy } from "./desktop-compatibility-copy"; +import { accountProbeCopy } from "./account-probe-copy"; import { shellV2Copy } from "./shell-v2-copy"; import { codexCliUpdateCopy } from "./codex-cli-update-copy"; import { remoteLinkDiagnosticsCopy } from "./remote-link-diagnostics-copy"; @@ -136,6 +137,7 @@ export const en = { "workflowBudget.saveFailed": "Could not save workflow limits.", "workflowBudget.saved": "Workflow limits saved.", ...desktopCompatibilityCopy("en"), + ...accountProbeCopy("en"), ...shellV2Copy("en"), ...codexCliUpdateCopy("en"), ...remoteLinkDiagnosticsCopy("en"), diff --git a/gui/src/i18n/fr.ts b/gui/src/i18n/fr.ts index 57b8c329a42..ea2b420fe18 100644 --- a/gui/src/i18n/fr.ts +++ b/gui/src/i18n/fr.ts @@ -1,4 +1,5 @@ import { desktopCompatibilityCopy } from "./desktop-compatibility-copy"; +import { accountProbeCopy } from "./account-probe-copy"; import { shellV2Copy } from "./shell-v2-copy"; import { codexCliUpdateCopy } from "./codex-cli-update-copy"; import { remoteLinkDiagnosticsCopy } from "./remote-link-diagnostics-copy"; @@ -134,6 +135,7 @@ export const fr: Record = { "workflowBudget.saveFailed": "Impossible d'enregistrer les limites de workflow.", "workflowBudget.saved": "Limites de workflow enregistrées.", ...desktopCompatibilityCopy("fr"), + ...accountProbeCopy("fr"), ...shellV2Copy("fr"), ...codexCliUpdateCopy("fr"), ...remoteLinkDiagnosticsCopy("fr"), diff --git a/gui/src/i18n/ja.ts b/gui/src/i18n/ja.ts index 91a8659de3d..adc77ac38b1 100644 --- a/gui/src/i18n/ja.ts +++ b/gui/src/i18n/ja.ts @@ -1,4 +1,5 @@ import { desktopCompatibilityCopy } from "./desktop-compatibility-copy"; +import { accountProbeCopy } from "./account-probe-copy"; import { shellV2Copy } from "./shell-v2-copy"; import { codexCliUpdateCopy } from "./codex-cli-update-copy"; import { remoteLinkDiagnosticsCopy } from "./remote-link-diagnostics-copy"; @@ -134,6 +135,7 @@ export const ja: Record = { "workflowBudget.saveFailed": "ワークフロー上限を保存できませんでした。", "workflowBudget.saved": "ワークフロー上限を保存しました。", ...desktopCompatibilityCopy("ja"), + ...accountProbeCopy("ja"), ...shellV2Copy("ja"), ...codexCliUpdateCopy("ja"), ...remoteLinkDiagnosticsCopy("ja"), diff --git a/gui/src/i18n/ko.ts b/gui/src/i18n/ko.ts index ce8c3727aff..cfe9ddc7c41 100644 --- a/gui/src/i18n/ko.ts +++ b/gui/src/i18n/ko.ts @@ -1,4 +1,5 @@ import { desktopCompatibilityCopy } from "./desktop-compatibility-copy"; +import { accountProbeCopy } from "./account-probe-copy"; import { shellV2Copy } from "./shell-v2-copy"; import { codexCliUpdateCopy } from "./codex-cli-update-copy"; import { remoteLinkDiagnosticsCopy } from "./remote-link-diagnostics-copy"; @@ -134,6 +135,7 @@ export const ko: Record = { "workflowBudget.saveFailed": "워크플로 한도를 저장하지 못했습니다.", "workflowBudget.saved": "워크플로 한도를 저장했습니다.", ...desktopCompatibilityCopy("ko"), + ...accountProbeCopy("ko"), ...shellV2Copy("ko"), ...codexCliUpdateCopy("ko"), ...remoteLinkDiagnosticsCopy("ko"), diff --git a/gui/src/i18n/pt.ts b/gui/src/i18n/pt.ts index 1650b843832..c92deaef38d 100644 --- a/gui/src/i18n/pt.ts +++ b/gui/src/i18n/pt.ts @@ -1,4 +1,5 @@ import { desktopCompatibilityCopy } from "./desktop-compatibility-copy"; +import { accountProbeCopy } from "./account-probe-copy"; import { shellV2Copy } from "./shell-v2-copy"; import { codexCliUpdateCopy } from "./codex-cli-update-copy"; import { remoteLinkDiagnosticsCopy } from "./remote-link-diagnostics-copy"; @@ -136,6 +137,7 @@ export const pt: Record = { "workflowBudget.saveFailed": "Não foi possível salvar os limites de fluxo de trabalho.", "workflowBudget.saved": "Limites de fluxo de trabalho salvos.", ...desktopCompatibilityCopy("pt"), + ...accountProbeCopy("pt"), ...shellV2Copy("pt"), ...codexCliUpdateCopy("pt"), ...remoteLinkDiagnosticsCopy("pt"), diff --git a/gui/src/i18n/ru.ts b/gui/src/i18n/ru.ts index bd0f7d3b15b..739926ff620 100644 --- a/gui/src/i18n/ru.ts +++ b/gui/src/i18n/ru.ts @@ -1,4 +1,5 @@ import { desktopCompatibilityCopy } from "./desktop-compatibility-copy"; +import { accountProbeCopy } from "./account-probe-copy"; import { shellV2Copy } from "./shell-v2-copy"; import { codexCliUpdateCopy } from "./codex-cli-update-copy"; import { remoteLinkDiagnosticsCopy } from "./remote-link-diagnostics-copy"; @@ -134,6 +135,7 @@ export const ru: Record = { "workflowBudget.saveFailed": "Не удалось сохранить лимиты рабочих процессов.", "workflowBudget.saved": "Лимиты рабочих процессов сохранены.", ...desktopCompatibilityCopy("ru"), + ...accountProbeCopy("ru"), ...shellV2Copy("ru"), ...codexCliUpdateCopy("ru"), ...remoteLinkDiagnosticsCopy("ru"), diff --git a/gui/src/i18n/tr.ts b/gui/src/i18n/tr.ts index 30aade63dcf..ee73581b1bd 100644 --- a/gui/src/i18n/tr.ts +++ b/gui/src/i18n/tr.ts @@ -1,4 +1,5 @@ import { desktopCompatibilityCopy } from "./desktop-compatibility-copy"; +import { accountProbeCopy } from "./account-probe-copy"; import { shellV2Copy } from "./shell-v2-copy"; import { codexCliUpdateCopy } from "./codex-cli-update-copy"; import { remoteLinkDiagnosticsCopy } from "./remote-link-diagnostics-copy"; @@ -135,6 +136,7 @@ export const tr: Record = { "workflowBudget.saveFailed": "İş akışı sınırları kaydedilemedi.", "workflowBudget.saved": "İş akışı sınırları kaydedildi.", ...desktopCompatibilityCopy("tr"), + ...accountProbeCopy("tr"), ...shellV2Copy("tr"), ...codexCliUpdateCopy("tr"), ...remoteLinkDiagnosticsCopy("tr"), diff --git a/gui/src/i18n/vi.ts b/gui/src/i18n/vi.ts index 1bca40cbb0a..4fa3a0802b9 100644 --- a/gui/src/i18n/vi.ts +++ b/gui/src/i18n/vi.ts @@ -1,4 +1,5 @@ import { desktopCompatibilityCopy } from "./desktop-compatibility-copy"; +import { accountProbeCopy } from "./account-probe-copy"; import { shellV2Copy } from "./shell-v2-copy"; import { codexCliUpdateCopy } from "./codex-cli-update-copy"; import { remoteLinkDiagnosticsCopy } from "./remote-link-diagnostics-copy"; @@ -136,6 +137,7 @@ export const vi: Record = { "workflowBudget.saveFailed": "Không thể lưu giới hạn quy trình.", "workflowBudget.saved": "Đã lưu giới hạn quy trình.", ...desktopCompatibilityCopy("vi"), + ...accountProbeCopy("vi"), ...shellV2Copy("vi"), ...codexCliUpdateCopy("vi"), ...remoteLinkDiagnosticsCopy("vi"), diff --git a/gui/src/i18n/zh-TW.ts b/gui/src/i18n/zh-TW.ts index fb506e43e07..70b87e9660b 100644 --- a/gui/src/i18n/zh-TW.ts +++ b/gui/src/i18n/zh-TW.ts @@ -1,4 +1,5 @@ import { desktopCompatibilityCopy } from "./desktop-compatibility-copy"; +import { accountProbeCopy } from "./account-probe-copy"; import { shellV2Copy } from "./shell-v2-copy"; import { codexCliUpdateCopy } from "./codex-cli-update-copy"; import { remoteLinkDiagnosticsCopy } from "./remote-link-diagnostics-copy"; @@ -132,6 +133,7 @@ export const zhTW: Record = { "workflowBudget.saveFailed": "無法儲存工作流程限制。", "workflowBudget.saved": "工作流程限制已儲存。", ...desktopCompatibilityCopy("zh-TW"), + ...accountProbeCopy("zh-TW"), ...shellV2Copy("zh-TW"), ...codexCliUpdateCopy("zh-TW"), ...remoteLinkDiagnosticsCopy("zh-TW"), diff --git a/gui/src/i18n/zh.ts b/gui/src/i18n/zh.ts index 5e366410758..bd8ea445892 100644 --- a/gui/src/i18n/zh.ts +++ b/gui/src/i18n/zh.ts @@ -1,4 +1,5 @@ import { desktopCompatibilityCopy } from "./desktop-compatibility-copy"; +import { accountProbeCopy } from "./account-probe-copy"; import { shellV2Copy } from "./shell-v2-copy"; import { codexCliUpdateCopy } from "./codex-cli-update-copy"; import { remoteLinkDiagnosticsCopy } from "./remote-link-diagnostics-copy"; @@ -134,6 +135,7 @@ export const zh: Record = { "workflowBudget.saveFailed": "无法保存工作流限制。", "workflowBudget.saved": "工作流限制已保存。", ...desktopCompatibilityCopy("zh"), + ...accountProbeCopy("zh"), ...shellV2Copy("zh"), ...codexCliUpdateCopy("zh"), ...remoteLinkDiagnosticsCopy("zh"), diff --git a/scripts/test-layout/layout.json b/scripts/test-layout/layout.json index a21cc111f3c..ff23ab83b4a 100644 --- a/scripts/test-layout/layout.json +++ b/scripts/test-layout/layout.json @@ -146,6 +146,7 @@ "account-import.test.ts": "server", "account-import-project-fallback.test.ts": "server", "main-account-hard-lock-profile-dispatch.test.ts": "codex-integration", "account-pool-management-api.test.ts": "server", + "account-probe-routes.test.ts": "server", "link-listener-admission.test.ts": "server", "link-route-proof-admission.test.ts": "server", "link-route-edit.test.ts": "server", "link-confirm-pin.test.ts": "server", "link-management-relay.test.ts": "server", "quota-pool-relay.test.ts": "server", "quota-pool.test.ts": "usage", "fallback-policy.test.ts": "routing", "responses-combo-fallback-off.test.ts": "responses", "main-account-hard-lock-fallback-off.test.ts": "codex-integration", "subagent-model-fallback-off.test.ts": "routing", "routing-policy-fallback-off.test.ts": "routing", "fallback-routes.test.ts": "server", "client-home-unreachable.test.ts": "clients", "cli-fallback.test.ts": "cli", "link-listener-lifecycle.test.ts": "server", "link-listener-mutation.test.ts": "server", "link-traffic-status.test.ts": "server", diff --git a/skills/ocx/references/01_management_surface.md b/skills/ocx/references/01_management_surface.md index 7f29171c848..7b6470b3737 100644 --- a/skills/ocx/references/01_management_surface.md +++ b/skills/ocx/references/01_management_surface.md @@ -26,8 +26,8 @@ These answer in the CLI head and never reach the proxy, so they work with nothin | Chapter | Declared capabilities | |---|---| | [lifecycle](01_surface_lifecycle.md) | 14 | -| [providers-models](01_surface_providers-models.md) | 53 | -| [accounts](01_surface_accounts.md) | 43 | +| [providers-models](01_surface_providers-models.md) | 54 | +| [accounts](01_surface_accounts.md) | 44 | | [agents-routing](01_surface_agents-routing.md) | 71 | | [integrations](01_surface_integrations.md) | 41 | | [observe-system](01_surface_observe-system.md) | 105 | @@ -487,6 +487,10 @@ Original invocation order. These headings preserve links to the previous single- [Read-oriented task](01_surface_providers-models.md#ocx-models-new-arrivals) +### `ocx models discover` + +[State-changing task](01_surface_providers-models.md#ocx-models-discover) + ### `ocx models context status` [Read-oriented task](01_surface_providers-models.md#ocx-models-context-status) @@ -619,6 +623,10 @@ Original invocation order. These headings preserve links to the previous single- [State-changing task](01_surface_accounts.md#ocx-account-add-key) +### `ocx account probe` + +[Read-oriented task](01_surface_accounts.md#ocx-account-probe) + ### `ocx account import` [State-changing task](01_surface_accounts.md#ocx-account-import) @@ -1661,6 +1669,6 @@ Original invocation order. These headings preserve links to the previous single- ## Counts -- declared capabilities: 403 -- of those, state-changing: 253 +- declared capabilities: 405 +- of those, state-changing: 254 - head-resolved invocations: 2 diff --git a/skills/ocx/references/01_surface_accounts.md b/skills/ocx/references/01_surface_accounts.md index 3d7ef11e347..bc297dbd64d 100644 --- a/skills/ocx/references/01_surface_accounts.md +++ b/skills/ocx/references/01_surface_accounts.md @@ -8,7 +8,7 @@ Use these declarations to choose a task, then check its flags and authority before execution. Non-mutating probes may still contact providers, consume quota or refresh caches. -Declared capabilities: 43. +Declared capabilities: 44. ### `ocx account login` @@ -559,6 +559,25 @@ State-changing: yes. JSON mode: `envelope`. - API-key providers only. Requires non-TTY stdin and reads one secret line; never put plaintext keys in command arguments or agent transcripts. This imports an upstream credential, not an OpenCodex access-key creation workflow. +### `ocx account probe` + +Usage: `ocx account probe google-antigravity [] [--json]` + +Test stored accounts one by one with their own tokens, read-only. + +State-changing: no. JSON mode: `payload`. + +| Method | Route | +|---|---| +| GET | `/api/oauth/accounts` | +| POST | `/api/oauth/accounts/probe` | + +| Flag | Value | Meaning | +|---|---|---| +| `--json` | boolean | Emit per-account status, HTTP code, reason and quota windows. | + +- Statuses: ok, paused, token_expired, suspended, verification_required, rate_limited, permission_denied, error. Sends one retrieveUserQuotaSummary request per account with its stored token; paused accounts are skipped without a request, and expired tokens are reported, never refreshed. Only google-antigravity is supported. + ### `ocx account import` Usage: `ocx account import google-antigravity --format cockpit-tools (--file |--stdin) [--accept-antigravity-risk] [--json]` diff --git a/skills/ocx/references/01_surface_providers-models.md b/skills/ocx/references/01_surface_providers-models.md index 60d05132b11..e040a2b72ac 100644 --- a/skills/ocx/references/01_surface_providers-models.md +++ b/skills/ocx/references/01_surface_providers-models.md @@ -8,7 +8,7 @@ Use these declarations to choose a task, then check its flags and authority before execution. Non-mutating probes may still contact providers, consume quota or refresh caches. -Declared capabilities: 53. +Declared capabilities: 54. ### `ocx models price` @@ -650,6 +650,24 @@ State-changing: no. JSON mode: `payload`. |---|---|---| | `--json` | boolean | Emit recentArrivals grouped by provider. | +### `ocx models discover` + +Usage: `ocx models discover [--json]` + +Re-fetch one provider's live model list now and report new arrivals. + +State-changing: yes. JSON mode: `payload`. + +| Method | Route | +|---|---| +| POST | `/api/model-discovery/refresh` | + +| Flag | Value | Meaning | +|---|---|---| +| `--json` | boolean | Emit discovery status, newArrivals and recentArrivals. | + +- Clears the provider's model cache and runs catalog convergence; new models follow the configured new-model policy. Providers with liveModels off report applicable:false. + ### `ocx models context status` Usage: `ocx models context status [--json]` diff --git a/src/cli/account-probe.ts b/src/cli/account-probe.ts new file mode 100644 index 00000000000..35d360c0796 --- /dev/null +++ b/src/cli/account-probe.ts @@ -0,0 +1,66 @@ +import { apiError, apiJson, proxyUnreachable, resolveBaseUrl, type AccountDeps } from "./account-api"; + +const PROBE_USAGE = "Usage: ocx account probe google-antigravity [] [--json]"; + +interface ProbeRow { + accountId: string; + maskedLabel?: string; + active?: boolean; + paused?: boolean; + status: string; + httpStatus: number | null; + reason: string | null; + message: string | null; + quota?: { customWindows?: Array<{ label: string; percent: number }> } | null; +} + +function resolveTarget(accounts: unknown, requested: string): { id: string } | { error: string } { + const rows = (Array.isArray(accounts) ? accounts : []).filter((row): row is { id: string; alias?: unknown } => + typeof row === "object" && row !== null && typeof (row as { id?: unknown }).id === "string"); + if (rows.some(row => row.id === requested)) return { id: requested }; + const matches = rows.filter(row => typeof row.alias === "string" && row.alias.toLowerCase() === requested.toLowerCase()); + if (matches.length === 1) return { id: matches[0]!.id }; + if (matches.length > 1) return { error: `alias "${requested}" names ${matches.length} accounts; use the account id` }; + return { error: `Account not found: no OAuth account has the id or alias "${requested}"` }; +} + +function rowLine(row: ProbeRow): string { + const flags = [row.active ? "active" : "", row.paused ? "paused" : ""].filter(Boolean).map(flag => `[${flag}]`).join(""); + const evidence = [row.httpStatus !== null ? `HTTP ${row.httpStatus}` : "", row.reason ?? "", row.message ?? ""].filter(Boolean).join(" · "); + const windows = (row.quota?.customWindows ?? []).map(window => `${window.label} ${Math.round(100 - window.percent)}% left`).join(", "); + return [`${row.accountId} ${row.maskedLabel ?? ""}${flags ? ` ${flags}` : ""}`.trim(), row.status, evidence, windows].filter(Boolean).join(" | "); +} + +/** Read-only per-account probe through `POST /api/oauth/accounts/probe`. */ +export async function cmdAccountProbe(args: string[], deps: AccountDeps): Promise { + const wantsJson = args.includes("--json"); + const positional = args.filter(arg => arg !== "--json"); + const provider = positional[0]?.trim().toLowerCase() ?? ""; + const requested = positional[1]; + if (!provider || positional.length > 2) { + console.error(PROBE_USAGE); + return 1; + } + const baseUrl = await resolveBaseUrl(deps); + if (!baseUrl) return proxyUnreachable(); + let accountId: string | undefined; + if (requested !== undefined) { + const list = await apiJson(deps, baseUrl, "GET", `/api/oauth/accounts?provider=${encodeURIComponent(provider)}`); + if (list.status === 0) return proxyUnreachable(list.transportError); + if (list.status !== 200) return apiError(list.json, `failed to list ${provider} OAuth accounts`, list.status); + const target = resolveTarget(list.json?.accounts, requested); + if ("error" in target) { + console.error(`Error: ${target.error}`); + return 1; + } + accountId = target.id; + } + const response = await apiJson(deps, baseUrl, "POST", "/api/oauth/accounts/probe", { provider, ...(accountId ? { accountId } : {}) }); + if (response.status === 0) return proxyUnreachable(response.transportError); + if (response.status !== 200) return apiError(response.json, `failed to probe ${provider} accounts`, response.status); + const results = Array.isArray(response.json?.results) ? response.json.results as ProbeRow[] : []; + if (wantsJson) console.log(JSON.stringify(response.json, null, 2)); + else if (results.length === 0) console.log(`${provider}: no stored accounts`); + else for (const row of results) console.log(rowLine(row)); + return 0; +} diff --git a/src/cli/account.ts b/src/cli/account.ts index d8f3c5187c0..49a530afe76 100644 --- a/src/cli/account.ts +++ b/src/cli/account.ts @@ -65,6 +65,7 @@ const ACCOUNT_USAGE = `Usage: ocx account routes [--file |--clear] [--json] ocx account remove --yes [--json] ocx account clear-cooldown [--json] + ocx account probe google-antigravity [] [--json] ocx account add-key [--label