@google/gemini-cli-a2a-server 0.15.0-nightly.20251110.c0b766ad → 0.15.0-nightly.20251111.51f952e7

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.
@@ -63543,11 +63543,11 @@ var require_XMLParser = __commonJS({
63543
63543
  // node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js
63544
63544
  var require_orderedJs2Xml = __commonJS({
63545
63545
  "node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js"(exports2, module2) {
63546
- var EOL4 = "\n";
63546
+ var EOL3 = "\n";
63547
63547
  function toXml(jArray, options2) {
63548
63548
  let indentation = "";
63549
63549
  if (options2.format && options2.indentBy.length > 0) {
63550
- indentation = EOL4;
63550
+ indentation = EOL3;
63551
63551
  }
63552
63552
  return arrToStr(jArray, options2, "", indentation);
63553
63553
  }
@@ -65770,10 +65770,10 @@ var require_universalify2 = __commonJS({
65770
65770
  // node_modules/jsonfile/utils.js
65771
65771
  var require_utils8 = __commonJS({
65772
65772
  "node_modules/jsonfile/utils.js"(exports2, module2) {
65773
- function stringify5(obj, { EOL: EOL4 = "\n", finalEOL = true, replacer = null, spaces } = {}) {
65774
- const EOF3 = finalEOL ? EOL4 : "";
65773
+ function stringify5(obj, { EOL: EOL3 = "\n", finalEOL = true, replacer = null, spaces } = {}) {
65774
+ const EOF3 = finalEOL ? EOL3 : "";
65775
65775
  const str = JSON.stringify(obj, replacer, spaces);
65776
- return str.replace(/\n/g, EOL4) + EOF3;
65776
+ return str.replace(/\n/g, EOL3) + EOF3;
65777
65777
  }
65778
65778
  function stripBom(content) {
65779
65779
  if (Buffer.isBuffer(content)) content = content.toString("utf8");
@@ -295896,8 +295896,8 @@ var Float64Vector = import_vector.default.Float64Vector;
295896
295896
  var PointerVector = import_vector.default.PointerVector;
295897
295897
 
295898
295898
  // packages/core/dist/src/generated/git-commit.js
295899
- var GIT_COMMIT_INFO = "c0b766ad";
295900
- var CLI_VERSION = "0.15.0-nightly.20251110.c0b766ad";
295899
+ var GIT_COMMIT_INFO = "51f952e7";
295900
+ var CLI_VERSION = "0.15.0-nightly.20251111.51f952e7";
295901
295901
 
295902
295902
  // packages/core/dist/src/ide/detect-ide.js
295903
295903
  var IDE_DEFINITIONS = {
@@ -296071,7 +296071,8 @@ var ClearcutLogger = class _ClearcutLogger {
296071
296071
  this.events.push([
296072
296072
  {
296073
296073
  event_time_ms: Date.now(),
296074
- source_extension_json: safeJsonStringify(event)
296074
+ source_extension_json: safeJsonStringify(event),
296075
+ gws_experiment: this.config?.getExperiments()?.experimentIds ?? []
296075
296076
  }
296076
296077
  ]);
296077
296078
  if (wasAtCapacity && this.config?.getDebugMode()) {
@@ -298697,7 +298698,7 @@ async function createContentGenerator(config2, gcConfig, sessionId2) {
298697
298698
  if (gcConfig.fakeResponses) {
298698
298699
  return FakeContentGenerator.fromFile(gcConfig.fakeResponses);
298699
298700
  }
298700
- const version3 = "0.15.0-nightly.20251110.c0b766ad";
298701
+ const version3 = "0.15.0-nightly.20251111.51f952e7";
298701
298702
  const userAgent = `GeminiCLI/${version3} (${process.platform}; ${process.arch})`;
298702
298703
  const baseHeaders = {
298703
298704
  "User-Agent": userAgent
@@ -307601,7 +307602,6 @@ var GrepTool = class _GrepTool extends BaseDeclarativeTool {
307601
307602
  // packages/core/dist/src/tools/ripGrep.js
307602
307603
  import fs31 from "node:fs";
307603
307604
  import path33 from "node:path";
307604
- import { EOL as EOL2 } from "node:os";
307605
307605
  import { spawn as spawn4 } from "node:child_process";
307606
307606
 
307607
307607
  // node_modules/@joshua.litt/get-ripgrep/dist/index.js
@@ -320734,46 +320734,37 @@ var GrepToolInvocation2 = class extends BaseToolInvocation {
320734
320734
  };
320735
320735
  }
320736
320736
  }
320737
- parseRipgrepOutput(output, basePath) {
320737
+ parseRipgrepJsonOutput(output, basePath) {
320738
320738
  const results = [];
320739
320739
  if (!output)
320740
320740
  return results;
320741
- const lines = output.split(EOL2);
320741
+ const lines = output.trim().split("\n");
320742
320742
  for (const line of lines) {
320743
320743
  if (!line.trim())
320744
320744
  continue;
320745
- const firstColonIndex = line.indexOf(":");
320746
- if (firstColonIndex === -1)
320747
- continue;
320748
- const secondColonIndex = line.indexOf(":", firstColonIndex + 1);
320749
- if (secondColonIndex === -1)
320750
- continue;
320751
- const filePathRaw = line.substring(0, firstColonIndex);
320752
- const lineNumberStr = line.substring(firstColonIndex + 1, secondColonIndex);
320753
- const lineContent = line.substring(secondColonIndex + 1);
320754
- const lineNumber = parseInt(lineNumberStr, 10);
320755
- if (!isNaN(lineNumber)) {
320756
- const absoluteFilePath = path33.resolve(basePath, filePathRaw);
320757
- const relativeFilePath = path33.relative(basePath, absoluteFilePath);
320758
- results.push({
320759
- filePath: relativeFilePath || path33.basename(absoluteFilePath),
320760
- lineNumber,
320761
- line: lineContent
320762
- });
320745
+ try {
320746
+ const json = JSON.parse(line);
320747
+ if (json.type === "match") {
320748
+ const match2 = json.data;
320749
+ if (match2.path?.text && match2.lines?.text) {
320750
+ const absoluteFilePath = path33.resolve(basePath, match2.path.text);
320751
+ const relativeFilePath = path33.relative(basePath, absoluteFilePath);
320752
+ results.push({
320753
+ filePath: relativeFilePath || path33.basename(absoluteFilePath),
320754
+ lineNumber: match2.line_number,
320755
+ line: match2.lines.text.trimEnd()
320756
+ });
320757
+ }
320758
+ }
320759
+ } catch (error) {
320760
+ debugLogger.warn(`Failed to parse ripgrep JSON line: ${line}`, error);
320763
320761
  }
320764
320762
  }
320765
320763
  return results;
320766
320764
  }
320767
320765
  async performRipgrepSearch(options2) {
320768
320766
  const { pattern, path: absolutePath, include } = options2;
320769
- const rgArgs = [
320770
- "--line-number",
320771
- "--no-heading",
320772
- "--with-filename",
320773
- "--ignore-case",
320774
- "--regexp",
320775
- pattern
320776
- ];
320767
+ const rgArgs = ["--json", "--ignore-case", "--regexp", pattern];
320777
320768
  if (include) {
320778
320769
  rgArgs.push("--glob", include);
320779
320770
  }
@@ -320825,7 +320816,7 @@ var GrepToolInvocation2 = class extends BaseToolInvocation {
320825
320816
  }
320826
320817
  });
320827
320818
  });
320828
- return this.parseRipgrepOutput(output, absolutePath);
320819
+ return this.parseRipgrepJsonOutput(output, absolutePath);
320829
320820
  } catch (error) {
320830
320821
  console.error(`GrepLogic: ripgrep failed: ${getErrorMessage(error)}`);
320831
320822
  throw error;
@@ -329868,19 +329859,27 @@ function isModifiableDeclarativeTool(tool) {
329868
329859
  return "getModifyContext" in tool;
329869
329860
  }
329870
329861
  function createTempFilesForModify(currentContent, proposedContent, file_path) {
329871
- const tempDir = os11.tmpdir();
329872
- const diffDir = path38.join(tempDir, "gemini-cli-tool-modify-diffs");
329873
- if (!fs36.existsSync(diffDir)) {
329874
- fs36.mkdirSync(diffDir, { recursive: true });
329862
+ const diffDir = fs36.mkdtempSync(path38.join(os11.tmpdir(), "gemini-cli-tool-modify-"));
329863
+ try {
329864
+ fs36.chmodSync(diffDir, 448);
329865
+ } catch (e2) {
329866
+ debugLogger.error(`Error setting permissions on temp diff directory: ${diffDir}`, e2);
329867
+ throw e2;
329875
329868
  }
329876
329869
  const ext2 = path38.extname(file_path);
329877
329870
  const fileName = path38.basename(file_path, ext2);
329878
329871
  const timestamp = Date.now();
329879
329872
  const tempOldPath = path38.join(diffDir, `gemini-cli-modify-${fileName}-old-${timestamp}${ext2}`);
329880
329873
  const tempNewPath = path38.join(diffDir, `gemini-cli-modify-${fileName}-new-${timestamp}${ext2}`);
329881
- fs36.writeFileSync(tempOldPath, currentContent, "utf8");
329882
- fs36.writeFileSync(tempNewPath, proposedContent, "utf8");
329883
- return { oldPath: tempOldPath, newPath: tempNewPath };
329874
+ fs36.writeFileSync(tempOldPath, currentContent, {
329875
+ encoding: "utf8",
329876
+ mode: 384
329877
+ });
329878
+ fs36.writeFileSync(tempNewPath, proposedContent, {
329879
+ encoding: "utf8",
329880
+ mode: 384
329881
+ });
329882
+ return { oldPath: tempOldPath, newPath: tempNewPath, dirPath: diffDir };
329884
329883
  }
329885
329884
  function getUpdatedParams(tmpOldPath, tempNewPath, originalParams, modifyContext) {
329886
329885
  let oldContent = "";
@@ -329903,7 +329902,7 @@ function getUpdatedParams(tmpOldPath, tempNewPath, originalParams, modifyContext
329903
329902
  const updatedDiff = createPatch(path38.basename(modifyContext.getFilePath(originalParams)), oldContent, newContent, "Current", "Proposed", DEFAULT_DIFF_OPTIONS);
329904
329903
  return { updatedParams, updatedDiff };
329905
329904
  }
329906
- function deleteTempFiles(oldPath, newPath) {
329905
+ function deleteTempFiles(oldPath, newPath, dirPath) {
329907
329906
  try {
329908
329907
  fs36.unlinkSync(oldPath);
329909
329908
  } catch {
@@ -329914,17 +329913,24 @@ function deleteTempFiles(oldPath, newPath) {
329914
329913
  } catch {
329915
329914
  debugLogger.error(`Error deleting temp diff file: ${newPath}`);
329916
329915
  }
329916
+ try {
329917
+ fs36.rmdirSync(dirPath);
329918
+ } catch {
329919
+ debugLogger.error(`Error deleting temp diff directory: ${dirPath}`);
329920
+ }
329917
329921
  }
329918
- async function modifyWithEditor(originalParams, modifyContext, editorType, _abortSignal, onEditorClose) {
329919
- const currentContent = await modifyContext.getCurrentContent(originalParams);
329920
- const proposedContent = await modifyContext.getProposedContent(originalParams);
329921
- const { oldPath, newPath } = createTempFilesForModify(currentContent, proposedContent, modifyContext.getFilePath(originalParams));
329922
+ async function modifyWithEditor(originalParams, modifyContext, editorType, _abortSignal, onEditorClose, overrides) {
329923
+ const hasCurrentOverride = overrides !== void 0 && "currentContent" in overrides;
329924
+ const hasProposedOverride = overrides !== void 0 && "proposedContent" in overrides;
329925
+ const currentContent = hasCurrentOverride ? overrides.currentContent ?? "" : await modifyContext.getCurrentContent(originalParams);
329926
+ const proposedContent = hasProposedOverride ? overrides.proposedContent ?? "" : await modifyContext.getProposedContent(originalParams);
329927
+ const { oldPath, newPath, dirPath } = createTempFilesForModify(currentContent ?? "", proposedContent ?? "", modifyContext.getFilePath(originalParams));
329922
329928
  try {
329923
329929
  await openDiff(oldPath, newPath, editorType, onEditorClose);
329924
329930
  const result = getUpdatedParams(oldPath, newPath, originalParams, modifyContext);
329925
329931
  return result;
329926
329932
  } finally {
329927
- deleteTempFiles(oldPath, newPath);
329933
+ deleteTempFiles(oldPath, newPath, dirPath);
329928
329934
  }
329929
329935
  }
329930
329936
 
@@ -331319,7 +331325,7 @@ A good instruction should concisely answer:
331319
331325
  // packages/core/dist/src/tools/shell.js
331320
331326
  import fs40 from "node:fs";
331321
331327
  import path42 from "node:path";
331322
- import os16, { EOL as EOL3 } from "node:os";
331328
+ import os16, { EOL as EOL2 } from "node:os";
331323
331329
  import crypto20 from "node:crypto";
331324
331330
 
331325
331331
  // packages/core/dist/src/config/models.js
@@ -337065,7 +337071,7 @@ var ShellToolInvocation = class extends BaseToolInvocation {
337065
337071
  const backgroundPIDs = [];
337066
337072
  if (os16.platform() !== "win32") {
337067
337073
  if (fs40.existsSync(tempFilePath)) {
337068
- const pgrepLines = fs40.readFileSync(tempFilePath, "utf8").split(EOL3).filter(Boolean);
337074
+ const pgrepLines = fs40.readFileSync(tempFilePath, "utf8").split(EOL2).filter(Boolean);
337069
337075
  for (const line of pgrepLines) {
337070
337076
  if (!/^\d+$/.test(line)) {
337071
337077
  debugLogger.error(`pgrep: ${line}`);
@@ -343958,7 +343964,11 @@ var CoreToolScheduler = class _CoreToolScheduler {
343958
343964
  ...waitingToolCall.confirmationDetails,
343959
343965
  isModifying: true
343960
343966
  });
343961
- const { updatedParams, updatedDiff } = await modifyWithEditor(waitingToolCall.request.args, modifyContext, editorType, signal, this.onEditorClose);
343967
+ const contentOverrides = waitingToolCall.confirmationDetails.type === "edit" ? {
343968
+ currentContent: waitingToolCall.confirmationDetails.originalContent,
343969
+ proposedContent: waitingToolCall.confirmationDetails.newContent
343970
+ } : void 0;
343971
+ const { updatedParams, updatedDiff } = await modifyWithEditor(waitingToolCall.request.args, modifyContext, editorType, signal, this.onEditorClose, contentOverrides);
343962
343972
  this.setArgsInternal(callId, updatedParams);
343963
343973
  this.setStatusInternal(callId, "awaiting_approval", signal, {
343964
343974
  ...waitingToolCall.confirmationDetails,
@@ -354956,7 +354966,7 @@ async function getClientMetadata() {
354956
354966
  if (!clientMetadataPromise) {
354957
354967
  clientMetadataPromise = (async () => ({
354958
354968
  ideName: "GEMINI_CLI",
354959
- ideVersion: "0.15.0-nightly.20251110.c0b766ad",
354969
+ ideVersion: "0.15.0-nightly.20251111.51f952e7",
354960
354970
  platform: getPlatform(),
354961
354971
  updateChannel: await getReleaseChannel(__dirname5)
354962
354972
  }))();
@@ -359725,26 +359735,28 @@ async function handleAutomaticOAuth(mcpServerName, mcpServerConfig, wwwAuthentic
359725
359735
  return false;
359726
359736
  }
359727
359737
  }
359738
+ function createTransportRequestInit(mcpServerConfig, headers) {
359739
+ return {
359740
+ headers: {
359741
+ ...mcpServerConfig.headers,
359742
+ ...headers
359743
+ }
359744
+ };
359745
+ }
359728
359746
  async function createTransportWithOAuth(mcpServerName, mcpServerConfig, accessToken) {
359729
359747
  try {
359730
359748
  if (mcpServerConfig.httpUrl) {
359731
359749
  const oauthTransportOptions = {
359732
- requestInit: {
359733
- headers: {
359734
- ...mcpServerConfig.headers,
359735
- Authorization: `Bearer ${accessToken}`
359736
- }
359737
- }
359750
+ requestInit: createTransportRequestInit(mcpServerConfig, {
359751
+ Authorization: `Bearer ${accessToken}`
359752
+ })
359738
359753
  };
359739
359754
  return new StreamableHTTPClientTransport(new URL(mcpServerConfig.httpUrl), oauthTransportOptions);
359740
359755
  } else if (mcpServerConfig.url) {
359741
359756
  return new SSEClientTransport(new URL(mcpServerConfig.url), {
359742
- requestInit: {
359743
- headers: {
359744
- ...mcpServerConfig.headers,
359745
- Authorization: `Bearer ${accessToken}`
359746
- }
359747
- }
359757
+ requestInit: createTransportRequestInit(mcpServerConfig, {
359758
+ Authorization: `Bearer ${accessToken}`
359759
+ })
359748
359760
  });
359749
359761
  }
359750
359762
  return null;
@@ -360050,6 +360062,7 @@ async function createTransport(mcpServerName, mcpServerConfig, debugMode) {
360050
360062
  if (mcpServerConfig.authProviderType === AuthProviderType.SERVICE_ACCOUNT_IMPERSONATION) {
360051
360063
  const provider = new ServiceAccountImpersonationProvider(mcpServerConfig);
360052
360064
  const transportOptions = {
360065
+ requestInit: createTransportRequestInit(mcpServerConfig, {}),
360053
360066
  authProvider: provider
360054
360067
  };
360055
360068
  if (mcpServerConfig.httpUrl) {
@@ -360062,6 +360075,7 @@ async function createTransport(mcpServerName, mcpServerConfig, debugMode) {
360062
360075
  if (mcpServerConfig.authProviderType === AuthProviderType.GOOGLE_CREDENTIALS) {
360063
360076
  const provider = new GoogleCredentialProvider(mcpServerConfig);
360064
360077
  const transportOptions = {
360078
+ requestInit: createTransportRequestInit(mcpServerConfig, {}),
360065
360079
  authProvider: provider
360066
360080
  };
360067
360081
  if (mcpServerConfig.httpUrl) {