@skyramp/mcp 0.3.3 → 0.3.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/playwright/registerPlaywrightTools.js +42 -1
- package/build/prompts/enhance-assertions/sharedAssertionRules.js +19 -0
- package/build/prompts/test-maintenance/actionsInstructions.js +2 -2
- package/build/prompts/test-recommendation/analysisOutputPrompt.js +1 -4
- package/build/prompts/test-recommendation/recommendationSections.d.ts +1 -1
- package/build/prompts/test-recommendation/recommendationSections.js +5 -5
- package/build/prompts/test-recommendation/test-recommendation-prompt.js +13 -7
- package/build/prompts/testbot/testbot-prompts.js +6 -13
- package/build/recommendation/discriminators.d.ts +7 -1
- package/build/recommendation/discriminators.js +16 -3
- package/build/resources/testbotResource.js +0 -1
- package/build/services/ScenarioGenerationService.js +5 -2
- package/build/services/TestExecutionService.js +25 -1
- package/build/services/TestGenerationService.js +24 -9
- package/build/services/containerEnv.d.ts +12 -1
- package/build/services/containerEnv.js +94 -1
- package/build/tools/executeSkyrampTestTool.d.ts +9 -0
- package/build/tools/executeSkyrampTestTool.js +20 -6
- package/build/tools/execution-video-state.d.ts +21 -0
- package/build/tools/execution-video-state.js +51 -0
- package/build/tools/generate-tests/generateBatchScenarioRestTool.js +31 -11
- package/build/tools/generate-tests/planGuard.d.ts +5 -5
- package/build/tools/generate-tests/planGuard.js +5 -17
- package/build/tools/submitReportTool.d.ts +83 -10
- package/build/tools/submitReportTool.js +169 -28
- package/build/tools/test-management/actionsTool.js +40 -39
- package/build/tools/test-management/analyzeChangesTool.d.ts +11 -0
- package/build/tools/test-management/analyzeChangesTool.js +37 -33
- package/build/tools/test-management/analyzeTestHealthTool.js +3 -3
- package/build/tools/test-management/registerTestPlanTool.js +113 -31
- package/build/types/TestExecution.d.ts +14 -0
- package/build/types/TestTypes.js +3 -2
- package/build/types/TestbotPromptOptions.d.ts +0 -1
- package/build/types/TestbotReport.d.ts +10 -0
- package/build/types/TestbotReport.js +10 -1
- package/build/types/index.d.ts +1 -0
- package/build/types/index.js +1 -0
- package/build/utils/AnalysisStateManager.d.ts +36 -2
- package/build/utils/AnalysisStateManager.js +34 -13
- package/build/utils/scenarioDrafting.js +7 -1
- package/build/utils/skyrampMdContent.d.ts +1 -1
- package/build/utils/skyrampMdContent.js +1 -1
- package/build/utils/urlPath.d.ts +37 -0
- package/build/utils/urlPath.js +55 -0
- package/build/utils/utils.d.ts +45 -0
- package/build/utils/utils.js +50 -0
- package/build/utils/versions.d.ts +3 -3
- package/build/utils/versions.js +1 -1
- package/build/utils/workspaceAuth.d.ts +15 -15
- package/build/utils/workspaceAuth.js +32 -17
- package/build/workspace/queryParamResolution.d.ts +93 -0
- package/build/workspace/queryParamResolution.js +201 -0
- package/build/workspace/workspace.d.ts +104 -0
- package/build/workspace/workspace.js +24 -0
- package/package.json +3 -2
|
@@ -19,6 +19,34 @@ export declare const serviceSchema: z.ZodObject<{
|
|
|
19
19
|
* Explicit per-request queryParams always win on a key collision
|
|
20
20
|
* (SKYR-4050). */
|
|
21
21
|
defaultQueryParams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
22
|
+
/** Path-scoped overrides layered on top of defaultQueryParams
|
|
23
|
+
* (SKYR-4127). For a given request, the single most-specific matching
|
|
24
|
+
* pathPattern wins and its values override the base map key by key;
|
|
25
|
+
* overrides never merge with each other. Patterns are picomatch globs
|
|
26
|
+
* matched against the request URL pathname, with OpenAPI-style
|
|
27
|
+
* `{param}` placeholders treated as a single-segment wildcard.
|
|
28
|
+
*
|
|
29
|
+
* The pathname includes any base-path prefix carried by baseUrl — a
|
|
30
|
+
* service at `https://host/api` needs `/api/v1/**`, not `/v1/**`. A
|
|
31
|
+
* pattern that omits the prefix silently matches nothing.
|
|
32
|
+
*
|
|
33
|
+
* Values may use `env.VAR` to defer to an environment variable read
|
|
34
|
+
* where the test runs rather than where it was generated — the
|
|
35
|
+
* generated test carries the lookup itself (os.getenv in Python,
|
|
36
|
+
* process.env in JS/TS, System.getenv in Java). The legacy `envs.`
|
|
37
|
+
* spelling is still accepted. Note the variable name is passed
|
|
38
|
+
* through verbatim and is case-sensitive; a near miss such as
|
|
39
|
+
* `ENV.VAR` is treated as an ordinary literal. */
|
|
40
|
+
queryParamOverrides: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
41
|
+
pathPattern: z.ZodString;
|
|
42
|
+
values: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
43
|
+
}, "strict", z.ZodTypeAny, {
|
|
44
|
+
values: Record<string, string>;
|
|
45
|
+
pathPattern: string;
|
|
46
|
+
}, {
|
|
47
|
+
values: Record<string, string>;
|
|
48
|
+
pathPattern: string;
|
|
49
|
+
}>, "many">>;
|
|
22
50
|
baseUrl: z.ZodOptional<z.ZodString>;
|
|
23
51
|
/** SUT serves self-signed TLS (e.g. a kind kube-apiserver) — generated
|
|
24
52
|
* tests should skip certificate verification for this service (SKYR-3961).
|
|
@@ -30,6 +58,10 @@ export declare const serviceSchema: z.ZodObject<{
|
|
|
30
58
|
schemaPath?: string | undefined;
|
|
31
59
|
authType?: "none" | "token" | "bearer" | "basic" | "oauth" | "apiKey" | "cookie" | "session" | undefined;
|
|
32
60
|
defaultQueryParams?: Record<string, string> | undefined;
|
|
61
|
+
queryParamOverrides?: {
|
|
62
|
+
values: Record<string, string>;
|
|
63
|
+
pathPattern: string;
|
|
64
|
+
}[] | undefined;
|
|
33
65
|
baseUrl?: string | undefined;
|
|
34
66
|
skipTLSVerify?: boolean | undefined;
|
|
35
67
|
}, {
|
|
@@ -38,6 +70,10 @@ export declare const serviceSchema: z.ZodObject<{
|
|
|
38
70
|
schemaPath?: string | undefined;
|
|
39
71
|
authType?: "none" | "token" | "bearer" | "basic" | "oauth" | "apiKey" | "cookie" | "session" | undefined;
|
|
40
72
|
defaultQueryParams?: Record<string, string> | undefined;
|
|
73
|
+
queryParamOverrides?: {
|
|
74
|
+
values: Record<string, string>;
|
|
75
|
+
pathPattern: string;
|
|
76
|
+
}[] | undefined;
|
|
41
77
|
baseUrl?: string | undefined;
|
|
42
78
|
skipTLSVerify?: boolean | undefined;
|
|
43
79
|
}>>;
|
|
@@ -114,6 +150,10 @@ export declare const serviceSchema: z.ZodObject<{
|
|
|
114
150
|
schemaPath?: string | undefined;
|
|
115
151
|
authType?: "none" | "token" | "bearer" | "basic" | "oauth" | "apiKey" | "cookie" | "session" | undefined;
|
|
116
152
|
defaultQueryParams?: Record<string, string> | undefined;
|
|
153
|
+
queryParamOverrides?: {
|
|
154
|
+
values: Record<string, string>;
|
|
155
|
+
pathPattern: string;
|
|
156
|
+
}[] | undefined;
|
|
117
157
|
baseUrl?: string | undefined;
|
|
118
158
|
skipTLSVerify?: boolean | undefined;
|
|
119
159
|
} | undefined;
|
|
@@ -145,6 +185,10 @@ export declare const serviceSchema: z.ZodObject<{
|
|
|
145
185
|
schemaPath?: string | undefined;
|
|
146
186
|
authType?: "none" | "token" | "bearer" | "basic" | "oauth" | "apiKey" | "cookie" | "session" | undefined;
|
|
147
187
|
defaultQueryParams?: Record<string, string> | undefined;
|
|
188
|
+
queryParamOverrides?: {
|
|
189
|
+
values: Record<string, string>;
|
|
190
|
+
pathPattern: string;
|
|
191
|
+
}[] | undefined;
|
|
148
192
|
baseUrl?: string | undefined;
|
|
149
193
|
skipTLSVerify?: boolean | undefined;
|
|
150
194
|
} | undefined;
|
|
@@ -212,6 +256,34 @@ export declare const workspaceConfigSchema: z.ZodObject<{
|
|
|
212
256
|
* Explicit per-request queryParams always win on a key collision
|
|
213
257
|
* (SKYR-4050). */
|
|
214
258
|
defaultQueryParams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
259
|
+
/** Path-scoped overrides layered on top of defaultQueryParams
|
|
260
|
+
* (SKYR-4127). For a given request, the single most-specific matching
|
|
261
|
+
* pathPattern wins and its values override the base map key by key;
|
|
262
|
+
* overrides never merge with each other. Patterns are picomatch globs
|
|
263
|
+
* matched against the request URL pathname, with OpenAPI-style
|
|
264
|
+
* `{param}` placeholders treated as a single-segment wildcard.
|
|
265
|
+
*
|
|
266
|
+
* The pathname includes any base-path prefix carried by baseUrl — a
|
|
267
|
+
* service at `https://host/api` needs `/api/v1/**`, not `/v1/**`. A
|
|
268
|
+
* pattern that omits the prefix silently matches nothing.
|
|
269
|
+
*
|
|
270
|
+
* Values may use `env.VAR` to defer to an environment variable read
|
|
271
|
+
* where the test runs rather than where it was generated — the
|
|
272
|
+
* generated test carries the lookup itself (os.getenv in Python,
|
|
273
|
+
* process.env in JS/TS, System.getenv in Java). The legacy `envs.`
|
|
274
|
+
* spelling is still accepted. Note the variable name is passed
|
|
275
|
+
* through verbatim and is case-sensitive; a near miss such as
|
|
276
|
+
* `ENV.VAR` is treated as an ordinary literal. */
|
|
277
|
+
queryParamOverrides: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
278
|
+
pathPattern: z.ZodString;
|
|
279
|
+
values: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
280
|
+
}, "strict", z.ZodTypeAny, {
|
|
281
|
+
values: Record<string, string>;
|
|
282
|
+
pathPattern: string;
|
|
283
|
+
}, {
|
|
284
|
+
values: Record<string, string>;
|
|
285
|
+
pathPattern: string;
|
|
286
|
+
}>, "many">>;
|
|
215
287
|
baseUrl: z.ZodOptional<z.ZodString>;
|
|
216
288
|
/** SUT serves self-signed TLS (e.g. a kind kube-apiserver) — generated
|
|
217
289
|
* tests should skip certificate verification for this service (SKYR-3961).
|
|
@@ -223,6 +295,10 @@ export declare const workspaceConfigSchema: z.ZodObject<{
|
|
|
223
295
|
schemaPath?: string | undefined;
|
|
224
296
|
authType?: "none" | "token" | "bearer" | "basic" | "oauth" | "apiKey" | "cookie" | "session" | undefined;
|
|
225
297
|
defaultQueryParams?: Record<string, string> | undefined;
|
|
298
|
+
queryParamOverrides?: {
|
|
299
|
+
values: Record<string, string>;
|
|
300
|
+
pathPattern: string;
|
|
301
|
+
}[] | undefined;
|
|
226
302
|
baseUrl?: string | undefined;
|
|
227
303
|
skipTLSVerify?: boolean | undefined;
|
|
228
304
|
}, {
|
|
@@ -231,6 +307,10 @@ export declare const workspaceConfigSchema: z.ZodObject<{
|
|
|
231
307
|
schemaPath?: string | undefined;
|
|
232
308
|
authType?: "none" | "token" | "bearer" | "basic" | "oauth" | "apiKey" | "cookie" | "session" | undefined;
|
|
233
309
|
defaultQueryParams?: Record<string, string> | undefined;
|
|
310
|
+
queryParamOverrides?: {
|
|
311
|
+
values: Record<string, string>;
|
|
312
|
+
pathPattern: string;
|
|
313
|
+
}[] | undefined;
|
|
234
314
|
baseUrl?: string | undefined;
|
|
235
315
|
skipTLSVerify?: boolean | undefined;
|
|
236
316
|
}>>;
|
|
@@ -307,6 +387,10 @@ export declare const workspaceConfigSchema: z.ZodObject<{
|
|
|
307
387
|
schemaPath?: string | undefined;
|
|
308
388
|
authType?: "none" | "token" | "bearer" | "basic" | "oauth" | "apiKey" | "cookie" | "session" | undefined;
|
|
309
389
|
defaultQueryParams?: Record<string, string> | undefined;
|
|
390
|
+
queryParamOverrides?: {
|
|
391
|
+
values: Record<string, string>;
|
|
392
|
+
pathPattern: string;
|
|
393
|
+
}[] | undefined;
|
|
310
394
|
baseUrl?: string | undefined;
|
|
311
395
|
skipTLSVerify?: boolean | undefined;
|
|
312
396
|
} | undefined;
|
|
@@ -338,6 +422,10 @@ export declare const workspaceConfigSchema: z.ZodObject<{
|
|
|
338
422
|
schemaPath?: string | undefined;
|
|
339
423
|
authType?: "none" | "token" | "bearer" | "basic" | "oauth" | "apiKey" | "cookie" | "session" | undefined;
|
|
340
424
|
defaultQueryParams?: Record<string, string> | undefined;
|
|
425
|
+
queryParamOverrides?: {
|
|
426
|
+
values: Record<string, string>;
|
|
427
|
+
pathPattern: string;
|
|
428
|
+
}[] | undefined;
|
|
341
429
|
baseUrl?: string | undefined;
|
|
342
430
|
skipTLSVerify?: boolean | undefined;
|
|
343
431
|
} | undefined;
|
|
@@ -382,6 +470,10 @@ export declare const workspaceConfigSchema: z.ZodObject<{
|
|
|
382
470
|
schemaPath?: string | undefined;
|
|
383
471
|
authType?: "none" | "token" | "bearer" | "basic" | "oauth" | "apiKey" | "cookie" | "session" | undefined;
|
|
384
472
|
defaultQueryParams?: Record<string, string> | undefined;
|
|
473
|
+
queryParamOverrides?: {
|
|
474
|
+
values: Record<string, string>;
|
|
475
|
+
pathPattern: string;
|
|
476
|
+
}[] | undefined;
|
|
385
477
|
baseUrl?: string | undefined;
|
|
386
478
|
skipTLSVerify?: boolean | undefined;
|
|
387
479
|
} | undefined;
|
|
@@ -426,6 +518,10 @@ export declare const workspaceConfigSchema: z.ZodObject<{
|
|
|
426
518
|
schemaPath?: string | undefined;
|
|
427
519
|
authType?: "none" | "token" | "bearer" | "basic" | "oauth" | "apiKey" | "cookie" | "session" | undefined;
|
|
428
520
|
defaultQueryParams?: Record<string, string> | undefined;
|
|
521
|
+
queryParamOverrides?: {
|
|
522
|
+
values: Record<string, string>;
|
|
523
|
+
pathPattern: string;
|
|
524
|
+
}[] | undefined;
|
|
429
525
|
baseUrl?: string | undefined;
|
|
430
526
|
skipTLSVerify?: boolean | undefined;
|
|
431
527
|
} | undefined;
|
|
@@ -479,6 +575,10 @@ export declare function validateWorkspaceConfig(config: unknown): z.SafeParseRet
|
|
|
479
575
|
schemaPath?: string | undefined;
|
|
480
576
|
authType?: "none" | "token" | "bearer" | "basic" | "oauth" | "apiKey" | "cookie" | "session" | undefined;
|
|
481
577
|
defaultQueryParams?: Record<string, string> | undefined;
|
|
578
|
+
queryParamOverrides?: {
|
|
579
|
+
values: Record<string, string>;
|
|
580
|
+
pathPattern: string;
|
|
581
|
+
}[] | undefined;
|
|
482
582
|
baseUrl?: string | undefined;
|
|
483
583
|
skipTLSVerify?: boolean | undefined;
|
|
484
584
|
} | undefined;
|
|
@@ -523,6 +623,10 @@ export declare function validateWorkspaceConfig(config: unknown): z.SafeParseRet
|
|
|
523
623
|
schemaPath?: string | undefined;
|
|
524
624
|
authType?: "none" | "token" | "bearer" | "basic" | "oauth" | "apiKey" | "cookie" | "session" | undefined;
|
|
525
625
|
defaultQueryParams?: Record<string, string> | undefined;
|
|
626
|
+
queryParamOverrides?: {
|
|
627
|
+
values: Record<string, string>;
|
|
628
|
+
pathPattern: string;
|
|
629
|
+
}[] | undefined;
|
|
526
630
|
baseUrl?: string | undefined;
|
|
527
631
|
skipTLSVerify?: boolean | undefined;
|
|
528
632
|
} | undefined;
|
|
@@ -61,6 +61,30 @@ export const serviceSchema = z
|
|
|
61
61
|
* Explicit per-request queryParams always win on a key collision
|
|
62
62
|
* (SKYR-4050). */
|
|
63
63
|
defaultQueryParams: z.record(z.string()).optional(),
|
|
64
|
+
/** Path-scoped overrides layered on top of defaultQueryParams
|
|
65
|
+
* (SKYR-4127). For a given request, the single most-specific matching
|
|
66
|
+
* pathPattern wins and its values override the base map key by key;
|
|
67
|
+
* overrides never merge with each other. Patterns are picomatch globs
|
|
68
|
+
* matched against the request URL pathname, with OpenAPI-style
|
|
69
|
+
* `{param}` placeholders treated as a single-segment wildcard.
|
|
70
|
+
*
|
|
71
|
+
* The pathname includes any base-path prefix carried by baseUrl — a
|
|
72
|
+
* service at `https://host/api` needs `/api/v1/**`, not `/v1/**`. A
|
|
73
|
+
* pattern that omits the prefix silently matches nothing.
|
|
74
|
+
*
|
|
75
|
+
* Values may use `env.VAR` to defer to an environment variable read
|
|
76
|
+
* where the test runs rather than where it was generated — the
|
|
77
|
+
* generated test carries the lookup itself (os.getenv in Python,
|
|
78
|
+
* process.env in JS/TS, System.getenv in Java). The legacy `envs.`
|
|
79
|
+
* spelling is still accepted. Note the variable name is passed
|
|
80
|
+
* through verbatim and is case-sensitive; a near miss such as
|
|
81
|
+
* `ENV.VAR` is treated as an ordinary literal. */
|
|
82
|
+
queryParamOverrides: z
|
|
83
|
+
.array(z.object({
|
|
84
|
+
pathPattern: z.string().min(1),
|
|
85
|
+
values: z.record(z.string()),
|
|
86
|
+
}).strict())
|
|
87
|
+
.optional(),
|
|
64
88
|
baseUrl: z.string().optional(),
|
|
65
89
|
/** SUT serves self-signed TLS (e.g. a kind kube-apiserver) — generated
|
|
66
90
|
* tests should skip certificate verification for this service (SKYR-3961).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skyramp/mcp",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.4",
|
|
4
4
|
"main": "build/index.js",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./build/index.js",
|
|
@@ -70,13 +70,14 @@
|
|
|
70
70
|
"dependencies": {
|
|
71
71
|
"@modelcontextprotocol/sdk": "^1.24.3",
|
|
72
72
|
"@playwright/test": "^1.55.0",
|
|
73
|
-
"@skyramp/skyramp": "1.3.
|
|
73
|
+
"@skyramp/skyramp": "1.3.40",
|
|
74
74
|
"dockerode": "^5.0.0",
|
|
75
75
|
"fast-glob": "^3.3.3",
|
|
76
76
|
"js-yaml": "^4.1.1",
|
|
77
77
|
"picomatch": "^4.0.5",
|
|
78
78
|
"playwright": "file:vendor/skyramp-playwright-1.58.2-skyramp.8.14.4.tgz",
|
|
79
79
|
"simple-git": "^3.30.0",
|
|
80
|
+
"ts-is-record": "^3.0.5",
|
|
80
81
|
"typescript": "^5.8.3",
|
|
81
82
|
"zod": "^3.25.3"
|
|
82
83
|
},
|