@skyramp/mcp 0.2.6 → 0.2.7
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/commands/commandLibrary.d.ts +12 -0
- package/build/commands/recommendTestsAndExecuteCommand.d.ts +2 -0
- package/build/commands/testThisEndpointCommand.d.ts +2 -0
- package/build/index.d.ts +2 -0
- package/build/index.js +1 -2
- package/build/playwright/PlaywrightTraceService.d.ts +32 -0
- package/build/playwright/index.d.ts +3 -0
- package/build/playwright/registerPlaywrightTools.d.ts +8 -0
- package/build/playwright/registerPlaywrightTools.js +12 -11
- package/build/playwright/traceRecordingPrompt.d.ts +13 -0
- package/build/playwright/traceRecordingPrompt.js +3 -11
- package/build/prompts/code-reuse.d.ts +1 -0
- package/build/prompts/enhance-assertions/contractProviderAssertionsPrompt.d.ts +2 -0
- package/build/prompts/enhance-assertions/integrationAssertionsPrompt.d.ts +2 -0
- package/build/prompts/enhance-assertions/sharedAssertionRules.d.ts +15 -0
- package/build/prompts/enhance-assertions/uiAssertionsPrompt.d.ts +2 -0
- package/build/prompts/fix-error-prompt.d.ts +1 -0
- package/build/prompts/initialize-workspace/initializeWorkspacePrompt.d.ts +1 -0
- package/build/prompts/modularization/integration-test-modularization.d.ts +1 -0
- package/build/prompts/modularization/ui-test-modularization.d.ts +1 -0
- package/build/prompts/personas.d.ts +21 -0
- package/build/prompts/pom-aware-code-reuse.d.ts +1 -0
- package/build/prompts/startTraceCollectionPrompts.d.ts +2 -0
- package/build/prompts/test-maintenance/actionsInstructions.d.ts +35 -0
- package/build/prompts/test-maintenance/drift-analysis-prompt.d.ts +4 -0
- package/build/prompts/test-maintenance/driftAnalysisSections.d.ts +13 -0
- package/build/prompts/test-recommendation/analysisOutputPrompt.d.ts +84 -0
- package/build/prompts/test-recommendation/analysisOutputPrompt.test.d.ts +1 -0
- package/build/prompts/test-recommendation/analysisOutputPrompt.test.js +1 -0
- package/build/prompts/test-recommendation/diffExecutionPlan.d.ts +17 -0
- package/build/prompts/test-recommendation/diffExecutionPlan.js +7 -16
- package/build/prompts/test-recommendation/fullRepoCatalog.d.ts +7 -0
- package/build/prompts/test-recommendation/mergeEnrichedScenarios.test.d.ts +1 -0
- package/build/prompts/test-recommendation/mergeEnrichedScenarios.test.js +1 -0
- package/build/prompts/test-recommendation/promptPlan.d.ts +203 -0
- package/build/prompts/test-recommendation/promptPlan.test.d.ts +1 -0
- package/build/prompts/test-recommendation/recommendationSections.d.ts +35 -0
- package/build/prompts/test-recommendation/recommendationShared.d.ts +31 -0
- package/build/prompts/test-recommendation/registerRecommendTestsPrompt.d.ts +7 -0
- package/build/prompts/test-recommendation/scopeAssessment.d.ts +55 -0
- package/build/prompts/test-recommendation/scopeAssessment.js +2 -2
- package/build/prompts/test-recommendation/scopeAssessment.test.d.ts +1 -0
- package/build/prompts/test-recommendation/scopeAssessment.test.js +1 -0
- package/build/prompts/test-recommendation/test-recommendation-prompt.d.ts +6 -0
- package/build/prompts/test-recommendation/test-recommendation-prompt.js +4 -4
- package/build/prompts/test-recommendation/test-recommendation-prompt.test.d.ts +1 -0
- package/build/prompts/test-recommendation/test-recommendation-prompt.test.js +6 -99
- package/build/prompts/testbot/testbot-prompts.d.ts +11 -0
- package/build/prompts/testbot/testbot-prompts.js +198 -34
- package/build/prompts/testbot/testbot-prompts.test.d.ts +1 -0
- package/build/prompts/testbot/testbot-prompts.test.js +15 -73
- package/build/resources/analysisResources.d.ts +17 -0
- package/build/resources/progressResource.d.ts +2 -0
- package/build/resources/testbotResource.d.ts +2 -0
- package/build/services/AnalyticsService.d.ts +13 -0
- package/build/services/AnalyticsService.test.d.ts +1 -0
- package/build/services/AnalyticsService.test.js +86 -0
- package/build/services/ModularizationService.d.ts +11 -0
- package/build/services/ScenarioGenerationService.d.ts +37 -0
- package/build/services/ScenarioGenerationService.integration.test.d.ts +1 -0
- package/build/services/ScenarioGenerationService.integration.test.js +4 -0
- package/build/services/ScenarioGenerationService.test.d.ts +1 -0
- package/build/services/TestDiscoveryService.d.ts +128 -0
- package/build/services/TestDiscoveryService.test.d.ts +1 -0
- package/build/services/TestDiscoveryService.test.js +4 -3
- package/build/services/TestExecutionService.d.ts +46 -0
- package/build/services/TestExecutionService.test.d.ts +1 -0
- package/build/services/TestExecutionService.test.js +33 -25
- package/build/services/TestGenerationService.d.ts +56 -0
- package/build/services/TestGenerationService.test.d.ts +1 -0
- package/build/services/TestGenerationService.test.js +10 -8
- package/build/services/containerEnv.d.ts +14 -0
- package/build/tool-phase-coverage.test.d.ts +1 -0
- package/build/tool-phase-coverage.test.js +2 -0
- package/build/tool-phases.d.ts +38 -0
- package/build/tools/auth/loginTool.d.ts +2 -0
- package/build/tools/auth/logoutTool.d.ts +2 -0
- package/build/tools/code-refactor/codeReuseTool.d.ts +2 -0
- package/build/tools/code-refactor/enhanceAssertionsTool.d.ts +2 -0
- package/build/tools/code-refactor/modularizationTool.d.ts +2 -0
- package/build/tools/executeSkyrampTestTool.d.ts +2 -0
- package/build/tools/fixErrorTool.d.ts +2 -0
- package/build/tools/generate-tests/generateBatchScenarioRestTool.d.ts +45 -0
- package/build/tools/generate-tests/generateBatchScenarioRestTool.test.d.ts +1 -0
- package/build/tools/generate-tests/generateBatchScenarioRestTool.test.js +11 -9
- package/build/tools/generate-tests/generateContractRestTool.d.ts +31 -0
- package/build/tools/generate-tests/generateE2ERestTool.d.ts +13 -0
- package/build/tools/generate-tests/generateFuzzRestTool.d.ts +10 -0
- package/build/tools/generate-tests/generateIntegrationRestTool.d.ts +16 -0
- package/build/tools/generate-tests/generateLoadRestTool.d.ts +18 -0
- package/build/tools/generate-tests/generateLoadRestTool.test.d.ts +1 -0
- package/build/tools/generate-tests/generateMockRestTool.d.ts +64 -0
- package/build/tools/generate-tests/generateSmokeRestTool.d.ts +8 -0
- package/build/tools/generate-tests/generateUIRestTool.d.ts +14 -0
- package/build/tools/generate-tests/generateUIRestTool.js +1 -1
- package/build/tools/generate-tests/loadTestSchema.d.ts +39 -0
- package/build/tools/one-click/oneClickTool.d.ts +11 -0
- package/build/tools/submitReportTool.d.ts +384 -0
- package/build/tools/submitReportTool.js +144 -2
- package/build/tools/submitReportTool.test.d.ts +1 -0
- package/build/tools/submitReportTool.test.js +215 -5
- package/build/tools/test-management/actionsTool.d.ts +10 -0
- package/build/tools/test-management/analyzeChangesTool.d.ts +27 -0
- package/build/tools/test-management/analyzeChangesTool.js +44 -7
- package/build/tools/test-management/analyzeChangesTool.test.d.ts +1 -0
- package/build/tools/test-management/analyzeChangesTool.test.js +76 -39
- package/build/tools/test-management/analyzeTestHealthTool.d.ts +2 -0
- package/build/tools/test-management/index.d.ts +3 -0
- package/build/tools/test-management/index.js +0 -1
- package/build/tools/trace/resolveSaveStoragePath.d.ts +7 -0
- package/build/tools/trace/resolveSaveStoragePath.test.d.ts +1 -0
- package/build/tools/trace/resolveSessionPaths.d.ts +40 -0
- package/build/tools/trace/resolveSessionPaths.test.d.ts +1 -0
- package/build/tools/trace/sessionState.d.ts +2 -0
- package/build/tools/trace/sessionState.test.d.ts +1 -0
- package/build/tools/trace/startTraceCollectionTool.d.ts +2 -0
- package/build/tools/trace/stopTraceCollectionTool.d.ts +2 -0
- package/build/tools/workspace/initScanWorkspaceTool.d.ts +4 -0
- package/build/tools/workspace/initializeWorkspaceTool.d.ts +2 -0
- package/build/tools/workspace/initializeWorkspaceTool.test.d.ts +1 -0
- package/build/tools/workspace/initializeWorkspaceTool.test.js +134 -0
- package/build/types/OneClickCommands.d.ts +68 -0
- package/build/types/RepositoryAnalysis.d.ts +3004 -0
- package/build/types/TestAnalysis.d.ts +96 -0
- package/build/types/TestExecution.d.ts +53 -0
- package/build/types/TestRecommendation.d.ts +12 -0
- package/build/types/TestTypes.d.ts +234 -0
- package/build/utils/AnalysisStateManager.d.ts +182 -0
- package/build/utils/AnalysisStateManager.test.d.ts +1 -0
- package/build/utils/analyze-openapi.d.ts +1 -0
- package/build/utils/branchDiff.d.ts +18 -0
- package/build/utils/dartRouteExtractor.d.ts +45 -0
- package/build/utils/dartRouteExtractor.test.d.ts +1 -0
- package/build/utils/docker.d.ts +19 -0
- package/build/utils/docker.test.d.ts +1 -0
- package/build/utils/docker.test.js +10 -9
- package/build/utils/featureFlags.d.ts +37 -0
- package/build/utils/featureFlags.test.d.ts +1 -0
- package/build/utils/gitStaging.d.ts +24 -0
- package/build/utils/gitStaging.test.d.ts +1 -0
- package/build/utils/gitStaging.test.js +13 -7
- package/build/utils/httpDefaults.d.ts +10 -0
- package/build/utils/httpDefaults.test.d.ts +1 -0
- package/build/utils/initAgent.d.ts +36 -0
- package/build/utils/language-helper.d.ts +6 -0
- package/build/utils/logger.d.ts +11 -0
- package/build/utils/normalizeParams.d.ts +14 -0
- package/build/utils/normalizeSkyrampImports.d.ts +13 -0
- package/build/utils/pr-comment-parser.d.ts +31 -0
- package/build/utils/pr-comment-parser.test.d.ts +1 -0
- package/build/utils/pr-comment-parser.test.js +6 -5
- package/build/utils/projectMetadata.d.ts +15 -0
- package/build/utils/projectMetadata.test.d.ts +1 -0
- package/build/utils/proxy-terminal.d.ts +2 -0
- package/build/utils/repoScanner.d.ts +27 -0
- package/build/utils/repoScanner.test.d.ts +1 -0
- package/build/utils/routeParsers.d.ts +63 -0
- package/build/utils/routeParsers.test.d.ts +1 -0
- package/build/utils/scenarioDrafting.d.ts +71 -0
- package/build/utils/scenarioDrafting.test.d.ts +1 -0
- package/build/utils/skyrampMdContent.d.ts +5 -0
- package/build/utils/sourceRouteExtractor.d.ts +48 -0
- package/build/utils/sourceRouteExtractor.test.d.ts +1 -0
- package/build/utils/telemetry.d.ts +32 -0
- package/build/utils/telemetry.test.d.ts +1 -0
- package/build/utils/trace-parser.d.ts +32 -0
- package/build/utils/trace-parser.test.d.ts +6 -0
- package/build/utils/uiPageEnumerator.d.ts +146 -0
- package/build/utils/uiPageEnumerator.js +58 -14
- package/build/utils/uiPageEnumerator.test.d.ts +1 -0
- package/build/utils/uiPageEnumerator.test.js +223 -43
- package/build/utils/utils.d.ts +39 -0
- package/build/utils/utils.test.d.ts +1 -0
- package/build/utils/versions.d.ts +3 -0
- package/build/utils/versions.js +1 -1
- package/build/utils/workspaceAuth.d.ts +127 -0
- package/build/utils/workspaceAuth.test.d.ts +1 -0
- package/build/utils/workspaceAuth.test.js +25 -25
- package/build/workspace/index.d.ts +1 -0
- package/build/workspace/workspace.d.ts +390 -0
- package/build/workspace/workspace.test.d.ts +1 -0
- package/package.json +8 -3
- package/build/tools/test-management/uiAnalyzeChangesTool.js +0 -155
- package/build/tools/test-management/uiAnalyzeChangesTool.test.js +0 -147
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { HttpMethod } from "../../types/TestTypes.js";
|
|
4
|
+
export declare const stepSchema: z.ZodEffects<z.ZodObject<{
|
|
5
|
+
method: z.ZodNativeEnum<typeof HttpMethod>;
|
|
6
|
+
path: z.ZodString;
|
|
7
|
+
requestBody: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, string | undefined>;
|
|
8
|
+
queryParams: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, string | undefined>;
|
|
9
|
+
responseBody: z.ZodOptional<z.ZodString>;
|
|
10
|
+
statusCode: z.ZodOptional<z.ZodNumber>;
|
|
11
|
+
responseHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
|
|
12
|
+
}, "strip", z.ZodTypeAny, {
|
|
13
|
+
path: string;
|
|
14
|
+
method: HttpMethod;
|
|
15
|
+
queryParams?: string | undefined;
|
|
16
|
+
statusCode?: number | undefined;
|
|
17
|
+
requestBody?: string | undefined;
|
|
18
|
+
responseBody?: string | undefined;
|
|
19
|
+
responseHeaders?: Record<string, string[]> | undefined;
|
|
20
|
+
}, {
|
|
21
|
+
path: string;
|
|
22
|
+
method: HttpMethod;
|
|
23
|
+
queryParams?: string | undefined;
|
|
24
|
+
statusCode?: number | undefined;
|
|
25
|
+
requestBody?: string | undefined;
|
|
26
|
+
responseBody?: string | undefined;
|
|
27
|
+
responseHeaders?: Record<string, string[]> | undefined;
|
|
28
|
+
}>, {
|
|
29
|
+
path: string;
|
|
30
|
+
method: HttpMethod;
|
|
31
|
+
queryParams?: string | undefined;
|
|
32
|
+
statusCode?: number | undefined;
|
|
33
|
+
requestBody?: string | undefined;
|
|
34
|
+
responseBody?: string | undefined;
|
|
35
|
+
responseHeaders?: Record<string, string[]> | undefined;
|
|
36
|
+
}, {
|
|
37
|
+
path: string;
|
|
38
|
+
method: HttpMethod;
|
|
39
|
+
queryParams?: string | undefined;
|
|
40
|
+
statusCode?: number | undefined;
|
|
41
|
+
requestBody?: string | undefined;
|
|
42
|
+
responseBody?: string | undefined;
|
|
43
|
+
responseHeaders?: Record<string, string[]> | undefined;
|
|
44
|
+
}>;
|
|
45
|
+
export declare function registerBatchScenarioTestTool(server: McpServer): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
// @ts-nocheck - Jest ESM type inference issues
|
|
2
|
+
import { jest } from "@jest/globals";
|
|
3
|
+
import fs from "fs";
|
|
4
|
+
jest.unstable_mockModule("../../services/ScenarioGenerationService.js", () => ({
|
|
2
5
|
ScenarioGenerationService: jest.fn().mockImplementation(() => ({
|
|
3
6
|
generateTraceRequestFromInput: jest.fn().mockReturnValue(null),
|
|
4
7
|
})),
|
|
5
8
|
}));
|
|
6
|
-
jest.
|
|
7
|
-
jest.
|
|
9
|
+
jest.unstable_mockModule("../../services/AnalyticsService.js", () => ({ AnalyticsService: { pushMCPToolEvent: jest.fn().mockResolvedValue(undefined) } }));
|
|
10
|
+
jest.unstable_mockModule("../../utils/workspaceAuth.js", () => ({
|
|
8
11
|
getWorkspaceAuthConfig: jest.fn().mockResolvedValue({ authHeader: undefined, authType: "none" }),
|
|
9
12
|
WorkspaceAuthType: { None: "none" },
|
|
10
13
|
getDefaultAuthHeader: jest.fn().mockReturnValue(""),
|
|
@@ -12,10 +15,10 @@ jest.mock("../../utils/workspaceAuth.js", () => ({
|
|
|
12
15
|
getAuthScheme: jest.fn().mockReturnValue(""),
|
|
13
16
|
readWorkspaceConfigRaw: jest.fn().mockResolvedValue(null),
|
|
14
17
|
}));
|
|
15
|
-
jest.
|
|
16
|
-
jest.
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
jest.unstable_mockModule("../../utils/logger.js", () => ({ logger: { info: jest.fn(), warning: jest.fn(), error: jest.fn() } }));
|
|
19
|
+
jest.unstable_mockModule("../../prompts/personas.js", () => ({ getPersonaPrefix: () => "" }));
|
|
20
|
+
const { stepSchema, registerBatchScenarioTestTool } = await import("./generateBatchScenarioRestTool.js");
|
|
21
|
+
const { ScenarioGenerationService } = await import("../../services/ScenarioGenerationService.js");
|
|
19
22
|
/** Build a minimal mock McpServer, register the tool, and return the captured handler. */
|
|
20
23
|
function captureHandler() {
|
|
21
24
|
let capturedHandler;
|
|
@@ -191,8 +194,7 @@ describe("generateBatchScenarioRestTool — spec path validation (Change 3)", ()
|
|
|
191
194
|
readFileSyncSpy = jest.spyOn(fs, "readFileSync").mockReturnValue(fakeSpec);
|
|
192
195
|
writeFileSyncSpy = jest.spyOn(fs, "writeFileSync").mockImplementation(() => { });
|
|
193
196
|
// Return a valid trace so tests reach the success path (where the warning is appended)
|
|
194
|
-
|
|
195
|
-
ScenarioSvc.mockImplementation(() => ({
|
|
197
|
+
ScenarioGenerationService.mockImplementation(() => ({
|
|
196
198
|
generateTraceRequestFromInput: jest.fn().mockReturnValue({ method: "GET", path: "/mock" }),
|
|
197
199
|
}));
|
|
198
200
|
});
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
+
import { TestType } from "../../types/TestTypes.js";
|
|
3
|
+
import { TestGenerationService, BaseTestParams } from "../../services/TestGenerationService.js";
|
|
4
|
+
import { CallToolResult } from "@modelcontextprotocol/sdk/types.js";
|
|
5
|
+
type ContractParams = BaseTestParams & {
|
|
6
|
+
enhanceAssertions?: boolean;
|
|
7
|
+
assertOptions?: string;
|
|
8
|
+
responseData?: string;
|
|
9
|
+
providerMode?: boolean;
|
|
10
|
+
consumerMode?: boolean;
|
|
11
|
+
providerOutput?: string;
|
|
12
|
+
consumerOutput?: string;
|
|
13
|
+
parentRequestData?: Record<string, string>;
|
|
14
|
+
parentStatusCode?: Record<string, string>;
|
|
15
|
+
parentFormParams?: Record<string, string>;
|
|
16
|
+
skipProvisionParents?: boolean;
|
|
17
|
+
};
|
|
18
|
+
export declare class ContractTestService extends TestGenerationService {
|
|
19
|
+
protected getTestType(): TestType;
|
|
20
|
+
protected handleApiAnalysis(params: BaseTestParams): Promise<CallToolResult | null>;
|
|
21
|
+
generateTest(params: ContractParams & Record<string, any>): Promise<CallToolResult>;
|
|
22
|
+
private buildSampleDataSection;
|
|
23
|
+
private buildPlaceholderReplacementBlock;
|
|
24
|
+
private buildSampleDataInstructions;
|
|
25
|
+
private buildProviderPostGenInstructions;
|
|
26
|
+
private buildConsumerStubReplacementInstructions;
|
|
27
|
+
protected validateInputs(params: ContractParams): CallToolResult;
|
|
28
|
+
protected buildGenerationOptions(params: ContractParams): any;
|
|
29
|
+
}
|
|
30
|
+
export declare function registerContractTestTool(server: McpServer): void;
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
+
import { TestType } from "../../types/TestTypes.js";
|
|
3
|
+
import { TestGenerationService, BaseTestParams } from "../../services/TestGenerationService.js";
|
|
4
|
+
import { CallToolResult } from "@modelcontextprotocol/sdk/types.js";
|
|
5
|
+
export declare class E2ETestService extends TestGenerationService {
|
|
6
|
+
protected getTestType(): TestType;
|
|
7
|
+
protected buildGenerationOptions(params: BaseTestParams & {
|
|
8
|
+
responseData?: string;
|
|
9
|
+
playwrightInput?: string;
|
|
10
|
+
}): any;
|
|
11
|
+
protected handleApiAnalysis(params: BaseTestParams): Promise<CallToolResult | null>;
|
|
12
|
+
}
|
|
13
|
+
export declare function registerE2ETestTool(server: McpServer): void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
+
import { TestType } from "../../types/TestTypes.js";
|
|
3
|
+
import { TestGenerationService, BaseTestParams } from "../../services/TestGenerationService.js";
|
|
4
|
+
export declare class FuzzTestService extends TestGenerationService {
|
|
5
|
+
protected getTestType(): TestType;
|
|
6
|
+
protected buildGenerationOptions(params: BaseTestParams & {
|
|
7
|
+
responseData?: string;
|
|
8
|
+
}): any;
|
|
9
|
+
}
|
|
10
|
+
export declare function registerFuzzTestTool(server: McpServer): void;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
+
import { TestType } from "../../types/TestTypes.js";
|
|
3
|
+
import { TestGenerationService, BaseTestParams } from "../../services/TestGenerationService.js";
|
|
4
|
+
import { CallToolResult } from "@modelcontextprotocol/sdk/types.js";
|
|
5
|
+
export declare class IntegrationTestService extends TestGenerationService {
|
|
6
|
+
protected getTestType(): TestType;
|
|
7
|
+
generateTest(params: BaseTestParams & Record<string, any>): Promise<CallToolResult>;
|
|
8
|
+
private buildAssertionEnhancementInstructions;
|
|
9
|
+
protected buildGenerationOptions(params: BaseTestParams & {
|
|
10
|
+
responseData?: string;
|
|
11
|
+
playwrightInput?: string;
|
|
12
|
+
scenarioFile?: string;
|
|
13
|
+
}): any;
|
|
14
|
+
protected handleApiAnalysis(_params: BaseTestParams): Promise<CallToolResult | null>;
|
|
15
|
+
}
|
|
16
|
+
export declare function registerIntegrationTestTool(server: McpServer): void;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
+
import { TestType } from "../../types/TestTypes.js";
|
|
3
|
+
import { TestGenerationService, BaseTestParams } from "../../services/TestGenerationService.js";
|
|
4
|
+
import { CallToolResult } from "@modelcontextprotocol/sdk/types.js";
|
|
5
|
+
export { loadTestSchema, numericString } from "./loadTestSchema.js";
|
|
6
|
+
export declare class LoadTestService extends TestGenerationService {
|
|
7
|
+
protected getTestType(): TestType;
|
|
8
|
+
protected buildGenerationOptions(params: BaseTestParams & {
|
|
9
|
+
loadCount?: string;
|
|
10
|
+
loadDuration?: string;
|
|
11
|
+
loadNumThreads?: string;
|
|
12
|
+
loadRampupDuration?: string;
|
|
13
|
+
loadRampupInterval?: string;
|
|
14
|
+
loadTargetRPS?: string;
|
|
15
|
+
}): any;
|
|
16
|
+
protected handleApiAnalysis(params: BaseTestParams): Promise<CallToolResult | null>;
|
|
17
|
+
}
|
|
18
|
+
export declare function registerLoadTestTool(server: McpServer): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
+
import { TestType } from "../../types/TestTypes.js";
|
|
3
|
+
import { TestGenerationService } from "../../services/TestGenerationService.js";
|
|
4
|
+
import { CallToolResult } from "@modelcontextprotocol/sdk/types.js";
|
|
5
|
+
type MockParams = {
|
|
6
|
+
endpointURL?: string;
|
|
7
|
+
method?: string;
|
|
8
|
+
apiSchema?: string;
|
|
9
|
+
responseData?: string;
|
|
10
|
+
responseStatusCode?: string;
|
|
11
|
+
requestData?: string;
|
|
12
|
+
formParams?: string;
|
|
13
|
+
requestAware?: boolean;
|
|
14
|
+
trace?: string;
|
|
15
|
+
mockPort?: number;
|
|
16
|
+
optionalFields?: boolean;
|
|
17
|
+
language?: string;
|
|
18
|
+
framework?: string;
|
|
19
|
+
output?: string;
|
|
20
|
+
outputDir: string;
|
|
21
|
+
force: boolean;
|
|
22
|
+
deployDashboard?: boolean;
|
|
23
|
+
runtime?: string;
|
|
24
|
+
dockerNetwork?: string;
|
|
25
|
+
dockerWorkerPort?: number;
|
|
26
|
+
k8sNamespace?: string;
|
|
27
|
+
k8sConfig?: string;
|
|
28
|
+
k8sContext?: string;
|
|
29
|
+
prompt?: string;
|
|
30
|
+
};
|
|
31
|
+
export declare class MockGenerationService extends TestGenerationService {
|
|
32
|
+
protected getTestType(): TestType;
|
|
33
|
+
generateTest(params: MockParams & Record<string, any>): Promise<CallToolResult>;
|
|
34
|
+
private buildReorganizationInstructions;
|
|
35
|
+
protected buildGenerationOptions(params: MockParams): {
|
|
36
|
+
uri: string | undefined;
|
|
37
|
+
method: string | undefined;
|
|
38
|
+
apiSchema: string[];
|
|
39
|
+
language: string;
|
|
40
|
+
framework: string;
|
|
41
|
+
output: string | undefined;
|
|
42
|
+
outputDir: string;
|
|
43
|
+
force: boolean;
|
|
44
|
+
deployDashboard: boolean | undefined;
|
|
45
|
+
runtime: string | undefined;
|
|
46
|
+
dockerNetwork: string | undefined;
|
|
47
|
+
dockerWorkerPort: string;
|
|
48
|
+
k8sNamespace: string | undefined;
|
|
49
|
+
k8sConfig: string | undefined;
|
|
50
|
+
k8sContext: string | undefined;
|
|
51
|
+
requestData: string | undefined;
|
|
52
|
+
responseData: string | undefined;
|
|
53
|
+
responseStatusCode: string | undefined;
|
|
54
|
+
formParams: string | undefined;
|
|
55
|
+
requestAware: boolean | undefined;
|
|
56
|
+
traceFilePath: string | undefined;
|
|
57
|
+
entrypoint: string;
|
|
58
|
+
mockPort: number;
|
|
59
|
+
optionalFields: boolean;
|
|
60
|
+
};
|
|
61
|
+
protected executeGeneration(generateOptions: any): Promise<string>;
|
|
62
|
+
}
|
|
63
|
+
export declare function registerMockTool(server: McpServer): void;
|
|
64
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
+
import { TestType } from "../../types/TestTypes.js";
|
|
3
|
+
import { TestGenerationService, BaseTestParams } from "../../services/TestGenerationService.js";
|
|
4
|
+
export declare class SmokeTestService extends TestGenerationService {
|
|
5
|
+
protected getTestType(): TestType;
|
|
6
|
+
protected buildGenerationOptions(params: BaseTestParams): any;
|
|
7
|
+
}
|
|
8
|
+
export declare function registerSmokeTestTool(server: McpServer): void;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
+
import { TestType } from "../../types/TestTypes.js";
|
|
3
|
+
import { BaseTestParams, TestGenerationService } from "../../services/TestGenerationService.js";
|
|
4
|
+
import { CallToolResult } from "@modelcontextprotocol/sdk/types.js";
|
|
5
|
+
export declare class UITestService extends TestGenerationService {
|
|
6
|
+
protected getTestType(): TestType;
|
|
7
|
+
protected buildGenerationOptions(params: BaseTestParams & {
|
|
8
|
+
playwrightInput?: string;
|
|
9
|
+
}): any;
|
|
10
|
+
protected handleApiAnalysis(params: BaseTestParams): Promise<CallToolResult | null>;
|
|
11
|
+
generateTest(params: BaseTestParams & Record<string, any>): Promise<CallToolResult>;
|
|
12
|
+
private buildUIPostGenInstructions;
|
|
13
|
+
}
|
|
14
|
+
export declare function registerUITestTool(server: McpServer): void;
|
|
@@ -96,7 +96,7 @@ This tells you exactly which frontend files changed so you record traces for the
|
|
|
96
96
|
|
|
97
97
|
**Typical pipeline:** Use the \`browser_*\` tools (\`browser_navigate\`, \`browser_click\`, \`browser_type\`, etc.) to record user interactions, then call \`skyramp_export_zip\` to export a trace zip, then pass the absolute path to that zip as \`playwrightInput\` here.
|
|
98
98
|
|
|
99
|
-
**DOM Analyzer tools for blueprint-aware recording:** alongside the basic \`browser_*\` interaction tools, the Skyramp MCP exposes \`browser_blueprint\` (canonical PageBlueprint capture)
|
|
99
|
+
**DOM Analyzer tools for blueprint-aware recording:** alongside the basic \`browser_*\` interaction tools, the Skyramp MCP exposes \`browser_blueprint\` (canonical PageBlueprint capture). This enables semantic target selection and delta-derived assertions: capture a blueprint before each meaningful action, perform the action, then capture again — the delta between the two grounds your assertions in observable state changes rather than author guesses about what "success" looks like.
|
|
100
100
|
|
|
101
101
|
**CRITICAL: Do NOT use skyramp_start_trace_collection/skyramp_stop_trace_collection for UI test recording — use browser_* tools + skyramp_export_zip instead.**`,
|
|
102
102
|
inputSchema: uiTestSchema,
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const numericString: (description: string) => z.ZodEffects<z.ZodString, string, string>;
|
|
3
|
+
export declare const loadTestSchema: {
|
|
4
|
+
loadCount: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
5
|
+
loadDuration: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
6
|
+
loadNumThreads: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
7
|
+
loadRampupDuration: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
8
|
+
loadRampupInterval: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
9
|
+
loadTargetRPS: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
|
|
10
|
+
trace: z.ZodDefault<z.ZodString>;
|
|
11
|
+
include: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
12
|
+
exclude: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
13
|
+
endpointURL: z.ZodDefault<z.ZodString>;
|
|
14
|
+
deployDashboard: z.ZodDefault<z.ZodBoolean>;
|
|
15
|
+
runtime: z.ZodDefault<z.ZodNativeEnum<typeof import("../../types/TestTypes.js").RuntimeEnvironment>>;
|
|
16
|
+
dockerNetwork: z.ZodDefault<z.ZodString>;
|
|
17
|
+
dockerWorkerPort: z.ZodDefault<z.ZodNumber>;
|
|
18
|
+
k8sNamespace: z.ZodDefault<z.ZodString>;
|
|
19
|
+
k8sConfig: z.ZodDefault<z.ZodString>;
|
|
20
|
+
k8sContext: z.ZodDefault<z.ZodString>;
|
|
21
|
+
authHeader: z.ZodDefault<z.ZodString>;
|
|
22
|
+
authScheme: z.ZodDefault<z.ZodString>;
|
|
23
|
+
insecure: z.ZodDefault<z.ZodBoolean>;
|
|
24
|
+
output: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, string | undefined>;
|
|
25
|
+
outputDir: z.ZodString;
|
|
26
|
+
force: z.ZodDefault<z.ZodBoolean>;
|
|
27
|
+
mockPort: z.ZodDefault<z.ZodNumber>;
|
|
28
|
+
optionalFields: z.ZodDefault<z.ZodBoolean>;
|
|
29
|
+
prompt: z.ZodString;
|
|
30
|
+
language: z.ZodNativeEnum<typeof import("../../types/TestTypes.js").ProgrammingLanguage>;
|
|
31
|
+
framework: z.ZodString;
|
|
32
|
+
method: z.ZodDefault<z.ZodUnion<[z.ZodNativeEnum<typeof import("../../types/TestTypes.js").HttpMethod>, z.ZodLiteral<"">]>>;
|
|
33
|
+
apiSchema: z.ZodDefault<z.ZodString>;
|
|
34
|
+
pathParams: z.ZodDefault<z.ZodString>;
|
|
35
|
+
queryParams: z.ZodDefault<z.ZodString>;
|
|
36
|
+
formParams: z.ZodDefault<z.ZodString>;
|
|
37
|
+
requestData: z.ZodEffects<z.ZodDefault<z.ZodString>, string, string | undefined>;
|
|
38
|
+
responseStatusCode: z.ZodEffects<z.ZodDefault<z.ZodString>, string, string | undefined>;
|
|
39
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
+
/** User params passed to workflow builder (optional fields may be undefined) */
|
|
3
|
+
export type OneClickParams = {
|
|
4
|
+
workflow: string;
|
|
5
|
+
repositoryPath: string;
|
|
6
|
+
endpointURL?: string;
|
|
7
|
+
apiSchema?: string;
|
|
8
|
+
topN?: number;
|
|
9
|
+
token?: string;
|
|
10
|
+
};
|
|
11
|
+
export declare function registerOneClickTool(server: McpServer): void;
|