@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.
- package/build/commands/commandLibrary.d.ts +0 -1
- package/build/commands/commandLibrary.js +13 -19
- package/build/index.js +8 -81
- package/build/prompts/code-reuse.d.ts +7 -1
- package/build/prompts/code-reuse.js +8 -5
- package/build/prompts/code-reuse.test.js +62 -0
- package/build/prompts/enhance-assertions/sharedAssertionRules.d.ts +0 -1
- package/build/prompts/enhance-assertions/sharedAssertionRules.js +0 -17
- package/build/prompts/initialize-workspace/initializeWorkspacePrompt.js +9 -11
- package/build/prompts/pom-aware-code-reuse.d.ts +6 -1
- package/build/prompts/pom-aware-code-reuse.js +98 -52
- package/build/prompts/pom-aware-code-reuse.test.js +11 -0
- package/build/prompts/test-recommendation/analysisOutputPrompt.js +29 -21
- package/build/prompts/test-recommendation/analysisOutputPrompt.test.js +28 -0
- package/build/prompts/test-recommendation/diffExecutionPlan.d.ts +4 -2
- package/build/prompts/test-recommendation/diffExecutionPlan.js +11 -65
- package/build/prompts/test-recommendation/fullRepoCatalog.d.ts +2 -2
- package/build/prompts/test-recommendation/recommendationSections.js +5 -2
- package/build/prompts/test-recommendation/scopeAssessment.js +1 -1
- package/build/prompts/test-recommendation/test-recommendation-prompt.d.ts +26 -1
- package/build/prompts/test-recommendation/test-recommendation-prompt.js +72 -97
- package/build/prompts/test-recommendation/test-recommendation-prompt.test.js +49 -27
- package/build/prompts/testbot/testbot-prompts.d.ts +6 -1
- package/build/prompts/testbot/testbot-prompts.js +101 -25
- package/build/prompts/testbot/testbot-prompts.test.js +44 -0
- package/build/recommendation/budgeters/diversityBalancedBudgeter.d.ts +7 -0
- package/build/recommendation/budgeters/diversityBalancedBudgeter.js +71 -0
- package/build/recommendation/budgeters/diversityBalancedBudgeter.test.js +75 -0
- package/build/recommendation/budgeters/fixedNBudgeter.d.ts +7 -0
- package/build/recommendation/budgeters/fixedNBudgeter.js +11 -0
- package/build/recommendation/budgeters/fixedNBudgeter.test.js +66 -0
- package/build/recommendation/budgeters/shared.d.ts +19 -0
- package/build/recommendation/budgeters/shared.js +66 -0
- package/build/recommendation/discriminators.d.ts +31 -0
- package/build/recommendation/discriminators.js +355 -0
- package/build/recommendation/discriminators.test.js +324 -0
- package/build/recommendation/diversity.d.ts +47 -0
- package/build/recommendation/diversity.js +101 -0
- package/build/recommendation/diversity.test.js +77 -0
- package/build/recommendation/planRanker.d.ts +50 -0
- package/build/recommendation/planRanker.js +67 -0
- package/build/recommendation/planRanker.test.js +110 -0
- package/build/recommendation/testFixtures.d.ts +25 -0
- package/build/recommendation/testFixtures.js +45 -0
- package/build/resources/testbotResource.js +5 -3
- package/build/services/AnalyticsService.d.ts +1 -1
- package/build/services/ScenarioGenerationService.d.ts +5 -0
- package/build/services/ScenarioGenerationService.js +16 -1
- package/build/services/ScenarioGenerationService.test.js +44 -0
- package/build/services/TestExecutionService.d.ts +15 -2
- package/build/services/TestExecutionService.js +213 -63
- package/build/services/TestExecutionService.test.js +400 -83
- package/build/services/TestGenerationService.d.ts +2 -2
- package/build/services/TestGenerationService.js +39 -7
- package/build/services/TestGenerationService.test.js +58 -0
- package/build/services/containerEnv.js +1 -3
- package/build/tool-phases.js +1 -6
- package/build/toolNames.d.ts +19 -0
- package/build/toolNames.js +19 -0
- package/build/tools/code-refactor/codeReuseTool.d.ts +3 -0
- package/build/tools/code-refactor/codeReuseTool.js +76 -4
- package/build/tools/code-refactor/codeReuseTool.test.js +51 -0
- package/build/tools/code-refactor/enhanceAssertionsTool.js +18 -47
- package/build/tools/executeSkyrampTestTool.d.ts +0 -11
- package/build/tools/executeSkyrampTestTool.js +28 -63
- package/build/tools/generate-tests/generateBatchScenarioRestTool.d.ts +6 -1
- package/build/tools/generate-tests/generateBatchScenarioRestTool.js +131 -23
- package/build/tools/generate-tests/generateBatchScenarioRestTool.test.js +147 -1
- package/build/tools/generate-tests/generateContractRestTool.js +13 -3
- package/build/tools/generate-tests/generateIntegrationRestTool.js +24 -1
- package/build/tools/generate-tests/generateIntegrationRestTool.test.js +159 -0
- package/build/tools/generate-tests/generateMockRestTool.d.ts +6 -129
- package/build/tools/generate-tests/generateMockRestTool.js +22 -234
- package/build/tools/generate-tests/loadTestSchema.d.ts +1 -1
- package/build/tools/generate-tests/planGuard.d.ts +13 -0
- package/build/tools/generate-tests/planGuard.js +78 -0
- package/build/tools/generate-tests/planGuard.test.js +185 -0
- package/build/tools/generate-tests/scenarioFileIdentity.d.ts +10 -0
- package/build/tools/generate-tests/scenarioFileIdentity.js +46 -0
- package/build/tools/generate-tests/scenarioLint.d.ts +30 -0
- package/build/tools/generate-tests/scenarioLint.js +150 -0
- package/build/tools/generate-tests/scenarioLint.test.js +100 -0
- package/build/tools/one-click/oneClickTool.d.ts +0 -13
- package/build/tools/one-click/oneClickTool.js +24 -195
- package/build/tools/submitReportTool.js +78 -0
- package/build/tools/submitReportTool.test.js +255 -0
- package/build/tools/test-management/analyzeChangesTool.d.ts +1 -2
- package/build/tools/test-management/analyzeChangesTool.js +93 -63
- package/build/tools/test-management/analyzeChangesTool.test.js +12 -0
- package/build/tools/test-management/index.d.ts +1 -0
- package/build/tools/test-management/index.js +1 -0
- package/build/tools/test-management/registerTestPlanTool.d.ts +2 -0
- package/build/tools/test-management/registerTestPlanTool.js +329 -0
- package/build/tools/test-management/registerTestPlanTool.test.js +296 -0
- package/build/tools/trace/startTraceCollectionTool.js +3 -3
- package/build/types/OneClickCommands.d.ts +1 -1
- package/build/types/Recommendation.d.ts +97 -0
- package/build/types/Recommendation.js +48 -0
- package/build/types/RepositoryAnalysis.d.ts +14 -131
- package/build/types/RepositoryAnalysis.js +2 -16
- package/build/types/TestExecution.d.ts +2 -1
- package/build/types/TestRecommendation.d.ts +12 -1
- package/build/types/TestRecommendation.js +26 -11
- package/build/types/TestTypes.d.ts +7 -25
- package/build/types/TestTypes.js +6 -20
- package/build/utils/AnalysisStateManager.d.ts +47 -0
- package/build/utils/analyze-openapi.js +1 -18
- package/build/utils/branchDiff.d.ts +1 -17
- package/build/utils/branchDiff.js +14 -99
- package/build/utils/docker.test.js +1 -1
- package/build/utils/featureFlags.d.ts +0 -16
- package/build/utils/featureFlags.js +0 -20
- package/build/utils/featureFlags.test.js +2 -57
- package/build/utils/planMatchKeys.d.ts +61 -0
- package/build/utils/planMatchKeys.js +125 -0
- package/build/utils/pom-scope/import-expansion.d.ts +5 -0
- package/build/utils/pom-scope/import-expansion.js +32 -0
- package/build/utils/pom-scope/index.d.ts +39 -0
- package/build/utils/pom-scope/index.js +120 -0
- package/build/utils/pom-scope/index.test.d.ts +1 -0
- package/build/utils/pom-scope/index.test.js +239 -0
- package/build/utils/pom-scope/pom-files.d.ts +3 -0
- package/build/utils/pom-scope/pom-files.js +48 -0
- package/build/utils/pom-scope/pom-files.test.d.ts +1 -0
- package/build/utils/pom-scope/pom-files.test.js +29 -0
- package/build/utils/pom-scope/scoring.d.ts +20 -0
- package/build/utils/pom-scope/scoring.js +45 -0
- package/build/utils/pom-scope/scoring.test.d.ts +1 -0
- package/build/utils/pom-scope/scoring.test.js +39 -0
- package/build/utils/pom-scope/selector-extractor.d.ts +7 -0
- package/build/utils/pom-scope/selector-extractor.js +57 -0
- package/build/utils/pom-scope/selector-extractor.test.d.ts +1 -0
- package/build/utils/pom-scope/selector-extractor.test.js +67 -0
- package/build/utils/pom-verify/__fixtures__/af-style/asset-list.page.d.ts +5 -0
- package/build/utils/pom-verify/__fixtures__/af-style/asset-list.page.js +5 -0
- package/build/utils/pom-verify/__fixtures__/af-style/pageobjects/asset-list-page.d.ts +5 -0
- package/build/utils/pom-verify/__fixtures__/af-style/pageobjects/asset-list-page.js +9 -0
- package/build/utils/pom-verify/__fixtures__/af-style/report.iframe.page.d.ts +4 -0
- package/build/utils/pom-verify/__fixtures__/af-style/report.iframe.page.js +4 -0
- package/build/utils/pom-verify/__fixtures__/af-style/workflow-footer.page.d.ts +4 -0
- package/build/utils/pom-verify/__fixtures__/af-style/workflow-footer.page.js +4 -0
- package/build/utils/pom-verify/bindings.d.ts +19 -0
- package/build/utils/pom-verify/bindings.js +161 -0
- package/build/utils/pom-verify/bindings.test.d.ts +1 -0
- package/build/utils/pom-verify/bindings.test.js +164 -0
- package/build/utils/pom-verify/calls.d.ts +16 -0
- package/build/utils/pom-verify/calls.js +42 -0
- package/build/utils/pom-verify/calls.test.d.ts +1 -0
- package/build/utils/pom-verify/calls.test.js +61 -0
- package/build/utils/pom-verify/index.d.ts +4 -0
- package/build/utils/pom-verify/index.js +4 -0
- package/build/utils/pom-verify/resolve.d.ts +7 -0
- package/build/utils/pom-verify/resolve.js +27 -0
- package/build/utils/pom-verify/resolve.test.d.ts +1 -0
- package/build/utils/pom-verify/resolve.test.js +68 -0
- package/build/utils/pom-verify/strip.d.ts +9 -0
- package/build/utils/pom-verify/strip.js +89 -0
- package/build/utils/pom-verify/verify.d.ts +14 -0
- package/build/utils/pom-verify/verify.js +158 -0
- package/build/utils/pom-verify/verify.test.d.ts +1 -0
- package/build/utils/pom-verify/verify.test.js +325 -0
- package/build/utils/progress.js +5 -10
- package/build/utils/reportVerification.d.ts +61 -0
- package/build/utils/reportVerification.js +104 -0
- package/build/utils/reportVerification.test.d.ts +1 -0
- package/build/utils/reportVerification.test.js +185 -0
- package/build/utils/scenarioDrafting.js +5 -5
- package/build/utils/versions.d.ts +3 -4
- package/build/utils/versions.js +1 -3
- package/build/utils/workspaceAuth.d.ts +9 -10
- package/build/utils/workspaceAuth.js +25 -55
- package/build/utils/workspaceAuth.test.js +48 -0
- package/build/workspace/workspace.d.ts +34 -28
- package/build/workspace/workspace.js +5 -3
- package/build/workspace/workspace.test.js +10 -0
- package/node_modules/playwright/lib/mcp/skyramp/traceRecordingBackend.js +77 -8
- package/node_modules/playwright/node_modules/playwright-core/lib/generated/injectedScriptSource.js +1 -1
- package/node_modules/playwright/node_modules/playwright-core/lib/generated/pollingRecorderSource.js +1 -1
- package/node_modules/playwright/node_modules/playwright-core/lib/utils/isomorphic/volatileDate.js +101 -0
- package/node_modules/playwright/node_modules/playwright-core/lib/utils.js +2 -0
- package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/assets/{codeMirrorModule-aszq5EdG.js → codeMirrorModule-Bzd72-bG.js} +1 -1
- package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/assets/{defaultSettingsView-BxS7Jm4s.js → defaultSettingsView-DzxTioTK.js} +101 -101
- package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/{index.D4JTTy4R.js → index.BGc30U3S.js} +1 -1
- package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/index.html +2 -2
- package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/{uiMode.DaRMQKOI.js → uiMode.IaDrb29A.js} +1 -1
- package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/uiMode.html +2 -2
- package/node_modules/playwright/node_modules/playwright-core/package.json +1 -1
- package/node_modules/playwright/node_modules/playwright-core/src/generated/injectedScriptSource.ts +1 -1
- package/node_modules/playwright/node_modules/playwright-core/src/generated/pollingRecorderSource.ts +1 -1
- package/node_modules/playwright/node_modules/playwright-core/src/utils/isomorphic/volatileDate.ts +131 -0
- package/node_modules/playwright/node_modules/playwright-core/src/utils.ts +1 -0
- package/node_modules/playwright/package.json +1 -1
- package/package.json +3 -3
- package/build/commands/commandLibrary.test.js +0 -59
- package/build/commands/localDevTestChangesCommand.d.ts +0 -15
- package/build/commands/localDevTestChangesCommand.js +0 -201
- package/build/prompts/local-dev/local-dev-plan.d.ts +0 -35
- package/build/prompts/local-dev/local-dev-plan.js +0 -466
- package/build/prompts/local-dev/local-dev-prompts.d.ts +0 -4
- package/build/prompts/local-dev/local-dev-prompts.js +0 -190
- package/build/prompts/prompt-utils.d.ts +0 -8
- package/build/prompts/prompt-utils.js +0 -33
- package/build/tools/enrichTestWithMocksTool.d.ts +0 -28
- package/build/tools/enrichTestWithMocksTool.js +0 -726
- package/build/tools/enrichTestWithMocksTool.test.js +0 -266
- package/build/tools/executeSkyrampTestTool.test.js +0 -36
- package/build/tools/generate-tests/batchMockGenerationTool.d.ts +0 -85
- package/build/tools/generate-tests/batchMockGenerationTool.js +0 -432
- package/build/tools/generateEnrichedIntegrationTestTool.d.ts +0 -25
- package/build/tools/generateEnrichedIntegrationTestTool.js +0 -235
- package/build/tools/generateEnrichedIntegrationTestTool.test.js +0 -44
- package/build/tools/localDevWorkerComposeTool.d.ts +0 -24
- package/build/tools/localDevWorkerComposeTool.js +0 -224
- package/build/tools/localDevWorkerComposeTool.test.js +0 -129
- package/build/tools/localDevWorkflowFixes.test.js +0 -255
- package/build/tools/one-click/oneClickTool.test.js +0 -172
- package/build/tools/preflightMockCheckTool.d.ts +0 -2
- package/build/tools/preflightMockCheckTool.js +0 -96
- package/build/tools/queryProxyMocksTool.d.ts +0 -70
- package/build/tools/queryProxyMocksTool.js +0 -522
- package/build/tools/queryProxyMocksTool.test.js +0 -164
- package/build/utils/analyze-openapi.test.js +0 -19
- package/build/utils/branchDiff.test.js +0 -109
- package/build/utils/grpcMockValidation.d.ts +0 -1
- package/build/utils/grpcMockValidation.js +0 -49
- package/build/utils/grpcMockValidation.test.js +0 -41
- package/build/utils/httpMethodValidation.d.ts +0 -4
- package/build/utils/httpMethodValidation.js +0 -15
- package/build/utils/mockCompatibility.d.ts +0 -49
- package/build/utils/mockCompatibility.js +0 -82
- package/build/utils/mockCompatibility.test.js +0 -79
- package/node_modules/playwright/node_modules/playwright-core/.DS_Store +0 -0
- /package/build/{commands/commandLibrary.test.d.ts → prompts/code-reuse.test.d.ts} +0 -0
- /package/build/{tools/enrichTestWithMocksTool.test.d.ts → prompts/pom-aware-code-reuse.test.d.ts} +0 -0
- /package/build/{tools/executeSkyrampTestTool.test.d.ts → recommendation/budgeters/diversityBalancedBudgeter.test.d.ts} +0 -0
- /package/build/{tools/generateEnrichedIntegrationTestTool.test.d.ts → recommendation/budgeters/fixedNBudgeter.test.d.ts} +0 -0
- /package/build/{tools/localDevWorkerComposeTool.test.d.ts → recommendation/discriminators.test.d.ts} +0 -0
- /package/build/{tools/localDevWorkflowFixes.test.d.ts → recommendation/diversity.test.d.ts} +0 -0
- /package/build/{tools/one-click/oneClickTool.test.d.ts → recommendation/planRanker.test.d.ts} +0 -0
- /package/build/tools/{queryProxyMocksTool.test.d.ts → code-refactor/codeReuseTool.test.d.ts} +0 -0
- /package/build/{utils/analyze-openapi.test.d.ts → tools/generate-tests/generateIntegrationRestTool.test.d.ts} +0 -0
- /package/build/{utils/branchDiff.test.d.ts → tools/generate-tests/planGuard.test.d.ts} +0 -0
- /package/build/{utils/grpcMockValidation.test.d.ts → tools/generate-tests/scenarioLint.test.d.ts} +0 -0
- /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
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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(
|
|
17
|
+
return Object.values(COMMAND_LIBRARY);
|
|
23
18
|
}
|
|
24
19
|
export function getCommandIds() {
|
|
25
|
-
return
|
|
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 =
|
|
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 {
|
|
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
|
|
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
|
|
53
|
-
|
|
54
|
-
|
|
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
|
|
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
|
-
|
|
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
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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>", "
|
|
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
|
|
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/)
|
|
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
|
|
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.
|
|
149
|
-
4. runtimeDetails.
|
|
150
|
-
5. runtimeDetails.
|
|
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.
|
|
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
|
|
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
|
-
|
|
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;
|