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.82",
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.81",
120
+ "moflo": "^4.8.82",
121
121
  "tsx": "^4.21.0",
122
122
  "typescript": "^5.9.3",
123
123
  "vitest": "^4.0.0"
@@ -2,5 +2,5 @@
2
2
  * Auto-generated by build. Do not edit manually.
3
3
  * Source of truth: root package.json → scripts/sync-version.mjs
4
4
  */
5
- export const VERSION = '4.8.82';
5
+ export const VERSION = '4.8.83';
6
6
  //# sourceMappingURL=version.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moflo/cli",
3
- "version": "4.8.82",
3
+ "version": "4.8.83",
4
4
  "type": "module",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/src/index.d.ts",
@@ -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
- /** Matches `{path}` variable references in spell step configs. */
8
- export const VAR_REF_PATTERN = /\{([^}]+)\}/g;
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 since last acceptance'
78
- : 'First run — reviewing spell permissions';
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(`[spell] Running automatic dry-run validation...\n`);
81
+ console.log('');
82
82
  console.log(report);
83
- // Run dry-run validation so the user also sees structural issues
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] Dry-run validation found errors:');
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 accept these permissions, run: spell_accept({ name: "${definition.name}" })`);
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 risk analysis above and accept with spell_accept({ name: "${definition.name}" }).`,
97
+ message: `${reason}. Review the permissions above, then accept the spell "${definition.name}" to continue.`,
96
98
  }], definition.name);
97
99
  }
98
100
  }