moflo 4.8.67 → 4.8.69

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.67",
3
+ "version": "4.8.69",
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.66",
115
+ "moflo": "^4.8.68",
116
116
  "tsx": "^4.21.0",
117
117
  "typescript": "^5.9.3",
118
118
  "vitest": "^4.0.0"
@@ -88,7 +88,9 @@ steps:
88
88
  command: "git remote get-url origin"
89
89
  hint: "This repo has no 'origin' remote. Set one with: git remote add origin <url>"
90
90
  config:
91
- command: "git stash --include-untracked -q 2>/dev/null; git checkout {args.base_branch} && git pull origin {args.base_branch}; git stash pop -q 2>/dev/null || true"
91
+ # set -e: fail fast if checkout/pull fails; otherwise the trailing
92
+ # `stash pop ... || true` would mask the real failure.
93
+ command: "set -e; git stash --include-untracked -q 2>/dev/null || true; git checkout {args.base_branch}; git pull origin {args.base_branch}; git stash pop -q 2>/dev/null || true"
92
94
  failOnError: true
93
95
 
94
96
  # 2: Spawn Claude agent to implement the story (creates branch + PR)
@@ -122,7 +124,8 @@ steps:
122
124
  - id: pull-merged
123
125
  type: bash
124
126
  config:
125
- command: "git stash --include-untracked -q 2>/dev/null; git checkout {args.base_branch} && git pull origin {args.base_branch}; git stash pop -q 2>/dev/null || true"
127
+ # set -e: fail fast if checkout/pull fails (see checkout-base).
128
+ command: "set -e; git stash --include-untracked -q 2>/dev/null || true; git checkout {args.base_branch}; git pull origin {args.base_branch}; git stash pop -q 2>/dev/null || true"
126
129
  failOnError: true
127
130
 
128
131
  # 6: Comment on epic with progress
@@ -82,7 +82,11 @@ steps:
82
82
  command: "gh auth status"
83
83
  hint: "The GitHub CLI isn't signed in. Run: gh auth login"
84
84
  config:
85
- command: "git stash --include-untracked -q 2>/dev/null; git checkout {args.base_branch} && git pull origin {args.base_branch} && (git show-ref --verify --quiet refs/heads/epic/{args.epic_number}-{args.epic_slug} && git checkout epic/{args.epic_number}-{args.epic_slug} || git checkout -b epic/{args.epic_number}-{args.epic_slug}); git stash pop -q 2>/dev/null || true"
85
+ # set -e: any failing step aborts the whole command. Without it, the
86
+ # trailing `git stash pop ... || true` would swallow real failures
87
+ # (e.g., checkout/pull/branch-create errors) and report success,
88
+ # leaving later steps to crash when the epic branch isn't there.
89
+ command: "set -e; git stash --include-untracked -q 2>/dev/null || true; git checkout {args.base_branch}; git pull origin {args.base_branch}; BRANCH=\"epic/{args.epic_number}-{args.epic_slug}\"; if git show-ref --verify --quiet \"refs/heads/$BRANCH\"; then git checkout \"$BRANCH\"; else git checkout -b \"$BRANCH\"; fi; git stash pop -q 2>/dev/null || true"
86
90
  timeout: 120000
87
91
  failOnError: true
88
92
 
@@ -95,11 +99,15 @@ steps:
95
99
  output: story_results
96
100
  steps:
97
101
  # 2a: Spawn Claude agent to implement the story and commit to epic branch
102
+ # Pin the branch before and after: subagents have wandered to main and
103
+ # landed commits there, leaving epic branch empty. We re-assert the epic
104
+ # branch up front, snapshot HEAD, and if the subagent strays we cherry-pick
105
+ # the stray commits back onto the epic branch before the step succeeds.
98
106
  - id: implement-story
99
107
  type: bash
100
108
  permissionLevel: elevated
101
109
  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.\""
110
+ 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
111
  timeout: 600000
104
112
  failOnError: true
105
113
 
@@ -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.67';
5
+ export const VERSION = '4.8.69';
6
6
  //# sourceMappingURL=version.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moflo/cli",
3
- "version": "4.8.67",
3
+ "version": "4.8.69",
4
4
  "type": "module",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/src/index.d.ts",