nightralph 0.0.43 → 0.0.45
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/display.js +4 -0
- package/dist/display.js.map +2 -2
- package/dist/index.js +50 -8
- package/dist/index.js.map +2 -2
- package/dist/meta.json +6 -6
- package/dist/orchestrator.js +48 -8
- package/dist/orchestrator.js.map +2 -2
- package/dist/src/display.d.ts.map +1 -1
- package/dist/src/orchestrator.d.ts +9 -0
- package/dist/src/orchestrator.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/meta.json
CHANGED
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
"format": "esm"
|
|
106
106
|
},
|
|
107
107
|
"src/display.ts": {
|
|
108
|
-
"bytes":
|
|
108
|
+
"bytes": 13046,
|
|
109
109
|
"imports": [
|
|
110
110
|
{
|
|
111
111
|
"path": "<runtime>",
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
"format": "esm"
|
|
143
143
|
},
|
|
144
144
|
"src/orchestrator.ts": {
|
|
145
|
-
"bytes":
|
|
145
|
+
"bytes": 72448,
|
|
146
146
|
"imports": [
|
|
147
147
|
{
|
|
148
148
|
"path": "node:child_process",
|
|
@@ -310,7 +310,7 @@
|
|
|
310
310
|
"imports": [],
|
|
311
311
|
"exports": [],
|
|
312
312
|
"inputs": {},
|
|
313
|
-
"bytes":
|
|
313
|
+
"bytes": 189123
|
|
314
314
|
},
|
|
315
315
|
"dist/index.js": {
|
|
316
316
|
"imports": [
|
|
@@ -478,7 +478,7 @@
|
|
|
478
478
|
"bytesInOutput": 4816
|
|
479
479
|
},
|
|
480
480
|
"src/orchestrator.ts": {
|
|
481
|
-
"bytesInOutput":
|
|
481
|
+
"bytesInOutput": 50122
|
|
482
482
|
},
|
|
483
483
|
"src/worktree.ts": {
|
|
484
484
|
"bytesInOutput": 4088
|
|
@@ -490,7 +490,7 @@
|
|
|
490
490
|
"bytesInOutput": 4995
|
|
491
491
|
},
|
|
492
492
|
"src/display.ts": {
|
|
493
|
-
"bytesInOutput":
|
|
493
|
+
"bytesInOutput": 8375
|
|
494
494
|
},
|
|
495
495
|
"src/testcmd.ts": {
|
|
496
496
|
"bytesInOutput": 1914
|
|
@@ -499,7 +499,7 @@
|
|
|
499
499
|
"bytesInOutput": 1937
|
|
500
500
|
}
|
|
501
501
|
},
|
|
502
|
-
"bytes":
|
|
502
|
+
"bytes": 88190
|
|
503
503
|
}
|
|
504
504
|
}
|
|
505
505
|
}
|
package/dist/orchestrator.js
CHANGED
|
@@ -1238,6 +1238,42 @@ async function saveProgress(repoRoot, progressPath, progress, message, d) {
|
|
|
1238
1238
|
}
|
|
1239
1239
|
}
|
|
1240
1240
|
__name(saveProgress, "saveProgress");
|
|
1241
|
+
const HUMAN_STATUS = "ready-for-human";
|
|
1242
|
+
function indentFilenames(tickets) {
|
|
1243
|
+
return tickets.map((t) => ` ${t.filename}`).join("\n");
|
|
1244
|
+
}
|
|
1245
|
+
__name(indentFilenames, "indentFilenames");
|
|
1246
|
+
function renderFinishSummary(tickets, totalCompleted, failedNums) {
|
|
1247
|
+
const remaining = tickets.filter(
|
|
1248
|
+
(t) => t.status === "ready-for-agent"
|
|
1249
|
+
);
|
|
1250
|
+
const human = tickets.filter((t) => t.status === HUMAN_STATUS);
|
|
1251
|
+
const humanNums = new Set(human.map((t) => t.num));
|
|
1252
|
+
const blockedByHuman = remaining.filter(
|
|
1253
|
+
(t) => !failedNums.has(t.num) && t.blockers.some((b) => humanNums.has(b))
|
|
1254
|
+
);
|
|
1255
|
+
const counts = `Finished: ${totalCompleted} completed` + (remaining.length > 0 ? `, ${remaining.length} remaining` : "") + (failedNums.size > 0 ? `, ${failedNums.size} failed` : "") + (human.length > 0 ? `, ${human.length} need a human` : "");
|
|
1256
|
+
if (human.length === 0) return counts;
|
|
1257
|
+
const noun = human.length === 1 ? "ticket is" : "tickets are";
|
|
1258
|
+
const lines = [
|
|
1259
|
+
counts,
|
|
1260
|
+
"",
|
|
1261
|
+
(remaining.length === 0 && failedNums.size === 0 ? `All remaining ${noun} marked ${HUMAN_STATUS}. ` : `${human.length} ${noun} marked ${HUMAN_STATUS}. `) + "nightralph only runs ready-for-agent tickets, so an agent cannot finish these:",
|
|
1262
|
+
indentFilenames(human)
|
|
1263
|
+
];
|
|
1264
|
+
if (blockedByHuman.length > 0) {
|
|
1265
|
+
const n = blockedByHuman.length;
|
|
1266
|
+
lines.push(
|
|
1267
|
+
`${n} ready-for-agent ticket${n === 1 ? " is" : "s are"} blocked until they are done:`,
|
|
1268
|
+
indentFilenames(blockedByHuman)
|
|
1269
|
+
);
|
|
1270
|
+
}
|
|
1271
|
+
lines.push(
|
|
1272
|
+
"Do that work by hand, then set each ticket's **Status:** to done" + (blockedByHuman.length > 0 ? " and run nightralph again." : ".")
|
|
1273
|
+
);
|
|
1274
|
+
return lines.join("\n");
|
|
1275
|
+
}
|
|
1276
|
+
__name(renderFinishSummary, "renderFinishSummary");
|
|
1241
1277
|
function runProgress(tickets) {
|
|
1242
1278
|
return {
|
|
1243
1279
|
completed: tickets.filter((t) => t.status === "done").length,
|
|
@@ -1378,10 +1414,11 @@ No tickets completed this wave. ${remaining3.length} ready ticket${remaining3.le
|
|
|
1378
1414
|
const remaining = tickets.filter(
|
|
1379
1415
|
(t) => t.status === "ready-for-agent"
|
|
1380
1416
|
);
|
|
1381
|
-
d.log(
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1417
|
+
d.log("\n" + renderFinishSummary(
|
|
1418
|
+
tickets,
|
|
1419
|
+
totalCompleted,
|
|
1420
|
+
failedNums
|
|
1421
|
+
));
|
|
1385
1422
|
d.cleanup();
|
|
1386
1423
|
return { allDone: remaining.length === 0 };
|
|
1387
1424
|
}
|
|
@@ -1732,10 +1769,11 @@ No tickets completed this wave. ${remaining3.length} ready ticket${remaining3.le
|
|
|
1732
1769
|
const remaining = opts.tickets.filter(
|
|
1733
1770
|
(t) => t.status === "ready-for-agent"
|
|
1734
1771
|
);
|
|
1735
|
-
d.log(
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1772
|
+
d.log("\n" + renderFinishSummary(
|
|
1773
|
+
opts.tickets,
|
|
1774
|
+
totalCompleted,
|
|
1775
|
+
failedNums
|
|
1776
|
+
));
|
|
1739
1777
|
d.cleanup();
|
|
1740
1778
|
return { allDone: remaining.length === 0 };
|
|
1741
1779
|
}
|
|
@@ -1747,6 +1785,7 @@ export {
|
|
|
1747
1785
|
DEFAULT_RETRIES,
|
|
1748
1786
|
DEFAULT_RETRY_DELAY,
|
|
1749
1787
|
EFFORT_LADDERS,
|
|
1788
|
+
HUMAN_STATUS,
|
|
1750
1789
|
TICKET_RE,
|
|
1751
1790
|
TOOL_USE_RE,
|
|
1752
1791
|
checkItems,
|
|
@@ -1764,6 +1803,7 @@ export {
|
|
|
1764
1803
|
parseBlockers,
|
|
1765
1804
|
parseStatus,
|
|
1766
1805
|
parseTicketFilename,
|
|
1806
|
+
renderFinishSummary,
|
|
1767
1807
|
renderMergePrompt,
|
|
1768
1808
|
renderPrompt,
|
|
1769
1809
|
retryDelayFor,
|