@annals/agent-mesh 0.17.5 → 0.17.6

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.
Files changed (2) hide show
  1. package/dist/index.js +19 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1666,8 +1666,18 @@ var SKIP_DIRS = /* @__PURE__ */ new Set([
1666
1666
  ]);
1667
1667
  async function collectRealFiles(dir, maxFiles = Infinity) {
1668
1668
  const files = [];
1669
+ const visited = /* @__PURE__ */ new Set();
1669
1670
  const walk = async (d) => {
1670
1671
  if (files.length >= maxFiles) return;
1672
+ let realDir;
1673
+ try {
1674
+ const { realpath } = await import("fs/promises");
1675
+ realDir = await realpath(d);
1676
+ } catch {
1677
+ return;
1678
+ }
1679
+ if (visited.has(realDir)) return;
1680
+ visited.add(realDir);
1671
1681
  let entries;
1672
1682
  try {
1673
1683
  entries = await readdir(d, { withFileTypes: true });
@@ -1676,11 +1686,19 @@ async function collectRealFiles(dir, maxFiles = Infinity) {
1676
1686
  }
1677
1687
  for (const entry of entries) {
1678
1688
  if (files.length >= maxFiles) return;
1679
- if (entry.isSymbolicLink()) continue;
1680
1689
  const fullPath = join5(d, entry.name);
1681
1690
  if (entry.isDirectory()) {
1682
1691
  if (SKIP_DIRS.has(entry.name)) continue;
1683
1692
  await walk(fullPath);
1693
+ } else if (entry.isSymbolicLink()) {
1694
+ try {
1695
+ const s = await stat(fullPath);
1696
+ if (s.isDirectory()) {
1697
+ if (SKIP_DIRS.has(entry.name)) continue;
1698
+ await walk(fullPath);
1699
+ }
1700
+ } catch {
1701
+ }
1684
1702
  } else if (entry.isFile()) {
1685
1703
  files.push(fullPath);
1686
1704
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@annals/agent-mesh",
3
- "version": "0.17.5",
3
+ "version": "0.17.6",
4
4
  "description": "CLI bridge connecting local AI agents to the Agents.Hot platform",
5
5
  "type": "module",
6
6
  "bin": {