ralph-hero-mcp-server 2.5.193 → 2.5.195

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.
@@ -90,6 +90,9 @@ export function findFieldGaps(items, now) {
90
90
  missingPriority: nonTerminal
91
91
  .filter((item) => item.priority === null)
92
92
  .map((item) => toHygieneItem(item, now)),
93
+ missingWorkflowState: nonTerminal
94
+ .filter((item) => item.workflowState === null)
95
+ .map((item) => toHygieneItem(item, now)),
93
96
  };
94
97
  }
95
98
  /**
@@ -338,7 +341,8 @@ export function formatHygieneMarkdown(report) {
338
341
  }
339
342
  // Field gaps
340
343
  const totalGaps = report.fieldGaps.missingEstimate.length +
341
- report.fieldGaps.missingPriority.length;
344
+ report.fieldGaps.missingPriority.length +
345
+ report.fieldGaps.missingWorkflowState.length;
342
346
  if (totalGaps > 0) {
343
347
  lines.push("## Field Gaps");
344
348
  if (report.fieldGaps.missingEstimate.length > 0) {
@@ -359,6 +363,15 @@ export function formatHygieneMarkdown(report) {
359
363
  }
360
364
  lines.push("");
361
365
  }
366
+ if (report.fieldGaps.missingWorkflowState.length > 0) {
367
+ lines.push("### Missing Workflow State");
368
+ lines.push("| Issue | Title | State | Age |");
369
+ lines.push("|-------|-------|-------|-----|");
370
+ for (const item of report.fieldGaps.missingWorkflowState) {
371
+ lines.push(formatItemRow(item));
372
+ }
373
+ lines.push("");
374
+ }
362
375
  }
363
376
  // WIP violations
364
377
  if (report.wipViolations.length > 0) {
@@ -426,7 +439,8 @@ export function formatHygieneMarkdown(report) {
426
439
  renderedAny = true;
427
440
  }
428
441
  const repoTotalGaps = repo.fieldGaps.missingEstimate.length +
429
- repo.fieldGaps.missingPriority.length;
442
+ repo.fieldGaps.missingPriority.length +
443
+ repo.fieldGaps.missingWorkflowState.length;
430
444
  if (repoTotalGaps > 0) {
431
445
  lines.push("#### Field Gaps");
432
446
  if (repo.fieldGaps.missingEstimate.length > 0) {
@@ -447,6 +461,15 @@ export function formatHygieneMarkdown(report) {
447
461
  }
448
462
  lines.push("");
449
463
  }
464
+ if (repo.fieldGaps.missingWorkflowState.length > 0) {
465
+ lines.push("##### Missing Workflow State");
466
+ lines.push("| Issue | Title | State | Age |");
467
+ lines.push("|-------|-------|-------|-----|");
468
+ for (const item of repo.fieldGaps.missingWorkflowState) {
469
+ lines.push(formatItemRow(item));
470
+ }
471
+ lines.push("");
472
+ }
450
473
  renderedAny = true;
451
474
  }
452
475
  if (repo.wipViolations.length > 0) {
@@ -668,8 +668,9 @@ export function registerIssueTools(server, client, fieldCache) {
668
668
  .describe("GitHub usernames to assign"),
669
669
  workflowState: z
670
670
  .string()
671
+ .min(1, 'workflowState must be a non-empty state name; omit it to default to "Backlog"')
671
672
  .optional()
672
- .describe("Initial Workflow State name"),
673
+ .describe('Initial Workflow State name (defaults to "Backlog")'),
673
674
  estimate: z.string().optional().describe("Estimate (XS, S, M, L, XL)"),
674
675
  priority: z.string().optional().describe("Priority (P0, P1, P2, P3)"),
675
676
  }, async (args) => {
@@ -688,6 +689,7 @@ export function registerIssueTools(server, client, fieldCache) {
688
689
  let effectiveLabels = args.labels;
689
690
  let effectiveAssignees = args.assignees;
690
691
  let effectiveEstimate = args.estimate;
692
+ const effectiveState = args.workflowState ?? "Backlog";
691
693
  if (registry) {
692
694
  const repoLookup = lookupRepo(registry, repo);
693
695
  if (repoLookup) {
@@ -773,10 +775,8 @@ export function registerIssueTools(server, client, fieldCache) {
773
775
  .getCache()
774
776
  .set(`project-item-id:${owner}/${repo}#${issue.number}`, projectItemId, 30 * 60 * 1000);
775
777
  // Step 5: Set field values
776
- if (args.workflowState) {
777
- await updateProjectItemField(client, fieldCache, projectItemId, "Workflow State", args.workflowState, projectNumber);
778
- await syncStatusField(client, fieldCache, projectItemId, args.workflowState, projectNumber);
779
- }
778
+ await updateProjectItemField(client, fieldCache, projectItemId, "Workflow State", effectiveState, projectNumber);
779
+ await syncStatusField(client, fieldCache, projectItemId, effectiveState, projectNumber);
780
780
  if (effectiveEstimate) {
781
781
  await updateProjectItemField(client, fieldCache, projectItemId, "Estimate", effectiveEstimate, projectNumber);
782
782
  }
@@ -790,7 +790,7 @@ export function registerIssueTools(server, client, fieldCache) {
790
790
  url: issue.url,
791
791
  projectItemId,
792
792
  fieldsSet: {
793
- workflowState: args.workflowState || null,
793
+ workflowState: effectiveState,
794
794
  estimate: effectiveEstimate || null,
795
795
  priority: args.priority || null,
796
796
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ralph-hero-mcp-server",
3
- "version": "2.5.193",
3
+ "version": "2.5.195",
4
4
  "description": "MCP server for GitHub Projects V2 - Ralph workflow automation",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",