@contextstream/mcp-server 0.4.71 → 0.4.74

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.
@@ -705,6 +705,7 @@ async function readFilesFromDirectory(rootPath, options = {}) {
705
705
  } catch {
706
706
  return;
707
707
  }
708
+ entries.sort((a, b) => a.name.localeCompare(b.name));
708
709
  for (const entry of entries) {
709
710
  if (files.length >= maxFiles) break;
710
711
  const fullPath = path2.join(dir, entry.name);
@@ -764,6 +765,7 @@ async function* readAllFilesInBatches(rootPath, options = {}) {
764
765
  } catch {
765
766
  return;
766
767
  }
768
+ entries.sort((a, b) => a.name.localeCompare(b.name));
767
769
  for (const entry of entries) {
768
770
  const fullPath = path2.join(dir, entry.name);
769
771
  const relPath = path2.join(relativePath, entry.name);
@@ -850,6 +852,7 @@ async function* readChangedFilesInBatches(rootPath, sinceTimestamp, options = {}
850
852
  } catch {
851
853
  return;
852
854
  }
855
+ entries.sort((a, b) => a.name.localeCompare(b.name));
853
856
  for (const entry of entries) {
854
857
  const fullPath = path2.join(dir, entry.name);
855
858
  const relPath = path2.join(relativePath, entry.name);
@@ -940,6 +943,7 @@ async function countIndexableFiles(rootPath, options = {}) {
940
943
  } catch {
941
944
  return;
942
945
  }
946
+ entries.sort((a, b) => a.name.localeCompare(b.name));
943
947
  for (const entry of entries) {
944
948
  if (count >= maxFiles) {
945
949
  stopped = true;