@botbotgo/agent-harness 0.0.263 → 0.0.265

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.
@@ -1 +1 @@
1
- export declare const AGENT_HARNESS_VERSION = "0.0.262";
1
+ export declare const AGENT_HARNESS_VERSION = "0.0.264";
@@ -1 +1 @@
1
- export const AGENT_HARNESS_VERSION = "0.0.262";
1
+ export const AGENT_HARNESS_VERSION = "0.0.264";
@@ -1,6 +1,6 @@
1
1
  import path from "node:path";
2
2
  import { existsSync, statSync } from "node:fs";
3
- import { readdir, readFile } from "node:fs/promises";
3
+ import { readdir, readFile, stat } from "node:fs/promises";
4
4
  import { fileURLToPath, pathToFileURL } from "node:url";
5
5
  import { resolveIsolatedResourceModulePath } from "../resource/isolation.js";
6
6
  import { isExternalSourceLocator, resolveResourcePackageRoot } from "../resource/sources.js";
@@ -644,14 +644,15 @@ async function readYamlItemsIgnoringNodeModules(root) {
644
644
  const entries = await readdir(current, { withFileTypes: true });
645
645
  for (const entry of entries.sort((left, right) => left.name.localeCompare(right.name))) {
646
646
  const entryPath = path.join(current, entry.name);
647
- if (entry.isDirectory()) {
647
+ const entryType = await resolveScanEntryType(entryPath, entry);
648
+ if (entryType === "directory") {
648
649
  if (shouldSkipScanDirectory(entry.name)) {
649
650
  continue;
650
651
  }
651
652
  pending.push(entryPath);
652
653
  continue;
653
654
  }
654
- if (!entry.isFile() || (!entry.name.endsWith(".yaml") && !entry.name.endsWith(".yml"))) {
655
+ if (entryType !== "file" || (!entry.name.endsWith(".yaml") && !entry.name.endsWith(".yml"))) {
655
656
  continue;
656
657
  }
657
658
  records.push(...(await readNamedYamlItems(current, [entry.name])));
@@ -795,14 +796,15 @@ export async function readToolModuleItems(root) {
795
796
  const entries = await readdir(current, { withFileTypes: true });
796
797
  for (const entry of entries.sort((left, right) => left.name.localeCompare(right.name))) {
797
798
  const entryPath = path.join(current, entry.name);
798
- if (entry.isDirectory()) {
799
+ const entryType = await resolveScanEntryType(entryPath, entry);
800
+ if (entryType === "directory") {
799
801
  if (shouldSkipScanDirectory(entry.name)) {
800
802
  continue;
801
803
  }
802
804
  pending.push(entryPath);
803
805
  continue;
804
806
  }
805
- if (entry.isFile() && isSupportedToolModulePath(entry.name)) {
807
+ if (entryType === "file" && isSupportedToolModulePath(entry.name)) {
806
808
  files.push(entryPath);
807
809
  }
808
810
  }
@@ -837,6 +839,29 @@ export async function readToolModuleItems(root) {
837
839
  }
838
840
  return records;
839
841
  }
842
+ async function resolveScanEntryType(entryPath, entry) {
843
+ if (entry.isDirectory()) {
844
+ return "directory";
845
+ }
846
+ if (entry.isFile()) {
847
+ return "file";
848
+ }
849
+ if (entry.isSymbolicLink?.()) {
850
+ try {
851
+ const resolved = await stat(entryPath);
852
+ if (resolved.isDirectory()) {
853
+ return "directory";
854
+ }
855
+ if (resolved.isFile()) {
856
+ return "file";
857
+ }
858
+ }
859
+ catch {
860
+ return "other";
861
+ }
862
+ }
863
+ return "other";
864
+ }
840
865
  function inferExecutionMode(item, current) {
841
866
  return resolveExecutionBackend(item, current);
842
867
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botbotgo/agent-harness",
3
- "version": "0.0.263",
3
+ "version": "0.0.265",
4
4
  "description": "Workspace runtime for multi-agent applications",
5
5
  "license": "MIT",
6
6
  "type": "module",