@google/gemini-cli-a2a-server 0.33.0-preview.7 → 0.33.0-preview.9

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.
@@ -106758,7 +106758,12 @@ function resolveToRealPath(pathStr) {
106758
106758
  }
106759
106759
  return robustRealpath(path11.resolve(resolvedPath));
106760
106760
  }
106761
- function robustRealpath(p) {
106761
+ function robustRealpath(p, visited = /* @__PURE__ */ new Set()) {
106762
+ const key = process.platform === "win32" ? p.toLowerCase() : p;
106763
+ if (visited.has(key)) {
106764
+ throw new Error(`Infinite recursion detected in robustRealpath: ${p}`);
106765
+ }
106766
+ visited.add(key);
106762
106767
  try {
106763
106768
  return fs20.realpathSync(p);
106764
106769
  } catch (e3) {
@@ -106768,14 +106773,17 @@ function robustRealpath(p) {
106768
106773
  if (stat4.isSymbolicLink()) {
106769
106774
  const target = fs20.readlinkSync(p);
106770
106775
  const resolvedTarget = path11.resolve(path11.dirname(p), target);
106771
- return robustRealpath(resolvedTarget);
106776
+ return robustRealpath(resolvedTarget, visited);
106777
+ }
106778
+ } catch (lstatError) {
106779
+ if (!(lstatError && typeof lstatError === "object" && "code" in lstatError && lstatError.code === "ENOENT")) {
106780
+ throw lstatError;
106772
106781
  }
106773
- } catch {
106774
106782
  }
106775
106783
  const parent = path11.dirname(p);
106776
106784
  if (parent === p)
106777
106785
  return p;
106778
- return path11.join(robustRealpath(parent), path11.basename(p));
106786
+ return path11.join(robustRealpath(parent, visited), path11.basename(p));
106779
106787
  }
106780
106788
  throw e3;
106781
106789
  }
@@ -134447,7 +134455,8 @@ var init_billing = __esm({
134447
134455
  G1_CREDIT_TYPE = "GOOGLE_ONE_AI";
134448
134456
  OVERAGE_ELIGIBLE_MODELS = /* @__PURE__ */ new Set([
134449
134457
  PREVIEW_GEMINI_MODEL,
134450
- PREVIEW_GEMINI_3_1_MODEL
134458
+ PREVIEW_GEMINI_3_1_MODEL,
134459
+ PREVIEW_GEMINI_FLASH_MODEL
134451
134460
  ]);
134452
134461
  MIN_CREDIT_BALANCE = 50;
134453
134462
  }
@@ -214228,8 +214237,8 @@ var GIT_COMMIT_INFO, CLI_VERSION;
214228
214237
  var init_git_commit = __esm({
214229
214238
  "packages/core/dist/src/generated/git-commit.js"() {
214230
214239
  "use strict";
214231
- GIT_COMMIT_INFO = "5d2983f12";
214232
- CLI_VERSION = "0.33.0-preview.7";
214240
+ GIT_COMMIT_INFO = "5e80faf38";
214241
+ CLI_VERSION = "0.33.0-preview.9";
214233
214242
  }
214234
214243
  });
214235
214244
 
@@ -291487,7 +291496,7 @@ function getVersion() {
291487
291496
  }
291488
291497
  versionPromise = (async () => {
291489
291498
  const pkgJson = await getPackageJson(__dirname3);
291490
- return "0.33.0-preview.7";
291499
+ return "0.33.0-preview.9";
291491
291500
  })();
291492
291501
  return versionPromise;
291493
291502
  }
@@ -291566,6 +291575,7 @@ var init_server = __esm({
291566
291575
  init_types8();
291567
291576
  init_billing();
291568
291577
  init_loggers();
291578
+ init_events();
291569
291579
  init_billingEvents();
291570
291580
  init_converter();
291571
291581
  init_telemetry2();
@@ -291596,6 +291606,10 @@ var init_server = __esm({
291596
291606
  const autoUse = this.config ? shouldAutoUseCredits(this.config.getBillingSettings().overageStrategy, getG1CreditBalance(this.paidTier)) : false;
291597
291607
  const modelIsEligible = isOverageEligibleModel(req.model);
291598
291608
  const shouldEnableCredits = modelIsEligible && autoUse;
291609
+ if (shouldEnableCredits && !this.config?.getCreditsNotificationShown()) {
291610
+ this.config?.setCreditsNotificationShown(true);
291611
+ coreEvents.emitFeedback("info", "Using AI Credits for this request.");
291612
+ }
291599
291613
  const enabledCreditTypes = shouldEnableCredits ? [G1_CREDIT_TYPE] : void 0;
291600
291614
  const responses = await this.requestStreamingPost("streamGenerateContent", toGenerateContentRequest(req, userPromptId, this.projectId, this.sessionId, enabledCreditTypes), req.config?.abortSignal);
291601
291615
  const streamingLatency = {};
@@ -418988,6 +419002,7 @@ var init_config4 = __esm({
418988
419002
  fallbackModelHandler;
418989
419003
  validationHandler;
418990
419004
  quotaErrorOccurred = false;
419005
+ creditsNotificationShown = false;
418991
419006
  modelQuotas = /* @__PURE__ */ new Map();
418992
419007
  lastRetrievedQuota;
418993
419008
  lastQuotaFetchTime = 0;
@@ -419520,6 +419535,11 @@ var init_config4 = __esm({
419520
419535
  resetTurn() {
419521
419536
  this.modelAvailabilityService.resetTurn();
419522
419537
  }
419538
+ /** Resets billing state (overageStrategy, creditsNotificationShown) once per user prompt. */
419539
+ resetBillingTurnState(overageStrategy) {
419540
+ this.creditsNotificationShown = false;
419541
+ this.billing.overageStrategy = overageStrategy ?? "ask";
419542
+ }
419523
419543
  getMaxSessionTurns() {
419524
419544
  return this.maxSessionTurns;
419525
419545
  }
@@ -419529,6 +419549,12 @@ var init_config4 = __esm({
419529
419549
  getQuotaErrorOccurred() {
419530
419550
  return this.quotaErrorOccurred;
419531
419551
  }
419552
+ setCreditsNotificationShown(value) {
419553
+ this.creditsNotificationShown = value;
419554
+ }
419555
+ getCreditsNotificationShown() {
419556
+ return this.creditsNotificationShown;
419557
+ }
419532
419558
  setQuota(remaining, limit, modelId) {
419533
419559
  const activeModel = modelId ?? this.getActiveModel();
419534
419560
  if (remaining !== void 0 && limit !== void 0) {