@skyramp/mcp 0.4.2-rc.1 → 0.4.2-rc.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.
Files changed (104) hide show
  1. package/build/commands/localDevTestChangesCommand.js +1 -1
  2. package/build/commands/recommendTestsAndExecuteCommand.js +10 -1
  3. package/build/commands/testThisEndpointCommand.js +19 -2
  4. package/build/execution/wrapperConfig.d.ts +56 -0
  5. package/build/execution/wrapperConfig.js +155 -0
  6. package/build/index.js +6 -6
  7. package/build/playwright/registerPlaywrightTools.js +14 -0
  8. package/build/playwright/traceExportStore.d.ts +22 -0
  9. package/build/playwright/traceExportStore.js +81 -0
  10. package/build/playwright/traceRecordingPrompt.js +2 -1
  11. package/build/prompts/code-reuse.js +24 -21
  12. package/build/prompts/local-dev/local-dev-plan.js +6 -23
  13. package/build/prompts/local-dev/local-dev-prompts.js +1 -1
  14. package/build/prompts/shared-helper-policy.d.ts +36 -0
  15. package/build/prompts/shared-helper-policy.js +33 -1
  16. package/build/prompts/startTraceCollectionPrompts.js +1 -1
  17. package/build/prompts/sut-setup/modes/adaptWorkflowPrompt.js +6 -7
  18. package/build/prompts/sut-setup/shared.d.ts +1 -1
  19. package/build/prompts/sut-setup/shared.js +5 -3
  20. package/build/prompts/test-maintenance/drift-analysis-prompt.d.ts +16 -8
  21. package/build/prompts/test-maintenance/drift-analysis-prompt.js +90 -36
  22. package/build/prompts/test-maintenance/uiDriftAnalysisSections.js +1 -1
  23. package/build/prompts/test-recommendation/recommendationShared.d.ts +1 -1
  24. package/build/prompts/test-recommendation/recommendationShared.js +0 -1
  25. package/build/prompts/testbot/testbot-prompts.js +11 -9
  26. package/build/services/TestDiscoveryService.js +32 -4
  27. package/build/skills/runTestSkill.d.ts +6 -0
  28. package/build/skills/runTestSkill.js +17 -0
  29. package/build/tool-phases.js +0 -1
  30. package/build/tools/budgetExcuse.d.ts +15 -0
  31. package/build/tools/budgetExcuse.js +113 -0
  32. package/build/tools/code-refactor/utils-verify-gates.js +17 -3
  33. package/build/tools/executeSkyrampTestTool.d.ts +97 -48
  34. package/build/tools/executeSkyrampTestTool.js +775 -449
  35. package/build/tools/submitReportTool.js +128 -0
  36. package/build/tools/test-management/actionsTool.js +31 -0
  37. package/build/tools/test-management/analyzeChangesTool.d.ts +4 -4
  38. package/build/tools/test-management/analyzeTestHealthTool.d.ts +0 -11
  39. package/build/tools/test-management/analyzeTestHealthTool.js +7 -63
  40. package/build/tools/test-management/testsOwedBeforeRun.d.ts +28 -0
  41. package/build/tools/test-management/testsOwedBeforeRun.js +53 -0
  42. package/build/tools/trace/stopTraceCollectionTool.js +1 -1
  43. package/build/types/RepositoryAnalysis.d.ts +32 -32
  44. package/build/types/ReuseOutcome.d.ts +4 -3
  45. package/build/types/TestExecution.d.ts +2 -2
  46. package/build/types/TestTypes.d.ts +3 -0
  47. package/build/types/TestTypes.js +6 -0
  48. package/build/utils/AnalysisStateManager.d.ts +0 -7
  49. package/build/utils/AnalysisStateManager.js +1 -1
  50. package/build/utils/connectionErrors.d.ts +10 -0
  51. package/build/utils/connectionErrors.js +10 -0
  52. package/build/utils/language-helper.js +24 -3
  53. package/build/utils/progress.d.ts +1 -1
  54. package/build/utils/progress.js +1 -1
  55. package/build/utils/rebaselineSnapshots.d.ts +1 -1
  56. package/build/utils/rebaselineSnapshots.js +6 -16
  57. package/build/utils/reuseRouting.d.ts +10 -0
  58. package/build/utils/reuseRouting.js +15 -0
  59. package/build/utils/runContextGauge.d.ts +27 -0
  60. package/build/utils/runContextGauge.js +181 -0
  61. package/build/utils/skyrampMdContent.d.ts +1 -1
  62. package/build/utils/skyrampMdContent.js +1 -1
  63. package/build/utils/skyrampSdkVersion.d.ts +9 -0
  64. package/build/utils/skyrampSdkVersion.js +16 -0
  65. package/build/utils/testDependencyPolicy.js +21 -0
  66. package/build/utils/testExecutionRecord.d.ts +5 -1
  67. package/build/utils/testExecutionRecord.js +3 -1
  68. package/build/utils/testFileClassification.d.ts +8 -0
  69. package/build/utils/testFileClassification.js +36 -3
  70. package/build/utils/utils-verify/action-key.d.ts +42 -0
  71. package/build/utils/utils-verify/action-key.js +118 -36
  72. package/build/utils/utils-verify/action-sites.d.ts +32 -0
  73. package/build/utils/utils-verify/action-sites.js +202 -0
  74. package/build/utils/utils-verify/body-reach.js +2 -4
  75. package/build/utils/utils-verify/call-sites.d.ts +25 -6
  76. package/build/utils/utils-verify/call-sites.js +8 -5
  77. package/build/utils/utils-verify/index.d.ts +1 -0
  78. package/build/utils/utils-verify/index.js +1 -0
  79. package/build/utils/utils-verify/language-spec.d.ts +25 -0
  80. package/build/utils/utils-verify/language-spec.js +16 -2
  81. package/build/utils/utils-verify/parse.d.ts +10 -1
  82. package/build/utils/utils-verify/parse.js +19 -2
  83. package/build/utils/utils-verify/verify.d.ts +3 -2
  84. package/build/utils/utils-verify/verify.js +16 -18
  85. package/build/workspace/workspace.d.ts +72 -52
  86. package/build/workspace/workspace.js +12 -8
  87. package/package.json +1 -1
  88. package/plugin/prompts/testbot-task1.md +0 -2
  89. package/plugin/skills/fix-test-import-errors/SKILL.md +2 -1
  90. package/plugin/skills/run-test/SKILL.md +16 -0
  91. package/build/adapters/jestAdapter.d.ts +0 -14
  92. package/build/adapters/jestAdapter.js +0 -131
  93. package/build/adapters/mochaAdapter.d.ts +0 -13
  94. package/build/adapters/mochaAdapter.js +0 -93
  95. package/build/adapters/playwrightAdapter.d.ts +0 -17
  96. package/build/adapters/playwrightAdapter.js +0 -184
  97. package/build/adapters/pytestAdapter.d.ts +0 -15
  98. package/build/adapters/pytestAdapter.js +0 -119
  99. package/build/tools/runExistingTestsTool.d.ts +0 -138
  100. package/build/tools/runExistingTestsTool.js +0 -666
  101. package/build/types/ExternalTestExecution.d.ts +0 -67
  102. package/build/types/ExternalTestExecution.js +0 -8
  103. package/build/workspace/testSuites.d.ts +0 -20
  104. package/build/workspace/testSuites.js +0 -17
@@ -1,67 +0,0 @@
1
- /**
2
- * Neutral result shape for `skyramp_run_existing_tests` — a repo's OWN
3
- * (external, user-authored) test suite, run at PR time to CONFIRM which failures
4
- * a change actually causes. Framework-agnostic: the Playwright adapter (and
5
- * future pytest/jest adapters) all normalize into these types so the
6
- * maintenance pipeline and report consume one shape.
7
- */
8
- /** `error` (fixture/collection/timeout) is kept distinct from `fail`
9
- * (assertion) end-to-end — see external-exec plan item 6. */
10
- export type ExternalTestStatus = "pass" | "fail" | "error" | "skipped";
11
- export interface ExternalTestResult {
12
- /** Human-readable identity, e.g. `<file> › <describe…> › <title>`. */
13
- testId: string;
14
- /** Spec file the test lives in. */
15
- file: string;
16
- status: ExternalTestStatus;
17
- /** Failure/error text (ANSI-stripped). Present only for fail/error. */
18
- message?: string;
19
- durationMs: number;
20
- }
21
- export interface ExternalRunSummary {
22
- /** Tests that produced a real verdict (pass + fail + error); skipped excluded. */
23
- ran: number;
24
- failed: number;
25
- errored: number;
26
- skipped: number;
27
- /** True when the candidate set was cut by maxTests/timeout — reported honestly. */
28
- truncated: boolean;
29
- }
30
- /** Structured env-health diagnostics for logging (populated by the framework adapter). */
31
- export interface ExternalRunDiagnostics {
32
- /** All top-level Playwright run-level error messages (ANSI-stripped, first line each). */
33
- runLevelErrors: string[];
34
- /** A global-setup/teardown (infra) spec reported fail/error — the environment genuinely
35
- * did not come up (distinct from a product-test failure). */
36
- infraSpecFailed: boolean;
37
- /** A run-level error is the `--max-failures` "stopped early" bail — benign for env-health
38
- * (it means a test failed and the bounded run stopped, NOT that the env is unhealthy). */
39
- maxFailuresBail: boolean;
40
- }
41
- export interface ParsedExternalRun {
42
- results: ExternalTestResult[];
43
- summary: ExternalRunSummary;
44
- /** False when a wall of red is environmental (setup/collection failure), not a
45
- * PR signal — consumers must NOT treat results as confirmed failures. */
46
- environmentHealthy: boolean;
47
- healthDetail?: string;
48
- /** Structured diagnostics for logging (optional; set by the Playwright adapter). */
49
- diagnostics?: ExternalRunDiagnostics;
50
- /** True when the run was skipped because the repo has no runnable external suite
51
- * (no Playwright service / no `testRunCommand`) — i.e. no external tests to
52
- * run. Distinct from a green zero-test run: consumers must treat this as "not
53
- * executed", never "passed". */
54
- skipped?: boolean;
55
- /** Why the run was skipped (present only when `skipped`). */
56
- skipReason?: string;
57
- }
58
- /** One persisted run of the external suite, appended to
59
- * UnifiedAnalysisState.externalTestResults so drift analysis / the report can
60
- * fold in CONFIRMED failures instead of guesses. */
61
- export interface ExternalTestRunRecord extends ParsedExternalRun {
62
- mode: "confirm" | "verify";
63
- /** ISO timestamp when the run completed. */
64
- ranAt: string;
65
- /** owner/repo this run targeted. */
66
- repository: string;
67
- }
@@ -1,8 +0,0 @@
1
- /**
2
- * Neutral result shape for `skyramp_run_existing_tests` — a repo's OWN
3
- * (external, user-authored) test suite, run at PR time to CONFIRM which failures
4
- * a change actually causes. Framework-agnostic: the Playwright adapter (and
5
- * future pytest/jest adapters) all normalize into these types so the
6
- * maintenance pipeline and report consume one shape.
7
- */
8
- export {};
@@ -1,20 +0,0 @@
1
- import type { Service } from "./workspace.js";
2
- /**
3
- * A single test suite (one runtimeDetails.testSuites[] entry) flattened to one
4
- * uniform shape, carrying its owning serviceName so routing/aggregation can label
5
- * results per suite, and a framework resolved against the service's.
6
- */
7
- export interface NormalizedSuite {
8
- serviceName: string;
9
- framework?: string;
10
- testRunCommand: string;
11
- testEnv?: Record<string, string>;
12
- /** Repo-relative globs this suite owns, for selector→suite routing. */
13
- pathGlobs?: string[];
14
- }
15
- /**
16
- * Normalizes a service's runtimeDetails.testSuites into a flat list of suites
17
- * (SKYR-4002), each carrying its owning serviceName and a framework that falls
18
- * back to the service's. Returns [] when the service records no testSuites.
19
- */
20
- export declare function resolveSuites(service: Service): NormalizedSuite[];
@@ -1,17 +0,0 @@
1
- /**
2
- * Normalizes a service's runtimeDetails.testSuites into a flat list of suites
3
- * (SKYR-4002), each carrying its owning serviceName and a framework that falls
4
- * back to the service's. Returns [] when the service records no testSuites.
5
- */
6
- export function resolveSuites(service) {
7
- const suites = service.runtimeDetails?.testSuites;
8
- if (!suites)
9
- return [];
10
- return suites.map((suite) => ({
11
- serviceName: service.serviceName,
12
- framework: suite.framework ?? service.framework,
13
- testRunCommand: suite.testRunCommand,
14
- testEnv: suite.testEnv,
15
- pathGlobs: suite.pathGlobs,
16
- }));
17
- }