@skyramp/mcp 0.2.9 → 0.2.10-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/index.js +1 -1
- package/build/prompts/enhance-assertions/uiAssertionsPrompt.js +28 -1
- package/build/prompts/initialize-workspace/initializeWorkspacePrompt.js +1 -0
- package/build/prompts/personas.d.ts +2 -2
- package/build/prompts/personas.js +2 -2
- package/build/prompts/sut-setup/modes/dockerComposePrompt.js +3 -0
- package/build/prompts/sut-setup/shared.js +1 -3
- package/build/prompts/test-maintenance/drift-analysis-prompt.d.ts +1 -1
- package/build/prompts/test-maintenance/drift-analysis-prompt.js +10 -5
- package/build/prompts/test-maintenance/driftAnalysisSections.js +1 -4
- package/build/prompts/test-maintenance/driftAnalysisShared.d.ts +7 -1
- package/build/prompts/test-maintenance/driftAnalysisShared.js +19 -1
- package/build/prompts/test-maintenance/uiDriftAnalysisSections.d.ts +0 -6
- package/build/prompts/test-maintenance/uiDriftAnalysisSections.js +0 -16
- package/build/prompts/test-recommendation/recommendationShared.js +1 -1
- package/build/prompts/testbot/testbot-prompts.js +8 -8
- package/build/resources/testbotResource.js +1 -1
- package/build/services/TestDiscoveryService.d.ts +0 -1
- package/build/services/TestDiscoveryService.js +13 -33
- package/build/services/TestDiscoveryService.test.js +136 -1
- package/build/services/TestExecutionService.d.ts +1 -1
- package/build/tools/executeSkyrampTestTool.js +40 -71
- package/build/tools/submitReportTool.d.ts +20 -20
- package/build/tools/submitReportTool.js +113 -31
- package/build/tools/submitReportTool.test.js +411 -94
- package/build/tools/test-management/actionsTool.js +135 -53
- package/build/tools/test-management/actionsTool.test.d.ts +1 -0
- package/build/tools/test-management/actionsTool.test.js +297 -0
- package/build/tools/test-management/analyzeChangesTool.d.ts +9 -0
- package/build/tools/test-management/analyzeChangesTool.js +63 -152
- package/build/tools/test-management/analyzeChangesTool.test.js +34 -3
- package/build/tools/test-management/analyzeTestHealthTool.js +24 -157
- package/build/tools/test-management/analyzeTestHealthTool.test.js +15 -215
- package/build/tools/workspace/initializeWorkspaceTool.js +35 -15
- package/build/types/FrontendIntegration.d.ts +25 -0
- package/build/types/FrontendIntegration.js +19 -0
- package/build/types/RepositoryAnalysis.d.ts +8 -8
- package/build/types/TestAnalysis.d.ts +16 -50
- package/build/types/TestAnalysis.js +0 -28
- package/build/types/TestTypes.d.ts +3 -1
- package/build/types/TestTypes.js +3 -1
- package/build/utils/AnalysisStateManager.d.ts +13 -1
- package/build/utils/docker.test.js +1 -1
- package/build/utils/featureFlags.d.ts +1 -1
- package/build/utils/featureFlags.js +1 -1
- package/build/utils/frontendIntegration.d.ts +9 -0
- package/build/utils/frontendIntegration.js +237 -0
- package/build/utils/frontendIntegration.test.d.ts +1 -0
- package/build/utils/frontendIntegration.test.js +229 -0
- package/build/utils/pr-comment-parser.d.ts +3 -3
- package/build/utils/pr-comment-parser.js +6 -6
- package/build/utils/pr-comment-parser.test.js +3 -3
- package/build/utils/repoScanner.d.ts +7 -0
- package/build/utils/repoScanner.js +14 -6
- package/build/utils/repoScanner.test.js +9 -9
- package/build/utils/routeParsers.d.ts +32 -0
- package/build/utils/routeParsers.js +205 -2
- package/build/utils/routeParsers.test.js +279 -29
- package/build/utils/sourceRouteExtractor.js +174 -5
- package/build/utils/sourceRouteExtractor.test.js +173 -0
- package/build/utils/utils.d.ts +11 -0
- package/build/utils/utils.js +19 -0
- package/build/utils/utils.test.js +23 -1
- package/build/utils/versions.d.ts +3 -3
- package/build/utils/versions.js +1 -1
- package/node_modules/playwright/lib/mcp/browser/tools/files.js +8 -3
- package/node_modules/playwright/lib/mcp/browser/tools/wait.js +1 -1
- package/node_modules/playwright/lib/mcp/skyramp/exportTool.js +10 -1
- package/node_modules/playwright/lib/mcp/skyramp/traceRecordingBackend.js +33 -9
- package/node_modules/playwright/lib/mcp/test/skyRampExport.js +7 -1
- package/node_modules/playwright/lib/mcp/test/skyRampExport.test.js +44 -0
- package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/{index.B_7ywgmr.js → index.d4gkVSou.js} +1 -1
- package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/index.html +1 -1
- package/node_modules/playwright/node_modules/playwright-core/package.json +1 -1
- package/node_modules/playwright/package.json +1 -1
- package/package.json +3 -3
|
@@ -23,11 +23,12 @@ const initializeWorkspaceSchema = z.object({
|
|
|
23
23
|
.describe("Array of services discovered by skyramp_init_scan. Must contain at least one service."),
|
|
24
24
|
scanToken: z
|
|
25
25
|
.string()
|
|
26
|
-
.
|
|
26
|
+
.optional()
|
|
27
|
+
.describe("Token returned by skyramp_init_scan. Required on a fresh init (no existing .skyramp/workspace.yml) to confirm the repo was scanned before initializing. Omit when editing an existing workspace.yml — pair `force: true` with the full updated `services` array instead."),
|
|
27
28
|
force: z
|
|
28
29
|
.boolean()
|
|
29
30
|
.default(false)
|
|
30
|
-
.describe("Set to true to overwrite an existing workspace
|
|
31
|
+
.describe("Set to true to overwrite an existing workspace.yml. Use for edits (e.g. updating `runtimeDetails.serverStartCommand` after generating SUT files): pass the full updated `services` array — this is an overwrite, not a merge, so any field not present is dropped. Also use when recovering from a validation failure. Required when `scanToken` is omitted. Default is false."),
|
|
31
32
|
merge: z
|
|
32
33
|
.boolean()
|
|
33
34
|
.default(false)
|
|
@@ -49,8 +50,11 @@ async function writeWorkspaceConfig(manager, config) {
|
|
|
49
50
|
}
|
|
50
51
|
export function registerInitializeWorkspaceTool(server) {
|
|
51
52
|
server.registerTool(TOOL_NAME, {
|
|
52
|
-
description: "
|
|
53
|
-
"
|
|
53
|
+
description: "Write or update .skyramp/workspace.yml. Always use this tool for any change to that file — do NOT use Edit/Write directly. " +
|
|
54
|
+
"1. Fresh init: PREREQUISITE: Call skyramp_init_scan first to get a scanToken and discover services. " +
|
|
55
|
+
"Then call this tool to write .skyramp/workspace.yml with the discovered services and scanToken. " +
|
|
56
|
+
"2. Edit existing workspace.yml: omit scanToken, set force: true, and pass the FULL updated services array (overwrite, not merge — fields not in the array are dropped). " +
|
|
57
|
+
"The services schema is strict: any field not in the schema (e.g. inventing `serverStopCommand` on `runtimeDetails`) fails validation and the call is rejected.",
|
|
54
58
|
inputSchema: initializeWorkspaceSchema.shape,
|
|
55
59
|
_meta: {
|
|
56
60
|
keywords: [
|
|
@@ -88,17 +92,33 @@ export function registerInitializeWorkspaceTool(server) {
|
|
|
88
92
|
isError: false,
|
|
89
93
|
};
|
|
90
94
|
}
|
|
91
|
-
//
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
95
|
+
// scanToken is required for fresh init; for edits (force:true on an
|
|
96
|
+
// existing workspace.yml) the caller supplies the full services array
|
|
97
|
+
// directly and we skip the token check.
|
|
98
|
+
const isEdit = alreadyExists && params.force;
|
|
99
|
+
if (!isEdit) {
|
|
100
|
+
if (!params.scanToken) {
|
|
101
|
+
return {
|
|
102
|
+
content: [
|
|
103
|
+
{
|
|
104
|
+
type: "text",
|
|
105
|
+
text: "scanToken is required for a fresh init. Call skyramp_init_scan first to get a scanToken and scanning instructions. To edit an existing workspace.yml, set force: true and omit scanToken.",
|
|
106
|
+
},
|
|
107
|
+
],
|
|
108
|
+
isError: true,
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
if (!validateAndConsumeScanToken(params.scanToken)) {
|
|
112
|
+
return {
|
|
113
|
+
content: [
|
|
114
|
+
{
|
|
115
|
+
type: "text",
|
|
116
|
+
text: "Invalid or expired scanToken. Call skyramp_init_scan first to get a valid scanToken and scanning instructions.",
|
|
117
|
+
},
|
|
118
|
+
],
|
|
119
|
+
isError: true,
|
|
120
|
+
};
|
|
121
|
+
}
|
|
102
122
|
}
|
|
103
123
|
if (!params.services || params.services.length === 0) {
|
|
104
124
|
return {
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Frontend component integration check types — SKYR-3855.
|
|
3
|
+
*
|
|
4
|
+
* Produced by `checkFrontendFileIntegration` (src/utils/frontendIntegration.ts)
|
|
5
|
+
* and surfaced to the agent as `uiContext.frontendFileIntegration` in the
|
|
6
|
+
* `skyramp_analyze_changes` output and state file.
|
|
7
|
+
*/
|
|
8
|
+
/** String enum so the JSON wire format (state file, tool output) stays unchanged. */
|
|
9
|
+
export declare enum IntegrationReason {
|
|
10
|
+
/** Framework route/page/entrypoint file — reachable by convention, grep skipped. */
|
|
11
|
+
RouteOrEntrypoint = "route-or-entrypoint",
|
|
12
|
+
/** At least one production file imports/references the component's module path. */
|
|
13
|
+
Imported = "imported",
|
|
14
|
+
/** No production importer found — the component has no DOM presence in the running app. */
|
|
15
|
+
NoImporters = "no-importers",
|
|
16
|
+
/** The check could not run (missing file, scan failure) — reported integrated (fail-open). */
|
|
17
|
+
ScanError = "scan-error"
|
|
18
|
+
}
|
|
19
|
+
export interface FrontendFileIntegration {
|
|
20
|
+
file: string;
|
|
21
|
+
integrated: boolean;
|
|
22
|
+
/** Production files that import/reference the component, relative to repositoryPath. Capped at 10. */
|
|
23
|
+
importers: string[];
|
|
24
|
+
reason: IntegrationReason;
|
|
25
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Frontend component integration check types — SKYR-3855.
|
|
3
|
+
*
|
|
4
|
+
* Produced by `checkFrontendFileIntegration` (src/utils/frontendIntegration.ts)
|
|
5
|
+
* and surfaced to the agent as `uiContext.frontendFileIntegration` in the
|
|
6
|
+
* `skyramp_analyze_changes` output and state file.
|
|
7
|
+
*/
|
|
8
|
+
/** String enum so the JSON wire format (state file, tool output) stays unchanged. */
|
|
9
|
+
export var IntegrationReason;
|
|
10
|
+
(function (IntegrationReason) {
|
|
11
|
+
/** Framework route/page/entrypoint file — reachable by convention, grep skipped. */
|
|
12
|
+
IntegrationReason["RouteOrEntrypoint"] = "route-or-entrypoint";
|
|
13
|
+
/** At least one production file imports/references the component's module path. */
|
|
14
|
+
IntegrationReason["Imported"] = "imported";
|
|
15
|
+
/** No production importer found — the component has no DOM presence in the running app. */
|
|
16
|
+
IntegrationReason["NoImporters"] = "no-importers";
|
|
17
|
+
/** The check could not run (missing file, scan failure) — reported integrated (fail-open). */
|
|
18
|
+
IntegrationReason["ScanError"] = "scan-error";
|
|
19
|
+
})(IntegrationReason || (IntegrationReason = {}));
|
|
@@ -1195,7 +1195,7 @@ export declare const draftedScenarioSchema: z.ZodObject<{
|
|
|
1195
1195
|
description: string;
|
|
1196
1196
|
priority: "high" | "medium" | "low";
|
|
1197
1197
|
scenarioName: string;
|
|
1198
|
-
category: "
|
|
1198
|
+
category: "new_endpoint" | "bug_caught" | "business_rule" | "security_boundary" | "data_integrity" | "breaking_change" | "auth" | "error_handling" | "workflow" | "data_validation" | "crud";
|
|
1199
1199
|
steps: {
|
|
1200
1200
|
path: string;
|
|
1201
1201
|
method: string;
|
|
@@ -1232,7 +1232,7 @@ export declare const draftedScenarioSchema: z.ZodObject<{
|
|
|
1232
1232
|
description: string;
|
|
1233
1233
|
priority: "high" | "medium" | "low";
|
|
1234
1234
|
scenarioName: string;
|
|
1235
|
-
category: "
|
|
1235
|
+
category: "new_endpoint" | "bug_caught" | "business_rule" | "security_boundary" | "data_integrity" | "breaking_change" | "auth" | "error_handling" | "workflow" | "data_validation" | "crud";
|
|
1236
1236
|
steps: {
|
|
1237
1237
|
path: string;
|
|
1238
1238
|
method: string;
|
|
@@ -1644,7 +1644,7 @@ export declare const repositoryAnalysisSchema: z.ZodObject<{
|
|
|
1644
1644
|
description: string;
|
|
1645
1645
|
priority: "high" | "medium" | "low";
|
|
1646
1646
|
scenarioName: string;
|
|
1647
|
-
category: "
|
|
1647
|
+
category: "new_endpoint" | "bug_caught" | "business_rule" | "security_boundary" | "data_integrity" | "breaking_change" | "auth" | "error_handling" | "workflow" | "data_validation" | "crud";
|
|
1648
1648
|
steps: {
|
|
1649
1649
|
path: string;
|
|
1650
1650
|
method: string;
|
|
@@ -1681,7 +1681,7 @@ export declare const repositoryAnalysisSchema: z.ZodObject<{
|
|
|
1681
1681
|
description: string;
|
|
1682
1682
|
priority: "high" | "medium" | "low";
|
|
1683
1683
|
scenarioName: string;
|
|
1684
|
-
category: "
|
|
1684
|
+
category: "new_endpoint" | "bug_caught" | "business_rule" | "security_boundary" | "data_integrity" | "breaking_change" | "auth" | "error_handling" | "workflow" | "data_validation" | "crud";
|
|
1685
1685
|
steps: {
|
|
1686
1686
|
path: string;
|
|
1687
1687
|
method: string;
|
|
@@ -1724,7 +1724,7 @@ export declare const repositoryAnalysisSchema: z.ZodObject<{
|
|
|
1724
1724
|
description: string;
|
|
1725
1725
|
priority: "high" | "medium" | "low";
|
|
1726
1726
|
scenarioName: string;
|
|
1727
|
-
category: "
|
|
1727
|
+
category: "new_endpoint" | "bug_caught" | "business_rule" | "security_boundary" | "data_integrity" | "breaking_change" | "auth" | "error_handling" | "workflow" | "data_validation" | "crud";
|
|
1728
1728
|
steps: {
|
|
1729
1729
|
path: string;
|
|
1730
1730
|
method: string;
|
|
@@ -1767,7 +1767,7 @@ export declare const repositoryAnalysisSchema: z.ZodObject<{
|
|
|
1767
1767
|
description: string;
|
|
1768
1768
|
priority: "high" | "medium" | "low";
|
|
1769
1769
|
scenarioName: string;
|
|
1770
|
-
category: "
|
|
1770
|
+
category: "new_endpoint" | "bug_caught" | "business_rule" | "security_boundary" | "data_integrity" | "breaking_change" | "auth" | "error_handling" | "workflow" | "data_validation" | "crud";
|
|
1771
1771
|
steps: {
|
|
1772
1772
|
path: string;
|
|
1773
1773
|
method: string;
|
|
@@ -2629,7 +2629,7 @@ export declare const repositoryAnalysisSchema: z.ZodObject<{
|
|
|
2629
2629
|
description: string;
|
|
2630
2630
|
priority: "high" | "medium" | "low";
|
|
2631
2631
|
scenarioName: string;
|
|
2632
|
-
category: "
|
|
2632
|
+
category: "new_endpoint" | "bug_caught" | "business_rule" | "security_boundary" | "data_integrity" | "breaking_change" | "auth" | "error_handling" | "workflow" | "data_validation" | "crud";
|
|
2633
2633
|
steps: {
|
|
2634
2634
|
path: string;
|
|
2635
2635
|
method: string;
|
|
@@ -2831,7 +2831,7 @@ export declare const repositoryAnalysisSchema: z.ZodObject<{
|
|
|
2831
2831
|
description: string;
|
|
2832
2832
|
priority: "high" | "medium" | "low";
|
|
2833
2833
|
scenarioName: string;
|
|
2834
|
-
category: "
|
|
2834
|
+
category: "new_endpoint" | "bug_caught" | "business_rule" | "security_boundary" | "data_integrity" | "breaking_change" | "auth" | "error_handling" | "workflow" | "data_validation" | "crud";
|
|
2835
2835
|
steps: {
|
|
2836
2836
|
path: string;
|
|
2837
2837
|
method: string;
|
|
@@ -1,45 +1,10 @@
|
|
|
1
1
|
import { TestExecutionResult } from "./TestExecution.js";
|
|
2
|
+
import { TestType } from "./TestTypes.js";
|
|
2
3
|
export declare enum RecommendationPriority {
|
|
3
4
|
High = "high",
|
|
4
5
|
Medium = "medium",
|
|
5
6
|
Low = "low"
|
|
6
7
|
}
|
|
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
8
|
/** Origin of a test file — whether it was generated by Skyramp or is user/third-party maintained. */
|
|
44
9
|
export declare enum TestSource {
|
|
45
10
|
Skyramp = "skyramp",
|
|
@@ -59,15 +24,23 @@ export declare enum EstimatedWork {
|
|
|
59
24
|
Medium = "Medium",
|
|
60
25
|
Large = "Large"
|
|
61
26
|
}
|
|
27
|
+
/** The maintenance-decision fields shared by every stage of the test-maintenance
|
|
28
|
+
* pipeline (skyramp_actions' recommendations, the state's maintenanceVerdicts, and
|
|
29
|
+
* the report's testMaintenance rows) — one canonical shape instead of each stage
|
|
30
|
+
* redeclaring the same five fields under its own name. */
|
|
31
|
+
export interface MaintenanceActionCore {
|
|
32
|
+
testFilePath: string;
|
|
33
|
+
action: DriftAction;
|
|
34
|
+
testType: TestType;
|
|
35
|
+
endpoint: string;
|
|
36
|
+
rationale: string;
|
|
37
|
+
}
|
|
62
38
|
/** Normalized internal recommendation built from LLM-supplied args.recommendations. */
|
|
63
|
-
export interface DriftRecommendation {
|
|
64
|
-
testFile: string;
|
|
39
|
+
export interface DriftRecommendation extends MaintenanceActionCore {
|
|
65
40
|
/** When selectors are abstracted into a page object, pomFile is the POM path to edit.
|
|
66
|
-
*
|
|
41
|
+
* testFilePath remains the spec (for catalog lookup and report); pomFile is what gets patched. */
|
|
67
42
|
pomFile?: string;
|
|
68
|
-
action: DriftAction;
|
|
69
43
|
priority: RecommendationPriority;
|
|
70
|
-
rationale: string;
|
|
71
44
|
estimatedWork: EstimatedWork;
|
|
72
45
|
updateInstructions: string;
|
|
73
46
|
renamedEndpoints: Array<{
|
|
@@ -83,18 +56,11 @@ export interface DriftRecommendation {
|
|
|
83
56
|
*/
|
|
84
57
|
export interface TestAnalysisResult {
|
|
85
58
|
testFile: string;
|
|
86
|
-
testType:
|
|
59
|
+
testType: TestType;
|
|
87
60
|
language: string;
|
|
88
61
|
framework: string;
|
|
89
|
-
apiSchema?: string;
|
|
90
62
|
apiEndpoint?: string;
|
|
91
|
-
|
|
92
|
-
* with existing state files. */
|
|
93
|
-
source?: TestSource;
|
|
94
|
-
drift?: {
|
|
95
|
-
changes: DriftChange[];
|
|
96
|
-
affectedFiles: AffectedFiles;
|
|
97
|
-
};
|
|
63
|
+
source: TestSource;
|
|
98
64
|
executionBefore?: TestExecutionResult;
|
|
99
65
|
executionAfter?: TestExecutionResult;
|
|
100
66
|
}
|
|
@@ -4,34 +4,6 @@ export var RecommendationPriority;
|
|
|
4
4
|
RecommendationPriority["Medium"] = "medium";
|
|
5
5
|
RecommendationPriority["Low"] = "low";
|
|
6
6
|
})(RecommendationPriority || (RecommendationPriority = {}));
|
|
7
|
-
export var IssueSeverity;
|
|
8
|
-
(function (IssueSeverity) {
|
|
9
|
-
IssueSeverity["Low"] = "low";
|
|
10
|
-
IssueSeverity["Medium"] = "medium";
|
|
11
|
-
IssueSeverity["High"] = "high";
|
|
12
|
-
IssueSeverity["Critical"] = "critical";
|
|
13
|
-
})(IssueSeverity || (IssueSeverity = {}));
|
|
14
|
-
export var DriftChangeType;
|
|
15
|
-
(function (DriftChangeType) {
|
|
16
|
-
DriftChangeType["EndpointAdded"] = "endpoint_added";
|
|
17
|
-
DriftChangeType["EndpointRemoved"] = "endpoint_removed";
|
|
18
|
-
DriftChangeType["EndpointRenamed"] = "endpoint_renamed";
|
|
19
|
-
DriftChangeType["EndpointModified"] = "endpoint_modified";
|
|
20
|
-
DriftChangeType["AuthenticationChanged"] = "authentication_changed";
|
|
21
|
-
DriftChangeType["SchemaChanges"] = "schema_changes";
|
|
22
|
-
DriftChangeType["RouteChanged"] = "route_changed";
|
|
23
|
-
DriftChangeType["RouteAdded"] = "route_added";
|
|
24
|
-
DriftChangeType["RouteRemoved"] = "route_removed";
|
|
25
|
-
DriftChangeType["UiComponentAdded"] = "ui_component_added";
|
|
26
|
-
DriftChangeType["UiComponentRemoved"] = "ui_component_removed";
|
|
27
|
-
DriftChangeType["UiComponentModified"] = "ui_component_modified";
|
|
28
|
-
DriftChangeType["UiComponentRestructured"] = "ui_component_restructured";
|
|
29
|
-
DriftChangeType["DependencyChanged"] = "dependency_changed";
|
|
30
|
-
DriftChangeType["FunctionChanged"] = "function_changed";
|
|
31
|
-
DriftChangeType["ClassChanged"] = "class_changed";
|
|
32
|
-
DriftChangeType["BreakingChange"] = "breaking_change";
|
|
33
|
-
DriftChangeType["CodeChange"] = "code_change";
|
|
34
|
-
})(DriftChangeType || (DriftChangeType = {}));
|
|
35
7
|
/** Origin of a test file — whether it was generated by Skyramp or is user/third-party maintained. */
|
|
36
8
|
export var TestSource;
|
|
37
9
|
(function (TestSource) {
|
package/build/types/TestTypes.js
CHANGED
|
@@ -18,6 +18,8 @@ export var TestType;
|
|
|
18
18
|
TestType["E2E"] = "e2e";
|
|
19
19
|
TestType["UI"] = "ui";
|
|
20
20
|
TestType["MOCK"] = "mock";
|
|
21
|
+
TestType["UNIT"] = "unit";
|
|
22
|
+
TestType["UNKNOWN"] = "unknown";
|
|
21
23
|
})(TestType || (TestType = {}));
|
|
22
24
|
export var HttpMethod;
|
|
23
25
|
(function (HttpMethod) {
|
|
@@ -80,7 +82,7 @@ export const baseSchema = z.object({
|
|
|
80
82
|
"Common values: 'Authorization' (Bearer/Basic/Token auth), 'X-Api-Key', 'X-Auth-Token', 'Cookie'. " +
|
|
81
83
|
"Other accepted values: 'X-Access-Token', 'X-OAuth-Token', 'X-Client-ID', 'X-Client-Secret', 'X-Client-Token', " +
|
|
82
84
|
"'X-GitHub-Token', 'X-Firebase-AppCheck', 'Proxy-Authorization', 'Fastly-Key', 'Heroku-Bearer'. " +
|
|
83
|
-
"Pass empty string to
|
|
85
|
+
"Pass empty string to document an unauthenticated endpoint in the generated test's assertions. " +
|
|
84
86
|
"This is the header KEY name (e.g., 'X-Api-Key'), NOT the token value."),
|
|
85
87
|
authScheme: z
|
|
86
88
|
.string()
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { TestAnalysisResult } from "../types/TestAnalysis.js";
|
|
1
|
+
import { TestAnalysisResult, MaintenanceActionCore } from "../types/TestAnalysis.js";
|
|
2
2
|
import { RepositoryAnalysis, AnalysisScope } from "../types/RepositoryAnalysis.js";
|
|
3
3
|
import { PRTestContext } from "./pr-comment-parser.js";
|
|
4
4
|
import { ParsedDiffEndpoint } from "./routeParsers.js";
|
|
5
5
|
import type { CandidateUiPage } from "./uiPageEnumerator.js";
|
|
6
|
+
import type { FrontendFileIntegration } from "../types/FrontendIntegration.js";
|
|
6
7
|
export type { CandidateUiPage } from "./uiPageEnumerator.js";
|
|
7
8
|
export declare function setTestsRepoDir(dir: string | undefined): void;
|
|
8
9
|
export declare function getTestsRepoDir(): string | undefined;
|
|
@@ -57,6 +58,12 @@ export interface UiAnalysisContext {
|
|
|
57
58
|
* Empty when no resolvable frontend baseUrl — agent falls back to prose-driven enumeration.
|
|
58
59
|
*/
|
|
59
60
|
candidateUiPages: CandidateUiPage[];
|
|
61
|
+
/**
|
|
62
|
+
* Per-file production-importer check (SKYR-3855) — server-computed so the
|
|
63
|
+
* "is this component actually integrated?" skip decision doesn't rely on
|
|
64
|
+
* the agent running its own grep mid-task. Same order as changedFrontendFiles.
|
|
65
|
+
*/
|
|
66
|
+
frontendFileIntegration?: FrontendFileIntegration[];
|
|
60
67
|
}
|
|
61
68
|
/**
|
|
62
69
|
* Unified state data combining test discovery + endpoint scanning
|
|
@@ -74,6 +81,11 @@ export interface UnifiedAnalysisState {
|
|
|
74
81
|
* Absent on backend-only PRs.
|
|
75
82
|
*/
|
|
76
83
|
uiContext?: UiAnalysisContext;
|
|
84
|
+
/** Existing-test fileNames skyramp_actions assessed and decided need no action. */
|
|
85
|
+
ignoredTestFiles?: string[];
|
|
86
|
+
/** Maintenance actions applied via skyramp_actions — skyramp_submit_report derives
|
|
87
|
+
* testMaintenance from this. */
|
|
88
|
+
maintenanceVerdicts?: MaintenanceActionCore[];
|
|
77
89
|
}
|
|
78
90
|
/**
|
|
79
91
|
* State file metadata
|
|
@@ -55,7 +55,7 @@ describe("dockerImageExistsLocally", () => {
|
|
|
55
55
|
});
|
|
56
56
|
});
|
|
57
57
|
describe("pullDockerImage", () => {
|
|
58
|
-
const IMAGE = "skyramp/executor:v1.3.
|
|
58
|
+
const IMAGE = "skyramp/executor:v1.3.32";
|
|
59
59
|
beforeEach(() => jest.clearAllMocks());
|
|
60
60
|
describe("on amd64 host", () => {
|
|
61
61
|
const originalArch = process.arch;
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
*/
|
|
32
32
|
export declare function isContractConsumerModeEnabled(): boolean;
|
|
33
33
|
/**
|
|
34
|
-
* Returns true when running inside a
|
|
34
|
+
* Returns true when running inside a Testbot environment
|
|
35
35
|
* (SKYRAMP_FEATURE_TESTBOT=1).
|
|
36
36
|
*/
|
|
37
37
|
export declare function isTestbotEnabled(): boolean;
|
|
@@ -33,7 +33,7 @@ export function isContractConsumerModeEnabled() {
|
|
|
33
33
|
return process.env.SKYRAMP_FEATURE_CONTRACT_CONSUMER_MODE === "1";
|
|
34
34
|
}
|
|
35
35
|
/**
|
|
36
|
-
* Returns true when running inside a
|
|
36
|
+
* Returns true when running inside a Testbot environment
|
|
37
37
|
* (SKYRAMP_FEATURE_TESTBOT=1).
|
|
38
38
|
*/
|
|
39
39
|
export function isTestbotEnabled() {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FrontendFileIntegration } from "../types/FrontendIntegration.js";
|
|
2
|
+
export type { FrontendFileIntegration } from "../types/FrontendIntegration.js";
|
|
3
|
+
/**
|
|
4
|
+
* Checks each changed frontend file for a production importer — the
|
|
5
|
+
* deterministic version of the grep the testbot prompt used to ask the
|
|
6
|
+
* agent to run mid-task. See module doc for the signature-based approach
|
|
7
|
+
* and the fail-open rationale.
|
|
8
|
+
*/
|
|
9
|
+
export declare function checkFrontendFileIntegration(repositoryPath: string, changedFrontendFiles: string[]): FrontendFileIntegration[];
|