@google/gemini-cli-a2a-server 0.17.0-nightly.20251114.0fcbff506 → 0.17.0-nightly.20251117.cf8de02c6

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.
@@ -292578,9 +292578,9 @@ async function initOauthClient(authType, config2) {
292578
292578
  debugLogger.debug(`Cached credentials are not valid:`, getErrorMessage(error));
292579
292579
  }
292580
292580
  }
292581
- if (authType === AuthType2.CLOUD_SHELL) {
292581
+ if (authType === AuthType2.COMPUTE_ADC) {
292582
292582
  try {
292583
- debugLogger.log("Attempting to authenticate via Cloud Shell VM's ADC.");
292583
+ debugLogger.log("Attempting to authenticate via metadata server application default credentials.");
292584
292584
  const computeClient = new import_google_auth_library8.Compute({
292585
292585
  // We can leave this empty, since the metadata server will provide
292586
292586
  // the service account email.
@@ -292589,7 +292589,7 @@ async function initOauthClient(authType, config2) {
292589
292589
  debugLogger.log("Authentication successful.");
292590
292590
  return computeClient;
292591
292591
  } catch (e2) {
292592
- throw new Error(`Could not authenticate using Cloud Shell credentials. Please select a different authentication method or ensure you are in a properly configured environment. Error: ${getErrorMessage(e2)}`);
292592
+ throw new Error(`Could not authenticate using metadata server application default credentials. Please select a different authentication method or ensure you are in a properly configured environment. Error: ${getErrorMessage(e2)}`);
292593
292593
  }
292594
292594
  }
292595
292595
  if (config2.isBrowserLaunchSuppressed()) {
@@ -294507,21 +294507,15 @@ function recordLinesChanged(config2, lines, changeType, attributes) {
294507
294507
  ...attributes ?? {}
294508
294508
  });
294509
294509
  }
294510
- function recordContentRetry(config2, errorType) {
294510
+ function recordContentRetry(config2) {
294511
294511
  if (!contentRetryCounter || !isMetricsInitialized)
294512
294512
  return;
294513
- contentRetryCounter.add(1, {
294514
- ...baseMetricDefinition.getCommonAttributes(config2),
294515
- error_type: errorType
294516
- });
294513
+ contentRetryCounter.add(1, baseMetricDefinition.getCommonAttributes(config2));
294517
294514
  }
294518
- function recordContentRetryFailure(config2, errorType) {
294515
+ function recordContentRetryFailure(config2) {
294519
294516
  if (!contentRetryFailureCounter || !isMetricsInitialized)
294520
294517
  return;
294521
- contentRetryFailureCounter.add(1, {
294522
- ...baseMetricDefinition.getCommonAttributes(config2),
294523
- error_type: errorType
294524
- });
294518
+ contentRetryFailureCounter.add(1, baseMetricDefinition.getCommonAttributes(config2));
294525
294519
  }
294526
294520
  function recordModelRoutingMetrics(config2, event) {
294527
294521
  if (!modelRoutingLatencyHistogram || !modelRoutingFailureCounter || !isMetricsInitialized)
@@ -294603,7 +294597,7 @@ function getConventionAttributes(event) {
294603
294597
  function getGenAiProvider(authType) {
294604
294598
  switch (authType) {
294605
294599
  case AuthType2.USE_VERTEX_AI:
294606
- case AuthType2.CLOUD_SHELL:
294600
+ case AuthType2.COMPUTE_ADC:
294607
294601
  case AuthType2.LOGIN_WITH_GOOGLE:
294608
294602
  return GenAiProviderName.GCP_VERTEX_AI;
294609
294603
  case AuthType2.USE_GEMINI:
@@ -295944,8 +295938,8 @@ var Float64Vector = import_vector.default.Float64Vector;
295944
295938
  var PointerVector = import_vector.default.PointerVector;
295945
295939
 
295946
295940
  // packages/core/dist/src/generated/git-commit.js
295947
- var GIT_COMMIT_INFO = "0fcbff506";
295948
- var CLI_VERSION = "0.17.0-nightly.20251114.0fcbff506";
295941
+ var GIT_COMMIT_INFO = "cf8de02c6";
295942
+ var CLI_VERSION = "0.17.0-nightly.20251117.cf8de02c6";
295949
295943
 
295950
295944
  // packages/core/dist/src/ide/detect-ide.js
295951
295945
  var IDE_DEFINITIONS = {
@@ -298343,7 +298337,7 @@ function logContentRetry(config2, event) {
298343
298337
  attributes: event.toOpenTelemetryAttributes(config2)
298344
298338
  };
298345
298339
  logger6.emit(logRecord);
298346
- recordContentRetry(config2, event.error_type);
298340
+ recordContentRetry(config2);
298347
298341
  }
298348
298342
  function logContentRetryFailure(config2, event) {
298349
298343
  ClearcutLogger.getInstance(config2)?.logContentRetryFailureEvent(event);
@@ -298355,7 +298349,7 @@ function logContentRetryFailure(config2, event) {
298355
298349
  attributes: event.toOpenTelemetryAttributes(config2)
298356
298350
  };
298357
298351
  logger6.emit(logRecord);
298358
- recordContentRetryFailure(config2, event.final_error_type);
298352
+ recordContentRetryFailure(config2);
298359
298353
  }
298360
298354
  function logModelRouting(config2, event) {
298361
298355
  ClearcutLogger.getInstance(config2)?.logModelRoutingEvent(event);
@@ -298603,7 +298597,7 @@ var LoggingContentGenerator = class {
298603
298597
 
298604
298598
  // packages/core/dist/src/code_assist/codeAssist.js
298605
298599
  async function createCodeAssistContentGenerator(httpOptions, authType, config2, sessionId2) {
298606
- if (authType === AuthType2.LOGIN_WITH_GOOGLE || authType === AuthType2.CLOUD_SHELL) {
298600
+ if (authType === AuthType2.LOGIN_WITH_GOOGLE || authType === AuthType2.COMPUTE_ADC) {
298607
298601
  const authClient = await getOauthClient(authType, config2);
298608
298602
  const userData = await setupUser(authClient);
298609
298603
  return new CodeAssistServer(authClient, userData.projectId, httpOptions, sessionId2, userData.userTier);
@@ -298759,7 +298753,8 @@ var AuthType2;
298759
298753
  AuthType3["LOGIN_WITH_GOOGLE"] = "oauth-personal";
298760
298754
  AuthType3["USE_GEMINI"] = "gemini-api-key";
298761
298755
  AuthType3["USE_VERTEX_AI"] = "vertex-ai";
298762
- AuthType3["CLOUD_SHELL"] = "cloud-shell";
298756
+ AuthType3["LEGACY_CLOUD_SHELL"] = "cloud-shell";
298757
+ AuthType3["COMPUTE_ADC"] = "compute-default-credentials";
298763
298758
  })(AuthType2 || (AuthType2 = {}));
298764
298759
  async function createContentGeneratorConfig(config2, authType) {
298765
298760
  const geminiApiKey = await loadApiKey() || process.env["GEMINI_API_KEY"] || void 0;
@@ -298770,7 +298765,7 @@ async function createContentGeneratorConfig(config2, authType) {
298770
298765
  authType,
298771
298766
  proxy: config2?.getProxy()
298772
298767
  };
298773
- if (authType === AuthType2.LOGIN_WITH_GOOGLE || authType === AuthType2.CLOUD_SHELL) {
298768
+ if (authType === AuthType2.LOGIN_WITH_GOOGLE || authType === AuthType2.COMPUTE_ADC) {
298774
298769
  return contentGeneratorConfig;
298775
298770
  }
298776
298771
  if (authType === AuthType2.USE_GEMINI && geminiApiKey) {
@@ -298790,12 +298785,12 @@ async function createContentGenerator(config2, gcConfig, sessionId2) {
298790
298785
  if (gcConfig.fakeResponses) {
298791
298786
  return FakeContentGenerator.fromFile(gcConfig.fakeResponses);
298792
298787
  }
298793
- const version3 = "0.17.0-nightly.20251114.0fcbff506";
298788
+ const version3 = "0.17.0-nightly.20251117.cf8de02c6";
298794
298789
  const userAgent = `GeminiCLI/${version3} (${process.platform}; ${process.arch})`;
298795
298790
  const baseHeaders = {
298796
298791
  "User-Agent": userAgent
298797
298792
  };
298798
- if (config2.authType === AuthType2.LOGIN_WITH_GOOGLE || config2.authType === AuthType2.CLOUD_SHELL) {
298793
+ if (config2.authType === AuthType2.LOGIN_WITH_GOOGLE || config2.authType === AuthType2.COMPUTE_ADC) {
298799
298794
  const httpOptions = { headers: baseHeaders };
298800
298795
  return new LoggingContentGenerator(await createCodeAssistContentGenerator(httpOptions, config2.authType, gcConfig, sessionId2), gcConfig);
298801
298796
  }
@@ -344706,6 +344701,7 @@ var GeminiEventType;
344706
344701
  GeminiEventType2["Retry"] = "retry";
344707
344702
  GeminiEventType2["ContextWindowWillOverflow"] = "context_window_will_overflow";
344708
344703
  GeminiEventType2["InvalidStream"] = "invalid_stream";
344704
+ GeminiEventType2["ModelInfo"] = "model_info";
344709
344705
  })(GeminiEventType || (GeminiEventType = {}));
344710
344706
  var CompressionStatus;
344711
344707
  (function(CompressionStatus2) {
@@ -345911,7 +345907,7 @@ var LoopDetectionService = class {
345911
345907
  };
345912
345908
 
345913
345909
  // packages/core/dist/src/services/chatCompressionService.js
345914
- var DEFAULT_COMPRESSION_TOKEN_THRESHOLD = 0.2;
345910
+ var DEFAULT_COMPRESSION_TOKEN_THRESHOLD = 0.7;
345915
345911
  var COMPRESSION_PRESERVE_THRESHOLD = 0.3;
345916
345912
  function findCompressSplitPoint(contents, fraction) {
345917
345913
  if (fraction <= 0 || fraction >= 1) {
@@ -346362,6 +346358,7 @@ var GeminiClient = class {
346362
346358
  const decision = await router.route(routingContext);
346363
346359
  modelToUse = decision.model;
346364
346360
  this.currentSequenceModel = modelToUse;
346361
+ yield { type: GeminiEventType.ModelInfo, value: modelToUse };
346365
346362
  }
346366
346363
  const resultStream = turn.run(modelToUse, request3, linkedSignal);
346367
346364
  for await (const event of resultStream) {
@@ -354864,7 +354861,7 @@ async function getClientMetadata() {
354864
354861
  clientMetadataPromise = (async () => ({
354865
354862
  ideName: "IDE_UNSPECIFIED",
354866
354863
  pluginType: "GEMINI",
354867
- ideVersion: "0.17.0-nightly.20251114.0fcbff506",
354864
+ ideVersion: "0.17.0-nightly.20251117.cf8de02c6",
354868
354865
  platform: getPlatform(),
354869
354866
  updateChannel: await getReleaseChannel(__dirname5)
354870
354867
  }))();
@@ -354888,8 +354885,8 @@ async function getExperiments(server) {
354888
354885
  function parseExperiments(response) {
354889
354886
  const flags2 = {};
354890
354887
  for (const flag of response.flags ?? []) {
354891
- if (flag.name) {
354892
- flags2[flag.name] = flag;
354888
+ if (flag.flagId) {
354889
+ flags2[flag.flagId] = flag;
354893
354890
  }
354894
354891
  }
354895
354892
  return {
@@ -354900,8 +354897,8 @@ function parseExperiments(response) {
354900
354897
 
354901
354898
  // packages/core/dist/src/code_assist/experiments/flagNames.js
354902
354899
  var ExperimentFlags = {
354903
- CONTEXT_COMPRESSION_THRESHOLD: "GeminiCLIContextCompression__threshold_fraction",
354904
- USER_CACHING: "GcliUserCaching__user_caching"
354900
+ CONTEXT_COMPRESSION_THRESHOLD: 45740197,
354901
+ USER_CACHING: 45740198
354905
354902
  };
354906
354903
 
354907
354904
  // packages/core/dist/src/utils/memoryDiscovery.js
@@ -360392,6 +360389,7 @@ var Config = class {
360392
360389
  fakeResponses;
360393
360390
  recordResponses;
360394
360391
  disableYoloMode;
360392
+ pendingIncludeDirectories;
360395
360393
  enableHooks;
360396
360394
  hooks;
360397
360395
  experiments;
@@ -360402,7 +360400,9 @@ var Config = class {
360402
360400
  this.fileSystemService = new StandardFileSystemService();
360403
360401
  this.sandbox = params.sandbox;
360404
360402
  this.targetDir = path62.resolve(params.targetDir);
360405
- this.workspaceContext = new WorkspaceContext(this.targetDir, params.includeDirectories ?? []);
360403
+ this.folderTrust = params.folderTrust ?? false;
360404
+ this.workspaceContext = new WorkspaceContext(this.targetDir, []);
360405
+ this.pendingIncludeDirectories = params.includeDirectories ?? [];
360406
360406
  this.debugMode = params.debugMode;
360407
360407
  this.question = params.question;
360408
360408
  this.coreTools = params.coreTools;
@@ -360766,6 +360766,12 @@ var Config = class {
360766
360766
  isYoloModeDisabled() {
360767
360767
  return this.disableYoloMode || !this.isTrustedFolder();
360768
360768
  }
360769
+ getPendingIncludeDirectories() {
360770
+ return this.pendingIncludeDirectories;
360771
+ }
360772
+ clearPendingIncludeDirectories() {
360773
+ this.pendingIncludeDirectories = [];
360774
+ }
360769
360775
  getShowMemoryUsage() {
360770
360776
  return this.showMemoryUsage;
360771
360777
  }
@@ -361121,8 +361127,8 @@ var Config = class {
361121
361127
  */
361122
361128
  setExperiments(experiments) {
361123
361129
  this.experiments = experiments;
361124
- const flagSummaries = Object.entries(experiments.flags ?? {}).sort(([a2], [b]) => a2.localeCompare(b)).map(([name4, flag]) => {
361125
- const summary2 = { name: name4 };
361130
+ const flagSummaries = Object.entries(experiments.flags ?? {}).sort(([a2], [b]) => a2.localeCompare(b)).map(([flagId, flag]) => {
361131
+ const summary2 = { flagId };
361126
361132
  if (flag.boolValue !== void 0) {
361127
361133
  summary2["boolValue"] = flag.boolValue;
361128
361134
  }