moflo 4.8.82 → 4.8.83
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.
|
|
3
|
+
"version": "4.8.83",
|
|
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",
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
"@types/node": "^24.12.2",
|
|
118
118
|
"@xenova/transformers": "^2.17.0",
|
|
119
119
|
"eslint": "^8.0.0",
|
|
120
|
-
"moflo": "^4.8.
|
|
120
|
+
"moflo": "^4.8.82",
|
|
121
121
|
"tsx": "^4.21.0",
|
|
122
122
|
"typescript": "^5.9.3",
|
|
123
123
|
"vitest": "^4.0.0"
|
|
@@ -4,8 +4,15 @@
|
|
|
4
4
|
* Resolves `{stepId.outputKey}` placeholders in spell step configs.
|
|
5
5
|
* Nested property access is supported: `{step1.data.nested.value}`.
|
|
6
6
|
*/
|
|
7
|
-
/**
|
|
8
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Matches `{path}` variable references in spell step configs.
|
|
9
|
+
*
|
|
10
|
+
* The `(?<!\$)` negative lookbehind skips `${VAR}` — that's bash parameter
|
|
11
|
+
* expansion inside shell steps, not a spell template reference. Without it,
|
|
12
|
+
* a bash command like `sed "s/#${STORY}/.../"` would try to resolve `STORY`
|
|
13
|
+
* as a spell variable and fail.
|
|
14
|
+
*/
|
|
15
|
+
export const VAR_REF_PATTERN = /(?<!\$)\{([^}]+)\}/g;
|
|
9
16
|
/**
|
|
10
17
|
* Resolve a dot-separated path against the context variables.
|
|
11
18
|
* Returns undefined if any segment is missing.
|
|
@@ -74,25 +74,27 @@ export class SpellCaster {
|
|
|
74
74
|
}
|
|
75
75
|
else {
|
|
76
76
|
const reason = acceptance.reason === 'hash-mismatch'
|
|
77
|
-
? 'Spell permissions have changed
|
|
78
|
-
: 'First run —
|
|
77
|
+
? 'Spell permissions have changed — please re-review'
|
|
78
|
+
: 'First run — please review permissions before running this spell';
|
|
79
79
|
const report = formatSpellPermissionReport(permReport);
|
|
80
80
|
console.log(`[spell] ${reason}`);
|
|
81
|
-
console.log(
|
|
81
|
+
console.log('');
|
|
82
82
|
console.log(report);
|
|
83
|
-
//
|
|
83
|
+
// Also run dry-run validation so genuine definition issues surface
|
|
84
|
+
// alongside the permission review — but keep them cleanly separated
|
|
85
|
+
// from the acceptance prompt (not having accepted is not an error).
|
|
84
86
|
const dryResult = await dryRunValidate(definition, resolvedArgs, defValidation, options, this.registry, (variables, wfId, stepIndex) => this.buildContext(variables, resolvedArgs, wfId, stepIndex, options.signal));
|
|
85
87
|
if (!dryResult.valid) {
|
|
86
|
-
console.log('\n[spell]
|
|
88
|
+
console.log('\n[spell] Issues found while validating the spell definition:');
|
|
87
89
|
for (const err of [...dryResult.definitionErrors, ...dryResult.argumentErrors]) {
|
|
88
90
|
console.log(` - ${err.message}`);
|
|
89
91
|
}
|
|
90
92
|
}
|
|
91
93
|
// Block — user must explicitly accept
|
|
92
|
-
console.log(`\n[spell] To
|
|
94
|
+
console.log(`\n[spell] To run this spell, ask Claude to accept it, or call the spell_accept tool with name "${definition.name}".`);
|
|
93
95
|
return this.failureResult(spellId, startTime, [{
|
|
94
96
|
code: 'ACCEPTANCE_REQUIRED',
|
|
95
|
-
message: `${reason}. Review the
|
|
97
|
+
message: `${reason}. Review the permissions above, then accept the spell "${definition.name}" to continue.`,
|
|
96
98
|
}], definition.name);
|
|
97
99
|
}
|
|
98
100
|
}
|