@skyramp/mcp 0.3.2-rc.pom-3 → 0.3.2
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 +1 -0
- package/build/commands/commandLibrary.js +19 -13
- package/build/commands/localDevTestChangesCommand.d.ts +15 -0
- package/build/commands/localDevTestChangesCommand.js +201 -0
- package/build/index.js +80 -6
- package/build/prompts/code-reuse.js +3 -0
- package/build/prompts/enhance-assertions/sharedAssertionRules.d.ts +1 -0
- package/build/prompts/enhance-assertions/sharedAssertionRules.js +17 -0
- package/build/prompts/initialize-workspace/initializeWorkspacePrompt.js +11 -9
- package/build/prompts/local-dev/local-dev-plan.d.ts +35 -0
- package/build/prompts/local-dev/local-dev-plan.js +429 -0
- package/build/prompts/local-dev/local-dev-prompts.d.ts +4 -0
- package/build/prompts/local-dev/local-dev-prompts.js +190 -0
- package/build/prompts/pom-aware-code-reuse.js +12 -0
- package/build/prompts/prompt-utils.d.ts +8 -0
- package/build/prompts/prompt-utils.js +33 -0
- package/build/prompts/sut-setup/modes/adaptWorkflowPrompt.js +37 -14
- package/build/prompts/sut-setup/shared.js +16 -12
- package/build/prompts/test-recommendation/analysisOutputPrompt.js +21 -29
- package/build/prompts/test-recommendation/scopeAssessment.d.ts +24 -7
- package/build/prompts/test-recommendation/scopeAssessment.js +111 -12
- package/build/prompts/test-recommendation/test-recommendation-prompt.js +41 -4
- package/build/prompts/testbot/testbot-prompts.d.ts +0 -5
- package/build/prompts/testbot/testbot-prompts.js +32 -52
- package/build/recommendation/planRanker.d.ts +15 -2
- package/build/recommendation/planRanker.js +76 -5
- package/build/resources/testbotResource.js +2 -1
- package/build/services/AnalyticsService.d.ts +1 -1
- package/build/services/TestExecutionService.d.ts +2 -1
- package/build/services/TestExecutionService.js +8 -3
- package/build/services/TestGenerationService.d.ts +2 -2
- package/build/services/TestGenerationService.js +39 -21
- package/build/services/containerEnv.js +3 -1
- package/build/tool-phases.js +6 -0
- package/build/tools/code-refactor/codeReuseTool.js +43 -4
- package/build/tools/code-refactor/enhanceAssertionsTool.js +68 -18
- package/build/tools/code-refactor/reuse-outcome.d.ts +109 -0
- package/build/tools/code-refactor/reuse-outcome.js +158 -0
- package/build/tools/code-refactor/reuse-state.d.ts +45 -0
- package/build/tools/code-refactor/reuse-state.js +140 -0
- package/build/tools/enrichTestWithMocksTool.d.ts +28 -0
- package/build/tools/enrichTestWithMocksTool.js +726 -0
- package/build/tools/executeSkyrampTestTool.d.ts +11 -0
- package/build/tools/executeSkyrampTestTool.js +62 -21
- package/build/tools/generate-tests/batchMockGenerationTool.d.ts +106 -0
- package/build/tools/generate-tests/batchMockGenerationTool.js +545 -0
- package/build/tools/generate-tests/generateBatchScenarioRestTool.js +25 -23
- package/build/tools/generate-tests/generateContractRestTool.js +2 -2
- package/build/tools/generate-tests/generateE2ERestTool.d.ts +1 -1
- package/build/tools/generate-tests/generateE2ERestTool.js +1 -1
- package/build/tools/generate-tests/generateLoadRestTool.d.ts +1 -1
- package/build/tools/generate-tests/generateLoadRestTool.js +1 -1
- package/build/tools/generate-tests/generateMockRestTool.d.ts +179 -6
- package/build/tools/generate-tests/generateMockRestTool.js +391 -22
- package/build/tools/generate-tests/loadTestSchema.d.ts +1 -1
- package/build/tools/generate-tests/planGuard.js +2 -22
- package/build/tools/generateEnrichedIntegrationTestTool.d.ts +25 -0
- package/build/tools/generateEnrichedIntegrationTestTool.js +235 -0
- package/build/tools/localDevWorkerComposeTool.d.ts +24 -0
- package/build/tools/localDevWorkerComposeTool.js +264 -0
- package/build/tools/one-click/oneClickTool.d.ts +13 -0
- package/build/tools/one-click/oneClickTool.js +195 -24
- package/build/tools/preflightMockCheckTool.d.ts +2 -0
- package/build/tools/preflightMockCheckTool.js +96 -0
- package/build/tools/queryProxyMocksTool.d.ts +70 -0
- package/build/tools/queryProxyMocksTool.js +522 -0
- package/build/tools/runExistingTestsTool.d.ts +31 -0
- package/build/tools/runExistingTestsTool.js +214 -13
- package/build/tools/submitReportTool.js +38 -3
- package/build/tools/test-management/analyzeChangesTool.d.ts +2 -1
- package/build/tools/test-management/analyzeChangesTool.js +63 -40
- package/build/tools/test-management/registerTestPlanTool.js +55 -7
- package/build/tools/trace/startTraceCollectionTool.js +3 -3
- package/build/types/FrontendIntegration.d.ts +3 -0
- package/build/types/FrontendIntegration.js +3 -0
- package/build/types/OneClickCommands.d.ts +1 -1
- package/build/types/Recommendation.d.ts +20 -0
- package/build/types/Recommendation.js +32 -6
- package/build/types/RepositoryAnalysis.d.ts +131 -14
- package/build/types/RepositoryAnalysis.js +16 -2
- package/build/types/ReuseOutcome.d.ts +63 -0
- package/build/types/ReuseOutcome.js +33 -0
- package/build/types/TestExecution.d.ts +1 -0
- package/build/types/TestTypes.d.ts +25 -7
- package/build/types/TestTypes.js +22 -6
- package/build/types/TestbotReport.d.ts +7 -0
- package/build/types/index.d.ts +2 -0
- package/build/types/index.js +1 -0
- package/build/utils/AnalysisStateManager.d.ts +26 -0
- package/build/utils/AnalysisStateManager.js +31 -1
- package/build/utils/analyze-openapi.js +18 -1
- package/build/utils/branchDiff.d.ts +17 -1
- package/build/utils/branchDiff.js +99 -14
- package/build/utils/featureFlags.d.ts +31 -0
- package/build/utils/featureFlags.js +37 -0
- package/build/utils/frontendIntegration.js +8 -1
- package/build/utils/grpcMockValidation.d.ts +1 -0
- package/build/utils/grpcMockValidation.js +49 -0
- package/build/utils/httpMethodValidation.d.ts +4 -0
- package/build/utils/httpMethodValidation.js +15 -0
- package/build/utils/logger.js +1 -1
- package/build/utils/mockCompatibility.d.ts +49 -0
- package/build/utils/mockCompatibility.js +82 -0
- package/build/utils/pom-scope/pom-files.js +7 -0
- package/build/utils/pom-verify/bindings.js +11 -1
- package/build/utils/pom-verify/re-exports.d.ts +10 -0
- package/build/utils/pom-verify/re-exports.js +61 -0
- package/build/utils/pom-verify/resolve.d.ts +4 -1
- package/build/utils/pom-verify/resolve.js +7 -4
- package/build/utils/pom-verify/verify.d.ts +5 -0
- package/build/utils/pom-verify/verify.js +25 -3
- package/build/utils/progress.js +10 -5
- package/build/utils/proxy-terminal.js +3 -3
- package/build/utils/routeParsers.d.ts +3 -9
- package/build/utils/routeParsers.js +79 -4
- package/build/utils/utils.js +2 -2
- package/build/utils/versions.d.ts +4 -3
- package/build/utils/versions.js +3 -1
- package/build/utils/workspaceAuth.d.ts +46 -0
- package/build/utils/workspaceAuth.js +156 -1
- package/build/workspace/testSuites.d.ts +2 -1
- package/build/workspace/testSuites.js +1 -1
- package/build/workspace/workspace.d.ts +108 -32
- package/build/workspace/workspace.js +32 -4
- package/package.json +5 -2
- package/build/adapters/jestAdapter.test.d.ts +0 -1
- package/build/adapters/jestAdapter.test.js +0 -93
- package/build/adapters/mochaAdapter.test.d.ts +0 -1
- package/build/adapters/mochaAdapter.test.js +0 -63
- package/build/adapters/playwrightAdapter.test.d.ts +0 -1
- package/build/adapters/playwrightAdapter.test.js +0 -169
- package/build/adapters/pytestAdapter.test.d.ts +0 -1
- package/build/adapters/pytestAdapter.test.js +0 -90
- package/build/prompts/code-reuse.test.d.ts +0 -1
- package/build/prompts/code-reuse.test.js +0 -62
- package/build/prompts/pom-aware-code-reuse.test.d.ts +0 -1
- package/build/prompts/pom-aware-code-reuse.test.js +0 -11
- package/build/prompts/test-maintenance/drift-analysis-prompt.test.d.ts +0 -1
- package/build/prompts/test-maintenance/drift-analysis-prompt.test.js +0 -51
- package/build/prompts/test-recommendation/analysisOutputPrompt.test.d.ts +0 -1
- package/build/prompts/test-recommendation/analysisOutputPrompt.test.js +0 -264
- package/build/prompts/test-recommendation/mergeEnrichedScenarios.test.d.ts +0 -1
- package/build/prompts/test-recommendation/mergeEnrichedScenarios.test.js +0 -126
- package/build/prompts/test-recommendation/promptPlan.test.d.ts +0 -1
- package/build/prompts/test-recommendation/promptPlan.test.js +0 -336
- package/build/prompts/test-recommendation/scopeAssessment.test.d.ts +0 -1
- package/build/prompts/test-recommendation/scopeAssessment.test.js +0 -371
- package/build/prompts/test-recommendation/test-recommendation-prompt.test.d.ts +0 -1
- package/build/prompts/test-recommendation/test-recommendation-prompt.test.js +0 -1925
- package/build/prompts/testbot/testbot-prompts.test.d.ts +0 -1
- package/build/prompts/testbot/testbot-prompts.test.js +0 -451
- package/build/recommendation/budgeters/diversityBalancedBudgeter.test.d.ts +0 -1
- package/build/recommendation/budgeters/diversityBalancedBudgeter.test.js +0 -138
- package/build/recommendation/budgeters/fixedNBudgeter.test.d.ts +0 -1
- package/build/recommendation/budgeters/fixedNBudgeter.test.js +0 -66
- package/build/recommendation/discriminators.test.d.ts +0 -1
- package/build/recommendation/discriminators.test.js +0 -324
- package/build/recommendation/diversity.test.d.ts +0 -1
- package/build/recommendation/diversity.test.js +0 -77
- package/build/recommendation/planRanker.test.d.ts +0 -1
- package/build/recommendation/planRanker.test.js +0 -110
- package/build/resources/testbotResource.test.d.ts +0 -1
- package/build/resources/testbotResource.test.js +0 -44
- package/build/services/AnalyticsService.test.d.ts +0 -1
- package/build/services/AnalyticsService.test.js +0 -86
- package/build/services/ScenarioGenerationService.integration.test.d.ts +0 -1
- package/build/services/ScenarioGenerationService.integration.test.js +0 -162
- package/build/services/ScenarioGenerationService.test.d.ts +0 -1
- package/build/services/ScenarioGenerationService.test.js +0 -414
- package/build/services/TestDiscoveryService.test.d.ts +0 -1
- package/build/services/TestDiscoveryService.test.js +0 -983
- package/build/services/TestExecutionService.test.d.ts +0 -1
- package/build/services/TestExecutionService.test.js +0 -1032
- package/build/services/TestGenerationService.test.d.ts +0 -1
- package/build/services/TestGenerationService.test.js +0 -578
- package/build/tool-phase-coverage.test.d.ts +0 -1
- package/build/tool-phase-coverage.test.js +0 -49
- package/build/tools/code-refactor/codeReuseTool.test.d.ts +0 -1
- package/build/tools/code-refactor/codeReuseTool.test.js +0 -572
- package/build/tools/generate-tests/generateBatchScenarioRestTool.test.d.ts +0 -1
- package/build/tools/generate-tests/generateBatchScenarioRestTool.test.js +0 -433
- package/build/tools/generate-tests/generateContractRestTool.test.d.ts +0 -1
- package/build/tools/generate-tests/generateContractRestTool.test.js +0 -142
- package/build/tools/generate-tests/generateIntegrationRestTool.test.d.ts +0 -1
- package/build/tools/generate-tests/generateIntegrationRestTool.test.js +0 -159
- package/build/tools/generate-tests/generateLoadRestTool.test.d.ts +0 -1
- package/build/tools/generate-tests/generateLoadRestTool.test.js +0 -169
- package/build/tools/generate-tests/generateUIRestTool.test.d.ts +0 -1
- package/build/tools/generate-tests/generateUIRestTool.test.js +0 -32
- package/build/tools/generate-tests/planGuard.test.d.ts +0 -1
- package/build/tools/generate-tests/planGuard.test.js +0 -185
- package/build/tools/generate-tests/scenarioLint.test.d.ts +0 -1
- package/build/tools/generate-tests/scenarioLint.test.js +0 -100
- package/build/tools/runExistingTestsTool.test.d.ts +0 -1
- package/build/tools/runExistingTestsTool.test.js +0 -379
- package/build/tools/submitReportTool.test.d.ts +0 -1
- package/build/tools/submitReportTool.test.js +0 -1428
- package/build/tools/test-management/actionsTool.test.d.ts +0 -1
- package/build/tools/test-management/actionsTool.test.js +0 -436
- package/build/tools/test-management/analyzeChangesTool.test.d.ts +0 -1
- package/build/tools/test-management/analyzeChangesTool.test.js +0 -522
- package/build/tools/test-management/analyzeTestHealthTool.test.d.ts +0 -1
- package/build/tools/test-management/analyzeTestHealthTool.test.js +0 -385
- package/build/tools/test-management/registerTestPlanTool.test.d.ts +0 -1
- package/build/tools/test-management/registerTestPlanTool.test.js +0 -296
- package/build/tools/trace/resolveSaveStoragePath.test.d.ts +0 -1
- package/build/tools/trace/resolveSaveStoragePath.test.js +0 -17
- package/build/tools/trace/resolveSessionPaths.test.d.ts +0 -1
- package/build/tools/trace/resolveSessionPaths.test.js +0 -104
- package/build/tools/trace/sessionState.test.d.ts +0 -1
- package/build/tools/trace/sessionState.test.js +0 -17
- package/build/tools/workspace/initializeWorkspaceTool.test.d.ts +0 -1
- package/build/tools/workspace/initializeWorkspaceTool.test.js +0 -139
- package/build/tools/workspace/serviceUpsert.test.d.ts +0 -1
- package/build/tools/workspace/serviceUpsert.test.js +0 -50
- package/build/utils/AnalysisStateManager.test.d.ts +0 -1
- package/build/utils/AnalysisStateManager.test.js +0 -134
- package/build/utils/dartRouteExtractor.test.d.ts +0 -1
- package/build/utils/dartRouteExtractor.test.js +0 -307
- package/build/utils/docker.test.d.ts +0 -1
- package/build/utils/docker.test.js +0 -114
- package/build/utils/featureFlags.test.d.ts +0 -1
- package/build/utils/featureFlags.test.js +0 -81
- package/build/utils/fileWalk.test.d.ts +0 -1
- package/build/utils/fileWalk.test.js +0 -252
- package/build/utils/frontendIntegration.test.d.ts +0 -1
- package/build/utils/frontendIntegration.test.js +0 -229
- package/build/utils/frontendSelectors.test.d.ts +0 -1
- package/build/utils/frontendSelectors.test.js +0 -118
- package/build/utils/gitStaging.test.d.ts +0 -1
- package/build/utils/gitStaging.test.js +0 -111
- package/build/utils/httpDefaults.test.d.ts +0 -1
- package/build/utils/httpDefaults.test.js +0 -21
- package/build/utils/importerHop.test.d.ts +0 -1
- package/build/utils/importerHop.test.js +0 -469
- package/build/utils/pathAffinityClassification.test.d.ts +0 -1
- package/build/utils/pathAffinityClassification.test.js +0 -208
- package/build/utils/planMatchKeys.test.d.ts +0 -1
- package/build/utils/planMatchKeys.test.js +0 -123
- package/build/utils/pom-scope/index.test.d.ts +0 -1
- package/build/utils/pom-scope/index.test.js +0 -278
- package/build/utils/pom-scope/pom-files.test.d.ts +0 -1
- package/build/utils/pom-scope/pom-files.test.js +0 -29
- package/build/utils/pom-scope/scoring.test.d.ts +0 -1
- package/build/utils/pom-scope/scoring.test.js +0 -39
- package/build/utils/pom-scope/selector-extractor.test.d.ts +0 -1
- package/build/utils/pom-scope/selector-extractor.test.js +0 -67
- package/build/utils/pom-verify/bindings.test.d.ts +0 -1
- package/build/utils/pom-verify/bindings.test.js +0 -164
- package/build/utils/pom-verify/calls.test.d.ts +0 -1
- package/build/utils/pom-verify/calls.test.js +0 -61
- package/build/utils/pom-verify/resolve.test.d.ts +0 -1
- package/build/utils/pom-verify/resolve.test.js +0 -114
- package/build/utils/pom-verify/verify.test.d.ts +0 -1
- package/build/utils/pom-verify/verify.test.js +0 -374
- package/build/utils/pr-comment-parser.test.d.ts +0 -1
- package/build/utils/pr-comment-parser.test.js +0 -428
- package/build/utils/progress.test.d.ts +0 -1
- package/build/utils/progress.test.js +0 -37
- package/build/utils/projectMetadata.test.d.ts +0 -1
- package/build/utils/projectMetadata.test.js +0 -172
- package/build/utils/pythonMountPrefixes.test.d.ts +0 -1
- package/build/utils/pythonMountPrefixes.test.js +0 -113
- package/build/utils/repoScanner.test.d.ts +0 -1
- package/build/utils/repoScanner.test.js +0 -190
- package/build/utils/reportVerification.test.d.ts +0 -1
- package/build/utils/reportVerification.test.js +0 -185
- package/build/utils/routeParsers.test.d.ts +0 -1
- package/build/utils/routeParsers.test.js +0 -1011
- package/build/utils/scenarioDrafting.test.d.ts +0 -1
- package/build/utils/scenarioDrafting.test.js +0 -876
- package/build/utils/sourceRouteExtractor.test.d.ts +0 -1
- package/build/utils/sourceRouteExtractor.test.js +0 -738
- package/build/utils/telemetry.test.d.ts +0 -1
- package/build/utils/telemetry.test.js +0 -70
- package/build/utils/trace-parser.test.d.ts +0 -6
- package/build/utils/trace-parser.test.js +0 -140
- package/build/utils/uiPageEnumerator.test.d.ts +0 -1
- package/build/utils/uiPageEnumerator.test.js +0 -824
- package/build/utils/utils.test.d.ts +0 -1
- package/build/utils/utils.test.js +0 -103
- package/build/utils/walkerCharacterization.test.d.ts +0 -1
- package/build/utils/walkerCharacterization.test.js +0 -233
- package/build/utils/workspaceAuth.test.d.ts +0 -1
- package/build/utils/workspaceAuth.test.js +0 -260
- package/build/workspace/testSuites.test.d.ts +0 -1
- package/build/workspace/testSuites.test.js +0 -23
- package/build/workspace/workspace.test.d.ts +0 -1
- package/build/workspace/workspace.test.js +0 -264
|
@@ -13,6 +13,12 @@ export declare const serviceSchema: z.ZodObject<{
|
|
|
13
13
|
authType: z.ZodOptional<z.ZodEnum<["bearer", "basic", "oauth", "apiKey", "cookie", "session", "token", "none"]>>;
|
|
14
14
|
authHeader: z.ZodOptional<z.ZodString>;
|
|
15
15
|
authScheme: z.ZodOptional<z.ZodString>;
|
|
16
|
+
/** Query params always attached to every generated request for this
|
|
17
|
+
* service (e.g. RBAC context an authorization layer requires beyond
|
|
18
|
+
* the auth header). Literal values only — no env-var interpolation.
|
|
19
|
+
* Explicit per-request queryParams always win on a key collision
|
|
20
|
+
* (SKYR-4050). */
|
|
21
|
+
defaultQueryParams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
16
22
|
baseUrl: z.ZodOptional<z.ZodString>;
|
|
17
23
|
/** SUT serves self-signed TLS (e.g. a kind kube-apiserver) — generated
|
|
18
24
|
* tests should skip certificate verification for this service (SKYR-3961).
|
|
@@ -23,6 +29,7 @@ export declare const serviceSchema: z.ZodObject<{
|
|
|
23
29
|
authScheme?: string | undefined;
|
|
24
30
|
schemaPath?: string | undefined;
|
|
25
31
|
authType?: "none" | "token" | "bearer" | "basic" | "oauth" | "apiKey" | "cookie" | "session" | undefined;
|
|
32
|
+
defaultQueryParams?: Record<string, string> | undefined;
|
|
26
33
|
baseUrl?: string | undefined;
|
|
27
34
|
skipTLSVerify?: boolean | undefined;
|
|
28
35
|
}, {
|
|
@@ -30,12 +37,14 @@ export declare const serviceSchema: z.ZodObject<{
|
|
|
30
37
|
authScheme?: string | undefined;
|
|
31
38
|
schemaPath?: string | undefined;
|
|
32
39
|
authType?: "none" | "token" | "bearer" | "basic" | "oauth" | "apiKey" | "cookie" | "session" | undefined;
|
|
40
|
+
defaultQueryParams?: Record<string, string> | undefined;
|
|
33
41
|
baseUrl?: string | undefined;
|
|
34
42
|
skipTLSVerify?: boolean | undefined;
|
|
35
43
|
}>>;
|
|
36
44
|
runtimeDetails: z.ZodOptional<z.ZodObject<{
|
|
37
45
|
serverStartCommand: z.ZodOptional<z.ZodString>;
|
|
38
|
-
|
|
46
|
+
serverStopCommand: z.ZodOptional<z.ZodString>;
|
|
47
|
+
runtime: z.ZodEffects<z.ZodNativeEnum<typeof import("../types/TestTypes.js").RuntimeEnvironment>, import("../types/TestTypes.js").RuntimeEnvironment, unknown>;
|
|
39
48
|
dockerNetwork: z.ZodOptional<z.ZodString>;
|
|
40
49
|
k8sNamespace: z.ZodOptional<z.ZodString>;
|
|
41
50
|
k8sContext: z.ZodOptional<z.ZodString>;
|
|
@@ -43,41 +52,54 @@ export declare const serviceSchema: z.ZodObject<{
|
|
|
43
52
|
framework: z.ZodOptional<z.ZodEnum<["playwright", "pytest", "robot", "junit", "vitest", "jest", "mocha", "go", "rspec", "jasmine"]>>;
|
|
44
53
|
testRunCommand: z.ZodString;
|
|
45
54
|
testEnv: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
46
|
-
|
|
55
|
+
pathGlobs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
56
|
+
canaryStatus: z.ZodOptional<z.ZodEnum<["proven", "unproven"]>>;
|
|
57
|
+
/** Why it could not be proven — required by the prompt when unproven. */
|
|
58
|
+
canaryDetail: z.ZodOptional<z.ZodString>;
|
|
47
59
|
}, "strict", z.ZodTypeAny, {
|
|
48
60
|
testRunCommand: string;
|
|
49
61
|
framework?: "playwright" | "pytest" | "robot" | "junit" | "vitest" | "jest" | "mocha" | "go" | "rspec" | "jasmine" | undefined;
|
|
50
62
|
testEnv?: Record<string, string> | undefined;
|
|
51
|
-
|
|
63
|
+
pathGlobs?: string[] | undefined;
|
|
64
|
+
canaryStatus?: "proven" | "unproven" | undefined;
|
|
65
|
+
canaryDetail?: string | undefined;
|
|
52
66
|
}, {
|
|
53
67
|
testRunCommand: string;
|
|
54
68
|
framework?: "playwright" | "pytest" | "robot" | "junit" | "vitest" | "jest" | "mocha" | "go" | "rspec" | "jasmine" | undefined;
|
|
55
69
|
testEnv?: Record<string, string> | undefined;
|
|
56
|
-
|
|
70
|
+
pathGlobs?: string[] | undefined;
|
|
71
|
+
canaryStatus?: "proven" | "unproven" | undefined;
|
|
72
|
+
canaryDetail?: string | undefined;
|
|
57
73
|
}>, "many">>;
|
|
58
74
|
}, "strict", z.ZodTypeAny, {
|
|
59
|
-
runtime: "
|
|
75
|
+
runtime: import("../types/TestTypes.js").RuntimeEnvironment;
|
|
60
76
|
dockerNetwork?: string | undefined;
|
|
61
77
|
k8sNamespace?: string | undefined;
|
|
62
78
|
k8sContext?: string | undefined;
|
|
63
79
|
serverStartCommand?: string | undefined;
|
|
80
|
+
serverStopCommand?: string | undefined;
|
|
64
81
|
testSuites?: {
|
|
65
82
|
testRunCommand: string;
|
|
66
83
|
framework?: "playwright" | "pytest" | "robot" | "junit" | "vitest" | "jest" | "mocha" | "go" | "rspec" | "jasmine" | undefined;
|
|
67
84
|
testEnv?: Record<string, string> | undefined;
|
|
68
|
-
|
|
85
|
+
pathGlobs?: string[] | undefined;
|
|
86
|
+
canaryStatus?: "proven" | "unproven" | undefined;
|
|
87
|
+
canaryDetail?: string | undefined;
|
|
69
88
|
}[] | undefined;
|
|
70
89
|
}, {
|
|
71
|
-
runtime
|
|
90
|
+
runtime?: unknown;
|
|
72
91
|
dockerNetwork?: string | undefined;
|
|
73
92
|
k8sNamespace?: string | undefined;
|
|
74
93
|
k8sContext?: string | undefined;
|
|
75
94
|
serverStartCommand?: string | undefined;
|
|
95
|
+
serverStopCommand?: string | undefined;
|
|
76
96
|
testSuites?: {
|
|
77
97
|
testRunCommand: string;
|
|
78
98
|
framework?: "playwright" | "pytest" | "robot" | "junit" | "vitest" | "jest" | "mocha" | "go" | "rspec" | "jasmine" | undefined;
|
|
79
99
|
testEnv?: Record<string, string> | undefined;
|
|
80
|
-
|
|
100
|
+
pathGlobs?: string[] | undefined;
|
|
101
|
+
canaryStatus?: "proven" | "unproven" | undefined;
|
|
102
|
+
canaryDetail?: string | undefined;
|
|
81
103
|
}[] | undefined;
|
|
82
104
|
}>>;
|
|
83
105
|
}, "strict", z.ZodTypeAny, {
|
|
@@ -91,20 +113,24 @@ export declare const serviceSchema: z.ZodObject<{
|
|
|
91
113
|
authScheme?: string | undefined;
|
|
92
114
|
schemaPath?: string | undefined;
|
|
93
115
|
authType?: "none" | "token" | "bearer" | "basic" | "oauth" | "apiKey" | "cookie" | "session" | undefined;
|
|
116
|
+
defaultQueryParams?: Record<string, string> | undefined;
|
|
94
117
|
baseUrl?: string | undefined;
|
|
95
118
|
skipTLSVerify?: boolean | undefined;
|
|
96
119
|
} | undefined;
|
|
97
120
|
runtimeDetails?: {
|
|
98
|
-
runtime: "
|
|
121
|
+
runtime: import("../types/TestTypes.js").RuntimeEnvironment;
|
|
99
122
|
dockerNetwork?: string | undefined;
|
|
100
123
|
k8sNamespace?: string | undefined;
|
|
101
124
|
k8sContext?: string | undefined;
|
|
102
125
|
serverStartCommand?: string | undefined;
|
|
126
|
+
serverStopCommand?: string | undefined;
|
|
103
127
|
testSuites?: {
|
|
104
128
|
testRunCommand: string;
|
|
105
129
|
framework?: "playwright" | "pytest" | "robot" | "junit" | "vitest" | "jest" | "mocha" | "go" | "rspec" | "jasmine" | undefined;
|
|
106
130
|
testEnv?: Record<string, string> | undefined;
|
|
107
|
-
|
|
131
|
+
pathGlobs?: string[] | undefined;
|
|
132
|
+
canaryStatus?: "proven" | "unproven" | undefined;
|
|
133
|
+
canaryDetail?: string | undefined;
|
|
108
134
|
}[] | undefined;
|
|
109
135
|
} | undefined;
|
|
110
136
|
}, {
|
|
@@ -118,20 +144,24 @@ export declare const serviceSchema: z.ZodObject<{
|
|
|
118
144
|
authScheme?: string | undefined;
|
|
119
145
|
schemaPath?: string | undefined;
|
|
120
146
|
authType?: "none" | "token" | "bearer" | "basic" | "oauth" | "apiKey" | "cookie" | "session" | undefined;
|
|
147
|
+
defaultQueryParams?: Record<string, string> | undefined;
|
|
121
148
|
baseUrl?: string | undefined;
|
|
122
149
|
skipTLSVerify?: boolean | undefined;
|
|
123
150
|
} | undefined;
|
|
124
151
|
runtimeDetails?: {
|
|
125
|
-
runtime
|
|
152
|
+
runtime?: unknown;
|
|
126
153
|
dockerNetwork?: string | undefined;
|
|
127
154
|
k8sNamespace?: string | undefined;
|
|
128
155
|
k8sContext?: string | undefined;
|
|
129
156
|
serverStartCommand?: string | undefined;
|
|
157
|
+
serverStopCommand?: string | undefined;
|
|
130
158
|
testSuites?: {
|
|
131
159
|
testRunCommand: string;
|
|
132
160
|
framework?: "playwright" | "pytest" | "robot" | "junit" | "vitest" | "jest" | "mocha" | "go" | "rspec" | "jasmine" | undefined;
|
|
133
161
|
testEnv?: Record<string, string> | undefined;
|
|
134
|
-
|
|
162
|
+
pathGlobs?: string[] | undefined;
|
|
163
|
+
canaryStatus?: "proven" | "unproven" | undefined;
|
|
164
|
+
canaryDetail?: string | undefined;
|
|
135
165
|
}[] | undefined;
|
|
136
166
|
} | undefined;
|
|
137
167
|
}>;
|
|
@@ -176,6 +206,12 @@ export declare const workspaceConfigSchema: z.ZodObject<{
|
|
|
176
206
|
authType: z.ZodOptional<z.ZodEnum<["bearer", "basic", "oauth", "apiKey", "cookie", "session", "token", "none"]>>;
|
|
177
207
|
authHeader: z.ZodOptional<z.ZodString>;
|
|
178
208
|
authScheme: z.ZodOptional<z.ZodString>;
|
|
209
|
+
/** Query params always attached to every generated request for this
|
|
210
|
+
* service (e.g. RBAC context an authorization layer requires beyond
|
|
211
|
+
* the auth header). Literal values only — no env-var interpolation.
|
|
212
|
+
* Explicit per-request queryParams always win on a key collision
|
|
213
|
+
* (SKYR-4050). */
|
|
214
|
+
defaultQueryParams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
179
215
|
baseUrl: z.ZodOptional<z.ZodString>;
|
|
180
216
|
/** SUT serves self-signed TLS (e.g. a kind kube-apiserver) — generated
|
|
181
217
|
* tests should skip certificate verification for this service (SKYR-3961).
|
|
@@ -186,6 +222,7 @@ export declare const workspaceConfigSchema: z.ZodObject<{
|
|
|
186
222
|
authScheme?: string | undefined;
|
|
187
223
|
schemaPath?: string | undefined;
|
|
188
224
|
authType?: "none" | "token" | "bearer" | "basic" | "oauth" | "apiKey" | "cookie" | "session" | undefined;
|
|
225
|
+
defaultQueryParams?: Record<string, string> | undefined;
|
|
189
226
|
baseUrl?: string | undefined;
|
|
190
227
|
skipTLSVerify?: boolean | undefined;
|
|
191
228
|
}, {
|
|
@@ -193,12 +230,14 @@ export declare const workspaceConfigSchema: z.ZodObject<{
|
|
|
193
230
|
authScheme?: string | undefined;
|
|
194
231
|
schemaPath?: string | undefined;
|
|
195
232
|
authType?: "none" | "token" | "bearer" | "basic" | "oauth" | "apiKey" | "cookie" | "session" | undefined;
|
|
233
|
+
defaultQueryParams?: Record<string, string> | undefined;
|
|
196
234
|
baseUrl?: string | undefined;
|
|
197
235
|
skipTLSVerify?: boolean | undefined;
|
|
198
236
|
}>>;
|
|
199
237
|
runtimeDetails: z.ZodOptional<z.ZodObject<{
|
|
200
238
|
serverStartCommand: z.ZodOptional<z.ZodString>;
|
|
201
|
-
|
|
239
|
+
serverStopCommand: z.ZodOptional<z.ZodString>;
|
|
240
|
+
runtime: z.ZodEffects<z.ZodNativeEnum<typeof import("../types/TestTypes.js").RuntimeEnvironment>, import("../types/TestTypes.js").RuntimeEnvironment, unknown>;
|
|
202
241
|
dockerNetwork: z.ZodOptional<z.ZodString>;
|
|
203
242
|
k8sNamespace: z.ZodOptional<z.ZodString>;
|
|
204
243
|
k8sContext: z.ZodOptional<z.ZodString>;
|
|
@@ -206,41 +245,54 @@ export declare const workspaceConfigSchema: z.ZodObject<{
|
|
|
206
245
|
framework: z.ZodOptional<z.ZodEnum<["playwright", "pytest", "robot", "junit", "vitest", "jest", "mocha", "go", "rspec", "jasmine"]>>;
|
|
207
246
|
testRunCommand: z.ZodString;
|
|
208
247
|
testEnv: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
209
|
-
|
|
248
|
+
pathGlobs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
249
|
+
canaryStatus: z.ZodOptional<z.ZodEnum<["proven", "unproven"]>>;
|
|
250
|
+
/** Why it could not be proven — required by the prompt when unproven. */
|
|
251
|
+
canaryDetail: z.ZodOptional<z.ZodString>;
|
|
210
252
|
}, "strict", z.ZodTypeAny, {
|
|
211
253
|
testRunCommand: string;
|
|
212
254
|
framework?: "playwright" | "pytest" | "robot" | "junit" | "vitest" | "jest" | "mocha" | "go" | "rspec" | "jasmine" | undefined;
|
|
213
255
|
testEnv?: Record<string, string> | undefined;
|
|
214
|
-
|
|
256
|
+
pathGlobs?: string[] | undefined;
|
|
257
|
+
canaryStatus?: "proven" | "unproven" | undefined;
|
|
258
|
+
canaryDetail?: string | undefined;
|
|
215
259
|
}, {
|
|
216
260
|
testRunCommand: string;
|
|
217
261
|
framework?: "playwright" | "pytest" | "robot" | "junit" | "vitest" | "jest" | "mocha" | "go" | "rspec" | "jasmine" | undefined;
|
|
218
262
|
testEnv?: Record<string, string> | undefined;
|
|
219
|
-
|
|
263
|
+
pathGlobs?: string[] | undefined;
|
|
264
|
+
canaryStatus?: "proven" | "unproven" | undefined;
|
|
265
|
+
canaryDetail?: string | undefined;
|
|
220
266
|
}>, "many">>;
|
|
221
267
|
}, "strict", z.ZodTypeAny, {
|
|
222
|
-
runtime: "
|
|
268
|
+
runtime: import("../types/TestTypes.js").RuntimeEnvironment;
|
|
223
269
|
dockerNetwork?: string | undefined;
|
|
224
270
|
k8sNamespace?: string | undefined;
|
|
225
271
|
k8sContext?: string | undefined;
|
|
226
272
|
serverStartCommand?: string | undefined;
|
|
273
|
+
serverStopCommand?: string | undefined;
|
|
227
274
|
testSuites?: {
|
|
228
275
|
testRunCommand: string;
|
|
229
276
|
framework?: "playwright" | "pytest" | "robot" | "junit" | "vitest" | "jest" | "mocha" | "go" | "rspec" | "jasmine" | undefined;
|
|
230
277
|
testEnv?: Record<string, string> | undefined;
|
|
231
|
-
|
|
278
|
+
pathGlobs?: string[] | undefined;
|
|
279
|
+
canaryStatus?: "proven" | "unproven" | undefined;
|
|
280
|
+
canaryDetail?: string | undefined;
|
|
232
281
|
}[] | undefined;
|
|
233
282
|
}, {
|
|
234
|
-
runtime
|
|
283
|
+
runtime?: unknown;
|
|
235
284
|
dockerNetwork?: string | undefined;
|
|
236
285
|
k8sNamespace?: string | undefined;
|
|
237
286
|
k8sContext?: string | undefined;
|
|
238
287
|
serverStartCommand?: string | undefined;
|
|
288
|
+
serverStopCommand?: string | undefined;
|
|
239
289
|
testSuites?: {
|
|
240
290
|
testRunCommand: string;
|
|
241
291
|
framework?: "playwright" | "pytest" | "robot" | "junit" | "vitest" | "jest" | "mocha" | "go" | "rspec" | "jasmine" | undefined;
|
|
242
292
|
testEnv?: Record<string, string> | undefined;
|
|
243
|
-
|
|
293
|
+
pathGlobs?: string[] | undefined;
|
|
294
|
+
canaryStatus?: "proven" | "unproven" | undefined;
|
|
295
|
+
canaryDetail?: string | undefined;
|
|
244
296
|
}[] | undefined;
|
|
245
297
|
}>>;
|
|
246
298
|
}, "strict", z.ZodTypeAny, {
|
|
@@ -254,20 +306,24 @@ export declare const workspaceConfigSchema: z.ZodObject<{
|
|
|
254
306
|
authScheme?: string | undefined;
|
|
255
307
|
schemaPath?: string | undefined;
|
|
256
308
|
authType?: "none" | "token" | "bearer" | "basic" | "oauth" | "apiKey" | "cookie" | "session" | undefined;
|
|
309
|
+
defaultQueryParams?: Record<string, string> | undefined;
|
|
257
310
|
baseUrl?: string | undefined;
|
|
258
311
|
skipTLSVerify?: boolean | undefined;
|
|
259
312
|
} | undefined;
|
|
260
313
|
runtimeDetails?: {
|
|
261
|
-
runtime: "
|
|
314
|
+
runtime: import("../types/TestTypes.js").RuntimeEnvironment;
|
|
262
315
|
dockerNetwork?: string | undefined;
|
|
263
316
|
k8sNamespace?: string | undefined;
|
|
264
317
|
k8sContext?: string | undefined;
|
|
265
318
|
serverStartCommand?: string | undefined;
|
|
319
|
+
serverStopCommand?: string | undefined;
|
|
266
320
|
testSuites?: {
|
|
267
321
|
testRunCommand: string;
|
|
268
322
|
framework?: "playwright" | "pytest" | "robot" | "junit" | "vitest" | "jest" | "mocha" | "go" | "rspec" | "jasmine" | undefined;
|
|
269
323
|
testEnv?: Record<string, string> | undefined;
|
|
270
|
-
|
|
324
|
+
pathGlobs?: string[] | undefined;
|
|
325
|
+
canaryStatus?: "proven" | "unproven" | undefined;
|
|
326
|
+
canaryDetail?: string | undefined;
|
|
271
327
|
}[] | undefined;
|
|
272
328
|
} | undefined;
|
|
273
329
|
}, {
|
|
@@ -281,20 +337,24 @@ export declare const workspaceConfigSchema: z.ZodObject<{
|
|
|
281
337
|
authScheme?: string | undefined;
|
|
282
338
|
schemaPath?: string | undefined;
|
|
283
339
|
authType?: "none" | "token" | "bearer" | "basic" | "oauth" | "apiKey" | "cookie" | "session" | undefined;
|
|
340
|
+
defaultQueryParams?: Record<string, string> | undefined;
|
|
284
341
|
baseUrl?: string | undefined;
|
|
285
342
|
skipTLSVerify?: boolean | undefined;
|
|
286
343
|
} | undefined;
|
|
287
344
|
runtimeDetails?: {
|
|
288
|
-
runtime
|
|
345
|
+
runtime?: unknown;
|
|
289
346
|
dockerNetwork?: string | undefined;
|
|
290
347
|
k8sNamespace?: string | undefined;
|
|
291
348
|
k8sContext?: string | undefined;
|
|
292
349
|
serverStartCommand?: string | undefined;
|
|
350
|
+
serverStopCommand?: string | undefined;
|
|
293
351
|
testSuites?: {
|
|
294
352
|
testRunCommand: string;
|
|
295
353
|
framework?: "playwright" | "pytest" | "robot" | "junit" | "vitest" | "jest" | "mocha" | "go" | "rspec" | "jasmine" | undefined;
|
|
296
354
|
testEnv?: Record<string, string> | undefined;
|
|
297
|
-
|
|
355
|
+
pathGlobs?: string[] | undefined;
|
|
356
|
+
canaryStatus?: "proven" | "unproven" | undefined;
|
|
357
|
+
canaryDetail?: string | undefined;
|
|
298
358
|
}[] | undefined;
|
|
299
359
|
} | undefined;
|
|
300
360
|
}>, "many">>;
|
|
@@ -321,20 +381,24 @@ export declare const workspaceConfigSchema: z.ZodObject<{
|
|
|
321
381
|
authScheme?: string | undefined;
|
|
322
382
|
schemaPath?: string | undefined;
|
|
323
383
|
authType?: "none" | "token" | "bearer" | "basic" | "oauth" | "apiKey" | "cookie" | "session" | undefined;
|
|
384
|
+
defaultQueryParams?: Record<string, string> | undefined;
|
|
324
385
|
baseUrl?: string | undefined;
|
|
325
386
|
skipTLSVerify?: boolean | undefined;
|
|
326
387
|
} | undefined;
|
|
327
388
|
runtimeDetails?: {
|
|
328
|
-
runtime: "
|
|
389
|
+
runtime: import("../types/TestTypes.js").RuntimeEnvironment;
|
|
329
390
|
dockerNetwork?: string | undefined;
|
|
330
391
|
k8sNamespace?: string | undefined;
|
|
331
392
|
k8sContext?: string | undefined;
|
|
332
393
|
serverStartCommand?: string | undefined;
|
|
394
|
+
serverStopCommand?: string | undefined;
|
|
333
395
|
testSuites?: {
|
|
334
396
|
testRunCommand: string;
|
|
335
397
|
framework?: "playwright" | "pytest" | "robot" | "junit" | "vitest" | "jest" | "mocha" | "go" | "rspec" | "jasmine" | undefined;
|
|
336
398
|
testEnv?: Record<string, string> | undefined;
|
|
337
|
-
|
|
399
|
+
pathGlobs?: string[] | undefined;
|
|
400
|
+
canaryStatus?: "proven" | "unproven" | undefined;
|
|
401
|
+
canaryDetail?: string | undefined;
|
|
338
402
|
}[] | undefined;
|
|
339
403
|
} | undefined;
|
|
340
404
|
}[] | undefined;
|
|
@@ -361,20 +425,24 @@ export declare const workspaceConfigSchema: z.ZodObject<{
|
|
|
361
425
|
authScheme?: string | undefined;
|
|
362
426
|
schemaPath?: string | undefined;
|
|
363
427
|
authType?: "none" | "token" | "bearer" | "basic" | "oauth" | "apiKey" | "cookie" | "session" | undefined;
|
|
428
|
+
defaultQueryParams?: Record<string, string> | undefined;
|
|
364
429
|
baseUrl?: string | undefined;
|
|
365
430
|
skipTLSVerify?: boolean | undefined;
|
|
366
431
|
} | undefined;
|
|
367
432
|
runtimeDetails?: {
|
|
368
|
-
runtime
|
|
433
|
+
runtime?: unknown;
|
|
369
434
|
dockerNetwork?: string | undefined;
|
|
370
435
|
k8sNamespace?: string | undefined;
|
|
371
436
|
k8sContext?: string | undefined;
|
|
372
437
|
serverStartCommand?: string | undefined;
|
|
438
|
+
serverStopCommand?: string | undefined;
|
|
373
439
|
testSuites?: {
|
|
374
440
|
testRunCommand: string;
|
|
375
441
|
framework?: "playwright" | "pytest" | "robot" | "junit" | "vitest" | "jest" | "mocha" | "go" | "rspec" | "jasmine" | undefined;
|
|
376
442
|
testEnv?: Record<string, string> | undefined;
|
|
377
|
-
|
|
443
|
+
pathGlobs?: string[] | undefined;
|
|
444
|
+
canaryStatus?: "proven" | "unproven" | undefined;
|
|
445
|
+
canaryDetail?: string | undefined;
|
|
378
446
|
}[] | undefined;
|
|
379
447
|
} | undefined;
|
|
380
448
|
}[] | undefined;
|
|
@@ -410,20 +478,24 @@ export declare function validateWorkspaceConfig(config: unknown): z.SafeParseRet
|
|
|
410
478
|
authScheme?: string | undefined;
|
|
411
479
|
schemaPath?: string | undefined;
|
|
412
480
|
authType?: "none" | "token" | "bearer" | "basic" | "oauth" | "apiKey" | "cookie" | "session" | undefined;
|
|
481
|
+
defaultQueryParams?: Record<string, string> | undefined;
|
|
413
482
|
baseUrl?: string | undefined;
|
|
414
483
|
skipTLSVerify?: boolean | undefined;
|
|
415
484
|
} | undefined;
|
|
416
485
|
runtimeDetails?: {
|
|
417
|
-
runtime
|
|
486
|
+
runtime?: unknown;
|
|
418
487
|
dockerNetwork?: string | undefined;
|
|
419
488
|
k8sNamespace?: string | undefined;
|
|
420
489
|
k8sContext?: string | undefined;
|
|
421
490
|
serverStartCommand?: string | undefined;
|
|
491
|
+
serverStopCommand?: string | undefined;
|
|
422
492
|
testSuites?: {
|
|
423
493
|
testRunCommand: string;
|
|
424
494
|
framework?: "playwright" | "pytest" | "robot" | "junit" | "vitest" | "jest" | "mocha" | "go" | "rspec" | "jasmine" | undefined;
|
|
425
495
|
testEnv?: Record<string, string> | undefined;
|
|
426
|
-
|
|
496
|
+
pathGlobs?: string[] | undefined;
|
|
497
|
+
canaryStatus?: "proven" | "unproven" | undefined;
|
|
498
|
+
canaryDetail?: string | undefined;
|
|
427
499
|
}[] | undefined;
|
|
428
500
|
} | undefined;
|
|
429
501
|
}[] | undefined;
|
|
@@ -450,20 +522,24 @@ export declare function validateWorkspaceConfig(config: unknown): z.SafeParseRet
|
|
|
450
522
|
authScheme?: string | undefined;
|
|
451
523
|
schemaPath?: string | undefined;
|
|
452
524
|
authType?: "none" | "token" | "bearer" | "basic" | "oauth" | "apiKey" | "cookie" | "session" | undefined;
|
|
525
|
+
defaultQueryParams?: Record<string, string> | undefined;
|
|
453
526
|
baseUrl?: string | undefined;
|
|
454
527
|
skipTLSVerify?: boolean | undefined;
|
|
455
528
|
} | undefined;
|
|
456
529
|
runtimeDetails?: {
|
|
457
|
-
runtime: "
|
|
530
|
+
runtime: import("../types/TestTypes.js").RuntimeEnvironment;
|
|
458
531
|
dockerNetwork?: string | undefined;
|
|
459
532
|
k8sNamespace?: string | undefined;
|
|
460
533
|
k8sContext?: string | undefined;
|
|
461
534
|
serverStartCommand?: string | undefined;
|
|
535
|
+
serverStopCommand?: string | undefined;
|
|
462
536
|
testSuites?: {
|
|
463
537
|
testRunCommand: string;
|
|
464
538
|
framework?: "playwright" | "pytest" | "robot" | "junit" | "vitest" | "jest" | "mocha" | "go" | "rspec" | "jasmine" | undefined;
|
|
465
539
|
testEnv?: Record<string, string> | undefined;
|
|
466
|
-
|
|
540
|
+
pathGlobs?: string[] | undefined;
|
|
541
|
+
canaryStatus?: "proven" | "unproven" | undefined;
|
|
542
|
+
canaryDetail?: string | undefined;
|
|
467
543
|
}[] | undefined;
|
|
468
544
|
} | undefined;
|
|
469
545
|
}[] | undefined;
|
|
@@ -15,6 +15,7 @@ import { promisify } from "util";
|
|
|
15
15
|
import yaml from "js-yaml";
|
|
16
16
|
import { z } from "zod";
|
|
17
17
|
import { SUPPORTED_FRAMEWORKS } from "./frameworks.js";
|
|
18
|
+
import { runtimeEnvironmentInputSchema } from "../types/TestTypes.js";
|
|
18
19
|
const execFileAsync = promisify(execFile);
|
|
19
20
|
// ---------------------------------------------------------------------------
|
|
20
21
|
// Constants
|
|
@@ -54,6 +55,12 @@ export const serviceSchema = z
|
|
|
54
55
|
.optional(),
|
|
55
56
|
authHeader: z.string().optional(),
|
|
56
57
|
authScheme: z.string().optional(),
|
|
58
|
+
/** Query params always attached to every generated request for this
|
|
59
|
+
* service (e.g. RBAC context an authorization layer requires beyond
|
|
60
|
+
* the auth header). Literal values only — no env-var interpolation.
|
|
61
|
+
* Explicit per-request queryParams always win on a key collision
|
|
62
|
+
* (SKYR-4050). */
|
|
63
|
+
defaultQueryParams: z.record(z.string()).optional(),
|
|
57
64
|
baseUrl: z.string().optional(),
|
|
58
65
|
/** SUT serves self-signed TLS (e.g. a kind kube-apiserver) — generated
|
|
59
66
|
* tests should skip certificate verification for this service (SKYR-3961).
|
|
@@ -66,7 +73,8 @@ export const serviceSchema = z
|
|
|
66
73
|
.object({
|
|
67
74
|
// existing comms axis — how the runner reaches the app
|
|
68
75
|
serverStartCommand: z.string().optional(),
|
|
69
|
-
|
|
76
|
+
serverStopCommand: z.string().optional(),
|
|
77
|
+
runtime: runtimeEnvironmentInputSchema,
|
|
70
78
|
dockerNetwork: z.string().optional(),
|
|
71
79
|
k8sNamespace: z.string().optional(),
|
|
72
80
|
k8sContext: z.string().optional(),
|
|
@@ -75,15 +83,35 @@ export const serviceSchema = z
|
|
|
75
83
|
// (there is no flat single-suite form). Written by the SUT adapt_workflow
|
|
76
84
|
// bootstrap (skyramp_testbot_sut), read at run time by
|
|
77
85
|
// skyramp_run_existing_tests. Each suite carries its own framework
|
|
78
|
-
// (falling back to the service's), testRunCommand,
|
|
79
|
-
//
|
|
86
|
+
// (falling back to the service's), testRunCommand, testEnv, and pathGlobs
|
|
87
|
+
// — the repo-relative paths that suite owns, used to route a selector to
|
|
88
|
+
// the one suite that can run it. One service can host multiple frameworks.
|
|
80
89
|
testSuites: z
|
|
81
90
|
.array(z
|
|
82
91
|
.object({
|
|
83
92
|
framework: z.enum(SUPPORTED_FRAMEWORKS).optional(),
|
|
84
93
|
testRunCommand: z.string().min(1),
|
|
85
94
|
testEnv: z.record(z.string(), z.string()).optional(),
|
|
86
|
-
|
|
95
|
+
pathGlobs: z.array(z.string()).optional(),
|
|
96
|
+
// Did SUT setup actually run one test from this suite?
|
|
97
|
+
//
|
|
98
|
+
// "Is the environment proven" and "should maintenance work on this
|
|
99
|
+
// suite" are independent, and collapsing them costs one way or the
|
|
100
|
+
// other. The prompt used to make recording free, so a suite could
|
|
101
|
+
// read as covered while never having executed. Requiring proof
|
|
102
|
+
// instead would drop exactly the suite a user most wants
|
|
103
|
+
// maintained: a self-provisioning e2e suite whose substrate the
|
|
104
|
+
// setup cannot stand up. Run 30402703836 shows why that trade is
|
|
105
|
+
// bad — with its Playwright environment dead, static analysis
|
|
106
|
+
// still found the stale POM testid and fixed it correctly.
|
|
107
|
+
//
|
|
108
|
+
// So an unproven suite STAYS and is still maintained; this records
|
|
109
|
+
// that its environment was never validated, and canaryDetail says
|
|
110
|
+
// what it needs. Absent means unproven (older artifacts predate
|
|
111
|
+
// this field), which is the safe reading.
|
|
112
|
+
canaryStatus: z.enum(["proven", "unproven"]).optional(),
|
|
113
|
+
/** Why it could not be proven — required by the prompt when unproven. */
|
|
114
|
+
canaryDetail: z.string().optional(),
|
|
87
115
|
})
|
|
88
116
|
.strict())
|
|
89
117
|
.optional(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skyramp/mcp",
|
|
3
|
-
"version": "0.3.2
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"main": "build/index.js",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./build/index.js",
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
"pretty": "npx prettier --write .",
|
|
34
34
|
"lint": "eslint src --ext .ts",
|
|
35
35
|
"lint:fix": "eslint src --ext .ts --fix",
|
|
36
|
+
"typecheck": "tsc --noEmit -p tsconfig.typecheck.json",
|
|
36
37
|
"test": "node --experimental-vm-modules node_modules/.bin/jest"
|
|
37
38
|
},
|
|
38
39
|
"files": [
|
|
@@ -67,10 +68,11 @@
|
|
|
67
68
|
"dependencies": {
|
|
68
69
|
"@modelcontextprotocol/sdk": "^1.24.3",
|
|
69
70
|
"@playwright/test": "^1.55.0",
|
|
70
|
-
"@skyramp/skyramp": "1.3.
|
|
71
|
+
"@skyramp/skyramp": "1.3.37",
|
|
71
72
|
"dockerode": "^5.0.0",
|
|
72
73
|
"fast-glob": "^3.3.3",
|
|
73
74
|
"js-yaml": "^4.1.1",
|
|
75
|
+
"picomatch": "^4.0.5",
|
|
74
76
|
"playwright": "file:vendor/skyramp-playwright-1.58.2-skyramp.8.14.3.tgz",
|
|
75
77
|
"simple-git": "^3.30.0",
|
|
76
78
|
"typescript": "^5.8.3",
|
|
@@ -82,6 +84,7 @@
|
|
|
82
84
|
"@types/js-yaml": "^4.0.9",
|
|
83
85
|
"@types/mocha": "^10.0.10",
|
|
84
86
|
"@types/node": "^22.15.19",
|
|
87
|
+
"@types/picomatch": "^4.0.3",
|
|
85
88
|
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
86
89
|
"@typescript-eslint/parser": "^8.0.0",
|
|
87
90
|
"eslint": "^9.0.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import path from "path";
|
|
2
|
-
import { fileURLToPath } from "url";
|
|
3
|
-
import { readFileSync } from "fs";
|
|
4
|
-
import { parseJestJson, buildJestArgs, buildVitestArgs } from "./jestAdapter.js";
|
|
5
|
-
const here = path.dirname(fileURLToPath(import.meta.url));
|
|
6
|
-
function loadFixture(name) {
|
|
7
|
-
return JSON.parse(readFileSync(path.join(here, "__fixtures__", `${name}.json`), "utf8"));
|
|
8
|
-
}
|
|
9
|
-
describe("parseJestJson", () => {
|
|
10
|
-
describe("jest healthy variety report", () => {
|
|
11
|
-
const parsed = parseJestJson(loadFixture("jest-healthy"));
|
|
12
|
-
const byId = (s) => parsed.results.find((r) => r.testId.includes(s));
|
|
13
|
-
it("keeps the environment healthy (a broken test file is PR signal, not env)", () => {
|
|
14
|
-
expect(parsed.environmentHealthy).toBe(true);
|
|
15
|
-
});
|
|
16
|
-
it("maps passed/failed/todo and a file testExecError to pass/fail/skipped/error", () => {
|
|
17
|
-
expect(byId("adds numbers").status).toBe("pass");
|
|
18
|
-
expect(byId("detects a regression").status).toBe("fail");
|
|
19
|
-
expect(byId("todo later").status).toBe("skipped");
|
|
20
|
-
expect(byId("broken.test.js").status).toBe("error");
|
|
21
|
-
});
|
|
22
|
-
it("builds a testId from file + ancestorTitles + title", () => {
|
|
23
|
-
expect(byId("adds numbers").testId).toBe("/repo/src/math.test.js › math › adds numbers");
|
|
24
|
-
expect(byId("adds numbers").file).toBe("/repo/src/math.test.js");
|
|
25
|
-
});
|
|
26
|
-
it("captures a failure message for fail and file-exec error", () => {
|
|
27
|
-
expect(byId("detects a regression").message).toMatch(/Expected: 2/);
|
|
28
|
-
expect(byId("broken.test.js").message).toMatch(/SyntaxError/);
|
|
29
|
-
});
|
|
30
|
-
it("summarizes ran/failed/errored/skipped (skipped not in ran)", () => {
|
|
31
|
-
expect(parsed.summary).toMatchObject({ failed: 1, errored: 1, skipped: 1 });
|
|
32
|
-
expect(parsed.summary.ran).toBe(3);
|
|
33
|
-
});
|
|
34
|
-
});
|
|
35
|
-
describe("real jest syntax-error shape (no testExecError, top-level message)", () => {
|
|
36
|
-
// Confirmed against a REAL jest run (Step 7 smoke): a syntax error produces
|
|
37
|
-
// `status: "failed"`, `assertionResults: []`, and a top-level `message` —
|
|
38
|
-
// no `testExecError` object at all. Must map to "error" same as the
|
|
39
|
-
// testExecError shape.
|
|
40
|
-
const parsed = parseJestJson({
|
|
41
|
-
testResults: [
|
|
42
|
-
{
|
|
43
|
-
name: "/repo/src/broken2.test.js",
|
|
44
|
-
status: "failed",
|
|
45
|
-
message: "SyntaxError: Unexpected token, expected \",\"",
|
|
46
|
-
assertionResults: [],
|
|
47
|
-
},
|
|
48
|
-
],
|
|
49
|
-
});
|
|
50
|
-
it("maps a message-only file failure to a single error result", () => {
|
|
51
|
-
expect(parsed.results).toHaveLength(1);
|
|
52
|
-
expect(parsed.results[0].status).toBe("error");
|
|
53
|
-
expect(parsed.results[0].message).toMatch(/SyntaxError/);
|
|
54
|
-
expect(parsed.summary).toMatchObject({ errored: 1, failed: 0, skipped: 0 });
|
|
55
|
-
});
|
|
56
|
-
});
|
|
57
|
-
describe("vitest report through the shared reader", () => {
|
|
58
|
-
const parsed = parseJestJson(loadFixture("vitest-healthy"));
|
|
59
|
-
it("parses vitest's jest-compatible json identically", () => {
|
|
60
|
-
expect(parsed.summary).toMatchObject({ failed: 0, errored: 0, skipped: 1 });
|
|
61
|
-
expect(parsed.summary.ran).toBe(1);
|
|
62
|
-
expect(parsed.results.find((r) => r.testId.includes("works")).status).toBe("pass");
|
|
63
|
-
});
|
|
64
|
-
});
|
|
65
|
-
it("honors an explicit truncated flag", () => {
|
|
66
|
-
expect(parseJestJson(loadFixture("jest-healthy"), { truncated: true }).summary.truncated).toBe(true);
|
|
67
|
-
});
|
|
68
|
-
});
|
|
69
|
-
describe("buildJestArgs", () => {
|
|
70
|
-
it("forces --json + --outputFile and passes files", () => {
|
|
71
|
-
const args = buildJestArgs({ selectors: ["src/a.test.js"], mode: "confirm", reportPath: "/tmp/r.json" });
|
|
72
|
-
expect(args).toContain("--json");
|
|
73
|
-
expect(args).toContain("--outputFile=/tmp/r.json");
|
|
74
|
-
expect(args).toContain("src/a.test.js");
|
|
75
|
-
expect(args).not.toContain("--bail=1");
|
|
76
|
-
});
|
|
77
|
-
it("bails at first failure in probe mode and filters by name via -t", () => {
|
|
78
|
-
const args = buildJestArgs({ selectors: ["src/a.test.js::renders header"], mode: "probe", reportPath: "/tmp/r.json" });
|
|
79
|
-
expect(args).toContain("--bail=1");
|
|
80
|
-
const ti = args.indexOf("-t");
|
|
81
|
-
expect(ti).toBeGreaterThanOrEqual(0);
|
|
82
|
-
expect(args[ti + 1]).toContain("renders header");
|
|
83
|
-
expect(args).toContain("src/a.test.js");
|
|
84
|
-
});
|
|
85
|
-
});
|
|
86
|
-
describe("buildVitestArgs", () => {
|
|
87
|
-
it("forces --reporter=json + --outputFile (vitest form)", () => {
|
|
88
|
-
const args = buildVitestArgs({ selectors: ["src/a.test.ts"], mode: "confirm", reportPath: "/tmp/r.json" });
|
|
89
|
-
expect(args).toContain("--reporter=json");
|
|
90
|
-
expect(args).toContain("--outputFile=/tmp/r.json");
|
|
91
|
-
expect(args).not.toContain("--json");
|
|
92
|
-
});
|
|
93
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|