@skyramp/mcp 0.0.20 → 0.0.21
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.
|
@@ -25,7 +25,7 @@ export function registerStartTraceCollectionPrompt(mcpServer) {
|
|
|
25
25
|
* To start a playwright trace collection session using agent, run the following command:
|
|
26
26
|
Start playwright trace collection with default settings.
|
|
27
27
|
|
|
28
|
-
**CRITICAL:
|
|
28
|
+
**CRITICAL: NEVER SHOW THE CLI COMMANDS.**
|
|
29
29
|
`,
|
|
30
30
|
},
|
|
31
31
|
},
|
|
@@ -5,6 +5,8 @@ import { Writable } from "stream";
|
|
|
5
5
|
import { logger } from "../utils/logger.js";
|
|
6
6
|
import { stripVTControlCharacters } from "util";
|
|
7
7
|
import fs from "fs";
|
|
8
|
+
const EXECUTOR_DOCKER_IMAGE = "skyramp/executor:v1.2.16";
|
|
9
|
+
const DOCKER_PLATFORM = "linux/amd64";
|
|
8
10
|
export function registerExecuteSkyrampTestTool(server) {
|
|
9
11
|
server.registerTool("skyramp_execute_test", {
|
|
10
12
|
description: `Execute a Skyramp-generated test in isolated containerized environments for reliable, deterministic testing.
|
|
@@ -54,7 +56,6 @@ For detailed documentation visit: https://www.skyramp.dev/docs/quickstart`,
|
|
|
54
56
|
},
|
|
55
57
|
}, async (params) => {
|
|
56
58
|
var docker = new Docker();
|
|
57
|
-
var image = "public.ecr.aws/skyramp/rampup/runner:mcp-v0.0.9";
|
|
58
59
|
const containerMountPath = "/home/user";
|
|
59
60
|
// Use path.basename for safer filename extraction
|
|
60
61
|
const filename = path.basename(params.testFile);
|
|
@@ -116,14 +117,17 @@ For detailed documentation visit: https://www.skyramp.dev/docs/quickstart`,
|
|
|
116
117
|
var statusCode = 0;
|
|
117
118
|
// check if image exists
|
|
118
119
|
const images = await docker.listImages();
|
|
119
|
-
const imageExists = images.some((img) => (img.RepoTags && img.RepoTags.includes(
|
|
120
|
-
(img.RepoDigests &&
|
|
120
|
+
const imageExists = images.some((img) => (img.RepoTags && img.RepoTags.includes(EXECUTOR_DOCKER_IMAGE)) ||
|
|
121
|
+
(img.RepoDigests &&
|
|
122
|
+
img.RepoDigests.includes(EXECUTOR_DOCKER_IMAGE)));
|
|
121
123
|
if (!imageExists) {
|
|
122
124
|
// Pull the image if it does not exist
|
|
123
125
|
await new Promise((resolve, reject) => {
|
|
124
|
-
docker.pull(
|
|
126
|
+
docker.pull(EXECUTOR_DOCKER_IMAGE, { platform: DOCKER_PLATFORM }, (err, stream) => {
|
|
125
127
|
if (err)
|
|
126
128
|
return reject(err);
|
|
129
|
+
if (!stream)
|
|
130
|
+
return reject(new Error("No stream received from docker pull"));
|
|
127
131
|
docker.modem.followProgress(stream, (err, res) => {
|
|
128
132
|
if (err)
|
|
129
133
|
return reject(err);
|
|
@@ -133,7 +137,10 @@ For detailed documentation visit: https://www.skyramp.dev/docs/quickstart`,
|
|
|
133
137
|
});
|
|
134
138
|
}
|
|
135
139
|
await docker
|
|
136
|
-
.run(
|
|
140
|
+
.run(EXECUTOR_DOCKER_IMAGE, command, stream, {
|
|
141
|
+
Env: env,
|
|
142
|
+
HostConfig: hostConfig,
|
|
143
|
+
})
|
|
137
144
|
.then(function (data) {
|
|
138
145
|
var result = data[0];
|
|
139
146
|
var container = data[1];
|
|
@@ -4,7 +4,6 @@ import { z } from "zod";
|
|
|
4
4
|
import { TELEMETRY_entrypoint_FIELD_NAME, } from "../utils/utils.js";
|
|
5
5
|
import { logger } from "../utils/logger.js";
|
|
6
6
|
import { baseSchema } from "../types/TestTypes.js";
|
|
7
|
-
import path from "path";
|
|
8
7
|
import { existsSync, mkdirSync } from "fs";
|
|
9
8
|
export function registerTraceStopTool(server) {
|
|
10
9
|
server.registerTool("skyramp_stop_trace_collection", {
|
|
@@ -59,11 +58,6 @@ For detailed documentation visit: https://www.skyramp.dev/docs/load-test/advance
|
|
|
59
58
|
if (!existsSync(params.outputDir)) {
|
|
60
59
|
mkdirSync(params.outputDir, { recursive: true });
|
|
61
60
|
}
|
|
62
|
-
// Temporary fix until library is updated
|
|
63
|
-
if (params.outputDir) {
|
|
64
|
-
stopTraceOptions.output = path.join(stopTraceOptions.outputDir, stopTraceOptions.output);
|
|
65
|
-
stopTraceOptions.playwrightOutput = path.join(stopTraceOptions.outputDir, stopTraceOptions.playwrightOutput);
|
|
66
|
-
}
|
|
67
61
|
let errList = {
|
|
68
62
|
content: [],
|
|
69
63
|
isError: true,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skyramp/mcp",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.21",
|
|
4
4
|
"main": "build/index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@modelcontextprotocol/sdk": "^1.11.4",
|
|
45
|
-
"@skyramp/skyramp": "^1.2.
|
|
45
|
+
"@skyramp/skyramp": "^1.2.16",
|
|
46
46
|
"dockerode": "^4.0.6",
|
|
47
47
|
"zod": "^3.25.3"
|
|
48
48
|
},
|