@recapt/mcp 0.0.16-beta → 0.0.18-beta
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/commands/setup-self-improvement-gh.d.ts +7 -0
- package/dist/cli/commands/{setup-self-healing-gh.js → setup-self-improvement-gh.js} +15 -15
- package/dist/cli/commands/setup.js +4 -9
- package/dist/cli/index.d.ts +3 -3
- package/dist/cli/index.js +5 -5
- package/dist/cli/utils/prompts.js +2 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +9 -9
- package/dist/tools/catalog/toolCatalog.json +1932 -1922
- package/dist/tools/diagnostic.d.ts +1 -1
- package/dist/tools/diagnostic.js +1 -1
- package/dist/tools/improvementRun.d.ts +6 -0
- package/dist/tools/{healingRun.js → improvementRun.js} +23 -21
- package/dist/tools/knowledge.d.ts +1 -1
- package/dist/tools/knowledge.js +2 -2
- package/dist/tools/remediation.d.ts +1 -1
- package/dist/tools/remediation.js +1 -1
- package/dist/tools/triage.d.ts +1 -1
- package/dist/tools/triage.js +1 -1
- package/package.json +1 -1
- package/skills/{self-healing.md → self-improvement.md} +75 -39
- package/templates/{self-healing.md → self-improvement.md} +3 -3
- package/dist/cli/commands/setup-self-healing-gh.d.ts +0 -7
- package/dist/tools/healingRun.d.ts +0 -6
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Setup Self-
|
|
2
|
+
* Setup Self-Improvement GitHub Command
|
|
3
3
|
*
|
|
4
|
-
* Interactive wizard to set up the self-
|
|
4
|
+
* Interactive wizard to set up the self-improvement agentic workflow for GitHub.
|
|
5
5
|
*/
|
|
6
6
|
import { Command } from "commander";
|
|
7
7
|
import { exec, execSync } from "child_process";
|
|
@@ -13,8 +13,8 @@ import { confirm, select, multiSelect, input, header, print, success, error, inf
|
|
|
13
13
|
const __filename = fileURLToPath(import.meta.url);
|
|
14
14
|
const __dirname = path.dirname(__filename);
|
|
15
15
|
const TEMPLATES_DIR = path.resolve(__dirname, "../../../templates");
|
|
16
|
-
const WORKFLOW_TEMPLATE = "self-
|
|
17
|
-
const WORKFLOW_DEST = ".github/workflows/self-
|
|
16
|
+
const WORKFLOW_TEMPLATE = "self-improvement.md";
|
|
17
|
+
const WORKFLOW_DEST = ".github/workflows/self-improvement.md";
|
|
18
18
|
const ENGINES = [
|
|
19
19
|
{ id: "claude", name: "Claude (Anthropic)", secretName: "ANTHROPIC_API_KEY" },
|
|
20
20
|
{ id: "copilot", name: "GitHub Copilot", secretName: "COPILOT_GITHUB_TOKEN" },
|
|
@@ -98,8 +98,8 @@ function openBrowser(url) {
|
|
|
98
98
|
}
|
|
99
99
|
});
|
|
100
100
|
}
|
|
101
|
-
async function
|
|
102
|
-
header("Recapt Self-
|
|
101
|
+
async function runSetupSelfImprovementGh() {
|
|
102
|
+
header("Recapt Self-Improvement GitHub Setup");
|
|
103
103
|
const cwd = process.cwd();
|
|
104
104
|
print("Checking prerequisites...");
|
|
105
105
|
newline();
|
|
@@ -192,10 +192,10 @@ async function runSetupSelfHealingGh() {
|
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
194
|
newline();
|
|
195
|
-
print("Installing self-
|
|
196
|
-
const skillInstalled = installSkill(cwd, "self-
|
|
195
|
+
print("Installing self-improvement skill...");
|
|
196
|
+
const skillInstalled = installSkill(cwd, "self-improvement", true);
|
|
197
197
|
if (!skillInstalled) {
|
|
198
|
-
error("Failed to install self-
|
|
198
|
+
error("Failed to install self-improvement skill");
|
|
199
199
|
process.exit(1);
|
|
200
200
|
}
|
|
201
201
|
newline();
|
|
@@ -259,7 +259,7 @@ Analyze and fix issues across all domains configured in recapt. Call \`get_domai
|
|
|
259
259
|
print("Compiling workflow...");
|
|
260
260
|
try {
|
|
261
261
|
execSync("gh aw compile", { cwd, stdio: "inherit" });
|
|
262
|
-
success("Created: .github/workflows/self-
|
|
262
|
+
success("Created: .github/workflows/self-improvement.lock.yml");
|
|
263
263
|
}
|
|
264
264
|
catch {
|
|
265
265
|
warn("Failed to compile workflow. You can run 'gh aw compile' manually.");
|
|
@@ -286,9 +286,9 @@ Analyze and fix issues across all domains configured in recapt. Call \`get_domai
|
|
|
286
286
|
success("Setup complete!");
|
|
287
287
|
newline();
|
|
288
288
|
print("Next steps:");
|
|
289
|
-
print(' 1. git add . && git commit -m "Add recapt self-
|
|
289
|
+
print(' 1. git add . && git commit -m "Add recapt self-improvement workflow"');
|
|
290
290
|
print(" 2. git push");
|
|
291
|
-
print(" 3. Run manually: gh aw run self-
|
|
291
|
+
print(" 3. Run manually: gh aw run self-improvement");
|
|
292
292
|
newline();
|
|
293
293
|
warn("Important: Enable PR creation permissions");
|
|
294
294
|
info("The workflow needs permission to create pull requests.");
|
|
@@ -297,11 +297,11 @@ Analyze and fix issues across all domains configured in recapt. Call \`get_domai
|
|
|
297
297
|
info("(This may need to be set at the organization level)");
|
|
298
298
|
newline();
|
|
299
299
|
}
|
|
300
|
-
export const
|
|
301
|
-
.description("Set up automated self-
|
|
300
|
+
export const setupSelfImprovementGhCommand = new Command("setup-self-improvement-gh")
|
|
301
|
+
.description("Set up automated self-improvement workflow for GitHub Actions")
|
|
302
302
|
.action(async () => {
|
|
303
303
|
try {
|
|
304
|
-
await
|
|
304
|
+
await runSetupSelfImprovementGh();
|
|
305
305
|
}
|
|
306
306
|
catch (err) {
|
|
307
307
|
error(`Setup failed: ${err}`);
|
|
@@ -9,7 +9,6 @@ import { detectInstalledIdes, addRecaptToIdeConfig, } from "../utils/ide-config.
|
|
|
9
9
|
import { confirm, secret, multiSelect, header, print, success, error, info, warn, newline, } from "../utils/prompts.js";
|
|
10
10
|
import { installAllSkills, installSelectedSkills, getAvailableSkills, } from "./skill.js";
|
|
11
11
|
const SETTINGS_URL = "https://dash.recapt.app/settings";
|
|
12
|
-
const MCP_KEY_PREFIX = "mcp_sk_";
|
|
13
12
|
function openBrowser(url) {
|
|
14
13
|
const platform = process.platform;
|
|
15
14
|
let command;
|
|
@@ -29,9 +28,6 @@ function openBrowser(url) {
|
|
|
29
28
|
}
|
|
30
29
|
});
|
|
31
30
|
}
|
|
32
|
-
function validateMcpKey(key) {
|
|
33
|
-
return (key.startsWith(MCP_KEY_PREFIX) && key.length > MCP_KEY_PREFIX.length + 10);
|
|
34
|
-
}
|
|
35
31
|
async function promptForKey() {
|
|
36
32
|
const hasKey = await confirm("Do you have a Recapt MCP key?", false);
|
|
37
33
|
if (!hasKey) {
|
|
@@ -42,15 +38,12 @@ async function promptForKey() {
|
|
|
42
38
|
openBrowser(SETTINGS_URL);
|
|
43
39
|
await new Promise((resolve) => setTimeout(resolve, 2000));
|
|
44
40
|
}
|
|
45
|
-
const
|
|
41
|
+
const rawKey = await secret("Paste your MCP key");
|
|
42
|
+
const key = rawKey?.trim();
|
|
46
43
|
if (!key) {
|
|
47
44
|
error("No key provided.");
|
|
48
45
|
return null;
|
|
49
46
|
}
|
|
50
|
-
if (!validateMcpKey(key)) {
|
|
51
|
-
error(`Invalid MCP key format. Keys should start with "${MCP_KEY_PREFIX}".`);
|
|
52
|
-
return null;
|
|
53
|
-
}
|
|
54
47
|
return key;
|
|
55
48
|
}
|
|
56
49
|
async function runSetup() {
|
|
@@ -82,6 +75,8 @@ async function runSetup() {
|
|
|
82
75
|
return;
|
|
83
76
|
}
|
|
84
77
|
newline();
|
|
78
|
+
// Small delay to prevent stdin buffering issues from IDE selection
|
|
79
|
+
await new Promise((resolve) => setTimeout(resolve, 100));
|
|
85
80
|
const mcpKey = await promptForKey();
|
|
86
81
|
if (!mcpKey) {
|
|
87
82
|
process.exit(1);
|
package/dist/cli/index.d.ts
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* Unified command-line interface for recapt MCP server management.
|
|
6
6
|
*
|
|
7
7
|
* Commands:
|
|
8
|
-
* setup
|
|
9
|
-
* setup-self-
|
|
10
|
-
* skill
|
|
8
|
+
* setup - Configure recapt MCP server for your AI IDE(s)
|
|
9
|
+
* setup-self-improvement-gh - Set up automated self-improvement workflow for GitHub
|
|
10
|
+
* skill - Manage recapt workflow skills
|
|
11
11
|
*/
|
|
12
12
|
export {};
|
package/dist/cli/index.js
CHANGED
|
@@ -5,15 +5,15 @@
|
|
|
5
5
|
* Unified command-line interface for recapt MCP server management.
|
|
6
6
|
*
|
|
7
7
|
* Commands:
|
|
8
|
-
* setup
|
|
9
|
-
* setup-self-
|
|
10
|
-
* skill
|
|
8
|
+
* setup - Configure recapt MCP server for your AI IDE(s)
|
|
9
|
+
* setup-self-improvement-gh - Set up automated self-improvement workflow for GitHub
|
|
10
|
+
* skill - Manage recapt workflow skills
|
|
11
11
|
*/
|
|
12
12
|
import { Command } from "commander";
|
|
13
13
|
import { createRequire } from "module";
|
|
14
14
|
import { skillCommand } from "./commands/skill.js";
|
|
15
15
|
import { setupCommand } from "./commands/setup.js";
|
|
16
|
-
import {
|
|
16
|
+
import { setupSelfImprovementGhCommand } from "./commands/setup-self-improvement-gh.js";
|
|
17
17
|
const require = createRequire(import.meta.url);
|
|
18
18
|
const pkg = require("../../package.json");
|
|
19
19
|
const program = new Command();
|
|
@@ -22,6 +22,6 @@ program
|
|
|
22
22
|
.description("Recapt MCP CLI - Configure and manage recapt for AI IDEs")
|
|
23
23
|
.version(pkg.version);
|
|
24
24
|
program.addCommand(setupCommand);
|
|
25
|
-
program.addCommand(
|
|
25
|
+
program.addCommand(setupSelfImprovementGhCommand);
|
|
26
26
|
program.addCommand(skillCommand);
|
|
27
27
|
program.parse();
|
|
@@ -17,10 +17,11 @@ export async function input(message, defaultValue) {
|
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
export async function secret(message) {
|
|
20
|
-
|
|
20
|
+
const value = await inquirerPassword({
|
|
21
21
|
message,
|
|
22
22
|
mask: "*",
|
|
23
23
|
});
|
|
24
|
+
return value.trim();
|
|
24
25
|
}
|
|
25
26
|
export async function multiSelect(message, options) {
|
|
26
27
|
return inquirerCheckbox({
|
package/dist/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* - search_tools: Discover tools by intent
|
|
11
11
|
* - call_tool: Execute discovered tools
|
|
12
12
|
* - get_domains: List tracked domains
|
|
13
|
-
* - run_full_diagnostic: Self-
|
|
13
|
+
* - run_full_diagnostic: Self-improvement entry point
|
|
14
14
|
* - triage_sessions: Find sessions needing attention
|
|
15
15
|
* - memory_save, memory_recall, memory_list, memory_delete, memory_clear
|
|
16
16
|
*
|
package/dist/index.js
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* - search_tools: Discover tools by intent
|
|
11
11
|
* - call_tool: Execute discovered tools
|
|
12
12
|
* - get_domains: List tracked domains
|
|
13
|
-
* - run_full_diagnostic: Self-
|
|
13
|
+
* - run_full_diagnostic: Self-improvement entry point
|
|
14
14
|
* - triage_sessions: Find sessions needing attention
|
|
15
15
|
* - memory_save, memory_recall, memory_list, memory_delete, memory_clear
|
|
16
16
|
*
|
|
@@ -204,12 +204,12 @@ function registerHiddenTools() {
|
|
|
204
204
|
})));
|
|
205
205
|
registerToolHandler("delete_site_knowledge", createApiHandler("DELETE", (args) => `/knowledge/${args.knowledge_id}`));
|
|
206
206
|
registerToolHandler("get_similar_fixes", createApiHandler("GET", "/knowledge/similar-fixes"));
|
|
207
|
-
//
|
|
208
|
-
registerToolHandler("
|
|
209
|
-
registerToolHandler("
|
|
210
|
-
registerToolHandler("
|
|
211
|
-
registerToolHandler("
|
|
212
|
-
registerToolHandler("
|
|
207
|
+
// Improvement Runs (workflow tracking)
|
|
208
|
+
registerToolHandler("start_improvement_run", createApiHandler("POST", "/improvement-runs"));
|
|
209
|
+
registerToolHandler("update_improvement_run", createApiHandler("PATCH", (args) => `/improvement-runs/${args.run_id}`));
|
|
210
|
+
registerToolHandler("record_improvement_action", createApiHandler("POST", (args) => `/improvement-runs/${args.run_id}/actions`));
|
|
211
|
+
registerToolHandler("get_improvement_run", createApiHandler("GET", (args) => `/improvement-runs/${args.run_id}`));
|
|
212
|
+
registerToolHandler("list_improvement_runs", createApiHandler("GET", "/improvement-runs"));
|
|
213
213
|
}
|
|
214
214
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
215
215
|
// Server Instructions
|
|
@@ -298,10 +298,10 @@ Some tools have built-in limits for performance:
|
|
|
298
298
|
|
|
299
299
|
## Installable Skills
|
|
300
300
|
|
|
301
|
-
For guided workflows (self-
|
|
301
|
+
For guided workflows (self-improvement, deep-dive analysis, regression hunting), install recapt skills:
|
|
302
302
|
\`\`\`bash
|
|
303
303
|
npx @recapt/mcp skill list
|
|
304
|
-
npx @recapt/mcp skill install self-
|
|
304
|
+
npx @recapt/mcp skill install self-improvement
|
|
305
305
|
\`\`\`
|
|
306
306
|
Skills provide step-by-step guidance for complex multi-tool workflows.`;
|
|
307
307
|
// ─────────────────────────────────────────────────────────────────────────────
|