ralph-hero-mcp-server 2.5.57 → 2.5.65
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.
|
@@ -39,7 +39,8 @@ export const OVERSIZED_ESTIMATES = new Set(["M", "L", "XL"]);
|
|
|
39
39
|
* 6. Any issues in Plan in Progress or Plan in Review -> REVIEW
|
|
40
40
|
* 7. All issues in Plan in Review -> HUMAN_GATE (plans awaiting human approval)
|
|
41
41
|
* 8. Any issues in In Progress -> IMPLEMENT
|
|
42
|
-
* 9.
|
|
42
|
+
* 9. Any issues in In Review (with rest Done/Canceled) -> INTEGRATE
|
|
43
|
+
* 9b. All issues Done/Canceled -> TERMINAL
|
|
43
44
|
* 10. Any issues in Human Needed -> TERMINAL (need human)
|
|
44
45
|
* 11. Fallback -> TRIAGE
|
|
45
46
|
*
|
|
@@ -120,14 +121,15 @@ export function detectPipelinePosition(issues, isGroup, groupPrimary, options =
|
|
|
120
121
|
if (inProgress.length > 0) {
|
|
121
122
|
return buildResult("IMPLEMENT", `${inProgress.length} issue(s) in progress`, issues, isGroup, groupPrimary, { required: false, met: true, blocking: [] }, options.streamCount);
|
|
122
123
|
}
|
|
123
|
-
// Step 9: All issues
|
|
124
|
-
const
|
|
125
|
-
if (
|
|
126
|
-
//
|
|
127
|
-
if (
|
|
128
|
-
return buildResult("INTEGRATE", `${inReview.length} issue(s)
|
|
124
|
+
// Step 9: All issues in In Review, Done, or Canceled
|
|
125
|
+
const completed = inReview.length + done.length + canceled.length;
|
|
126
|
+
if (completed === issues.length) {
|
|
127
|
+
// "In Review" = PRs awaiting review/merge — actionable, not terminal
|
|
128
|
+
if (inReview.length > 0) {
|
|
129
|
+
return buildResult("INTEGRATE", `${inReview.length} issue(s) in review`, issues, isGroup, groupPrimary, { required: false, met: true, blocking: [] }, options.streamCount);
|
|
129
130
|
}
|
|
130
|
-
|
|
131
|
+
// All Done/Canceled — truly terminal
|
|
132
|
+
return buildResult("TERMINAL", `All issues done or canceled (${done.length} done, ${canceled.length} canceled)`, issues, isGroup, groupPrimary, { required: false, met: true, blocking: [] }, options.streamCount);
|
|
131
133
|
}
|
|
132
134
|
// Step 10: Any issues need human intervention -> TERMINAL
|
|
133
135
|
if (humanNeeded.length > 0) {
|
package/dist/lib/plan-graph.js
CHANGED
|
@@ -57,8 +57,8 @@ export function parsePlanGraph(content) {
|
|
|
57
57
|
const edges = [];
|
|
58
58
|
const lines = content.split("\n");
|
|
59
59
|
if (type === "plan") {
|
|
60
|
-
// Scan for ## Phase N: ...
|
|
61
|
-
const phasePattern = /^## Phase (\d+)
|
|
60
|
+
// Scan for ## Phase N: ... GH-NNN headings (with or without parens)
|
|
61
|
+
const phasePattern = /^## Phase (\d+):.*GH-(\d+)/;
|
|
62
62
|
// First pass: build phaseToIssue map
|
|
63
63
|
for (const line of lines) {
|
|
64
64
|
const m = line.match(phasePattern);
|
|
@@ -109,8 +109,8 @@ export function parsePlanGraph(content) {
|
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
else {
|
|
112
|
-
// plan-of-plans: scan for ### Feature ...: ...
|
|
113
|
-
const featurePattern = /^### Feature [^:]
|
|
112
|
+
// plan-of-plans: scan for ### Feature ...: ... GH-NNN headings (with or without parens)
|
|
113
|
+
const featurePattern = /^### Feature [^:]+:.*GH-(\d+)/;
|
|
114
114
|
let currentFeatureIssue = null;
|
|
115
115
|
for (const line of lines) {
|
|
116
116
|
const featureMatch = line.match(featurePattern);
|