@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.
Files changed (583) hide show
  1. package/build/commands/localDevTestChangesCommand.js +2 -1
  2. package/build/commands/recommendTestsAndExecuteCommand.js +15 -7
  3. package/build/commands/testThisEndpointCommand.js +35 -6
  4. package/build/execution/wrapperConfig.d.ts +56 -0
  5. package/build/execution/wrapperConfig.js +155 -0
  6. package/build/index.js +40 -10
  7. package/build/playwright/blueprintDigest.js +28 -7
  8. package/build/playwright/registerPlaywrightTools.js +47 -28
  9. package/build/playwright/traceExportStore.d.ts +22 -0
  10. package/build/playwright/traceExportStore.js +81 -0
  11. package/build/playwright/traceRecordingPrompt.js +11 -3
  12. package/build/prompts/code-reuse.js +118 -49
  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 +8 -23
  17. package/build/prompts/local-dev/local-dev-prompts.d.ts +1 -1
  18. package/build/prompts/local-dev/local-dev-prompts.js +31 -4
  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 +124 -2
  26. package/build/prompts/shared-helper-policy.js +178 -12
  27. package/build/prompts/startTraceCollectionPrompts.js +1 -1
  28. package/build/prompts/sut-setup/modes/adaptWorkflowPrompt.js +7 -8
  29. package/build/prompts/sut-setup/modes/dockerComposePrompt.js +1 -1
  30. package/build/prompts/sut-setup/shared.d.ts +4 -1
  31. package/build/prompts/sut-setup/shared.js +6 -4
  32. package/build/prompts/test-maintenance/actionsInstructions.d.ts +19 -11
  33. package/build/prompts/test-maintenance/actionsInstructions.js +47 -26
  34. package/build/prompts/test-maintenance/drift-analysis-prompt.d.ts +16 -8
  35. package/build/prompts/test-maintenance/drift-analysis-prompt.js +93 -38
  36. package/build/prompts/test-maintenance/driftAnalysisSections.js +5 -3
  37. package/build/prompts/test-maintenance/driftAnalysisShared.js +4 -2
  38. package/build/prompts/test-maintenance/uiDriftAnalysisSections.js +8 -5
  39. package/build/prompts/test-recommendation/recommendationSections.js +19 -8
  40. package/build/prompts/test-recommendation/recommendationShared.d.ts +1 -1
  41. package/build/prompts/test-recommendation/recommendationShared.js +0 -1
  42. package/build/prompts/test-recommendation/registerRecommendTestsPrompt.js +5 -2
  43. package/build/prompts/test-recommendation/test-recommendation-prompt.js +10 -7
  44. package/build/prompts/testbot/testbot-prompts.js +133 -63
  45. package/build/recommendation/answers.js +18 -9
  46. package/build/recommendation/pullRequestText.js +1 -1
  47. package/build/recommendation/registerPlan.js +31 -17
  48. package/build/recommendation/subjectStep.d.ts +8 -10
  49. package/build/recommendation/subjectStep.js +17 -16
  50. package/build/recommendation/types.d.ts +71 -17
  51. package/build/recommendation/types.js +9 -15
  52. package/build/recommendation/verifierContracts.d.ts +7 -3
  53. package/build/recommendation/verifierContracts.js +8 -4
  54. package/build/recommendation/verifiers/changedFile.js +11 -13
  55. package/build/recommendation/verifiers/citedPath.d.ts +8 -0
  56. package/build/recommendation/verifiers/citedPath.js +16 -2
  57. package/build/recommendation/verifiers/coverage.d.ts +2 -2
  58. package/build/recommendation/verifiers/coverage.js +190 -134
  59. package/build/recommendation/verifiers/defects.js +56 -16
  60. package/build/recommendation/verifiers/deliveredMatchesPlan.d.ts +7 -1
  61. package/build/recommendation/verifiers/deliveredMatchesPlan.js +28 -14
  62. package/build/recommendation/verifiers/endpointGrounded.js +14 -8
  63. package/build/recommendation/verifiers/existingCoverage.d.ts +6 -0
  64. package/build/recommendation/verifiers/existingCoverage.js +30 -21
  65. package/build/recommendation/verifiers/expectedOutcome.js +17 -8
  66. package/build/recommendation/verifiers/expectedValueSourced.js +54 -43
  67. package/build/recommendation/verifiers/issueTraceability.d.ts +5 -0
  68. package/build/recommendation/verifiers/issueTraceability.js +64 -7
  69. package/build/recommendation/verifiers/removedElementGuarded.js +19 -11
  70. package/build/recommendation/verifiers/reportedCategory.js +9 -4
  71. package/build/recommendation/verifiers/requirementSourced.js +34 -21
  72. package/build/recommendation/verifiers/screenRoute.js +15 -10
  73. package/build/recommendation/verifiers/statedDifference.js +15 -8
  74. package/build/recommendation/verifiers/uiElementGrounded.js +50 -16
  75. package/build/resources/analysisResources.js +7 -3
  76. package/build/resources/progressResource.js +4 -2
  77. package/build/resources/sutSetupResource.js +20 -2
  78. package/build/resources/testbotResource.js +19 -1
  79. package/build/services/AnalyticsService.js +3 -1
  80. package/build/services/ScenarioGenerationService.js +5 -5
  81. package/build/services/TestDiscoveryService.js +53 -9
  82. package/build/services/TestExecutionService.js +63 -21
  83. package/build/services/TestGenerationService.d.ts +1 -1
  84. package/build/services/TestGenerationService.js +43 -24
  85. package/build/skills/enhanceAssertionsSkill.d.ts +45 -0
  86. package/build/skills/enhanceAssertionsSkill.js +103 -0
  87. package/build/skills/fixTestImportErrorsSkill.d.ts +2 -2
  88. package/build/skills/fixTestImportErrorsSkill.js +2 -2
  89. package/build/skills/runTestSkill.d.ts +6 -0
  90. package/build/skills/runTestSkill.js +17 -0
  91. package/build/skills/skillFiles.d.ts +38 -0
  92. package/build/skills/skillFiles.js +94 -0
  93. package/build/skills/validateAssertionAlignmentSkill.d.ts +34 -0
  94. package/build/skills/validateAssertionAlignmentSkill.js +59 -0
  95. package/build/tool-phases.js +4 -1
  96. package/build/tools/auth/loginTool.js +3 -1
  97. package/build/tools/auth/logoutTool.js +3 -1
  98. package/build/tools/budgetExcuse.d.ts +15 -0
  99. package/build/tools/budgetExcuse.js +113 -0
  100. package/build/tools/code-refactor/alignAssertionsTool.d.ts +2 -0
  101. package/build/tools/code-refactor/alignAssertionsTool.js +51 -0
  102. package/build/tools/code-refactor/assertion-state.d.ts +1 -1
  103. package/build/tools/code-refactor/assertion-state.js +1 -1
  104. package/build/tools/code-refactor/assertionOperations.d.ts +44 -0
  105. package/build/tools/code-refactor/assertionOperations.js +82 -0
  106. package/build/tools/code-refactor/assertionSkillTools.d.ts +3 -0
  107. package/build/tools/code-refactor/assertionSkillTools.js +86 -0
  108. package/build/tools/code-refactor/codeReuseTool.js +27 -3
  109. package/build/tools/code-refactor/enhanceAssertionsTool.js +19 -83
  110. package/build/tools/code-refactor/gate-markers.d.ts +51 -0
  111. package/build/tools/code-refactor/gate-markers.js +95 -0
  112. package/build/tools/code-refactor/retrofit-state.d.ts +3 -1
  113. package/build/tools/code-refactor/retrofit-state.js +44 -2
  114. package/build/tools/code-refactor/reuse-outcome.d.ts +23 -1
  115. package/build/tools/code-refactor/reuse-outcome.js +36 -13
  116. package/build/tools/code-refactor/reuse-state.d.ts +90 -16
  117. package/build/tools/code-refactor/reuse-state.js +191 -61
  118. package/build/tools/code-refactor/utils-verify-gates.d.ts +4 -0
  119. package/build/tools/code-refactor/utils-verify-gates.js +269 -30
  120. package/build/tools/code-refactor/verify-gates.d.ts +15 -1
  121. package/build/tools/code-refactor/verify-gates.js +36 -4
  122. package/build/tools/enrichTestWithMocksTool.d.ts +1 -1
  123. package/build/tools/enrichTestWithMocksTool.js +9 -5
  124. package/build/tools/executeSkyrampTestTool.d.ts +118 -48
  125. package/build/tools/executeSkyrampTestTool.js +998 -372
  126. package/build/tools/execution-video-state.js +1 -1
  127. package/build/tools/fixErrorTool.js +5 -6
  128. package/build/tools/generate-tests/batchMockGenerationTool.js +1 -1
  129. package/build/tools/generate-tests/generateBatchScenarioRestTool.js +114 -73
  130. package/build/tools/generate-tests/generateContractRestTool.js +34 -16
  131. package/build/tools/generate-tests/generateE2ERestTool.d.ts +1 -0
  132. package/build/tools/generate-tests/generateE2ERestTool.js +9 -1
  133. package/build/tools/generate-tests/generateIntegrationRestTool.js +22 -7
  134. package/build/tools/generate-tests/generateMockRestTool.js +3 -1
  135. package/build/tools/generate-tests/generateUIRestTool.d.ts +2 -0
  136. package/build/tools/generate-tests/generateUIRestTool.js +11 -2
  137. package/build/tools/generate-tests/loadTestSchema.js +1 -3
  138. package/build/tools/generate-tests/planGuard.js +6 -3
  139. package/build/tools/generate-tests/scenarioFileIdentity.js +4 -1
  140. package/build/tools/generate-tests/scenarioLint.js +17 -5
  141. package/build/tools/generate-tests/trace-reuse-guard.js +5 -2
  142. package/build/tools/generateEnrichedIntegrationTestTool.js +9 -3
  143. package/build/tools/one-click/oneClickTool.js +3 -1
  144. package/build/tools/preflightMockCheckTool.js +23 -7
  145. package/build/tools/submitReportTool.d.ts +51 -12
  146. package/build/tools/submitReportTool.js +988 -161
  147. package/build/tools/test-management/actionsTool.js +241 -51
  148. package/build/tools/test-management/analyzeChangesTool.d.ts +8 -9
  149. package/build/tools/test-management/analyzeChangesTool.js +127 -68
  150. package/build/tools/test-management/analyzeTestHealthTool.d.ts +0 -11
  151. package/build/tools/test-management/analyzeTestHealthTool.js +42 -76
  152. package/build/tools/test-management/registerTestPlanTool.d.ts +44 -34
  153. package/build/tools/test-management/registerTestPlanTool.js +255 -111
  154. package/build/tools/test-management/resolveScreenTool.js +33 -9
  155. package/build/tools/test-management/testsOwedBeforeRun.d.ts +28 -0
  156. package/build/tools/test-management/testsOwedBeforeRun.js +53 -0
  157. package/build/tools/trace/startTraceCollectionTool.js +3 -1
  158. package/build/tools/trace/stopTraceCollectionTool.js +42 -6
  159. package/build/tools/verifyTestDependenciesTool.d.ts +3 -0
  160. package/build/tools/verifyTestDependenciesTool.js +54 -0
  161. package/build/tools/workspace/initScanWorkspaceTool.js +9 -3
  162. package/build/tools/workspace/initializeWorkspaceTool.js +3 -1
  163. package/build/types/AssertionOutcome.d.ts +1 -1
  164. package/build/types/EnhanceType.d.ts +6 -0
  165. package/build/types/EnhanceType.js +1 -0
  166. package/build/types/RepositoryAnalysis.d.ts +32 -72
  167. package/build/types/ReuseOutcome.d.ts +100 -7
  168. package/build/types/ReuseOutcome.js +16 -0
  169. package/build/types/StepMethod.js +20 -6
  170. package/build/types/TestAnalysis.d.ts +10 -2
  171. package/build/types/TestExecution.d.ts +45 -0
  172. package/build/types/TestRecommendation.d.ts +1 -1
  173. package/build/types/TestRecommendation.js +4 -1
  174. package/build/types/TestTypes.d.ts +16 -0
  175. package/build/types/TestTypes.js +40 -3
  176. package/build/types/TestbotPromptOptions.d.ts +9 -1
  177. package/build/types/TestbotReport.d.ts +45 -9
  178. package/build/utils/AnalysisStateManager.d.ts +137 -34
  179. package/build/utils/AnalysisStateManager.js +228 -44
  180. package/build/utils/assertion-verify/api-shared-lints.js +34 -16
  181. package/build/utils/assertion-verify/metrics.js +39 -6
  182. package/build/utils/assertion-verify/ui-lints.js +4 -2
  183. package/build/utils/branchDiff.js +47 -12
  184. package/build/utils/canonicalJson.js +3 -1
  185. package/build/utils/connectionErrors.d.ts +10 -0
  186. package/build/utils/connectionErrors.js +10 -0
  187. package/build/utils/dartRouteExtractor.js +36 -7
  188. package/build/utils/fixAttempts.d.ts +26 -0
  189. package/build/utils/fixAttempts.js +109 -0
  190. package/build/utils/frontendSelectors.js +23 -4
  191. package/build/utils/generatedTestRecord.d.ts +19 -0
  192. package/build/utils/generatedTestRecord.js +61 -0
  193. package/build/utils/gitStaging.js +7 -2
  194. package/build/utils/initAgent.js +26 -6
  195. package/build/utils/language-helper.js +60 -45
  196. package/build/utils/pathMatching.js +2 -1
  197. package/build/utils/pathSignatures.js +6 -2
  198. package/build/utils/planMatchKeys.d.ts +2 -2
  199. package/build/utils/planMatchKeys.js +20 -14
  200. package/build/utils/pom-catalog-parse.js +7 -2
  201. package/build/utils/pom-scope/import-expansion.js +6 -1
  202. package/build/utils/pom-scope/index.js +50 -12
  203. package/build/utils/pom-scope/scoring.js +13 -3
  204. package/build/utils/pom-scope/selector-extractor.js +16 -3
  205. package/build/utils/pom-scope/strip.d.ts +8 -0
  206. package/build/utils/pom-scope/strip.js +238 -0
  207. package/build/utils/pom-scope/testIdDiscovery.js +14 -2
  208. package/build/utils/pom-verify/__fixtures__/af-style/asset-list.page.d.ts +1 -1
  209. package/build/utils/pom-verify/__fixtures__/af-style/asset-list.page.js +4 -2
  210. package/build/utils/pom-verify/__fixtures__/af-style/report.iframe.page.js +3 -1
  211. package/build/utils/pom-verify/__fixtures__/af-style/workflow-footer.page.js +3 -1
  212. package/build/utils/pom-verify/bindings.js +5 -1
  213. package/build/utils/pom-verify/calls.js +9 -2
  214. package/build/utils/pom-verify/verify.js +27 -5
  215. package/build/utils/pr-comment-parser.js +20 -7
  216. package/build/utils/progress.d.ts +1 -1
  217. package/build/utils/progress.js +1 -1
  218. package/build/utils/proxy-terminal.d.ts +19 -1
  219. package/build/utils/proxy-terminal.js +346 -21
  220. package/build/utils/rebaselineSnapshots.d.ts +1 -1
  221. package/build/utils/rebaselineSnapshots.js +6 -16
  222. package/build/utils/removedUiElements.js +1 -1
  223. package/build/utils/reportLanguage.js +35 -7
  224. package/build/utils/reportVerification.d.ts +14 -8
  225. package/build/utils/reportVerification.js +19 -19
  226. package/build/utils/repositorySlug.d.ts +32 -0
  227. package/build/utils/repositorySlug.js +77 -0
  228. package/build/utils/reuseRouting.d.ts +10 -0
  229. package/build/utils/reuseRouting.js +21 -2
  230. package/build/utils/runContextGauge.d.ts +27 -0
  231. package/build/utils/runContextGauge.js +181 -0
  232. package/build/utils/runSerialized.d.ts +3 -0
  233. package/build/utils/runSerialized.js +39 -0
  234. package/build/utils/screenRoutes.js +74 -18
  235. package/build/utils/skyrampMdContent.d.ts +1 -1
  236. package/build/utils/skyrampMdContent.js +1 -1
  237. package/build/utils/skyrampSdkVersion.d.ts +9 -0
  238. package/build/utils/skyrampSdkVersion.js +16 -0
  239. package/build/utils/sourceRouteExtractor.js +13 -6
  240. package/build/utils/telemetry.d.ts +1 -0
  241. package/build/utils/telemetry.js +8 -5
  242. package/build/utils/testDependencyPolicy.d.ts +9 -0
  243. package/build/utils/testDependencyPolicy.js +809 -0
  244. package/build/utils/testExecutionRecord.d.ts +94 -0
  245. package/build/utils/testExecutionRecord.js +269 -0
  246. package/build/utils/testFileClassification.d.ts +8 -0
  247. package/build/utils/testFileClassification.js +39 -4
  248. package/build/utils/trace-parser.js +62 -14
  249. package/build/utils/urlPath.js +3 -1
  250. package/build/utils/utils-verify/action-key.d.ts +46 -0
  251. package/build/utils/utils-verify/action-key.js +120 -38
  252. package/build/utils/utils-verify/action-sites.d.ts +32 -0
  253. package/build/utils/utils-verify/action-sites.js +202 -0
  254. package/build/utils/utils-verify/allow.d.ts +122 -3
  255. package/build/utils/utils-verify/allow.js +146 -21
  256. package/build/utils/utils-verify/body-reach.d.ts +120 -0
  257. package/build/utils/utils-verify/body-reach.js +333 -0
  258. package/build/utils/utils-verify/call-sites.d.ts +31 -7
  259. package/build/utils/utils-verify/call-sites.js +80 -13
  260. package/build/utils/utils-verify/delivered-imports.d.ts +43 -0
  261. package/build/utils/utils-verify/delivered-imports.js +84 -0
  262. package/build/utils/utils-verify/fixed-sleep.d.ts +96 -0
  263. package/build/utils/utils-verify/fixed-sleep.js +461 -0
  264. package/build/utils/utils-verify/in-house.d.ts +93 -0
  265. package/build/utils/utils-verify/in-house.js +719 -0
  266. package/build/utils/utils-verify/incumbent.d.ts +3 -0
  267. package/build/utils/utils-verify/incumbent.js +75 -0
  268. package/build/utils/utils-verify/index.d.ts +2 -0
  269. package/build/utils/utils-verify/index.js +2 -0
  270. package/build/utils/utils-verify/language-spec.d.ts +51 -10
  271. package/build/utils/utils-verify/language-spec.js +232 -21
  272. package/build/utils/utils-verify/locate.d.ts +26 -0
  273. package/build/utils/utils-verify/locate.js +125 -23
  274. package/build/utils/utils-verify/module-name.d.ts +40 -0
  275. package/build/utils/utils-verify/module-name.js +98 -0
  276. package/build/utils/utils-verify/parse.d.ts +56 -7
  277. package/build/utils/utils-verify/parse.js +195 -40
  278. package/build/utils/utils-verify/retrofit-equivalence.d.ts +5 -0
  279. package/build/utils/utils-verify/retrofit-equivalence.js +4 -2
  280. package/build/utils/utils-verify/stage.d.ts +5 -0
  281. package/build/utils/utils-verify/stage.js +47 -2
  282. package/build/utils/utils-verify/status-once.d.ts +62 -0
  283. package/build/utils/utils-verify/status-once.js +207 -0
  284. package/build/utils/utils-verify/typecheck.d.ts +61 -0
  285. package/build/utils/utils-verify/typecheck.js +338 -0
  286. package/build/utils/utils-verify/verify.d.ts +79 -3
  287. package/build/utils/utils-verify/verify.js +531 -61
  288. package/build/utils/versions.d.ts +3 -3
  289. package/build/utils/versions.js +1 -1
  290. package/build/utils/workspaceAuth.js +107 -37
  291. package/build/workspace/queryParamResolution.js +11 -4
  292. package/build/workspace/workspace.d.ts +72 -52
  293. package/build/workspace/workspace.js +19 -15
  294. package/node_modules/playwright/ThirdPartyNotices.txt +19 -19
  295. package/node_modules/playwright/lib/mcp/skyramp/assertTool.js +8 -2
  296. package/node_modules/playwright/lib/mcp/skyramp/common/cssValue.js +87 -0
  297. package/node_modules/playwright/lib/mcp/skyramp/loadTraceTool.js +31 -0
  298. package/node_modules/playwright/lib/mcp/skyramp/skyRampImport.js +3 -0
  299. package/node_modules/playwright/lib/mcp/skyramp/traceRecordingBackend.js +181 -15
  300. package/node_modules/playwright/lib/mcp/test/skyRampExport.js +24 -0
  301. package/node_modules/playwright/lib/transform/babelBundleImpl.js +2353 -190
  302. package/node_modules/playwright/node_modules/playwright-core/ThirdPartyNotices.txt +62 -34
  303. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/.package-lock.json +72 -41
  304. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/@hono/node-server/dist/serve-static.js +1 -1
  305. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/@hono/node-server/dist/serve-static.mjs +1 -1
  306. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/@hono/node-server/package.json +2 -2
  307. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/README.md +16 -1
  308. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/index.js +4 -20
  309. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/lib/read.js +17 -17
  310. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/lib/types/json.js +60 -32
  311. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/lib/types/raw.js +3 -3
  312. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/lib/types/text.js +3 -3
  313. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/lib/types/urlencoded.js +16 -20
  314. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/lib/utils.js +18 -16
  315. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/node_modules/content-type/LICENSE +22 -0
  316. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/node_modules/content-type/README.md +71 -0
  317. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/node_modules/content-type/dist/index.d.ts +46 -0
  318. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/node_modules/content-type/dist/index.js +176 -0
  319. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/node_modules/content-type/dist/index.js.map +1 -0
  320. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/node_modules/content-type/package.json +52 -0
  321. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/package.json +23 -10
  322. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/es-object-atoms/CHANGELOG.md +21 -14
  323. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/es-object-atoms/isObject.d.ts +1 -1
  324. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/es-object-atoms/package.json +6 -7
  325. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/es-object-atoms/tsconfig.json +1 -0
  326. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/index.js +266 -45
  327. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/lib/schemes.js +9 -4
  328. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/lib/utils.js +396 -92
  329. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/package.json +1 -1
  330. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/component-safe-serialization.test.js +163 -0
  331. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/equal.test.js +31 -3
  332. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/fixtures/uri-js-parse.json +2 -0
  333. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/ipv6-canonical.test.js +34 -0
  334. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/ipv6-validation.test.js +124 -0
  335. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/malformed-percent.test.js +77 -0
  336. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/malformed-urn.test.js +61 -0
  337. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/parse.test.js +7 -3
  338. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/query-fragment-normalization.test.js +33 -0
  339. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/reserved-path-normalization.test.js +109 -0
  340. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/scheme-validation.test.js +124 -0
  341. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/security-normalization.test.js +101 -0
  342. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/security.test.js +301 -3
  343. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/urn-full-input.test.js +29 -0
  344. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/websocket-query-preservation.test.js +24 -0
  345. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hasown/CHANGELOG.md +7 -0
  346. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hasown/index.d.ts +0 -1
  347. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hasown/package.json +4 -5
  348. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/client/client.js +30 -16
  349. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/client/utils.js +4 -1
  350. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/context.js +32 -13
  351. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/helper/accepts/accepts.js +36 -2
  352. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/helper/proxy/index.js +4 -0
  353. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/helper/ssg/ssg.js +1 -1
  354. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/helper/ssg/utils.js +30 -10
  355. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/helper/streaming/sse.js +5 -4
  356. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/hono-base.js +10 -8
  357. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/jsx/base.js +44 -23
  358. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/jsx/components.js +25 -26
  359. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/jsx/context.js +5 -5
  360. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/jsx/dom/render.js +2 -0
  361. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/jsx/dom/server.js +5 -1
  362. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/jsx/hooks/index.js +16 -13
  363. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/jsx/intrinsic-element/components.js +3 -3
  364. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/jsx/streaming.js +4 -5
  365. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/cache/index.js +103 -8
  366. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/compress/index.js +5 -0
  367. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/cors/index.js +17 -14
  368. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/csrf/index.js +1 -1
  369. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/etag/digest.js +47 -1
  370. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/etag/index.js +7 -4
  371. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/jwk/jwk.js +9 -4
  372. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/jwt/jwt.js +9 -4
  373. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/language/language.js +10 -6
  374. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/method-not-allowed/index.js +90 -0
  375. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/pretty-json/index.js +3 -1
  376. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/secure-headers/secure-headers.js +16 -7
  377. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/request.js +20 -13
  378. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router/linear-router/router.js +7 -2
  379. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router/pattern-router/router.js +3 -9
  380. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router/reg-exp-router/node.js +65 -59
  381. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router/reg-exp-router/router.js +71 -128
  382. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router/reg-exp-router/trie.js +14 -5
  383. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router/trie-router/node.js +47 -70
  384. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router/trie-router/router.js +3 -11
  385. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router/utils.js +27 -0
  386. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router.js +1 -1
  387. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/utils/accept.js +1 -1
  388. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/utils/body.js +21 -3
  389. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/utils/cookie.js +4 -3
  390. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/utils/ipaddr.js +5 -3
  391. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/utils/stream.js +12 -3
  392. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/utils/url.js +19 -11
  393. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/client/client.js +30 -16
  394. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/client/utils.js +4 -1
  395. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/context.js +32 -13
  396. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/helper/accepts/accepts.js +36 -2
  397. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/helper/proxy/index.js +4 -0
  398. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/helper/ssg/ssg.js +1 -1
  399. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/helper/ssg/utils.js +30 -10
  400. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/helper/streaming/sse.js +5 -4
  401. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/hono-base.js +10 -8
  402. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/jsx/base.js +41 -23
  403. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/jsx/components.js +26 -27
  404. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/jsx/context.js +6 -6
  405. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/jsx/dom/render.js +2 -0
  406. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/jsx/dom/server.js +5 -1
  407. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/jsx/hooks/index.js +16 -13
  408. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/jsx/intrinsic-element/components.js +4 -4
  409. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/jsx/streaming.js +5 -6
  410. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/cache/index.js +103 -8
  411. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/compress/index.js +5 -0
  412. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/cors/index.js +17 -14
  413. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/csrf/index.js +1 -1
  414. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/etag/digest.js +47 -1
  415. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/etag/index.js +7 -4
  416. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/jwk/jwk.js +9 -4
  417. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/jwt/jwt.js +9 -4
  418. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/language/language.js +10 -6
  419. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/method-not-allowed/index.js +68 -0
  420. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/pretty-json/index.js +3 -1
  421. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/secure-headers/secure-headers.js +16 -7
  422. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/request.js +21 -14
  423. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router/linear-router/router.js +7 -2
  424. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router/pattern-router/router.js +3 -9
  425. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router/reg-exp-router/node.js +61 -58
  426. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router/reg-exp-router/router.js +77 -129
  427. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router/reg-exp-router/trie.js +14 -5
  428. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router/trie-router/node.js +47 -70
  429. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router/trie-router/router.js +3 -11
  430. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router/utils.js +5 -0
  431. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router.js +1 -1
  432. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/adapter/aws-lambda/types.d.ts +9 -0
  433. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/client/types.d.ts +1 -1
  434. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/context.d.ts +6 -2
  435. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/hono-base.d.ts +4 -3
  436. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/jsx/base.d.ts +7 -2
  437. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/jsx/dom/index.d.ts +5 -5
  438. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/jsx/dom/intrinsic-element/components.d.ts +2 -2
  439. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/jsx/dom/server.d.ts +5 -5
  440. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/jsx/hooks/index.d.ts +8 -6
  441. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/jsx/index.d.ts +5 -5
  442. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/middleware/cache/index.d.ts +6 -4
  443. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/middleware/combine/index.d.ts +1 -1
  444. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/middleware/cors/index.d.ts +1 -1
  445. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/middleware/jsx-renderer/index.d.ts +2 -2
  446. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/middleware/jwk/jwk.d.ts +2 -0
  447. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/middleware/jwt/jwt.d.ts +2 -0
  448. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/middleware/method-not-allowed/index.d.ts +49 -0
  449. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/middleware/secure-headers/permissions-policy.d.ts +3 -3
  450. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/router/reg-exp-router/node.d.ts +4 -1
  451. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/router/reg-exp-router/trie.d.ts +2 -1
  452. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/router/trie-router/node.d.ts +1 -2
  453. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/router/trie-router/router.d.ts +0 -1
  454. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/router/utils.d.ts +1 -0
  455. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/router.d.ts +1 -1
  456. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/utils/headers.d.ts +2 -2
  457. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/utils/url.d.ts +5 -0
  458. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/utils/accept.js +1 -1
  459. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/utils/body.js +21 -3
  460. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/utils/cookie.js +5 -4
  461. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/utils/ipaddr.js +5 -3
  462. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/utils/stream.js +12 -3
  463. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/utils/url.js +17 -10
  464. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/package.json +11 -4
  465. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/README.md +173 -143
  466. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/address-error.d.ts +11 -0
  467. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/address-error.js.map +1 -1
  468. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/common.d.ts +49 -0
  469. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/common.js +79 -4
  470. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/common.js.map +1 -1
  471. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/ipv4.d.ts +78 -5
  472. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/ipv4.js +119 -24
  473. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/ipv4.js.map +1 -1
  474. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/ipv6.d.ts +151 -10
  475. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/ipv6.js +316 -90
  476. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/ipv6.js.map +1 -1
  477. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/v4/constants.d.ts +12 -0
  478. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/v4/constants.js +45 -2
  479. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/v4/constants.js.map +1 -1
  480. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/v6/constants.d.ts +14 -0
  481. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/v6/constants.js +50 -3
  482. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/v6/constants.js.map +1 -1
  483. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/package.json +6 -4
  484. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/.github/THREAT_MODEL.md +3 -3
  485. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/CHANGELOG.md +26 -0
  486. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/README.md +19 -1
  487. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/dist/qs.js +25 -25
  488. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/eslint.config.mjs +1 -1
  489. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/lib/parse.js +16 -6
  490. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/lib/stringify.js +23 -8
  491. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/lib/utils.js +57 -11
  492. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/package.json +8 -7
  493. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/test/parse.js +419 -0
  494. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/test/stringify.js +317 -0
  495. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/test/utils.js +206 -0
  496. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/side-channel/CHANGELOG.md +10 -0
  497. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/side-channel/README.md +1 -1
  498. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/side-channel/index.js +5 -2
  499. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/side-channel/package.json +10 -10
  500. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/side-channel/test/index.js +16 -0
  501. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/type-is/index.js +8 -18
  502. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/type-is/node_modules/content-type/LICENSE +22 -0
  503. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/type-is/node_modules/content-type/README.md +71 -0
  504. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/type-is/node_modules/content-type/dist/index.d.ts +46 -0
  505. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/type-is/node_modules/content-type/dist/index.js +176 -0
  506. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/type-is/node_modules/content-type/dist/index.js.map +1 -0
  507. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/type-is/node_modules/content-type/package.json +52 -0
  508. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/type-is/package.json +9 -5
  509. package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/package-lock.json +72 -41
  510. package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/.package-lock.json +6 -6
  511. package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/brace-expansion/README.md +23 -1
  512. package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/brace-expansion/index.js +265 -86
  513. package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/brace-expansion/package.json +1 -1
  514. package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/README.md +173 -143
  515. package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/address-error.d.ts +11 -0
  516. package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/address-error.js.map +1 -1
  517. package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/common.d.ts +49 -0
  518. package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/common.js +79 -4
  519. package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/common.js.map +1 -1
  520. package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/ipv4.d.ts +78 -5
  521. package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/ipv4.js +119 -24
  522. package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/ipv4.js.map +1 -1
  523. package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/ipv6.d.ts +151 -10
  524. package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/ipv6.js +316 -90
  525. package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/ipv6.js.map +1 -1
  526. package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/v4/constants.d.ts +12 -0
  527. package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/v4/constants.js +45 -2
  528. package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/v4/constants.js.map +1 -1
  529. package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/v6/constants.d.ts +14 -0
  530. package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/v6/constants.js +50 -3
  531. package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/v6/constants.js.map +1 -1
  532. package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/package.json +6 -4
  533. package/node_modules/playwright/node_modules/playwright-core/bundles/utils/package-lock.json +6 -6
  534. package/node_modules/playwright/node_modules/playwright-core/lib/cli/program.js +18 -9
  535. package/node_modules/playwright/node_modules/playwright-core/lib/mcpBundleImpl/index.js +47 -47
  536. package/node_modules/playwright/node_modules/playwright-core/lib/server/codegen/skyramp/jsonlReader.js +3 -0
  537. package/node_modules/playwright/node_modules/playwright-core/lib/server/recorder/recorderRunner.js +42 -0
  538. package/node_modules/playwright/node_modules/playwright-core/lib/utilsBundleImpl/index.js +121 -121
  539. package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/{index.B7KbSQcC.js → index.BAkLd5DX.js} +1 -1
  540. package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/index.html +1 -1
  541. package/node_modules/playwright/node_modules/playwright-core/package.json +1 -1
  542. package/node_modules/playwright/node_modules/playwright-core/src/cli/program.ts +31 -9
  543. package/node_modules/playwright/node_modules/playwright-core/src/server/codegen/skyramp/jsonlReader.ts +1 -0
  544. package/node_modules/playwright/node_modules/playwright-core/src/server/recorder/recorderRunner.ts +57 -1
  545. package/node_modules/playwright/package.json +2 -2
  546. package/package.json +7 -6
  547. package/plugin/prompts/code-reuse/hand-off.md +30 -0
  548. package/plugin/prompts/generate-tests/generation.md +1 -1
  549. package/plugin/prompts/plan-tests.md +14 -14
  550. package/plugin/prompts/testbot-task1.md +2 -2
  551. package/plugin/skills/enhance-assertions/SKILL.md +25 -0
  552. package/plugin/skills/enhance-assertions/reference/contract.md +51 -0
  553. package/plugin/skills/enhance-assertions/reference/integration.md +58 -0
  554. package/plugin/skills/enhance-assertions/reference/shared-rules.md +220 -0
  555. package/plugin/skills/enhance-assertions/reference/ui.md +373 -0
  556. package/plugin/skills/fix-test-import-errors/SKILL.md +45 -50
  557. package/plugin/skills/run-test/SKILL.md +16 -0
  558. package/plugin/skills/validate-assertion-alignment-post-execution/SKILL.md +32 -0
  559. package/plugin/skills/validate-assertion-alignment-post-execution/reference/checks.md +44 -0
  560. package/plugin/skills/validate-assertion-alignment-post-execution/reference/evidence.md +47 -0
  561. package/build/adapters/jestAdapter.d.ts +0 -14
  562. package/build/adapters/jestAdapter.js +0 -113
  563. package/build/adapters/mochaAdapter.d.ts +0 -13
  564. package/build/adapters/mochaAdapter.js +0 -87
  565. package/build/adapters/playwrightAdapter.d.ts +0 -17
  566. package/build/adapters/playwrightAdapter.js +0 -182
  567. package/build/adapters/pytestAdapter.d.ts +0 -15
  568. package/build/adapters/pytestAdapter.js +0 -108
  569. package/build/prompts/enhance-assertions/contractProviderAssertionsPrompt.d.ts +0 -2
  570. package/build/prompts/enhance-assertions/contractProviderAssertionsPrompt.js +0 -29
  571. package/build/prompts/enhance-assertions/integrationAssertionsPrompt.d.ts +0 -2
  572. package/build/prompts/enhance-assertions/integrationAssertionsPrompt.js +0 -36
  573. package/build/prompts/enhance-assertions/sharedAssertionRules.d.ts +0 -16
  574. package/build/prompts/enhance-assertions/sharedAssertionRules.js +0 -284
  575. package/build/prompts/enhance-assertions/uiAssertionsPrompt.d.ts +0 -2
  576. package/build/prompts/enhance-assertions/uiAssertionsPrompt.js +0 -388
  577. package/build/tools/runExistingTestsTool.d.ts +0 -138
  578. package/build/tools/runExistingTestsTool.js +0 -644
  579. package/build/types/ExternalTestExecution.d.ts +0 -67
  580. package/build/types/ExternalTestExecution.js +0 -8
  581. package/build/workspace/testSuites.d.ts +0 -20
  582. package/build/workspace/testSuites.js +0 -17
  583. package/node_modules/playwright/node_modules/playwright-core/.DS_Store +0 -0
@@ -25,6 +25,7 @@ export const localDevPlan = new PromptPlan()
25
25
  })
26
26
  .step("ANALYZE_DIFF", "Analyze branch diff", (ctx) => `Call \`skyramp_analyze_changes\` with:
27
27
  - \`repositoryPath\`: "${ctx.repositoryPath}"
28
+ - \`repository\`: "${ctx.repository}"
28
29
  - \`scope\`: "branch_diff"
29
30
  - \`baseBranch\`: "${ctx.baseCommit}"
30
31
  - \`includeUncommitted\`: true
@@ -64,7 +65,7 @@ service_name:
64
65
  interactions: [method, path, request shape, response shape]
65
66
  \`\`\`
66
67
 
67
- Downstream dependency handling must be explicit: HTTP/REST, gRPC, and Kafka dependencies can be mocked by Skyramp when selected for mocking. For unselected first-party/local services and infrastructure, use the real local service and document why it is real. For Kafka selected for mocking, call \`skyramp_mock_generation\` with \`protocol: "kafka"\`, \`endpointURL\` as broker \`host:port\`, and \`kafkaTopic\` as the topic name. The \`skyramp_execute_test\` tool handles execution and integration mock deployment from enriched test files.
68
+ Downstream dependency handling must be explicit: HTTP/REST, gRPC, and Kafka dependencies can be mocked by Skyramp when selected for mocking. For unselected first-party/local services and infrastructure, use the real local service and document why it is real. For Kafka selected for mocking, call \`skyramp_mock_generation\` with \`protocol: "kafka"\`, \`endpointURL\` as broker \`host:port\`, and \`kafkaTopic\` as the topic name. An enriched test file applies its selected mocks when \`skyramp_execute_test\` runs it.
68
69
 
69
70
  **Auth discovery (do this NOW, not later):**
70
71
  - Read the endpoint's auth middleware/filters to understand the token format (e.g., Base64 of "client_id:secret", JWT, API key)
@@ -297,7 +298,7 @@ This injects import statements from the generated mock files — no data duplica
297
298
  - \`testType\`: "integration", "contract", or "ui" (match the scenario table)
298
299
  - \`enhanceType\`: "generation"
299
300
 
300
- The tool returns instructions — it does NOT edit the file automatically. Apply every returned instruction yourself: read the test file and add the suggested assertions. For assertions on server-generated IDs (e.g., account IDs, order IDs), prefer a domain prefix check (e.g., \`.startswith("acc_")\`) over \`is not None\` when the application uses a known ID format.`)
301
+ The tool returns instructions — it does NOT edit the file automatically. Apply every returned instruction yourself: read the test file and add the suggested assertions.`)
301
302
  .step("CROSS_REFERENCE", "Cross-reference scenarios vs test files", (_ctx) => `Compare the scenario table from Phase 2 against the generated test files:
302
303
 
303
304
  1. For each generated scenario, verify a corresponding test file exists with the correct SCENARIO_NAME or generated test name.
@@ -366,39 +367,23 @@ To regenerate a single missing Kafka mock, call \`skyramp_mock_generation\` with
366
367
  headerLevel: "##",
367
368
  stepFormat: "hash",
368
369
  })
369
- .step("EXECUTE_TESTS", "Execute tests via skyramp_execute_test MCP tool", (ctx) => `**You MUST use the \`skyramp_execute_test\` MCP tool for every test file.**
370
+ .step("EXECUTE_TESTS", "Execute tests via skyramp_execute_test MCP tool", () => `**Run every test file through the \`skyramp_execute_test\` MCP tool.** Give it the command that runs that one test file. The server records the run, and a run it did not record cannot appear in the report.
370
371
 
371
- **NEVER use any of these alternatives:**
372
- - \`skyramp execute test\` CLI command
373
- - Direct language runtimes (\`python3\`, \`pytest\`, \`node\`, \`npx jest\`, etc.)
374
- - Any shell command to run tests
375
-
376
- **If \`skyramp_execute_test\` is unavailable** (tool not found, MCP disconnected, or context compaction removed it): do NOT fall back to any direct runtime. Stop execution immediately, list the test files that could not be executed, and tell the user: "The skyramp_execute_test tool is unavailable. Please reconnect the Skyramp MCP server and re-run. Do not use pytest or any direct runtime — doing so bypasses mock deployment and Skyramp telemetry."
377
-
378
- The \`skyramp_execute_test\` MCP tool handles execution. For enriched integration tests, it runs the test in a container; the test's generated helper reads \`MOCK_SERVICES\`, clears stale mocks, and applies selected mocks before requests execute. Contract tests run without \`MOCK_SERVICES\`.
372
+ \`skyramp_execute_test\` runs the command on this machine. The test reaches the SUT and the Skyramp worker through their published ports on \`localhost\`. For enriched integration tests, the test's generated helper reads \`MOCK_SERVICES\`, clears stale mocks, and applies selected mocks before requests execute. Contract tests run without \`MOCK_SERVICES\`.
379
373
 
380
374
  **Pre-execution gate:** Before every integration test execution, inspect the test file. If it does not contain \`MOCK_SERVICES\` and the language-specific apply helper (\`apply_all_mocks(client)\` for Python or \`applyAllMocks(client)\` for TypeScript/JavaScript/Java), or if it contains an empty \`MOCK_SERVICES\` collection for a scenario with downstream mocks, do NOT execute it. Call \`skyramp_enrich_test_with_mocks\` first and re-check the file. If \`MOCK_SERVICES\` is non-empty, execution is invalid until every real service selected for mocking is stopped.
381
375
 
382
376
  **No-hollow-pass gate:** Before executing any generated test, inspect it for unresolved placeholders or stub-only behavior. Do NOT execute or report PASS for files containing \`TODO\`, a standalone \`pass\` statement in a test body, \`NotImplemented\`, "replace with real consumer code", or executable consumer-contract code that calls the mocked endpoint directly without invoking application/consumer code. Skipped or strict xfail direct-mock reference stubs may remain only when a separate executable real consumer/SUT test exists; the skipped or strict xfail stub never counts as PASS. Strict xfail must fail the run on XPASS (for pytest, \`@pytest.mark.xfail(strict=True)\`). Fix the test or report the scenario as blocked.
383
377
 
384
- **Execution — one call per test file:**
385
- \`\`\`
386
- skyramp_execute_test({
387
- testFile: "${ctx.repositoryPath}/tests/skyramp/<scenario>_test.py",
388
- language: "<from workspace config>",
389
- testType: "<'integration' or 'contract' — match the scenario table>",
390
- workspacePath: "${ctx.repositoryPath}",
391
- token: "",
392
- })
393
- \`\`\`
378
+ **Execution — one \`skyramp_execute_test\` call per test file.**
394
379
 
395
- That's it. Pass \`token: ""\` so the executor injects \`SKYRAMP_TEST_TOKEN\` from the environment when auth is configured. For provider contract tests, omit \`contractMode\` or pass \`contractMode: "provider"\` so \`SKYRAMP_TEST_BASE_URL\` is injected. For consumer contract tests with inline mocks, pass \`contractMode: "consumer"\`. For integration tests, mock deployment is automatic because the enriched test helper reads \`MOCK_SERVICES\`, clears stale mocks, and applies them before exercising the service. Provider contract tests hit the service under test directly; consumer contract tests use any inline mocks generated in the contract test itself.
380
+ For integration tests, mock deployment is automatic because the enriched test helper reads \`MOCK_SERVICES\`, clears stale mocks, and applies them before exercising the service. Provider contract tests hit the service under test directly; consumer contract tests use any inline mocks generated in the contract test itself.
396
381
 
397
382
  **On failure:**
398
383
  1. Read the error output to diagnose the root cause.
399
384
  2. "401 Unauthorized" → auth token missing or wrong. Do not hardcode a token into the test; pass the correct token through \`skyramp_execute_test.token\` or set \`SKYRAMP_TEST_TOKEN\` in the MCP execution environment, then retry once.
400
385
  3. "HTTP 500 / Internal Server Error" → the SUT is running but the API endpoint is not ready yet. This commonly happens with frameworks that compile routes lazily (Next.js, Vite) — the root page serves while new API routes added by the diff are still compiling. Do NOT immediately try a different test file — the same issue will affect all tests. Instead, wait 30 seconds, re-run the readiness gate against the API endpoint, and retry the SAME test. If HTTP 500 persists after 2 retries, check \`docker compose <composeFilePrefix> logs <sut-service>\` for startup errors.
401
- 4. "Connection refused" → Skyramp worker not running or network mismatch. Run \`docker compose <composeFilePrefix> ps\` to verify the worker and SUT are running. If a stale port-forward or unrelated process holds the port, kill it and retry.
386
+ 4. "Connection refused" → the SUT or the Skyramp worker does not answer on its published port on \`localhost\`. Verify that the skyramp worker and the system under test are running and publishing their ports before retrying.
402
387
  5. Syntax/import error → fix the test file and retry **once**.
403
388
  6. Mock deployment error / "failed to get containers in network" → the Docker network does not exist or docker-compose did not start correctly. Re-run \`docker compose <composeFilePrefix> up -d\` and check \`docker compose <composeFilePrefix> logs\` for containers that crashed on startup. Do NOT delete mock imports, empty \`MOCK_SERVICES\`, or switch selected mocked downstreams to live Compose stubs just to get a green test. If the retry still fails, record \`status: "Fail"\` or blocked with the exact mock deployment error.
404
389
  7. **Timeout / no response** → if \`skyramp_execute_test\` does not return within the tool's timeout window, record \`status: "Timeout"\` with the test file path and do not retry automatically. Report to the user: the test may still be running or the worker may be unresponsive. Do not infer pass or fail from a timeout.
@@ -1,4 +1,4 @@
1
1
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
2
  import { type Service } from "../../workspace/workspace.js";
3
- export declare function getLocalDevPrompt(baseCommit: string, repositoryPath: string, sandboxWorkerUrl?: string, maxRecommendations?: number, maxGenerate?: number, services?: Service[], stateOutputFile?: string, servicesToMock?: string[], realServices?: string[], mockProtocols?: string[], proxyKubeconfig?: string, proxyNamespace?: string): string;
3
+ export declare function getLocalDevPrompt(baseCommit: string, repositoryPath: string, repository: string, sandboxWorkerUrl?: string, maxRecommendations?: number, maxGenerate?: number, services?: Service[], stateOutputFile?: string, servicesToMock?: string[], realServices?: string[], mockProtocols?: string[], proxyKubeconfig?: string, proxyNamespace?: string): string;
4
4
  export declare function registerLocalDevPrompt(server: McpServer): void;
@@ -3,7 +3,9 @@ import * as path from "path";
3
3
  import { logger } from "../../utils/logger.js";
4
4
  import { AnalyticsService } from "../../services/AnalyticsService.js";
5
5
  import { buildServiceContext, escapeXml, readWorkspaceServices, } from "../prompt-utils.js";
6
- import { localDevPlan, GRPC_SERVICE_NAME_GUIDANCE, ASSERTION_API_GUIDANCE } from "./local-dev-plan.js";
6
+ import { localDevPlan, GRPC_SERVICE_NAME_GUIDANCE, ASSERTION_API_GUIDANCE, } from "./local-dev-plan.js";
7
+ import { tryRepositorySlug } from "../../utils/repositorySlug.js";
8
+ import { setPrimaryRepository } from "../../utils/AnalysisStateManager.js";
7
9
  const LOCAL_DEV_MAX_RECOMMENDATIONS = 8;
8
10
  const LOCAL_DEV_MAX_TESTS_TO_GENERATE = 5;
9
11
  /**
@@ -37,7 +39,7 @@ function buildServiceRoutingBlock(servicesToMock, realServices, mockProtocols) {
37
39
  lines.push("</SERVICE_ROUTING>");
38
40
  return lines.join("\n");
39
41
  }
40
- export function getLocalDevPrompt(baseCommit, repositoryPath, sandboxWorkerUrl, maxRecommendations = LOCAL_DEV_MAX_RECOMMENDATIONS, maxGenerate = LOCAL_DEV_MAX_TESTS_TO_GENERATE, services, stateOutputFile, servicesToMock, realServices, mockProtocols, proxyKubeconfig, proxyNamespace) {
42
+ export function getLocalDevPrompt(baseCommit, repositoryPath, repository, sandboxWorkerUrl, maxRecommendations = LOCAL_DEV_MAX_RECOMMENDATIONS, maxGenerate = LOCAL_DEV_MAX_TESTS_TO_GENERATE, services, stateOutputFile, servicesToMock, realServices, mockProtocols, proxyKubeconfig, proxyNamespace) {
41
43
  maxGenerate = Math.min(Math.max(maxGenerate, 0), maxRecommendations);
42
44
  const serviceContext = services?.length ? buildServiceContext(services) : "";
43
45
  // Proxy access lets the workflow query a running Skyramp worker proxy for real
@@ -85,7 +87,7 @@ ${sandboxWorkerBlock ? sandboxWorkerBlock + "\n" : ""}${serviceContext ? service
85
87
  - **Mock URL format** — the \`endpointURL\` in \`skyramp_mock_generation\` MUST use the original Docker service hostname (e.g., \`http://identity-service:4000\`, \`http://profile-service:50052\`). The Skyramp executor uses DNS alias hijacking — it takes over the service's DNS name on the Docker network so the service under test's requests are intercepted transparently. NEVER use \`localhost\`, \`127.0.0.1\`, \`0.0.0.0\`, \`host.docker.internal\`, or the worker address as the mock URL. For REST mocks, \`skyramp_preflight_mock_check\` returns blocking \`REST_LOOPBACK_URL\` when a deployable mock uses these hosts.
86
88
  - **REST mock routing** — Generated REST mock files may contain a fallback \`URL\` value such as \`http://localhost:8080\`; do not manually edit those files. The enrichment tool uses the mock generation \`# Command\` target to set each REST mock's \`mock.url\` back to the original Docker service origin before \`apply_mock()\`. If the command target is loopback, regenerate the mock with the original service hostname.
87
89
  - **gRPC mock routing** — gRPC mocks may target the real downstream service port (e.g., \`partner-accounts:50051\`). Apply gRPC mocks before the SUT starts or restart the SUT after applying them, and verify the Skyramp worker has the original endpoint host alias from \`endpointURL\` (\`partner-accounts\`, not the protobuf service name like \`PartnerAccountsService\`).
88
- - **Execution** — ALWAYS use \`skyramp_execute_test\` MCP tool to run tests. NEVER use direct language runtimes (\`python3\`, \`pytest\`, \`node\`, \`npx jest\`, etc.) or Skyramp CLI commands.
90
+ - **Execution** — prefer \`skyramp_execute_test\` over running the repository's test runner yourself: the server records the run, and a run it did not record cannot appear in the report. Give it the command for one test file.
89
91
  - **Generated test hardening** — before execution, make generated tests rerunnable and assertion-rich: use \`int(os.getenv("SKYRAMP_WORKER_PORT", "35142"))\` instead of a hardcoded worker port, keep auth token lookup environment-only (\`os.getenv("SKYRAMP_TEST_TOKEN")\`) with no literal fallback token in test source; pass the discovered token via \`skyramp_execute_test.token\` or the MCP server \`SKYRAMP_TEST_TOKEN\` environment before execution, use \`json.dumps({...})\` for JSON request bodies instead of f-string triple-quoted strings, use unique data for persistent DBs (UUID-suffixed emails/names), access \`ResponseV2\` via \`.status_code\` for status — ${ASSERTION_API_GUIDANCE}. Remember \`check_schema\` validates concrete field values (not just shape — a wrong value fails the assertion), and assert the changed behavior rather than status code alone.
90
92
  - **Outbound validation** — when a scenario's value depends on what the SUT sends to a downstream service, keeping that downstream real produces the most reliable test (see the Recommend Scenarios phase for details). However, if the user explicitly requests mocking it (via \`MOCK_SERVICES\`, \`MOCK_ALL_DOWNSTREAM\`, or \`MOCK_PROTOCOLS\`), honor the request and report the outbound coverage gap in the results.
91
93
  - **No hollow green tests** — unresolved placeholders (\`TODO\`, a standalone \`pass\` statement in a test body, \`NotImplemented\`, or "replace with real consumer code") and executable consumer-contract stubs that call only the mock are blocking defects. Skipped or strict xfail direct-mock reference stubs are allowed only when paired with a separate executable real consumer/SUT test. Implement the missing application/consumer call or report the scenario blocked; do not execute or report it as PASS.
@@ -101,6 +103,7 @@ ${sandboxWorkerBlock ? sandboxWorkerBlock + "\n" : ""}${serviceContext ? service
101
103
  // ── Render the plan phases ────────────────────────────────────────────────
102
104
  const ctx = {
103
105
  repositoryPath,
106
+ repository,
104
107
  baseCommit,
105
108
  maxRecommendations,
106
109
  maxGenerate,
@@ -167,13 +170,37 @@ export function registerLocalDevPrompt(server) {
167
170
  },
168
171
  }, async (args) => {
169
172
  const services = await readWorkspaceServices(args.repositoryPath);
173
+ // skyramp_analyze_changes and skyramp_execute_test both name their repository
174
+ // on every call. This is a local checkout, so read it off the origin remote.
175
+ const repository = await tryRepositorySlug(args.repositoryPath);
176
+ if (!repository) {
177
+ return {
178
+ messages: [
179
+ {
180
+ role: "user",
181
+ content: {
182
+ type: "text",
183
+ text: `Cannot read owner/repo from the origin remote of ${args.repositoryPath}. The Skyramp tools name the repository on every call, so add an origin remote to this checkout and retry.`,
184
+ },
185
+ },
186
+ ],
187
+ };
188
+ }
189
+ // Rendering the prompt is where this run declares its primary checkout, the
190
+ // same as the testbot entry point. Set, not set-if-unset: one server can
191
+ // render a second run for a different checkout, and keeping the first would
192
+ // route the second one as a related repository of it.
193
+ setPrimaryRepository({
194
+ repositoryPath: args.repositoryPath,
195
+ repo: repository,
196
+ });
170
197
  const parseCsv = (v) => v
171
198
  ? v
172
199
  .split(",")
173
200
  .map((s) => s.trim())
174
201
  .filter(Boolean)
175
202
  : undefined;
176
- const prompt = getLocalDevPrompt(args.baseCommit, args.repositoryPath, args.sandboxWorkerUrl, args.maxRecommendations, args.maxGenerate, services.length ? services : undefined, args.stateOutputFile, parseCsv(args.servicesToMock), parseCsv(args.realServices), parseCsv(args.mockProtocols), args.proxyKubeconfig, args.proxyNamespace);
203
+ const prompt = getLocalDevPrompt(args.baseCommit, args.repositoryPath, repository, args.sandboxWorkerUrl, args.maxRecommendations, args.maxGenerate, services.length ? services : undefined, args.stateOutputFile, parseCsv(args.servicesToMock), parseCsv(args.realServices), parseCsv(args.mockProtocols), args.proxyKubeconfig, args.proxyNamespace);
177
204
  AnalyticsService.pushMCPToolEvent("skyramp_local_dev_prompt", undefined, {}).catch(() => { });
178
205
  return {
179
206
  messages: [
@@ -49,13 +49,16 @@ expect(response1.status).toBe(200);
49
49
  const response2 = await fetch("/api/users/2");
50
50
  expect(response2.status).toBe(200);
51
51
 
52
- // Correct helper (EXACT copy + parameters${p.utilsReuse ? "; the expected status is a defaulted parameter per HELPER SHAPE" : ""}):
52
+ // Correct helper (EXACT copy + parameters${p.utilsReuse ? "; the expected status is a parameter with NO default per HELPER SHAPE — each call passes it, and the test body does not assert it again" : ""}):
53
53
  ${p.utilsReuse
54
- ? `async function getUser(userId: number, expectedStatus = 200) {
54
+ ? `async function getUser(userId: number, expectedStatus: number) {
55
55
  const response = await fetch(\`/api/users/\${userId}\`);
56
56
  expect(response.status).toBe(expectedStatus);
57
57
  return response;
58
- }`
58
+ }
59
+ // Call sites: the status each one expects, stated once, here.
60
+ const response1 = await getUser(1, 200);
61
+ const response2 = await getUser(2, 200);`
59
62
  : `async function getUser(userId: number) {
60
63
  const response = await fetch(\`/api/users/\${userId}\`);
61
64
  expect(response.status).toBe(200);
@@ -101,12 +104,16 @@ If ANY answer is "no", DO NOT submit - fix the modularization first.`)
101
104
  function sharedHelperShape(p) {
102
105
  return `**HELPER SHAPE (one helper per request step from Step ${_plan.labels.IDENTIFY}):**
103
106
  - ${API_HELPERS.namingRule}
104
- - **PARAMETERS**: pass in the client/session object, plus every value the step reads from a previous step's response (IDs used in paths or bodies), plus every body value this scenario varies or its assertions reference (names, prices, quantities, percentages). Values that never vary and that no assertion reads may stay hardcoded — do not invent parameters nothing passes differently.
105
- - **SCENARIO VALUES GO THROUGH \`data_override\`, NOT THE BODY STRING**: apply each parameterized body value via the request's \`data_override\` map (that is what it is for) and leave the raw body string as generated. A scenario literal edited into the body string makes this helper unmergeable with the same step from another test.
107
+ - **PARAMETERS**: pass in the client/session object, plus every value the step reads from a previous step's response (IDs used in paths or bodies), plus every body value this scenario varies or its assertions reference (names, prices, quantities, percentages). Values that never vary and that no assertion reads may stay hardcoded — do not invent parameters nothing passes differently. The body is the one exception: it is reachable from the signature whether or not this scenario varies it (see the body rule below).
108
+ - **SCENARIO VALUES GO THROUGH \`data_override\`, NOT THE BODY STRING**: apply each parameterized body value via the request's \`data_override\` map (that is what it is for) and leave the raw body string as generated. A scenario literal edited into the body string makes this helper unmergeable with the same step from another test. The generated body is this helper's STARTING POINT, not a fixed value — the body rule below says what must be able to change about it.
106
109
  - **RETURN** the response object so later steps can chain and assert from it.
107
110
  - ${API_HELPERS.assertionRule} ${ASSERTION_BOUNDARY_RULE_EXTRACT}
108
111
  - Helpers are module-level named functions in ${p.filePath}; the test body becomes a sequence of helper calls plus this scenario's assertions, in the original order.
109
- - Keep everything else EXACTLY the same.`;
112
+ - Keep everything else EXACTLY the same.
113
+
114
+ ${API_HELPERS.bodyShapeRule}
115
+
116
+ ${API_HELPERS.optionsShapeRule}`;
110
117
  }
111
118
  function repetitionParameterRules() {
112
119
  return `**PARAMETER CONVERSION RULES:**
@@ -138,7 +138,7 @@ await addItem(page, "item3");
138
138
  \`\`\``)
139
139
  .step("USE", "CALL HELPERS WITH EXACT SAME VALUES", () => `Use the EXACT same values from the original test when calling helpers.`)
140
140
  .step("VERIFY", "VERIFY - CRITICAL CHECKS", (p) => `**BUGS TO AVOID:**
141
- - [ ] **EVERY PARAMETER IS TYPED (TypeScript)** - \`page: Page\` with \`import type { Page } from '@playwright/test'\` once at the top of the file; other parameters by their value type (\`name: string\`, \`quantity: number\`). An untyped parameter fails a repo that type-checks its tests under \`noImplicitAny\`. JavaScript files carry no annotations.
141
+ - [ ] **EVERY PARAMETER IS TYPED (TypeScript)** - \`page: Page\` with \`import type { Page } from '@playwright/test'\` once at the top of the file; other parameters by their value type (\`name: string\`, \`quantity: number\`). An untyped parameter fails a repo that type-checks its tests under \`noImplicitAny\`; a parameter typed \`unknown\` fails at its first use under every setting, and \`any\` checks nothing — use the real type. JavaScript files carry no annotations.
142
142
  - [ ] **Return types are optional** - inferred returns are fine under strict mode; if you write one, it is the real type, never \`any\`
143
143
  - [ ] **ALL field mappings verified** - EVERY \`.fill()\` uses the correct parameter. Check field gets quantity parameter, NOT hardcoded
144
144
  - [ ] **No duplicate helpers** - Consolidate similar helpers (e.g., one createOrder vs createSimpleOrder + createOrderWithItems)
@@ -20,5 +20,5 @@ export const SKYRAMP_QA_PERSONA = `You are acting as a Skyramp QA Automation Eng
20
20
  * avoid duplicating it in every tool description.
21
21
  */
22
22
  export function getPersonaPrefix() {
23
- return isTestbotEnabled() ? '' : `${SKYRAMP_QA_PERSONA}\n\n`;
23
+ return isTestbotEnabled() ? "" : `${SKYRAMP_QA_PERSONA}\n\n`;
24
24
  }
@@ -1,12 +1,16 @@
1
1
  import { generateSkyrampHeader, SKYRAMP_UTILS_HEADER } from "../utils/utils.js";
2
2
  import { resolvePomCatalogPath } from "../utils/pom-catalog.js";
3
+ import { UTILS_LANGUAGE_SPECS } from "../utils/utils-verify/language-spec.js";
4
+ import { SELECTOR_OWNING_MODULE_RULE } from "./shared-helper-policy.js";
3
5
  export function getPomAwareCodeReusePrompt(testFile, language = "typescript", scopedPoms) {
4
6
  // Resolved here, not left to the agent: the catalog only survives to the next
5
7
  // run if it lands where delivery stages it (SKYR-4141).
6
8
  const catalogPath = resolvePomCatalogPath(testFile);
7
9
  const isJs = language.toLowerCase() === "javascript";
8
10
  const ext = isJs ? "js" : "ts";
9
- const utilsFile = isJs ? "skyrampUtils.js" : "skyrampUtils.ts";
11
+ // Same one declaration the standard path reads, so the two prompts and the verify
12
+ // pass cannot name three different files.
13
+ const utilsFile = UTILS_LANGUAGE_SPECS[isJs ? "javascript" : "typescript"].fileName;
10
14
  const codegenMarker = "// Generated by Skyramp v";
11
15
  const headerLang = isJs ? "javascript" : "typescript";
12
16
  const scopedActive = scopedPoms && scopedPoms.tier1.length + scopedPoms.tier2.length > 0;
@@ -44,13 +48,7 @@ Use the Glob tool to search for POM files starting from the directory containing
44
48
  - Pattern 7: \`**/{test,tests,e2e,playwright}/**/{lib,utils,helpers,support}/**/*.{ts,js}\`
45
49
  - Pattern 8: \`**/{testUtils,test-utils,testHelpers,test-helpers}.{ts,js}\`
46
50
 
47
- **A reuse target does not have to be a class.** Patterns 7–8 catch selector-owning helper
48
- libraries — modules exporting free functions like \`bookFirstEvent(page)\` whose bodies contain
49
- the selector literals. A helper module qualifies only if its functions OWN selectors; a module
50
- whose functions take selectors as parameters (generic interaction utilities) owns nothing and is
51
- not a reuse target. Playwright fixture factories wired into the repo's own \`test\` object
52
- (\`test.extend\`-style) are NOT substitutable either — using them requires replacing the Skyramp
53
- runtime imports, which rule 3a forbids.
51
+ ${SELECTOR_OWNING_MODULE_RULE} (See rule 3a below.) Patterns 7–8 are what catch such libraries.
54
52
 
55
53
  Exclude test/spec files by **basename only** — never match on the directory path. POM layers commonly live under a \`tests/\` directory (e.g. \`tests/ui-testing/pages/\`), and path-matching would wrongly drop every POM. A file is excluded only if its **basename** ends in \`.spec.ts\`, \`.spec.js\`, \`.test.ts\`, or \`.test.js\`. Do NOT exclude on the bare substrings \`test\` or \`spec\`: they falsely match legitimate POMs (e.g. \`searchJobInspectorPage.js\` contains "spec") and directory names (\`tests/\`).
56
54
  Also exclude \`node_modules\`.
@@ -559,7 +557,7 @@ For each helper defined locally in ${testFile}:
559
557
 
560
558
  - **Conservative bias**: a wrong merge breaks both tests; a missed merge leaves a duplicate. When in doubt, do NOT merge.
561
559
  - **No "cleanup"**: the merged body must mirror the original primitive sequence — same waits, same correlation patterns, same order. This is not refactoring.
562
- - **Typed parameters (TypeScript)**: the merged helper types every parameter (\`page: Page\`, values by their type); add \`import type { Page } from '@playwright/test'\` if the file lacks it. Never \`page: any\` or an untyped \`page\`.
560
+ - **Typed parameters (TypeScript)**: the merged helper types every parameter (\`page: Page\`, values by their type); add \`import type { Page } from '@playwright/test'\` if the file lacks it. Never \`page: any\`, \`page: unknown\`, or an untyped \`page\`.
563
561
  - **Don't merge with helpers already in \`${utilsFile}\`**: those are STEP 3's territory. STEP 4b is strictly cross-test merge between sibling Skyramp-generated test files.
564
562
 
565
563
  ---
@@ -0,0 +1,64 @@
1
+ import { TestType } from "../types/TestTypes.js";
2
+ import { type UtilsLanguage } from "../utils/utils-verify/index.js";
3
+ /**
4
+ * The generation-call clause that asks for codeReuse, language-conditional in
5
+ * words, as the testbot prompt appends it to its integration generation step
6
+ * when utils reuse is on.
7
+ *
8
+ * States the RULE, not one exception. Naming Java as the only language left out
9
+ * is false — code reuse covers three languages and discovery records seventeen —
10
+ * and an agent in a Go repository reads "unset for Java", concludes Go is not
11
+ * excepted, and asks for a reuse pass that can move no helpers for Go.
12
+ */
13
+ export declare const CODE_REUSE_GENERATION_CLAUSE: string;
14
+ /**
15
+ * Whether the maintenance step can actually rewrite a test of this type. Its
16
+ * REGENERATE strategy names the integration and contract generators only and
17
+ * forbids skyramp_ui_test_generation, which needs a recorded trace this tool does
18
+ * not have. A browser test's REGENERATE is therefore advice to the developer: no
19
+ * call here rewrites the file, so nothing may be armed against it — a hand-off
20
+ * would refuse the execution of a file the plan never told anyone to rewrite.
21
+ */
22
+ export declare function isMaintenanceRegenerable(testType: TestType): boolean;
23
+ /**
24
+ * What the regenerate instruction asks of the generation call, as words for the
25
+ * summary (`clause`) and as the arguments the structured plan carries (`args`),
26
+ * from one decision. Undefined when the call must not ask for code reuse: utils
27
+ * reuse off, or a test type that is not a modularize-first target — contract, for
28
+ * one, whose generator accepts neither `codeReuse` nor `modularizeCode`. For a
29
+ * modularize-first type: the resolved clause and arguments for a language with a
30
+ * utils spec; the leave-unset clause and no arguments for Java; the generic clause
31
+ * and no arguments when the language is not cataloged.
32
+ */
33
+ export declare function regenerateCodeReuse(testType: TestType,
34
+ /** Optional because the discovery catalog does not always carry one: an
35
+ * uncataloged but real test file is accepted deliberately, and its language is
36
+ * unknown. The clause is omitted in that case. */
37
+ language: string | undefined): {
38
+ clause: string;
39
+ args?: {
40
+ codeReuse: true;
41
+ modularizeCode: false;
42
+ };
43
+ } | undefined;
44
+ /**
45
+ * Whether a test of this type and language owes the modularize → reuse pair.
46
+ * Routing (isModularizeFirstTarget) says which flows modularize first; the utils
47
+ * spec says which languages have a payable reuse half — recordReuseHandOff writes
48
+ * nothing for a language without one (Java), so instructing the pair there would
49
+ * be a debt nothing tracks.
50
+ */
51
+ export declare function isModularizeFirstHandOffTarget(testType: TestType,
52
+ /** Optional because generation's own `language` param is: the predicate is the
53
+ * thing that decides an absent or unsupported language owes nothing. */
54
+ language: string | undefined): language is UtilsLanguage;
55
+ /** The argument clause of the skyramp_reuse_code call the agent is told to make. */
56
+ export declare function reuseCodeArgsClause(language: string | undefined, testType: TestType, framework: string): string;
57
+ export declare function buildModularizeFirstNextSteps(params: {
58
+ testType: TestType;
59
+ /** Narrowed by isModularizeFirstHandOffTarget, which both callers apply
60
+ * first: a language with no utils spec never reaches these steps. */
61
+ language: UtilsLanguage;
62
+ framework: string;
63
+ enhanceFirst: boolean;
64
+ }): string;
@@ -0,0 +1,130 @@
1
+ /**
2
+ * The modularize → reuse hand-off, shared by the two places that arm the chain:
3
+ * generation (TestGenerationService, for the files a codeReuse call wrote) and
4
+ * maintenance (skyramp_actions, for a test it updates or regenerates). One
5
+ * predicate decides whether a file owes the pair, and one builder produces the
6
+ * next-steps text, so the two callers cannot drift on either.
7
+ */
8
+ import { isUtilsReuseEnabled } from "../utils/featureFlags.js";
9
+ import { fillPlaceholders } from "../recommendation/verifierContracts.js";
10
+ import { readPromptAsset, sectionBody } from "./promptAssets.js";
11
+ import { isBrowserTestType, isModularizeFirstTarget, } from "../utils/reuseRouting.js";
12
+ import { utilsSpecFor, } from "../utils/utils-verify/index.js";
13
+ import { enhanceAssertionsCall } from "../skills/enhanceAssertionsSkill.js";
14
+ /** Why Java generation never asks for codeReuse. */
15
+ const CODE_REUSE_JAVA_REASON = "cross-file helpers do not compile in the test executor";
16
+ /** Why every other unsupported language is left out. Java has its own reason
17
+ * above; a language the shared-helper verifier does not cover is left out
18
+ * because nothing can check the module it would write. Naming Java's reason for
19
+ * a Go or Ruby test would be a false statement about that file. */
20
+ function codeReuseUnverifiableReason(language) {
21
+ return `the shared-helper verifier has no rules for ${language}`;
22
+ }
23
+ /**
24
+ * The generation-call clause that asks for codeReuse, language-conditional in
25
+ * words, as the testbot prompt appends it to its integration generation step
26
+ * when utils reuse is on.
27
+ *
28
+ * States the RULE, not one exception. Naming Java as the only language left out
29
+ * is false — code reuse covers three languages and discovery records seventeen —
30
+ * and an agent in a Go repository reads "unset for Java", concludes Go is not
31
+ * excepted, and asks for a reuse pass that can move no helpers for Go.
32
+ */
33
+ export const CODE_REUSE_GENERATION_CLAUSE = `, setting \`modularizeCode: false\` and \`codeReuse: true\` for TypeScript, JavaScript and Python, and leaving \`codeReuse\` unset for any other language (for Java, ${CODE_REUSE_JAVA_REASON}; for the rest, ${codeReuseUnverifiableReason("them")})`;
34
+ /**
35
+ * Whether the maintenance step can actually rewrite a test of this type. Its
36
+ * REGENERATE strategy names the integration and contract generators only and
37
+ * forbids skyramp_ui_test_generation, which needs a recorded trace this tool does
38
+ * not have. A browser test's REGENERATE is therefore advice to the developer: no
39
+ * call here rewrites the file, so nothing may be armed against it — a hand-off
40
+ * would refuse the execution of a file the plan never told anyone to rewrite.
41
+ */
42
+ export function isMaintenanceRegenerable(testType) {
43
+ return !isBrowserTestType(testType);
44
+ }
45
+ /**
46
+ * What the regenerate instruction asks of the generation call, as words for the
47
+ * summary (`clause`) and as the arguments the structured plan carries (`args`),
48
+ * from one decision. Undefined when the call must not ask for code reuse: utils
49
+ * reuse off, or a test type that is not a modularize-first target — contract, for
50
+ * one, whose generator accepts neither `codeReuse` nor `modularizeCode`. For a
51
+ * modularize-first type: the resolved clause and arguments for a language with a
52
+ * utils spec; the leave-unset clause and no arguments for Java; the generic clause
53
+ * and no arguments when the language is not cataloged.
54
+ */
55
+ export function regenerateCodeReuse(testType,
56
+ /** Optional because the discovery catalog does not always carry one: an
57
+ * uncataloged but real test file is accepted deliberately, and its language is
58
+ * unknown. The clause is omitted in that case. */
59
+ language) {
60
+ if (!isUtilsReuseEnabled())
61
+ return undefined;
62
+ if (!isMaintenanceRegenerable(testType))
63
+ return undefined;
64
+ if (!isModularizeFirstTarget(testType, language))
65
+ return undefined;
66
+ // No cataloged language: nothing records a hand-off for the file and no
67
+ // arguments are emitted for it, so a clause asking the agent to set
68
+ // codeReuse: true would ask for a call the structured plan does not — the very
69
+ // split that carrying the options on the entry closed. Say nothing instead.
70
+ if (!language)
71
+ return undefined;
72
+ return utilsSpecFor(language)
73
+ ? {
74
+ clause: ", setting `modularizeCode: false` and `codeReuse: true`",
75
+ args: { codeReuse: true, modularizeCode: false },
76
+ }
77
+ : {
78
+ clause: `, and leave \`codeReuse\` unset (${language.toLowerCase() === "java" ? CODE_REUSE_JAVA_REASON : codeReuseUnverifiableReason(language)}),`,
79
+ };
80
+ }
81
+ /**
82
+ * Whether a test of this type and language owes the modularize → reuse pair.
83
+ * Routing (isModularizeFirstTarget) says which flows modularize first; the utils
84
+ * spec says which languages have a payable reuse half — recordReuseHandOff writes
85
+ * nothing for a language without one (Java), so instructing the pair there would
86
+ * be a debt nothing tracks.
87
+ */
88
+ export function isModularizeFirstHandOffTarget(testType,
89
+ /** Optional because generation's own `language` param is: the predicate is the
90
+ * thing that decides an absent or unsupported language owes nothing. */
91
+ language) {
92
+ return (isModularizeFirstTarget(testType, language) && !!utilsSpecFor(language));
93
+ }
94
+ /** The argument clause of the skyramp_reuse_code call the agent is told to make. */
95
+ export function reuseCodeArgsClause(language, testType, framework) {
96
+ return `\`testFile\` set to the absolute path of the generated test file, \`language: "${language}"\`, \`testType: "${testType}"\`${framework ? `, and \`framework: "${framework}"\`` : ""}`;
97
+ }
98
+ /**
99
+ * The CRITICAL NEXT STEPS block: modularize, then reuse (whose returned steps end
100
+ * in the verify call). `enhanceFirst` prepends the assertion enhancer — browser
101
+ * tests generated with enhanceAssertions run it on the raw file, before the
102
+ * selectors move into the utils file. Maintenance never sets it: the update
103
+ * strategy calls the enhancer after the edit, and the block says the pair runs
104
+ * before it.
105
+ */
106
+ const HAND_OFF_MD = readPromptAsset("code-reuse/hand-off.md");
107
+ /** One section of the hand-off markdown, by heading, with its placeholders
108
+ * filled. The markdown is the single source of this instruction text. */
109
+ function handOffStep(heading, values) {
110
+ return fillPlaceholders(sectionBody(HAND_OFF_MD, `## ${heading}`), values);
111
+ }
112
+ export function buildModularizeFirstNextSteps(params) {
113
+ const { testType, language, framework, enhanceFirst } = params;
114
+ const enhanceCall = enhanceAssertionsCall(testType, "generated test file");
115
+ const values = {
116
+ testType,
117
+ reuseArgs: reuseCodeArgsClause(language, testType, framework),
118
+ enhanceCall: enhanceCall.charAt(0).toUpperCase() + enhanceCall.slice(1),
119
+ };
120
+ const steps = [
121
+ ...(enhanceFirst ? [handOffStep("Enhance first", values)] : []),
122
+ handOffStep("Modularize", values),
123
+ handOffStep("Reuse", values),
124
+ ];
125
+ const ordering = handOffStep(enhanceFirst
126
+ ? "Ordering with the enhancer"
127
+ : "Ordering without the enhancer", values);
128
+ return `⏭️**CRITICAL NEXT STEPS — ${ordering}**:
129
+ ${steps.map((text, i) => `${String.fromCharCode(97 + i)}. ${text}`).join("\n")}`;
130
+ }
@@ -1,6 +1,70 @@
1
+ /**
2
+ * Where a test states the status it expects: ONCE, as the argument of the helper
3
+ * call. The helper asserts it (that is the shared invariant), so the policy has to
4
+ * say what the spec contains after that — left unsaid, the agent left the status
5
+ * behind a defaulted parameter the call omitted, or asserted it a second time on the
6
+ * response the helper returned. Quoted by the prompt and by the two verify findings
7
+ * (`status-default`, `status-restated`) that enforce it, so the sentence the agent
8
+ * reads is the sentence the gate returns.
9
+ */
10
+ export declare const STATUS_ONCE_RULE: {
11
+ /** Written as the ACTION to take and the helpers it applies to. A first version
12
+ * said the parameter "carries NO default" in the present tense; quoted beside a
13
+ * finding that showed `expected_status=201`, it read as a description that was
14
+ * false about the very line it quoted, and the advisory was acted on 0 of 9 times. */
15
+ readonly noDefault: "Give every helper THIS RUN WRITES its expected status as a required parameter: no default value, not optional. A call site that can omit the status hides the expectation, so every call site passes the status it expects. A helper that already exists at HEAD keeps the signature it has, default included — never remove an incumbent's default, since callers this run cannot see rely on it; a call site this run writes still passes the status explicitly, whether or not the helper would default it. A helper whose status NEVER varies may assert the literal instead of taking a parameter at all: what this rule forbids is a DEFAULT, which lets a call site silently inherit an expectation it never stated, and a pinned literal no caller can vary hides nothing. Give it a parameter the moment a second call site needs a different status. Declare the expected-status parameter BEFORE any parameter that carries a default: Python refuses `def create_product(client, headers, body=DEFAULT_BODY, expected_status)` with `SyntaxError: non-default argument follows default argument`, and a module that does not import takes every test in the file with it at collection.";
16
+ readonly notRestated: "the test body does not assert the status again on the response the helper returns — the helper asserted it, and the call's status argument is the one statement of it";
17
+ };
1
18
  /** Why the assertion rule exists — quoted wherever the rule is stated. */
2
19
  export declare const SHARED_HELPER_WHY = "A scenario-specific assertion inside a helper carries one scenario's data into a shared function and fails the next scenario that calls it \u2014 the helper is shared, the claims are not.";
3
- export declare const BROWSER_STRUCTURAL_WAITS = "`waitForResponse`, `waitForLoadState`, `waitFor({ state: \"visible\" })`, and `toBeVisible` on a STRUCTURAL locator (a test id, or a role + name of a control) \u2014 a check that an element rendered, not what it says";
20
+ /**
21
+ * What a shared helper of one family may assert — the ONE declaration.
22
+ *
23
+ * Every statement of the rule is rendered from here: the prompt sentence the agent
24
+ * reads, the per-language predicate the verify pass runs, and the violation message
25
+ * the gate returns. They disagreed before — the prompt permitted one matcher, the
26
+ * gate accepted eight, and the message repeated the gate's reading — so a value
27
+ * assertion could sit in a delivered helper, pass the gate and reach the customer
28
+ * with nothing reported. Widening or narrowing a family is an edit to one array.
29
+ *
30
+ * The api family's permitted assertion is not a matcher list (it is a status-code
31
+ * comparison whose RECEIVER decides: `expect(res.status)` yes, `expect(res.body.status)`
32
+ * no), so `permittedMatchers` is empty for it and its predicate stays hand-written.
33
+ * Stating its list here is what SKYR-4318 does; it edits this table, and the gate
34
+ * reads the table, so no second mechanism is needed for it.
35
+ */
36
+ export interface HelperAssertionPolicy {
37
+ /** Matcher names permitted inside a shared helper, in the camelCase spelling.
38
+ * Empty when the family's rule is not expressible as a matcher list. */
39
+ permittedMatchers: readonly string[];
40
+ /** Matchers the family refuses. Named rather than implied: the boundary reads as
41
+ * a rule the agent can apply, not as a list it must invert. */
42
+ refusedMatchers: readonly string[];
43
+ /** The sentence that states the boundary, quoted VERBATIM by the prompt and by the
44
+ * gate's violation message. One string, so a reader who follows the message and a
45
+ * reader who follows the prompt are told the same thing. */
46
+ boundary: string;
47
+ }
48
+ /**
49
+ * ARIA roles whose accessible name is the page's own CONTENT rather than a control's
50
+ * label. A locator built from one of these plus a name selects by what the page SAYS,
51
+ * which is the scenario's data: `getByRole("heading", { name: "Your cart is empty!" })`
52
+ * is the scenario's outcome wearing a structural locator.
53
+ *
54
+ * A DENY-list, not an allow-list. The rule blocks a customer's run, so a role nobody
55
+ * has listed has to pass — an allow-list refused `getByRole("dialog", { name })`, which
56
+ * is an ordinary wait for a named modal and is permitted everywhere else.
57
+ */
58
+ export declare const CONTENT_ROLES: readonly ["heading", "paragraph", "cell", "gridcell", "columnheader", "rowheader", "row", "listitem", "definition", "term", "img", "figure", "article", "note", "tooltip", "alert", "log", "marquee", "timer", "blockquote", "caption", "option", "menuitem", "menuitemcheckbox", "menuitemradio", "treeitem"];
59
+ /** Spoken once, quoted everywhere. */
60
+ export declare const BROWSER_ASSERTION_BOUNDARY: string;
61
+ export declare const HELPER_ASSERTION_POLICIES: Record<"api" | "browser", HelperAssertionPolicy>;
62
+ /** The WAIT FORMS a shared browser helper may use. It deliberately stops short of
63
+ * what a structural locator is: the boundary states that, once, and this clause is
64
+ * rendered beside it. A second summary of the locator rule was a second rule to keep
65
+ * equal, and it fell behind the boundary the first time the boundary gained an
66
+ * exception. */
67
+ export declare const BROWSER_STRUCTURAL_WAITS: string;
4
68
  /**
5
69
  * Relocation never reorders execution. Two variants, because the two ends of the
6
70
  * chain may do different things with a helper whose value assertion sits BETWEEN
@@ -9,7 +73,13 @@ export declare const BROWSER_STRUCTURAL_WAITS = "`waitForResponse`, `waitForLoad
9
73
  */
10
74
  export declare const ASSERTION_BOUNDARY_RULE_EXTRACT = "Relocation must preserve the original order: an assertion that sits BETWEEN two actions is a HELPER BOUNDARY \u2014 end the helper before it and start the next helper after it (each named per the naming rule), so the assertion sits between the two calls in the test body exactly where it was. Never move an assertion across an action.";
11
75
  export declare const ASSERTION_BOUNDARY_RULE_MOVE = "Relocation must preserve the original order: only a TRAILING assertion (after the helper's last action) may move to the test body right after the call. A helper whose excluded assertion sits BETWEEN two actions is NOT moved and NOT split \u2014 leave it local in the test file; splitting is modularization's job, not this step's.";
12
- export declare const BROWSER_VALUE_ASSERTIONS = "any `expect` whose matcher OR locator carries scenario data: `toHaveText`, `toContainText`, `toHaveValue`, `toHaveCount`, `toHaveURL` with a literal, or ANY matcher \u2014 `toBeVisible` included \u2014 on a locator that embeds scenario text such as `getByText(\"Total: $899.98\")`";
76
+ export declare const BROWSER_VALUE_ASSERTIONS: string;
77
+ /**
78
+ * What qualifies as a browser reuse target — stated once, read by the page-object
79
+ * prompt and by the in-house search on the shared-module path, so the two cannot
80
+ * disagree about which of the customer's modules the run may call.
81
+ */
82
+ export declare const SELECTOR_OWNING_MODULE_RULE = "**A reuse target does not have to be a class.** Selector-owning helper libraries qualify \u2014 modules exporting free functions like `bookFirstEvent(page)` whose bodies contain the selector literals. A helper module qualifies only if its functions OWN selectors; a module whose functions take selectors as parameters (generic interaction utilities) owns nothing and is not a reuse target. Playwright fixture factories wired into the repo's own `test` object (`test.extend`-style) are NOT substitutable either \u2014 using them requires replacing the Skyramp runtime imports, which is forbidden.";
13
83
  /**
14
84
  * A helper kept local must never share a name with a utils export — the import
15
85
  * and the local definition would then describe two different behaviours under
@@ -43,8 +113,60 @@ export interface HelperPolicy {
43
113
  namingExample: string;
44
114
  /** "One X = one helper" closing line for a utils file. */
45
115
  oneHelperRule: (fileName: string) => string;
116
+ /**
117
+ * What may carry a difference in WHAT THE STEP SENDS between two call sites of
118
+ * one operation — the request body for API helpers; for browser helpers, why
119
+ * the question does not arise. Stated once here because both ends of the
120
+ * modularize -> reuse chain decide it: modularization shapes the helper, reuse
121
+ * merges a second caller into it, and a helper shaped so it cannot carry the
122
+ * second caller sends that caller off to write its own copy.
123
+ */
124
+ bodyShapeRule: string;
125
+ /**
126
+ * How the request's options object is built in a language that types it — one
127
+ * literal at the call, optional fields inline. Empty when the kind issues no
128
+ * request (browser helpers). Rendered beside `bodyShapeRule` at both ends of
129
+ * the chain for the same reason it is.
130
+ */
131
+ optionsShapeRule: string;
46
132
  /** Kind-specific near-duplicate / merge section for STEP 4b of code reuse. */
47
133
  nearDupRules: (fileName: string) => string;
134
+ /**
135
+ * An inline copy of a step is a CALL SITE for the helper that already performs
136
+ * it, never a helper to author — stated in the kind's own terms (a request block
137
+ * against a route; an action sequence against an action key) and rendered where
138
+ * the reuse pass meets inline code: the current test (STEP 3) and the sibling
139
+ * pass (STEP 5c). Without it the pass moved helpers and left every inline copy
140
+ * where it was, naming the copy in its own report (measured three cohorts
141
+ * running on the browser side).
142
+ */
143
+ inlineCallSiteRule: string;
144
+ /** The words the reuse prompt needs to state that rule's steps without branching
145
+ * on the kind: what an inline copy is called and how STEP 5c finds, replaces and
146
+ * follows up one. */
147
+ inlineSite: {
148
+ /** Singular, lower case: `inline request block` / `inline action sequence`. */
149
+ noun: string;
150
+ /** Plural, sentence case, for a sentence or heading start. */
151
+ nouns: string;
152
+ /** The one-word unit a step refers back to: `block` / `sequence`. */
153
+ unit: string;
154
+ /** What STEP 3 says the rule applies to in the current test. */
155
+ stepNoun: string;
156
+ /** STEP 3's heading clause for a kind whose helpers may be extended in place;
157
+ * empty when the merge rule beside it already says so. */
158
+ extendClause: string;
159
+ /** STEP 5c's match criterion for a sibling's copy. */
160
+ match: (fileName: string) => string;
161
+ /** What STEP 5c replaces a copy with, for its heading. */
162
+ target: (fileName: string) => string;
163
+ /** What happens to a literal the matched helper does not take. */
164
+ lift: (fileName: string) => string;
165
+ /** What the replacement leaves verbatim in the sibling. */
166
+ keeps: string;
167
+ /** Steps STEP 5c adds after the replacement; empty when none. */
168
+ afterSteps: string;
169
+ };
48
170
  /**
49
171
  * Replacement for the generic STEP 4b worked example when helpers are headed
50
172
  * to the shared file. Empty string → no example beyond the kind's own section.