@google/gemini-cli-a2a-server 0.23.0-preview.3 → 0.23.0-preview.5

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.
@@ -310224,7 +310224,7 @@ var __filename = fileURLToPath4(import.meta.url);
310224
310224
  var __dirname3 = path20.dirname(__filename);
310225
310225
  async function getVersion() {
310226
310226
  const pkgJson = await getPackageJson(__dirname3);
310227
- return "0.23.0-preview.3";
310227
+ return "0.23.0-preview.5";
310228
310228
  }
310229
310229
 
310230
310230
  // packages/core/dist/src/code_assist/experiments/client_metadata.js
@@ -312995,8 +312995,8 @@ var Float64Vector = import_vector.default.Float64Vector;
312995
312995
  var PointerVector = import_vector.default.PointerVector;
312996
312996
 
312997
312997
  // packages/core/dist/src/generated/git-commit.js
312998
- var GIT_COMMIT_INFO = "703d2e0dc";
312999
- var CLI_VERSION = "0.23.0-preview.3";
312998
+ var GIT_COMMIT_INFO = "17fb75866";
312999
+ var CLI_VERSION = "0.23.0-preview.5";
313000
313000
 
313001
313001
  // packages/core/dist/src/ide/detect-ide.js
313002
313002
  var IDE_DEFINITIONS = {
@@ -354014,15 +354014,14 @@ var ModelNotFoundError = class extends Error {
354014
354014
  };
354015
354015
 
354016
354016
  // packages/core/dist/src/utils/googleQuotaErrors.js
354017
- var DEFAULT_RETRYABLE_DELAY_SECOND = 5;
354018
354017
  var TerminalQuotaError = class extends Error {
354019
354018
  cause;
354020
354019
  retryDelayMs;
354021
- constructor(message, cause, retryDelayMs) {
354020
+ constructor(message, cause, retryDelaySeconds) {
354022
354021
  super(message);
354023
354022
  this.cause = cause;
354024
354023
  this.name = "TerminalQuotaError";
354025
- this.retryDelayMs = retryDelayMs ? retryDelayMs * 1e3 : void 0;
354024
+ this.retryDelayMs = retryDelaySeconds ? retryDelaySeconds * 1e3 : void 0;
354026
354025
  }
354027
354026
  };
354028
354027
  var RetryableQuotaError = class extends Error {
@@ -354032,7 +354031,7 @@ var RetryableQuotaError = class extends Error {
354032
354031
  super(message);
354033
354032
  this.cause = cause;
354034
354033
  this.name = "RetryableQuotaError";
354035
- this.retryDelayMs = retryDelaySeconds * 1e3;
354034
+ this.retryDelayMs = retryDelaySeconds ? retryDelaySeconds * 1e3 : void 0;
354036
354035
  }
354037
354036
  };
354038
354037
  function parseDurationInSeconds(duration3) {
@@ -354070,7 +354069,7 @@ function classifyGoogleError(error2) {
354070
354069
  code: 429,
354071
354070
  message: errorMessage,
354072
354071
  details: []
354073
- }, DEFAULT_RETRYABLE_DELAY_SECOND);
354072
+ });
354074
354073
  }
354075
354074
  return error2;
354076
354075
  }
@@ -354145,7 +354144,7 @@ Suggested retry after 60s.`, googleApiError, 60);
354145
354144
  code: 429,
354146
354145
  message: errorMessage,
354147
354146
  details: []
354148
- }, DEFAULT_RETRYABLE_DELAY_SECOND);
354147
+ });
354149
354148
  }
354150
354149
  return error2;
354151
354150
  }
@@ -354659,6 +354658,8 @@ async function retryWithBackoff(fn, options2) {
354659
354658
  const is500 = errorCode !== void 0 && errorCode >= 500 && errorCode < 600;
354660
354659
  if (classifiedError instanceof RetryableQuotaError || is500) {
354661
354660
  if (attempt >= maxAttempts) {
354661
+ const errorMessage = classifiedError instanceof Error ? classifiedError.message : "";
354662
+ debugLogger.warn(`Attempt ${attempt} failed${errorMessage ? `: ${errorMessage}` : ""}. Max attempts reached`);
354662
354663
  if (onPersistent429) {
354663
354664
  try {
354664
354665
  const fallbackModel = await onPersistent429(authType, classifiedError);
@@ -354673,8 +354674,8 @@ async function retryWithBackoff(fn, options2) {
354673
354674
  }
354674
354675
  throw classifiedError instanceof RetryableQuotaError ? classifiedError : error2;
354675
354676
  }
354676
- if (classifiedError instanceof RetryableQuotaError) {
354677
- console.warn(`Attempt ${attempt} failed: ${classifiedError.message}. Retrying after ${classifiedError.retryDelayMs}ms...`);
354677
+ if (classifiedError instanceof RetryableQuotaError && classifiedError.retryDelayMs !== void 0) {
354678
+ debugLogger.warn(`Attempt ${attempt} failed: ${classifiedError.message}. Retrying after ${classifiedError.retryDelayMs}ms...`);
354678
354679
  await delay2(classifiedError.retryDelayMs, signal);
354679
354680
  continue;
354680
354681
  } else {
@@ -369383,6 +369384,7 @@ function partListUnionToString(value) {
369383
369384
  // packages/core/dist/src/utils/tokenCalculation.js
369384
369385
  var ASCII_TOKENS_PER_CHAR = 0.25;
369385
369386
  var NON_ASCII_TOKENS_PER_CHAR = 1.3;
369387
+ var IMAGE_TOKEN_ESTIMATE = 3e3;
369386
369388
  function estimateTokenCountSync(parts2) {
369387
369389
  let totalTokens = 0;
369388
369390
  for (const part of parts2) {
@@ -369395,7 +369397,14 @@ function estimateTokenCountSync(parts2) {
369395
369397
  }
369396
369398
  }
369397
369399
  } else {
369398
- totalTokens += JSON.stringify(part).length / 4;
369400
+ const inlineData = "inlineData" in part ? part.inlineData : void 0;
369401
+ const fileData = "fileData" in part ? part.fileData : void 0;
369402
+ const mimeType = inlineData?.mimeType || fileData?.mimeType;
369403
+ if (mimeType?.startsWith("image/")) {
369404
+ totalTokens += IMAGE_TOKEN_ESTIMATE;
369405
+ } else {
369406
+ totalTokens += JSON.stringify(part).length / 4;
369407
+ }
369399
369408
  }
369400
369409
  }
369401
369410
  return Math.floor(totalTokens);
@@ -369413,7 +369422,8 @@ async function calculateRequestTokenCount(request3, contentGenerator, model) {
369413
369422
  contents: [{ role: "user", parts: parts2 }]
369414
369423
  });
369415
369424
  return response.totalTokens ?? 0;
369416
- } catch {
369425
+ } catch (error2) {
369426
+ debugLogger.debug("countTokens API failed:", error2);
369417
369427
  return estimateTokenCountSync(parts2);
369418
369428
  }
369419
369429
  }
@@ -371732,7 +371742,7 @@ var GeminiClient = class {
371732
371742
  if (this.currentSequenceModel) {
371733
371743
  return this.currentSequenceModel;
371734
371744
  }
371735
- return this.config.getActiveModel();
371745
+ return resolveModel(this.config.getActiveModel());
371736
371746
  }
371737
371747
  async *sendMessageStream(request3, signal, prompt_id, turns = MAX_TURNS, isInvalidStreamRetry = false) {
371738
371748
  if (!isInvalidStreamRetry) {
@@ -390428,6 +390438,11 @@ if (import.meta.url.startsWith("file:") && isMainModule && process.env["NODE_ENV
390428
390438
  * Copyright 2025 Google LLC
390429
390439
  * SPDX-License-Identifier: Apache-2.0
390430
390440
  */
390441
+ /**
390442
+ * @license
390443
+ * Copyright 2026 Google LLC
390444
+ * SPDX-License-Identifier: Apache-2.0
390445
+ */
390431
390446
  /*! Bundled license information:
390432
390447
 
390433
390448
  safe-buffer/index.js: