@skyramp/mcp 0.4.3 → 0.4.4-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/build/playwright/traceRecordingPrompt.js +2 -1
  2. package/build/prompts/orderAssertionRule.d.ts +9 -0
  3. package/build/prompts/orderAssertionRule.js +9 -0
  4. package/build/prompts/test-maintenance/driftAnalysisShared.js +2 -0
  5. package/build/prompts/testbot/testbot-prompts.js +10 -7
  6. package/build/recommendation/answers.d.ts +54 -19
  7. package/build/recommendation/answers.js +102 -31
  8. package/build/recommendation/blockerProbes.d.ts +13 -0
  9. package/build/recommendation/blockerProbes.js +91 -0
  10. package/build/recommendation/blockers.d.ts +65 -0
  11. package/build/recommendation/blockers.js +135 -0
  12. package/build/recommendation/pullRequestText.d.ts +2 -0
  13. package/build/recommendation/pullRequestText.js +16 -0
  14. package/build/recommendation/registerPlan.d.ts +7 -4
  15. package/build/recommendation/registerPlan.js +37 -11
  16. package/build/recommendation/types.d.ts +21 -4
  17. package/build/recommendation/verifierContracts.d.ts +6 -6
  18. package/build/recommendation/verifierContracts.js +8 -7
  19. package/build/recommendation/verifiers/citedPath.d.ts +2 -2
  20. package/build/recommendation/verifiers/citedPath.js +2 -2
  21. package/build/recommendation/verifiers/coverage.js +25 -25
  22. package/build/recommendation/verifiers/deliveredMatchesPlan.js +3 -3
  23. package/build/recommendation/verifiers/issueTraceability.d.ts +1 -5
  24. package/build/recommendation/verifiers/issueTraceability.js +4 -35
  25. package/build/tools/executeSkyrampTestTool.js +8 -0
  26. package/build/tools/generate-tests/generateE2ERestTool.d.ts +1 -0
  27. package/build/tools/generate-tests/generateE2ERestTool.js +9 -1
  28. package/build/tools/generate-tests/generateUIRestTool.d.ts +2 -0
  29. package/build/tools/generate-tests/generateUIRestTool.js +9 -1
  30. package/build/tools/submitReportTool.d.ts +9 -9
  31. package/build/tools/submitReportTool.js +178 -26
  32. package/build/tools/test-management/registerTestPlanTool.d.ts +20 -14
  33. package/build/tools/test-management/registerTestPlanTool.js +30 -14
  34. package/build/types/TestTypes.d.ts +7 -0
  35. package/build/types/TestTypes.js +22 -0
  36. package/build/types/TestbotReport.d.ts +4 -1
  37. package/build/utils/assertion-verify/metrics.js +12 -0
  38. package/build/utils/findUp.d.ts +20 -0
  39. package/build/utils/findUp.js +59 -0
  40. package/build/utils/language-helper.js +1 -1
  41. package/build/utils/repoSdkVersion.d.ts +16 -0
  42. package/build/utils/repoSdkVersion.js +88 -0
  43. package/build/utils/testDependencyPolicy.d.ts +20 -0
  44. package/build/utils/testDependencyPolicy.js +64 -4
  45. package/build/utils/utils-verify/typecheck.js +3 -18
  46. package/node_modules/playwright/lib/mcp/skyramp/assertOrder.js +66 -0
  47. package/node_modules/playwright/lib/mcp/skyramp/assertTool.js +12 -3
  48. package/node_modules/playwright/lib/mcp/skyramp/common/liveReadError.js +40 -0
  49. package/node_modules/playwright/lib/mcp/skyramp/loadTraceTool.js +21 -0
  50. package/node_modules/playwright/lib/mcp/skyramp/skyRampImport.js +2 -1
  51. package/node_modules/playwright/lib/mcp/skyramp/traceRecordingBackend.js +96 -16
  52. package/node_modules/playwright/lib/mcp/test/skyRampExport.js +10 -0
  53. package/node_modules/playwright/node_modules/playwright-core/lib/server/codegen/skyramp/jsonlReader.js +1 -0
  54. package/node_modules/playwright/node_modules/playwright-core/lib/server/recorder/recorderRunner.js +22 -0
  55. package/node_modules/playwright/node_modules/playwright-core/lib/utils/isomorphic/elementOrder.js +57 -0
  56. package/node_modules/playwright/node_modules/playwright-core/lib/utils.js +2 -0
  57. package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/{index.uiPTFncY.js → index.0MJW0uG7.js} +1 -1
  58. package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/index.html +1 -1
  59. package/node_modules/playwright/node_modules/playwright-core/package.json +1 -1
  60. package/node_modules/playwright/node_modules/playwright-core/src/server/codegen/skyramp/jsonlReader.ts +1 -1
  61. package/node_modules/playwright/node_modules/playwright-core/src/server/recorder/recorderRunner.ts +26 -1
  62. package/node_modules/playwright/node_modules/playwright-core/src/utils/isomorphic/elementOrder.ts +83 -0
  63. package/node_modules/playwright/node_modules/playwright-core/src/utils.ts +1 -0
  64. package/node_modules/playwright/package.json +1 -1
  65. package/package.json +4 -2
  66. package/plugin/prompts/plan-tests.md +9 -17
  67. package/plugin/skills/enhance-assertions/reference/shared-rules.md +1 -1
  68. package/plugin/skills/enhance-assertions/reference/ui.md +2 -2
  69. package/plugin/skills/fix-test-import-errors/SKILL.md +1 -1
@@ -126,7 +126,7 @@ if (await existingSecret.isVisible().catch(() => false)) {
126
126
 
127
127
  Before editing `$2`, you must output a `<thinking>` block. It states the behaviour each test evaluates, then works through the rules for the items that behaviour depends on, so no rule that applies is overlooked. The JSON array should match the template below — every assertion category and every rule title under it must appear as a key, with `[]` where the rule does not apply.
128
128
 
129
- 1. For each test in scope, name the behaviour it evaluates in one line, taken from the recommendation it came from, and name the page where that behaviour shows. Generated specs are usually named `testUi`, which claims nothing — use the name only when it is specific enough to add something.
129
+ 1. For each test in scope, name the behaviour it evaluates in one line, taken from the recommendation it came from, and name the page where that behaviour shows. A generated spec may carry a title that names its behaviour — trust that title when it does. A spec still named `testUi` claims nothing, so use the name only when it is specific enough to add something.
130
130
  2. Selector inventory — list every selector already present in `$2` (`data-testid`, role + name, text, label, etc.). New assertions may use only selectors from this list. An assertion the recorder dropped because it failed during recording may use the selector of the element named in that recording's blueprint capture. Do not invent `data-testid` values, role names, or aria attributes. Also note captured network responses, repeated element patterns, exact rendered text/value/attribute from trace/source, and existing `toBeVisible()` assertions whose exact text is knowable.
131
131
  3. Process — Replay → Identify → Fix or Add — walk through these three steps explicitly.
132
132
  a. Replay the scenario mentally. At each state-changing action (form submit, item add/edit/delete), ask: "What is the EXPECTED outcome based on the action performed?"
@@ -206,7 +206,7 @@ expect(trigger).to_be_focused()
206
206
  When the PR changes how an element looks or where it sits (colour, class, size, `flex-direction`, a moved block), assert the changed property on the element that OWNS it — `flex-direction` belongs to the flex container, not the clicked child, and an order check needs both compared elements. Use a selector already in the file; if the owner has none, report a recording gap in your `<thinking>` block — do not invent one or screenshot it.
207
207
 
208
208
  - Colour / class: a class assertion recorded at capture is already written as a bounded regex (`toHaveClass(/(^|\s)bg-blue-600(\s|$)/)`) — leave it as generated. Use `toContainClass('bg-blue-600')` only for a class assertion you add yourself (1.52+; it matches one token, unlike a bare `/bg-blue-600/` which also passes on `hover:bg-blue-600`). For a style, `toHaveCSS('background-color', <the value the app computes>)` — take it from the app, do not convert the diff's hex: Tailwind v4 serializes `oklch(...)`, not `rgb(...)`.
209
- - Order: compare both elements' `boundingBox()` on the changed axis (holds for `flex-direction` / `order` / `dir` / grid); `toHaveCSS('flex-direction', 'row-reverse')` only when the container is `display: flex` with an unconditional class.
209
+ - Order: an order assertion recorded at capture (`browser_assert` type `order`) is already in the file as two `boundingBox()` reads compared on one axis (inside `expect(async () => …).toPass()` in TS/JS) — leave it as generated. When none was recorded, add that comparison on the changed axis (holds for `flex-direction` / `order` / `dir` / grid / reordered markup): wait for both elements, read each one's box (`const aBox = await a.boundingBox()`), then compare the boxes' `x` (left/right) or `y` (above/below), e.g. `expect(aBox.x).toBeLessThan(bBox.x)` for "a left of b" — a locator itself has no `.x`; `toHaveCSS('flex-direction', 'row-reverse')` only when the container is `display: flex` with an unconditional class.
210
210
  - Size: `toHaveCSS('width', <the computed width>)`. Name the value; never copy a `...` or `/…/` placeholder.
211
211
 
212
212
  A `toHaveScreenshot()` baseline is right only for a look no property expresses (image, gradient, chart) or to refresh an already-committed baseline (SKYR-4298) — never a new one for a colour, class or order change.
@@ -56,7 +56,7 @@ python3 -m robot <robot-file>.robot
56
56
 
57
57
  Inspect package.json before installing anything:
58
58
 
59
- - If a required package is already declared, install from the existing manifest without changing its version.
59
+ - If a required package is already declared, install from the existing manifest without changing its version, unless `skyramp_execute_test` refuses the run over an older Skyramp SDK. Then do what the refusal says.
60
60
  - If no JavaScript/TypeScript manifest exists at the test project root, create `package.json` with only `{ "devDependencies": {} }` before adding the missing approved package.
61
61
  - If an approved package is missing, add it with the repository's package manager as a devDependency. For npm, use `npm install --save-dev --legacy-peer-deps <package>`.
62
62
  - Never add, upgrade, or downgrade Playwright or @playwright/test when either is already declared. If its version is incompatible with Skyramp, report the conflict.