@skyramp/mcp 0.4.4-rc.1 → 0.4.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.
Files changed (148) hide show
  1. package/build/index.js +239 -210
  2. package/build/playwright/PlaywrightTraceService.d.ts +1 -1
  3. package/build/playwright/blueprintDigestStore.d.ts +1 -1
  4. package/build/playwright/registerPlaywrightTools.d.ts +1 -1
  5. package/build/playwright/traceRecordingPrompt.d.ts +1 -1
  6. package/build/playwright/traceRecordingPrompt.js +2 -2
  7. package/build/prompts/local-dev/local-dev-prompts.d.ts +1 -1
  8. package/build/prompts/local-dev/local-dev-prompts.js +2 -2
  9. package/build/prompts/startTraceCollectionPrompts.d.ts +1 -1
  10. package/build/prompts/startTraceCollectionPrompts.js +2 -3
  11. package/build/prompts/test-recommendation/registerRecommendTestsPrompt.d.ts +1 -1
  12. package/build/prompts/test-recommendation/registerRecommendTestsPrompt.js +2 -2
  13. package/build/prompts/testbot/testbot-prompts.d.ts +1 -1
  14. package/build/prompts/testbot/testbot-prompts.js +4 -7
  15. package/build/recommendation/answers.d.ts +17 -52
  16. package/build/recommendation/answers.js +29 -99
  17. package/build/recommendation/pullRequestText.d.ts +0 -2
  18. package/build/recommendation/pullRequestText.js +0 -16
  19. package/build/recommendation/registerPlan.d.ts +4 -7
  20. package/build/recommendation/registerPlan.js +11 -37
  21. package/build/recommendation/types.d.ts +4 -21
  22. package/build/recommendation/verifierContracts.d.ts +4 -4
  23. package/build/recommendation/verifierContracts.js +4 -4
  24. package/build/recommendation/verifiers/citedPath.d.ts +2 -2
  25. package/build/recommendation/verifiers/citedPath.js +2 -2
  26. package/build/recommendation/verifiers/issueTraceability.d.ts +5 -1
  27. package/build/recommendation/verifiers/issueTraceability.js +35 -4
  28. package/build/resources/analysisResources.d.ts +1 -1
  29. package/build/resources/analysisResources.js +1 -1
  30. package/build/resources/progressResource.d.ts +1 -1
  31. package/build/resources/sutSetupResource.d.ts +1 -1
  32. package/build/resources/sutSetupResource.js +1 -1
  33. package/build/resources/testbotResource.d.ts +1 -1
  34. package/build/resources/testbotResource.js +1 -1
  35. package/build/services/AnalyticsService.d.ts +1 -1
  36. package/build/services/FleetExecutionService.d.ts +130 -0
  37. package/build/services/FleetExecutionService.js +391 -0
  38. package/build/services/ModularizationService.d.ts +1 -1
  39. package/build/services/TestExecutionService.d.ts +7 -0
  40. package/build/services/TestExecutionService.js +21 -0
  41. package/build/services/TestGenerationService.d.ts +1 -1
  42. package/build/tool-phases.js +2 -0
  43. package/build/tools/auth/loginTool.d.ts +1 -1
  44. package/build/tools/auth/loginTool.js +2 -2
  45. package/build/tools/auth/logoutTool.d.ts +1 -1
  46. package/build/tools/auth/logoutTool.js +2 -2
  47. package/build/tools/code-refactor/alignAssertionsTool.d.ts +1 -1
  48. package/build/tools/code-refactor/alignAssertionsTool.js +1 -1
  49. package/build/tools/code-refactor/assertionSkillTools.d.ts +1 -1
  50. package/build/tools/code-refactor/assertionSkillTools.js +2 -2
  51. package/build/tools/code-refactor/codeReuseTool.d.ts +1 -1
  52. package/build/tools/code-refactor/codeReuseTool.js +2 -2
  53. package/build/tools/code-refactor/enhanceAssertionsTool.d.ts +1 -1
  54. package/build/tools/code-refactor/enhanceAssertionsTool.js +1 -1
  55. package/build/tools/code-refactor/modularizationTool.d.ts +1 -1
  56. package/build/tools/code-refactor/modularizationTool.js +2 -2
  57. package/build/tools/enrichTestWithMocksTool.d.ts +1 -1
  58. package/build/tools/enrichTestWithMocksTool.js +2 -2
  59. package/build/tools/executeFleetTool.d.ts +28 -0
  60. package/build/tools/executeFleetTool.js +107 -0
  61. package/build/tools/executeSkyrampTestTool.d.ts +8 -5
  62. package/build/tools/executeSkyrampTestTool.js +5 -5
  63. package/build/tools/fixErrorTool.d.ts +1 -1
  64. package/build/tools/fixErrorTool.js +1 -1
  65. package/build/tools/generate-tests/batchMockGenerationTool.d.ts +6 -57
  66. package/build/tools/generate-tests/batchMockGenerationTool.js +3 -3
  67. package/build/tools/generate-tests/generateBatchScenarioRestTool.d.ts +9 -45
  68. package/build/tools/generate-tests/generateBatchScenarioRestTool.js +29 -11
  69. package/build/tools/generate-tests/generateContractRestTool.d.ts +1 -2
  70. package/build/tools/generate-tests/generateContractRestTool.js +1 -1
  71. package/build/tools/generate-tests/generateE2ERestTool.d.ts +1 -2
  72. package/build/tools/generate-tests/generateE2ERestTool.js +1 -1
  73. package/build/tools/generate-tests/generateFuzzRestTool.d.ts +1 -1
  74. package/build/tools/generate-tests/generateFuzzRestTool.js +1 -1
  75. package/build/tools/generate-tests/generateIntegrationRestTool.d.ts +1 -2
  76. package/build/tools/generate-tests/generateIntegrationRestTool.js +1 -1
  77. package/build/tools/generate-tests/generateLoadRestTool.d.ts +1 -2
  78. package/build/tools/generate-tests/generateLoadRestTool.js +2 -1
  79. package/build/tools/generate-tests/generateMockRestTool.d.ts +1 -2
  80. package/build/tools/generate-tests/generateMockRestTool.js +3 -3
  81. package/build/tools/generate-tests/generateSmokeRestTool.d.ts +1 -1
  82. package/build/tools/generate-tests/generateSmokeRestTool.js +1 -1
  83. package/build/tools/generate-tests/generateUILoadRestTool.d.ts +64 -0
  84. package/build/tools/generate-tests/generateUILoadRestTool.js +512 -0
  85. package/build/tools/generate-tests/generateUIRestTool.d.ts +6 -7
  86. package/build/tools/generate-tests/generateUIRestTool.js +1 -1
  87. package/build/tools/generate-tests/loadTestSchema.d.ts +15 -15
  88. package/build/tools/generate-tests/trace-reuse-guard.d.ts +1 -1
  89. package/build/tools/generateEnrichedIntegrationTestTool.d.ts +1 -2
  90. package/build/tools/generateEnrichedIntegrationTestTool.js +1 -1
  91. package/build/tools/localDevWorkerComposeTool.d.ts +1 -1
  92. package/build/tools/localDevWorkerComposeTool.js +2 -2
  93. package/build/tools/one-click/oneClickTool.d.ts +1 -1
  94. package/build/tools/one-click/oneClickTool.js +1 -1
  95. package/build/tools/preflightMockCheckTool.d.ts +1 -1
  96. package/build/tools/preflightMockCheckTool.js +3 -3
  97. package/build/tools/queryProxyMocksTool.d.ts +1 -1
  98. package/build/tools/queryProxyMocksTool.js +3 -3
  99. package/build/tools/submitReportTool.d.ts +111 -414
  100. package/build/tools/submitReportTool.js +154 -138
  101. package/build/tools/test-management/actionsTool.d.ts +1 -1
  102. package/build/tools/test-management/actionsTool.js +7 -7
  103. package/build/tools/test-management/analyzeChangesTool.d.ts +22 -118
  104. package/build/tools/test-management/analyzeChangesTool.js +4 -4
  105. package/build/tools/test-management/analyzeTestHealthTool.d.ts +1 -1
  106. package/build/tools/test-management/analyzeTestHealthTool.js +4 -4
  107. package/build/tools/test-management/registerTestPlanTool.d.ts +111 -743
  108. package/build/tools/test-management/registerTestPlanTool.js +20 -36
  109. package/build/tools/test-management/resolveScreenTool.d.ts +1 -1
  110. package/build/tools/test-management/resolveScreenTool.js +6 -2
  111. package/build/tools/trace/startTraceCollectionTool.d.ts +1 -1
  112. package/build/tools/trace/startTraceCollectionTool.js +4 -4
  113. package/build/tools/trace/stopTraceCollectionTool.d.ts +1 -1
  114. package/build/tools/trace/stopTraceCollectionTool.js +2 -2
  115. package/build/tools/verifyTestDependenciesTool.d.ts +1 -1
  116. package/build/tools/verifyTestDependenciesTool.js +1 -1
  117. package/build/tools/workspace/initScanWorkspaceTool.d.ts +1 -1
  118. package/build/tools/workspace/initScanWorkspaceTool.js +1 -1
  119. package/build/tools/workspace/initializeWorkspaceTool.d.ts +1 -1
  120. package/build/tools/workspace/initializeWorkspaceTool.js +1 -1
  121. package/build/types/RepositoryAnalysis.d.ts +164 -1170
  122. package/build/types/RepositoryAnalysis.js +12 -10
  123. package/build/types/StepMethod.d.ts +24 -1
  124. package/build/types/StepMethod.js +1 -1
  125. package/build/types/TestTypes.d.ts +34 -133
  126. package/build/types/TestTypes.js +3 -3
  127. package/build/types/TestbotReport.d.ts +37 -0
  128. package/build/types/TestbotReport.js +22 -0
  129. package/build/types/index.d.ts +1 -1
  130. package/build/types/index.js +1 -1
  131. package/build/utils/docker.d.ts +29 -7
  132. package/build/utils/docker.js +83 -27
  133. package/build/utils/initAgent.d.ts +3 -3
  134. package/build/utils/initAgent.js +58 -26
  135. package/build/utils/progress.d.ts +3 -4
  136. package/build/utils/progress.js +4 -4
  137. package/build/utils/utils.d.ts +1 -1
  138. package/build/utils/versions.d.ts +3 -3
  139. package/build/utils/versions.js +1 -1
  140. package/build/workspace/workspace.d.ts +117 -538
  141. package/build/workspace/workspace.js +2 -2
  142. package/package.json +6 -5
  143. package/plugin/prompts/testbot-task1.md +1 -1
  144. package/plugin/skills/repair-staged-files/SKILL.md +17 -0
  145. package/build/recommendation/blockerProbes.d.ts +0 -13
  146. package/build/recommendation/blockerProbes.js +0 -91
  147. package/build/recommendation/blockers.d.ts +0 -65
  148. package/build/recommendation/blockers.js +0 -135
@@ -1,7 +1,6 @@
1
- import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
1
+ import { McpServer, CallToolResult } from "@modelcontextprotocol/server";
2
2
  import { z } from "zod";
3
3
  import { AuthFinding } from "../../utils/workspaceAuth.js";
4
- import { CallToolResult } from "@modelcontextprotocol/sdk/types.js";
5
4
  import { TraceFile } from "../../types/RepositoryAnalysis.js";
6
5
  import { ChangedFileName } from "../../utils/branchDiff.js";
7
6
  import { RemovedUiElement } from "../../utils/removedUiElements.js";
@@ -12,11 +11,14 @@ export declare function isGraphQLFile(filePath: string, repositoryPath: string):
12
11
  export declare const analyzeChangesInputSchema: {
13
12
  repositoryPath: z.ZodString;
14
13
  repository: z.ZodString;
15
- scope: z.ZodOptional<z.ZodDefault<z.ZodEnum<["full_repo", "branch_diff"]>>>;
14
+ scope: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
15
+ full_repo: "full_repo";
16
+ branch_diff: "branch_diff";
17
+ }>>>;
16
18
  baseBranch: z.ZodOptional<z.ZodString>;
17
19
  testDirectory: z.ZodOptional<z.ZodString>;
18
20
  prNumber: z.ZodOptional<z.ZodNumber>;
19
- testsRepoDir: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
21
+ testsRepoDir: z.ZodOptional<z.ZodString>;
20
22
  includeUncommitted: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
21
23
  };
22
24
  /**
@@ -86,7 +88,7 @@ export declare const analyzeChangesOutputSchema: {
86
88
  repositoryPath: z.ZodString;
87
89
  repositoryName: z.ZodString;
88
90
  repository: z.ZodString;
89
- relatedRepositories: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
91
+ relatedRepositories: z.ZodOptional<z.ZodArray<z.ZodString>>;
90
92
  analysisScope: z.ZodString;
91
93
  planOnly: z.ZodBoolean;
92
94
  currentBranch: z.ZodOptional<z.ZodString>;
@@ -94,26 +96,12 @@ export declare const analyzeChangesOutputSchema: {
94
96
  changedFiles: z.ZodArray<z.ZodObject<{
95
97
  path: z.ZodString;
96
98
  deleted: z.ZodBoolean;
97
- }, "strip", z.ZodTypeAny, {
98
- path: string;
99
- deleted: boolean;
100
- }, {
101
- path: string;
102
- deleted: boolean;
103
- }>, "many">;
99
+ }, z.core.$strip>>;
104
100
  existingTestFiles: z.ZodOptional<z.ZodObject<{
105
- skyramp: z.ZodArray<z.ZodString, "many">;
106
- external: z.ZodArray<z.ZodString, "many">;
107
- relevantExternal: z.ZodArray<z.ZodString, "many">;
108
- }, "strip", z.ZodTypeAny, {
109
- skyramp: string[];
110
- external: string[];
111
- relevantExternal: string[];
112
- }, {
113
- skyramp: string[];
114
- external: string[];
115
- relevantExternal: string[];
116
- }>>;
101
+ skyramp: z.ZodArray<z.ZodString>;
102
+ external: z.ZodArray<z.ZodString>;
103
+ relevantExternal: z.ZodArray<z.ZodString>;
104
+ }, z.core.$strip>>;
117
105
  workspace: z.ZodOptional<z.ZodObject<{
118
106
  baseUrl: z.ZodString;
119
107
  authMethod: z.ZodString;
@@ -124,113 +112,29 @@ export declare const analyzeChangesOutputSchema: {
124
112
  kind: z.ZodLiteral<"workspace-disagreement">;
125
113
  message: z.ZodString;
126
114
  serviceName: z.ZodString;
127
- field: z.ZodEnum<["authType", "authHeader", "authScheme"]>;
115
+ field: z.ZodEnum<{
116
+ authHeader: "authHeader";
117
+ authScheme: "authScheme";
118
+ authType: "authType";
119
+ }>;
128
120
  primary: z.ZodString;
129
121
  analysed: z.ZodString;
130
122
  primaryWorkspaceFile: z.ZodString;
131
123
  analysedWorkspaceFile: z.ZodString;
132
- }, "strip", z.ZodTypeAny, {
133
- message: string;
134
- serviceName: string;
135
- kind: "workspace-disagreement";
136
- field: "authHeader" | "authScheme" | "authType";
137
- primaryWorkspaceFile: string;
138
- analysedWorkspaceFile: string;
139
- primary: string;
140
- analysed: string;
141
- }, {
142
- message: string;
143
- serviceName: string;
144
- kind: "workspace-disagreement";
145
- field: "authHeader" | "authScheme" | "authType";
146
- primaryWorkspaceFile: string;
147
- analysedWorkspaceFile: string;
148
- primary: string;
149
- analysed: string;
150
- }>, "many">>;
151
- }, "strip", z.ZodTypeAny, {
152
- baseUrl: string;
153
- authMethod: string;
154
- openApiSpecLoaded: boolean;
155
- authHeader?: string | undefined;
156
- openApiSpecPath?: string | undefined;
157
- authFindings?: {
158
- message: string;
159
- serviceName: string;
160
- kind: "workspace-disagreement";
161
- field: "authHeader" | "authScheme" | "authType";
162
- primaryWorkspaceFile: string;
163
- analysedWorkspaceFile: string;
164
- primary: string;
165
- analysed: string;
166
- }[] | undefined;
167
- }, {
168
- baseUrl: string;
169
- authMethod: string;
170
- openApiSpecLoaded: boolean;
171
- authHeader?: string | undefined;
172
- openApiSpecPath?: string | undefined;
173
- authFindings?: {
174
- message: string;
175
- serviceName: string;
176
- kind: "workspace-disagreement";
177
- field: "authHeader" | "authScheme" | "authType";
178
- primaryWorkspaceFile: string;
179
- analysedWorkspaceFile: string;
180
- primary: string;
181
- analysed: string;
182
- }[] | undefined;
183
- }>>;
124
+ }, z.core.$strip>>>;
125
+ }, z.core.$strip>>;
184
126
  uiContext: z.ZodOptional<z.ZodObject<{
185
127
  removedElements: z.ZodOptional<z.ZodArray<z.ZodObject<{
186
128
  attribute: z.ZodString;
187
129
  value: z.ZodString;
188
130
  file: z.ZodString;
189
- }, "strip", z.ZodTypeAny, {
190
- value: string;
191
- file: string;
192
- attribute: string;
193
- }, {
194
- value: string;
195
- file: string;
196
- attribute: string;
197
- }>, "many">>;
131
+ }, z.core.$strip>>>;
198
132
  retiredElements: z.ZodOptional<z.ZodArray<z.ZodObject<{
199
133
  attribute: z.ZodString;
200
134
  value: z.ZodString;
201
135
  file: z.ZodString;
202
- }, "strip", z.ZodTypeAny, {
203
- value: string;
204
- file: string;
205
- attribute: string;
206
- }, {
207
- value: string;
208
- file: string;
209
- attribute: string;
210
- }>, "many">>;
211
- }, "strip", z.ZodTypeAny, {
212
- removedElements?: {
213
- value: string;
214
- file: string;
215
- attribute: string;
216
- }[] | undefined;
217
- retiredElements?: {
218
- value: string;
219
- file: string;
220
- attribute: string;
221
- }[] | undefined;
222
- }, {
223
- removedElements?: {
224
- value: string;
225
- file: string;
226
- attribute: string;
227
- }[] | undefined;
228
- retiredElements?: {
229
- value: string;
230
- file: string;
231
- attribute: string;
232
- }[] | undefined;
233
- }>>;
136
+ }, z.core.$strip>>>;
137
+ }, z.core.$strip>>;
234
138
  nextStep: z.ZodOptional<z.ZodString>;
235
139
  };
236
140
  /**
@@ -187,11 +187,11 @@ export function registerAnalyzeChangesTool(server) {
187
187
  description: `Read the repository and the current change, and discover the existing tests — first step of the unified Test Health Analysis Flow. Returns DATA only, no instructions: a stateFile path, the branch and its base, the changed files with their status, the existing test files, the workspace base URL and auth, the OpenAPI spec path, the repository's seed and fixture data files, and the identifying attributes the change removed from surviving files. It proposes no tests and it tells you nothing about the diff — read the diff and decide what the change warrants. Pass stateFile to skyramp_register_test_plan (required before you write any test), skyramp_analyze_test_health and skyramp_actions.`,
188
188
  // SKYR-4182: the payload is returned via structuredContent, which requires a
189
189
  // declared outputSchema.
190
- outputSchema: analyzeChangesOutputSchema,
191
- inputSchema: analyzeChangesInputSchema,
192
- }, async (params, extra) => {
190
+ outputSchema: z.object(analyzeChangesOutputSchema),
191
+ inputSchema: z.object(analyzeChangesInputSchema),
192
+ }, async (params, ctx) => {
193
193
  let errorResult;
194
- const sendProgress = makeProgressReporter(extra);
194
+ const sendProgress = makeProgressReporter(ctx);
195
195
  try {
196
196
  const analysisScope = params.scope === "branch_diff" || !params.scope
197
197
  ? AnalysisScope.CurrentBranchDiff
@@ -1,2 +1,2 @@
1
- import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
1
+ import { McpServer } from "@modelcontextprotocol/server";
2
2
  export declare function registerAnalyzeTestHealthTool(server: McpServer): void;
@@ -44,7 +44,7 @@ export function registerAnalyzeTestHealthTool(server) {
44
44
  openWorldHint: false,
45
45
  },
46
46
  description: `Assess existing tests for drift against the current branch diff and generate maintenance instructions (UPDATE, REGENERATE, DELETE, VERIFY, or IGNORE) for each test. Covers both API tests and UI tests (Playwright, Cypress, RTL, component tests). Requires a stateFile from skyramp_analyze_changes.`,
47
- inputSchema: {
47
+ inputSchema: z.object({
48
48
  stateFile: z
49
49
  .string()
50
50
  .describe("Path to the analyze-changes-state.json file returned by skyramp_analyze_changes (the stateFile field in its output). Do NOT pass testbot-result.txt here."),
@@ -57,12 +57,12 @@ export function registerAnalyzeTestHealthTool(server) {
57
57
  .trim()
58
58
  .min(1)
59
59
  .describe("The owner/repo whose analysis section to assess (e.g. 'letsramp/api-insight'). Set it on every call — the primary's owner/repo for the primary repo, or a related repo's owner/repo for that repo's section within the run-scoped stateFile."),
60
- },
61
- outputSchema: {
60
+ }),
61
+ outputSchema: z.object({
62
62
  prompt: z
63
63
  .string()
64
64
  .describe("LLM drift analysis prompt and assessment instructions."),
65
- },
65
+ }),
66
66
  }, async (args) => {
67
67
  let errorResult;
68
68
  try {