@recapt/mcp 0.0.14-beta → 0.0.16-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-healing-gh.js +1 -1
- package/dist/cli/commands/skill.d.ts +3 -3
- package/dist/cli/commands/skill.js +24 -11
- package/dist/index.js +28 -1
- package/dist/tools/catalog/toolCatalog.json +2080 -0
- package/dist/tools/diagnostic.js +5 -1
- package/dist/tools/healingRun.d.ts +6 -0
- package/dist/tools/healingRun.js +313 -0
- package/dist/tools/triageSessions.js +3 -1
- package/dist/tools/upgradeOptions.d.ts +7 -0
- package/dist/tools/upgradeOptions.js +67 -0
- package/package.json +1 -1
- package/skills/self-healing.md +237 -14
|
@@ -193,7 +193,7 @@ async function runSetupSelfHealingGh() {
|
|
|
193
193
|
}
|
|
194
194
|
newline();
|
|
195
195
|
print("Installing self-healing skill...");
|
|
196
|
-
const skillInstalled = installSkill(cwd, "self-healing");
|
|
196
|
+
const skillInstalled = installSkill(cwd, "self-healing", true);
|
|
197
197
|
if (!skillInstalled) {
|
|
198
198
|
error("Failed to install self-healing skill");
|
|
199
199
|
process.exit(1);
|
|
@@ -12,13 +12,13 @@ interface SkillInfo {
|
|
|
12
12
|
}
|
|
13
13
|
export type { SkillInfo };
|
|
14
14
|
export declare function getAvailableSkills(): SkillInfo[];
|
|
15
|
-
export declare function installSkill(cwd: string, skillName: string): boolean;
|
|
15
|
+
export declare function installSkill(cwd: string, skillName: string, force?: boolean): boolean;
|
|
16
16
|
export interface InstallResult {
|
|
17
17
|
success: boolean;
|
|
18
18
|
installed: string[];
|
|
19
19
|
failed: string[];
|
|
20
20
|
error?: string;
|
|
21
21
|
}
|
|
22
|
-
export declare function installAllSkills(cwd: string): InstallResult;
|
|
23
|
-
export declare function installSelectedSkills(cwd: string, skillNames: string[]): InstallResult;
|
|
22
|
+
export declare function installAllSkills(cwd: string, force?: boolean): InstallResult;
|
|
23
|
+
export declare function installSelectedSkills(cwd: string, skillNames: string[], force?: boolean): InstallResult;
|
|
24
24
|
export declare const skillCommand: Command;
|
|
@@ -115,7 +115,7 @@ ${MARKER_END}`;
|
|
|
115
115
|
}
|
|
116
116
|
writeAgentsMd(cwd, content + "\n");
|
|
117
117
|
}
|
|
118
|
-
export function installSkill(cwd, skillName) {
|
|
118
|
+
export function installSkill(cwd, skillName, force = false) {
|
|
119
119
|
let skills;
|
|
120
120
|
try {
|
|
121
121
|
skills = getAvailableSkills();
|
|
@@ -134,11 +134,23 @@ export function installSkill(cwd, skillName) {
|
|
|
134
134
|
const sourcePath = path.join(SKILLS_DIR, skill.file);
|
|
135
135
|
const destPath = path.join(cwd, AGENTS_DIR, skill.file);
|
|
136
136
|
if (fs.existsSync(destPath)) {
|
|
137
|
-
|
|
138
|
-
|
|
137
|
+
const sourceContent = fs.readFileSync(sourcePath, "utf-8");
|
|
138
|
+
const destContent = fs.readFileSync(destPath, "utf-8");
|
|
139
|
+
if (sourceContent === destContent) {
|
|
140
|
+
console.log(`Skill already up to date: ${skillName}`);
|
|
141
|
+
return true;
|
|
142
|
+
}
|
|
143
|
+
if (!force) {
|
|
144
|
+
console.log(`Skill outdated: ${skillName} (use --force to update)`);
|
|
145
|
+
return true;
|
|
146
|
+
}
|
|
147
|
+
fs.copyFileSync(sourcePath, destPath);
|
|
148
|
+
console.log(`Updated: ${skillName} → ${AGENTS_DIR}/${skill.file}`);
|
|
149
|
+
}
|
|
150
|
+
else {
|
|
151
|
+
fs.copyFileSync(sourcePath, destPath);
|
|
152
|
+
console.log(`Installed: ${skillName} → ${AGENTS_DIR}/${skill.file}`);
|
|
139
153
|
}
|
|
140
|
-
fs.copyFileSync(sourcePath, destPath);
|
|
141
|
-
console.log(`Installed: ${skillName} → ${AGENTS_DIR}/${skill.file}`);
|
|
142
154
|
updateAgentsMdReferences(cwd);
|
|
143
155
|
return true;
|
|
144
156
|
}
|
|
@@ -180,7 +192,7 @@ function listSkills(cwd) {
|
|
|
180
192
|
}
|
|
181
193
|
console.log();
|
|
182
194
|
}
|
|
183
|
-
export function installAllSkills(cwd) {
|
|
195
|
+
export function installAllSkills(cwd, force = false) {
|
|
184
196
|
let skills;
|
|
185
197
|
try {
|
|
186
198
|
skills = getAvailableSkills();
|
|
@@ -190,14 +202,14 @@ export function installAllSkills(cwd) {
|
|
|
190
202
|
console.error(`Failed to load skills: ${message}`);
|
|
191
203
|
return { success: false, installed: [], failed: [], error: message };
|
|
192
204
|
}
|
|
193
|
-
return installSelectedSkills(cwd, skills.map((s) => s.name));
|
|
205
|
+
return installSelectedSkills(cwd, skills.map((s) => s.name), force);
|
|
194
206
|
}
|
|
195
|
-
export function installSelectedSkills(cwd, skillNames) {
|
|
207
|
+
export function installSelectedSkills(cwd, skillNames, force = false) {
|
|
196
208
|
const installed = [];
|
|
197
209
|
const failed = [];
|
|
198
210
|
for (const skillName of skillNames) {
|
|
199
211
|
try {
|
|
200
|
-
if (installSkill(cwd, skillName)) {
|
|
212
|
+
if (installSkill(cwd, skillName, force)) {
|
|
201
213
|
installed.push(skillName);
|
|
202
214
|
}
|
|
203
215
|
else {
|
|
@@ -224,17 +236,18 @@ const installCommand = new Command("install")
|
|
|
224
236
|
.description("Install a skill")
|
|
225
237
|
.argument("[name]", "Skill name to install")
|
|
226
238
|
.option("-a, --all", "Install all skills")
|
|
239
|
+
.option("-f, --force", "Force update if skill already exists")
|
|
227
240
|
.action((name, options) => {
|
|
228
241
|
const cwd = process.cwd();
|
|
229
242
|
if (options.all) {
|
|
230
|
-
installAllSkills(cwd);
|
|
243
|
+
installAllSkills(cwd, options.force);
|
|
231
244
|
return;
|
|
232
245
|
}
|
|
233
246
|
if (!name) {
|
|
234
247
|
console.error("Usage: recapt skill install <name> or recapt skill install --all");
|
|
235
248
|
process.exit(1);
|
|
236
249
|
}
|
|
237
|
-
if (installSkill(cwd, name)) {
|
|
250
|
+
if (installSkill(cwd, name, options.force)) {
|
|
238
251
|
console.log(`\nSkill reference added to ${AGENTS_MD}`);
|
|
239
252
|
}
|
|
240
253
|
});
|
package/dist/index.js
CHANGED
|
@@ -30,6 +30,7 @@ import { registerGetDomains } from "./tools/getDomains.js";
|
|
|
30
30
|
import { registerMemoryTools } from "./tools/memory.js";
|
|
31
31
|
import { registerTriageSessions } from "./tools/triageSessions.js";
|
|
32
32
|
import { registerDiagnosticTools } from "./tools/diagnostic.js";
|
|
33
|
+
import { registerGetUpgradeOptions } from "./tools/upgradeOptions.js";
|
|
33
34
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
34
35
|
// Hidden Tool Handlers - Registered with call_tool registry
|
|
35
36
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
@@ -203,6 +204,12 @@ function registerHiddenTools() {
|
|
|
203
204
|
})));
|
|
204
205
|
registerToolHandler("delete_site_knowledge", createApiHandler("DELETE", (args) => `/knowledge/${args.knowledge_id}`));
|
|
205
206
|
registerToolHandler("get_similar_fixes", createApiHandler("GET", "/knowledge/similar-fixes"));
|
|
207
|
+
// Healing Runs (workflow tracking)
|
|
208
|
+
registerToolHandler("start_healing_run", createApiHandler("POST", "/healing-runs"));
|
|
209
|
+
registerToolHandler("update_healing_run", createApiHandler("PATCH", (args) => `/healing-runs/${args.run_id}`));
|
|
210
|
+
registerToolHandler("record_healing_action", createApiHandler("POST", (args) => `/healing-runs/${args.run_id}/actions`));
|
|
211
|
+
registerToolHandler("get_healing_run", createApiHandler("GET", (args) => `/healing-runs/${args.run_id}`));
|
|
212
|
+
registerToolHandler("list_healing_runs", createApiHandler("GET", "/healing-runs"));
|
|
206
213
|
}
|
|
207
214
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
208
215
|
// Server Instructions
|
|
@@ -233,8 +240,27 @@ These tools are always visible (no search needed):
|
|
|
233
240
|
- **get_domains** — List tracked domains (good starting point)
|
|
234
241
|
- **run_full_diagnostic** — Quick site health overview (lightweight, fast)
|
|
235
242
|
- **triage_sessions** — Find sessions needing attention
|
|
243
|
+
- **get_upgrade_options** — Check available plan upgrades and features
|
|
236
244
|
- **memory_*** — Store/retrieve intermediate results
|
|
237
245
|
|
|
246
|
+
## Tier-Based Access
|
|
247
|
+
|
|
248
|
+
Some features are limited based on the user's subscription tier:
|
|
249
|
+
|
|
250
|
+
**Free Tier (Diagnose):**
|
|
251
|
+
- Full access to issue detection and diagnostics
|
|
252
|
+
- Session summaries and triage results
|
|
253
|
+
- Page metrics and health scores
|
|
254
|
+
|
|
255
|
+
**Paid Tiers (Solve):**
|
|
256
|
+
- Session replay URLs (Starter+)
|
|
257
|
+
- Detailed investigation data (Starter+)
|
|
258
|
+
- AI-powered fix suggestions (Team+)
|
|
259
|
+
- Outcome predictions (Team+)
|
|
260
|
+
|
|
261
|
+
When a response includes an \`upgrade\` object, the user needs a higher tier for full access.
|
|
262
|
+
Use \`get_upgrade_options\` to explain the benefits of upgrading.
|
|
263
|
+
|
|
238
264
|
## Comprehensive Site Analysis
|
|
239
265
|
|
|
240
266
|
For a full site analysis, run these tools in sequence:
|
|
@@ -303,10 +329,11 @@ async function main() {
|
|
|
303
329
|
registerGetDomains(server);
|
|
304
330
|
registerDiagnosticTools(server); // Includes run_full_diagnostic
|
|
305
331
|
registerTriageSessions(server);
|
|
332
|
+
registerGetUpgradeOptions(server);
|
|
306
333
|
registerMemoryTools(server);
|
|
307
334
|
const transport = new StdioServerTransport();
|
|
308
335
|
await server.connect(transport);
|
|
309
|
-
console.error("[MCP] Server running on stdio (
|
|
336
|
+
console.error("[MCP] Server running on stdio (11 exposed tools, 38 hidden)");
|
|
310
337
|
}
|
|
311
338
|
main().catch((err) => {
|
|
312
339
|
console.error("[MCP] Fatal error:", err);
|