@rolepod/uiproof 0.4.1 → 0.5.0
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/.claude-plugin/marketplace.json +3 -3
- package/.claude-plugin/plugin.json +2 -2
- package/.codex-plugin/plugin.json +3 -3
- package/.cursor-plugin/plugin.json +2 -2
- package/CHANGELOG.md +99 -0
- package/README.md +11 -7
- package/dist/bin/rolepod-uiproof.js +1434 -32
- package/dist/bin/rolepod-uiproof.js.map +1 -1
- package/dist/index.d.ts +590 -2
- package/dist/index.js +1456 -32
- package/dist/index.js.map +1 -1
- package/dist/schemas/tools.json +34 -1
- package/package.json +1 -1
- package/skills/check-errors/SKILL.md +114 -0
- package/skills/scaffold-e2e/SKILL.md +14 -0
- package/skills/verify-ui/SKILL.md +137 -70
package/dist/index.d.ts
CHANGED
|
@@ -238,6 +238,269 @@ declare const browserNavigateSchema: z.ZodObject<{
|
|
|
238
238
|
session_id: z.ZodString;
|
|
239
239
|
url: z.ZodString;
|
|
240
240
|
}, z.core.$strip>;
|
|
241
|
+
declare const browserHoverShape: {
|
|
242
|
+
readonly session_id: z.ZodString;
|
|
243
|
+
readonly ref: z.ZodString;
|
|
244
|
+
};
|
|
245
|
+
declare const browserHoverSchema: z.ZodObject<{
|
|
246
|
+
session_id: z.ZodString;
|
|
247
|
+
ref: z.ZodString;
|
|
248
|
+
}, z.core.$strip>;
|
|
249
|
+
declare const browserDragShape: {
|
|
250
|
+
readonly session_id: z.ZodString;
|
|
251
|
+
readonly from_ref: z.ZodString;
|
|
252
|
+
readonly to_ref: z.ZodString;
|
|
253
|
+
};
|
|
254
|
+
declare const browserDragSchema: z.ZodObject<{
|
|
255
|
+
session_id: z.ZodString;
|
|
256
|
+
from_ref: z.ZodString;
|
|
257
|
+
to_ref: z.ZodString;
|
|
258
|
+
}, z.core.$strip>;
|
|
259
|
+
declare const browserFillFormShape: {
|
|
260
|
+
readonly session_id: z.ZodString;
|
|
261
|
+
readonly fields: z.ZodArray<z.ZodObject<{
|
|
262
|
+
ref: z.ZodString;
|
|
263
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>;
|
|
264
|
+
kind: z.ZodOptional<z.ZodEnum<{
|
|
265
|
+
input: "input";
|
|
266
|
+
select: "select";
|
|
267
|
+
checkbox: "checkbox";
|
|
268
|
+
radio: "radio";
|
|
269
|
+
}>>;
|
|
270
|
+
}, z.core.$strip>>;
|
|
271
|
+
};
|
|
272
|
+
declare const browserFillFormSchema: z.ZodObject<{
|
|
273
|
+
session_id: z.ZodString;
|
|
274
|
+
fields: z.ZodArray<z.ZodObject<{
|
|
275
|
+
ref: z.ZodString;
|
|
276
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>;
|
|
277
|
+
kind: z.ZodOptional<z.ZodEnum<{
|
|
278
|
+
input: "input";
|
|
279
|
+
select: "select";
|
|
280
|
+
checkbox: "checkbox";
|
|
281
|
+
radio: "radio";
|
|
282
|
+
}>>;
|
|
283
|
+
}, z.core.$strip>>;
|
|
284
|
+
}, z.core.$strip>;
|
|
285
|
+
declare const browserUploadFileShape: {
|
|
286
|
+
readonly session_id: z.ZodString;
|
|
287
|
+
readonly ref: z.ZodString;
|
|
288
|
+
readonly file_path: z.ZodString;
|
|
289
|
+
};
|
|
290
|
+
declare const browserUploadFileSchema: z.ZodObject<{
|
|
291
|
+
session_id: z.ZodString;
|
|
292
|
+
ref: z.ZodString;
|
|
293
|
+
file_path: z.ZodString;
|
|
294
|
+
}, z.core.$strip>;
|
|
295
|
+
declare const browserHandleDialogShape: {
|
|
296
|
+
readonly session_id: z.ZodString;
|
|
297
|
+
readonly action: z.ZodEnum<{
|
|
298
|
+
accept: "accept";
|
|
299
|
+
dismiss: "dismiss";
|
|
300
|
+
accept_with_text: "accept_with_text";
|
|
301
|
+
}>;
|
|
302
|
+
/** Only used when action='accept_with_text'. */
|
|
303
|
+
readonly text: z.ZodOptional<z.ZodString>;
|
|
304
|
+
/**
|
|
305
|
+
* Arming behavior: registers a one-shot handler for the NEXT dialog
|
|
306
|
+
* raised on the page. Call this BEFORE the action that triggers the
|
|
307
|
+
* dialog (e.g. before clicking the button that calls `confirm()`).
|
|
308
|
+
* Default 30s if no dialog appears, handler is auto-removed.
|
|
309
|
+
*/
|
|
310
|
+
readonly timeout_ms: z.ZodOptional<z.ZodNumber>;
|
|
311
|
+
};
|
|
312
|
+
declare const browserHandleDialogSchema: z.ZodObject<{
|
|
313
|
+
session_id: z.ZodString;
|
|
314
|
+
action: z.ZodEnum<{
|
|
315
|
+
accept: "accept";
|
|
316
|
+
dismiss: "dismiss";
|
|
317
|
+
accept_with_text: "accept_with_text";
|
|
318
|
+
}>;
|
|
319
|
+
text: z.ZodOptional<z.ZodString>;
|
|
320
|
+
timeout_ms: z.ZodOptional<z.ZodNumber>;
|
|
321
|
+
}, z.core.$strip>;
|
|
322
|
+
declare const browserConsoleShape: {
|
|
323
|
+
readonly session_id: z.ZodString;
|
|
324
|
+
/** Filter to only these levels. Default: errors+warnings. */
|
|
325
|
+
readonly levels: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
326
|
+
info: "info";
|
|
327
|
+
error: "error";
|
|
328
|
+
debug: "debug";
|
|
329
|
+
warning: "warning";
|
|
330
|
+
log: "log";
|
|
331
|
+
trace: "trace";
|
|
332
|
+
}>>>;
|
|
333
|
+
/** Substring match on message text. */
|
|
334
|
+
readonly contains: z.ZodOptional<z.ZodString>;
|
|
335
|
+
/** Drop all buffered messages after returning. */
|
|
336
|
+
readonly clear: z.ZodDefault<z.ZodBoolean>;
|
|
337
|
+
/** Cap on returned messages (artifact still holds full ring buffer). */
|
|
338
|
+
readonly limit: z.ZodDefault<z.ZodNumber>;
|
|
339
|
+
};
|
|
340
|
+
declare const browserConsoleSchema: z.ZodObject<{
|
|
341
|
+
session_id: z.ZodString;
|
|
342
|
+
levels: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
343
|
+
info: "info";
|
|
344
|
+
error: "error";
|
|
345
|
+
debug: "debug";
|
|
346
|
+
warning: "warning";
|
|
347
|
+
log: "log";
|
|
348
|
+
trace: "trace";
|
|
349
|
+
}>>>;
|
|
350
|
+
contains: z.ZodOptional<z.ZodString>;
|
|
351
|
+
clear: z.ZodDefault<z.ZodBoolean>;
|
|
352
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
353
|
+
}, z.core.$strip>;
|
|
354
|
+
declare const browserNetworkShape: {
|
|
355
|
+
readonly session_id: z.ZodString;
|
|
356
|
+
/** Substring or regex (per `pattern_kind`) match on URL. */
|
|
357
|
+
readonly url_pattern: z.ZodOptional<z.ZodString>;
|
|
358
|
+
readonly pattern_kind: z.ZodDefault<z.ZodEnum<{
|
|
359
|
+
substring: "substring";
|
|
360
|
+
regex: "regex";
|
|
361
|
+
}>>;
|
|
362
|
+
readonly method: z.ZodOptional<z.ZodString>;
|
|
363
|
+
/** Inclusive range — e.g. `{min: 400, max: 599}` for any error response. */
|
|
364
|
+
readonly status_range: z.ZodOptional<z.ZodObject<{
|
|
365
|
+
min: z.ZodNumber;
|
|
366
|
+
max: z.ZodNumber;
|
|
367
|
+
}, z.core.$strip>>;
|
|
368
|
+
readonly only_failed: z.ZodDefault<z.ZodBoolean>;
|
|
369
|
+
/** Write the full HAR file for this session to artifacts/{runId}/network.har. */
|
|
370
|
+
readonly export_har: z.ZodDefault<z.ZodBoolean>;
|
|
371
|
+
/** Drop buffered entries after returning. */
|
|
372
|
+
readonly clear: z.ZodDefault<z.ZodBoolean>;
|
|
373
|
+
readonly limit: z.ZodDefault<z.ZodNumber>;
|
|
374
|
+
};
|
|
375
|
+
declare const browserNetworkSchema: z.ZodObject<{
|
|
376
|
+
session_id: z.ZodString;
|
|
377
|
+
url_pattern: z.ZodOptional<z.ZodString>;
|
|
378
|
+
pattern_kind: z.ZodDefault<z.ZodEnum<{
|
|
379
|
+
substring: "substring";
|
|
380
|
+
regex: "regex";
|
|
381
|
+
}>>;
|
|
382
|
+
method: z.ZodOptional<z.ZodString>;
|
|
383
|
+
status_range: z.ZodOptional<z.ZodObject<{
|
|
384
|
+
min: z.ZodNumber;
|
|
385
|
+
max: z.ZodNumber;
|
|
386
|
+
}, z.core.$strip>>;
|
|
387
|
+
only_failed: z.ZodDefault<z.ZodBoolean>;
|
|
388
|
+
export_har: z.ZodDefault<z.ZodBoolean>;
|
|
389
|
+
clear: z.ZodDefault<z.ZodBoolean>;
|
|
390
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
391
|
+
}, z.core.$strip>;
|
|
392
|
+
/**
|
|
393
|
+
* Runtime environment mutation. Merges resize+emulate. Fields here are
|
|
394
|
+
* the ones Playwright supports changing AFTER context creation. Things
|
|
395
|
+
* that must be set at context-creation time (user_agent, locale,
|
|
396
|
+
* timezone) live on `browser_open` and cannot be changed mid-session.
|
|
397
|
+
*
|
|
398
|
+
* `network_throttle` and `cpu_throttle` are chromium-only (CDP-backed).
|
|
399
|
+
*/
|
|
400
|
+
declare const browserSetEnvShape: {
|
|
401
|
+
readonly session_id: z.ZodString;
|
|
402
|
+
readonly viewport: z.ZodOptional<z.ZodObject<{
|
|
403
|
+
width: z.ZodNumber;
|
|
404
|
+
height: z.ZodNumber;
|
|
405
|
+
}, z.core.$strip>>;
|
|
406
|
+
readonly offline: z.ZodOptional<z.ZodBoolean>;
|
|
407
|
+
readonly geolocation: z.ZodOptional<z.ZodObject<{
|
|
408
|
+
latitude: z.ZodNumber;
|
|
409
|
+
longitude: z.ZodNumber;
|
|
410
|
+
accuracy: z.ZodOptional<z.ZodNumber>;
|
|
411
|
+
}, z.core.$strip>>;
|
|
412
|
+
readonly color_scheme: z.ZodOptional<z.ZodEnum<{
|
|
413
|
+
light: "light";
|
|
414
|
+
dark: "dark";
|
|
415
|
+
"no-preference": "no-preference";
|
|
416
|
+
}>>;
|
|
417
|
+
readonly reduced_motion: z.ZodOptional<z.ZodEnum<{
|
|
418
|
+
reduce: "reduce";
|
|
419
|
+
"no-preference": "no-preference";
|
|
420
|
+
}>>;
|
|
421
|
+
readonly extra_headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
422
|
+
readonly network_throttle: z.ZodOptional<z.ZodEnum<{
|
|
423
|
+
offline: "offline";
|
|
424
|
+
"slow-3g": "slow-3g";
|
|
425
|
+
"fast-3g": "fast-3g";
|
|
426
|
+
"slow-4g": "slow-4g";
|
|
427
|
+
"fast-4g": "fast-4g";
|
|
428
|
+
"no-throttling": "no-throttling";
|
|
429
|
+
}>>;
|
|
430
|
+
/** CPU slowdown multiplier (1 = no throttle, 4 = 4x slower). Chromium only. */
|
|
431
|
+
readonly cpu_throttle: z.ZodOptional<z.ZodNumber>;
|
|
432
|
+
};
|
|
433
|
+
declare const browserSetEnvSchema: z.ZodObject<{
|
|
434
|
+
session_id: z.ZodString;
|
|
435
|
+
viewport: z.ZodOptional<z.ZodObject<{
|
|
436
|
+
width: z.ZodNumber;
|
|
437
|
+
height: z.ZodNumber;
|
|
438
|
+
}, z.core.$strip>>;
|
|
439
|
+
offline: z.ZodOptional<z.ZodBoolean>;
|
|
440
|
+
geolocation: z.ZodOptional<z.ZodObject<{
|
|
441
|
+
latitude: z.ZodNumber;
|
|
442
|
+
longitude: z.ZodNumber;
|
|
443
|
+
accuracy: z.ZodOptional<z.ZodNumber>;
|
|
444
|
+
}, z.core.$strip>>;
|
|
445
|
+
color_scheme: z.ZodOptional<z.ZodEnum<{
|
|
446
|
+
light: "light";
|
|
447
|
+
dark: "dark";
|
|
448
|
+
"no-preference": "no-preference";
|
|
449
|
+
}>>;
|
|
450
|
+
reduced_motion: z.ZodOptional<z.ZodEnum<{
|
|
451
|
+
reduce: "reduce";
|
|
452
|
+
"no-preference": "no-preference";
|
|
453
|
+
}>>;
|
|
454
|
+
extra_headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
455
|
+
network_throttle: z.ZodOptional<z.ZodEnum<{
|
|
456
|
+
offline: "offline";
|
|
457
|
+
"slow-3g": "slow-3g";
|
|
458
|
+
"fast-3g": "fast-3g";
|
|
459
|
+
"slow-4g": "slow-4g";
|
|
460
|
+
"fast-4g": "fast-4g";
|
|
461
|
+
"no-throttling": "no-throttling";
|
|
462
|
+
}>>;
|
|
463
|
+
cpu_throttle: z.ZodOptional<z.ZodNumber>;
|
|
464
|
+
}, z.core.$strip>;
|
|
465
|
+
/**
|
|
466
|
+
* Execute JavaScript in the page context. GATED: server must be started
|
|
467
|
+
* with env `ROLEPOD_ALLOW_EVAL=1`, otherwise the tool returns an
|
|
468
|
+
* `eval_disabled` error. Equivalent to arbitrary code execution — only
|
|
469
|
+
* enable for trusted automation scenarios.
|
|
470
|
+
*
|
|
471
|
+
* `script` is the body of an async function whose return value is sent
|
|
472
|
+
* back as `result`. Use `args` to pass JSON-serialisable values.
|
|
473
|
+
*/
|
|
474
|
+
declare const browserEvaluateShape: {
|
|
475
|
+
readonly session_id: z.ZodString;
|
|
476
|
+
readonly script: z.ZodString;
|
|
477
|
+
readonly args: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
478
|
+
};
|
|
479
|
+
declare const browserEvaluateSchema: z.ZodObject<{
|
|
480
|
+
session_id: z.ZodString;
|
|
481
|
+
script: z.ZodString;
|
|
482
|
+
args: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
483
|
+
}, z.core.$strip>;
|
|
484
|
+
/**
|
|
485
|
+
* Multi-page support. A session owns one browser context, which may
|
|
486
|
+
* have multiple pages (e.g. when an OAuth popup or `target="_blank"`
|
|
487
|
+
* link opens). The active page index is sticky — all subsequent
|
|
488
|
+
* tool calls operate on it until `switch_page` changes it.
|
|
489
|
+
*/
|
|
490
|
+
declare const browserPagesShape: {
|
|
491
|
+
readonly session_id: z.ZodString;
|
|
492
|
+
};
|
|
493
|
+
declare const browserPagesSchema: z.ZodObject<{
|
|
494
|
+
session_id: z.ZodString;
|
|
495
|
+
}, z.core.$strip>;
|
|
496
|
+
declare const browserSwitchPageShape: {
|
|
497
|
+
readonly session_id: z.ZodString;
|
|
498
|
+
readonly index: z.ZodNumber;
|
|
499
|
+
};
|
|
500
|
+
declare const browserSwitchPageSchema: z.ZodObject<{
|
|
501
|
+
session_id: z.ZodString;
|
|
502
|
+
index: z.ZodNumber;
|
|
503
|
+
}, z.core.$strip>;
|
|
241
504
|
declare const verifyUiFlowShape: {
|
|
242
505
|
readonly mode: z.ZodDefault<z.ZodEnum<{
|
|
243
506
|
assert: "assert";
|
|
@@ -297,6 +560,74 @@ declare const verifyUiFlowShape: {
|
|
|
297
560
|
}, z.core.$strip>, z.ZodObject<{
|
|
298
561
|
kind: z.ZodLiteral<"navigate">;
|
|
299
562
|
url: z.ZodString;
|
|
563
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
564
|
+
kind: z.ZodLiteral<"hover">;
|
|
565
|
+
query: z.ZodString;
|
|
566
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
567
|
+
kind: z.ZodLiteral<"drag">;
|
|
568
|
+
from_query: z.ZodString;
|
|
569
|
+
to_query: z.ZodString;
|
|
570
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
571
|
+
kind: z.ZodLiteral<"fill_form">;
|
|
572
|
+
fields: z.ZodArray<z.ZodObject<{
|
|
573
|
+
query: z.ZodString;
|
|
574
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>;
|
|
575
|
+
kind: z.ZodOptional<z.ZodEnum<{
|
|
576
|
+
input: "input";
|
|
577
|
+
select: "select";
|
|
578
|
+
checkbox: "checkbox";
|
|
579
|
+
radio: "radio";
|
|
580
|
+
}>>;
|
|
581
|
+
}, z.core.$strip>>;
|
|
582
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
583
|
+
kind: z.ZodLiteral<"upload">;
|
|
584
|
+
query: z.ZodString;
|
|
585
|
+
file_path: z.ZodString;
|
|
586
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
587
|
+
kind: z.ZodLiteral<"dialog">;
|
|
588
|
+
action: z.ZodEnum<{
|
|
589
|
+
accept: "accept";
|
|
590
|
+
dismiss: "dismiss";
|
|
591
|
+
accept_with_text: "accept_with_text";
|
|
592
|
+
}>;
|
|
593
|
+
text: z.ZodOptional<z.ZodString>;
|
|
594
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
595
|
+
kind: z.ZodLiteral<"set_env">;
|
|
596
|
+
viewport: z.ZodOptional<z.ZodObject<{
|
|
597
|
+
width: z.ZodNumber;
|
|
598
|
+
height: z.ZodNumber;
|
|
599
|
+
}, z.core.$strip>>;
|
|
600
|
+
offline: z.ZodOptional<z.ZodBoolean>;
|
|
601
|
+
geolocation: z.ZodOptional<z.ZodObject<{
|
|
602
|
+
latitude: z.ZodNumber;
|
|
603
|
+
longitude: z.ZodNumber;
|
|
604
|
+
accuracy: z.ZodOptional<z.ZodNumber>;
|
|
605
|
+
}, z.core.$strip>>;
|
|
606
|
+
color_scheme: z.ZodOptional<z.ZodEnum<{
|
|
607
|
+
light: "light";
|
|
608
|
+
dark: "dark";
|
|
609
|
+
"no-preference": "no-preference";
|
|
610
|
+
}>>;
|
|
611
|
+
reduced_motion: z.ZodOptional<z.ZodEnum<{
|
|
612
|
+
reduce: "reduce";
|
|
613
|
+
"no-preference": "no-preference";
|
|
614
|
+
}>>;
|
|
615
|
+
extra_headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
616
|
+
network_throttle: z.ZodOptional<z.ZodEnum<{
|
|
617
|
+
offline: "offline";
|
|
618
|
+
"slow-3g": "slow-3g";
|
|
619
|
+
"fast-3g": "fast-3g";
|
|
620
|
+
"slow-4g": "slow-4g";
|
|
621
|
+
"fast-4g": "fast-4g";
|
|
622
|
+
"no-throttling": "no-throttling";
|
|
623
|
+
}>>;
|
|
624
|
+
cpu_throttle: z.ZodOptional<z.ZodNumber>;
|
|
625
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
626
|
+
kind: z.ZodLiteral<"switch_page">;
|
|
627
|
+
index: z.ZodNumber;
|
|
628
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
629
|
+
kind: z.ZodLiteral<"evaluate">;
|
|
630
|
+
script: z.ZodString;
|
|
300
631
|
}, z.core.$strip>], "kind">>>;
|
|
301
632
|
readonly expect: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
302
633
|
kind: z.ZodLiteral<"text_visible">;
|
|
@@ -315,8 +646,25 @@ declare const verifyUiFlowShape: {
|
|
|
315
646
|
visible: "visible";
|
|
316
647
|
enabled: "enabled";
|
|
317
648
|
}>;
|
|
649
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
650
|
+
kind: z.ZodLiteral<"no_console_errors">;
|
|
651
|
+
exclude_patterns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
652
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
653
|
+
kind: z.ZodLiteral<"no_failed_requests">;
|
|
654
|
+
exclude_patterns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
655
|
+
allow_4xx: z.ZodOptional<z.ZodBoolean>;
|
|
656
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
657
|
+
kind: z.ZodLiteral<"request_made">;
|
|
658
|
+
url_pattern: z.ZodString;
|
|
659
|
+
method: z.ZodOptional<z.ZodString>;
|
|
660
|
+
min_count: z.ZodOptional<z.ZodNumber>;
|
|
661
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
662
|
+
kind: z.ZodLiteral<"response_status">;
|
|
663
|
+
url_pattern: z.ZodString;
|
|
664
|
+
status: z.ZodNumber;
|
|
318
665
|
}, z.core.$strip>], "kind">>>;
|
|
319
666
|
readonly capture: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
667
|
+
trace: "trace";
|
|
320
668
|
screenshot: "screenshot";
|
|
321
669
|
har: "har";
|
|
322
670
|
console: "console";
|
|
@@ -390,6 +738,74 @@ declare const verifyUiFlowSchema: z.ZodObject<{
|
|
|
390
738
|
}, z.core.$strip>, z.ZodObject<{
|
|
391
739
|
kind: z.ZodLiteral<"navigate">;
|
|
392
740
|
url: z.ZodString;
|
|
741
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
742
|
+
kind: z.ZodLiteral<"hover">;
|
|
743
|
+
query: z.ZodString;
|
|
744
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
745
|
+
kind: z.ZodLiteral<"drag">;
|
|
746
|
+
from_query: z.ZodString;
|
|
747
|
+
to_query: z.ZodString;
|
|
748
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
749
|
+
kind: z.ZodLiteral<"fill_form">;
|
|
750
|
+
fields: z.ZodArray<z.ZodObject<{
|
|
751
|
+
query: z.ZodString;
|
|
752
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>;
|
|
753
|
+
kind: z.ZodOptional<z.ZodEnum<{
|
|
754
|
+
input: "input";
|
|
755
|
+
select: "select";
|
|
756
|
+
checkbox: "checkbox";
|
|
757
|
+
radio: "radio";
|
|
758
|
+
}>>;
|
|
759
|
+
}, z.core.$strip>>;
|
|
760
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
761
|
+
kind: z.ZodLiteral<"upload">;
|
|
762
|
+
query: z.ZodString;
|
|
763
|
+
file_path: z.ZodString;
|
|
764
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
765
|
+
kind: z.ZodLiteral<"dialog">;
|
|
766
|
+
action: z.ZodEnum<{
|
|
767
|
+
accept: "accept";
|
|
768
|
+
dismiss: "dismiss";
|
|
769
|
+
accept_with_text: "accept_with_text";
|
|
770
|
+
}>;
|
|
771
|
+
text: z.ZodOptional<z.ZodString>;
|
|
772
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
773
|
+
kind: z.ZodLiteral<"set_env">;
|
|
774
|
+
viewport: z.ZodOptional<z.ZodObject<{
|
|
775
|
+
width: z.ZodNumber;
|
|
776
|
+
height: z.ZodNumber;
|
|
777
|
+
}, z.core.$strip>>;
|
|
778
|
+
offline: z.ZodOptional<z.ZodBoolean>;
|
|
779
|
+
geolocation: z.ZodOptional<z.ZodObject<{
|
|
780
|
+
latitude: z.ZodNumber;
|
|
781
|
+
longitude: z.ZodNumber;
|
|
782
|
+
accuracy: z.ZodOptional<z.ZodNumber>;
|
|
783
|
+
}, z.core.$strip>>;
|
|
784
|
+
color_scheme: z.ZodOptional<z.ZodEnum<{
|
|
785
|
+
light: "light";
|
|
786
|
+
dark: "dark";
|
|
787
|
+
"no-preference": "no-preference";
|
|
788
|
+
}>>;
|
|
789
|
+
reduced_motion: z.ZodOptional<z.ZodEnum<{
|
|
790
|
+
reduce: "reduce";
|
|
791
|
+
"no-preference": "no-preference";
|
|
792
|
+
}>>;
|
|
793
|
+
extra_headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
794
|
+
network_throttle: z.ZodOptional<z.ZodEnum<{
|
|
795
|
+
offline: "offline";
|
|
796
|
+
"slow-3g": "slow-3g";
|
|
797
|
+
"fast-3g": "fast-3g";
|
|
798
|
+
"slow-4g": "slow-4g";
|
|
799
|
+
"fast-4g": "fast-4g";
|
|
800
|
+
"no-throttling": "no-throttling";
|
|
801
|
+
}>>;
|
|
802
|
+
cpu_throttle: z.ZodOptional<z.ZodNumber>;
|
|
803
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
804
|
+
kind: z.ZodLiteral<"switch_page">;
|
|
805
|
+
index: z.ZodNumber;
|
|
806
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
807
|
+
kind: z.ZodLiteral<"evaluate">;
|
|
808
|
+
script: z.ZodString;
|
|
393
809
|
}, z.core.$strip>], "kind">>>;
|
|
394
810
|
expect: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
395
811
|
kind: z.ZodLiteral<"text_visible">;
|
|
@@ -408,8 +824,25 @@ declare const verifyUiFlowSchema: z.ZodObject<{
|
|
|
408
824
|
visible: "visible";
|
|
409
825
|
enabled: "enabled";
|
|
410
826
|
}>;
|
|
827
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
828
|
+
kind: z.ZodLiteral<"no_console_errors">;
|
|
829
|
+
exclude_patterns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
830
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
831
|
+
kind: z.ZodLiteral<"no_failed_requests">;
|
|
832
|
+
exclude_patterns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
833
|
+
allow_4xx: z.ZodOptional<z.ZodBoolean>;
|
|
834
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
835
|
+
kind: z.ZodLiteral<"request_made">;
|
|
836
|
+
url_pattern: z.ZodString;
|
|
837
|
+
method: z.ZodOptional<z.ZodString>;
|
|
838
|
+
min_count: z.ZodOptional<z.ZodNumber>;
|
|
839
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
840
|
+
kind: z.ZodLiteral<"response_status">;
|
|
841
|
+
url_pattern: z.ZodString;
|
|
842
|
+
status: z.ZodNumber;
|
|
411
843
|
}, z.core.$strip>], "kind">>>;
|
|
412
844
|
capture: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
845
|
+
trace: "trace";
|
|
413
846
|
screenshot: "screenshot";
|
|
414
847
|
har: "har";
|
|
415
848
|
console: "console";
|
|
@@ -664,6 +1097,17 @@ declare const ToolNames: {
|
|
|
664
1097
|
readonly browserWaitFor: "rolepod_browser_wait_for";
|
|
665
1098
|
readonly browserScreenshot: "rolepod_browser_screenshot";
|
|
666
1099
|
readonly browserNavigate: "rolepod_browser_navigate";
|
|
1100
|
+
readonly browserHover: "rolepod_browser_hover";
|
|
1101
|
+
readonly browserDrag: "rolepod_browser_drag";
|
|
1102
|
+
readonly browserFillForm: "rolepod_browser_fill_form";
|
|
1103
|
+
readonly browserUploadFile: "rolepod_browser_upload_file";
|
|
1104
|
+
readonly browserHandleDialog: "rolepod_browser_handle_dialog";
|
|
1105
|
+
readonly browserConsole: "rolepod_browser_console";
|
|
1106
|
+
readonly browserNetwork: "rolepod_browser_network";
|
|
1107
|
+
readonly browserSetEnv: "rolepod_browser_set_env";
|
|
1108
|
+
readonly browserEvaluate: "rolepod_browser_evaluate";
|
|
1109
|
+
readonly browserPages: "rolepod_browser_pages";
|
|
1110
|
+
readonly browserSwitchPage: "rolepod_browser_switch_page";
|
|
667
1111
|
readonly verifyUiFlow: "rolepod_verify_ui_flow";
|
|
668
1112
|
readonly auditA11y: "rolepod_audit_a11y";
|
|
669
1113
|
readonly visualDiff: "rolepod_visual_diff";
|
|
@@ -710,6 +1154,30 @@ type OpenOptions = {
|
|
|
710
1154
|
app_package?: string;
|
|
711
1155
|
app_activity?: string;
|
|
712
1156
|
emulator?: string;
|
|
1157
|
+
/**
|
|
1158
|
+
* v0.5 capture lifecycle. Pass when the session needs HAR/video/trace
|
|
1159
|
+
* recording. These MUST be requested at open time because Playwright
|
|
1160
|
+
* wires recordHar/recordVideo at context creation.
|
|
1161
|
+
*/
|
|
1162
|
+
capture?: {
|
|
1163
|
+
har?: {
|
|
1164
|
+
path: string;
|
|
1165
|
+
};
|
|
1166
|
+
video?: {
|
|
1167
|
+
dir: string;
|
|
1168
|
+
sizeWidth?: number;
|
|
1169
|
+
sizeHeight?: number;
|
|
1170
|
+
};
|
|
1171
|
+
trace?: {
|
|
1172
|
+
artifactDir: string;
|
|
1173
|
+
};
|
|
1174
|
+
};
|
|
1175
|
+
};
|
|
1176
|
+
type FillFieldKind = "input" | "select" | "checkbox" | "radio";
|
|
1177
|
+
type FillField = {
|
|
1178
|
+
ref: string;
|
|
1179
|
+
value: string | boolean;
|
|
1180
|
+
kind?: FillFieldKind;
|
|
713
1181
|
};
|
|
714
1182
|
/** Opaque session handle returned by `Engine.open`. */
|
|
715
1183
|
interface Session {
|
|
@@ -742,6 +1210,21 @@ interface Engine {
|
|
|
742
1210
|
screenshot(session: Session, fullPage?: boolean): Promise<Buffer>;
|
|
743
1211
|
/** Web-only. Throws `unsupported_platform` on mobile sessions. */
|
|
744
1212
|
navigate(session: Session, url: string): Promise<void>;
|
|
1213
|
+
/** Move pointer / hover over the element identified by `ref`. */
|
|
1214
|
+
hover(session: Session, ref: string): Promise<void>;
|
|
1215
|
+
/** Drag element `from` onto element `to`. */
|
|
1216
|
+
drag(session: Session, fromRef: string, toRef: string): Promise<void>;
|
|
1217
|
+
/**
|
|
1218
|
+
* Batch-fill multiple form fields in a single call. Token-efficient
|
|
1219
|
+
* alternative to a sequence of `type` calls; also handles checkboxes,
|
|
1220
|
+
* radios, and `<select>` options.
|
|
1221
|
+
*/
|
|
1222
|
+
fillForm(session: Session, fields: FillField[]): Promise<void>;
|
|
1223
|
+
/**
|
|
1224
|
+
* Attach a local file to the file input identified by `ref`.
|
|
1225
|
+
* Path MUST be absolute on the host filesystem.
|
|
1226
|
+
*/
|
|
1227
|
+
uploadFile(session: Session, ref: string, filePath: string): Promise<void>;
|
|
745
1228
|
}
|
|
746
1229
|
|
|
747
1230
|
/**
|
|
@@ -775,7 +1258,7 @@ declare class SessionRegistry {
|
|
|
775
1258
|
}
|
|
776
1259
|
|
|
777
1260
|
declare const SERVER_NAME = "rolepod-uiproof";
|
|
778
|
-
declare const SERVER_VERSION = "0.
|
|
1261
|
+
declare const SERVER_VERSION = "0.5.0";
|
|
779
1262
|
type ServerHandle = {
|
|
780
1263
|
mcp: McpServer;
|
|
781
1264
|
registry: SessionRegistry;
|
|
@@ -792,6 +1275,23 @@ declare function buildServer(opts?: {
|
|
|
792
1275
|
idleTimeoutMs?: number;
|
|
793
1276
|
}): ServerHandle;
|
|
794
1277
|
|
|
1278
|
+
type ConsoleEntry = {
|
|
1279
|
+
level: "error" | "warning" | "info" | "log" | "debug" | "trace";
|
|
1280
|
+
text: string;
|
|
1281
|
+
ts: string;
|
|
1282
|
+
/** Best-effort file:line if Playwright provides it. */
|
|
1283
|
+
location?: string;
|
|
1284
|
+
};
|
|
1285
|
+
type NetworkEntry = {
|
|
1286
|
+
id: number;
|
|
1287
|
+
url: string;
|
|
1288
|
+
method: string;
|
|
1289
|
+
status?: number;
|
|
1290
|
+
failure?: string;
|
|
1291
|
+
resource_type: string;
|
|
1292
|
+
ts: string;
|
|
1293
|
+
duration_ms?: number;
|
|
1294
|
+
};
|
|
795
1295
|
/**
|
|
796
1296
|
* PlaywrightEngine — v0.1 web-only implementation backed by Playwright's
|
|
797
1297
|
* Chromium / Firefox / WebKit drivers and the built-in
|
|
@@ -826,6 +1326,86 @@ declare class PlaywrightEngine implements Engine {
|
|
|
826
1326
|
getPageForSession(sessionId: string): Page;
|
|
827
1327
|
/** Increment generation; the next ref-using call will see them as stale. */
|
|
828
1328
|
bumpGeneration(sessionId: string): void;
|
|
1329
|
+
hover(session: Session, ref: string): Promise<void>;
|
|
1330
|
+
drag(session: Session, fromRef: string, toRef: string): Promise<void>;
|
|
1331
|
+
fillForm(session: Session, fields: FillField[]): Promise<void>;
|
|
1332
|
+
uploadFile(session: Session, ref: string, filePath: string): Promise<void>;
|
|
1333
|
+
/**
|
|
1334
|
+
* Pre-arm a one-shot dialog handler for the next dialog raised on the
|
|
1335
|
+
* active page. Returns when either the dialog fires (and is handled)
|
|
1336
|
+
* or the timeout elapses. The caller is expected to trigger the
|
|
1337
|
+
* dialog (via click etc.) AFTER arming.
|
|
1338
|
+
*/
|
|
1339
|
+
handleDialog(sessionId: string, opts: {
|
|
1340
|
+
action: "accept" | "dismiss" | "accept_with_text";
|
|
1341
|
+
text?: string;
|
|
1342
|
+
timeoutMs?: number;
|
|
1343
|
+
}): Promise<{
|
|
1344
|
+
handled: boolean;
|
|
1345
|
+
}>;
|
|
1346
|
+
getConsole(sessionId: string, opts?: {
|
|
1347
|
+
levels?: ConsoleEntry["level"][];
|
|
1348
|
+
contains?: string;
|
|
1349
|
+
clear?: boolean;
|
|
1350
|
+
limit?: number;
|
|
1351
|
+
}): ConsoleEntry[];
|
|
1352
|
+
getNetwork(sessionId: string, opts?: {
|
|
1353
|
+
urlPattern?: string;
|
|
1354
|
+
patternKind?: "substring" | "regex";
|
|
1355
|
+
method?: string;
|
|
1356
|
+
statusRange?: {
|
|
1357
|
+
min: number;
|
|
1358
|
+
max: number;
|
|
1359
|
+
};
|
|
1360
|
+
onlyFailed?: boolean;
|
|
1361
|
+
clear?: boolean;
|
|
1362
|
+
limit?: number;
|
|
1363
|
+
}): NetworkEntry[];
|
|
1364
|
+
/**
|
|
1365
|
+
* Read the consoleBuffer/networkBuffer directly without filtering —
|
|
1366
|
+
* used by verify_ui_flow expect evaluators.
|
|
1367
|
+
*/
|
|
1368
|
+
peekBuffers(sessionId: string): {
|
|
1369
|
+
console: ConsoleEntry[];
|
|
1370
|
+
network: NetworkEntry[];
|
|
1371
|
+
};
|
|
1372
|
+
/**
|
|
1373
|
+
* Runtime mutation of context-level emulation. CPU + network throttle
|
|
1374
|
+
* use CDP and only work on chromium; everything else is cross-browser.
|
|
1375
|
+
*/
|
|
1376
|
+
setEnv(sessionId: string, opts: {
|
|
1377
|
+
viewport?: {
|
|
1378
|
+
width: number;
|
|
1379
|
+
height: number;
|
|
1380
|
+
};
|
|
1381
|
+
offline?: boolean;
|
|
1382
|
+
geolocation?: {
|
|
1383
|
+
latitude: number;
|
|
1384
|
+
longitude: number;
|
|
1385
|
+
accuracy?: number;
|
|
1386
|
+
};
|
|
1387
|
+
colorScheme?: "light" | "dark" | "no-preference";
|
|
1388
|
+
reducedMotion?: "reduce" | "no-preference";
|
|
1389
|
+
extraHeaders?: Record<string, string>;
|
|
1390
|
+
networkThrottle?: "offline" | "slow-3g" | "fast-3g" | "slow-4g" | "fast-4g" | "no-throttling";
|
|
1391
|
+
cpuThrottle?: number;
|
|
1392
|
+
}): Promise<void>;
|
|
1393
|
+
/**
|
|
1394
|
+
* Execute a JavaScript function in the page context. ALWAYS gated by
|
|
1395
|
+
* the tool layer (`ROLEPOD_ALLOW_EVAL=1`); this method does not enforce
|
|
1396
|
+
* the env check.
|
|
1397
|
+
*/
|
|
1398
|
+
evaluate(sessionId: string, script: string, args?: unknown[]): Promise<unknown>;
|
|
1399
|
+
listPages(sessionId: string): {
|
|
1400
|
+
index: number;
|
|
1401
|
+
url: string;
|
|
1402
|
+
title_promise: Promise<string>;
|
|
1403
|
+
active: boolean;
|
|
1404
|
+
}[];
|
|
1405
|
+
switchPage(sessionId: string, index: number): Promise<void>;
|
|
1406
|
+
private activePage;
|
|
1407
|
+
private attachPageListeners;
|
|
1408
|
+
private handlePageDialog;
|
|
829
1409
|
private requireSession;
|
|
830
1410
|
private resolveLocator;
|
|
831
1411
|
private invalidateRefs;
|
|
@@ -862,6 +1442,14 @@ declare class AppiumEngine implements Engine {
|
|
|
862
1442
|
waitFor(session: Session, cond: WaitCondition, timeoutMs?: number): Promise<void>;
|
|
863
1443
|
screenshot(session: Session, _fullPage?: boolean): Promise<Buffer>;
|
|
864
1444
|
navigate(_session: Session, _url: string): Promise<void>;
|
|
1445
|
+
hover(_session: Session, _ref: string): Promise<void>;
|
|
1446
|
+
drag(_session: Session, _fromRef: string, _toRef: string): Promise<void>;
|
|
1447
|
+
fillForm(session: Session, fields: {
|
|
1448
|
+
ref: string;
|
|
1449
|
+
value: string | boolean;
|
|
1450
|
+
kind?: string;
|
|
1451
|
+
}[]): Promise<void>;
|
|
1452
|
+
uploadFile(_session: Session, _ref: string, _filePath: string): Promise<void>;
|
|
865
1453
|
private loadWdio;
|
|
866
1454
|
private buildCapabilities;
|
|
867
1455
|
private screenIdentifier;
|
|
@@ -915,4 +1503,4 @@ declare class UnsupportedPlatformError extends RolepodMcpError {
|
|
|
915
1503
|
constructor(platform: string);
|
|
916
1504
|
}
|
|
917
1505
|
|
|
918
|
-
export { type A11yNode, type A11ySnapshot, AppiumEngine, ArtifactStore, type Engine, type OpenOptions, type Platform, PlaywrightEngine, RolepodMcpError, SERVER_NAME, SERVER_VERSION, type ServerHandle, type Session, SessionRegistry, StaleRefError, type ToolName, ToolNames, UnknownRefError, UnknownSessionError, UnsupportedPlatformError, type WaitCondition, auditA11ySchema, auditA11yShape, browserClickSchema, browserClickShape, browserCloseSchema, browserCloseShape, browserKeySchema, browserKeyShape, browserNavigateSchema, browserNavigateShape, browserOpenSchema, browserOpenShape, browserScreenshotSchema, browserScreenshotShape, browserScrollSchema, browserScrollShape, browserSnapshotSchema, browserSnapshotShape, browserTypeSchema, browserTypeShape, browserWaitForSchema, browserWaitForShape, buildServer, createEngine, createMobileEngine, createWebEngine, extractUiStateSchema, extractUiStateShape, scaffoldE2eSchema, scaffoldE2eShape, verifyUiFlowSchema, verifyUiFlowShape, visualDiffSchema, visualDiffShape };
|
|
1506
|
+
export { type A11yNode, type A11ySnapshot, AppiumEngine, ArtifactStore, type Engine, type OpenOptions, type Platform, PlaywrightEngine, RolepodMcpError, SERVER_NAME, SERVER_VERSION, type ServerHandle, type Session, SessionRegistry, StaleRefError, type ToolName, ToolNames, UnknownRefError, UnknownSessionError, UnsupportedPlatformError, type WaitCondition, auditA11ySchema, auditA11yShape, browserClickSchema, browserClickShape, browserCloseSchema, browserCloseShape, browserConsoleSchema, browserConsoleShape, browserDragSchema, browserDragShape, browserEvaluateSchema, browserEvaluateShape, browserFillFormSchema, browserFillFormShape, browserHandleDialogSchema, browserHandleDialogShape, browserHoverSchema, browserHoverShape, browserKeySchema, browserKeyShape, browserNavigateSchema, browserNavigateShape, browserNetworkSchema, browserNetworkShape, browserOpenSchema, browserOpenShape, browserPagesSchema, browserPagesShape, browserScreenshotSchema, browserScreenshotShape, browserScrollSchema, browserScrollShape, browserSetEnvSchema, browserSetEnvShape, browserSnapshotSchema, browserSnapshotShape, browserSwitchPageSchema, browserSwitchPageShape, browserTypeSchema, browserTypeShape, browserUploadFileSchema, browserUploadFileShape, browserWaitForSchema, browserWaitForShape, buildServer, createEngine, createMobileEngine, createWebEngine, extractUiStateSchema, extractUiStateShape, scaffoldE2eSchema, scaffoldE2eShape, verifyUiFlowSchema, verifyUiFlowShape, visualDiffSchema, visualDiffShape };
|