@coderule/mcp 1.6.3 → 1.7.0

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.
package/dist/cli.cjs CHANGED
@@ -1058,6 +1058,11 @@ async function walkDirectory(current, opts, stats) {
1058
1058
  stats.skipped += 1;
1059
1059
  continue;
1060
1060
  }
1061
+ if (stat.size === 0) {
1062
+ stats.skipped += 1;
1063
+ dirLogger.debug({ relPath }, "Skipping zero-length file");
1064
+ continue;
1065
+ }
1061
1066
  const target = dirent.isSymbolicLink() ? await readSymlinkTarget(absPath, dirLogger) : null;
1062
1067
  const state = opts.filesRepo.upsertFromStat({
1063
1068
  relPath,
@@ -1591,6 +1596,13 @@ var ServiceRunner = class {
1591
1596
  this.runtime.logger.debug({ relPath }, "Watcher event ignored by rules");
1592
1597
  return;
1593
1598
  }
1599
+ if (fileStats.size === 0) {
1600
+ this.runtime.logger.debug(
1601
+ { relPath },
1602
+ "Watcher skipping zero-length file"
1603
+ );
1604
+ return;
1605
+ }
1594
1606
  const isSymlink = fileStats.isSymbolicLink();
1595
1607
  const target = isSymlink ? await readSymlinkTarget2(absPath) : null;
1596
1608
  const state = this.runtime.filesRepo.upsertFromStat({