@skyramp/mcp 0.4.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.
- package/build/commands/localDevTestChangesCommand.js +2 -1
- package/build/commands/recommendTestsAndExecuteCommand.js +15 -7
- package/build/commands/testThisEndpointCommand.js +35 -6
- package/build/execution/wrapperConfig.d.ts +56 -0
- package/build/execution/wrapperConfig.js +155 -0
- package/build/index.js +40 -10
- package/build/playwright/blueprintDigest.js +28 -7
- package/build/playwright/registerPlaywrightTools.js +47 -28
- package/build/playwright/traceExportStore.d.ts +22 -0
- package/build/playwright/traceExportStore.js +81 -0
- package/build/playwright/traceRecordingPrompt.js +11 -3
- package/build/prompts/code-reuse.js +118 -49
- package/build/prompts/fix-error-prompt.d.ts +9 -1
- package/build/prompts/fix-error-prompt.js +31 -28
- package/build/prompts/local-dev/local-dev-plan.d.ts +3 -0
- package/build/prompts/local-dev/local-dev-plan.js +8 -23
- package/build/prompts/local-dev/local-dev-prompts.d.ts +1 -1
- package/build/prompts/local-dev/local-dev-prompts.js +31 -4
- package/build/prompts/modularization/integration-test-modularization.js +13 -6
- package/build/prompts/modularization/ui-test-modularization.js +1 -1
- package/build/prompts/personas.js +1 -1
- package/build/prompts/pom-aware-code-reuse.js +7 -9
- package/build/prompts/reuse-hand-off.d.ts +64 -0
- package/build/prompts/reuse-hand-off.js +130 -0
- package/build/prompts/shared-helper-policy.d.ts +124 -2
- package/build/prompts/shared-helper-policy.js +178 -12
- package/build/prompts/startTraceCollectionPrompts.js +1 -1
- package/build/prompts/sut-setup/modes/adaptWorkflowPrompt.js +7 -8
- package/build/prompts/sut-setup/modes/dockerComposePrompt.js +1 -1
- package/build/prompts/sut-setup/shared.d.ts +4 -1
- package/build/prompts/sut-setup/shared.js +6 -4
- package/build/prompts/test-maintenance/actionsInstructions.d.ts +19 -11
- package/build/prompts/test-maintenance/actionsInstructions.js +47 -26
- package/build/prompts/test-maintenance/drift-analysis-prompt.d.ts +16 -8
- package/build/prompts/test-maintenance/drift-analysis-prompt.js +93 -38
- package/build/prompts/test-maintenance/driftAnalysisSections.js +5 -3
- package/build/prompts/test-maintenance/driftAnalysisShared.js +4 -2
- package/build/prompts/test-maintenance/uiDriftAnalysisSections.js +8 -5
- package/build/prompts/test-recommendation/recommendationSections.js +19 -8
- package/build/prompts/test-recommendation/recommendationShared.d.ts +1 -1
- package/build/prompts/test-recommendation/recommendationShared.js +0 -1
- package/build/prompts/test-recommendation/registerRecommendTestsPrompt.js +5 -2
- package/build/prompts/test-recommendation/test-recommendation-prompt.js +10 -7
- package/build/prompts/testbot/testbot-prompts.js +133 -63
- package/build/recommendation/answers.js +18 -9
- package/build/recommendation/pullRequestText.js +1 -1
- package/build/recommendation/registerPlan.js +31 -17
- package/build/recommendation/subjectStep.d.ts +8 -10
- package/build/recommendation/subjectStep.js +17 -16
- package/build/recommendation/types.d.ts +71 -17
- package/build/recommendation/types.js +9 -15
- package/build/recommendation/verifierContracts.d.ts +7 -3
- package/build/recommendation/verifierContracts.js +8 -4
- package/build/recommendation/verifiers/changedFile.js +11 -13
- package/build/recommendation/verifiers/citedPath.d.ts +8 -0
- package/build/recommendation/verifiers/citedPath.js +16 -2
- package/build/recommendation/verifiers/coverage.d.ts +2 -2
- package/build/recommendation/verifiers/coverage.js +190 -134
- package/build/recommendation/verifiers/defects.js +56 -16
- package/build/recommendation/verifiers/deliveredMatchesPlan.d.ts +7 -1
- package/build/recommendation/verifiers/deliveredMatchesPlan.js +28 -14
- package/build/recommendation/verifiers/endpointGrounded.js +14 -8
- package/build/recommendation/verifiers/existingCoverage.d.ts +6 -0
- package/build/recommendation/verifiers/existingCoverage.js +30 -21
- package/build/recommendation/verifiers/expectedOutcome.js +17 -8
- package/build/recommendation/verifiers/expectedValueSourced.js +54 -43
- package/build/recommendation/verifiers/issueTraceability.d.ts +5 -0
- package/build/recommendation/verifiers/issueTraceability.js +64 -7
- package/build/recommendation/verifiers/removedElementGuarded.js +19 -11
- package/build/recommendation/verifiers/reportedCategory.js +9 -4
- package/build/recommendation/verifiers/requirementSourced.js +34 -21
- package/build/recommendation/verifiers/screenRoute.js +15 -10
- package/build/recommendation/verifiers/statedDifference.js +15 -8
- package/build/recommendation/verifiers/uiElementGrounded.js +50 -16
- package/build/resources/analysisResources.js +7 -3
- package/build/resources/progressResource.js +4 -2
- package/build/resources/sutSetupResource.js +20 -2
- package/build/resources/testbotResource.js +19 -1
- package/build/services/AnalyticsService.js +3 -1
- package/build/services/ScenarioGenerationService.js +5 -5
- package/build/services/TestDiscoveryService.js +53 -9
- package/build/services/TestExecutionService.js +63 -21
- package/build/services/TestGenerationService.d.ts +1 -1
- package/build/services/TestGenerationService.js +43 -24
- package/build/skills/enhanceAssertionsSkill.d.ts +45 -0
- package/build/skills/enhanceAssertionsSkill.js +103 -0
- package/build/skills/fixTestImportErrorsSkill.d.ts +2 -2
- package/build/skills/fixTestImportErrorsSkill.js +2 -2
- package/build/skills/runTestSkill.d.ts +6 -0
- package/build/skills/runTestSkill.js +17 -0
- package/build/skills/skillFiles.d.ts +38 -0
- package/build/skills/skillFiles.js +94 -0
- package/build/skills/validateAssertionAlignmentSkill.d.ts +34 -0
- package/build/skills/validateAssertionAlignmentSkill.js +59 -0
- package/build/tool-phases.js +4 -1
- package/build/tools/auth/loginTool.js +3 -1
- package/build/tools/auth/logoutTool.js +3 -1
- package/build/tools/budgetExcuse.d.ts +15 -0
- package/build/tools/budgetExcuse.js +113 -0
- package/build/tools/code-refactor/alignAssertionsTool.d.ts +2 -0
- package/build/tools/code-refactor/alignAssertionsTool.js +51 -0
- package/build/tools/code-refactor/assertion-state.d.ts +1 -1
- package/build/tools/code-refactor/assertion-state.js +1 -1
- package/build/tools/code-refactor/assertionOperations.d.ts +44 -0
- package/build/tools/code-refactor/assertionOperations.js +82 -0
- package/build/tools/code-refactor/assertionSkillTools.d.ts +3 -0
- package/build/tools/code-refactor/assertionSkillTools.js +86 -0
- package/build/tools/code-refactor/codeReuseTool.js +27 -3
- package/build/tools/code-refactor/enhanceAssertionsTool.js +19 -83
- package/build/tools/code-refactor/gate-markers.d.ts +51 -0
- package/build/tools/code-refactor/gate-markers.js +95 -0
- package/build/tools/code-refactor/retrofit-state.d.ts +3 -1
- package/build/tools/code-refactor/retrofit-state.js +44 -2
- package/build/tools/code-refactor/reuse-outcome.d.ts +23 -1
- package/build/tools/code-refactor/reuse-outcome.js +36 -13
- package/build/tools/code-refactor/reuse-state.d.ts +90 -16
- package/build/tools/code-refactor/reuse-state.js +191 -61
- package/build/tools/code-refactor/utils-verify-gates.d.ts +4 -0
- package/build/tools/code-refactor/utils-verify-gates.js +269 -30
- package/build/tools/code-refactor/verify-gates.d.ts +15 -1
- package/build/tools/code-refactor/verify-gates.js +36 -4
- package/build/tools/enrichTestWithMocksTool.d.ts +1 -1
- package/build/tools/enrichTestWithMocksTool.js +9 -5
- package/build/tools/executeSkyrampTestTool.d.ts +118 -48
- package/build/tools/executeSkyrampTestTool.js +998 -372
- package/build/tools/execution-video-state.js +1 -1
- package/build/tools/fixErrorTool.js +5 -6
- package/build/tools/generate-tests/batchMockGenerationTool.js +1 -1
- package/build/tools/generate-tests/generateBatchScenarioRestTool.js +114 -73
- package/build/tools/generate-tests/generateContractRestTool.js +34 -16
- package/build/tools/generate-tests/generateE2ERestTool.d.ts +1 -0
- package/build/tools/generate-tests/generateE2ERestTool.js +9 -1
- package/build/tools/generate-tests/generateIntegrationRestTool.js +22 -7
- package/build/tools/generate-tests/generateMockRestTool.js +3 -1
- package/build/tools/generate-tests/generateUIRestTool.d.ts +2 -0
- package/build/tools/generate-tests/generateUIRestTool.js +11 -2
- package/build/tools/generate-tests/loadTestSchema.js +1 -3
- package/build/tools/generate-tests/planGuard.js +6 -3
- package/build/tools/generate-tests/scenarioFileIdentity.js +4 -1
- package/build/tools/generate-tests/scenarioLint.js +17 -5
- package/build/tools/generate-tests/trace-reuse-guard.js +5 -2
- package/build/tools/generateEnrichedIntegrationTestTool.js +9 -3
- package/build/tools/one-click/oneClickTool.js +3 -1
- package/build/tools/preflightMockCheckTool.js +23 -7
- package/build/tools/submitReportTool.d.ts +51 -12
- package/build/tools/submitReportTool.js +988 -161
- package/build/tools/test-management/actionsTool.js +241 -51
- package/build/tools/test-management/analyzeChangesTool.d.ts +8 -9
- package/build/tools/test-management/analyzeChangesTool.js +127 -68
- package/build/tools/test-management/analyzeTestHealthTool.d.ts +0 -11
- package/build/tools/test-management/analyzeTestHealthTool.js +42 -76
- package/build/tools/test-management/registerTestPlanTool.d.ts +44 -34
- package/build/tools/test-management/registerTestPlanTool.js +255 -111
- package/build/tools/test-management/resolveScreenTool.js +33 -9
- package/build/tools/test-management/testsOwedBeforeRun.d.ts +28 -0
- package/build/tools/test-management/testsOwedBeforeRun.js +53 -0
- package/build/tools/trace/startTraceCollectionTool.js +3 -1
- package/build/tools/trace/stopTraceCollectionTool.js +42 -6
- package/build/tools/verifyTestDependenciesTool.d.ts +3 -0
- package/build/tools/verifyTestDependenciesTool.js +54 -0
- package/build/tools/workspace/initScanWorkspaceTool.js +9 -3
- package/build/tools/workspace/initializeWorkspaceTool.js +3 -1
- package/build/types/AssertionOutcome.d.ts +1 -1
- package/build/types/EnhanceType.d.ts +6 -0
- package/build/types/EnhanceType.js +1 -0
- package/build/types/RepositoryAnalysis.d.ts +32 -72
- package/build/types/ReuseOutcome.d.ts +100 -7
- package/build/types/ReuseOutcome.js +16 -0
- package/build/types/StepMethod.js +20 -6
- package/build/types/TestAnalysis.d.ts +10 -2
- package/build/types/TestExecution.d.ts +45 -0
- package/build/types/TestRecommendation.d.ts +1 -1
- package/build/types/TestRecommendation.js +4 -1
- package/build/types/TestTypes.d.ts +16 -0
- package/build/types/TestTypes.js +40 -3
- package/build/types/TestbotPromptOptions.d.ts +9 -1
- package/build/types/TestbotReport.d.ts +45 -9
- package/build/utils/AnalysisStateManager.d.ts +137 -34
- package/build/utils/AnalysisStateManager.js +228 -44
- package/build/utils/assertion-verify/api-shared-lints.js +34 -16
- package/build/utils/assertion-verify/metrics.js +39 -6
- package/build/utils/assertion-verify/ui-lints.js +4 -2
- package/build/utils/branchDiff.js +47 -12
- package/build/utils/canonicalJson.js +3 -1
- package/build/utils/connectionErrors.d.ts +10 -0
- package/build/utils/connectionErrors.js +10 -0
- package/build/utils/dartRouteExtractor.js +36 -7
- package/build/utils/fixAttempts.d.ts +26 -0
- package/build/utils/fixAttempts.js +109 -0
- package/build/utils/frontendSelectors.js +23 -4
- package/build/utils/generatedTestRecord.d.ts +19 -0
- package/build/utils/generatedTestRecord.js +61 -0
- package/build/utils/gitStaging.js +7 -2
- package/build/utils/initAgent.js +26 -6
- package/build/utils/language-helper.js +60 -45
- package/build/utils/pathMatching.js +2 -1
- package/build/utils/pathSignatures.js +6 -2
- package/build/utils/planMatchKeys.d.ts +2 -2
- package/build/utils/planMatchKeys.js +20 -14
- package/build/utils/pom-catalog-parse.js +7 -2
- package/build/utils/pom-scope/import-expansion.js +6 -1
- package/build/utils/pom-scope/index.js +50 -12
- package/build/utils/pom-scope/scoring.js +13 -3
- package/build/utils/pom-scope/selector-extractor.js +16 -3
- package/build/utils/pom-scope/strip.d.ts +8 -0
- package/build/utils/pom-scope/strip.js +238 -0
- package/build/utils/pom-scope/testIdDiscovery.js +14 -2
- package/build/utils/pom-verify/__fixtures__/af-style/asset-list.page.d.ts +1 -1
- package/build/utils/pom-verify/__fixtures__/af-style/asset-list.page.js +4 -2
- package/build/utils/pom-verify/__fixtures__/af-style/report.iframe.page.js +3 -1
- package/build/utils/pom-verify/__fixtures__/af-style/workflow-footer.page.js +3 -1
- package/build/utils/pom-verify/bindings.js +5 -1
- package/build/utils/pom-verify/calls.js +9 -2
- package/build/utils/pom-verify/verify.js +27 -5
- package/build/utils/pr-comment-parser.js +20 -7
- package/build/utils/progress.d.ts +1 -1
- package/build/utils/progress.js +1 -1
- package/build/utils/proxy-terminal.d.ts +19 -1
- package/build/utils/proxy-terminal.js +346 -21
- package/build/utils/rebaselineSnapshots.d.ts +1 -1
- package/build/utils/rebaselineSnapshots.js +6 -16
- package/build/utils/removedUiElements.js +1 -1
- package/build/utils/reportLanguage.js +35 -7
- package/build/utils/reportVerification.d.ts +14 -8
- package/build/utils/reportVerification.js +19 -19
- package/build/utils/repositorySlug.d.ts +32 -0
- package/build/utils/repositorySlug.js +77 -0
- package/build/utils/reuseRouting.d.ts +10 -0
- package/build/utils/reuseRouting.js +21 -2
- package/build/utils/runContextGauge.d.ts +27 -0
- package/build/utils/runContextGauge.js +181 -0
- package/build/utils/runSerialized.d.ts +3 -0
- package/build/utils/runSerialized.js +39 -0
- package/build/utils/screenRoutes.js +74 -18
- package/build/utils/skyrampMdContent.d.ts +1 -1
- package/build/utils/skyrampMdContent.js +1 -1
- package/build/utils/skyrampSdkVersion.d.ts +9 -0
- package/build/utils/skyrampSdkVersion.js +16 -0
- package/build/utils/sourceRouteExtractor.js +13 -6
- package/build/utils/telemetry.d.ts +1 -0
- package/build/utils/telemetry.js +8 -5
- package/build/utils/testDependencyPolicy.d.ts +9 -0
- package/build/utils/testDependencyPolicy.js +809 -0
- package/build/utils/testExecutionRecord.d.ts +94 -0
- package/build/utils/testExecutionRecord.js +269 -0
- package/build/utils/testFileClassification.d.ts +8 -0
- package/build/utils/testFileClassification.js +39 -4
- package/build/utils/trace-parser.js +62 -14
- package/build/utils/urlPath.js +3 -1
- package/build/utils/utils-verify/action-key.d.ts +46 -0
- package/build/utils/utils-verify/action-key.js +120 -38
- package/build/utils/utils-verify/action-sites.d.ts +32 -0
- package/build/utils/utils-verify/action-sites.js +202 -0
- package/build/utils/utils-verify/allow.d.ts +122 -3
- package/build/utils/utils-verify/allow.js +146 -21
- package/build/utils/utils-verify/body-reach.d.ts +120 -0
- package/build/utils/utils-verify/body-reach.js +333 -0
- package/build/utils/utils-verify/call-sites.d.ts +31 -7
- package/build/utils/utils-verify/call-sites.js +80 -13
- package/build/utils/utils-verify/delivered-imports.d.ts +43 -0
- package/build/utils/utils-verify/delivered-imports.js +84 -0
- package/build/utils/utils-verify/fixed-sleep.d.ts +96 -0
- package/build/utils/utils-verify/fixed-sleep.js +461 -0
- package/build/utils/utils-verify/in-house.d.ts +93 -0
- package/build/utils/utils-verify/in-house.js +719 -0
- package/build/utils/utils-verify/incumbent.d.ts +3 -0
- package/build/utils/utils-verify/incumbent.js +75 -0
- package/build/utils/utils-verify/index.d.ts +2 -0
- package/build/utils/utils-verify/index.js +2 -0
- package/build/utils/utils-verify/language-spec.d.ts +51 -10
- package/build/utils/utils-verify/language-spec.js +232 -21
- package/build/utils/utils-verify/locate.d.ts +26 -0
- package/build/utils/utils-verify/locate.js +125 -23
- package/build/utils/utils-verify/module-name.d.ts +40 -0
- package/build/utils/utils-verify/module-name.js +98 -0
- package/build/utils/utils-verify/parse.d.ts +56 -7
- package/build/utils/utils-verify/parse.js +195 -40
- package/build/utils/utils-verify/retrofit-equivalence.d.ts +5 -0
- package/build/utils/utils-verify/retrofit-equivalence.js +4 -2
- package/build/utils/utils-verify/stage.d.ts +5 -0
- package/build/utils/utils-verify/stage.js +47 -2
- package/build/utils/utils-verify/status-once.d.ts +62 -0
- package/build/utils/utils-verify/status-once.js +207 -0
- package/build/utils/utils-verify/typecheck.d.ts +61 -0
- package/build/utils/utils-verify/typecheck.js +338 -0
- package/build/utils/utils-verify/verify.d.ts +79 -3
- package/build/utils/utils-verify/verify.js +531 -61
- package/build/utils/versions.d.ts +3 -3
- package/build/utils/versions.js +1 -1
- package/build/utils/workspaceAuth.js +107 -37
- package/build/workspace/queryParamResolution.js +11 -4
- package/build/workspace/workspace.d.ts +72 -52
- package/build/workspace/workspace.js +19 -15
- package/node_modules/playwright/ThirdPartyNotices.txt +19 -19
- package/node_modules/playwright/lib/mcp/skyramp/assertTool.js +8 -2
- package/node_modules/playwright/lib/mcp/skyramp/common/cssValue.js +87 -0
- package/node_modules/playwright/lib/mcp/skyramp/loadTraceTool.js +31 -0
- package/node_modules/playwright/lib/mcp/skyramp/skyRampImport.js +3 -0
- package/node_modules/playwright/lib/mcp/skyramp/traceRecordingBackend.js +181 -15
- package/node_modules/playwright/lib/mcp/test/skyRampExport.js +24 -0
- package/node_modules/playwright/lib/transform/babelBundleImpl.js +2353 -190
- package/node_modules/playwright/node_modules/playwright-core/ThirdPartyNotices.txt +62 -34
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/.package-lock.json +72 -41
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/@hono/node-server/dist/serve-static.js +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/@hono/node-server/dist/serve-static.mjs +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/@hono/node-server/package.json +2 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/README.md +16 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/index.js +4 -20
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/lib/read.js +17 -17
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/lib/types/json.js +60 -32
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/lib/types/raw.js +3 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/lib/types/text.js +3 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/lib/types/urlencoded.js +16 -20
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/lib/utils.js +18 -16
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/node_modules/content-type/LICENSE +22 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/node_modules/content-type/README.md +71 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/node_modules/content-type/dist/index.d.ts +46 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/node_modules/content-type/dist/index.js +176 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/node_modules/content-type/dist/index.js.map +1 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/node_modules/content-type/package.json +52 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/package.json +23 -10
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/es-object-atoms/CHANGELOG.md +21 -14
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/es-object-atoms/isObject.d.ts +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/es-object-atoms/package.json +6 -7
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/es-object-atoms/tsconfig.json +1 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/index.js +266 -45
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/lib/schemes.js +9 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/lib/utils.js +396 -92
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/package.json +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/component-safe-serialization.test.js +163 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/equal.test.js +31 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/fixtures/uri-js-parse.json +2 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/ipv6-canonical.test.js +34 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/ipv6-validation.test.js +124 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/malformed-percent.test.js +77 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/malformed-urn.test.js +61 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/parse.test.js +7 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/query-fragment-normalization.test.js +33 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/reserved-path-normalization.test.js +109 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/scheme-validation.test.js +124 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/security-normalization.test.js +101 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/security.test.js +301 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/urn-full-input.test.js +29 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/websocket-query-preservation.test.js +24 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hasown/CHANGELOG.md +7 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hasown/index.d.ts +0 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hasown/package.json +4 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/client/client.js +30 -16
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/client/utils.js +4 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/context.js +32 -13
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/helper/accepts/accepts.js +36 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/helper/proxy/index.js +4 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/helper/ssg/ssg.js +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/helper/ssg/utils.js +30 -10
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/helper/streaming/sse.js +5 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/hono-base.js +10 -8
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/jsx/base.js +44 -23
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/jsx/components.js +25 -26
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/jsx/context.js +5 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/jsx/dom/render.js +2 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/jsx/dom/server.js +5 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/jsx/hooks/index.js +16 -13
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/jsx/intrinsic-element/components.js +3 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/jsx/streaming.js +4 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/cache/index.js +103 -8
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/compress/index.js +5 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/cors/index.js +17 -14
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/csrf/index.js +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/etag/digest.js +47 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/etag/index.js +7 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/jwk/jwk.js +9 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/jwt/jwt.js +9 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/language/language.js +10 -6
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/method-not-allowed/index.js +90 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/pretty-json/index.js +3 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/secure-headers/secure-headers.js +16 -7
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/request.js +20 -13
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router/linear-router/router.js +7 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router/pattern-router/router.js +3 -9
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router/reg-exp-router/node.js +65 -59
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router/reg-exp-router/router.js +71 -128
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router/reg-exp-router/trie.js +14 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router/trie-router/node.js +47 -70
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router/trie-router/router.js +3 -11
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router/utils.js +27 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router.js +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/utils/accept.js +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/utils/body.js +21 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/utils/cookie.js +4 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/utils/ipaddr.js +5 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/utils/stream.js +12 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/utils/url.js +19 -11
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/client/client.js +30 -16
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/client/utils.js +4 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/context.js +32 -13
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/helper/accepts/accepts.js +36 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/helper/proxy/index.js +4 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/helper/ssg/ssg.js +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/helper/ssg/utils.js +30 -10
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/helper/streaming/sse.js +5 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/hono-base.js +10 -8
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/jsx/base.js +41 -23
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/jsx/components.js +26 -27
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/jsx/context.js +6 -6
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/jsx/dom/render.js +2 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/jsx/dom/server.js +5 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/jsx/hooks/index.js +16 -13
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/jsx/intrinsic-element/components.js +4 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/jsx/streaming.js +5 -6
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/cache/index.js +103 -8
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/compress/index.js +5 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/cors/index.js +17 -14
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/csrf/index.js +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/etag/digest.js +47 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/etag/index.js +7 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/jwk/jwk.js +9 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/jwt/jwt.js +9 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/language/language.js +10 -6
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/method-not-allowed/index.js +68 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/pretty-json/index.js +3 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/secure-headers/secure-headers.js +16 -7
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/request.js +21 -14
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router/linear-router/router.js +7 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router/pattern-router/router.js +3 -9
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router/reg-exp-router/node.js +61 -58
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router/reg-exp-router/router.js +77 -129
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router/reg-exp-router/trie.js +14 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router/trie-router/node.js +47 -70
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router/trie-router/router.js +3 -11
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router/utils.js +5 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router.js +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/adapter/aws-lambda/types.d.ts +9 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/client/types.d.ts +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/context.d.ts +6 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/hono-base.d.ts +4 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/jsx/base.d.ts +7 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/jsx/dom/index.d.ts +5 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/jsx/dom/intrinsic-element/components.d.ts +2 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/jsx/dom/server.d.ts +5 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/jsx/hooks/index.d.ts +8 -6
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/jsx/index.d.ts +5 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/middleware/cache/index.d.ts +6 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/middleware/combine/index.d.ts +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/middleware/cors/index.d.ts +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/middleware/jsx-renderer/index.d.ts +2 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/middleware/jwk/jwk.d.ts +2 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/middleware/jwt/jwt.d.ts +2 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/middleware/method-not-allowed/index.d.ts +49 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/middleware/secure-headers/permissions-policy.d.ts +3 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/router/reg-exp-router/node.d.ts +4 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/router/reg-exp-router/trie.d.ts +2 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/router/trie-router/node.d.ts +1 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/router/trie-router/router.d.ts +0 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/router/utils.d.ts +1 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/router.d.ts +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/utils/headers.d.ts +2 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/utils/url.d.ts +5 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/utils/accept.js +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/utils/body.js +21 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/utils/cookie.js +5 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/utils/ipaddr.js +5 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/utils/stream.js +12 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/utils/url.js +17 -10
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/package.json +11 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/README.md +173 -143
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/address-error.d.ts +11 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/address-error.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/common.d.ts +49 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/common.js +79 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/common.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/ipv4.d.ts +78 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/ipv4.js +119 -24
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/ipv4.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/ipv6.d.ts +151 -10
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/ipv6.js +316 -90
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/ipv6.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/v4/constants.d.ts +12 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/v4/constants.js +45 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/v4/constants.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/v6/constants.d.ts +14 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/v6/constants.js +50 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/v6/constants.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/package.json +6 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/.github/THREAT_MODEL.md +3 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/CHANGELOG.md +26 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/README.md +19 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/dist/qs.js +25 -25
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/eslint.config.mjs +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/lib/parse.js +16 -6
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/lib/stringify.js +23 -8
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/lib/utils.js +57 -11
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/package.json +8 -7
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/test/parse.js +419 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/test/stringify.js +317 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/test/utils.js +206 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/side-channel/CHANGELOG.md +10 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/side-channel/README.md +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/side-channel/index.js +5 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/side-channel/package.json +10 -10
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/side-channel/test/index.js +16 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/type-is/index.js +8 -18
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/type-is/node_modules/content-type/LICENSE +22 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/type-is/node_modules/content-type/README.md +71 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/type-is/node_modules/content-type/dist/index.d.ts +46 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/type-is/node_modules/content-type/dist/index.js +176 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/type-is/node_modules/content-type/dist/index.js.map +1 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/type-is/node_modules/content-type/package.json +52 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/type-is/package.json +9 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/package-lock.json +72 -41
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/.package-lock.json +6 -6
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/brace-expansion/README.md +23 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/brace-expansion/index.js +265 -86
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/brace-expansion/package.json +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/README.md +173 -143
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/address-error.d.ts +11 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/address-error.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/common.d.ts +49 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/common.js +79 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/common.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/ipv4.d.ts +78 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/ipv4.js +119 -24
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/ipv4.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/ipv6.d.ts +151 -10
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/ipv6.js +316 -90
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/ipv6.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/v4/constants.d.ts +12 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/v4/constants.js +45 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/v4/constants.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/v6/constants.d.ts +14 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/v6/constants.js +50 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/v6/constants.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/package.json +6 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/package-lock.json +6 -6
- package/node_modules/playwright/node_modules/playwright-core/lib/cli/program.js +18 -9
- package/node_modules/playwright/node_modules/playwright-core/lib/mcpBundleImpl/index.js +47 -47
- package/node_modules/playwright/node_modules/playwright-core/lib/server/codegen/skyramp/jsonlReader.js +3 -0
- package/node_modules/playwright/node_modules/playwright-core/lib/server/recorder/recorderRunner.js +42 -0
- package/node_modules/playwright/node_modules/playwright-core/lib/utilsBundleImpl/index.js +121 -121
- package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/{index.B7KbSQcC.js → index.BAkLd5DX.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/node_modules/playwright-core/src/cli/program.ts +31 -9
- package/node_modules/playwright/node_modules/playwright-core/src/server/codegen/skyramp/jsonlReader.ts +1 -0
- package/node_modules/playwright/node_modules/playwright-core/src/server/recorder/recorderRunner.ts +57 -1
- package/node_modules/playwright/package.json +2 -2
- package/package.json +7 -6
- package/plugin/prompts/code-reuse/hand-off.md +30 -0
- package/plugin/prompts/generate-tests/generation.md +1 -1
- package/plugin/prompts/plan-tests.md +14 -14
- package/plugin/prompts/testbot-task1.md +2 -2
- package/plugin/skills/enhance-assertions/SKILL.md +25 -0
- package/plugin/skills/enhance-assertions/reference/contract.md +51 -0
- package/plugin/skills/enhance-assertions/reference/integration.md +58 -0
- package/plugin/skills/enhance-assertions/reference/shared-rules.md +220 -0
- package/plugin/skills/enhance-assertions/reference/ui.md +373 -0
- package/plugin/skills/fix-test-import-errors/SKILL.md +45 -50
- package/plugin/skills/run-test/SKILL.md +16 -0
- package/plugin/skills/validate-assertion-alignment-post-execution/SKILL.md +32 -0
- package/plugin/skills/validate-assertion-alignment-post-execution/reference/checks.md +44 -0
- package/plugin/skills/validate-assertion-alignment-post-execution/reference/evidence.md +47 -0
- package/build/adapters/jestAdapter.d.ts +0 -14
- package/build/adapters/jestAdapter.js +0 -113
- package/build/adapters/mochaAdapter.d.ts +0 -13
- package/build/adapters/mochaAdapter.js +0 -87
- package/build/adapters/playwrightAdapter.d.ts +0 -17
- package/build/adapters/playwrightAdapter.js +0 -182
- package/build/adapters/pytestAdapter.d.ts +0 -15
- package/build/adapters/pytestAdapter.js +0 -108
- package/build/prompts/enhance-assertions/contractProviderAssertionsPrompt.d.ts +0 -2
- package/build/prompts/enhance-assertions/contractProviderAssertionsPrompt.js +0 -29
- package/build/prompts/enhance-assertions/integrationAssertionsPrompt.d.ts +0 -2
- package/build/prompts/enhance-assertions/integrationAssertionsPrompt.js +0 -36
- package/build/prompts/enhance-assertions/sharedAssertionRules.d.ts +0 -16
- package/build/prompts/enhance-assertions/sharedAssertionRules.js +0 -284
- package/build/prompts/enhance-assertions/uiAssertionsPrompt.d.ts +0 -2
- package/build/prompts/enhance-assertions/uiAssertionsPrompt.js +0 -388
- package/build/tools/runExistingTestsTool.d.ts +0 -138
- package/build/tools/runExistingTestsTool.js +0 -644
- package/build/types/ExternalTestExecution.d.ts +0 -67
- package/build/types/ExternalTestExecution.js +0 -8
- package/build/workspace/testSuites.d.ts +0 -20
- package/build/workspace/testSuites.js +0 -17
- package/node_modules/playwright/node_modules/playwright-core/.DS_Store +0 -0
|
@@ -1,644 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import * as os from "os";
|
|
3
|
-
import * as path from "path";
|
|
4
|
-
import * as crypto from "crypto";
|
|
5
|
-
import { promises as fs } from "fs";
|
|
6
|
-
import { spawn } from "child_process";
|
|
7
|
-
import { stripVTControlCharacters } from "util";
|
|
8
|
-
import { WorkspaceConfigManager } from "../workspace/workspace.js";
|
|
9
|
-
import { resolveSuites } from "../workspace/testSuites.js";
|
|
10
|
-
import { StateManager, } from "../utils/AnalysisStateManager.js";
|
|
11
|
-
import { buildPlaywrightArgs, parsePlaywrightJson, } from "../adapters/playwrightAdapter.js";
|
|
12
|
-
import { buildPytestArgs, parsePytestJson } from "../adapters/pytestAdapter.js";
|
|
13
|
-
import { buildJestArgs, buildVitestArgs, parseJestJson } from "../adapters/jestAdapter.js";
|
|
14
|
-
import { buildMochaArgs, parseMochaJson } from "../adapters/mochaAdapter.js";
|
|
15
|
-
import picomatch from "picomatch";
|
|
16
|
-
import { AnalyticsService } from "../services/AnalyticsService.js";
|
|
17
|
-
import { logger } from "../utils/logger.js";
|
|
18
|
-
import { toolError } from "../utils/utils.js";
|
|
19
|
-
const TOOL_NAME = "skyramp_run_existing_tests";
|
|
20
|
-
const playwrightSpec = {
|
|
21
|
-
framework: "playwright",
|
|
22
|
-
outputVia: "file",
|
|
23
|
-
reportEnvVar: "PLAYWRIGHT_JSON_OUTPUT_NAME",
|
|
24
|
-
buildArgs: ({ selectors, mode, project }) => buildPlaywrightArgs({ selectors, mode, project }),
|
|
25
|
-
parse: (report, opts) => parsePlaywrightJson(report, opts),
|
|
26
|
-
};
|
|
27
|
-
const pytestSpec = {
|
|
28
|
-
framework: "pytest",
|
|
29
|
-
outputVia: "file",
|
|
30
|
-
buildArgs: ({ selectors, mode, reportPath }) => buildPytestArgs({ selectors, mode, reportPath }),
|
|
31
|
-
parse: (report, opts) => parsePytestJson(report, opts),
|
|
32
|
-
};
|
|
33
|
-
const jestSpec = {
|
|
34
|
-
framework: "jest",
|
|
35
|
-
outputVia: "file",
|
|
36
|
-
buildArgs: ({ selectors, mode, reportPath }) => buildJestArgs({ selectors, mode, reportPath }),
|
|
37
|
-
parse: (report, opts) => parseJestJson(report, opts),
|
|
38
|
-
};
|
|
39
|
-
const vitestSpec = {
|
|
40
|
-
framework: "vitest",
|
|
41
|
-
outputVia: "file",
|
|
42
|
-
buildArgs: ({ selectors, mode, reportPath }) => buildVitestArgs({ selectors, mode, reportPath }),
|
|
43
|
-
parse: (report, opts) => parseJestJson(report, opts),
|
|
44
|
-
};
|
|
45
|
-
const mochaSpec = {
|
|
46
|
-
framework: "mocha",
|
|
47
|
-
outputVia: "stdout",
|
|
48
|
-
buildArgs: ({ selectors, mode }) => buildMochaArgs({ selectors, mode }),
|
|
49
|
-
parse: (report, opts) => parseMochaJson(report, opts),
|
|
50
|
-
};
|
|
51
|
-
/** framework → reader. */
|
|
52
|
-
const READERS = {
|
|
53
|
-
playwright: playwrightSpec,
|
|
54
|
-
pytest: pytestSpec,
|
|
55
|
-
jest: jestSpec,
|
|
56
|
-
vitest: vitestSpec,
|
|
57
|
-
mocha: mochaSpec,
|
|
58
|
-
};
|
|
59
|
-
/** True when a framework has an execution reader (playwright/pytest/jest/vitest/mocha). */
|
|
60
|
-
export function frameworkHasReader(framework) {
|
|
61
|
-
return !!framework && !!READERS[framework];
|
|
62
|
-
}
|
|
63
|
-
/** Extract the last complete top-level JSON object from a stdout blob that may
|
|
64
|
-
* carry interleaved non-JSON (e.g. a test's console.log before mocha's json
|
|
65
|
-
* reporter dumps its object). Scans brace depth while respecting string/escape
|
|
66
|
-
* context so braces inside strings do not miscount. Throws if none found. */
|
|
67
|
-
export function extractLastJsonObject(s) {
|
|
68
|
-
let start = -1;
|
|
69
|
-
let depth = 0;
|
|
70
|
-
let inStr = false;
|
|
71
|
-
let esc = false;
|
|
72
|
-
let last = null;
|
|
73
|
-
for (let i = 0; i < s.length; i++) {
|
|
74
|
-
const c = s[i];
|
|
75
|
-
if (inStr) {
|
|
76
|
-
if (esc)
|
|
77
|
-
esc = false;
|
|
78
|
-
else if (c === "\\")
|
|
79
|
-
esc = true;
|
|
80
|
-
else if (c === '"')
|
|
81
|
-
inStr = false;
|
|
82
|
-
continue;
|
|
83
|
-
}
|
|
84
|
-
if (c === '"')
|
|
85
|
-
inStr = true;
|
|
86
|
-
else if (c === "{") {
|
|
87
|
-
if (depth === 0)
|
|
88
|
-
start = i;
|
|
89
|
-
depth++;
|
|
90
|
-
}
|
|
91
|
-
else if (c === "}") {
|
|
92
|
-
if (depth > 0 && --depth === 0 && start >= 0)
|
|
93
|
-
last = s.slice(start, i + 1);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
if (last === null)
|
|
97
|
-
throw new Error("no JSON object in stdout");
|
|
98
|
-
return last;
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* Resolves the runnable suites from workspace.yml (SKYR-4002). Enumerates every
|
|
102
|
-
* (service, suite) via resolveSuites; a suite is runnable when its framework has
|
|
103
|
-
* a registered reader (Playwright, pytest, jest, vitest, Mocha) — testRunCommand
|
|
104
|
-
* is required non-empty by the schema. Suites whose framework has no reader become
|
|
105
|
-
* skips-with-reason (never a throw). Every runnable suite runs. Throws only for an
|
|
106
|
-
* explicitly-named unknown service.
|
|
107
|
-
*/
|
|
108
|
-
export function resolveRunConfig(config, opts = {}) {
|
|
109
|
-
const services = config.services ?? [];
|
|
110
|
-
let target = services;
|
|
111
|
-
if (opts.service) {
|
|
112
|
-
const svc = services.find((s) => s.serviceName === opts.service);
|
|
113
|
-
if (!svc) {
|
|
114
|
-
throw new Error(`No service named "${opts.service}" in .skyramp/workspace.yml. Available: ${services.map((s) => s.serviceName).join(", ") || "(none)"}.`);
|
|
115
|
-
}
|
|
116
|
-
target = [svc];
|
|
117
|
-
}
|
|
118
|
-
const suites = target.flatMap(resolveSuites);
|
|
119
|
-
const skips = [];
|
|
120
|
-
const hasReader = (s) => frameworkHasReader(s.framework);
|
|
121
|
-
const runnable = suites.filter((s) => hasReader(s));
|
|
122
|
-
for (const s of suites) {
|
|
123
|
-
if (hasReader(s))
|
|
124
|
-
continue;
|
|
125
|
-
skips.push({
|
|
126
|
-
service: s.serviceName,
|
|
127
|
-
reason: `framework "${s.framework ?? "none"}" has no reader in ${TOOL_NAME} (supported: ${Object.keys(READERS).join(", ")}).`,
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
return { runs: runnable.map(toResolvedRunConfig), skips };
|
|
131
|
-
}
|
|
132
|
-
/** The file part of a selector — `file::test title` keeps only `file`. */
|
|
133
|
-
function selectorFile(selector) {
|
|
134
|
-
const idx = selector.indexOf("::");
|
|
135
|
-
return (idx >= 0 ? selector.slice(0, idx) : selector).trim();
|
|
136
|
-
}
|
|
137
|
-
/**
|
|
138
|
-
* Resolves a selector's file to a repo-relative path, the form `pathGlobs` are
|
|
139
|
-
* written in.
|
|
140
|
-
*
|
|
141
|
-
* Selectors arrive in whatever form the caller used — repo-relative, absolute, or
|
|
142
|
-
* a shorter tail. Discovery (analyze_changes) records the ABSOLUTE path of every
|
|
143
|
-
* test it found, so those paths are the authority: when a selector does not
|
|
144
|
-
* resolve to one of them directly, match it by tail to recover the real file.
|
|
145
|
-
*/
|
|
146
|
-
function toRepoRelative(file, workspacePath, knownTestFiles) {
|
|
147
|
-
let abs = path.isAbsolute(file) ? file : path.resolve(workspacePath, file);
|
|
148
|
-
if (knownTestFiles?.length && !knownTestFiles.includes(abs)) {
|
|
149
|
-
const match = knownTestFiles.find((known) => known.endsWith(`/${file}`));
|
|
150
|
-
if (match)
|
|
151
|
-
abs = match;
|
|
152
|
-
}
|
|
153
|
-
return path.relative(workspacePath, abs);
|
|
154
|
-
}
|
|
155
|
-
/**
|
|
156
|
-
* Partitions `selectors` into the ones this suite owns and the ones it does not,
|
|
157
|
-
* using the suite's own `pathGlobs` from workspace.yml.
|
|
158
|
-
*
|
|
159
|
-
* One repo commonly hosts several runners (mocha for a core package, vitest for
|
|
160
|
-
* app packages, Playwright for e2e), and handing a runner another runner's spec is
|
|
161
|
-
* not a test failure — it is a loader crash that yields no report at all. Which
|
|
162
|
-
* suite owns which paths is a fact about the repo, so it is recorded as config the
|
|
163
|
-
* user can read and correct, rather than guessed at run time. Run 30297865488 is
|
|
164
|
-
* the cautionary case: routing on a guessed framework tag sent Ghost's Playwright
|
|
165
|
-
* specs away from the Playwright suite, and nothing ran.
|
|
166
|
-
*
|
|
167
|
-
* A suite with no globs owns everything. That is deliberate: absent globs means
|
|
168
|
-
* the suite is unscoped, not that it owns nothing, and narrowing on no
|
|
169
|
-
* information would silently shrink the run.
|
|
170
|
-
*/
|
|
171
|
-
export function routeSelectorsToSuite(input) {
|
|
172
|
-
const globs = input.pathGlobs ?? [];
|
|
173
|
-
if (globs.length === 0)
|
|
174
|
-
return { kept: [...input.selectors], dropped: [] };
|
|
175
|
-
const kept = [];
|
|
176
|
-
const dropped = [];
|
|
177
|
-
for (const selector of input.selectors) {
|
|
178
|
-
const rel = toRepoRelative(selectorFile(selector), input.workspacePath, input.knownTestFiles);
|
|
179
|
-
if (picomatch.isMatch(rel, globs))
|
|
180
|
-
kept.push(selector);
|
|
181
|
-
else
|
|
182
|
-
dropped.push(selector);
|
|
183
|
-
}
|
|
184
|
-
return { kept, dropped };
|
|
185
|
-
}
|
|
186
|
-
/**
|
|
187
|
-
* The absolute test-file paths analyze_changes recorded, used to canonicalize a
|
|
188
|
-
* selector before glob matching. Best-effort: with no state file, an unreadable
|
|
189
|
-
* one, or a repo section that was never written, routing just resolves selectors
|
|
190
|
-
* against the repo root.
|
|
191
|
-
*/
|
|
192
|
-
async function loadKnownTestFiles(stateFile, repository) {
|
|
193
|
-
if (!stateFile)
|
|
194
|
-
return [];
|
|
195
|
-
try {
|
|
196
|
-
const sm = StateManager.fromStatePath(stateFile);
|
|
197
|
-
const state = await sm.readRepoData(repository);
|
|
198
|
-
return (state?.existingTests ?? [])
|
|
199
|
-
.map((t) => t.testFile)
|
|
200
|
-
.filter((f) => !!f);
|
|
201
|
-
}
|
|
202
|
-
catch (err) {
|
|
203
|
-
logger.warning(`${TOOL_NAME}: could not read existingTests for selector routing: ${err.message}`);
|
|
204
|
-
return [];
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
/** Maps a NormalizedSuite to the run-time config the runner consumes. */
|
|
208
|
-
function toResolvedRunConfig(s) {
|
|
209
|
-
return {
|
|
210
|
-
serviceName: s.serviceName,
|
|
211
|
-
framework: s.framework,
|
|
212
|
-
testRunCommand: s.testRunCommand,
|
|
213
|
-
testEnv: s.testEnv,
|
|
214
|
-
pathGlobs: s.pathGlobs,
|
|
215
|
-
};
|
|
216
|
-
}
|
|
217
|
-
/** Combines per-suite runs into one ParsedExternalRun for the tool's summary
|
|
218
|
-
* text: sums counts, concatenates results, ANDs environmentHealthy, joins the
|
|
219
|
-
* unhealthy details. */
|
|
220
|
-
export function aggregateRuns(parsed) {
|
|
221
|
-
const summary = { ran: 0, failed: 0, errored: 0, skipped: 0, truncated: false };
|
|
222
|
-
const results = [];
|
|
223
|
-
let environmentHealthy = true;
|
|
224
|
-
const details = [];
|
|
225
|
-
// Diagnostics follow the same "first unhealthy suite wins" rule as healthDetail;
|
|
226
|
-
// when every suite is healthy (or there's a single suite) it's that suite's diagnostics.
|
|
227
|
-
let diagnostics = parsed[0]?.diagnostics;
|
|
228
|
-
let diagnosticsFromUnhealthy = false;
|
|
229
|
-
for (const p of parsed) {
|
|
230
|
-
summary.ran += p.summary.ran;
|
|
231
|
-
summary.failed += p.summary.failed;
|
|
232
|
-
summary.errored += p.summary.errored;
|
|
233
|
-
summary.skipped += p.summary.skipped;
|
|
234
|
-
summary.truncated = summary.truncated || p.summary.truncated;
|
|
235
|
-
results.push(...p.results);
|
|
236
|
-
if (!p.environmentHealthy) {
|
|
237
|
-
environmentHealthy = false;
|
|
238
|
-
if (p.healthDetail)
|
|
239
|
-
details.push(p.healthDetail);
|
|
240
|
-
if (!diagnosticsFromUnhealthy) {
|
|
241
|
-
diagnostics = p.diagnostics;
|
|
242
|
-
diagnosticsFromUnhealthy = true;
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
// Only when EVERY suite was skipped is the whole run a skip — otherwise the
|
|
247
|
-
// suites that did run own the verdict. Surfacing it matters: the tool's caller
|
|
248
|
-
// branches on `skipped` to say why nothing ran instead of reporting a bare
|
|
249
|
-
// "ran 0 tests", which reads as a clean pass.
|
|
250
|
-
const allSkipped = parsed.length > 0 && parsed.every((p) => p.skipped);
|
|
251
|
-
const skipReasons = parsed.map((p) => p.skipReason).filter(Boolean);
|
|
252
|
-
return {
|
|
253
|
-
results,
|
|
254
|
-
summary,
|
|
255
|
-
environmentHealthy,
|
|
256
|
-
healthDetail: details.length ? details.join(" | ") : undefined,
|
|
257
|
-
diagnostics,
|
|
258
|
-
...(allSkipped
|
|
259
|
-
? { skipped: true, skipReason: skipReasons.join(" | ") || undefined }
|
|
260
|
-
: {}),
|
|
261
|
-
};
|
|
262
|
-
}
|
|
263
|
-
/**
|
|
264
|
-
* How much of a failed run's stderr to carry into `healthDetail`/`skipReason`.
|
|
265
|
-
*
|
|
266
|
-
* This is often the ONLY record of the failure: a run command that shells out to
|
|
267
|
-
* a container writes to the MCP server's child process, not to the CI job log, so
|
|
268
|
-
* nothing else captures it. Run 30314973126 lost the real error to the previous
|
|
269
|
-
* 1200-char tail — it cut off mid-line, one line after the failing command.
|
|
270
|
-
*/
|
|
271
|
-
const STDERR_TAIL_CHARS = 4000;
|
|
272
|
-
/**
|
|
273
|
-
* How much of a failed run's stdout to carry alongside the stderr tail.
|
|
274
|
-
*
|
|
275
|
-
* Every framework EXCEPT mocha reports via a file (`outputVia: "file"`), and those
|
|
276
|
-
* runners print their human-readable failure text — a Playwright global-setup stack
|
|
277
|
-
* trace, a pytest collection error — on STDOUT, which used to be dropped unread to
|
|
278
|
-
* avoid backpressure. So the stderr-only tail left exactly the failures it was added
|
|
279
|
-
* for with no cause attached: run 30402703836 reported `global.setup.ts` as failed
|
|
280
|
-
* and carried nothing about why, because the reason went to stdout.
|
|
281
|
-
*/
|
|
282
|
-
const STDOUT_TAIL_CHARS = 4000;
|
|
283
|
-
/**
|
|
284
|
-
* Label and join whichever of the child's output streams carried something, so a
|
|
285
|
-
* failure path reports the cause regardless of which stream the runner chose.
|
|
286
|
-
*/
|
|
287
|
-
function buildOutputDiagnostic(stderrTail, stdoutTail) {
|
|
288
|
-
const parts = [];
|
|
289
|
-
const err = stripVTControlCharacters(stderrTail).trim();
|
|
290
|
-
const out = stripVTControlCharacters(stdoutTail).trim();
|
|
291
|
-
if (err)
|
|
292
|
-
parts.push(`stderr: ${err}`);
|
|
293
|
-
if (out)
|
|
294
|
-
parts.push(`stdout: ${out}`);
|
|
295
|
-
return parts.join(" | ");
|
|
296
|
-
}
|
|
297
|
-
/** POSIX single-quote a shell argument. */
|
|
298
|
-
function shellQuote(s) {
|
|
299
|
-
return `'${s.replace(/'/g, `'\\''`)}'`;
|
|
300
|
-
}
|
|
301
|
-
/**
|
|
302
|
-
* Generic IO shell for every framework reader: append the reporter + scoped
|
|
303
|
-
* selectors to the suite's `testRunCommand`, spawn it via bash (so a wrapper
|
|
304
|
-
* entrypoint's `exec "$@"` receives the flags), read the machine-readable
|
|
305
|
-
* report (temp file or captured stdout), and hand it to `spec.parse`. A missing
|
|
306
|
-
* or unparseable report is the exit-code rung: `environmentHealthy:false` with
|
|
307
|
-
* the stderr tail — never PR signal, never throws.
|
|
308
|
-
*/
|
|
309
|
-
export async function runExternalSuite(spec, cfg, opts) {
|
|
310
|
-
const reportPath = path.join(os.tmpdir(), `skyramp-${spec.framework}-${crypto.randomUUID()}.json`);
|
|
311
|
-
const args = spec.buildArgs({
|
|
312
|
-
selectors: opts.selectors,
|
|
313
|
-
mode: opts.mode,
|
|
314
|
-
project: opts.project,
|
|
315
|
-
reportPath,
|
|
316
|
-
});
|
|
317
|
-
const cmd = `${cfg.testRunCommand} ${args.map(shellQuote).join(" ")}`;
|
|
318
|
-
const env = {
|
|
319
|
-
...process.env,
|
|
320
|
-
...(cfg.testEnv ?? {}),
|
|
321
|
-
...(spec.reportEnvVar ? { [spec.reportEnvVar]: reportPath } : {}),
|
|
322
|
-
};
|
|
323
|
-
const { code, stdout, stderrTail, stdoutTail } = await new Promise((resolve) => {
|
|
324
|
-
const child = spawn("bash", ["-c", cmd], {
|
|
325
|
-
cwd: opts.workspacePath,
|
|
326
|
-
env,
|
|
327
|
-
timeout: opts.timeoutMs,
|
|
328
|
-
});
|
|
329
|
-
let stderr = "";
|
|
330
|
-
let out = "";
|
|
331
|
-
let outTail = "";
|
|
332
|
-
child.stderr?.on("data", (d) => {
|
|
333
|
-
stderr += d.toString();
|
|
334
|
-
if (stderr.length > 16000)
|
|
335
|
-
stderr = stderr.slice(-16000);
|
|
336
|
-
});
|
|
337
|
-
child.stdout?.on("data", (d) => {
|
|
338
|
-
const chunk = d.toString();
|
|
339
|
-
// Always keep a bounded tail: for `outputVia: "file"` frameworks this is the
|
|
340
|
-
// ONLY record of why the run failed. Accumulating the full stream stays gated
|
|
341
|
-
// on "stdout" readers, which parse their JSON report out of it.
|
|
342
|
-
outTail += chunk;
|
|
343
|
-
if (outTail.length > STDOUT_TAIL_CHARS)
|
|
344
|
-
outTail = outTail.slice(-STDOUT_TAIL_CHARS);
|
|
345
|
-
if (spec.outputVia !== "stdout")
|
|
346
|
-
return; // drain to avoid backpressure
|
|
347
|
-
out += chunk;
|
|
348
|
-
if (out.length > 8_000_000)
|
|
349
|
-
out = out.slice(-8_000_000);
|
|
350
|
-
});
|
|
351
|
-
child.on("close", (c) => resolve({
|
|
352
|
-
code: c,
|
|
353
|
-
stdout: out,
|
|
354
|
-
stderrTail: stderr.slice(-STDERR_TAIL_CHARS),
|
|
355
|
-
stdoutTail: outTail,
|
|
356
|
-
}));
|
|
357
|
-
child.on("error", (e) => resolve({ code: -1, stdout: out, stderrTail: String(e), stdoutTail: outTail }));
|
|
358
|
-
});
|
|
359
|
-
let report;
|
|
360
|
-
try {
|
|
361
|
-
const raw = spec.outputVia === "stdout"
|
|
362
|
-
? extractLastJsonObject(stdout)
|
|
363
|
-
: await fs.readFile(reportPath, "utf8");
|
|
364
|
-
report = JSON.parse(raw);
|
|
365
|
-
}
|
|
366
|
-
catch {
|
|
367
|
-
if (spec.outputVia === "file")
|
|
368
|
-
await fs.unlink(reportPath).catch(() => { });
|
|
369
|
-
const emptySummary = {
|
|
370
|
-
ran: 0,
|
|
371
|
-
failed: 0,
|
|
372
|
-
errored: 0,
|
|
373
|
-
skipped: 0,
|
|
374
|
-
truncated: opts.truncated,
|
|
375
|
-
};
|
|
376
|
-
const outputDetail = buildOutputDiagnostic(stderrTail, stdoutTail) || "(no output)";
|
|
377
|
-
// A SCOPED run that produced no report is not evidence the environment is
|
|
378
|
-
// down: the usual causes are a spec this runner cannot load (the wrong suite
|
|
379
|
-
// for the file) or this suite's own setup failing. Calling it unhealthy is
|
|
380
|
-
// what let a mocha loader crash read as a dead SUT and suppress PR findings,
|
|
381
|
-
// so report a skip and let the other suites speak for the environment.
|
|
382
|
-
//
|
|
383
|
-
// Do NOT guess between those causes here — run 30314973126 reported "they
|
|
384
|
-
// probably belong to another suite" about selectors that provably belonged to
|
|
385
|
-
// this one, while the real fault was the suite's containerised run command
|
|
386
|
-
// never emitting a report. State both and hand over the stderr.
|
|
387
|
-
if (opts.selectors.length > 0) {
|
|
388
|
-
return {
|
|
389
|
-
results: [],
|
|
390
|
-
summary: emptySummary,
|
|
391
|
-
environmentHealthy: true,
|
|
392
|
-
skipped: true,
|
|
393
|
-
skipReason: `${spec.framework} produced no parseable JSON report (exit ${code}) for the ${opts.selectors.length} selector(s) it was given, so this suite reported nothing either way. Either the selectors are not this suite's to run (check its testSuites pathGlobs) or its own run command failed before emitting a report — the output below says which. ${outputDetail}`,
|
|
394
|
-
};
|
|
395
|
-
}
|
|
396
|
-
// Nothing was narrowed, so a suite that cannot even produce a report does
|
|
397
|
-
// point at the environment.
|
|
398
|
-
return {
|
|
399
|
-
results: [],
|
|
400
|
-
summary: emptySummary,
|
|
401
|
-
environmentHealthy: false,
|
|
402
|
-
healthDetail: `${spec.framework} produced no parseable JSON report (exit ${code}); the suite likely failed to install/collect or the environment never came up. ${outputDetail}`,
|
|
403
|
-
};
|
|
404
|
-
}
|
|
405
|
-
if (spec.outputVia === "file")
|
|
406
|
-
await fs.unlink(reportPath).catch(() => { });
|
|
407
|
-
const parsed = spec.parse(report, { truncated: opts.truncated });
|
|
408
|
-
// The parser builds healthDetail from the report contents only. When it flags
|
|
409
|
-
// an unhealthy env (e.g. a Playwright global-setup spec failed), the report is
|
|
410
|
-
// parseable but the actual cause — a stack trace, "container not found", a
|
|
411
|
-
// dependency download that hung — lives on the runner's output, which the
|
|
412
|
-
// report never carries. Append it so a maintenance run's env failure is
|
|
413
|
-
// diagnosable from healthDetail alone, not only by re-running blind.
|
|
414
|
-
//
|
|
415
|
-
// Both streams, not just stderr: the runners that hit this path all report via a
|
|
416
|
-
// file and print their failure text on stdout, so a stderr-only tail named the
|
|
417
|
-
// failing setup spec and dropped the reason (run 30402703836). A dead end here
|
|
418
|
-
// costs the whole maintenance loop — with no baseline, testbot's step (f) skips
|
|
419
|
-
// the `mode: "verify"` re-run, so the agent never confirms its own fix.
|
|
420
|
-
if (!parsed.environmentHealthy) {
|
|
421
|
-
const detail = buildOutputDiagnostic(stderrTail, stdoutTail);
|
|
422
|
-
if (detail) {
|
|
423
|
-
parsed.healthDetail = `${parsed.healthDetail ?? `${spec.framework} environment unhealthy (exit ${code}).`} ${detail}`;
|
|
424
|
-
}
|
|
425
|
-
}
|
|
426
|
-
return parsed;
|
|
427
|
-
}
|
|
428
|
-
export async function runPlaywright(cfg, opts) {
|
|
429
|
-
return runExternalSuite(READERS.playwright, cfg, opts);
|
|
430
|
-
}
|
|
431
|
-
const defaultDeps = {
|
|
432
|
-
readConfig: (workspacePath) => new WorkspaceConfigManager(workspacePath).read(),
|
|
433
|
-
runner: (cfg, opts) => {
|
|
434
|
-
const spec = READERS[cfg.framework];
|
|
435
|
-
if (!spec) {
|
|
436
|
-
// Unreachable: resolveRunConfig only returns `run` for a registered reader.
|
|
437
|
-
throw new Error(`No reader registered for framework "${cfg.framework}".`);
|
|
438
|
-
}
|
|
439
|
-
return runExternalSuite(spec, cfg, opts);
|
|
440
|
-
},
|
|
441
|
-
now: () => new Date().toISOString(),
|
|
442
|
-
};
|
|
443
|
-
/** Appends a run record into UnifiedAnalysisState.externalTestResults for the
|
|
444
|
-
* given repo section. Best-effort: a state failure never fails the run. */
|
|
445
|
-
async function persistExternalRun(stateFile, repository, record) {
|
|
446
|
-
try {
|
|
447
|
-
const sm = StateManager.fromStatePath(stateFile);
|
|
448
|
-
const state = await sm.readRepoData(repository);
|
|
449
|
-
if (!state) {
|
|
450
|
-
logger.warning(`${TOOL_NAME}: no analysis state found for repo ${repository ?? "(primary)"}; skipping externalTestResults write`);
|
|
451
|
-
return;
|
|
452
|
-
}
|
|
453
|
-
state.externalTestResults = [...(state.externalTestResults ?? []), record];
|
|
454
|
-
await sm.writeRepoData(state, { repo: repository });
|
|
455
|
-
}
|
|
456
|
-
catch (err) {
|
|
457
|
-
logger.error(`${TOOL_NAME}: failed to persist externalTestResults: ${err.message}`);
|
|
458
|
-
}
|
|
459
|
-
}
|
|
460
|
-
/**
|
|
461
|
-
* Orchestrates an external test run: resolve config → apply maxTests cap → run →
|
|
462
|
-
* persist a record to the state file. Pure of MCP/registration concerns and
|
|
463
|
-
* fully injectable for tests.
|
|
464
|
-
*/
|
|
465
|
-
export async function runExternalTests(params, deps = defaultDeps) {
|
|
466
|
-
const mode = params.mode ?? "confirm";
|
|
467
|
-
const selectors = params.testSelectors ?? [];
|
|
468
|
-
let effective = selectors;
|
|
469
|
-
let truncated = false;
|
|
470
|
-
if (params.maxTests && selectors.length > params.maxTests) {
|
|
471
|
-
effective = selectors.slice(0, params.maxTests);
|
|
472
|
-
truncated = true;
|
|
473
|
-
}
|
|
474
|
-
const config = await deps.readConfig(params.workspacePath);
|
|
475
|
-
const resolution = resolveRunConfig(config, { service: params.service });
|
|
476
|
-
if (resolution.runs.length === 0) {
|
|
477
|
-
const reason = resolution.skips.map((s) => `${s.service}: ${s.reason}`).join("; ") ||
|
|
478
|
-
`No runnable test suite in .skyramp/workspace.yml — no external tests to run.`;
|
|
479
|
-
const skippedRun = {
|
|
480
|
-
results: [],
|
|
481
|
-
summary: { ran: 0, failed: 0, errored: 0, skipped: 0, truncated: false },
|
|
482
|
-
environmentHealthy: true,
|
|
483
|
-
skipped: true,
|
|
484
|
-
skipReason: reason,
|
|
485
|
-
};
|
|
486
|
-
if (params.stateFile) {
|
|
487
|
-
await persistExternalRun(params.stateFile, params.repository, {
|
|
488
|
-
...skippedRun,
|
|
489
|
-
mode,
|
|
490
|
-
ranAt: deps.now(),
|
|
491
|
-
repository: params.repository,
|
|
492
|
-
});
|
|
493
|
-
}
|
|
494
|
-
return skippedRun;
|
|
495
|
-
}
|
|
496
|
-
const knownTestFiles = await loadKnownTestFiles(params.stateFile, params.repository);
|
|
497
|
-
const perSuite = [];
|
|
498
|
-
for (const cfg of resolution.runs) {
|
|
499
|
-
const routing = routeSelectorsToSuite({
|
|
500
|
-
selectors: effective,
|
|
501
|
-
pathGlobs: cfg.pathGlobs,
|
|
502
|
-
knownTestFiles,
|
|
503
|
-
workspacePath: params.workspacePath,
|
|
504
|
-
});
|
|
505
|
-
// An empty selector list means "run the whole configured suite", so routing
|
|
506
|
-
// every selector away must NOT collapse into that: it would silently widen a
|
|
507
|
-
// scoped run into the entire suite. Skip the suite instead, loudly.
|
|
508
|
-
if (effective.length > 0 && routing.kept.length === 0) {
|
|
509
|
-
const owned = (cfg.pathGlobs ?? []).join(", ");
|
|
510
|
-
const routedOut = {
|
|
511
|
-
results: [],
|
|
512
|
-
summary: { ran: 0, failed: 0, errored: 0, skipped: 0, truncated },
|
|
513
|
-
environmentHealthy: true,
|
|
514
|
-
skipped: true,
|
|
515
|
-
skipReason: `suite "${cfg.serviceName}" owns ${owned}, and none of the ${routing.dropped.length} requested selector(s) fall under it — nothing for this suite to run. Widen its testSuites pathGlobs, or add a suite that owns those paths.`,
|
|
516
|
-
};
|
|
517
|
-
perSuite.push(routedOut);
|
|
518
|
-
if (params.stateFile) {
|
|
519
|
-
await persistExternalRun(params.stateFile, params.repository, {
|
|
520
|
-
...routedOut,
|
|
521
|
-
mode,
|
|
522
|
-
ranAt: deps.now(),
|
|
523
|
-
repository: params.repository,
|
|
524
|
-
});
|
|
525
|
-
}
|
|
526
|
-
continue;
|
|
527
|
-
}
|
|
528
|
-
if (routing.dropped.length > 0) {
|
|
529
|
-
logger.warning(`${TOOL_NAME}: dropped ${routing.dropped.length} selector(s) outside ${cfg.serviceName}'s ${cfg.framework} suite paths (${(cfg.pathGlobs ?? []).join(", ")}): ${routing.dropped.join(", ")}`);
|
|
530
|
-
}
|
|
531
|
-
const parsed = await deps.runner(cfg, {
|
|
532
|
-
workspacePath: params.workspacePath,
|
|
533
|
-
selectors: routing.kept,
|
|
534
|
-
mode,
|
|
535
|
-
project: params.project,
|
|
536
|
-
timeoutMs: params.timeoutMs,
|
|
537
|
-
truncated,
|
|
538
|
-
});
|
|
539
|
-
const suiteResult = {
|
|
540
|
-
...parsed,
|
|
541
|
-
summary: { ...parsed.summary, truncated: parsed.summary.truncated || truncated },
|
|
542
|
-
};
|
|
543
|
-
perSuite.push(suiteResult);
|
|
544
|
-
if (params.stateFile) {
|
|
545
|
-
await persistExternalRun(params.stateFile, params.repository, {
|
|
546
|
-
...suiteResult,
|
|
547
|
-
mode,
|
|
548
|
-
ranAt: deps.now(),
|
|
549
|
-
repository: params.repository,
|
|
550
|
-
});
|
|
551
|
-
}
|
|
552
|
-
}
|
|
553
|
-
return aggregateRuns(perSuite);
|
|
554
|
-
}
|
|
555
|
-
export function registerRunExistingTestsTool(server) {
|
|
556
|
-
server.registerTool(TOOL_NAME, {
|
|
557
|
-
description: `Run a repo's OWN user-authored test suite (the \`[external]\` tests, i.e. not Skyramp-generated) to CONFIRM which tests a change actually breaks — instead of guessing from the diff. Supports Playwright, pytest, jest, vitest, and Mocha suites in DELEGATE mode: the suite owns environment bring-up and this tool drives it with scoped selectors, forcing each framework's JSON reporter, then reports structured pass/fail/error/skipped. Requires a runtimeDetails.testSuites entry (with a testRunCommand) in .skyramp/workspace.yml (from the Test Environment Setup bootstrap). A failed setup or missing report is reported as environmentHealthy:false and MUST NOT be treated as PR signal.`,
|
|
558
|
-
annotations: {
|
|
559
|
-
readOnlyHint: false,
|
|
560
|
-
destructiveHint: false,
|
|
561
|
-
idempotentHint: false,
|
|
562
|
-
openWorldHint: true,
|
|
563
|
-
},
|
|
564
|
-
inputSchema: {
|
|
565
|
-
workspacePath: z
|
|
566
|
-
.string()
|
|
567
|
-
.describe("Absolute path to the repo checkout where the tests live."),
|
|
568
|
-
service: z
|
|
569
|
-
.string()
|
|
570
|
-
.optional()
|
|
571
|
-
.describe("serviceName in .skyramp/workspace.yml whose runtimeDetails.test* to use. Omit when there is exactly one supported test service."),
|
|
572
|
-
testSelectors: z
|
|
573
|
-
.array(z.string())
|
|
574
|
-
.optional()
|
|
575
|
-
.describe("Spec files to run (paths relative to the run command's cwd), optionally `file::test title` to also filter by name. Omit to run the whole configured suite."),
|
|
576
|
-
mode: z
|
|
577
|
-
.enum(["confirm", "verify"])
|
|
578
|
-
.optional()
|
|
579
|
-
.describe("confirm (default): scoped run to establish which tests a change breaks; disables the suite's fail-fast cap (e.g. Playwright's maxFailures) so ALL breakages are counted. verify: re-run after an edit."),
|
|
580
|
-
project: z
|
|
581
|
-
.string()
|
|
582
|
-
.optional()
|
|
583
|
-
.describe("Playwright-only: --project to scope to (e.g. 'main'); the project's global-setup dependency still runs. Ignored by other frameworks."),
|
|
584
|
-
stateFile: z
|
|
585
|
-
.string()
|
|
586
|
-
.optional()
|
|
587
|
-
.describe("Path to the analyze-changes state file. When set, results are appended to externalTestResults so drift analysis and the report can fold in CONFIRMED failures."),
|
|
588
|
-
repository: z
|
|
589
|
-
.string()
|
|
590
|
-
.optional()
|
|
591
|
-
.describe("owner/repo whose state section to write into (multi-repo runs). Omit for a single-repo run."),
|
|
592
|
-
timeoutMs: z
|
|
593
|
-
.number()
|
|
594
|
-
.int()
|
|
595
|
-
.positive()
|
|
596
|
-
.optional()
|
|
597
|
-
.describe("Hard wall-clock cap for the whole run, in milliseconds (positive integer)."),
|
|
598
|
-
maxTests: z
|
|
599
|
-
.number()
|
|
600
|
-
.int()
|
|
601
|
-
.positive()
|
|
602
|
-
.optional()
|
|
603
|
-
.describe("Cap the number of selectors run (positive integer); the summary reports truncated:true when the set was cut. Omit for no cap."),
|
|
604
|
-
},
|
|
605
|
-
_meta: {
|
|
606
|
-
keywords: ["run existing tests", "external tests", "confirm failures"],
|
|
607
|
-
},
|
|
608
|
-
}, async (params, _extra) => {
|
|
609
|
-
let errorResult;
|
|
610
|
-
try {
|
|
611
|
-
const out = await runExternalTests(params);
|
|
612
|
-
if (out.skipped) {
|
|
613
|
-
return {
|
|
614
|
-
structuredContent: out,
|
|
615
|
-
content: [
|
|
616
|
-
{ type: "text", text: `Skipped ${TOOL_NAME}: ${out.skipReason}` },
|
|
617
|
-
],
|
|
618
|
-
};
|
|
619
|
-
}
|
|
620
|
-
const health = out.environmentHealthy
|
|
621
|
-
? ""
|
|
622
|
-
: ` Environment UNHEALTHY — results are NOT PR signal: ${out.healthDetail}`;
|
|
623
|
-
const text = `Ran ${out.summary.ran} external test(s): ${out.summary.failed} failed, ${out.summary.errored} errored, ${out.summary.skipped} skipped` +
|
|
624
|
-
`${out.summary.truncated ? " (truncated)" : ""}.${health}`;
|
|
625
|
-
return {
|
|
626
|
-
structuredContent: out,
|
|
627
|
-
content: [{ type: "text", text }],
|
|
628
|
-
};
|
|
629
|
-
}
|
|
630
|
-
catch (err) {
|
|
631
|
-
errorResult = toolError(`${TOOL_NAME} failed: ${err.message}`);
|
|
632
|
-
return errorResult;
|
|
633
|
-
}
|
|
634
|
-
finally {
|
|
635
|
-
AnalyticsService.pushMCPToolEvent(TOOL_NAME, errorResult, {
|
|
636
|
-
workspacePath: params.workspacePath,
|
|
637
|
-
service: params.service ?? "",
|
|
638
|
-
mode: params.mode ?? "confirm",
|
|
639
|
-
}).catch((err) => {
|
|
640
|
-
logger.warning("Analytics event failed", { error: String(err) });
|
|
641
|
-
});
|
|
642
|
-
}
|
|
643
|
-
});
|
|
644
|
-
}
|