@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.
Files changed (33) hide show
  1. package/build/index.js +6 -5
  2. package/build/prompts/initialize-workspace/initializeWorkspacePrompt.js +11 -7
  3. package/build/prompts/personas.js +2 -1
  4. package/build/prompts/test-maintenance/drift-analysis-prompt.js +2 -1
  5. package/build/prompts/test-maintenance/drift-analysis-prompt.test.js +28 -0
  6. package/build/prompts/test-maintenance/driftAnalysisSections.js +2 -2
  7. package/build/prompts/test-recommendation/analysisOutputPrompt.js +74 -16
  8. package/build/prompts/test-recommendation/analysisOutputPrompt.test.js +154 -0
  9. package/build/prompts/test-recommendation/recommendationSections.js +13 -43
  10. package/build/prompts/test-recommendation/registerRecommendTestsPrompt.js +19 -0
  11. package/build/prompts/test-recommendation/test-recommendation-prompt.js +158 -70
  12. package/build/prompts/test-recommendation/test-recommendation-prompt.test.js +24 -117
  13. package/build/prompts/testbot/testbot-prompts.js +12 -18
  14. package/build/prompts/testbot/testbot-prompts.test.js +2 -2
  15. package/build/resources/analysisResources.js +1 -0
  16. package/build/tools/code-refactor/enhanceAssertionsTool.js +2 -1
  17. package/build/tools/generate-tests/generateBatchScenarioRestTool.js +127 -4
  18. package/build/tools/generate-tests/generateBatchScenarioRestTool.test.js +205 -18
  19. package/build/tools/generate-tests/generateContractRestTool.js +19 -19
  20. package/build/tools/generate-tests/generateIntegrationRestTool.js +9 -2
  21. package/build/tools/generate-tests/generateUIRestTool.js +23 -8
  22. package/build/tools/test-management/analyzeChangesTool.js +222 -11
  23. package/build/tools/test-management/analyzeChangesTool.test.js +233 -1
  24. package/build/types/TestRecommendation.js +0 -2
  25. package/build/utils/featureFlags.js +4 -22
  26. package/build/utils/featureFlags.test.js +81 -0
  27. package/build/utils/httpDefaults.js +6 -1
  28. package/build/utils/httpDefaults.test.js +21 -0
  29. package/build/utils/scenarioDrafting.js +511 -100
  30. package/build/utils/scenarioDrafting.test.js +545 -259
  31. package/build/utils/telemetry.js +2 -1
  32. package/build/utils/utils.js +23 -0
  33. package/package.json +1 -1
@@ -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 process.env.SKYRAMP_FEATURE_TESTBOT === "1" ? "testbot" : "mcp";
8
+ return isTestbotEnabled() ? "testbot" : "mcp";
8
9
  }
9
10
  /**
10
11
  * Detects the CI/CD platform from environment variables.
@@ -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
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyramp/mcp",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "main": "build/index.js",
5
5
  "exports": {
6
6
  ".": "./build/index.js",