@skyramp/mcp 0.4.1 → 0.4.2-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (543) hide show
  1. package/build/adapters/jestAdapter.js +23 -5
  2. package/build/adapters/mochaAdapter.js +7 -1
  3. package/build/adapters/playwrightAdapter.js +3 -1
  4. package/build/adapters/pytestAdapter.js +14 -3
  5. package/build/commands/localDevTestChangesCommand.js +1 -0
  6. package/build/commands/recommendTestsAndExecuteCommand.js +5 -6
  7. package/build/commands/testThisEndpointCommand.js +16 -4
  8. package/build/index.js +34 -4
  9. package/build/playwright/blueprintDigest.js +28 -7
  10. package/build/playwright/registerPlaywrightTools.js +33 -28
  11. package/build/playwright/traceRecordingPrompt.js +9 -2
  12. package/build/prompts/code-reuse.js +95 -29
  13. package/build/prompts/fix-error-prompt.d.ts +9 -1
  14. package/build/prompts/fix-error-prompt.js +31 -28
  15. package/build/prompts/local-dev/local-dev-plan.d.ts +3 -0
  16. package/build/prompts/local-dev/local-dev-plan.js +3 -1
  17. package/build/prompts/local-dev/local-dev-prompts.d.ts +1 -1
  18. package/build/prompts/local-dev/local-dev-prompts.js +30 -3
  19. package/build/prompts/modularization/integration-test-modularization.js +13 -6
  20. package/build/prompts/modularization/ui-test-modularization.js +1 -1
  21. package/build/prompts/personas.js +1 -1
  22. package/build/prompts/pom-aware-code-reuse.js +7 -9
  23. package/build/prompts/reuse-hand-off.d.ts +64 -0
  24. package/build/prompts/reuse-hand-off.js +130 -0
  25. package/build/prompts/shared-helper-policy.d.ts +88 -2
  26. package/build/prompts/shared-helper-policy.js +145 -11
  27. package/build/prompts/sut-setup/modes/adaptWorkflowPrompt.js +1 -1
  28. package/build/prompts/sut-setup/modes/dockerComposePrompt.js +1 -1
  29. package/build/prompts/sut-setup/shared.d.ts +4 -1
  30. package/build/prompts/sut-setup/shared.js +2 -2
  31. package/build/prompts/test-maintenance/actionsInstructions.d.ts +19 -11
  32. package/build/prompts/test-maintenance/actionsInstructions.js +47 -26
  33. package/build/prompts/test-maintenance/drift-analysis-prompt.js +3 -2
  34. package/build/prompts/test-maintenance/driftAnalysisSections.js +5 -3
  35. package/build/prompts/test-maintenance/driftAnalysisShared.js +4 -2
  36. package/build/prompts/test-maintenance/uiDriftAnalysisSections.js +7 -4
  37. package/build/prompts/test-recommendation/recommendationSections.js +19 -8
  38. package/build/prompts/test-recommendation/registerRecommendTestsPrompt.js +5 -2
  39. package/build/prompts/test-recommendation/test-recommendation-prompt.js +10 -7
  40. package/build/prompts/testbot/testbot-prompts.js +123 -55
  41. package/build/recommendation/answers.js +18 -9
  42. package/build/recommendation/pullRequestText.js +1 -1
  43. package/build/recommendation/registerPlan.js +31 -17
  44. package/build/recommendation/subjectStep.d.ts +8 -10
  45. package/build/recommendation/subjectStep.js +17 -16
  46. package/build/recommendation/types.d.ts +71 -17
  47. package/build/recommendation/types.js +9 -15
  48. package/build/recommendation/verifierContracts.d.ts +7 -3
  49. package/build/recommendation/verifierContracts.js +8 -4
  50. package/build/recommendation/verifiers/changedFile.js +11 -13
  51. package/build/recommendation/verifiers/citedPath.d.ts +8 -0
  52. package/build/recommendation/verifiers/citedPath.js +16 -2
  53. package/build/recommendation/verifiers/coverage.d.ts +2 -2
  54. package/build/recommendation/verifiers/coverage.js +190 -134
  55. package/build/recommendation/verifiers/defects.js +56 -16
  56. package/build/recommendation/verifiers/deliveredMatchesPlan.d.ts +7 -1
  57. package/build/recommendation/verifiers/deliveredMatchesPlan.js +28 -14
  58. package/build/recommendation/verifiers/endpointGrounded.js +14 -8
  59. package/build/recommendation/verifiers/existingCoverage.d.ts +6 -0
  60. package/build/recommendation/verifiers/existingCoverage.js +30 -21
  61. package/build/recommendation/verifiers/expectedOutcome.js +17 -8
  62. package/build/recommendation/verifiers/expectedValueSourced.js +54 -43
  63. package/build/recommendation/verifiers/issueTraceability.d.ts +5 -0
  64. package/build/recommendation/verifiers/issueTraceability.js +64 -7
  65. package/build/recommendation/verifiers/removedElementGuarded.js +19 -11
  66. package/build/recommendation/verifiers/reportedCategory.js +9 -4
  67. package/build/recommendation/verifiers/requirementSourced.js +34 -21
  68. package/build/recommendation/verifiers/screenRoute.js +15 -10
  69. package/build/recommendation/verifiers/statedDifference.js +15 -8
  70. package/build/recommendation/verifiers/uiElementGrounded.js +50 -16
  71. package/build/resources/analysisResources.js +7 -3
  72. package/build/resources/progressResource.js +4 -2
  73. package/build/resources/sutSetupResource.js +20 -2
  74. package/build/resources/testbotResource.js +19 -1
  75. package/build/services/AnalyticsService.js +3 -1
  76. package/build/services/ScenarioGenerationService.js +5 -5
  77. package/build/services/TestDiscoveryService.js +21 -5
  78. package/build/services/TestExecutionService.js +63 -21
  79. package/build/services/TestGenerationService.d.ts +1 -1
  80. package/build/services/TestGenerationService.js +43 -24
  81. package/build/skills/enhanceAssertionsSkill.d.ts +45 -0
  82. package/build/skills/enhanceAssertionsSkill.js +103 -0
  83. package/build/skills/fixTestImportErrorsSkill.d.ts +2 -2
  84. package/build/skills/fixTestImportErrorsSkill.js +2 -2
  85. package/build/skills/skillFiles.d.ts +38 -0
  86. package/build/skills/skillFiles.js +94 -0
  87. package/build/skills/validateAssertionAlignmentSkill.d.ts +34 -0
  88. package/build/skills/validateAssertionAlignmentSkill.js +59 -0
  89. package/build/tool-phases.js +4 -0
  90. package/build/tools/auth/loginTool.js +3 -1
  91. package/build/tools/auth/logoutTool.js +3 -1
  92. package/build/tools/code-refactor/alignAssertionsTool.d.ts +2 -0
  93. package/build/tools/code-refactor/alignAssertionsTool.js +51 -0
  94. package/build/tools/code-refactor/assertion-state.d.ts +1 -1
  95. package/build/tools/code-refactor/assertion-state.js +1 -1
  96. package/build/tools/code-refactor/assertionOperations.d.ts +44 -0
  97. package/build/tools/code-refactor/assertionOperations.js +82 -0
  98. package/build/tools/code-refactor/assertionSkillTools.d.ts +3 -0
  99. package/build/tools/code-refactor/assertionSkillTools.js +86 -0
  100. package/build/tools/code-refactor/codeReuseTool.js +27 -3
  101. package/build/tools/code-refactor/enhanceAssertionsTool.js +19 -83
  102. package/build/tools/code-refactor/gate-markers.d.ts +51 -0
  103. package/build/tools/code-refactor/gate-markers.js +95 -0
  104. package/build/tools/code-refactor/retrofit-state.d.ts +3 -1
  105. package/build/tools/code-refactor/retrofit-state.js +44 -2
  106. package/build/tools/code-refactor/reuse-outcome.d.ts +23 -1
  107. package/build/tools/code-refactor/reuse-outcome.js +36 -13
  108. package/build/tools/code-refactor/reuse-state.d.ts +90 -16
  109. package/build/tools/code-refactor/reuse-state.js +191 -61
  110. package/build/tools/code-refactor/utils-verify-gates.d.ts +4 -0
  111. package/build/tools/code-refactor/utils-verify-gates.js +252 -27
  112. package/build/tools/code-refactor/verify-gates.d.ts +15 -1
  113. package/build/tools/code-refactor/verify-gates.js +36 -4
  114. package/build/tools/enrichTestWithMocksTool.d.ts +1 -1
  115. package/build/tools/enrichTestWithMocksTool.js +9 -5
  116. package/build/tools/executeSkyrampTestTool.d.ts +22 -1
  117. package/build/tools/executeSkyrampTestTool.js +571 -271
  118. package/build/tools/execution-video-state.js +1 -1
  119. package/build/tools/fixErrorTool.js +5 -6
  120. package/build/tools/generate-tests/batchMockGenerationTool.js +1 -1
  121. package/build/tools/generate-tests/generateBatchScenarioRestTool.js +114 -73
  122. package/build/tools/generate-tests/generateContractRestTool.js +34 -16
  123. package/build/tools/generate-tests/generateE2ERestTool.d.ts +1 -0
  124. package/build/tools/generate-tests/generateE2ERestTool.js +9 -1
  125. package/build/tools/generate-tests/generateIntegrationRestTool.js +22 -7
  126. package/build/tools/generate-tests/generateMockRestTool.js +3 -1
  127. package/build/tools/generate-tests/generateUIRestTool.d.ts +2 -0
  128. package/build/tools/generate-tests/generateUIRestTool.js +11 -2
  129. package/build/tools/generate-tests/loadTestSchema.js +1 -3
  130. package/build/tools/generate-tests/planGuard.js +6 -3
  131. package/build/tools/generate-tests/scenarioFileIdentity.js +4 -1
  132. package/build/tools/generate-tests/scenarioLint.js +17 -5
  133. package/build/tools/generate-tests/trace-reuse-guard.js +5 -2
  134. package/build/tools/generateEnrichedIntegrationTestTool.js +9 -3
  135. package/build/tools/one-click/oneClickTool.js +3 -1
  136. package/build/tools/preflightMockCheckTool.js +23 -7
  137. package/build/tools/runExistingTestsTool.d.ts +1 -1
  138. package/build/tools/runExistingTestsTool.js +43 -21
  139. package/build/tools/submitReportTool.d.ts +51 -12
  140. package/build/tools/submitReportTool.js +860 -161
  141. package/build/tools/test-management/actionsTool.js +210 -51
  142. package/build/tools/test-management/analyzeChangesTool.d.ts +4 -5
  143. package/build/tools/test-management/analyzeChangesTool.js +127 -68
  144. package/build/tools/test-management/analyzeTestHealthTool.js +35 -13
  145. package/build/tools/test-management/registerTestPlanTool.d.ts +44 -34
  146. package/build/tools/test-management/registerTestPlanTool.js +255 -111
  147. package/build/tools/test-management/resolveScreenTool.js +33 -9
  148. package/build/tools/trace/startTraceCollectionTool.js +3 -1
  149. package/build/tools/trace/stopTraceCollectionTool.js +41 -5
  150. package/build/tools/verifyTestDependenciesTool.d.ts +3 -0
  151. package/build/tools/verifyTestDependenciesTool.js +54 -0
  152. package/build/tools/workspace/initScanWorkspaceTool.js +9 -3
  153. package/build/tools/workspace/initializeWorkspaceTool.js +3 -1
  154. package/build/types/AssertionOutcome.d.ts +1 -1
  155. package/build/types/EnhanceType.d.ts +6 -0
  156. package/build/types/EnhanceType.js +1 -0
  157. package/build/types/ExternalTestExecution.d.ts +2 -2
  158. package/build/types/RepositoryAnalysis.d.ts +0 -40
  159. package/build/types/ReuseOutcome.d.ts +96 -4
  160. package/build/types/ReuseOutcome.js +16 -0
  161. package/build/types/StepMethod.js +20 -6
  162. package/build/types/TestAnalysis.d.ts +10 -2
  163. package/build/types/TestExecution.d.ts +45 -0
  164. package/build/types/TestRecommendation.d.ts +1 -1
  165. package/build/types/TestRecommendation.js +4 -1
  166. package/build/types/TestTypes.d.ts +13 -0
  167. package/build/types/TestTypes.js +34 -3
  168. package/build/types/TestbotPromptOptions.d.ts +9 -1
  169. package/build/types/TestbotReport.d.ts +45 -9
  170. package/build/utils/AnalysisStateManager.d.ts +137 -27
  171. package/build/utils/AnalysisStateManager.js +227 -43
  172. package/build/utils/assertion-verify/api-shared-lints.js +34 -16
  173. package/build/utils/assertion-verify/metrics.js +39 -6
  174. package/build/utils/assertion-verify/ui-lints.js +4 -2
  175. package/build/utils/branchDiff.js +47 -12
  176. package/build/utils/canonicalJson.js +3 -1
  177. package/build/utils/dartRouteExtractor.js +36 -7
  178. package/build/utils/fixAttempts.d.ts +26 -0
  179. package/build/utils/fixAttempts.js +109 -0
  180. package/build/utils/frontendSelectors.js +23 -4
  181. package/build/utils/generatedTestRecord.d.ts +19 -0
  182. package/build/utils/generatedTestRecord.js +61 -0
  183. package/build/utils/gitStaging.js +7 -2
  184. package/build/utils/initAgent.js +26 -6
  185. package/build/utils/language-helper.js +39 -45
  186. package/build/utils/pathMatching.js +2 -1
  187. package/build/utils/pathSignatures.js +6 -2
  188. package/build/utils/planMatchKeys.d.ts +2 -2
  189. package/build/utils/planMatchKeys.js +20 -14
  190. package/build/utils/pom-catalog-parse.js +7 -2
  191. package/build/utils/pom-scope/import-expansion.js +6 -1
  192. package/build/utils/pom-scope/index.js +50 -12
  193. package/build/utils/pom-scope/scoring.js +13 -3
  194. package/build/utils/pom-scope/selector-extractor.js +16 -3
  195. package/build/utils/pom-scope/strip.d.ts +8 -0
  196. package/build/utils/pom-scope/strip.js +238 -0
  197. package/build/utils/pom-scope/testIdDiscovery.js +14 -2
  198. package/build/utils/pom-verify/__fixtures__/af-style/asset-list.page.d.ts +1 -1
  199. package/build/utils/pom-verify/__fixtures__/af-style/asset-list.page.js +4 -2
  200. package/build/utils/pom-verify/__fixtures__/af-style/report.iframe.page.js +3 -1
  201. package/build/utils/pom-verify/__fixtures__/af-style/workflow-footer.page.js +3 -1
  202. package/build/utils/pom-verify/bindings.js +5 -1
  203. package/build/utils/pom-verify/calls.js +9 -2
  204. package/build/utils/pom-verify/verify.js +27 -5
  205. package/build/utils/pr-comment-parser.js +20 -7
  206. package/build/utils/proxy-terminal.d.ts +19 -1
  207. package/build/utils/proxy-terminal.js +346 -21
  208. package/build/utils/removedUiElements.js +1 -1
  209. package/build/utils/reportLanguage.js +35 -7
  210. package/build/utils/reportVerification.d.ts +14 -8
  211. package/build/utils/reportVerification.js +19 -19
  212. package/build/utils/repositorySlug.d.ts +32 -0
  213. package/build/utils/repositorySlug.js +77 -0
  214. package/build/utils/reuseRouting.js +6 -2
  215. package/build/utils/runSerialized.d.ts +3 -0
  216. package/build/utils/runSerialized.js +39 -0
  217. package/build/utils/screenRoutes.js +74 -18
  218. package/build/utils/sourceRouteExtractor.js +13 -6
  219. package/build/utils/telemetry.d.ts +1 -0
  220. package/build/utils/telemetry.js +8 -5
  221. package/build/utils/testDependencyPolicy.d.ts +9 -0
  222. package/build/utils/testDependencyPolicy.js +788 -0
  223. package/build/utils/testExecutionRecord.d.ts +90 -0
  224. package/build/utils/testExecutionRecord.js +267 -0
  225. package/build/utils/testFileClassification.js +3 -1
  226. package/build/utils/trace-parser.js +62 -14
  227. package/build/utils/urlPath.js +3 -1
  228. package/build/utils/utils-verify/action-key.d.ts +4 -0
  229. package/build/utils/utils-verify/action-key.js +2 -2
  230. package/build/utils/utils-verify/allow.d.ts +122 -3
  231. package/build/utils/utils-verify/allow.js +146 -21
  232. package/build/utils/utils-verify/body-reach.d.ts +120 -0
  233. package/build/utils/utils-verify/body-reach.js +335 -0
  234. package/build/utils/utils-verify/call-sites.d.ts +6 -1
  235. package/build/utils/utils-verify/call-sites.js +72 -8
  236. package/build/utils/utils-verify/delivered-imports.d.ts +43 -0
  237. package/build/utils/utils-verify/delivered-imports.js +84 -0
  238. package/build/utils/utils-verify/fixed-sleep.d.ts +96 -0
  239. package/build/utils/utils-verify/fixed-sleep.js +461 -0
  240. package/build/utils/utils-verify/in-house.d.ts +93 -0
  241. package/build/utils/utils-verify/in-house.js +719 -0
  242. package/build/utils/utils-verify/incumbent.d.ts +3 -0
  243. package/build/utils/utils-verify/incumbent.js +75 -0
  244. package/build/utils/utils-verify/index.d.ts +1 -0
  245. package/build/utils/utils-verify/index.js +1 -0
  246. package/build/utils/utils-verify/language-spec.d.ts +26 -10
  247. package/build/utils/utils-verify/language-spec.js +217 -20
  248. package/build/utils/utils-verify/locate.d.ts +26 -0
  249. package/build/utils/utils-verify/locate.js +125 -23
  250. package/build/utils/utils-verify/module-name.d.ts +40 -0
  251. package/build/utils/utils-verify/module-name.js +98 -0
  252. package/build/utils/utils-verify/parse.d.ts +46 -6
  253. package/build/utils/utils-verify/parse.js +176 -38
  254. package/build/utils/utils-verify/retrofit-equivalence.d.ts +5 -0
  255. package/build/utils/utils-verify/retrofit-equivalence.js +4 -2
  256. package/build/utils/utils-verify/stage.d.ts +5 -0
  257. package/build/utils/utils-verify/stage.js +47 -2
  258. package/build/utils/utils-verify/status-once.d.ts +62 -0
  259. package/build/utils/utils-verify/status-once.js +207 -0
  260. package/build/utils/utils-verify/typecheck.d.ts +61 -0
  261. package/build/utils/utils-verify/typecheck.js +338 -0
  262. package/build/utils/utils-verify/verify.d.ts +76 -1
  263. package/build/utils/utils-verify/verify.js +516 -44
  264. package/build/utils/versions.d.ts +3 -3
  265. package/build/utils/versions.js +1 -1
  266. package/build/utils/workspaceAuth.js +107 -37
  267. package/build/workspace/queryParamResolution.js +11 -4
  268. package/build/workspace/workspace.js +7 -7
  269. package/node_modules/playwright/ThirdPartyNotices.txt +19 -19
  270. package/node_modules/playwright/lib/mcp/skyramp/assertTool.js +8 -2
  271. package/node_modules/playwright/lib/mcp/skyramp/common/cssValue.js +87 -0
  272. package/node_modules/playwright/lib/mcp/skyramp/loadTraceTool.js +31 -0
  273. package/node_modules/playwright/lib/mcp/skyramp/skyRampImport.js +3 -0
  274. package/node_modules/playwright/lib/mcp/skyramp/traceRecordingBackend.js +181 -15
  275. package/node_modules/playwright/lib/mcp/test/skyRampExport.js +24 -0
  276. package/node_modules/playwright/lib/transform/babelBundleImpl.js +2353 -190
  277. package/node_modules/playwright/node_modules/playwright-core/ThirdPartyNotices.txt +62 -34
  278. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/.package-lock.json +72 -41
  279. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/@hono/node-server/dist/serve-static.js +1 -1
  280. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/@hono/node-server/dist/serve-static.mjs +1 -1
  281. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/@hono/node-server/package.json +2 -2
  282. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/README.md +16 -1
  283. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/index.js +4 -20
  284. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/lib/read.js +17 -17
  285. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/lib/types/json.js +60 -32
  286. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/lib/types/raw.js +3 -3
  287. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/lib/types/text.js +3 -3
  288. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/lib/types/urlencoded.js +16 -20
  289. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/lib/utils.js +18 -16
  290. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/node_modules/content-type/LICENSE +22 -0
  291. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/node_modules/content-type/README.md +71 -0
  292. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/node_modules/content-type/dist/index.d.ts +46 -0
  293. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/node_modules/content-type/dist/index.js +176 -0
  294. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/node_modules/content-type/dist/index.js.map +1 -0
  295. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/node_modules/content-type/package.json +52 -0
  296. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/package.json +23 -10
  297. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/es-object-atoms/CHANGELOG.md +21 -14
  298. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/es-object-atoms/isObject.d.ts +1 -1
  299. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/es-object-atoms/package.json +6 -7
  300. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/es-object-atoms/tsconfig.json +1 -0
  301. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/index.js +266 -45
  302. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/lib/schemes.js +9 -4
  303. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/lib/utils.js +396 -92
  304. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/package.json +1 -1
  305. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/component-safe-serialization.test.js +163 -0
  306. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/equal.test.js +31 -3
  307. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/fixtures/uri-js-parse.json +2 -0
  308. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/ipv6-canonical.test.js +34 -0
  309. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/ipv6-validation.test.js +124 -0
  310. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/malformed-percent.test.js +77 -0
  311. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/malformed-urn.test.js +61 -0
  312. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/parse.test.js +7 -3
  313. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/query-fragment-normalization.test.js +33 -0
  314. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/reserved-path-normalization.test.js +109 -0
  315. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/scheme-validation.test.js +124 -0
  316. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/security-normalization.test.js +101 -0
  317. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/security.test.js +301 -3
  318. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/urn-full-input.test.js +29 -0
  319. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/websocket-query-preservation.test.js +24 -0
  320. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hasown/CHANGELOG.md +7 -0
  321. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hasown/index.d.ts +0 -1
  322. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hasown/package.json +4 -5
  323. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/client/client.js +30 -16
  324. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/client/utils.js +4 -1
  325. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/context.js +32 -13
  326. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/helper/accepts/accepts.js +36 -2
  327. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/helper/proxy/index.js +4 -0
  328. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/helper/ssg/ssg.js +1 -1
  329. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/helper/ssg/utils.js +30 -10
  330. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/helper/streaming/sse.js +5 -4
  331. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/hono-base.js +10 -8
  332. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/jsx/base.js +44 -23
  333. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/jsx/components.js +25 -26
  334. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/jsx/context.js +5 -5
  335. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/jsx/dom/render.js +2 -0
  336. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/jsx/dom/server.js +5 -1
  337. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/jsx/hooks/index.js +16 -13
  338. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/jsx/intrinsic-element/components.js +3 -3
  339. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/jsx/streaming.js +4 -5
  340. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/cache/index.js +103 -8
  341. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/compress/index.js +5 -0
  342. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/cors/index.js +17 -14
  343. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/csrf/index.js +1 -1
  344. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/etag/digest.js +47 -1
  345. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/etag/index.js +7 -4
  346. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/jwk/jwk.js +9 -4
  347. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/jwt/jwt.js +9 -4
  348. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/language/language.js +10 -6
  349. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/method-not-allowed/index.js +90 -0
  350. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/pretty-json/index.js +3 -1
  351. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/secure-headers/secure-headers.js +16 -7
  352. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/request.js +20 -13
  353. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router/linear-router/router.js +7 -2
  354. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router/pattern-router/router.js +3 -9
  355. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router/reg-exp-router/node.js +65 -59
  356. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router/reg-exp-router/router.js +71 -128
  357. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router/reg-exp-router/trie.js +14 -5
  358. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router/trie-router/node.js +47 -70
  359. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router/trie-router/router.js +3 -11
  360. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router/utils.js +27 -0
  361. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router.js +1 -1
  362. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/utils/accept.js +1 -1
  363. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/utils/body.js +21 -3
  364. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/utils/cookie.js +4 -3
  365. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/utils/ipaddr.js +5 -3
  366. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/utils/stream.js +12 -3
  367. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/utils/url.js +19 -11
  368. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/client/client.js +30 -16
  369. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/client/utils.js +4 -1
  370. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/context.js +32 -13
  371. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/helper/accepts/accepts.js +36 -2
  372. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/helper/proxy/index.js +4 -0
  373. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/helper/ssg/ssg.js +1 -1
  374. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/helper/ssg/utils.js +30 -10
  375. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/helper/streaming/sse.js +5 -4
  376. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/hono-base.js +10 -8
  377. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/jsx/base.js +41 -23
  378. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/jsx/components.js +26 -27
  379. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/jsx/context.js +6 -6
  380. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/jsx/dom/render.js +2 -0
  381. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/jsx/dom/server.js +5 -1
  382. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/jsx/hooks/index.js +16 -13
  383. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/jsx/intrinsic-element/components.js +4 -4
  384. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/jsx/streaming.js +5 -6
  385. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/cache/index.js +103 -8
  386. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/compress/index.js +5 -0
  387. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/cors/index.js +17 -14
  388. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/csrf/index.js +1 -1
  389. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/etag/digest.js +47 -1
  390. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/etag/index.js +7 -4
  391. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/jwk/jwk.js +9 -4
  392. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/jwt/jwt.js +9 -4
  393. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/language/language.js +10 -6
  394. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/method-not-allowed/index.js +68 -0
  395. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/pretty-json/index.js +3 -1
  396. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/secure-headers/secure-headers.js +16 -7
  397. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/request.js +21 -14
  398. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router/linear-router/router.js +7 -2
  399. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router/pattern-router/router.js +3 -9
  400. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router/reg-exp-router/node.js +61 -58
  401. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router/reg-exp-router/router.js +77 -129
  402. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router/reg-exp-router/trie.js +14 -5
  403. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router/trie-router/node.js +47 -70
  404. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router/trie-router/router.js +3 -11
  405. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router/utils.js +5 -0
  406. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router.js +1 -1
  407. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/adapter/aws-lambda/types.d.ts +9 -0
  408. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/client/types.d.ts +1 -1
  409. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/context.d.ts +6 -2
  410. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/hono-base.d.ts +4 -3
  411. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/jsx/base.d.ts +7 -2
  412. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/jsx/dom/index.d.ts +5 -5
  413. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/jsx/dom/intrinsic-element/components.d.ts +2 -2
  414. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/jsx/dom/server.d.ts +5 -5
  415. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/jsx/hooks/index.d.ts +8 -6
  416. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/jsx/index.d.ts +5 -5
  417. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/middleware/cache/index.d.ts +6 -4
  418. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/middleware/combine/index.d.ts +1 -1
  419. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/middleware/cors/index.d.ts +1 -1
  420. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/middleware/jsx-renderer/index.d.ts +2 -2
  421. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/middleware/jwk/jwk.d.ts +2 -0
  422. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/middleware/jwt/jwt.d.ts +2 -0
  423. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/middleware/method-not-allowed/index.d.ts +49 -0
  424. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/middleware/secure-headers/permissions-policy.d.ts +3 -3
  425. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/router/reg-exp-router/node.d.ts +4 -1
  426. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/router/reg-exp-router/trie.d.ts +2 -1
  427. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/router/trie-router/node.d.ts +1 -2
  428. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/router/trie-router/router.d.ts +0 -1
  429. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/router/utils.d.ts +1 -0
  430. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/router.d.ts +1 -1
  431. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/utils/headers.d.ts +2 -2
  432. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/utils/url.d.ts +5 -0
  433. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/utils/accept.js +1 -1
  434. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/utils/body.js +21 -3
  435. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/utils/cookie.js +5 -4
  436. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/utils/ipaddr.js +5 -3
  437. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/utils/stream.js +12 -3
  438. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/utils/url.js +17 -10
  439. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/package.json +11 -4
  440. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/README.md +173 -143
  441. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/address-error.d.ts +11 -0
  442. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/address-error.js.map +1 -1
  443. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/common.d.ts +49 -0
  444. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/common.js +79 -4
  445. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/common.js.map +1 -1
  446. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/ipv4.d.ts +78 -5
  447. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/ipv4.js +119 -24
  448. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/ipv4.js.map +1 -1
  449. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/ipv6.d.ts +151 -10
  450. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/ipv6.js +316 -90
  451. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/ipv6.js.map +1 -1
  452. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/v4/constants.d.ts +12 -0
  453. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/v4/constants.js +45 -2
  454. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/v4/constants.js.map +1 -1
  455. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/v6/constants.d.ts +14 -0
  456. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/v6/constants.js +50 -3
  457. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/v6/constants.js.map +1 -1
  458. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/package.json +6 -4
  459. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/.github/THREAT_MODEL.md +3 -3
  460. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/CHANGELOG.md +26 -0
  461. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/README.md +19 -1
  462. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/dist/qs.js +25 -25
  463. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/eslint.config.mjs +1 -1
  464. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/lib/parse.js +16 -6
  465. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/lib/stringify.js +23 -8
  466. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/lib/utils.js +57 -11
  467. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/package.json +8 -7
  468. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/test/parse.js +419 -0
  469. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/test/stringify.js +317 -0
  470. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/test/utils.js +206 -0
  471. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/side-channel/CHANGELOG.md +10 -0
  472. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/side-channel/README.md +1 -1
  473. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/side-channel/index.js +5 -2
  474. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/side-channel/package.json +10 -10
  475. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/side-channel/test/index.js +16 -0
  476. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/type-is/index.js +8 -18
  477. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/type-is/node_modules/content-type/LICENSE +22 -0
  478. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/type-is/node_modules/content-type/README.md +71 -0
  479. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/type-is/node_modules/content-type/dist/index.d.ts +46 -0
  480. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/type-is/node_modules/content-type/dist/index.js +176 -0
  481. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/type-is/node_modules/content-type/dist/index.js.map +1 -0
  482. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/type-is/node_modules/content-type/package.json +52 -0
  483. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/type-is/package.json +9 -5
  484. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/package-lock.json +72 -41
  485. package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/.package-lock.json +6 -6
  486. package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/brace-expansion/README.md +23 -1
  487. package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/brace-expansion/index.js +265 -86
  488. package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/brace-expansion/package.json +1 -1
  489. package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/README.md +173 -143
  490. package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/address-error.d.ts +11 -0
  491. package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/address-error.js.map +1 -1
  492. package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/common.d.ts +49 -0
  493. package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/common.js +79 -4
  494. package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/common.js.map +1 -1
  495. package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/ipv4.d.ts +78 -5
  496. package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/ipv4.js +119 -24
  497. package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/ipv4.js.map +1 -1
  498. package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/ipv6.d.ts +151 -10
  499. package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/ipv6.js +316 -90
  500. package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/ipv6.js.map +1 -1
  501. package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/v4/constants.d.ts +12 -0
  502. package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/v4/constants.js +45 -2
  503. package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/v4/constants.js.map +1 -1
  504. package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/v6/constants.d.ts +14 -0
  505. package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/v6/constants.js +50 -3
  506. package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/v6/constants.js.map +1 -1
  507. package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/package.json +6 -4
  508. package/node_modules/playwright/node_modules/playwright-core/bundles/utils/package-lock.json +6 -6
  509. package/node_modules/playwright/node_modules/playwright-core/lib/cli/program.js +18 -9
  510. package/node_modules/playwright/node_modules/playwright-core/lib/mcpBundleImpl/index.js +47 -47
  511. package/node_modules/playwright/node_modules/playwright-core/lib/server/codegen/skyramp/jsonlReader.js +3 -0
  512. package/node_modules/playwright/node_modules/playwright-core/lib/server/recorder/recorderRunner.js +42 -0
  513. package/node_modules/playwright/node_modules/playwright-core/lib/utilsBundleImpl/index.js +121 -121
  514. package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/{index.B7KbSQcC.js → index.BAkLd5DX.js} +1 -1
  515. package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/index.html +1 -1
  516. package/node_modules/playwright/node_modules/playwright-core/package.json +1 -1
  517. package/node_modules/playwright/node_modules/playwright-core/src/cli/program.ts +31 -9
  518. package/node_modules/playwright/node_modules/playwright-core/src/server/codegen/skyramp/jsonlReader.ts +1 -0
  519. package/node_modules/playwright/node_modules/playwright-core/src/server/recorder/recorderRunner.ts +57 -1
  520. package/node_modules/playwright/package.json +2 -2
  521. package/package.json +7 -6
  522. package/plugin/prompts/code-reuse/hand-off.md +30 -0
  523. package/plugin/prompts/generate-tests/generation.md +1 -1
  524. package/plugin/prompts/plan-tests.md +14 -14
  525. package/plugin/prompts/testbot-task1.md +4 -2
  526. package/plugin/skills/enhance-assertions/SKILL.md +25 -0
  527. package/plugin/skills/enhance-assertions/reference/contract.md +51 -0
  528. package/plugin/skills/enhance-assertions/reference/integration.md +58 -0
  529. package/plugin/skills/enhance-assertions/reference/shared-rules.md +220 -0
  530. package/plugin/skills/enhance-assertions/reference/ui.md +373 -0
  531. package/plugin/skills/fix-test-import-errors/SKILL.md +44 -50
  532. package/plugin/skills/validate-assertion-alignment-post-execution/SKILL.md +32 -0
  533. package/plugin/skills/validate-assertion-alignment-post-execution/reference/checks.md +44 -0
  534. package/plugin/skills/validate-assertion-alignment-post-execution/reference/evidence.md +47 -0
  535. package/build/prompts/enhance-assertions/contractProviderAssertionsPrompt.d.ts +0 -2
  536. package/build/prompts/enhance-assertions/contractProviderAssertionsPrompt.js +0 -29
  537. package/build/prompts/enhance-assertions/integrationAssertionsPrompt.d.ts +0 -2
  538. package/build/prompts/enhance-assertions/integrationAssertionsPrompt.js +0 -36
  539. package/build/prompts/enhance-assertions/sharedAssertionRules.d.ts +0 -16
  540. package/build/prompts/enhance-assertions/sharedAssertionRules.js +0 -284
  541. package/build/prompts/enhance-assertions/uiAssertionsPrompt.d.ts +0 -2
  542. package/build/prompts/enhance-assertions/uiAssertionsPrompt.js +0 -388
  543. package/node_modules/playwright/node_modules/playwright-core/.DS_Store +0 -0
@@ -1,9 +1,9 @@
1
- import { allChangedFiles } from "../types.js";
1
+ import { allChangedFiles, } from "../types.js";
2
2
  import { changedPathSet, normalizeCitedPath } from "./citedPath.js";
3
3
  import { EXPECTED_VALUE_SOURCED_CONTRACT as CONTRACT } from "../verifierContracts.js";
4
4
  import { appearsIn, searchable } from "../pullRequestText.js";
5
5
  import { escapeRegExp } from "../../utils/regex.js";
6
- import { renderCase } from "./coverage.js";
6
+ import { renderTestCase } from "./coverage.js";
7
7
  function readSource(raw) {
8
8
  const source = typeof raw === "string" ? raw.trim() : "";
9
9
  if (source.length === 0)
@@ -16,7 +16,10 @@ function readSource(raw) {
16
16
  if (!named)
17
17
  return { kind: "none", file: "" };
18
18
  const kind = named[1].toLowerCase();
19
- const cited = named[2].split(/[#\u00a7]/)[0].replace(/(?::\d+)+(?:-\d+)?$/, "").trim();
19
+ const cited = named[2]
20
+ .split(/[#\u00a7]/)[0]
21
+ .replace(/(?::\d+)+(?:-\d+)?$/, "")
22
+ .trim();
20
23
  // `spec:` with nothing after it names no file, so there is nothing to check and
21
24
  // nothing to trust either. A path that IS written and still normalises away is a
22
25
  // named source, and it is named wrongly.
@@ -27,8 +30,8 @@ function readSource(raw) {
27
30
  }
28
31
  /** One case's address, for the evidence line. A case has no id of its own, so it
29
32
  * is named the way the agent wrote it. */
30
- function caseLabel(change, entry) {
31
- return `${String(change?.id ?? "?")}:${String(entry?.param ?? "?")}`;
33
+ function testCaseLabel(change, entry) {
34
+ return `${String(change.id ?? "?")}:${String(entry.param ?? "?")}`;
32
35
  }
33
36
  /** Every number the pull request writes, as a number. One value has many
34
37
  * spellings — `1e21`, `1e+21`, `1E21`, the digits in full — and matching the
@@ -94,7 +97,7 @@ function statesTheValue(prText, value) {
94
97
  return true;
95
98
  return statedNumbers(prText).includes(value);
96
99
  }
97
- const text = (value) => (typeof value === "string" ? value.trim() : "");
100
+ const text = (value) => typeof value === "string" ? value.trim() : "";
98
101
  /** Verifier 10. A case that states what the response must carry says where that
99
102
  * value came from, and the value did not come from the code under test.
100
103
  *
@@ -111,48 +114,52 @@ export const expectedValueSourced = {
111
114
  name: "expectedValueSourced",
112
115
  run(registration, ctx) {
113
116
  const objections = [];
114
- // The plan comes off disk, so both arrays hold their declared type only on the
115
- // validated path. A throw here reaches the agent as `:crashed` and hides
116
- // whatever real objection this pass would have raised.
117
117
  // A `convention:` is trusted BECAUSE the pull request did not change it. Comparing
118
118
  // against the run's own changed files is the only way to hold it to that.
119
119
  const changed = changedPathSet(allChangedFiles(ctx), true);
120
- const readable = typeof ctx?.citedFileExists === "function" ? ctx.citedFileExists : undefined;
121
- const prText = searchable(ctx?.pullRequest ?? { title: "", description: "" });
120
+ const prText = searchable(ctx.pullRequest);
122
121
  const raised = new Set();
123
- const changes = Array.isArray(registration.changes) ? registration.changes : [];
122
+ const changes = registration.changes;
124
123
  for (const change of changes) {
125
- const changeId = String(change?.id ?? "?");
126
- const cases = Array.isArray(change?.cases) ? change.cases : [];
127
- cases.forEach((entry, index) => {
128
- // `undefined` is "this case states no expected value"; `null` is a stated
124
+ const changeId = String(change.id ?? "?");
125
+ const testCases = change.testCases ?? [];
126
+ testCases.forEach((entry, index) => {
127
+ // `undefined` is "this test case states no expected value"; `null` is a stated
129
128
  // expectation that the field comes back null, which needs a source like
130
129
  // any other value.
131
- // A case states an expectation either as a value or as the rule behind one,
130
+ // A test case states an expectation either as a value or as the rule behind one,
132
131
  // and BOTH are read from somewhere: crediting `derived` without reading its
133
132
  // `expectedFrom` let a rule "read" off the running app satisfy the check
134
133
  // this verifier exists to be.
135
- if (!entry || (entry.expectedValue === undefined && text(entry.derived).length === 0))
134
+ if (!entry ||
135
+ (entry.expectedValue === undefined &&
136
+ text(entry.derived).length === 0))
136
137
  return;
137
- const label = caseLabel(change, entry);
138
- const where = `${label} (source "${String(entry.expectedFrom ?? "")}")`;
138
+ const label = testCaseLabel(change, entry);
139
+ const where = `${label} (source "${entry.expectedFrom ?? ""}")`;
139
140
  const source = readSource(entry.expectedFrom);
140
- // One objection per CASE. A single objection listing three cases took one
141
+ // One objection per TEST CASE. A single objection listing three of them took one
141
142
  // answer that addressed two of them and closed, and the id an answer is
142
- // carried forward by must therefore name the case as well as the change.
143
- const param = String(entry?.param ?? "").trim() || `case-${index + 1}`;
144
- // The CASE, not its parameter. Two bound cases on one parameter each invent
143
+ // carried forward by must therefore name the test case as well as the change.
144
+ // `names a case with no \`param\` by its position` omits the field.
145
+ const param = String(entry.param ?? "").trim() || `case-${index + 1}`;
146
+ // The TEST CASE, not its parameter. Two bound test cases on one parameter each invent
145
147
  // their own value, and keying on the parameter published one of them and
146
148
  // carried its answer to the other. The rendering is the case's content, so
147
- // it is the same string whatever order the cases arrive in — the identity
148
- // `coverage:cases` already uses.
149
- const caseId = renderCase({ param, value: entry.value, absent: entry.absent, expect: String(entry.expect ?? "") });
149
+ // it is the same string whatever order the test cases arrive in — the identity
150
+ // `coverage:testCases` already uses.
151
+ const testCaseId = renderTestCase({
152
+ param,
153
+ value: entry.value,
154
+ absent: entry.absent,
155
+ expect: String(entry.expect ?? ""),
156
+ });
150
157
  const raise = (kind, objection, evidence) => {
151
- if (raised.has(`${kind}:${changeId}:${caseId}`))
158
+ if (raised.has(`${kind}:${changeId}:${testCaseId}`))
152
159
  return;
153
- raised.add(`${kind}:${changeId}:${caseId}`);
160
+ raised.add(`${kind}:${changeId}:${testCaseId}`);
154
161
  objections.push({
155
- objectionId: `expectedValueSourced:${kind}:${changeId}:${caseId}`,
162
+ objectionId: `expectedValueSourced:${kind}:${changeId}:${testCaseId}`,
156
163
  verifier: "expectedValueSourced",
157
164
  message: objection.message,
158
165
  evidence,
@@ -178,9 +185,9 @@ export const expectedValueSourced = {
178
185
  // Two readings, and the quote settles which one applies. A rule the pull
179
186
  // request states decides values it never writes — "over 60 is rejected"
180
187
  // states no 61, and demanding the value itself objected to five correct
181
- // cases in run 34414643135 — so a case whose source states a rule puts
188
+ // test cases in run 34414643135 — so one whose source states a rule puts
182
189
  // that rule in `derived` and declares no number.
183
- const quote = String(change?.quote ?? "").trim();
190
+ const quote = String(change.quote ?? "").trim();
184
191
  if (quote.length === 0) {
185
192
  raise("noQuote", CONTRACT.objections.quoteMissing, `${label} reads its value from the pull request; change ${changeId} states no \`quote\``);
186
193
  }
@@ -190,7 +197,9 @@ export const expectedValueSourced = {
190
197
  else if (!statesTheValue(prText, entry.expectedValue)) {
191
198
  // `derived` is the case saying it pins NO number, so a case that still
192
199
  // carries one is not excused by it: the number is what has to be stated.
193
- raise("valueNotQuoted", CONTRACT.objections.valueNotQuoted, `${label} reads ${JSON.stringify(entry.expectedValue)} from the pull request, which writes no such value${text(entry.derived) ? " — and `derived` does not stand in for a value the case still declares" : ""}`);
200
+ raise("valueNotQuoted", CONTRACT.objections.valueNotQuoted, `${label} reads ${JSON.stringify(entry.expectedValue)} from the pull request, which writes no such value${text(entry.derived)
201
+ ? " — and `derived` does not stand in for a value the case still declares"
202
+ : ""}`);
194
203
  }
195
204
  }
196
205
  else if (!source.file) {
@@ -201,7 +210,7 @@ export const expectedValueSourced = {
201
210
  // DELETED is not a spelling problem, it is the rule this check exists for.
202
211
  raise("changedConvention", CONTRACT.objections.changedConvention, `convention cited in a file this pull request changed: ${where}`);
203
212
  }
204
- else if (readable && !readable(source.file)) {
213
+ else if (!ctx.citedFileExists(source.file)) {
205
214
  // A named source nothing opens is a source in name only.
206
215
  raise("unreadable", CONTRACT.objections.unreadableSource, `source file not in the checkout: ${where}`);
207
216
  }
@@ -209,34 +218,36 @@ export const expectedValueSourced = {
209
218
  }
210
219
  // A test that expects to fail asserts what the code does not return today, so a
211
220
  // source outside the code has to state that value, and a case has to carry it.
212
- const plannedTests = Array.isArray(registration?.plannedTests) ? registration.plannedTests : [];
221
+ const plannedTests = registration.plannedTests;
213
222
  for (const plannedTest of plannedTests) {
214
- if (plannedTest?.declarations?.expected?.outcome !== "fail")
223
+ if (plannedTest.declarations.expected?.outcome !== "fail")
215
224
  continue;
216
225
  // A test that calls nothing sends no case, so it has no case to state a value
217
226
  // on. That is the plan-only lane, whose ui tests declare a page and no steps.
218
- if (!Array.isArray(plannedTest?.scenario?.steps) || plannedTest.scenario.steps.length === 0)
227
+ if (plannedTest.scenario.steps.length === 0)
219
228
  continue;
220
- const citedIds = (Array.isArray(plannedTest?.declarations?.changes) ? plannedTest.declarations.changes : [])
221
- .map((changeId) => (typeof changeId === "string" ? changeId.trim() : ""))
229
+ const citedIds = (plannedTest.declarations.changes ?? [])
230
+ .map((changeId) => typeof changeId === "string" ? changeId.trim() : "")
222
231
  .filter((changeId) => changeId.length > 0);
223
232
  // An id no change carries is the coverage check's finding, not this one.
224
- const cited = changes.filter((change) => citedIds.includes(String(change?.id ?? "").trim()));
233
+ const cited = changes.filter((change) => citedIds.includes(String(change.id ?? "").trim()));
225
234
  if (cited.length === 0)
226
235
  continue;
227
236
  // `derived` counts: it states the rule the value follows from, which is a
228
237
  // stated value in every sense except that no number is written down.
229
- const statesAValue = cited.some((change) => (Array.isArray(change?.cases) ? change.cases : []).some((entry) => entry && (entry.expectedValue !== undefined || text(entry.derived).length > 0)));
238
+ const statesAValue = cited.some((change) => (change.testCases ?? []).some((entry) => entry &&
239
+ (entry.expectedValue !== undefined ||
240
+ text(entry.derived).length > 0)));
230
241
  if (statesAValue)
231
242
  continue;
232
- const plannedTestId = String(plannedTest?.plannedTestId ?? "").trim();
243
+ const plannedTestId = String(plannedTest.plannedTestId ?? "").trim();
233
244
  objections.push({
234
245
  objectionId: `expectedValueSourced:noValue:${plannedTestId || "plan"}`,
235
246
  verifier: "expectedValueSourced",
236
247
  ...(plannedTestId ? { plannedTestId } : {}),
237
248
  message: CONTRACT.objections.failWithoutValue.message,
238
249
  evidence: `planned test ${plannedTestId || "(unnamed)"} expects to fail and cites ${cited
239
- .map((change) => String(change?.id ?? "?"))
250
+ .map((change) => String(change.id ?? "?"))
240
251
  .join(", ")}; no case on those changes states an \`expectedValue\` or a \`derived\` rule`,
241
252
  suggestion: CONTRACT.objections.failWithoutValue.suggestion,
242
253
  });
@@ -42,6 +42,11 @@ export interface TraceabilityLane {
42
42
  * list, so an unjoined id would let a report invent a defect and trace every bug
43
43
  * through it.
44
44
  *
45
+ * A declared `defectId` also counts when a `maintains` entry names it and plan time
46
+ * accepted that entry — the same claim a planned test makes. See
47
+ * {@link maintainedDefects} for how that acceptance is read.
48
+ * `deliveredMatchesPlan:maintains:` checks separately that the edit landed.
49
+ *
45
50
  * A declared `defectId` also counts when the agent answered `defects:untested:<id>`
46
51
  * at plan time (or closed it with a blocker). The plan-time verifier asked why no
47
52
  * test proves that defect and the agent said; asking again here is the same
@@ -1,3 +1,4 @@
1
+ import { maintainedFileObjectionId } from "./existingCoverage.js";
1
2
  const NORMAL_LANE = { planOnly: false };
2
3
  /** An id as the plan spells it: trimmed, and exact otherwise. */
3
4
  function idKey(raw) {
@@ -25,7 +26,9 @@ function expectsToFail(plannedTest) {
25
26
  /** How many characters of an issue's description the objection quotes. */
26
27
  const QUOTE_LENGTH = 80;
27
28
  function quote(description) {
28
- const text = String(description ?? "").trim().replace(/\s+/g, " ");
29
+ const text = String(description ?? "")
30
+ .trim()
31
+ .replace(/\s+/g, " ");
29
32
  return text.length > QUOTE_LENGTH ? `${text.slice(0, QUOTE_LENGTH)}…` : text;
30
33
  }
31
34
  /** The plan-time `defects:untested:<id>` objection, as the plan-time verifier ids it. */
@@ -52,6 +55,43 @@ function answeredUntested(plan) {
52
55
  }
53
56
  return ids;
54
57
  }
58
+ /** The declared defect ids a `maintains` entry proves, as plan time judged them.
59
+ * Report time has no VerifyContext, so it reads plan time's own verdict on the
60
+ * entry's file, `existingCoverage:maintains:<file>`, rather than resolving the path
61
+ * again. Every objection bucket is read: an ANSWER to a file-not-found objection
62
+ * does not make the file resolve.
63
+ *
64
+ * NOT keyed on `defects:untested:<id>`, which is suppressed whenever a planned test
65
+ * cites the same defect, so its absence would read as "accepted".
66
+ *
67
+ * Read defensively: the plan comes off disk. */
68
+ function maintainedDefects(plan) {
69
+ const judged = new Set();
70
+ for (const bucket of [
71
+ plan?.openObjections,
72
+ plan?.answeredObjections,
73
+ plan?.unverifiedCloses,
74
+ ]) {
75
+ for (const entry of Array.isArray(bucket) ? bucket : []) {
76
+ const objectionId = idKey(entry?.objectionId ??
77
+ entry?.objection
78
+ ?.objectionId);
79
+ if (objectionId)
80
+ judged.add(objectionId);
81
+ }
82
+ }
83
+ const ids = new Set();
84
+ for (const entry of Array.isArray(plan?.maintains) ? plan.maintains : []) {
85
+ if (judged.has(maintainedFileObjectionId(entry?.file)))
86
+ continue;
87
+ for (const raw of Array.isArray(entry?.defects) ? entry.defects : []) {
88
+ const id = idKey(raw);
89
+ if (id)
90
+ ids.add(id);
91
+ }
92
+ }
93
+ return ids;
94
+ }
55
95
  /** Where the defect sits, as the objection quotes it. */
56
96
  function locate(defect) {
57
97
  const file = String(defect?.file ?? "").trim() || "no file";
@@ -78,13 +118,20 @@ function locate(defect) {
78
118
  * list, so an unjoined id would let a report invent a defect and trace every bug
79
119
  * through it.
80
120
  *
121
+ * A declared `defectId` also counts when a `maintains` entry names it and plan time
122
+ * accepted that entry — the same claim a planned test makes. See
123
+ * {@link maintainedDefects} for how that acceptance is read.
124
+ * `deliveredMatchesPlan:maintains:` checks separately that the edit landed.
125
+ *
81
126
  * A declared `defectId` also counts when the agent answered `defects:untested:<id>`
82
127
  * at plan time (or closed it with a blocker). The plan-time verifier asked why no
83
128
  * test proves that defect and the agent said; asking again here is the same
84
129
  * question twice, and the answer is already published with the plan. */
85
130
  export function checkIssueTraceability(plan, delivered, issues, lane = NORMAL_LANE) {
86
131
  const shipped = new Set(delivered.map((test) => idKey(test?.plannedTestId)).filter(Boolean));
87
- const plannedTests = Array.isArray(plan?.plannedTests) ? plan.plannedTests : [];
132
+ const plannedTests = Array.isArray(plan?.plannedTests)
133
+ ? plan.plannedTests
134
+ : [];
88
135
  // The join that gives a delivered test its expected outcome. First entry wins:
89
136
  // a repeated id is the plan's own duplicate, and the checks that own it are the
90
137
  // plan-time ones.
@@ -95,7 +142,8 @@ export function checkIssueTraceability(plan, delivered, issues, lane = NORMAL_LA
95
142
  plannedById.set(id, plannedTest);
96
143
  }
97
144
  // In the plan-only lane a planned test stands where a delivered one would.
98
- const inHand = (plannedTestId) => shipped.has(plannedTestId) || (lane.planOnly && plannedById.has(plannedTestId));
145
+ const inHand = (plannedTestId) => shipped.has(plannedTestId) ||
146
+ (lane.planOnly && plannedById.has(plannedTestId));
99
147
  const proves = (plannedTestId) => inHand(plannedTestId) && expectsToFail(plannedById.get(plannedTestId));
100
148
  /** Why this id proves nothing, in the words the objection uses. */
101
149
  const gap = (plannedTestId) => {
@@ -126,17 +174,24 @@ export function checkIssueTraceability(plan, delivered, issues, lane = NORMAL_LA
126
174
  }
127
175
  }
128
176
  const answered = answeredUntested(plan);
177
+ const maintained = maintainedDefects(plan);
129
178
  const objections = [];
130
179
  issues.forEach((issue, index) => {
131
- if (String(issue?.category ?? "").trim().toLowerCase() !== "bug")
180
+ if (String(issue?.category ?? "")
181
+ .trim()
182
+ .toLowerCase() !== "bug")
132
183
  return;
133
184
  const plannedTestId = idKey(issue?.plannedTestId);
134
185
  if (plannedTestId && proves(plannedTestId))
135
186
  return;
136
187
  const defectId = idKey(issue?.defectId);
137
188
  const declaredDefect = defectId.length > 0 && known.has(defectId);
138
- if (declaredDefect && ((provenBy.get(defectId) ?? []).length > 0 || answered.has(defectId)))
189
+ if (declaredDefect &&
190
+ ((provenBy.get(defectId) ?? []).length > 0 ||
191
+ maintained.has(defectId) ||
192
+ answered.has(defectId))) {
139
193
  return;
194
+ }
140
195
  const named = [];
141
196
  if (plannedTestId)
142
197
  named.push(gap(plannedTestId));
@@ -149,7 +204,7 @@ export function checkIssueTraceability(plan, delivered, issues, lane = NORMAL_LA
149
204
  named.push(`defectId "${defectId}" is cited by no ${word} test that expects to fail: ${(citedWeakly.get(defectId) ?? []).join(", ")} cite it and the plan declares each as expecting to pass`);
150
205
  }
151
206
  else {
152
- named.push(`defectId "${defectId}" is cited by no ${word} test that expects to fail and no plan-time answer closed ${UNTESTED_PREFIX}${defectId}`);
207
+ named.push(`defectId "${defectId}" is cited by no ${word} test that expects to fail, no accepted \`maintains\` entry proves it — an entry naming a file that is not in the checkout is refused — and no plan-time answer closed ${UNTESTED_PREFIX}${defectId}`);
153
208
  }
154
209
  }
155
210
  const where = String(issue?.sourceFile ?? "").trim() || "no sourceFile";
@@ -175,7 +230,9 @@ export function checkDefectsReported(plan, issues) {
175
230
  // Configuration Errors section — a defect parked there is one the reader never
176
231
  // meets under Issues Found, and it would close this check all the same.
177
232
  const reported = new Set(issues
178
- .filter((issue) => String(issue?.category ?? "").trim().toLowerCase() === "bug")
233
+ .filter((issue) => String(issue?.category ?? "")
234
+ .trim()
235
+ .toLowerCase() === "bug")
179
236
  .map((issue) => idKey(issue?.defectId))
180
237
  .filter(Boolean));
181
238
  const objections = [];
@@ -1,4 +1,4 @@
1
- import { REMOVED_ELEMENT_GUARDED_CONTRACT, fillPlaceholders } from "../verifierContracts.js";
1
+ import { REMOVED_ELEMENT_GUARDED_CONTRACT, fillPlaceholders, } from "../verifierContracts.js";
2
2
  import { escapeRegExp } from "../../utils/regex.js";
3
3
  /** Verifier 9. Every element the diff removed needs a planned test that says it is
4
4
  * gone.
@@ -19,11 +19,10 @@ import { escapeRegExp } from "../../utils/regex.js";
19
19
  * rather than accuses. `data-*` only, all the extractor reads; a renamed `aria-label`
20
20
  * is the prompt's to catch. */
21
21
  const { missing: MISSING, retired: RETIRED } = REMOVED_ELEMENT_GUARDED_CONTRACT.objections;
22
- const text = (value) => (typeof value === "string" ? value.trim() : "");
22
+ const text = (value) => typeof value === "string" ? value.trim() : "";
23
23
  function declaresElement(plannedTest, value) {
24
- const declared = plannedTest?.declarations;
25
- const items = Array.isArray(declared?.elements?.items) ? declared.elements.items : [];
26
- return items.some((item) => text(item?.testId) === value || text(item?.stableId) === value);
24
+ const items = plannedTest.declarations.elements?.items ?? [];
25
+ return items.some((item) => text(item.testId) === value || text(item.stableId) === value);
27
26
  }
28
27
  /** How a plan names an element. `testId` is the one field that carries the value
29
28
  * for a `data-testid`; a guard on `data-cy` or `data-qa` reaches the plan with
@@ -31,7 +30,10 @@ function declaresElement(plannedTest, value) {
31
30
  function namesElement(plannedTest, value) {
32
31
  if (declaresElement(plannedTest, value))
33
32
  return true;
34
- return [text(plannedTest?.declarations?.asserts), text(plannedTest?.plannedTestId)].some((prose) => prose.includes(value));
33
+ return [
34
+ String(plannedTest.declarations.asserts ?? "").trim(),
35
+ String(plannedTest.plannedTestId ?? "").trim(),
36
+ ].some((prose) => prose.includes(value));
35
37
  }
36
38
  /** Whole-identifier match. This case objects on a hit, so `includes` would raise
37
39
  * `nav-clear` against a test about `nav-clear-state-banner`. */
@@ -43,7 +45,7 @@ function mentionsIdentifier(prose, value) {
43
45
  function retiredIdentifierNamedBy(plannedTest, value) {
44
46
  if (declaresElement(plannedTest, value))
45
47
  return true;
46
- return mentionsIdentifier(text(plannedTest?.declarations?.asserts), value);
48
+ return mentionsIdentifier(String(plannedTest.declarations.asserts ?? "").trim(), value);
47
49
  }
48
50
  /** `attribute=value` identifies an element across the run, so the objection id is
49
51
  * the same string on every registration whatever order the list arrives in. */
@@ -74,7 +76,9 @@ export const removedElementGuarded = {
74
76
  objections.push({
75
77
  objectionId,
76
78
  verifier: "removedElementGuarded",
77
- message: fillPlaceholders(MISSING.message, { element: `${attribute}="${value}"` }),
79
+ message: fillPlaceholders(MISSING.message, {
80
+ element: `${attribute}="${value}"`,
81
+ }),
78
82
  evidence: `removed from ${text(element?.file) || "a changed frontend file"}; no planned test names ${value}`,
79
83
  suggestion: MISSING.suggestion,
80
84
  });
@@ -82,7 +86,9 @@ export const removedElementGuarded = {
82
86
  // Also removed somewhere means removed, whatever one hunk's pairing made of it.
83
87
  // Keyed the way the rest of the contract keys an element: `data-cy="legacy"` going
84
88
  // away says nothing about `data-testid="legacy"` being renamed.
85
- const removedKeys = new Set(removed.map((element) => `${text(element?.attribute)}=${text(element?.value)}`).filter((key) => key !== "="));
89
+ const removedKeys = new Set(removed
90
+ .map((element) => `${text(element?.attribute)}=${text(element?.value)}`)
91
+ .filter((key) => key !== "="));
86
92
  for (const element of retired) {
87
93
  const value = text(element?.value);
88
94
  const attribute = text(element?.attribute);
@@ -91,7 +97,7 @@ export const removedElementGuarded = {
91
97
  for (const plannedTest of plannedTests) {
92
98
  if (!retiredIdentifierNamedBy(plannedTest, value))
93
99
  continue;
94
- const plannedTestId = text(plannedTest?.plannedTestId);
100
+ const plannedTestId = String(plannedTest.plannedTestId ?? "").trim();
95
101
  const objectionId = retiredObjectionIdFor(element, plannedTestId);
96
102
  if (seen.has(objectionId))
97
103
  continue;
@@ -100,7 +106,9 @@ export const removedElementGuarded = {
100
106
  objectionId,
101
107
  verifier: "removedElementGuarded",
102
108
  ...(plannedTestId ? { plannedTestId } : {}),
103
- message: fillPlaceholders(RETIRED.message, { element: `${attribute}="${value}"` }),
109
+ message: fillPlaceholders(RETIRED.message, {
110
+ element: `${attribute}="${value}"`,
111
+ }),
104
112
  evidence: `${text(element?.file) || "a changed frontend file"} pairs ${value} with a new identifier on the same element, which reads as a rename; planned test ${plannedTestId || "(unnamed)"} names ${value}`,
105
113
  suggestion: RETIRED.suggestion,
106
114
  });
@@ -45,8 +45,12 @@ export function checkRequirementConflictReported(plan, delivered, issues) {
45
45
  const conflicts = delivered.filter((test) => normalizeCategory(plannedCategory(plan, test)) === "requirement_conflict");
46
46
  if (conflicts.length === 0)
47
47
  return [];
48
- const severities = issues.map((issue) => String(issue?.severity ?? "").trim().toLowerCase());
49
- const isAtFloor = (issue) => REQUIREMENT_CONFLICT_FLOOR.includes(String(issue?.severity ?? "").trim().toLowerCase());
48
+ const severities = issues.map((issue) => String(issue?.severity ?? "")
49
+ .trim()
50
+ .toLowerCase());
51
+ const isAtFloor = (issue) => REQUIREMENT_CONFLICT_FLOOR.includes(String(issue?.severity ?? "")
52
+ .trim()
53
+ .toLowerCase());
50
54
  const atFloor = issues.filter(isAtFloor);
51
55
  if (atFloor.length === 0) {
52
56
  const named = conflicts.map((test) => test.fileName).join(", ");
@@ -67,8 +71,9 @@ export function checkRequirementConflictReported(plan, delivered, issues) {
67
71
  // report whose issues name no planned test keeps the run-level answer above.
68
72
  if (!issues.some((issue) => String(issue?.plannedTestId ?? "").trim().length > 0))
69
73
  return [];
70
- const unnamed = conflicts.filter((test) => !atFloor.some((issue) => String(issue?.plannedTestId ?? "").trim() === String(test.plannedTestId ?? "").trim()
71
- && String(test.plannedTestId ?? "").trim().length > 0));
74
+ const unnamed = conflicts.filter((test) => !atFloor.some((issue) => String(issue?.plannedTestId ?? "").trim() ===
75
+ String(test.plannedTestId ?? "").trim() &&
76
+ String(test.plannedTestId ?? "").trim().length > 0));
72
77
  if (unnamed.length === 0)
73
78
  return [];
74
79
  return [
@@ -1,5 +1,5 @@
1
1
  import { normalizeCategory } from "../../types/TestRecommendation.js";
2
- import { REQUIREMENT_SOURCED_CONTRACT, fillPlaceholders } from "../verifierContracts.js";
2
+ import { REQUIREMENT_SOURCED_CONTRACT, fillPlaceholders, } from "../verifierContracts.js";
3
3
  import { normalizeCitedPath } from "./citedPath.js";
4
4
  import { appearsIn, searchable } from "../pullRequestText.js";
5
5
  /** Verifier 10. A change names where the agent read it, and the server reads the
@@ -19,8 +19,12 @@ import { appearsIn, searchable } from "../pullRequestText.js";
19
19
  const { unsourced: UNSOURCED, unreadable: UNREADABLE, fromDiff: FROM_DIFF, noChange: NO_CHANGE, notNamed: NOT_NAMED, emptyPullRequest: EMPTY_PULL_REQUEST, notQuoted: NOT_QUOTED, unquoted: UNQUOTED, } = REQUIREMENT_SOURCED_CONTRACT.objections;
20
20
  const CONFLICT_CATEGORY = "requirement_conflict";
21
21
  function readSource(raw) {
22
- const none = (kind) => ({ kind, file: "", citedAs: "" });
23
- const source = typeof raw === "string" ? raw.trim() : "";
22
+ const none = (kind) => ({
23
+ kind,
24
+ file: "",
25
+ citedAs: "",
26
+ });
27
+ const source = raw.trim();
24
28
  if (source.length === 0)
25
29
  return none("unknown");
26
30
  if (/^(pr-title|pr-description)$/i.test(source))
@@ -41,24 +45,24 @@ function readSource(raw) {
41
45
  }
42
46
  /** A source that stands for a requirement: the pull request, or a requirements file. */
43
47
  const statesARequirement = (source) => source.kind === "pullRequest" || source.kind === "spec";
44
- const text = (value) => (typeof value === "string" ? value.trim() : "");
45
- const list = (value) => (Array.isArray(value) ? value : []);
46
48
  export const requirementSourced = {
47
49
  name: "requirementSourced",
48
50
  run(registration, ctx) {
49
- const changes = list(registration?.changes);
50
- const plannedTests = list(registration?.plannedTests);
51
+ const changes = registration.changes;
52
+ const plannedTests = registration.plannedTests;
51
53
  const objections = [];
52
54
  const sourceById = new Map();
53
55
  const quoteById = new Map();
54
56
  const pullRequestText = searchable(ctx.pullRequest);
55
57
  for (const change of changes) {
56
- const changeId = text(change?.id) || "(unnamed)";
57
- const written = text(change?.source);
58
+ const id = String(change.id ?? "").trim();
59
+ const changeId = id || "(unnamed)";
60
+ // `objects when a change states no source` sends `source: undefined`.
61
+ const written = typeof change.source === "string" ? change.source.trim() : "";
58
62
  const source = readSource(written);
59
- if (text(change?.id)) {
60
- sourceById.set(text(change.id), source);
61
- quoteById.set(text(change.id), typeof change?.quote === "string" ? change.quote : undefined);
63
+ if (id) {
64
+ sourceById.set(id, source);
65
+ quoteById.set(id, typeof change.quote === "string" ? change.quote : undefined);
62
66
  }
63
67
  if (source.kind === "unknown") {
64
68
  objections.push({
@@ -76,7 +80,9 @@ export const requirementSourced = {
76
80
  objections.push({
77
81
  objectionId: `requirementSourced:emptyPullRequest:${changeId}`,
78
82
  verifier: "requirementSourced",
79
- message: fillPlaceholders(EMPTY_PULL_REQUEST.message, { change: changeId }),
83
+ message: fillPlaceholders(EMPTY_PULL_REQUEST.message, {
84
+ change: changeId,
85
+ }),
80
86
  evidence: `change ${changeId} states source \`${written}\`; this run rendered its prompt with no title and no description`,
81
87
  suggestion: EMPTY_PULL_REQUEST.suggestion,
82
88
  });
@@ -84,11 +90,14 @@ export const requirementSourced = {
84
90
  }
85
91
  if (source.kind !== "spec")
86
92
  continue;
87
- if (typeof ctx?.citedFileExists === "function" && !ctx.citedFileExists(source.file)) {
93
+ if (!ctx.citedFileExists(source.file)) {
88
94
  objections.push({
89
95
  objectionId: `requirementSourced:unreadable:${changeId}`,
90
96
  verifier: "requirementSourced",
91
- message: fillPlaceholders(UNREADABLE.message, { change: changeId, source: written }),
97
+ message: fillPlaceholders(UNREADABLE.message, {
98
+ change: changeId,
99
+ source: written,
100
+ }),
92
101
  evidence: `change ${changeId} states source \`${written}\`; ${source.file} is not a file in the run's repositories`,
93
102
  suggestion: UNREADABLE.suggestion,
94
103
  });
@@ -96,25 +105,29 @@ export const requirementSourced = {
96
105
  }
97
106
  // A requirements file the pull request never names is a file the agent found by
98
107
  // looking through the repository, which is not reading a requirement.
99
- if (appearsIn(pullRequestText, source.file) || appearsIn(pullRequestText, source.citedAs))
108
+ if (appearsIn(pullRequestText, source.file) ||
109
+ appearsIn(pullRequestText, source.citedAs))
100
110
  continue;
101
111
  objections.push({
102
112
  objectionId: `requirementSourced:notNamed:${changeId}`,
103
113
  verifier: "requirementSourced",
104
- message: fillPlaceholders(NOT_NAMED.message, { change: changeId, source: written }),
114
+ message: fillPlaceholders(NOT_NAMED.message, {
115
+ change: changeId,
116
+ source: written,
117
+ }),
105
118
  evidence: `change ${changeId} states source \`${written}\`; neither the title nor the description names ${source.file}`,
106
119
  suggestion: NOT_NAMED.suggestion,
107
120
  });
108
121
  }
109
122
  for (const plannedTest of plannedTests) {
110
- if (normalizeCategory(plannedTest?.scenario?.category) !== CONFLICT_CATEGORY)
123
+ if (normalizeCategory(plannedTest.scenario.category) !== CONFLICT_CATEGORY)
111
124
  continue;
112
- const plannedTestId = text(plannedTest?.plannedTestId);
125
+ const plannedTestId = String(plannedTest.plannedTestId ?? "").trim();
113
126
  const named = plannedTestId ? { plannedTestId } : {};
114
127
  // An id no change carries names nothing, so it says no more than citing
115
128
  // nothing does. Both leave the requirement with no stated origin.
116
- const cited = list(plannedTest?.declarations?.changes)
117
- .map((changeId) => text(changeId))
129
+ const cited = (plannedTest.declarations.changes ?? [])
130
+ .map((changeId) => String(changeId ?? "").trim())
118
131
  .filter((changeId) => sourceById.has(changeId));
119
132
  if (cited.length === 0) {
120
133
  objections.push({
@@ -27,14 +27,16 @@ function fills(pattern, path) {
27
27
  * a route path on a lane where no host serves the app and an absolute url when
28
28
  * one does; both name the same page. */
29
29
  function urlPath(raw) {
30
- const value = String(raw ?? "").trim();
30
+ const value = raw.trim();
31
31
  if (!value)
32
32
  return "";
33
33
  try {
34
34
  return new URL(value).pathname.replace(/\/+$/, "") || "/";
35
35
  }
36
36
  catch {
37
- return value.startsWith("/") ? value.split(/[?#]/)[0].replace(/\/+$/, "") || "/" : "";
37
+ return value.startsWith("/")
38
+ ? value.split(/[?#]/)[0].replace(/\/+$/, "") || "/"
39
+ : "";
38
40
  }
39
41
  }
40
42
  function field(value) {
@@ -44,12 +46,12 @@ function field(value) {
44
46
  * for it. A resolver that throws or answers with the wrong type is treated as
45
47
  * one that cannot speak: a scan is best-effort, and its failure is not evidence
46
48
  * about the plan. */
47
- function routesFor(ctx, file) {
48
- if (typeof ctx?.routesRenderingFile !== "function")
49
- return undefined;
49
+ function routesFor(ctx, file, repository) {
50
50
  try {
51
- const routes = ctx.routesRenderingFile(file);
52
- return Array.isArray(routes) ? routes.map(field).filter(Boolean) : undefined;
51
+ const routes = ctx.routesRenderingFile(file, repository);
52
+ return Array.isArray(routes)
53
+ ? routes.map(field).filter(Boolean)
54
+ : undefined;
53
55
  }
54
56
  catch {
55
57
  return undefined;
@@ -73,7 +75,7 @@ export const screenRoute = {
73
75
  for (const plannedTest of registration.plannedTests ?? []) {
74
76
  if (!isUIPlannedTest(plannedTest))
75
77
  continue;
76
- const elements = plannedTest.declarations?.elements;
78
+ const elements = plannedTest.declarations.elements;
77
79
  const url = field(elements && typeof elements === "object" ? elements.pageUrl : "");
78
80
  // `uiElementGrounded:pagecontext` already objects to an empty pageUrl.
79
81
  if (!url)
@@ -84,10 +86,13 @@ export const screenRoute = {
84
86
  // `screenEvidence.file` names the file that renders the screen; on a mixed
85
87
  // PR that is not the file the test is about. `changedFile` is the fallback,
86
88
  // and `changedFile:notStated` already objects when neither is stated.
87
- const screen = field(plannedTest.declarations?.screenEvidence?.file) || field(plannedTest.declarations?.changedFile);
89
+ const screen = field(plannedTest.declarations.screenEvidence?.file) ||
90
+ field(plannedTest.declarations.changedFile);
88
91
  if (!screen)
89
92
  continue;
90
- const routes = routesFor(ctx, screen);
93
+ // The test's OWN repository: its file is checked against the routes of the
94
+ // repository it names, not of whichever one holds a file of that name.
95
+ const routes = routesFor(ctx, screen, plannedTest.repository);
91
96
  // The resolver does not know this file. Not a fact about the plan.
92
97
  if (routes === undefined)
93
98
  continue;