@yemi33/minions 0.1.162 → 0.1.163
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/CHANGELOG.md +5 -0
- package/engine/lifecycle.js +33 -25
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/engine/lifecycle.js
CHANGED
|
@@ -1250,40 +1250,48 @@ function runPostCompletionHooks(dispatchItem, agentId, code, stdout, config) {
|
|
|
1250
1250
|
|
|
1251
1251
|
if (isSuccess && meta?.item?.id && !skipDoneStatus) updateWorkItemStatus(meta, 'done', '');
|
|
1252
1252
|
|
|
1253
|
-
// Auto-dispatch review work item after implement completes successfully
|
|
1254
|
-
|
|
1253
|
+
// Auto-dispatch review work item after implement or fix completes successfully
|
|
1254
|
+
// For 'fix' items, only trigger when they were created by the eval loop (_evalParentId set)
|
|
1255
|
+
const isEvalEligible = type === 'implement' || (type === 'fix' && meta?.item?._evalParentId);
|
|
1256
|
+
if (isSuccess && !skipDoneStatus && isEvalEligible && meta?.item?.id) {
|
|
1255
1257
|
const autoReview = config.engine?.autoReview ?? shared.ENGINE_DEFAULTS.autoReview;
|
|
1256
1258
|
if (autoReview) {
|
|
1257
1259
|
try {
|
|
1258
1260
|
const wiPath = resolveWiPath(meta);
|
|
1259
1261
|
if (wiPath) {
|
|
1260
1262
|
const items = safeJson(wiPath) || [];
|
|
1263
|
+
// For fix items, the eval parent is the original implement item
|
|
1264
|
+
const evalParentId = type === 'fix' ? meta.item._evalParentId : meta.item.id;
|
|
1261
1265
|
// Dedup: skip if a review item already exists for this parent
|
|
1262
|
-
const existing = items.find(i => i._evalParentId ===
|
|
1266
|
+
const existing = items.find(i => i._evalParentId === evalParentId && i.type === 'review' && i.status !== 'done' && i.status !== 'failed');
|
|
1263
1267
|
if (existing) {
|
|
1264
|
-
log('info', `Eval loop: review item ${existing.id} already exists for ${
|
|
1268
|
+
log('info', `Eval loop: review item ${existing.id} already exists for ${evalParentId}, skipping`);
|
|
1265
1269
|
} else {
|
|
1266
|
-
const parentItem = items.find(i => i.id ===
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1270
|
+
const parentItem = items.find(i => i.id === evalParentId);
|
|
1271
|
+
if (parentItem?._evalDispatched) {
|
|
1272
|
+
log('info', `Eval loop: parent ${evalParentId} already has _evalDispatched set, skipping`);
|
|
1273
|
+
} else {
|
|
1274
|
+
const evalItem = {
|
|
1275
|
+
id: 'W-' + shared.uid(),
|
|
1276
|
+
title: `Review: ${parentItem?.title || meta.item.title || evalParentId}`,
|
|
1277
|
+
type: 'review',
|
|
1278
|
+
priority: parentItem?.priority || meta.item.priority || 'high',
|
|
1279
|
+
status: 'pending',
|
|
1280
|
+
created: ts(),
|
|
1281
|
+
createdBy: 'engine:eval-loop',
|
|
1282
|
+
project: meta.project?.name || meta.item.project,
|
|
1283
|
+
branch_name: parentItem?.branch_name || meta.branch || null,
|
|
1284
|
+
pr_url: parentItem?.pr_url || null,
|
|
1285
|
+
acceptance_criteria: parentItem?.acceptance_criteria || meta.item.acceptance_criteria || null,
|
|
1286
|
+
_evalParentId: evalParentId,
|
|
1287
|
+
};
|
|
1288
|
+
if (parentItem?.sourcePlan) evalItem.sourcePlan = parentItem.sourcePlan;
|
|
1289
|
+
// Mark parent as eval-dispatched before writing to prevent duplicates on re-run
|
|
1290
|
+
if (parentItem) parentItem._evalDispatched = true;
|
|
1291
|
+
items.push(evalItem);
|
|
1292
|
+
shared.safeWrite(wiPath, items);
|
|
1293
|
+
log('info', `Eval loop: created ${evalItem.id} for completed ${type} ${meta.item.id} (parent: ${evalParentId})`);
|
|
1294
|
+
}
|
|
1287
1295
|
}
|
|
1288
1296
|
}
|
|
1289
1297
|
} catch (err) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yemi33/minions",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.163",
|
|
4
4
|
"description": "Multi-agent AI dev team that runs from ~/.minions/ — five autonomous agents share a single engine, dashboard, and knowledge base",
|
|
5
5
|
"bin": {
|
|
6
6
|
"minions": "bin/minions.js"
|