@skyramp/mcp 0.3.2-rc.pom-4 → 0.3.2

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.
Files changed (132) hide show
  1. package/build/adapters/jestAdapter.d.ts +14 -0
  2. package/build/adapters/jestAdapter.js +113 -0
  3. package/build/adapters/mochaAdapter.d.ts +13 -0
  4. package/build/adapters/mochaAdapter.js +87 -0
  5. package/build/adapters/playwrightAdapter.d.ts +17 -0
  6. package/build/adapters/playwrightAdapter.js +182 -0
  7. package/build/adapters/pytestAdapter.d.ts +15 -0
  8. package/build/adapters/pytestAdapter.js +108 -0
  9. package/build/commands/commandLibrary.d.ts +1 -0
  10. package/build/commands/commandLibrary.js +19 -13
  11. package/build/commands/localDevTestChangesCommand.d.ts +15 -0
  12. package/build/commands/localDevTestChangesCommand.js +201 -0
  13. package/build/index.js +82 -6
  14. package/build/prompts/code-reuse.js +3 -0
  15. package/build/prompts/enhance-assertions/sharedAssertionRules.d.ts +1 -0
  16. package/build/prompts/enhance-assertions/sharedAssertionRules.js +17 -0
  17. package/build/prompts/initialize-workspace/initializeWorkspacePrompt.js +11 -9
  18. package/build/prompts/local-dev/local-dev-plan.d.ts +35 -0
  19. package/build/prompts/local-dev/local-dev-plan.js +429 -0
  20. package/build/prompts/local-dev/local-dev-prompts.d.ts +4 -0
  21. package/build/prompts/local-dev/local-dev-prompts.js +190 -0
  22. package/build/prompts/prompt-utils.d.ts +8 -0
  23. package/build/prompts/prompt-utils.js +33 -0
  24. package/build/prompts/sut-setup/modes/adaptWorkflowPrompt.js +70 -7
  25. package/build/prompts/sut-setup/modes/dockerComposePrompt.js +1 -1
  26. package/build/prompts/sut-setup/shared.js +19 -17
  27. package/build/prompts/test-maintenance/drift-analysis-prompt.d.ts +10 -1
  28. package/build/prompts/test-maintenance/drift-analysis-prompt.js +54 -1
  29. package/build/prompts/test-recommendation/analysisOutputPrompt.js +21 -29
  30. package/build/prompts/test-recommendation/scopeAssessment.d.ts +5 -2
  31. package/build/prompts/test-recommendation/scopeAssessment.js +78 -6
  32. package/build/prompts/test-recommendation/test-recommendation-prompt.js +41 -4
  33. package/build/prompts/testbot/testbot-prompts.d.ts +0 -5
  34. package/build/prompts/testbot/testbot-prompts.js +39 -55
  35. package/build/recommendation/planRanker.d.ts +15 -2
  36. package/build/recommendation/planRanker.js +76 -5
  37. package/build/resources/testbotResource.js +2 -1
  38. package/build/services/AnalyticsService.d.ts +1 -1
  39. package/build/services/TestExecutionService.d.ts +2 -1
  40. package/build/services/TestExecutionService.js +8 -3
  41. package/build/services/TestGenerationService.d.ts +2 -2
  42. package/build/services/TestGenerationService.js +39 -21
  43. package/build/services/containerEnv.js +3 -1
  44. package/build/tool-phases.js +7 -0
  45. package/build/tools/code-refactor/codeReuseTool.js +43 -4
  46. package/build/tools/code-refactor/enhanceAssertionsTool.js +68 -18
  47. package/build/tools/code-refactor/reuse-outcome.d.ts +109 -0
  48. package/build/tools/code-refactor/reuse-outcome.js +158 -0
  49. package/build/tools/code-refactor/reuse-state.d.ts +45 -0
  50. package/build/tools/code-refactor/reuse-state.js +140 -0
  51. package/build/tools/enrichTestWithMocksTool.d.ts +28 -0
  52. package/build/tools/enrichTestWithMocksTool.js +726 -0
  53. package/build/tools/executeSkyrampTestTool.d.ts +11 -0
  54. package/build/tools/executeSkyrampTestTool.js +62 -21
  55. package/build/tools/generate-tests/batchMockGenerationTool.d.ts +106 -0
  56. package/build/tools/generate-tests/batchMockGenerationTool.js +545 -0
  57. package/build/tools/generate-tests/generateBatchScenarioRestTool.js +25 -23
  58. package/build/tools/generate-tests/generateContractRestTool.js +2 -2
  59. package/build/tools/generate-tests/generateE2ERestTool.d.ts +1 -1
  60. package/build/tools/generate-tests/generateE2ERestTool.js +1 -1
  61. package/build/tools/generate-tests/generateLoadRestTool.d.ts +1 -1
  62. package/build/tools/generate-tests/generateLoadRestTool.js +1 -1
  63. package/build/tools/generate-tests/generateMockRestTool.d.ts +179 -6
  64. package/build/tools/generate-tests/generateMockRestTool.js +391 -22
  65. package/build/tools/generate-tests/loadTestSchema.d.ts +1 -1
  66. package/build/tools/generate-tests/planGuard.js +2 -22
  67. package/build/tools/generateEnrichedIntegrationTestTool.d.ts +25 -0
  68. package/build/tools/generateEnrichedIntegrationTestTool.js +235 -0
  69. package/build/tools/localDevWorkerComposeTool.d.ts +24 -0
  70. package/build/tools/localDevWorkerComposeTool.js +264 -0
  71. package/build/tools/one-click/oneClickTool.d.ts +13 -0
  72. package/build/tools/one-click/oneClickTool.js +195 -24
  73. package/build/tools/preflightMockCheckTool.d.ts +2 -0
  74. package/build/tools/preflightMockCheckTool.js +96 -0
  75. package/build/tools/queryProxyMocksTool.d.ts +70 -0
  76. package/build/tools/queryProxyMocksTool.js +522 -0
  77. package/build/tools/runExistingTestsTool.d.ts +138 -0
  78. package/build/tools/runExistingTestsTool.js +644 -0
  79. package/build/tools/submitReportTool.js +30 -1
  80. package/build/tools/test-management/analyzeChangesTool.d.ts +2 -1
  81. package/build/tools/test-management/analyzeChangesTool.js +63 -40
  82. package/build/tools/test-management/analyzeTestHealthTool.d.ts +11 -0
  83. package/build/tools/test-management/analyzeTestHealthTool.js +63 -1
  84. package/build/tools/test-management/registerTestPlanTool.js +55 -7
  85. package/build/tools/trace/startTraceCollectionTool.js +3 -3
  86. package/build/types/ExternalTestExecution.d.ts +67 -0
  87. package/build/types/ExternalTestExecution.js +8 -0
  88. package/build/types/OneClickCommands.d.ts +1 -1
  89. package/build/types/Recommendation.d.ts +20 -0
  90. package/build/types/Recommendation.js +32 -6
  91. package/build/types/RepositoryAnalysis.d.ts +131 -14
  92. package/build/types/RepositoryAnalysis.js +16 -2
  93. package/build/types/ReuseOutcome.d.ts +63 -0
  94. package/build/types/ReuseOutcome.js +33 -0
  95. package/build/types/TestExecution.d.ts +1 -0
  96. package/build/types/TestTypes.d.ts +25 -7
  97. package/build/types/TestTypes.js +25 -7
  98. package/build/types/TestbotReport.d.ts +7 -0
  99. package/build/types/index.d.ts +2 -0
  100. package/build/types/index.js +1 -0
  101. package/build/utils/AnalysisStateManager.d.ts +33 -0
  102. package/build/utils/AnalysisStateManager.js +36 -2
  103. package/build/utils/analyze-openapi.js +18 -1
  104. package/build/utils/branchDiff.d.ts +17 -1
  105. package/build/utils/branchDiff.js +99 -14
  106. package/build/utils/featureFlags.d.ts +31 -0
  107. package/build/utils/featureFlags.js +37 -0
  108. package/build/utils/grpcMockValidation.d.ts +1 -0
  109. package/build/utils/grpcMockValidation.js +49 -0
  110. package/build/utils/httpMethodValidation.d.ts +4 -0
  111. package/build/utils/httpMethodValidation.js +15 -0
  112. package/build/utils/logger.js +1 -1
  113. package/build/utils/mockCompatibility.d.ts +49 -0
  114. package/build/utils/mockCompatibility.js +82 -0
  115. package/build/utils/pom-verify/verify.d.ts +5 -0
  116. package/build/utils/pom-verify/verify.js +1 -0
  117. package/build/utils/progress.js +10 -5
  118. package/build/utils/proxy-terminal.js +3 -3
  119. package/build/utils/routeParsers.d.ts +3 -9
  120. package/build/utils/routeParsers.js +79 -4
  121. package/build/utils/utils.js +2 -2
  122. package/build/utils/versions.d.ts +4 -3
  123. package/build/utils/versions.js +3 -1
  124. package/build/utils/workspaceAuth.d.ts +46 -0
  125. package/build/utils/workspaceAuth.js +156 -1
  126. package/build/workspace/frameworks.d.ts +11 -0
  127. package/build/workspace/frameworks.js +22 -0
  128. package/build/workspace/testSuites.d.ts +20 -0
  129. package/build/workspace/testSuites.js +17 -0
  130. package/build/workspace/workspace.d.ts +206 -24
  131. package/build/workspace/workspace.js +52 -2
  132. package/package.json +5 -2
@@ -1,2 +1,13 @@
1
1
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ import { TestType } from "../types/TestTypes.js";
3
+ export declare const CONTRACT_EXECUTION_MODES: readonly ["provider", "consumer"];
4
+ export type ContractExecutionMode = (typeof CONTRACT_EXECUTION_MODES)[number];
5
+ /**
6
+ * Resolve the effective auth token for test execution.
7
+ * `unauthenticated: true` forces no token (empty string) so the container
8
+ * env omits SKYRAMP_TEST_TOKEN entirely — unauthenticated endpoints won't
9
+ * receive an empty Authorization header that triggers encoding errors (E7).
10
+ */
11
+ export declare function resolveEffectiveToken(unauthenticated?: boolean, paramToken?: string, envToken?: string): string;
12
+ export declare function shouldInjectSkyrampBaseUrl(testType: TestType, contractMode?: ContractExecutionMode): boolean;
2
13
  export declare function registerExecuteSkyrampTestTool(server: McpServer): void;
@@ -12,6 +12,21 @@ import { TestSource } from "../types/TestAnalysis.js";
12
12
  import { logger } from "../utils/logger.js";
13
13
  import { toolError } from "../utils/utils.js";
14
14
  const TOOL_NAME = "skyramp_execute_test";
15
+ export const CONTRACT_EXECUTION_MODES = ["provider", "consumer"];
16
+ /**
17
+ * Resolve the effective auth token for test execution.
18
+ * `unauthenticated: true` forces no token (empty string) so the container
19
+ * env omits SKYRAMP_TEST_TOKEN entirely — unauthenticated endpoints won't
20
+ * receive an empty Authorization header that triggers encoding errors (E7).
21
+ */
22
+ export function resolveEffectiveToken(unauthenticated, paramToken, envToken) {
23
+ if (unauthenticated)
24
+ return "";
25
+ return paramToken ?? envToken ?? "";
26
+ }
27
+ export function shouldInjectSkyrampBaseUrl(testType, contractMode) {
28
+ return testType !== TestType.CONTRACT || contractMode !== "consumer";
29
+ }
15
30
  export function registerExecuteSkyrampTestTool(server) {
16
31
  server.registerTool(TOOL_NAME, {
17
32
  description: `Execute a Skyramp-generated test in isolated containerized environments for reliable, deterministic testing. Call this once a test file exists on disk (from a skyramp_*_test_generation tool). First-time execution may take longer while Docker images download — this is expected, not a failure.`,
@@ -30,10 +45,14 @@ export function registerExecuteSkyrampTestTool(server) {
30
45
  .describe("Programming language of the test file to execute (e.g., python, javascript, typescript, java)"),
31
46
  testType: z
32
47
  .nativeEnum(TestType)
33
- .describe("Type of the test to execute (e.g., smoke, contract, fuzz, integration, load, ui, e2e)."),
48
+ .describe("Type of the test to execute. Note: 'mock' is NOT a valid test type — mock files are deployed via their apply_mock() function, not executed as tests."),
34
49
  testFile: z
35
50
  .string()
36
51
  .describe("Absolute path to the test file to execute."),
52
+ contractMode: z
53
+ .enum(CONTRACT_EXECUTION_MODES)
54
+ .optional()
55
+ .describe("Only applies when testType is 'contract'. Use 'provider' for provider contract tests that hit the real service under test and need SKYRAMP_TEST_BASE_URL. Use 'consumer' only for consumer contract tests with inline mocks that do not hit the real service. Defaults to provider behavior when omitted."),
37
56
  token: z
38
57
  .string()
39
58
  .optional()
@@ -64,15 +83,17 @@ export function registerExecuteSkyrampTestTool(server) {
64
83
  },
65
84
  }, async (params, extra) => {
66
85
  let errorResult;
67
- // Helper to send progress notifications to the MCP client
86
+ // Helper to send progress notifications to the MCP client.
68
87
  const sendProgress = makeProgressReporter(extra);
88
+ // Send immediate acknowledgment
89
+ await sendProgress(0, 100, "Starting execution...");
69
90
  // Progress callback adapter for TestExecutionService
70
91
  const onExecutionProgress = async (progress) => {
71
92
  await sendProgress(progress.percent, 100, progress.message);
72
93
  };
73
94
  const previousBaseUrl = process.env.SKYRAMP_TEST_BASE_URL;
74
95
  let didSetSkyrampBaseUrl = false;
75
- let useHostNetwork = false;
96
+ let dockerNetwork;
76
97
  try {
77
98
  if (!path.isAbsolute(params.testFile)) {
78
99
  errorResult = toolError(`testFile must be an absolute path, got: ${params.testFile}`);
@@ -107,18 +128,21 @@ export function registerExecuteSkyrampTestTool(server) {
107
128
  }
108
129
  }
109
130
  // Send initial progress
110
- await sendProgress(0, 100, "Starting test execution...");
131
+ await sendProgress(5, 100, "Starting test execution...");
111
132
  // Cross-repo run (SKYR-3819): tests delivered under the run's testsRepoDir
112
133
  // (set by skyramp_analyze_changes, run-scoped) live outside workspacePath.
113
134
  // Thread it through so the executor mounts the test repo and service
114
135
  // matching still resolves the SUT baseUrl/dockerNetwork.
115
136
  const testRepoPath = getTestsRepoDir();
116
- // Always resolve workspace config for dockerNetwork (host networking)
117
- // and optionally inject SKYRAMP_TEST_BASE_URL if not already set.
137
+ // Resolve workspace config for base URL injection and Docker network
138
+ // attachment. A compose dockerNetwork is not host networking: on macOS
139
+ // the executor still needs localhost rewritten to host.docker.internal.
118
140
  if (params.workspacePath) {
119
- const { baseUrl, dockerNetwork, candidates } = await getWorkspaceBaseUrl(params.workspacePath, params.testFile, params.language, testRepoPath);
120
- useHostNetwork = !!dockerNetwork;
121
- if (!process.env.SKYRAMP_TEST_BASE_URL) {
141
+ const workspaceConfig = await getWorkspaceBaseUrl(params.workspacePath, params.testFile, params.language, testRepoPath);
142
+ const { baseUrl, candidates } = workspaceConfig;
143
+ dockerNetwork = workspaceConfig.dockerNetwork;
144
+ const shouldInjectBaseUrl = shouldInjectSkyrampBaseUrl(params.testType, params.contractMode);
145
+ if (shouldInjectBaseUrl && !process.env.SKYRAMP_TEST_BASE_URL) {
122
146
  if (baseUrl) {
123
147
  process.env.SKYRAMP_TEST_BASE_URL = baseUrl;
124
148
  didSetSkyrampBaseUrl = true;
@@ -135,16 +159,16 @@ export function registerExecuteSkyrampTestTool(server) {
135
159
  }
136
160
  }
137
161
  const executionService = new TestExecutionService();
138
- // `unauthenticated: true` forces no auth token regardless of what's passed or
139
- // configured, so tests asserting 401/403 unauthenticated behavior can't be broken
140
- // by an ambient SKYRAMP_TEST_TOKEN — see SKYR-3874. Otherwise fall back to the
141
- // environment token when the caller omits `token`; this keeps secrets server-side
142
- // and avoids embedding credential values in prompts.
143
- const effectiveToken = params.unauthenticated
144
- ? ""
145
- : (params.token ?? process.env.SKYRAMP_TEST_TOKEN ?? "");
146
- // Execute test with progress callback - reports Docker cache/pull status
147
- const result = await executionService.executeTest({
162
+ const effectiveToken = resolveEffectiveToken(params.unauthenticated, params.token, process.env.SKYRAMP_TEST_TOKEN);
163
+ if (!effectiveToken && !params.unauthenticated && params.token === undefined) {
164
+ logger.warning("No auth token available — authenticated endpoints will likely return 401. Set SKYRAMP_TEST_TOKEN or pass token/unauthenticated.");
165
+ }
166
+ // Execute test with progress callback - reports Docker cache/pull status.
167
+ // Retry once on transient connection errors (EOF, connection refused) —
168
+ // these indicate the SUT isn't fully ready yet, not a test failure.
169
+ // Retrying inside the tool call saves agent turns vs failing and
170
+ // requiring the agent to re-invoke.
171
+ const execOptions = {
148
172
  testFile: params.testFile,
149
173
  workspacePath: params.workspacePath,
150
174
  testRepoPath,
@@ -152,8 +176,25 @@ export function registerExecuteSkyrampTestTool(server) {
152
176
  testType: params.testType,
153
177
  token: effectiveToken,
154
178
  playwrightSaveStoragePath: params.playwrightSaveStoragePath,
155
- useHostNetwork,
156
- }, onExecutionProgress);
179
+ dockerNetwork,
180
+ useHostNetwork: false,
181
+ };
182
+ let result;
183
+ try {
184
+ result = await executionService.executeTest(execOptions, onExecutionProgress);
185
+ }
186
+ catch (firstErr) {
187
+ const errMsg = firstErr instanceof Error ? firstErr.message : String(firstErr);
188
+ if (/\bEOF\b|connection refused|ECONNREFUSED|ECONNRESET/i.test(errMsg)) {
189
+ logger.info("Test execution hit transient connection error, retrying after 10s...", { error: errMsg });
190
+ await sendProgress(50, 100, "SUT connection error — retrying in 10s...");
191
+ await new Promise((r) => setTimeout(r, 10_000));
192
+ result = await executionService.executeTest(execOptions, onExecutionProgress);
193
+ }
194
+ else {
195
+ throw firstErr;
196
+ }
197
+ }
157
198
  // Update stateFile with execution results if provided. Multi-repo: write
158
199
  // into the section for `repository` (primary when omitted/matching the
159
200
  // root) of the run-scoped file.
@@ -0,0 +1,106 @@
1
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ import { z } from "zod";
3
+ import { CallToolResult } from "@modelcontextprotocol/sdk/types.js";
4
+ import { MockProtocol } from "../../types/TestTypes.js";
5
+ export { MockProtocol } from "../../types/TestTypes.js";
6
+ export declare const BATCH_MOCK_PROTOCOL_EXAMPLES = "\n<example protocol=\"rest\">\nBatch REST item. Required fields: protocol=\"rest\", endpointURL, method unless apiSchema is provided.\n{\n \"protocol\": \"rest\",\n \"endpointURL\": \"http://identity-service:4000/api/internal/v1/users/validate\",\n \"method\": \"POST\",\n \"requestAware\": true,\n \"responseData\": \"{\"valid\":true}\"\n}\n</example>\n\n<example protocol=\"rest-traffic-simulation\">\nBatch REST item with traffic simulation. minLatency/maxLatency inject a random delay per response; dropRate drops a percentage of requests.\n{\n \"protocol\": \"rest\",\n \"endpointURL\": \"http://payment-service:5001/payments\",\n \"method\": \"POST\",\n \"responseData\": \"{\"status\":\"ok\"}\",\n \"minLatency\": 500,\n \"maxLatency\": 1000,\n \"dropRate\": 10\n}\n</example>\n\n<example protocol=\"rest-conditional\">\nBatch REST item with conditional response selection. Use \"when\" to match request fields.\n{\n \"protocol\": \"rest\",\n \"endpointURL\": \"http://payment-service:5001/api/v1/orders\",\n \"method\": \"POST\",\n \"when\": {\"request.body.payment.method\": \"card\"},\n \"requestSchema\": \"{\"type\":\"object\",\"required\":[\"orderId\",\"payment\"]}\",\n \"responseData\": \"{\"status\":\"confirmed\"}\",\n \"responseStatusCode\": \"201\",\n \"noMatchStatusCode\": 404,\n \"validationFailureStatusCode\": 422\n}\n</example>\n\n<example protocol=\"grpc\">\nBatch gRPC item. Required fields: protocol=\"grpc\", endpointURL as host:port, protoPath, grpcServiceName. method is the RPC name; empty means all service methods.\n{\n \"protocol\": \"grpc\",\n \"endpointURL\": \"profile-service:50051\",\n \"protoPath\": \"/repo/proto/profiles.proto\",\n \"grpcServiceName\": \"ProfileService\",\n \"method\": \"GetProfile\",\n \"responseData\": \"{\"id\":\"profile_123\"}\"\n}\n</example>\n\n<example protocol=\"grpc-traffic-simulation\">\nBatch gRPC item with traffic simulation. Same latency/drop fields as REST.\n{\n \"protocol\": \"grpc\",\n \"endpointURL\": \"profile-service:50051\",\n \"protoPath\": \"/repo/proto/profiles.proto\",\n \"grpcServiceName\": \"ProfileService\",\n \"method\": \"GetProfile\",\n \"responseData\": \"{\"eligible\":true}\",\n \"minLatency\": 200,\n \"maxLatency\": 800,\n \"dropRate\": 5\n}\n</example>\n\n<example protocol=\"grpc-status-error\">\nBatch gRPC status error item. Do not provide responseData with grpcStatusCode.\n{\n \"protocol\": \"grpc\",\n \"endpointURL\": \"profile-service:50051\",\n \"protoPath\": \"/repo/proto/profiles.proto\",\n \"grpcServiceName\": \"ProfileService\",\n \"method\": \"GetProfile\",\n \"grpcStatusCode\": 5,\n \"grpcStatusMessage\": \"profile not found\"\n}\n</example>\n\n<example protocol=\"kafka-producer\">\nBatch Kafka producer validation item. Required fields: protocol=\"kafka\", endpointURL as broker host:port, kafkaTopic, and requestData. Do not pass method or responseData. Traffic simulation is NOT supported for Kafka.\n{\n \"protocol\": \"kafka\",\n \"endpointURL\": \"broker:9092\",\n \"kafkaTopic\": \"orders\",\n \"requestData\": \"{\"order_id\":\"ord_123\"}\"\n}\n</example>\n\n<example protocol=\"kafka-consumer\">\nBatch Kafka consumer message item. Required fields: protocol=\"kafka\", endpointURL as broker host:port, kafkaTopic, and responseData. Do not pass method or requestData. Traffic simulation is NOT supported for Kafka.\n{\n \"protocol\": \"kafka\",\n \"endpointURL\": \"broker:9092\",\n \"kafkaTopic\": \"orders\",\n \"responseData\": \"{\"accepted\":true}\"\n}\n</example>";
7
+ declare const mockSpecSchema: z.ZodObject<{
8
+ protocol: z.ZodDefault<z.ZodNativeEnum<typeof MockProtocol>>;
9
+ endpointURL: z.ZodString;
10
+ method: z.ZodDefault<z.ZodString>;
11
+ responseData: z.ZodOptional<z.ZodString>;
12
+ responseStatusCode: z.ZodEffects<z.ZodDefault<z.ZodString>, string, string | undefined>;
13
+ grpcStatusCode: z.ZodOptional<z.ZodNumber>;
14
+ grpcStatusMessage: z.ZodOptional<z.ZodString>;
15
+ requestData: z.ZodDefault<z.ZodString>;
16
+ requestAware: z.ZodDefault<z.ZodBoolean>;
17
+ apiSchema: z.ZodDefault<z.ZodString>;
18
+ protoPath: z.ZodOptional<z.ZodString>;
19
+ grpcServiceName: z.ZodOptional<z.ZodString>;
20
+ protobufExtraFiles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
21
+ protobufExtraImportPath: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
22
+ kafkaTopic: z.ZodOptional<z.ZodString>;
23
+ minLatency: z.ZodOptional<z.ZodNumber>;
24
+ maxLatency: z.ZodOptional<z.ZodNumber>;
25
+ dropRate: z.ZodOptional<z.ZodNumber>;
26
+ when: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
27
+ requestSchema: z.ZodOptional<z.ZodString>;
28
+ noMatchStatusCode: z.ZodOptional<z.ZodNumber>;
29
+ validationFailureStatusCode: z.ZodOptional<z.ZodNumber>;
30
+ output: z.ZodOptional<z.ZodString>;
31
+ outputDir: z.ZodOptional<z.ZodString>;
32
+ }, "strip", z.ZodTypeAny, {
33
+ method: string;
34
+ endpointURL: string;
35
+ apiSchema: string;
36
+ requestData: string;
37
+ responseStatusCode: string;
38
+ protocol: MockProtocol;
39
+ requestAware: boolean;
40
+ output?: string | undefined;
41
+ outputDir?: string | undefined;
42
+ responseData?: string | undefined;
43
+ when?: Record<string, unknown> | undefined;
44
+ protoPath?: string | undefined;
45
+ grpcServiceName?: string | undefined;
46
+ protobufExtraFiles?: string[] | undefined;
47
+ protobufExtraImportPath?: string[] | undefined;
48
+ kafkaTopic?: string | undefined;
49
+ grpcStatusCode?: number | undefined;
50
+ grpcStatusMessage?: string | undefined;
51
+ minLatency?: number | undefined;
52
+ maxLatency?: number | undefined;
53
+ dropRate?: number | undefined;
54
+ requestSchema?: string | undefined;
55
+ noMatchStatusCode?: number | undefined;
56
+ validationFailureStatusCode?: number | undefined;
57
+ }, {
58
+ endpointURL: string;
59
+ output?: string | undefined;
60
+ outputDir?: string | undefined;
61
+ method?: string | undefined;
62
+ apiSchema?: string | undefined;
63
+ requestData?: string | undefined;
64
+ responseStatusCode?: string | undefined;
65
+ responseData?: string | undefined;
66
+ when?: Record<string, unknown> | undefined;
67
+ protocol?: MockProtocol | undefined;
68
+ protoPath?: string | undefined;
69
+ grpcServiceName?: string | undefined;
70
+ protobufExtraFiles?: string[] | undefined;
71
+ protobufExtraImportPath?: string[] | undefined;
72
+ kafkaTopic?: string | undefined;
73
+ grpcStatusCode?: number | undefined;
74
+ grpcStatusMessage?: string | undefined;
75
+ requestAware?: boolean | undefined;
76
+ minLatency?: number | undefined;
77
+ maxLatency?: number | undefined;
78
+ dropRate?: number | undefined;
79
+ requestSchema?: string | undefined;
80
+ noMatchStatusCode?: number | undefined;
81
+ validationFailureStatusCode?: number | undefined;
82
+ }>;
83
+ export type MockSpec = z.infer<typeof mockSpecSchema>;
84
+ export type MockSpecInput = z.input<typeof mockSpecSchema>;
85
+ export interface BatchMockResult {
86
+ index: number;
87
+ protocol: string;
88
+ endpointURL: string;
89
+ method: string;
90
+ topic?: string;
91
+ success: boolean;
92
+ outputDir?: string;
93
+ output?: string;
94
+ error?: string;
95
+ detail?: string;
96
+ }
97
+ export interface BatchMockParams {
98
+ mocks: MockSpecInput[];
99
+ outputDir: string;
100
+ runtime?: string;
101
+ dockerNetwork?: string;
102
+ language?: string;
103
+ framework?: string;
104
+ }
105
+ export declare function executeBatchMockGeneration(params: BatchMockParams): Promise<CallToolResult>;
106
+ export declare function registerBatchMockTool(server: McpServer): void;