@coderule/mcp 1.6.3 → 1.6.4

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/mcp-cli.js CHANGED
@@ -1046,6 +1046,11 @@ async function walkDirectory(current, opts, stats) {
1046
1046
  stats.skipped += 1;
1047
1047
  continue;
1048
1048
  }
1049
+ if (stat.size === 0) {
1050
+ stats.skipped += 1;
1051
+ dirLogger.debug({ relPath }, "Skipping zero-length file");
1052
+ continue;
1053
+ }
1049
1054
  const target = dirent.isSymbolicLink() ? await readSymlinkTarget(absPath, dirLogger) : null;
1050
1055
  const state = opts.filesRepo.upsertFromStat({
1051
1056
  relPath,
@@ -1564,6 +1569,13 @@ var ServiceRunner = class {
1564
1569
  this.runtime.logger.debug({ relPath }, "Watcher event ignored by rules");
1565
1570
  return;
1566
1571
  }
1572
+ if (fileStats.size === 0) {
1573
+ this.runtime.logger.debug(
1574
+ { relPath },
1575
+ "Watcher skipping zero-length file"
1576
+ );
1577
+ return;
1578
+ }
1567
1579
  const isSymlink = fileStats.isSymbolicLink();
1568
1580
  const target = isSymlink ? await readSymlinkTarget2(absPath) : null;
1569
1581
  const state = this.runtime.filesRepo.upsertFromStat({