@muggleai/works 5.20.0-staging.143 → 5.21.0-staging.145
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-OS2WXIPB.js → chunk-IBMUOHDM.js} +60 -43
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/dist/plugin/.claude-plugin/plugin.json +1 -1
- package/dist/plugin/.cursor-plugin/plugin.json +1 -1
- package/dist/plugin/skills/_shared/dev-loop/publish.md +1 -1
- package/dist/plugin/skills/muggle-pr-visual-walkthrough/e2e-report-assembly.md +2 -2
- package/dist/release-manifest.json +3 -3
- package/package.json +1 -1
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/.cursor-plugin/plugin.json +1 -1
- package/plugin/skills/_shared/dev-loop/publish.md +1 -1
- package/plugin/skills/muggle-pr-visual-walkthrough/e2e-report-assembly.md +2 -2
|
@@ -357,9 +357,11 @@ function parentIsAlive(pid) {
|
|
|
357
357
|
// src/cli/pr-section/constants.ts
|
|
358
358
|
var DASHBOARD_URL_BASE = "https://www.muggle-ai.com/muggleTestV0/dashboard/projects";
|
|
359
359
|
var DETAIL_IMAGE_WIDTH = 720;
|
|
360
|
-
var
|
|
361
|
-
var
|
|
362
|
-
var
|
|
360
|
+
var STEP_IMAGE_WIDTH = 640;
|
|
361
|
+
var STEP_LIST_ELISION_THRESHOLD = 20;
|
|
362
|
+
var STEP_LIST_HEAD_COUNT = 12;
|
|
363
|
+
var STEP_LIST_TAIL_COUNT = 8;
|
|
364
|
+
var STEP_ELEMENT_ID_SUFFIX = /\s*with element id (?:\[\d+\]|#\d+)/g;
|
|
363
365
|
|
|
364
366
|
// src/cli/pr-section/render.ts
|
|
365
367
|
function resolveLatestRuns(tests) {
|
|
@@ -459,10 +461,20 @@ function endingFrame(test) {
|
|
|
459
461
|
};
|
|
460
462
|
}
|
|
461
463
|
function fullSizeImage(url, alt) {
|
|
462
|
-
return `<a href="${url}"><img src="${url}" width="${DETAIL_IMAGE_WIDTH}" alt="${alt}"></a>`;
|
|
464
|
+
return `<a href="${url}"><img src="${url}" width="${DETAIL_IMAGE_WIDTH}" alt="${escapeHtml(alt).replace(/"/g, """)}"></a>`;
|
|
463
465
|
}
|
|
464
|
-
function
|
|
465
|
-
return s.replace(
|
|
466
|
+
function escapeHtml(s) {
|
|
467
|
+
return s.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
468
|
+
}
|
|
469
|
+
function tableCell(s) {
|
|
470
|
+
return s.replace(/\s*\n\s*/g, " ").replace(/\|/g, "\\|");
|
|
471
|
+
}
|
|
472
|
+
function stepText(step) {
|
|
473
|
+
return escapeHtml((step.description ?? step.action).replace(STEP_ELEMENT_ID_SUFFIX, ""));
|
|
474
|
+
}
|
|
475
|
+
function dashboardLink(test, projectId, dashboardBaseUrl) {
|
|
476
|
+
const url = `${dashboardBaseUrl}/${projectId}/scripts?modal=script-details&testCaseId=${encodeURIComponent(test.testCaseId)}`;
|
|
477
|
+
return `<a href="${url}" target="_blank" rel="noopener noreferrer">Open the full run on Muggle AI \u2192</a>`;
|
|
466
478
|
}
|
|
467
479
|
function renderOverview(report) {
|
|
468
480
|
const latestRuns = resolveLatestRuns(report.tests);
|
|
@@ -532,25 +544,18 @@ function buildGroupedLayout(latestRuns) {
|
|
|
532
544
|
}
|
|
533
545
|
function renderTestDetails(entry, projectId, testNumber, dashboardBaseUrl = DASHBOARD_URL_BASE) {
|
|
534
546
|
const { test } = entry;
|
|
535
|
-
const
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
const
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
${body.join("\n")}
|
|
548
|
-
|
|
549
|
-
</details>`;
|
|
550
|
-
}
|
|
551
|
-
function renderSummaryLine(test, testNumber) {
|
|
552
|
-
const base = `${statusEmoji(test)} <b>${testNumber}. ${test.name}</b>`;
|
|
553
|
-
return test.description ? `${base} \u2014 ${test.description}` : base;
|
|
547
|
+
const lines = [`#### ${statusEmoji(test)} ${testNumber}. ${test.name}`, ""];
|
|
548
|
+
if (test.description) {
|
|
549
|
+
lines.push(`_${test.description.replace(/\s*\n\s*/g, " ")}_`, "");
|
|
550
|
+
}
|
|
551
|
+
lines.push(...renderResultTable(entry, projectId, dashboardBaseUrl));
|
|
552
|
+
const steps = renderSteps(test, projectId, dashboardBaseUrl) ?? [];
|
|
553
|
+
const frame = renderEndingFrame(test) ?? [];
|
|
554
|
+
const evidence = [...steps, ...steps.length > 0 && frame.length > 0 ? [""] : [], ...frame];
|
|
555
|
+
if (evidence.length > 0) {
|
|
556
|
+
lines.push("", "<details><summary><b>Steps and screenshots</b></summary>", "", ...evidence, "", "</details>");
|
|
557
|
+
}
|
|
558
|
+
return lines.join("\n");
|
|
554
559
|
}
|
|
555
560
|
function renderEndingFrame(test) {
|
|
556
561
|
const frame = endingFrame(test);
|
|
@@ -558,43 +563,54 @@ function renderEndingFrame(test) {
|
|
|
558
563
|
return null;
|
|
559
564
|
}
|
|
560
565
|
return [
|
|
561
|
-
|
|
566
|
+
`**Ending screen** \u2014 ${frame.caption}`,
|
|
562
567
|
"",
|
|
563
568
|
fullSizeImage(frame.url, test.name)
|
|
564
569
|
];
|
|
565
570
|
}
|
|
566
|
-
function
|
|
571
|
+
function renderSteps(test, projectId, dashboardBaseUrl) {
|
|
572
|
+
const { steps } = test;
|
|
567
573
|
if (steps.length === 0) {
|
|
568
574
|
return null;
|
|
569
575
|
}
|
|
570
|
-
const
|
|
576
|
+
const collapsible = (step, position) => `<details><summary>${position} \xB7 ${stepText(step)}</summary>
|
|
577
|
+
|
|
578
|
+
<img src="${step.screenshotUrl}" width="${STEP_IMAGE_WIDTH}" alt="Step ${position}">
|
|
579
|
+
|
|
580
|
+
</details>`;
|
|
581
|
+
const heading = ["**Steps** \u2014 click a step to see its screenshot", ""];
|
|
571
582
|
if (steps.length <= STEP_LIST_ELISION_THRESHOLD) {
|
|
572
|
-
return steps.map((step, i) =>
|
|
583
|
+
return [...heading, ...steps.map((step, i) => collapsible(step, i + 1))];
|
|
573
584
|
}
|
|
574
|
-
const head = steps.slice(0, STEP_LIST_HEAD_COUNT).map((step, i) => entry(step, i + 1));
|
|
575
585
|
const tailStart = steps.length - STEP_LIST_TAIL_COUNT;
|
|
576
|
-
const tail = steps.slice(tailStart).map((step, i) => entry(step, tailStart + i + 1));
|
|
577
586
|
const hidden = tailStart - STEP_LIST_HEAD_COUNT;
|
|
578
|
-
return [
|
|
587
|
+
return [
|
|
588
|
+
...heading,
|
|
589
|
+
...steps.slice(0, STEP_LIST_HEAD_COUNT).map((step, i) => collapsible(step, i + 1)),
|
|
590
|
+
"",
|
|
591
|
+
`_\u2026 ${hidden} more ${hidden === 1 ? "step" : "steps"} \u2014 ${dashboardLink(test, projectId, dashboardBaseUrl)}_`,
|
|
592
|
+
"",
|
|
593
|
+
...steps.slice(tailStart).map((step, i) => collapsible(step, tailStart + i + 1))
|
|
594
|
+
];
|
|
579
595
|
}
|
|
580
|
-
function
|
|
596
|
+
function renderResultTable(entry, projectId, dashboardBaseUrl) {
|
|
581
597
|
const { test } = entry;
|
|
582
|
-
const
|
|
583
|
-
const lines = [];
|
|
598
|
+
const rows = ["| | |", "|:--|:--|"];
|
|
584
599
|
if (test.status === "passed") {
|
|
585
|
-
|
|
600
|
+
rows.push("| **Result** | \u2705 Passed |");
|
|
586
601
|
} else if (test.status === "failed") {
|
|
587
|
-
|
|
588
|
-
|
|
602
|
+
rows.push(`| **Result** | \u274C Failed at step ${failureOrdinal(test, test.failureStepIndex)} |`);
|
|
603
|
+
rows.push(`| **Why** | ${tableCell(escapeHtml(test.error))} |`);
|
|
589
604
|
} else {
|
|
590
|
-
|
|
591
|
-
|
|
605
|
+
rows.push("| **Result** | \u26A0\uFE0F Inconclusive |");
|
|
606
|
+
rows.push(`| **Why** | ${tableCell(escapeHtml(test.reason))} |`);
|
|
592
607
|
}
|
|
593
608
|
if (entry.attempts > 1) {
|
|
594
|
-
|
|
609
|
+
rows.push(`| **Attempts** | ${entry.attempts} \u2014 showing the latest |`);
|
|
595
610
|
}
|
|
596
|
-
|
|
597
|
-
|
|
611
|
+
const count = test.steps.length;
|
|
612
|
+
rows.push(`| **Run** | ${count} browser ${count === 1 ? "step" : "steps"} \xB7 ${dashboardLink(test, projectId, dashboardBaseUrl)} |`);
|
|
613
|
+
return rows;
|
|
598
614
|
}
|
|
599
615
|
function renderDetailBlocks(report, dashboardBaseUrl) {
|
|
600
616
|
return resolveLatestRuns(report.tests).map((entry, i) => renderTestDetails(entry, report.projectId, i + 1, dashboardBaseUrl ?? DASHBOARD_URL_BASE)).join("\n\n");
|
|
@@ -658,6 +674,7 @@ function splitWithOverflow(report, opts) {
|
|
|
658
674
|
var StepSchema = z.object({
|
|
659
675
|
stepIndex: z.number().int().nonnegative(),
|
|
660
676
|
action: z.string().min(1),
|
|
677
|
+
description: z.string().min(1).optional(),
|
|
661
678
|
screenshotUrl: z.string().url()
|
|
662
679
|
});
|
|
663
680
|
var PassedTestSchema = z.object({
|
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-IBMUOHDM.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-ZA5KHVX5.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "muggle",
|
|
3
3
|
"description": "Run real-browser end-to-end (E2E) acceptance tests on your web app from any AI coding agent. Generate test scripts from plain English, replay them on localhost, capture screenshots, and validate user flows like signup, checkout, and dashboards. Works across Claude Code, Cursor, Codex, and Windsurf.",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.21.0-staging.145",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Muggle AI",
|
|
7
7
|
"email": "support@muggle-ai.com"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "muggle",
|
|
3
3
|
"displayName": "Muggle AI",
|
|
4
4
|
"description": "Ship quality products with AI-powered end-to-end (E2E) acceptance testing that validates your web app like a real user — from Claude Code and Cursor to PR.",
|
|
5
|
-
"version": "5.
|
|
5
|
+
"version": "5.21.0-staging.145",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Muggle AI",
|
|
8
8
|
"email": "support@muggle-ai.com"
|
|
@@ -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` and `
|
|
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. 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.
|
|
@@ -23,7 +23,7 @@ Fetch step screenshots in parallel — pick the right tool per run result:
|
|
|
23
23
|
|
|
24
24
|
For each result:
|
|
25
25
|
|
|
26
|
-
1. Build `steps[]`: `[{ stepIndex: <index>, action: steps[i].operation.action, screenshotUrl: steps[i].operation.screenshotUrl }, ...]`. Empty array is fine — zero-step runs still render the failure summary header in the walkthrough.
|
|
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`. Empty array is fine — zero-step runs still render the failure summary header in the walkthrough.
|
|
27
27
|
2. `viewUrl` — from the run result (deep-links to the specific run).
|
|
28
28
|
3. `status` — from `muggle-local-run-result-get`.
|
|
29
29
|
4. If failed: also capture `failureStepIndex`, `error`, `artifactsDir` from the run result.
|
|
@@ -56,7 +56,7 @@ If called from `muggle-do`: `e2e-acceptance.md` already produces this shape —
|
|
|
56
56
|
"runId": "<runId from muggle-local-execute-test-generation>",
|
|
57
57
|
"viewUrl": "<viewUrl from run result>",
|
|
58
58
|
"status": "passed",
|
|
59
|
-
"steps": [{ "stepIndex": 0, "action": "
|
|
59
|
+
"steps": [{ "stepIndex": 0, "action": "click", "description": "Click 'Accept all' to dismiss the cookie consent dialog.", "screenshotUrl": "..." }]
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
62
|
"name": "<failed test case title>",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"release": "5.18.0",
|
|
3
|
-
"buildId": "run-
|
|
4
|
-
"commitSha": "
|
|
5
|
-
"buildTime": "2026-10-
|
|
3
|
+
"buildId": "run-145-1",
|
|
4
|
+
"commitSha": "c9bfc9df22f7e254aab0840192bc249f2e965989",
|
|
5
|
+
"buildTime": "2026-10-13T21:47:21Z",
|
|
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.
|
|
4
|
+
"version": "5.21.0-staging.145",
|
|
5
5
|
"description": "Ship quality products with AI-powered E2E acceptance testing that validates your web app like a real user — from Claude Code and Cursor to PR.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/index.js",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "muggle",
|
|
3
3
|
"description": "Run real-browser end-to-end (E2E) acceptance tests on your web app from any AI coding agent. Generate test scripts from plain English, replay them on localhost, capture screenshots, and validate user flows like signup, checkout, and dashboards. Works across Claude Code, Cursor, Codex, and Windsurf.",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.21.0-staging.145",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Muggle AI",
|
|
7
7
|
"email": "support@muggle-ai.com"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "muggle",
|
|
3
3
|
"displayName": "Muggle AI",
|
|
4
4
|
"description": "Ship quality products with AI-powered end-to-end (E2E) acceptance testing that validates your web app like a real user — from Claude Code and Cursor to PR.",
|
|
5
|
-
"version": "5.
|
|
5
|
+
"version": "5.21.0-staging.145",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Muggle AI",
|
|
8
8
|
"email": "support@muggle-ai.com"
|
|
@@ -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` and `
|
|
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. 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.
|
|
@@ -23,7 +23,7 @@ Fetch step screenshots in parallel — pick the right tool per run result:
|
|
|
23
23
|
|
|
24
24
|
For each result:
|
|
25
25
|
|
|
26
|
-
1. Build `steps[]`: `[{ stepIndex: <index>, action: steps[i].operation.action, screenshotUrl: steps[i].operation.screenshotUrl }, ...]`. Empty array is fine — zero-step runs still render the failure summary header in the walkthrough.
|
|
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`. Empty array is fine — zero-step runs still render the failure summary header in the walkthrough.
|
|
27
27
|
2. `viewUrl` — from the run result (deep-links to the specific run).
|
|
28
28
|
3. `status` — from `muggle-local-run-result-get`.
|
|
29
29
|
4. If failed: also capture `failureStepIndex`, `error`, `artifactsDir` from the run result.
|
|
@@ -56,7 +56,7 @@ If called from `muggle-do`: `e2e-acceptance.md` already produces this shape —
|
|
|
56
56
|
"runId": "<runId from muggle-local-execute-test-generation>",
|
|
57
57
|
"viewUrl": "<viewUrl from run result>",
|
|
58
58
|
"status": "passed",
|
|
59
|
-
"steps": [{ "stepIndex": 0, "action": "
|
|
59
|
+
"steps": [{ "stepIndex": 0, "action": "click", "description": "Click 'Accept all' to dismiss the cookie consent dialog.", "screenshotUrl": "..." }]
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
62
|
"name": "<failed test case title>",
|