@fieldwangai/agentflow 0.1.63 → 0.1.64

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.
@@ -2233,15 +2233,17 @@ function workspacePublishNodeOutputFile(runPackage, relPath) {
2233
2233
  if (!fs.existsSync(src) || !fs.statSync(src).isFile()) {
2234
2234
  throw new Error(`Agent returned resultFile but did not create it under node outputs: ${clean}`);
2235
2235
  }
2236
- const destRel = clean.slice("outputs/".length);
2237
- const dest = path.resolve(workspaceOutputsDir, destRel);
2236
+ const nodePart = workspaceSanitizeTmpSegment(runPackage?.nodeId || "node", "node");
2237
+ const destRel = clean.slice("outputs/".length).replace(/^\/+/, "");
2238
+ const publishedRel = path.posix.join("outputs", nodePart, ...destRel.split("/").filter(Boolean));
2239
+ const dest = path.resolve(workspaceOutputsDir, nodePart, ...destRel.split("/").filter(Boolean));
2238
2240
  const workspaceOutputsWithSep = workspaceOutputsDir.endsWith(path.sep) ? workspaceOutputsDir : `${workspaceOutputsDir}${path.sep}`;
2239
2241
  if (dest !== workspaceOutputsDir && !dest.startsWith(workspaceOutputsWithSep)) {
2240
2242
  throw new Error(`Invalid workspace output path: ${clean}`);
2241
2243
  }
2242
2244
  fs.mkdirSync(path.dirname(dest), { recursive: true });
2243
2245
  fs.copyFileSync(src, dest);
2244
- return clean;
2246
+ return publishedRel;
2245
2247
  }
2246
2248
 
2247
2249
  function workspacePublishAgentOutputFiles(structured, runPackage) {