browser-devtools-mcp 0.0.3 → 0.1.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 +507 -59
- package/dist/browser.js +6 -0
- package/dist/browser.js.map +1 -1
- package/dist/config.js +60 -24
- package/dist/config.js.map +1 -1
- package/dist/context.js +28 -0
- package/dist/context.js.map +1 -1
- package/dist/otel/otel-controller.js +4 -0
- package/dist/otel/otel-controller.js.map +1 -1
- package/dist/server-info.js +133 -18
- package/dist/server-info.js.map +1 -1
- package/dist/tools/content/take-screenshot.js +183 -1
- package/dist/tools/content/take-screenshot.js.map +1 -1
- package/dist/tools/figma/compare/compare-image-embedding.js +159 -0
- package/dist/tools/figma/compare/compare-image-embedding.js.map +1 -0
- package/dist/tools/figma/compare/compare-mssim.js +98 -0
- package/dist/tools/figma/compare/compare-mssim.js.map +1 -0
- package/dist/tools/figma/compare/compare-text-embedding.js +291 -0
- package/dist/tools/figma/compare/compare-text-embedding.js.map +1 -0
- package/dist/tools/figma/compare/index.js +139 -0
- package/dist/tools/figma/compare/index.js.map +1 -0
- package/dist/tools/figma/compare/types.js +3 -0
- package/dist/tools/figma/compare/types.js.map +1 -0
- package/dist/tools/figma/compare/vector.js +46 -0
- package/dist/tools/figma/compare/vector.js.map +1 -0
- package/dist/tools/figma/compare-page-with-design.js +240 -0
- package/dist/tools/figma/compare-page-with-design.js.map +1 -0
- package/dist/tools/figma/figma-service.js +134 -0
- package/dist/tools/figma/figma-service.js.map +1 -0
- package/dist/tools/figma/index.js +6 -0
- package/dist/tools/figma/index.js.map +1 -0
- package/dist/tools/index.js +12 -2
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/interaction/index.js +6 -2
- package/dist/tools/interaction/index.js.map +1 -1
- package/dist/tools/interaction/resize-viewport.js +110 -0
- package/dist/tools/interaction/resize-viewport.js.map +1 -0
- package/dist/tools/interaction/resize-window.js +261 -0
- package/dist/tools/interaction/resize-window.js.map +1 -0
- package/dist/tools/interaction/scroll.js +304 -0
- package/dist/tools/interaction/scroll.js.map +1 -0
- package/dist/tools/{monitoring → o11y}/get-console-messages.js +1 -1
- package/dist/tools/o11y/get-console-messages.js.map +1 -0
- package/dist/tools/{monitoring → o11y}/get-http-requests.js +1 -1
- package/dist/tools/o11y/get-http-requests.js.map +1 -0
- package/dist/tools/{monitoring → o11y}/get-trace-id.js +1 -1
- package/dist/tools/o11y/get-trace-id.js.map +1 -0
- package/dist/tools/o11y/get-web-vitals.js +595 -0
- package/dist/tools/o11y/get-web-vitals.js.map +1 -0
- package/dist/tools/{monitoring → o11y}/index.js +2 -0
- package/dist/tools/o11y/index.js.map +1 -0
- package/dist/tools/{monitoring → o11y}/new-trace-id.js +1 -1
- package/dist/tools/o11y/new-trace-id.js.map +1 -0
- package/dist/tools/{monitoring → o11y}/set-trace-id.js +1 -1
- package/dist/tools/o11y/set-trace-id.js.map +1 -0
- package/dist/tools/react/get-component-for-element.js +941 -0
- package/dist/tools/react/get-component-for-element.js.map +1 -0
- package/dist/tools/react/get-element-for-component.js +1190 -0
- package/dist/tools/react/get-element-for-component.js.map +1 -0
- package/dist/tools/react/index.js +10 -0
- package/dist/tools/react/index.js.map +1 -0
- package/dist/tools/run/index.js +7 -0
- package/dist/tools/run/index.js.map +1 -0
- package/dist/tools/{interaction/evaluate.js → run/js-in-browser.js} +24 -6
- package/dist/tools/run/js-in-browser.js.map +1 -0
- package/dist/tools/run/js-in-sandbox.js +175 -0
- package/dist/tools/run/js-in-sandbox.js.map +1 -0
- package/dist/tools/stub/clear.js +41 -0
- package/dist/tools/stub/clear.js.map +1 -0
- package/dist/tools/stub/index.js +14 -0
- package/dist/tools/stub/index.js.map +1 -0
- package/dist/tools/stub/intercept-http-request.js +112 -0
- package/dist/tools/stub/intercept-http-request.js.map +1 -0
- package/dist/tools/stub/list.js +75 -0
- package/dist/tools/stub/list.js.map +1 -0
- package/dist/tools/stub/mock-http-response.js +152 -0
- package/dist/tools/stub/mock-http-response.js.map +1 -0
- package/dist/tools/stub/stub-controller.js +284 -0
- package/dist/tools/stub/stub-controller.js.map +1 -0
- package/dist/tools/sync/index.js +6 -0
- package/dist/tools/sync/index.js.map +1 -0
- package/dist/tools/sync/wait-for-network-idle.js +152 -0
- package/dist/tools/sync/wait-for-network-idle.js.map +1 -0
- package/package.json +16 -3
- package/dist/tools/interaction/evaluate.js.map +0 -1
- package/dist/tools/monitoring/get-console-messages.js.map +0 -1
- package/dist/tools/monitoring/get-http-requests.js.map +0 -1
- package/dist/tools/monitoring/get-trace-id.js.map +0 -1
- package/dist/tools/monitoring/index.js.map +0 -1
- package/dist/tools/monitoring/new-trace-id.js.map +0 -1
- package/dist/tools/monitoring/set-trace-id.js.map +0 -1
|
@@ -0,0 +1,595 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetWebVitals = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const DEFAULT_WAIT_MS = 0;
|
|
6
|
+
const MAX_WAIT_MS = 30_000;
|
|
7
|
+
function rateMs(value, good, poor) {
|
|
8
|
+
if (typeof value !== 'number' || !Number.isFinite(value)) {
|
|
9
|
+
return {
|
|
10
|
+
rating: 'not_available',
|
|
11
|
+
value: null,
|
|
12
|
+
unit: 'ms',
|
|
13
|
+
thresholds: { good, poor },
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
if (value <= good) {
|
|
17
|
+
return {
|
|
18
|
+
rating: 'good',
|
|
19
|
+
value,
|
|
20
|
+
unit: 'ms',
|
|
21
|
+
thresholds: { good, poor },
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
if (value > poor) {
|
|
25
|
+
return {
|
|
26
|
+
rating: 'poor',
|
|
27
|
+
value,
|
|
28
|
+
unit: 'ms',
|
|
29
|
+
thresholds: { good, poor },
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
rating: 'needs_improvement',
|
|
34
|
+
value,
|
|
35
|
+
unit: 'ms',
|
|
36
|
+
thresholds: { good, poor },
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function rateScore(value, good, poor) {
|
|
40
|
+
if (typeof value !== 'number' || !Number.isFinite(value)) {
|
|
41
|
+
return {
|
|
42
|
+
rating: 'not_available',
|
|
43
|
+
value: null,
|
|
44
|
+
unit: 'score',
|
|
45
|
+
thresholds: { good, poor },
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
if (value <= good) {
|
|
49
|
+
return {
|
|
50
|
+
rating: 'good',
|
|
51
|
+
value,
|
|
52
|
+
unit: 'score',
|
|
53
|
+
thresholds: { good, poor },
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
if (value > poor) {
|
|
57
|
+
return {
|
|
58
|
+
rating: 'poor',
|
|
59
|
+
value,
|
|
60
|
+
unit: 'score',
|
|
61
|
+
thresholds: { good, poor },
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
rating: 'needs_improvement',
|
|
66
|
+
value,
|
|
67
|
+
unit: 'score',
|
|
68
|
+
thresholds: { good, poor },
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
function formatRating(r) {
|
|
72
|
+
if (r === 'needs_improvement') {
|
|
73
|
+
return 'needs improvement';
|
|
74
|
+
}
|
|
75
|
+
if (r === 'not_available') {
|
|
76
|
+
return 'not available';
|
|
77
|
+
}
|
|
78
|
+
return r;
|
|
79
|
+
}
|
|
80
|
+
function buildRecommendations(params) {
|
|
81
|
+
const lcpRating = params.ratings.lcp.rating;
|
|
82
|
+
const inpRating = params.ratings.inp.rating;
|
|
83
|
+
const clsRating = params.ratings.cls.rating;
|
|
84
|
+
const ttfbRating = params.ratings.ttfb.rating;
|
|
85
|
+
const fcpRating = params.ratings.fcp.rating;
|
|
86
|
+
const coreWebVitalsPassed = lcpRating === 'good' && inpRating === 'good' && clsRating === 'good';
|
|
87
|
+
const summary = [];
|
|
88
|
+
if (coreWebVitalsPassed) {
|
|
89
|
+
summary.push('Core Web Vitals look good (LCP, INP and CLS are all within recommended thresholds).');
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
summary.push('Core Web Vitals need attention. Focus on the worst-rated metric first (LCP, INP, or CLS).');
|
|
93
|
+
}
|
|
94
|
+
const lcp = [];
|
|
95
|
+
const inp = [];
|
|
96
|
+
const cls = [];
|
|
97
|
+
const ttfb = [];
|
|
98
|
+
const fcp = [];
|
|
99
|
+
const general = [];
|
|
100
|
+
if (params.lcpSelectorHint) {
|
|
101
|
+
general.push(`LCP element hint (best-effort): ${params.lcpSelectorHint}`);
|
|
102
|
+
}
|
|
103
|
+
// LCP guidance
|
|
104
|
+
if (lcpRating === 'poor' || lcpRating === 'needs_improvement') {
|
|
105
|
+
lcp.push('Optimize the LCP element (often the hero image, headline, or main content above the fold).');
|
|
106
|
+
lcp.push('Reduce render-blocking resources (critical CSS, JS). Consider inlining critical CSS and deferring non-critical JS.');
|
|
107
|
+
lcp.push('Preload the LCP resource (e.g., <link rel="preload"> for the hero image/font) and ensure it is discoverable without heavy JS.');
|
|
108
|
+
lcp.push('Improve server response and caching. A slow TTFB often delays LCP.');
|
|
109
|
+
lcp.push('Avoid client-only rendering for above-the-fold content when possible; stream/SSR critical content.');
|
|
110
|
+
}
|
|
111
|
+
else if (lcpRating === 'good') {
|
|
112
|
+
lcp.push('LCP is within the recommended threshold. Keep the above-the-fold path lean.');
|
|
113
|
+
}
|
|
114
|
+
else {
|
|
115
|
+
lcp.push('LCP is not available in this browser/session. Consider using Chromium or a page-load scenario that produces LCP entries.');
|
|
116
|
+
}
|
|
117
|
+
// INP guidance
|
|
118
|
+
if (inpRating === 'poor' || inpRating === 'needs_improvement') {
|
|
119
|
+
inp.push('Break up long main-thread tasks. Aim to keep tasks under ~50ms (split work, yield to the event loop).');
|
|
120
|
+
inp.push('Reduce expensive work in input handlers (click, pointer, key events). Move non-urgent work to idle time.');
|
|
121
|
+
inp.push('Avoid synchronous layout thrash during interactions (batch DOM reads/writes, reduce forced reflow).');
|
|
122
|
+
inp.push('Defer heavy third-party scripts and reduce JavaScript bundle size to improve responsiveness.');
|
|
123
|
+
}
|
|
124
|
+
else if (inpRating === 'good') {
|
|
125
|
+
inp.push('INP is within the recommended threshold. Keep interaction handlers lightweight.');
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
inp.push('INP is not available in this browser/session. It requires Event Timing support and user interactions.');
|
|
129
|
+
}
|
|
130
|
+
// CLS guidance
|
|
131
|
+
if (clsRating === 'poor' || clsRating === 'needs_improvement') {
|
|
132
|
+
cls.push('Reserve space for images/iframes/ads (set width/height or aspect-ratio) to prevent layout jumps.');
|
|
133
|
+
cls.push('Avoid inserting content above existing content unless it is in response to a user interaction.');
|
|
134
|
+
cls.push('Use stable font loading (font-display: swap/optional) and consider preloading critical fonts to reduce text shifts.');
|
|
135
|
+
cls.push('Be careful with late-loading banners/toasts; render them in reserved containers.');
|
|
136
|
+
}
|
|
137
|
+
else if (clsRating === 'good') {
|
|
138
|
+
cls.push('CLS is within the recommended threshold. Keep layout stable during load and async updates.');
|
|
139
|
+
}
|
|
140
|
+
else {
|
|
141
|
+
cls.push('CLS is not available in this browser/session. Consider Chromium or a scenario with visible layout changes.');
|
|
142
|
+
}
|
|
143
|
+
// TTFB guidance (supporting)
|
|
144
|
+
if (ttfbRating === 'poor' || ttfbRating === 'needs_improvement') {
|
|
145
|
+
ttfb.push('Improve backend latency: reduce server processing time, optimize DB queries, and eliminate unnecessary middleware.');
|
|
146
|
+
ttfb.push('Enable CDN/edge caching where possible. Use caching headers and avoid dynamic responses for static content.');
|
|
147
|
+
ttfb.push('Reduce cold-start and TLS overhead (keep-alive, warm pools, edge runtimes).');
|
|
148
|
+
}
|
|
149
|
+
else if (ttfbRating === 'good') {
|
|
150
|
+
ttfb.push('TTFB is good. Backend/network latency is unlikely to be the primary bottleneck.');
|
|
151
|
+
}
|
|
152
|
+
else {
|
|
153
|
+
ttfb.push('TTFB is not available in this browser/session.');
|
|
154
|
+
}
|
|
155
|
+
// FCP guidance (supporting)
|
|
156
|
+
if (fcpRating === 'poor' || fcpRating === 'needs_improvement') {
|
|
157
|
+
fcp.push('Reduce render-blocking CSS/JS and prioritize critical content for first paint.');
|
|
158
|
+
fcp.push('Optimize above-the-fold resources and avoid large synchronous scripts during initial load.');
|
|
159
|
+
fcp.push('Consider code-splitting and preloading critical assets to improve first paint.');
|
|
160
|
+
}
|
|
161
|
+
else if (fcpRating === 'good') {
|
|
162
|
+
fcp.push('FCP is good. The page provides early visual feedback.');
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
fcp.push('FCP is not available in this browser/session.');
|
|
166
|
+
}
|
|
167
|
+
general.push('For reliable debugging, capture metrics after navigation and after user actions that trigger loading or layout changes.');
|
|
168
|
+
general.push('If values look unstable, try adding waitMs (e.g., 1000-3000) and re-measure after the UI settles.');
|
|
169
|
+
return {
|
|
170
|
+
coreWebVitalsPassed,
|
|
171
|
+
summary,
|
|
172
|
+
lcp,
|
|
173
|
+
inp,
|
|
174
|
+
cls,
|
|
175
|
+
ttfb,
|
|
176
|
+
fcp,
|
|
177
|
+
general,
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
class GetWebVitals {
|
|
181
|
+
name() {
|
|
182
|
+
return 'o11y-get-web-vitals';
|
|
183
|
+
}
|
|
184
|
+
description() {
|
|
185
|
+
return `
|
|
186
|
+
Collects Web Vitals-style performance metrics and provides recommendations based on Google's thresholds.
|
|
187
|
+
|
|
188
|
+
Core Web Vitals:
|
|
189
|
+
- LCP (ms): Largest Contentful Paint (good <= 2500, poor > 4000)
|
|
190
|
+
- INP (ms): Interaction to Next Paint (good <= 200, poor > 500)
|
|
191
|
+
- CLS (score): Cumulative Layout Shift (good <= 0.1, poor > 0.25)
|
|
192
|
+
|
|
193
|
+
Supporting diagnostics:
|
|
194
|
+
- TTFB (ms): Time to First Byte (good <= 800, poor > 1800)
|
|
195
|
+
- FCP (ms): First Contentful Paint (good <= 1800, poor > 3000)
|
|
196
|
+
|
|
197
|
+
Guidance:
|
|
198
|
+
- Call after navigation and after user actions.
|
|
199
|
+
- If you need more stable LCP/CLS/INP, pass waitMs (e.g. 1000-3000).
|
|
200
|
+
- Some metrics may be unavailable depending on browser support and whether interactions occurred.
|
|
201
|
+
`.trim();
|
|
202
|
+
}
|
|
203
|
+
inputSchema() {
|
|
204
|
+
return {
|
|
205
|
+
waitMs: zod_1.z
|
|
206
|
+
.number()
|
|
207
|
+
.int()
|
|
208
|
+
.min(0)
|
|
209
|
+
.max(MAX_WAIT_MS)
|
|
210
|
+
.optional()
|
|
211
|
+
.default(DEFAULT_WAIT_MS)
|
|
212
|
+
.describe('Optional wait duration in milliseconds before reading metrics (default: 0).'),
|
|
213
|
+
includeDebug: zod_1.z
|
|
214
|
+
.boolean()
|
|
215
|
+
.optional()
|
|
216
|
+
.default(false)
|
|
217
|
+
.describe('If true, returns additional debug details such as entry counts and LCP element hint.'),
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
outputSchema() {
|
|
221
|
+
const ratingSchema = zod_1.z.object({
|
|
222
|
+
rating: zod_1.z
|
|
223
|
+
.enum(['good', 'needs_improvement', 'poor', 'not_available'])
|
|
224
|
+
.describe('Rating based on Google thresholds.'),
|
|
225
|
+
value: zod_1.z
|
|
226
|
+
.number()
|
|
227
|
+
.nullable()
|
|
228
|
+
.describe('Metric value (null if unavailable).'),
|
|
229
|
+
unit: zod_1.z.enum(['ms', 'score']).describe('Unit of the metric.'),
|
|
230
|
+
thresholds: zod_1.z
|
|
231
|
+
.object({
|
|
232
|
+
good: zod_1.z
|
|
233
|
+
.number()
|
|
234
|
+
.describe('Upper bound for the "good" rating.'),
|
|
235
|
+
poor: zod_1.z
|
|
236
|
+
.number()
|
|
237
|
+
.describe('Lower bound for the "poor" rating.'),
|
|
238
|
+
})
|
|
239
|
+
.describe('Thresholds used for rating.'),
|
|
240
|
+
});
|
|
241
|
+
return {
|
|
242
|
+
url: zod_1.z.string().describe('Current page URL.'),
|
|
243
|
+
title: zod_1.z.string().describe('Current page title.'),
|
|
244
|
+
timestampMs: zod_1.z
|
|
245
|
+
.number()
|
|
246
|
+
.int()
|
|
247
|
+
.describe('Unix epoch timestamp (ms) when the metrics were captured.'),
|
|
248
|
+
metrics: zod_1.z
|
|
249
|
+
.object({
|
|
250
|
+
lcpMs: zod_1.z
|
|
251
|
+
.number()
|
|
252
|
+
.nullable()
|
|
253
|
+
.describe('Largest Contentful Paint in milliseconds.'),
|
|
254
|
+
inpMs: zod_1.z
|
|
255
|
+
.number()
|
|
256
|
+
.nullable()
|
|
257
|
+
.describe('Interaction to Next Paint in milliseconds (best-effort approximation).'),
|
|
258
|
+
cls: zod_1.z
|
|
259
|
+
.number()
|
|
260
|
+
.nullable()
|
|
261
|
+
.describe('Cumulative Layout Shift score.'),
|
|
262
|
+
ttfbMs: zod_1.z
|
|
263
|
+
.number()
|
|
264
|
+
.nullable()
|
|
265
|
+
.describe('Time to First Byte in milliseconds.'),
|
|
266
|
+
fcpMs: zod_1.z
|
|
267
|
+
.number()
|
|
268
|
+
.nullable()
|
|
269
|
+
.describe('First Contentful Paint in milliseconds.'),
|
|
270
|
+
})
|
|
271
|
+
.describe('Raw metric values (null if unavailable).'),
|
|
272
|
+
ratings: zod_1.z
|
|
273
|
+
.object({
|
|
274
|
+
lcp: ratingSchema.describe('LCP rating.'),
|
|
275
|
+
inp: ratingSchema.describe('INP rating.'),
|
|
276
|
+
cls: ratingSchema.describe('CLS rating.'),
|
|
277
|
+
ttfb: ratingSchema.describe('TTFB rating.'),
|
|
278
|
+
fcp: ratingSchema.describe('FCP rating.'),
|
|
279
|
+
})
|
|
280
|
+
.describe('Ratings computed from Google thresholds.'),
|
|
281
|
+
recommendations: zod_1.z
|
|
282
|
+
.object({
|
|
283
|
+
coreWebVitalsPassed: zod_1.z
|
|
284
|
+
.boolean()
|
|
285
|
+
.describe('True if all Core Web Vitals are rated "good".'),
|
|
286
|
+
summary: zod_1.z
|
|
287
|
+
.array(zod_1.z.string())
|
|
288
|
+
.describe('High-level summary and prioritization guidance.'),
|
|
289
|
+
lcp: zod_1.z
|
|
290
|
+
.array(zod_1.z.string())
|
|
291
|
+
.describe('Recommendations for improving LCP.'),
|
|
292
|
+
inp: zod_1.z
|
|
293
|
+
.array(zod_1.z.string())
|
|
294
|
+
.describe('Recommendations for improving INP.'),
|
|
295
|
+
cls: zod_1.z
|
|
296
|
+
.array(zod_1.z.string())
|
|
297
|
+
.describe('Recommendations for improving CLS.'),
|
|
298
|
+
ttfb: zod_1.z
|
|
299
|
+
.array(zod_1.z.string())
|
|
300
|
+
.describe('Recommendations for improving TTFB.'),
|
|
301
|
+
fcp: zod_1.z
|
|
302
|
+
.array(zod_1.z.string())
|
|
303
|
+
.describe('Recommendations for improving FCP.'),
|
|
304
|
+
general: zod_1.z
|
|
305
|
+
.array(zod_1.z.string())
|
|
306
|
+
.describe('General measurement and debugging notes.'),
|
|
307
|
+
})
|
|
308
|
+
.describe('Recommendations based on the measured values and their ratings.'),
|
|
309
|
+
notes: zod_1.z
|
|
310
|
+
.array(zod_1.z.string())
|
|
311
|
+
.describe('Notes about metric availability, browser limitations, and interpretation.'),
|
|
312
|
+
debug: zod_1.z
|
|
313
|
+
.object({
|
|
314
|
+
waitMs: zod_1.z
|
|
315
|
+
.number()
|
|
316
|
+
.int()
|
|
317
|
+
.describe('Actual wait duration used before reading metrics.'),
|
|
318
|
+
entries: zod_1.z
|
|
319
|
+
.object({
|
|
320
|
+
navigation: zod_1.z
|
|
321
|
+
.number()
|
|
322
|
+
.int()
|
|
323
|
+
.describe('Count of navigation entries.'),
|
|
324
|
+
paint: zod_1.z
|
|
325
|
+
.number()
|
|
326
|
+
.int()
|
|
327
|
+
.describe('Count of paint entries.'),
|
|
328
|
+
lcp: zod_1.z
|
|
329
|
+
.number()
|
|
330
|
+
.int()
|
|
331
|
+
.describe('Count of largest-contentful-paint entries.'),
|
|
332
|
+
layoutShift: zod_1.z
|
|
333
|
+
.number()
|
|
334
|
+
.int()
|
|
335
|
+
.describe('Count of layout-shift entries.'),
|
|
336
|
+
eventTiming: zod_1.z
|
|
337
|
+
.number()
|
|
338
|
+
.int()
|
|
339
|
+
.describe('Count of event timing entries.'),
|
|
340
|
+
})
|
|
341
|
+
.describe('Counts of PerformanceEntry types used to compute metrics.'),
|
|
342
|
+
lastLcpSelectorHint: zod_1.z
|
|
343
|
+
.string()
|
|
344
|
+
.nullable()
|
|
345
|
+
.describe('Best-effort selector hint for the last LCP element (if available).'),
|
|
346
|
+
lastLcpTagName: zod_1.z
|
|
347
|
+
.string()
|
|
348
|
+
.nullable()
|
|
349
|
+
.describe('Tag name of the last LCP element (if available).'),
|
|
350
|
+
})
|
|
351
|
+
.optional()
|
|
352
|
+
.describe('Optional debug details.'),
|
|
353
|
+
};
|
|
354
|
+
}
|
|
355
|
+
async handle(context, args) {
|
|
356
|
+
const waitMs = args.waitMs ?? DEFAULT_WAIT_MS;
|
|
357
|
+
const includeDebug = args.includeDebug === true;
|
|
358
|
+
const pageUrl = String(context.page.url());
|
|
359
|
+
const pageTitle = String(await context.page.title());
|
|
360
|
+
const timestampMs = Date.now();
|
|
361
|
+
const result = await context.page.evaluate(async ({ waitMsEval, includeDebugEval, }) => {
|
|
362
|
+
const notes = [];
|
|
363
|
+
const sleep = (ms) => {
|
|
364
|
+
return new Promise((resolve) => {
|
|
365
|
+
setTimeout(() => resolve(), ms);
|
|
366
|
+
});
|
|
367
|
+
};
|
|
368
|
+
if (waitMsEval > 0) {
|
|
369
|
+
await sleep(waitMsEval);
|
|
370
|
+
}
|
|
371
|
+
// -------------------------
|
|
372
|
+
// TTFB (Navigation Timing)
|
|
373
|
+
// -------------------------
|
|
374
|
+
let ttfbMs = null;
|
|
375
|
+
const navEntries = performance.getEntriesByType('navigation') ?? [];
|
|
376
|
+
if (navEntries.length > 0) {
|
|
377
|
+
const nav = navEntries[0];
|
|
378
|
+
if (typeof nav.responseStart === 'number' &&
|
|
379
|
+
nav.responseStart >= 0) {
|
|
380
|
+
ttfbMs = nav.responseStart;
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
else {
|
|
384
|
+
notes.push('TTFB: navigation entries not available (older browser or restricted timing).');
|
|
385
|
+
}
|
|
386
|
+
// -------------------------
|
|
387
|
+
// FCP (Paint Timing)
|
|
388
|
+
// -------------------------
|
|
389
|
+
let fcpMs = null;
|
|
390
|
+
const paintEntries = performance.getEntriesByType('paint') ?? [];
|
|
391
|
+
const fcp = paintEntries.find((e) => e.name === 'first-contentful-paint');
|
|
392
|
+
if (fcp && typeof fcp.startTime === 'number') {
|
|
393
|
+
fcpMs = fcp.startTime;
|
|
394
|
+
}
|
|
395
|
+
else {
|
|
396
|
+
notes.push('FCP: paint entries not available (browser may not support Paint Timing).');
|
|
397
|
+
}
|
|
398
|
+
// -------------------------
|
|
399
|
+
// LCP (LargestContentfulPaint)
|
|
400
|
+
// -------------------------
|
|
401
|
+
let lcpMs = null;
|
|
402
|
+
let lastLcpEl = null;
|
|
403
|
+
const lcpEntries = performance.getEntriesByType('largest-contentful-paint') ?? [];
|
|
404
|
+
if (lcpEntries.length > 0) {
|
|
405
|
+
const last = lcpEntries[lcpEntries.length - 1];
|
|
406
|
+
if (typeof last.startTime === 'number') {
|
|
407
|
+
lcpMs = last.startTime;
|
|
408
|
+
}
|
|
409
|
+
if (last.element && last.element instanceof Element) {
|
|
410
|
+
lastLcpEl = last.element;
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
else {
|
|
414
|
+
notes.push('LCP: largest-contentful-paint entries not available (requires LCP support).');
|
|
415
|
+
}
|
|
416
|
+
const selectorHintFor = (el) => {
|
|
417
|
+
if (!el) {
|
|
418
|
+
return null;
|
|
419
|
+
}
|
|
420
|
+
const dt = el.getAttribute('data-testid') ||
|
|
421
|
+
el.getAttribute('data-test-id') ||
|
|
422
|
+
el.getAttribute('data-test');
|
|
423
|
+
if (dt && dt.trim()) {
|
|
424
|
+
return ('[data-testid="' + dt.replace(/"/g, '\\"') + '"]');
|
|
425
|
+
}
|
|
426
|
+
const ds = el.getAttribute('data-selector');
|
|
427
|
+
if (ds && ds.trim()) {
|
|
428
|
+
return ('[data-selector="' + ds.replace(/"/g, '\\"') + '"]');
|
|
429
|
+
}
|
|
430
|
+
if (el.id) {
|
|
431
|
+
try {
|
|
432
|
+
return '#' + CSS.escape(el.id);
|
|
433
|
+
}
|
|
434
|
+
catch {
|
|
435
|
+
return '#' + String(el.id);
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
return el.tagName ? el.tagName.toLowerCase() : null;
|
|
439
|
+
};
|
|
440
|
+
// -------------------------
|
|
441
|
+
// CLS (Layout Instability)
|
|
442
|
+
// -------------------------
|
|
443
|
+
let cls = null;
|
|
444
|
+
const layoutShiftEntries = performance.getEntriesByType('layout-shift') ??
|
|
445
|
+
[];
|
|
446
|
+
if (layoutShiftEntries.length > 0) {
|
|
447
|
+
let sum = 0;
|
|
448
|
+
for (const e of layoutShiftEntries) {
|
|
449
|
+
if (e && e.hadRecentInput === true) {
|
|
450
|
+
continue;
|
|
451
|
+
}
|
|
452
|
+
if (typeof e.value === 'number') {
|
|
453
|
+
sum += e.value;
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
cls = sum;
|
|
457
|
+
}
|
|
458
|
+
else {
|
|
459
|
+
notes.push('CLS: layout-shift entries not available (requires Layout Instability API support).');
|
|
460
|
+
}
|
|
461
|
+
// -------------------------
|
|
462
|
+
// INP (Event Timing approximation)
|
|
463
|
+
// -------------------------
|
|
464
|
+
let inpMs = null;
|
|
465
|
+
const eventEntries = performance.getEntriesByType('event') ?? [];
|
|
466
|
+
if (eventEntries.length > 0) {
|
|
467
|
+
let maxDur = 0;
|
|
468
|
+
for (const e of eventEntries) {
|
|
469
|
+
const interactionId = typeof e.interactionId === 'number'
|
|
470
|
+
? e.interactionId
|
|
471
|
+
: 0;
|
|
472
|
+
const duration = typeof e.duration === 'number' ? e.duration : 0;
|
|
473
|
+
if (interactionId > 0) {
|
|
474
|
+
if (duration > maxDur) {
|
|
475
|
+
maxDur = duration;
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
if (maxDur > 0) {
|
|
480
|
+
inpMs = maxDur;
|
|
481
|
+
}
|
|
482
|
+
else {
|
|
483
|
+
notes.push('INP: event timing entries exist but no interactionId-based events were found.');
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
else {
|
|
487
|
+
notes.push('INP: event timing entries not available (requires Event Timing API support).');
|
|
488
|
+
}
|
|
489
|
+
if (notes.length === 0) {
|
|
490
|
+
notes.push('All requested metrics were available.');
|
|
491
|
+
}
|
|
492
|
+
else {
|
|
493
|
+
notes.push('Some metrics may be null due to browser support limitations.');
|
|
494
|
+
}
|
|
495
|
+
const out = {
|
|
496
|
+
metrics: {
|
|
497
|
+
ttfbMs,
|
|
498
|
+
fcpMs,
|
|
499
|
+
lcpMs,
|
|
500
|
+
cls,
|
|
501
|
+
inpMs,
|
|
502
|
+
},
|
|
503
|
+
notes,
|
|
504
|
+
lcp: {
|
|
505
|
+
selectorHint: selectorHintFor(lastLcpEl),
|
|
506
|
+
tagName: lastLcpEl
|
|
507
|
+
? String(lastLcpEl.tagName).toLowerCase()
|
|
508
|
+
: null,
|
|
509
|
+
},
|
|
510
|
+
debug: {
|
|
511
|
+
waitMs: waitMsEval,
|
|
512
|
+
entries: {
|
|
513
|
+
navigation: navEntries.length,
|
|
514
|
+
paint: paintEntries.length,
|
|
515
|
+
lcp: lcpEntries.length,
|
|
516
|
+
layoutShift: layoutShiftEntries.length,
|
|
517
|
+
eventTiming: eventEntries.length,
|
|
518
|
+
},
|
|
519
|
+
},
|
|
520
|
+
};
|
|
521
|
+
if (!includeDebugEval) {
|
|
522
|
+
delete out.debug;
|
|
523
|
+
}
|
|
524
|
+
else {
|
|
525
|
+
out.debug.lastLcpSelectorHint = out.lcp.selectorHint;
|
|
526
|
+
out.debug.lastLcpTagName = out.lcp.tagName;
|
|
527
|
+
}
|
|
528
|
+
return out;
|
|
529
|
+
}, {
|
|
530
|
+
waitMsEval: waitMs,
|
|
531
|
+
includeDebugEval: includeDebug,
|
|
532
|
+
});
|
|
533
|
+
const lcpMs = typeof result?.metrics?.lcpMs === 'number'
|
|
534
|
+
? result.metrics.lcpMs
|
|
535
|
+
: null;
|
|
536
|
+
const inpMs = typeof result?.metrics?.inpMs === 'number'
|
|
537
|
+
? result.metrics.inpMs
|
|
538
|
+
: null;
|
|
539
|
+
const cls = typeof result?.metrics?.cls === 'number'
|
|
540
|
+
? result.metrics.cls
|
|
541
|
+
: null;
|
|
542
|
+
const ttfbMs = typeof result?.metrics?.ttfbMs === 'number'
|
|
543
|
+
? result.metrics.ttfbMs
|
|
544
|
+
: null;
|
|
545
|
+
const fcpMs = typeof result?.metrics?.fcpMs === 'number'
|
|
546
|
+
? result.metrics.fcpMs
|
|
547
|
+
: null;
|
|
548
|
+
// Google thresholds (commonly cited):
|
|
549
|
+
// LCP: good <= 2500ms, poor > 4000ms
|
|
550
|
+
// INP: good <= 200ms, poor > 500ms
|
|
551
|
+
// CLS: good <= 0.1, poor > 0.25
|
|
552
|
+
// Supporting:
|
|
553
|
+
// TTFB: good <= 800ms, poor > 1800ms
|
|
554
|
+
// FCP: good <= 1800ms, poor > 3000ms
|
|
555
|
+
const ratings = {
|
|
556
|
+
lcp: rateMs(lcpMs, 2500, 4000),
|
|
557
|
+
inp: rateMs(inpMs, 200, 500),
|
|
558
|
+
cls: rateScore(cls, 0.1, 0.25),
|
|
559
|
+
ttfb: rateMs(ttfbMs, 800, 1800),
|
|
560
|
+
fcp: rateMs(fcpMs, 1800, 3000),
|
|
561
|
+
};
|
|
562
|
+
const lcpHint = typeof result?.lcp?.selectorHint === 'string'
|
|
563
|
+
? result.lcp.selectorHint
|
|
564
|
+
: null;
|
|
565
|
+
const recommendations = buildRecommendations({
|
|
566
|
+
ratings,
|
|
567
|
+
lcpSelectorHint: lcpHint,
|
|
568
|
+
});
|
|
569
|
+
const notes = Array.isArray(result?.notes)
|
|
570
|
+
? result.notes
|
|
571
|
+
: [];
|
|
572
|
+
notes.push(`Ratings: LCP=${formatRating(ratings.lcp.rating)}, INP=${formatRating(ratings.inp.rating)}, CLS=${formatRating(ratings.cls.rating)}.`);
|
|
573
|
+
const output = {
|
|
574
|
+
url: pageUrl,
|
|
575
|
+
title: pageTitle,
|
|
576
|
+
timestampMs: timestampMs,
|
|
577
|
+
metrics: {
|
|
578
|
+
lcpMs,
|
|
579
|
+
inpMs,
|
|
580
|
+
cls,
|
|
581
|
+
ttfbMs,
|
|
582
|
+
fcpMs,
|
|
583
|
+
},
|
|
584
|
+
ratings,
|
|
585
|
+
recommendations,
|
|
586
|
+
notes,
|
|
587
|
+
};
|
|
588
|
+
if (includeDebug && result?.debug) {
|
|
589
|
+
output.debug = result.debug;
|
|
590
|
+
}
|
|
591
|
+
return output;
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
exports.GetWebVitals = GetWebVitals;
|
|
595
|
+
//# sourceMappingURL=get-web-vitals.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-web-vitals.js","sourceRoot":"","sources":["../../../src/tools/o11y/get-web-vitals.ts"],"names":[],"mappings":";;;AASA,6BAAwB;AAExB,MAAM,eAAe,GAAW,CAAC,CAAC;AAClC,MAAM,WAAW,GAAW,MAAM,CAAC;AAuFnC,SAAS,MAAM,CACX,KAAoB,EACpB,IAAY,EACZ,IAAY;IAEZ,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QACvD,OAAO;YACH,MAAM,EAAE,eAAe;YACvB,KAAK,EAAE,IAAI;YACX,IAAI,EAAE,IAAI;YACV,UAAU,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE;SAC7B,CAAC;IACN,CAAC;IAED,IAAI,KAAK,IAAI,IAAI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AK,QAAQ;YACzC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,YAAY;YACzB,CAAC,CAAC,IAAI,CAAC;QAEf,MAAM,eAAe,GAA6B,oBAAoB,CAAC;YACnE,OAAO;YACP,eAAe,EAAE,OAAO;SAC3B,CAAC,CAAC;QAEH,MAAM,KAAK,GAAkB,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC;YACrD,CAAC,CAAE,MAAM,CAAC,KAAuB;YACjC,CAAC,CAAC,EAAE,CAAC;QAET,KAAK,CAAC,IAAI,CACN,gBAAgB,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS,YAAY,CACjE,OAAO,CAAC,GAAG,CAAC,MAAM,CACrB,SAAS,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAChD,CAAC;QAEF,MAAM,MAAM,GAAuB;YAC/B,GAAG,EAAE,OAAO;YACZ,KAAK,EAAE,SAAS;YAChB,WAAW,EAAE,WAAW;YAExB,OAAO,EAAE;gBACL,KAAK;gBACL,KAAK;gBACL,GAAG;gBACH,MAAM;gBACN,KAAK;aACR;YAED,OAAO;YACP,eAAe;YACf,KAAK;SACR,CAAC;QAEF,IAAI,YAAY,IAAI,MAAM,EAAE,KAAK,EAAE,CAAC;YAChC,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC,KAAoC,CAAC;QAC/D,CAAC;QAED,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ;AAjhBD,oCAihBC"}
|
|
@@ -4,12 +4,14 @@ exports.tools = void 0;
|
|
|
4
4
|
const get_console_messages_1 = require("./get-console-messages");
|
|
5
5
|
const get_http_requests_1 = require("./get-http-requests");
|
|
6
6
|
const get_trace_id_1 = require("./get-trace-id");
|
|
7
|
+
const get_web_vitals_1 = require("./get-web-vitals");
|
|
7
8
|
const new_trace_id_1 = require("./new-trace-id");
|
|
8
9
|
const set_trace_id_1 = require("./set-trace-id");
|
|
9
10
|
exports.tools = [
|
|
10
11
|
new get_console_messages_1.GetConsoleMessages(),
|
|
11
12
|
new get_http_requests_1.GetHttpRequests(),
|
|
12
13
|
new get_trace_id_1.GetTraceId(),
|
|
14
|
+
new get_web_vitals_1.GetWebVitals(),
|
|
13
15
|
new new_trace_id_1.NewTraceId(),
|
|
14
16
|
new set_trace_id_1.SetTraceId(),
|
|
15
17
|
];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/o11y/index.ts"],"names":[],"mappings":";;;AACA,iEAA4D;AAC5D,2DAAsD;AACtD,iDAA4C;AAC5C,qDAAgD;AAChD,iDAA4C;AAC5C,iDAA4C;AAE/B,QAAA,KAAK,GAAW;IACzB,IAAI,yCAAkB,EAAE;IACxB,IAAI,mCAAe,EAAE;IACrB,IAAI,yBAAU,EAAE;IAChB,IAAI,6BAAY,EAAE;IAClB,IAAI,yBAAU,EAAE;IAChB,IAAI,yBAAU,EAAE;CACnB,CAAC"}
|
|
@@ -5,7 +5,7 @@ const utils_1 = require("../../utils");
|
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
6
|
class NewTraceId {
|
|
7
7
|
name() {
|
|
8
|
-
return '
|
|
8
|
+
return 'o11y_new-trace-id';
|
|
9
9
|
}
|
|
10
10
|
description() {
|
|
11
11
|
return 'Generates new OpenTelemetry compatible trace id and sets it to the current session.';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"new-trace-id.js","sourceRoot":"","sources":["../../../src/tools/o11y/new-trace-id.ts"],"names":[],"mappings":";;;AAQA,uCAAyC;AAEzC,6BAAwB;AAQxB,MAAa,UAAU;IACnB,IAAI;QACA,OAAO,mBAAmB,CAAC;IAC/B,CAAC;IAED,WAAW;QACP,OAAO,qFAAqF,CAAC;IACjG,CAAC;IAED,WAAW;QACP,OAAO,EAAE,CAAC;IACd,CAAC;IAED,YAAY;QACR,OAAO;YACH,OAAO,EAAE,OAAC;iBACL,MAAM,EAAE;iBACR,QAAQ,CACL,sDAAsD,CACzD;SACR,CAAC;IACN,CAAC;IAED,KAAK,CAAC,MAAM,CACR,OAA0B,EAC1B,IAAqB;QAErB,MAAM,OAAO,GAAW,IAAA,kBAAU,GAAE,CAAC;QAErC,MAAM,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAElC,OAAO;YACH,OAAO;SACV,CAAC;IACN,CAAC;CACJ;AAnCD,gCAmCC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"set-trace-id.js","sourceRoot":"","sources":["../../../src/tools/o11y/set-trace-id.ts"],"names":[],"mappings":";;;AASA,6BAAwB;AAQxB,MAAa,UAAU;IACnB,IAAI;QACA,OAAO,mBAAmB,CAAC;IAC/B,CAAC;IAED,WAAW;QACP,OAAO,oEAAoE,CAAC;IAChF,CAAC;IAED,WAAW;QACP,OAAO;YACH,OAAO,EAAE,OAAC;iBACL,MAAM,EAAE;iBACR,QAAQ,CAAC,kDAAkD,CAAC;SACpE,CAAC;IACN,CAAC;IAED,YAAY;QACR,OAAO,EAAE,CAAC;IACd,CAAC;IAED,KAAK,CAAC,MAAM,CACR,OAA0B,EAC1B,IAAqB;QAErB,MAAM,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAEvC,OAAO,EAAE,CAAC;IACd,CAAC;CACJ;AA7BD,gCA6BC"}
|