@skyramp/mcp 0.4.4-rc.2 → 0.5.0-rc.2
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/build/entitlements/entitlementGate.d.ts +8 -0
- package/build/entitlements/entitlementGate.js +57 -0
- package/build/entitlements/runCodes.d.ts +18 -0
- package/build/entitlements/runCodes.js +15 -0
- package/build/index.js +4 -4
- package/build/playwright/essentialTools.d.ts +1 -0
- package/build/playwright/essentialTools.js +43 -0
- package/build/playwright/registerPlaywrightTools.js +1 -43
- package/build/prompts/initialize-workspace/initializeWorkspacePrompt.d.ts +17 -0
- package/build/prompts/initialize-workspace/initializeWorkspacePrompt.js +46 -177
- package/build/prompts/test-maintenance/driftAnalysisShared.js +1 -1
- package/build/tool-phases.d.ts +14 -8
- package/build/tool-phases.js +83 -43
- package/build/tools/workspace/initScanWorkspaceTool.d.ts +11 -1
- package/build/tools/workspace/initScanWorkspaceTool.js +100 -9
- package/build/tools/workspace/initializeWorkspaceTool.js +40 -4
- package/build/utils/versions.d.ts +3 -3
- package/build/utils/versions.js +1 -1
- package/build/workspace/workspace.d.ts +51 -121
- package/build/workspace/workspace.js +34 -47
- package/build/workspace/workspaceVerifier.d.ts +22 -0
- package/build/workspace/workspaceVerifier.js +65 -0
- package/package.json +2 -2
- package/plugin/prompts/plan-tests.md +2 -2
- package/plugin/skills/setup-testbot-target-sut/SKILL.md +54 -0
- package/plugin/skills/setup-testbot-target-sut/reference/ci-workflow.md +26 -0
- package/plugin/skills/setup-testbot-target-sut/reference/existing-tests.md +14 -0
- package/plugin/skills/setup-testbot-target-sut/reference/troubleshooting.md +20 -0
- package/build/prompts/sut-setup/modes/adaptWorkflowPrompt.d.ts +0 -2
- package/build/prompts/sut-setup/modes/adaptWorkflowPrompt.js +0 -178
- package/build/prompts/sut-setup/modes/dockerComposePrompt.d.ts +0 -2
- package/build/prompts/sut-setup/modes/dockerComposePrompt.js +0 -311
- package/build/prompts/sut-setup/shared.d.ts +0 -62
- package/build/prompts/sut-setup/shared.js +0 -196
- package/build/resources/sutSetupResource.d.ts +0 -2
- package/build/resources/sutSetupResource.js +0 -63
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { ResourceTemplate } from "@modelcontextprotocol/server";
|
|
2
|
-
import { logger } from "../utils/logger.js";
|
|
3
|
-
import { resourceText } from "../utils/utils.js";
|
|
4
|
-
import { AnalyticsService } from "../services/AnalyticsService.js";
|
|
5
|
-
import { getAdaptWorkflowPrompt } from "../prompts/sut-setup/modes/adaptWorkflowPrompt.js";
|
|
6
|
-
import { getDockerComposePrompt } from "../prompts/sut-setup/modes/dockerComposePrompt.js";
|
|
7
|
-
import { SutSetupMode, } from "../prompts/sut-setup/shared.js";
|
|
8
|
-
import { getLocalRepositoryInfo } from "../utils/telemetry.js";
|
|
9
|
-
export function registerSutSetupResource(server) {
|
|
10
|
-
logger.info("Registering SUT setup resource");
|
|
11
|
-
// RFC 6570 {+rest} (reserved expansion) captures the entire query string
|
|
12
|
-
// including the leading "?". This avoids the SDK's per-param regex which
|
|
13
|
-
// fails on empty query-param values.
|
|
14
|
-
const template = new ResourceTemplate("skyramp://prompts/skyramp_testbot_sut{+rest}", { list: undefined });
|
|
15
|
-
server.registerResource("skyramp_testbot_sut", template, {
|
|
16
|
-
title: "Skyramp Testbot SUT Setup",
|
|
17
|
-
description: "Returns mode-specific instructions for SUT (System Under Test) setup. " +
|
|
18
|
-
"Modes: none, adapt_workflow, docker_compose.",
|
|
19
|
-
mimeType: "text/plain",
|
|
20
|
-
}, async (uri) => {
|
|
21
|
-
const param = (name, fallback) => uri.searchParams.get(name) ?? fallback;
|
|
22
|
-
const mode = param("sutSetupMode", SutSetupMode.None);
|
|
23
|
-
const repositoryPath = param("repositoryPath", ".");
|
|
24
|
-
// The released action sends no `repository` on this URI at all. Read the
|
|
25
|
-
// same thing it reads for the testbot URI — the origin remote of this very
|
|
26
|
-
// checkout — so the two names can never disagree.
|
|
27
|
-
// TODO: drop the fallback once a released action sends it here.
|
|
28
|
-
let repository = (uri.searchParams.get("repository") ?? "").trim();
|
|
29
|
-
// Mode "none" returns a fixed string that names no repository.
|
|
30
|
-
if (mode !== SutSetupMode.None) {
|
|
31
|
-
if (!repository) {
|
|
32
|
-
repository =
|
|
33
|
-
(await getLocalRepositoryInfo(repositoryPath)).repository ?? "";
|
|
34
|
-
}
|
|
35
|
-
if (!repository) {
|
|
36
|
-
return resourceText(uri.toString(), `repository is required: pass the checkout's owner/repo on the resource URI, or run where ${repositoryPath} has an origin remote that names one`);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
const args = {
|
|
40
|
-
repositoryPath,
|
|
41
|
-
repository,
|
|
42
|
-
sutSetupMode: mode,
|
|
43
|
-
sutSourceWorkflowFile: param("sutSourceWorkflowFile", ""),
|
|
44
|
-
sutSourceDockerComposeFile: param("sutSourceDockerComposeFile", ""),
|
|
45
|
-
};
|
|
46
|
-
let prompt;
|
|
47
|
-
switch (mode) {
|
|
48
|
-
case SutSetupMode.AdaptWorkflow:
|
|
49
|
-
prompt = getAdaptWorkflowPrompt(args);
|
|
50
|
-
break;
|
|
51
|
-
case SutSetupMode.DockerCompose:
|
|
52
|
-
prompt = getDockerComposePrompt(args);
|
|
53
|
-
break;
|
|
54
|
-
case SutSetupMode.None:
|
|
55
|
-
prompt = "sutSetupMode is 'none'. No SUT setup required.";
|
|
56
|
-
break;
|
|
57
|
-
default:
|
|
58
|
-
prompt = `Unknown SUT setup mode: '${mode}'. Valid modes: none, adapt_workflow, docker_compose.`;
|
|
59
|
-
}
|
|
60
|
-
AnalyticsService.pushMCPToolEvent("skyramp_testbot_sut_resource", undefined, { mode }).catch(() => { });
|
|
61
|
-
return resourceText(uri.toString(), prompt);
|
|
62
|
-
});
|
|
63
|
-
}
|