@recapt/mcp 0.0.22 → 0.0.26

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/cli/index.js CHANGED
@@ -762,8 +762,13 @@ import { fileURLToPath as fileURLToPath2 } from "url";
762
762
  var __filename3 = fileURLToPath2(import.meta.url);
763
763
  var __dirname3 = path3.dirname(__filename3);
764
764
  var TEMPLATES_DIR = path3.resolve(__dirname3, "../../../templates");
765
- var WORKFLOW_TEMPLATE = "self-improvement.md";
766
- var WORKFLOW_DEST = ".github/workflows/self-improvement.md";
765
+ var WORKFLOW_TEMPLATES = {
766
+ lite: "self-improvement-lite.md",
767
+ full: "self-improvement-full.md"
768
+ };
769
+ function getWorkflowDest(variant) {
770
+ return `.github/workflows/self-improvement-${variant}.md`;
771
+ }
767
772
  var ENGINES = [
768
773
  { id: "claude", name: "Claude (Anthropic)", secretName: "ANTHROPIC_API_KEY" },
769
774
  { id: "copilot", name: "GitHub Copilot", secretName: "COPILOT_GITHUB_TOKEN" },
@@ -840,7 +845,7 @@ function openBrowser2(url) {
840
845
  }
841
846
  });
842
847
  }
843
- async function runSetupSelfImprovementGh() {
848
+ async function runSetupSelfImprovementGh(variantFromFlag) {
844
849
  header("Recapt Self-Improvement GitHub Setup");
845
850
  const cwd = process.cwd();
846
851
  print("Checking prerequisites...");
@@ -897,6 +902,29 @@ async function runSetupSelfImprovementGh() {
897
902
  process.exit(1);
898
903
  }
899
904
  newline();
905
+ let selectedVariant;
906
+ if (variantFromFlag === "lite" || variantFromFlag === "full") {
907
+ selectedVariant = variantFromFlag;
908
+ info(`Using variant: ${selectedVariant}`);
909
+ } else {
910
+ const variantOptions = [
911
+ {
912
+ label: "Lite (Sequential) - Single agent, one combined PR, ~5x cheaper",
913
+ value: "lite"
914
+ },
915
+ {
916
+ label: "Full (Parallel) - Orchestrator + workers, 1 PR per issue, faster for many issues",
917
+ value: "full"
918
+ }
919
+ ];
920
+ const variant = await select("Which workflow variant?", variantOptions);
921
+ if (!variant) {
922
+ error("No variant selected.");
923
+ process.exit(1);
924
+ }
925
+ selectedVariant = variant;
926
+ }
927
+ newline();
900
928
  print("Configuring domain filter...");
901
929
  info("You can optionally limit the workflow to specific domains.");
902
930
  newline();
@@ -948,8 +976,10 @@ async function runSetupSelfImprovementGh() {
948
976
  }
949
977
  newline();
950
978
  print("Creating workflow...");
951
- const templatePath = path3.join(TEMPLATES_DIR, WORKFLOW_TEMPLATE);
952
- const destPath = path3.join(cwd, WORKFLOW_DEST);
979
+ const templateFile = WORKFLOW_TEMPLATES[selectedVariant];
980
+ const templatePath = path3.join(TEMPLATES_DIR, templateFile);
981
+ const workflowDest = getWorkflowDest(selectedVariant);
982
+ const destPath = path3.join(cwd, workflowDest);
953
983
  const destDir = path3.dirname(destPath);
954
984
  if (!fs3.existsSync(templatePath)) {
955
985
  error(`Workflow template not found: ${templatePath}`);
@@ -993,17 +1023,19 @@ Analyze and fix issues across all domains configured in recapt. Call \`get_domai
993
1023
  info("Skipping workflow creation");
994
1024
  } else {
995
1025
  fs3.writeFileSync(destPath, workflowContent);
996
- success(`Created: ${WORKFLOW_DEST}`);
1026
+ success(`Created: ${workflowDest}`);
997
1027
  }
998
1028
  } else {
999
1029
  fs3.writeFileSync(destPath, workflowContent);
1000
- success(`Created: ${WORKFLOW_DEST}`);
1030
+ success(`Created: ${workflowDest}`);
1001
1031
  }
1002
1032
  newline();
1003
1033
  print("Compiling workflow...");
1004
1034
  try {
1005
1035
  execSync("gh aw compile", { cwd, stdio: "inherit" });
1006
- success("Created: .github/workflows/self-improvement.lock.yml");
1036
+ success(
1037
+ `Created: .github/workflows/self-improvement-${selectedVariant}.lock.yml`
1038
+ );
1007
1039
  } catch {
1008
1040
  warn("Failed to compile workflow. You can run 'gh aw compile' manually.");
1009
1041
  }
@@ -1034,7 +1066,7 @@ Analyze and fix issues across all domains configured in recapt. Call \`get_domai
1034
1066
  ' 1. git add . && git commit -m "Add recapt self-improvement workflow"'
1035
1067
  );
1036
1068
  print(" 2. git push");
1037
- print(" 3. Run manually: gh aw run self-improvement");
1069
+ print(` 3. Run manually: gh aw run self-improvement-${selectedVariant}`);
1038
1070
  newline();
1039
1071
  warn("Important: Enable PR creation permissions");
1040
1072
  info("The workflow needs permission to create pull requests.");
@@ -1045,9 +1077,12 @@ Analyze and fix issues across all domains configured in recapt. Call \`get_domai
1045
1077
  }
1046
1078
  var setupSelfImprovementGhCommand = new Command3(
1047
1079
  "setup-self-improvement-gh"
1048
- ).description("Set up automated self-improvement workflow for GitHub Actions").action(async () => {
1080
+ ).description("Set up automated self-improvement workflow for GitHub Actions").option(
1081
+ "-v, --variant <variant>",
1082
+ "Workflow variant: lite (single agent, one PR) or full (parallel workers, multiple PRs)"
1083
+ ).action(async (options) => {
1049
1084
  try {
1050
- await runSetupSelfImprovementGh();
1085
+ await runSetupSelfImprovementGh(options.variant);
1051
1086
  } catch (err) {
1052
1087
  error(`Setup failed: ${err}`);
1053
1088
  process.exit(1);