@skyramp/mcp 0.3.1-ldw-beta → 0.3.2-rc.pom-1

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 (244) hide show
  1. package/build/commands/commandLibrary.d.ts +0 -1
  2. package/build/commands/commandLibrary.js +13 -19
  3. package/build/index.js +8 -81
  4. package/build/prompts/code-reuse.d.ts +7 -1
  5. package/build/prompts/code-reuse.js +8 -5
  6. package/build/prompts/code-reuse.test.js +62 -0
  7. package/build/prompts/enhance-assertions/sharedAssertionRules.d.ts +0 -1
  8. package/build/prompts/enhance-assertions/sharedAssertionRules.js +0 -17
  9. package/build/prompts/initialize-workspace/initializeWorkspacePrompt.js +9 -11
  10. package/build/prompts/pom-aware-code-reuse.d.ts +6 -1
  11. package/build/prompts/pom-aware-code-reuse.js +98 -52
  12. package/build/prompts/pom-aware-code-reuse.test.js +11 -0
  13. package/build/prompts/test-recommendation/analysisOutputPrompt.js +29 -21
  14. package/build/prompts/test-recommendation/analysisOutputPrompt.test.js +28 -0
  15. package/build/prompts/test-recommendation/diffExecutionPlan.d.ts +4 -2
  16. package/build/prompts/test-recommendation/diffExecutionPlan.js +11 -65
  17. package/build/prompts/test-recommendation/fullRepoCatalog.d.ts +2 -2
  18. package/build/prompts/test-recommendation/recommendationSections.js +5 -2
  19. package/build/prompts/test-recommendation/scopeAssessment.js +1 -1
  20. package/build/prompts/test-recommendation/test-recommendation-prompt.d.ts +26 -1
  21. package/build/prompts/test-recommendation/test-recommendation-prompt.js +72 -97
  22. package/build/prompts/test-recommendation/test-recommendation-prompt.test.js +49 -27
  23. package/build/prompts/testbot/testbot-prompts.d.ts +6 -1
  24. package/build/prompts/testbot/testbot-prompts.js +101 -25
  25. package/build/prompts/testbot/testbot-prompts.test.js +44 -0
  26. package/build/recommendation/budgeters/diversityBalancedBudgeter.d.ts +7 -0
  27. package/build/recommendation/budgeters/diversityBalancedBudgeter.js +71 -0
  28. package/build/recommendation/budgeters/diversityBalancedBudgeter.test.js +75 -0
  29. package/build/recommendation/budgeters/fixedNBudgeter.d.ts +7 -0
  30. package/build/recommendation/budgeters/fixedNBudgeter.js +11 -0
  31. package/build/recommendation/budgeters/fixedNBudgeter.test.js +66 -0
  32. package/build/recommendation/budgeters/shared.d.ts +19 -0
  33. package/build/recommendation/budgeters/shared.js +66 -0
  34. package/build/recommendation/discriminators.d.ts +31 -0
  35. package/build/recommendation/discriminators.js +355 -0
  36. package/build/recommendation/discriminators.test.js +324 -0
  37. package/build/recommendation/diversity.d.ts +47 -0
  38. package/build/recommendation/diversity.js +101 -0
  39. package/build/recommendation/diversity.test.js +77 -0
  40. package/build/recommendation/planRanker.d.ts +50 -0
  41. package/build/recommendation/planRanker.js +67 -0
  42. package/build/recommendation/planRanker.test.js +110 -0
  43. package/build/recommendation/testFixtures.d.ts +25 -0
  44. package/build/recommendation/testFixtures.js +45 -0
  45. package/build/resources/testbotResource.js +5 -3
  46. package/build/services/AnalyticsService.d.ts +1 -1
  47. package/build/services/ScenarioGenerationService.d.ts +5 -0
  48. package/build/services/ScenarioGenerationService.js +16 -1
  49. package/build/services/ScenarioGenerationService.test.js +44 -0
  50. package/build/services/TestExecutionService.d.ts +15 -2
  51. package/build/services/TestExecutionService.js +213 -63
  52. package/build/services/TestExecutionService.test.js +400 -83
  53. package/build/services/TestGenerationService.d.ts +2 -2
  54. package/build/services/TestGenerationService.js +39 -7
  55. package/build/services/TestGenerationService.test.js +58 -0
  56. package/build/services/containerEnv.js +1 -3
  57. package/build/tool-phases.js +1 -6
  58. package/build/toolNames.d.ts +19 -0
  59. package/build/toolNames.js +19 -0
  60. package/build/tools/code-refactor/codeReuseTool.d.ts +3 -0
  61. package/build/tools/code-refactor/codeReuseTool.js +76 -4
  62. package/build/tools/code-refactor/codeReuseTool.test.js +51 -0
  63. package/build/tools/code-refactor/enhanceAssertionsTool.js +18 -47
  64. package/build/tools/executeSkyrampTestTool.d.ts +0 -11
  65. package/build/tools/executeSkyrampTestTool.js +28 -63
  66. package/build/tools/generate-tests/generateBatchScenarioRestTool.d.ts +6 -1
  67. package/build/tools/generate-tests/generateBatchScenarioRestTool.js +131 -23
  68. package/build/tools/generate-tests/generateBatchScenarioRestTool.test.js +147 -1
  69. package/build/tools/generate-tests/generateContractRestTool.js +13 -3
  70. package/build/tools/generate-tests/generateIntegrationRestTool.js +24 -1
  71. package/build/tools/generate-tests/generateIntegrationRestTool.test.js +159 -0
  72. package/build/tools/generate-tests/generateMockRestTool.d.ts +6 -129
  73. package/build/tools/generate-tests/generateMockRestTool.js +22 -234
  74. package/build/tools/generate-tests/loadTestSchema.d.ts +1 -1
  75. package/build/tools/generate-tests/planGuard.d.ts +13 -0
  76. package/build/tools/generate-tests/planGuard.js +78 -0
  77. package/build/tools/generate-tests/planGuard.test.js +185 -0
  78. package/build/tools/generate-tests/scenarioFileIdentity.d.ts +10 -0
  79. package/build/tools/generate-tests/scenarioFileIdentity.js +46 -0
  80. package/build/tools/generate-tests/scenarioLint.d.ts +30 -0
  81. package/build/tools/generate-tests/scenarioLint.js +150 -0
  82. package/build/tools/generate-tests/scenarioLint.test.js +100 -0
  83. package/build/tools/one-click/oneClickTool.d.ts +0 -13
  84. package/build/tools/one-click/oneClickTool.js +24 -195
  85. package/build/tools/submitReportTool.js +78 -0
  86. package/build/tools/submitReportTool.test.js +255 -0
  87. package/build/tools/test-management/analyzeChangesTool.d.ts +1 -2
  88. package/build/tools/test-management/analyzeChangesTool.js +93 -63
  89. package/build/tools/test-management/analyzeChangesTool.test.js +12 -0
  90. package/build/tools/test-management/index.d.ts +1 -0
  91. package/build/tools/test-management/index.js +1 -0
  92. package/build/tools/test-management/registerTestPlanTool.d.ts +2 -0
  93. package/build/tools/test-management/registerTestPlanTool.js +329 -0
  94. package/build/tools/test-management/registerTestPlanTool.test.js +296 -0
  95. package/build/tools/trace/startTraceCollectionTool.js +3 -3
  96. package/build/types/OneClickCommands.d.ts +1 -1
  97. package/build/types/Recommendation.d.ts +97 -0
  98. package/build/types/Recommendation.js +48 -0
  99. package/build/types/RepositoryAnalysis.d.ts +14 -131
  100. package/build/types/RepositoryAnalysis.js +2 -16
  101. package/build/types/TestExecution.d.ts +2 -1
  102. package/build/types/TestRecommendation.d.ts +12 -1
  103. package/build/types/TestRecommendation.js +26 -11
  104. package/build/types/TestTypes.d.ts +7 -25
  105. package/build/types/TestTypes.js +6 -20
  106. package/build/utils/AnalysisStateManager.d.ts +47 -0
  107. package/build/utils/analyze-openapi.js +1 -18
  108. package/build/utils/branchDiff.d.ts +1 -17
  109. package/build/utils/branchDiff.js +14 -99
  110. package/build/utils/docker.test.js +1 -1
  111. package/build/utils/featureFlags.d.ts +0 -16
  112. package/build/utils/featureFlags.js +0 -20
  113. package/build/utils/featureFlags.test.js +2 -57
  114. package/build/utils/planMatchKeys.d.ts +61 -0
  115. package/build/utils/planMatchKeys.js +125 -0
  116. package/build/utils/pom-scope/import-expansion.d.ts +5 -0
  117. package/build/utils/pom-scope/import-expansion.js +32 -0
  118. package/build/utils/pom-scope/index.d.ts +39 -0
  119. package/build/utils/pom-scope/index.js +120 -0
  120. package/build/utils/pom-scope/index.test.d.ts +1 -0
  121. package/build/utils/pom-scope/index.test.js +239 -0
  122. package/build/utils/pom-scope/pom-files.d.ts +3 -0
  123. package/build/utils/pom-scope/pom-files.js +48 -0
  124. package/build/utils/pom-scope/pom-files.test.d.ts +1 -0
  125. package/build/utils/pom-scope/pom-files.test.js +29 -0
  126. package/build/utils/pom-scope/scoring.d.ts +20 -0
  127. package/build/utils/pom-scope/scoring.js +45 -0
  128. package/build/utils/pom-scope/scoring.test.d.ts +1 -0
  129. package/build/utils/pom-scope/scoring.test.js +39 -0
  130. package/build/utils/pom-scope/selector-extractor.d.ts +7 -0
  131. package/build/utils/pom-scope/selector-extractor.js +57 -0
  132. package/build/utils/pom-scope/selector-extractor.test.d.ts +1 -0
  133. package/build/utils/pom-scope/selector-extractor.test.js +67 -0
  134. package/build/utils/pom-verify/__fixtures__/af-style/asset-list.page.d.ts +5 -0
  135. package/build/utils/pom-verify/__fixtures__/af-style/asset-list.page.js +5 -0
  136. package/build/utils/pom-verify/__fixtures__/af-style/pageobjects/asset-list-page.d.ts +5 -0
  137. package/build/utils/pom-verify/__fixtures__/af-style/pageobjects/asset-list-page.js +9 -0
  138. package/build/utils/pom-verify/__fixtures__/af-style/report.iframe.page.d.ts +4 -0
  139. package/build/utils/pom-verify/__fixtures__/af-style/report.iframe.page.js +4 -0
  140. package/build/utils/pom-verify/__fixtures__/af-style/workflow-footer.page.d.ts +4 -0
  141. package/build/utils/pom-verify/__fixtures__/af-style/workflow-footer.page.js +4 -0
  142. package/build/utils/pom-verify/bindings.d.ts +19 -0
  143. package/build/utils/pom-verify/bindings.js +161 -0
  144. package/build/utils/pom-verify/bindings.test.d.ts +1 -0
  145. package/build/utils/pom-verify/bindings.test.js +164 -0
  146. package/build/utils/pom-verify/calls.d.ts +16 -0
  147. package/build/utils/pom-verify/calls.js +42 -0
  148. package/build/utils/pom-verify/calls.test.d.ts +1 -0
  149. package/build/utils/pom-verify/calls.test.js +61 -0
  150. package/build/utils/pom-verify/index.d.ts +4 -0
  151. package/build/utils/pom-verify/index.js +4 -0
  152. package/build/utils/pom-verify/resolve.d.ts +7 -0
  153. package/build/utils/pom-verify/resolve.js +27 -0
  154. package/build/utils/pom-verify/resolve.test.d.ts +1 -0
  155. package/build/utils/pom-verify/resolve.test.js +68 -0
  156. package/build/utils/pom-verify/strip.d.ts +9 -0
  157. package/build/utils/pom-verify/strip.js +89 -0
  158. package/build/utils/pom-verify/verify.d.ts +14 -0
  159. package/build/utils/pom-verify/verify.js +158 -0
  160. package/build/utils/pom-verify/verify.test.d.ts +1 -0
  161. package/build/utils/pom-verify/verify.test.js +325 -0
  162. package/build/utils/progress.js +5 -10
  163. package/build/utils/reportVerification.d.ts +61 -0
  164. package/build/utils/reportVerification.js +104 -0
  165. package/build/utils/reportVerification.test.d.ts +1 -0
  166. package/build/utils/reportVerification.test.js +185 -0
  167. package/build/utils/scenarioDrafting.js +5 -5
  168. package/build/utils/versions.d.ts +3 -4
  169. package/build/utils/versions.js +1 -3
  170. package/build/utils/workspaceAuth.d.ts +9 -10
  171. package/build/utils/workspaceAuth.js +25 -55
  172. package/build/utils/workspaceAuth.test.js +48 -0
  173. package/build/workspace/workspace.d.ts +34 -28
  174. package/build/workspace/workspace.js +5 -3
  175. package/build/workspace/workspace.test.js +10 -0
  176. package/node_modules/playwright/lib/mcp/skyramp/traceRecordingBackend.js +77 -8
  177. package/node_modules/playwright/node_modules/playwright-core/lib/generated/injectedScriptSource.js +1 -1
  178. package/node_modules/playwright/node_modules/playwright-core/lib/generated/pollingRecorderSource.js +1 -1
  179. package/node_modules/playwright/node_modules/playwright-core/lib/utils/isomorphic/volatileDate.js +101 -0
  180. package/node_modules/playwright/node_modules/playwright-core/lib/utils.js +2 -0
  181. package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/assets/{codeMirrorModule-aszq5EdG.js → codeMirrorModule-Bzd72-bG.js} +1 -1
  182. package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/assets/{defaultSettingsView-BxS7Jm4s.js → defaultSettingsView-DzxTioTK.js} +101 -101
  183. package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/{index.D4JTTy4R.js → index.BGc30U3S.js} +1 -1
  184. package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/index.html +2 -2
  185. package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/{uiMode.DaRMQKOI.js → uiMode.IaDrb29A.js} +1 -1
  186. package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/uiMode.html +2 -2
  187. package/node_modules/playwright/node_modules/playwright-core/package.json +1 -1
  188. package/node_modules/playwright/node_modules/playwright-core/src/generated/injectedScriptSource.ts +1 -1
  189. package/node_modules/playwright/node_modules/playwright-core/src/generated/pollingRecorderSource.ts +1 -1
  190. package/node_modules/playwright/node_modules/playwright-core/src/utils/isomorphic/volatileDate.ts +131 -0
  191. package/node_modules/playwright/node_modules/playwright-core/src/utils.ts +1 -0
  192. package/node_modules/playwright/package.json +1 -1
  193. package/package.json +3 -3
  194. package/build/commands/commandLibrary.test.js +0 -59
  195. package/build/commands/localDevTestChangesCommand.d.ts +0 -15
  196. package/build/commands/localDevTestChangesCommand.js +0 -201
  197. package/build/prompts/local-dev/local-dev-plan.d.ts +0 -35
  198. package/build/prompts/local-dev/local-dev-plan.js +0 -466
  199. package/build/prompts/local-dev/local-dev-prompts.d.ts +0 -4
  200. package/build/prompts/local-dev/local-dev-prompts.js +0 -190
  201. package/build/prompts/prompt-utils.d.ts +0 -8
  202. package/build/prompts/prompt-utils.js +0 -33
  203. package/build/tools/enrichTestWithMocksTool.d.ts +0 -28
  204. package/build/tools/enrichTestWithMocksTool.js +0 -726
  205. package/build/tools/enrichTestWithMocksTool.test.js +0 -266
  206. package/build/tools/executeSkyrampTestTool.test.js +0 -36
  207. package/build/tools/generate-tests/batchMockGenerationTool.d.ts +0 -85
  208. package/build/tools/generate-tests/batchMockGenerationTool.js +0 -432
  209. package/build/tools/generateEnrichedIntegrationTestTool.d.ts +0 -25
  210. package/build/tools/generateEnrichedIntegrationTestTool.js +0 -235
  211. package/build/tools/generateEnrichedIntegrationTestTool.test.js +0 -44
  212. package/build/tools/localDevWorkerComposeTool.d.ts +0 -24
  213. package/build/tools/localDevWorkerComposeTool.js +0 -224
  214. package/build/tools/localDevWorkerComposeTool.test.js +0 -129
  215. package/build/tools/localDevWorkflowFixes.test.js +0 -255
  216. package/build/tools/one-click/oneClickTool.test.js +0 -172
  217. package/build/tools/preflightMockCheckTool.d.ts +0 -2
  218. package/build/tools/preflightMockCheckTool.js +0 -96
  219. package/build/tools/queryProxyMocksTool.d.ts +0 -70
  220. package/build/tools/queryProxyMocksTool.js +0 -522
  221. package/build/tools/queryProxyMocksTool.test.js +0 -164
  222. package/build/utils/analyze-openapi.test.js +0 -19
  223. package/build/utils/branchDiff.test.js +0 -109
  224. package/build/utils/grpcMockValidation.d.ts +0 -1
  225. package/build/utils/grpcMockValidation.js +0 -49
  226. package/build/utils/grpcMockValidation.test.js +0 -41
  227. package/build/utils/httpMethodValidation.d.ts +0 -4
  228. package/build/utils/httpMethodValidation.js +0 -15
  229. package/build/utils/mockCompatibility.d.ts +0 -49
  230. package/build/utils/mockCompatibility.js +0 -82
  231. package/build/utils/mockCompatibility.test.js +0 -79
  232. package/node_modules/playwright/node_modules/playwright-core/.DS_Store +0 -0
  233. /package/build/{commands/commandLibrary.test.d.ts → prompts/code-reuse.test.d.ts} +0 -0
  234. /package/build/{tools/enrichTestWithMocksTool.test.d.ts → prompts/pom-aware-code-reuse.test.d.ts} +0 -0
  235. /package/build/{tools/executeSkyrampTestTool.test.d.ts → recommendation/budgeters/diversityBalancedBudgeter.test.d.ts} +0 -0
  236. /package/build/{tools/generateEnrichedIntegrationTestTool.test.d.ts → recommendation/budgeters/fixedNBudgeter.test.d.ts} +0 -0
  237. /package/build/{tools/localDevWorkerComposeTool.test.d.ts → recommendation/discriminators.test.d.ts} +0 -0
  238. /package/build/{tools/localDevWorkflowFixes.test.d.ts → recommendation/diversity.test.d.ts} +0 -0
  239. /package/build/{tools/one-click/oneClickTool.test.d.ts → recommendation/planRanker.test.d.ts} +0 -0
  240. /package/build/tools/{queryProxyMocksTool.test.d.ts → code-refactor/codeReuseTool.test.d.ts} +0 -0
  241. /package/build/{utils/analyze-openapi.test.d.ts → tools/generate-tests/generateIntegrationRestTool.test.d.ts} +0 -0
  242. /package/build/{utils/branchDiff.test.d.ts → tools/generate-tests/planGuard.test.d.ts} +0 -0
  243. /package/build/{utils/grpcMockValidation.test.d.ts → tools/generate-tests/scenarioLint.test.d.ts} +0 -0
  244. /package/build/{utils/mockCompatibility.test.d.ts → tools/test-management/registerTestPlanTool.test.d.ts} +0 -0
@@ -9,4 +9,3 @@ export declare function getCommandIds(): OneClickCommandId[];
9
9
  export declare function lookupCommand(id: string): OneClickCommandDef;
10
10
  export { TEST_GIVEN_ENDPOINT_COMPREHENSIVELY_COMMAND } from "./testThisEndpointCommand.js";
11
11
  export { FULLREPO_RECOMMEND_GENERATE_EXECUTE_TOPN_TESTS_COMMAND } from "./recommendTestsAndExecuteCommand.js";
12
- export { LOCAL_DEV_TEST_CHANGES_COMMAND } from "./localDevTestChangesCommand.js";
@@ -1,28 +1,23 @@
1
- import { isLocalDevEnabled, isOneClickEnabled } from "../utils/featureFlags.js";
2
1
  import { TEST_GIVEN_ENDPOINT_COMPREHENSIVELY_COMMAND } from "./testThisEndpointCommand.js";
3
2
  import { FULLREPO_RECOMMEND_GENERATE_EXECUTE_TOPN_TESTS_COMMAND } from "./recommendTestsAndExecuteCommand.js";
4
- import { LOCAL_DEV_TEST_CHANGES_COMMAND } from "./localDevTestChangesCommand.js";
5
- /** Base predefined one-click commands */
6
- const BASE_COMMAND_LIBRARY = {
3
+ /**
4
+ * To add a new predefined workflow:
5
+ * 1. Add a new id to OneClickCommandId in types/OneClickCommands.ts
6
+ * 2. Create a new file in commands/ (e.g. myWorkflowCommand.ts) with steps and export the command
7
+ * 3. Import the command here and add it to COMMAND_LIBRARY
8
+ * 4. The generic buildWorkflowFromCommand() will render detailed instructions from your steps
9
+ * (no schema changes needed in oneClickTool.ts — the workflow param description is generated dynamically)
10
+ */
11
+ /** All predefined one-click commands */
12
+ const COMMAND_LIBRARY = {
7
13
  test_given_endpoint_comprehensively: TEST_GIVEN_ENDPOINT_COMPREHENSIVELY_COMMAND,
8
14
  full_repo_scan_recommend_generate_and_execute_top_n_tests: FULLREPO_RECOMMEND_GENERATE_EXECUTE_TOPN_TESTS_COMMAND,
9
15
  };
10
- /** All enabled predefined one-click commands */
11
- function getCommandLibrary() {
12
- const commands = {};
13
- if (isOneClickEnabled()) {
14
- Object.assign(commands, BASE_COMMAND_LIBRARY);
15
- }
16
- if (isLocalDevEnabled()) {
17
- commands.local_dev_test_changes = LOCAL_DEV_TEST_CHANGES_COMMAND;
18
- }
19
- return commands;
20
- }
21
16
  export function getAllCommands() {
22
- return Object.values(getCommandLibrary()).filter((cmd) => Boolean(cmd));
17
+ return Object.values(COMMAND_LIBRARY);
23
18
  }
24
19
  export function getCommandIds() {
25
- return getAllCommands().map((cmd) => cmd.id);
20
+ return Object.keys(COMMAND_LIBRARY);
26
21
  }
27
22
  /**
28
23
  * Look up a command by its string ID. Accepts any string so the tool handler
@@ -30,7 +25,7 @@ export function getCommandIds() {
30
25
  * the ID is not found.
31
26
  */
32
27
  export function lookupCommand(id) {
33
- const cmd = getCommandLibrary()[id];
28
+ const cmd = COMMAND_LIBRARY[id];
34
29
  if (!cmd) {
35
30
  const available = getCommandIds().join(", ");
36
31
  throw new Error(`Unknown workflow: "${id}". Valid workflow IDs: ${available}.`);
@@ -40,4 +35,3 @@ export function lookupCommand(id) {
40
35
  // Re-export commands for consumers that import from commandLibrary
41
36
  export { TEST_GIVEN_ENDPOINT_COMPREHENSIVELY_COMMAND } from "./testThisEndpointCommand.js";
42
37
  export { FULLREPO_RECOMMEND_GENERATE_EXECUTE_TOPN_TESTS_COMMAND } from "./recommendTestsAndExecuteCommand.js";
43
- export { LOCAL_DEV_TEST_CHANGES_COMMAND } from "./localDevTestChangesCommand.js";
package/build/index.js CHANGED
@@ -24,47 +24,24 @@ import { registerCodeReuseTool } from "./tools/code-refactor/codeReuseTool.js";
24
24
  import { registerEnhanceAssertionsTool } from "./tools/code-refactor/enhanceAssertionsTool.js";
25
25
  import { registerBatchScenarioTestTool } from "./tools/generate-tests/generateBatchScenarioRestTool.js";
26
26
  import { registerMockTool } from "./tools/generate-tests/generateMockRestTool.js";
27
- import { registerBatchMockTool } from "./tools/generate-tests/batchMockGenerationTool.js";
28
- import { registerAnalyzeChangesTool, registerAnalyzeTestHealthTool, registerActionsTool, } from "./tools/test-management/index.js";
27
+ import { registerAnalyzeChangesTool, registerAnalyzeTestHealthTool, registerActionsTool, registerRegisterTestPlanTool, } from "./tools/test-management/index.js";
29
28
  import { registerTestbotPrompt } from "./prompts/testbot/testbot-prompts.js";
30
29
  import { registerSutSetupResource } from "./resources/sutSetupResource.js";
31
30
  import { registerTestbotResource } from "./resources/testbotResource.js";
32
- import { registerLocalDevPrompt } from "./prompts/local-dev/local-dev-prompts.js";
33
31
  import { registerSubmitReportTool } from "./tools/submitReportTool.js";
34
32
  import { registerInitializeWorkspaceTool } from "./tools/workspace/initializeWorkspaceTool.js";
35
33
  import { registerInitScanWorkspaceTool } from "./tools/workspace/initScanWorkspaceTool.js";
36
34
  import { registerOneClickTool } from "./tools/one-click/oneClickTool.js";
37
- import { registerEnrichTestWithMocksTool } from "./tools/enrichTestWithMocksTool.js";
38
- import { registerPreflightMockCheckTool } from "./tools/preflightMockCheckTool.js";
39
- import { registerGenerateEnrichedIntegrationTestTool } from "./tools/generateEnrichedIntegrationTestTool.js";
40
- import { registerLocalDevWorkerComposeTool } from "./tools/localDevWorkerComposeTool.js";
41
- import { registerQueryProxyMocksTool } from "./tools/queryProxyMocksTool.js";
42
35
  import { registerAnalysisResources } from "./resources/analysisResources.js";
43
36
  import { registerProgressResource } from "./resources/progressResource.js";
44
37
  import { AnalyticsService } from "./services/AnalyticsService.js";
45
38
  import { registerInitTriggerOnMCPInitialized } from "./utils/initAgent.js";
46
- import { isTestbotEnabled, isLocalDevEnabled } from "./utils/featureFlags.js";
39
+ import { isTestbotEnabled } from "./utils/featureFlags.js";
47
40
  import { registerPlaywrightTools, registerTraceRecordingPrompt, getPlaywrightTraceService, } from "./playwright/index.js";
48
- // One-click routing instructions — injected into MCP server instructions so agents
49
- // know to delegate to the one-click tool rather than self-orchestrating.
50
- // Suppressed in testbot mode where the testbot prompt drives orchestration.
51
41
  const oneClickEnabled = process.env.SKYRAMP_FEATURE_ONE_CLICK === "1";
52
- const localDevEnabled = isLocalDevEnabled();
53
- const localDevInstructions = `\n- When the user asks to test local changes, validate a feature branch, mock services and test, or run local-dev: MUST call \`skyramp_one_click_tool\` with workflow \`local_dev_test_changes\`, \`callingAgent\` set to the current MCP client (\`cursor\` or \`claude\` for skill installation; VS Code does not support repo-local Agent Skills), \`repositoryPath\`, and \`baseBranch\` (default "main"). Do NOT self-orchestrate — the one-click tool handles skill installation, workspace init, and prompt invocation.
54
- - **Proxy / K8s worker**: When the user mentions a Skyramp proxy, K8s worker, kubeconfig, namespace, or provides proxy setup instructions (helm deploy worker, kubectl port-forward, proxy intercepts, seed traffic), do NOT execute those steps manually with bash commands. Instead, pass \`proxyKubeconfig\` and \`proxyNamespace\` (or \`proxyUrl\`) to \`skyramp_one_click_tool\`. The MCP tools handle proxy access internally — \`skyramp_query_proxy_mocks\` runs kubectl port-forward and queries captured traffic automatically. Manual kubectl, helm, or curl commands for proxy setup are unnecessary and waste agent turns.`;
55
- const fullOneClickInstructions = `\n- When the user asks to comprehensively, thoroughly, or deeply test a specific endpoint: MUST call \`skyramp_one_click_tool\` with workflow \`test_given_endpoint_comprehensively\` first. Do NOT self-orchestrate the steps manually.\n- When the user asks to scan the full repo, recommend, generate, and execute top N tests: MUST call \`skyramp_one_click_tool\` with workflow \`full_repo_scan_recommend_generate_and_execute_top_n_tests\`.${localDevEnabled ? localDevInstructions : ""}`;
56
- // Testbot suppresses one-click workflows (it has its own orchestration via testbot prompt),
57
- // but local-dev routing is always active when the flag is set — they serve different use cases.
58
- let oneClickInstructions = "";
59
- if (isTestbotEnabled()) {
60
- oneClickInstructions = localDevEnabled ? localDevInstructions : "";
61
- }
62
- else if (oneClickEnabled) {
63
- oneClickInstructions = fullOneClickInstructions;
64
- }
65
- else if (localDevEnabled) {
66
- oneClickInstructions = localDevInstructions;
67
- }
42
+ const oneClickInstructions = oneClickEnabled
43
+ ? `\n- When the user asks to comprehensively, thoroughly, or deeply test a specific endpoint: MUST call \`skyramp_one_click_tool\` with workflow \`test_given_endpoint_comprehensively\` first. Do NOT self-orchestrate the steps manually.\n- When the user asks to scan the full repo, recommend, generate, and execute top N tests: MUST call \`skyramp_one_click_tool\` with workflow \`full_repo_scan_recommend_generate_and_execute_top_n_tests\`.`
44
+ : "";
68
45
  const server = new McpServer({
69
46
  name: "Skyramp MCP Server",
70
47
  version: "1.0.0",
@@ -144,10 +121,6 @@ if (isTestbotEnabled()) {
144
121
  registerSutSetupResource(server);
145
122
  logger.info("Testbot SUT setup resource enabled via SKYRAMP_FEATURE_TESTBOT");
146
123
  }
147
- if (isLocalDevEnabled()) {
148
- prompts.push(registerLocalDevPrompt);
149
- logger.info("Local-dev prompt enabled via SKYRAMP_FEATURE_LOCAL_DEV");
150
- }
151
124
  prompts.forEach((registerPrompt) => registerPrompt(server));
152
125
  logger.info("All prompts registered successfully");
153
126
  // Register test generation tools
@@ -161,7 +134,6 @@ const testGenerationTools = [
161
134
  registerUITestTool,
162
135
  registerBatchScenarioTestTool,
163
136
  registerMockTool,
164
- registerBatchMockTool,
165
137
  ];
166
138
  testGenerationTools.forEach((registerTool) => registerTool(server));
167
139
  // Register modularization and code quality tools
@@ -179,18 +151,14 @@ registerProgressResource(server);
179
151
  registerAnalyzeChangesTool(server);
180
152
  registerAnalyzeTestHealthTool(server);
181
153
  registerActionsTool(server);
154
+ registerRegisterTestPlanTool(server);
182
155
  // Register workspace management tools
183
156
  registerInitScanWorkspaceTool(server);
184
157
  registerInitializeWorkspaceTool(server);
185
158
  // Register one-click orchestrated workflows
186
- if (oneClickEnabled || localDevEnabled) {
159
+ if (oneClickEnabled) {
187
160
  registerOneClickTool(server);
188
- logger.info("One-click tools enabled", {
189
- enabledBy: {
190
- SKYRAMP_FEATURE_ONE_CLICK: oneClickEnabled,
191
- SKYRAMP_FEATURE_LOCAL_DEV: localDevEnabled,
192
- },
193
- });
161
+ logger.info("One-click tools enabled via SKYRAMP_FEATURE_ONE_CLICK");
194
162
  }
195
163
  // Register other Skyramp tools
196
164
  const infrastructureTools = [
@@ -200,10 +168,6 @@ const infrastructureTools = [
200
168
  registerTraceTool,
201
169
  registerTraceStopTool,
202
170
  ];
203
- if (isLocalDevEnabled()) {
204
- infrastructureTools.push(registerEnrichTestWithMocksTool, registerPreflightMockCheckTool, registerGenerateEnrichedIntegrationTestTool, registerLocalDevWorkerComposeTool, registerQueryProxyMocksTool);
205
- logger.info("Local-dev tools enabled via SKYRAMP_FEATURE_LOCAL_DEV");
206
- }
207
171
  if (isTestbotEnabled()) {
208
172
  infrastructureTools.push(registerSubmitReportTool);
209
173
  logger.info("Testbot tools enabled via SKYRAMP_FEATURE_TESTBOT");
@@ -232,38 +196,6 @@ process.on("uncaughtException", async (error) => {
232
196
  }
233
197
  process.exit(1);
234
198
  });
235
- // Handle unhandled promise rejections — without this handler Node.js 15+
236
- // terminates the process on any unhandled rejection, which drops the MCP
237
- // connection if e.g. a progress notification write fails on a broken transport.
238
- process.on("unhandledRejection", async (reason) => {
239
- const error = reason instanceof Error ? reason : new Error(String(reason));
240
- // EPIPE means the client already disconnected — exit cleanly
241
- if ("code" in error && error.code === "EPIPE") {
242
- process.exit(0);
243
- }
244
- // gRPC/Docker connectivity errors — log and survive.
245
- // These occur when Docker containers/networks are destroyed while the MCP
246
- // server has pending gRPC calls to the Skyramp worker. The server should
247
- // stay alive so non-Docker tools remain available.
248
- const msg = error.message || "";
249
- const isDockerDisconnect = /UNAVAILABLE|DEADLINE_EXCEEDED|ECONNREFUSED|ECONNRESET|connection reset|socket hang up|stream removed/i.test(msg);
250
- if (isDockerDisconnect) {
251
- logger.info("gRPC/Docker connection lost (container or network likely destroyed)", {
252
- error: msg,
253
- });
254
- return;
255
- }
256
- logger.error("Unhandled promise rejection", {
257
- error: error.message,
258
- stack: error.stack,
259
- });
260
- try {
261
- await AnalyticsService.pushServerCrashEvent("unhandledRejection", error.message, error.stack);
262
- }
263
- catch {
264
- // Best effort — don't let telemetry failure cascade
265
- }
266
- });
267
199
  // Start MCP server
268
200
  async function main() {
269
201
  const transport = new StdioServerTransport();
@@ -299,11 +231,6 @@ async function main() {
299
231
  logger.error("STDIN error, parent likely disconnected", { error: err });
300
232
  handleParentDisconnect("stdin error");
301
233
  });
302
- // Handle stdout errors (EPIPE = client stopped reading, broken pipe)
303
- process.stdout.on("error", (err) => {
304
- logger.error("STDOUT error, client likely disconnected", { error: err });
305
- handleParentDisconnect("stdout error");
306
- });
307
234
  // Handle process termination signals
308
235
  process.on("SIGTERM", () => handleParentDisconnect("SIGTERM"));
309
236
  process.on("SIGINT", () => handleParentDisconnect("SIGINT"));
@@ -1 +1,7 @@
1
- export declare function getCodeReusePrompt(testFile: string, language: string, framework?: string): string;
1
+ import type { ScopedPom } from "../utils/pom-scope/index.js";
2
+ export declare function isPomAwareTarget(language: string, framework?: string): boolean;
3
+ export declare function getCodeReusePrompt(testFile: string, language: string, framework?: string, scopedPoms?: {
4
+ tier1: ScopedPom[];
5
+ tier2: ScopedPom[];
6
+ scannedNoOverlap?: boolean;
7
+ }): string;
@@ -18,11 +18,14 @@ const LANGUAGE_MAP = {
18
18
  fileName: "skyrampUtils.ts",
19
19
  },
20
20
  };
21
- export function getCodeReusePrompt(testFile, language, framework) {
22
- const isTypescriptPlaywright = language.toLowerCase() === "typescript" &&
23
- framework?.toLowerCase() === "playwright";
24
- if (isTypescriptPlaywright) {
25
- return getPomAwareCodeReusePrompt(testFile);
21
+ export function isPomAwareTarget(language, framework) {
22
+ const lang = language.toLowerCase();
23
+ return (lang === "typescript" || lang === "javascript") && framework?.toLowerCase() === "playwright";
24
+ }
25
+ export function getCodeReusePrompt(testFile, language, framework, scopedPoms) {
26
+ const lang = language.toLowerCase();
27
+ if (isPomAwareTarget(lang, framework)) {
28
+ return getPomAwareCodeReusePrompt(testFile, lang, scopedPoms);
26
29
  }
27
30
  const ext = LANGUAGE_MAP[language].extension || "py";
28
31
  const fileName = LANGUAGE_MAP[language].fileName || "SkyrampUtils.py";
@@ -0,0 +1,62 @@
1
+ import { getCodeReusePrompt } from "./code-reuse.js";
2
+ const POM = "POM-AWARE CODE REUSE"; // unique to the POM branch
3
+ const pom = (file, score = 2, rareHits = 2, matchedTokens = ["a-b-c"]) => ({ file, score, rareHits, matchedTokens });
4
+ describe("getCodeReusePrompt routing", () => {
5
+ it("routes javascript + playwright to the POM-aware prompt", () => {
6
+ expect(getCodeReusePrompt("t.spec.js", "javascript", "playwright")).toContain(POM);
7
+ });
8
+ it("still routes typescript + playwright to the POM-aware prompt", () => {
9
+ expect(getCodeReusePrompt("t.spec.ts", "typescript", "playwright")).toContain(POM);
10
+ });
11
+ it("routes javascript + non-playwright to SkyrampUtils", () => {
12
+ expect(getCodeReusePrompt("t.spec.js", "javascript", "jest")).not.toContain(POM);
13
+ });
14
+ it("routes python to SkyrampUtils (no regression)", () => {
15
+ expect(getCodeReusePrompt("t.py", "python", "pytest")).not.toContain(POM);
16
+ });
17
+ it("does not trigger POM path when framework is undefined", () => {
18
+ expect(getCodeReusePrompt("t.spec.ts", "typescript")).not.toContain(POM);
19
+ });
20
+ });
21
+ describe("getCodeReusePrompt scoped POM list", () => {
22
+ it("emits the pre-detected two-tier STEP 1 when scoped files are supplied", () => {
23
+ const p = getCodeReusePrompt("t.spec.js", "javascript", "playwright", { tier1: [pom("/repo/pages/loginPage.js")], tier2: [pom("/repo/pages/homePage.js", 0.3, 1, ["menu-link-/alerts-item"])] });
24
+ expect(p).toContain("ALREADY DETECTED");
25
+ expect(p).toContain("/repo/pages/loginPage.js");
26
+ expect(p).toContain("catalog fully");
27
+ expect(p).toContain("/repo/pages/homePage.js");
28
+ expect(p).toContain("signature level");
29
+ expect(p).toContain("menu-link-/alerts-item"); // matched tokens surface for tier-2 mapping evidence
30
+ expect(p).not.toContain("DETECT POM CLASSES");
31
+ });
32
+ it("emits the glob STEP 1 when no scoped files are supplied", () => {
33
+ expect(getCodeReusePrompt("t.spec.js", "javascript", "playwright")).toContain("DETECT POM CLASSES");
34
+ });
35
+ it("emits the glob STEP 1 when both tiers are empty (fallback)", () => {
36
+ expect(getCodeReusePrompt("t.spec.js", "javascript", "playwright", { tier1: [], tier2: [] }))
37
+ .toContain("DETECT POM CLASSES");
38
+ });
39
+ it("returns the short skip response on a clean scan with zero overlap", () => {
40
+ const p = getCodeReusePrompt("t.spec.js", "javascript", "playwright", {
41
+ tier1: [], tier2: [], scannedNoOverlap: true,
42
+ });
43
+ expect(p).toContain("No reusable POM layer detected");
44
+ expect(p).toContain("verify: true"); // escape hatch mandates re-verify
45
+ expect(p).not.toContain("COMPLIANCE RULES"); // NOT the full workflow prompt
46
+ expect(p.length).toBeLessThan(2000);
47
+ });
48
+ it("keeps the full agent-driven fallback when scoping was inconclusive", () => {
49
+ // no scopedPoms argument = scan didn't run or didn't conclude
50
+ const p = getCodeReusePrompt("t.spec.js", "javascript", "playwright");
51
+ expect(p).toContain("COMPLIANCE RULES");
52
+ expect(p).not.toContain("No reusable POM layer detected");
53
+ });
54
+ it("leaves the SkyrampUtils path untouched for non-Playwright languages", () => {
55
+ const p = getCodeReusePrompt("t.py", "python", undefined, { tier1: [], tier2: [], scannedNoOverlap: true });
56
+ expect(p).not.toContain("No reusable POM layer detected");
57
+ expect(p).toContain("SkyrampUtils");
58
+ });
59
+ it("does not annotate when scoping simply was not attempted", () => {
60
+ expect(getCodeReusePrompt("t.spec.js", "javascript", "playwright")).not.toContain("No reusable POM layer detected");
61
+ });
62
+ });
@@ -12,5 +12,4 @@ export interface AssertionEnrichmentRule {
12
12
  examples: AssertionEnrichmentExample[];
13
13
  }
14
14
  export declare function renderRule(index: number, rule: AssertionEnrichmentRule): string;
15
- export declare function renderSharedAssertionRules(): string;
16
15
  export declare function getAssertionsPrompt(specificRules: AssertionEnrichmentRule[], scope: string, testFile: string, enhanceType: EnhanceType): string;
@@ -122,20 +122,6 @@ expect(getResponseValue(productsPostResponse, "created_at")).toMatch(/^\\d{4}-\\
122
122
  },
123
123
  ],
124
124
  },
125
- {
126
- title: "Use exact recorded JSON paths",
127
- description: "Do not add object-wrapper prefixes or nested paths that are not present in the actual response body. Use the exact JSON path from the recorded response body.",
128
- subPoints: [
129
- `If the body is flat (\`{"id": "acc_...", "tax_exempt": true}\`), use \`"tax_exempt"\`, not \`"account.tax_exempt"\`.`,
130
- "Only use dot notation when the recorded response genuinely nests the field under that key.",
131
- ],
132
- examples: [
133
- {
134
- language: "javascript",
135
- code: `expect(getResponseValue(accountResponse, "tax_exempt")).toBe(true);`,
136
- },
137
- ],
138
- },
139
125
  {
140
126
  title: "Computed response fields, derived using dynamic formulas",
141
127
  description: "When the response contains a field whose value is derived from a calculation, assert the result using a formula built from prior response values and request inputs, not a hardcoded literal.",
@@ -172,9 +158,6 @@ ${ex.code}
172
158
  function renderRules(rules) {
173
159
  return rules.map((rule, i) => renderRule(i + 1, rule)).join("\n\n");
174
160
  }
175
- export function renderSharedAssertionRules() {
176
- return renderRules(SHARED_RULES);
177
- }
178
161
  export function getAssertionsPrompt(specificRules, scope, testFile, enhanceType) {
179
162
  const allRules = [...SHARED_RULES, ...specificRules];
180
163
  const ruleChecklistKeys = allRules
@@ -13,7 +13,7 @@ After scanning the workspace, before calling the skyramp_init_workspace tool, yo
13
13
  "framework": "<framework>",
14
14
  "testDirectory": "<path>",
15
15
  "api": { "schemaPath": "<path-or-url>", "baseUrl": "<url>", "authType": "<type>", "authHeader": "<header>" },
16
- "runtimeDetails": { "runtime": "<runtime>", "serverStartCommand": "<command>", "serverStopCommand": "<docker stop command>", "dockerNetwork": "<network>" }
16
+ "runtimeDetails": { "runtime": "<runtime>", "serverStartCommand": "<command>", "dockerNetwork": "<network>" }
17
17
  }
18
18
  ]
19
19
  \`\`\`
@@ -68,7 +68,7 @@ API schemas (look inside the service directory and check known framework default
68
68
  <runtime_config>
69
69
  Inspect the repo root (and subdirectories like .devcontainer/) for shared runtime configuration:
70
70
  1. CLAUDE.md or AGENTS.md: if either file exists at the repo root, check it for dev/test/CI setup instructions including how to start services, required environment variables, and runtime configuration.
71
- 2. Docker Compose files: scan for ALL compose files including docker-compose.yml, docker-compose.yaml, docker-compose.*.yml (such as docker-compose.testbot.yml or docker-compose.dev.yml), compose.yml, and compose.*.yaml in the repo root and subdirectories. Distinguish between application compose files and infrastructure-only compose files. Infrastructure compose files contain only supporting services like databases, Redis, Minio, mail servers, or message queues and do NOT run the application itself. Application compose files contain the actual application services that build from the repo source code (look for "build:" directives pointing to the repo, or services that map to discovered application directories). Only use application compose files for determining runtime, serverStartCommand, and serverStopCommand. When a non-default compose file is found, the serverStartCommand and serverStopCommand must reference it explicitly (such as "docker compose -f docker-compose.testbot.yml up -d --build <service-name>" and "docker compose -f docker-compose.testbot.yml stop <service-name>"). Docker Compose ALWAYS prefixes the network name with the project name. If compose has "networks: { my-net: ... }", the actual network name is "<project-name>_my-net". If there is no explicit networks section, the default network is "<project-name>_default". The project name is the basename of the working directory where docker compose runs.
71
+ 2. Docker Compose files: scan for ALL compose files including docker-compose.yml, docker-compose.yaml, docker-compose.*.yml (such as docker-compose.testbot.yml or docker-compose.dev.yml), compose.yml, and compose.*.yaml in the repo root and subdirectories. Distinguish between application compose files and infrastructure-only compose files. Infrastructure compose files contain only supporting services like databases, Redis, Minio, mail servers, or message queues and do NOT run the application itself. Application compose files contain the actual application services that build from the repo source code (look for "build:" directives pointing to the repo, or services that map to discovered application directories). Only use application compose files for determining runtime and serverStartCommand. When a non-default compose file is found, the serverStartCommand must reference it explicitly (such as "docker compose -f docker-compose.testbot.yml up -d <service-name>"). Docker Compose ALWAYS prefixes the network name with the project name. If compose has "networks: { my-net: ... }", the actual network name is "<project-name>_my-net". If there is no explicit networks section, the default network is "<project-name>_default". The project name is the basename of the working directory where docker compose runs.
72
72
  3. Makefile: extract start and dev targets.
73
73
  4. Root package.json scripts: extract workspace-level commands.
74
74
  </runtime_config>
@@ -135,20 +135,18 @@ Create one service entry per deployable unit. You MUST include every backend/API
135
135
  <runtime_fields>
136
136
  1. runtimeDetails.runtime (required): One of local, docker, or k8s. Detect per service:
137
137
  - If the service is listed in an application docker compose file (one that builds or runs the application, not infrastructure-only files containing only databases, caches, or queues) or has a Dockerfile as its intended run method, use "docker".
138
- - If k8s manifests exist (charts/, k8s/, deploy/) AND the service is intended to run in K8s for local development, use "k8s".
138
+ - If k8s manifests exist (charts/, k8s/, deploy/), use "k8s".
139
139
  - If the service has no Docker or k8s configuration and is run directly via a language runtime (npm, python, java, etc.), use "local".
140
140
  A repo may have MIXED runtimes. A backend in docker-compose.yml uses "docker" while a frontend run with pnpm or npm locally uses "local". Include ALL services regardless of runtime.
141
141
  If the frontend is bundled inside the API Docker container (no separate frontend service in the compose file), both frontend and backend services should use runtime "docker", share the same baseUrl (the container's exposed URL), and use the same serverStartCommand since they run in the same container.
142
- IMPORTANT — proxy parameters are NOT runtime indicators: If proxyKubeconfig, proxyNamespace, or proxyUrl appear in the conversation context, they are for a Skyramp proxy worker that collects traffic samples for mock generation. They do NOT indicate the repo's runtime. Do not use proxy K8s params to set runtime, k8sNamespace, or k8sContext. Determine the runtime solely from the repo's own files (docker-compose.yml, Dockerfile, k8s manifests that are part of the repo's own local dev workflow). Note that many repos have K8s deployment manifests for staging/production but use Docker Compose for local development — check which setup the repo actually uses for local dev.
143
142
  2. runtimeDetails.serverStartCommand: The command to start or deploy the service. It MUST match the runtime:
144
- - For "docker" runtime: Use a Docker command that rebuilds application services from the working tree before starting them, such as "docker compose up -d --build <service-name>" for the default docker-compose.yml, or "docker compose -f <compose-file> up -d --build <service-name>" when using a non-default compose file. This is always derivable from the application docker compose file and service name. If the compose service has no build context and only references an image, note that the command cannot rebuild local code.
143
+ - For "docker" runtime: Use a Docker command such as "docker compose up -d <service-name>" for the default docker-compose.yml, or "docker compose -f <compose-file> up -d <service-name>" when using a non-default compose file. This is always derivable from the application docker compose file and service name.
145
144
  - For "k8s" runtime: Use a deploy command such as "kubectl apply -f deploy/", "helm install myrelease .", or "skaffold run". This is always derivable from the manifests or charts present in the repo.
146
145
  - For "local" runtime: Use an application command such as "uvicorn main:app", "npm run dev", or "java -jar app.jar". Derive from Makefile, package.json scripts, or README. If no start command is discoverable, omit this field entirely.
147
146
  NEVER mix runtime types with incompatible commands (for example, using "uvicorn" with runtime "docker" will cause errors). For "local" runtime, NEVER fabricate a command. Only use commands found in Makefile, package.json scripts, or README.
148
- 3. runtimeDetails.serverStopCommand: Optional command to stop the service after test execution. ONLY set when runtime is "docker" and serverStartCommand starts persistent Docker infrastructure. For docker compose starts, prefer matching stop/down commands from the same compose file. Omit this field for "local" and "k8s" runtimes, or when teardown is unsafe or not discoverable.
149
- 4. runtimeDetails.dockerNetwork: Docker network name. ONLY set when runtime is "docker". NEVER set for "local" or "k8s".
150
- 5. runtimeDetails.k8sNamespace: Kubernetes namespace. ONLY set when runtime is "k8s". NEVER set for "local" or "docker".
151
- 6. runtimeDetails.k8sContext: Kubernetes context. ONLY set when runtime is "k8s". NEVER set for "local" or "docker".
147
+ 3. runtimeDetails.dockerNetwork: Docker network name. ONLY set when runtime is "docker". NEVER set for "local" or "k8s".
148
+ 4. runtimeDetails.k8sNamespace: Kubernetes namespace. ONLY set when runtime is "k8s". NEVER set for "local" or "docker".
149
+ 5. runtimeDetails.k8sContext: Kubernetes context. ONLY set when runtime is "k8s". NEVER set for "local" or "docker".
152
150
  </runtime_fields>
153
151
 
154
152
  ### Verification
@@ -161,8 +159,8 @@ Before calling skyramp_init_workspace, confirm all of the following:
161
159
  5. Every service with authType apiKey has authHeader explicitly set to the actual custom header name (such as "X-API-Key" or "X-Admin-Key"). If you cannot find the header name in the source code, env vars, or README, do NOT use authType apiKey. Use authType none instead and add a YAML comment explaining auth is unresolved.
162
160
  6. framework matches language (python uses pytest or robot, typescript or javascript uses playwright, java uses junit).
163
161
  7. testDirectory follows the stable resolution rules above: framework config file when present (Playwright testDir in playwright.config.ts, pytest testpaths in pytest.ini or pyproject.toml, JUnit test source dir in pom.xml or build.gradle); otherwise the deterministic default (tests/skyramp for a single service, tests/skyramp/<serviceDirName> for multiple services).
164
- 8. If serverStartCommand is provided, it matches the runtime. If serverStopCommand is provided, runtime is "docker" and the command is a Docker command.
165
- 9. For services in docker-compose.yml: runtime MUST be "docker" and the command MUST be a docker command such as "docker compose up -d --build <service-name>" when the service has a build context. Always include it since it is derivable from the service name.
162
+ 8. If serverStartCommand is provided, it matches the runtime.
163
+ 9. For services in docker-compose.yml: runtime MUST be "docker" and the command MUST be a docker command such as "docker compose up -d <service-name>". Always include it since it is derivable from the service name.
166
164
  10. NEVER use application-level commands (uvicorn, npm, node, python, java, etc.) with runtime "docker".
167
165
  11. For "local" runtime: if no start command is discoverable from Makefile, package.json scripts, or README, omit serverStartCommand rather than guessing.
168
166
  12. dockerNetwork is set only when runtime is "docker".
@@ -1 +1,6 @@
1
- export declare function getPomAwareCodeReusePrompt(testFile: string): string;
1
+ import type { ScopedPom } from "../utils/pom-scope/index.js";
2
+ export declare function getPomAwareCodeReusePrompt(testFile: string, language?: string, scopedPoms?: {
3
+ tier1: ScopedPom[];
4
+ tier2: ScopedPom[];
5
+ scannedNoOverlap?: boolean;
6
+ }): string;