@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/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/plugin/index.ts
2
- import { createHash as createHash10 } from "node:crypto";
2
+ import { createHash as createHash11 } from "node:crypto";
3
3
  import { join as join19 } from "node:path";
4
4
 
5
5
  // ../core/dist/account-manager.js
@@ -893,7 +893,8 @@ function calculateTokenExpiry(requestTimeMs, expiresInSeconds) {
893
893
 
894
894
  // ../core/dist/fingerprint.js
895
895
  import * as crypto from "node:crypto";
896
- var AGY_CLI_VERSION = "1.1.6";
896
+ var AGY_CLI_VERSION = "1.1.24";
897
+ var AGY_CLI_CHANGE_LIST = "974782877";
897
898
  var ANTIGRAVITY_API_CLIENT = "antigravity-cli";
898
899
  var MAX_FINGERPRINT_HISTORY = 5;
899
900
  function normalizeHarnessPlatform(platform = process.platform) {
@@ -912,7 +913,8 @@ function normalizeHarnessArch(arch = process.arch) {
912
913
  function buildAntigravityHarnessUserAgent(version = AGY_CLI_VERSION, platform = process.platform, arch = process.arch, authMethod = "consumer") {
913
914
  const osType = normalizeHarnessPlatform(platform);
914
915
  const normalizedArch = normalizeHarnessArch(arch);
915
- return `antigravity/cli/${version} (aidev_client; os_type=${osType}; arch=${normalizedArch}; auth_method=${authMethod})`;
916
+ const changeList = version === AGY_CLI_VERSION ? `; cl=${AGY_CLI_CHANGE_LIST}` : "";
917
+ return `antigravity/cli/${version} (aidev_client; os_type=${osType}; arch=${normalizedArch}${changeList}; auth_method=${authMethod})`;
916
918
  }
917
919
  function buildAntigravityHarnessLoadCodeAssistUserAgent(version = AGY_CLI_VERSION) {
918
920
  return buildAntigravityHarnessUserAgent(version);
@@ -1006,6 +1008,26 @@ var ALL_MODEL_DEFINITIONS = {
1006
1008
  high: { thinkingLevel: "high" }
1007
1009
  }
1008
1010
  }),
1011
+ "antigravity-gemini-3.8-flash": defineModel("antigravity-gemini-3.8-flash", {
1012
+ name: "Gemini 3.8 Flash (Antigravity)",
1013
+ reasoning: true,
1014
+ limit: { context: 1048576, output: 65536 },
1015
+ modalities: DEFAULT_MODALITIES,
1016
+ variants: {
1017
+ low: { thinkingLevel: "low" },
1018
+ high: { thinkingLevel: "high" }
1019
+ }
1020
+ }),
1021
+ "antigravity-gemini-3.7-flash": defineModel("antigravity-gemini-3.7-flash", {
1022
+ name: "Gemini 3.7 Flash (Antigravity)",
1023
+ reasoning: true,
1024
+ limit: { context: 1048576, output: 65536 },
1025
+ modalities: DEFAULT_MODALITIES,
1026
+ variants: {
1027
+ low: { thinkingLevel: "low" },
1028
+ high: { thinkingLevel: "high" }
1029
+ }
1030
+ }),
1009
1031
  "antigravity-gemini-3.6-flash": defineModel("antigravity-gemini-3.6-flash", {
1010
1032
  name: "Gemini 3.6 Flash (Antigravity)",
1011
1033
  reasoning: true,
@@ -1128,6 +1150,12 @@ var RESOLVER_ALIASES = {
1128
1150
  "gemini-3.6-flash-low": "gemini-3.6-flash",
1129
1151
  "gemini-3.6-flash-medium": "gemini-3.6-flash",
1130
1152
  "gemini-3.6-flash-high": "gemini-3.6-flash",
1153
+ "gemini-3.7-flash-low": "gemini-3.7-flash",
1154
+ "gemini-3.7-flash-medium": "gemini-3.7-flash",
1155
+ "gemini-3.7-flash-high": "gemini-3.7-flash",
1156
+ "gemini-3.8-flash-low": "gemini-3.8-flash",
1157
+ "gemini-3.8-flash-medium": "gemini-3.8-flash",
1158
+ "gemini-3.8-flash-high": "gemini-3.8-flash",
1131
1159
  "gemini-claude-opus-4-6-thinking-low": "claude-opus-4-6-thinking",
1132
1160
  "gemini-claude-opus-4-6-thinking-medium": "claude-opus-4-6-thinking",
1133
1161
  "gemini-claude-opus-4-6-thinking-high": "claude-opus-4-6-thinking",
@@ -1160,6 +1188,22 @@ var GEMINI_36_FLASH_ROUTES = {
1160
1188
  high: "gemini-3.6-flash-high"
1161
1189
  }
1162
1190
  };
1191
+ var GEMINI_37_FLASH_ROUTES = {
1192
+ defaultModel: "gemini-3.7-flash-medium",
1193
+ byTier: {
1194
+ low: "gemini-3.7-flash-low",
1195
+ medium: "gemini-3.7-flash-medium",
1196
+ high: "gemini-3.7-flash-high"
1197
+ }
1198
+ };
1199
+ var GEMINI_38_FLASH_ROUTES = {
1200
+ defaultModel: "gemini-3.8-flash-medium",
1201
+ byTier: {
1202
+ low: "gemini-3.8-flash-low",
1203
+ medium: "gemini-3.8-flash-medium",
1204
+ high: "gemini-3.8-flash-high"
1205
+ }
1206
+ };
1163
1207
  var QUOTA_GROUP_BY_MODEL_ID = {
1164
1208
  "claude-opus-4-6-thinking": "non-gemini",
1165
1209
  "claude-opus-4-6": "non-gemini",
@@ -1177,11 +1221,21 @@ var QUOTA_GROUP_BY_MODEL_ID = {
1177
1221
  "gemini-3.6-flash-medium": "gemini",
1178
1222
  "gemini-3.6-flash-high": "gemini",
1179
1223
  "gemini-3.6-flash-tiered": "gemini",
1224
+ "gemini-3.7-flash-low": "gemini",
1225
+ "gemini-3.7-flash-medium": "gemini",
1226
+ "gemini-3.7-flash-high": "gemini",
1227
+ "gemini-3.7-flash-tiered": "gemini",
1228
+ "gemini-3.8-flash-low": "gemini",
1229
+ "gemini-3.8-flash-medium": "gemini",
1230
+ "gemini-3.8-flash-high": "gemini",
1231
+ "gemini-3.8-flash-tiered": "gemini",
1180
1232
  "gemini-3.1-flash-image": "gemini",
1181
1233
  "gpt-oss-120b": "non-gemini",
1182
1234
  "gpt-oss-120b-medium": "non-gemini"
1183
1235
  };
1184
1236
  var ANTIGRAVITY_OPENCODE_MODEL_IDS = [
1237
+ "antigravity-gemini-3.8-flash",
1238
+ "antigravity-gemini-3.7-flash",
1185
1239
  "antigravity-gemini-3.6-flash",
1186
1240
  "antigravity-gemini-3.5-flash",
1187
1241
  "antigravity-gemini-3.1-pro",
@@ -1209,11 +1263,17 @@ function getGemini35FlashAntigravityModel(tier) {
1209
1263
  function getGemini35FlashGeminiCliFallbackModel() {
1210
1264
  return GEMINI_35_FLASH_ROUTES.geminiCliFallbackModel;
1211
1265
  }
1266
+ function getTieredAntigravityModel(routes, tier) {
1267
+ return tier ? routes.byTier[tier] ?? routes.defaultModel : routes.defaultModel;
1268
+ }
1212
1269
  function getGemini36FlashAntigravityModel(tier) {
1213
- if (!tier) {
1214
- return GEMINI_36_FLASH_ROUTES.defaultModel;
1215
- }
1216
- return GEMINI_36_FLASH_ROUTES.byTier[tier] ?? GEMINI_36_FLASH_ROUTES.defaultModel;
1270
+ return getTieredAntigravityModel(GEMINI_36_FLASH_ROUTES, tier);
1271
+ }
1272
+ function getGemini37FlashAntigravityModel(tier) {
1273
+ return getTieredAntigravityModel(GEMINI_37_FLASH_ROUTES, tier);
1274
+ }
1275
+ function getGemini38FlashAntigravityModel(tier) {
1276
+ return getTieredAntigravityModel(GEMINI_38_FLASH_ROUTES, tier);
1217
1277
  }
1218
1278
  function getQuotaGroupForModel(modelId) {
1219
1279
  const normalized = modelId.toLowerCase();
@@ -2875,6 +2935,12 @@ var AGY_MODEL_ENUM_BY_WIRE_MODEL = {
2875
2935
  "gemini-3.6-flash-low": "MODEL_PLACEHOLDER_M73",
2876
2936
  "gemini-3.6-flash-medium": "MODEL_PLACEHOLDER_M72",
2877
2937
  "gemini-3.6-flash-high": "MODEL_PLACEHOLDER_M71",
2938
+ "gemini-3.7-flash-low": "MODEL_PLACEHOLDER_M300",
2939
+ "gemini-3.7-flash-medium": "MODEL_PLACEHOLDER_M299",
2940
+ "gemini-3.7-flash-high": "MODEL_PLACEHOLDER_M298",
2941
+ "gemini-3.8-flash-low": "MODEL_PLACEHOLDER_M320",
2942
+ "gemini-3.8-flash-medium": "MODEL_PLACEHOLDER_M319",
2943
+ "gemini-3.8-flash-high": "MODEL_PLACEHOLDER_M318",
2878
2944
  "gemini-3.1-pro-low": "MODEL_PLACEHOLDER_M36",
2879
2945
  "gemini-pro-agent": "MODEL_PLACEHOLDER_M16",
2880
2946
  "claude-sonnet-4-6": "MODEL_PLACEHOLDER_M35",
@@ -3504,7 +3570,7 @@ async function connectTlsWithAbort(targetUrl, timeoutMs, signal, onDebug) {
3504
3570
  }
3505
3571
 
3506
3572
  // ../core/dist/antigravity/oauth.js
3507
- import { generatePKCE } from "@openauthjs/openauth/pkce";
3573
+ import { createHash as createHash2, randomBytes as randomBytes2 } from "node:crypto";
3508
3574
 
3509
3575
  // ../core/dist/constants.js
3510
3576
  var ANTIGRAVITY_CLIENT_ID = "1071006060591-tmhssin2h21lcre235vtolojh4g403ep.apps.googleusercontent.com";
@@ -3629,6 +3695,13 @@ async function fetchWithActiveTimeout(input2, init = {}, options = {}) {
3629
3695
 
3630
3696
  // ../core/dist/antigravity/oauth.js
3631
3697
  var log2 = createLogger("oauth");
3698
+ function generatePkcePair() {
3699
+ const verifier = randomBytes2(32).toString("base64url");
3700
+ return {
3701
+ verifier,
3702
+ challenge: createHash2("sha256").update(verifier).digest("base64url")
3703
+ };
3704
+ }
3632
3705
  function encodeState(payload) {
3633
3706
  return Buffer.from(JSON.stringify(payload), "utf8").toString("base64url");
3634
3707
  }
@@ -3646,7 +3719,7 @@ function decodeState(state) {
3646
3719
  };
3647
3720
  }
3648
3721
  async function authorizeAntigravity(projectId = "") {
3649
- const pkce = await generatePKCE();
3722
+ const pkce = generatePkcePair();
3650
3723
  const url = new URL("https://accounts.google.com/o/oauth2/v2/auth");
3651
3724
  url.searchParams.set("client_id", ANTIGRAVITY_CLIENT_ID);
3652
3725
  url.searchParams.set("response_type", "code");
@@ -4006,7 +4079,7 @@ async function ensureProjectContext(auth) {
4006
4079
  }
4007
4080
 
4008
4081
  // ../core/dist/quota-manager.js
4009
- import { createHash as createHash2 } from "node:crypto";
4082
+ import { createHash as createHash3 } from "node:crypto";
4010
4083
  var log4 = createLogger("quota-manager");
4011
4084
  var QUOTA_MANAGER_DEFAULT_BASE_BACKOFF_MS = 3e4;
4012
4085
  var QUOTA_MANAGER_DEFAULT_MAX_BACKOFF_MS = 10 * 60 * 1e3;
@@ -4015,7 +4088,7 @@ function defaultKeyOf(account) {
4015
4088
  if (account.email)
4016
4089
  return `e:${account.email.toLowerCase()}`;
4017
4090
  const token = account.refreshToken || "";
4018
- return `t:${createHash2("sha256").update(token).digest("hex").slice(0, 16)}`;
4091
+ return `t:${createHash3("sha256").update(token).digest("hex").slice(0, 16)}`;
4019
4092
  }
4020
4093
  function createQuotaManager(options) {
4021
4094
  const now = options.now ?? (() => Date.now());
@@ -4218,7 +4291,7 @@ function createQuotaManager(options) {
4218
4291
  };
4219
4292
  }
4220
4293
  function hashKey(key) {
4221
- return createHash2("sha256").update(key).digest("hex").slice(0, 8);
4294
+ return createHash3("sha256").update(key).digest("hex").slice(0, 8);
4222
4295
  }
4223
4296
  function classifyQuotaGroup(modelName, displayName) {
4224
4297
  const registryGroup = getQuotaGroupForModel(modelName);
@@ -5111,12 +5184,12 @@ function isGemini35FlashModel(model) {
5111
5184
  function resolveGemini35FlashAntigravityModel(tier) {
5112
5185
  return getGemini35FlashAntigravityModel(tier);
5113
5186
  }
5114
- function getAgyGeminiFlashThinkingBudget(tier) {
5187
+ function getAgyGeminiFlashThinkingBudget(tier, highBudget = 1e4) {
5115
5188
  switch (tier) {
5116
5189
  case "low":
5117
5190
  return 1e3;
5118
5191
  case "high":
5119
- return 1e4;
5192
+ return highBudget;
5120
5193
  default:
5121
5194
  return 4e3;
5122
5195
  }
@@ -5144,6 +5217,8 @@ function resolveModelWithTier(requestedModel, options = {}) {
5144
5217
  const isGemini31Pro = /^gemini-3\.1-pro/i.test(baseName);
5145
5218
  const isGemini35Flash = /^gemini-3\.5-flash/i.test(baseName);
5146
5219
  const isGemini36Flash = /^gemini-3\.6-flash/i.test(baseName);
5220
+ const isGemini37Flash = /^gemini-3\.7-flash/i.test(baseName);
5221
+ const isGemini38Flash = /^gemini-3\.8-flash/i.test(baseName);
5147
5222
  const isGptOss120b = /^gpt-oss-120b(?:-medium)?$/i.test(baseName);
5148
5223
  if (isGemini31Pro && quotaPreference === "antigravity") {
5149
5224
  return {
@@ -5175,6 +5250,26 @@ function resolveModelWithTier(requestedModel, options = {}) {
5175
5250
  explicitQuota
5176
5251
  };
5177
5252
  }
5253
+ if (isGemini37Flash && quotaPreference === "antigravity") {
5254
+ return {
5255
+ actualModel: getGemini37FlashAntigravityModel(tier ?? "medium"),
5256
+ thinkingBudget: getAgyGeminiFlashThinkingBudget(tier, -1),
5257
+ tier: tier ?? "medium",
5258
+ isThinkingModel: true,
5259
+ quotaPreference,
5260
+ explicitQuota
5261
+ };
5262
+ }
5263
+ if (isGemini38Flash && quotaPreference === "antigravity") {
5264
+ return {
5265
+ actualModel: getGemini38FlashAntigravityModel(tier ?? "medium"),
5266
+ thinkingBudget: getAgyGeminiFlashThinkingBudget(tier, -1),
5267
+ tier: tier ?? "medium",
5268
+ isThinkingModel: true,
5269
+ quotaPreference,
5270
+ explicitQuota
5271
+ };
5272
+ }
5178
5273
  if (isGptOss120b && quotaPreference === "antigravity") {
5179
5274
  return {
5180
5275
  actualModel: "gpt-oss-120b-medium",
@@ -6607,7 +6702,7 @@ function isTuiConnected(sessionId) {
6607
6702
  }
6608
6703
 
6609
6704
  // src/rpc/rpc-dir.ts
6610
- import { createHash as createHash3 } from "node:crypto";
6705
+ import { createHash as createHash4 } from "node:crypto";
6611
6706
  import { homedir as homedir4, tmpdir } from "node:os";
6612
6707
  import { isAbsolute, join as join7, resolve } from "node:path";
6613
6708
  var RPC_DIR_ENV = "ANTIGRAVITY_AUTH_RPC_DIR";
@@ -6616,13 +6711,13 @@ function getRpcDir(projectDirectory) {
6616
6711
  if (override) {
6617
6712
  return isAbsolute(override) ? override : resolve(projectDirectory, override);
6618
6713
  }
6619
- const projectHash = createHash3("sha256").update(resolve(projectDirectory)).digest("hex").slice(0, 16);
6714
+ const projectHash = createHash4("sha256").update(resolve(projectDirectory)).digest("hex").slice(0, 16);
6620
6715
  const stateHome = process.env.XDG_STATE_HOME ?? join7(homedir4(), ".local", "state");
6621
6716
  return join7(stateHome, "cortexkit", "antigravity-auth", "rpc", projectHash);
6622
6717
  }
6623
6718
 
6624
6719
  // src/rpc/rpc-server.ts
6625
- import { randomBytes as randomBytes3, timingSafeEqual } from "node:crypto";
6720
+ import { randomBytes as randomBytes4, timingSafeEqual } from "node:crypto";
6626
6721
  import { unlink as unlink4 } from "node:fs/promises";
6627
6722
  import {
6628
6723
  createServer
@@ -6630,7 +6725,7 @@ import {
6630
6725
  import { join as join9 } from "node:path";
6631
6726
 
6632
6727
  // src/rpc/port-file.ts
6633
- import { randomBytes as randomBytes2 } from "node:crypto";
6728
+ import { randomBytes as randomBytes3 } from "node:crypto";
6634
6729
  import {
6635
6730
  chmod as chmod2,
6636
6731
  mkdir as mkdir4,
@@ -6649,7 +6744,7 @@ async function writePortFile(dir, entry) {
6649
6744
  await chmod2(dir, DIR_MODE);
6650
6745
  const full = { ...entry, startedAt: Date.now() };
6651
6746
  const target = join8(dir, `port-${entry.pid}.json`);
6652
- const temporary = `${target}.${process.pid}.${randomBytes2(8).toString("hex")}.tmp`;
6747
+ const temporary = `${target}.${process.pid}.${randomBytes3(8).toString("hex")}.tmp`;
6653
6748
  try {
6654
6749
  await writeFile3(temporary, JSON.stringify(full), {
6655
6750
  encoding: "utf8",
@@ -6696,7 +6791,7 @@ var HttpError = class extends Error {
6696
6791
  status;
6697
6792
  };
6698
6793
  async function startRpcServer(options) {
6699
- const token = randomBytes3(32).toString("hex");
6794
+ const token = randomBytes4(32).toString("hex");
6700
6795
  const server = createServer((request, response) => {
6701
6796
  void handleRequest(request, response, token, options).catch((error) => {
6702
6797
  if (response.headersSent || response.writableEnded) return;
@@ -7368,7 +7463,7 @@ async function setSidebarMachineState(next, options = {}) {
7368
7463
  }
7369
7464
 
7370
7465
  // src/plugin/cache.ts
7371
- import { createHash as createHash4 } from "node:crypto";
7466
+ import { createHash as createHash5 } from "node:crypto";
7372
7467
 
7373
7468
  // src/plugin/cache/signature-cache.ts
7374
7469
  import {
@@ -7747,7 +7842,7 @@ async function shutdownDiskSignatureCache() {
7747
7842
  }
7748
7843
  }
7749
7844
  function hashText(text) {
7750
- return createHash4("sha256").update(text, "utf8").digest("hex").slice(0, SIGNATURE_TEXT_HASH_HEX_LEN);
7845
+ return createHash5("sha256").update(text, "utf8").digest("hex").slice(0, SIGNATURE_TEXT_HASH_HEX_LEN);
7751
7846
  }
7752
7847
  function makeDiskKey(sessionId, textHash) {
7753
7848
  return `${sessionId}:${textHash}`;
@@ -11777,7 +11872,7 @@ function createAccountCommandOAuthService(options) {
11777
11872
  }
11778
11873
 
11779
11874
  // src/plugin/auth-loader.ts
11780
- import { createHash as createHash5 } from "node:crypto";
11875
+ import { createHash as createHash6 } from "node:crypto";
11781
11876
 
11782
11877
  // src/plugin/accounts.ts
11783
11878
  var openCodeStore = {
@@ -12046,7 +12141,7 @@ function createProactiveRefreshQueue(client, providerId, config) {
12046
12141
  // src/plugin/auth-loader.ts
12047
12142
  var log10 = createLogger2("auth-loader");
12048
12143
  function refreshTokenIdentity(refreshToken) {
12049
- return createHash5("sha256").update(refreshToken).digest("hex").slice(0, 16);
12144
+ return createHash6("sha256").update(refreshToken).digest("hex").slice(0, 16);
12050
12145
  }
12051
12146
  function createAuthLoader({
12052
12147
  client,
@@ -12236,9 +12331,9 @@ function createAuthLoader({
12236
12331
  }
12237
12332
 
12238
12333
  // src/plugin/background-quota-refresh.ts
12239
- import { createHash as createHash6 } from "node:crypto";
12334
+ import { createHash as createHash7 } from "node:crypto";
12240
12335
  function quotaAccountIdentity2(refreshToken) {
12241
- return createHash6("sha256").update(refreshToken).digest("hex").slice(0, 16);
12336
+ return createHash7("sha256").update(refreshToken).digest("hex").slice(0, 16);
12242
12337
  }
12243
12338
  var MIN_INTERVAL_MS = 6e4;
12244
12339
  var STARTUP_JITTER_MS = 3e4;
@@ -12473,7 +12568,7 @@ var BackgroundQuotaRefresh = class {
12473
12568
  };
12474
12569
 
12475
12570
  // src/plugin/gemini-dump.ts
12476
- import { createHash as createHash7 } from "node:crypto";
12571
+ import { createHash as createHash8 } from "node:crypto";
12477
12572
  import { appendFileSync as appendFileSync2, mkdirSync as mkdirSync6, writeFileSync as writeFileSync6 } from "node:fs";
12478
12573
  import { tmpdir as tmpdir3 } from "node:os";
12479
12574
  import { join as join13 } from "node:path";
@@ -12542,7 +12637,7 @@ function executeGeminiDumpCommand(input2) {
12542
12637
  ].join("\n");
12543
12638
  }
12544
12639
  function hashText2(value) {
12545
- return createHash7("sha256").update(value).digest("hex");
12640
+ return createHash8("sha256").update(value).digest("hex");
12546
12641
  }
12547
12642
  function maskIdentifier(value) {
12548
12643
  if (typeof value !== "string" || value.length === 0) return void 0;
@@ -13552,7 +13647,7 @@ function registerAntigravityCommands(config) {
13552
13647
  }
13553
13648
 
13554
13649
  // src/plugin/command-data.ts
13555
- import { createHash as createHash8 } from "node:crypto";
13650
+ import { createHash as createHash9 } from "node:crypto";
13556
13651
  var QUOTA_GROUP_LABELS = {
13557
13652
  gemini: "Gemini",
13558
13653
  "non-gemini": "Non-Gemini"
@@ -13607,7 +13702,7 @@ function toCommandAccountRow(entry) {
13607
13702
  };
13608
13703
  }
13609
13704
  function quotaAccountIdentity3(refreshToken) {
13610
- return createHash8("sha256").update(refreshToken).digest("hex").slice(0, 16);
13705
+ return createHash9("sha256").update(refreshToken).digest("hex").slice(0, 16);
13611
13706
  }
13612
13707
  function projectCommandAccountRows(storage) {
13613
13708
  if (!storage) return [];
@@ -15542,7 +15637,7 @@ function isExplicitQuotaFromUrl(urlString) {
15542
15637
  }
15543
15638
 
15544
15639
  // src/plugin/killswitch.ts
15545
- import { createHash as createHash9 } from "node:crypto";
15640
+ import { createHash as createHash10 } from "node:crypto";
15546
15641
  var DEFAULT_CACHE_TTL_MS = 5 * 60 * 1e3;
15547
15642
  var QUOTA_GROUP_BY_FAMILY = {
15548
15643
  claude: ["non-gemini"],
@@ -15561,7 +15656,7 @@ function quotaGroupForModel(family, model) {
15561
15656
  return null;
15562
15657
  }
15563
15658
  function accountKeyForRefreshToken(refreshToken) {
15564
- return createHash9("sha256").update(refreshToken).digest("hex").slice(0, 12);
15659
+ return createHash10("sha256").update(refreshToken).digest("hex").slice(0, 12);
15565
15660
  }
15566
15661
  function evaluateKillswitchForAccount(account, family, settings, options = {}) {
15567
15662
  if (!settings.killswitch.enabled) {
@@ -18123,7 +18218,7 @@ function getImageModelLocalTitle(input2, init) {
18123
18218
  }
18124
18219
  function getAgyMaxOutputTokens(model) {
18125
18220
  const lower = model.toLowerCase();
18126
- if (lower === "gemini-3.5-flash-low" || lower === "gemini-3.5-flash-extra-low" || lower === "gemini-3-flash-agent" || lower === "gemini-3.6-flash-low" || lower === "gemini-3.6-flash-medium" || lower === "gemini-3.6-flash-high") {
18221
+ if (lower === "gemini-3.5-flash-low" || lower === "gemini-3.5-flash-extra-low" || lower === "gemini-3-flash-agent" || lower === "gemini-3.6-flash-low" || lower === "gemini-3.6-flash-medium" || lower === "gemini-3.6-flash-high" || lower === "gemini-3.7-flash-low" || lower === "gemini-3.7-flash-medium" || lower === "gemini-3.7-flash-high" || lower === "gemini-3.8-flash-low" || lower === "gemini-3.8-flash-medium" || lower === "gemini-3.8-flash-high") {
18127
18222
  return 65536;
18128
18223
  }
18129
18224
  if (lower === "gemini-3.1-pro-low" || lower === "gemini-pro-agent") {
@@ -19113,7 +19208,7 @@ function prepareAntigravityRequest(input2, init, accessToken, projectId, endpoin
19113
19208
  } else {
19114
19209
  thinkingConfig = {
19115
19210
  includeThoughts: normalizedThinking.includeThoughts,
19116
- ...typeof thinkingBudget === "number" && thinkingBudget > 0 ? { thinkingBudget } : {}
19211
+ ...typeof thinkingBudget === "number" && (thinkingBudget > 0 || thinkingBudget === -1) ? { thinkingBudget } : {}
19117
19212
  };
19118
19213
  }
19119
19214
  if (rawGenerationConfig) {
@@ -21543,8 +21638,12 @@ function parseDurationToMs(duration) {
21543
21638
  return matchFound ? totalMs : null;
21544
21639
  }
21545
21640
 
21546
- // src/plugin/google-search-tool.ts
21547
- import { tool } from "@opencode-ai/plugin";
21641
+ // ../../node_modules/.bun/@opencode-ai+plugin@1.17.13+b766ee0bec30d060/node_modules/@opencode-ai/plugin/dist/tool.js
21642
+ import { z as z5 } from "zod";
21643
+ function tool(input2) {
21644
+ return input2;
21645
+ }
21646
+ tool.schema = z5;
21548
21647
 
21549
21648
  // src/plugin/search.ts
21550
21649
  import crypto3 from "node:crypto";
@@ -21956,7 +22055,7 @@ async function persistAccountPool(results, replaceAll = false) {
21956
22055
  // src/plugin/index.ts
21957
22056
  var logger = createLogger2("plugin");
21958
22057
  function quotaAccountIdentity4(refreshToken) {
21959
- return createHash10("sha256").update(refreshToken).digest("hex").slice(0, 16);
22058
+ return createHash11("sha256").update(refreshToken).digest("hex").slice(0, 16);
21960
22059
  }
21961
22060
  function registerQuotaManagerProducer(lifecycle, quotaManager) {
21962
22061
  lifecycle.register({ dispose: () => quotaManager.dispose() }, "producer");