@google/gemini-cli-a2a-server 0.35.0-preview.1 → 0.35.0-preview.3

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.
@@ -49228,7 +49228,7 @@ var require_filesubjecttokensupplier = __commonJS({
49228
49228
  });
49229
49229
  var realpath3 = (0, util_1.promisify)((_b = fs70.realpath) !== null && _b !== void 0 ? _b : () => {
49230
49230
  });
49231
- var lstat4 = (0, util_1.promisify)((_c = fs70.lstat) !== null && _c !== void 0 ? _c : () => {
49231
+ var lstat3 = (0, util_1.promisify)((_c = fs70.lstat) !== null && _c !== void 0 ? _c : () => {
49232
49232
  });
49233
49233
  var FileSubjectTokenSupplier = class {
49234
49234
  /**
@@ -49251,7 +49251,7 @@ var require_filesubjecttokensupplier = __commonJS({
49251
49251
  let parsedFilePath = this.filePath;
49252
49252
  try {
49253
49253
  parsedFilePath = await realpath3(parsedFilePath);
49254
- if (!(await lstat4(parsedFilePath)).isFile()) {
49254
+ if (!(await lstat3(parsedFilePath)).isFile()) {
49255
49255
  throw new Error();
49256
49256
  }
49257
49257
  } catch (err2) {
@@ -72835,7 +72835,7 @@ var require_filesubjecttokensupplier2 = __commonJS({
72835
72835
  }));
72836
72836
  var realpath3 = (0, util_1.promisify)(fs70.realpath ?? (() => {
72837
72837
  }));
72838
- var lstat4 = (0, util_1.promisify)(fs70.lstat ?? (() => {
72838
+ var lstat3 = (0, util_1.promisify)(fs70.lstat ?? (() => {
72839
72839
  }));
72840
72840
  var FileSubjectTokenSupplier = class {
72841
72841
  filePath;
@@ -72861,7 +72861,7 @@ var require_filesubjecttokensupplier2 = __commonJS({
72861
72861
  let parsedFilePath = this.filePath;
72862
72862
  try {
72863
72863
  parsedFilePath = await realpath3(parsedFilePath);
72864
- if (!(await lstat4(parsedFilePath)).isFile()) {
72864
+ if (!(await lstat3(parsedFilePath)).isFile()) {
72865
72865
  throw new Error();
72866
72866
  }
72867
72867
  } catch (err2) {
@@ -198865,8 +198865,8 @@ var GIT_COMMIT_INFO, CLI_VERSION;
198865
198865
  var init_git_commit = __esm({
198866
198866
  "packages/core/dist/src/generated/git-commit.js"() {
198867
198867
  "use strict";
198868
- GIT_COMMIT_INFO = "2f90b4653";
198869
- CLI_VERSION = "0.35.0-preview.1";
198868
+ GIT_COMMIT_INFO = "d1de82c46";
198869
+ CLI_VERSION = "0.35.0-preview.3";
198870
198870
  }
198871
198871
  });
198872
198872
 
@@ -275856,11 +275856,7 @@ function normalizeCommandName(raw) {
275856
275856
  return raw.slice(1, -1);
275857
275857
  }
275858
275858
  }
275859
- const trimmed2 = raw.trim();
275860
- if (!trimmed2) {
275861
- return trimmed2;
275862
- }
275863
- return trimmed2.split(/[\\/]/).pop() ?? trimmed2;
275859
+ return raw.trim();
275864
275860
  }
275865
275861
  function extractNameFromNode(node) {
275866
275862
  switch (node.type) {
@@ -328390,7 +328386,7 @@ function getVersion() {
328390
328386
  }
328391
328387
  versionPromise = (async () => {
328392
328388
  const pkgJson = await getPackageJson(__dirname3);
328393
- return "0.35.0-preview.1";
328389
+ return "0.35.0-preview.3";
328394
328390
  })();
328395
328391
  return versionPromise;
328396
328392
  }
@@ -388341,10 +388337,8 @@ async function findProjectRoot2(startDir) {
388341
388337
  while (true) {
388342
388338
  const gitPath = path61.join(currentDir, ".git");
388343
388339
  try {
388344
- const stats = await fs49.lstat(gitPath);
388345
- if (stats.isDirectory()) {
388346
- return currentDir;
388347
- }
388340
+ await fs49.access(gitPath);
388341
+ return currentDir;
388348
388342
  } catch (error2) {
388349
388343
  const isENOENT = typeof error2 === "object" && error2 !== null && "code" in error2 && // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
388350
388344
  error2.code === "ENOENT";
@@ -388352,9 +388346,9 @@ async function findProjectRoot2(startDir) {
388352
388346
  if (!isENOENT && !isTestEnv) {
388353
388347
  if (typeof error2 === "object" && error2 !== null && "code" in error2) {
388354
388348
  const fsError = error2;
388355
- logger6.warn(`Error checking for .git directory at ${gitPath}: ${fsError.message}`);
388349
+ logger6.warn(`Error checking for .git at ${gitPath}: ${fsError.message}`);
388356
388350
  } else {
388357
- logger6.warn(`Non-standard error checking for .git directory at ${gitPath}: ${String(error2)}`);
388351
+ logger6.warn(`Non-standard error checking for .git at ${gitPath}: ${String(error2)}`);
388358
388352
  }
388359
388353
  }
388360
388354
  }
@@ -388524,8 +388518,10 @@ async function getEnvironmentMemoryPaths(trustedRoots) {
388524
388518
  const allPaths = /* @__PURE__ */ new Set();
388525
388519
  const traversalPromises = trustedRoots.map(async (root) => {
388526
388520
  const resolvedRoot = normalizePath(root);
388527
- debugLogger.debug("[DEBUG] [MemoryDiscovery] Loading environment memory for trusted root:", resolvedRoot, "(Stopping exactly here)");
388528
- return findUpwardGeminiFiles(resolvedRoot, resolvedRoot);
388521
+ const gitRoot = await findProjectRoot2(resolvedRoot);
388522
+ const ceiling = gitRoot ? normalizePath(gitRoot) : resolvedRoot;
388523
+ debugLogger.debug("[DEBUG] [MemoryDiscovery] Loading environment memory for trusted root:", resolvedRoot, "(Stopping at", gitRoot ? `git root: ${ceiling})` : `trusted root: ${ceiling} \u2014 no git root found)`);
388524
+ return findUpwardGeminiFiles(resolvedRoot, ceiling);
388529
388525
  });
388530
388526
  const pathArrays = await Promise.all(traversalPromises);
388531
388527
  pathArrays.flat().forEach((p2) => allPaths.add(p2));
@@ -388644,7 +388640,9 @@ async function loadJitSubdirectoryMemory(targetPath, trustedRoots, alreadyLoaded
388644
388640
  debugLogger.debug("[DEBUG] [MemoryDiscovery] JIT memory skipped:", resolvedTarget, "is not in any trusted root.");
388645
388641
  return { files: [], fileIdentities: [] };
388646
388642
  }
388647
- debugLogger.debug("[DEBUG] [MemoryDiscovery] Loading JIT memory for", resolvedTarget, `(Trusted root: ${bestRoot})`);
388643
+ const gitRoot = await findProjectRoot2(bestRoot);
388644
+ const resolvedCeiling = gitRoot ? normalizePath(gitRoot) : bestRoot;
388645
+ debugLogger.debug("[DEBUG] [MemoryDiscovery] Loading JIT memory for", resolvedTarget, `(Trusted root: ${bestRoot}, Ceiling: ${resolvedCeiling}${gitRoot ? " [git root]" : " [trusted root, no git]"})`);
388648
388646
  let startDir = resolvedTarget;
388649
388647
  try {
388650
388648
  const stat5 = await fs49.stat(resolvedTarget);
@@ -388654,7 +388652,7 @@ async function loadJitSubdirectoryMemory(targetPath, trustedRoots, alreadyLoaded
388654
388652
  } catch {
388655
388653
  startDir = normalizePath(path61.dirname(resolvedTarget));
388656
388654
  }
388657
- const potentialPaths = await findUpwardGeminiFiles(startDir, bestRoot);
388655
+ const potentialPaths = await findUpwardGeminiFiles(startDir, resolvedCeiling);
388658
388656
  if (potentialPaths.length === 0) {
388659
388657
  return { files: [], fileIdentities: [] };
388660
388658
  }