@recapt/mcp 0.0.4-beta → 0.0.6-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/api/client.js +24 -75
- package/dist/cli/commands/setup.d.ts +7 -0
- package/dist/cli/commands/setup.js +180 -0
- package/dist/cli/commands/skill.d.ts +23 -0
- package/dist/cli/commands/skill.js +251 -0
- package/dist/cli/index.d.ts +11 -0
- package/dist/cli/index.js +24 -0
- package/dist/cli/skill.d.ts +14 -0
- package/dist/cli/skill.js +249 -0
- package/dist/cli/utils/ide-config.d.ts +31 -0
- package/dist/cli/utils/ide-config.js +290 -0
- package/dist/cli/utils/prompts.d.ts +22 -0
- package/dist/cli/utils/prompts.js +133 -0
- package/dist/index.d.ts +12 -1
- package/dist/index.js +233 -260
- package/dist/tools/catalog/callTool.d.ts +22 -0
- package/dist/tools/catalog/callTool.js +92 -0
- package/dist/tools/catalog/index.d.ts +11 -0
- package/dist/tools/catalog/index.js +11 -0
- package/dist/tools/catalog/searchTools.d.ts +22 -0
- package/dist/tools/catalog/searchTools.js +194 -0
- package/dist/tools/catalog/toolCatalog.json +16246 -0
- package/package.json +12 -6
- package/skills/deep-dive.md +92 -0
- package/skills/regression-hunt.md +120 -0
- package/skills/self-healing.md +95 -0
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interactive Prompts
|
|
3
|
+
*
|
|
4
|
+
* Readline-based prompts for CLI interactions.
|
|
5
|
+
*/
|
|
6
|
+
import readline from "readline";
|
|
7
|
+
function createInterface() {
|
|
8
|
+
return readline.createInterface({
|
|
9
|
+
input: process.stdin,
|
|
10
|
+
output: process.stdout,
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
export async function confirm(message, defaultYes = true) {
|
|
14
|
+
const hint = defaultYes ? "(Y/n)" : "(y/N)";
|
|
15
|
+
const askOnce = () => {
|
|
16
|
+
const rl = createInterface();
|
|
17
|
+
return new Promise((resolve) => {
|
|
18
|
+
rl.question(`${message} ${hint} `, (answer) => {
|
|
19
|
+
rl.close();
|
|
20
|
+
const normalized = answer.trim().toLowerCase();
|
|
21
|
+
if (normalized === "") {
|
|
22
|
+
resolve(defaultYes);
|
|
23
|
+
}
|
|
24
|
+
else if (normalized === "y" || normalized === "yes") {
|
|
25
|
+
resolve(true);
|
|
26
|
+
}
|
|
27
|
+
else if (normalized === "n" || normalized === "no") {
|
|
28
|
+
resolve(false);
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
resolve(null);
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
let result = await askOnce();
|
|
37
|
+
while (result === null) {
|
|
38
|
+
console.log('Please enter "y" or "n"');
|
|
39
|
+
result = await askOnce();
|
|
40
|
+
}
|
|
41
|
+
return result;
|
|
42
|
+
}
|
|
43
|
+
export async function input(message, defaultValue) {
|
|
44
|
+
const rl = createInterface();
|
|
45
|
+
const hint = defaultValue ? ` (${defaultValue})` : "";
|
|
46
|
+
return new Promise((resolve) => {
|
|
47
|
+
rl.question(`${message}${hint}: `, (answer) => {
|
|
48
|
+
rl.close();
|
|
49
|
+
const value = answer.trim();
|
|
50
|
+
resolve(value || defaultValue || "");
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
export async function secret(message) {
|
|
55
|
+
const rl = createInterface();
|
|
56
|
+
return new Promise((resolve) => {
|
|
57
|
+
rl.question(`${message}: `, (answer) => {
|
|
58
|
+
rl.close();
|
|
59
|
+
resolve(answer.trim());
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
export async function multiSelect(message, options) {
|
|
64
|
+
const rl = createInterface();
|
|
65
|
+
console.log(`\n${message}`);
|
|
66
|
+
console.log("(Enter comma-separated numbers, or 'all' for all options)\n");
|
|
67
|
+
options.forEach((opt, i) => {
|
|
68
|
+
const marker = opt.selected ? "[x]" : "[ ]";
|
|
69
|
+
console.log(` ${i + 1}. ${marker} ${opt.label}`);
|
|
70
|
+
});
|
|
71
|
+
return new Promise((resolve) => {
|
|
72
|
+
rl.question("\nYour selection: ", (answer) => {
|
|
73
|
+
rl.close();
|
|
74
|
+
const normalized = answer.trim().toLowerCase();
|
|
75
|
+
if (normalized === "all" || normalized === "a") {
|
|
76
|
+
resolve(options.map((o) => o.value));
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
if (normalized === "" || normalized === "none" || normalized === "n") {
|
|
80
|
+
resolve(options.filter((o) => o.selected).map((o) => o.value));
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
const indices = normalized
|
|
84
|
+
.split(/[,\s]+/)
|
|
85
|
+
.map((s) => parseInt(s, 10) - 1)
|
|
86
|
+
.filter((i) => i >= 0 && i < options.length);
|
|
87
|
+
resolve(indices.map((i) => options[i].value));
|
|
88
|
+
});
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
export async function select(message, options) {
|
|
92
|
+
const rl = createInterface();
|
|
93
|
+
console.log(`\n${message}\n`);
|
|
94
|
+
options.forEach((opt, i) => {
|
|
95
|
+
console.log(` ${i + 1}. ${opt.label}`);
|
|
96
|
+
});
|
|
97
|
+
return new Promise((resolve) => {
|
|
98
|
+
rl.question("\nYour selection: ", (answer) => {
|
|
99
|
+
rl.close();
|
|
100
|
+
const index = parseInt(answer.trim(), 10) - 1;
|
|
101
|
+
if (index >= 0 && index < options.length) {
|
|
102
|
+
resolve(options[index].value);
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
resolve(null);
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
export function print(message) {
|
|
111
|
+
console.log(message);
|
|
112
|
+
}
|
|
113
|
+
export function success(message) {
|
|
114
|
+
console.log(`✓ ${message}`);
|
|
115
|
+
}
|
|
116
|
+
export function error(message) {
|
|
117
|
+
console.error(`✗ ${message}`);
|
|
118
|
+
}
|
|
119
|
+
export function info(message) {
|
|
120
|
+
console.log(`ℹ ${message}`);
|
|
121
|
+
}
|
|
122
|
+
export function warn(message) {
|
|
123
|
+
console.log(`⚠ ${message}`);
|
|
124
|
+
}
|
|
125
|
+
export function newline() {
|
|
126
|
+
console.log();
|
|
127
|
+
}
|
|
128
|
+
export function header(title) {
|
|
129
|
+
console.log();
|
|
130
|
+
console.log(title);
|
|
131
|
+
console.log("=".repeat(title.length));
|
|
132
|
+
console.log();
|
|
133
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
* MCP Server entry point.
|
|
4
4
|
*
|
|
5
5
|
* Exposes recapt behavioral intelligence as tools for AI coding agents.
|
|
6
|
-
*
|
|
6
|
+
* Uses a search_tools + call_tool pattern to minimize context while
|
|
7
|
+
* providing access to 40+ analysis tools.
|
|
8
|
+
*
|
|
9
|
+
* Exposed tools (10):
|
|
10
|
+
* - search_tools: Discover tools by intent
|
|
11
|
+
* - call_tool: Execute discovered tools
|
|
12
|
+
* - get_domains: List tracked domains
|
|
13
|
+
* - run_full_diagnostic: Self-healing entry point
|
|
14
|
+
* - triage_sessions: Find sessions needing attention
|
|
15
|
+
* - memory_save, memory_recall, memory_list, memory_delete, memory_clear
|
|
16
|
+
*
|
|
17
|
+
* Hidden tools (38): Accessible via call_tool after discovery with search_tools
|
|
7
18
|
*/
|
|
8
19
|
import "dotenv/config";
|