@muggleai/works 5.22.0-staging.154 → 5.22.0-staging.156
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/dist/{chunk-HXDEDSP5.js → chunk-DLBPRPUN.js} +182 -97
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/dist/plugin/.claude-plugin/plugin.json +1 -1
- package/dist/plugin/.codex-plugin/plugin.json +1 -1
- package/dist/plugin/.cursor-plugin/plugin.json +1 -1
- package/dist/plugin/scripts/codex-hook-windows.mjs +2 -2
- package/dist/plugin/scripts/guard-run.mjs +9 -5
- package/dist/plugin/scripts/guardrails.mjs +12 -4
- package/dist/plugin/skills/_shared/dev-loop/publish.md +1 -1
- package/dist/plugin/skills/muggle-pr-visual-walkthrough/e2e-report-assembly.md +1 -0
- package/dist/release-manifest.json +3 -3
- package/package.json +1 -1
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/.codex-plugin/plugin.json +1 -1
- package/plugin/.cursor-plugin/plugin.json +1 -1
- package/plugin/scripts/codex-hook-windows.mjs +2 -2
- package/plugin/scripts/guard-run.mjs +9 -5
- package/plugin/scripts/guardrails.mjs +12 -4
- package/plugin/skills/_shared/dev-loop/publish.md +1 -1
- package/plugin/skills/muggle-pr-visual-walkthrough/e2e-report-assembly.md +1 -0
|
@@ -362,6 +362,80 @@ var STEP_LIST_ELISION_THRESHOLD = 20;
|
|
|
362
362
|
var STEP_LIST_HEAD_COUNT = 12;
|
|
363
363
|
var STEP_LIST_TAIL_COUNT = 8;
|
|
364
364
|
var STEP_ELEMENT_ID_SUFFIX = /\s*with element id (?:\[\d+\]|#\d+)/g;
|
|
365
|
+
var STEP_SCREENSHOT_MARKER = "\u{1F4F7}";
|
|
366
|
+
var TEST_DETAILS_DIVIDER = "---";
|
|
367
|
+
var TEST_DETAILS_ANCHOR_PREFIX = "muggle-test-";
|
|
368
|
+
var STEP_THUMBNAIL_WIDTH_PX = 840;
|
|
369
|
+
var STEP_THUMBNAIL_QUALITY = 70;
|
|
370
|
+
var STEP_PAIR_IMAGE_WIDTH = 420;
|
|
371
|
+
var MAX_COMMENT_BYTES = 64e3;
|
|
372
|
+
|
|
373
|
+
// src/cli/pr-section/resolve-urls-types.ts
|
|
374
|
+
var GS_SCHEME = "gs://";
|
|
375
|
+
var PUBLIC_URL_PATH = "/v1/protected/storage/publicUrl";
|
|
376
|
+
var RESOLVE_TIMEOUT_MS = 1e4;
|
|
377
|
+
var LOG_PREFIX = "build-pr-section";
|
|
378
|
+
var IMAGE_PROXY_PREFIX = "https://images.weserv.nl/?url=";
|
|
379
|
+
var StepSchema = z.object({
|
|
380
|
+
stepIndex: z.number().int().nonnegative(),
|
|
381
|
+
action: z.string().min(1),
|
|
382
|
+
description: z.string().min(1).optional(),
|
|
383
|
+
screenshotUrl: z.string().url(),
|
|
384
|
+
afterScreenshotUrl: z.string().url().optional()
|
|
385
|
+
});
|
|
386
|
+
var PassedTestSchema = z.object({
|
|
387
|
+
name: z.string().min(1),
|
|
388
|
+
testCaseId: z.string().min(1),
|
|
389
|
+
testScriptId: z.string().min(1).optional(),
|
|
390
|
+
runId: z.string().min(1),
|
|
391
|
+
viewUrl: z.string().url(),
|
|
392
|
+
status: z.literal("passed"),
|
|
393
|
+
steps: z.array(StepSchema),
|
|
394
|
+
useCaseName: z.string().min(1).optional(),
|
|
395
|
+
description: z.string().min(1).optional(),
|
|
396
|
+
endingScreenshotUrl: z.string().url().optional(),
|
|
397
|
+
endingScreenshotCaption: z.string().min(1).optional()
|
|
398
|
+
});
|
|
399
|
+
var FailedTestSchema = z.object({
|
|
400
|
+
name: z.string().min(1),
|
|
401
|
+
testCaseId: z.string().min(1),
|
|
402
|
+
testScriptId: z.string().min(1).optional(),
|
|
403
|
+
runId: z.string().min(1),
|
|
404
|
+
viewUrl: z.string().url(),
|
|
405
|
+
status: z.literal("failed"),
|
|
406
|
+
steps: z.array(StepSchema),
|
|
407
|
+
failureStepIndex: z.number().int().nonnegative(),
|
|
408
|
+
error: z.string().min(1),
|
|
409
|
+
artifactsDir: z.string().min(1).optional(),
|
|
410
|
+
useCaseName: z.string().min(1).optional(),
|
|
411
|
+
description: z.string().min(1).optional(),
|
|
412
|
+
endingScreenshotUrl: z.string().url().optional(),
|
|
413
|
+
endingScreenshotCaption: z.string().min(1).optional()
|
|
414
|
+
});
|
|
415
|
+
var InconclusiveTestSchema = z.object({
|
|
416
|
+
name: z.string().min(1),
|
|
417
|
+
testCaseId: z.string().min(1),
|
|
418
|
+
testScriptId: z.string().min(1).optional(),
|
|
419
|
+
runId: z.string().min(1),
|
|
420
|
+
viewUrl: z.string().url(),
|
|
421
|
+
status: z.literal("inconclusive"),
|
|
422
|
+
steps: z.array(StepSchema),
|
|
423
|
+
reason: z.string().min(1),
|
|
424
|
+
artifactsDir: z.string().min(1).optional(),
|
|
425
|
+
useCaseName: z.string().min(1).optional(),
|
|
426
|
+
description: z.string().min(1).optional(),
|
|
427
|
+
endingScreenshotUrl: z.string().url().optional(),
|
|
428
|
+
endingScreenshotCaption: z.string().min(1).optional()
|
|
429
|
+
});
|
|
430
|
+
var TestResultSchema = z.discriminatedUnion("status", [
|
|
431
|
+
PassedTestSchema,
|
|
432
|
+
FailedTestSchema,
|
|
433
|
+
InconclusiveTestSchema
|
|
434
|
+
]);
|
|
435
|
+
var E2eReportSchema = z.object({
|
|
436
|
+
projectId: z.string().min(1),
|
|
437
|
+
tests: z.array(TestResultSchema)
|
|
438
|
+
});
|
|
365
439
|
|
|
366
440
|
// src/cli/pr-section/render.ts
|
|
367
441
|
function resolveLatestRuns(tests) {
|
|
@@ -503,14 +577,26 @@ function renderOverview(report) {
|
|
|
503
577
|
if (entry.type === "test") {
|
|
504
578
|
lines.push(renderOverviewBullet(entry.entry, numbering, ""));
|
|
505
579
|
} else {
|
|
506
|
-
lines.push(
|
|
507
|
-
for (const member of entry.members) {
|
|
508
|
-
lines.push(renderOverviewBullet(member, numbering, " "));
|
|
509
|
-
}
|
|
580
|
+
lines.push(...renderUseCaseGroup(entry.key, entry.members, numbering));
|
|
510
581
|
}
|
|
511
582
|
}
|
|
512
583
|
return lines.join("\n");
|
|
513
584
|
}
|
|
585
|
+
function renderUseCaseGroup(useCaseName, members, numbering) {
|
|
586
|
+
const groupCounts = countTests(members);
|
|
587
|
+
const isAllPassed = groupCounts.passed === groupCounts.total;
|
|
588
|
+
const tally = [
|
|
589
|
+
groupCounts.passed > 0 ? `\u2705 ${groupCounts.passed} passed` : null,
|
|
590
|
+
groupCounts.failed > 0 ? `\u274C ${groupCounts.failed} failed` : null,
|
|
591
|
+
groupCounts.inconclusive > 0 ? `\u26A0\uFE0F ${groupCounts.inconclusive} inconclusive` : null
|
|
592
|
+
].filter((part) => part !== null).join(" \xB7 ");
|
|
593
|
+
return [
|
|
594
|
+
"",
|
|
595
|
+
`<details${isAllPassed ? "" : " open"}><summary><b>${escapeHtml(useCaseName)}</b> \u2014 ${tally}</summary>`,
|
|
596
|
+
...indented(members.map((member) => renderOverviewBullet(member, numbering, ""))),
|
|
597
|
+
"</details>"
|
|
598
|
+
];
|
|
599
|
+
}
|
|
514
600
|
function buildTestNumbering(latestRuns) {
|
|
515
601
|
const map = /* @__PURE__ */ new Map();
|
|
516
602
|
latestRuns.forEach((entry, i) => {
|
|
@@ -520,7 +606,8 @@ function buildTestNumbering(latestRuns) {
|
|
|
520
606
|
}
|
|
521
607
|
function renderOverviewBullet(entry, numbering, indent) {
|
|
522
608
|
const rerunNote = entry.attempts > 1 ? ` _(${entry.attempts} runs)_` : "";
|
|
523
|
-
|
|
609
|
+
const detailsLink = ` \xB7 [see details](#${testAnchor(entry.test)})`;
|
|
610
|
+
return `${indent}- ${statusEmoji(entry.test)} **${numbering.get(entry.test.testCaseId)}.** ${entry.test.name}${rerunNote}${detailsLink}`;
|
|
524
611
|
}
|
|
525
612
|
function buildGroupedLayout(latestRuns) {
|
|
526
613
|
const groups = /* @__PURE__ */ new Map();
|
|
@@ -542,21 +629,39 @@ function buildGroupedLayout(latestRuns) {
|
|
|
542
629
|
}
|
|
543
630
|
return layout;
|
|
544
631
|
}
|
|
545
|
-
function renderTestDetails(entry, projectId, testNumber, dashboardBaseUrl = DASHBOARD_URL_BASE) {
|
|
632
|
+
function renderTestDetails(entry, projectId, testNumber, dashboardBaseUrl = DASHBOARD_URL_BASE, screenshotDetail = "before-and-after" /* BeforeAndAfter */) {
|
|
546
633
|
const { test } = entry;
|
|
547
|
-
const lines = [`#### ${statusEmoji(test)} ${testNumber}. ${test.name}`, ""];
|
|
548
|
-
if (test.description) {
|
|
634
|
+
const lines = [`<a name="${testAnchor(test)}"></a>`, "", `#### ${statusEmoji(test)} ${testNumber}. ${test.name}`, ""];
|
|
635
|
+
if (test.description && !isSameText(test.description, test.name)) {
|
|
549
636
|
lines.push(`_${test.description.replace(/\s*\n\s*/g, " ")}_`, "");
|
|
550
637
|
}
|
|
551
638
|
lines.push(...renderResultTable(entry, projectId, dashboardBaseUrl));
|
|
552
|
-
const steps = renderSteps(test, projectId, dashboardBaseUrl) ?? [];
|
|
639
|
+
const steps = renderSteps(test, projectId, dashboardBaseUrl, screenshotDetail) ?? [];
|
|
553
640
|
const frame = renderEndingFrame(test) ?? [];
|
|
554
641
|
const evidence = [...steps, ...steps.length > 0 && frame.length > 0 ? [""] : [], ...frame];
|
|
555
642
|
if (evidence.length > 0) {
|
|
556
|
-
lines.push("",
|
|
643
|
+
lines.push("", `<details><summary>${evidenceToggleLabel(test, screenshotDetail)}</summary>`, ...indented(evidence), "</details>");
|
|
557
644
|
}
|
|
558
645
|
return lines.join("\n");
|
|
559
646
|
}
|
|
647
|
+
function indented(content) {
|
|
648
|
+
return ["<dl><dd>", "", ...content, "", "</dd></dl>"];
|
|
649
|
+
}
|
|
650
|
+
function testAnchor(test) {
|
|
651
|
+
return `${TEST_DETAILS_ANCHOR_PREFIX}${test.testCaseId}`;
|
|
652
|
+
}
|
|
653
|
+
function evidenceToggleLabel(test, screenshotDetail) {
|
|
654
|
+
const count = test.steps.length;
|
|
655
|
+
if (count === 0) {
|
|
656
|
+
return "<kbd>Show the ending screen</kbd>";
|
|
657
|
+
}
|
|
658
|
+
const stepCount = `${count} ${count === 1 ? "step" : "steps"}`;
|
|
659
|
+
return screenshotDetail === "none" /* None */ ? `<kbd>Show ${stepCount}</kbd>` : `<kbd>Show ${stepCount} and screenshots</kbd>`;
|
|
660
|
+
}
|
|
661
|
+
function isSameText(left, right) {
|
|
662
|
+
const normalize = (text) => text.trim().replace(/[\s.!?]+$/, "").replace(/\s+/g, " ").toLowerCase();
|
|
663
|
+
return normalize(left) === normalize(right);
|
|
664
|
+
}
|
|
560
665
|
function renderEndingFrame(test) {
|
|
561
666
|
const frame = endingFrame(test);
|
|
562
667
|
if (!frame) {
|
|
@@ -568,17 +673,35 @@ function renderEndingFrame(test) {
|
|
|
568
673
|
fullSizeImage(frame.url, test.name)
|
|
569
674
|
];
|
|
570
675
|
}
|
|
571
|
-
function
|
|
676
|
+
function renderStepScreenshots(step, position, screenshotDetail) {
|
|
677
|
+
if (!step.afterScreenshotUrl || screenshotDetail === "before-only" /* BeforeOnly */) {
|
|
678
|
+
return [thumbnailImage(step.screenshotUrl, STEP_IMAGE_WIDTH, `Step ${position}`)];
|
|
679
|
+
}
|
|
680
|
+
return [
|
|
681
|
+
"| Before | After |",
|
|
682
|
+
"|:--|:--|",
|
|
683
|
+
`| ${thumbnailImage(step.screenshotUrl, STEP_PAIR_IMAGE_WIDTH, `Step ${position} before`)} | ${thumbnailImage(step.afterScreenshotUrl, STEP_PAIR_IMAGE_WIDTH, `Step ${position} after`)} |`
|
|
684
|
+
];
|
|
685
|
+
}
|
|
686
|
+
function thumbnailImage(url, displayWidth, alt) {
|
|
687
|
+
return `<img src="${thumbnailUrl(url)}" width="${displayWidth}" alt="${alt}">`;
|
|
688
|
+
}
|
|
689
|
+
function thumbnailUrl(url) {
|
|
690
|
+
const proxied = url.startsWith(IMAGE_PROXY_PREFIX) ? url : `${IMAGE_PROXY_PREFIX}${encodeURIComponent(url)}`;
|
|
691
|
+
return `${proxied}&w=${STEP_THUMBNAIL_WIDTH_PX}&q=${STEP_THUMBNAIL_QUALITY}&output=jpg`;
|
|
692
|
+
}
|
|
693
|
+
function renderSteps(test, projectId, dashboardBaseUrl, screenshotDetail) {
|
|
572
694
|
const { steps } = test;
|
|
573
695
|
if (steps.length === 0) {
|
|
574
696
|
return null;
|
|
575
697
|
}
|
|
576
|
-
const
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
</details
|
|
581
|
-
|
|
698
|
+
const isTextOnly = screenshotDetail === "none" /* None */;
|
|
699
|
+
const collapsible = (step, position) => isTextOnly ? `- ${position} \xB7 ${stepText(step)}` : [
|
|
700
|
+
`<details><summary>${STEP_SCREENSHOT_MARKER} ${position} \xB7 ${stepText(step)}</summary>`,
|
|
701
|
+
...indented(renderStepScreenshots(step, position, screenshotDetail)),
|
|
702
|
+
"</details>"
|
|
703
|
+
].join("\n");
|
|
704
|
+
const heading = isTextOnly ? ["**Steps**", ""] : ["**Steps** \u2014 click a step to see its screenshots", ""];
|
|
582
705
|
if (steps.length <= STEP_LIST_ELISION_THRESHOLD) {
|
|
583
706
|
return [...heading, ...steps.map((step, i) => collapsible(step, i + 1))];
|
|
584
707
|
}
|
|
@@ -595,14 +718,14 @@ function renderSteps(test, projectId, dashboardBaseUrl) {
|
|
|
595
718
|
}
|
|
596
719
|
function renderResultTable(entry, projectId, dashboardBaseUrl) {
|
|
597
720
|
const { test } = entry;
|
|
598
|
-
const rows = [
|
|
721
|
+
const rows = [];
|
|
599
722
|
if (test.status === "passed") {
|
|
600
|
-
rows.push("| **Result** | \u2705 Passed |");
|
|
723
|
+
rows.push("| **Result** | \u2705 Passed |", "|:--|:--|");
|
|
601
724
|
} else if (test.status === "failed") {
|
|
602
|
-
rows.push(`| **Result** | \u274C Failed at step ${failureOrdinal(test, test.failureStepIndex)}
|
|
725
|
+
rows.push(`| **Result** | \u274C Failed at step ${failureOrdinal(test, test.failureStepIndex)} |`, "|:--|:--|");
|
|
603
726
|
rows.push(`| **Why** | ${tableCell(escapeHtml(test.error))} |`);
|
|
604
727
|
} else {
|
|
605
|
-
rows.push("| **Result** | \u26A0\uFE0F Inconclusive |");
|
|
728
|
+
rows.push("| **Result** | \u26A0\uFE0F Inconclusive |", "|:--|:--|");
|
|
606
729
|
rows.push(`| **Why** | ${tableCell(escapeHtml(test.reason))} |`);
|
|
607
730
|
}
|
|
608
731
|
if (entry.attempts > 1) {
|
|
@@ -612,8 +735,12 @@ function renderResultTable(entry, projectId, dashboardBaseUrl) {
|
|
|
612
735
|
rows.push(`| **Run** | ${count} browser ${count === 1 ? "step" : "steps"} \xB7 ${dashboardLink(test, projectId, dashboardBaseUrl)} |`);
|
|
613
736
|
return rows;
|
|
614
737
|
}
|
|
615
|
-
function renderDetailBlocks(report, dashboardBaseUrl) {
|
|
616
|
-
return resolveLatestRuns(report.tests).map((entry, i) => renderTestDetails(entry, report.projectId, i + 1, dashboardBaseUrl ?? DASHBOARD_URL_BASE)).join(
|
|
738
|
+
function renderDetailBlocks(report, dashboardBaseUrl, screenshotDetail = "before-and-after" /* BeforeAndAfter */) {
|
|
739
|
+
return resolveLatestRuns(report.tests).map((entry, i) => renderTestDetails(entry, report.projectId, i + 1, dashboardBaseUrl ?? DASHBOARD_URL_BASE, screenshotDetail)).join(`
|
|
740
|
+
|
|
741
|
+
${TEST_DETAILS_DIVIDER}
|
|
742
|
+
|
|
743
|
+
`);
|
|
617
744
|
}
|
|
618
745
|
function renderBody(report, opts) {
|
|
619
746
|
const overview = renderOverview(report);
|
|
@@ -643,14 +770,16 @@ function renderComment(report, opts = {}) {
|
|
|
643
770
|
if (report.tests.length === 0) {
|
|
644
771
|
return "";
|
|
645
772
|
}
|
|
773
|
+
const screenshotDetail = opts.screenshotDetail ?? "before-and-after" /* BeforeAndAfter */;
|
|
646
774
|
return [
|
|
647
775
|
"## E2E acceptance evidence (overflow)",
|
|
648
776
|
"",
|
|
649
777
|
"_This comment was posted because the full per-test details did not fit in the PR description._",
|
|
778
|
+
...screenshotDetail === "before-and-after" /* BeforeAndAfter */ ? [] : ["", "_Step screenshots are trimmed to fit GitHub's comment size limit \u2014 open a run on Muggle AI for all of them._"],
|
|
650
779
|
"",
|
|
651
780
|
"### Test details",
|
|
652
781
|
"",
|
|
653
|
-
renderDetailBlocks(report, opts.dashboardBaseUrl)
|
|
782
|
+
renderDetailBlocks(report, opts.dashboardBaseUrl, screenshotDetail)
|
|
654
783
|
].join("\n");
|
|
655
784
|
}
|
|
656
785
|
|
|
@@ -665,85 +794,32 @@ function splitWithOverflow(report, opts) {
|
|
|
665
794
|
return { body: inlineBody, comment: null };
|
|
666
795
|
}
|
|
667
796
|
const spilledBody = renderBody(report, { inlineDetails: false, dashboardBaseUrl: opts.dashboardBaseUrl });
|
|
668
|
-
const comment =
|
|
797
|
+
const comment = renderFittingComment(report, opts.dashboardBaseUrl);
|
|
669
798
|
return {
|
|
670
799
|
body: spilledBody,
|
|
671
800
|
comment: comment.length > 0 ? comment : null
|
|
672
801
|
};
|
|
673
802
|
}
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
description: z.string().min(1).optional(),
|
|
690
|
-
endingScreenshotUrl: z.string().url().optional(),
|
|
691
|
-
endingScreenshotCaption: z.string().min(1).optional()
|
|
692
|
-
});
|
|
693
|
-
var FailedTestSchema = z.object({
|
|
694
|
-
name: z.string().min(1),
|
|
695
|
-
testCaseId: z.string().min(1),
|
|
696
|
-
testScriptId: z.string().min(1).optional(),
|
|
697
|
-
runId: z.string().min(1),
|
|
698
|
-
viewUrl: z.string().url(),
|
|
699
|
-
status: z.literal("failed"),
|
|
700
|
-
steps: z.array(StepSchema),
|
|
701
|
-
failureStepIndex: z.number().int().nonnegative(),
|
|
702
|
-
error: z.string().min(1),
|
|
703
|
-
artifactsDir: z.string().min(1).optional(),
|
|
704
|
-
useCaseName: z.string().min(1).optional(),
|
|
705
|
-
description: z.string().min(1).optional(),
|
|
706
|
-
endingScreenshotUrl: z.string().url().optional(),
|
|
707
|
-
endingScreenshotCaption: z.string().min(1).optional()
|
|
708
|
-
});
|
|
709
|
-
var InconclusiveTestSchema = z.object({
|
|
710
|
-
name: z.string().min(1),
|
|
711
|
-
testCaseId: z.string().min(1),
|
|
712
|
-
testScriptId: z.string().min(1).optional(),
|
|
713
|
-
runId: z.string().min(1),
|
|
714
|
-
viewUrl: z.string().url(),
|
|
715
|
-
status: z.literal("inconclusive"),
|
|
716
|
-
steps: z.array(StepSchema),
|
|
717
|
-
reason: z.string().min(1),
|
|
718
|
-
artifactsDir: z.string().min(1).optional(),
|
|
719
|
-
useCaseName: z.string().min(1).optional(),
|
|
720
|
-
description: z.string().min(1).optional(),
|
|
721
|
-
endingScreenshotUrl: z.string().url().optional(),
|
|
722
|
-
endingScreenshotCaption: z.string().min(1).optional()
|
|
723
|
-
});
|
|
724
|
-
var TestResultSchema = z.discriminatedUnion("status", [
|
|
725
|
-
PassedTestSchema,
|
|
726
|
-
FailedTestSchema,
|
|
727
|
-
InconclusiveTestSchema
|
|
728
|
-
]);
|
|
729
|
-
var E2eReportSchema = z.object({
|
|
730
|
-
projectId: z.string().min(1),
|
|
731
|
-
tests: z.array(TestResultSchema)
|
|
732
|
-
});
|
|
803
|
+
function renderFittingComment(report, dashboardBaseUrl) {
|
|
804
|
+
const ladder = [
|
|
805
|
+
"before-and-after" /* BeforeAndAfter */,
|
|
806
|
+
"before-only" /* BeforeOnly */,
|
|
807
|
+
"none" /* None */
|
|
808
|
+
];
|
|
809
|
+
let comment = "";
|
|
810
|
+
for (const screenshotDetail of ladder) {
|
|
811
|
+
comment = renderComment(report, { dashboardBaseUrl, screenshotDetail });
|
|
812
|
+
if (Buffer.byteLength(comment, "utf-8") <= MAX_COMMENT_BYTES) {
|
|
813
|
+
return comment;
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
return comment;
|
|
817
|
+
}
|
|
733
818
|
|
|
734
819
|
// src/cli/pr-section/index.ts
|
|
735
820
|
function buildPrSection(report, opts) {
|
|
736
821
|
return splitWithOverflow(report, opts);
|
|
737
822
|
}
|
|
738
|
-
|
|
739
|
-
// src/cli/pr-section/resolve-urls-types.ts
|
|
740
|
-
var GS_SCHEME = "gs://";
|
|
741
|
-
var PUBLIC_URL_PATH = "/v1/protected/storage/publicUrl";
|
|
742
|
-
var RESOLVE_TIMEOUT_MS = 1e4;
|
|
743
|
-
var LOG_PREFIX = "build-pr-section";
|
|
744
|
-
var IMAGE_PROXY_PREFIX = "https://images.weserv.nl/?url=";
|
|
745
|
-
|
|
746
|
-
// src/cli/pr-section/resolve-urls.ts
|
|
747
823
|
function errMsg(e) {
|
|
748
824
|
return e instanceof Error ? e.message : String(e);
|
|
749
825
|
}
|
|
@@ -773,6 +849,9 @@ function collectGsUrls(report) {
|
|
|
773
849
|
if (isGsUrl(step.screenshotUrl)) {
|
|
774
850
|
seen.add(step.screenshotUrl);
|
|
775
851
|
}
|
|
852
|
+
if (step.afterScreenshotUrl && isGsUrl(step.afterScreenshotUrl)) {
|
|
853
|
+
seen.add(step.afterScreenshotUrl);
|
|
854
|
+
}
|
|
776
855
|
}
|
|
777
856
|
if (test.endingScreenshotUrl && isGsUrl(test.endingScreenshotUrl)) {
|
|
778
857
|
seen.add(test.endingScreenshotUrl);
|
|
@@ -805,11 +884,16 @@ async function resolveOne(gsUrl, baseUrl, headers, stderrWrite) {
|
|
|
805
884
|
}
|
|
806
885
|
}
|
|
807
886
|
function remapStep(step, urlMap) {
|
|
808
|
-
const
|
|
809
|
-
|
|
887
|
+
const resolvedBefore = urlMap.get(step.screenshotUrl);
|
|
888
|
+
const resolvedAfter = step.afterScreenshotUrl ? urlMap.get(step.afterScreenshotUrl) : void 0;
|
|
889
|
+
if (!resolvedBefore && !resolvedAfter) {
|
|
810
890
|
return step;
|
|
811
891
|
}
|
|
812
|
-
return {
|
|
892
|
+
return {
|
|
893
|
+
...step,
|
|
894
|
+
...resolvedBefore ? { screenshotUrl: resolvedBefore } : {},
|
|
895
|
+
...resolvedAfter ? { afterScreenshotUrl: resolvedAfter } : {}
|
|
896
|
+
};
|
|
813
897
|
}
|
|
814
898
|
function remapTest(test, urlMap) {
|
|
815
899
|
const remapped = {
|
|
@@ -2189,7 +2273,8 @@ var defaultGhRunner = (args, input) => {
|
|
|
2189
2273
|
encoding: "utf-8",
|
|
2190
2274
|
input,
|
|
2191
2275
|
timeout: GH_COMMENT_TIMEOUT_MS,
|
|
2192
|
-
stdio: ["pipe", "pipe", "ignore"]
|
|
2276
|
+
stdio: ["pipe", "pipe", "ignore"],
|
|
2277
|
+
windowsHide: true
|
|
2193
2278
|
});
|
|
2194
2279
|
} catch {
|
|
2195
2280
|
return null;
|
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { src_exports as commands, createUnifiedMcpServer, server_exports as server } from './chunk-
|
|
1
|
+
export { src_exports as commands, createUnifiedMcpServer, server_exports as server } from './chunk-DLBPRPUN.js';
|
|
2
2
|
export { createChildLogger, e2e_exports as e2e, getConfig, getLocalQaTools, getLogger, getQaTools, local_exports as localQa, mcp_exports as mcp, e2e_exports as qa, src_exports as shared } from './chunk-E3T2RN6R.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "muggle",
|
|
3
3
|
"description": "Real-browser E2E acceptance for your coding agent: test the flows you changed and open the PR with screenshots. Built for flows other tools can't reach: managed test identities with live inboxes (magic links, email OTP and 2FA, verification mail, password resets), an encrypted secret store for login and test credentials, and a test graph that runs prerequisite flows first. Plain-English tests become replayable scripts on localhost or preview URLs.",
|
|
4
|
-
"version": "5.22.0-staging.
|
|
4
|
+
"version": "5.22.0-staging.156",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Muggle AI",
|
|
7
7
|
"email": "support@muggle-ai.com"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "muggle",
|
|
3
|
-
"version": "5.22.0-staging.
|
|
3
|
+
"version": "5.22.0-staging.156",
|
|
4
4
|
"description": "Real-browser E2E acceptance for your coding agent: test the flows you changed and open the PR with screenshots. Built for flows other tools can't reach: managed test identities with live inboxes (magic links, email OTP and 2FA, verification mail, password resets), an encrypted secret store for login and test credentials, and a test graph that runs prerequisite flows first. Plain-English tests become replayable scripts on localhost or preview URLs.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Muggle AI",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "muggle",
|
|
3
3
|
"displayName": "Muggle AI",
|
|
4
4
|
"description": "Real-browser E2E acceptance for your coding agent: test the flows you changed and open the PR with screenshots. Built for flows other tools can't reach: managed test identities with live inboxes (magic links, email OTP and 2FA, verification mail, password resets), an encrypted secret store for login and test credentials, and a test graph that runs prerequisite flows first. Plain-English tests become replayable scripts on localhost or preview URLs.",
|
|
5
|
-
"version": "5.22.0-staging.
|
|
5
|
+
"version": "5.22.0-staging.156",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Muggle AI",
|
|
8
8
|
"email": "support@muggle-ai.com"
|
|
@@ -48,7 +48,7 @@ export function gitBashCandidates(env, gitExecutables) {
|
|
|
48
48
|
function gitExecutablesOnPath() {
|
|
49
49
|
if (process.platform !== "win32") return [];
|
|
50
50
|
try {
|
|
51
|
-
return execFileSync("where", ["git"], { encoding: "utf-8", stdio: ["ignore", "pipe", "ignore"] })
|
|
51
|
+
return execFileSync("where", ["git"], { encoding: "utf-8", stdio: ["ignore", "pipe", "ignore"], windowsHide: true })
|
|
52
52
|
.split(/\r?\n/)
|
|
53
53
|
.filter(Boolean);
|
|
54
54
|
} catch {
|
|
@@ -68,7 +68,7 @@ export function runHookUnderGitBash(scriptAndArgs, env = process.env) {
|
|
|
68
68
|
process.stdout.write("{}\n");
|
|
69
69
|
return 0;
|
|
70
70
|
}
|
|
71
|
-
const run = spawnSync(bash, scriptAndArgs, { stdio: "inherit", env: { ...env, ...HOOK_HOST_STAMP } });
|
|
71
|
+
const run = spawnSync(bash, scriptAndArgs, { stdio: "inherit", env: { ...env, ...HOOK_HOST_STAMP }, windowsHide: true });
|
|
72
72
|
if (run.error) {
|
|
73
73
|
process.stdout.write("{}\n");
|
|
74
74
|
return 0;
|
|
@@ -220,13 +220,14 @@ function fail(message) {
|
|
|
220
220
|
process.exit(2);
|
|
221
221
|
}
|
|
222
222
|
function commandSucceeds(executable, args) {
|
|
223
|
-
const probe = spawnSync(executable, args, { stdio: "ignore", timeout: 1e4 });
|
|
223
|
+
const probe = spawnSync(executable, args, { stdio: "ignore", timeout: 1e4, windowsHide: true });
|
|
224
224
|
return probe.error === void 0 && probe.status === 0;
|
|
225
225
|
}
|
|
226
226
|
function probedSystemdUserManagerState() {
|
|
227
227
|
const probe = spawnSync("systemctl", ["--user", "is-system-running"], {
|
|
228
228
|
encoding: "utf-8",
|
|
229
|
-
timeout: 1e4
|
|
229
|
+
timeout: 1e4,
|
|
230
|
+
windowsHide: true
|
|
230
231
|
});
|
|
231
232
|
if (!probeRan(probe)) return null;
|
|
232
233
|
return probe.stdout.trim();
|
|
@@ -251,7 +252,8 @@ function windowsCommandNeedsCmdShell(firstCommandToken) {
|
|
|
251
252
|
if (knownExtension !== "") return false;
|
|
252
253
|
const lookup = spawnSync("where.exe", [firstCommandToken], {
|
|
253
254
|
encoding: "utf-8",
|
|
254
|
-
timeout: 1e4
|
|
255
|
+
timeout: 1e4,
|
|
256
|
+
windowsHide: true
|
|
255
257
|
});
|
|
256
258
|
if (lookup.error !== void 0 || lookup.status !== 0) return false;
|
|
257
259
|
const resolvedExtension = extname(lookup.stdout.split(/\r?\n/)[0] ?? "").toLowerCase();
|
|
@@ -261,7 +263,8 @@ function currentUserProcessCount() {
|
|
|
261
263
|
const uid = typeof process.getuid === "function" ? String(process.getuid()) : "";
|
|
262
264
|
const listing = spawnSync("ps", ["-u", uid, "-o", "pid="], {
|
|
263
265
|
encoding: "utf-8",
|
|
264
|
-
timeout: 1e4
|
|
266
|
+
timeout: 1e4,
|
|
267
|
+
windowsHide: true
|
|
265
268
|
});
|
|
266
269
|
if (!probeRan(listing) || listing.status !== 0) {
|
|
267
270
|
return fail("cannot count current user processes for the nproc ceiling");
|
|
@@ -283,7 +286,8 @@ function registerTreeCleanup(plan2, childPid) {
|
|
|
283
286
|
if (plan2.stopsScopeUnitOnExit !== null) {
|
|
284
287
|
spawnSync("systemctl", ["--user", "stop", plan2.stopsScopeUnitOnExit], {
|
|
285
288
|
stdio: "ignore",
|
|
286
|
-
timeout: 1e4
|
|
289
|
+
timeout: 1e4,
|
|
290
|
+
windowsHide: true
|
|
287
291
|
});
|
|
288
292
|
}
|
|
289
293
|
};
|
|
@@ -814,7 +814,8 @@ function runGh(args) {
|
|
|
814
814
|
return execFileSync("gh", args, {
|
|
815
815
|
encoding: "utf-8",
|
|
816
816
|
timeout: GH_LOOKUP_TIMEOUT_MS,
|
|
817
|
-
stdio: ["ignore", "pipe", "ignore"]
|
|
817
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
818
|
+
windowsHide: true
|
|
818
819
|
});
|
|
819
820
|
} catch {
|
|
820
821
|
return null;
|
|
@@ -946,7 +947,8 @@ var defaultGhRunner = (args, input2) => {
|
|
|
946
947
|
encoding: "utf-8",
|
|
947
948
|
input: input2,
|
|
948
949
|
timeout: GH_COMMENT_TIMEOUT_MS,
|
|
949
|
-
stdio: ["pipe", "pipe", "ignore"]
|
|
950
|
+
stdio: ["pipe", "pipe", "ignore"],
|
|
951
|
+
windowsHide: true
|
|
950
952
|
});
|
|
951
953
|
} catch {
|
|
952
954
|
return null;
|
|
@@ -1183,7 +1185,12 @@ var listFiles = (dir) => {
|
|
|
1183
1185
|
};
|
|
1184
1186
|
var runGit = (args, cwd) => {
|
|
1185
1187
|
try {
|
|
1186
|
-
return execFileSync("git", args, {
|
|
1188
|
+
return execFileSync("git", args, {
|
|
1189
|
+
cwd,
|
|
1190
|
+
encoding: "utf8",
|
|
1191
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
1192
|
+
windowsHide: true
|
|
1193
|
+
});
|
|
1187
1194
|
} catch {
|
|
1188
1195
|
return null;
|
|
1189
1196
|
}
|
|
@@ -1205,7 +1212,8 @@ var isReachable = (url) => {
|
|
|
1205
1212
|
try {
|
|
1206
1213
|
execFileSync(process.execPath, ["-e", script], {
|
|
1207
1214
|
timeout: DEV_SERVER_PROBE_TIMEOUT_MS * 2,
|
|
1208
|
-
stdio: "ignore"
|
|
1215
|
+
stdio: "ignore",
|
|
1216
|
+
windowsHide: true
|
|
1209
1217
|
});
|
|
1210
1218
|
return true;
|
|
1211
1219
|
} catch {
|
|
@@ -6,4 +6,4 @@ The studio publishes every completed run — pass or fail — to the cloud durin
|
|
|
6
6
|
|
|
7
7
|
## Screenshots
|
|
8
8
|
|
|
9
|
-
Per run, `muggle-remote-test-script-get` with the `cloudTestScriptId` from the run result → per step `operation.screenshotUrl`, `operation.action` and `briefExplanation`. Retain `{ stepIndex, action, description, screenshotUrl }`, with `description` taken from `briefExplanation` — `action` is only the operation verb, and the description is what the walkthrough shows a reviewer. When `cloudTestScriptId` is absent — every failed generation, per above — call `muggle-remote-action-script-get` with `cloudActionScriptId` instead; it returns the same `steps[]` shape, so a non-passing run keeps its per-step screenshots rather than collapsing to a single ending frame. Batch in parallel. These feed the `E2eReport` consumed by [`../../muggle-pr-visual-walkthrough/SKILL.md`](../../muggle-pr-visual-walkthrough/SKILL.md) — the dev loop does not post to the PR.
|
|
9
|
+
Per run, `muggle-remote-test-script-get` with the `cloudTestScriptId` from the run result → per step `operation.screenshotUrl`, `operation.action` and `briefExplanation`. Retain `{ stepIndex, action, description, screenshotUrl, afterScreenshotUrl }`, with `description` taken from `briefExplanation` — `action` is only the operation verb, and the description is what the walkthrough shows a reviewer. `afterScreenshotUrl` is the page after the step acted: the next step's `operation.screenshotUrl` among steps that have one, and for the last such step the `summaryStep.operation.screenshotUrl` (rule and skipped operations in [`../../muggle-pr-visual-walkthrough/e2e-report-assembly.md`](../../muggle-pr-visual-walkthrough/e2e-report-assembly.md)). When `cloudTestScriptId` is absent — every failed generation, per above — call `muggle-remote-action-script-get` with `cloudActionScriptId` instead; it returns the same `steps[]` shape, so a non-passing run keeps its per-step screenshots rather than collapsing to a single ending frame. Batch in parallel. These feed the `E2eReport` consumed by [`../../muggle-pr-visual-walkthrough/SKILL.md`](../../muggle-pr-visual-walkthrough/SKILL.md) — the dev loop does not post to the PR.
|
|
@@ -24,6 +24,7 @@ Fetch step screenshots in parallel — pick the right tool per run result:
|
|
|
24
24
|
For each result:
|
|
25
25
|
|
|
26
26
|
1. Build `steps[]`: `[{ stepIndex: <index>, action: steps[i].operation.action, description: steps[i].briefExplanation, screenshotUrl: steps[i].operation.screenshotUrl }, ...]`. `action` is only the operation verb (`navigate`, `click`); `description` is the agent's readable account of the step and is what the walkthrough shows — omit it only when the step has no `briefExplanation`. A non-passing run carries its steps too: fetch them with the fallback above rather than sending `[]`, which collapses its walkthrough entry to a single ending frame. Send `[]` only when the run genuinely produced no steps; those still render the failure summary header.
|
|
27
|
+
Add each step's `afterScreenshotUrl` — the page after the step acted, which the action script does not store. It is the `operation.screenshotUrl` of the next step that has one, skipping steps without a screenshot (`noOp`, `proceed`, `proposeStep`, `curl`, `secretSave`, `generateManagedProfile`), and for the last such step the `summaryStep.operation.screenshotUrl`. Omit it when neither exists; the walkthrough then shows the before screenshot alone. This is the same pairing the Muggle AI dashboard shows.
|
|
27
28
|
2. `viewUrl` — from the run result (deep-links to the specific run).
|
|
28
29
|
3. `status` — from `muggle-local-run-result-get`.
|
|
29
30
|
4. If failed: also capture `failureStepIndex`, `error`, `artifactsDir` from the run result.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"release": "5.18.0",
|
|
3
|
-
"buildId": "run-
|
|
4
|
-
"commitSha": "
|
|
5
|
-
"buildTime": "2026-10-
|
|
3
|
+
"buildId": "run-156-1",
|
|
4
|
+
"commitSha": "5bd15d6cc0872de240bfbe041fac90c0b75d7f26",
|
|
5
|
+
"buildTime": "2026-10-21T05:50:00Z",
|
|
6
6
|
"serviceName": "muggle-ai-works-mcp"
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@muggleai/works",
|
|
3
3
|
"mcpName": "io.github.multiplex-ai/muggle",
|
|
4
|
-
"version": "5.22.0-staging.
|
|
4
|
+
"version": "5.22.0-staging.156",
|
|
5
5
|
"description": "13 years of Microsoft hyperscale engineering, packaged as a harness for your AI coding agent.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/index.js",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "muggle",
|
|
3
3
|
"description": "Real-browser E2E acceptance for your coding agent: test the flows you changed and open the PR with screenshots. Built for flows other tools can't reach: managed test identities with live inboxes (magic links, email OTP and 2FA, verification mail, password resets), an encrypted secret store for login and test credentials, and a test graph that runs prerequisite flows first. Plain-English tests become replayable scripts on localhost or preview URLs.",
|
|
4
|
-
"version": "5.22.0-staging.
|
|
4
|
+
"version": "5.22.0-staging.156",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Muggle AI",
|
|
7
7
|
"email": "support@muggle-ai.com"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "muggle",
|
|
3
|
-
"version": "5.22.0-staging.
|
|
3
|
+
"version": "5.22.0-staging.156",
|
|
4
4
|
"description": "Real-browser E2E acceptance for your coding agent: test the flows you changed and open the PR with screenshots. Built for flows other tools can't reach: managed test identities with live inboxes (magic links, email OTP and 2FA, verification mail, password resets), an encrypted secret store for login and test credentials, and a test graph that runs prerequisite flows first. Plain-English tests become replayable scripts on localhost or preview URLs.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Muggle AI",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "muggle",
|
|
3
3
|
"displayName": "Muggle AI",
|
|
4
4
|
"description": "Real-browser E2E acceptance for your coding agent: test the flows you changed and open the PR with screenshots. Built for flows other tools can't reach: managed test identities with live inboxes (magic links, email OTP and 2FA, verification mail, password resets), an encrypted secret store for login and test credentials, and a test graph that runs prerequisite flows first. Plain-English tests become replayable scripts on localhost or preview URLs.",
|
|
5
|
-
"version": "5.22.0-staging.
|
|
5
|
+
"version": "5.22.0-staging.156",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Muggle AI",
|
|
8
8
|
"email": "support@muggle-ai.com"
|
|
@@ -48,7 +48,7 @@ export function gitBashCandidates(env, gitExecutables) {
|
|
|
48
48
|
function gitExecutablesOnPath() {
|
|
49
49
|
if (process.platform !== "win32") return [];
|
|
50
50
|
try {
|
|
51
|
-
return execFileSync("where", ["git"], { encoding: "utf-8", stdio: ["ignore", "pipe", "ignore"] })
|
|
51
|
+
return execFileSync("where", ["git"], { encoding: "utf-8", stdio: ["ignore", "pipe", "ignore"], windowsHide: true })
|
|
52
52
|
.split(/\r?\n/)
|
|
53
53
|
.filter(Boolean);
|
|
54
54
|
} catch {
|
|
@@ -68,7 +68,7 @@ export function runHookUnderGitBash(scriptAndArgs, env = process.env) {
|
|
|
68
68
|
process.stdout.write("{}\n");
|
|
69
69
|
return 0;
|
|
70
70
|
}
|
|
71
|
-
const run = spawnSync(bash, scriptAndArgs, { stdio: "inherit", env: { ...env, ...HOOK_HOST_STAMP } });
|
|
71
|
+
const run = spawnSync(bash, scriptAndArgs, { stdio: "inherit", env: { ...env, ...HOOK_HOST_STAMP }, windowsHide: true });
|
|
72
72
|
if (run.error) {
|
|
73
73
|
process.stdout.write("{}\n");
|
|
74
74
|
return 0;
|
|
@@ -220,13 +220,14 @@ function fail(message) {
|
|
|
220
220
|
process.exit(2);
|
|
221
221
|
}
|
|
222
222
|
function commandSucceeds(executable, args) {
|
|
223
|
-
const probe = spawnSync(executable, args, { stdio: "ignore", timeout: 1e4 });
|
|
223
|
+
const probe = spawnSync(executable, args, { stdio: "ignore", timeout: 1e4, windowsHide: true });
|
|
224
224
|
return probe.error === void 0 && probe.status === 0;
|
|
225
225
|
}
|
|
226
226
|
function probedSystemdUserManagerState() {
|
|
227
227
|
const probe = spawnSync("systemctl", ["--user", "is-system-running"], {
|
|
228
228
|
encoding: "utf-8",
|
|
229
|
-
timeout: 1e4
|
|
229
|
+
timeout: 1e4,
|
|
230
|
+
windowsHide: true
|
|
230
231
|
});
|
|
231
232
|
if (!probeRan(probe)) return null;
|
|
232
233
|
return probe.stdout.trim();
|
|
@@ -251,7 +252,8 @@ function windowsCommandNeedsCmdShell(firstCommandToken) {
|
|
|
251
252
|
if (knownExtension !== "") return false;
|
|
252
253
|
const lookup = spawnSync("where.exe", [firstCommandToken], {
|
|
253
254
|
encoding: "utf-8",
|
|
254
|
-
timeout: 1e4
|
|
255
|
+
timeout: 1e4,
|
|
256
|
+
windowsHide: true
|
|
255
257
|
});
|
|
256
258
|
if (lookup.error !== void 0 || lookup.status !== 0) return false;
|
|
257
259
|
const resolvedExtension = extname(lookup.stdout.split(/\r?\n/)[0] ?? "").toLowerCase();
|
|
@@ -261,7 +263,8 @@ function currentUserProcessCount() {
|
|
|
261
263
|
const uid = typeof process.getuid === "function" ? String(process.getuid()) : "";
|
|
262
264
|
const listing = spawnSync("ps", ["-u", uid, "-o", "pid="], {
|
|
263
265
|
encoding: "utf-8",
|
|
264
|
-
timeout: 1e4
|
|
266
|
+
timeout: 1e4,
|
|
267
|
+
windowsHide: true
|
|
265
268
|
});
|
|
266
269
|
if (!probeRan(listing) || listing.status !== 0) {
|
|
267
270
|
return fail("cannot count current user processes for the nproc ceiling");
|
|
@@ -283,7 +286,8 @@ function registerTreeCleanup(plan2, childPid) {
|
|
|
283
286
|
if (plan2.stopsScopeUnitOnExit !== null) {
|
|
284
287
|
spawnSync("systemctl", ["--user", "stop", plan2.stopsScopeUnitOnExit], {
|
|
285
288
|
stdio: "ignore",
|
|
286
|
-
timeout: 1e4
|
|
289
|
+
timeout: 1e4,
|
|
290
|
+
windowsHide: true
|
|
287
291
|
});
|
|
288
292
|
}
|
|
289
293
|
};
|
|
@@ -814,7 +814,8 @@ function runGh(args) {
|
|
|
814
814
|
return execFileSync("gh", args, {
|
|
815
815
|
encoding: "utf-8",
|
|
816
816
|
timeout: GH_LOOKUP_TIMEOUT_MS,
|
|
817
|
-
stdio: ["ignore", "pipe", "ignore"]
|
|
817
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
818
|
+
windowsHide: true
|
|
818
819
|
});
|
|
819
820
|
} catch {
|
|
820
821
|
return null;
|
|
@@ -946,7 +947,8 @@ var defaultGhRunner = (args, input2) => {
|
|
|
946
947
|
encoding: "utf-8",
|
|
947
948
|
input: input2,
|
|
948
949
|
timeout: GH_COMMENT_TIMEOUT_MS,
|
|
949
|
-
stdio: ["pipe", "pipe", "ignore"]
|
|
950
|
+
stdio: ["pipe", "pipe", "ignore"],
|
|
951
|
+
windowsHide: true
|
|
950
952
|
});
|
|
951
953
|
} catch {
|
|
952
954
|
return null;
|
|
@@ -1183,7 +1185,12 @@ var listFiles = (dir) => {
|
|
|
1183
1185
|
};
|
|
1184
1186
|
var runGit = (args, cwd) => {
|
|
1185
1187
|
try {
|
|
1186
|
-
return execFileSync("git", args, {
|
|
1188
|
+
return execFileSync("git", args, {
|
|
1189
|
+
cwd,
|
|
1190
|
+
encoding: "utf8",
|
|
1191
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
1192
|
+
windowsHide: true
|
|
1193
|
+
});
|
|
1187
1194
|
} catch {
|
|
1188
1195
|
return null;
|
|
1189
1196
|
}
|
|
@@ -1205,7 +1212,8 @@ var isReachable = (url) => {
|
|
|
1205
1212
|
try {
|
|
1206
1213
|
execFileSync(process.execPath, ["-e", script], {
|
|
1207
1214
|
timeout: DEV_SERVER_PROBE_TIMEOUT_MS * 2,
|
|
1208
|
-
stdio: "ignore"
|
|
1215
|
+
stdio: "ignore",
|
|
1216
|
+
windowsHide: true
|
|
1209
1217
|
});
|
|
1210
1218
|
return true;
|
|
1211
1219
|
} catch {
|
|
@@ -6,4 +6,4 @@ The studio publishes every completed run — pass or fail — to the cloud durin
|
|
|
6
6
|
|
|
7
7
|
## Screenshots
|
|
8
8
|
|
|
9
|
-
Per run, `muggle-remote-test-script-get` with the `cloudTestScriptId` from the run result → per step `operation.screenshotUrl`, `operation.action` and `briefExplanation`. Retain `{ stepIndex, action, description, screenshotUrl }`, with `description` taken from `briefExplanation` — `action` is only the operation verb, and the description is what the walkthrough shows a reviewer. When `cloudTestScriptId` is absent — every failed generation, per above — call `muggle-remote-action-script-get` with `cloudActionScriptId` instead; it returns the same `steps[]` shape, so a non-passing run keeps its per-step screenshots rather than collapsing to a single ending frame. Batch in parallel. These feed the `E2eReport` consumed by [`../../muggle-pr-visual-walkthrough/SKILL.md`](../../muggle-pr-visual-walkthrough/SKILL.md) — the dev loop does not post to the PR.
|
|
9
|
+
Per run, `muggle-remote-test-script-get` with the `cloudTestScriptId` from the run result → per step `operation.screenshotUrl`, `operation.action` and `briefExplanation`. Retain `{ stepIndex, action, description, screenshotUrl, afterScreenshotUrl }`, with `description` taken from `briefExplanation` — `action` is only the operation verb, and the description is what the walkthrough shows a reviewer. `afterScreenshotUrl` is the page after the step acted: the next step's `operation.screenshotUrl` among steps that have one, and for the last such step the `summaryStep.operation.screenshotUrl` (rule and skipped operations in [`../../muggle-pr-visual-walkthrough/e2e-report-assembly.md`](../../muggle-pr-visual-walkthrough/e2e-report-assembly.md)). When `cloudTestScriptId` is absent — every failed generation, per above — call `muggle-remote-action-script-get` with `cloudActionScriptId` instead; it returns the same `steps[]` shape, so a non-passing run keeps its per-step screenshots rather than collapsing to a single ending frame. Batch in parallel. These feed the `E2eReport` consumed by [`../../muggle-pr-visual-walkthrough/SKILL.md`](../../muggle-pr-visual-walkthrough/SKILL.md) — the dev loop does not post to the PR.
|
|
@@ -24,6 +24,7 @@ Fetch step screenshots in parallel — pick the right tool per run result:
|
|
|
24
24
|
For each result:
|
|
25
25
|
|
|
26
26
|
1. Build `steps[]`: `[{ stepIndex: <index>, action: steps[i].operation.action, description: steps[i].briefExplanation, screenshotUrl: steps[i].operation.screenshotUrl }, ...]`. `action` is only the operation verb (`navigate`, `click`); `description` is the agent's readable account of the step and is what the walkthrough shows — omit it only when the step has no `briefExplanation`. A non-passing run carries its steps too: fetch them with the fallback above rather than sending `[]`, which collapses its walkthrough entry to a single ending frame. Send `[]` only when the run genuinely produced no steps; those still render the failure summary header.
|
|
27
|
+
Add each step's `afterScreenshotUrl` — the page after the step acted, which the action script does not store. It is the `operation.screenshotUrl` of the next step that has one, skipping steps without a screenshot (`noOp`, `proceed`, `proposeStep`, `curl`, `secretSave`, `generateManagedProfile`), and for the last such step the `summaryStep.operation.screenshotUrl`. Omit it when neither exists; the walkthrough then shows the before screenshot alone. This is the same pairing the Muggle AI dashboard shows.
|
|
27
28
|
2. `viewUrl` — from the run result (deep-links to the specific run).
|
|
28
29
|
3. `status` — from `muggle-local-run-result-get`.
|
|
29
30
|
4. If failed: also capture `failureStepIndex`, `error`, `artifactsDir` from the run result.
|