@google/gemini-cli-a2a-server 0.13.0-nightly.20251031.c89bc30d → 0.13.0-nightly.20251102.d7243fb8

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.
@@ -286672,8 +286672,9 @@ var DeclarativeTool = class {
286672
286672
  isOutputMarkdown;
286673
286673
  canUpdateOutput;
286674
286674
  messageBus;
286675
+ extensionName;
286675
286676
  extensionId;
286676
- constructor(name4, displayName, description, kind, parameterSchema, isOutputMarkdown = true, canUpdateOutput = false, messageBus, extensionId) {
286677
+ constructor(name4, displayName, description, kind, parameterSchema, isOutputMarkdown = true, canUpdateOutput = false, messageBus, extensionName, extensionId) {
286677
286678
  this.name = name4;
286678
286679
  this.displayName = displayName;
286679
286680
  this.description = description;
@@ -286682,6 +286683,7 @@ var DeclarativeTool = class {
286682
286683
  this.isOutputMarkdown = isOutputMarkdown;
286683
286684
  this.canUpdateOutput = canUpdateOutput;
286684
286685
  this.messageBus = messageBus;
286686
+ this.extensionName = extensionName;
286685
286687
  this.extensionId = extensionId;
286686
286688
  }
286687
286689
  get schema() {
@@ -286988,8 +286990,9 @@ var DiscoveredMCPTool = class _DiscoveredMCPTool extends BaseDeclarativeTool {
286988
286990
  parameterSchema;
286989
286991
  trust;
286990
286992
  cliConfig;
286993
+ extensionName;
286991
286994
  extensionId;
286992
- constructor(mcpTool, serverName, serverToolName, description, parameterSchema, trust, nameOverride, cliConfig, extensionId, messageBus) {
286995
+ constructor(mcpTool, serverName, serverToolName, description, parameterSchema, trust, nameOverride, cliConfig, extensionName, extensionId, messageBus) {
286993
286996
  super(
286994
286997
  nameOverride ?? generateValidName(serverToolName),
286995
286998
  `${serverToolName} (${serverName} MCP Server)`,
@@ -287001,6 +287004,7 @@ var DiscoveredMCPTool = class _DiscoveredMCPTool extends BaseDeclarativeTool {
287001
287004
  false,
287002
287005
  // canUpdateOutput,
287003
287006
  messageBus,
287007
+ extensionName,
287004
287008
  extensionId
287005
287009
  );
287006
287010
  this.mcpTool = mcpTool;
@@ -287009,10 +287013,11 @@ var DiscoveredMCPTool = class _DiscoveredMCPTool extends BaseDeclarativeTool {
287009
287013
  this.parameterSchema = parameterSchema;
287010
287014
  this.trust = trust;
287011
287015
  this.cliConfig = cliConfig;
287016
+ this.extensionName = extensionName;
287012
287017
  this.extensionId = extensionId;
287013
287018
  }
287014
287019
  asFullyQualifiedTool() {
287015
- return new _DiscoveredMCPTool(this.mcpTool, this.serverName, this.serverToolName, this.description, this.parameterSchema, this.trust, `${this.serverName}__${this.serverToolName}`, this.cliConfig, this.extensionId, this.messageBus);
287020
+ return new _DiscoveredMCPTool(this.mcpTool, this.serverName, this.serverToolName, this.description, this.parameterSchema, this.trust, `${this.serverName}__${this.serverToolName}`, this.cliConfig, this.extensionName, this.extensionId, this.messageBus);
287016
287021
  }
287017
287022
  createInvocation(params, _messageBus, _toolName, _displayName) {
287018
287023
  return new DiscoveredMCPToolInvocation(this.mcpTool, this.serverName, this.serverToolName, this.displayName, this.trust, params, this.cliConfig, _messageBus);
@@ -287184,7 +287189,7 @@ var InstallationManager = class {
287184
287189
  }
287185
287190
  return installationId;
287186
287191
  } catch (error) {
287187
- console.error("Error accessing installation ID file, generating ephemeral ID:", error);
287192
+ debugLogger.warn("Error accessing installation ID file, generating ephemeral ID:", error);
287188
287193
  return "123456789";
287189
287194
  }
287190
287195
  }
@@ -287235,6 +287240,7 @@ var REGRESSION_DETECTION = "gemini_cli.performance.regression";
287235
287240
  var REGRESSION_PERCENTAGE_CHANGE = "gemini_cli.performance.regression.percentage_change";
287236
287241
  var BASELINE_COMPARISON = "gemini_cli.performance.baseline.comparison";
287237
287242
  var FLICKER_FRAME_COUNT = "gemini_cli.ui.flicker.count";
287243
+ var SLOW_RENDER_LATENCY = "gemini_cli.ui.slow_render.latency";
287238
287244
  var EXIT_FAIL_COUNT = "gemini_cli.exit.fail.count";
287239
287245
  var baseMetricDefinition = {
287240
287246
  getCommonAttributes
@@ -287360,6 +287366,13 @@ var HISTOGRAM_DEFINITIONS = {
287360
287366
  assign: (h2) => agentDurationHistogram = h2,
287361
287367
  attributes: {}
287362
287368
  },
287369
+ [SLOW_RENDER_LATENCY]: {
287370
+ description: "Counts UI frames that take too long to render.",
287371
+ unit: "ms",
287372
+ valueType: ValueType.INT,
287373
+ assign: (h2) => slowRenderHistogram = h2,
287374
+ attributes: {}
287375
+ },
287363
287376
  [AGENT_TURNS]: {
287364
287377
  description: "Number of turns taken by agents.",
287365
287378
  unit: "turns",
@@ -287533,6 +287546,7 @@ var agentDurationHistogram;
287533
287546
  var agentTurnsHistogram;
287534
287547
  var flickerFrameCounter;
287535
287548
  var exitFailCounter;
287549
+ var slowRenderHistogram;
287536
287550
  var genAiClientTokenUsageHistogram;
287537
287551
  var genAiClientOperationDurationHistogram;
287538
287552
  var startupTimeHistogram;
@@ -288040,6 +288054,7 @@ var ToolCallEvent = class {
288040
288054
  tool_type;
288041
288055
  content_length;
288042
288056
  mcp_server_name;
288057
+ extension_name;
288043
288058
  extension_id;
288044
288059
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
288045
288060
  metadata;
@@ -288059,6 +288074,7 @@ var ToolCallEvent = class {
288059
288074
  if (typeof call.tool !== "undefined" && call.tool instanceof DiscoveredMCPTool) {
288060
288075
  this.tool_type = "mcp";
288061
288076
  this.mcp_server_name = call.tool.serverName;
288077
+ this.extension_name = call.tool.extensionName;
288062
288078
  this.extension_id = call.tool.extensionId;
288063
288079
  } else {
288064
288080
  this.tool_type = "native";
@@ -288102,6 +288118,7 @@ var ToolCallEvent = class {
288102
288118
  tool_type: this.tool_type,
288103
288119
  content_length: this.content_length,
288104
288120
  mcp_server_name: this.mcp_server_name,
288121
+ extension_name: this.extension_name,
288105
288122
  extension_id: this.extension_id,
288106
288123
  metadata: this.metadata
288107
288124
  };
@@ -288987,8 +289004,8 @@ var Float64Vector = import_vector.default.Float64Vector;
288987
289004
  var PointerVector = import_vector.default.PointerVector;
288988
289005
 
288989
289006
  // packages/core/dist/src/generated/git-commit.js
288990
- var GIT_COMMIT_INFO = "c89bc30d";
288991
- var CLI_VERSION = "0.13.0-nightly.20251031.c89bc30d";
289007
+ var GIT_COMMIT_INFO = "d7243fb8";
289008
+ var CLI_VERSION = "0.13.0-nightly.20251102.d7243fb8";
288992
289009
 
288993
289010
  // packages/core/dist/src/ide/detect-ide.js
288994
289011
  var IDE_DEFINITIONS = {
@@ -290171,7 +290188,6 @@ var GcpLogExporter = class {
290171
290188
  }
290172
290189
  }
290173
290190
  }, {
290174
- session_id: log.attributes?.["session.id"],
290175
290191
  ...log.attributes,
290176
290192
  ...log.resource?.attributes,
290177
290193
  message: log.body
@@ -291749,7 +291765,7 @@ async function createContentGenerator(config2, gcConfig, sessionId2) {
291749
291765
  if (gcConfig.fakeResponses) {
291750
291766
  return FakeContentGenerator.fromFile(gcConfig.fakeResponses);
291751
291767
  }
291752
- const version3 = "0.13.0-nightly.20251031.c89bc30d";
291768
+ const version3 = "0.13.0-nightly.20251102.d7243fb8";
291753
291769
  const userAgent = `GeminiCLI/${version3} (${process.platform}; ${process.arch})`;
291754
291770
  const baseHeaders = {
291755
291771
  "User-Agent": userAgent
@@ -299283,6 +299299,7 @@ var OAuthUtils = class {
299283
299299
  };
299284
299300
 
299285
299301
  // packages/core/dist/src/mcp/google-auth-provider.js
299302
+ init_events();
299286
299303
  var ALLOWED_HOSTS = [/^.+\.googleapis\.com$/, /^(.*\.)?luci\.app$/];
299287
299304
  var GoogleCredentialProvider = class {
299288
299305
  config;
@@ -299332,7 +299349,7 @@ var GoogleCredentialProvider = class {
299332
299349
  const client = await this.auth.getClient();
299333
299350
  const accessTokenResponse = await client.getAccessToken();
299334
299351
  if (!accessTokenResponse.token) {
299335
- console.error("Failed to get access token from Google ADC");
299352
+ coreEvents.emitFeedback("error", "Failed to get access token from Google ADC");
299336
299353
  return void 0;
299337
299354
  }
299338
299355
  const newToken = {
@@ -299708,6 +299725,7 @@ var MCPOAuthTokenStorage = class {
299708
299725
  };
299709
299726
 
299710
299727
  // packages/core/dist/src/mcp/oauth-provider.js
299728
+ init_events();
299711
299729
  var OAUTH_DISPLAY_MESSAGE_EVENT = "oauth-display-message";
299712
299730
  var REDIRECT_PORT = 7777;
299713
299731
  var REDIRECT_PATH = "/oauth/callback";
@@ -300172,10 +300190,10 @@ ${authUrl}
300172
300190
  const tokenFingerprint = crypto18.createHash("sha256").update(savedToken.token.accessToken).digest("hex").slice(0, 8);
300173
300191
  debugLogger.debug(`\u2713 Token verification successful (fingerprint: ${tokenFingerprint})`);
300174
300192
  } else {
300175
- console.error("Token verification failed: token not found or invalid after save");
300193
+ debugLogger.warn("Token verification failed: token not found or invalid after save");
300176
300194
  }
300177
300195
  } catch (saveError) {
300178
- console.error(`Failed to save token: ${getErrorMessage(saveError)}`);
300196
+ debugLogger.error("Failed to save auth token.", saveError);
300179
300197
  throw saveError;
300180
300198
  }
300181
300199
  return token2;
@@ -300216,7 +300234,7 @@ ${authUrl}
300216
300234
  await this.tokenStorage.saveToken(serverName, newToken, config2.clientId, credentials.tokenUrl, credentials.mcpServerUrl);
300217
300235
  return newToken.accessToken;
300218
300236
  } catch (error) {
300219
- console.error(`Failed to refresh token: ${getErrorMessage(error)}`);
300237
+ coreEvents.emitFeedback("error", "Failed to refresh auth token.", error);
300220
300238
  await this.tokenStorage.deleteCredentials(serverName);
300221
300239
  }
300222
300240
  }
@@ -300487,7 +300505,7 @@ async function discoverTools(mcpServerName, mcpServerConfig, mcpClient, cliConfi
300487
300505
  if (!isEnabled(funcDecl, mcpServerName, mcpServerConfig)) {
300488
300506
  continue;
300489
300507
  }
300490
- const tool2 = new DiscoveredMCPTool(mcpCallableTool, mcpServerName, funcDecl.name, funcDecl.description ?? "", funcDecl.parametersJsonSchema ?? { type: "object", properties: {} }, mcpServerConfig.trust, void 0, cliConfig, mcpServerConfig.extension?.id, messageBus);
300508
+ const tool2 = new DiscoveredMCPTool(mcpCallableTool, mcpServerName, funcDecl.name, funcDecl.description ?? "", funcDecl.parametersJsonSchema ?? { type: "object", properties: {} }, mcpServerConfig.trust, void 0, cliConfig, mcpServerConfig.extension?.name, mcpServerConfig.extension?.id, messageBus);
300491
300509
  if (cliConfig.getDebugMode?.() && cliConfig.getEnableMessageBusIntegration?.()) {
300492
300510
  debugLogger.log(`[DEBUG] Discovered MCP tool '${funcDecl.name}' from server '${mcpServerName}' with messageBus: ${messageBus ? "YES" : "NO"}`);
300493
300511
  }
@@ -300998,7 +301016,7 @@ var McpClientManager = class {
300998
301016
  try {
300999
301017
  await client.disconnect();
301000
301018
  } catch (error) {
301001
- console.error(`Error stopping client '${name4}': ${getErrorMessage(error)}`);
301019
+ coreEvents.emitFeedback("error", `Error stopping client '${name4}':`, error);
301002
301020
  }
301003
301021
  });
301004
301022
  await Promise.all(disconnectionPromises);
@@ -325365,12 +325383,12 @@ function deleteTempFiles(oldPath, newPath) {
325365
325383
  try {
325366
325384
  fs37.unlinkSync(oldPath);
325367
325385
  } catch {
325368
- console.error(`Error deleting temp diff file: ${oldPath}`);
325386
+ debugLogger.error(`Error deleting temp diff file: ${oldPath}`);
325369
325387
  }
325370
325388
  try {
325371
325389
  fs37.unlinkSync(newPath);
325372
325390
  } catch {
325373
- console.error(`Error deleting temp diff file: ${newPath}`);
325391
+ debugLogger.error(`Error deleting temp diff file: ${newPath}`);
325374
325392
  }
325375
325393
  }
325376
325394
  async function modifyWithEditor(originalParams, modifyContext, editorType, _abortSignal, onEditorClose) {
@@ -325656,8 +325674,7 @@ function classifyGoogleError(error) {
325656
325674
  for (const violation of quotaFailure.violations) {
325657
325675
  const quotaId = violation.quotaId ?? "";
325658
325676
  if (quotaId.includes("PerDay") || quotaId.includes("Daily")) {
325659
- return new TerminalQuotaError(`${googleApiError.message}
325660
- Expected quota reset within 24h.`, googleApiError);
325677
+ return new TerminalQuotaError(`You have exhausted your daily quota on this model.`, googleApiError);
325661
325678
  }
325662
325679
  }
325663
325680
  }
@@ -325686,8 +325703,7 @@ Expected quota reset within 24h.`, googleApiError);
325686
325703
  }
325687
325704
  const quotaLimit = errorInfo.metadata?.["quota_limit"] ?? "";
325688
325705
  if (quotaLimit.includes("PerDay") || quotaLimit.includes("Daily")) {
325689
- return new TerminalQuotaError(`${googleApiError.message}
325690
- Expected quota reset within 24h.`, googleApiError);
325706
+ return new TerminalQuotaError(`You have exhausted your daily quota on this model.`, googleApiError);
325691
325707
  }
325692
325708
  }
325693
325709
  if (retryInfo?.retryDelay) {
@@ -341015,7 +341031,10 @@ var LoopDetectionService = class {
341015
341031
  * @returns true if a loop is detected, false otherwise
341016
341032
  */
341017
341033
  addAndCheck(event) {
341018
- if (this.loopDetected || this.disabledForSession) {
341034
+ if (this.disabledForSession) {
341035
+ return false;
341036
+ }
341037
+ if (this.loopDetected) {
341019
341038
  return this.loopDetected;
341020
341039
  }
341021
341040
  switch (event.type) {
@@ -341830,11 +341849,17 @@ var import_ignore3 = __toESM(require_ignore(), 1);
341830
341849
  import * as fs48 from "node:fs";
341831
341850
  import * as path50 from "node:path";
341832
341851
  var GitIgnoreParser = class {
341852
+ extraPatterns;
341833
341853
  projectRoot;
341834
341854
  cache = /* @__PURE__ */ new Map();
341835
341855
  globalPatterns;
341836
- constructor(projectRoot) {
341856
+ processedExtraPatterns = [];
341857
+ constructor(projectRoot, extraPatterns) {
341858
+ this.extraPatterns = extraPatterns;
341837
341859
  this.projectRoot = path50.resolve(projectRoot);
341860
+ if (this.extraPatterns) {
341861
+ this.processedExtraPatterns = this.processPatterns(this.extraPatterns, ".");
341862
+ }
341838
341863
  }
341839
341864
  loadPatternsForFile(patternsFilePath) {
341840
341865
  let content;
@@ -341845,7 +341870,11 @@ var GitIgnoreParser = class {
341845
341870
  }
341846
341871
  const isExcludeFile = patternsFilePath.endsWith(path50.join(".git", "info", "exclude"));
341847
341872
  const relativeBaseDir = isExcludeFile ? "." : path50.dirname(path50.relative(this.projectRoot, patternsFilePath)).split(path50.sep).join(path50.posix.sep);
341848
- return content.split("\n").map((p) => p.trimStart()).filter((p) => p !== "" && !p.startsWith("#")).map((p) => {
341873
+ const rawPatterns = content.split("\n");
341874
+ return this.processPatterns(rawPatterns, relativeBaseDir);
341875
+ }
341876
+ processPatterns(rawPatterns, relativeBaseDir) {
341877
+ return rawPatterns.map((p) => p.trimStart()).filter((p) => p !== "" && !p.startsWith("#")).map((p) => {
341849
341878
  const isNegative = p.startsWith("!");
341850
341879
  if (isNegative) {
341851
341880
  p = p.substring(1);
@@ -341912,7 +341941,8 @@ var GitIgnoreParser = class {
341912
341941
  const relativeDir = path50.relative(this.projectRoot, dir);
341913
341942
  if (relativeDir) {
341914
341943
  const normalizedRelativeDir = relativeDir.replace(/\\/g, "/");
341915
- if (ig.ignores(normalizedRelativeDir)) {
341944
+ const igPlusExtras = (0, import_ignore3.default)().add(ig).add(this.processedExtraPatterns);
341945
+ if (igPlusExtras.ignores(normalizedRelativeDir)) {
341916
341946
  break;
341917
341947
  }
341918
341948
  }
@@ -341932,6 +341962,9 @@ var GitIgnoreParser = class {
341932
341962
  }
341933
341963
  }
341934
341964
  }
341965
+ if (this.processedExtraPatterns.length > 0) {
341966
+ ig.add(this.processedExtraPatterns);
341967
+ }
341935
341968
  return ig.ignores(normalizedPath);
341936
341969
  } catch (_error) {
341937
341970
  return false;
@@ -341993,6 +342026,7 @@ import * as path52 from "node:path";
341993
342026
  var FileDiscoveryService = class {
341994
342027
  gitIgnoreFilter = null;
341995
342028
  geminiIgnoreFilter = null;
342029
+ combinedIgnoreFilter = null;
341996
342030
  projectRoot;
341997
342031
  constructor(projectRoot) {
341998
342032
  this.projectRoot = path52.resolve(projectRoot);
@@ -342000,6 +342034,10 @@ var FileDiscoveryService = class {
342000
342034
  this.gitIgnoreFilter = new GitIgnoreParser(this.projectRoot);
342001
342035
  }
342002
342036
  this.geminiIgnoreFilter = new GeminiIgnoreParser(this.projectRoot);
342037
+ if (this.gitIgnoreFilter) {
342038
+ const geminiPatterns = this.geminiIgnoreFilter.getPatterns();
342039
+ this.combinedIgnoreFilter = new GitIgnoreParser(this.projectRoot, geminiPatterns);
342040
+ }
342003
342041
  }
342004
342042
  /**
342005
342043
  * Filters a list of file paths based on git ignore rules
@@ -342007,6 +342045,9 @@ var FileDiscoveryService = class {
342007
342045
  filterFiles(filePaths, options2 = {}) {
342008
342046
  const { respectGitIgnore = true, respectGeminiIgnore = true } = options2;
342009
342047
  return filePaths.filter((filePath) => {
342048
+ if (respectGitIgnore && respectGeminiIgnore && this.combinedIgnoreFilter) {
342049
+ return !this.combinedIgnoreFilter.isIgnored(filePath);
342050
+ }
342010
342051
  if (respectGitIgnore && this.gitIgnoreFilter?.isIgnored(filePath)) {
342011
342052
  return false;
342012
342053
  }
@@ -349843,8 +349884,6 @@ var Config = class {
349843
349884
  if (this.model === DEFAULT_GEMINI_MODEL_AUTO) {
349844
349885
  this.model = DEFAULT_GEMINI_MODEL;
349845
349886
  }
349846
- } else if (this.useModelRouter && this.model === DEFAULT_GEMINI_MODEL) {
349847
- this.model = DEFAULT_GEMINI_MODEL_AUTO;
349848
349887
  }
349849
349888
  if (this.contentGeneratorConfig?.authType === AuthType2.USE_GEMINI && authMethod === AuthType2.LOGIN_WITH_GOOGLE) {
349850
349889
  this.geminiClient.stripThoughtsFromHistory();