@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
|
@@ -34,55 +34,104 @@ const TARGET_ARG = new Set(["goto", "dragTo"]);
|
|
|
34
34
|
* helper in either language gets the same key.
|
|
35
35
|
*/
|
|
36
36
|
export function actionKeyOf(body, language = "typescript") {
|
|
37
|
+
return actionStepKeys(actionStepsOf(body, language))?.join("; ");
|
|
38
|
+
}
|
|
39
|
+
/** The keys of every step, in order, or `undefined` when there is no step or a
|
|
40
|
+
* step has no key — the sequence `actionKeyOf` joins, kept as steps for a caller
|
|
41
|
+
* that matches step by step (a key is not split back: a selector may carry the
|
|
42
|
+
* separator). */
|
|
43
|
+
export function actionStepKeys(steps) {
|
|
44
|
+
if (steps.length === 0 || steps.some((s) => s.key === undefined))
|
|
45
|
+
return undefined;
|
|
46
|
+
return steps.map((s) => s.key);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Every action in `body`, in order, each keyed as `actionKeyOf` keys it. Where
|
|
50
|
+
* `actionKeyOf` answers "what does this helper do" with one string, this answers
|
|
51
|
+
* "which actions, where, and what sits between them" — what a scan for an inline
|
|
52
|
+
* copy of a helper's sequence needs. Lines survive the Python and alias rewrites:
|
|
53
|
+
* neither adds or removes a newline.
|
|
54
|
+
*/
|
|
55
|
+
export function actionStepsOf(body, language = "typescript") {
|
|
37
56
|
const src = resolveLocatorAliases(language === "python" ? toPlaywrightJs(body) : body);
|
|
38
57
|
// Structure is read on a copy with string CONTENTS blanked (same length), so a
|
|
39
|
-
// `)` or `.` inside a literal never ends a chain
|
|
58
|
+
// `)` or `.` inside a literal never ends a chain, and a `.click(` written inside
|
|
59
|
+
// a string is not an action; text is taken from the original.
|
|
40
60
|
const structure = blankStringContents(src);
|
|
41
61
|
const steps = [];
|
|
42
|
-
|
|
62
|
+
let prevEnd = 0;
|
|
63
|
+
for (const m of structure.matchAll(ACTION_RE)) {
|
|
43
64
|
const verb = m[1];
|
|
44
65
|
const dot = m.index;
|
|
66
|
+
const line = src.slice(0, dot).split("\n").length;
|
|
45
67
|
const argsOpen = dot + m[0].length - 1;
|
|
46
68
|
const argsClose = matchingClose(structure, argsOpen);
|
|
47
|
-
if (argsClose === -1)
|
|
48
|
-
return undefined;
|
|
49
69
|
const chainStart = chainStartBefore(structure, dot);
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
if (
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
if (!target)
|
|
58
|
-
return undefined;
|
|
59
|
-
}
|
|
60
|
-
else if (TARGET_ARG.has(verb))
|
|
61
|
-
target = args;
|
|
62
|
-
if (verb === "goto") {
|
|
63
|
-
chain = "";
|
|
64
|
-
// A template target is keyed on its text, `${…}` included: generated helpers
|
|
65
|
-
// prefix every path with one module constant (`${baseUrl}/login`), and
|
|
66
|
-
// `/orders/${id}` is one page whatever the id. A bare variable is not a
|
|
67
|
-
// target this can read.
|
|
68
|
-
if (/^\s*`/.test(target))
|
|
69
|
-
target = "`" + target.trim().slice(1, -1) + "`";
|
|
70
|
-
else if (!/^\s*["']/.test(target))
|
|
71
|
-
return undefined;
|
|
70
|
+
const gapBefore = steps.length === 0 ? "" : src.slice(prevEnd, chainStart);
|
|
71
|
+
// An action inside another action's arguments: its chain starts before the
|
|
72
|
+
// previous action ended, so there is no gap to judge and no run to join.
|
|
73
|
+
if (argsClose === -1 || chainStart < prevEnd) {
|
|
74
|
+
steps.push({ line, gapBefore, gapAfter: "" });
|
|
75
|
+
prevEnd = argsOpen + 1;
|
|
76
|
+
continue;
|
|
72
77
|
}
|
|
73
|
-
|
|
78
|
+
prevEnd = argsClose + 1;
|
|
79
|
+
steps.push({
|
|
80
|
+
line,
|
|
81
|
+
gapBefore,
|
|
82
|
+
gapAfter: "",
|
|
83
|
+
key: stepKey(verb, src, structure, chainStart, dot, argsOpen, argsClose),
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
for (let i = 0; i < steps.length; i++)
|
|
87
|
+
steps[i].gapAfter =
|
|
88
|
+
i + 1 < steps.length ? steps[i + 1].gapBefore : src.slice(prevEnd);
|
|
89
|
+
return steps;
|
|
90
|
+
}
|
|
91
|
+
/** The key of one action, or `undefined` when its locator or target is unreadable. */
|
|
92
|
+
function stepKey(verb, src, structure, chainStart, dot, argsOpen, argsClose) {
|
|
93
|
+
let chain = src.slice(chainStart, dot);
|
|
94
|
+
const args = src.slice(argsOpen + 1, argsClose);
|
|
95
|
+
let target = "";
|
|
96
|
+
if (!/\(/.test(structure.slice(chainStart, dot))) {
|
|
97
|
+
// No locator call in the chain: the legacy `page.click("#save")` form, whose
|
|
98
|
+
// first argument is the selector; or `page.goto(url)`.
|
|
99
|
+
target = firstArgument(structure, src, argsOpen + 1, argsClose);
|
|
100
|
+
if (!target)
|
|
74
101
|
return undefined;
|
|
75
|
-
|
|
102
|
+
}
|
|
103
|
+
else if (TARGET_ARG.has(verb))
|
|
104
|
+
target = args;
|
|
105
|
+
if (verb === "goto") {
|
|
106
|
+
chain = "";
|
|
107
|
+
// A template target is keyed on its text, `${…}` included: generated helpers
|
|
108
|
+
// prefix every path with one module constant (`${baseUrl}/login`), and
|
|
109
|
+
// `/orders/${id}` is one page whatever the id. A bare variable is not a
|
|
110
|
+
// target this can read.
|
|
111
|
+
if (/^\s*`/.test(target))
|
|
112
|
+
target = "`" + target.trim().slice(1, -1) + "`";
|
|
113
|
+
else if (!/^\s*["']/.test(target))
|
|
76
114
|
return undefined;
|
|
77
|
-
const step = [verb, normalize(chain), normalize(target)]
|
|
78
|
-
.filter(Boolean)
|
|
79
|
-
.join(" ");
|
|
80
|
-
steps.push(step);
|
|
81
115
|
}
|
|
82
|
-
|
|
116
|
+
if (hasDynamicSelector(chain) || hasDynamicSelector(target))
|
|
117
|
+
return undefined;
|
|
118
|
+
if (!/["'`]/.test(chain) && !/["'`]/.test(target))
|
|
119
|
+
return undefined;
|
|
120
|
+
return [verb, normalize(chain), normalize(target)].filter(Boolean).join(" ");
|
|
121
|
+
}
|
|
122
|
+
/** `click empty-cart-btn; fill qty` → `click \`empty-cart-btn\`; fill \`qty\`` — the
|
|
123
|
+
* key as the agent reads it, selectors quoted so a `#id` never reads as prose. */
|
|
124
|
+
export function describeActionKey(key) {
|
|
125
|
+
return key
|
|
126
|
+
.split("; ")
|
|
127
|
+
.map((step) => {
|
|
128
|
+
const at = step.indexOf(" ");
|
|
129
|
+
return `${step.slice(0, at)} \`${step.slice(at + 1)}\``;
|
|
130
|
+
})
|
|
131
|
+
.join("; ");
|
|
83
132
|
}
|
|
84
133
|
/** Index of the `)` that closes the `(` at `open`, on a string-blanked copy. */
|
|
85
|
-
function matchingClose(structure, open) {
|
|
134
|
+
export function matchingClose(structure, open) {
|
|
86
135
|
let depth = 0;
|
|
87
136
|
for (let i = open; i < structure.length; i++) {
|
|
88
137
|
const ch = structure[i];
|
|
@@ -170,7 +219,11 @@ function hasDynamicSelector(text) {
|
|
|
170
219
|
return true;
|
|
171
220
|
return false;
|
|
172
221
|
}
|
|
173
|
-
/** Whitespace and braces dropped outside string literals, `'` normalised to `"
|
|
222
|
+
/** Whitespace and braces dropped outside string literals, `'` normalised to `"` —
|
|
223
|
+
* the spelling a locator chain has inside a key. */
|
|
224
|
+
export function normalizeChain(text) {
|
|
225
|
+
return normalize(text);
|
|
226
|
+
}
|
|
174
227
|
function normalize(text) {
|
|
175
228
|
let out = "";
|
|
176
229
|
let quote = null;
|
|
@@ -201,7 +254,7 @@ function normalize(text) {
|
|
|
201
254
|
return out.replace(/,(?=[)\]])/g, "");
|
|
202
255
|
}
|
|
203
256
|
/** String contents replaced by spaces, delimiters kept, same length. */
|
|
204
|
-
function blankStringContents(text) {
|
|
257
|
+
export function blankStringContents(text) {
|
|
205
258
|
return text.replace(/(["'`])(?:\\.|(?!\1)[^\\])*\1/g, (q) => q[0] + " ".repeat(Math.max(0, q.length - 2)) + q[0]);
|
|
206
259
|
}
|
|
207
260
|
/** Playwright for Python spells the same API in snake_case, passes locator options
|
|
@@ -243,7 +296,12 @@ function toPlaywrightJs(body) {
|
|
|
243
296
|
* semicolons, to the end of its `.`-continued lines — so a Prettier-wrapped chain
|
|
244
297
|
* is kept whole. A name bound more than once (`for (const row of rows)`), reassigned
|
|
245
298
|
* (`t = page.…`), or used as a parameter is ambiguous and is left alone; a variable
|
|
246
|
-
* receiver is unreadable.
|
|
299
|
+
* receiver is unreadable.
|
|
300
|
+
*
|
|
301
|
+
* Deliberately file-wide when the sibling scan hands it a whole spec: a name bound
|
|
302
|
+
* in two `test()` blocks is then ambiguous and its steps lose their key, and the
|
|
303
|
+
* final substitution runs on raw text, so an alias name inside a selector string
|
|
304
|
+
* is rewritten too. Both only ever lose a match, never invent one. */
|
|
247
305
|
function resolveLocatorAliases(body) {
|
|
248
306
|
const structure = blankStringContents(body);
|
|
249
307
|
const aliases = new Map();
|
|
@@ -251,7 +309,13 @@ function resolveLocatorAliases(body) {
|
|
|
251
309
|
const name = m[1];
|
|
252
310
|
const from = m.index + m[0].length;
|
|
253
311
|
const to = valueEnd(structure, from);
|
|
254
|
-
|
|
312
|
+
// Joined onto one line: the substitution must not move the lines of the
|
|
313
|
+
// actions after it (actionStepsOf reports each action's line).
|
|
314
|
+
aliases.set(name, body
|
|
315
|
+
.slice(from, to)
|
|
316
|
+
.trim()
|
|
317
|
+
.replace(/;$/, "")
|
|
318
|
+
.replace(/\s*\n\s*/g, " "));
|
|
255
319
|
}
|
|
256
320
|
for (const name of [...aliases.keys()]) {
|
|
257
321
|
const esc = name.replace(/\$/g, "\\$");
|
|
@@ -271,6 +335,24 @@ function resolveLocatorAliases(body) {
|
|
|
271
335
|
return body;
|
|
272
336
|
return body.replace(/(?<![\w$.])([A-Za-z_$][\w$]*)(?=\s*\.)/g, (id) => aliases.get(id) ?? id);
|
|
273
337
|
}
|
|
338
|
+
/** The statements of a fragment as `[start, end)` spans on `structure` (a
|
|
339
|
+
* string-blanked copy): each cut where valueEnd cuts — a `;` at depth 0, or a line
|
|
340
|
+
* end at depth 0 that the next line does not continue with `.` — so a
|
|
341
|
+
* Prettier-wrapped chain is one statement, not one per line. */
|
|
342
|
+
export function statementSpans(structure) {
|
|
343
|
+
const out = [];
|
|
344
|
+
let i = 0;
|
|
345
|
+
while (i < structure.length) {
|
|
346
|
+
while (i < structure.length && /[\s;]/.test(structure[i]))
|
|
347
|
+
i++;
|
|
348
|
+
if (i >= structure.length)
|
|
349
|
+
break;
|
|
350
|
+
const end = valueEnd(structure, i);
|
|
351
|
+
out.push([i, end]);
|
|
352
|
+
i = end + 1;
|
|
353
|
+
}
|
|
354
|
+
return out;
|
|
355
|
+
}
|
|
274
356
|
/** End of an initialiser that starts at `from`: the `;` at paren depth 0, or a
|
|
275
357
|
* newline at depth 0 whose next line does not continue the chain with `.`. */
|
|
276
358
|
function valueEnd(structure, from) {
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type UtilsHelper } from "./parse.js";
|
|
2
|
+
import { type UtilsLanguageSpec } from "./language-spec.js";
|
|
3
|
+
import { type InlineCallSite, type SiblingFile } from "./call-sites.js";
|
|
4
|
+
/**
|
|
5
|
+
* The browser family's sibling scan: a contiguous run of actions in OTHER
|
|
6
|
+
* Skyramp-generated tests beside `testFile` whose action sequence equals a utils
|
|
7
|
+
* helper's — the inline copy of a shared step (measured: three cohorts in a row, a
|
|
8
|
+
* run created the helper, rewired the two copies it happened to read and left the
|
|
9
|
+
* third, naming it in its own report).
|
|
10
|
+
*
|
|
11
|
+
* A browser step is a SEQUENCE, so the match is a sequence match: each helper's key
|
|
12
|
+
* (verb + locator chain per action, in body order — the same key STEP 3b matches a
|
|
13
|
+
* customer's helper on) is looked for as a run of consecutive actions in the
|
|
14
|
+
* sibling. Two things stand between "consecutive" and "one call can replace it":
|
|
15
|
+
*
|
|
16
|
+
* - **What sits between two actions of the run.** A structural wait (a presence
|
|
17
|
+
* matcher on a structural locator, a `waitFor…`), a fixed sleep or a comment is
|
|
18
|
+
* transparent — the helper's own body may hold the same, and the key ignores it
|
|
19
|
+
* either way. ANYTHING ELSE breaks the run: a value assertion (it cannot move
|
|
20
|
+
* across an action — the reuse policy's own boundary rule), a page-error guard,
|
|
21
|
+
* another call, a binding, or the end of the block the run started in. The test
|
|
22
|
+
* the gap is held to is the one the verify pass holds a helper body to, so a run
|
|
23
|
+
* is matched only where a helper could have held every line of it.
|
|
24
|
+
* - **A step this cannot read.** A helper whose key is undefined is no candidate;
|
|
25
|
+
* a sibling action with an undefined key equals nothing, so no run crosses it.
|
|
26
|
+
* Both fail open — no match, no finding — as STEP 3b's decline rule does.
|
|
27
|
+
*
|
|
28
|
+
* Where two helpers' keys start the same run, the longer wins; the run's actions are
|
|
29
|
+
* consumed and the scan continues after it. A run inside the sibling's own local
|
|
30
|
+
* helper is reported with that helper's name, as the API scan does.
|
|
31
|
+
*/
|
|
32
|
+
export declare function findSiblingInlineActionSites(testFile: string, helpersByFile: ReadonlyMap<string, UtilsHelper[]>, spec: UtilsLanguageSpec, preReadSiblings: SiblingFile[] | undefined): Promise<InlineCallSite[]>;
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import * as path from "path";
|
|
2
|
+
import { blankComments, localHelperAt, localHelpersOf, } from "./parse.js";
|
|
3
|
+
import { expectArgs, HELPER_FAMILIES, } from "./language-spec.js";
|
|
4
|
+
import { actionStepsOf, blankStringContents, normalizeChain, statementSpans, } from "./action-key.js";
|
|
5
|
+
import { realpath } from "./locate.js";
|
|
6
|
+
import { nonUtilsSiblings, } from "./call-sites.js";
|
|
7
|
+
/** A presence assertion as `[normalised locator, matcher]`, or undefined when the
|
|
8
|
+
* text is not one this can read. */
|
|
9
|
+
function presenceWait(text, spec) {
|
|
10
|
+
if (!spec.assertionRe.test(text))
|
|
11
|
+
return undefined;
|
|
12
|
+
const matcher = /\)\s*\.\s*((?:not[._]\s*)?to\w+)\s*\(/.exec(text);
|
|
13
|
+
if (!matcher)
|
|
14
|
+
return undefined;
|
|
15
|
+
return [normalizeChain(expectArgs(text)), matcher[1].replace(/\s+/g, "")];
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The browser family's sibling scan: a contiguous run of actions in OTHER
|
|
19
|
+
* Skyramp-generated tests beside `testFile` whose action sequence equals a utils
|
|
20
|
+
* helper's — the inline copy of a shared step (measured: three cohorts in a row, a
|
|
21
|
+
* run created the helper, rewired the two copies it happened to read and left the
|
|
22
|
+
* third, naming it in its own report).
|
|
23
|
+
*
|
|
24
|
+
* A browser step is a SEQUENCE, so the match is a sequence match: each helper's key
|
|
25
|
+
* (verb + locator chain per action, in body order — the same key STEP 3b matches a
|
|
26
|
+
* customer's helper on) is looked for as a run of consecutive actions in the
|
|
27
|
+
* sibling. Two things stand between "consecutive" and "one call can replace it":
|
|
28
|
+
*
|
|
29
|
+
* - **What sits between two actions of the run.** A structural wait (a presence
|
|
30
|
+
* matcher on a structural locator, a `waitFor…`), a fixed sleep or a comment is
|
|
31
|
+
* transparent — the helper's own body may hold the same, and the key ignores it
|
|
32
|
+
* either way. ANYTHING ELSE breaks the run: a value assertion (it cannot move
|
|
33
|
+
* across an action — the reuse policy's own boundary rule), a page-error guard,
|
|
34
|
+
* another call, a binding, or the end of the block the run started in. The test
|
|
35
|
+
* the gap is held to is the one the verify pass holds a helper body to, so a run
|
|
36
|
+
* is matched only where a helper could have held every line of it.
|
|
37
|
+
* - **A step this cannot read.** A helper whose key is undefined is no candidate;
|
|
38
|
+
* a sibling action with an undefined key equals nothing, so no run crosses it.
|
|
39
|
+
* Both fail open — no match, no finding — as STEP 3b's decline rule does.
|
|
40
|
+
*
|
|
41
|
+
* Where two helpers' keys start the same run, the longer wins; the run's actions are
|
|
42
|
+
* consumed and the scan continues after it. A run inside the sibling's own local
|
|
43
|
+
* helper is reported with that helper's name, as the API scan does.
|
|
44
|
+
*/
|
|
45
|
+
export async function findSiblingInlineActionSites(testFile, helpersByFile, spec, preReadSiblings) {
|
|
46
|
+
const sequences = helperSequences(helpersByFile, spec);
|
|
47
|
+
if (sequences.length === 0)
|
|
48
|
+
return [];
|
|
49
|
+
const siblings = await nonUtilsSiblings(testFile, [...helpersByFile.keys()], spec, preReadSiblings, false);
|
|
50
|
+
const self = await realpath(testFile);
|
|
51
|
+
const out = [];
|
|
52
|
+
for (const { file, content } of siblings) {
|
|
53
|
+
if (path.resolve(file) === self)
|
|
54
|
+
continue;
|
|
55
|
+
const localHelpers = localHelpersOf(content, spec);
|
|
56
|
+
// Comments blanked, strings kept — the same reading the helper's key was made
|
|
57
|
+
// from, so a commented-out click is not a step and the selectors compare.
|
|
58
|
+
const steps = actionStepsOf(blankComments(content, spec), spec.language);
|
|
59
|
+
let i = 0;
|
|
60
|
+
while (i < steps.length) {
|
|
61
|
+
const match = sequences.find((s) => runMatches(steps, i, s, spec));
|
|
62
|
+
if (!match) {
|
|
63
|
+
i++;
|
|
64
|
+
continue;
|
|
65
|
+
}
|
|
66
|
+
const first = steps[i];
|
|
67
|
+
const last = steps[i + match.steps.length - 1];
|
|
68
|
+
const owner = localHelperAt(localHelpers, first.line);
|
|
69
|
+
out.push({
|
|
70
|
+
kind: "sequence",
|
|
71
|
+
file,
|
|
72
|
+
line: first.line,
|
|
73
|
+
endLine: last.line,
|
|
74
|
+
actionKey: match.key,
|
|
75
|
+
helper: match.helper,
|
|
76
|
+
utilsFile: match.utilsFile,
|
|
77
|
+
...(owner ? { localHelper: owner.name } : {}),
|
|
78
|
+
});
|
|
79
|
+
i += match.steps.length;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
return out;
|
|
83
|
+
}
|
|
84
|
+
/** Whether the helper's sequence is the run of actions starting at `at`, with
|
|
85
|
+
* nothing between its actions that a helper body could not hold, and no wait in
|
|
86
|
+
* or right after the run that contradicts one of the helper's own. */
|
|
87
|
+
function runMatches(steps, at, helper, spec) {
|
|
88
|
+
const want = helper.steps;
|
|
89
|
+
if (at + want.length > steps.length)
|
|
90
|
+
return false;
|
|
91
|
+
for (let k = 0; k < want.length; k++) {
|
|
92
|
+
const step = steps[at + k];
|
|
93
|
+
if (step.key === undefined || step.key !== want[k])
|
|
94
|
+
return false;
|
|
95
|
+
if (k > 0) {
|
|
96
|
+
const between = transparentStatements(step.gapBefore, spec);
|
|
97
|
+
if (between === undefined)
|
|
98
|
+
return false;
|
|
99
|
+
if (contradictsWaits(between, helper.waits, spec))
|
|
100
|
+
return false;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
// The structural waits that follow the last action are the run's too: a wait the
|
|
104
|
+
// helper would perform, or its opposite.
|
|
105
|
+
const trailing = transparentStatements(steps[at + want.length - 1].gapAfter, spec, { prefix: true });
|
|
106
|
+
return !contradictsWaits(trailing ?? [], helper.waits, spec);
|
|
107
|
+
}
|
|
108
|
+
/** Whether one of `statements` asserts an element the helper waits on with a
|
|
109
|
+
* different matcher or negation. */
|
|
110
|
+
function contradictsWaits(statements, waits, spec) {
|
|
111
|
+
for (const s of statements) {
|
|
112
|
+
const wait = presenceWait(s.replace(/^await\s+/, ""), spec);
|
|
113
|
+
if (!wait)
|
|
114
|
+
continue;
|
|
115
|
+
const held = waits.get(wait[0]);
|
|
116
|
+
if (held !== undefined && held !== wait[1])
|
|
117
|
+
return true;
|
|
118
|
+
}
|
|
119
|
+
return false;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* The statements of `gap` that a shared browser helper may hold — a permitted
|
|
123
|
+
* structural wait, as the verify pass judges one (`HELPER_FAMILIES.browser`), or a
|
|
124
|
+
* `waitFor…` — or `undefined` when one is not, or when the gap closes a bracket it
|
|
125
|
+
* did not open. With `prefix`, the leading transparent statements up to the first
|
|
126
|
+
* that is not: the waits that follow a run, read until the run's own text ends.
|
|
127
|
+
* Statements are cut as statementSpans cuts them, on a string-blanked copy, so a
|
|
128
|
+
* `;` inside a literal is not a boundary and a Prettier-wrapped chain is one
|
|
129
|
+
* statement. Conservative: an unfamiliar statement ends the run.
|
|
130
|
+
*/
|
|
131
|
+
function transparentStatements(gap, spec, opts = {}) {
|
|
132
|
+
const structure = blankStringContents(gap);
|
|
133
|
+
if (!opts.prefix && leavesBlock(structure))
|
|
134
|
+
return undefined;
|
|
135
|
+
const out = [];
|
|
136
|
+
for (const [from, to] of statementSpans(structure)) {
|
|
137
|
+
const text = gap.slice(from, to).trim();
|
|
138
|
+
// The `await` that precedes the next action's chain.
|
|
139
|
+
if (text === "await")
|
|
140
|
+
continue;
|
|
141
|
+
const body = text.replace(/^await\s+/, "");
|
|
142
|
+
const transparent = WAIT_STATEMENT_RE.test(blankStringContents(body)) ||
|
|
143
|
+
(spec.assertionRe.test(body) &&
|
|
144
|
+
HELPER_FAMILIES.browser.isAllowed(spec, body));
|
|
145
|
+
if (!transparent)
|
|
146
|
+
return opts.prefix ? out : undefined;
|
|
147
|
+
out.push(text);
|
|
148
|
+
}
|
|
149
|
+
return out;
|
|
150
|
+
}
|
|
151
|
+
/** A closing bracket the fragment did not open: the run leaves its block. */
|
|
152
|
+
function leavesBlock(structure) {
|
|
153
|
+
let depth = 0;
|
|
154
|
+
for (const ch of structure) {
|
|
155
|
+
if ("([{".includes(ch))
|
|
156
|
+
depth++;
|
|
157
|
+
else if (")]}".includes(ch) && --depth < 0)
|
|
158
|
+
return true;
|
|
159
|
+
}
|
|
160
|
+
return false;
|
|
161
|
+
}
|
|
162
|
+
/** `page.waitForTimeout(3000)`, `page.waitForLoadState()`, `page.getByTestId("x")
|
|
163
|
+
* .waitFor({ state: "visible" })` — a wait on the page or on a locator chain, as a
|
|
164
|
+
* statement of its own (not bound: `const p = page.waitForResponse(…)` is used
|
|
165
|
+
* later, and the run cannot carry it). */
|
|
166
|
+
const WAIT_STATEMENT_RE = /^(?:this\.)?page(?:\s*\.\s*[\w$]+\s*\([^;]*\))*\s*\.\s*(?:waitFor\w*|wait_for\w*)\s*\([^;]*\)\s*$/;
|
|
167
|
+
/** A step whose receiver is the keyboard or the mouse rather than a locator. */
|
|
168
|
+
function isElementlessStep(step) {
|
|
169
|
+
return /^\w+ (?:this\.)?page\.(?:keyboard|mouse)(?:\s|$)/.test(step);
|
|
170
|
+
}
|
|
171
|
+
/** Every keyed browser helper across the utils files, in file then body order, from
|
|
172
|
+
* the helpers the verify pass already parsed. The first helper to carry a key owns
|
|
173
|
+
* it; a second (the `duplicate-action` advisory's case) is not reported twice. */
|
|
174
|
+
function helperSequences(helpersByFile, spec) {
|
|
175
|
+
const out = [];
|
|
176
|
+
const seen = new Set();
|
|
177
|
+
for (const [utilsFile, helpers] of helpersByFile)
|
|
178
|
+
for (const h of helpers) {
|
|
179
|
+
if (!h.actionKey || !h.actionSteps || seen.has(h.actionKey))
|
|
180
|
+
continue;
|
|
181
|
+
// A key of bare keyboard or mouse steps names no element: `press "Escape"`
|
|
182
|
+
// is what closes a dialog in one helper and a menu in the next, and every
|
|
183
|
+
// Escape in every sibling matched it (measured: fixture 22, the advisory
|
|
184
|
+
// named a menu close for a dialog-closing helper). One locator-bearing step
|
|
185
|
+
// is enough to identify the sequence.
|
|
186
|
+
if (h.actionKey.split("; ").every(isElementlessStep))
|
|
187
|
+
continue;
|
|
188
|
+
seen.add(h.actionKey);
|
|
189
|
+
out.push({
|
|
190
|
+
helper: h.name,
|
|
191
|
+
utilsFile,
|
|
192
|
+
key: h.actionKey,
|
|
193
|
+
steps: h.actionSteps,
|
|
194
|
+
waits: new Map(h.assertions
|
|
195
|
+
.map((a) => presenceWait(a.text, spec))
|
|
196
|
+
.filter((w) => w !== undefined)),
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
// Longest first, so the run a longer sequence covers is not claimed by a shorter
|
|
200
|
+
// helper that shares its opening actions.
|
|
201
|
+
return out.sort((a, b) => b.steps.length - a.steps.length);
|
|
202
|
+
}
|
|
@@ -15,13 +15,68 @@ export type UtilsViolationKind = "duplicate-helper" | "body-assertion" | "scenar
|
|
|
15
15
|
/** Python only: the spec imports the shared module in a form that cannot resolve
|
|
16
16
|
* in the customer's repo. Not marker-eligible — a broken import has no reason to
|
|
17
17
|
* stay. */
|
|
18
|
-
| "import-form"
|
|
18
|
+
| "import-form"
|
|
19
|
+
/** A `reuse-verify: allow` marker that no finding of this pass consumes. The
|
|
20
|
+
* decline it documents is not in the delivered files: either it never was, or the
|
|
21
|
+
* agent went on to fix the fault and left the marker behind, so the file states a
|
|
22
|
+
* reason its own code contradicts. Not marker-eligible — a marker that documents
|
|
23
|
+
* nothing is deleted, and documenting it would only add a second one. */
|
|
24
|
+
| "stale-allow"
|
|
25
|
+
/** A shared helper whose request body no parameter of its signature reaches, beside
|
|
26
|
+
* a spec that defines its OWN helper for the same route. The pair is the fault: a
|
|
27
|
+
* body the helper holds is the right default while one caller exists, and becomes
|
|
28
|
+
* wrong the moment a second caller needs another. Marker-eligible — a caller that
|
|
29
|
+
* genuinely needs a different REQUEST, not a different body, is a decline worth
|
|
30
|
+
* documenting rather than a shape to force. */
|
|
31
|
+
| "frozen-body"
|
|
32
|
+
/** A shared helper's expected-status parameter — the one its status assertion
|
|
33
|
+
* reads — carries a default (or is optional). A call site may then omit the
|
|
34
|
+
* status it expects, and the spec states its expectation nowhere a reader can
|
|
35
|
+
* see it; a helper named for the happy path defaulting to a rejection reads as
|
|
36
|
+
* a bug on sight. Keyed on what the assertion READS, not on the parameter's
|
|
37
|
+
* name, which diverges between runs. Marker-eligible. Routed to `advisories`
|
|
38
|
+
* for now — see the classification pass in verify.ts. */
|
|
39
|
+
| "status-default"
|
|
40
|
+
/** The spec asserts the status of a response returned by a helper that already
|
|
41
|
+
* asserted it — the same literal stated twice, and the two can disagree. The
|
|
42
|
+
* expectation is stated once, as the call's status argument. Marker-eligible. */
|
|
43
|
+
| "status-restated"
|
|
44
|
+
/** A helper defined at HEAD whose parameter list this run narrowed — a default
|
|
45
|
+
* removed, a parameter renamed, removed or reordered, or a required one added.
|
|
46
|
+
* Callers this run cannot see depend on the signature at HEAD. Not
|
|
47
|
+
* marker-eligible: an incumbent is restored, not documented away. See incumbent.ts. */
|
|
48
|
+
| "incumbent-signature"
|
|
49
|
+
/** TypeScript only: the delivered module or spec fails the compiler under its most
|
|
50
|
+
* permissive settings — an error under EVERY configuration, so the customer's own
|
|
51
|
+
* `tsc` is the next thing to report it (the executor transpiles without checking
|
|
52
|
+
* types). Not marker-eligible: a file that cannot compile has no reason to stay
|
|
53
|
+
* as it is. An error that exists only under the repository's tsconfig is the
|
|
54
|
+
* `tsconfig-type-error` ADVISORY instead. */
|
|
55
|
+
| "type-error"
|
|
56
|
+
/** The spec imports a name from one of the repository's own modules that the
|
|
57
|
+
* module does not define. Not marker-eligible: the marker grammar lives in a
|
|
58
|
+
* Skyramp module, and nothing of ours is written into the customer's file. */
|
|
59
|
+
| "in-house-unresolved"
|
|
60
|
+
/** A call to an in-house helper passes an argument count outside the range its
|
|
61
|
+
* definition accepts (required count to total count). Not marker-eligible. */
|
|
62
|
+
| "in-house-arity"
|
|
63
|
+
/** This run changed an in-house module in a way that is not additive: a helper
|
|
64
|
+
* removed, renamed or rewritten, a parameter added without a default, a line
|
|
65
|
+
* outside every helper deleted. Not marker-eligible — the change is undone. */
|
|
66
|
+
| "in-house-modified"
|
|
67
|
+
/** The spec imports a sibling module this pass cannot recognise: a file with no
|
|
68
|
+
* Skyramp header that is not the repository's own (not at HEAD) — this run's
|
|
69
|
+
* module written without its header — or an import that resolves to no file.
|
|
70
|
+
* The pass cannot verify or stage what it cannot see, and a PASSED here was a
|
|
71
|
+
* gate failing open (fixture 12, run 9). Not marker-eligible: the remedy is the
|
|
72
|
+
* header line, or the path, both named in the finding. */
|
|
73
|
+
| "unresolved-module";
|
|
19
74
|
/** Kinds that only ever advise. Kept OUT of UtilsViolationKind so that type keeps
|
|
20
75
|
* meaning "a kind the allow grammar and the gate know about" — an advisory can
|
|
21
76
|
* never fail a verify and never needs (or accepts) an allow marker. */
|
|
22
|
-
export declare const UTILS_ADVISORY_KINDS: readonly ["
|
|
77
|
+
export declare const UTILS_ADVISORY_KINDS: readonly ["unusable-parameter-type", "fixed-sleep", "module-name", "duplicate-body-reach", "duplicate-action", "tsconfig-type-error", "ambient-type-error", "in-house-duplicate"];
|
|
23
78
|
export type UtilsAdvisoryKind = (typeof UTILS_ADVISORY_KINDS)[number];
|
|
24
|
-
export declare const MARKERABLE_UTILS_KINDS: readonly ["duplicate-helper", "body-assertion", "scenario-name", "assertion-loss"];
|
|
79
|
+
export declare const MARKERABLE_UTILS_KINDS: readonly ["frozen-body", "duplicate-helper", "body-assertion", "scenario-name", "assertion-loss", "status-default", "status-restated"];
|
|
25
80
|
/** A kind the allow grammar accepts. `guard-removed` is a gate kind but never
|
|
26
81
|
* markerable — a guard is restored, not documented away — so the grammar itself
|
|
27
82
|
* cannot spell it; the regex below is built from this list. */
|
|
@@ -30,9 +85,73 @@ export interface UtilsAllow {
|
|
|
30
85
|
kind: MarkerableUtilsKind;
|
|
31
86
|
helper: string;
|
|
32
87
|
reason: string;
|
|
88
|
+
/** 1-based line the marker sits on — where a finding about the marker points. */
|
|
89
|
+
line: number;
|
|
33
90
|
}
|
|
91
|
+
/**
|
|
92
|
+
* The documented-decline marker for a utils-file invariant, written in the utils file:
|
|
93
|
+
*
|
|
94
|
+
* # reuse-verify: allow <kind> <helper> — <reason> (Python)
|
|
95
|
+
* // reuse-verify: allow <kind> <helper> — <reason> (TS/JS)
|
|
96
|
+
*
|
|
97
|
+
* ONE grammar, used by both the gate and the report. The POM path's `// kept inline:`
|
|
98
|
+
* marker had two — the gate's regex and the report parser disagreed on the separator
|
|
99
|
+
* and on the file extension — and the gap was a run where the gate blocked execution
|
|
100
|
+
* on declines the report listed correctly (mcp#716, run 30965653402). Here the gate
|
|
101
|
+
* and the report call this one function.
|
|
102
|
+
*
|
|
103
|
+
* The separator is an em/en dash or a hyphen with whitespace on BOTH sides, so a
|
|
104
|
+
* hyphen inside a helper name cannot be mistaken for it. `(?!<reason)` rejects the
|
|
105
|
+
* paste-ready line from the failure text when it was pasted unedited: publishing the
|
|
106
|
+
* placeholder as the stated reason is worse than no marker.
|
|
107
|
+
*/
|
|
108
|
+
export declare const ALLOW_RE: RegExp;
|
|
109
|
+
/** Anything that announces a decline in this grammar, well-formed or not. Exported
|
|
110
|
+
* so the delivery-time strip recognises the grammar from its one declaration here
|
|
111
|
+
* rather than re-spelling it. */
|
|
112
|
+
export declare const ALLOW_LOOSE_RE: RegExp;
|
|
113
|
+
/** THIS grammar at the start of what a comment says. `reuse-verify: allow` is not a
|
|
114
|
+
* phrase a customer writes, so an own-line comment opening with it is gate-addressed
|
|
115
|
+
* whatever follows — the delivery strip removes it without being able to READ it.
|
|
116
|
+
* `kept inline:` cannot claim that: it opens ordinary English too. */
|
|
117
|
+
export declare const ALLOW_START_RE: RegExp;
|
|
118
|
+
/** A marker's SHAPE, whatever kind it names: the announcement, then a subject, then
|
|
119
|
+
* the separator and a reason. Ordinary prose that merely opens with the phrase — `//
|
|
120
|
+
* kept inline: this loop is kept inline for performance` — carries no separator and
|
|
121
|
+
* is not matched. Used where a line must be recognised as gate-addressed without the
|
|
122
|
+
* grammar being able to READ it: an advisory kind is inert by design, so the verify
|
|
123
|
+
* pass passes it and the comment would otherwise ship. */
|
|
124
|
+
export declare const MARKER_SHAPE_RE: RegExp;
|
|
34
125
|
/** The exact line to paste for a violation — what the failure text hands the agent. */
|
|
35
126
|
export declare function allowMarkerLine(spec: UtilsLanguageSpec, kind: MarkerableUtilsKind, helper: string): string;
|
|
127
|
+
/**
|
|
128
|
+
* The marker text, when the marker's comment OWNS its line: whitespace, the comment
|
|
129
|
+
* prefix, then the marker and nothing else.
|
|
130
|
+
*
|
|
131
|
+
* One placement, because it is the one both gates instruct and the only one that can
|
|
132
|
+
* be removed from a delivered file by deleting a line. A marker after code, inside a
|
|
133
|
+
* block comment or on a JSDoc continuation is reported as malformed instead — the
|
|
134
|
+
* decline is never dropped in silence, and the failure text gives back the line to
|
|
135
|
+
* paste in its place.
|
|
136
|
+
*
|
|
137
|
+
* A line whose first characters are the comment prefix cannot be a regex literal or a
|
|
138
|
+
* trailing comment, so this needs no lexer beyond the blanked strings. It cannot tell
|
|
139
|
+
* whether the prefix OPENS anything, though — inside `/* … *\/` a `//` opens nothing,
|
|
140
|
+
* the block does — so the caller settles that with `lineCommentOpeners` first. The
|
|
141
|
+
* parser asked the text while the strip asked the lexer, and a marker in a block
|
|
142
|
+
* comment was then read as a decline that the strip could not remove: the fault was
|
|
143
|
+
* authorised and the note shipped.
|
|
144
|
+
*/
|
|
145
|
+
export declare function markerOnOwnLine(raw: string, code: string, prefix: "//" | "#"): string | undefined;
|
|
146
|
+
/**
|
|
147
|
+
* Line indices whose first non-space characters OPEN a line comment.
|
|
148
|
+
*
|
|
149
|
+
* `undefined` where the language has no block comment: every line with the prefix at
|
|
150
|
+
* its head opens one, and the caller needs no check. Stated ONCE, because the parser
|
|
151
|
+
* and the delivery strip must not disagree about which lines are comments — when they
|
|
152
|
+
* did, one authorised a decline the other refused to remove.
|
|
153
|
+
*/
|
|
154
|
+
export declare function lineCommentOpeners(content: string, prefix: "//" | "#"): Set<number> | undefined;
|
|
36
155
|
export declare function parseUtilsAllows(content: string, spec: UtilsLanguageSpec): {
|
|
37
156
|
allows: UtilsAllow[];
|
|
38
157
|
/** Marker lines the loose pattern recognises but the grammar cannot read — a decline
|