@zachjxyz/moxie 0.6.2 → 0.6.3
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/bin/moxie +1 -1
- package/lib/phases.sh +57 -4
- package/package.json +1 -1
package/bin/moxie
CHANGED
package/lib/phases.sh
CHANGED
|
@@ -1108,8 +1108,51 @@ _force_accept_best_draft() {
|
|
|
1108
1108
|
done
|
|
1109
1109
|
|
|
1110
1110
|
if [ -z "$best" ]; then
|
|
1111
|
-
|
|
1112
|
-
|
|
1111
|
+
# No draft .md files — create a synthetic FINAL from the ledger
|
|
1112
|
+
# (common for fix/build phases where agents modify code directly)
|
|
1113
|
+
echo " No draft files found — creating FINAL from ledger state."
|
|
1114
|
+
local ts
|
|
1115
|
+
ts=$(date +"%m%d%y-%H%M%S")
|
|
1116
|
+
local final_file="$phase_dir/${final_prefix}-${ts}.md"
|
|
1117
|
+
python3 -c "
|
|
1118
|
+
import json
|
|
1119
|
+
with open('$ledger') as f:
|
|
1120
|
+
d = json.load(f)
|
|
1121
|
+
lines = ['# $(phase_prefix "${final_prefix%-FINAL}") Phase — Complete', '']
|
|
1122
|
+
lines.append('Phase completed via force-accept (all agents verified).')
|
|
1123
|
+
lines.append('')
|
|
1124
|
+
for name, info in d.get('agents', {}).items():
|
|
1125
|
+
status = 'reached' if info.get('reached') else 'pending'
|
|
1126
|
+
note = info.get('notes', '')
|
|
1127
|
+
lines.append(f'- **{name}**: {status}')
|
|
1128
|
+
if note:
|
|
1129
|
+
lines.append(f' {note}')
|
|
1130
|
+
for item in d.get('findings', d.get('issues', [])):
|
|
1131
|
+
if isinstance(item, str):
|
|
1132
|
+
lines.append(f'- {item}')
|
|
1133
|
+
elif isinstance(item, dict):
|
|
1134
|
+
lines.append(f'- {item}')
|
|
1135
|
+
print('\n'.join(lines))
|
|
1136
|
+
" > "$final_file" 2>/dev/null
|
|
1137
|
+
|
|
1138
|
+
# Mark all agents as reached in the ledger
|
|
1139
|
+
python3 -c "
|
|
1140
|
+
import json, os
|
|
1141
|
+
with open('$ledger') as f:
|
|
1142
|
+
d = json.load(f)
|
|
1143
|
+
for name in d.get('agents', {}):
|
|
1144
|
+
d['agents'][name]['reached'] = True
|
|
1145
|
+
d['status'] = '$(echo "$final_prefix" | tr '[:upper:]' '[:lower:]' | tr '-' '_')'
|
|
1146
|
+
tmp = '$ledger' + '.tmp'
|
|
1147
|
+
with open(tmp, 'w') as f:
|
|
1148
|
+
json.dump(d, f, indent=2)
|
|
1149
|
+
os.rename(tmp, '$ledger')
|
|
1150
|
+
" 2>/dev/null
|
|
1151
|
+
|
|
1152
|
+
echo " Accepted: $(basename "$final_file")"
|
|
1153
|
+
echo ""
|
|
1154
|
+
_show_quorum "$ledger"
|
|
1155
|
+
return 0
|
|
1113
1156
|
fi
|
|
1114
1157
|
|
|
1115
1158
|
local ts
|
|
@@ -1324,8 +1367,18 @@ with open('$prompt_file', 'w') as f:
|
|
|
1324
1367
|
show_phase_tokens "$csv"
|
|
1325
1368
|
return 0
|
|
1326
1369
|
else
|
|
1327
|
-
echo " All healthy agents reached quorum
|
|
1328
|
-
|
|
1370
|
+
echo " All healthy agents reached quorum — writing FINAL."
|
|
1371
|
+
_force_accept_best_draft "$phase_dir" "$final_prefix" "$ledger"
|
|
1372
|
+
local healthy
|
|
1373
|
+
healthy=$(count_healthy_agents)
|
|
1374
|
+
echo ""
|
|
1375
|
+
echo "╔════════════════════════════════════════════════════════════╗"
|
|
1376
|
+
printf "║ %-58s║\n" "$(phase_label "$phase") phase complete — quorum reached"
|
|
1377
|
+
printf "║ %d/%d agents signed off ║\n" "$healthy" "$AGENT_COUNT"
|
|
1378
|
+
echo "╚════════════════════════════════════════════════════════════╝"
|
|
1379
|
+
echo ""
|
|
1380
|
+
show_phase_tokens "$csv"
|
|
1381
|
+
return 0
|
|
1329
1382
|
fi
|
|
1330
1383
|
fi
|
|
1331
1384
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zachjxyz/moxie",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.3",
|
|
4
4
|
"description": "Run multiple AI coding agents through spec-driven phases with quorum convergence. Supports CLI agents (Claude, Codex, Qwen, Aider, Goose, Amp, Cline, Roo) and Vercel AI Gateway models.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"moxie": "bin/moxie"
|