moflo 4.9.27 → 4.9.28
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/dist/src/cli/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "moflo",
|
|
3
|
-
"version": "4.9.
|
|
3
|
+
"version": "4.9.28",
|
|
4
4
|
"description": "MoFlo — AI agent orchestration for Claude Code. A standalone, opinionated toolkit with semantic memory, learned routing, gates, spells, and the /flo issue-execution skill.",
|
|
5
5
|
"main": "dist/src/cli/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"@typescript-eslint/eslint-plugin": "^7.18.0",
|
|
85
85
|
"@typescript-eslint/parser": "^7.18.0",
|
|
86
86
|
"eslint": "^8.0.0",
|
|
87
|
-
"moflo": "^4.9.
|
|
87
|
+
"moflo": "^4.9.27",
|
|
88
88
|
"tsx": "^4.21.0",
|
|
89
89
|
"typescript": "^5.9.3",
|
|
90
90
|
"vitest": "^4.0.0"
|
|
@@ -87,8 +87,12 @@ steps:
|
|
|
87
87
|
# elevated — bwrap network access for git pull (see single-branch create-branch).
|
|
88
88
|
permissionLevel: elevated
|
|
89
89
|
preflight:
|
|
90
|
+
# `git diff --name-only --diff-filter=U` always exits 0 — it just
|
|
91
|
+
# lists paths. Use `--quiet`, which exits 1 when any unmerged path
|
|
92
|
+
# exists, so this preflight actually catches a half-merged index
|
|
93
|
+
# (e.g. left by an earlier failed run).
|
|
90
94
|
- name: "no unmerged files"
|
|
91
|
-
command: "git diff --
|
|
95
|
+
command: "git diff --quiet --diff-filter=U"
|
|
92
96
|
expectExitCode: 0
|
|
93
97
|
hint: "You have unresolved merge conflicts. Resolve them and commit before running this spell."
|
|
94
98
|
- name: "working tree clean (tracked changes)"
|
|
@@ -97,7 +101,7 @@ steps:
|
|
|
97
101
|
hint: "You have uncommitted changes to tracked files. If you want them carried onto the epic branch, pick 'Stash and carry over'."
|
|
98
102
|
resolutions:
|
|
99
103
|
- label: "Stash changes and carry them onto the epic branch"
|
|
100
|
-
command: "git stash push --include-untracked --message 'moflo-epic-autostash'"
|
|
104
|
+
command: "git stash push --include-untracked --message 'moflo-epic-{args.epic_number}-autostash'"
|
|
101
105
|
- label: "Commit changes to the current branch first, then continue"
|
|
102
106
|
command: "git commit -am 'wip: pre-epic snapshot'"
|
|
103
107
|
- name: "working tree clean (staged changes)"
|
|
@@ -106,7 +110,7 @@ steps:
|
|
|
106
110
|
hint: "You have staged changes that aren't committed. If you want them carried onto the epic branch, pick 'Stash and carry over'."
|
|
107
111
|
resolutions:
|
|
108
112
|
- label: "Stash staged changes and carry them onto the epic branch"
|
|
109
|
-
command: "git stash push --include-untracked --message 'moflo-epic-autostash'"
|
|
113
|
+
command: "git stash push --include-untracked --message 'moflo-epic-{args.epic_number}-autostash'"
|
|
110
114
|
- label: "Commit staged changes to the current branch first, then continue"
|
|
111
115
|
command: "git commit -m 'wip: pre-epic snapshot'"
|
|
112
116
|
- name: "gh cli authenticated"
|
|
@@ -116,9 +120,28 @@ steps:
|
|
|
116
120
|
command: "git remote get-url origin"
|
|
117
121
|
hint: "This repo has no 'origin' remote. Set one with: git remote add origin <url>"
|
|
118
122
|
config:
|
|
119
|
-
# set -e: fail fast if checkout/pull fails
|
|
120
|
-
#
|
|
121
|
-
|
|
123
|
+
# set -e: fail fast if checkout/pull fails.
|
|
124
|
+
#
|
|
125
|
+
# We deliberately do NOT auto-stash here. Preflight enforces a clean
|
|
126
|
+
# tree (or runs the user-chosen stash-and-carry resolution), so the
|
|
127
|
+
# only stash we should ever pop is the preflight's
|
|
128
|
+
# `moflo-epic-autostash` marker. Popping the unconditionally-top
|
|
129
|
+
# stash (the previous design) was the source of #287's stash-pop
|
|
130
|
+
# conflict that left the index half-merged.
|
|
131
|
+
command: |
|
|
132
|
+
set -e
|
|
133
|
+
git checkout {args.base_branch}
|
|
134
|
+
git pull origin {args.base_branch}
|
|
135
|
+
# Scoped by epic_number to prevent a stale autostash from an
|
|
136
|
+
# unrelated abandoned run getting popped here.
|
|
137
|
+
EXPECTED_STASH_TAG="moflo-epic-{args.epic_number}-autostash"
|
|
138
|
+
TOP_MSG=$(git stash list --format='%s' -1)
|
|
139
|
+
if [[ "$TOP_MSG" == *"$EXPECTED_STASH_TAG"* ]]; then
|
|
140
|
+
if ! git stash pop -q; then
|
|
141
|
+
echo "[epic] carrying-over stash conflicted on {args.base_branch} — resolve unmerged paths and re-run the spell" >&2
|
|
142
|
+
exit 1
|
|
143
|
+
fi
|
|
144
|
+
fi
|
|
122
145
|
failOnError: true
|
|
123
146
|
|
|
124
147
|
# 2: Spawn Claude agent to implement the story (creates branch + PR)
|
|
@@ -155,7 +178,20 @@ steps:
|
|
|
155
178
|
permissionLevel: elevated
|
|
156
179
|
config:
|
|
157
180
|
# set -e: fail fast if checkout/pull fails (see checkout-base).
|
|
158
|
-
|
|
181
|
+
# No in-step stash; pop only the preflight's autostash marker
|
|
182
|
+
# (scoped by epic_number — see checkout-base).
|
|
183
|
+
command: |
|
|
184
|
+
set -e
|
|
185
|
+
git checkout {args.base_branch}
|
|
186
|
+
git pull origin {args.base_branch}
|
|
187
|
+
EXPECTED_STASH_TAG="moflo-epic-{args.epic_number}-autostash"
|
|
188
|
+
TOP_MSG=$(git stash list --format='%s' -1)
|
|
189
|
+
if [[ "$TOP_MSG" == *"$EXPECTED_STASH_TAG"* ]]; then
|
|
190
|
+
if ! git stash pop -q; then
|
|
191
|
+
echo "[epic] carrying-over stash conflicted on {args.base_branch} — resolve unmerged paths and re-run the spell" >&2
|
|
192
|
+
exit 1
|
|
193
|
+
fi
|
|
194
|
+
fi
|
|
159
195
|
failOnError: true
|
|
160
196
|
|
|
161
197
|
# 6: Comment on epic with progress
|
|
@@ -87,8 +87,12 @@ steps:
|
|
|
87
87
|
# has working network.
|
|
88
88
|
permissionLevel: elevated
|
|
89
89
|
preflight:
|
|
90
|
+
# `git diff --name-only --diff-filter=U` always exits 0 — it just lists
|
|
91
|
+
# paths. Use `--quiet`, which exits 1 when any unmerged path exists, so
|
|
92
|
+
# the preflight actually catches a half-merged index left by an earlier
|
|
93
|
+
# failed run (e.g. a stash-pop conflict).
|
|
90
94
|
- name: "no unmerged files"
|
|
91
|
-
command: "git diff --
|
|
95
|
+
command: "git diff --quiet --diff-filter=U"
|
|
92
96
|
expectExitCode: 0
|
|
93
97
|
hint: "You have unresolved merge conflicts. Resolve them and commit before running this spell."
|
|
94
98
|
- name: "working tree clean (tracked changes)"
|
|
@@ -97,7 +101,7 @@ steps:
|
|
|
97
101
|
hint: "You have uncommitted changes to tracked files. If you want them carried onto the epic branch, pick 'Stash and carry over'."
|
|
98
102
|
resolutions:
|
|
99
103
|
- label: "Stash changes and carry them onto the epic branch"
|
|
100
|
-
command: "git stash push --include-untracked --message 'moflo-epic-autostash'"
|
|
104
|
+
command: "git stash push --include-untracked --message 'moflo-epic-{args.epic_number}-autostash'"
|
|
101
105
|
- label: "Commit changes to the current branch first, then continue"
|
|
102
106
|
command: "git commit -am 'wip: pre-epic snapshot'"
|
|
103
107
|
- name: "working tree clean (staged changes)"
|
|
@@ -106,18 +110,45 @@ steps:
|
|
|
106
110
|
hint: "You have staged changes that aren't committed. If you want them carried onto the epic branch, pick 'Stash and carry over'."
|
|
107
111
|
resolutions:
|
|
108
112
|
- label: "Stash staged changes and carry them onto the epic branch"
|
|
109
|
-
command: "git stash push --include-untracked --message 'moflo-epic-autostash'"
|
|
113
|
+
command: "git stash push --include-untracked --message 'moflo-epic-{args.epic_number}-autostash'"
|
|
110
114
|
- label: "Commit staged changes to the current branch first, then continue"
|
|
111
115
|
command: "git commit -m 'wip: pre-epic snapshot'"
|
|
112
116
|
- name: "gh cli authenticated"
|
|
113
117
|
command: "gh auth status"
|
|
114
118
|
hint: "The GitHub CLI isn't signed in. Run: gh auth login"
|
|
115
119
|
config:
|
|
116
|
-
# set -e: any failing step aborts the whole command.
|
|
117
|
-
#
|
|
118
|
-
#
|
|
119
|
-
#
|
|
120
|
-
|
|
120
|
+
# set -e: any failing step aborts the whole command.
|
|
121
|
+
#
|
|
122
|
+
# We deliberately do NOT auto-stash here. Preflight has already enforced
|
|
123
|
+
# a clean tree (or run the user-chosen stash-and-carry resolution), so
|
|
124
|
+
# the only stash we should ever pop is the preflight's `moflo-epic-autostash`
|
|
125
|
+
# marker. Popping the unconditionally-top stash (the previous design)
|
|
126
|
+
# was the source of #287's stash-pop conflict that left the index
|
|
127
|
+
# half-merged — `git stash pop ... || true` masked the conflict
|
|
128
|
+
# failure and the next step's `git checkout` then died with
|
|
129
|
+
# "you need to resolve your current index first".
|
|
130
|
+
command: |
|
|
131
|
+
set -e
|
|
132
|
+
git checkout {args.base_branch}
|
|
133
|
+
git pull origin {args.base_branch}
|
|
134
|
+
BRANCH="epic/{args.epic_number}-{args.epic_slug}"
|
|
135
|
+
if git show-ref --verify --quiet "refs/heads/$BRANCH"; then
|
|
136
|
+
git checkout "$BRANCH"
|
|
137
|
+
else
|
|
138
|
+
git checkout -b "$BRANCH"
|
|
139
|
+
fi
|
|
140
|
+
# Scope the marker by epic_number so a stale autostash from an
|
|
141
|
+
# abandoned previous run of a DIFFERENT epic doesn't get popped onto
|
|
142
|
+
# this branch unintentionally. Same-epic re-runs still carry over,
|
|
143
|
+
# which is the intended recovery path.
|
|
144
|
+
EXPECTED_STASH_TAG="moflo-epic-{args.epic_number}-autostash"
|
|
145
|
+
TOP_MSG=$(git stash list --format='%s' -1)
|
|
146
|
+
if [[ "$TOP_MSG" == *"$EXPECTED_STASH_TAG"* ]]; then
|
|
147
|
+
if ! git stash pop -q; then
|
|
148
|
+
echo "[epic] carrying-over stash conflicted on $BRANCH — resolve unmerged paths and re-run the spell" >&2
|
|
149
|
+
exit 1
|
|
150
|
+
fi
|
|
151
|
+
fi
|
|
121
152
|
timeout: 120000
|
|
122
153
|
failOnError: true
|
|
123
154
|
|