UNPKG

@skyramp/mcp

Version:

Skyramp MCP (Model Context Protocol) Server - AI-powered test generation and execution

53 lines (52 loc) 1.89 kB
import { z } from "zod"; import { TestType } from "./TestTypes.js"; // Test type to documentation URL mapping export const TEST_TYPE_DOCS = { [TestType.SMOKE]: "https://www.skyramp.dev/docs/smoke-tests", [TestType.CONTRACT]: "https://www.skyramp.dev/docs/contract-tests", [TestType.FUZZ]: "https://www.skyramp.dev/docs/fuzz-tests", [TestType.INTEGRATION]: "https://www.skyramp.dev/docs/integration-tests", [TestType.LOAD]: "https://www.skyramp.dev/docs/load-tests", [TestType.E2E]: "https://www.skyramp.dev/docs/e2e-tests", [TestType.UI]: "https://www.skyramp.dev/docs/ui-tests", }; // Zod schemas for validation export const specificTestSchema = z.object({ testName: z.string(), description: z.string(), targetEndpoint: z.string().optional(), targetFlow: z.string().optional(), // generationPrompt: z.string(), requiredInputs: z.object({ available: z.array(z.object({ name: z.string(), path: z.string(), })), missing: z.array(z.object({ name: z.string(), guidance: z.string(), })), }), estimatedValue: z.string(), }); export const testTypeRecommendationSchema = z.object({ priority: z.enum(["high", "medium", "low"]), testType: z.nativeEnum(TestType), rationale: z.string(), specificTests: z.array(specificTestSchema), gettingStarted: z.object({ prerequisites: z.array(z.string()), quickStartCommand: z.string().optional(), documentationUrl: z.string(), }), }); export const testRecommendationSchema = z.object({ summary: z.object({ totalRecommended: z.number(), highPriorityCount: z.number(), estimatedEffort: z.string(), quickWins: z.array(z.string()), }), recommendations: z.array(testTypeRecommendationSchema), nextSteps: z.array(z.string()), });