@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
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** A run recording more traces than this has a problem no counter fixes; the cap is
|
|
2
|
+
* here so a runaway loop cannot grow the number without bound. */
|
|
3
|
+
export declare const MAX_COUNTED_EXPORTS = 100;
|
|
4
|
+
/** How many times the report may be refused for an unrecorded planned UI test.
|
|
5
|
+
* The refusal is meant to cost the agent a recording, not the whole run: a
|
|
6
|
+
* resubmission that records nothing still advances nothing, and without this cap
|
|
7
|
+
* an agent that will not record and a job timeout are the same outcome. */
|
|
8
|
+
export declare const MAX_UI_DELIVERY_REFUSALS = 3;
|
|
9
|
+
/** Record one `skyramp_export_zip` call, or do nothing. NOTHING HERE MAY COST THE
|
|
10
|
+
* EXPORT: the payload the agent receives is untouched and every failure is
|
|
11
|
+
* swallowed with a log line. */
|
|
12
|
+
export declare function recordTraceExport(): void;
|
|
13
|
+
/** Recording attempts this run. */
|
|
14
|
+
export declare function traceExportAttempts(): number;
|
|
15
|
+
/** Count one refusal and return the new total. */
|
|
16
|
+
export declare function countUiDeliveryRefusal(): number;
|
|
17
|
+
/** Refusals so far, without counting one. */
|
|
18
|
+
export declare function uiDeliveryRefusals(): number;
|
|
19
|
+
/** Test seam. The store is module state keyed by the run; a suite that writes a
|
|
20
|
+
* fresh state file per test reseats it anyway, but an explicit reset keeps a test
|
|
21
|
+
* that reuses one honest. */
|
|
22
|
+
export declare function resetTraceExportStoreForTests(): void;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { currentRunStateFile } from "../utils/AnalysisStateManager.js";
|
|
2
|
+
import { logger } from "../utils/logger.js";
|
|
3
|
+
/** How many times this run called `skyramp_export_zip`, and how many times the
|
|
4
|
+
* report was refused for a planned UI test nobody recorded. IN PROCESS, not in the
|
|
5
|
+
* state file, for the same reason as the blueprint digests: the only reader shares
|
|
6
|
+
* a process with the browser tools, and a read-modify-write per export buys
|
|
7
|
+
* nothing. KEYED BY THE RUN, one slot — a new key means the previous run is over.
|
|
8
|
+
*
|
|
9
|
+
* ATTEMPTS, never successes. An export that errored still cost the agent a
|
|
10
|
+
* recording, and the gate reading this has to be satisfiable by TRYING: counting
|
|
11
|
+
* only successes lets one screen that cannot be recorded refuse the report for the
|
|
12
|
+
* rest of the run. */
|
|
13
|
+
let countedRunStateFile;
|
|
14
|
+
let exportAttempts = 0;
|
|
15
|
+
let deliveryRefusals = 0;
|
|
16
|
+
/** A run recording more traces than this has a problem no counter fixes; the cap is
|
|
17
|
+
* here so a runaway loop cannot grow the number without bound. */
|
|
18
|
+
export const MAX_COUNTED_EXPORTS = 100;
|
|
19
|
+
/** How many times the report may be refused for an unrecorded planned UI test.
|
|
20
|
+
* The refusal is meant to cost the agent a recording, not the whole run: a
|
|
21
|
+
* resubmission that records nothing still advances nothing, and without this cap
|
|
22
|
+
* an agent that will not record and a job timeout are the same outcome. */
|
|
23
|
+
export const MAX_UI_DELIVERY_REFUSALS = 3;
|
|
24
|
+
/** The slot this run writes to. NOT gated on a resolvable state file: a run whose
|
|
25
|
+
* path cannot be resolved still records and still reports, and a counter that
|
|
26
|
+
* stayed at zero there made the gate below refuse a report it could never let
|
|
27
|
+
* through. `NO_RUN` is one slot like any other — a new key still clears it. */
|
|
28
|
+
const NO_RUN = "<no-run>";
|
|
29
|
+
function reseatRun() {
|
|
30
|
+
let runStateFile;
|
|
31
|
+
try {
|
|
32
|
+
runStateFile = currentRunStateFile() ?? NO_RUN;
|
|
33
|
+
}
|
|
34
|
+
catch {
|
|
35
|
+
runStateFile = NO_RUN;
|
|
36
|
+
}
|
|
37
|
+
if (runStateFile !== countedRunStateFile) {
|
|
38
|
+
countedRunStateFile = runStateFile;
|
|
39
|
+
exportAttempts = 0;
|
|
40
|
+
deliveryRefusals = 0;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
/** Record one `skyramp_export_zip` call, or do nothing. NOTHING HERE MAY COST THE
|
|
44
|
+
* EXPORT: the payload the agent receives is untouched and every failure is
|
|
45
|
+
* swallowed with a log line. */
|
|
46
|
+
export function recordTraceExport() {
|
|
47
|
+
try {
|
|
48
|
+
reseatRun();
|
|
49
|
+
if (exportAttempts >= MAX_COUNTED_EXPORTS)
|
|
50
|
+
return;
|
|
51
|
+
exportAttempts += 1;
|
|
52
|
+
}
|
|
53
|
+
catch (error) {
|
|
54
|
+
const detail = error instanceof Error ? error.message : String(error);
|
|
55
|
+
logger.warning(`recordTraceExport failed: ${detail}`);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
/** Recording attempts this run. */
|
|
59
|
+
export function traceExportAttempts() {
|
|
60
|
+
reseatRun();
|
|
61
|
+
return exportAttempts;
|
|
62
|
+
}
|
|
63
|
+
/** Count one refusal and return the new total. */
|
|
64
|
+
export function countUiDeliveryRefusal() {
|
|
65
|
+
reseatRun();
|
|
66
|
+
deliveryRefusals += 1;
|
|
67
|
+
return deliveryRefusals;
|
|
68
|
+
}
|
|
69
|
+
/** Refusals so far, without counting one. */
|
|
70
|
+
export function uiDeliveryRefusals() {
|
|
71
|
+
reseatRun();
|
|
72
|
+
return deliveryRefusals;
|
|
73
|
+
}
|
|
74
|
+
/** Test seam. The store is module state keyed by the run; a suite that writes a
|
|
75
|
+
* fresh state file per test reseats it anyway, but an explicit reset keeps a test
|
|
76
|
+
* that reuses one honest. */
|
|
77
|
+
export function resetTraceExportStoreForTests() {
|
|
78
|
+
countedRunStateFile = undefined;
|
|
79
|
+
exportAttempts = 0;
|
|
80
|
+
deliveryRefusals = 0;
|
|
81
|
+
}
|
|
@@ -43,7 +43,8 @@ Then execute in strict order:
|
|
|
43
43
|
|
|
44
44
|
- **After every action that changes the page**, call \`browser_snapshot\` before the next interaction — refs become stale after navigation, clicks that trigger page updates, and form submissions.
|
|
45
45
|
- **Iframe content** appears inline in the snapshot — interact with those elements using their refs normally.
|
|
46
|
-
- **
|
|
46
|
+
- **One recorder, and the export drains it**: every \`browser_*\` call accumulates into ONE buffer, exploration included — whatever you did before the flow is in the trace with it. A successful \`skyramp_export_zip\` writes that buffer, EMPTIES it and closes the browser, so the next recording starts clean. A trace that came out polluted is therefore a reason to record again, not a reason to stop, and the retry costs you one navigation and the flow. Record each test in its own pass: \`browser_navigate\` to the start URL, the flow, export.
|
|
47
|
+
- **Trace deduplication is narrower than it sounds**: a repeated \`browser_navigate\` drops the attempt before it only when it repeats the MOST RECENT \`browser_navigate\`. Clicks and types in between are fine; another navigation is not — a detour through a sign-out page, say, and BOTH attempts are exported. Never rely on it to clean up an exploratory session: export that session to a throwaway path and discard the zip, which leaves the recorder empty for the real one.
|
|
47
48
|
- **No Docker required**: the \`browser_*\` tools run a local browser session managed by the MCP server. Docker is ONLY used by \`skyramp_start_trace_collection\` (manual recording mode). Never suggest or check for Docker when using AI-driven recording.
|
|
48
49
|
${modularizeNote}
|
|
49
50
|
|
|
@@ -55,11 +56,18 @@ These concepts drive the DOM Analyzer capture tools and constrain how their outp
|
|
|
55
56
|
- **\`browser_blueprint\` — stable logical names**: logical names like \`add_order_btn\` and their derived \`getByRole\` locators survive page reloads and playback. Use them in generated test code. Call \`browser_blueprint\` before and after each meaningful action to capture state changes.
|
|
56
57
|
|
|
57
58
|
### Assertions
|
|
58
|
-
Call \`browser_assert\` when assertions are needed.
|
|
59
|
+
Call \`browser_assert\` when assertions are needed. Provide \`expected\` for every type that takes one (all except \`visible\`).
|
|
59
60
|
- \`type: "text"\` — verify an element contains expected text
|
|
60
61
|
- \`type: "value"\` — verify an input field has an expected value
|
|
62
|
+
- \`type: "css"\` — verify a computed style (\`property\` = the CSS property, e.g. \`background-color\`; \`expected\` = the value the app computes)
|
|
63
|
+
- \`type: "class"\` — verify the element carries a class (\`expected\` = one class name)
|
|
64
|
+
- \`type: "attribute"\` — verify an attribute value (\`property\` = the attribute name; \`expected\` = its value)
|
|
61
65
|
|
|
62
|
-
**Visual / screenshot assertions.** When the instruction asks to take a screenshot, capture a baseline, or verify how a page/element/region *looks* (as opposed to its text or value), call \`browser_visual_snapshot\` — it records a \`toHaveScreenshot()\` assertion so the generated test pixel-compares against a baseline image on every run.
|
|
66
|
+
**Visual / screenshot assertions.** When the instruction asks to take a screenshot, capture a baseline, or verify how a page/element/region *looks* (as opposed to its text or value), call \`browser_visual_snapshot\` — it records a \`toHaveScreenshot()\` assertion so the generated test pixel-compares against a baseline image on every run.
|
|
67
|
+
|
|
68
|
+
**When the change under test is how something looks** — a colour, class or attribute the diff changes — assert it directly with \`browser_assert\` \`type: css/class/attribute\` on the element that OWNS the property (the flex container for \`flex-direction\`, not its children); if it has no stable ref, note a recording gap rather than assert the wrong element. Order has no kind: \`flex-direction\` when the diff flipped it, else a \`boundingBox()\` comparison at enhance. \`browser_visual_snapshot\` only for a look no property expresses (image, gradient, chart).
|
|
69
|
+
|
|
70
|
+
Do NOT use \`browser_take_screenshot\` to record a visual check: it only captures a throwaway image, is dropped at export (it produces no assertion), and will NOT appear in the generated test. Use it only to view the page yourself while recording. \`filename\` is optional on \`browser_visual_snapshot\`: if the instruction names a baseline file (e.g. \`page-001.png\`) pass it as \`filename\`, otherwise omit it and one is auto-generated per \`snapshotType\` (\`page-NNN.png\` for a page, \`el-NNN.png\` for an element, \`region-NNN.png\` for a region).
|
|
63
71
|
|
|
64
72
|
### Tips
|
|
65
73
|
- **Custom dropdowns (Radix, MUI, etc.)**: click the combobox trigger → \`browser_snapshot\` → click the option. Do NOT use \`browser_select_option\` — it only works on native \`<select>\` elements.
|
|
@@ -1,25 +1,22 @@
|
|
|
1
1
|
import { generateSkyrampHeader, SKYRAMP_UTILS_HEADER } from "../utils/utils.js";
|
|
2
2
|
import { isUtilsReuseEnabled } from "../utils/featureFlags.js";
|
|
3
|
-
import { isModularizeFirstTarget, isPomAwareTarget, } from "../utils/reuseRouting.js";
|
|
3
|
+
import { inlineCallSiteFamily, isModularizeFirstTarget, isPomAwareTarget, } from "../utils/reuseRouting.js";
|
|
4
4
|
import { getPomAwareCodeReusePrompt } from "./pom-aware-code-reuse.js";
|
|
5
|
-
import { NO_SHADOWING_RULE, selectHelperPolicy, } from "./shared-helper-policy.js";
|
|
5
|
+
import { NO_SHADOWING_RULE, SELECTOR_OWNING_MODULE_RULE, selectHelperPolicy, } from "./shared-helper-policy.js";
|
|
6
|
+
import { UTILS_LANGUAGE_SPECS } from "../utils/utils-verify/language-spec.js";
|
|
7
|
+
/** The prescribed module name comes from the verifier's language table, which is the
|
|
8
|
+
* ONE declaration of it: the instruction the agent reads and the name the verify pass
|
|
9
|
+
* demands cannot drift apart. Java is stated here because utils reuse is disabled for
|
|
10
|
+
* it, so the verifier has no entry to read. */
|
|
6
11
|
const LANGUAGE_MAP = {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
fileName:
|
|
10
|
-
|
|
12
|
+
...Object.fromEntries(Object.entries(UTILS_LANGUAGE_SPECS).map(([language, spec]) => [
|
|
13
|
+
language,
|
|
14
|
+
{ extension: spec.extensions[0].slice(1), fileName: spec.fileName },
|
|
15
|
+
])),
|
|
11
16
|
java: {
|
|
12
17
|
extension: "java",
|
|
13
18
|
fileName: "SkyrampUtils.java",
|
|
14
19
|
},
|
|
15
|
-
javascript: {
|
|
16
|
-
extension: "js",
|
|
17
|
-
fileName: "skyrampUtils.js",
|
|
18
|
-
},
|
|
19
|
-
typescript: {
|
|
20
|
-
extension: "ts",
|
|
21
|
-
fileName: "skyrampUtils.ts",
|
|
22
|
-
},
|
|
23
20
|
};
|
|
24
21
|
function genericNearDupExample(testFile) {
|
|
25
22
|
return `### Worked example
|
|
@@ -52,18 +49,16 @@ export async function uploadFileToRFI(page, fileName, tabName) {
|
|
|
52
49
|
}
|
|
53
50
|
\`\`\`
|
|
54
51
|
|
|
55
|
-
These ARE near-duplicates. Same primitive sequence; the only material difference is the \`.first()\` qualifier on the locator. \`tabName\` is unused in the body — recorder noise, drop it. Correct merge:
|
|
52
|
+
These ARE near-duplicates. Same primitive sequence; the only material difference is the \`.first()\` qualifier on the locator. \`tabName\` is unused in the body — recorder noise, drop it. The \`waitForTimeout\` lines are recorder noise too: a fixed sleep is not a structural wait, and in a shared helper every importer pays it on every run. The \`waitForResponse\` correlation and the \`filechooser\` event already cover this step, so the merged helper waits on those; where a step has no such signal, wait on the element the next line touches. Correct merge:
|
|
56
53
|
|
|
57
54
|
\`\`\`ts
|
|
58
55
|
export async function uploadFileViaChooser(page: Page, fileName: string) {
|
|
59
|
-
await page.waitForTimeout(1500);
|
|
60
56
|
const responsePromise = page.waitForResponse("**/api/files/upload**");
|
|
61
57
|
const fileUploadPromise = page.waitForEvent("filechooser");
|
|
62
58
|
await page.getByText("Choose a file").first().click();
|
|
63
59
|
const fileChooser = await fileUploadPromise;
|
|
64
60
|
await fileChooser.setFiles(fileName);
|
|
65
61
|
await responsePromise;
|
|
66
|
-
await page.waitForTimeout(1500);
|
|
67
62
|
}
|
|
68
63
|
\`\`\`
|
|
69
64
|
|
|
@@ -101,6 +96,11 @@ export function getCodeReusePrompt(testFile, language, framework, scopedPoms, te
|
|
|
101
96
|
// file. STEP 5b seeds the utils file from the current test's own helpers so
|
|
102
97
|
// this run's output carries it and later tests import instead of re-defining.
|
|
103
98
|
const seedsUtils = modularizeFirst;
|
|
99
|
+
// The name is prescribed in LANGUAGE_MAP and, until the verify pass checked it,
|
|
100
|
+
// nothing held a run to it: testplan-run-9 delivered `skyrampUiUtils.ts` on one
|
|
101
|
+
// fixture and `skyrampUtils.ts` on another, for the same role on one repository.
|
|
102
|
+
// Stated once and rendered at both places that create the file.
|
|
103
|
+
const moduleNameRule = `**THE MODULE'S NAME IS NOT A CHOICE.** The shared module for ${lang} is \`${fileName}\`, and a module you create carries exactly that name — a later run against this repository then finds and extends it instead of writing a second module beside it under another name. A module that ALREADY EXISTS keeps the name it has: never rename it, whatever it is called, because tests you cannot see import it. Only where \`${fileName}\` is already large may a SECOND module carry another name.`;
|
|
104
104
|
// Naming, equivalence and assertion rules for helpers headed to the shared
|
|
105
105
|
// file are the helper policy's — selected once by test type, stated once.
|
|
106
106
|
const policy = selectHelperPolicy(testType);
|
|
@@ -115,13 +115,31 @@ export function getCodeReusePrompt(testFile, language, framework, scopedPoms, te
|
|
|
115
115
|
? `**IF NO OTHER SKYRAMP-GENERATED TEST FILES ARE FOUND, SKIP DIRECTLY TO STEP 5b — do not process STEP 4b or STEP 5.**`
|
|
116
116
|
: `**STOP HERE IF NO OTHER SKYRAMP-GENERATED TEST FILES FOUND**
|
|
117
117
|
**IF NO OTHER SKYRAMP-GENERATED TEST FILES ARE FOUND, SKIP TO STEP 6 - DO NOT CREATE ANY UTILS FILES.**`;
|
|
118
|
+
// The repository's own browser helper modules. UI only, and only on the seeded
|
|
119
|
+
// (utils reuse on, page-object reuse off) flow: a browser test and the helpers it
|
|
120
|
+
// calls drive one library, so the verifier's action key compares a step to the
|
|
121
|
+
// customer's helper; the API side has no such key and is a separate change.
|
|
122
|
+
const inHouseBrowser = seedsUtils && policy.kind === "browser";
|
|
123
|
+
const inHouseDiscoveryStep = inHouseBrowser
|
|
124
|
+
? inHouseDiscovery(testFile, fileName)
|
|
125
|
+
: "";
|
|
126
|
+
const inHouseMatchStep = inHouseBrowser
|
|
127
|
+
? inHouseMatch(testFile, fileName, policy)
|
|
128
|
+
: "";
|
|
129
|
+
const inHouseSeedRule = inHouseBrowser
|
|
130
|
+
? `
|
|
131
|
+
**IF STEP 2b FOUND A QUALIFYING IN-HOUSE MODULE, SKIP THIS STEP.** STEP 3b already placed each of this test's helpers: replaced by a call to one of theirs, or added to their module in their style. A helper STEP 3b left local (their matching helper's key is undefined) stays local in ${testFile} — it is not moved into \`${fileName}\`, and \`${fileName}\` is not created beside their module. Where a \`${fileName}\` from an earlier run already sits beside their module, leave it as it is. This step runs only when STEP 2b found no qualifying module.
|
|
132
|
+
`
|
|
133
|
+
: "";
|
|
118
134
|
const seedStepBlock = seedsUtils
|
|
119
135
|
? `## STEP 5b: MOVE THIS TEST'S OWN HELPERS INTO \`${fileName}\`
|
|
120
136
|
|
|
121
|
-
skyramp_modularization already ran on ${testFile} and extracted its steps into named helper functions. Those helpers belong in
|
|
122
|
-
|
|
137
|
+
skyramp_modularization already ran on ${testFile} and extracted its steps into named helper functions. Those helpers belong in a shared module${inHouseBrowser ? " — the repository's own browser helper module when STEP 2b found one (STEP 3b), otherwise" : ", "} \`${fileName}\`${inHouseBrowser ? " —" : ","} so later tests import them instead of re-defining them.
|
|
138
|
+
${inHouseSeedRule}
|
|
123
139
|
${pyImportRuleLine(fileName)}
|
|
124
140
|
|
|
141
|
+
${moduleNameRule}
|
|
142
|
+
|
|
125
143
|
For each helper function still defined locally in ${testFile} (i.e. not already merged by STEP 4b):
|
|
126
144
|
1. **CREATE** \`${fileName}\` if it does not exist, with the standard header:
|
|
127
145
|
\`\`\`${ext}
|
|
@@ -141,35 +159,38 @@ This step MOVES helpers that skyramp_modularization already created — it does
|
|
|
141
159
|
**IF \`${fileName}\` ALREADY CONTAINS A HELPER FOR ${policy.sameStep}** that differs from what ${testFile} needs only by ${policy.liftableLiterals}: do NOT define a second helper — EXTEND the utils helper by lifting the differing literals to parameters whose defaults are the utils version's current literals (existing call sites stay valid unchanged), then import and call it with this test's values. ${policy.oneHelperRule(fileName)}${policy.structuralNoise ? ` ${policy.structuralNoise}.` : ""} ${NO_SHADOWING_RULE}
|
|
142
160
|
`
|
|
143
161
|
: "";
|
|
144
|
-
// SKYR-4219: an inline
|
|
162
|
+
// SKYR-4219: an inline copy of a step is a CALL SITE for an existing helper, not a
|
|
145
163
|
// helper to move. Without this, a direct-mode sibling (plain literals, no
|
|
146
|
-
//
|
|
147
|
-
// same request,
|
|
148
|
-
// helper
|
|
149
|
-
//
|
|
150
|
-
|
|
151
|
-
|
|
164
|
+
// `data_override`/`uniqueSuffix`) never meets the scenario-mode helper for the
|
|
165
|
+
// same request, a step still inline in the current test never meets the utils
|
|
166
|
+
// helper, and a browser spec that repeats a helper's action sequence keeps its copy
|
|
167
|
+
// — reuse degrades to a no-op in any mixed directory. The text is the policy's, in
|
|
168
|
+
// the kind's own terms; the gate is inlineCallSiteFamily, which the verify pass runs
|
|
169
|
+
// its sibling scan on, so the rule and the scan cannot drift apart.
|
|
170
|
+
const inlineCallSiteRule = inlineCallSiteFamily(testType, lang)
|
|
171
|
+
? policy.inlineCallSiteRule
|
|
152
172
|
: "";
|
|
173
|
+
const site = policy.inlineSite;
|
|
153
174
|
// Its own step, placed after 5b: the agent routinely satisfies ${testFile} in STEP 3
|
|
154
175
|
// and jumps straight to verification, never entering STEP 4 — so a sibling rule parked
|
|
155
176
|
// there is never read (measured: eval run u4219b). This is where the shared helper is
|
|
156
177
|
// guaranteed to exist and the agent is guaranteed to still be running.
|
|
157
|
-
const siblingCallSitesStep =
|
|
158
|
-
? `## STEP 5c: REPLACE
|
|
178
|
+
const siblingCallSitesStep = inlineCallSiteRule
|
|
179
|
+
? `## STEP 5c: REPLACE ${site.nouns.toUpperCase()} IN OTHER SKYRAMP-GENERATED TESTS WITH ${site.target(fileName)}
|
|
159
180
|
|
|
160
|
-
**Run this step EVEN IF STEP 3 already satisfied ${testFile} and STEPS 4–5b did nothing.** ${
|
|
181
|
+
**Run this step EVEN IF STEP 3 already satisfied ${testFile} and STEPS 4–5b did nothing.** ${inlineCallSiteRule}
|
|
161
182
|
|
|
162
183
|
${pyImportRuleLine(fileName)} (this applies to the import you add to the SIBLING file too — its directory is what decides the form.)
|
|
163
184
|
|
|
164
185
|
1. Grep for the other Skyramp-generated test files exactly as in STEP 4 (codegen marker \`${codegenMarker}\`, excluding ${testFile} and \`${fileName}\`).
|
|
165
|
-
2. In each, find every
|
|
166
|
-
3. For each match: import the helper into that file and replace the
|
|
167
|
-
4. A
|
|
168
|
-
|
|
186
|
+
2. In each, find every ${site.noun} ${site.match(fileName)}.
|
|
187
|
+
3. For each match: import the helper into that file and replace the ${site.unit} with the call, passing the ${site.unit}'s literals (or expressions) as arguments; ${site.lift(fileName)}. Change NOTHING else in that file — ${site.keeps}.
|
|
188
|
+
4. A ${site.unit} with no matching helper, or one that differs structurally, stays as it is. Conservative bias: a wrong replacement breaks a passing test; a missed one leaves a duplicate.
|
|
189
|
+
${site.afterSteps}
|
|
169
190
|
`
|
|
170
191
|
: "";
|
|
171
192
|
const finalReminderScope = seedsUtils
|
|
172
|
-
? `**ONLY MOVE HELPERS THAT ALREADY EXIST IN TEST FILES — NEVER AUTHOR NEW ONES
|
|
193
|
+
? `**ONLY MOVE HELPERS THAT ALREADY EXIST IN TEST FILES — NEVER AUTHOR NEW ONES**${inHouseBrowser ? " (adding one of THIS test's helpers to the repository's own module in STEP 3b is a move, not authoring; an inline step with no matching helper of theirs stays inline)" : ""}`
|
|
173
194
|
: `**ONLY MOVE EXISTING HELPERS FROM OTHER TEST FILES**`;
|
|
174
195
|
const decisionTreeTail = seedsUtils
|
|
175
196
|
? `3. Found other test files with only repetitive patterns? → Step 5b (seed utils from this test's own helpers)
|
|
@@ -181,7 +202,7 @@ ${pyImportRuleLine(fileName)} (this applies to the import you add to the SIBLING
|
|
|
181
202
|
5. Other test files identical to current? → SKIP to Step 6, NO utils file`;
|
|
182
203
|
const precondition = modularizeFirst
|
|
183
204
|
? `
|
|
184
|
-
**PRECONDITION — check your own tool-call history, not the file**: this flow moves the helpers skyramp_modularization created into \`${fileName}\` (STEP 5b). If you have NOT called skyramp_modularization on ${testFile} in this run, STOP: call it now with \`testFile\` set to ${testFile}, \`testType: "${testType}"\`, and \`isTraceBased: true\`, apply its instructions, then call skyramp_reuse_code again with the same arguments as this call. If you HAVE called it and the file still defines no helper functions, that is a legitimate outcome — proceed; STEP 5b will simply have nothing to move.
|
|
205
|
+
**PRECONDITION — check your own tool-call history, not the file**: this flow moves the helpers skyramp_modularization created into \`${fileName}\` (STEP 5b)${inHouseBrowser ? " — or into the repository's own browser helper module when it has one (STEP 3b)" : ""}. If you have NOT called skyramp_modularization on ${testFile} in this run, STOP: call it now with \`testFile\` set to ${testFile}, \`testType: "${testType}"\`, and \`isTraceBased: true\`, apply its instructions, then call skyramp_reuse_code again with the same arguments as this call. If you HAVE called it and the file still defines no helper functions, that is a legitimate outcome — proceed; STEP 5b will simply have nothing to move.
|
|
185
206
|
`
|
|
186
207
|
: "";
|
|
187
208
|
return `# CODE REUSE - 6 CLEAR STEPS
|
|
@@ -214,17 +235,16 @@ Use the Grep tool to search for files containing "${SKYRAMP_UTILS_HEADER}":
|
|
|
214
235
|
- Output mode: "files_with_matches"
|
|
215
236
|
**CRITICAL: Only look for util files with header ${SKYRAMP_UTILS_HEADER}** - exclude test files (files with "test", "spec", ".test.", ".spec." in the name).
|
|
216
237
|
Read the matching non-test files and check if any helpers can be reused in ${testFile}.
|
|
217
|
-
|
|
238
|
+
${inHouseDiscoveryStep}
|
|
218
239
|
## STEP 3: USE EXISTING HELPERS FROM UTILS SOURCE FILES FOUND IN STEP 2
|
|
219
|
-
If helpers exist in util file that can be reused in ${testFile} without modifying them${
|
|
240
|
+
If helpers exist in util file that can be reused in ${testFile} without modifying them${inlineCallSiteRule ? site.extendClause : ""}:
|
|
220
241
|
- Import them into ${testFile}
|
|
221
242
|
- Remove any duplicate code in ${testFile}
|
|
222
|
-
${
|
|
223
|
-
? `- ${
|
|
243
|
+
${inlineCallSiteRule
|
|
244
|
+
? `- ${inlineCallSiteRule} This applies to every ${site.stepNoun} still inline in ${testFile} that matches a utils helper.
|
|
224
245
|
`
|
|
225
246
|
: ""}- Test that ${testFile} still works without any errors and logical is same as original test file.
|
|
226
|
-
${utilsMergeRule}
|
|
227
|
-
|
|
247
|
+
${utilsMergeRule}${inHouseMatchStep}
|
|
228
248
|
## STEP 4: FIND LOCAL HELPERS IN OTHER SKYRAMP-GENERATED TEST FILES
|
|
229
249
|
|
|
230
250
|
You are looking for sibling test files generated by Skyramp's codegen. They start with the comment line \`${codegenMarker}…\` (note: the version suffix is what distinguishes them from the SkyrampUtils header). The substring \`${SKYRAMP_UTILS_HEADER}\` is contained in that line, so:
|
|
@@ -255,8 +275,8 @@ NOT A HELPER FUNCTION (do not extract):
|
|
|
255
275
|
- No function definition/signature
|
|
256
276
|
- Example: Multiple \`await page.getByTestId("xyz").click()\` directly in test
|
|
257
277
|
|
|
258
|
-
${
|
|
259
|
-
? `(
|
|
278
|
+
${inlineCallSiteRule
|
|
279
|
+
? `(${site.nouns} in OTHER test files are not helpers to move — STEP 5c replaces them with calls to the shared helpers.)
|
|
260
280
|
|
|
261
281
|
`
|
|
262
282
|
: ""}**IF OTHER TEST FILES ONLY CONTAIN REPETITIVE PATTERNS (NO ACTUAL HELPER FUNCTIONS), SKIP TO ${skipTarget}**
|
|
@@ -300,7 +320,7 @@ For each helper defined locally in ${testFile}:
|
|
|
300
320
|
- **Conservative bias**: a wrong merge breaks both tests; a missed merge leaves a duplicate. When in doubt, do NOT merge.
|
|
301
321
|
- **No "cleanup"**: the merged body must mirror the original primitive sequence — same waits, same correlation patterns, same order. This is not refactoring.
|
|
302
322
|
${pyImportRuleLine(fileName)}
|
|
303
|
-
- **Typed parameters (TypeScript)**: the merged helper types every parameter (\`page: Page\`, values by their type); add \`import type { Page } from '@playwright/test'\` to the utils file if it is missing. Never \`page: any\` or an untyped \`page\` —
|
|
323
|
+
- **Typed parameters (TypeScript)**: the merged helper types every parameter (\`page: Page\`, values by their type); add \`import type { Page } from '@playwright/test'\` to the utils file if it is missing. Never \`page: any\`, \`page: unknown\`, or an untyped \`page\` — an untyped one fails a repo that type-checks its tests under \`noImplicitAny\`, and \`unknown\` fails at its first use under every setting.
|
|
304
324
|
- **Don't merge with helpers already in \`${fileName}\`**: those are STEP 3's territory. STEP 4b is strictly cross-test merge between sibling Skyramp-generated test files.
|
|
305
325
|
|
|
306
326
|
---
|
|
@@ -328,7 +348,7 @@ ${pyImportRuleLine(fileName)}
|
|
|
328
348
|
\`\`\`${ext}
|
|
329
349
|
${generateSkyrampHeader(lang)}
|
|
330
350
|
\`\`\`
|
|
331
|
-
|
|
351
|
+
${moduleNameRule}
|
|
332
352
|
2. **COPY** those local helper functions from original test source files to \`${fileName}\` without modifying them${seedsUtils ? ` — with ONE exception, checked BEFORE the copy: ${policy.assertionRule} Relocate a trailing excluded assertion into the owning test's body first; the copy that lands in \`${fileName}\` carries none.${policy.moveRule ? ` ${policy.moveRule}` : ""}` : ""}
|
|
333
353
|
3. **DELETE** those local helper functions from test source files (REMOVE THEM COMPLETELY) WITHOUT ANY OTHER CHANGES.
|
|
334
354
|
4. **IMPORT** those local helper functions from \`${fileName}\` back into test source files WITHOUT MAKING ANY OTHER CHANGE.
|
|
@@ -348,7 +368,7 @@ ${seedStepBlock}${siblingCallSitesStep}## STEP 6: VERIFY AND VALIDATE
|
|
|
348
368
|
6. **VERIFY** that no unnecessary helper functions were created (functions that duplicate existing functionality)
|
|
349
369
|
7. **VERIFY** that all helper functions in utils are actually imported and used in the test files
|
|
350
370
|
8. **REMOVE** any helper functions that are not being used after refactoring
|
|
351
|
-
9. **NEVER** refactor, reorganize, or restructure existing source test files beyond moving helpers${
|
|
371
|
+
9. **NEVER** refactor, reorganize, or restructure existing source test files beyond moving helpers${inlineCallSiteRule ? ` — and, in this flow, replacing an ${site.noun} with a call to the shared helper it duplicates (STEP 3 / STEP 5c)` : ""}
|
|
352
372
|
10. **RUN TESTS** to ensure functionality is preserved after refactoring
|
|
353
373
|
11. **NEVER** drop an assertion or a cross-cutting guard (\`page.on('pageerror'...)\`, error collectors and their final \`expect\`) while moving code — the verify step compares the assertion count against the modularization hand-out and fails on a loss
|
|
354
374
|
|
|
@@ -357,14 +377,14 @@ ${finalReminderScope}
|
|
|
357
377
|
|
|
358
378
|
**IMPORTANT NOTES:**
|
|
359
379
|
- The process is designed to REUSE existing helper functions, not create new ones
|
|
360
|
-
- ${seedsUtils ? `If no existing helpers are found in utils or sibling tests, STEP 5b still moves this test's own helpers into \`${fileName}\` and imports them back — that is the expected first-run outcome, not a no-op` : "If no existing helpers are found, the test file should remain unchanged"}
|
|
380
|
+
- ${seedsUtils ? `If no existing helpers are found in utils or sibling tests, STEP 5b still moves this test's own helpers into \`${fileName}\` and imports them back — that is the expected first-run outcome, not a no-op${inHouseBrowser ? "; when STEP 2b found the repository's own browser helper module, STEP 3b does that placement into THEIR module instead and STEP 5b is skipped" : ""}` : "If no existing helpers are found, the test file should remain unchanged"}
|
|
361
381
|
- Code reuse is about moving existing, working helper functions between files
|
|
362
382
|
- Never create helper functions based on patterns you see in the current test file
|
|
363
383
|
- Helper functions must have explicit function signatures/definitions
|
|
364
384
|
- Repetitive inline test code is NOT a helper function
|
|
365
385
|
|
|
366
386
|
**DECISION TREE:**
|
|
367
|
-
1. Found existing utils file with helpers? → Import and use them (Step 3)
|
|
387
|
+
${inHouseBrowser ? "0. STEP 2b found a qualifying in-house browser helper module? → call its helpers and add this test's helpers to it (Step 3b); Step 5b is skipped and no `" + fileName + "` is created\n" : ""}1. Found existing utils file with helpers? → Import and use them (Step 3)
|
|
368
388
|
2. Found other test files with ACTUAL helper functions? → Move to utils (Step 5)
|
|
369
389
|
${decisionTreeTail}
|
|
370
390
|
|
|
@@ -374,9 +394,58 @@ ${
|
|
|
374
394
|
// Gated with the debt it describes: with SkyrampUtils reuse off nothing refuses, and
|
|
375
395
|
// this text would send the agent to spend a call being told the feature is disabled.
|
|
376
396
|
isUtilsReuseEnabled()
|
|
377
|
-
? `**MANDATORY FINAL STEP — VERIFY**: once every edit above is written, call skyramp_reuse_code again with the SAME testFile, language, framework and testType and \`verify: true\`. It stages the shared utils file for the output commit and checks its invariants (for API helpers: one helper per method+path, status-code-only assertions, method+resource names; for browser helpers: actions and structural waits only, intent names)
|
|
397
|
+
? `**MANDATORY FINAL STEP — VERIFY**: once every edit above is written, call skyramp_reuse_code again with the SAME testFile, language, framework and testType and \`verify: true\`. It stages the shared utils file for the output commit and checks its invariants (for API helpers: one helper per method+path, status-code-only assertions, method+resource names; for browser helpers: actions and structural waits only, intent names).${inHouseBrowser
|
|
398
|
+
? ` It also checks every in-house module this test imports: each imported name must exist there with an argument count its signature accepts, and every change this run made to their module must add a helper or add a defaulted parameter — anything else is refused and you restore it. On that call pass \`inHouse: { filesRead: [...], declined: [{ file, helper, reason }, ...] }\` — every file STEP 2b read, and every helper STEP 3b read and did not call, with the reason. These are your declarations and the report labels them as such.`
|
|
399
|
+
: ""} Resolve anything it reports and re-verify; finish only when it reports PASSED. It passes immediately when no utils file was written${inHouseBrowser ? " and no in-house module is imported" : ""}. skyramp_enhance_assertions and skyramp_execute_test refuse this test until that verify pass has run.\n`
|
|
378
400
|
: ""}
|
|
379
401
|
|
|
380
402
|
SUMMARIZE THE CODE REUSE PROCESS AND THE RESULTS.
|
|
381
403
|
`;
|
|
382
404
|
}
|
|
405
|
+
/**
|
|
406
|
+
* STEP 2b — find the repository's own browser helper modules. The agent searches;
|
|
407
|
+
* the search is a sample, and the report carries that cost: every file read is
|
|
408
|
+
* declared on the verify call. No fixed list of file names and no language filter,
|
|
409
|
+
* so a module nobody enumerated is still found; a module not written for Playwright
|
|
410
|
+
* is then reported as unreadable rather than filtered out in silence.
|
|
411
|
+
*/
|
|
412
|
+
function inHouseDiscovery(testFile, fileName) {
|
|
413
|
+
return `
|
|
414
|
+
## STEP 2b: FIND THE REPOSITORY'S OWN BROWSER HELPER MODULES
|
|
415
|
+
|
|
416
|
+
The header grep in STEP 2 finds only modules Skyramp wrote. The repository may already hold browser helpers of its own — a module the team wrote, carrying no Skyramp header — and a test that ignores it ends with two helper layers for the same steps. Find them.
|
|
417
|
+
|
|
418
|
+
1. **Search the directory of ${testFile} and each of its parent directories up to the repository root.** Use Grep for Playwright locator and action calls (\`getBy\`, \`.locator(\`, \`page.\`, \`.click(\`, \`.fill(\`) in files that are NOT test files. Do NOT limit the search to a fixed list of file or directory names (\`pages/\`, \`helpers/\`, \`*.page.ts\` are hints, not the search), and do NOT limit it to one extension or language. Exclude \`node_modules\`, \`${fileName}\` and every other file carrying the \`${SKYRAMP_UTILS_HEADER}\` header (STEP 2 owns those), and test files — by BASENAME only: a basename ending in \`.spec.ts\`, \`.spec.js\`, \`.test.ts\`, \`.test.js\` is a test; a directory called \`tests/\` is not.
|
|
419
|
+
2. **Read every candidate.** ${SELECTOR_OWNING_MODULE_RULE} A module written for a browser library other than Playwright shares no vocabulary with this test: read it, record it, and report it as unreadable — do not call it and do not extend it.
|
|
420
|
+
3. **Catalog each qualifying module** to chat before changing anything: for each helper its name, **whether the module exports it UNDER THAT NAME** (an \`export\` on the definition, or an unaliased entry in an \`export { … }\` list of its own bindings — a default export and an aliased one export something else, and a helper this test cannot import is one it cannot call), its parameters (with defaults), what it returns, and its ACTION KEY — the sequence of Playwright actions it performs, in body order, each as the verb plus the locator chain it is called on (\`fill page.getByTestId("email"); click page.getByRole("button", { name: "Sign in" })\`). Argument VALUES are not part of the key, with two exceptions that ARE: a \`goto\` target and a \`dragTo\` destination — where a navigation goes and where a drag lands are the identity of those steps, so a helper that opens another page never matches. The key is UNDEFINED for a helper whose locator is not built from plain string literals — a variable, a template literal, a regex, a parameter; record it as undefined.
|
|
421
|
+
4. **Record every file the search read** — qualifying or not — as a repository-relative path. You pass this list to the verify call at the end (\`inHouse.filesRead\`). A file you did not read is not on it.
|
|
422
|
+
|
|
423
|
+
**Which module to extend when there is more than one:** the module the tests in this directory already import; of those, the one holding the helpers STEP 3b matches; otherwise the module nearest to ${testFile}.
|
|
424
|
+
|
|
425
|
+
**Decision:** no qualifying module → continue to STEP 3 as written; STEP 3b and the in-house rule in STEP 5b then have nothing to do. One or more → continue to STEP 3, then STEP 3b.
|
|
426
|
+
`;
|
|
427
|
+
}
|
|
428
|
+
/**
|
|
429
|
+
* STEP 3b — match each step to the customer's helpers by the action key, call
|
|
430
|
+
* theirs where the keys agree, and add to their module where nothing does. The
|
|
431
|
+
* two edits their file may receive are stated here and enforced by the verify
|
|
432
|
+
* call's additive gate; the header rule is stated because the old verify text told
|
|
433
|
+
* the agent the opposite.
|
|
434
|
+
*/
|
|
435
|
+
function inHouseMatch(testFile, fileName, policy) {
|
|
436
|
+
return `
|
|
437
|
+
## STEP 3b: CALL THE REPOSITORY'S OWN HELPERS, AND ADD TO THEIR MODULE WHAT IT LACKS
|
|
438
|
+
|
|
439
|
+
Run this step only if STEP 2b found a qualifying module. Match every helper skyramp_modularization extracted in ${testFile} AND every action sequence still inline in it; ADD to their module only for the extracted helpers — an inline step with no match stays inline, as modularization left it (single-use steps are not helpers).
|
|
440
|
+
|
|
441
|
+
**Match by the action key, not by name or by intent.** Compute the key of the step exactly as STEP 2b computed the helpers' keys, and compare:
|
|
442
|
+
|
|
443
|
+
- **Keys equal → call their helper.** Replace the step (or delete the local helper and replace its calls) with a call to their helper, passing this test's values as arguments where their signature takes them. Where their helper hardcodes a value this test needs to differ (a filled text, an option label) and takes no parameter for it, ADD a parameter to their helper — APPENDED AFTER its existing parameters, never inserted among them, which would shift every caller they already have onto the wrong argument — whose DEFAULT is exactly the literal it replaces, and pass this test's value — every existing caller keeps its behaviour, and the verify call checks that with the default substituted back the helper reads as it did at HEAD. That is the ONLY edit an existing helper of theirs may receive.
|
|
444
|
+
- **Their key is undefined** (a variable, template-literal or regex locator) **→ do not call it and do not extend it.** Leave the step as it is and record the helper with the reason (\`inHouse.declined\` on the verify call).
|
|
445
|
+
- **No key matches (an extracted helper) → add it to THEIR module.** Move its body into their module written in that file's own style: its naming convention, its parameter style (positional, options object, defaults), the browser API and the import forms it already uses; delete the local definition and import it, keeping the call sites. It carries the action sequence and structural waits only — a value assertion stays in ${testFile} right after the call (${policy.assertionRule}). Do not add a helper whose key equals a helper the module already holds; call that one. Do not import the Skyramp runtime into their file.
|
|
446
|
+
|
|
447
|
+
**Never change what an existing helper of theirs does** — no edited body, no renamed helper, no removed line, no parameter without a default. **Never write the \`${SKYRAMP_UTILS_HEADER}\` header into their file.** It stays their file; the verify call compares it against HEAD and refuses any other change, and you undo it.
|
|
448
|
+
|
|
449
|
+
A step their helper covers is NOT moved into \`${fileName}\` in STEP 5b. Record, for the verify call, each helper of theirs you read and did not call, with the reason.
|
|
450
|
+
`;
|
|
451
|
+
}
|
|
@@ -1 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import { ProgrammingLanguage } from "../types/TestTypes.js";
|
|
2
|
+
interface FixErrorsPromptParams {
|
|
3
|
+
testFile: string;
|
|
4
|
+
language: `${ProgrammingLanguage}`;
|
|
5
|
+
framework: string;
|
|
6
|
+
}
|
|
7
|
+
/** Render the repair skill for clients that do not load the plugin. */
|
|
8
|
+
export declare function getFixErrorsPrompt(params: FixErrorsPromptParams): string;
|
|
9
|
+
export {};
|
|
@@ -1,29 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
1
|
+
import { FIX_TEST_IMPORT_ERRORS_SKILL } from "../skills/fixTestImportErrorsSkill.js";
|
|
2
|
+
import { readSkillBody, section, sliceBetween } from "../skills/skillFiles.js";
|
|
3
|
+
import { ProgrammingLanguage } from "../types/TestTypes.js";
|
|
4
|
+
/** Render the repair skill for clients that do not load the plugin. */
|
|
5
|
+
export function getFixErrorsPrompt(params) {
|
|
6
|
+
let languageHeading;
|
|
7
|
+
switch (params.language) {
|
|
8
|
+
case ProgrammingLanguage.PYTHON:
|
|
9
|
+
languageHeading = "### Python";
|
|
10
|
+
break;
|
|
11
|
+
case ProgrammingLanguage.JAVASCRIPT:
|
|
12
|
+
case ProgrammingLanguage.TYPESCRIPT:
|
|
13
|
+
languageHeading = "### JavaScript and TypeScript";
|
|
14
|
+
break;
|
|
15
|
+
case ProgrammingLanguage.JAVA:
|
|
16
|
+
languageHeading = "### Java";
|
|
17
|
+
break;
|
|
18
|
+
default:
|
|
19
|
+
throw new Error(`Unsupported repair language: ${params.language}`);
|
|
20
|
+
}
|
|
21
|
+
const skill = readSkillBody(FIX_TEST_IMPORT_ERRORS_SKILL);
|
|
22
|
+
const instructions = [
|
|
23
|
+
sliceBetween(skill, "## Workflow", "## Steps for"),
|
|
24
|
+
// Match the whole heading: "Java" must not select "JavaScript".
|
|
25
|
+
section(skill, `${languageHeading}\n`),
|
|
26
|
+
section(skill, "## Execution guidance"),
|
|
27
|
+
].join("\n\n");
|
|
28
|
+
const values = [params.testFile, params.language, params.framework];
|
|
29
|
+
// Replace once: dollar signs in a supplied path must not become placeholders.
|
|
30
|
+
// Named shell variables in the Java example are left intact.
|
|
31
|
+
return instructions.replace(/\$([012])(?!\d)/g, (_match, index) => values[Number(index)]);
|
|
29
32
|
}
|
|
@@ -17,6 +17,9 @@ export declare const GRPC_SERVICE_NAME_GUIDANCE = "the bare service name as decl
|
|
|
17
17
|
export declare const ASSERTION_API_GUIDANCE = "Use the SDK helper for all field-level assertions: Python `skyramp.get_response_value(response, \"json.path\")`, TypeScript `getResponseValue(response, \"json.path\")`. The helper supports dot-path notation for nested access (e.g., `\"data.items[0].name\"`). Do NOT use dict/attribute access on the response variable (`response[\"field\"]`, `response.field`) or `json.loads(response.response_body)`";
|
|
18
18
|
export interface LocalDevPlanCtx {
|
|
19
19
|
repositoryPath: string;
|
|
20
|
+
/** `owner/repo` of the checkout at repositoryPath. skyramp_analyze_changes and
|
|
21
|
+
* skyramp_execute_test both name their repository on every call. */
|
|
22
|
+
repository: string;
|
|
20
23
|
baseCommit: string;
|
|
21
24
|
maxRecommendations: number;
|
|
22
25
|
maxGenerate: number;
|