@cortexkit/opencode-antigravity-auth 2.0.1 → 2.2.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
@@ -116,21 +116,17 @@ The model registry lives at `packages/core/src/model-registry.ts`; the OpenCode
116
116
 
117
117
  | Model | Variants | Quota group |
118
118
  | --- | --- | --- |
119
+ | `antigravity-gemini-3.8-flash` | `low`, `high` | `gemini-flash` |
120
+ | `antigravity-gemini-3.7-flash` | `low`, `high` | `gemini-flash` |
119
121
  | `antigravity-gemini-3.6-flash` | `low`, `high` | `gemini-flash` |
120
122
  | `antigravity-gemini-3.5-flash` | `low`, `high` | `gemini-flash` |
121
123
  | `antigravity-gemini-3.1-pro` | `low`, `high` | `gemini-pro` |
122
124
  | `antigravity-gemini-3.1-flash-image` | — | `gemini-flash` |
123
- | `antigravity-claude-sonnet-4-6` | — | `claude` |
124
- | `antigravity-claude-opus-4-6-thinking` | `low`, `max` | `claude` |
125
+ | `antigravity-claude-sonnet-4-6-thinking` | — | `claude` |
126
+ | `antigravity-claude-opus-4-6-thinking` | — | `claude` |
125
127
  | `antigravity-gpt-oss-120b-medium` | — | `gpt-oss` |
126
- | `gemini-2.5-flash` | — | `gemini-flash` (CLI pool) |
127
- | `gemini-2.5-pro` | — | `gemini-pro` (CLI pool) |
128
- | `gemini-3-flash-preview` | — | `gemini-flash` (CLI pool) |
129
- | `gemini-3-pro-preview` | — | `gemini-pro` (CLI pool) |
130
- | `gemini-3.1-pro-preview` | — | `gemini-pro` (CLI pool) |
131
- | `gemini-3.1-pro-preview-customtools` | — | `gemini-pro` (CLI pool) |
132
-
133
- > Gemini 3.5 Flash-Lite is not in the AGY 1.1.5 Antigravity or Gemini CLI quota catalogs, and Gemini 3.5 Flash Cyber is restricted to a limited-access CodeMender pilot — neither is exposed by this plugin.
128
+
129
+ > Gemini 3.8 Flash Cyber is restricted to Fairwind trusted defenders and is absent from the AGY 1.1.24 model catalog, so it is not exposed by this plugin. Gemini 3.5 Flash-Lite is also absent from the AGY catalog, and Gemini 3.5 Flash Cyber remains restricted to a limited-access CodeMender pilot.
134
130
 
135
131
  ### Routing
136
132
 
package/dist/cli.js CHANGED
@@ -862,7 +862,8 @@ function calculateTokenExpiry(requestTimeMs, expiresInSeconds) {
862
862
  }
863
863
 
864
864
  // ../core/dist/fingerprint.js
865
- var AGY_CLI_VERSION = "1.1.6";
865
+ var AGY_CLI_VERSION = "1.1.24";
866
+ var AGY_CLI_CHANGE_LIST = "974782877";
866
867
  function normalizeHarnessPlatform(platform = process.platform) {
867
868
  return platform === "win32" ? "windows" : platform || "unknown";
868
869
  }
@@ -879,7 +880,8 @@ function normalizeHarnessArch(arch = process.arch) {
879
880
  function buildAntigravityHarnessUserAgent(version = AGY_CLI_VERSION, platform = process.platform, arch = process.arch, authMethod = "consumer") {
880
881
  const osType = normalizeHarnessPlatform(platform);
881
882
  const normalizedArch = normalizeHarnessArch(arch);
882
- return `antigravity/cli/${version} (aidev_client; os_type=${osType}; arch=${normalizedArch}; auth_method=${authMethod})`;
883
+ const changeList = version === AGY_CLI_VERSION ? `; cl=${AGY_CLI_CHANGE_LIST}` : "";
884
+ return `antigravity/cli/${version} (aidev_client; os_type=${osType}; arch=${normalizedArch}${changeList}; auth_method=${authMethod})`;
883
885
  }
884
886
  function buildAntigravityHarnessLoadCodeAssistUserAgent(version = AGY_CLI_VERSION) {
885
887
  return buildAntigravityHarnessUserAgent(version);
@@ -927,6 +929,26 @@ var ALL_MODEL_DEFINITIONS = {
927
929
  high: { thinkingLevel: "high" }
928
930
  }
929
931
  }),
932
+ "antigravity-gemini-3.8-flash": defineModel("antigravity-gemini-3.8-flash", {
933
+ name: "Gemini 3.8 Flash (Antigravity)",
934
+ reasoning: true,
935
+ limit: { context: 1048576, output: 65536 },
936
+ modalities: DEFAULT_MODALITIES,
937
+ variants: {
938
+ low: { thinkingLevel: "low" },
939
+ high: { thinkingLevel: "high" }
940
+ }
941
+ }),
942
+ "antigravity-gemini-3.7-flash": defineModel("antigravity-gemini-3.7-flash", {
943
+ name: "Gemini 3.7 Flash (Antigravity)",
944
+ reasoning: true,
945
+ limit: { context: 1048576, output: 65536 },
946
+ modalities: DEFAULT_MODALITIES,
947
+ variants: {
948
+ low: { thinkingLevel: "low" },
949
+ high: { thinkingLevel: "high" }
950
+ }
951
+ }),
930
952
  "antigravity-gemini-3.6-flash": defineModel("antigravity-gemini-3.6-flash", {
931
953
  name: "Gemini 3.6 Flash (Antigravity)",
932
954
  reasoning: true,
@@ -1049,6 +1071,12 @@ var RESOLVER_ALIASES = {
1049
1071
  "gemini-3.6-flash-low": "gemini-3.6-flash",
1050
1072
  "gemini-3.6-flash-medium": "gemini-3.6-flash",
1051
1073
  "gemini-3.6-flash-high": "gemini-3.6-flash",
1074
+ "gemini-3.7-flash-low": "gemini-3.7-flash",
1075
+ "gemini-3.7-flash-medium": "gemini-3.7-flash",
1076
+ "gemini-3.7-flash-high": "gemini-3.7-flash",
1077
+ "gemini-3.8-flash-low": "gemini-3.8-flash",
1078
+ "gemini-3.8-flash-medium": "gemini-3.8-flash",
1079
+ "gemini-3.8-flash-high": "gemini-3.8-flash",
1052
1080
  "gemini-claude-opus-4-6-thinking-low": "claude-opus-4-6-thinking",
1053
1081
  "gemini-claude-opus-4-6-thinking-medium": "claude-opus-4-6-thinking",
1054
1082
  "gemini-claude-opus-4-6-thinking-high": "claude-opus-4-6-thinking",
@@ -1079,11 +1107,21 @@ var QUOTA_GROUP_BY_MODEL_ID = {
1079
1107
  "gemini-3.6-flash-medium": "gemini",
1080
1108
  "gemini-3.6-flash-high": "gemini",
1081
1109
  "gemini-3.6-flash-tiered": "gemini",
1110
+ "gemini-3.7-flash-low": "gemini",
1111
+ "gemini-3.7-flash-medium": "gemini",
1112
+ "gemini-3.7-flash-high": "gemini",
1113
+ "gemini-3.7-flash-tiered": "gemini",
1114
+ "gemini-3.8-flash-low": "gemini",
1115
+ "gemini-3.8-flash-medium": "gemini",
1116
+ "gemini-3.8-flash-high": "gemini",
1117
+ "gemini-3.8-flash-tiered": "gemini",
1082
1118
  "gemini-3.1-flash-image": "gemini",
1083
1119
  "gpt-oss-120b": "non-gemini",
1084
1120
  "gpt-oss-120b-medium": "non-gemini"
1085
1121
  };
1086
1122
  var ANTIGRAVITY_OPENCODE_MODEL_IDS = [
1123
+ "antigravity-gemini-3.8-flash",
1124
+ "antigravity-gemini-3.7-flash",
1087
1125
  "antigravity-gemini-3.6-flash",
1088
1126
  "antigravity-gemini-3.5-flash",
1089
1127
  "antigravity-gemini-3.1-pro",
@@ -1574,7 +1612,7 @@ async function connectTlsWithAbort(targetUrl, timeoutMs, signal, onDebug) {
1574
1612
  }
1575
1613
 
1576
1614
  // ../core/dist/antigravity/oauth.js
1577
- import { generatePKCE } from "@openauthjs/openauth/pkce";
1615
+ import { createHash, randomBytes } from "node:crypto";
1578
1616
 
1579
1617
  // ../core/dist/constants.js
1580
1618
  var ANTIGRAVITY_CLIENT_ID = "1071006060591-tmhssin2h21lcre235vtolojh4g403ep.apps.googleusercontent.com";
@@ -1643,6 +1681,13 @@ async function fetchWithActiveTimeout(input, init = {}, options = {}) {
1643
1681
 
1644
1682
  // ../core/dist/antigravity/oauth.js
1645
1683
  var log2 = createLogger("oauth");
1684
+ function generatePkcePair() {
1685
+ const verifier = randomBytes(32).toString("base64url");
1686
+ return {
1687
+ verifier,
1688
+ challenge: createHash("sha256").update(verifier).digest("base64url")
1689
+ };
1690
+ }
1646
1691
  function encodeState(payload) {
1647
1692
  return Buffer.from(JSON.stringify(payload), "utf8").toString("base64url");
1648
1693
  }
@@ -1660,7 +1705,7 @@ function decodeState(state) {
1660
1705
  };
1661
1706
  }
1662
1707
  async function authorizeAntigravity(projectId = "") {
1663
- const pkce = await generatePKCE();
1708
+ const pkce = generatePkcePair();
1664
1709
  const url = new URL("https://accounts.google.com/o/oauth2/v2/auth");
1665
1710
  url.searchParams.set("client_id", ANTIGRAVITY_CLIENT_ID);
1666
1711
  url.searchParams.set("response_type", "code");
@@ -2017,7 +2062,7 @@ async function ensureProjectContext(auth) {
2017
2062
  }
2018
2063
 
2019
2064
  // ../core/dist/quota-manager.js
2020
- import { createHash } from "node:crypto";
2065
+ import { createHash as createHash2 } from "node:crypto";
2021
2066
  var log4 = createLogger("quota-manager");
2022
2067
  var QUOTA_MANAGER_DEFAULT_BASE_BACKOFF_MS = 3e4;
2023
2068
  var QUOTA_MANAGER_DEFAULT_MAX_BACKOFF_MS = 10 * 60 * 1e3;
@@ -2026,7 +2071,7 @@ function defaultKeyOf(account) {
2026
2071
  if (account.email)
2027
2072
  return `e:${account.email.toLowerCase()}`;
2028
2073
  const token = account.refreshToken || "";
2029
- return `t:${createHash("sha256").update(token).digest("hex").slice(0, 16)}`;
2074
+ return `t:${createHash2("sha256").update(token).digest("hex").slice(0, 16)}`;
2030
2075
  }
2031
2076
  function createQuotaManager(options) {
2032
2077
  const now = options.now ?? (() => Date.now());
@@ -2229,7 +2274,7 @@ function createQuotaManager(options) {
2229
2274
  };
2230
2275
  }
2231
2276
  function hashKey(key) {
2232
- return createHash("sha256").update(key).digest("hex").slice(0, 8);
2277
+ return createHash2("sha256").update(key).digest("hex").slice(0, 8);
2233
2278
  }
2234
2279
  function classifyQuotaGroup(modelName, displayName) {
2235
2280
  const registryGroup = getQuotaGroupForModel(modelName);