@google/gemini-cli-a2a-server 0.28.0 → 0.28.2

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.
@@ -327178,6 +327178,10 @@ function resolveClassifierModel(requestedModel, modelAlias, previewFeaturesEnabl
327178
327178
  function isPreviewModel(model) {
327179
327179
  return model === PREVIEW_GEMINI_MODEL || model === PREVIEW_GEMINI_FLASH_MODEL || model === PREVIEW_GEMINI_MODEL_AUTO;
327180
327180
  }
327181
+ function isGemini3Model(model, previewFeaturesEnabled = false) {
327182
+ const resolved = resolveModel(model, previewFeaturesEnabled);
327183
+ return /^gemini-3(\.|-|$)/.test(resolved);
327184
+ }
327181
327185
  function isGemini2Model(model) {
327182
327186
  return /^gemini-2(\.|$)/.test(model);
327183
327187
  }
@@ -327592,7 +327596,7 @@ var __filename = fileURLToPath5(import.meta.url);
327592
327596
  var __dirname3 = path20.dirname(__filename);
327593
327597
  async function getVersion() {
327594
327598
  const pkgJson = await getPackageJson(__dirname3);
327595
- return "0.28.0";
327599
+ return "0.28.2";
327596
327600
  }
327597
327601
 
327598
327602
  // packages/core/dist/src/code_assist/experiments/client_metadata.js
@@ -331016,8 +331020,8 @@ var Float64Vector = import_vector.default.Float64Vector;
331016
331020
  var PointerVector = import_vector.default.PointerVector;
331017
331021
 
331018
331022
  // packages/core/dist/src/generated/git-commit.js
331019
- var GIT_COMMIT_INFO = "b7bd9ec18";
331020
- var CLI_VERSION = "0.28.0";
331023
+ var GIT_COMMIT_INFO = "da5e47ae3";
331024
+ var CLI_VERSION = "0.28.2";
331021
331025
 
331022
331026
  // packages/core/dist/src/ide/detect-ide.js
331023
331027
  var IDE_DEFINITIONS = {
@@ -374871,10 +374875,7 @@ var NEVER_ALLOWED_ENVIRONMENT_VARIABLES = /* @__PURE__ */ new Set([
374871
374875
  "DATABASE_URL",
374872
374876
  "GOOGLE_CLOUD_PROJECT",
374873
374877
  "GOOGLE_CLOUD_ACCOUNT",
374874
- "FIREBASE_PROJECT_ID",
374875
- "GEMINI_API_KEY",
374876
- "GOOGLE_API_KEY",
374877
- "GOOGLE_APPLICATION_CREDENTIALS"
374878
+ "FIREBASE_PROJECT_ID"
374878
374879
  ]);
374879
374880
  var NEVER_ALLOWED_NAME_PATTERNS = [
374880
374881
  /TOKEN/i,
@@ -392571,7 +392572,8 @@ var ClassifierStrategy = class {
392571
392572
  async route(context2, config3, baseLlmClient) {
392572
392573
  const startTime = Date.now();
392573
392574
  try {
392574
- if (await config3.getNumericalRoutingEnabled()) {
392575
+ const model = context2.requestedModel ?? config3.getModel();
392576
+ if (await config3.getNumericalRoutingEnabled() && isGemini3Model(model, config3.getPreviewFeatures())) {
392575
392577
  return null;
392576
392578
  }
392577
392579
  const promptId = getPromptIdWithFallback("classifier-router");
@@ -392589,7 +392591,7 @@ var ClassifierStrategy = class {
392589
392591
  const routerResponse = ClassifierResponseSchema.parse(jsonResponse);
392590
392592
  const reasoning = routerResponse.reasoning;
392591
392593
  const latencyMs = Date.now() - startTime;
392592
- const selectedModel = resolveClassifierModel(context2.requestedModel ?? config3.getModel(), routerResponse.model_choice, config3.getPreviewFeatures());
392594
+ const selectedModel = resolveClassifierModel(model, routerResponse.model_choice, config3.getPreviewFeatures());
392593
392595
  return {
392594
392596
  model: selectedModel,
392595
392597
  metadata: {
@@ -392693,9 +392695,13 @@ var NumericalClassifierStrategy = class {
392693
392695
  async route(context2, config3, baseLlmClient) {
392694
392696
  const startTime = Date.now();
392695
392697
  try {
392698
+ const model = context2.requestedModel ?? config3.getModel();
392696
392699
  if (!await config3.getNumericalRoutingEnabled()) {
392697
392700
  return null;
392698
392701
  }
392702
+ if (!isGemini3Model(model, config3.getPreviewFeatures())) {
392703
+ return null;
392704
+ }
392699
392705
  const promptId = getPromptIdWithFallback("classifier-router");
392700
392706
  const finalHistory = context2.history.slice(-HISTORY_TURNS_FOR_CONTEXT2);
392701
392707
  const requestParts = Array.isArray(context2.request) ? context2.request : [context2.request];
@@ -392719,7 +392725,7 @@ var NumericalClassifierStrategy = class {
392719
392725
  const routerResponse = ClassifierResponseSchema2.parse(jsonResponse);
392720
392726
  const score = routerResponse.complexity_score;
392721
392727
  const { threshold, groupLabel, modelAlias } = await this.getRoutingDecision(score, config3, config3.getSessionId() || "unknown-session");
392722
- const selectedModel = resolveClassifierModel(config3.getModel(), modelAlias, config3.getPreviewFeatures());
392728
+ const selectedModel = resolveClassifierModel(model, modelAlias, config3.getPreviewFeatures());
392723
392729
  const latencyMs = Date.now() - startTime;
392724
392730
  return {
392725
392731
  model: selectedModel,
@@ -405404,18 +405410,11 @@ async function createTransport(mcpServerName, mcpServerConfig, debugMode, saniti
405404
405410
  let transport = new StdioClientTransport({
405405
405411
  command: mcpServerConfig.command,
405406
405412
  args: mcpServerConfig.args || [],
405407
- env: sanitizeEnvironment({
405408
- ...process.env,
405409
- ...getExtensionEnvironment(mcpServerConfig.extension),
405413
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
405414
+ env: {
405415
+ ...sanitizeEnvironment(process.env, sanitizationConfig),
405410
405416
  ...mcpServerConfig.env || {}
405411
- }, {
405412
- ...sanitizationConfig,
405413
- allowedEnvironmentVariables: [
405414
- ...sanitizationConfig.allowedEnvironmentVariables ?? [],
405415
- ...mcpServerConfig.extension?.resolvedSettings?.map((s3) => s3.envVar) ?? []
405416
- ],
405417
- enableEnvironmentVariableRedaction: true
405418
- }),
405417
+ },
405419
405418
  cwd: mcpServerConfig.cwd,
405420
405419
  stderr: "pipe"
405421
405420
  });
@@ -405449,17 +405448,6 @@ function isEnabled(funcDecl, mcpServerName, mcpServerConfig) {
405449
405448
  }
405450
405449
  return !includeTools || includeTools.some((tool) => tool === funcDecl.name || tool.startsWith(`${funcDecl.name}(`));
405451
405450
  }
405452
- function getExtensionEnvironment(extension) {
405453
- const env2 = {};
405454
- if (extension?.resolvedSettings) {
405455
- for (const setting of extension.resolvedSettings) {
405456
- if (setting.value) {
405457
- env2[setting.envVar] = setting.value;
405458
- }
405459
- }
405460
- }
405461
- return env2;
405462
- }
405463
405451
 
405464
405452
  // packages/core/dist/src/tools/mcp-client-manager.js
405465
405453
  init_events();