@snipcodeit/mgw 0.1.3 → 0.2.1
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/commands/init.md +115 -5
- package/commands/issues.md +63 -1
- package/commands/milestone.md +43 -0
- package/commands/review.md +289 -149
- package/commands/status.md +95 -1
- package/commands/workflows/gsd.md +70 -0
- package/completions/mgw.bash +112 -0
- package/completions/mgw.fish +99 -0
- package/completions/mgw.zsh +142 -0
- package/dist/bin/mgw.cjs +113 -29
- package/dist/index-CXfe9U4l.cjs +1818 -0
- package/dist/lib/index.cjs +109 -8
- package/package.json +6 -1
- package/dist/claude-Dk1oVsaG.cjs +0 -622
package/dist/lib/index.cjs
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var index$1 = require('../index-CXfe9U4l.cjs');
|
|
4
4
|
var require$$0 = require('child_process');
|
|
5
5
|
var require$$1 = require('path');
|
|
6
6
|
var require$$2 = require('os');
|
|
7
7
|
var require$$0$1 = require('fs');
|
|
8
|
+
require('events');
|
|
8
9
|
|
|
9
10
|
var gsdAdapter;
|
|
10
11
|
var hasRequiredGsdAdapter;
|
|
@@ -594,6 +595,103 @@ function requireRetry () {
|
|
|
594
595
|
return retry;
|
|
595
596
|
}
|
|
596
597
|
|
|
598
|
+
var progress;
|
|
599
|
+
var hasRequiredProgress;
|
|
600
|
+
|
|
601
|
+
function requireProgress () {
|
|
602
|
+
if (hasRequiredProgress) return progress;
|
|
603
|
+
hasRequiredProgress = 1;
|
|
604
|
+
const { IS_TTY, IS_CI, USE_COLOR } = index$1.requireOutput();
|
|
605
|
+
const SUPPORTS_COLOR = USE_COLOR;
|
|
606
|
+
const C = {
|
|
607
|
+
reset: "\x1B[0m",
|
|
608
|
+
bold: "\x1B[1m",
|
|
609
|
+
dim: "\x1B[2m",
|
|
610
|
+
// Catppuccin Macchiato — Green (issue 'done')
|
|
611
|
+
green: "\x1B[38;2;166;218;149m",
|
|
612
|
+
// Catppuccin Macchiato — Blue (issue 'running')
|
|
613
|
+
blue: "\x1B[38;2;138;173;244m",
|
|
614
|
+
// Catppuccin Macchiato — Red (issue 'failed')
|
|
615
|
+
red: "\x1B[38;2;237;135;150m",
|
|
616
|
+
// Catppuccin Macchiato — Yellow (issue 'blocked')
|
|
617
|
+
yellow: "\x1B[38;2;238;212;159m",
|
|
618
|
+
// Catppuccin Macchiato — Peach (bar fill)
|
|
619
|
+
peach: "\x1B[38;2;245;169;127m",
|
|
620
|
+
// Catppuccin Macchiato — Surface2 (bar empty)
|
|
621
|
+
surface: "\x1B[38;2;91;96;120m",
|
|
622
|
+
// Catppuccin Macchiato — Subtext1 (labels)
|
|
623
|
+
subtext: "\x1B[38;2;184;192;224m"
|
|
624
|
+
};
|
|
625
|
+
function col(colorCode, text) {
|
|
626
|
+
if (!SUPPORTS_COLOR) return text;
|
|
627
|
+
return `${colorCode}${text}${C.reset}`;
|
|
628
|
+
}
|
|
629
|
+
function renderProgressBar({ done, total, width = 20 }) {
|
|
630
|
+
if (total === 0) return col(C.dim, "[\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500] 0/0 issues");
|
|
631
|
+
const pct = Math.min(done / total, 1);
|
|
632
|
+
const filled = Math.round(pct * width);
|
|
633
|
+
const empty = width - filled;
|
|
634
|
+
const fillChar = "\u2588";
|
|
635
|
+
const emptyChar = "\u2591";
|
|
636
|
+
const fillStr = fillChar.repeat(filled);
|
|
637
|
+
const emptyStr = emptyChar.repeat(empty);
|
|
638
|
+
if (SUPPORTS_COLOR) {
|
|
639
|
+
const bar = `${C.peach}${fillStr}${C.reset}${C.surface}${emptyStr}${C.reset}`;
|
|
640
|
+
const fraction = `${C.bold}${done}/${total}${C.reset}`;
|
|
641
|
+
const label = col(C.subtext, " issues complete");
|
|
642
|
+
return `[${bar}] ${fraction}${label}`;
|
|
643
|
+
} else {
|
|
644
|
+
return `[${fillStr}${emptyStr}] ${done}/${total} issues complete`;
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
function stageIcon(stage) {
|
|
648
|
+
switch (stage) {
|
|
649
|
+
case "done":
|
|
650
|
+
case "pr-created":
|
|
651
|
+
return { icon: "\u2713", colored: col(C.green, "\u2713") };
|
|
652
|
+
case "executing":
|
|
653
|
+
case "planning":
|
|
654
|
+
case "verifying":
|
|
655
|
+
return { icon: "\u25C6", colored: col(C.blue, "\u25C6") };
|
|
656
|
+
case "failed":
|
|
657
|
+
return { icon: "\u2717", colored: col(C.red, "\u2717") };
|
|
658
|
+
case "blocked":
|
|
659
|
+
return { icon: "\u2298", colored: col(C.yellow, "\u2298") };
|
|
660
|
+
default:
|
|
661
|
+
return { icon: "\u25CB", colored: col(C.dim, "\u25CB") };
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
function printMilestoneProgress({ done, total, label, issues, currentIssue } = {}) {
|
|
665
|
+
const bar = renderProgressBar({ done: done || 0, total: total || 0 });
|
|
666
|
+
if (label) {
|
|
667
|
+
const header = SUPPORTS_COLOR ? `${C.bold}${C.subtext}${label}${C.reset}` : label;
|
|
668
|
+
process.stdout.write(`
|
|
669
|
+
${header}
|
|
670
|
+
`);
|
|
671
|
+
}
|
|
672
|
+
process.stdout.write(`Progress: ${bar}
|
|
673
|
+
`);
|
|
674
|
+
if (issues && issues.length > 0) {
|
|
675
|
+
const parts = issues.map(({ number, pipeline_stage }) => {
|
|
676
|
+
const s = number === currentIssue && pipeline_stage !== "done" ? "executing" : pipeline_stage || "new";
|
|
677
|
+
const { colored, icon } = stageIcon(s);
|
|
678
|
+
const numStr = SUPPORTS_COLOR ? `${C.dim}#${number}${C.reset}` : `#${number}`;
|
|
679
|
+
return `${numStr}${colored}`;
|
|
680
|
+
});
|
|
681
|
+
process.stdout.write(` ${parts.join(" ")}
|
|
682
|
+
`);
|
|
683
|
+
}
|
|
684
|
+
process.stdout.write("\n");
|
|
685
|
+
}
|
|
686
|
+
progress = {
|
|
687
|
+
renderProgressBar,
|
|
688
|
+
printMilestoneProgress,
|
|
689
|
+
stageIcon,
|
|
690
|
+
SUPPORTS_COLOR
|
|
691
|
+
};
|
|
692
|
+
return progress;
|
|
693
|
+
}
|
|
694
|
+
|
|
597
695
|
var lib;
|
|
598
696
|
var hasRequiredLib;
|
|
599
697
|
|
|
@@ -601,20 +699,23 @@ function requireLib () {
|
|
|
601
699
|
if (hasRequiredLib) return lib;
|
|
602
700
|
hasRequiredLib = 1;
|
|
603
701
|
lib = {
|
|
604
|
-
...
|
|
605
|
-
...
|
|
702
|
+
...index$1.requireState(),
|
|
703
|
+
...index$1.requireGithub(),
|
|
606
704
|
...requireGsd(),
|
|
607
705
|
...requireGsdAdapter(),
|
|
608
706
|
...requireTemplates(),
|
|
609
|
-
...
|
|
610
|
-
...
|
|
611
|
-
...requireRetry()
|
|
707
|
+
...index$1.requireOutput(),
|
|
708
|
+
...index$1.requireClaude(),
|
|
709
|
+
...requireRetry(),
|
|
710
|
+
...index$1.requireSpinner(),
|
|
711
|
+
...requireProgress(),
|
|
712
|
+
...index$1.requireTui()
|
|
612
713
|
};
|
|
613
714
|
return lib;
|
|
614
715
|
}
|
|
615
716
|
|
|
616
717
|
var libExports = requireLib();
|
|
617
|
-
var index = /*@__PURE__*/
|
|
718
|
+
var index = /*@__PURE__*/index$1.getDefaultExportFromCjs(libExports);
|
|
618
719
|
|
|
619
720
|
module.exports = index;
|
|
620
|
-
0&&(module.exports={getMgwDir,getActiveDir,getCompletedDir,loadProjectState,writeProjectState,loadActiveIssue,mergeProjectState,migrateProjectState,resolveActiveMilestoneIndex,getRepo,getIssue,listIssues,getMilestone,getRateLimit,closeMilestone,createRelease,getProjectNodeId,findExistingBoard,getProjectFields,createProject,addItemToProject,postMilestoneStartAnnouncement,getGsdToolsPath,invokeGsdTool,getTimestamp,generateSlug,resolveModel,historyDigest,roadmapAnalyze,selectGsdRoute,getGsdState,validate,getSchema,VALID_GSD_ROUTES,IS_TTY,IS_CI,USE_COLOR,COLORS,colorize,statusLine,log,error,verbose,debug,formatJson,assertClaudeAvailable,invokeClaude,getCommandsDir,MAX_RETRIES,BACKOFF_BASE_MS,BACKOFF_MAX_MS,classifyFailure,canRetry,incrementRetry,resetRetryState,getBackoffMs});
|
|
721
|
+
0&&(module.exports={getMgwDir,getActiveDir,getCompletedDir,loadProjectState,writeProjectState,loadActiveIssue,mergeProjectState,migrateProjectState,resolveActiveMilestoneIndex,getRepo,getIssue,listIssues,getMilestone,getRateLimit,closeMilestone,createRelease,getProjectNodeId,findExistingBoard,getProjectFields,createProject,addItemToProject,postMilestoneStartAnnouncement,getGsdToolsPath,invokeGsdTool,getTimestamp,generateSlug,resolveModel,historyDigest,roadmapAnalyze,selectGsdRoute,getGsdState,validate,getSchema,VALID_GSD_ROUTES,IS_TTY,IS_CI,USE_COLOR,COLORS,colorize,statusLine,log,error,verbose,debug,formatJson,assertClaudeAvailable,invokeClaude,getCommandsDir,MAX_RETRIES,BACKOFF_BASE_MS,BACKOFF_MAX_MS,classifyFailure,canRetry,incrementRetry,resetRetryState,getBackoffMs,createSpinner,withSpinner,SUPPORTS_SPINNER,renderProgressBar,printMilestoneProgress,stageIcon,SUPPORTS_COLOR,createIssuesBrowser});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@snipcodeit/mgw",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "GitHub-native issue-to-PR automation for Claude Code, powered by Get Shit Done",
|
|
5
5
|
"bin": {
|
|
6
6
|
"mgw": "./dist/bin/mgw.cjs"
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"dist/",
|
|
11
11
|
"bin/mgw-install.cjs",
|
|
12
12
|
"commands/",
|
|
13
|
+
"completions/",
|
|
13
14
|
"templates/"
|
|
14
15
|
],
|
|
15
16
|
"scripts": {
|
|
@@ -17,11 +18,15 @@
|
|
|
17
18
|
"dev": "pkgroll --watch --src .",
|
|
18
19
|
"test": "node --test 'test/**/*.test.cjs'",
|
|
19
20
|
"prepublishOnly": "npm run build",
|
|
21
|
+
"completions": "node bin/generate-completions.cjs",
|
|
20
22
|
"postinstall": "node ./bin/mgw-install.cjs"
|
|
21
23
|
},
|
|
22
24
|
"dependencies": {
|
|
23
25
|
"commander": "^14.0.3"
|
|
24
26
|
},
|
|
27
|
+
"optionalDependencies": {
|
|
28
|
+
"neo-blessed": "^0.2.0"
|
|
29
|
+
},
|
|
25
30
|
"devDependencies": {
|
|
26
31
|
"pkgroll": "^2.26.3"
|
|
27
32
|
},
|