moflo 4.8.80-rc.2 → 4.8.80-rc.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "moflo",
|
|
3
|
-
"version": "4.8.80-rc.
|
|
3
|
+
"version": "4.8.80-rc.4",
|
|
4
4
|
"description": "MoFlo — AI agent orchestration for Claude Code. Forked from ruflo/claude-flow with patches applied to source, plus feature-level orchestration.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
"@types/js-yaml": "^4.0.9",
|
|
113
113
|
"@types/node": "^20.19.37",
|
|
114
114
|
"eslint": "^8.0.0",
|
|
115
|
-
"moflo": "^4.8.80-rc.
|
|
115
|
+
"moflo": "^4.8.80-rc.3",
|
|
116
116
|
"tsx": "^4.21.0",
|
|
117
117
|
"typescript": "^5.9.3",
|
|
118
118
|
"vitest": "^4.0.0"
|
|
@@ -22,14 +22,21 @@ const execAsync = promisify(exec);
|
|
|
22
22
|
* Critical for Windows where PATH may not be inherited properly
|
|
23
23
|
*/
|
|
24
24
|
async function runCommand(command, timeoutMs = 5000) {
|
|
25
|
-
const
|
|
25
|
+
const opts = {
|
|
26
26
|
encoding: 'utf8',
|
|
27
27
|
timeout: timeoutMs,
|
|
28
28
|
shell: process.platform === 'win32' ? 'cmd.exe' : '/bin/sh', // Use proper shell per platform
|
|
29
29
|
env: { ...process.env }, // Explicitly inherit full environment
|
|
30
30
|
windowsHide: true, // Hide window on Windows
|
|
31
|
-
}
|
|
32
|
-
|
|
31
|
+
};
|
|
32
|
+
const { stdout } = await execAsync(command, opts);
|
|
33
|
+
const out = stdout.trim();
|
|
34
|
+
// Windows parallel exec occasionally returns empty stdout under shell contention — retry once serially
|
|
35
|
+
if (!out && process.platform === 'win32') {
|
|
36
|
+
const retry = await execAsync(command, opts);
|
|
37
|
+
return retry.stdout.trim();
|
|
38
|
+
}
|
|
39
|
+
return out;
|
|
33
40
|
}
|
|
34
41
|
// Check Node.js version
|
|
35
42
|
async function checkNodeVersion() {
|
|
@@ -228,10 +228,12 @@ function validateSteps(steps, errors, stepIds, outputVars, options, prefix = 'st
|
|
|
228
228
|
* Check that {stepId.outputKey} references point to declared step outputs.
|
|
229
229
|
* Also detects forward references (referencing a step that hasn't executed yet).
|
|
230
230
|
*/
|
|
231
|
-
function validateVariableReferences(steps, outputVars, args, errors, prefix = 'steps') {
|
|
231
|
+
function validateVariableReferences(steps, outputVars, args, errors, prefix = 'steps', parentDeclaredStepIds = []) {
|
|
232
232
|
if (!errors)
|
|
233
233
|
return;
|
|
234
|
-
|
|
234
|
+
// Nested steps can reference parent-scope declarations (e.g. a loop body
|
|
235
|
+
// referencing an output declared before the loop).
|
|
236
|
+
const declaredStepIds = [...parentDeclaredStepIds];
|
|
235
237
|
for (let i = 0; i < steps.length; i++) {
|
|
236
238
|
const step = steps[i];
|
|
237
239
|
const path = `${prefix}[${i}]`;
|
|
@@ -252,7 +254,7 @@ function validateVariableReferences(steps, outputVars, args, errors, prefix = 's
|
|
|
252
254
|
}
|
|
253
255
|
// Recurse into nested steps (condition/loop bodies)
|
|
254
256
|
if (step.steps && Array.isArray(step.steps)) {
|
|
255
|
-
validateVariableReferences(step.steps, outputVars, args, errors, `${path}.steps
|
|
257
|
+
validateVariableReferences(step.steps, outputVars, args, errors, `${path}.steps`, declaredStepIds);
|
|
256
258
|
// Parallel/loop nested step IDs are available to subsequent top-level steps (#247)
|
|
257
259
|
for (const nested of step.steps) {
|
|
258
260
|
if (nested.id)
|