@skyramp/mcp 0.2.6 → 0.2.8-rc.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 +12 -0
- package/build/commands/recommendTestsAndExecuteCommand.d.ts +2 -0
- package/build/commands/testThisEndpointCommand.d.ts +2 -0
- package/build/index.d.ts +2 -0
- package/build/index.js +6 -4
- package/build/playwright/PlaywrightTraceService.d.ts +32 -0
- package/build/playwright/index.d.ts +3 -0
- package/build/playwright/registerPlaywrightTools.d.ts +8 -0
- package/build/playwright/registerPlaywrightTools.js +12 -11
- package/build/playwright/traceRecordingPrompt.d.ts +13 -0
- package/build/playwright/traceRecordingPrompt.js +3 -11
- package/build/prompts/code-reuse.d.ts +1 -0
- package/build/prompts/enhance-assertions/contractProviderAssertionsPrompt.d.ts +2 -0
- package/build/prompts/enhance-assertions/integrationAssertionsPrompt.d.ts +2 -0
- package/build/prompts/enhance-assertions/sharedAssertionRules.d.ts +15 -0
- package/build/prompts/enhance-assertions/uiAssertionsPrompt.d.ts +2 -0
- package/build/prompts/enhance-assertions/uiAssertionsPrompt.js +24 -5
- package/build/prompts/fix-error-prompt.d.ts +1 -0
- package/build/prompts/initialize-workspace/initializeWorkspacePrompt.d.ts +1 -0
- package/build/prompts/modularization/integration-test-modularization.d.ts +1 -0
- package/build/prompts/modularization/ui-test-modularization.d.ts +1 -0
- package/build/prompts/personas.d.ts +21 -0
- package/build/prompts/pom-aware-code-reuse.d.ts +1 -0
- package/build/prompts/startTraceCollectionPrompts.d.ts +2 -0
- package/build/prompts/sut-setup/modes/adaptWorkflowPrompt.d.ts +2 -0
- package/build/prompts/sut-setup/modes/adaptWorkflowPrompt.js +114 -0
- package/build/prompts/sut-setup/modes/dockerComposePrompt.d.ts +2 -0
- package/build/prompts/sut-setup/modes/dockerComposePrompt.js +292 -0
- package/build/prompts/sut-setup/shared.d.ts +39 -0
- package/build/prompts/sut-setup/shared.js +132 -0
- package/build/prompts/test-maintenance/actionsInstructions.d.ts +35 -0
- package/build/prompts/test-maintenance/drift-analysis-prompt.d.ts +4 -0
- package/build/prompts/test-maintenance/driftAnalysisSections.d.ts +13 -0
- package/build/prompts/test-maintenance/driftAnalysisSections.js +9 -3
- package/build/prompts/test-recommendation/analysisOutputPrompt.d.ts +84 -0
- package/build/prompts/test-recommendation/analysisOutputPrompt.js +1 -1
- package/build/prompts/test-recommendation/analysisOutputPrompt.test.d.ts +1 -0
- package/build/prompts/test-recommendation/analysisOutputPrompt.test.js +1 -0
- package/build/prompts/test-recommendation/diffExecutionPlan.d.ts +17 -0
- package/build/prompts/test-recommendation/diffExecutionPlan.js +83 -18
- package/build/prompts/test-recommendation/fullRepoCatalog.d.ts +7 -0
- package/build/prompts/test-recommendation/mergeEnrichedScenarios.test.d.ts +1 -0
- package/build/prompts/test-recommendation/mergeEnrichedScenarios.test.js +1 -0
- package/build/prompts/test-recommendation/promptPlan.d.ts +203 -0
- package/build/prompts/test-recommendation/promptPlan.test.d.ts +1 -0
- package/build/prompts/test-recommendation/recommendationSections.d.ts +35 -0
- package/build/prompts/test-recommendation/recommendationShared.d.ts +31 -0
- package/build/prompts/test-recommendation/registerRecommendTestsPrompt.d.ts +7 -0
- package/build/prompts/test-recommendation/scopeAssessment.d.ts +55 -0
- package/build/prompts/test-recommendation/scopeAssessment.js +2 -2
- package/build/prompts/test-recommendation/scopeAssessment.test.d.ts +1 -0
- package/build/prompts/test-recommendation/scopeAssessment.test.js +1 -0
- package/build/prompts/test-recommendation/test-recommendation-prompt.d.ts +6 -0
- package/build/prompts/test-recommendation/test-recommendation-prompt.js +4 -4
- package/build/prompts/test-recommendation/test-recommendation-prompt.test.d.ts +1 -0
- package/build/prompts/test-recommendation/test-recommendation-prompt.test.js +97 -99
- package/build/prompts/testbot/testbot-prompts.d.ts +26 -0
- package/build/prompts/testbot/testbot-prompts.js +301 -46
- package/build/prompts/testbot/testbot-prompts.test.d.ts +1 -0
- package/build/prompts/testbot/testbot-prompts.test.js +109 -117
- package/build/resources/analysisResources.d.ts +17 -0
- package/build/resources/progressResource.d.ts +2 -0
- package/build/resources/sutSetupResource.d.ts +2 -0
- package/build/resources/sutSetupResource.js +45 -0
- package/build/resources/testbotResource.d.ts +2 -0
- package/build/resources/testbotResource.js +2 -2
- package/build/services/AnalyticsService.d.ts +13 -0
- package/build/services/AnalyticsService.test.d.ts +1 -0
- package/build/services/AnalyticsService.test.js +86 -0
- package/build/services/ModularizationService.d.ts +11 -0
- package/build/services/ScenarioGenerationService.d.ts +37 -0
- package/build/services/ScenarioGenerationService.integration.test.d.ts +1 -0
- package/build/services/ScenarioGenerationService.integration.test.js +4 -0
- package/build/services/ScenarioGenerationService.test.d.ts +1 -0
- package/build/services/TestDiscoveryService.d.ts +128 -0
- package/build/services/TestDiscoveryService.js +22 -12
- package/build/services/TestDiscoveryService.test.d.ts +1 -0
- package/build/services/TestDiscoveryService.test.js +4 -3
- package/build/services/TestExecutionService.d.ts +55 -0
- package/build/services/TestExecutionService.js +158 -26
- package/build/services/TestExecutionService.test.d.ts +1 -0
- package/build/services/TestExecutionService.test.js +339 -25
- package/build/services/TestGenerationService.d.ts +56 -0
- package/build/services/TestGenerationService.test.d.ts +1 -0
- package/build/services/TestGenerationService.test.js +10 -8
- package/build/services/containerEnv.d.ts +14 -0
- package/build/tool-phase-coverage.test.d.ts +1 -0
- package/build/tool-phase-coverage.test.js +2 -0
- package/build/tool-phases.d.ts +38 -0
- package/build/tools/auth/loginTool.d.ts +2 -0
- package/build/tools/auth/logoutTool.d.ts +2 -0
- package/build/tools/code-refactor/codeReuseTool.d.ts +2 -0
- package/build/tools/code-refactor/enhanceAssertionsTool.d.ts +2 -0
- package/build/tools/code-refactor/modularizationTool.d.ts +2 -0
- package/build/tools/executeSkyrampTestTool.d.ts +2 -0
- package/build/tools/executeSkyrampTestTool.js +26 -7
- package/build/tools/fixErrorTool.d.ts +2 -0
- package/build/tools/generate-tests/generateBatchScenarioRestTool.d.ts +45 -0
- package/build/tools/generate-tests/generateBatchScenarioRestTool.js +1 -1
- package/build/tools/generate-tests/generateBatchScenarioRestTool.test.d.ts +1 -0
- package/build/tools/generate-tests/generateBatchScenarioRestTool.test.js +11 -9
- package/build/tools/generate-tests/generateContractRestTool.d.ts +31 -0
- package/build/tools/generate-tests/generateE2ERestTool.d.ts +13 -0
- package/build/tools/generate-tests/generateFuzzRestTool.d.ts +10 -0
- package/build/tools/generate-tests/generateIntegrationRestTool.d.ts +16 -0
- package/build/tools/generate-tests/generateLoadRestTool.d.ts +18 -0
- package/build/tools/generate-tests/generateLoadRestTool.test.d.ts +1 -0
- package/build/tools/generate-tests/generateMockRestTool.d.ts +64 -0
- package/build/tools/generate-tests/generateSmokeRestTool.d.ts +8 -0
- package/build/tools/generate-tests/generateUIRestTool.d.ts +14 -0
- package/build/tools/generate-tests/generateUIRestTool.js +1 -1
- package/build/tools/generate-tests/loadTestSchema.d.ts +39 -0
- package/build/tools/one-click/oneClickTool.d.ts +11 -0
- package/build/tools/submitReportTool.d.ts +394 -0
- package/build/tools/submitReportTool.js +250 -41
- package/build/tools/submitReportTool.test.d.ts +1 -0
- package/build/tools/submitReportTool.test.js +511 -55
- package/build/tools/test-management/actionsTool.d.ts +10 -0
- package/build/tools/test-management/actionsTool.js +21 -7
- package/build/tools/test-management/analyzeChangesTool.d.ts +27 -0
- package/build/tools/test-management/analyzeChangesTool.js +150 -48
- package/build/tools/test-management/analyzeChangesTool.test.d.ts +1 -0
- package/build/tools/test-management/analyzeChangesTool.test.js +95 -78
- package/build/tools/test-management/analyzeTestHealthTool.d.ts +2 -0
- package/build/tools/test-management/analyzeTestHealthTool.js +16 -9
- package/build/tools/test-management/index.d.ts +3 -0
- package/build/tools/test-management/index.js +0 -1
- package/build/tools/trace/resolveSaveStoragePath.d.ts +7 -0
- package/build/tools/trace/resolveSaveStoragePath.test.d.ts +1 -0
- package/build/tools/trace/resolveSessionPaths.d.ts +40 -0
- package/build/tools/trace/resolveSessionPaths.test.d.ts +1 -0
- package/build/tools/trace/sessionState.d.ts +2 -0
- package/build/tools/trace/sessionState.test.d.ts +1 -0
- package/build/tools/trace/startTraceCollectionTool.d.ts +2 -0
- package/build/tools/trace/stopTraceCollectionTool.d.ts +2 -0
- package/build/tools/workspace/initScanWorkspaceTool.d.ts +4 -0
- package/build/tools/workspace/initializeWorkspaceTool.d.ts +2 -0
- package/build/tools/workspace/initializeWorkspaceTool.js +39 -22
- package/build/tools/workspace/initializeWorkspaceTool.test.d.ts +1 -0
- package/build/tools/workspace/initializeWorkspaceTool.test.js +134 -0
- package/build/tools/workspace/serviceUpsert.d.ts +12 -0
- package/build/tools/workspace/serviceUpsert.js +23 -0
- package/build/tools/workspace/serviceUpsert.test.d.ts +1 -0
- package/build/tools/workspace/serviceUpsert.test.js +50 -0
- package/build/types/OneClickCommands.d.ts +68 -0
- package/build/types/RepositoryAnalysis.d.ts +3004 -0
- package/build/types/TestAnalysis.d.ts +97 -0
- package/build/types/TestExecution.d.ts +63 -0
- package/build/types/TestExecution.js +11 -1
- package/build/types/TestRecommendation.d.ts +12 -0
- package/build/types/TestTypes.d.ts +234 -0
- package/build/types/TestbotReport.d.ts +68 -0
- package/build/types/TestbotReport.js +1 -0
- package/build/types/index.d.ts +4 -0
- package/build/types/index.js +3 -0
- package/build/utils/AnalysisStateManager.d.ts +242 -0
- package/build/utils/AnalysisStateManager.js +144 -3
- package/build/utils/AnalysisStateManager.test.d.ts +1 -0
- package/build/utils/AnalysisStateManager.test.js +98 -0
- package/build/utils/analyze-openapi.d.ts +1 -0
- package/build/utils/branchDiff.d.ts +18 -0
- package/build/utils/dartRouteExtractor.d.ts +45 -0
- package/build/utils/dartRouteExtractor.test.d.ts +1 -0
- package/build/utils/docker.d.ts +19 -0
- package/build/utils/docker.test.d.ts +1 -0
- package/build/utils/docker.test.js +10 -9
- package/build/utils/featureFlags.d.ts +37 -0
- package/build/utils/featureFlags.test.d.ts +1 -0
- package/build/utils/gitStaging.d.ts +24 -0
- package/build/utils/gitStaging.test.d.ts +1 -0
- package/build/utils/gitStaging.test.js +13 -7
- package/build/utils/httpDefaults.d.ts +10 -0
- package/build/utils/httpDefaults.test.d.ts +1 -0
- package/build/utils/initAgent.d.ts +36 -0
- package/build/utils/language-helper.d.ts +6 -0
- package/build/utils/logger.d.ts +11 -0
- package/build/utils/normalizeParams.d.ts +14 -0
- package/build/utils/normalizeSkyrampImports.d.ts +13 -0
- package/build/utils/pr-comment-parser.d.ts +31 -0
- package/build/utils/pr-comment-parser.test.d.ts +1 -0
- package/build/utils/pr-comment-parser.test.js +6 -5
- package/build/utils/projectMetadata.d.ts +15 -0
- package/build/utils/projectMetadata.test.d.ts +1 -0
- package/build/utils/proxy-terminal.d.ts +2 -0
- package/build/utils/repoScanner.d.ts +27 -0
- package/build/utils/repoScanner.test.d.ts +1 -0
- package/build/utils/routeParsers.d.ts +53 -0
- package/build/utils/routeParsers.js +31 -38
- package/build/utils/routeParsers.test.d.ts +1 -0
- package/build/utils/scenarioDrafting.d.ts +71 -0
- package/build/utils/scenarioDrafting.js +23 -1
- package/build/utils/scenarioDrafting.test.d.ts +1 -0
- package/build/utils/skyrampMdContent.d.ts +5 -0
- package/build/utils/sourceRouteExtractor.d.ts +48 -0
- package/build/utils/sourceRouteExtractor.test.d.ts +1 -0
- package/build/utils/telemetry.d.ts +32 -0
- package/build/utils/telemetry.test.d.ts +1 -0
- package/build/utils/trace-parser.d.ts +32 -0
- package/build/utils/trace-parser.test.d.ts +6 -0
- package/build/utils/uiPageEnumerator.d.ts +146 -0
- package/build/utils/uiPageEnumerator.js +58 -14
- package/build/utils/uiPageEnumerator.test.d.ts +1 -0
- package/build/utils/uiPageEnumerator.test.js +223 -43
- package/build/utils/utils.d.ts +45 -0
- package/build/utils/utils.js +10 -0
- package/build/utils/utils.test.d.ts +1 -0
- package/build/utils/versions.d.ts +3 -0
- package/build/utils/versions.js +1 -1
- package/build/utils/workspaceAuth.d.ts +127 -0
- package/build/utils/workspaceAuth.test.d.ts +1 -0
- package/build/utils/workspaceAuth.test.js +25 -25
- package/build/workspace/index.d.ts +1 -0
- package/build/workspace/workspace.d.ts +390 -0
- package/build/workspace/workspace.js +7 -7
- package/build/workspace/workspace.test.d.ts +1 -0
- package/build/workspace/workspace.test.js +6 -6
- package/node_modules/playwright/lib/mcp/skyramp/loadTraceTool.js +31 -13
- package/node_modules/playwright/lib/mcp/skyramp/traceRecordingBackend.js +88 -15
- package/node_modules/playwright/lib/mcp/test/skyRampExport.js +4 -3
- package/node_modules/playwright/node_modules/playwright-core/ThirdPartyNotices.txt +23 -126
- package/node_modules/playwright/node_modules/playwright-core/lib/generated/injectedScriptSource.js +1 -1
- package/node_modules/playwright/node_modules/playwright-core/lib/server/recorder/recorderApp.js +79 -19
- package/node_modules/playwright/node_modules/playwright-core/lib/server/recorder/skyramp/aliasRemapper.js +84 -0
- package/node_modules/playwright/node_modules/playwright-core/lib/server/recorder/skyramp/replayEngine.js +15 -4
- package/node_modules/playwright/node_modules/playwright-core/lib/vite/recorder/assets/{codeMirrorModule-CPZKmjFR.js → codeMirrorModule-D0BjbCb7.js} +1 -1
- package/node_modules/playwright/node_modules/playwright-core/lib/vite/recorder/assets/index-lvTRGFx-.js +193 -0
- package/node_modules/playwright/node_modules/playwright-core/lib/vite/recorder/index.html +1 -1
- package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/assets/{codeMirrorModule-B0JOjboO.js → codeMirrorModule-Cqp3cwEJ.js} +1 -1
- package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/assets/{defaultSettingsView-1anWeyDf.js → defaultSettingsView-CYf9adZh.js} +79 -79
- package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/{index.Cc5029a3.js → index.B_7ywgmr.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.html +2 -2
- package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/{uiMode.Wo5yvvVh.js → uiMode.u4_8VnCV.js} +1 -1
- 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/server/recorder/recorderApp.ts +129 -43
- package/node_modules/playwright/node_modules/playwright-core/src/server/recorder/skyramp/aliasRemapper.ts +119 -0
- package/node_modules/playwright/node_modules/playwright-core/src/server/recorder/skyramp/replayEngine.ts +33 -10
- package/node_modules/playwright/package.json +1 -1
- package/package.json +16 -4
- package/build/tools/test-management/uiAnalyzeChangesTool.js +0 -155
- package/build/tools/test-management/uiAnalyzeChangesTool.test.js +0 -147
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/.bin/node-which +0 -52
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/.bin/is-docker +0 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/.bin/mime +0 -46
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/.bin/yaml +0 -11
- package/node_modules/playwright/node_modules/playwright-core/lib/vite/recorder/assets/index-CsgPR2wy.js +0 -193
- package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/index.CP3Y8Zsb.js +0 -2
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { TestExecutionResult } from "./TestExecution.js";
|
|
2
|
+
export declare enum RecommendationPriority {
|
|
3
|
+
High = "high",
|
|
4
|
+
Medium = "medium",
|
|
5
|
+
Low = "low"
|
|
6
|
+
}
|
|
7
|
+
export declare enum IssueSeverity {
|
|
8
|
+
Low = "low",
|
|
9
|
+
Medium = "medium",
|
|
10
|
+
High = "high",
|
|
11
|
+
Critical = "critical"
|
|
12
|
+
}
|
|
13
|
+
export declare enum DriftChangeType {
|
|
14
|
+
EndpointAdded = "endpoint_added",
|
|
15
|
+
EndpointRemoved = "endpoint_removed",
|
|
16
|
+
EndpointRenamed = "endpoint_renamed",
|
|
17
|
+
EndpointModified = "endpoint_modified",
|
|
18
|
+
AuthenticationChanged = "authentication_changed",
|
|
19
|
+
SchemaChanges = "schema_changes",
|
|
20
|
+
RouteChanged = "route_changed",
|
|
21
|
+
RouteAdded = "route_added",
|
|
22
|
+
RouteRemoved = "route_removed",
|
|
23
|
+
UiComponentAdded = "ui_component_added",
|
|
24
|
+
UiComponentRemoved = "ui_component_removed",
|
|
25
|
+
UiComponentModified = "ui_component_modified",
|
|
26
|
+
UiComponentRestructured = "ui_component_restructured",
|
|
27
|
+
DependencyChanged = "dependency_changed",
|
|
28
|
+
FunctionChanged = "function_changed",
|
|
29
|
+
ClassChanged = "class_changed",
|
|
30
|
+
BreakingChange = "breaking_change",
|
|
31
|
+
CodeChange = "code_change"
|
|
32
|
+
}
|
|
33
|
+
export interface DriftChange {
|
|
34
|
+
type: DriftChangeType;
|
|
35
|
+
file: string;
|
|
36
|
+
description: string;
|
|
37
|
+
severity: IssueSeverity;
|
|
38
|
+
details?: string;
|
|
39
|
+
}
|
|
40
|
+
export interface AffectedFiles {
|
|
41
|
+
files: string[];
|
|
42
|
+
}
|
|
43
|
+
/** Origin of a test file — whether it was generated by Skyramp or is user/third-party maintained. */
|
|
44
|
+
export declare enum TestSource {
|
|
45
|
+
Skyramp = "skyramp",
|
|
46
|
+
External = "external"
|
|
47
|
+
}
|
|
48
|
+
/** Drift action assigned by the LLM health assessment for an existing test. */
|
|
49
|
+
export declare enum DriftAction {
|
|
50
|
+
Update = "UPDATE",
|
|
51
|
+
Regenerate = "REGENERATE",
|
|
52
|
+
Delete = "DELETE",
|
|
53
|
+
Verify = "VERIFY",
|
|
54
|
+
Ignore = "IGNORE"
|
|
55
|
+
}
|
|
56
|
+
/** Estimated effort to apply a drift UPDATE action. */
|
|
57
|
+
export declare enum EstimatedWork {
|
|
58
|
+
Small = "Small",
|
|
59
|
+
Medium = "Medium",
|
|
60
|
+
Large = "Large"
|
|
61
|
+
}
|
|
62
|
+
/** Normalized internal recommendation built from LLM-supplied args.recommendations. */
|
|
63
|
+
export interface DriftRecommendation {
|
|
64
|
+
testFile: string;
|
|
65
|
+
action: DriftAction;
|
|
66
|
+
priority: RecommendationPriority;
|
|
67
|
+
rationale: string;
|
|
68
|
+
estimatedWork: EstimatedWork;
|
|
69
|
+
updateInstructions: string;
|
|
70
|
+
renamedEndpoints: Array<{
|
|
71
|
+
oldPath: string;
|
|
72
|
+
newPath: string;
|
|
73
|
+
method: string;
|
|
74
|
+
}>;
|
|
75
|
+
/** Computed during instruction building — suggested renamed file path if applicable. */
|
|
76
|
+
_suggestedNewFile?: string;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Complete test analysis result that combines discovery, drift, execution, and health data
|
|
80
|
+
*/
|
|
81
|
+
export interface TestAnalysisResult {
|
|
82
|
+
testFile: string;
|
|
83
|
+
testType: string;
|
|
84
|
+
language: string;
|
|
85
|
+
framework: string;
|
|
86
|
+
apiSchema?: string;
|
|
87
|
+
apiEndpoint?: string;
|
|
88
|
+
/** Origin of this test. Defaults to TestSource.Skyramp for backwards compatibility
|
|
89
|
+
* with existing state files. */
|
|
90
|
+
source?: TestSource;
|
|
91
|
+
drift?: {
|
|
92
|
+
changes: DriftChange[];
|
|
93
|
+
affectedFiles: AffectedFiles;
|
|
94
|
+
};
|
|
95
|
+
executionBefore?: TestExecutionResult;
|
|
96
|
+
executionAfter?: TestExecutionResult;
|
|
97
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types for Test Execution
|
|
3
|
+
*
|
|
4
|
+
* These types define the structure for test execution results
|
|
5
|
+
*/
|
|
6
|
+
/** Execution outcome for a test run recorded in the maintenance report. */
|
|
7
|
+
export declare enum TestExecutionStatus {
|
|
8
|
+
Pass = "Pass",
|
|
9
|
+
Fail = "Fail",
|
|
10
|
+
Error = "Error",
|
|
11
|
+
/** Deliberately not executed — VERIFY/IGNORE actions or DELETE (file removed). */
|
|
12
|
+
Skipped = "Skipped",
|
|
13
|
+
/** Execution was expected (UPDATE/REGENERATE) but no result was recorded. */
|
|
14
|
+
Unknown = "Unknown"
|
|
15
|
+
}
|
|
16
|
+
export interface TestExecutionData {
|
|
17
|
+
status: TestExecutionStatus;
|
|
18
|
+
executedAt: string;
|
|
19
|
+
duration: number;
|
|
20
|
+
errors: string[];
|
|
21
|
+
warnings: string[];
|
|
22
|
+
output?: string;
|
|
23
|
+
exitCode?: number;
|
|
24
|
+
}
|
|
25
|
+
export interface TestExecutionResult extends TestExecutionData {
|
|
26
|
+
testFile: string;
|
|
27
|
+
videoPath?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface BatchExecutionResult {
|
|
30
|
+
totalTests: number;
|
|
31
|
+
passed: number;
|
|
32
|
+
failed: number;
|
|
33
|
+
crashed: number;
|
|
34
|
+
totalDuration: number;
|
|
35
|
+
results: TestExecutionResult[];
|
|
36
|
+
}
|
|
37
|
+
export interface TestExecutionOptions {
|
|
38
|
+
testFile: string;
|
|
39
|
+
workspacePath: string;
|
|
40
|
+
language: string;
|
|
41
|
+
testType: string;
|
|
42
|
+
token?: string;
|
|
43
|
+
timeout?: number;
|
|
44
|
+
playwrightSaveStoragePath?: string;
|
|
45
|
+
useHostNetwork?: boolean;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Progress callback for reporting execution status
|
|
49
|
+
*/
|
|
50
|
+
export interface ExecutionProgress {
|
|
51
|
+
phase: "docker-check" | "docker-pull" | "preparing" | "executing" | "processing";
|
|
52
|
+
message: string;
|
|
53
|
+
percent: number;
|
|
54
|
+
details?: {
|
|
55
|
+
cached?: boolean;
|
|
56
|
+
pullProgress?: {
|
|
57
|
+
current?: number;
|
|
58
|
+
total?: number;
|
|
59
|
+
layer?: string;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
export type ProgressCallback = (progress: ExecutionProgress) => Promise<void>;
|
|
@@ -3,4 +3,14 @@
|
|
|
3
3
|
*
|
|
4
4
|
* These types define the structure for test execution results
|
|
5
5
|
*/
|
|
6
|
-
|
|
6
|
+
/** Execution outcome for a test run recorded in the maintenance report. */
|
|
7
|
+
export var TestExecutionStatus;
|
|
8
|
+
(function (TestExecutionStatus) {
|
|
9
|
+
TestExecutionStatus["Pass"] = "Pass";
|
|
10
|
+
TestExecutionStatus["Fail"] = "Fail";
|
|
11
|
+
TestExecutionStatus["Error"] = "Error";
|
|
12
|
+
/** Deliberately not executed — VERIFY/IGNORE actions or DELETE (file removed). */
|
|
13
|
+
TestExecutionStatus["Skipped"] = "Skipped";
|
|
14
|
+
/** Execution was expected (UPDATE/REGENERATE) but no result was recorded. */
|
|
15
|
+
TestExecutionStatus["Unknown"] = "Unknown";
|
|
16
|
+
})(TestExecutionStatus || (TestExecutionStatus = {}));
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Internal scenario-scoring tier — UPPERCASE, includes CRITICAL. */
|
|
2
|
+
export type PriorityTier = "CRITICAL" | "HIGH" | "MEDIUM" | "LOW";
|
|
3
|
+
/** All categories including internal ones. */
|
|
4
|
+
export declare const SCENARIO_CATEGORIES: readonly ["new_endpoint", "bug_caught", "business_rule", "security_boundary", "data_integrity", "breaking_change", "auth", "error_handling", "workflow", "data_validation", "crud"];
|
|
5
|
+
export type ScenarioCategory = typeof SCENARIO_CATEGORIES[number];
|
|
6
|
+
/** Categories valid for tool submissions (excludes internal-only categories). */
|
|
7
|
+
export declare const TEST_CATEGORIES: readonly ["business_rule", "security_boundary", "data_integrity", "breaking_change", "auth", "error_handling", "workflow", "data_validation", "crud"];
|
|
8
|
+
export type TestCategory = typeof TEST_CATEGORIES[number];
|
|
9
|
+
/** Priority assignment for each category. */
|
|
10
|
+
export declare const CATEGORY_PRIORITY: Record<ScenarioCategory, PriorityTier>;
|
|
11
|
+
/** Map internal-only categories to their external equivalent for tool submission. */
|
|
12
|
+
export declare function externalCategory(cat: ScenarioCategory): TestCategory;
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const SESSION_STORAGE_FILENAME = "skyramp_session_storage.json";
|
|
3
|
+
export declare const AUTH_PLACEHOLDER_TOKEN = "SKYRAMP_PLACEHOLDER_TOKEN";
|
|
4
|
+
export declare enum ProgrammingLanguage {
|
|
5
|
+
PYTHON = "python",
|
|
6
|
+
TYPESCRIPT = "typescript",
|
|
7
|
+
JAVASCRIPT = "javascript",
|
|
8
|
+
JAVA = "java"
|
|
9
|
+
}
|
|
10
|
+
export declare enum TestType {
|
|
11
|
+
SMOKE = "smoke",
|
|
12
|
+
FUZZ = "fuzz",
|
|
13
|
+
CONTRACT = "contract",
|
|
14
|
+
LOAD = "load",
|
|
15
|
+
INTEGRATION = "integration",
|
|
16
|
+
E2E = "e2e",
|
|
17
|
+
UI = "ui",
|
|
18
|
+
MOCK = "mock"
|
|
19
|
+
}
|
|
20
|
+
export declare enum HttpMethod {
|
|
21
|
+
GET = "GET",
|
|
22
|
+
POST = "POST",
|
|
23
|
+
PUT = "PUT",
|
|
24
|
+
DELETE = "DELETE",
|
|
25
|
+
PATCH = "PATCH",
|
|
26
|
+
HEAD = "HEAD",
|
|
27
|
+
OPTIONS = "OPTIONS"
|
|
28
|
+
}
|
|
29
|
+
export declare enum RuntimeEnvironment {
|
|
30
|
+
LOCAL = "local",
|
|
31
|
+
DOCKER = "docker",
|
|
32
|
+
KUBERNETES = "kubernetes"
|
|
33
|
+
}
|
|
34
|
+
export interface TestConfig {
|
|
35
|
+
testType: TestType;
|
|
36
|
+
toolName: string;
|
|
37
|
+
description: string;
|
|
38
|
+
additionalFields?: Record<string, z.ZodSchema>;
|
|
39
|
+
}
|
|
40
|
+
export declare const languageSchema: z.ZodObject<{
|
|
41
|
+
language: z.ZodNativeEnum<typeof ProgrammingLanguage>;
|
|
42
|
+
framework: z.ZodString;
|
|
43
|
+
}, "strip", z.ZodTypeAny, {
|
|
44
|
+
language: ProgrammingLanguage;
|
|
45
|
+
framework: string;
|
|
46
|
+
}, {
|
|
47
|
+
language: ProgrammingLanguage;
|
|
48
|
+
framework: string;
|
|
49
|
+
}>;
|
|
50
|
+
export declare const baseSchema: z.ZodObject<{
|
|
51
|
+
deployDashboard: z.ZodDefault<z.ZodBoolean>;
|
|
52
|
+
runtime: z.ZodDefault<z.ZodNativeEnum<typeof RuntimeEnvironment>>;
|
|
53
|
+
dockerNetwork: z.ZodDefault<z.ZodString>;
|
|
54
|
+
dockerWorkerPort: z.ZodDefault<z.ZodNumber>;
|
|
55
|
+
k8sNamespace: z.ZodDefault<z.ZodString>;
|
|
56
|
+
k8sConfig: z.ZodDefault<z.ZodString>;
|
|
57
|
+
k8sContext: z.ZodDefault<z.ZodString>;
|
|
58
|
+
authHeader: z.ZodDefault<z.ZodString>;
|
|
59
|
+
authScheme: z.ZodDefault<z.ZodString>;
|
|
60
|
+
insecure: z.ZodDefault<z.ZodBoolean>;
|
|
61
|
+
output: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, string | undefined>;
|
|
62
|
+
outputDir: z.ZodString;
|
|
63
|
+
force: z.ZodDefault<z.ZodBoolean>;
|
|
64
|
+
mockPort: z.ZodDefault<z.ZodNumber>;
|
|
65
|
+
optionalFields: z.ZodDefault<z.ZodBoolean>;
|
|
66
|
+
prompt: z.ZodString;
|
|
67
|
+
language: z.ZodNativeEnum<typeof ProgrammingLanguage>;
|
|
68
|
+
framework: z.ZodString;
|
|
69
|
+
}, "strip", z.ZodTypeAny, {
|
|
70
|
+
language: ProgrammingLanguage;
|
|
71
|
+
framework: string;
|
|
72
|
+
deployDashboard: boolean;
|
|
73
|
+
runtime: RuntimeEnvironment;
|
|
74
|
+
dockerNetwork: string;
|
|
75
|
+
dockerWorkerPort: number;
|
|
76
|
+
k8sNamespace: string;
|
|
77
|
+
k8sConfig: string;
|
|
78
|
+
k8sContext: string;
|
|
79
|
+
authHeader: string;
|
|
80
|
+
authScheme: string;
|
|
81
|
+
insecure: boolean;
|
|
82
|
+
outputDir: string;
|
|
83
|
+
force: boolean;
|
|
84
|
+
mockPort: number;
|
|
85
|
+
optionalFields: boolean;
|
|
86
|
+
prompt: string;
|
|
87
|
+
output?: string | undefined;
|
|
88
|
+
}, {
|
|
89
|
+
language: ProgrammingLanguage;
|
|
90
|
+
framework: string;
|
|
91
|
+
outputDir: string;
|
|
92
|
+
prompt: string;
|
|
93
|
+
deployDashboard?: boolean | undefined;
|
|
94
|
+
runtime?: RuntimeEnvironment | undefined;
|
|
95
|
+
dockerNetwork?: string | undefined;
|
|
96
|
+
dockerWorkerPort?: number | undefined;
|
|
97
|
+
k8sNamespace?: string | undefined;
|
|
98
|
+
k8sConfig?: string | undefined;
|
|
99
|
+
k8sContext?: string | undefined;
|
|
100
|
+
authHeader?: string | undefined;
|
|
101
|
+
authScheme?: string | undefined;
|
|
102
|
+
insecure?: boolean | undefined;
|
|
103
|
+
output?: string | undefined;
|
|
104
|
+
force?: boolean | undefined;
|
|
105
|
+
mockPort?: number | undefined;
|
|
106
|
+
optionalFields?: boolean | undefined;
|
|
107
|
+
}>;
|
|
108
|
+
export declare const basePlaywrightSchema: z.ZodObject<{
|
|
109
|
+
playwrightInput: z.ZodString;
|
|
110
|
+
playwrightStoragePath: z.ZodOptional<z.ZodString>;
|
|
111
|
+
playwrightSaveStoragePath: z.ZodOptional<z.ZodString>;
|
|
112
|
+
playwrightViewportSize: z.ZodDefault<z.ZodUnion<[z.ZodEnum<["", "hd", "full-hd", "2k"]>, z.ZodString]>>;
|
|
113
|
+
browser: z.ZodDefault<z.ZodEnum<["chromium", "firefox", "webkit"]>>;
|
|
114
|
+
device: z.ZodDefault<z.ZodString>;
|
|
115
|
+
}, "strip", z.ZodTypeAny, {
|
|
116
|
+
playwrightInput: string;
|
|
117
|
+
playwrightViewportSize: string;
|
|
118
|
+
browser: "chromium" | "firefox" | "webkit";
|
|
119
|
+
device: string;
|
|
120
|
+
playwrightStoragePath?: string | undefined;
|
|
121
|
+
playwrightSaveStoragePath?: string | undefined;
|
|
122
|
+
}, {
|
|
123
|
+
playwrightInput: string;
|
|
124
|
+
playwrightStoragePath?: string | undefined;
|
|
125
|
+
playwrightSaveStoragePath?: string | undefined;
|
|
126
|
+
playwrightViewportSize?: string | undefined;
|
|
127
|
+
browser?: "chromium" | "firefox" | "webkit" | undefined;
|
|
128
|
+
device?: string | undefined;
|
|
129
|
+
}>;
|
|
130
|
+
export declare const baseTraceSchema: z.ZodObject<{
|
|
131
|
+
deployDashboard: z.ZodDefault<z.ZodBoolean>;
|
|
132
|
+
runtime: z.ZodDefault<z.ZodNativeEnum<typeof RuntimeEnvironment>>;
|
|
133
|
+
dockerNetwork: z.ZodDefault<z.ZodString>;
|
|
134
|
+
dockerWorkerPort: z.ZodDefault<z.ZodNumber>;
|
|
135
|
+
k8sNamespace: z.ZodDefault<z.ZodString>;
|
|
136
|
+
k8sConfig: z.ZodDefault<z.ZodString>;
|
|
137
|
+
k8sContext: z.ZodDefault<z.ZodString>;
|
|
138
|
+
authHeader: z.ZodDefault<z.ZodString>;
|
|
139
|
+
authScheme: z.ZodDefault<z.ZodString>;
|
|
140
|
+
insecure: z.ZodDefault<z.ZodBoolean>;
|
|
141
|
+
output: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, string | undefined>;
|
|
142
|
+
outputDir: z.ZodString;
|
|
143
|
+
force: z.ZodDefault<z.ZodBoolean>;
|
|
144
|
+
mockPort: z.ZodDefault<z.ZodNumber>;
|
|
145
|
+
optionalFields: z.ZodDefault<z.ZodBoolean>;
|
|
146
|
+
prompt: z.ZodString;
|
|
147
|
+
language: z.ZodNativeEnum<typeof ProgrammingLanguage>;
|
|
148
|
+
framework: z.ZodString;
|
|
149
|
+
trace: z.ZodString;
|
|
150
|
+
include: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
151
|
+
exclude: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
152
|
+
}, "strip", z.ZodTypeAny, {
|
|
153
|
+
language: ProgrammingLanguage;
|
|
154
|
+
framework: string;
|
|
155
|
+
deployDashboard: boolean;
|
|
156
|
+
runtime: RuntimeEnvironment;
|
|
157
|
+
dockerNetwork: string;
|
|
158
|
+
dockerWorkerPort: number;
|
|
159
|
+
k8sNamespace: string;
|
|
160
|
+
k8sConfig: string;
|
|
161
|
+
k8sContext: string;
|
|
162
|
+
authHeader: string;
|
|
163
|
+
authScheme: string;
|
|
164
|
+
insecure: boolean;
|
|
165
|
+
outputDir: string;
|
|
166
|
+
force: boolean;
|
|
167
|
+
mockPort: number;
|
|
168
|
+
optionalFields: boolean;
|
|
169
|
+
prompt: string;
|
|
170
|
+
trace: string;
|
|
171
|
+
include: string[];
|
|
172
|
+
exclude: string[];
|
|
173
|
+
output?: string | undefined;
|
|
174
|
+
}, {
|
|
175
|
+
language: ProgrammingLanguage;
|
|
176
|
+
framework: string;
|
|
177
|
+
outputDir: string;
|
|
178
|
+
prompt: string;
|
|
179
|
+
trace: string;
|
|
180
|
+
deployDashboard?: boolean | undefined;
|
|
181
|
+
runtime?: RuntimeEnvironment | undefined;
|
|
182
|
+
dockerNetwork?: string | undefined;
|
|
183
|
+
dockerWorkerPort?: number | undefined;
|
|
184
|
+
k8sNamespace?: string | undefined;
|
|
185
|
+
k8sConfig?: string | undefined;
|
|
186
|
+
k8sContext?: string | undefined;
|
|
187
|
+
authHeader?: string | undefined;
|
|
188
|
+
authScheme?: string | undefined;
|
|
189
|
+
insecure?: boolean | undefined;
|
|
190
|
+
output?: string | undefined;
|
|
191
|
+
force?: boolean | undefined;
|
|
192
|
+
mockPort?: number | undefined;
|
|
193
|
+
optionalFields?: boolean | undefined;
|
|
194
|
+
include?: string[] | undefined;
|
|
195
|
+
exclude?: string[] | undefined;
|
|
196
|
+
}>;
|
|
197
|
+
export declare const baseTestSchema: {
|
|
198
|
+
deployDashboard: z.ZodDefault<z.ZodBoolean>;
|
|
199
|
+
runtime: z.ZodDefault<z.ZodNativeEnum<typeof RuntimeEnvironment>>;
|
|
200
|
+
dockerNetwork: z.ZodDefault<z.ZodString>;
|
|
201
|
+
dockerWorkerPort: z.ZodDefault<z.ZodNumber>;
|
|
202
|
+
k8sNamespace: z.ZodDefault<z.ZodString>;
|
|
203
|
+
k8sConfig: z.ZodDefault<z.ZodString>;
|
|
204
|
+
k8sContext: z.ZodDefault<z.ZodString>;
|
|
205
|
+
authHeader: z.ZodDefault<z.ZodString>;
|
|
206
|
+
authScheme: z.ZodDefault<z.ZodString>;
|
|
207
|
+
insecure: z.ZodDefault<z.ZodBoolean>;
|
|
208
|
+
output: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, string | undefined>;
|
|
209
|
+
outputDir: z.ZodString;
|
|
210
|
+
force: z.ZodDefault<z.ZodBoolean>;
|
|
211
|
+
mockPort: z.ZodDefault<z.ZodNumber>;
|
|
212
|
+
optionalFields: z.ZodDefault<z.ZodBoolean>;
|
|
213
|
+
prompt: z.ZodString;
|
|
214
|
+
language: z.ZodNativeEnum<typeof ProgrammingLanguage>;
|
|
215
|
+
framework: z.ZodString;
|
|
216
|
+
endpointURL: z.ZodString;
|
|
217
|
+
method: z.ZodDefault<z.ZodUnion<[z.ZodNativeEnum<typeof HttpMethod>, z.ZodLiteral<"">]>>;
|
|
218
|
+
apiSchema: z.ZodDefault<z.ZodString>;
|
|
219
|
+
pathParams: z.ZodDefault<z.ZodString>;
|
|
220
|
+
queryParams: z.ZodDefault<z.ZodString>;
|
|
221
|
+
formParams: z.ZodDefault<z.ZodString>;
|
|
222
|
+
requestData: z.ZodEffects<z.ZodDefault<z.ZodString>, string, string | undefined>;
|
|
223
|
+
responseStatusCode: z.ZodEffects<z.ZodDefault<z.ZodString>, string, string | undefined>;
|
|
224
|
+
};
|
|
225
|
+
export declare const codeRefactoringSchema: z.ZodObject<{
|
|
226
|
+
codeReuse: z.ZodDefault<z.ZodBoolean>;
|
|
227
|
+
modularizeCode: z.ZodDefault<z.ZodBoolean>;
|
|
228
|
+
}, "strip", z.ZodTypeAny, {
|
|
229
|
+
codeReuse: boolean;
|
|
230
|
+
modularizeCode: boolean;
|
|
231
|
+
}, {
|
|
232
|
+
codeReuse?: boolean | undefined;
|
|
233
|
+
modularizeCode?: boolean | undefined;
|
|
234
|
+
}>;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { DriftAction } from "./TestAnalysis.js";
|
|
2
|
+
import type { TestExecutionStatus } from "./TestExecution.js";
|
|
3
|
+
import type { HttpMethod, TestType } from "./TestTypes.js";
|
|
4
|
+
/**
|
|
5
|
+
* Shape of the JSON report written by skyramp_submit_report and read by testbot
|
|
6
|
+
* for rendering as Markdown. All fields mirror the corresponding Zod schemas in
|
|
7
|
+
* submitReportTool.ts — keep the two in sync.
|
|
8
|
+
*/
|
|
9
|
+
export interface TestbotReport {
|
|
10
|
+
businessCaseAnalysis: string;
|
|
11
|
+
newTestsCreated: {
|
|
12
|
+
testId: string;
|
|
13
|
+
testType: TestType;
|
|
14
|
+
endpoint: string;
|
|
15
|
+
fileName: string;
|
|
16
|
+
reasoning: string;
|
|
17
|
+
description?: string;
|
|
18
|
+
scenarioFile?: string;
|
|
19
|
+
traceFile?: string;
|
|
20
|
+
frontendTrace?: string;
|
|
21
|
+
}[];
|
|
22
|
+
/** Omitted when no existing tests were found (agent omits the field). */
|
|
23
|
+
testMaintenance?: {
|
|
24
|
+
testType: TestType;
|
|
25
|
+
endpoint: string;
|
|
26
|
+
fileName: string;
|
|
27
|
+
description: string;
|
|
28
|
+
action: DriftAction;
|
|
29
|
+
beforeStatus: TestExecutionStatus;
|
|
30
|
+
beforeDetails: string;
|
|
31
|
+
afterStatus: TestExecutionStatus;
|
|
32
|
+
afterDetails: string;
|
|
33
|
+
}[];
|
|
34
|
+
testResults: {
|
|
35
|
+
testType: TestType;
|
|
36
|
+
endpoint: string;
|
|
37
|
+
status: "Pass" | "Fail" | "Skipped";
|
|
38
|
+
details: string;
|
|
39
|
+
videoPath?: string;
|
|
40
|
+
}[];
|
|
41
|
+
additionalRecommendations?: {
|
|
42
|
+
testId: string;
|
|
43
|
+
testType: TestType;
|
|
44
|
+
category?: string;
|
|
45
|
+
primaryEndpoint?: string;
|
|
46
|
+
scenarioName?: string;
|
|
47
|
+
steps: {
|
|
48
|
+
method?: HttpMethod;
|
|
49
|
+
path?: string;
|
|
50
|
+
description: string;
|
|
51
|
+
expectedStatusCode?: number;
|
|
52
|
+
requestBody?: Record<string, unknown>;
|
|
53
|
+
responseBody?: Record<string, unknown>;
|
|
54
|
+
}[];
|
|
55
|
+
description: string;
|
|
56
|
+
priority: "high" | "medium" | "low";
|
|
57
|
+
reasoning: string;
|
|
58
|
+
openApiSpec?: string;
|
|
59
|
+
backendTrace?: string;
|
|
60
|
+
frontendTrace?: string;
|
|
61
|
+
}[];
|
|
62
|
+
issuesFound: {
|
|
63
|
+
description: string;
|
|
64
|
+
severity?: "critical" | "high" | "medium" | "low";
|
|
65
|
+
}[];
|
|
66
|
+
nextSteps: string[];
|
|
67
|
+
commitMessage: string;
|
|
68
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|