moflo 4.8.66 → 4.8.68

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.66",
3
+ "version": "4.8.68",
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.65",
115
+ "moflo": "^4.8.67",
116
116
  "tsx": "^4.21.0",
117
117
  "typescript": "^5.9.3",
118
118
  "vitest": "^4.0.0"
@@ -95,11 +95,15 @@ steps:
95
95
  output: story_results
96
96
  steps:
97
97
  # 2a: Spawn Claude agent to implement the story and commit to epic branch
98
+ # Pin the branch before and after: subagents have wandered to main and
99
+ # landed commits there, leaving epic branch empty. We re-assert the epic
100
+ # branch up front, snapshot HEAD, and if the subagent strays we cherry-pick
101
+ # the stray commits back onto the epic branch before the step succeeds.
98
102
  - id: implement-story
99
103
  type: bash
100
104
  permissionLevel: elevated
101
105
  config:
102
- command: "export PATH=\"$HOME/.local/bin:$PATH\" && claude -p \"Read GitHub issue #{loop.story_number} using gh issue view {loop.story_number}. Implement exactly what the issue asks for — nothing more. Commit your changes with a message referencing the issue number. Do not create a branch or PR.\""
106
+ command: "export PATH=\"$HOME/.local/bin:$PATH\" && EPIC_BRANCH=\"epic/{args.epic_number}-{args.epic_slug}\" && git checkout \"$EPIC_BRANCH\" && BEFORE=$(git rev-parse HEAD) && claude -p \"You are on git branch $EPIC_BRANCH. Stay on it — do NOT run git checkout, git switch, or git branch. Read GitHub issue #{loop.story_number} using gh issue view {loop.story_number}. Implement exactly what the issue asks for — nothing more. Commit your changes on $EPIC_BRANCH with a message referencing the issue number. Do not create a PR.\" && CURRENT=$(git rev-parse --abbrev-ref HEAD) && if [ \"$CURRENT\" != \"$EPIC_BRANCH\" ]; then echo \"[epic] agent strayed from $EPIC_BRANCH to $CURRENT — recovering commits\" >&2 && STRAY_HEAD=$(git rev-parse HEAD) && git checkout \"$EPIC_BRANCH\" && git cherry-pick \"$BEFORE\"..\"$STRAY_HEAD\"; fi"
103
107
  timeout: 600000
104
108
  failOnError: true
105
109
 
@@ -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.66';
5
+ export const VERSION = '4.8.68';
6
6
  //# sourceMappingURL=version.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moflo/cli",
3
- "version": "4.8.66",
3
+ "version": "4.8.68",
4
4
  "type": "module",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/src/index.d.ts",
@@ -12,6 +12,7 @@ import { builtinConnectors } from '../connectors/index.js';
12
12
  import { parseSpell } from '../schema/parser.js';
13
13
  import { validateSpellDefinition } from '../schema/validator.js';
14
14
  import { SpellConnectorRegistry } from '../registry/connector-registry.js';
15
+ import { loadSandboxConfigFromProject } from '../core/platform-sandbox.js';
15
16
  // ============================================================================
16
17
  // Factory
17
18
  // ============================================================================
@@ -78,6 +79,13 @@ export async function runSpellFromContent(content, sourceFile, options = {}) {
78
79
  const runner = createRunner(options);
79
80
  // Strip factory-only fields; keep RunSpellOptions (extends RunnerOptions) for runner.run()
80
81
  const { args = {}, stepDirs: _s, credentials: _c, memory: _m, connectorRegistry: _cr, ...runnerOptions } = options;
82
+ // Auto-load sandbox config from moflo.yaml when caller supplied projectRoot
83
+ // but not an explicit sandboxConfig. Keeps CLI/epic callers from having to
84
+ // thread config themselves; MCP tools still pass explicitly.
85
+ if (!runnerOptions.sandboxConfig && runnerOptions.projectRoot) {
86
+ const autoCfg = await loadSandboxConfigFromProject(runnerOptions.projectRoot);
87
+ runnerOptions.sandboxConfig = autoCfg;
88
+ }
81
89
  return runner.run(definition, args, runnerOptions);
82
90
  }
83
91
  // ============================================================================