@skyramp/mcp 0.4.4-rc.1 → 0.4.4
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/index.js +239 -210
- package/build/playwright/PlaywrightTraceService.d.ts +1 -1
- package/build/playwright/blueprintDigestStore.d.ts +1 -1
- package/build/playwright/registerPlaywrightTools.d.ts +1 -1
- package/build/playwright/traceRecordingPrompt.d.ts +1 -1
- package/build/playwright/traceRecordingPrompt.js +2 -2
- package/build/prompts/local-dev/local-dev-prompts.d.ts +1 -1
- package/build/prompts/local-dev/local-dev-prompts.js +2 -2
- package/build/prompts/startTraceCollectionPrompts.d.ts +1 -1
- package/build/prompts/startTraceCollectionPrompts.js +2 -3
- package/build/prompts/test-recommendation/registerRecommendTestsPrompt.d.ts +1 -1
- package/build/prompts/test-recommendation/registerRecommendTestsPrompt.js +2 -2
- package/build/prompts/testbot/testbot-prompts.d.ts +1 -1
- package/build/prompts/testbot/testbot-prompts.js +4 -7
- package/build/recommendation/answers.d.ts +17 -52
- package/build/recommendation/answers.js +29 -99
- package/build/recommendation/pullRequestText.d.ts +0 -2
- package/build/recommendation/pullRequestText.js +0 -16
- package/build/recommendation/registerPlan.d.ts +4 -7
- package/build/recommendation/registerPlan.js +11 -37
- package/build/recommendation/types.d.ts +4 -21
- package/build/recommendation/verifierContracts.d.ts +4 -4
- package/build/recommendation/verifierContracts.js +4 -4
- package/build/recommendation/verifiers/citedPath.d.ts +2 -2
- package/build/recommendation/verifiers/citedPath.js +2 -2
- package/build/recommendation/verifiers/issueTraceability.d.ts +5 -1
- package/build/recommendation/verifiers/issueTraceability.js +35 -4
- package/build/resources/analysisResources.d.ts +1 -1
- package/build/resources/analysisResources.js +1 -1
- package/build/resources/progressResource.d.ts +1 -1
- package/build/resources/sutSetupResource.d.ts +1 -1
- package/build/resources/sutSetupResource.js +1 -1
- package/build/resources/testbotResource.d.ts +1 -1
- package/build/resources/testbotResource.js +1 -1
- package/build/services/AnalyticsService.d.ts +1 -1
- package/build/services/FleetExecutionService.d.ts +130 -0
- package/build/services/FleetExecutionService.js +391 -0
- package/build/services/ModularizationService.d.ts +1 -1
- package/build/services/TestExecutionService.d.ts +7 -0
- package/build/services/TestExecutionService.js +21 -0
- package/build/services/TestGenerationService.d.ts +1 -1
- package/build/tool-phases.js +2 -0
- package/build/tools/auth/loginTool.d.ts +1 -1
- package/build/tools/auth/loginTool.js +2 -2
- package/build/tools/auth/logoutTool.d.ts +1 -1
- package/build/tools/auth/logoutTool.js +2 -2
- package/build/tools/code-refactor/alignAssertionsTool.d.ts +1 -1
- package/build/tools/code-refactor/alignAssertionsTool.js +1 -1
- package/build/tools/code-refactor/assertionSkillTools.d.ts +1 -1
- package/build/tools/code-refactor/assertionSkillTools.js +2 -2
- package/build/tools/code-refactor/codeReuseTool.d.ts +1 -1
- package/build/tools/code-refactor/codeReuseTool.js +2 -2
- package/build/tools/code-refactor/enhanceAssertionsTool.d.ts +1 -1
- package/build/tools/code-refactor/enhanceAssertionsTool.js +1 -1
- package/build/tools/code-refactor/modularizationTool.d.ts +1 -1
- package/build/tools/code-refactor/modularizationTool.js +2 -2
- package/build/tools/enrichTestWithMocksTool.d.ts +1 -1
- package/build/tools/enrichTestWithMocksTool.js +2 -2
- package/build/tools/executeFleetTool.d.ts +28 -0
- package/build/tools/executeFleetTool.js +107 -0
- package/build/tools/executeSkyrampTestTool.d.ts +8 -5
- package/build/tools/executeSkyrampTestTool.js +5 -5
- package/build/tools/fixErrorTool.d.ts +1 -1
- package/build/tools/fixErrorTool.js +1 -1
- package/build/tools/generate-tests/batchMockGenerationTool.d.ts +6 -57
- package/build/tools/generate-tests/batchMockGenerationTool.js +3 -3
- package/build/tools/generate-tests/generateBatchScenarioRestTool.d.ts +9 -45
- package/build/tools/generate-tests/generateBatchScenarioRestTool.js +29 -11
- package/build/tools/generate-tests/generateContractRestTool.d.ts +1 -2
- package/build/tools/generate-tests/generateContractRestTool.js +1 -1
- package/build/tools/generate-tests/generateE2ERestTool.d.ts +1 -2
- package/build/tools/generate-tests/generateE2ERestTool.js +1 -1
- package/build/tools/generate-tests/generateFuzzRestTool.d.ts +1 -1
- package/build/tools/generate-tests/generateFuzzRestTool.js +1 -1
- package/build/tools/generate-tests/generateIntegrationRestTool.d.ts +1 -2
- package/build/tools/generate-tests/generateIntegrationRestTool.js +1 -1
- package/build/tools/generate-tests/generateLoadRestTool.d.ts +1 -2
- package/build/tools/generate-tests/generateLoadRestTool.js +2 -1
- package/build/tools/generate-tests/generateMockRestTool.d.ts +1 -2
- package/build/tools/generate-tests/generateMockRestTool.js +3 -3
- package/build/tools/generate-tests/generateSmokeRestTool.d.ts +1 -1
- package/build/tools/generate-tests/generateSmokeRestTool.js +1 -1
- package/build/tools/generate-tests/generateUILoadRestTool.d.ts +64 -0
- package/build/tools/generate-tests/generateUILoadRestTool.js +512 -0
- package/build/tools/generate-tests/generateUIRestTool.d.ts +6 -7
- package/build/tools/generate-tests/generateUIRestTool.js +1 -1
- package/build/tools/generate-tests/loadTestSchema.d.ts +15 -15
- package/build/tools/generate-tests/trace-reuse-guard.d.ts +1 -1
- package/build/tools/generateEnrichedIntegrationTestTool.d.ts +1 -2
- package/build/tools/generateEnrichedIntegrationTestTool.js +1 -1
- package/build/tools/localDevWorkerComposeTool.d.ts +1 -1
- package/build/tools/localDevWorkerComposeTool.js +2 -2
- package/build/tools/one-click/oneClickTool.d.ts +1 -1
- package/build/tools/one-click/oneClickTool.js +1 -1
- package/build/tools/preflightMockCheckTool.d.ts +1 -1
- package/build/tools/preflightMockCheckTool.js +3 -3
- package/build/tools/queryProxyMocksTool.d.ts +1 -1
- package/build/tools/queryProxyMocksTool.js +3 -3
- package/build/tools/submitReportTool.d.ts +111 -414
- package/build/tools/submitReportTool.js +154 -138
- package/build/tools/test-management/actionsTool.d.ts +1 -1
- package/build/tools/test-management/actionsTool.js +7 -7
- package/build/tools/test-management/analyzeChangesTool.d.ts +22 -118
- package/build/tools/test-management/analyzeChangesTool.js +4 -4
- package/build/tools/test-management/analyzeTestHealthTool.d.ts +1 -1
- package/build/tools/test-management/analyzeTestHealthTool.js +4 -4
- package/build/tools/test-management/registerTestPlanTool.d.ts +111 -743
- package/build/tools/test-management/registerTestPlanTool.js +20 -36
- package/build/tools/test-management/resolveScreenTool.d.ts +1 -1
- package/build/tools/test-management/resolveScreenTool.js +6 -2
- package/build/tools/trace/startTraceCollectionTool.d.ts +1 -1
- package/build/tools/trace/startTraceCollectionTool.js +4 -4
- package/build/tools/trace/stopTraceCollectionTool.d.ts +1 -1
- package/build/tools/trace/stopTraceCollectionTool.js +2 -2
- package/build/tools/verifyTestDependenciesTool.d.ts +1 -1
- package/build/tools/verifyTestDependenciesTool.js +1 -1
- package/build/tools/workspace/initScanWorkspaceTool.d.ts +1 -1
- package/build/tools/workspace/initScanWorkspaceTool.js +1 -1
- package/build/tools/workspace/initializeWorkspaceTool.d.ts +1 -1
- package/build/tools/workspace/initializeWorkspaceTool.js +1 -1
- package/build/types/RepositoryAnalysis.d.ts +164 -1170
- package/build/types/RepositoryAnalysis.js +12 -10
- package/build/types/StepMethod.d.ts +24 -1
- package/build/types/StepMethod.js +1 -1
- package/build/types/TestTypes.d.ts +34 -133
- package/build/types/TestTypes.js +3 -3
- package/build/types/TestbotReport.d.ts +37 -0
- package/build/types/TestbotReport.js +22 -0
- package/build/types/index.d.ts +1 -1
- package/build/types/index.js +1 -1
- package/build/utils/docker.d.ts +29 -7
- package/build/utils/docker.js +83 -27
- package/build/utils/initAgent.d.ts +3 -3
- package/build/utils/initAgent.js +58 -26
- package/build/utils/progress.d.ts +3 -4
- package/build/utils/progress.js +4 -4
- package/build/utils/utils.d.ts +1 -1
- package/build/utils/versions.d.ts +3 -3
- package/build/utils/versions.js +1 -1
- package/build/workspace/workspace.d.ts +117 -538
- package/build/workspace/workspace.js +2 -2
- package/package.json +6 -5
- package/plugin/prompts/testbot-task1.md +1 -1
- package/plugin/skills/repair-staged-files/SKILL.md +17 -0
- package/build/recommendation/blockerProbes.d.ts +0 -13
- package/build/recommendation/blockerProbes.js +0 -91
- package/build/recommendation/blockers.d.ts +0 -65
- package/build/recommendation/blockers.js +0 -135
|
@@ -16,9 +16,9 @@ export declare function ensureSkyrampMdInstalled(): Promise<void>;
|
|
|
16
16
|
* Previously both images were always pulled regardless.
|
|
17
17
|
* - Parallel pulls: missing images are pulled concurrently via Promise.all, halving
|
|
18
18
|
* wall-clock time when both need to be downloaded.
|
|
19
|
-
* - Arch-aware: pull platform is detected from process.arch (linux/arm64 on
|
|
20
|
-
* linux/amd64 otherwise) with an automatic amd64 fallback if no arm64
|
|
21
|
-
*
|
|
19
|
+
* - Arch-aware: the worker's pull platform is detected from process.arch (linux/arm64 on
|
|
20
|
+
* Apple Silicon, linux/amd64 otherwise) with an automatic amd64 fallback if no arm64
|
|
21
|
+
* manifest exists. The executor is always pulled as amd64, the platform it runs as.
|
|
22
22
|
* - No FFI overhead: direct Dockerode calls replace the Go shared-library bridge,
|
|
23
23
|
* removing the cost of loading the .so and marshalling output through a C string.
|
|
24
24
|
* - Cleaner error propagation: structured errors from Dockerode replace parsing a
|
package/build/utils/initAgent.js
CHANGED
|
@@ -4,7 +4,8 @@ import path from "path";
|
|
|
4
4
|
import { logger } from "./logger.js";
|
|
5
5
|
import { SKYRAMP_MD_CONTENT } from "./skyrampMdContent.js";
|
|
6
6
|
import { EXECUTOR_DOCKER_IMAGE, WORKER_DOCKER_IMAGE } from "./versions.js";
|
|
7
|
-
import { dockerImageExistsLocally, pullDockerImage } from "./docker.js";
|
|
7
|
+
import { dockerDaemonOsType, dockerImageExistsLocally, getDockerPlatform, isPlatformUnavailableError, pullDockerImage, } from "./docker.js";
|
|
8
|
+
import { resolveExecutorImage } from "../services/FleetExecutionService.js";
|
|
8
9
|
// Global skill discovery paths (resolved relative to os.homedir()).
|
|
9
10
|
const SKILL_INSTALL_PATHS = [
|
|
10
11
|
{
|
|
@@ -83,9 +84,9 @@ export async function ensureSkyrampMdInstalled() {
|
|
|
83
84
|
* Previously both images were always pulled regardless.
|
|
84
85
|
* - Parallel pulls: missing images are pulled concurrently via Promise.all, halving
|
|
85
86
|
* wall-clock time when both need to be downloaded.
|
|
86
|
-
* - Arch-aware: pull platform is detected from process.arch (linux/arm64 on
|
|
87
|
-
* linux/amd64 otherwise) with an automatic amd64 fallback if no arm64
|
|
88
|
-
*
|
|
87
|
+
* - Arch-aware: the worker's pull platform is detected from process.arch (linux/arm64 on
|
|
88
|
+
* Apple Silicon, linux/amd64 otherwise) with an automatic amd64 fallback if no arm64
|
|
89
|
+
* manifest exists. The executor is always pulled as amd64, the platform it runs as.
|
|
89
90
|
* - No FFI overhead: direct Dockerode calls replace the Go shared-library bridge,
|
|
90
91
|
* removing the cost of loading the .so and marshalling output through a C string.
|
|
91
92
|
* - Cleaner error propagation: structured errors from Dockerode replace parsing a
|
|
@@ -99,33 +100,64 @@ export async function initCheck() {
|
|
|
99
100
|
await ensureSkyrampMdInstalled();
|
|
100
101
|
logger.info("Skyramp skill files installed/refreshed");
|
|
101
102
|
}
|
|
102
|
-
//
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
103
|
+
// Two executors can be in use: skyramp_execute_test always runs the released constant,
|
|
104
|
+
// and skyramp_execute_fleet runs SKYRAMP_EXECUTOR_IMAGE when it is set. Fetch both, or a
|
|
105
|
+
// normal test run pays for the pull the override displaced.
|
|
106
|
+
const fleetExecutor = resolveExecutorImage();
|
|
107
|
+
// Every image is pulled for the daemon's own OS: a released executor is one tag carrying
|
|
108
|
+
// both, and the tag names no platform. Both run paths start the executor as amd64, so it
|
|
109
|
+
// is pulled as amd64 on every host -- an arm64 copy would not be the one the run starts.
|
|
110
|
+
const daemonOs = await dockerDaemonOsType();
|
|
111
|
+
const executorPlatform = daemonOs === "windows" ? "windows/amd64" : "linux/amd64";
|
|
112
|
+
const workerPlatform = daemonOs === "windows" ? "windows/amd64" : getDockerPlatform();
|
|
113
|
+
const executors = [...new Set([EXECUTOR_DOCKER_IMAGE, fleetExecutor])];
|
|
114
|
+
// An executor image without this daemon's OS -- an older release, or a single-OS
|
|
115
|
+
// SKYRAMP_EXECUTOR_IMAGE -- has nothing to pull here. That is a fact about the image,
|
|
116
|
+
// not a broken environment, so its pull is optional.
|
|
117
|
+
const wanted = [
|
|
118
|
+
...executors.map((image) => ({
|
|
119
|
+
what: "executor",
|
|
120
|
+
image,
|
|
121
|
+
platform: executorPlatform,
|
|
122
|
+
optional: true,
|
|
123
|
+
})),
|
|
124
|
+
{
|
|
125
|
+
what: "worker",
|
|
126
|
+
image: WORKER_DOCKER_IMAGE,
|
|
127
|
+
platform: workerPlatform,
|
|
128
|
+
optional: false,
|
|
129
|
+
},
|
|
130
|
+
];
|
|
131
|
+
// Presence is checked for all of them at once; only the pulls that follow are conditional.
|
|
132
|
+
const present = await Promise.all(wanted.map((w) => dockerImageExistsLocally(w.image)));
|
|
107
133
|
const pulls = [];
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
134
|
+
wanted.forEach(({ what, image, platform, optional }, i) => {
|
|
135
|
+
if (present[i])
|
|
136
|
+
return;
|
|
137
|
+
logger.info(`Pulling missing ${what} image`, { image, platform });
|
|
138
|
+
const pull = pullDockerImage(image, platform);
|
|
139
|
+
// Only an image with nothing for this platform is tolerated, and only when optional.
|
|
140
|
+
// Any other failure -- the network, a rate limit, a full disk -- fails init so it is
|
|
141
|
+
// retried, instead of being reported as a missing variant.
|
|
142
|
+
pulls.push(optional
|
|
143
|
+
? pull.catch((err) => {
|
|
144
|
+
if (!isPlatformUnavailableError(err))
|
|
145
|
+
throw err;
|
|
146
|
+
logger.warning("Executor image has no variant for this daemon's platform: fleet runs " +
|
|
147
|
+
"need an executor built for it (a release that carries it, or " +
|
|
148
|
+
"SKYRAMP_EXECUTOR_IMAGE)", { image, platform, error: err.message });
|
|
149
|
+
})
|
|
150
|
+
: pull);
|
|
151
|
+
});
|
|
152
|
+
if (pulls.length > 0) {
|
|
153
|
+
await Promise.all(pulls);
|
|
154
|
+
logger.info("Skyramp init completed");
|
|
118
155
|
}
|
|
119
|
-
|
|
156
|
+
else {
|
|
120
157
|
logger.info("Skyramp images already present locally, skipping pull", {
|
|
121
|
-
|
|
122
|
-
worker: WORKER_DOCKER_IMAGE,
|
|
158
|
+
images: wanted.map((w) => w.image),
|
|
123
159
|
});
|
|
124
160
|
}
|
|
125
|
-
else {
|
|
126
|
-
await Promise.all(pulls);
|
|
127
|
-
logger.info("Skyramp init completed");
|
|
128
|
-
}
|
|
129
161
|
}
|
|
130
162
|
let initInFlight = false;
|
|
131
163
|
let initCompleted = false;
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { RequestHandlerExtra } from "@modelcontextprotocol/sdk/shared/protocol.js";
|
|
1
|
+
import { ServerContext } from "@modelcontextprotocol/server";
|
|
3
2
|
/**
|
|
4
3
|
* Reports incremental progress for a long-running tool call. No-ops when the
|
|
5
4
|
* client did not supply a progress token.
|
|
6
5
|
*/
|
|
7
6
|
export type ProgressReporter = (progress: number, total: number, message: string) => Promise<void>;
|
|
8
7
|
/**
|
|
9
|
-
* Build a progress reporter bound to a tool handler's
|
|
8
|
+
* Build a progress reporter bound to a tool handler's context. Sends
|
|
10
9
|
* `notifications/progress` only when the client provided a `progressToken`,
|
|
11
10
|
* otherwise silently no-ops.
|
|
12
11
|
*
|
|
13
12
|
* Consolidates the identical closure that previously lived inline in multiple
|
|
14
13
|
* progress-emitting tools (analyzeChanges, startTraceCollection).
|
|
15
14
|
*/
|
|
16
|
-
export declare function makeProgressReporter(
|
|
15
|
+
export declare function makeProgressReporter(ctx: ServerContext): ProgressReporter;
|
package/build/utils/progress.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Build a progress reporter bound to a tool handler's
|
|
2
|
+
* Build a progress reporter bound to a tool handler's context. Sends
|
|
3
3
|
* `notifications/progress` only when the client provided a `progressToken`,
|
|
4
4
|
* otherwise silently no-ops.
|
|
5
5
|
*
|
|
6
6
|
* Consolidates the identical closure that previously lived inline in multiple
|
|
7
7
|
* progress-emitting tools (analyzeChanges, startTraceCollection).
|
|
8
8
|
*/
|
|
9
|
-
export function makeProgressReporter(
|
|
9
|
+
export function makeProgressReporter(ctx) {
|
|
10
10
|
return async (progress, total, message) => {
|
|
11
|
-
const progressToken =
|
|
11
|
+
const progressToken = ctx.mcpReq._meta?.progressToken;
|
|
12
12
|
if (progressToken !== undefined) {
|
|
13
13
|
try {
|
|
14
14
|
const notification = {
|
|
15
15
|
method: "notifications/progress",
|
|
16
16
|
params: { progressToken, progress, total, message },
|
|
17
17
|
};
|
|
18
|
-
await
|
|
18
|
+
await ctx.mcpReq.notify(notification);
|
|
19
19
|
}
|
|
20
20
|
catch {
|
|
21
21
|
// Progress is best-effort; a disconnected client should not fail the tool.
|
package/build/utils/utils.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CallToolResult, ReadResourceResult } from "@modelcontextprotocol/
|
|
1
|
+
import { CallToolResult, ReadResourceResult } from "@modelcontextprotocol/server";
|
|
2
2
|
export declare function toolError(message: string): CallToolResult;
|
|
3
3
|
/**
|
|
4
4
|
* Build a successful tool result whose payload is delivered on BOTH MCP result
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const SKYRAMP_IMAGE_VERSION = "v1.3.
|
|
2
|
-
export declare const EXECUTOR_DOCKER_IMAGE = "skyramp/executor:v1.3.
|
|
3
|
-
export declare const WORKER_DOCKER_IMAGE = "skyramp/worker:v1.3.
|
|
1
|
+
export declare const SKYRAMP_IMAGE_VERSION = "v1.3.50";
|
|
2
|
+
export declare const EXECUTOR_DOCKER_IMAGE = "skyramp/executor:v1.3.50";
|
|
3
|
+
export declare const WORKER_DOCKER_IMAGE = "skyramp/worker:v1.3.50";
|
|
4
4
|
export declare const WORKER_CONTROL_PORT = 35142;
|
package/build/utils/versions.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const SKYRAMP_IMAGE_VERSION = "v1.3.
|
|
1
|
+
export const SKYRAMP_IMAGE_VERSION = "v1.3.50";
|
|
2
2
|
export const EXECUTOR_DOCKER_IMAGE = `skyramp/executor:${SKYRAMP_IMAGE_VERSION}`;
|
|
3
3
|
export const WORKER_DOCKER_IMAGE = `skyramp/worker:${SKYRAMP_IMAGE_VERSION}`;
|
|
4
4
|
// Control port the Skyramp worker listens on (SDK `CONTAINER_PORT`).
|