@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
@@ -1,6 +1,8 @@
1
1
  import * as path from "path";
2
2
  import { allowMarkerLine, describeAssertionCount, MARKERABLE_UTILS_KINDS, HELPER_FAMILIES, } from "../../utils/utils-verify/index.js";
3
+ import { describeActionKey } from "../../utils/utils-verify/action-key.js";
3
4
  import { utilsFileLabel } from "./reuse-state.js";
5
+ import { STATUS_ONCE_RULE } from "../../prompts/shared-helper-policy.js";
4
6
  /** How many verify rounds the agent may spend before it must document what remains.
5
7
  * SKYR-4059: an unbounded repair loop made six execution attempts against a cap of
6
8
  * two and destroyed verified reuse in between. The bound is stated in the text the
@@ -19,74 +21,173 @@ export function formatUtilsVerifyText(r, ctx = {}) {
19
21
  const tail = verdictTail(ctx) +
20
22
  unstagedTail(r, ctx) +
21
23
  namingAdvisory(r) +
22
- typingAdvisory(r);
24
+ unresolvedImportsNote(r) +
25
+ statusDefaultAdvisory(r) +
26
+ typingAdvisory(r) +
27
+ typecheckAdvisory(r) +
28
+ moduleNameAdvisory(r) +
29
+ duplicateBodyReachAdvisory(r);
23
30
  const spec = r.spec;
24
- if (r.utilsFiles.length === 0 && r.violations.length === 0) {
25
- return ("VERIFICATION PASSED — no shared utils file is written or imported for this test; nothing to verify. " +
26
- "(If you did create one, it carries no `Generated by Skyramp on …` header line, so it cannot be recognised or staged — add the header and re-verify.)" +
31
+ if (r.utilsFiles.length === 0 && r.violations.length === 0 && !r.inHouse) {
32
+ // Two states, stated apart: the spec imports no sibling module, or it imports
33
+ // modules this pass read and does not check. "Nothing to verify" is only ever
34
+ // the first. (A module the pass could not recognise is a FAILED, below.)
35
+ const unchecked = r.uncheckedModules ?? [];
36
+ return ((unchecked.length > 0
37
+ ? `VERIFICATION PASSED — no Skyramp utils file; this test imports ${unchecked.length} module${unchecked.length === 1 ? "" : "s"} the pass read and does not check: ${unchecked
38
+ .map((f) => path.basename(f))
39
+ .join(", ")} — the repository's own, tracked without a Skyramp header. The in-house resolve and additive checks did not run: ${r.inHouseChecksSkipped ?? "they run for a UI test with page-object reuse off"}. Continue.`
40
+ : "VERIFICATION PASSED — no shared utils file is written or imported for this test; nothing to verify.") +
27
41
  tail +
28
42
  unextractedDuplicatesAdvisory(r));
29
43
  }
30
44
  const files = r.utilsFiles.map((f) => show(f, r)).join(", ");
45
+ if (r.ok && r.utilsFiles.length === 0) {
46
+ // In-house modules only: the spec calls the repository's own helpers and no
47
+ // Skyramp module. That is the outcome the extension exists for, not "nothing
48
+ // to verify".
49
+ return (`VERIFICATION PASSED — no Skyramp utils file; ${inHouseSummary(r)}` +
50
+ `${assertionCountNote(r)} Continue.` +
51
+ tail +
52
+ inHouseAdvisories(r));
53
+ }
31
54
  if (r.ok) {
32
55
  const allowed = r.allowed.length > 0
33
56
  ? ` ${r.allowed.length} documented decline${r.allowed.length === 1 ? "" : "s"}.`
34
57
  : "";
35
58
  return (`VERIFICATION PASSED — ${files}: ${r.helpers} helper${r.helpers === 1 ? "" : "s"}, ${r.imported} imported by this test.${allowed}` +
36
- `${assertionCountNote(r)} ` +
37
- `${ctx.staged && ctx.staged.length > 0 ? "The utils file is staged for the output commit. " : ""}Continue.` +
59
+ `${assertionCountNote(r)}${r.inHouse ? ` ${inHouseSummary(r)}` : ""}` +
60
+ `${ctx.staged && ctx.staged.length > 0 ? " The utils file is staged for the output commit." : ""} Continue.` +
38
61
  tail +
39
62
  inlineCallSitesAdvisory(r) +
40
63
  unextractedDuplicatesAdvisory(r) +
41
64
  duplicateActionAdvisory(r) +
65
+ fixedSleepAdvisory(r) +
66
+ inHouseAdvisories(r) +
42
67
  singleImporterAdvisory(r));
43
68
  }
44
69
  const lines = [];
45
70
  if (r.violations.length > 0) {
46
- lines.push(`VERIFICATION FAILED — the shared utils file violates ${r.violations.length} invariant${r.violations.length === 1 ? "" : "s"}:`);
71
+ const inHouseOnly = r.violations.every((v) => v.kind.startsWith("in-house-"));
72
+ const unresolvedOnly = r.violations.every((v) => v.kind === "unresolved-module");
73
+ lines.push(unresolvedOnly
74
+ ? `VERIFICATION FAILED — ${r.violations.length} module${r.violations.length === 1 ? "" : "s"} this test imports could not be verified:`
75
+ : inHouseOnly
76
+ ? `VERIFICATION FAILED — ${r.violations.length} finding${r.violations.length === 1 ? "" : "s"} against the repository's own helper module${r.inHouse && r.inHouse.modules.length === 1 ? "" : "s"}:`
77
+ : r.utilsFiles.length === 0
78
+ ? // Findings of more than one kind, and no Skyramp module: the heading
79
+ // must not name a file this run never wrote.
80
+ `VERIFICATION FAILED — ${r.violations.length} finding${r.violations.length === 1 ? "" : "s"} on this test and the modules it imports:`
81
+ : `VERIFICATION FAILED — the shared utils file violates ${r.violations.length} invariant${r.violations.length === 1 ? "" : "s"}:`);
47
82
  for (const v of r.violations) {
48
83
  lines.push(`- ${v.kind} · ${show(v.file, r)}:${v.line} · ${v.helper}: ${v.detail}`);
49
84
  }
50
- lines.push("",
51
85
  // The fix rules come from the policy objects, not restated here; the browser
52
- // clause reads as a continuation of the api one for mixed files.
53
- `Fix each shared-helper violation in the utils file (${r.fallbackFamily.family === "browser"
54
- ? `${HELPER_FAMILIES.api.fixRule}; ${HELPER_FAMILIES.browser.fixRule}`
55
- : HELPER_FAMILIES.api.fixRule}), update any call site whose signature changed${ctx.embedded
86
+ // clause reads as a continuation of the api one for mixed files. An in-house-only
87
+ // failure names no utils file to fix — its remediation is the in-house paragraph
88
+ // below, and sending the agent to "the utils file" there had it create one.
89
+ // The utils-file remedy is offered only when there IS a utils file. A mix of
90
+ // kinds — one in-house finding beside an assertion-loss — is the pilot's
91
+ // ordinary shape once STEP 5b is skipped, and `every` sent it to a remedy that
92
+ // names a file the run never wrote.
93
+ const remediation = unresolvedOnly || inHouseOnly || r.utilsFiles.length === 0
94
+ ? "Fix each finding as its own line, and the paragraphs below, say"
95
+ : `Fix each shared-helper violation in the utils file (${r.fallbackFamily.family === "browser"
96
+ ? `${HELPER_FAMILIES.api.fixRule}; ${HELPER_FAMILIES.browser.fixRule}`
97
+ : HELPER_FAMILIES.api.fixRule}), update any call site whose signature changed`;
98
+ lines.push("", `${remediation}${ctx.embedded
56
99
  ? "."
57
100
  : ", then call skyramp_reuse_code again with the SAME arguments and `verify: true`. Re-verify after every fix pass; finish only on PASSED."}`);
58
101
  // Marker guidance only for kinds a marker can document: a guard-removed-only
59
102
  // failure must not be told "every deliberate violation may be documented".
60
- const markerable = r.violations.filter((v) => v.kind !== "guard-removed" &&
61
- v.kind !== "import-form" &&
62
- v.kind !== "helper-redefined");
103
+ // Read off MARKERABLE_UTILS_KINDS, which is the one declaration of that set and
104
+ // is what the allow grammar itself is built from — a kind added to the gate
105
+ // therefore defaults to NOT offering a marker, instead of silently joining the
106
+ // wrong side of a list of exceptions kept here.
107
+ const canMark = new Set(MARKERABLE_UTILS_KINDS);
108
+ const markerable = r.violations.filter((v) => canMark.has(v.kind));
63
109
  if (markerable.length > 0) {
64
110
  lines.push(`A violation that is deliberate may be documented instead of fixed. Copy the matching line below into the utils file as a comment, replacing only the <reason…> part — nothing else satisfies the gate:`);
65
111
  if (spec)
66
112
  for (const v of markerable)
67
113
  lines.push(` ${allowMarkerLine(spec, v.kind, v.helper)}`);
68
- if (!ctx.embedded)
69
- lines.push(`Do not spend more than ${UTILS_VERIFY_MAX_ROUNDS} verify rounds on this file: if violations remain after round ${UTILS_VERIFY_MAX_ROUNDS}, document each remaining one with its line above and re-verify once more.`);
70
114
  }
115
+ // The round bound is stated for EVERY blocking failure, not only where a marker
116
+ // is offered. A failure whose only violation takes no marker — a `type-error` —
117
+ // otherwise handed the agent a demand to fix with no terminal state at all.
118
+ if (!ctx.embedded)
119
+ lines.push(markerable.length > 0
120
+ ? `Do not spend more than ${UTILS_VERIFY_MAX_ROUNDS} verify rounds on this file: if violations remain after round ${UTILS_VERIFY_MAX_ROUNDS}, document each remaining one with its line above and re-verify once more.`
121
+ : `Do not spend more than ${UTILS_VERIFY_MAX_ROUNDS} verify rounds on this file: none of these violations can be documented, so if one remains after round ${UTILS_VERIFY_MAX_ROUNDS}, stop and report it in your submission rather than verifying again.`);
71
122
  if (r.violations.some((v) => v.kind === "import-form"))
72
123
  lines.push("An `import-form` violation is in the TEST file, not the utils file: replace that import with the try/except pair shown on the line above, then re-verify. Nothing in the utils file needs to change for it.");
124
+ if (r.violations.some((v) => v.kind === "status-restated"))
125
+ lines.push("A `status-restated` finding is about the TEST file: the helper already asserts the status. When the helper takes the status as a parameter, delete the spec's status assertion on the response that call returned and keep the status as the call's argument; nothing in the utils file changes. When a helper THIS RUN WROTE pins a literal, first lift that literal into a required expected-status parameter and pass it at every call site, then delete the spec's assertion. When the helper is defined at HEAD, its signature is frozen (see `incumbent-signature` below) — leave the literal alone and only delete the spec's assertion. The finding's own text says which.");
73
126
  if (r.violations.some((v) => v.kind === "helper-redefined"))
74
127
  lines.push("A helper defined twice in one file cannot be documented away — the module does not load (TypeScript) or the second definition silently replaces the first (Python). Keep ONE definition, give every parameter the other had a default, update the call sites, then re-verify.");
128
+ if (r.violations.some((v) => v.kind === "stale-allow"))
129
+ lines.push("A `stale-allow` finding is about the marker line itself, not about a helper: the decline it states is not in the delivered files, so delete that line. Do not document it — a second marker would be stale in the same way.");
130
+ if (r.violations.some((v) => v.kind === "incumbent-signature"))
131
+ lines.push("An `incumbent-signature` finding cannot be documented away — a helper defined at HEAD keeps its parameter list, its defaults included, because callers this run cannot see depend on it. Restore the signature as it was at HEAD; add what you need as a new parameter with a default or as a new helper; then re-verify.");
75
132
  if (r.violations.some((v) => v.kind === "guard-removed"))
76
133
  lines.push("A removed page-error guard cannot be documented away — restore the registration (in the spec, or in a shared helper the spec imports and calls) and its final expect, then re-verify.");
134
+ if (r.violations.some((v) => v.kind === "unresolved-module"))
135
+ lines.push("An `unresolved-module` finding is about a module this TEST IMPORTS that the pass could not recognise — not about a utils-file invariant. Its line names the one thing to do: make the module's first line the exact `// Generated by Skyramp on <timestamp>` header shown (the `on <timestamp>` part is required — a bare `Generated by Skyramp` is what every generated test carries and is not a module header), or fix an import that resolves to no file. Then re-verify. Until then the pass cannot verify or stage the module and skyramp_execute_test refuses this test. No marker documents it.");
136
+ if (r.violations.some((v) => v.kind.startsWith("in-house-")))
137
+ lines.push("An `in-house-…` finding is about the repository's OWN helper module, which this run may only ADD to: `in-house-unresolved` and `in-house-arity` are fixed in the TEST (call a helper the module defines, with an argument count its signature accepts) or by adding a helper or a defaulted parameter to the module; `in-house-modified` is fixed by restoring the existing helper or line exactly as it was at HEAD (`git diff HEAD -- <module>` shows the change) and putting what you needed in a new helper or a new defaulted parameter. Never write a `reuse-verify` marker or a Skyramp header into that file — it is the customer's.");
138
+ if (r.violations.some((v) => v.kind === "type-error"))
139
+ lines.push("A `type-error` cannot be documented away — it was found with every strictness flag OFF, so it fails under every compiler configuration and the customer's own `tsc` is the next thing to report it (the executor transpiles without typechecking, which is why the tests still ran). Fix the type at the line named — a parameter typed by what the SDK call accepts (never `unknown` or `any`), request options as ONE object literal passed straight to `sendRequest` (never a `Record<string, unknown>` filled in afterwards) — then re-verify.");
77
140
  }
78
141
  if (r.malformedAllows.length > 0) {
79
142
  lines.push(r.violations.length > 0
80
143
  ? ""
81
- : "VERIFICATION FAILED — every violation is documented, but not every marker can be read back.", "Fix these `reuse-verify: allow` lines — the report cannot read them, so the declines they document would be dropped silently:", ...r.malformedAllows.map((m) => ` ${show(m.file, r)}: ${m.line}`), `The form is \`${spec?.commentPrefix ?? "#"} reuse-verify: allow <kind> <helper> — <reason>\` with the reason separated by an em dash or a hyphen with a space on BOTH sides, the kind one of ${MARKERABLE_UTILS_KINDS.join(" / ")}, and the reason written out (not the <reason…> placeholder).`);
144
+ : "VERIFICATION FAILED — every violation is documented, but not every marker can be read back.", "Fix these `reuse-verify: allow` lines — the report cannot read them, so the declines they document would be dropped silently:", ...r.malformedAllows.map((m) => ` ${show(m.file, r)}: ${m.line}`), `The form is \`${spec?.commentPrefix ?? "#"} reuse-verify: allow <kind> <helper> — <reason>\` on a LINE OF ITS OWN, with nothing before it and nothing after it, the reason separated by an em dash or a hyphen with a space on BOTH sides, the kind one of ${MARKERABLE_UTILS_KINDS.join(" / ")}, and the reason written out (not the <reason…> placeholder).`);
82
145
  }
83
146
  return (lines.join("\n") +
84
147
  tail +
85
148
  inlineCallSitesAdvisory(r) +
86
149
  unextractedDuplicatesAdvisory(r) +
87
150
  duplicateActionAdvisory(r) +
151
+ fixedSleepAdvisory(r) +
152
+ inHouseAdvisories(r) +
88
153
  singleImporterAdvisory(r));
89
154
  }
155
+ /** What the in-house checks read and established, on a PASSED: which of the
156
+ * repository's own modules the spec calls, how many calls resolved, what this run
157
+ * added to or widened in them, and whether the additive gate ran — stated, because
158
+ * a gate that could not run must never read as one that found nothing. */
159
+ function inHouseSummary(r) {
160
+ const h = r.inHouse;
161
+ const mods = h.modules.map((m) => path.basename(m)).join(", ");
162
+ const parts = [
163
+ `${h.modules.length} in-house module${h.modules.length === 1 ? "" : "s"} (${mods}): ${h.resolved.length} imported helper${h.resolved.length === 1 ? "" : "s"} resolved`,
164
+ ];
165
+ if (h.unverifiable.length > 0)
166
+ parts.push(`${h.unverifiable.length} import${h.unverifiable.length === 1 ? "" : "s"} not readable as a helper (${h.unverifiable.join(", ")}) — a class, a re-export or a constant; not checked`);
167
+ if (h.added.length > 0)
168
+ parts.push(`${h.added.length} helper${h.added.length === 1 ? "" : "s"} added by this run (${h.added.map((a) => a.helper).join(", ")})`);
169
+ if (h.widened.length > 0)
170
+ parts.push(`${h.widened.length} widened with a defaulted parameter (${h.widened.map((a) => a.helper).join(", ")})`);
171
+ parts.push(h.additiveGateRan
172
+ ? "additive gate ran"
173
+ : "additive gate DID NOT RUN (HEAD's copy of a module could not be read) — say so in the report; nothing here confirms the module was changed additively");
174
+ return parts.join("; ") + ".";
175
+ }
176
+ /** A helper this run added to the customer's module that repeats one it already
177
+ * held. Advisory, like `duplicate-action`, and for the same reason. */
178
+ function inHouseAdvisories(r) {
179
+ const dups = r.advisories.filter((v) => v.kind === "in-house-duplicate");
180
+ if (dups.length === 0)
181
+ return "";
182
+ const n = dups.length;
183
+ return [
184
+ "",
185
+ "",
186
+ `ADVISORY — ${n} helper${n === 1 ? "" : "s"} this run added to an in-house module repeat${n === 1 ? "s" : ""} an action sequence that module already holds (does not block):`,
187
+ ...dups.map((v) => `- ${show(v.file, r)}:${v.line} · ${v.helper}: ${v.detail}`),
188
+ "Putting the duplicate inside the customer's file is worse than beside it. Call the existing helper instead and delete the one you added; if a value differs, lift it into a defaulted parameter of the existing helper. Then re-verify. Advisory only: do NOT write a `reuse-verify` marker for it.",
189
+ ].join("\n");
190
+ }
90
191
  /** A PASSED that ran the baseline assertion check says what that check measured. It
91
192
  * is a count: a swapped assertion (one removed, one added) holds the count, so the
92
193
  * line names the pass that compares subjects rather than letting "PASSED" claim it.
@@ -118,6 +219,9 @@ function moduleLabel(r) {
118
219
  ? utilsFileLabel(r.utilsFiles)
119
220
  : "the shared utils file";
120
221
  }
222
+ /** The half of the sibling call-site advisory both families share: a site inside
223
+ * the sibling's own helper, the execution owed, and that nothing blocks. */
224
+ const inlineSiteTail = (localCopy) => `For a site in a local helper, replace ${localCopy} inside the local helper with a call to the shared helper and keep the local helper's other statements; delete the local helper only if it then does nothing but forward, moving the import and the differing literals to its call sites. Then re-verify AND run the edited file with skyramp_execute_test — an edited pre-existing test without a recorded execution cannot be reported. This does not block execution.`;
121
225
  /** SKYR-4219: the sibling call-site pass the prompt asks for and the agent skips (0/2
122
226
  * seeded eval runs). Stated here because the verify call is the one point every run
123
227
  * reaches. Advisory — the sibling is a pre-existing test the maintenance flow owns, so
@@ -130,12 +234,22 @@ function inlineCallSitesAdvisory(r) {
130
234
  const labels = new Map(r.utilsFiles.map((f) => [f, utilsFileLabel([f])]));
131
235
  const labelOf = (f) => labels.get(f) ?? utilsFileLabel([f]);
132
236
  const n = r.inlineCallSites.length;
237
+ // One family per pass: the sites' kind decides the family half of the text.
238
+ const family = r.inlineCallSites[0].kind === "sequence"
239
+ ? HELPER_FAMILIES.browser
240
+ : HELPER_FAMILIES.api;
241
+ const lines = (c) => c.kind === "sequence" && c.endLine !== c.line
242
+ ? `${c.line}-${c.endLine}`
243
+ : `${c.line}`;
244
+ const what = (c) => c.kind === "sequence"
245
+ ? describeActionKey(c.actionKey)
246
+ : `${c.method} ${c.path}`;
133
247
  return [
134
248
  "",
135
249
  "",
136
- `ADVISORY — ${n} inline request call${n === 1 ? "" : "s"} in other Skyramp-generated tests that a shared helper already wraps:`,
137
- ...r.inlineCallSites.map((c) => `- ${show(c.file, r)}:${c.line}${c.localHelper ? ` (in local helper ${c.localHelper})` : ""} · ${c.method} ${c.path} · ${labelOf(c.utilsFile)}.${c.helper}`),
138
- `Each is a candidate: the request's method, path and call shape match the helper's. Replace the block with a call to the helper only if the remaining differences are literals (they become the arguments; keep the block's response variable; import the helper into that file; change nothing else there). For a site in a local helper, replace that request inside the local helper with a call to the shared helper and keep the local helper's other statements; delete the local helper only if it then does nothing but forward, moving the import and the differing literals to its call sites. Then re-verify AND run the edited file with skyramp_execute_test — an edited pre-existing test without a recorded execution cannot be reported. This does not block execution.`,
250
+ `ADVISORY — ${n} ${family.inlineSite.noun}${n === 1 ? "" : "s"} in other Skyramp-generated tests that a shared helper already ${family.inlineSite.already}:`,
251
+ ...r.inlineCallSites.map((c) => `- ${show(c.file, r)}:${lines(c)}${c.localHelper ? ` (in local helper ${c.localHelper})` : ""} · ${what(c)} · ${labelOf(c.utilsFile)}.${c.helper}`),
252
+ `${family.inlineSite.instruction} ${inlineSiteTail(family.inlineSite.localCopy)}`,
139
253
  ].join("\n");
140
254
  }
141
255
  /** Operations written in two or more sibling generated tests with no shared helper —
@@ -183,11 +297,34 @@ function singleImporterAdvisory(r) {
183
297
  return lines.join("\n");
184
298
  }
185
299
  function unstagedTail(r, ctx) {
186
- if (!ctx.unstaged || ctx.unstaged.length === 0)
300
+ let out = "";
301
+ if (ctx.unstaged && ctx.unstaged.length > 0)
302
+ out +=
303
+ `\n\nVERIFICATION FAILED — ${ctx.unstaged.length === 1 ? "this utils file" : "these utils files"} could not be staged for the output commit: ` +
304
+ ctx.unstaged.map((f) => show(f, r)).join(", ") +
305
+ `. The tests importing it will fail for everyone else. Usually the file is gitignored (check \`git check-ignore -v <path>\`) or lies outside the repository; fix that (move the file, or un-ignore it) and re-verify.`;
306
+ if (ctx.unstagedInHouse && ctx.unstagedInHouse.length > 0)
307
+ out +=
308
+ `\n\nVERIFICATION FAILED — the repository's own module${ctx.unstagedInHouse.length === 1 ? "" : "s"} this run added to could not be staged for the output commit: ` +
309
+ ctx.unstagedInHouse.map((f) => path.basename(f)).join(", ") +
310
+ `. The helper you added will not reach the pull request, and the test importing it will fail for everyone else. Read the staging error (\`git add -- <path>\`; \`git check-ignore -v <path>\`) and resolve it if it is this run's doing, then re-verify. Do not move, rename or un-ignore the customer's module: if it cannot be staged as it is, restore it to HEAD, leave the step inline, and say so in the report.`;
311
+ return out;
312
+ }
313
+ /** Specifiers this pass could not resolve. Stated, never blocked on: the resolver
314
+ * knows a fixed set of module extensions and an index file, and the customer's
315
+ * toolchain knows more. The wording says what this PASS did not do, never that the
316
+ * file is absent. */
317
+ function unresolvedImportsNote(r) {
318
+ const list = r.unresolvedImports ?? [];
319
+ if (list.length === 0)
187
320
  return "";
188
- return (`\n\nVERIFICATION FAILED — ${ctx.unstaged.length === 1 ? "this utils file" : "these utils files"} could not be staged for the output commit: ` +
189
- ctx.unstaged.map((f) => show(f, r)).join(", ") +
190
- `. The tests importing it will fail for everyone else. Usually the file is gitignored (check \`git check-ignore -v <path>\`) or lies outside the repository; fix that (move the file, or un-ignore it) and re-verify.`);
321
+ const n = list.length;
322
+ return [
323
+ "",
324
+ "",
325
+ `NOTE — ${n} relative import${n === 1 ? "" : "s"} could not be resolved by this pass, so ${n === 1 ? "it was" : "they were"} neither checked nor staged: ${list.map((i) => `\`${i}\``).join(", ")}.`,
326
+ "This pass tries a fixed set of module extensions and an index file; your toolchain may resolve more (a component file, a data file, a path alias). If the file is there, nothing is wrong — continue. If one of these is a helper module this run wrote, give it the standard header so the pass can check and stage it.",
327
+ ].join("\n");
191
328
  }
192
329
  /** Naming is advised, never enforced: a heuristic that blocked execution on
193
330
  * `create_test_case` or `list_expired_subscriptions` would be the worse outcome. */
@@ -204,21 +341,74 @@ function namingAdvisory(r) {
204
341
  "Shared helpers are named by method + resource (API) or user intent (browser); scenario values and adjectives belong in arguments. Rename if the name would stop another test from reusing the helper; otherwise continue.",
205
342
  ].join("\n");
206
343
  }
207
- /** TypeScript only. Whether an untyped parameter breaks the customer's build depends
208
- * on their tsconfig reaching the tests directory, so this advises and never blocks. */
344
+ /** A defaulted expected-status parameter. Advises for now — measured on most rows
345
+ * of every cohort so far, so blocking would fail a whole cohort while the prompt
346
+ * rule catches up; the verify pass routes the kind to `advisories` and this is
347
+ * where it is shown. The remediation touches every call site, which is why it
348
+ * names the re-execution rule for pre-existing tests. */
349
+ function statusDefaultAdvisory(r) {
350
+ const defaulted = r.advisories.filter((v) => v.kind === "status-default");
351
+ if (defaulted.length === 0)
352
+ return "";
353
+ const n = defaulted.length;
354
+ return [
355
+ "",
356
+ "",
357
+ `ADVISORY — ${n} shared helper${n === 1 ? "" : "s"} default${n === 1 ? "s" : ""} the status its caller expects (does not block):`,
358
+ ...defaulted.map((v) => `- ${show(v.file, r)}:${v.line} · ${v.helper}: ${v.detail}`),
359
+ // The rule, verbatim from the policy the prompt renders: one string, so the
360
+ // finding and the requirement cannot read as describing different helpers.
361
+ `Each helper above is one this run wrote. ${STATUS_ONCE_RULE.noDefault} A pre-existing test whose call site changed must be run with skyramp_execute_test. Advisory only: it never blocks, and continue without re-verifying.`,
362
+ ].join("\n");
363
+ }
364
+ /** TypeScript only. A static reading of the signature: whether an unannotated
365
+ * parameter breaks the customer's build depends on their tsconfig reaching the tests
366
+ * directory, and `any` breaks nothing, so this advises and never blocks. An `unknown`
367
+ * parameter fails at its first use under every setting — that failure is the
368
+ * compiler's to report, as a blocking `type-error`; this note names the cause. */
209
369
  function typingAdvisory(r) {
210
- const typed = r.advisories.filter((v) => v.kind === "untyped-parameter");
370
+ const typed = r.advisories.filter((v) => v.kind === "unusable-parameter-type");
211
371
  if (typed.length === 0)
212
372
  return "";
213
373
  const n = typed.length;
214
374
  return [
215
375
  "",
216
376
  "",
217
- `ADVISORY — ${n} helper${n === 1 ? " has" : "s have"} untyped parameters (does not block):`,
377
+ `ADVISORY — ${n} helper${n === 1 ? " has" : "s have"} parameters without a usable type (does not block):`,
218
378
  ...typed.map((v) => `- ${show(v.file, r)}:${v.line} · ${v.helper}: ${v.detail}`),
219
- "Annotate each with its actual type — a Playwright page as `page: Page` (add `import type { Page } from '@playwright/test'` once, only if a page parameter is among them); API values by their shape (`client: SkyrampClient`, `headers: Record<string, string>`); never `any`. Advisory only: continue without re-verifying, and do NOT write a `reuse-verify` marker for it.",
379
+ "Annotate each with its actual type — a Playwright page as `page: Page` (add `import type { Page } from '@playwright/test'` once, only if a page parameter is among them); API values by the type the SDK call accepts (`client: SkyrampClient`, `headers: Record<string, string>`, a path parameter as `string | number`); never `any` or `unknown` — `unknown` is assignable to nothing but itself, so passing it to the request fails the customer's typecheck. Advisory only: continue without re-verifying, and do NOT write a `reuse-verify` marker for it.",
220
380
  ].join("\n");
221
381
  }
382
+ /** What the compiler run over the delivered files has to add beyond its blocking
383
+ * `type-error`s: errors only the repository's tsconfig raises (advised — whether that
384
+ * tsconfig is the one their build runs is the customer's call), and the two ways
385
+ * the run could fall short — it did not run at all, or an import resolved from
386
+ * neither the repository nor the MCP's install, so what that module types went
387
+ * unchecked. Both are stated, because a PASSED that says nothing reads as a clean
388
+ * compile. Nothing for Python and JavaScript, where `typecheck` is absent. */
389
+ function typecheckAdvisory(r) {
390
+ const tc = r.typecheck;
391
+ if (!tc)
392
+ return "";
393
+ const lines = [];
394
+ if (!tc.ran)
395
+ lines.push("", "", `NOTE — the delivered files were NOT typechecked (${tc.reason ?? "unknown cause"}); only the static shape rules ran, so a type error can still reach the customer's own \`tsc\`. Read the signatures yourself: every parameter typed by what the SDK call accepts, the request options one object literal.`);
396
+ else if (tc.unresolved.length > 0)
397
+ lines.push("", "", `NOTE — the typecheck could not resolve ${tc.unresolved.map((m) => `\`${m}\``).join(", ")} from the repository or from the MCP's own install, so whatever those modules type was not checked. If a delivered file imports one of them, confirm the import path and that the package is installed in the repository.`);
398
+ const ambient = r.advisories.filter((v) => v.kind === "ambient-type-error");
399
+ if (ambient.length > 0) {
400
+ const n = ambient.length;
401
+ lines.push("", "", `ADVISORY — ${n} name${n === 1 ? "" : "s"} the compiler could not find (does not block):`, ...ambient.map((v) => `- ${show(v.file, r)}:${v.line} · ${v.helper}: ${v.detail}`), "Each is a global (`process`, a test runner's `describe`, `Promise`) whose declarations come from a package the repository installs (`@types/node`, the runner's types) or from its `lib` setting. This run cannot see the repository's installed packages, so it cannot tell whether the name exists there; the repository's own `tsc` decides. Do NOT rewrite the code to dodge this note — never a `globalThis` cast or a hand-written declaration; a `process.env` read is the generated form and stays as it is. Advisory only: continue without re-verifying, and do NOT write a `reuse-verify` marker for it.");
402
+ }
403
+ else if (tc.tsconfigNotReaching)
404
+ lines.push("", "", `NOTE — the nearest tsconfig (${tc.tsconfigNotReaching}) does not include the delivered files, and nor does any project it references, so nothing was checked under the repository's own settings. The errors above are the ones that hold under every configuration. If this repository type-checks its tests, add them to that config's \`include\`.`);
405
+ const settings = r.advisories.filter((v) => v.kind === "tsconfig-type-error");
406
+ if (settings.length > 0) {
407
+ const n = settings.length;
408
+ lines.push("", "", `ADVISORY — ${n} error${n === 1 ? "" : "s"} under the repository's own tsconfig (${tc.tsconfig ?? "tsconfig.json"}) (does not block):`, ...settings.map((v) => `- ${show(v.file, r)}:${v.line} · ${v.helper}: ${v.detail}`), "These compile with the strictness flags off and fail only under that tsconfig's settings (`noImplicitAny`, `strictNullChecks`, …). It includes the delivered files, so if the repository's build runs it, these are the errors it will report — fix them the same way as a type-error. Advisory only: continue without re-verifying, and do NOT write a `reuse-verify` marker for it.");
409
+ }
410
+ return lines.join("\n");
411
+ }
222
412
  /** Browser helpers whose Playwright action sequences agree — one operation under two
223
413
  * names, the drift a second run compounds. Rendered beside the other
224
414
  * duplicate-detection advisories (inline call sites, un-extracted duplicates), after
@@ -238,6 +428,55 @@ function duplicateActionAdvisory(r) {
238
428
  "Two names for one action is how a shared module drifts on every later run. Keep ONE helper per action sequence, named for the user intent; lift the values that differ (a filled text, a quantity) into defaulted parameters; update the call sites and delete the other. Skip only if the two act on genuinely different elements. If you edit the utils file or a call site, re-verify; a pre-existing test whose call site changed must also be run with skyramp_execute_test. Advisory only: it never blocks, and do NOT write a `reuse-verify` marker for it.",
239
429
  ].join("\n");
240
430
  }
431
+ /** A shared helper that waits for a DURATION — a `waitForTimeout`, a `time.sleep`, a
432
+ * promise-wrapped `setTimeout`, or one of those as a retry loop's backoff. Every test
433
+ * importing the helper pays it and the call site cannot see it. Advisory for its
434
+ * first cohort: the predicate is lexical over two languages, and review found three
435
+ * shapes it read wrongly, so the false-hit rate is measured before it blocks. */
436
+ function fixedSleepAdvisory(r) {
437
+ const sleeps = r.advisories.filter((v) => v.kind === "fixed-sleep");
438
+ if (sleeps.length === 0)
439
+ return "";
440
+ const n = sleeps.length;
441
+ return [
442
+ "",
443
+ "",
444
+ `ADVISORY — ${n} shared helper${n === 1 ? "" : "s"} wait${n === 1 ? "s" : ""} for a fixed DURATION rather than for a condition (does not block):`,
445
+ ...sleeps.map((v) => `- ${show(v.file, r)}:${v.line} · ${v.helper}: ${v.detail}`),
446
+ "A wait written into a shared helper is inherited by every test that imports it, is paid on every run, and is invisible at the call site — and where it is a retry loop's backoff, an iteration count hides what it really costs. Advisory only: it never blocks, and do NOT write a `reuse-verify` marker for it.",
447
+ ].join("\n");
448
+ }
449
+ /** The module the run created did not take the name its language prescribes, so a
450
+ * later run finds nothing and writes a second module beside it. Advisory for its
451
+ * first cohort: the prompt states the rule, and what this adds now is a count. */
452
+ function moduleNameAdvisory(r) {
453
+ const named = r.advisories.filter((v) => v.kind === "module-name");
454
+ if (named.length === 0)
455
+ return "";
456
+ const n = named.length;
457
+ return [
458
+ "",
459
+ "",
460
+ `ADVISORY — ${n} shared module${n === 1 ? "" : "s"} this run created ${n === 1 ? "does" : "do"} not carry the prescribed name (does not block):`,
461
+ ...named.map((v) => `- ${show(v.file, r)}:${v.line} · ${v.helper}: ${v.detail}`),
462
+ "Rename the file and fix the imports in the tests this run wrote; nothing inside the module changes. A module that already existed keeps the name it has — never rename one you did not create. Advisory only: it never blocks, and do NOT write a `reuse-verify` marker for it.",
463
+ ].join("\n");
464
+ }
465
+ /** One request body reached through two parameters. Advisory for its first cohort,
466
+ * for the reason recorded in UTILS_ADVISORY_KINDS. */
467
+ function duplicateBodyReachAdvisory(r) {
468
+ const found = r.advisories.filter((v) => v.kind === "duplicate-body-reach");
469
+ if (found.length === 0)
470
+ return "";
471
+ const n = found.length;
472
+ return [
473
+ "",
474
+ "",
475
+ `ADVISORY — ${n} helper${n === 1 ? "" : "s"} reach${n === 1 ? "es" : ""} the request body through two parameters (does not block):`,
476
+ ...found.map((v) => `- ${show(v.file, r)}:${v.line} · ${v.helper}: ${v.detail}`),
477
+ "Keep ONE of the two — the body parameter, or the override — delete the other from the signature and from the request call, and update the call sites. Which one to keep is the body-shape rule's question: the override where every caller changes only values the generated body already carries, the body parameter where one does not. If you edit the utils file or a call site, re-verify. Advisory only: it never blocks, and do NOT write a `reuse-verify` marker for it.",
478
+ ].join("\n");
479
+ }
241
480
  function verdictTail(ctx) {
242
481
  if (ctx.recorded !== false)
243
482
  return "";
@@ -36,7 +36,21 @@ export declare function infraGateFailure(params: VerifyTarget, r: VerifyResult):
36
36
  * was skipped, not unavailable. Returns undefined when the gate doesn't apply or doesn't fire;
37
37
  * scoping errors (or a legitimately POM-less repo, tier1 === []) also return undefined: this gate
38
38
  * must never turn an infra error into a false compliance failure. */
39
- export declare function zeroReuseGateFailure(params: VerifyTarget, r: VerifyResult): Promise<string | undefined>;
39
+ export declare function zeroReuseGateFailure(params: VerifyTarget, r: VerifyResult,
40
+ /** Candidate file names this run documented in the spec and then removed from it
41
+ * before delivery. Read exactly like a marker still in the spec — see
42
+ * stripDeliveredGateMarkers. Per RUN only. */
43
+ carriedKeptInline?: string[],
44
+ /** Filled with what this gate DID. `ran` says the candidate walk happened, so a
45
+ * carried decline missing from `covered` is missing for want of a FAULT rather than
46
+ * for want of a reading — the only state on which a caller may retire it. The gate
47
+ * declines to judge on several paths (the target is not POM-aware, the result is
48
+ * not clean-but-empty, discovery fell back to selector-grep, the scoping threw) and
49
+ * each leaves `covered` empty while classifying nothing. */
50
+ classification?: {
51
+ covered: Set<string>;
52
+ ran: boolean;
53
+ }): Promise<string | undefined>;
40
54
  /** Composes the verify response text from an (optional) fired gate and the verification result.
41
55
  * When a gate fires on a spec that also has mapping violations, the normal report is appended so
42
56
  * both are actionable in one pass — the zero-reuse gate only fires on clean results, so the
@@ -24,7 +24,7 @@ export function formatVerifyReport(r) {
24
24
  if (r.parseError) {
25
25
  lines.push(`Parse error (fix the syntax and re-verify): ${r.parseError}`);
26
26
  }
27
- lines.push("Each violation may be remapped AT MOST ONCE, and only to a member listed above. If it is flagged again, or you are not confident, restore the raw inline sequence (from your mapping table or `<testFile>.raw.bak`) with a `// kept inline: <POM file basename> — no matching POM method` comment naming the file you demoted from. Re-run this verification after every fix pass. Do not finish until it reports PASSED.");
27
+ lines.push("Each violation may be remapped AT MOST ONCE, and only to a member listed above. If it is flagged again, or you are not confident, restore the raw inline sequence (from your mapping table or `<testFile>.raw.bak`) and put a `// kept inline: <POM file basename> — no matching POM method` comment naming the file you demoted from ON A LINE OF ITS OWN above it, with nothing before it and nothing after it. Re-run this verification after every fix pass. Do not finish until it reports PASSED.");
28
28
  return lines.join("\n\n");
29
29
  }
30
30
  /** Renders the infrastructure-gate failure: a POM-aware spec whose Skyramp runtime imports
@@ -63,7 +63,7 @@ function malformedMarkerLines(unparsable) {
63
63
  return [
64
64
  "Also fix these `kept inline:` lines — they satisfy this gate but the report cannot read them, so their declines would be dropped silently:",
65
65
  ...unparsable.map((line) => ` ${line}`),
66
- "The reason must be separated by an em dash, or by a hyphen with a space on BOTH sides: `// kept inline: <file basename> — <reason>`.",
66
+ "Write each one on a LINE OF ITS OWN, with nothing before it and nothing after it, and separate the reason with an em dash or with a hyphen that has a space on BOTH sides: `// kept inline: <file basename> — <reason>`.",
67
67
  ];
68
68
  }
69
69
  /** Renders the malformed-marker failure on its own — every candidate is documented, so the
@@ -154,7 +154,21 @@ export async function infraGateFailure(params, r) {
154
154
  * was skipped, not unavailable. Returns undefined when the gate doesn't apply or doesn't fire;
155
155
  * scoping errors (or a legitimately POM-less repo, tier1 === []) also return undefined: this gate
156
156
  * must never turn an infra error into a false compliance failure. */
157
- export async function zeroReuseGateFailure(params, r) {
157
+ export async function zeroReuseGateFailure(params, r,
158
+ /** Candidate file names this run documented in the spec and then removed from it
159
+ * before delivery. Read exactly like a marker still in the spec — see
160
+ * stripDeliveredGateMarkers. Per RUN only. */
161
+ carriedKeptInline = [],
162
+ /** Filled with what this gate DID. `ran` says the candidate walk happened, so a
163
+ * carried decline missing from `covered` is missing for want of a FAULT rather than
164
+ * for want of a reading — the only state on which a caller may retire it. The gate
165
+ * declines to judge on several paths (the target is not POM-aware, the result is
166
+ * not clean-but-empty, discovery fell back to selector-grep, the scoping threw) and
167
+ * each leaves `covered` empty while classifying nothing. */
168
+ classification = {
169
+ covered: new Set(),
170
+ ran: false,
171
+ }) {
158
172
  if (!isCleanButEmpty(r) ||
159
173
  !isPomAwareTarget(params.language, params.framework, params.testType))
160
174
  return undefined;
@@ -168,8 +182,26 @@ export async function zeroReuseGateFailure(params, r) {
168
182
  // discovery fallback also matches ordinary in-repo frontend source (app components
169
183
  // legitimately contain the spec's test-ids by construction), which is not evidence of
170
184
  // skipped reuse in a POM-less repo.
185
+ // An empty `tier1` is an ANSWER: the walk ran and found no candidate, so a carried
186
+ // decline covers nothing. Only the selector-grep fallback leaves this unjudged.
187
+ if (diagnostics.discovery === "globs")
188
+ classification.ran = true;
171
189
  if (diagnostics.discovery === "globs" && tier1.length > 0) {
172
- const undocumented = tier1.filter((p) => !isKeptInlineDocumented(specContent, p.file));
190
+ // `isKeptInlineDocumented` accepts the STEM as well as the basename, so a
191
+ // decline carried from `// kept inline: loginPage — …` is the string
192
+ // `loginPage` while the candidate is `loginPage.js`. Both spellings are
193
+ // compared, and whichever one the decline used is what is recorded as covered.
194
+ const carried = new Set(carriedKeptInline);
195
+ const undocumented = tier1.filter((p) => {
196
+ if (isKeptInlineDocumented(specContent, p.file))
197
+ return false;
198
+ const base = path.basename(p.file);
199
+ const spelling = [base, base.replace(/\.[^.]+$/, "")].find((n) => carried.has(n));
200
+ if (spelling === undefined)
201
+ return true;
202
+ classification.covered.add(spelling);
203
+ return false;
204
+ });
173
205
  // A marker this gate accepts but `parseKeptInline` cannot read clears the escape
174
206
  // hatch while its decline never reaches the report — the silent loss this feature
175
207
  // exists to close. Caught here rather than only logged at report time: the agent is
@@ -25,4 +25,4 @@ type MockEntry = {
25
25
  protocol: MockProtocol;
26
26
  };
27
27
  declare function buildMockImportBlock(testFile: string, scenarioName: string, mockFiles: string[], traceComments?: string[], language?: ProgrammingLanguage, mockEntries?: MockEntry[]): string;
28
- export { injectMockImports, buildMockImportBlock, isSupportedMockEnrichmentLanguage };
28
+ export { injectMockImports, buildMockImportBlock, isSupportedMockEnrichmentLanguage, };
@@ -196,7 +196,9 @@ function buildMockEntries(testFile, mockFiles, language) {
196
196
  });
197
197
  }
198
198
  function buildImportPath(relativePath, language) {
199
- const normalized = relativePath.startsWith(".") ? relativePath : `./${relativePath}`;
199
+ const normalized = relativePath.startsWith(".")
200
+ ? relativePath
201
+ : `./${relativePath}`;
200
202
  if (language === ProgrammingLanguage.TYPESCRIPT) {
201
203
  return normalized.replace(/\.(ts|tsx|js|jsx)$/i, "");
202
204
  }
@@ -231,7 +233,7 @@ function prepareMockFileForLanguageImport(mockFile, relativePath, language, clas
231
233
  function disableNodeMockAutoApply(source) {
232
234
  if (source.includes("skyramp-enrich disabled auto-apply"))
233
235
  return source;
234
- return source.replace(/\nmain\(\)\.catch\(\s*\(?\s*\w+\s*\)?\s*=>\s*\{[\s\S]*?\n\}\);\s*$/, '\n// skyramp-enrich disabled auto-apply: imported integration tests call getAllMocks() directly.\n');
236
+ return source.replace(/\nmain\(\)\.catch\(\s*\(?\s*\w+\s*\)?\s*=>\s*\{[\s\S]*?\n\}\);\s*$/, "\n// skyramp-enrich disabled auto-apply: imported integration tests call getAllMocks() directly.\n");
235
237
  }
236
238
  function replaceGeneratedMockBlock(source, generatedBlock) {
237
239
  const existingBlockRange = findGeneratedMockBlockRange(source);
@@ -261,9 +263,11 @@ function findTopLevelBlockInsertionIndex(lines, language) {
261
263
  for (let i = 0; i < lines.length; i++) {
262
264
  const line = lines[i].trim();
263
265
  const isImportLine = language === ProgrammingLanguage.PYTHON
264
- ? line.startsWith("import ") || line.startsWith("from ") || line.startsWith("# Import")
266
+ ? line.startsWith("import ") ||
267
+ line.startsWith("from ") ||
268
+ line.startsWith("# Import")
265
269
  : line.startsWith("import ") ||
266
- line.startsWith("const ") && line.includes("require(") ||
270
+ (line.startsWith("const ") && line.includes("require(")) ||
267
271
  line.startsWith("// Import");
268
272
  if (isImportLine ||
269
273
  (line === "" &&
@@ -723,4 +727,4 @@ function normalizeMockCommandTarget(target) {
723
727
  return /^[A-Za-z0-9_.-]+:\d+$/.test(target) ? target : undefined;
724
728
  }
725
729
  // Exported for testing
726
- export { injectMockImports, buildMockImportBlock, isSupportedMockEnrichmentLanguage };
730
+ export { injectMockImports, buildMockImportBlock, isSupportedMockEnrichmentLanguage, };