@skyramp/mcp 0.1.4 → 0.1.6
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/index.js +6 -5
- package/build/prompts/initialize-workspace/initializeWorkspacePrompt.js +11 -7
- package/build/prompts/personas.js +2 -1
- package/build/prompts/test-maintenance/drift-analysis-prompt.js +2 -1
- package/build/prompts/test-maintenance/drift-analysis-prompt.test.js +28 -0
- package/build/prompts/test-maintenance/driftAnalysisSections.js +2 -2
- package/build/prompts/test-recommendation/analysisOutputPrompt.js +74 -16
- package/build/prompts/test-recommendation/analysisOutputPrompt.test.js +154 -0
- package/build/prompts/test-recommendation/recommendationSections.js +13 -43
- package/build/prompts/test-recommendation/registerRecommendTestsPrompt.js +19 -0
- package/build/prompts/test-recommendation/test-recommendation-prompt.js +158 -70
- package/build/prompts/test-recommendation/test-recommendation-prompt.test.js +24 -117
- package/build/prompts/testbot/testbot-prompts.js +12 -18
- package/build/prompts/testbot/testbot-prompts.test.js +2 -2
- package/build/resources/analysisResources.js +1 -0
- package/build/tools/code-refactor/enhanceAssertionsTool.js +2 -1
- package/build/tools/generate-tests/generateBatchScenarioRestTool.js +127 -4
- package/build/tools/generate-tests/generateBatchScenarioRestTool.test.js +205 -18
- package/build/tools/generate-tests/generateContractRestTool.js +19 -19
- package/build/tools/generate-tests/generateIntegrationRestTool.js +9 -2
- package/build/tools/generate-tests/generateUIRestTool.js +23 -8
- package/build/tools/test-management/analyzeChangesTool.js +222 -11
- package/build/tools/test-management/analyzeChangesTool.test.js +233 -1
- package/build/types/TestRecommendation.js +0 -2
- package/build/utils/featureFlags.js +4 -22
- package/build/utils/featureFlags.test.js +81 -0
- package/build/utils/httpDefaults.js +6 -1
- package/build/utils/httpDefaults.test.js +21 -0
- package/build/utils/scenarioDrafting.js +511 -100
- package/build/utils/scenarioDrafting.test.js +545 -259
- package/build/utils/telemetry.js +2 -1
- package/build/utils/utils.js +23 -0
- package/package.json +1 -1
package/build/utils/telemetry.js
CHANGED
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
* "testbot" when running as part of the GitHub Action test bot,
|
|
4
4
|
* "mcp" for regular IDE/MCP usage.
|
|
5
5
|
*/
|
|
6
|
+
import { isTestbotEnabled } from "./featureFlags.js";
|
|
6
7
|
export function getEntryPoint() {
|
|
7
|
-
return
|
|
8
|
+
return isTestbotEnabled() ? "testbot" : "mcp";
|
|
8
9
|
}
|
|
9
10
|
/**
|
|
10
11
|
* Detects the CI/CD platform from environment variables.
|
package/build/utils/utils.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import path from "path";
|
|
2
|
+
import { isTestbotEnabled } from "./featureFlags.js";
|
|
2
3
|
import { logger } from "./logger.js";
|
|
3
4
|
export const OUTPUT_DIR_FIELD_NAME = "outputDir";
|
|
4
5
|
export const TRACE_OUTPUT_FILE_FIELD_NAME = "traceOutputFile";
|
|
@@ -134,3 +135,25 @@ export function generateSkyrampHeader(language) {
|
|
|
134
135
|
const commentPrefix = COMMENT_PREFIX_MAP[language] || "#";
|
|
135
136
|
return `${commentPrefix} ${SKYRAMP_UTILS_HEADER} on ${timestamp} ${timezone}\n\n`;
|
|
136
137
|
}
|
|
138
|
+
/**
|
|
139
|
+
* Returns prompt phrasing for where the agent should find service details.
|
|
140
|
+
*
|
|
141
|
+
* - Testbot mode: agent receives a `<services>` XML block — no workspace.yml exists.
|
|
142
|
+
* - Normal MCP mode: agent reads `.skyramp/workspace.yml`.
|
|
143
|
+
*/
|
|
144
|
+
export function resolveServiceDetailsRef() {
|
|
145
|
+
if (isTestbotEnabled()) {
|
|
146
|
+
return {
|
|
147
|
+
testDirRef: "the `<output_dir>` from the `<services>` block",
|
|
148
|
+
frontendTestDirRef: "the **frontend** service's `<output_dir>` from the `<services>` block",
|
|
149
|
+
baseUrlRef: "the `<base_url>` from the `<services>` block",
|
|
150
|
+
authSourceRef: "the `<services>` block",
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
return {
|
|
154
|
+
testDirRef: "the `testDirectory` from `.skyramp/workspace.yml`",
|
|
155
|
+
frontendTestDirRef: "the **frontend** service's `testDirectory` from `.skyramp/workspace.yml`",
|
|
156
|
+
baseUrlRef: "the `api.baseUrl` from `.skyramp/workspace.yml`",
|
|
157
|
+
authSourceRef: "`.skyramp/workspace.yml`",
|
|
158
|
+
};
|
|
159
|
+
}
|