@faapi/faapi 6.1.0 → 6.2.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/index.js CHANGED
@@ -6229,17 +6229,17 @@ async function scanTools(rootDir, patterns) {
6229
6229
  import fg4 from "fast-glob";
6230
6230
  import path23 from "path";
6231
6231
  import fs20 from "fs";
6232
- var DEFAULT_AGENT_PATTERNS = ["src/agents/*/handler.ts"];
6232
+ var DEFAULT_AGENT_PATTERNS = ["src/agents/**/handler.ts"];
6233
6233
  var RUN_EXPORT_RE = /export\s+(?:async\s+)?(?:function\s+|const\s+)run\b/;
6234
6234
  function extractAgentNameFromPath(filePath) {
6235
6235
  const normalized = filePath.replace(/\\/g, "/");
6236
- const match = normalized.match(/(?:^|\/)agents\/([^/]+)\/handler\.ts$/);
6236
+ const match = normalized.match(/(?:^|\/)agents\/(.+)\/handler\.ts$/);
6237
6237
  if (!match) {
6238
6238
  throw new Error(
6239
6239
  `Not an agent path: "${filePath}". Expected pattern: src/agents/<name>/handler.ts`
6240
6240
  );
6241
6241
  }
6242
- return match[1];
6242
+ return match[1].replace(/\//g, ".");
6243
6243
  }
6244
6244
  function detectAgentExports(source) {
6245
6245
  return {