@skyramp/mcp 0.0.15 → 0.0.16

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.
@@ -3,6 +3,7 @@ import Docker from "dockerode";
3
3
  import path from "path";
4
4
  import { Writable } from "stream";
5
5
  import { logger } from "../utils/logger.js";
6
+ import { stripVTControlCharacters } from "util";
6
7
  // Configuration for language-specific file paths
7
8
  const LANGUAGE_PATHS = {
8
9
  python: "/tmp",
@@ -56,7 +57,7 @@ For detailed documentation visit: https://www.skyramp.dev/docs/quickstart`,
56
57
  },
57
58
  }, async (params) => {
58
59
  var docker = new Docker();
59
- var image = "public.ecr.aws/skyramp/rampup/runner:mcp-v0.0.5";
60
+ var image = "public.ecr.aws/skyramp/rampup/runner:mcp-v0.0.9";
60
61
  // Use path.basename for safer filename extraction
61
62
  const filename = path.basename(params.testFile);
62
63
  if (!filename) {
@@ -65,6 +66,7 @@ For detailed documentation visit: https://www.skyramp.dev/docs/quickstart`,
65
66
  // Use configurable language paths with fallback
66
67
  const basePath = LANGUAGE_PATHS[params.language] || "/tmp";
67
68
  const filePath = path.join(basePath, filename);
69
+ const dockerSocketPath = "/var/run/docker.sock";
68
70
  var command = [
69
71
  "./root/runner.sh",
70
72
  params.language,
@@ -72,12 +74,20 @@ For detailed documentation visit: https://www.skyramp.dev/docs/quickstart`,
72
74
  params.testType,
73
75
  ];
74
76
  const hostConfig = {
77
+ ExtraHosts: [
78
+ "host.docker.internal:host-gateway"
79
+ ],
75
80
  Mounts: [
76
81
  {
77
82
  Target: filePath,
78
83
  Source: path.resolve(params.testFile),
79
84
  Type: "bind",
80
85
  },
86
+ {
87
+ Type: "bind",
88
+ Target: dockerSocketPath,
89
+ Source: dockerSocketPath
90
+ }
81
91
  ],
82
92
  };
83
93
  const env = [
@@ -140,7 +150,7 @@ For detailed documentation visit: https://www.skyramp.dev/docs/quickstart`,
140
150
  content: [
141
151
  {
142
152
  type: "text",
143
- text: `Test execution failed: ${output}
153
+ text: `Test execution failed: ${stripVTControlCharacters(output)}
144
154
  **IMPORTANT: IF THE EXECUTION FAILED BECAUSE OF A 401 STATUS CODE, ASK THE USER TO PROVIDE THE AUTHENTICATION TOKEN TO THE TOOL OR A PLACE FROM WHERE WE CAN READ THE TOKEN. DO NOT UPDATE THE GENERATED TEST FILE.**`,
145
155
  },
146
156
  ],
@@ -150,7 +160,7 @@ For detailed documentation visit: https://www.skyramp.dev/docs/quickstart`,
150
160
  content: [
151
161
  {
152
162
  type: "text",
153
- text: `Test execution result: ${output}`,
163
+ text: `Test execution result: ${stripVTControlCharacters(output)}`,
154
164
  },
155
165
  ],
156
166
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyramp/mcp",
3
- "version": "0.0.15",
3
+ "version": "0.0.16",
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.13",
45
+ "@skyramp/skyramp": "^1.2.15",
46
46
  "dockerode": "^4.0.6",
47
47
  "zod": "^3.25.3"
48
48
  },