@google/gemini-cli 0.55.0-preview.2 → 0.55.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/bundle/builtin/antigravity-support/SKILL.md +55 -18
  2. package/bundle/builtin/skill-creator/SKILL.md +221 -84
  3. package/bundle/{chunk-2ZWCUTMN.js → chunk-2M2ZIALC.js} +1 -1
  4. package/bundle/{chunk-A4YWS44A.js → chunk-32XQ54AJ.js} +41 -13
  5. package/bundle/{chunk-T36P7MFE.js → chunk-3PF5QBBI.js} +7 -7
  6. package/bundle/{chunk-XWGJPCDB.js → chunk-4PTN4HDB.js} +1 -1
  7. package/bundle/{chunk-57ZLFNIU.js → chunk-4VCYHMUV.js} +1 -1
  8. package/bundle/{chunk-KII3XXCP.js → chunk-54ARFWUQ.js} +3 -3
  9. package/bundle/{chunk-OC55SY62.js → chunk-5LKFYSMV.js} +7 -7
  10. package/bundle/{chunk-CYJHOZAD.js → chunk-7PUNXJV6.js} +1 -1
  11. package/bundle/{chunk-2NTEXQZI.js → chunk-AHQT54A5.js} +2 -2
  12. package/bundle/{chunk-LVOM4PEE.js → chunk-AICCA4O7.js} +2 -2
  13. package/bundle/{chunk-4SFKECJB.js → chunk-CBP73R2W.js} +1 -1
  14. package/bundle/{chunk-O5GQF2L7.js → chunk-DPETPWEN.js} +1 -1
  15. package/bundle/{chunk-3OPKUUXP.js → chunk-F6UH32RP.js} +1 -1
  16. package/bundle/{chunk-PTZIAOG5.js → chunk-FFNJNOPW.js} +3 -3
  17. package/bundle/{chunk-QPGTVRXP.js → chunk-IHBI4YWX.js} +7 -7
  18. package/bundle/{chunk-UXD5COS4.js → chunk-L72KYPGX.js} +7 -7
  19. package/bundle/{chunk-7IYUUE2H.js → chunk-MMGNXRKB.js} +1 -1
  20. package/bundle/{chunk-L6Q242KC.js → chunk-MVFWCC7A.js} +1 -1
  21. package/bundle/{chunk-CBX65YIB.js → chunk-MXXWTJ5T.js} +1 -1
  22. package/bundle/{chunk-SEHUSFSL.js → chunk-ODKPTNXF.js} +1 -1
  23. package/bundle/{chunk-J27NXCYL.js → chunk-PG6A7S3N.js} +1 -1
  24. package/bundle/{chunk-HZZM77SO.js → chunk-QCOIICKD.js} +41 -13
  25. package/bundle/{chunk-S3XRZJYO.js → chunk-QZIGFB5E.js} +1 -1
  26. package/bundle/{chunk-DBPSBJMI.js → chunk-RV6ZZ7XX.js} +1 -1
  27. package/bundle/{chunk-R3S5PP5S.js → chunk-TBDX7VEE.js} +41 -13
  28. package/bundle/{chunk-DSCF5EA6.js → chunk-TGIIS5S2.js} +3 -3
  29. package/bundle/{chunk-J6DC57TM.js → chunk-UE3CHSFT.js} +1 -1
  30. package/bundle/{chunk-DRN2VYCZ.js → chunk-UNIFGKZA.js} +2 -2
  31. package/bundle/{chunk-4C7ON4TD.js → chunk-WD5EVW3M.js} +1 -1
  32. package/bundle/{chunk-FH7GCVZY.js → chunk-XCA4ZL2J.js} +2 -2
  33. package/bundle/{chunk-IHR5TZ6N.js → chunk-YBQ5R3NL.js} +3 -3
  34. package/bundle/{chunk-MLTI5CK6.js → chunk-ZYL2LM3Y.js} +41 -13
  35. package/bundle/{cleanup-PYHN72B4.js → cleanup-B3QR2N4G.js} +2 -2
  36. package/bundle/{cleanup-QOIB4MC5.js → cleanup-H4OEYJO6.js} +2 -2
  37. package/bundle/{cleanup-X7SPIVY6.js → cleanup-MJ6IH5A4.js} +2 -2
  38. package/bundle/{cleanup-XHKLOUOX.js → cleanup-ZPX2BSHS.js} +2 -2
  39. package/bundle/{core-TM4S2KC6.js → core-IV4CNC54.js} +1 -1
  40. package/bundle/{devtoolsService-QXH36QMO.js → devtoolsService-53U6T2D7.js} +2 -2
  41. package/bundle/{devtoolsService-XNULR5OM.js → devtoolsService-HB7ZBXSQ.js} +2 -2
  42. package/bundle/{devtoolsService-XP7RODGG.js → devtoolsService-OPPX3TMY.js} +2 -2
  43. package/bundle/{devtoolsService-YBK5NQJR.js → devtoolsService-VRMTKDJD.js} +2 -2
  44. package/bundle/{dist-DUXHKH4A.js → dist-6SH22WAQ.js} +1 -1
  45. package/bundle/{dist-FCM7NH26.js → dist-DZLHUESI.js} +1 -1
  46. package/bundle/{dist-LH5DRLX7.js → dist-GGMH7TPR.js} +1 -1
  47. package/bundle/docs/behavioral-evals.md +185 -0
  48. package/bundle/docs/changelogs/index.md +18 -0
  49. package/bundle/docs/changelogs/latest.md +59 -31
  50. package/bundle/docs/changelogs/preview.md +45 -3
  51. package/bundle/docs/sidebar.json +4 -0
  52. package/bundle/{gemini-ZUILAPR6.js → gemini-3KUKFPRO.js} +14 -14
  53. package/bundle/{gemini-HDAYOIW2.js → gemini-63IMHOLI.js} +14 -14
  54. package/bundle/{gemini-ORTIIX7J.js → gemini-I57YPWDS.js} +14 -14
  55. package/bundle/{gemini-A7HOBIKY.js → gemini-LI2WNAGG.js} +14 -14
  56. package/bundle/gemini.js +7 -7
  57. package/bundle/{interactiveCli-H524RKEH.js → interactiveCli-2Z3Q3FYM.js} +67 -25
  58. package/bundle/{interactiveCli-KX3U7SFD.js → interactiveCli-4CVVH6KY.js} +67 -25
  59. package/bundle/{interactiveCli-O4YSZIKG.js → interactiveCli-OLXPGHKG.js} +67 -25
  60. package/bundle/{interactiveCli-YAAI2B6S.js → interactiveCli-YTTP3IVA.js} +67 -25
  61. package/bundle/{liteRtServerManager-FTW42YZF.js → liteRtServerManager-3I2T6MGB.js} +4 -4
  62. package/bundle/{liteRtServerManager-NW33H3DY.js → liteRtServerManager-F6V5YDCO.js} +4 -4
  63. package/bundle/{liteRtServerManager-PRXJGWUQ.js → liteRtServerManager-H6XTDF3Z.js} +4 -4
  64. package/bundle/{liteRtServerManager-RP2Z5PSZ.js → liteRtServerManager-I5WRPME4.js} +4 -4
  65. package/bundle/{oauth2-provider-JZQDXWRM.js → oauth2-provider-D5ATF6IJ.js} +1 -1
  66. package/bundle/{oauth2-provider-UKW3UFLQ.js → oauth2-provider-EO6C45X7.js} +1 -1
  67. package/bundle/{oauth2-provider-AXFTVNOH.js → oauth2-provider-QKZF52YW.js} +1 -1
  68. package/bundle/{oauth2-provider-X4GQTJLG.js → oauth2-provider-RA73ERNX.js} +1 -1
  69. package/bundle/{start-EIHA5TWI.js → start-A2X2P77M.js} +6 -6
  70. package/bundle/{start-ODF2OV65.js → start-IH2TDHK5.js} +6 -6
  71. package/bundle/{start-ONHNJJG7.js → start-J7S6DWJY.js} +6 -6
  72. package/bundle/{start-TSZCFX4W.js → start-VOAVWNRZ.js} +6 -6
  73. package/package.json +1 -1
@@ -282830,8 +282830,8 @@ function isValidToolName(name3, options = {}) {
282830
282830
  }
282831
282831
 
282832
282832
  // packages/core/src/generated/git-commit.ts
282833
- var GIT_COMMIT_INFO = "b39816c87";
282834
- var CLI_VERSION = "0.55.0-preview.1";
282833
+ var GIT_COMMIT_INFO = "58ba19945";
282834
+ var CLI_VERSION = "0.56.0-nightly.20260806.g761f604c1";
282835
282835
 
282836
282836
  // packages/core/src/ide/detect-ide.ts
282837
282837
  var IDE_DEFINITIONS = {
@@ -306413,7 +306413,7 @@ function getVersion() {
306413
306413
  }
306414
306414
  versionPromise = (async () => {
306415
306415
  const pkgJson = await getPackageJson(__dirname4);
306416
- return "0.55.0-preview.1";
306416
+ return "0.56.0-nightly.20260806.g761f604c1";
306417
306417
  })();
306418
306418
  return versionPromise;
306419
306419
  }
@@ -341236,7 +341236,7 @@ var A2AAuthProviderFactory = class _A2AAuthProviderFactory {
341236
341236
  return provider;
341237
341237
  }
341238
341238
  case "oauth2": {
341239
- const { OAuth2AuthProvider } = await import("./oauth2-provider-AXFTVNOH.js");
341239
+ const { OAuth2AuthProvider } = await import("./oauth2-provider-QKZF52YW.js");
341240
341240
  const provider = new OAuth2AuthProvider(
341241
341241
  authConfig,
341242
341242
  options.agentName ?? "unknown",
@@ -371103,6 +371103,29 @@ import * as http2 from "node:http";
371103
371103
  import * as crypto19 from "node:crypto";
371104
371104
  import { URL as URL6 } from "node:url";
371105
371105
  var REDIRECT_PATH = "/oauth/callback";
371106
+ function getRedirectUri(config2, redirectPort) {
371107
+ if (process.env["GOOGLE_CLOUD_WORKSTATIONS"] === "true" && process.env["WEB_HOST"]) {
371108
+ if (config2.redirectUri) {
371109
+ try {
371110
+ const parsed = new URL6(config2.redirectUri);
371111
+ if (parsed.hostname === "localhost" || parsed.hostname === "127.0.0.1" || parsed.hostname === "[::1]") {
371112
+ const port = String(redirectPort);
371113
+ parsed.protocol = "https:";
371114
+ parsed.hostname = `${port}-${process.env["WEB_HOST"]}`;
371115
+ parsed.port = "";
371116
+ return parsed.toString();
371117
+ }
371118
+ } catch {
371119
+ }
371120
+ return config2.redirectUri;
371121
+ }
371122
+ return `https://${redirectPort}-${process.env["WEB_HOST"]}${REDIRECT_PATH}`;
371123
+ }
371124
+ if (config2.redirectUri) {
371125
+ return config2.redirectUri;
371126
+ }
371127
+ return `http://localhost:${redirectPort}${REDIRECT_PATH}`;
371128
+ }
371106
371129
  var HTTP_OK = 200;
371107
371130
  function generatePKCEParams() {
371108
371131
  const codeVerifier = crypto19.randomBytes(64).toString("base64url");
@@ -371247,7 +371270,7 @@ function getPortFromUrl(urlString) {
371247
371270
  return void 0;
371248
371271
  }
371249
371272
  function buildAuthorizationUrl(config2, pkceParams, redirectPort, resource) {
371250
- const redirectUri = config2.redirectUri || `http://localhost:${redirectPort}${REDIRECT_PATH}`;
371273
+ const redirectUri = getRedirectUri(config2, redirectPort);
371251
371274
  const params = new URLSearchParams({
371252
371275
  client_id: config2.clientId,
371253
371276
  response_type: "code",
@@ -371342,7 +371365,7 @@ async function parseTokenEndpointResponse(response, operationName, defaultErrorC
371342
371365
  };
371343
371366
  }
371344
371367
  async function exchangeCodeForToken(config2, code, codeVerifier, redirectPort, resource) {
371345
- const redirectUri = config2.redirectUri || `http://localhost:${redirectPort}${REDIRECT_PATH}`;
371368
+ const redirectUri = getRedirectUri(config2, redirectPort);
371346
371369
  const params = new URLSearchParams({
371347
371370
  grant_type: "authorization_code",
371348
371371
  code,
@@ -371417,7 +371440,7 @@ var MCPOAuthProvider = class {
371417
371440
  * @returns The registered client information
371418
371441
  */
371419
371442
  async registerClient(registrationUrl, config2, redirectPort) {
371420
- const redirectUri = config2.redirectUri || `http://localhost:${redirectPort}${REDIRECT_PATH}`;
371443
+ const redirectUri = getRedirectUri(config2, redirectPort);
371421
371444
  const registrationRequest = {
371422
371445
  client_name: "Gemini CLI MCP Client",
371423
371446
  redirect_uris: [redirectUri],
@@ -371763,13 +371786,14 @@ ${authUrl}
371763
371786
  debugLogger.debug(`Returning valid token for server: ${serverName}`);
371764
371787
  return token2.accessToken;
371765
371788
  }
371766
- if (token2.refreshToken && config2.clientId && credentials3.tokenUrl) {
371789
+ const clientId = config2.clientId ?? credentials3.clientId;
371790
+ if (token2.refreshToken && clientId && credentials3.tokenUrl) {
371767
371791
  try {
371768
371792
  debugLogger.log(
371769
371793
  `Refreshing expired token for MCP server: ${serverName}`
371770
371794
  );
371771
371795
  const newTokenResponse = await this.refreshAccessToken(
371772
- config2,
371796
+ { ...config2, clientId },
371773
371797
  token2.refreshToken,
371774
371798
  credentials3.tokenUrl,
371775
371799
  credentials3.mcpServerUrl
@@ -371786,7 +371810,7 @@ ${authUrl}
371786
371810
  await this.tokenStorage.saveToken(
371787
371811
  serverName,
371788
371812
  newToken,
371789
- config2.clientId,
371813
+ clientId,
371790
371814
  credentials3.tokenUrl,
371791
371815
  credentials3.mcpServerUrl
371792
371816
  );
@@ -371811,7 +371835,7 @@ ${authUrl}
371811
371835
  if (current.refreshToken && clientId && credentials3.tokenUrl) {
371812
371836
  try {
371813
371837
  const newTokenResponse = await this.refreshAccessToken(
371814
- config2,
371838
+ { ...config2, clientId },
371815
371839
  current.refreshToken,
371816
371840
  credentials3.tokenUrl,
371817
371841
  credentials3.mcpServerUrl
@@ -383100,17 +383124,21 @@ var Config = class {
383100
383124
  if (!bucket.modelId || bucket.remainingFraction == null) {
383101
383125
  continue;
383102
383126
  }
383127
+ let modelId = bucket.modelId;
383128
+ if (modelId === SECONDARY_GEMINI_3_5_FLASH_MODEL) {
383129
+ modelId = DEFAULT_GEMINI_3_5_FLASH_MODEL;
383130
+ }
383103
383131
  let remaining;
383104
383132
  let limit;
383105
383133
  if (bucket.remainingAmount) {
383106
383134
  remaining = parseInt(bucket.remainingAmount, 10);
383107
- limit = bucket.remainingFraction > 0 ? Math.round(remaining / bucket.remainingFraction) : this.modelQuotas.get(bucket.modelId)?.limit ?? 0;
383135
+ limit = bucket.remainingFraction > 0 ? Math.round(remaining / bucket.remainingFraction) : this.modelQuotas.get(modelId)?.limit ?? 0;
383108
383136
  } else {
383109
383137
  limit = 100;
383110
383138
  remaining = Math.round(bucket.remainingFraction * limit);
383111
383139
  }
383112
383140
  if (!isNaN(remaining) && Number.isFinite(limit) && limit > 0) {
383113
- this.modelQuotas.set(bucket.modelId, {
383141
+ this.modelQuotas.set(modelId, {
383114
383142
  remaining,
383115
383143
  limit,
383116
383144
  resetTime: bucket.resetTime
@@ -5,7 +5,7 @@ import {
5
5
  isTelemetrySdkInitialized,
6
6
  resetBrowserSession,
7
7
  shutdownTelemetry
8
- } from "./chunk-HZZM77SO.js";
8
+ } from "./chunk-TBDX7VEE.js";
9
9
 
10
10
  // packages/cli/src/utils/cleanup.ts
11
11
  import { promises as fs } from "node:fs";
@@ -2,7 +2,7 @@ const require = (await import('node:module')).createRequire(import.meta.url); co
2
2
  import {
3
3
  CoreToolCallStatus,
4
4
  checkExhaustive
5
- } from "./chunk-MLTI5CK6.js";
5
+ } from "./chunk-ZYL2LM3Y.js";
6
6
  import {
7
7
  __commonJS,
8
8
  __toESM
@@ -282559,8 +282559,8 @@ function isValidToolName(name3, options = {}) {
282559
282559
  }
282560
282560
 
282561
282561
  // packages/core/dist/src/generated/git-commit.js
282562
- var GIT_COMMIT_INFO = "b39816c87";
282563
- var CLI_VERSION = "0.55.0-preview.1";
282562
+ var GIT_COMMIT_INFO = "58ba19945";
282563
+ var CLI_VERSION = "0.56.0-nightly.20260806.g761f604c1";
282564
282564
 
282565
282565
  // packages/core/dist/src/ide/detect-ide.js
282566
282566
  var IDE_DEFINITIONS = {
@@ -305823,7 +305823,7 @@ function getVersion() {
305823
305823
  }
305824
305824
  versionPromise = (async () => {
305825
305825
  const pkgJson = await getPackageJson(__dirname4);
305826
- return "0.55.0-preview.2";
305826
+ return "0.56.0-nightly.20260806.g761f604c1";
305827
305827
  })();
305828
305828
  return versionPromise;
305829
305829
  }
@@ -338558,7 +338558,7 @@ var A2AAuthProviderFactory = class _A2AAuthProviderFactory {
338558
338558
  return provider;
338559
338559
  }
338560
338560
  case "oauth2": {
338561
- const { OAuth2AuthProvider } = await import("./oauth2-provider-UKW3UFLQ.js");
338561
+ const { OAuth2AuthProvider } = await import("./oauth2-provider-EO6C45X7.js");
338562
338562
  const provider = new OAuth2AuthProvider(authConfig, options.agentName ?? "unknown", agentCard, options.agentCardUrl);
338563
338563
  await provider.initialize();
338564
338564
  return provider;
@@ -365882,6 +365882,29 @@ import * as http2 from "node:http";
365882
365882
  import * as crypto19 from "node:crypto";
365883
365883
  import { URL as URL6 } from "node:url";
365884
365884
  var REDIRECT_PATH = "/oauth/callback";
365885
+ function getRedirectUri(config2, redirectPort) {
365886
+ if (process.env["GOOGLE_CLOUD_WORKSTATIONS"] === "true" && process.env["WEB_HOST"]) {
365887
+ if (config2.redirectUri) {
365888
+ try {
365889
+ const parsed = new URL6(config2.redirectUri);
365890
+ if (parsed.hostname === "localhost" || parsed.hostname === "127.0.0.1" || parsed.hostname === "[::1]") {
365891
+ const port = String(redirectPort);
365892
+ parsed.protocol = "https:";
365893
+ parsed.hostname = `${port}-${process.env["WEB_HOST"]}`;
365894
+ parsed.port = "";
365895
+ return parsed.toString();
365896
+ }
365897
+ } catch {
365898
+ }
365899
+ return config2.redirectUri;
365900
+ }
365901
+ return `https://${redirectPort}-${process.env["WEB_HOST"]}${REDIRECT_PATH}`;
365902
+ }
365903
+ if (config2.redirectUri) {
365904
+ return config2.redirectUri;
365905
+ }
365906
+ return `http://localhost:${redirectPort}${REDIRECT_PATH}`;
365907
+ }
365885
365908
  var HTTP_OK = 200;
365886
365909
  function generatePKCEParams() {
365887
365910
  const codeVerifier = crypto19.randomBytes(64).toString("base64url");
@@ -366015,7 +366038,7 @@ function getPortFromUrl(urlString) {
366015
366038
  return void 0;
366016
366039
  }
366017
366040
  function buildAuthorizationUrl(config2, pkceParams, redirectPort, resource) {
366018
- const redirectUri = config2.redirectUri || `http://localhost:${redirectPort}${REDIRECT_PATH}`;
366041
+ const redirectUri = getRedirectUri(config2, redirectPort);
366019
366042
  const params = new URLSearchParams({
366020
366043
  client_id: config2.clientId,
366021
366044
  response_type: "code",
@@ -366104,7 +366127,7 @@ async function parseTokenEndpointResponse(response, operationName, defaultErrorC
366104
366127
  };
366105
366128
  }
366106
366129
  async function exchangeCodeForToken(config2, code, codeVerifier, redirectPort, resource) {
366107
- const redirectUri = config2.redirectUri || `http://localhost:${redirectPort}${REDIRECT_PATH}`;
366130
+ const redirectUri = getRedirectUri(config2, redirectPort);
366108
366131
  const params = new URLSearchParams({
366109
366132
  grant_type: "authorization_code",
366110
366133
  code,
@@ -366175,7 +366198,7 @@ var MCPOAuthProvider = class {
366175
366198
  * @returns The registered client information
366176
366199
  */
366177
366200
  async registerClient(registrationUrl, config2, redirectPort) {
366178
- const redirectUri = config2.redirectUri || `http://localhost:${redirectPort}${REDIRECT_PATH}`;
366201
+ const redirectUri = getRedirectUri(config2, redirectPort);
366179
366202
  const registrationRequest = {
366180
366203
  client_name: "Gemini CLI MCP Client",
366181
366204
  redirect_uris: [redirectUri],
@@ -366464,10 +366487,11 @@ ${authUrl}
366464
366487
  debugLogger.debug(`Returning valid token for server: ${serverName}`);
366465
366488
  return token2.accessToken;
366466
366489
  }
366467
- if (token2.refreshToken && config2.clientId && credentials3.tokenUrl) {
366490
+ const clientId = config2.clientId ?? credentials3.clientId;
366491
+ if (token2.refreshToken && clientId && credentials3.tokenUrl) {
366468
366492
  try {
366469
366493
  debugLogger.log(`Refreshing expired token for MCP server: ${serverName}`);
366470
- const newTokenResponse = await this.refreshAccessToken(config2, token2.refreshToken, credentials3.tokenUrl, credentials3.mcpServerUrl);
366494
+ const newTokenResponse = await this.refreshAccessToken({ ...config2, clientId }, token2.refreshToken, credentials3.tokenUrl, credentials3.mcpServerUrl);
366471
366495
  const newToken = {
366472
366496
  accessToken: newTokenResponse.access_token,
366473
366497
  tokenType: newTokenResponse.token_type,
@@ -366477,7 +366501,7 @@ ${authUrl}
366477
366501
  if (newTokenResponse.expires_in) {
366478
366502
  newToken.expiresAt = Date.now() + newTokenResponse.expires_in * 1e3;
366479
366503
  }
366480
- await this.tokenStorage.saveToken(serverName, newToken, config2.clientId, credentials3.tokenUrl, credentials3.mcpServerUrl);
366504
+ await this.tokenStorage.saveToken(serverName, newToken, clientId, credentials3.tokenUrl, credentials3.mcpServerUrl);
366481
366505
  return newToken.accessToken;
366482
366506
  } catch (error40) {
366483
366507
  coreEvents.emitFeedback("error", "Failed to refresh auth token.", error40);
@@ -366495,7 +366519,7 @@ ${authUrl}
366495
366519
  const clientId = config2.clientId ?? credentials3.clientId;
366496
366520
  if (current.refreshToken && clientId && credentials3.tokenUrl) {
366497
366521
  try {
366498
- const newTokenResponse = await this.refreshAccessToken(config2, current.refreshToken, credentials3.tokenUrl, credentials3.mcpServerUrl);
366522
+ const newTokenResponse = await this.refreshAccessToken({ ...config2, clientId }, current.refreshToken, credentials3.tokenUrl, credentials3.mcpServerUrl);
366499
366523
  const refreshed = {
366500
366524
  accessToken: newTokenResponse.access_token,
366501
366525
  tokenType: newTokenResponse.token_type,
@@ -377230,17 +377254,21 @@ var Config = class {
377230
377254
  if (!bucket.modelId || bucket.remainingFraction == null) {
377231
377255
  continue;
377232
377256
  }
377257
+ let modelId = bucket.modelId;
377258
+ if (modelId === SECONDARY_GEMINI_3_5_FLASH_MODEL) {
377259
+ modelId = DEFAULT_GEMINI_3_5_FLASH_MODEL;
377260
+ }
377233
377261
  let remaining;
377234
377262
  let limit;
377235
377263
  if (bucket.remainingAmount) {
377236
377264
  remaining = parseInt(bucket.remainingAmount, 10);
377237
- limit = bucket.remainingFraction > 0 ? Math.round(remaining / bucket.remainingFraction) : this.modelQuotas.get(bucket.modelId)?.limit ?? 0;
377265
+ limit = bucket.remainingFraction > 0 ? Math.round(remaining / bucket.remainingFraction) : this.modelQuotas.get(modelId)?.limit ?? 0;
377238
377266
  } else {
377239
377267
  limit = 100;
377240
377268
  remaining = Math.round(bucket.remainingFraction * limit);
377241
377269
  }
377242
377270
  if (!isNaN(remaining) && Number.isFinite(limit) && limit > 0) {
377243
- this.modelQuotas.set(bucket.modelId, {
377271
+ this.modelQuotas.set(modelId, {
377244
377272
  remaining,
377245
377273
  limit,
377246
377274
  resetTime: bucket.resetTime
@@ -2,7 +2,7 @@ const require = (await import('node:module')).createRequire(import.meta.url); co
2
2
  import {
3
3
  exitCli,
4
4
  require_source
5
- } from "./chunk-57ZLFNIU.js";
5
+ } from "./chunk-4VCYHMUV.js";
6
6
  import {
7
7
  DEFAULT_PORT,
8
8
  SERVER_START_WAIT_MS,
@@ -14,10 +14,10 @@ import {
14
14
  isServerRunning,
15
15
  resolveGemmaConfig,
16
16
  writeServerProcessInfo
17
- } from "./chunk-O5GQF2L7.js";
17
+ } from "./chunk-4PTN4HDB.js";
18
18
  import {
19
19
  debugLogger
20
- } from "./chunk-MLTI5CK6.js";
20
+ } from "./chunk-QCOIICKD.js";
21
21
  import {
22
22
  __toESM
23
23
  } from "./chunk-34MYV7JD.js";
@@ -1,7 +1,7 @@
1
1
  const require = (await import('node:module')).createRequire(import.meta.url); const __chunk_filename = (await import('node:url')).fileURLToPath(import.meta.url); const __chunk_dirname = (await import('node:path')).dirname(__chunk_filename);
2
2
  import {
3
3
  runExitCleanup
4
- } from "./chunk-J27NXCYL.js";
4
+ } from "./chunk-MXXWTJ5T.js";
5
5
  import {
6
6
  __commonJS,
7
7
  __require
@@ -1,13 +1,13 @@
1
1
  const require = (await import('node:module')).createRequire(import.meta.url); const __chunk_filename = (await import('node:url')).fileURLToPath(import.meta.url); const __chunk_dirname = (await import('node:path')).dirname(__chunk_filename);
2
2
  import {
3
3
  runExitCleanup
4
- } from "./chunk-CBX65YIB.js";
4
+ } from "./chunk-MXXWTJ5T.js";
5
5
  import {
6
6
  RELEASE_CHANNEL_STABILITY,
7
7
  debugLogger,
8
8
  getChannelFromVersion,
9
9
  isGitRepository
10
- } from "./chunk-R3S5PP5S.js";
10
+ } from "./chunk-ZYL2LM3Y.js";
11
11
 
12
12
  // packages/cli/src/utils/installationInfo.ts
13
13
  import * as fs from "node:fs";
@@ -2,7 +2,7 @@ const require = (await import('node:module')).createRequire(import.meta.url); co
2
2
  import {
3
3
  CoreToolCallStatus,
4
4
  checkExhaustive
5
- } from "./chunk-A4YWS44A.js";
5
+ } from "./chunk-TBDX7VEE.js";
6
6
  import {
7
7
  __commonJS,
8
8
  __toESM
@@ -1,13 +1,13 @@
1
1
  const require = (await import('node:module')).createRequire(import.meta.url); const __chunk_filename = (await import('node:url')).fileURLToPath(import.meta.url); const __chunk_dirname = (await import('node:path')).dirname(__chunk_filename);
2
2
  import {
3
3
  runExitCleanup
4
- } from "./chunk-S3XRZJYO.js";
4
+ } from "./chunk-PG6A7S3N.js";
5
5
  import {
6
6
  RELEASE_CHANNEL_STABILITY,
7
7
  debugLogger,
8
8
  getChannelFromVersion,
9
9
  isGitRepository
10
- } from "./chunk-HZZM77SO.js";
10
+ } from "./chunk-QCOIICKD.js";
11
11
 
12
12
  // packages/cli/src/utils/installationInfo.ts
13
13
  import * as fs from "node:fs";
@@ -2,7 +2,7 @@ const require = (await import('node:module')).createRequire(import.meta.url); co
2
2
  import {
3
3
  exitCli,
4
4
  require_source
5
- } from "./chunk-3OPKUUXP.js";
5
+ } from "./chunk-7PUNXJV6.js";
6
6
  import {
7
7
  DEFAULT_PORT,
8
8
  SERVER_START_WAIT_MS,
@@ -14,10 +14,10 @@ import {
14
14
  isServerRunning,
15
15
  resolveGemmaConfig,
16
16
  writeServerProcessInfo
17
- } from "./chunk-SEHUSFSL.js";
17
+ } from "./chunk-CBP73R2W.js";
18
18
  import {
19
19
  debugLogger
20
- } from "./chunk-R3S5PP5S.js";
20
+ } from "./chunk-TBDX7VEE.js";
21
21
  import {
22
22
  __toESM
23
23
  } from "./chunk-34MYV7JD.js";
@@ -282559,8 +282559,8 @@ function isValidToolName(name3, options = {}) {
282559
282559
  }
282560
282560
 
282561
282561
  // packages/core/dist/src/generated/git-commit.js
282562
- var GIT_COMMIT_INFO = "b39816c87";
282563
- var CLI_VERSION = "0.55.0-preview.2";
282562
+ var GIT_COMMIT_INFO = "58ba19945";
282563
+ var CLI_VERSION = "0.56.0-nightly.20260806.g761f604c1";
282564
282564
 
282565
282565
  // packages/core/dist/src/ide/detect-ide.js
282566
282566
  var IDE_DEFINITIONS = {
@@ -305823,7 +305823,7 @@ function getVersion() {
305823
305823
  }
305824
305824
  versionPromise = (async () => {
305825
305825
  const pkgJson = await getPackageJson(__dirname4);
305826
- return "0.55.0-preview.2";
305826
+ return "0.55.1";
305827
305827
  })();
305828
305828
  return versionPromise;
305829
305829
  }
@@ -338558,7 +338558,7 @@ var A2AAuthProviderFactory = class _A2AAuthProviderFactory {
338558
338558
  return provider;
338559
338559
  }
338560
338560
  case "oauth2": {
338561
- const { OAuth2AuthProvider } = await import("./oauth2-provider-JZQDXWRM.js");
338561
+ const { OAuth2AuthProvider } = await import("./oauth2-provider-D5ATF6IJ.js");
338562
338562
  const provider = new OAuth2AuthProvider(authConfig, options.agentName ?? "unknown", agentCard, options.agentCardUrl);
338563
338563
  await provider.initialize();
338564
338564
  return provider;
@@ -365882,6 +365882,29 @@ import * as http2 from "node:http";
365882
365882
  import * as crypto19 from "node:crypto";
365883
365883
  import { URL as URL6 } from "node:url";
365884
365884
  var REDIRECT_PATH = "/oauth/callback";
365885
+ function getRedirectUri(config2, redirectPort) {
365886
+ if (process.env["GOOGLE_CLOUD_WORKSTATIONS"] === "true" && process.env["WEB_HOST"]) {
365887
+ if (config2.redirectUri) {
365888
+ try {
365889
+ const parsed = new URL6(config2.redirectUri);
365890
+ if (parsed.hostname === "localhost" || parsed.hostname === "127.0.0.1" || parsed.hostname === "[::1]") {
365891
+ const port = String(redirectPort);
365892
+ parsed.protocol = "https:";
365893
+ parsed.hostname = `${port}-${process.env["WEB_HOST"]}`;
365894
+ parsed.port = "";
365895
+ return parsed.toString();
365896
+ }
365897
+ } catch {
365898
+ }
365899
+ return config2.redirectUri;
365900
+ }
365901
+ return `https://${redirectPort}-${process.env["WEB_HOST"]}${REDIRECT_PATH}`;
365902
+ }
365903
+ if (config2.redirectUri) {
365904
+ return config2.redirectUri;
365905
+ }
365906
+ return `http://localhost:${redirectPort}${REDIRECT_PATH}`;
365907
+ }
365885
365908
  var HTTP_OK = 200;
365886
365909
  function generatePKCEParams() {
365887
365910
  const codeVerifier = crypto19.randomBytes(64).toString("base64url");
@@ -366015,7 +366038,7 @@ function getPortFromUrl(urlString) {
366015
366038
  return void 0;
366016
366039
  }
366017
366040
  function buildAuthorizationUrl(config2, pkceParams, redirectPort, resource) {
366018
- const redirectUri = config2.redirectUri || `http://localhost:${redirectPort}${REDIRECT_PATH}`;
366041
+ const redirectUri = getRedirectUri(config2, redirectPort);
366019
366042
  const params = new URLSearchParams({
366020
366043
  client_id: config2.clientId,
366021
366044
  response_type: "code",
@@ -366104,7 +366127,7 @@ async function parseTokenEndpointResponse(response, operationName, defaultErrorC
366104
366127
  };
366105
366128
  }
366106
366129
  async function exchangeCodeForToken(config2, code, codeVerifier, redirectPort, resource) {
366107
- const redirectUri = config2.redirectUri || `http://localhost:${redirectPort}${REDIRECT_PATH}`;
366130
+ const redirectUri = getRedirectUri(config2, redirectPort);
366108
366131
  const params = new URLSearchParams({
366109
366132
  grant_type: "authorization_code",
366110
366133
  code,
@@ -366175,7 +366198,7 @@ var MCPOAuthProvider = class {
366175
366198
  * @returns The registered client information
366176
366199
  */
366177
366200
  async registerClient(registrationUrl, config2, redirectPort) {
366178
- const redirectUri = config2.redirectUri || `http://localhost:${redirectPort}${REDIRECT_PATH}`;
366201
+ const redirectUri = getRedirectUri(config2, redirectPort);
366179
366202
  const registrationRequest = {
366180
366203
  client_name: "Gemini CLI MCP Client",
366181
366204
  redirect_uris: [redirectUri],
@@ -366464,10 +366487,11 @@ ${authUrl}
366464
366487
  debugLogger.debug(`Returning valid token for server: ${serverName}`);
366465
366488
  return token2.accessToken;
366466
366489
  }
366467
- if (token2.refreshToken && config2.clientId && credentials3.tokenUrl) {
366490
+ const clientId = config2.clientId ?? credentials3.clientId;
366491
+ if (token2.refreshToken && clientId && credentials3.tokenUrl) {
366468
366492
  try {
366469
366493
  debugLogger.log(`Refreshing expired token for MCP server: ${serverName}`);
366470
- const newTokenResponse = await this.refreshAccessToken(config2, token2.refreshToken, credentials3.tokenUrl, credentials3.mcpServerUrl);
366494
+ const newTokenResponse = await this.refreshAccessToken({ ...config2, clientId }, token2.refreshToken, credentials3.tokenUrl, credentials3.mcpServerUrl);
366471
366495
  const newToken = {
366472
366496
  accessToken: newTokenResponse.access_token,
366473
366497
  tokenType: newTokenResponse.token_type,
@@ -366477,7 +366501,7 @@ ${authUrl}
366477
366501
  if (newTokenResponse.expires_in) {
366478
366502
  newToken.expiresAt = Date.now() + newTokenResponse.expires_in * 1e3;
366479
366503
  }
366480
- await this.tokenStorage.saveToken(serverName, newToken, config2.clientId, credentials3.tokenUrl, credentials3.mcpServerUrl);
366504
+ await this.tokenStorage.saveToken(serverName, newToken, clientId, credentials3.tokenUrl, credentials3.mcpServerUrl);
366481
366505
  return newToken.accessToken;
366482
366506
  } catch (error40) {
366483
366507
  coreEvents.emitFeedback("error", "Failed to refresh auth token.", error40);
@@ -366495,7 +366519,7 @@ ${authUrl}
366495
366519
  const clientId = config2.clientId ?? credentials3.clientId;
366496
366520
  if (current.refreshToken && clientId && credentials3.tokenUrl) {
366497
366521
  try {
366498
- const newTokenResponse = await this.refreshAccessToken(config2, current.refreshToken, credentials3.tokenUrl, credentials3.mcpServerUrl);
366522
+ const newTokenResponse = await this.refreshAccessToken({ ...config2, clientId }, current.refreshToken, credentials3.tokenUrl, credentials3.mcpServerUrl);
366499
366523
  const refreshed = {
366500
366524
  accessToken: newTokenResponse.access_token,
366501
366525
  tokenType: newTokenResponse.token_type,
@@ -377230,17 +377254,21 @@ var Config = class {
377230
377254
  if (!bucket.modelId || bucket.remainingFraction == null) {
377231
377255
  continue;
377232
377256
  }
377257
+ let modelId = bucket.modelId;
377258
+ if (modelId === SECONDARY_GEMINI_3_5_FLASH_MODEL) {
377259
+ modelId = DEFAULT_GEMINI_3_5_FLASH_MODEL;
377260
+ }
377233
377261
  let remaining;
377234
377262
  let limit;
377235
377263
  if (bucket.remainingAmount) {
377236
377264
  remaining = parseInt(bucket.remainingAmount, 10);
377237
- limit = bucket.remainingFraction > 0 ? Math.round(remaining / bucket.remainingFraction) : this.modelQuotas.get(bucket.modelId)?.limit ?? 0;
377265
+ limit = bucket.remainingFraction > 0 ? Math.round(remaining / bucket.remainingFraction) : this.modelQuotas.get(modelId)?.limit ?? 0;
377238
377266
  } else {
377239
377267
  limit = 100;
377240
377268
  remaining = Math.round(bucket.remainingFraction * limit);
377241
377269
  }
377242
377270
  if (!isNaN(remaining) && Number.isFinite(limit) && limit > 0) {
377243
- this.modelQuotas.set(bucket.modelId, {
377271
+ this.modelQuotas.set(modelId, {
377244
377272
  remaining,
377245
377273
  limit,
377246
377274
  resetTime: bucket.resetTime
@@ -11,8 +11,8 @@ import {
11
11
  runSyncCleanup,
12
12
  setupSignalHandlers,
13
13
  setupTtyCheck
14
- } from "./chunk-S3XRZJYO.js";
15
- import "./chunk-HZZM77SO.js";
14
+ } from "./chunk-MXXWTJ5T.js";
15
+ import "./chunk-ZYL2LM3Y.js";
16
16
  import "./chunk-664ZODQF.js";
17
17
  import "./chunk-IUUIT4SU.js";
18
18
  import "./chunk-TUDYL3X4.js";
@@ -11,8 +11,8 @@ import {
11
11
  runSyncCleanup,
12
12
  setupSignalHandlers,
13
13
  setupTtyCheck
14
- } from "./chunk-7IYUUE2H.js";
15
- import "./chunk-MLTI5CK6.js";
14
+ } from "./chunk-QZIGFB5E.js";
15
+ import "./chunk-TBDX7VEE.js";
16
16
  import "./chunk-664ZODQF.js";
17
17
  import "./chunk-IUUIT4SU.js";
18
18
  import "./chunk-TUDYL3X4.js";
@@ -11,8 +11,8 @@ import {
11
11
  runSyncCleanup,
12
12
  setupSignalHandlers,
13
13
  setupTtyCheck
14
- } from "./chunk-J27NXCYL.js";
15
- import "./chunk-A4YWS44A.js";
14
+ } from "./chunk-PG6A7S3N.js";
15
+ import "./chunk-QCOIICKD.js";
16
16
  import "./chunk-664ZODQF.js";
17
17
  import "./chunk-IUUIT4SU.js";
18
18
  import "./chunk-TUDYL3X4.js";
@@ -11,8 +11,8 @@ import {
11
11
  runSyncCleanup,
12
12
  setupSignalHandlers,
13
13
  setupTtyCheck
14
- } from "./chunk-CBX65YIB.js";
15
- import "./chunk-R3S5PP5S.js";
14
+ } from "./chunk-MMGNXRKB.js";
15
+ import "./chunk-32XQ54AJ.js";
16
16
  import "./chunk-664ZODQF.js";
17
17
  import "./chunk-IUUIT4SU.js";
18
18
  import "./chunk-TUDYL3X4.js";
@@ -1079,7 +1079,7 @@ import {
1079
1079
  wrapUntrusted,
1080
1080
  writeToStderr,
1081
1081
  writeToStdout
1082
- } from "./chunk-HZZM77SO.js";
1082
+ } from "./chunk-QCOIICKD.js";
1083
1083
  import "./chunk-664ZODQF.js";
1084
1084
  import {
1085
1085
  SpanStatusCode,
@@ -3,7 +3,7 @@ import {
3
3
  CoreEvent,
4
4
  coreEvents,
5
5
  debugLogger
6
- } from "./chunk-MLTI5CK6.js";
6
+ } from "./chunk-32XQ54AJ.js";
7
7
  import "./chunk-664ZODQF.js";
8
8
  import "./chunk-IUUIT4SU.js";
9
9
  import "./chunk-TUDYL3X4.js";
@@ -4325,7 +4325,7 @@ async function toggleDevToolsPanel(config, isOpen, toggle, setOpen) {
4325
4325
  return;
4326
4326
  }
4327
4327
  try {
4328
- const { openBrowserSecurely, shouldLaunchBrowser } = await import("./dist-LH5DRLX7.js");
4328
+ const { openBrowserSecurely, shouldLaunchBrowser } = await import("./dist-DZLHUESI.js");
4329
4329
  const url = await startDevToolsServer(config);
4330
4330
  if (shouldLaunchBrowser()) {
4331
4331
  try {
@@ -2,7 +2,7 @@ const require = (await import('node:module')).createRequire(import.meta.url); co
2
2
  import {
3
3
  coreEvents,
4
4
  debugLogger
5
- } from "./chunk-HZZM77SO.js";
5
+ } from "./chunk-QCOIICKD.js";
6
6
  import "./chunk-664ZODQF.js";
7
7
  import "./chunk-IUUIT4SU.js";
8
8
  import "./chunk-TUDYL3X4.js";
@@ -4324,7 +4324,7 @@ async function toggleDevToolsPanel(config, isOpen, toggle, setOpen) {
4324
4324
  return;
4325
4325
  }
4326
4326
  try {
4327
- const { openBrowserSecurely, shouldLaunchBrowser } = await import("./core-TM4S2KC6.js");
4327
+ const { openBrowserSecurely, shouldLaunchBrowser } = await import("./core-IV4CNC54.js");
4328
4328
  const url = await startDevToolsServer(config);
4329
4329
  if (shouldLaunchBrowser()) {
4330
4330
  try {
@@ -3,7 +3,7 @@ import {
3
3
  CoreEvent,
4
4
  coreEvents,
5
5
  debugLogger
6
- } from "./chunk-A4YWS44A.js";
6
+ } from "./chunk-TBDX7VEE.js";
7
7
  import "./chunk-664ZODQF.js";
8
8
  import "./chunk-IUUIT4SU.js";
9
9
  import "./chunk-TUDYL3X4.js";
@@ -4325,7 +4325,7 @@ async function toggleDevToolsPanel(config, isOpen, toggle, setOpen) {
4325
4325
  return;
4326
4326
  }
4327
4327
  try {
4328
- const { openBrowserSecurely, shouldLaunchBrowser } = await import("./dist-FCM7NH26.js");
4328
+ const { openBrowserSecurely, shouldLaunchBrowser } = await import("./dist-GGMH7TPR.js");
4329
4329
  const url = await startDevToolsServer(config);
4330
4330
  if (shouldLaunchBrowser()) {
4331
4331
  try {