@testivai/mcp 0.8.3 → 0.9.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.
- package/README.md +6 -5
- package/dist/diff-images.d.ts +104 -0
- package/dist/diff-images.d.ts.map +1 -0
- package/dist/diff-images.js +399 -0
- package/dist/diff-images.js.map +1 -0
- package/dist/lib.d.ts +69 -6
- package/dist/lib.d.ts.map +1 -1
- package/dist/lib.js +168 -15
- package/dist/lib.js.map +1 -1
- package/dist/server.js +34 -50
- package/dist/server.js.map +1 -1
- package/dist/tool-meta.d.ts.map +1 -1
- package/dist/tool-meta.js +23 -4
- package/dist/tool-meta.js.map +1 -1
- package/package.json +3 -3
- package/server.json +2 -2
package/dist/server.js
CHANGED
|
@@ -1,45 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
-
if (k2 === undefined) k2 = k;
|
|
5
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
-
}
|
|
9
|
-
Object.defineProperty(o, k2, desc);
|
|
10
|
-
}) : (function(o, m, k, k2) {
|
|
11
|
-
if (k2 === undefined) k2 = k;
|
|
12
|
-
o[k2] = m[k];
|
|
13
|
-
}));
|
|
14
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
-
}) : function(o, v) {
|
|
17
|
-
o["default"] = v;
|
|
18
|
-
});
|
|
19
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
-
var ownKeys = function(o) {
|
|
21
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
-
var ar = [];
|
|
23
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
-
return ar;
|
|
25
|
-
};
|
|
26
|
-
return ownKeys(o);
|
|
27
|
-
};
|
|
28
|
-
return function (mod) {
|
|
29
|
-
if (mod && mod.__esModule) return mod;
|
|
30
|
-
var result = {};
|
|
31
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
-
__setModuleDefault(result, mod);
|
|
33
|
-
return result;
|
|
34
|
-
};
|
|
35
|
-
})();
|
|
36
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
-
const fs = __importStar(require("fs"));
|
|
38
4
|
const zod_1 = require("zod");
|
|
39
5
|
const mcp_js_1 = require("@modelcontextprotocol/sdk/server/mcp.js");
|
|
40
6
|
const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
|
|
41
7
|
const config_1 = require("@testivai/witness/config");
|
|
42
8
|
const lib_1 = require("./lib");
|
|
9
|
+
const diff_images_1 = require("./diff-images");
|
|
43
10
|
const tool_meta_1 = require("./tool-meta");
|
|
44
11
|
const packageJson = require('../package.json');
|
|
45
12
|
// Project root: --root <path> flag or cwd (MCP clients set cwd to the workspace).
|
|
@@ -69,6 +36,8 @@ server.registerTool('get_visual_results', {
|
|
|
69
36
|
}
|
|
70
37
|
const lines = [
|
|
71
38
|
(0, lib_1.summaryLine)(results),
|
|
39
|
+
// An environment change several snapshots share, said once up front.
|
|
40
|
+
...(0, lib_1.environmentLines)(results.snapshots),
|
|
72
41
|
'',
|
|
73
42
|
...withBlankAfter((0, lib_1.changeGroupLines)(results.snapshots)),
|
|
74
43
|
...results.snapshots.map((s) => `- ${s.name}: ${(0, lib_1.verdictFor)(s)}`),
|
|
@@ -86,31 +55,46 @@ server.registerTool('get_visual_results', {
|
|
|
86
55
|
function withBlankAfter(section) {
|
|
87
56
|
return section.length > 0 ? [...section, ''] : [];
|
|
88
57
|
}
|
|
89
|
-
// Shared handler for the diff-image tools (registered under two names)
|
|
90
|
-
|
|
58
|
+
// Shared handler for the diff-image tools (registered under two names): the
|
|
59
|
+
// full page downscaled, then native-scale crops of the changed regions, or
|
|
60
|
+
// only the region or band asked for (diff-images.ts).
|
|
61
|
+
const snapshotDiffHandler = async ({ name, region, y, height }) => {
|
|
91
62
|
const paths = (0, lib_1.resolvePaths)(projectRoot);
|
|
92
63
|
const results = (0, lib_1.readResults)(paths);
|
|
93
64
|
const snapshot = results?.snapshots.find((s) => s.name === name);
|
|
94
65
|
if (!results || !snapshot) {
|
|
95
66
|
// A missing baseline has no current capture: its committed screenshot only.
|
|
96
67
|
const missing = results ? (0, lib_1.missingBaselineDiff)(projectRoot, results, name) : null;
|
|
97
|
-
if (missing)
|
|
98
|
-
|
|
68
|
+
if (missing) {
|
|
69
|
+
const asked = region !== undefined || y !== undefined || height !== undefined;
|
|
70
|
+
const note = 'region, y and height crop a snapshot in the results; a missing baseline has no regions, so its committed screenshot is shown whole.';
|
|
71
|
+
return { content: asked ? [...missing, { type: 'text', text: note }] : missing };
|
|
72
|
+
}
|
|
99
73
|
return { content: [{ type: 'text', text: `No snapshot named "${name}" in the latest results.` }] };
|
|
100
74
|
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
75
|
+
return { content: (0, diff_images_1.snapshotDiffContent)(paths, snapshot, { region, y, height }) };
|
|
76
|
+
};
|
|
77
|
+
const diffInputSchema = {
|
|
78
|
+
name: zod_1.z.string().describe('Snapshot name from the results'),
|
|
79
|
+
region: zod_1.z
|
|
80
|
+
.number()
|
|
81
|
+
.int()
|
|
82
|
+
.min(0)
|
|
83
|
+
.optional()
|
|
84
|
+
.describe("Index of one of the snapshot's regions, as get_diff lists them (results.json order): returns only that region, cropped at native scale"),
|
|
85
|
+
y: zod_1.z
|
|
86
|
+
.number()
|
|
87
|
+
.int()
|
|
88
|
+
.min(0)
|
|
89
|
+
.optional()
|
|
90
|
+
.describe('Top of a full-width band of the page, in pixels: returns only that band, at native scale'),
|
|
91
|
+
height: zod_1.z
|
|
92
|
+
.number()
|
|
93
|
+
.int()
|
|
94
|
+
.min(1)
|
|
95
|
+
.optional()
|
|
96
|
+
.describe(`Rows of the band from y (default: what one crop shows, ${diff_images_1.CROP_LIMITS.maxHeight} at native scale); a taller band shows its top rows and says where to continue`),
|
|
112
97
|
};
|
|
113
|
-
const diffInputSchema = { name: zod_1.z.string().describe('Snapshot name from the results') };
|
|
114
98
|
// registerTool is called through an untyped alias: zod@3.25 + TS 6 blow the
|
|
115
99
|
// type-depth limit (TS2589) when inferring the schema generics. Runtime
|
|
116
100
|
// validation of the input schema is unaffected.
|
package/dist/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":";;;AACA,6BAAyB;AACzB,oEAAoE;AACpE,wEAAiF;AACjF,qDAA2D;AAC3D,+BAAyT;AACzT,+CAAmF;AACnF,2CAAwE;AAExE,MAAM,WAAW,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAE/C,kFAAkF;AAClF,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;AAChD,MAAM,WAAW,GAAG,QAAQ,KAAK,CAAC,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;AAE/G,6EAA6E;AAC7E,2EAA2E;AAC3E,kCAAkC;A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AAC,CAAC;IAC/B,QAAQ,EAAE;QACR;YACE,IAAI,EAAE,MAAe;YACrB,OAAO,EAAE,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,yBAAa,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,IAAA,qBAAe,EAAC,WAAW,CAAC,EAAE,CAAC,EAAE;SAClI;KACF;CACF,CAAC,CACH,CAAC;AAEF,KAAK,UAAU,IAAI;IACjB,MAAM,SAAS,GAAG,IAAI,+BAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,+EAA+E;IAC/E,MAAM,MAAM,GAAG,SAAS,CAAC,SAAS,CAAC;IACnC,SAAS,CAAC,SAAS,GAAG,CAAC,OAAO,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,IAAA,yBAAmB,EAAC,OAAO,CAAC,CAAC,CAAC;AAC5E,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACnB,OAAO,CAAC,KAAK,CAAC,+BAA+B,EAAE,GAAG,CAAC,CAAC;IACpD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
package/dist/tool-meta.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-meta.d.ts","sourceRoot":"","sources":["../src/tool-meta.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,uEAAuE;IACvE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjC;
|
|
1
|
+
{"version":3,"file":"tool-meta.d.ts","sourceRoot":"","sources":["../src/tool-meta.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,uEAAuE;IACvE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjC;AAqBD,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyDc,CAAC;AAErC;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa;;;;;CAoCzB,CAAC;AAEF,uGAAuG;AACvG,eAAO,MAAM,QAAQ,GAAI,GAAG,MAAM,KAAG,MAA4E,CAAC;AAElH;;;;;GAKG;AACH,iBAAS,YAAY,CAAC,YAAY,SAAwB,GAAG,MAAM,CAMlE;AAUD;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa;;;;;;;;IASxB,qGAAqG;;IAErG,qFAAqF;;IAErF,0EAA0E;;IAE1E;;;;OAIG;oBACa,MAAM,0BAA+D,MAAM;gDAmC/C;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM;CAqBnH,CAAC;AAEF,gFAAgF;AAChF,MAAM,MAAM,QAAQ,GAAG,MAAM,OAAO,SAAS,CAAC;AAE9C,wBAAgB,WAAW,CAAC,EAAE,cAAc,EAAE,EAAE;IAAE,cAAc,EAAE,OAAO,CAAA;CAAE,GAAG,MAAM,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAKvG"}
|
package/dist/tool-meta.js
CHANGED
|
@@ -6,9 +6,15 @@ exports.toolMetaFor = toolMetaFor;
|
|
|
6
6
|
// showing the tool's permission prompt on every call, even in auto-approving
|
|
7
7
|
// permission modes; other clients ignore it.
|
|
8
8
|
const requiresUserInteraction = { 'anthropic/requiresUserInteraction': true };
|
|
9
|
+
// The crop numbers are CROP_LIMITS in diff-images.ts, written out because
|
|
10
|
+
// this file imports nothing (the review action bundles it); tests compare them.
|
|
9
11
|
const diffImages = {
|
|
10
12
|
title: 'View snapshot diff images',
|
|
11
|
-
description: 'Return the baseline, current, and diff images for one changed snapshot so you can see what changed visually
|
|
13
|
+
description: 'Return the baseline, current, and diff images for one changed snapshot so you can see what changed visually: ' +
|
|
14
|
+
'the full page downscaled to fit (it shows where the changes are), then, when it had to be downscaled, each changed region cropped at native scale with 32 px around it and as wide as the page (up to 1280 px), ' +
|
|
15
|
+
'so you can read text, wrapping and clipping there (up to 3 crops, each at most 1280×1024 px and 2,000,000 px in all; ' +
|
|
16
|
+
'nearby regions share a crop, changes come before shifts, a wider area is sampled at 1/2 scale or smaller, and a taller one shows its top rows). ' +
|
|
17
|
+
'Pass `region` (an index the response lists) for another region, or `y` and `height` for any band of the page: those return only that crop; ' +
|
|
12
18
|
'for a missing baseline (no capture this run), only the committed baseline image, since there is no current capture. ' +
|
|
13
19
|
'Use get_report / get_visual_results first to find snapshot names.',
|
|
14
20
|
};
|
|
@@ -20,6 +26,10 @@ exports.TOOL_META = {
|
|
|
20
26
|
'A pixel diff is likely render noise when the DOM and the computed styles both match and the diff is small and scattered; ' +
|
|
21
27
|
'a diff whose DOM and computed styles match but that is concentrated in one area or over 1% of pixels gets its own verdict, not noise: ' +
|
|
22
28
|
'it is a bad capture or a change the style check does not cover (size, overflow, transform, images…), so look at the diff (get_diff) before approving; ' +
|
|
29
|
+
'when the environment the snapshot was captured in changed since the baseline (a browser build, OS or distro, device scale, capture method…) ' +
|
|
30
|
+
'and the DOM and computed styles match, the verdict is rendering drift: the machine changed, not the page, never noise; ' +
|
|
31
|
+
'when a web font or stylesheet failed to load in the current capture or the baseline (captureHealth), the verdict is unhealthy capture, said before anything else: ' +
|
|
32
|
+
'a glitch of the capture or a broken asset, never noise even when the DOM and computed styles match, and never to be approved as a baseline; ' +
|
|
23
33
|
'a style-only change (identical DOM, different computed styles) is a real change, not noise, ' +
|
|
24
34
|
'and so is any DOM change — both need human review. ' +
|
|
25
35
|
'When the styles were not compared (style check unavailable), the verdict says so and does not call the diff noise: ' +
|
|
@@ -82,7 +92,12 @@ exports.REVIEW_PROMPT = {
|
|
|
82
92
|
'3. For each snapshot, explain in one short paragraph WHAT changed (name the selectors),',
|
|
83
93
|
' WHY it likely happened (use pageShift/shift classifications — e.g. content injected above),',
|
|
84
94
|
' and which case it is:',
|
|
95
|
+
' - an unhealthy capture (the verdict says so: a web font or stylesheet failed to load in the current capture or the baseline):',
|
|
96
|
+
' never noise; fix what failed (the page, the server or the test) and re-run, and never approve it as a baseline,',
|
|
85
97
|
' - likely render noise (identical DOM and computed styles match, and the diff is small and scattered; still not proof),',
|
|
98
|
+
' - rendering drift (identical DOM and computed styles match, and the environment changed since the baseline:',
|
|
99
|
+
' a browser build, OS or distro, device scale or capture method; the verdict names it): the machine changed, not the page,',
|
|
100
|
+
' so compare the images (get_diff) and, if they match apart from rendering, re-baseline once the human agrees; never call it noise,',
|
|
86
101
|
' - concentrated in one area or large (identical DOM and computed styles match, but the diff sits in one area',
|
|
87
102
|
' or is over 1% of pixels): a bad capture or a change the style check does not cover, so call get_diff(name)',
|
|
88
103
|
' and compare the images; do not call it noise,',
|
|
@@ -112,7 +127,7 @@ exports.shellArg = shellArg;
|
|
|
112
127
|
*/
|
|
113
128
|
function nextStepsFor(baselinesDir = '.testivai/baselines') {
|
|
114
129
|
const dir = (0, exports.shellArg)(baselinesDir.replace(/[`\r\n]/g, '') || '.');
|
|
115
|
-
return ('for an intended change, approve it once the human agrees (`/testivai approve <name>` on the pull request, or `npx testivai approve <name>` locally); for a bug, what to fix; for a possible bug, what to check; for a glitch, re-run the tests or replace the baseline from a capture two runs agree on; ' +
|
|
130
|
+
return ('for an intended change, approve it once the human agrees (`/testivai approve <name>` on the pull request, or `npx testivai approve <name>` locally); for a bug, what to fix; for a possible bug, what to check; for a glitch, re-run the tests or replace the baseline from a capture two runs agree on (for an unhealthy capture, fix what failed to load first; an unhealthy baseline is re-baselined from a healthy run); ' +
|
|
116
131
|
`for a missing baseline, approving does nothing (it only promotes a new capture): an intended removal deletes its baseline directory (for example \`git rm -r ${dir}/<name>\`) in the same change, and a bug restores the test or its capture.`);
|
|
117
132
|
}
|
|
118
133
|
/** One line of prompt text per argument line, quoted, so an argument cannot read as instructions. */
|
|
@@ -161,18 +176,22 @@ exports.TRIAGE_PROMPT = {
|
|
|
161
176
|
'- **bug**: the page changed in a way the change under test was not meant to make: an element it did not touch changed, or the result looks broken (clipped, overlapping or missing content).',
|
|
162
177
|
'- **possible bug**: the page really changed but the evidence cannot settle whether that was meant, or the evidence is incomplete (styles not compared, no DOM data, images that disagree with the signals). Say exactly what a person should check.',
|
|
163
178
|
'',
|
|
164
|
-
'Evidence: start with get_visual_results, then call explain_snapshot for each snapshot you triage and get_diff to look at its baseline, current and diff images (for a missing baseline, get_diff returns only its committed screenshot). The signals say whether the page changed; the images say whether it looks right and which capture is off. Weigh them together:',
|
|
179
|
+
'Evidence: start with get_visual_results, then call explain_snapshot for each snapshot you triage and get_diff to look at its baseline, current and diff images (for a missing baseline, get_diff returns only its committed screenshot). The full-page images are downscaled to fit and show where the changes are; judge text, wrapping and clipping from the crops of the changed regions that follow them, at native scale (get_diff with `region` or `y` and `height` crops another area). The signals say whether the page changed; the images say whether it looks right and which capture is off. Weigh them together:',
|
|
165
180
|
'',
|
|
166
181
|
'| explain_snapshot shows | What it means |',
|
|
167
182
|
'|---|---|',
|
|
183
|
+
'| captureHealth.unhealthy set (the verdict says "unhealthy capture") | A web font or stylesheet failed to load, or fonts were still loading, in the current capture or the baseline (captureHealth.reasons says what), so that image does not show the page as built and its diff is never render noise: an unhealthy capture is a glitch of the capture or a broken asset; fix the page, the server or the test; never approve it as a baseline. It is a glitch unless the change under test touched the asset that failed (moved, renamed or removed a font or stylesheet, or changed its path): then it is a bug. When the baseline is the unhealthy side, the next step is to re-baseline from a healthy run. When captureHealth.sameOnBothSides is true, the baseline failed the same way: the diff compares like with like and the pass tolerances (maxDiffPercent, maxDiffPixels, shiftTolerance) applied, never noise auto-pass; judge the diff itself, and name the broken asset as something to fix. captureHealth.warnings (broken images, failed scripts) make no capture unhealthy: weigh a broken image where it sits in the diff. |',
|
|
168
184
|
'| dom.changed true, or styleCheck "mismatch" | The page really changed, so this is never a glitch: decide between intended change, bug and possible bug. A DOM change can restyle elements too (a class change); judge the elements styleChanges lists. |',
|
|
169
185
|
'| pageShift | Content was inserted or removed above pageShift.belowY and the moved elements are unchanged: triage what was inserted or removed, not what moved. |',
|
|
186
|
+
'| environment.renderingDelta non-empty, DOM unchanged and styleCheck "match" (rendering drift) | The environment the snapshot was captured in changed since the baseline (the verdict names what: a browser build, OS or distro, device scale, capture method) and the page did not: a glitch of the environment, not render noise. If the change under test itself changed the environment (a Playwright or browser upgrade, a new CI image), it is an intended change. Either way the next step is to re-baseline from this environment once the images match apart from rendering; if they differ in more than rendering, judge that difference on its own. |',
|
|
170
187
|
'| DOM unchanged and styleCheck "match" | Usually render noise, but only when the diff is small and scattered. A larger diff, or one confined to one area, is either a bad capture or a change the style check cannot see: it compares colors, fonts, borders, spacing, display, opacity, visibility and shadows, and does not cover size, overflow, position, transform, text decoration, filters, pseudo-elements, or images and other assets. See "Bad captures" below. |',
|
|
171
188
|
'| DOM unchanged, styleCheck "unavailable" or missing | Styles not compared: it could be render noise or a stylesheet-only change, so it is not a glitch on the DOM evidence alone. Look at the images; a visible styling difference is a real change, and the signs of a bad capture listed below can also come from a stylesheet change here. |',
|
|
172
189
|
'| status "new" | There is no baseline to compare with: check the capture itself for obvious defects. |',
|
|
173
190
|
'| status "missing" (in missingBaselines) | A committed baseline got no capture this run: there is no current image, and the report cannot tell a removed or renamed test from a skipped or failing one. Read the change under test. It removed or renamed that test or snapshot on purpose (the intent covers it): intended change. It removed or renamed it without meaning to (the intent does not cover it; for a rename, a new snapshot under the other name is the other half), or broke what the test needs to reach its capture (the page, a selector it waits for): bug. Otherwise possible bug: tell a person to check the test run\'s log for a failed or skipped test. Never a glitch on this evidence: there is no capture to call bad. |',
|
|
174
191
|
'',
|
|
175
|
-
'
|
|
192
|
+
'Unchanged DOM: no element, attribute or text differs between the baseline and the current capture (the DOM diff compares text too). The baseline is the last approved capture, and it can already contain the change under test (a copy edit approved earlier on the same branch), so a text or markup edit in the change under test never explains an identical-DOM diff, even where its regions sit on text the change edited. Only something the DOM does not record can: a stylesheet change the style check does not cover, an image, a font or another asset, the environment it was captured in (rendering drift, above), or the capture itself. If the change under test touched none of those, it is not an intended change: call it a glitch or a possible bug.',
|
|
193
|
+
'',
|
|
194
|
+
'Bad captures: render noise is small and scattered (anti-aliasing and font hinting at the edges of glyphs). When the DOM is unchanged and styleCheck is "match" but the diff is larger or sits in one area, compare the two images. A block of content shifted with nothing inserted, text drawn at a different size in one place, content cut off, or background where content belongs can be a bad capture, or a change to something the style check does not cover. Look at what the change under test touched: if it changed CSS, an image, a font or another asset that could reach that area, judge it as a real change (intended change, bug or possible bug; an edit to text or markup cannot cause it, since the DOM is unchanged). Call it a glitch only when nothing in the change could have caused it, and say which image is wrong: if it is the baseline itself, it has to be replaced from a capture that two runs agree on; if it is the current capture, re-run the tests. If you cannot see what the change touched, say so, and call it a glitch only if the images clearly show a broken capture (a torn, half-drawn or partly blank render); otherwise a possible bug.',
|
|
176
195
|
'',
|
|
177
196
|
'Intent: judge intended change against bug by what the change under test was meant to do.',
|
|
178
197
|
...intentText,
|
package/dist/tool-meta.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-meta.js","sourceRoot":"","sources":["../src/tool-meta.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"tool-meta.js","sourceRoot":"","sources":["../src/tool-meta.ts"],"names":[],"mappings":";;;AA6PA,kCAKC;AAnPD,6EAA6E;AAC7E,6EAA6E;AAC7E,6CAA6C;AAC7C,MAAM,uBAAuB,GAAG,EAAE,mCAAmC,EAAE,IAAI,EAAE,CAAC;AAE9E,0EAA0E;AAC1E,gFAAgF;AAChF,MAAM,UAAU,GAAa;IAC3B,KAAK,EA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AAI,EAAE,CAAC;QACtD,MAAM,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC,cAAc,IAAI,IAAI,CAAC,CAAC,CAAC,0DAA0D,CAAC;QAC1G,OAAO;YACL,UAAU,MAAM,8KAA8K,IAAI,CAAC,CAAC,CAAC,kYAAkY,CAAC,CAAC,CAAC,EAAE,EAAE;YAC9kB,EAAE;YACF,qBAAa,CAAC,MAAM,CAAC,MAAM,CAAC;YAC5B,EAAE;YACF,4BAA4B;YAC5B,EAAE;YACF,2BAA2B;YAC3B,yDAAyD;YACzD,4DAA4D;YAC5D,wEAAwE;YACxE,gBAAgB,YAAY,CAAC,YAAY,CAAC,EAAE;YAC5C,EAAE;YACF,6CAA6C;YAC7C,EAAE;YACF,qBAAa,CAAC,YAAY;SAC3B,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACf,CAAC;CACF,CAAC;AAKF,SAAgB,WAAW,CAAC,EAAE,cAAc,EAA+B;IACzE,IAAI,cAAc;QAAE,OAAO,iBAAS,CAAC;IACrC,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,eAAe,EAAE,GAAG,iBAAS,CAAC,gBAAgB,CAAC;IAC5E,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,UAAU,EAAE,GAAG,iBAAS,CAAC,WAAW,CAAC;IAC7D,OAAO,EAAE,GAAG,iBAAS,EAAE,gBAAgB,EAAE,eAAe,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC;AACtF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@testivai/mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "MCP server exposing TestivAI visual regression results to AI coding agents",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
39
39
|
"pngjs": "^7.0.0",
|
|
40
|
-
"zod": "^
|
|
41
|
-
"@testivai/witness": "2.
|
|
40
|
+
"zod": "^4.6.6",
|
|
41
|
+
"@testivai/witness": "2.6.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@types/jest": "^30.0.0",
|
package/server.json
CHANGED
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
"subfolder": "packages/mcp"
|
|
10
10
|
},
|
|
11
11
|
"websiteUrl": "https://github.com/testivai/testivai-oss/tree/main/packages/mcp#readme",
|
|
12
|
-
"version": "0.
|
|
12
|
+
"version": "0.9.1",
|
|
13
13
|
"packages": [
|
|
14
14
|
{
|
|
15
15
|
"registryType": "npm",
|
|
16
16
|
"registryBaseUrl": "https://registry.npmjs.org",
|
|
17
17
|
"identifier": "@testivai/mcp",
|
|
18
|
-
"version": "0.
|
|
18
|
+
"version": "0.9.1",
|
|
19
19
|
"transport": {
|
|
20
20
|
"type": "stdio"
|
|
21
21
|
}
|